Page 1 of 1

HDMA problem

Posted: Sun May 30, 2010 7:35 pm
by psycopathicteen
I'm having trouble with the 3d ocean effect in the background of my game. It scrolls at different speeds depending on how many sprite patterns are being DMAed per frame. I'm guessing the 3d scrolling speed depends on what scanline the HDMA starts with, since the farther down scanlines scroll faster than the scanlines above (hence the 3d effect).

Posted: Mon May 31, 2010 6:37 am
by d4s
Hard to say without access to the ROM or sourcecode, but typical problems include:
-HDMA and DMA share the same channels. Make sure you don't accidently use one channel for both at the same time (I usually reserve channel 0 for DMA and use 1-7 for HDMA).
-Make sure your HDMA tables are zero-terminated properly.

Posted: Mon May 31, 2010 12:55 pm
by psycopathicteen
I fixed the problem. I was supposed to set it up once and keep it that way instead of setting it up every frame.