Skip to content
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

Address pushed by BRK (and presumably interrupts) onto stack is too high by 1 #1

Closed
gardners opened this issue Jan 26, 2014 · 4 comments
Labels

Comments

@gardners
Copy link
Owner

BRK, RTI and interrupts must all use the same semantics for the machine to run.
They do, but the pushed address is too high by one.

@gardners
Copy link
Owner Author

Need to:

  1. Reduce by 1 the PC pushed by BRK.
  2. Reduce by 1 the PC pushed by interrupts.
  3. Increment PC pulled when calling RTI (this makes it the same as RTS in fact)

@gardners
Copy link
Owner Author

Implemented the fix, and confirmed that the right values get written on the stack, and C64 ROMs start up fine with it. However, the BRKN stress test still complain that the wrong data gets written to the stack. Not sure what exactly is wrong now.

@gardners
Copy link
Owner Author

Fixed wrong way. Should be PC+1, not PC-1. Fixed in commit f5dd623, which will hopefully fix this issue.

@gardners
Copy link
Owner Author

Fixed.

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

No branches or pull requests

1 participant