1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-11 08:30:55 +00:00

Any Oric-format disks that are inserted now make it all the way to the Oric, along with a request to emulate the Microdisc. It has received a copy of the ROM. The ball is entirely in its court now.

This commit is contained in:
Thomas Harte 2016-11-21 20:59:25 +08:00
parent fc1afe9351
commit ea33a28695
5 changed files with 21 additions and 6 deletions

View File

@ -60,7 +60,12 @@ void Machine::configure_as_target(const StaticAnalyser::Target &target)
void Machine::set_rom(ROM rom, const std::vector<uint8_t> &data) void Machine::set_rom(ROM rom, const std::vector<uint8_t> &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) unsigned int Machine::perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value)

View File

@ -52,7 +52,7 @@ enum Key: uint16_t {
}; };
enum ROM { enum ROM {
BASIC10, BASIC11 BASIC10, BASIC11, Microdisc
}; };
class Machine: class Machine:
@ -97,7 +97,7 @@ class Machine:
private: private:
// RAM and ROM // RAM and ROM
std::vector<uint8_t> _basic11, _basic10; std::vector<uint8_t> _basic11, _basic10, _microdisc;
uint8_t _ram[65536], _rom[16384]; uint8_t _ram[65536], _rom[16384];
int _cycles_since_video_update; int _cycles_since_video_update;
inline void update_video(); inline void update_video();

View File

@ -26,10 +26,12 @@
if(self) if(self)
{ {
NSData *basic10 = [self rom:@"basic10"]; 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(basic10) _oric.set_rom(Oric::BASIC10, basic10.stdVector8);
if(basic11) _oric.set_rom(Oric::BASIC11, basic11.stdVector8); if(basic11) _oric.set_rom(Oric::BASIC11, basic11.stdVector8);
if(microdisc) _oric.set_rom(Oric::Microdisc, microdisc.stdVector8);
} }
return self; return self;
} }

View File

@ -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 // TODO: really this should add two targets if not all votes agree
target.oric.use_atmos_rom = basic11_votes >= basic10_votes; target.oric.use_atmos_rom = basic11_votes >= basic10_votes;

View File

@ -52,6 +52,7 @@ struct Target {
struct { struct {
bool use_atmos_rom; bool use_atmos_rom;
bool has_microdisc;
} oric; } oric;
}; };