From 857f74b3204f06a5edd4e617c7ce72435abd146f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 2 May 2019 15:47:12 -0400 Subject: [PATCH] Fixed: the accepted interrupt level now appears on the bus. --- Processors/68000/Implementation/68000Implementation.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index a6173a637..24e259064 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -1803,8 +1803,16 @@ template void Proces break; case int(MicroOp::Action::PrepareINT): + // The INT sequence uses the same storage as the TRAP steps, so this'll get + // the necessary stack work set up. populate_trap_steps(0, get_status()); + + // Mutate neessary internal state — effective_address_[0] is exposed + // on the data bus as the accepted interrupt number during the interrupt + // acknowledge cycle, with the low bit set since a real 68000 uses the lower + // data strobe to collect the corresponding vector byte. accepted_interrupt_level_ = interrupt_level_ = bus_interrupt_level_; + effective_address_[0].full = 1 | (accepted_interrupt_level_ << 1); break; case int(MicroOp::Action::PrepareINTVector):