mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-25 03:32:01 +00:00
Disabled a bunch of the caveman debug logging.
This commit is contained in:
parent
f589d639db
commit
c0ab45a73d
@ -116,16 +116,16 @@ template <class T> class MOS6522 {
|
|||||||
// printf("Peripheral control %02x\n", value);
|
// printf("Peripheral control %02x\n", value);
|
||||||
_registers.peripheral_control = value;
|
_registers.peripheral_control = value;
|
||||||
|
|
||||||
// TODO: simplify below; tryig to avoid improper logging of unimplemented warnings in input mode
|
// TODO: simplify below; trying to avoid improper logging of unimplemented warnings in input mode
|
||||||
// if(value & 0x08)
|
if(value & 0x08)
|
||||||
// {
|
{
|
||||||
switch(value & 0x0e)
|
switch(value & 0x0e)
|
||||||
{
|
{
|
||||||
default: printf("Unimplemented control line mode %d\n", (value >> 1)&7); break;
|
default: printf("Unimplemented control line mode %d\n", (value >> 1)&7); break;
|
||||||
case 0x0c: static_cast<T *>(this)->set_control_line_output(Port::A, Line::Two, false); break;
|
case 0x0c: static_cast<T *>(this)->set_control_line_output(Port::A, Line::Two, false); break;
|
||||||
case 0x0e: static_cast<T *>(this)->set_control_line_output(Port::A, Line::Two, true); break;
|
case 0x0e: static_cast<T *>(this)->set_control_line_output(Port::A, Line::Two, true); break;
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
if(value & 0x80)
|
if(value & 0x80)
|
||||||
{
|
{
|
||||||
switch(value & 0xe0)
|
switch(value & 0xe0)
|
||||||
|
@ -30,7 +30,7 @@ void Machine::set_serial_bus(std::shared_ptr<::Commodore::Serial::Bus> serial_bu
|
|||||||
|
|
||||||
unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value)
|
unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value)
|
||||||
{
|
{
|
||||||
if(operation == CPU6502::BusOperation::ReadOpcode && (address >= 0xF556 && address <= 0xF56D)) printf("%04x\n", address);
|
// if(operation == CPU6502::BusOperation::ReadOpcode && (address >= 0xF556 && address <= 0xF56D)) printf("%04x\n", address);
|
||||||
// if(operation == CPU6502::BusOperation::ReadOpcode && (address == 0xE887)) printf("A: %02x\n", get_value_of_register(CPU6502::Register::A));
|
// if(operation == CPU6502::BusOperation::ReadOpcode && (address == 0xE887)) printf("A: %02x\n", get_value_of_register(CPU6502::Register::A));
|
||||||
|
|
||||||
/* static bool log = false;
|
/* static bool log = false;
|
||||||
|
@ -99,13 +99,13 @@ class DriveVIA: public MOS::MOS6522<DriveVIA>, public MOS::MOS6522IRQDelegate {
|
|||||||
void set_port_output(Port port, uint8_t value, uint8_t direction_mask) {
|
void set_port_output(Port port, uint8_t value, uint8_t direction_mask) {
|
||||||
if(port)
|
if(port)
|
||||||
{
|
{
|
||||||
if(value&4)
|
// if(value&4)
|
||||||
{
|
// {
|
||||||
printf("Head step: %d\n", value&3);
|
// printf("Head step: %d\n", value&3);
|
||||||
printf("Motor: %s\n", value&4 ? "On" : "Off");
|
// printf("Motor: %s\n", value&4 ? "On" : "Off");
|
||||||
printf("LED: %s\n", value&8 ? "On" : "Off");
|
// printf("LED: %s\n", value&8 ? "On" : "Off");
|
||||||
printf("Density: %d\n", (value >> 5)&3);
|
// printf("Density: %d\n", (value >> 5)&3);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -58,9 +58,9 @@ Machine::Machine() :
|
|||||||
// TEMPORARY: attach a [diskless] 1540
|
// TEMPORARY: attach a [diskless] 1540
|
||||||
set_disc();
|
set_disc();
|
||||||
|
|
||||||
_debugPort.reset(new ::Commodore::Serial::DebugPort);
|
// _debugPort.reset(new ::Commodore::Serial::DebugPort);
|
||||||
_debugPort->set_serial_bus(_serialBus);
|
// _debugPort->set_serial_bus(_serialBus);
|
||||||
_serialBus->add_port(_debugPort);
|
// _serialBus->add_port(_debugPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Machine::write_to_map(uint8_t **map, uint8_t *area, uint16_t address, uint16_t length)
|
void Machine::write_to_map(uint8_t **map, uint8_t *area, uint16_t address, uint16_t length)
|
||||||
@ -82,12 +82,12 @@ Machine::~Machine()
|
|||||||
|
|
||||||
unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value)
|
unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value)
|
||||||
{
|
{
|
||||||
static int logCount = 0;
|
// static int logCount = 0;
|
||||||
if(operation == CPU6502::BusOperation::ReadOpcode && address == 0xee17) logCount = 500;
|
// if(operation == CPU6502::BusOperation::ReadOpcode && address == 0xee17) logCount = 500;
|
||||||
if(operation == CPU6502::BusOperation::ReadOpcode && logCount) {
|
// if(operation == CPU6502::BusOperation::ReadOpcode && logCount) {
|
||||||
logCount--;
|
// logCount--;
|
||||||
printf("%04x\n", address);
|
// printf("%04x\n", address);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// run the phase-1 part of this cycle, in which the VIC accesses memory
|
// run the phase-1 part of this cycle, in which the VIC accesses memory
|
||||||
uint16_t video_address = _mos6560->get_address();
|
uint16_t video_address = _mos6560->get_address();
|
||||||
|
@ -295,7 +295,7 @@ class Machine:
|
|||||||
std::shared_ptr<KeyboardVIA> _keyboardVIA;
|
std::shared_ptr<KeyboardVIA> _keyboardVIA;
|
||||||
std::shared_ptr<SerialPort> _serialPort;
|
std::shared_ptr<SerialPort> _serialPort;
|
||||||
std::shared_ptr<::Commodore::Serial::Bus> _serialBus;
|
std::shared_ptr<::Commodore::Serial::Bus> _serialBus;
|
||||||
std::shared_ptr<::Commodore::Serial::DebugPort> _debugPort;
|
// std::shared_ptr<::Commodore::Serial::DebugPort> _debugPort;
|
||||||
|
|
||||||
// Tape
|
// Tape
|
||||||
Tape _tape;
|
Tape _tape;
|
||||||
|
Loading…
Reference in New Issue
Block a user