MMC3 IRQs?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
MMC3 IRQs?
by on (#138687)
My emulator passes in all MMC3 IRQ tests (from blargg). However, games like Kick Master and Mega Man 5 are flickering. Well, if I delay the IRQ trigger by 1 cycle (or 3 PPU cycles), the flickering disappears. On other side, it gives an immediate error in scanline_timing test, as "scanline 0 IRQ should occur sooner when $2000:$08".

Any help?
Re: MMC3 IRQs?
by on (#138721)
Make sure that you're implementing IRQ checking correctly. By that, I mean that the CPU will (generally) check for a pending IRQ on the second-to-last cycle of an instruction.
Re: MMC3 IRQs?
by on (#138727)
So that's possibly the problem. In my emu, the IRQ is checked at every CPU memory read/write as the 1st thing.

EDIT: I've changed my CPU emulator in order to check IRQ/NMI before the last cycle of an instruction. The problem is still there, unfortunately.