CPU: Fixed move behavior with 8-bit index mode

This commit is contained in:
Sour 2019-03-24 20:20:43 -04:00
parent 0e26e5317d
commit 401c2c91cb

View file

@ -670,8 +670,12 @@ void Cpu::MVN()
_state.X++;
_state.Y++;
_state.A--;
if(CheckFlag(ProcFlags::IndexMode8)) {
_state.X &= 0xFF;
_state.Y &= 0xFF;
}
_state.A--;
if(_state.A != 0xFFFF) {
//Operation isn't done, set the PC back to the start of the instruction
@ -693,6 +697,11 @@ void Cpu::MVP()
_state.X--;
_state.Y--;
if(CheckFlag(ProcFlags::IndexMode8)) {
_state.X &= 0xFF;
_state.Y &= 0xFF;
}
_state.A--;
if(_state.A != 0xFFFF) {