8000 Apple2: Fix permanently disabled IRQ by colinleroy · Pull Request #2745 · cc65/cc65 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Apple2: Fix permanently disabled IRQ #2745

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

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

colinleroy
Copy link
Contributor

Regression introduced in 990d65e:
Pushing status, initializing IRQ handler (which enables IRQ) then pulling status re-disables IRQ.

bne basic

; We are running ProDOS, disable the IRQ/RST vector patching
sty patch_vectors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is certainly "cool" as the $4C is already loaded but after all ONCE is declared as R/O: https://github.com/cc65/cc65/blob/master/cfg/apple2.cfg#L31

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha damn, I noticed done was patched and thought it was ok there :)
Do you have other ideas? using pla/and instead of plp was my first but it's hard to understand what it does at first sight, I find?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done is deliberately placed in .data.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did forget to double-check that 😁

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a compromise between coolness and readibility?

lda $BF00
sec
sbc #$4C
pha
bne ...
[...]
pla
beq ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good, yes! Updated.

Regression introduced in 990d65e:
Pushing status, initializing IRQ handler (which enables IRQ)
then pulling status re-disables IRQ.
@colinleroy colinleroy force-pushed the apple2-fix-vectors-patching branch from 1b60014 to 3ec6fda Compare June 26, 2025 17:04
@oliverschmidt oliverschmidt merged commit a028ac4 into cc65:master Jun 26, 2025
2 checks passed
@oliverschmidt
Copy link
Contributor

Thanks 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0