1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Corrects MVN/MVP off-by-one and failure to store what was read.

This commit is contained in:
Thomas Harte 2020-11-03 18:29:35 -05:00
parent bf85d71674
commit 91ea2eff4c

View File

@ -151,7 +151,7 @@ template <typename BusHandler, bool uses_ready_line> void Processor<BusHandler,
break; break;
case CycleStoreBlockY: case CycleStoreBlockY:
write(((instruction_buffer_.value & 0xff00) << 8) | x(), data_buffer_.any_byte()); write(((instruction_buffer_.value & 0xff00) << 8) | y(), data_buffer_.any_byte());
break; break;
#undef increment_data_address #undef increment_data_address
@ -670,16 +670,16 @@ template <typename BusHandler, bool uses_ready_line> void Processor<BusHandler,
registers_.data_bank = (instruction_buffer_.value & 0xff) << 16; registers_.data_bank = (instruction_buffer_.value & 0xff) << 16;
--registers_.x.full; --registers_.x.full;
--registers_.y.full; --registers_.y.full;
--registers_.a.full;
if(registers_.a.full) registers_.pc -= 3; if(registers_.a.full) registers_.pc -= 3;
--registers_.a.full;
break; break;
case MVN: case MVN:
registers_.data_bank = (instruction_buffer_.value & 0xff) << 16; registers_.data_bank = (instruction_buffer_.value & 0xff) << 16;
++registers_.x.full; ++registers_.x.full;
++registers_.y.full; ++registers_.y.full;
--registers_.a.full;
if(registers_.a.full) registers_.pc -= 3; if(registers_.a.full) registers_.pc -= 3;
--registers_.a.full;
break; break;
// //