mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Further miscellaneous changes to debug logging. All temporary.
This commit is contained in:
parent
df56e6fe53
commit
00c32e4b59
@ -63,6 +63,7 @@ uint8_t IWM::read(int address) {
|
|||||||
const auto result = data_register_;
|
const auto result = data_register_;
|
||||||
|
|
||||||
if(data_register_ & 0x80) {
|
if(data_register_ & 0x80) {
|
||||||
|
// printf("\n\nIWM:%02x\n\n", data_register_);
|
||||||
data_register_ = 0;
|
data_register_ = 0;
|
||||||
}
|
}
|
||||||
LOG("Reading data register: " << PADHEX(2) << int(result));
|
LOG("Reading data register: " << PADHEX(2) << int(result));
|
||||||
|
@ -67,6 +67,7 @@ void Audio::get_samples(std::size_t number_of_samples, int16_t *target) {
|
|||||||
|
|
||||||
// TODO: temporary implementation. Very inefficient. Replace.
|
// TODO: temporary implementation. Very inefficient. Replace.
|
||||||
for(std::size_t sample = 0; sample < number_of_samples; ++sample) {
|
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_);
|
target[sample] = volume_multiplier_ * int16_t(sample_queue_.buffer[read_pointer] * volume_ * enabled_mask_);
|
||||||
++subcycle_offset_;
|
++subcycle_offset_;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "../../../Inputs/QuadratureMouse/QuadratureMouse.hpp"
|
#include "../../../Inputs/QuadratureMouse/QuadratureMouse.hpp"
|
||||||
|
|
||||||
//#define LOG_TRACE
|
#define LOG_TRACE
|
||||||
|
|
||||||
#include "../../../Components/6522/6522.hpp"
|
#include "../../../Components/6522/6522.hpp"
|
||||||
#include "../../../Components/8530/z8530.hpp"
|
#include "../../../Components/8530/z8530.hpp"
|
||||||
@ -297,10 +297,6 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
|
|||||||
if(!(operation & Microcycle::Read) || word_address >= 0x300000) operation = 0;
|
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);
|
const auto masked_operation = operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read | Microcycle::InterruptAcknowledge);
|
||||||
switch(masked_operation) {
|
switch(masked_operation) {
|
||||||
default:
|
default:
|
||||||
@ -330,6 +326,19 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
|
|||||||
);
|
);
|
||||||
break;
|
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 {
|
} else {
|
||||||
// TODO: add delay if this is a RAM access and video blocks it momentarily.
|
// TODO: add delay if this is a RAM access and video blocks it momentarily.
|
||||||
// "Each [video] fetch took two cycles out of eight"
|
// "Each [video] fetch took two cycles out of eight"
|
||||||
@ -449,7 +458,7 @@ template <Analyser::Static::Macintosh::Target::Model model> class ConcreteMachin
|
|||||||
else clock_.set_input(!!(value & 0x2), !!(value & 0x1));
|
else clock_.set_input(!!(value & 0x2), !!(value & 0x1));
|
||||||
|
|
||||||
audio_.flush();
|
audio_.flush();
|
||||||
audio_.audio.set_enabled(!!(value & 0x80));
|
audio_.audio.set_enabled(!(value & 0x80));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -291,25 +291,10 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
#ifdef LOG_TRACE
|
#ifdef LOG_TRACE
|
||||||
const uint32_t fetched_pc = (program_counter_.full - 4)&0xffffff;
|
const uint32_t fetched_pc = (program_counter_.full - 4)&0xffffff;
|
||||||
|
|
||||||
should_log |= (fetched_pc == 0x400BF8);
|
// should_log |= fetched_pc == 0x400BF6;
|
||||||
// should_log = (fetched_pc >= 0x40A284 && fetched_pc <= 0x40A732);
|
// should_log &= fetched_pc != 0x400BF8;
|
||||||
// should_log |= fetched_pc == 0x400A30;
|
|
||||||
// should_log =
|
should_log = (fetched_pc >= 0x418CE8) && (fetched_pc <= 0x418EC2);
|
||||||
// (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);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(instructions[decoded_instruction_.full].micro_operations) {
|
if(instructions[decoded_instruction_.full].micro_operations) {
|
||||||
|
Loading…
Reference in New Issue
Block a user