mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-10 00:29:40 +00:00
Add Plus 4 option to Mac UI.
This commit is contained in:
parent
c5bffc38f4
commit
fa978315e6
@ -133,7 +133,7 @@ class ConcreteMachine:
|
|||||||
public Machine,
|
public Machine,
|
||||||
public Utility::TypeRecipient<CharacterMapper> {
|
public Utility::TypeRecipient<CharacterMapper> {
|
||||||
public:
|
public:
|
||||||
ConcreteMachine(const Analyser::Static::Commodore::Target &target, const ROMMachine::ROMFetcher &rom_fetcher) :
|
ConcreteMachine(const Analyser::Static::Target &target, const ROMMachine::ROMFetcher &rom_fetcher) :
|
||||||
m6502_(*this),
|
m6502_(*this),
|
||||||
interrupts_(*this),
|
interrupts_(*this),
|
||||||
timers_(interrupts_),
|
timers_(interrupts_),
|
||||||
@ -557,7 +557,7 @@ std::unique_ptr<Machine> Machine::Plus4(
|
|||||||
const Analyser::Static::Target *target,
|
const Analyser::Static::Target *target,
|
||||||
const ROMMachine::ROMFetcher &rom_fetcher
|
const ROMMachine::ROMFetcher &rom_fetcher
|
||||||
) {
|
) {
|
||||||
using Target = Analyser::Static::Commodore::Target;
|
using Target = Analyser::Static::Target;
|
||||||
const Target *const commodore_target = dynamic_cast<const Target *>(target);
|
const Target *const commodore_target = dynamic_cast<const Target *>(target);
|
||||||
return std::make_unique<ConcreteMachine>(*commodore_target, rom_fetcher);
|
return std::make_unique<ConcreteMachine>(*commodore_target, rom_fetcher);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
</Testables>
|
</Testables>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Release"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
enableASanStackUseAfterReturn = "YES"
|
enableASanStackUseAfterReturn = "YES"
|
||||||
|
@ -39,6 +39,11 @@ typedef NS_ENUM(NSInteger, CSMachineArchimedesModel) {
|
|||||||
CSMachineArchimedesModelFirstGeneration,
|
CSMachineArchimedesModelFirstGeneration,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef NS_ENUM(NSInteger, CSMachineCommodoreTEDModel) {
|
||||||
|
CSMachineCommodoreTEDModelC16,
|
||||||
|
CSMachineCommodoreTEDModelPlus4,
|
||||||
|
};
|
||||||
|
|
||||||
typedef NS_ENUM(NSInteger, CSMachineCPCModel) {
|
typedef NS_ENUM(NSInteger, CSMachineCPCModel) {
|
||||||
CSMachineCPCModel464,
|
CSMachineCPCModel464,
|
||||||
CSMachineCPCModel664,
|
CSMachineCPCModel664,
|
||||||
@ -145,6 +150,7 @@ typedef int Kilobytes;
|
|||||||
- (instancetype)initWithAppleIIgsModel:(CSMachineAppleIIgsModel)model memorySize:(Kilobytes)memorySize;
|
- (instancetype)initWithAppleIIgsModel:(CSMachineAppleIIgsModel)model memorySize:(Kilobytes)memorySize;
|
||||||
- (instancetype)initWithArchimedesModel:(CSMachineArchimedesModel)model;
|
- (instancetype)initWithArchimedesModel:(CSMachineArchimedesModel)model;
|
||||||
- (instancetype)initWithAtariSTMemorySize:(Kilobytes)memorySize;
|
- (instancetype)initWithAtariSTMemorySize:(Kilobytes)memorySize;
|
||||||
|
- (instancetype)initWithCommodoreTEDModel:(CSMachineCommodoreTEDModel)model;
|
||||||
- (instancetype)initWithElectronDFS:(BOOL)dfs adfs:(BOOL)adfs ap6:(BOOL)ap6 sidewaysRAM:(BOOL)sidewaysRAM;
|
- (instancetype)initWithElectronDFS:(BOOL)dfs adfs:(BOOL)adfs ap6:(BOOL)ap6 sidewaysRAM:(BOOL)sidewaysRAM;
|
||||||
- (instancetype)initWithEnterpriseModel:(CSMachineEnterpriseModel)model speed:(CSMachineEnterpriseSpeed)speed exosVersion:(CSMachineEnterpriseEXOS)exosVersion basicVersion:(CSMachineEnterpriseBASIC)basicVersion dos:(CSMachineEnterpriseDOS)dos;
|
- (instancetype)initWithEnterpriseModel:(CSMachineEnterpriseModel)model speed:(CSMachineEnterpriseSpeed)speed exosVersion:(CSMachineEnterpriseEXOS)exosVersion basicVersion:(CSMachineEnterpriseBASIC)basicVersion dos:(CSMachineEnterpriseDOS)dos;
|
||||||
- (instancetype)initWithMacintoshModel:(CSMachineMacintoshModel)model;
|
- (instancetype)initWithMacintoshModel:(CSMachineMacintoshModel)model;
|
||||||
|
@ -160,6 +160,16 @@
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (instancetype)initWithCommodoreTEDModel:(CSMachineCommodoreTEDModel)model {
|
||||||
|
self = [super init];
|
||||||
|
if(self) {
|
||||||
|
using Target = Analyser::Static::Target;
|
||||||
|
auto target = std::make_unique<Target>(Analyser::Machine::Plus4);
|
||||||
|
_targets.push_back(std::move(target));
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
- (instancetype)initWithElectronDFS:(BOOL)dfs adfs:(BOOL)adfs ap6:(BOOL)ap6 sidewaysRAM:(BOOL)sidewaysRAM {
|
- (instancetype)initWithElectronDFS:(BOOL)dfs adfs:(BOOL)adfs ap6:(BOOL)ap6 sidewaysRAM:(BOOL)sidewaysRAM {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
if(self) {
|
if(self) {
|
||||||
|
@ -421,6 +421,27 @@ Gw
|
|||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
</tabViewItem>
|
</tabViewItem>
|
||||||
|
<tabViewItem label="Commodore TED" identifier="c16plus4" id="8zk-1k-5AC" userLabel="Commodore TED">
|
||||||
|
<view key="view" id="JoI-6t-qsH">
|
||||||
|
<rect key="frame" x="10" y="7" width="400" height="254"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Sbs-hE-B7B">
|
||||||
|
<rect key="frame" x="18" y="218" width="364" height="16"/>
|
||||||
|
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="At present only a 64kb Commodore 16 is available." id="Sh8-Y5-Giz">
|
||||||
|
<font key="font" usesAppearanceFont="YES"/>
|
||||||
|
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
</textFieldCell>
|
||||||
|
</textField>
|
||||||
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="Sbs-hE-B7B" firstAttribute="leading" secondItem="JoI-6t-qsH" secondAttribute="leading" constant="20" symbolic="YES" id="72I-3B-f1k"/>
|
||||||
|
<constraint firstItem="Sbs-hE-B7B" firstAttribute="top" secondItem="JoI-6t-qsH" secondAttribute="top" constant="20" symbolic="YES" id="vvk-Dc-0KN"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="Sbs-hE-B7B" secondAttribute="trailing" constant="20" symbolic="YES" id="xMF-do-3ah"/>
|
||||||
|
</constraints>
|
||||||
|
</view>
|
||||||
|
</tabViewItem>
|
||||||
<tabViewItem label="Electron" identifier="electron" id="muc-z9-Vqc">
|
<tabViewItem label="Electron" identifier="electron" id="muc-z9-Vqc">
|
||||||
<view key="view" id="SRc-2D-95G">
|
<view key="view" id="SRc-2D-95G">
|
||||||
<rect key="frame" x="10" y="7" width="400" height="254"/>
|
<rect key="frame" x="10" y="7" width="400" height="254"/>
|
||||||
|
@ -275,7 +275,11 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
|
|||||||
switch machineSelector.selectedTabViewItem!.identifier as! String {
|
switch machineSelector.selectedTabViewItem!.identifier as! String {
|
||||||
|
|
||||||
case "amiga":
|
case "amiga":
|
||||||
return CSStaticAnalyser(amigaModel: .A500, chipMemorySize: Kilobytes(amigaChipRAMButton.selectedTag()), fastMemorySize: Kilobytes(amigaFastRAMButton.selectedTag()))
|
return CSStaticAnalyser(
|
||||||
|
amigaModel: .A500,
|
||||||
|
chipMemorySize: Kilobytes(amigaChipRAMButton.selectedTag()),
|
||||||
|
fastMemorySize: Kilobytes(amigaFastRAMButton.selectedTag())
|
||||||
|
)
|
||||||
|
|
||||||
case "appleii":
|
case "appleii":
|
||||||
var model: CSMachineAppleIIModel = .appleII
|
var model: CSMachineAppleIIModel = .appleII
|
||||||
@ -295,7 +299,11 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
|
|||||||
default: diskController = .none
|
default: diskController = .none
|
||||||
}
|
}
|
||||||
|
|
||||||
return CSStaticAnalyser(appleIIModel: model, diskController: diskController, hasMockingboard: appleIIMockingboardButton.state == .on)
|
return CSStaticAnalyser(
|
||||||
|
appleIIModel: model,
|
||||||
|
diskController: diskController,
|
||||||
|
hasMockingboard: appleIIMockingboardButton.state == .on
|
||||||
|
)
|
||||||
|
|
||||||
case "appleiigs":
|
case "appleiigs":
|
||||||
var model: CSMachineAppleIIgsModel = .ROM00
|
var model: CSMachineAppleIIgsModel = .ROM00
|
||||||
@ -316,6 +324,9 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
|
|||||||
let memorySize = Kilobytes(atariSTMemorySizeButton.selectedTag())
|
let memorySize = Kilobytes(atariSTMemorySizeButton.selectedTag())
|
||||||
return CSStaticAnalyser(atariSTMemorySize: memorySize)
|
return CSStaticAnalyser(atariSTMemorySize: memorySize)
|
||||||
|
|
||||||
|
case "c16plus4":
|
||||||
|
return CSStaticAnalyser(commodoreTEDModel: .C16)
|
||||||
|
|
||||||
case "cpc":
|
case "cpc":
|
||||||
switch cpcModelTypeButton.selectedTag() {
|
switch cpcModelTypeButton.selectedTag() {
|
||||||
case 464: return CSStaticAnalyser(amstradCPCModel: .model464)
|
case 464: return CSStaticAnalyser(amstradCPCModel: .model464)
|
||||||
@ -371,7 +382,13 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
|
|||||||
default: dos = .dosNone
|
default: dos = .dosNone
|
||||||
}
|
}
|
||||||
|
|
||||||
return CSStaticAnalyser(enterpriseModel: model, speed: speed, exosVersion: exos, basicVersion: basic, dos: dos)
|
return CSStaticAnalyser(
|
||||||
|
enterpriseModel: model,
|
||||||
|
speed: speed,
|
||||||
|
exosVersion: exos,
|
||||||
|
basicVersion: basic,
|
||||||
|
dos: dos
|
||||||
|
)
|
||||||
|
|
||||||
case "mac":
|
case "mac":
|
||||||
switch macintoshModelTypeButton.selectedTag() {
|
switch macintoshModelTypeButton.selectedTag() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user