diff --git a/Machines/AppleII/AppleII.cpp b/Machines/AppleII/AppleII.cpp index b87655287..1a08b42d8 100644 --- a/Machines/AppleII/AppleII.cpp +++ b/Machines/AppleII/AppleII.cpp @@ -259,6 +259,7 @@ template class ConcreteMachine: // Pick the required ROMs. using Target = Analyser::Static::AppleII::Target; std::vector rom_names = {"apple2-character.rom"}; + size_t rom_size = 12*1024; switch(target.model) { default: rom_names.push_back("apple2o.rom"); @@ -266,6 +267,10 @@ template class ConcreteMachine: case Target::Model::IIplus: rom_names.push_back("apple2.rom"); break; + case Target::Model::IIe: + rom_size = 15*1024; + rom_names.push_back("apple2e.rom"); + break; } const auto roms = rom_fetcher("AppleII", rom_names); @@ -273,12 +278,13 @@ template class ConcreteMachine: throw ROMMachine::Error::MissingROMs; } - character_rom_ = std::move(*roms[0]); rom_ = std::move(*roms[1]); - if(rom_.size() > 12*1024) { - rom_.erase(rom_.begin(), rom_.begin() + static_cast(rom_.size()) - 12*1024); + if(rom_.size() > rom_size) { + rom_.erase(rom_.begin(), rom_.end() - static_cast(rom_size)); } + character_rom_ = std::move(*roms[0]); + if(target.disk_controller != Target::DiskController::None) { // Apple recommended slot 6 for the (first) Disk II. install_card(6, new AppleII::DiskIICard(rom_fetcher, target.disk_controller == Target::DiskController::SixteenSector)); diff --git a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.h b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.h index e183d7217..943656c6c 100644 --- a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.h +++ b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.h @@ -12,7 +12,8 @@ typedef NS_ENUM(NSInteger, CSMachineAppleIIModel) { CSMachineAppleIIModelAppleII, - CSMachineAppleIIModelAppleIIPlus + CSMachineAppleIIModelAppleIIPlus, + CSMachineAppleIIModelAppleIIe }; typedef NS_ENUM(NSInteger, CSMachineAppleIIDiskController) { diff --git a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm index fee228e7e..29f15a930 100644 --- a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm +++ b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm @@ -168,7 +168,11 @@ static Analyser::Static::ZX8081::Target::MemoryModel ZX8081MemoryModelFromSize(K using Target = Analyser::Static::AppleII::Target; std::unique_ptr target(new Target); target->machine = Analyser::Machine::AppleII; - target->model = (model == CSMachineAppleIIModelAppleII) ? Target::Model::II : Target::Model::IIplus; + switch(model) { + default: target->model = Target::Model::II; break; + case CSMachineAppleIIModelAppleIIPlus: target->model = Target::Model::IIplus; break; + case CSMachineAppleIIModelAppleIIe: target->model = Target::Model::IIe; break; + } switch(diskController) { default: case CSMachineAppleIIDiskControllerNone: target->disk_controller = Target::DiskController::None; break; diff --git a/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib b/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib index 40721d21a..52727ce02 100644 --- a/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib +++ b/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib @@ -1,8 +1,8 @@ - + - + @@ -64,11 +64,11 @@ Gw - + - + @@ -76,7 +76,7 @@ Gw - + @@ -84,7 +84,7 @@ Gw - + @@ -92,12 +92,13 @@ Gw + - + @@ -128,11 +129,11 @@ Gw - + - + @@ -146,7 +147,7 @@ Gw - + diff --git a/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift b/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift index 2bbd83287..da9a669e6 100644 --- a/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift +++ b/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift @@ -130,6 +130,7 @@ class MachinePicker: NSObject { var model: CSMachineAppleIIModel = .appleII switch appleIIModelButton!.selectedTag() { case 1: model = .appleIIPlus + case 2: model = .appleIIe case 0: fallthrough default: model = .appleII } diff --git a/ROMImages/AppleII/readme.txt b/ROMImages/AppleII/readme.txt index 397b6905e..6f93565af 100644 --- a/ROMImages/AppleII/readme.txt +++ b/ROMImages/AppleII/readme.txt @@ -2,5 +2,10 @@ ROM files would ordinarily go here; they are copyright Apple so are not included Expected files: -apple2o.rom — a 12kb image of the original Apple II's ROMs. -apple2-character.rom — a 2kb image of the Apple II+'s character ROM. \ No newline at end of file +apple2o.rom — an image at least 12kb big, in which the final 12kb is the original Apple II's ROM. +apple2.rom — an image at least 12kb big, in which the final 12kb is the Apple II+'s ROM. +apple2e.rom — a file at least 15kb big, in which the final 12kb is the main portion of the ROM, that is visible from $D000, and the 3kb before that is the portion that can be paged in from $C100. + +apple2-character.rom — a 2kb image of the Apple IIe's character ROM. + +Apologies for the wackiness around "at least xkb big", it's to allow for use of files such as those on ftp.apple.asimov.net, which tend to be a bunch of other things, then the system ROM. \ No newline at end of file