From 25e2bd307a79251d495fb1100472418b24831368 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 5 Aug 2021 20:06:48 -0400 Subject: [PATCH] Sets VPA for CIA accesses; logs a little more. --- Machines/Amiga/Amiga.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Machines/Amiga/Amiga.cpp b/Machines/Amiga/Amiga.cpp index edbbdd0d4..bdc3f6527 100644 --- a/Machines/Amiga/Amiga.cpp +++ b/Machines/Amiga/Amiga.cpp @@ -95,8 +95,7 @@ class ConcreteMachine: // Autovector interrupts. if(cycle.operation & Microcycle::InterruptAcknowledge) { mc68000_.set_is_peripheral_address(true); - } else { - mc68000_.set_is_peripheral_address(false); + return HalfCycles(0); } // Do nothing if no address is exposed. @@ -106,9 +105,9 @@ class ConcreteMachine: // Grab the target address to pick a memory source. const uint32_t address = cycle.host_endian_byte_address(); -// if((cycle.operation & (Microcycle::SelectByte | Microcycle::SelectWord)) && !(cycle.operation & Microcycle::IsProgram)) { -// printf("%06x\n", *cycle.address); -// } + + // Set VPA if this is [going to be] a CIA access. + mc68000_.set_is_peripheral_address((address & 0xe0'0000) == 0xa0'0000); if(!memory_.regions[address >> 18].read_write_mask) { if((cycle.operation & (Microcycle::SelectByte | Microcycle::SelectWord))) { @@ -345,6 +344,11 @@ class ConcreteMachine: LOG("TODO: Stepping, etc; " << PADHEX(2) << +value); } } + + uint8_t get_port_input(MOS::MOS6526::Port) { + LOG("Unexpected input for CIA B "); + return 0xff; + } } cia_b_handler_; HalfCycles cia_divider_;