diff --git a/Machines/Amiga/Blitter.cpp b/Machines/Amiga/Blitter.cpp index 2381a5192..e384fe20a 100644 --- a/Machines/Amiga/Blitter.cpp +++ b/Machines/Amiga/Blitter.cpp @@ -163,13 +163,13 @@ void Blitter::set_minterms(uint16_t value) { //template //void Blitter::set_vertical_size([[maybe_unused]] uint16_t value) { -// LOG("Set vertical size " << PADHEX(4) << value); +// logger.info().append("Set vertical size %04x", value); // // TODO. This is ECS only, I think. Ditto set_horizontal_size. //} // //template //void Blitter::set_horizontal_size([[maybe_unused]] uint16_t value) { -// LOG("Set horizontal size " << PADHEX(4) << value); +// logger.info().append("Set horizontal size %04x", value); //} template diff --git a/Machines/Amiga/Chipset.cpp b/Machines/Amiga/Chipset.cpp index b8147fbee..3a7b0ccc3 100644 --- a/Machines/Amiga/Chipset.cpp +++ b/Machines/Amiga/Chipset.cpp @@ -877,7 +877,7 @@ void Chipset::write(uint32_t address, uint16_t value, bool allow_conversion) { // Joystick/mouse input. case 0x034: // POTGO -// LOG("TODO: pot port start"); +// logger.error().append("TODO: pot port start"); break; // Disk DMA and control. @@ -1143,7 +1143,7 @@ uint16_t Chipset::read(uint32_t address, bool allow_conversion) { case 0x00c: return joystick(0).get_position(); // JOY1DAT case 0x016: // POTGOR / POTINP -// LOG("TODO: pot port read"); +// logger.error().append("TODO: pot port read"); return 0xff00; // Disk DMA and control. diff --git a/Machines/Atari/ST/AtariST.cpp b/Machines/Atari/ST/AtariST.cpp index 794338acf..bab80e959 100644 --- a/Machines/Atari/ST/AtariST.cpp +++ b/Machines/Atari/ST/AtariST.cpp @@ -37,7 +37,7 @@ #include "../../../Analyser/Static/AtariST/Target.hpp" namespace { -Log::Logger logger; +Log::Logger logger; } namespace Atari { diff --git a/Machines/Atari/ST/DMAController.cpp b/Machines/Atari/ST/DMAController.cpp index e17618746..c2084fb9f 100644 --- a/Machines/Atari/ST/DMAController.cpp +++ b/Machines/Atari/ST/DMAController.cpp @@ -17,6 +17,8 @@ using namespace Atari::ST; namespace { +Log::Logger logger; + enum Control: uint16_t { Direction = 0x100, DRQSource = 0x80, @@ -121,7 +123,7 @@ void DMAController::write(int address, uint16_t value) { } void DMAController::set_floppy_drive_selection(bool drive1, bool drive2, bool side2) { -// LOG("Selected: " << (drive1 ? "1" : "-") << (drive2 ? "2" : "-") << (side2 ? "s" : "-")); +// logger.info().append("Selected: %s%s%s", drive1 ? "1" : "-", drive2 ? "2" : "-", side2 ? "s" : "-"); fdc_.set_floppy_drive_selection(drive1, drive2, side2); } @@ -191,12 +193,6 @@ int DMAController::bus_grant(uint16_t *ram, size_t size) { // Check that the older buffer is full; stop if not. if(!buffer_[active_buffer_ ^ 1].is_full) return 0; -//#define b(i, n) " " << PADHEX(2) << int(buffer_[i].contents[n]) -//#define b2(i, n) b(i, n) << b(i, n+1) -//#define b4(i, n) b2(i, n) << b2(i, n+2) -//#define b16(i) b4(i, 0) << b4(i, 4) << b4(i, 8) << b4(i, 12) -// LOG("[1] to " << PADHEX(6) << address_ << b16(active_buffer_ ^ 1)); - for(int c = 0; c < 8; ++c) { if(size_t(address_) < size) { ram[address_ >> 1] = uint16_t( @@ -211,12 +207,6 @@ int DMAController::bus_grant(uint16_t *ram, size_t size) { // Check that the newer buffer is full; stop if not. if(!buffer_[active_buffer_ ].is_full) return 8; -// LOG("[2] to " << PADHEX(6) << address_ << b16(active_buffer_)); -//#undef b16 -//#undef b4 -//#undef b2 -//#undef b - for(int c = 0; c < 8; ++c) { if(size_t(address_) < size) { ram[address_ >> 1] = uint16_t( diff --git a/Outputs/Log.hpp b/Outputs/Log.hpp index 6656724f5..c5652226b 100644 --- a/Outputs/Log.hpp +++ b/Outputs/Log.hpp @@ -24,6 +24,7 @@ enum class Source { AmigaChipset, AmigaBlitter, AtariST, + AtariSTDMAController, CommodoreStaticAnalyser, DirectAccessDevice, Enterprise, @@ -81,6 +82,7 @@ constexpr const char *prefix(Source source) { case Source::AmigaCopper: return "Copper"; case Source::AmigaDisk: return "Disk"; case Source::AtariST: return "AtariST"; + case Source::AtariSTDMAController: return "DMA"; case Source::CommodoreStaticAnalyser: return "Commodore Static Analyser"; case Source::Enterprise: return "Enterprise"; case Source::i8272: return "i8272";