From fc4bda00476e0a73fd5d5903c4f2d238a21c4c39 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 25 Jan 2021 22:02:39 -0500 Subject: [PATCH] Experimentally flipping interpretation of the output bit gives something closer to coherent. --- InstructionSets/M50740/Executor.cpp | 12 ++++++------ Machines/Apple/AppleIIgs/ADB.cpp | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/InstructionSets/M50740/Executor.cpp b/InstructionSets/M50740/Executor.cpp index f216f38f0..6c5e26783 100644 --- a/InstructionSets/M50740/Executor.cpp +++ b/InstructionSets/M50740/Executor.cpp @@ -68,7 +68,7 @@ uint8_t Executor::read(uint16_t address) { // "Port R"; sixteen four-bit ports case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: - printf("TODO: Port R [r %04x]\n", address); +// printf("TODO: Port R [r %04x]\n", address); return 0xff; // Ports P0–P3. @@ -78,12 +78,12 @@ uint8_t Executor::read(uint16_t address) { case 0xe1: case 0xe3: case 0xe5: case 0xe9: - printf("TODO: Ports P0–P3 direction [r %04x]\n", address); +// printf("TODO: Ports P0–P3 direction [r %04x]\n", address); return 0xff; // Timers. case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff: - printf("TODO: Timers [r %04x]\n", address); +// printf("TODO: Timers [r %04x]\n", address); return 0xff; } } @@ -104,7 +104,7 @@ void Executor::write(uint16_t address, uint8_t value) { // "Port R"; sixteen four-bit ports case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: - printf("TODO: Port R [w %04x %02x]\n", address, value); +// printf("TODO: Port R [w %04x %02x]\n", address, value); break; // Ports P0–P3. @@ -114,12 +114,12 @@ void Executor::write(uint16_t address, uint8_t value) { case 0xe1: case 0xe3: case 0xe5: case 0xe9: - printf("TODO: Ports P0–P3 direction [w %04x %02x]\n", address, value); +// printf("TODO: Ports P0–P3 direction [w %04x %02x]\n", address, value); break; // Timers. case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff: - printf("TODO: Timers [w %04x %02x]\n", address, value); +// printf("TODO: Timers [w %04x %02x]\n", address, value); break; } } diff --git a/Machines/Apple/AppleIIgs/ADB.cpp b/Machines/Apple/AppleIIgs/ADB.cpp index 619107b65..12463a173 100644 --- a/Machines/Apple/AppleIIgs/ADB.cpp +++ b/Machines/Apple/AppleIIgs/ADB.cpp @@ -229,7 +229,7 @@ void GLU::set_port_output(int port, uint8_t value) { ports_[port] = value; switch(port) { case 0: - printf("Set R%d: %02x\n", register_address_, value); +// printf("Set R%d: %02x\n", register_address_, value); registers_[register_address_] = value; break; case 1: @@ -247,7 +247,7 @@ void GLU::set_port_output(int port, uint8_t value) { // printf("IIe KWS: %d\n", (value >> 6)&3); // printf("ADB data line output: %d\n", (value >> 3)&1); - const bool new_adb_level = value & 0x08; + const bool new_adb_level = !(value & 0x08); if(new_adb_level != adb_level_) { if(!new_adb_level) { // Transition to low. @@ -278,7 +278,7 @@ void GLU::set_port_output(int port, uint8_t value) { uint8_t GLU::get_port_input(int port) { switch(port) { case 0: - printf("Get R%d\n", register_address_); +// printf("Get R%d\n", register_address_); return registers_[register_address_]; case 1: // printf("IIe keyboard read\n");