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

PPU A12 to IRQ on cartridge - Does it actually work?

PPU A12 to IRQ on cartridge - Does it actually work?
by on (#74427)
Has anyone ever tested connecting PPU A12 to the IRQ line on a powerpak or something, and tested it out on hardware to see if you could get interrupts generated every scanline when it switches from BG to Sprites?

Obviously, you'd need a software delay for 85 ppu pixels after an interrupt to not get bothered further.

by on (#74428)
/IRQ is level sensitive and active low, and A12 stays low most of the time. You'd have to connect it to /A12 to get it to work, and that'd need an inverter. But you'd only need to keep it low in software for 60 pixels (start of fetch 131 to end of fetch 160), of which the IRQ overhead contributes the first 21 or so. And on PAL, the instruction time can be an exact multiple of the sprite fetch period (inc d or lda (d),y = 5 PAL CPU cycles = 16 dots = 8 fetches = 2 sprites), missing entire fetches.

But then this might finally be a use for the binary counter aspect of the 74HC161. With PPU A12 feeding a 555 timer feeding a 161, we could have a discrete scanline counter.