gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > newbie- DMA Question

#4068 - misehert - Mon Mar 17, 2003 9:45 pm

I am trying to load my sprites using REG_DMA?'s, but my data is in separate .h files (file for each character). I can load the first one to OAMData no problem, but to load the others - I can't figure out how to set the pointer to the other sprite's starting tile. Is that possible with DMA, or do I have to copy them all into one .h file and transfer all at once?
_________________
Sorry, I'm just a Stoopid Noobie...

thank god for video x 4 - i can see again

#4070 - darkcloud - Mon Mar 17, 2003 10:10 pm

You don't have to put all the data in one file. For the first sprite, you set the DMA dest. to OAMData. Then for the second one, you would do something like (OAMData+sizeOfPreviousSprite). Make sure you put the parantheses because I've found that it doesn't work without them. Hope this helps.
_________________
Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, and that's why so is mankind.

#4098 - misehert - Tue Mar 18, 2003 10:17 pm

worked perfect, many thanks!