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

STQ instruction, mismatched byte order when writing to mapped palette bank registers ($D100-$D3FF) #876

Open
archiecrux opened this issue Mar 3, 2025 · 1 comment
Labels
new New report, not classified yet

Comments

@archiecrux
Copy link

Platform: MEGA65R3
Core Commit: 3C10488 (release-0.96)
ROM Release: 920395

Executing an STQ instruction on mapped colour palette ($D100-$D3FF) results in a byte order mismatch.
Normally, CPU registers are stored in AXYZ order. In this particular case, register A is omitted and register Z is written twice, resulting in byte order XYZZ.

e.g.

LDA #$11
LDX #$22
LDY #$33
LDZ #$44
STQ $D100

which results in the written byte order $22 $33 $44 $44

@archiecrux archiecrux added the new New report, not classified yet label Mar 3, 2025
@archiecrux
Copy link
Author

Small addendum:

  • Setting the B register to $D1 makes no difference.
  • Addressing VIC registers at $D000 works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new New report, not classified yet
Projects
None yet
Development

No branches or pull requests

1 participant