This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Sprite DMA & MMC interrupt wierdness

Sprite DMA & MMC interrupt wierdness
by on (#36932)
OK, I've got my scrolling up and working, but I have an odd issue where my sprite DMA is causing my status bar to be 16 lines too large, but only on Nintenulator and Nestopia, not Jnes or FCEUX.

If comment out my sprite DMA lines, then the scrolling and top status bar are correct under all 4 emulators.

Is there anything special I have to do before I sprite DMA. I've tried doing the DMA right after vsync, and even inside the NMI interrupt, but still no luck.

Any ideas?

by on (#36934)
Maybe set up the IRQ only after you have written the scroll/vram address registers for your frame?

Also double check that you don't have frame IRQs on.

by on (#36935)
Thanks for the advice dw, I figured out what the issue is:

So it seems like I was breaking the MMC3 rule of using 8x16 sprites from character set 0 instead of solely character set 1! Wierdly enough, it seems to have the of delaying when the IRQ gets set by around 16 lines in some emulators (wonder if the real HW does this too?)

By setting all the index values of all the sprites to an odd number, it fixed the issue!