From c3b7d24293b12b4b7e61173567016099233a4b8d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 5 Jul 2016 19:19:46 -0400 Subject: [PATCH] It appears that the attention line is also wired to CB2. So the ball is back in the 6522's court. --- Components/6522/6522.hpp | 2 +- Machines/Commodore/1540/Commodore1540.hpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Components/6522/6522.hpp b/Components/6522/6522.hpp index 34bb53f74..a71b16255 100644 --- a/Components/6522/6522.hpp +++ b/Components/6522/6522.hpp @@ -112,7 +112,7 @@ template class MOS6522 { _registers.auxiliary_control = value; break; case 0xc: -// printf("Peripheral control %02x\n", value); + printf("Peripheral control %02x\n", value); _registers.peripheral_control = value; switch(value & 0x0e) { diff --git a/Machines/Commodore/1540/Commodore1540.hpp b/Machines/Commodore/1540/Commodore1540.hpp index f47cb3120..0d1e7d52a 100644 --- a/Machines/Commodore/1540/Commodore1540.hpp +++ b/Machines/Commodore/1540/Commodore1540.hpp @@ -50,7 +50,10 @@ class SerialPortVIA: public MOS::MOS6522, public MOS::MOS6522IRQD default: break; case ::Commodore::Serial::Line::Data: _portB = (_portB & ~0x01) | (value ? 0 : 0x01); break; case ::Commodore::Serial::Line::Clock: _portB = (_portB & ~0x04) | (value ? 0 : 0x04); break; - case ::Commodore::Serial::Line::Attention: _portB = (_portB & ~0x80) | (value ? 0 : 0x80); break; + case ::Commodore::Serial::Line::Attention: + _portB = (_portB & ~0x80) | (value ? 0 : 0x80); + set_control_line_input(Port::B, Line::Two, !!(value&0x80)); + break; } }