1Fermer3
CosmicRLe 17/11/2023 à 00:41
As far as I know the modulo should stay the same once you set it - unless you have a piece of code or interrupt routine that changes it and you aren't aware of it.

There are timing restrictions on writes to VRAM and it might be that when you set the modulo after setting the address - that you are actually introducing a delay before you write data to the VRAM which gives the graphics chip time to find the right tile.

- You need to leave 12 CPU cycles after every VRAM write. If you don't leave enough time - it's possible it won't have updated (using the modulo) to the next address in time

Check out the way it's done in the DevKit if you are unsure

Here are the timings from the Dev Wiki : https://wiki.neogeodev.org/index.php?title=VRAM

sbREB30.jpg

Hope that helps