#6669 - GbaGuy - Sun Jun 01, 2003 4:57 pm
This is what I have:
Everything now works, except for the picture being upside-down and
the colors reversed.
Anyone want to help on this?
Thanks,
- Mike
PS: The headers can be retrieved if you take my website
http://k2pts.home.attbi.com/gbaguy/ and append the name of a
header.
Last edited by GbaGuy on Mon Jun 02, 2003 1:27 am; edited 1 time in total
Code: |
@arm @fsize 32 @equ oam_table = 0x03000000 b start @include screen.h @include dma.h @dup dcb 0xba,0x0 start: ldr r7,=0x4000000 ldr r8,=0x403 str r8,[r7] ldr r2,=StartOfAVI ldr r3,=0 ; offset from StartOfAVI ldr r9,=0x63643030 ; means a video chunk, 0x63643030 ldr r8,=4 ldr r7,=1 ldr r10,=0 ldr r6,=240*160*2-2 playAVI: ldr r2,=StartOfAVI ldr r5,=0 add r5,r2,r3 ; Add offset to r2 (base) give r5 the full addr ldr r4,[r5] ; get data cmp r4,r9 ; see if a video frame is coming up bne NotAVidChunk ; if not, goto NotAVidChunk add r5,r5,r8 ; add 4 to get past the chunk specifier and something else that I don't know what exactly it is. ldr r0,=0x4000006 ;0x4000006 is vertical trace counter it?s address is loaded into r0 scanline_wait: ;lable ldrh r1, [r0] ;move the value stored in the scan line register into r1 cmp r1, 160 ;comp it with 160 bne scanline_wait ;if it is equal then we are done else it jumps to scanline wait DrawMode3Pic r5 ; draw the picture with DMA. add r3,r3,r6 add r3,r3,r7 b playAVI NotAVidChunk: add r3,r3,r7 ; add 1 to the offset b playAVI ; try again StartOfAVI: ; AVI file to be DOS Copy commanded to the end which will be here. ; AVI file hopefully will be uncompressed, no sound, 16bit color ; and 240x160. VirtualDub can be used to get it like that. @endarea @pool |
Everything now works, except for the picture being upside-down and
the colors reversed.
Anyone want to help on this?
Thanks,
- Mike
PS: The headers can be retrieved if you take my website
http://k2pts.home.attbi.com/gbaguy/ and append the name of a
header.
Last edited by GbaGuy on Mon Jun 02, 2003 1:27 am; edited 1 time in total