1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-26 10:29:31 +00:00

Disabled a bunch of the caveman debug logging.

This commit is contained in:
Thomas Harte 2016-07-09 22:29:11 -04:00
parent f589d639db
commit c0ab45a73d
5 changed files with 22 additions and 22 deletions

View File

@ -116,16 +116,16 @@ template <class T> class MOS6522 {
// printf("Peripheral control %02x\n", value);
_registers.peripheral_control = value;
// TODO: simplify below; tryig to avoid improper logging of unimplemented warnings in input mode
// if(value & 0x08)
// {
// TODO: simplify below; trying to avoid improper logging of unimplemented warnings in input mode
if(value & 0x08)
{
switch(value & 0x0e)
{
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 0x0e: static_cast<T *>(this)->set_control_line_output(Port::A, Line::Two, true); break;
}
// }
}
if(value & 0x80)
{
switch(value & 0xe0)

View File

@ -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)
{
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));
/* static bool log = false;

View File

@ -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) {
if(port)
{
if(value&4)
{
printf("Head step: %d\n", value&3);
printf("Motor: %s\n", value&4 ? "On" : "Off");
printf("LED: %s\n", value&8 ? "On" : "Off");
printf("Density: %d\n", (value >> 5)&3);
}
// if(value&4)
// {
// printf("Head step: %d\n", value&3);
// printf("Motor: %s\n", value&4 ? "On" : "Off");
// printf("LED: %s\n", value&8 ? "On" : "Off");
// printf("Density: %d\n", (value >> 5)&3);
// }
}
}
};

View File

@ -58,9 +58,9 @@ Machine::Machine() :
// TEMPORARY: attach a [diskless] 1540
set_disc();
_debugPort.reset(new ::Commodore::Serial::DebugPort);
_debugPort->set_serial_bus(_serialBus);
_serialBus->add_port(_debugPort);
// _debugPort.reset(new ::Commodore::Serial::DebugPort);
// _debugPort->set_serial_bus(_serialBus);
// _serialBus->add_port(_debugPort);
}
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)
{
static int logCount = 0;
if(operation == CPU6502::BusOperation::ReadOpcode && address == 0xee17) logCount = 500;
if(operation == CPU6502::BusOperation::ReadOpcode && logCount) {
logCount--;
printf("%04x\n", address);
}
// static int logCount = 0;
// if(operation == CPU6502::BusOperation::ReadOpcode && address == 0xee17) logCount = 500;
// if(operation == CPU6502::BusOperation::ReadOpcode && logCount) {
// logCount--;
// printf("%04x\n", address);
// }
// run the phase-1 part of this cycle, in which the VIC accesses memory
uint16_t video_address = _mos6560->get_address();

View File

@ -295,7 +295,7 @@ class Machine:
std::shared_ptr<KeyboardVIA> _keyboardVIA;
std::shared_ptr<SerialPort> _serialPort;
std::shared_ptr<::Commodore::Serial::Bus> _serialBus;
std::shared_ptr<::Commodore::Serial::DebugPort> _debugPort;
// std::shared_ptr<::Commodore::Serial::DebugPort> _debugPort;
// Tape
Tape _tape;