diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index a5d8e6ec1..7a0cc8a1a 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -149,12 +149,10 @@ 4B1497981EE4B97F00CE2596 /* ZX8081Options.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B1497961EE4B97F00CE2596 /* ZX8081Options.xib */; }; 4B1558C01F844ECD006E9A97 /* BitReverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B1558BE1F844ECD006E9A97 /* BitReverse.cpp */; }; 4B1BA08A1FD4967800CB4ADA /* CSMSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B1BA0891FD4967800CB4ADA /* CSMSX.mm */; }; - 4B1BA08D1FD498B000CB4ADA /* MSXOptions.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B1BA08B1FD498B000CB4ADA /* MSXOptions.xib */; }; 4B1D08061E0F7A1100763741 /* TimeTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B1D08051E0F7A1100763741 /* TimeTests.mm */; }; 4B1E85811D176468001EF87D /* 6532Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B1E85801D176468001EF87D /* 6532Tests.swift */; }; 4B1EDB451E39A0AC009D6819 /* chip.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B1EDB431E39A0AC009D6819 /* chip.png */; }; 4B2A332D1DB86821002876E3 /* OricOptions.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B2A332B1DB86821002876E3 /* OricOptions.xib */; }; - 4B2A332F1DB86869002876E3 /* OricOptionsPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2A332E1DB86869002876E3 /* OricOptionsPanel.swift */; }; 4B2A539F1D117D36003C6002 /* CSAudioQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B2A53911D117D36003C6002 /* CSAudioQueue.m */; }; 4B2A53A01D117D36003C6002 /* CSMachine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B2A53961D117D36003C6002 /* CSMachine.mm */; }; 4B2A53A11D117D36003C6002 /* CSAtari2600.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B2A539A1D117D36003C6002 /* CSAtari2600.mm */; }; @@ -258,12 +256,11 @@ 4B8805FE1DD02552003085B1 /* Tape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8805FC1DD02552003085B1 /* Tape.cpp */; }; 4B8FE21B1DA19D5F0090D3CE /* Atari2600Options.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B8FE2131DA19D5F0090D3CE /* Atari2600Options.xib */; }; 4B8FE21C1DA19D5F0090D3CE /* MachineDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B8FE2151DA19D5F0090D3CE /* MachineDocument.xib */; }; - 4B8FE21D1DA19D5F0090D3CE /* ElectronOptions.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B8FE2171DA19D5F0090D3CE /* ElectronOptions.xib */; }; + 4B8FE21D1DA19D5F0090D3CE /* QuickLoadCompositeOptions.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B8FE2171DA19D5F0090D3CE /* QuickLoadCompositeOptions.xib */; }; 4B8FE21E1DA19D5F0090D3CE /* Vic20Options.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B8FE2191DA19D5F0090D3CE /* Vic20Options.xib */; }; 4B8FE2201DA19D7C0090D3CE /* Atari2600OptionsPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B8FE21F1DA19D7C0090D3CE /* Atari2600OptionsPanel.swift */; }; 4B8FE2221DA19FB20090D3CE /* MachinePanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B8FE2211DA19FB20090D3CE /* MachinePanel.swift */; }; 4B8FE2271DA1DE2D0090D3CE /* NSBundle+DataResource.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8FE2261DA1DE2D0090D3CE /* NSBundle+DataResource.m */; }; - 4B8FE2291DA1EDDF0090D3CE /* ElectronOptionsPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B8FE2281DA1EDDF0090D3CE /* ElectronOptionsPanel.swift */; }; 4B924E991E74D22700B76AF1 /* AtariStaticAnalyserTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B924E981E74D22700B76AF1 /* AtariStaticAnalyserTests.mm */; }; 4B9252CE1E74D28200B76AF1 /* Atari ROMs in Resources */ = {isa = PBXBuildFile; fileRef = 4B9252CD1E74D28200B76AF1 /* Atari ROMs */; }; 4B92EACA1B7C112B00246143 /* 6502TimingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B92EAC91B7C112B00246143 /* 6502TimingTests.swift */; }; @@ -691,14 +688,12 @@ 4B1667FB1FFF215F00A16032 /* KonamiWithSCC.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = KonamiWithSCC.hpp; path = MSX/Cartridges/KonamiWithSCC.hpp; sourceTree = ""; }; 4B1BA0881FD4967700CB4ADA /* CSMSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSMSX.h; sourceTree = ""; }; 4B1BA0891FD4967800CB4ADA /* CSMSX.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CSMSX.mm; sourceTree = ""; }; - 4B1BA08C1FD498B000CB4ADA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Clock Signal/Base.lproj/MSXOptions.xib"; sourceTree = SOURCE_ROOT; }; 4B1D08051E0F7A1100763741 /* TimeTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TimeTests.mm; sourceTree = ""; }; 4B1E857B1D174DEC001EF87D /* 6532.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = 6532.hpp; sourceTree = ""; }; 4B1E85801D176468001EF87D /* 6532Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 6532Tests.swift; sourceTree = ""; }; 4B1EDB431E39A0AC009D6819 /* chip.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = chip.png; sourceTree = ""; }; 4B24095A1C45DF85004DA684 /* Stepper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Stepper.hpp; sourceTree = ""; }; 4B2A332C1DB86821002876E3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Clock Signal/Base.lproj/OricOptions.xib"; sourceTree = SOURCE_ROOT; }; - 4B2A332E1DB86869002876E3 /* OricOptionsPanel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OricOptionsPanel.swift; sourceTree = ""; }; 4B2A53901D117D36003C6002 /* CSAudioQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSAudioQueue.h; sourceTree = ""; }; 4B2A53911D117D36003C6002 /* CSAudioQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSAudioQueue.m; sourceTree = ""; }; 4B2A53941D117D36003C6002 /* CSMachine+Subclassing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CSMachine+Subclassing.h"; sourceTree = ""; }; @@ -907,13 +902,12 @@ 4B8EF6071FE5AF830076CCDD /* LowpassSpeaker.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = LowpassSpeaker.hpp; sourceTree = ""; }; 4B8FE2141DA19D5F0090D3CE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Clock Signal/Base.lproj/Atari2600Options.xib"; sourceTree = SOURCE_ROOT; }; 4B8FE2161DA19D5F0090D3CE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Clock Signal/Base.lproj/MachineDocument.xib"; sourceTree = SOURCE_ROOT; }; - 4B8FE2181DA19D5F0090D3CE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Clock Signal/Base.lproj/ElectronOptions.xib"; sourceTree = SOURCE_ROOT; }; + 4B8FE2181DA19D5F0090D3CE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Clock Signal/Base.lproj/QuickLoadCompositeOptions.xib"; sourceTree = SOURCE_ROOT; }; 4B8FE21A1DA19D5F0090D3CE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Clock Signal/Base.lproj/Vic20Options.xib"; sourceTree = SOURCE_ROOT; }; 4B8FE21F1DA19D7C0090D3CE /* Atari2600OptionsPanel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Atari2600OptionsPanel.swift; sourceTree = ""; }; 4B8FE2211DA19FB20090D3CE /* MachinePanel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MachinePanel.swift; sourceTree = ""; }; 4B8FE2251DA1DE2D0090D3CE /* NSBundle+DataResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+DataResource.h"; sourceTree = ""; }; 4B8FE2261DA1DE2D0090D3CE /* NSBundle+DataResource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+DataResource.m"; sourceTree = ""; }; - 4B8FE2281DA1EDDF0090D3CE /* ElectronOptionsPanel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ElectronOptionsPanel.swift; sourceTree = ""; }; 4B924E981E74D22700B76AF1 /* AtariStaticAnalyserTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AtariStaticAnalyserTests.mm; sourceTree = ""; }; 4B9252CD1E74D28200B76AF1 /* Atari ROMs */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "Atari ROMs"; sourceTree = ""; }; 4B92EAC91B7C112B00246143 /* 6502TimingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = 6502TimingTests.swift; sourceTree = ""; }; @@ -1865,17 +1859,14 @@ isa = PBXGroup; children = ( 4B8FE21F1DA19D7C0090D3CE /* Atari2600OptionsPanel.swift */, - 4B8FE2281DA1EDDF0090D3CE /* ElectronOptionsPanel.swift */, 4B55CE5E1C3B7D960093A61B /* MachineDocument.swift */, 4B8FE2211DA19FB20090D3CE /* MachinePanel.swift */, - 4B2A332E1DB86869002876E3 /* OricOptionsPanel.swift */, 4B9CCDA01DA279CA0098B625 /* Vic20OptionsPanel.swift */, 4B95FA9C1F11893B0008E395 /* ZX8081OptionsPanel.swift */, 4B38F34D1F2EC6BA00D9235D /* AmstradCPCOptions.xib */, 4B8FE2131DA19D5F0090D3CE /* Atari2600Options.xib */, - 4B8FE2171DA19D5F0090D3CE /* ElectronOptions.xib */, + 4B8FE2171DA19D5F0090D3CE /* QuickLoadCompositeOptions.xib */, 4B8FE2151DA19D5F0090D3CE /* MachineDocument.xib */, - 4B1BA08B1FD498B000CB4ADA /* MSXOptions.xib */, 4B2A332B1DB86821002876E3 /* OricOptions.xib */, 4B8FE2191DA19D5F0090D3CE /* Vic20Options.xib */, 4B1497961EE4B97F00CE2596 /* ZX8081Options.xib */, @@ -3002,7 +2993,6 @@ 4B2C45421E3C3896002A2389 /* cartridge.png in Resources */, 4BB73EA91B587A5100552FC2 /* Assets.xcassets in Resources */, 4B79E4451E3AF38600141F11 /* floppy35.png in Resources */, - 4B1BA08D1FD498B000CB4ADA /* MSXOptions.xib in Resources */, 4B1EDB451E39A0AC009D6819 /* chip.png in Resources */, 4B2A332D1DB86821002876E3 /* OricOptions.xib in Resources */, 4B8FE21B1DA19D5F0090D3CE /* Atari2600Options.xib in Resources */, @@ -3010,7 +3000,7 @@ 4B79E4441E3AF38600141F11 /* cassette.png in Resources */, 4B8FE21E1DA19D5F0090D3CE /* Vic20Options.xib in Resources */, 4BB73EAC1B587A5100552FC2 /* MainMenu.xib in Resources */, - 4B8FE21D1DA19D5F0090D3CE /* ElectronOptions.xib in Resources */, + 4B8FE21D1DA19D5F0090D3CE /* QuickLoadCompositeOptions.xib in Resources */, 4B79E4461E3AF38600141F11 /* floppy525.png in Resources */, 4B38F34F1F2EC6BA00D9235D /* AmstradCPCOptions.xib in Resources */, 4BC9DF451D044FCA00F44158 /* ROMImages in Resources */, @@ -3493,7 +3483,6 @@ 4B3BF5B01F146265005B6C36 /* CSW.cpp in Sources */, 4B4518A51F75FD1C00926311 /* SSD.cpp in Sources */, 4B55CE5F1C3B7D960093A61B /* MachineDocument.swift in Sources */, - 4B2A332F1DB86869002876E3 /* OricOptionsPanel.swift in Sources */, 4B2B3A4C1F9B8FA70062DABF /* MemoryFuzzer.cpp in Sources */, 4B7913CC1DFCD80E00175A82 /* Video.cpp in Sources */, 4B0E04EE1FC9E88300F43484 /* StaticAnalyser.cpp in Sources */, @@ -3539,7 +3528,6 @@ 4B0E04FA1FC9FA3100F43484 /* 9918.cpp in Sources */, 4B69FB3D1C4D908A00B5F0AA /* Tape.cpp in Sources */, 4B4518841F75E91A00926311 /* UnformattedTrack.cpp in Sources */, - 4B8FE2291DA1EDDF0090D3CE /* ElectronOptionsPanel.swift in Sources */, 4B55CE5D1C3B7D6F0093A61B /* CSOpenGLView.m in Sources */, 4BB697CB1D4B6D3E00248BDF /* TimedEventLoop.cpp in Sources */, 4B54C0C21F8D91CD0050900F /* Keyboard.cpp in Sources */, @@ -3668,14 +3656,6 @@ name = ZX8081Options.xib; sourceTree = ""; }; - 4B1BA08B1FD498B000CB4ADA /* MSXOptions.xib */ = { - isa = PBXVariantGroup; - children = ( - 4B1BA08C1FD498B000CB4ADA /* Base */, - ); - name = MSXOptions.xib; - sourceTree = ""; - }; 4B2A332B1DB86821002876E3 /* OricOptions.xib */ = { isa = PBXVariantGroup; children = ( @@ -3708,12 +3688,12 @@ name = MachineDocument.xib; sourceTree = ""; }; - 4B8FE2171DA19D5F0090D3CE /* ElectronOptions.xib */ = { + 4B8FE2171DA19D5F0090D3CE /* QuickLoadCompositeOptions.xib */ = { isa = PBXVariantGroup; children = ( 4B8FE2181DA19D5F0090D3CE /* Base */, ); - name = ElectronOptions.xib; + name = QuickLoadCompositeOptions.xib; sourceTree = ""; }; 4B8FE2191DA19D5F0090D3CE /* Vic20Options.xib */ = { diff --git a/OSBindings/Mac/Clock Signal/Base.lproj/AmstradCPCOptions.xib b/OSBindings/Mac/Clock Signal/Base.lproj/AmstradCPCOptions.xib index 39bd7024b..544399699 100644 --- a/OSBindings/Mac/Clock Signal/Base.lproj/AmstradCPCOptions.xib +++ b/OSBindings/Mac/Clock Signal/Base.lproj/AmstradCPCOptions.xib @@ -1,7 +1,8 @@ - + - + + @@ -16,7 +17,7 @@ - + diff --git a/OSBindings/Mac/Clock Signal/Base.lproj/MSXOptions.xib b/OSBindings/Mac/Clock Signal/Base.lproj/MSXOptions.xib deleted file mode 100644 index 39bd7024b..000000000 --- a/OSBindings/Mac/Clock Signal/Base.lproj/MSXOptions.xib +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/OSBindings/Mac/Clock Signal/Base.lproj/OricOptions.xib b/OSBindings/Mac/Clock Signal/Base.lproj/OricOptions.xib index 694172ae7..53238624b 100644 --- a/OSBindings/Mac/Clock Signal/Base.lproj/OricOptions.xib +++ b/OSBindings/Mac/Clock Signal/Base.lproj/OricOptions.xib @@ -1,7 +1,9 @@ - + - + + + @@ -11,11 +13,11 @@ - + - + diff --git a/OSBindings/Mac/Clock Signal/Base.lproj/ElectronOptions.xib b/OSBindings/Mac/Clock Signal/Base.lproj/QuickLoadCompositeOptions.xib similarity index 90% rename from OSBindings/Mac/Clock Signal/Base.lproj/ElectronOptions.xib rename to OSBindings/Mac/Clock Signal/Base.lproj/QuickLoadCompositeOptions.xib index 2997bc731..3f962f510 100644 --- a/OSBindings/Mac/Clock Signal/Base.lproj/ElectronOptions.xib +++ b/OSBindings/Mac/Clock Signal/Base.lproj/QuickLoadCompositeOptions.xib @@ -1,7 +1,9 @@ - + - + + + @@ -11,11 +13,11 @@ - + - + diff --git a/OSBindings/Mac/Clock Signal/Documents/ElectronOptionsPanel.swift b/OSBindings/Mac/Clock Signal/Documents/ElectronOptionsPanel.swift deleted file mode 100644 index 9fe94c253..000000000 --- a/OSBindings/Mac/Clock Signal/Documents/ElectronOptionsPanel.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// ElectronOptionsPanel.swift -// Clock Signal -// -// Created by Thomas Harte on 02/10/2016. -// Copyright © 2016 Thomas Harte. All rights reserved. -// - -class ElectronOptionsPanel: MachinePanel { - var electron: CSElectron! { - get { - return self.machine as! CSElectron - } - } - - fileprivate let displayTypeUserDefaultsKey = "electron.displayType" - - @IBOutlet var displayTypeButton: NSPopUpButton? - @IBAction func setDisplayType(_ sender: NSPopUpButton!) { - electron.useCompositeOutput = (sender.indexOfSelectedItem == 1) - UserDefaults.standard.set(sender.indexOfSelectedItem, forKey: self.displayTypeUserDefaultsKey) - } - - override func establishStoredOptions() { - super.establishStoredOptions() - let standardUserDefaults = UserDefaults.standard - standardUserDefaults.register(defaults: [ - displayTypeUserDefaultsKey: 0, - ]) - - let displayType = standardUserDefaults.integer(forKey: self.displayTypeUserDefaultsKey) - electron.useCompositeOutput = (displayType == 1) - self.displayTypeButton?.selectItem(at: displayType) - } -} diff --git a/OSBindings/Mac/Clock Signal/Documents/MachinePanel.swift b/OSBindings/Mac/Clock Signal/Documents/MachinePanel.swift index 3e38a050c..e27a946b2 100644 --- a/OSBindings/Mac/Clock Signal/Documents/MachinePanel.swift +++ b/OSBindings/Mac/Clock Signal/Documents/MachinePanel.swift @@ -15,12 +15,10 @@ class MachinePanel: NSPanel { final func prefixedUserDefaultsKey(_ key: String) -> String { return "\(self.machine.userDefaultsPrefix).\(key)" } - var fastLoadingUserDefaultsKey: String { - get { - return prefixedUserDefaultsKey("fastLoading") - } - } + var fastLoadingUserDefaultsKey: String { + return prefixedUserDefaultsKey("fastLoading") + } @IBOutlet var fastLoadingButton: NSButton? @IBAction func setFastLoading(_ sender: NSButton!) { if let fastLoadingMachine = machine as? CSFastLoading { @@ -30,10 +28,20 @@ class MachinePanel: NSPanel { } } + var displayTypeUserDefaultsKey: String { + return prefixedUserDefaultsKey("displayType") + } + @IBOutlet var displayTypeButton: NSPopUpButton? + @IBAction func setDisplayType(_ sender: NSPopUpButton!) { + machine.useCompositeOutput = (sender.indexOfSelectedItem == 1) + UserDefaults.standard.set(sender.indexOfSelectedItem, forKey: self.displayTypeUserDefaultsKey) + } + func establishStoredOptions() { let standardUserDefaults = UserDefaults.standard standardUserDefaults.register(defaults: [ - fastLoadingUserDefaultsKey: true + fastLoadingUserDefaultsKey: true, + displayTypeUserDefaultsKey: 0 ]) if let fastLoadingMachine = machine as? CSFastLoading { @@ -41,5 +49,9 @@ class MachinePanel: NSPanel { fastLoadingMachine.useFastLoadingHack = useFastLoadingHack self.fastLoadingButton?.state = useFastLoadingHack ? .on : .off } + + let displayType = standardUserDefaults.integer(forKey: self.displayTypeUserDefaultsKey) + machine.useCompositeOutput = (displayType == 1) + self.displayTypeButton?.selectItem(at: displayType) } } diff --git a/OSBindings/Mac/Clock Signal/Documents/OricOptionsPanel.swift b/OSBindings/Mac/Clock Signal/Documents/OricOptionsPanel.swift deleted file mode 100644 index aefd75a26..000000000 --- a/OSBindings/Mac/Clock Signal/Documents/OricOptionsPanel.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// OricOptionsPanel.swift -// Clock Signal -// -// Created by Thomas Harte on 19/10/2016. -// Copyright © 2016 Thomas Harte. All rights reserved. -// - -class OricOptionsPanel: MachinePanel { - var oric: CSOric! { - get { - return self.machine as! CSOric - } - } - - fileprivate let displayTypeUserDefaultsKey = "oric.displayType" - - @IBOutlet var displayTypeButton: NSPopUpButton? - @IBAction func setDisplayType(_ sender: NSPopUpButton!) { - oric.useCompositeOutput = (sender.indexOfSelectedItem == 1) - UserDefaults.standard.set(sender.indexOfSelectedItem, forKey: self.displayTypeUserDefaultsKey) - } - - override func establishStoredOptions() { - super.establishStoredOptions() - let standardUserDefaults = UserDefaults.standard - standardUserDefaults.register(defaults: [ - displayTypeUserDefaultsKey: 0, - ]) - - let displayType = standardUserDefaults.integer(forKey: self.displayTypeUserDefaultsKey) - oric.useCompositeOutput = (displayType == 1) - self.displayTypeButton?.selectItem(at: displayType) - } -} diff --git a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm index 4395921b7..8dcd7d18a 100644 --- a/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm +++ b/OSBindings/Mac/Clock Signal/Machine/StaticAnalyser/CSStaticAnalyser.mm @@ -45,8 +45,8 @@ switch(_target.machine) { case StaticAnalyser::Target::AmstradCPC: return nil; case StaticAnalyser::Target::Atari2600: return @"Atari2600Options"; - case StaticAnalyser::Target::Electron: return @"ElectronOptions"; - case StaticAnalyser::Target::MSX: return @"MSXOptions"; + case StaticAnalyser::Target::Electron: return @"QuickLoadCompositeOptions"; + case StaticAnalyser::Target::MSX: return @"QuickLoadCompositeOptions"; case StaticAnalyser::Target::Oric: return @"OricOptions"; case StaticAnalyser::Target::Vic20: return @"Vic20Options"; case StaticAnalyser::Target::ZX8081: return @"ZX8081Options"; diff --git a/Outputs/CRT/CRT.cpp b/Outputs/CRT/CRT.cpp index e4fe5437f..2e1fb5c65 100644 --- a/Outputs/CRT/CRT.cpp +++ b/Outputs/CRT/CRT.cpp @@ -221,11 +221,13 @@ void CRT::advance_cycles(unsigned int number_of_cycles, bool hsync_requested, bo [=] (uint8_t *input_buffer, std::size_t input_size, uint8_t *output_buffer, std::size_t output_size) { openGL_output_builder_.texture_builder.flush( [=] (const std::vector &write_areas, std::size_t number_of_write_areas) { - assert(number_of_write_areas * SourceVertexSize == input_size); - for(std::size_t run = 0; run < number_of_write_areas; run++) { - *reinterpret_cast(&input_buffer[run * SourceVertexSize + SourceVertexOffsetOfInputStart + 0]) = write_areas[run].x; - *reinterpret_cast(&input_buffer[run * SourceVertexSize + SourceVertexOffsetOfInputStart + 2]) = write_areas[run].y; - *reinterpret_cast(&input_buffer[run * SourceVertexSize + SourceVertexOffsetOfEnds + 0]) = write_areas[run].x + write_areas[run].length; +// assert(number_of_write_areas * SourceVertexSize == input_size); + if(number_of_write_areas * SourceVertexSize == input_size) { + for(std::size_t run = 0; run < number_of_write_areas; run++) { + *reinterpret_cast(&input_buffer[run * SourceVertexSize + SourceVertexOffsetOfInputStart + 0]) = write_areas[run].x; + *reinterpret_cast(&input_buffer[run * SourceVertexSize + SourceVertexOffsetOfInputStart + 2]) = write_areas[run].y; + *reinterpret_cast(&input_buffer[run * SourceVertexSize + SourceVertexOffsetOfEnds + 0]) = write_areas[run].x + write_areas[run].length; + } } }); for(std::size_t position = 0; position < input_size; position += SourceVertexSize) {