From c0ab45a73d632f8fc2a740afc18df537c315f9c1 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 9 Jul 2016 22:29:11 -0400 Subject: [PATCH] Disabled a bunch of the caveman debug logging. --- Components/6522/6522.hpp | 8 ++++---- Machines/Commodore/1540/Commodore1540.cpp | 2 +- Machines/Commodore/1540/Commodore1540.hpp | 14 +++++++------- Machines/Commodore/Vic-20/Vic20.cpp | 18 +++++++++--------- Machines/Commodore/Vic-20/Vic20.hpp | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Components/6522/6522.hpp b/Components/6522/6522.hpp index e7524f7e3..19f8ccb66 100644 --- a/Components/6522/6522.hpp +++ b/Components/6522/6522.hpp @@ -116,16 +116,16 @@ template 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(this)->set_control_line_output(Port::A, Line::Two, false); break; case 0x0e: static_cast(this)->set_control_line_output(Port::A, Line::Two, true); break; } -// } + } if(value & 0x80) { switch(value & 0xe0) diff --git a/Machines/Commodore/1540/Commodore1540.cpp b/Machines/Commodore/1540/Commodore1540.cpp index 3b4e3db67..fa7bb49e9 100644 --- a/Machines/Commodore/1540/Commodore1540.cpp +++ b/Machines/Commodore/1540/Commodore1540.cpp @@ -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; diff --git a/Machines/Commodore/1540/Commodore1540.hpp b/Machines/Commodore/1540/Commodore1540.hpp index 40af76f4e..2d0fffec3 100644 --- a/Machines/Commodore/1540/Commodore1540.hpp +++ b/Machines/Commodore/1540/Commodore1540.hpp @@ -99,13 +99,13 @@ class DriveVIA: public MOS::MOS6522, 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); +// } } } }; diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 5560a3a06..454b061ee 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -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(); diff --git a/Machines/Commodore/Vic-20/Vic20.hpp b/Machines/Commodore/Vic-20/Vic20.hpp index 49f11d6b4..a6ad74501 100644 --- a/Machines/Commodore/Vic-20/Vic20.hpp +++ b/Machines/Commodore/Vic-20/Vic20.hpp @@ -295,7 +295,7 @@ class Machine: std::shared_ptr _keyboardVIA; std::shared_ptr _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;