CPU: Fixed move behavior with 8-bit index mode
This commit is contained in:
parent
0e26e5317d
commit
401c2c91cb
1 changed files with 10 additions and 1 deletions
|
@ -670,8 +670,12 @@ void Cpu::MVN()
|
||||||
|
|
||||||
_state.X++;
|
_state.X++;
|
||||||
_state.Y++;
|
_state.Y++;
|
||||||
_state.A--;
|
if(CheckFlag(ProcFlags::IndexMode8)) {
|
||||||
|
_state.X &= 0xFF;
|
||||||
|
_state.Y &= 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
_state.A--;
|
||||||
|
|
||||||
if(_state.A != 0xFFFF) {
|
if(_state.A != 0xFFFF) {
|
||||||
//Operation isn't done, set the PC back to the start of the instruction
|
//Operation isn't done, set the PC back to the start of the instruction
|
||||||
|
@ -693,6 +697,11 @@ void Cpu::MVP()
|
||||||
|
|
||||||
_state.X--;
|
_state.X--;
|
||||||
_state.Y--;
|
_state.Y--;
|
||||||
|
if(CheckFlag(ProcFlags::IndexMode8)) {
|
||||||
|
_state.X &= 0xFF;
|
||||||
|
_state.Y &= 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
_state.A--;
|
_state.A--;
|
||||||
|
|
||||||
if(_state.A != 0xFFFF) {
|
if(_state.A != 0xFFFF) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue