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?
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.
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.