diff --git a/Machines/Oric/Oric.cpp b/Machines/Oric/Oric.cpp index ee93adf30..68c0da7bd 100644 --- a/Machines/Oric/Oric.cpp +++ b/Machines/Oric/Oric.cpp @@ -60,7 +60,12 @@ void Machine::configure_as_target(const StaticAnalyser::Target &target) void Machine::set_rom(ROM rom, const std::vector &data) { - if(rom == BASIC11) _basic11 = std::move(data); else _basic10 = std::move(data); + switch(rom) + { + case BASIC11: _basic11 = std::move(data); break; + case BASIC10: _basic10 = std::move(data); break; + case Microdisc: _microdisc = std::move(data); break; + } } unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value) diff --git a/Machines/Oric/Oric.hpp b/Machines/Oric/Oric.hpp index f469d7fba..559e4914b 100644 --- a/Machines/Oric/Oric.hpp +++ b/Machines/Oric/Oric.hpp @@ -52,7 +52,7 @@ enum Key: uint16_t { }; enum ROM { - BASIC10, BASIC11 + BASIC10, BASIC11, Microdisc }; class Machine: @@ -97,7 +97,7 @@ class Machine: private: // RAM and ROM - std::vector _basic11, _basic10; + std::vector _basic11, _basic10, _microdisc; uint8_t _ram[65536], _rom[16384]; int _cycles_since_video_update; inline void update_video(); diff --git a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm index 5fb0d188a..6a565abb4 100644 --- a/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm +++ b/OSBindings/Mac/Clock Signal/Machine/Wrappers/CSOric.mm @@ -26,10 +26,12 @@ if(self) { NSData *basic10 = [self rom:@"basic10"]; - NSData *basic11 = [self rom:@"basic11"]; // test108j + NSData *basic11 = [self rom:@"basic11"]; + NSData *microdisc = [self rom:@"microdisc"]; - if(basic10) _oric.set_rom(Oric::BASIC10, basic10.stdVector8); - if(basic11) _oric.set_rom(Oric::BASIC11, basic11.stdVector8); + if(basic10) _oric.set_rom(Oric::BASIC10, basic10.stdVector8); + if(basic11) _oric.set_rom(Oric::BASIC11, basic11.stdVector8); + if(microdisc) _oric.set_rom(Oric::Microdisc, microdisc.stdVector8); } return self; } diff --git a/StaticAnalyser/Oric/StaticAnalyser.cpp b/StaticAnalyser/Oric/StaticAnalyser.cpp index e21b16052..c26de6550 100644 --- a/StaticAnalyser/Oric/StaticAnalyser.cpp +++ b/StaticAnalyser/Oric/StaticAnalyser.cpp @@ -112,6 +112,13 @@ void StaticAnalyser::Oric::AddTargets( } } + // trust that any disk supplied can be handled by the Microdisc. TODO: check. + if(!disks.empty()) + { + target.oric.has_microdisc = true; + target.disks = disks; + } + // TODO: really this should add two targets if not all votes agree target.oric.use_atmos_rom = basic11_votes >= basic10_votes; diff --git a/StaticAnalyser/StaticAnalyser.hpp b/StaticAnalyser/StaticAnalyser.hpp index 59e4bd550..6a2d2e0e3 100644 --- a/StaticAnalyser/StaticAnalyser.hpp +++ b/StaticAnalyser/StaticAnalyser.hpp @@ -52,6 +52,7 @@ struct Target { struct { bool use_atmos_rom; + bool has_microdisc; } oric; };