From 084d0023536405bc445f6a79a01522de5ec35480 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 6 Aug 2021 21:58:31 -0400 Subject: [PATCH 1/2] Adds the Amiga to macOS File -> New... --- .../Machine/StaticAnalyser/CSStaticAnalyser.h | 5 + .../StaticAnalyser/CSStaticAnalyser.mm | 11 ++ .../Base.lproj/MachinePicker.xib | 102 +++++++++++------- .../MachinePicker/MachinePicker.swift | 3 + 4 files changed, 81 insertions(+), 40 deletions(-) diff --git a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.h b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.h index 990e9fee7..3faae40c7 100644 --- a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.h +++ b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.h @@ -12,6 +12,10 @@ NS_ASSUME_NONNULL_BEGIN @class CSMachine; +typedef NS_ENUM(NSInteger, CSMachineAmigaModel) { + CSMachineAmigaModelA500, +}; + typedef NS_ENUM(NSInteger, CSMachineAppleIIModel) { CSMachineAppleIIModelAppleII, CSMachineAppleIIModelAppleIIPlus, @@ -120,6 +124,7 @@ typedef int Kilobytes; - (nullable instancetype)initWithFileAtURL:(NSURL *)url; +- (instancetype)initWithAmigaModel:(CSMachineAmigaModel)model; - (instancetype)initWithAmstradCPCModel:(CSMachineCPCModel)model; - (instancetype)initWithAppleIIModel:(CSMachineAppleIIModel)model diskController:(CSMachineAppleIIDiskController)diskController; - (instancetype)initWithAppleIIgsModel:(CSMachineAppleIIgsModel)model memorySize:(Kilobytes)memorySize; diff --git a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm index cd1503cd3..8d6d27e00 100644 --- a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm +++ b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm @@ -14,6 +14,7 @@ #include "StaticAnalyser.hpp" #include "../../../../../Analyser/Static/Acorn/Target.hpp" +#include "../../../../../Analyser/Static/Amiga/Target.hpp" #include "../../../../../Analyser/Static/AmstradCPC/Target.hpp" #include "../../../../../Analyser/Static/AppleII/Target.hpp" #include "../../../../../Analyser/Static/AppleIIgs/Target.hpp" @@ -49,6 +50,16 @@ // MARK: - Machine-based Initialisers +- (instancetype)initWithAmigaModel:(CSMachineAmigaModel)model { + self = [super init]; + if(self) { + using Target = Analyser::Static::Amiga::Target; + auto target = std::make_unique(); + _targets.push_back(std::move(target)); + } + return self; +} + - (instancetype)initWithAmstradCPCModel:(CSMachineCPCModel)model { self = [super init]; if(self) { diff --git a/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib b/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib index ab57d994b..84b5e2632 100644 --- a/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib +++ b/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib @@ -18,7 +18,7 @@ - + @@ -62,6 +62,65 @@ Gw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -193,44 +252,6 @@ Gw - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -421,6 +442,7 @@ Gw + @@ -890,7 +912,7 @@ Gw - + diff --git a/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift b/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift index d9bf9e400..9c535bc92 100644 --- a/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift +++ b/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift @@ -227,6 +227,9 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate { switch machineSelector.selectedTabViewItem!.identifier as! String { + case "amiga": + return CSStaticAnalyser(amigaModel: .A500) + case "appleii": var model: CSMachineAppleIIModel = .appleII switch appleIIModelButton.selectedTag() { From 99fee22a9ffcea606d8678668fdd192e62e19bbf Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 6 Aug 2021 22:13:21 -0400 Subject: [PATCH 2/2] Adjusts defaults. --- .../Base.lproj/MachinePicker.xib | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib b/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib index 84b5e2632..4bf4233f7 100644 --- a/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib +++ b/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib @@ -144,14 +144,14 @@ Gw - + - + - + @@ -572,13 +572,13 @@ Gw - + - - + + @@ -756,13 +756,13 @@ Gw - + - - + + @@ -794,14 +794,14 @@ Gw - + - + - +