From 334e3ec529489e55e900eff1172dcd715338172d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 19 May 2022 16:55:16 -0400 Subject: [PATCH] Add privilege and instruction error exceptions; permit two operands to be stored. --- .../68000ComparativeTests.mm | 17 ++--- .../Implementation/68000Mk2Implementation.hpp | 75 ++++++++++++++++--- 2 files changed, 70 insertions(+), 22 deletions(-) diff --git a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm index a91435ce3..4f5538c7d 100644 --- a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm +++ b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm @@ -155,19 +155,16 @@ struct TestProcessor: public CPU::MC68000Mk2::BusHandler { #endif // To limit tests run to a subset of files and/or of tests, uncomment and fill in below. - _fileSet = [NSSet setWithArray:@[@"eor_and_or.json"]]; + _fileSet = [NSSet setWithArray:@[ + @"eor_and_or.json", + + // Below this line are passing tests. + @"abcd_sbcd.json", + @"nbcd.json", + @"ext.json"]]; // _testSet = [NSSet setWithArray:@[@"CHK 41a8"]]; } -// -// Temporary notes on 68000 mk2: -// -// Passing so far: -// -// abcd_sbcd -// nbcd -// ext - - (void)testAll { // Get the full list of available test files. NSBundle *const bundle = [NSBundle bundleForClass:[self class]]; diff --git a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp index 5662a028a..344214215 100644 --- a/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp +++ b/Processors/68000Mk2/Implementation/68000Mk2Implementation.hpp @@ -31,6 +31,7 @@ enum ExecutionState: int { FetchOperand_l, StoreOperand, + StoreOperand_bw, StoreOperand_l, StandardException, @@ -300,7 +301,27 @@ void Processor> 3; \ + next_operand_ = 0; \ if(operand_flags_ & 0x0c) MoveToState(StoreOperand) else MoveToState(Decode) BeginState(Perform_np):