1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-29 12:50:28 +00:00

Withdraws the EPDOS option.

At least for now; it's something to worry about later.
This commit is contained in:
Thomas Harte 2021-06-23 19:32:34 -04:00
parent 0d165740ea
commit 2c2bb3765f
6 changed files with 25 additions and 29 deletions

View File

@ -21,7 +21,7 @@ struct Target: public Analyser::Static::Target, public Reflection::StructImpl<Ta
ReflectableEnum(Model, Enterprise64, Enterprise128, Enterprise256);
ReflectableEnum(EXOSVersion, v10, v20, v21, v23, Any);
ReflectableEnum(BASICVersion, v10, v11, v21, Any, None);
ReflectableEnum(DOS, EPDOS, EXDOS, None);
ReflectableEnum(DOS, EXDOS, None);
Model model = Model::Enterprise128;
EXOSVersion exos_version = EXOSVersion::Any;

View File

@ -140,8 +140,7 @@ template <bool has_disk_controller> class ConcreteMachine:
// Possibly add in a DOS.
switch(target.dos) {
case Target::DOS::EPDOS: request = request && ROM::Request(ROM::Name::EnterpriseEPDOS); break;
case Target::DOS::EXDOS: request = request && ROM::Request(ROM::Name::EnterpriseEXDOS); break;
case Target::DOS::EXDOS: request = request && ROM::Request(ROM::Name::EnterpriseEXDOS); break;
default: break;
}
@ -181,14 +180,16 @@ template <bool has_disk_controller> class ConcreteMachine:
}
}
// Extract the appropriate DOS ROM.
dos_.fill(0xff);
for(const auto rom_name: { ROM::Name::EnterpriseEPDOS, ROM::Name::EnterpriseEXDOS }) {
const auto dos = roms.find(rom_name);
if(dos != roms.end()) {
memcpy(dos_.data(), dos->second.data(), std::min(dos_.size(), dos->second.size()));
break;
}
// Extract the appropriate DOS ROMs.
epdos_rom_.fill(0xff);
const auto epdos = roms.find(ROM::Name::EnterpriseEPDOS);
if(epdos != roms.end()) {
memcpy(epdos_rom_.data(), epdos->second.data(), std::min(epdos_rom_.size(), epdos->second.size()));
}
exdos_rom_.fill(0xff);
const auto exdos = roms.find(ROM::Name::EnterpriseEXDOS);
if(exdos != roms.end()) {
memcpy(exdos_rom_.data(), exdos->second.data(), std::min(exdos_rom_.size(), exdos->second.size()));
}
// Seed key state.
@ -355,7 +356,8 @@ template <bool has_disk_controller> class ConcreteMachine:
std::array<uint8_t, 256 * 1024> ram_;
std::array<uint8_t, 64 * 1024> exos_;
std::array<uint8_t, 16 * 1024> basic_;
std::array<uint8_t, 32 * 1024> dos_;
std::array<uint8_t, 16 * 1024> exdos_rom_;
std::array<uint8_t, 32 * 1024> epdos_rom_;
const uint8_t min_ram_slot_;
const uint8_t *read_pointers_[4] = {nullptr, nullptr, nullptr, nullptr};
@ -365,20 +367,18 @@ template <bool has_disk_controller> class ConcreteMachine:
template <size_t slot> void page(uint8_t offset) {
pages_[slot] = offset;
if(offset < exos_.size() / 0x4000) {
page<slot>(&exos_[offset * 0x4000], nullptr);
return;
}
#define Map(location, source) \
if(offset >= location && offset < location + source.size() / 0x4000) { \
page<slot>(&source[(offset - location) * 0x4000], nullptr); \
return; \
}
if(offset >= 16 && offset < 16 + basic_.size() / 0x4000) {
page<slot>(&basic_[(offset - 16) * 0x4000], nullptr);
return;
}
Map(0, exos_);
Map(16, basic_);
Map(32, exdos_rom_);
Map(48, epdos_rom_);
if(offset >= 32 && offset < 32 + dos_.size() / 0x4000) {
page<slot>(&dos_[(offset - 32) * 0x4000], nullptr);
return;
}
#undef Map
// Of whatever size of RAM I've declared above, use only the final portion.
// This correlated with Nick always having been handed the final 64kb and,

View File

@ -62,7 +62,6 @@ typedef NS_ENUM(NSInteger, CSMachineEnterpriseBASIC) {
typedef NS_ENUM(NSInteger, CSMachineEnterpriseDOS) {
CSMachineEnterpriseDOSEXDOS,
CSMachineEnterpriseDOSEPDOS,
CSMachineEnterpriseDOSNone,
};

View File

@ -161,7 +161,6 @@
switch(dos) {
case CSMachineEnterpriseDOSEXDOS: target->dos = Target::DOS::EXDOS; break;
case CSMachineEnterpriseDOSEPDOS: target->dos = Target::DOS::EPDOS; break;
default:
case CSMachineEnterpriseDOSNone: target->dos = Target::DOS::None; break;
}

View File

@ -353,13 +353,12 @@ Gw
</popUpButton>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="syE-e7-TjU">
<rect key="frame" x="57" y="89" width="83" height="25"/>
<popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="axesIndependently" inset="2" selectedItem="qoS-KO-iEZ" id="NvO-Zm-2Rq">
<popUpButtonCell key="cell" type="push" title="EXDOS" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" tag="1" imageScaling="axesIndependently" inset="2" selectedItem="8rP-2w-PdU" id="NvO-Zm-2Rq">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" title="DOS" id="sdr-al-7mi">
<items>
<menuItem title="EXDOS" tag="1" id="8rP-2w-PdU"/>
<menuItem title="EPDOS" tag="2" id="Ke7-AJ-8Rx"/>
<menuItem title="None" state="on" id="qoS-KO-iEZ"/>
</items>
</menu>

View File

@ -303,7 +303,6 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
var dos: CSMachineEnterpriseDOS = .dosNone
switch enterpriseDOSButton.selectedTag() {
case 1: dos = .DOSEXDOS
case 2: dos = .DOSEPDOS
case 0: fallthrough
default: dos = .dosNone
}