sinclair/specnext.cpp: Refactored INT/IRQ and implemented configurable DMA halt (delay)#14739
sinclair/specnext.cpp: Refactored INT/IRQ and implemented configurable DMA halt (delay)#14739galibert merged 1 commit intomamedev:masterfrom
Conversation
…e DMA halt (delay)
| void z80n_device::nmi(int state) | ||
| { | ||
| if (state != CLEAR_LINE) | ||
| set_service_attention<SA_NMI_PENDING, 1>(); | ||
| else | ||
| set_service_attention<SA_NMI_PENDING, 0>(); | ||
| } |
There was a problem hiding this comment.
Does this CPU really allow NMI to be deasserted externally (rather than the common edge-triggered behaviour)?
There was a problem hiding this comment.
Multiface button NMI holding while button pressed.
There was a problem hiding this comment.
Yeah, but NMI is edge-triggered for most Z80-like CPUs, so dropping the NMI input won’t actually deassert the NMI condition. A logical 0->1 transition (after taking active low inputs into account) on the input triggers the condition, and it won’t be retriggered until there’s another 0->1 condition, but a 1->0 transition doesn’t clear the condition.
Unless I’m missing something (which is entirely possible), this looks like it’s treating NMI as a level-sensitive input.
There was a problem hiding this comment.
Honestly that's beyond my expertise. Don't forget z80n is software cpu so anything is possible. I can only judge by testcases I've tried, it's sometime very exhausting to do everything "right" by comparing to Verilog, sorry.
There was a problem hiding this comment.
The verilog is available somewhere? I can probably check whether it's edge.
There was a problem hiding this comment.
There was a problem hiding this comment.
There was a problem hiding this comment.
Why does it have this member function at all, rather than just using set_input_line?
There was a problem hiding this comment.
I'm positive set_input_line didn't work for me in some case. Let me try to recall what was it.
No description provided.