PDA

Просмотр полной версии : Hardware detection of NMI



VELESOFT
05.12.2009, 22:11
I need after press NMI button detect time before push PC register to stack.

If it will work, I can in this time disable write to ZX memory and push 2b value (PC reg.) to external hardware and after it connect back ZX memory....
After NMI will CPU jump only to adress #66 without any writing to stack. :v2_thumb:

This is pictures from Z80 CPU datasheet:
http://velesoft.speccy.cz/other/nmi-z80.png

I must differ between read instruction cycle and NMI. Any idea ? Via WAIT activity ?

alexfreed
07.12.2009, 13:28
The obvious thing to try it to have a couple of flip-flops. The first one will detect the falling edge of the NMI signal and enable the second one which should latch the falling edge of M1. The output of the second FF switches from RAM to your external hardware whatever it is. When the address 0x66 appears on the bus it resets both FFs.
Sounds reasonable?