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

help about frame irq!

help about frame irq!
by on (#110911)
I try to add mmc3 irq to a mapper4 game!

when i set the irq line to 8,but the irq can't interrupt at scanline 8(sometime is 40), interrupt canline change over time!
Re: help about frame irq!
by on (#110912)
MMC3 IRQ seems to be pretty complex -- be sure to read it in full, especially all the bulletpoints:

http://wiki.nesdev.com/w/index.php/MMC3#Hardware
Re: help about frame irq!
by on (#110935)
With the MMC3, you don't specify the scanline you want the interrupt to happen on - you specify how many more scanlines before it triggers. For example, if you want interrupts at scanlines 20, 30, and 60, you'd set the counter to 20 during vblank, then after the first interrupt you'd set it to 10, then after the second interrupt you'd set it to 30.

In other words, it's a relative counter, not an absolute counter.
Re: help about frame irq!
by on (#110940)
Quietust wrote:
With the MMC3, you don't specify the scanline you want the interrupt to happen on - you specify how many more scanlines before it triggers. For example, if you want interrupts at scanlines 20, 30, and 60, you'd set the counter to 20 during vblank, then after the first interrupt you'd set it to 10, then after the second interrupt you'd set it to 30.

In other words, it's a relative counter, not an absolute counter.


yes,i know.maybe mmc3 was confining!
I want to hack mapper2 to mapper 4,and add irq in nmi,but can't pinpoint count the scanlines.
I set one irq line ,but the interrupt will at different posetion(ex: set irq at scanline 8,the game will interrupt at 64)