Z80 NMI
Moderator: BigEvilCorporation
Z80 NMI
Does anyone know what generates an NMI on the Z80? According to the schematics I have, it's connected to the VDP (pin 70, labeled /NMI). However, I can't find the Z80's NMI mentioned in any documentation, and none of the ROMs I've looked at have a handler at 66h, suggesting that it can at least be disabled on the VDP end. Have I missed something?
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
NMI is generated only in SMS mode when you ground one address line on cart slot, otherwise NMI never happens.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 745
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
M3 is the B30 signal, and it needs to be grounded for SMS mode, and A23 is the signal used for Pause (in SMS, Pause is connected to Z80 NMI line). In MD mode, NMI never happens.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
If I understand correctly, on a real SMS the NMI is generated in hardware by the pause button. This button is not present on the genesis, but is on the power base converter. Then, the power base converter grounds M3 to signal SMS compatibility mode.
You say that A23 is used for pause. Does the pause button on the power base converter connect directly to this line? How does that in turn generate the Z80 NMI via the VDP so that the SMS game will pause?
You say that A23 is used for pause. Does the pause button on the power base converter connect directly to this line? How does that in turn generate the Z80 NMI via the VDP so that the SMS game will pause?
the M3 pin is connected to the VDP, I/O chip and to the Bus Arbitrer (the glue chip), this apparently put those three chips in SMS compatibility mode
the Z80 NMI input is connected to the Bus Arbitrer
most probably, when M3 is asserted, as soon as A23 state changes, the bus arbitrer triggers a NMI interrupt on Z80 side
the Z80 NMI input is connected to the Bus Arbitrer
most probably, when M3 is asserted, as soon as A23 state changes, the bus arbitrer triggers a NMI interrupt on Z80 side
That's interesting. I wonder if there is any way to programatically generate an NMI from the 68K. Has anyone ever probed the undocumented area above A11200? It makes sense that if Sega were to plan such a feature, that is where the register would be. For example, what happens when a write is performed to A11300?
-
- Very interested
- Posts: 745
- Joined: Sat Dec 15, 2007 7:49 am
- Location: Kazakhstan, Pavlodar
Sure, my mistake. It is B30, becouse B31 is !TIME signal.TmEE co.(TM) wrote:M3 is the B30 signal, and it needs to be grounded for SMS mode, and A23 is the signal used for Pause (in SMS, Pause is connected to Z80 NMI line). In MD mode, NMI never happens.
So, when MD in M3 mode, A23 routed directly to Z80 NMI, or trough some pulse-forming logic? I mean, Z80 NMI signal is edge sensitive signal, and no need to make pulse with normed width.
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
There are some extra components involved in SMS1, I only have SMS2 and its more integrated than SMS1...
I wonder if there actually is something in the undocumented I/O area... I guess things are probably just mirrored there.
The NMI could be useful command exchanges, place your data in Z80 RAM and trigger NMI...
I wonder if there actually is something in the undocumented I/O area... I guess things are probably just mirrored there.
The NMI could be useful command exchanges, place your data in Z80 RAM and trigger NMI...
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Mirroring usually occurs because of incomplete address decoding. As the Genesis only has (documented) registers at A11000, A11100, and A11200, it makes me wonder what, if anything, might be at A11300. If wrapping occurs, there's probably a mirror of A11000 at A11400, leaving a convenient gap at A11300.
I do have a setup to run code on real hardware. Perhaps I'll experiment some if I can find time. The ability to trigger an interrupt from one CPU to the other in either direction could be quite handy.
I do have a setup to run code on real hardware. Perhaps I'll experiment some if I can find time. The ability to trigger an interrupt from one CPU to the other in either direction could be quite handy.