1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Corrects decoding of CMPA.

This commit is contained in:
Thomas Harte 2019-04-20 21:21:33 -04:00
parent 0be9a0cb88
commit c66728dce2
2 changed files with 8 additions and 3 deletions

View File

@ -61,7 +61,7 @@ template <class T, bool dtack_is_implicit> void Processor<T, dtack_is_implicit>:
// }
static bool should_log = false;
should_log |= program_counter_.full >= 0x4F54;
should_log |= program_counter_.full >= 0x4F54 && program_counter_.full <= 0x4F84;
if(should_log) {
std::cout << "d0:" << std::setw(8) << std::setfill('0') << data_[0].full << " ";
std::cout << "d1:" << std::setw(8) << std::setfill('0') << data_[1].full << " ";
@ -83,8 +83,8 @@ template <class T, bool dtack_is_implicit> void Processor<T, dtack_is_implicit>:
std::cerr << "68000 Abilities exhausted; can't manage instruction " << std::hex << decoded_instruction_ << " from " << (program_counter_.full - 4) << std::endl;
return;
} else {
if(0x4f7a == program_counter_.full - 4) return;
if(should_log) std::cout << std::hex << (program_counter_.full - 4) << ": " << std::setw(4) << decoded_instruction_ << '\t';
// if(0x4f7a == program_counter_.full - 4)return;
std::cout << std::hex << (program_counter_.full - 4) << ": " << std::setw(4) << decoded_instruction_ << '\t';
}
active_program_ = &instructions[decoded_instruction_];

View File

@ -1778,6 +1778,11 @@ struct ProcessorStorageConstructor {
} break;
case Decoder::CMPA: {
// Only operation modes 011 and 111 are accepted, and long words are selected
// by the top bit.
if(((op_mode)&3) != 3) continue;
is_long_word_access = op_mode == 7;
const int destination_register = (instruction >> 9) & 7;
storage_.instructions[instruction].set_source(storage_, ea_mode, ea_register);