From 6adca98f34590eb6d97cda42db4d9fa065a89c86 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 24 Sep 2019 22:48:34 -0400 Subject: [PATCH 1/2] Adds Macintosh choice to File -> New... --- .../Base.lproj/MachinePicker.xib | 60 ++++++++++++------- .../MachinePicker/MachinePicker.swift | 17 +++++- 2 files changed, 54 insertions(+), 23 deletions(-) diff --git a/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib b/OSBindings/Mac/Clock Signal/MachinePicker/Base.lproj/MachinePicker.xib index 241a2f2c1..fe1865d35 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 @@ - + - + @@ -50,7 +50,7 @@ Gw - + If you use File -> Open... to select a disk, tape or cartridge directly, the emulator will select and configure a machine for you. @@ -68,7 +68,7 @@ Gw - + @@ -76,7 +76,7 @@ Gw - + @@ -148,7 +148,7 @@ Gw - + @@ -202,20 +202,35 @@ Gw - - - - + + + + - + + + + + + + + + + + + + + - - - - + + + + + + @@ -246,7 +261,7 @@ Gw - + @@ -273,7 +288,7 @@ Gw - + @@ -309,7 +324,7 @@ Gw - + @@ -368,7 +383,7 @@ Gw - + @@ -376,7 +391,7 @@ Gw - + @@ -429,7 +444,7 @@ Gw - + @@ -477,7 +492,7 @@ Gw - + @@ -523,6 +538,7 @@ Gw + diff --git a/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift b/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift index 1d1874857..d4471a572 100644 --- a/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift +++ b/OSBindings/Mac/Clock Signal/MachinePicker/MachinePicker.swift @@ -22,6 +22,9 @@ class MachinePicker: NSObject { // MARK: - CPC properties @IBOutlet var cpcModelTypeButton: NSPopUpButton? + // MARK: - Macintosh properties + @IBOutlet var macintoshModelTypeButton: NSPopUpButton? + // MARK: - MSX properties @IBOutlet var msxRegionButton: NSPopUpButton? @IBOutlet var msxHasDiskDriveButton: NSButton? @@ -62,6 +65,9 @@ class MachinePicker: NSObject { // CPC settings cpcModelTypeButton?.selectItem(withTag: standardUserDefaults.integer(forKey: "new.cpcModel")) + // Macintosh settings + macintoshModelTypeButton?.selectItem(withTag: standardUserDefaults.integer(forKey: "new.macintoshModel")) + // MSX settings msxRegionButton?.selectItem(withTag: standardUserDefaults.integer(forKey: "new.msxRegion")) msxHasDiskDriveButton?.state = standardUserDefaults.bool(forKey: "new.msxDiskDrive") ? .on : .off @@ -100,6 +106,9 @@ class MachinePicker: NSObject { // CPC settings standardUserDefaults.set(cpcModelTypeButton!.selectedTag(), forKey: "new.cpcModel") + // Macintosh settings + standardUserDefaults.set(macintoshModelTypeButton!.selectedTag(), forKey: "new.macintoshModel") + // MSX settings standardUserDefaults.set(msxRegionButton!.selectedTag(), forKey: "new.msxRegion") standardUserDefaults.set(msxHasDiskDriveButton?.state == .on, forKey: "new.msxDiskDrive") @@ -158,7 +167,13 @@ class MachinePicker: NSObject { } case "mac": - return CSStaticAnalyser(macintoshModel: .model512ke) + switch macintoshModelTypeButton!.selectedItem!.tag { + case 0: return CSStaticAnalyser(macintoshModel: .model128k) + case 1: return CSStaticAnalyser(macintoshModel: .model512k) + case 2: return CSStaticAnalyser(macintoshModel: .model512ke) + case 3: fallthrough + default: return CSStaticAnalyser(macintoshModel: .modelPlus) + } case "msx": let hasDiskDrive = msxHasDiskDriveButton!.state == .on From fbf95ec2b82bd585d5653470aee39620b2aa5b87 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 24 Sep 2019 22:48:47 -0400 Subject: [PATCH 2/2] Removes the now empty local namespace. --- Machines/Apple/Macintosh/Video.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Machines/Apple/Macintosh/Video.cpp b/Machines/Apple/Macintosh/Video.cpp index 07de6fab9..b413cae2c 100644 --- a/Machines/Apple/Macintosh/Video.cpp +++ b/Machines/Apple/Macintosh/Video.cpp @@ -12,11 +12,6 @@ using namespace Apple::Macintosh; -namespace { - - -} - // Re: CRT timings, see the Apple Guide to the Macintosh Hardware Family, // bottom of page 400: //