diff --git a/Components/DiskII/IWM.cpp b/Components/DiskII/IWM.cpp index 7381f3596..271da8058 100644 --- a/Components/DiskII/IWM.cpp +++ b/Components/DiskII/IWM.cpp @@ -63,6 +63,7 @@ uint8_t IWM::read(int address) { const auto result = data_register_; if(data_register_ & 0x80) { +// printf("\n\nIWM:%02x\n\n", data_register_); data_register_ = 0; } LOG("Reading data register: " << PADHEX(2) << int(result)); diff --git a/Machines/Apple/Macintosh/Audio.cpp b/Machines/Apple/Macintosh/Audio.cpp index 27eaca2b3..875fc2da4 100644 --- a/Machines/Apple/Macintosh/Audio.cpp +++ b/Machines/Apple/Macintosh/Audio.cpp @@ -67,6 +67,7 @@ void Audio::get_samples(std::size_t number_of_samples, int16_t *target) { // TODO: temporary implementation. Very inefficient. Replace. for(std::size_t sample = 0; sample < number_of_samples; ++sample) { +// if(volume_ && enabled_mask_) printf("%d\n", sample_queue_.buffer[read_pointer]); target[sample] = volume_multiplier_ * int16_t(sample_queue_.buffer[read_pointer] * volume_ * enabled_mask_); ++subcycle_offset_; diff --git a/Machines/Apple/Macintosh/Macintosh.cpp b/Machines/Apple/Macintosh/Macintosh.cpp index 093723ab8..0878dcdc8 100644 --- a/Machines/Apple/Macintosh/Macintosh.cpp +++ b/Machines/Apple/Macintosh/Macintosh.cpp @@ -23,7 +23,7 @@ #include "../../../Inputs/QuadratureMouse/QuadratureMouse.hpp" -//#define LOG_TRACE +#define LOG_TRACE #include "../../../Components/6522/6522.hpp" #include "../../../Components/8530/z8530.hpp" @@ -297,10 +297,6 @@ template class ConcreteMachin if(!(operation & Microcycle::Read) || word_address >= 0x300000) operation = 0; } -// if(!(operation & Microcycle::Read) && (word_address == (0x0000182e >> 1))) { -// printf("Write to 0000182e: %04x from %08x\n", cycle.value->full, mc68000_.get_state().program_counter); -// } - const auto masked_operation = operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read | Microcycle::InterruptAcknowledge); switch(masked_operation) { default: @@ -330,6 +326,19 @@ template class ConcreteMachin ); break; } + +// if(!(operation & Microcycle::Read) && (word_address == (0x0000182e >> 1))) { +// printf("Write to 0000182e: %04x from %08x\n", cycle.value->full, mc68000_.get_state().program_counter); +// } +// if( +// ( +// (word_address == (0x00000352 >> 1)) +// || (word_address == (0x00000354 >> 1)) +// || (word_address == (0x00005d16 >> 1)) +// ) +// ) { +// printf("%s %08x: %04x from around %08x\n", (operation & Microcycle::Read) ? "Read" : "Write", word_address << 1, memory_base[word_address], mc68000_.get_state().program_counter); +// } } else { // TODO: add delay if this is a RAM access and video blocks it momentarily. // "Each [video] fetch took two cycles out of eight" @@ -449,7 +458,7 @@ template class ConcreteMachin else clock_.set_input(!!(value & 0x2), !!(value & 0x1)); audio_.flush(); - audio_.audio.set_enabled(!!(value & 0x80)); + audio_.audio.set_enabled(!(value & 0x80)); break; } } diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index eea0ebda1..f952ea50b 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -291,25 +291,10 @@ template void Proces #ifdef LOG_TRACE const uint32_t fetched_pc = (program_counter_.full - 4)&0xffffff; - should_log |= (fetched_pc == 0x400BF8); -// should_log = (fetched_pc >= 0x40A284 && fetched_pc <= 0x40A732); -// should_log |= fetched_pc == 0x400A30; -// should_log = -// (fetched_pc >= 0x402DF8 && fetched_pc <= 0x403412) || -// (fetched_pc >= 0x4077B6 && fetched_pc <= 0x40799A); -// should_log = fetched_pc >= 0x418C22 && fetched_pc <= 0x418CD8; -// should_log |= fetched_pc == 0x4009ce; // Here rests a call to _MountVol, which fails. -// should_log &= fetched_pc != 0x400b82; -//1300 -// should_log = (fetched_pc >= 0x400D9A) && (fetched_pc <= 0x400EAA); - // == 0x0003ea); -// should_log |= -// (((program_counter_.full - 4)&0xffffff) == 0x418CDE) || // E_Sony_RdData -// (((program_counter_.full - 4)&0xffffff) == 0x4182DC) || // E_Sony_ReSeek -// (((program_counter_.full - 4)&0xffffff) == 0x418C18); // E_Sony_RdAddr - //4176b6 -// should_log |= (program_counter_.full - 4) == 0x418A0A;//0x41806A;//180A2; -// should_log = ((program_counter_.full - 4) >= 0x417D9E) && ((program_counter_.full - 4) <= 0x419D96); +// should_log |= fetched_pc == 0x400BF6; +// should_log &= fetched_pc != 0x400BF8; + + should_log = (fetched_pc >= 0x418CE8) && (fetched_pc <= 0x418EC2); #endif if(instructions[decoded_instruction_.full].micro_operations) {