From f64cd8cfcb911b6c42cb7e10c42d71f3ef12b619 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 6 Jul 2016 20:22:46 -0400 Subject: [PATCH] Quick fixes properly to declare the DriveVIA, to ensure its interrupts take effect, and to wire ATN IN to CA1 rather than CB2. --- Machines/Commodore/1540/Commodore1540.cpp | 2 +- Machines/Commodore/1540/Commodore1540.hpp | 4 ++-- Machines/Commodore/Vic-20/Vic20.cpp | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Machines/Commodore/1540/Commodore1540.cpp b/Machines/Commodore/1540/Commodore1540.cpp index 9ad308ff6..eaaadf37b 100644 --- a/Machines/Commodore/1540/Commodore1540.cpp +++ b/Machines/Commodore/1540/Commodore1540.cpp @@ -72,5 +72,5 @@ void Machine::set_rom(const uint8_t *rom) void Machine::mos6522_did_change_interrupt_status(void *mos6522) { - set_irq_line(_serialPortVIA->get_interrupt_line()); + set_irq_line(_serialPortVIA->get_interrupt_line() || _driveVIA.get_interrupt_line()); } diff --git a/Machines/Commodore/1540/Commodore1540.hpp b/Machines/Commodore/1540/Commodore1540.hpp index 2eae8b37d..dae51c38f 100644 --- a/Machines/Commodore/1540/Commodore1540.hpp +++ b/Machines/Commodore/1540/Commodore1540.hpp @@ -52,7 +52,7 @@ class SerialPortVIA: public MOS::MOS6522, public MOS::MOS6522IRQD case ::Commodore::Serial::Line::Clock: _portB = (_portB & ~0x04) | (value ? 0 : 0x04); break; case ::Commodore::Serial::Line::Attention: _portB = (_portB & ~0x80) | (value ? 0 : 0x80); - set_control_line_input(Port::B, Line::Two, !value); // truth here is active low; the 6522 takes true to be high + set_control_line_input(Port::A, Line::One, !value); // truth here is active low; the 6522 takes true to be high break; } } @@ -66,7 +66,7 @@ class SerialPortVIA: public MOS::MOS6522, public MOS::MOS6522IRQD std::weak_ptr<::Commodore::Serial::Port> _serialPort; }; -class DriveVIA: public MOS::MOS6522, public MOS::MOS6522IRQDelegate { +class DriveVIA: public MOS::MOS6522, public MOS::MOS6522IRQDelegate { public: using MOS6522IRQDelegate::set_interrupt_status; }; diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index fb616ec80..60b8838ca 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -71,7 +71,6 @@ void Machine::write_to_map(uint8_t **map, uint8_t *area, uint16_t address, uint1 } } - Machine::~Machine() { delete[] _rom;