#25975 - LOst? - Thu Sep 02, 2004 5:07 am
Everything has to do with the way you set up the game loop, and the way you use interrupts. I have no control over what's being executed first.
An example would be my biggest dream: To have a scanline based scrolling engine.
At first I used multiple Interrupts with that CRT.S, and it didn't really give that much CPU time at all for the effects i wanted. I got flickering scanlines and stuff. I'm still very unhappy with the way you set up interrupts. But I have no other choices than to go along with that CRT.S because I don't want to learn that assembler, just to get a result worse than the current one.
With over 48 hours of fixing the HBlank, I got the effect I really wanted, except it did only work in Visualboy Advance. Any other emulator would crash or show the scanlines the wrong way.
On the real hardware, the result was.... okay. That stupid scanline number 0 wouldn't scroll correct >.<;;; And that was my main goal with those 48 hours >.<;;;;;;
I also spent 9 hours debugging a commercial game to find out how they did the scanline scrolling.
They do it with something called HDMA. I tried to use HDMA myself with these flags just like they did:
DMA0(&(REG_BG0HOFS), &VTable [0], 0x1, DMA_TIMEING_HBLANK | DMA_ENABLE | DMA_REPEATE | DMA_DEST_FIXED | DMA_SOURCE_INCREMENT);
And the result: BAD! It didn't even sync the frame, and then I had tried using the VBlank and the Vcounter in all ways I could find to make it sync, but still...... BAD.
PLUS! The scanline 0 was not scrolling in the same way as the rest of the scanlines. So.......?
WTF is wrong with the GBA? Why is is so unsychronized?
An example would be my biggest dream: To have a scanline based scrolling engine.
At first I used multiple Interrupts with that CRT.S, and it didn't really give that much CPU time at all for the effects i wanted. I got flickering scanlines and stuff. I'm still very unhappy with the way you set up interrupts. But I have no other choices than to go along with that CRT.S because I don't want to learn that assembler, just to get a result worse than the current one.
With over 48 hours of fixing the HBlank, I got the effect I really wanted, except it did only work in Visualboy Advance. Any other emulator would crash or show the scanlines the wrong way.
On the real hardware, the result was.... okay. That stupid scanline number 0 wouldn't scroll correct >.<;;; And that was my main goal with those 48 hours >.<;;;;;;
I also spent 9 hours debugging a commercial game to find out how they did the scanline scrolling.
They do it with something called HDMA. I tried to use HDMA myself with these flags just like they did:
DMA0(&(REG_BG0HOFS), &VTable [0], 0x1, DMA_TIMEING_HBLANK | DMA_ENABLE | DMA_REPEATE | DMA_DEST_FIXED | DMA_SOURCE_INCREMENT);
And the result: BAD! It didn't even sync the frame, and then I had tried using the VBlank and the Vcounter in all ways I could find to make it sync, but still...... BAD.
PLUS! The scanline 0 was not scrolling in the same way as the rest of the scanlines. So.......?
WTF is wrong with the GBA? Why is is so unsychronized?