1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 23:52:26 +00:00

Add Mac GUI for Amiga memory selection.

This commit is contained in:
Thomas Harte 2021-12-22 18:20:55 -05:00
parent a17c192a9e
commit f094aa946a
4 changed files with 100 additions and 23 deletions

View File

@ -124,7 +124,7 @@ typedef int Kilobytes;
- (nullable instancetype)initWithFileAtURL:(NSURL *)url; - (nullable instancetype)initWithFileAtURL:(NSURL *)url;
- (instancetype)initWithAmigaModel:(CSMachineAmigaModel)model; - (instancetype)initWithAmigaModel:(CSMachineAmigaModel)model chipMemorySize:(Kilobytes)chipMemorySize fastMemorySize:(Kilobytes)fastMemorySize;
- (instancetype)initWithAmstradCPCModel:(CSMachineCPCModel)model; - (instancetype)initWithAmstradCPCModel:(CSMachineCPCModel)model;
- (instancetype)initWithAppleIIModel:(CSMachineAppleIIModel)model diskController:(CSMachineAppleIIDiskController)diskController; - (instancetype)initWithAppleIIModel:(CSMachineAppleIIModel)model diskController:(CSMachineAppleIIDiskController)diskController;
- (instancetype)initWithAppleIIgsModel:(CSMachineAppleIIgsModel)model memorySize:(Kilobytes)memorySize; - (instancetype)initWithAppleIIgsModel:(CSMachineAppleIIgsModel)model memorySize:(Kilobytes)memorySize;

View File

@ -50,11 +50,28 @@
// MARK: - Machine-based Initialisers // MARK: - Machine-based Initialisers
- (instancetype)initWithAmigaModel:(CSMachineAmigaModel)model { - (instancetype)initWithAmigaModel:(CSMachineAmigaModel)model chipMemorySize:(Kilobytes)chipMemorySize fastMemorySize:(Kilobytes)fastMemorySize {
self = [super init]; self = [super init];
if(self) { if(self) {
using Target = Analyser::Static::Amiga::Target; using Target = Analyser::Static::Amiga::Target;
auto target = std::make_unique<Target>(); auto target = std::make_unique<Target>();
switch(chipMemorySize) {
default: return nil;
case 512: target->chip_ram = Target::ChipRAM::FiveHundredAndTwelveKilobytes; break;
case 1024: target->chip_ram = Target::ChipRAM::OneMegabyte; break;
case 2048: target->chip_ram = Target::ChipRAM::TwoMegabytes; break;
}
switch(fastMemorySize) {
default: return nil;
case 0: target->fast_ram = Target::FastRAM::None; break;
case 1024: target->fast_ram = Target::FastRAM::OneMegabyte; break;
case 2048: target->fast_ram = Target::FastRAM::TwoMegabytes; break;
case 4096: target->fast_ram = Target::FastRAM::FourMegabytes; break;
case 8192: target->fast_ram = Target::FastRAM::EightMegabytes; break;
}
_targets.push_back(std::move(target)); _targets.push_back(std::move(target));
} }
return self; return self;

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19455" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies> <dependencies>
<deployment identifier="macosx"/> <deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19455"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
<objects> <objects>
@ -67,29 +67,75 @@ Gw
<rect key="frame" x="10" y="7" width="400" height="222"/> <rect key="frame" x="10" y="7" width="400" height="222"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="g7g-ZA-Uge"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="qfH-1l-GXp">
<rect key="frame" x="18" y="186" width="364" height="16"/> <rect key="frame" x="110" y="178" width="80" height="25"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="At present only a 1mb Amiga 500 is supported." id="Isk-qc-yKa"> <popUpButtonCell key="cell" type="push" title="512 kb" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="512" imageScaling="axesIndependently" inset="2" selectedItem="Zev-ku-jDG" id="vdO-VR-mUx">
<font key="font" usesAppearanceFont="YES"/> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="Zvi-ox-ip4">
<items>
<menuItem title="512 kb" state="on" tag="512" id="Zev-ku-jDG"/>
<menuItem title="1 mb" tag="1024" id="7Zs-HM-qwH"/>
<menuItem title="2 mb" tag="2048" id="GJT-os-38F"/>
</items>
</menu>
</popUpButtonCell>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="P6K-dt-stj">
<rect key="frame" x="18" y="184" width="89" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Chip Memory:" id="FIO-ZR-rsA">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YD0-OJ-2bY">
<rect key="frame" x="18" y="154" width="87" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Fast Memory:" id="Rpz-39-jyt">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="af8-pF-qc9">
<rect key="frame" x="108" y="148" width="72" height="25"/>
<popUpButtonCell key="cell" type="push" title="None" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="axesIndependently" inset="2" selectedItem="zV7-V8-c7s" id="39D-ms-pf9">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="yIx-1y-Ab0">
<items>
<menuItem title="None" state="on" id="zV7-V8-c7s"/>
<menuItem title="1 mb" tag="1024" id="84E-wf-572"/>
<menuItem title="2 mb" tag="2048" id="UpJ-qr-ymv"/>
<menuItem title="4 mb" tag="4096" id="wpd-BF-y2L"/>
<menuItem title="8 mb" tag="8192" id="0Zf-ll-t4F"/>
</items>
</menu>
</popUpButtonCell>
</popUpButton>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="g7g-ZA-Uge" secondAttribute="trailing" constant="20" symbolic="YES" id="aGA-6p-c9w"/> <constraint firstItem="P6K-dt-stj" firstAttribute="centerY" secondItem="qfH-1l-GXp" secondAttribute="centerY" id="2MX-S7-si1"/>
<constraint firstItem="g7g-ZA-Uge" firstAttribute="top" secondItem="5zS-Nj-Ynx" secondAttribute="top" constant="20" symbolic="YES" id="xzI-rP-iIw"/> <constraint firstItem="qfH-1l-GXp" firstAttribute="leading" secondItem="P6K-dt-stj" secondAttribute="trailing" constant="8" symbolic="YES" id="3W0-21-5um"/>
<constraint firstItem="g7g-ZA-Uge" firstAttribute="leading" secondItem="5zS-Nj-Ynx" secondAttribute="leading" constant="20" symbolic="YES" id="ya2-No-rfZ"/> <constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="af8-pF-qc9" secondAttribute="trailing" constant="20" symbolic="YES" id="6jL-bp-K7H"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="af8-pF-qc9" secondAttribute="bottom" constant="20" symbolic="YES" id="801-yv-nJo"/>
<constraint firstItem="YD0-OJ-2bY" firstAttribute="leading" secondItem="5zS-Nj-Ynx" secondAttribute="leading" constant="20" symbolic="YES" id="8PF-Vw-1NA"/>
<constraint firstItem="qfH-1l-GXp" firstAttribute="top" secondItem="5zS-Nj-Ynx" secondAttribute="top" constant="20" symbolic="YES" id="Vda-cc-L3w"/>
<constraint firstItem="af8-pF-qc9" firstAttribute="top" secondItem="qfH-1l-GXp" secondAttribute="bottom" constant="10" symbolic="YES" id="WV4-Em-q7l"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="qfH-1l-GXp" secondAttribute="trailing" constant="20" symbolic="YES" id="aWw-pp-jL6"/>
<constraint firstItem="af8-pF-qc9" firstAttribute="centerY" secondItem="YD0-OJ-2bY" secondAttribute="centerY" id="vES-ku-YOg"/>
<constraint firstItem="af8-pF-qc9" firstAttribute="leading" secondItem="YD0-OJ-2bY" secondAttribute="trailing" constant="8" symbolic="YES" id="vfw-Go-uNs"/>
<constraint firstItem="P6K-dt-stj" firstAttribute="leading" secondItem="5zS-Nj-Ynx" secondAttribute="leading" constant="20" symbolic="YES" id="yJF-1t-gtt"/>
</constraints> </constraints>
</view> </view>
</tabViewItem> </tabViewItem>
<tabViewItem label="Amstrad CPC" identifier="cpc" id="ZGX-Fz-lFd"> <tabViewItem label="Amstrad CPC" identifier="cpc" id="ZGX-Fz-lFd">
<view key="view" id="afR-Xr-omP"> <view key="view" id="afR-Xr-omP">
<rect key="frame" x="10" y="7" width="400" height="223"/> <rect key="frame" x="10" y="7" width="400" height="222"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2zv-Zo-rmO"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2zv-Zo-rmO">
<rect key="frame" x="67" y="179" width="96" height="25"/> <rect key="frame" x="67" y="178" width="96" height="25"/>
<popUpButtonCell key="cell" type="push" title="CPC6128" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="6128" imageScaling="axesIndependently" inset="2" selectedItem="LgZ-9j-YQl" id="yH2-Vm-hiD"> <popUpButtonCell key="cell" type="push" title="CPC6128" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" tag="6128" imageScaling="axesIndependently" inset="2" selectedItem="LgZ-9j-YQl" id="yH2-Vm-hiD">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/> <font key="font" metaFont="menu"/>
@ -103,7 +149,7 @@ Gw
</popUpButtonCell> </popUpButtonCell>
</popUpButton> </popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="c3g-96-b3x"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="c3g-96-b3x">
<rect key="frame" x="18" y="185" width="46" height="16"/> <rect key="frame" x="18" y="184" width="46" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Model:" id="53v-92-jmf"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Model:" id="53v-92-jmf">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -627,11 +673,11 @@ Gw
</tabViewItem> </tabViewItem>
<tabViewItem label="Vic-20" identifier="vic20" id="cyO-PU-hSU"> <tabViewItem label="Vic-20" identifier="vic20" id="cyO-PU-hSU">
<view key="view" id="fLI-XB-QCr"> <view key="view" id="fLI-XB-QCr">
<rect key="frame" x="10" y="7" width="400" height="223"/> <rect key="frame" x="10" y="7" width="400" height="222"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ueK-gq-gaF"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ueK-gq-gaF">
<rect key="frame" x="71" y="179" width="146" height="25"/> <rect key="frame" x="71" y="178" width="146" height="25"/>
<popUpButtonCell key="cell" type="push" title="European (PAL)" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="axesIndependently" inset="2" selectedItem="45i-0n-gau" id="yi7-eo-I0q"> <popUpButtonCell key="cell" type="push" title="European (PAL)" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="axesIndependently" inset="2" selectedItem="45i-0n-gau" id="yi7-eo-I0q">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/> <font key="font" metaFont="menu"/>
@ -647,7 +693,7 @@ Gw
</popUpButtonCell> </popUpButtonCell>
</popUpButton> </popUpButton>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2eV-Us-eEv"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2eV-Us-eEv">
<rect key="frame" x="108" y="149" width="116" height="25"/> <rect key="frame" x="108" y="148" width="116" height="25"/>
<popUpButtonCell key="cell" type="push" title="Unexpanded" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="axesIndependently" inset="2" selectedItem="fOl-8Q-fsA" id="rH0-7T-pJE"> <popUpButtonCell key="cell" type="push" title="Unexpanded" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="axesIndependently" inset="2" selectedItem="fOl-8Q-fsA" id="rH0-7T-pJE">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/> <font key="font" metaFont="menu"/>
@ -661,7 +707,7 @@ Gw
</popUpButtonCell> </popUpButtonCell>
</popUpButton> </popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MTh-9p-FqC"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MTh-9p-FqC">
<rect key="frame" x="18" y="185" width="50" height="16"/> <rect key="frame" x="18" y="184" width="50" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Region:" id="F3g-Ya-ypU"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Region:" id="F3g-Ya-ypU">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -669,7 +715,7 @@ Gw
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gRS-DK-rIy"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gRS-DK-rIy">
<rect key="frame" x="18" y="155" width="87" height="16"/> <rect key="frame" x="18" y="154" width="87" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Memory Size:" id="a4I-vG-yCp"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Memory Size:" id="a4I-vG-yCp">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -677,7 +723,7 @@ Gw
</textFieldCell> </textFieldCell>
</textField> </textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lrf-gL-6EI"> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lrf-gL-6EI">
<rect key="frame" x="18" y="128" width="177" height="18"/> <rect key="frame" x="18" y="127" width="177" height="18"/>
<buttonCell key="cell" type="check" title="Attach C-1540 disk drive" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="tsq-YD-xw8"> <buttonCell key="cell" type="check" title="Attach C-1540 disk drive" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="tsq-YD-xw8">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/> <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
@ -903,10 +949,12 @@ Gw
<constraint firstAttribute="bottom" secondItem="hKn-1l-OSN" secondAttribute="bottom" constant="20" symbolic="YES" id="rG2-Ea-klR"/> <constraint firstAttribute="bottom" secondItem="hKn-1l-OSN" secondAttribute="bottom" constant="20" symbolic="YES" id="rG2-Ea-klR"/>
</constraints> </constraints>
</view> </view>
<point key="canvasLocation" x="-1" y="106.5"/> <point key="canvasLocation" x="-320" y="103"/>
</window> </window>
<customObject id="192-Eb-Rpg" customClass="MachinePicker" customModule="Clock_Signal" customModuleProvider="target"> <customObject id="192-Eb-Rpg" customClass="MachinePicker" customModule="Clock_Signal" customModuleProvider="target">
<connections> <connections>
<outlet property="amigaChipRAMButton" destination="qfH-1l-GXp" id="3PG-QC-tyI"/>
<outlet property="amigaFastRAMButton" destination="af8-pF-qc9" id="laa-1H-JfD"/>
<outlet property="appleIIDiskControllerButton" destination="LSB-WP-FMi" id="Ssa-jd-t63"/> <outlet property="appleIIDiskControllerButton" destination="LSB-WP-FMi" id="Ssa-jd-t63"/>
<outlet property="appleIIModelButton" destination="jli-ac-Sij" id="Jm3-f7-C17"/> <outlet property="appleIIModelButton" destination="jli-ac-Sij" id="Jm3-f7-C17"/>
<outlet property="appleIIgsMemorySizeButton" destination="nQa-YS-utT" id="pTV-XL-zX3"/> <outlet property="appleIIgsMemorySizeButton" destination="nQa-YS-utT" id="pTV-XL-zX3"/>

View File

@ -19,6 +19,10 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
@IBOutlet var machineSelector: NSTabView! @IBOutlet var machineSelector: NSTabView!
@IBOutlet var machineNameTable: NSTableView! @IBOutlet var machineNameTable: NSTableView!
// MARK: - Amiga properties
@IBOutlet var amigaChipRAMButton: NSPopUpButton!
@IBOutlet var amigaFastRAMButton: NSPopUpButton!
// MARK: - Apple II properties // MARK: - Apple II properties
@IBOutlet var appleIIModelButton: NSPopUpButton! @IBOutlet var appleIIModelButton: NSPopUpButton!
@IBOutlet var appleIIDiskControllerButton: NSPopUpButton! @IBOutlet var appleIIDiskControllerButton: NSPopUpButton!
@ -92,6 +96,10 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
} }
} }
// Amiga settings
amigaChipRAMButton.selectItem(withTag: standardUserDefaults.integer(forKey: "new.amigaChipRAM"))
amigaFastRAMButton.selectItem(withTag: standardUserDefaults.integer(forKey: "new.amigaFastRAM"))
// Apple II settings // Apple II settings
appleIIModelButton.selectItem(withTag: standardUserDefaults.integer(forKey: "new.appleIIModel")) appleIIModelButton.selectItem(withTag: standardUserDefaults.integer(forKey: "new.appleIIModel"))
appleIIDiskControllerButton.selectItem(withTag: standardUserDefaults.integer(forKey: "new.appleIIDiskController")) appleIIDiskControllerButton.selectItem(withTag: standardUserDefaults.integer(forKey: "new.appleIIDiskController"))
@ -149,6 +157,10 @@ class MachinePicker: NSObject, NSTableViewDataSource, NSTableViewDelegate {
// Machine type // Machine type
standardUserDefaults.set(machineSelector.selectedTabViewItem!.identifier as! String, forKey: "new.machine") standardUserDefaults.set(machineSelector.selectedTabViewItem!.identifier as! String, forKey: "new.machine")
// Amiga settings
standardUserDefaults.set(amigaChipRAMButton.selectedTag(), forKey: "new.amigaChipRAM")
standardUserDefaults.set(amigaFastRAMButton.selectedTag(), forKey: "new.amigaFastRAM")
// Apple II settings // Apple II settings
standardUserDefaults.set(appleIIModelButton.selectedTag(), forKey: "new.appleIIModel") standardUserDefaults.set(appleIIModelButton.selectedTag(), forKey: "new.appleIIModel")
standardUserDefaults.set(appleIIDiskControllerButton.selectedTag(), forKey: "new.appleIIDiskController") standardUserDefaults.set(appleIIDiskControllerButton.selectedTag(), forKey: "new.appleIIDiskController")
@ -228,7 +240,7 @@ 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) return CSStaticAnalyser(amigaModel: .A500, chipMemorySize: Kilobytes(amigaChipRAMButton.selectedTag()), fastMemorySize: Kilobytes(amigaFastRAMButton.selectedTag()))
case "appleii": case "appleii":
var model: CSMachineAppleIIModel = .appleII var model: CSMachineAppleIIModel = .appleII