#21190 - Mephisto - Tue May 25, 2004 5:14 pm
I want to store spritedata into VRAM using dma but it display strange sprites, it display like 1 coloumn / 2.
REG_DM3SAD = (u32)&SpritesTileData[x]
REG_DM3DAD = (u32)&SpritesData_VRAM[x];
REG_DM3CNT = TileWidth * TileHeight / 2 | DMA_16NOW;
anything wrong ?
Last edited by Mephisto on Tue May 25, 2004 6:52 pm; edited 1 time in total
#21199 - sajiimori - Tue May 25, 2004 6:51 pm
Can't tell from that.
Use VBA's tools to look at sprite tile RAM and see if it looks right.
Is SpritesTileData a compiled C array? If so, look at it and make sure it's what you expected. If it's hard to tell, use a simpler image.
#21201 - Mephisto - Tue May 25, 2004 7:01 pm
1) gba displays what it has in memory, so what is in tile RAM == what you put in.
2) SpritesTileData contains tile data (8x8 palette numbers per tiles).
it is correct (already used it with another displaying engine).
#21224 - dagamer34 - Wed May 26, 2004 2:35 am
Are you sure you are using the address of the arrays when filling in the DMA registers?
_________________
Little kids and Playstation 2's don't mix. :(
#21225 - sajiimori - Wed May 26, 2004 3:34 am
Quote: |
1) gba displays what it has in memory, so what is in tile RAM == what you put in.
|
Thanks for letting me know. Did you bother looking?
Again, there is nothing obviously wrong about the code you posted. My psychic powers are a little weak these last few days, so how about some more information?
#21228 - NoMis - Wed May 26, 2004 7:39 am
What programm did you use to convert the sprite data?