You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addresses are not wrapping within zeropage as they do on a real 6502.
When running LDA ($FF), Y with Y = 0, the 6502 simulator takes the low byte from $FF and the high byte from $0100.
It can be seen when running this code:
LDA #$00
STA $00
LDA #$02
STA $FF
LDA #$04
STA $0100
LDA #$AC
STA $0402
LDA #$c2
STA $02
LDY #$00
LDA ($FF), Y
After executing this code, A should be equal to C2 and not AC.
PinoBatch, on the Nesdev wiki figured out that it is due to getWord() which does not handle wrapping:
Addresses are not wrapping within zeropage as they do on a real 6502.
When running
LDA ($FF), Y
with Y = 0, the 6502 simulator takes the low byte from $FF and the high byte from $0100.It can be seen when running this code:
After executing this code, A should be equal to C2 and not AC.
PinoBatch, on the Nesdev wiki figured out that it is due to
getWord()
which does not handle wrapping:easy6502/simulator/assembler.js
Lines 587 to 593 in bb213ae
The text was updated successfully, but these errors were encountered: