diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index 711388af2..5e9773ab7 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -247,6 +247,7 @@ 4B83348C1F5DB99C0097E338 /* 6522Base.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B83348B1F5DB99C0097E338 /* 6522Base.cpp */; }; 4B8334951F5E25B60097E338 /* C1540.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8334941F5E25B60097E338 /* C1540.cpp */; }; 4B85322D227793CB00F26553 /* etos192uk.trace.txt.gz in Resources */ = {isa = PBXBuildFile; fileRef = 4B85322C227793CA00F26553 /* etos192uk.trace.txt.gz */; }; + 4B85322F2277ABDE00F26553 /* tos100.trace.txt.gz in Resources */ = {isa = PBXBuildFile; fileRef = 4B85322E2277ABDD00F26553 /* tos100.trace.txt.gz */; }; 4B86E25B1F8C628F006FAA45 /* Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B86E2591F8C628F006FAA45 /* Keyboard.cpp */; }; 4B8805F01DCFC99C003085B1 /* Acorn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8805EE1DCFC99C003085B1 /* Acorn.cpp */; }; 4B8805F41DCFD22A003085B1 /* Commodore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8805F21DCFD22A003085B1 /* Commodore.cpp */; }; @@ -966,6 +967,7 @@ 4B8334941F5E25B60097E338 /* C1540.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = C1540.cpp; path = Implementation/C1540.cpp; sourceTree = ""; }; 4B85322922778E4200F26553 /* Comparative68000.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Comparative68000.hpp; sourceTree = ""; }; 4B85322C227793CA00F26553 /* etos192uk.trace.txt.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = etos192uk.trace.txt.gz; sourceTree = ""; }; + 4B85322E2277ABDD00F26553 /* tos100.trace.txt.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = tos100.trace.txt.gz; sourceTree = ""; }; 4B86E2591F8C628F006FAA45 /* Keyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Keyboard.cpp; sourceTree = ""; }; 4B86E25A1F8C628F006FAA45 /* Keyboard.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Keyboard.hpp; sourceTree = ""; }; 4B8805EE1DCFC99C003085B1 /* Acorn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Acorn.cpp; path = Parsers/Acorn.cpp; sourceTree = ""; }; @@ -2262,6 +2264,7 @@ 4B85322B227793CA00F26553 /* TOS Startup */ = { isa = PBXGroup; children = ( + 4B85322E2277ABDD00F26553 /* tos100.trace.txt.gz */, 4B85322C227793CA00F26553 /* etos192uk.trace.txt.gz */, ); path = "TOS Startup"; @@ -3563,6 +3566,7 @@ 4BB299C41B587D8400A49093 /* sbca in Resources */, 4BB298F41B587D8400A49093 /* adcay in Resources */, 4B44EBF51DC987AF00A7820C /* AllSuiteA.bin in Resources */, + 4B85322F2277ABDE00F26553 /* tos100.trace.txt.gz in Resources */, 4BB299C61B587D8400A49093 /* sbcay in Resources */, 4BB299601B587D8400A49093 /* insa in Resources */, 4BB299951B587D8400A49093 /* mmufetch in Resources */, diff --git a/OSBindings/Mac/Clock SignalTests/EmuTOSTests.mm b/OSBindings/Mac/Clock SignalTests/EmuTOSTests.mm index ea52fda2b..9bf01b93b 100644 --- a/OSBindings/Mac/Clock SignalTests/EmuTOSTests.mm +++ b/OSBindings/Mac/Clock SignalTests/EmuTOSTests.mm @@ -101,13 +101,20 @@ class EmuTOS: public ComparativeBusHandler { std::unique_ptr _machine; } -- (void)testEmuTOSStartup { - const auto roms = CSROMFetcher()("AtariST", {"etos192uk.img"}); - NSString *const traceLocation = [[NSBundle bundleForClass:[self class]] pathForResource:@"etos192uk" ofType:@"trace.txt.gz"]; +- (void)testImage:(NSString *)image trace:(NSString *)trace length:(int)length { + const auto roms = CSROMFetcher()("AtariST", { image.UTF8String }); + NSString *const traceLocation = [[NSBundle bundleForClass:[self class]] pathForResource:trace ofType:@"trace.txt.gz"]; _machine.reset(new EmuTOS(*roms[0], traceLocation.UTF8String)); - _machine->run_for(HalfCycles(313515)); + _machine->run_for(HalfCycles(length)); +} +- (void)testEmuTOSStartup { + [self testImage:@"etos192uk.img" trace:@"etos192uk" length:313515]; // TODO: assert that machine is now STOPped. } +- (void)testTOSStartup { + [self testImage:@"tos100.img" trace:@"tos100" length:54011091]; +} + @end diff --git a/OSBindings/Mac/Clock SignalTests/TOS Startup/etos192uk.trace.txt.gz b/OSBindings/Mac/Clock SignalTests/TOS Startup/etos192uk.trace.txt.gz new file mode 100644 index 000000000..386be16ff Binary files /dev/null and b/OSBindings/Mac/Clock SignalTests/TOS Startup/etos192uk.trace.txt.gz differ diff --git a/OSBindings/Mac/Clock SignalTests/TOS Startup/tos100.trace.txt.gz b/OSBindings/Mac/Clock SignalTests/TOS Startup/tos100.trace.txt.gz new file mode 100644 index 000000000..e069b5f48 Binary files /dev/null and b/OSBindings/Mac/Clock SignalTests/TOS Startup/tos100.trace.txt.gz differ