#34389 - DiscoStew - Tue Jan 18, 2005 10:02 pm
I've been working in the area of the HBlank, and for all my background stuff (which I plan to put together into a library), I use HDMA, so I wouldn't need to worry about it every HBlank. However, in another part of my code, which is separate from my BG stuff, I want to overwrite a background section that the HDMA writes to.
On both VBA and No$GBA, both allow the section to be rewritten after the HDMA before stuff is displayed on the scanline, and displays the BG correctly (which is what I wanted). But on hardware, the BG is messed up as if it is mixing the 2 things together, like my manual code starts going, then in the middle of it the HDMA inits, then the rest of my manual code writes the rest. That was just a note to everyone trying to mix the 2, if you try doing this. Now the question...
Because of this, I've got to choose which route I want to go in fixing this, since both my BG and other code will be in separate libraries in the future. Should I...
thx in advance
_________________
DS - It's all about DiscoStew
On both VBA and No$GBA, both allow the section to be rewritten after the HDMA before stuff is displayed on the scanline, and displays the BG correctly (which is what I wanted). But on hardware, the BG is messed up as if it is mixing the 2 things together, like my manual code starts going, then in the middle of it the HDMA inits, then the rest of my manual code writes the rest. That was just a note to everyone trying to mix the 2, if you try doing this. Now the question...
Because of this, I've got to choose which route I want to go in fixing this, since both my BG and other code will be in separate libraries in the future. Should I...
- Make functions in both libraries that extracts some data from one library, and inserts it into another library, so that it can rewrite memory that HDMA read from.
- Remove HDMA altogether from my BG library, and replace it with my own routine that is executed every HBlank, so that there won't be any mixing do to interrupts.
thx in advance
_________________
DS - It's all about DiscoStew