rm/rm480z.cpp: Added nmi single step debugging support and corrected alternative character set display logic#15197
Open
RobinSergeant wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Single step debugging
Basically the same change that I made for the 380Z yesterday, but on the 480Z NMIEN is active high.
The front panel (accessed with <Ctrl>+F) includes a single step debugging command (z) which relies on special hardware to work. When it asserts NMIEN by writing to Port 1 we need to start counting M1 cycles and then trigger a NMI after 8 of those. The NMI service routine will then return to the front panel with PC pointing to the next instruction. With my changes this now works.
Alternative character set display logic
I did not originally appreciate that the alternative character set is actually part of the chargen ROM (starting from offset 0x1000). Hence, we should plot this character data instead of manually inverting the standard set!
The following BASIC program shows that the same characters are produced with the new routine:
NB Changing the escape sequence on line 10 to "=0L" will display the regular character set (teletext characters).