grzeg wrote:
Is the detection of 3 consecutive write cycles makes it possible?
I believe 3 consecutive write cycles is a reliable indication that an IRQ,NMI, or BRK is in progress. And your circuit looks right.
Another way to detect an interrupt is to monitor the address bus. Normally with 65xx the address bus will always increment following a SYNC cycle. The only exception is when an IRQ,NMI, or BRK is happening. In that case, the address will be the same one time. I mean the address during SYNC will be the same as the address during the following cycle. This is a reliable indication that an IRQ,NMI, or BRK is in progress -- and it works faster. The interrupt is detected
before the writes to stack. You could switch banks
before the writes if you want.
Here's the circuit. The XNOR gate looks at A0 to see whether PC incremented. The AND forces the output low in cycles other than those following SYNC.
cheers,
Jeff
_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html