#92592 - devmelon - Fri Jul 14, 2006 1:09 am
http://www.work.de/nocash/gbatek.htm#dmatransfers
Are these mapped registers 16 or 32 bits?
I am having a hard time understanding if I should write a 16 bit adress to 0x0400 00b0 or 0x0400 00b2, or if I just should write a 32 bit adress to 0x0400 00b0?
Jonathan S. Harbour ( http://www.jharbour.com/gameboy/default.aspx ), explains in chapter 6, page 208, about DMA transfers very vaugely. He uses unsigned int, and I don't know if that is 16 or 32 bits. Well, when I'm thinking about it, hes using shorts at places and ints at others so it should be 32 (although I use short and long for clarity).
How come the GBATEK writes that register as 2 16-bit registers? Are they meant as high and low registers in that case?
| Quote: |
| 0B0h,0B2h - DMA0SAD - DMA 0 Source Address (W) (internal memory)
0BCh,0BEh - DMA1SAD - DMA 1 Source Address (W) (any memory) 0C8h,0CAh - DMA2SAD - DMA 2 Source Address (W) (any memory) 0D4h,0D6h - DMA3SAD - DMA 3 Source Address (W) (any memory) The most significant address bits are ignored, only the least significant 27 or 28 bits are used (max 07FFFFFFh internal memory, or max 0FFFFFFFh any memory - except SRAM ???!). |
Are these mapped registers 16 or 32 bits?
I am having a hard time understanding if I should write a 16 bit adress to 0x0400 00b0 or 0x0400 00b2, or if I just should write a 32 bit adress to 0x0400 00b0?
Jonathan S. Harbour ( http://www.jharbour.com/gameboy/default.aspx ), explains in chapter 6, page 208, about DMA transfers very vaugely. He uses unsigned int, and I don't know if that is 16 or 32 bits. Well, when I'm thinking about it, hes using shorts at places and ints at others so it should be 32 (although I use short and long for clarity).
How come the GBATEK writes that register as 2 16-bit registers? Are they meant as high and low registers in that case?