diff --git a/Machines/Utility/ROMCatalogue.cpp b/Machines/Utility/ROMCatalogue.cpp index 9720ffa75..0332dab33 100644 --- a/Machines/Utility/ROMCatalogue.cpp +++ b/Machines/Utility/ROMCatalogue.cpp @@ -512,7 +512,6 @@ Description::Description(Name name) { case Name::AtariSTTOS100: *this = Description(name, "AtariST", "the UK TOS 1.00 ROM", "tos100.img", 192*1024, 0x1a586c64u); break; case Name::AtariSTTOS104: *this = Description(name, "AtariST", "the UK TOS 1.04 ROM", "tos104.img", 192*1024, 0xa50d1d43u); break; - case Name::AtariSTEmuTOS192: *this = Description(name, "AtariST", "the UK EmuTOS 1.92 ROM", "etos192uk.img", 192*1024, 0xfc3b9e61u); break; case Name::ColecoVisionBIOS: *this = Description(name, "ColecoVision", "the ColecoVision BIOS", "coleco.rom", 8*1024, 0x3aa93ef3u); diff --git a/Machines/Utility/ROMCatalogue.hpp b/Machines/Utility/ROMCatalogue.hpp index 3a15692ee..8d223cae4 100644 --- a/Machines/Utility/ROMCatalogue.hpp +++ b/Machines/Utility/ROMCatalogue.hpp @@ -71,7 +71,6 @@ enum Name { // Atari ST. AtariSTTOS100, AtariSTTOS104, - AtariSTEmuTOS192, // ColecoVision. ColecoVisionBIOS, diff --git a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm index 2f0a13008..34ca473c4 100644 --- a/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm +++ b/OSBindings/Mac/Clock SignalTests/68000ComparativeTests.mm @@ -96,8 +96,8 @@ struct TestProcessor: public CPU::MC68000::BusHandler { if(!instructions_remaining_) comparitor(); } - HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) { - using Microcycle = CPU::MC68000::Microcycle; + using Microcycle = CPU::MC68000::Microcycle; + template HalfCycles perform_bus_operation(const Microcycle &cycle, int) { if(cycle.data_select_active()) { cycle.apply(&ram[cycle.host_endian_byte_address()]); } diff --git a/OSBindings/Mac/Clock SignalTests/EmuTOSTests.mm b/OSBindings/Mac/Clock SignalTests/EmuTOSTests.mm index ac0badb60..54cb01e27 100644 --- a/OSBindings/Mac/Clock SignalTests/EmuTOSTests.mm +++ b/OSBindings/Mac/Clock SignalTests/EmuTOSTests.mm @@ -36,7 +36,8 @@ class EmuTOS: public ComparativeBusHandler { return m68000_.get_state(); } - HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) { + using Microcycle = CPU::MC68000::Microcycle; + template HalfCycles perform_bus_operation(const Microcycle &cycle, int) { const uint32_t address = cycle.word_address(); uint32_t word_address = address; @@ -68,7 +69,8 @@ class EmuTOS: public ComparativeBusHandler { } } - switch(cycle.operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) { + const auto operation = (op != Microcycle::DecodeDynamically) ? op : cycle.operation; + switch(operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) { default: break; case Microcycle::SelectWord | Microcycle::Read: @@ -110,10 +112,10 @@ class EmuTOS: public ComparativeBusHandler { _machine->run_for(HalfCycles(length)); } -- (void)testEmuTOSStartup { - [self testImage:ROM::Name::AtariSTEmuTOS192 trace:@"etos192uk" length:313490]; - // TODO: assert that machine is now STOPped. -} +//- (void)testEmuTOSStartup { +// [self testImage:ROM::Name::AtariSTEmuTOS192 trace:@"etos192uk" length:313490]; +// // TODO: assert that machine is now STOPped. +//} - (void)testTOSStartup { [self testImage:ROM::Name::AtariSTTOS100 trace:@"tos100" length:54011091]; diff --git a/OSBindings/Mac/Clock SignalTests/QLTests.mm b/OSBindings/Mac/Clock SignalTests/QLTests.mm index 079d800ac..5ac39ff1d 100644 --- a/OSBindings/Mac/Clock SignalTests/QLTests.mm +++ b/OSBindings/Mac/Clock SignalTests/QLTests.mm @@ -39,7 +39,8 @@ class QL: public ComparativeBusHandler { return m68000_.get_state(); } - HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) { + using Microcycle = CPU::MC68000::Microcycle; + template HalfCycles perform_bus_operation(const Microcycle &cycle, int) { const uint32_t address = cycle.word_address(); uint32_t word_address = address; @@ -56,11 +57,11 @@ class QL: public ComparativeBusHandler { word_address %= ram_.size(); } - using Microcycle = CPU::MC68000::Microcycle; if(cycle.data_select_active()) { uint16_t peripheral_result = 0xffff; - switch(cycle.operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) { + const auto operation = (op != Microcycle::DecodeDynamically) ? op : cycle.operation; + switch(operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) { default: break; case Microcycle::SelectWord | Microcycle::Read: diff --git a/OSBindings/Mac/Clock SignalTests/TestRunner68000.hpp b/OSBindings/Mac/Clock SignalTests/TestRunner68000.hpp index 9f3158cb0..973251c49 100644 --- a/OSBindings/Mac/Clock SignalTests/TestRunner68000.hpp +++ b/OSBindings/Mac/Clock SignalTests/TestRunner68000.hpp @@ -78,16 +78,17 @@ class RAM68000: public CPU::MC68000::BusHandler { return &ram_[(address >> 1) % ram_.size()]; } - HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int) { + using Microcycle = CPU::MC68000::Microcycle; + template HalfCycles perform_bus_operation(const Microcycle &cycle, int) { const uint32_t word_address = cycle.word_address(); duration_ += cycle.length; - using Microcycle = CPU::MC68000::Microcycle; + const auto operation = (op != Microcycle::DecodeDynamically) ? op : cycle.operation; if(cycle.data_select_active()) { - if(cycle.operation & Microcycle::InterruptAcknowledge) { + if(operation & Microcycle::InterruptAcknowledge) { cycle.value->b = 10; } else { - switch(cycle.operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) { + switch(operation & (Microcycle::SelectWord | Microcycle::SelectByte | Microcycle::Read)) { default: break; case Microcycle::SelectWord | Microcycle::Read: diff --git a/Processors/68000/Implementation/68000Implementation.hpp b/Processors/68000/Implementation/68000Implementation.hpp index 9e2f6a0b1..6c217d533 100644 --- a/Processors/68000/Implementation/68000Implementation.hpp +++ b/Processors/68000/Implementation/68000Implementation.hpp @@ -3088,13 +3088,13 @@ void Processor(read_program_announce, is_supervisor_); - bus_handler_.perform_bus_operation(read_program, is_supervisor_); + bus_handler_.template perform_bus_operation(read_program_announce, is_supervisor_); + bus_handler_.template perform_bus_operation(read_program, is_supervisor_); program_counter_.l += 2; read_program.value = &prefetch_.low; - bus_handler_.perform_bus_operation(read_program_announce, is_supervisor_); - bus_handler_.perform_bus_operation(read_program, is_supervisor_); + bus_handler_.template perform_bus_operation(read_program_announce, is_supervisor_); + bus_handler_.template perform_bus_operation(read_program, is_supervisor_); program_counter_.l += 2; } diff --git a/ROMImages/AtariST/etos192uk.img b/ROMImages/AtariST/etos192uk.img deleted file mode 100644 index 4df163713..000000000 Binary files a/ROMImages/AtariST/etos192uk.img and /dev/null differ diff --git a/ROMImages/AtariST/readme.txt b/ROMImages/AtariST/readme.txt index fe85a762b..388e10280 100644 --- a/ROMImages/AtariST/readme.txt +++ b/ROMImages/AtariST/readme.txt @@ -5,12 +5,3 @@ ROM files would ordinarily go here; the copyright status of these is uncertain s Expected files: tos100.img; a 196kb image of the UK Atari ST TOS 1.00 ROM. - - -# Test Cases. - -Included here are Atari ST-targeted versions of EmuTOS, being a significant chunk of freely available and redistributable 68000 code that can be used to test the 68000-in-progress. - -EmuTOS is distributed under the GPL. See its licence and other information within the doc/ subdirectory. - -It was obtained via http://emutos.sourceforge.net/en/ \ No newline at end of file