diff --git a/cpu.cpp b/cpu.cpp index f3fc24c..5dd07d3 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -1280,12 +1280,11 @@ bool cpu::single_operand_instructions(const uint16_t instr) v = b->read(a.addr.value(), wm_word, rm_prev); } else { - int run_mode = getPSW_prev_runmode(); - auto phys = b->calculate_physical_address(run_mode, a.addr.value()); + int run_mode = getPSW_prev_runmode(); + auto phys = b->calculate_physical_address(run_mode, a.addr.value()); + uint32_t a = word_mode == wm_byte ? phys.physical_data : phys.physical_instruction; - uint32_t a = word_mode == wm_byte ? phys.physical_data : phys.physical_instruction; - - b->check_odd_addressing(a, run_mode, word_mode ? d_space : i_space, false); + b->check_odd_addressing(a, run_mode, word_mode ? d_space : i_space, false); // TODO d/i space must depend on the check done in calculate_physical_address v = b->readPhysical(word_mode == wm_byte ? phys.physical_data : phys.physical_instruction); } @@ -1327,7 +1326,7 @@ bool cpu::single_operand_instructions(const uint16_t instr) mtpi_count++; uint32_t a = word_mode == wm_byte ? phys.physical_data : phys.physical_instruction; - b->check_odd_addressing(a, run_mode, word_mode == wm_byte ? d_space : i_space, true); + b->check_odd_addressing(a, run_mode, word_mode == wm_byte ? d_space : i_space, true); // TODO d/i space must depend on the check done in calculate_physical_address b->writePhysical(a, v); } } diff --git a/rk05.cpp b/rk05.cpp index f0d18b9..f4bcb2e 100644 --- a/rk05.cpp +++ b/rk05.cpp @@ -122,7 +122,6 @@ void rk05::writeWord(const uint16_t addr, uint16_t v) if (func == 0) { // controller reset DOLOG(debug, true, "RK05 invoke %d (controller reset)", func); - } else if (func == 1) { // write *disk_write_acitivity = true;