Skip to content

Implement the zp,x version of BIT that's present on 65C02s #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Jon-Bright
Copy link

Opcode 0x34 was already mapped to BIT in opcodes.c, but it was missing elsewhere, resulting in... exciting behaviour.

This works on real hardware and is also used by Ben Eater's example programs
(which always check the busy flag before sending an instruction).
… the program to execute. Switching to other modes (fast, slow, step) still works from this mode.
The first switches to TURBO clock speed and runs at that until it encounters
a NOP, at which point it switches to STEP. It can't be triggered when the
current instruction is a NOP.
The second does the same thing, but switches back to STEP when encountering
an RTS. For each JSR it encounters in the interim, it'll wait for an
additional RTS, so the RTS where it switches to STEP should be the one from
the current subroutine. It acts weirdly when triggered while the current
instruction is a JSR for reasons I should look into but haven't yet.
Both of these should potentially be homed in emu.c rather than gui.c, but
they work for my purposes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant