I don't know about whether clocked on scanlines or CPU cycles. For all I know it could be both like the RAMBO-1 where you can choose between counting scanlines or CPU cycles. Not too unthinkable either if the N106 came first. Because Tengen ported several Namco games over the the NES they could have designed the RAMBO-1 to support.
By the looks of it if there are indeed two counting registers (15 bits total) I would imagine it does count CPU cycles. Since it's a 15 bit counter there isn't much point to count 64,000+ scanlines. You'd only count that high if you were looking to count CPU cycles. But that's not to say it can't be setup to count scanlines as well, who knows.
As for the 'firing' terminology it kinda confused me at first as well. I imagine it is similar to all other IRQs. Fired means for an IRQ to be generated, it's not very easy for a mapper to insert a BRK via hardware.
For me it's easiest to explain in hardware because that's what it is. Basically when a IRQ gets triggered by the counter the mapper pulls the IRQ line low. It HOLDS the line low until the CPU acknowledges the IRQ either by clearing or disabling the IRQ. If you access (read/write) to $5000-6000 it will acknowledge the IRQ. This will clear the IRQ and the mapper releases the IRQ line allowing it to be pulled high again. IRQs will still be enabled, you're just clearing the individual IRQ and setting it up for the next time around.
EDIT: For the record according to Disch's docs:
Code:
IRQ Operation:
--------------------------
IRQs are driven by a 15-bit CPU cycle up-counter. $5000 and $5800 are *direct* access to the IRQ counter
(they are not a reload value). Games can also read back the real-time state of the IRQ counter by reading
those regs.
When IRQs are enabled, the following occurs every CPU cycle:
- If IRQ Counter = $7FFF
a) Trip IRQ
- otherwise...
a) Increment IRQ counter by 1
Reading/Writing $5000 or $5800 will acknowledge the pending IRQ.
Sources on the behavior of this IRQ counter vary. Some say that the IRQ counter wraps from $7FFF to $0000,
and trips an IRQ only when it wraps -- however Sangokushi 2 polls $5800, and emulating IRQs that way results
in the game locking up shortly after it starts (once it sees that $5800 is not what it expects, it resets the
IRQ counter and loops)
Emulating the IRQ counter as above seems to work for every game out there -- although it probably isn't 100%
accurate.
And with firebug only stating:
Code:
- The IRQ counter is incremented at each scanline. When it reaches
$7FFF, an IRQ interrupt is executed, but there is no reset.
This is still preliminary and untested, and I may be wrong on
this point. Splatterhouse and several other games run fine
without it.
Along with the fact it's a 15bit counter I would tend to believe it's a CPU cycle counter. Firefly only said his data was preliminary and that games he ran worked fine without an IRQ at all since they didn't use it. I suspect it isn't a scanline counter at all...