mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 15:31:09 +00:00
Formally withdrew the 'load automatically' option for the Vic, having removed that option elsewhere.
This commit is contained in:
parent
81c5f4ab19
commit
8e35e913bb
@ -289,23 +289,21 @@ void Machine::configure_as_target(const StaticAnalyser::Target &target) {
|
||||
write_to_map(processor_read_memory_map_, rom_, rom_address_, 0x2000);
|
||||
}
|
||||
|
||||
// if(should_automatically_load_media_) {
|
||||
if(target.loadingCommand.length()) {
|
||||
set_typer_for_string(target.loadingCommand.c_str());
|
||||
}
|
||||
if(target.loadingCommand.length()) {
|
||||
set_typer_for_string(target.loadingCommand.c_str());
|
||||
}
|
||||
|
||||
switch(target.vic20.memory_model) {
|
||||
case StaticAnalyser::Vic20MemoryModel::Unexpanded:
|
||||
set_memory_size(Default);
|
||||
break;
|
||||
case StaticAnalyser::Vic20MemoryModel::EightKB:
|
||||
set_memory_size(ThreeKB);
|
||||
break;
|
||||
case StaticAnalyser::Vic20MemoryModel::ThirtyTwoKB:
|
||||
set_memory_size(ThirtyTwoKB);
|
||||
break;
|
||||
}
|
||||
// }
|
||||
switch(target.vic20.memory_model) {
|
||||
case StaticAnalyser::Vic20MemoryModel::Unexpanded:
|
||||
set_memory_size(Default);
|
||||
break;
|
||||
case StaticAnalyser::Vic20MemoryModel::EightKB:
|
||||
set_memory_size(ThreeKB);
|
||||
break;
|
||||
case StaticAnalyser::Vic20MemoryModel::ThirtyTwoKB:
|
||||
set_memory_size(ThirtyTwoKB);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Machine::tape_did_change_input(Storage::Tape::BinaryTapePlayer *tape) {
|
||||
|
@ -166,7 +166,6 @@ class Machine:
|
||||
void set_region(Region region);
|
||||
|
||||
inline void set_use_fast_tape_hack(bool activate) { use_fast_tape_hack_ = activate; }
|
||||
// inline void set_should_automatically_load_media(bool activate) { should_automatically_load_media_ = activate; }
|
||||
|
||||
// to satisfy CPU6502::Processor
|
||||
unsigned int perform_bus_operation(CPU6502::BusOperation operation, uint16_t address, uint8_t *value);
|
||||
@ -216,7 +215,7 @@ class Machine:
|
||||
|
||||
// Tape
|
||||
std::shared_ptr<Storage::Tape::BinaryTapePlayer> tape_;
|
||||
bool use_fast_tape_hack_;//, should_automatically_load_media_;
|
||||
bool use_fast_tape_hack_;
|
||||
bool is_running_at_zero_cost_;
|
||||
|
||||
// Disk
|
||||
|
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="MachineDocument" customModule="Clock_Signal" customModuleProvider="target">
|
||||
@ -14,14 +15,14 @@
|
||||
<window title="Options" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hidesOnDeactivate="YES" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="ota-g7-hOL" customClass="Vic20OptionsPanel" customModule="Clock_Signal" customModuleProvider="target">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" utility="YES" nonactivatingPanel="YES" HUD="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="83" y="102" width="200" height="134"/>
|
||||
<rect key="contentRect" x="83" y="102" width="200" height="112"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1366" height="768"/>
|
||||
<view key="contentView" id="7Pv-WL-2Rq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="200" height="134"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="200" height="112"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="sBT-cU-h7s">
|
||||
<rect key="frame" x="18" y="98" width="164" height="18"/>
|
||||
<rect key="frame" x="18" y="76" width="164" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Load Tapes Quickly" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="w0l-ha-esm">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@ -30,35 +31,8 @@
|
||||
<action selector="setFastLoading:" target="ota-g7-hOL" id="me0-h2-Ga5"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="lbt-Wo-6fc">
|
||||
<rect key="frame" x="18" y="78" width="164" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Load Automatically" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="jTj-uV-at1">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="setShouldLoadAutomatically:" target="ota-g7-hOL" id="T3i-gO-T1C"/>
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0NP-x1-qH2">
|
||||
<rect key="frame" x="18" y="17" width="165" height="26"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="K81-0X-C4f">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" id="diI-80-lCf">
|
||||
<items>
|
||||
<menuItem title="5 kb" id="ze7-6B-ois"/>
|
||||
<menuItem title="8 kb" id="6C7-Iv-Wvl"/>
|
||||
<menuItem title="32 kb" id="DOo-f6-OeZ"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<action selector="setMemorySize:" target="ota-g7-hOL" id="lep-Qi-00V"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MlB-rE-TXV" userLabel="Country Selector">
|
||||
<rect key="frame" x="18" y="48" width="165" height="26"/>
|
||||
<rect key="frame" x="18" y="46" width="165" height="26"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="UIu-uz-pTu">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
@ -76,18 +50,32 @@
|
||||
<action selector="setCountry:" target="ota-g7-hOL" id="YIc-QB-R1S"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0NP-x1-qH2">
|
||||
<rect key="frame" x="18" y="17" width="165" height="26"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="K81-0X-C4f">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" id="diI-80-lCf">
|
||||
<items>
|
||||
<menuItem title="5 kb" id="ze7-6B-ois"/>
|
||||
<menuItem title="8 kb" id="6C7-Iv-Wvl"/>
|
||||
<menuItem title="32 kb" id="DOo-f6-OeZ"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
<connections>
|
||||
<action selector="setMemorySize:" target="ota-g7-hOL" id="lep-Qi-00V"/>
|
||||
</connections>
|
||||
</popUpButton>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="MlB-rE-TXV" firstAttribute="top" secondItem="sBT-cU-h7s" secondAttribute="bottom" constant="8" id="0kc-u0-05p"/>
|
||||
<constraint firstAttribute="trailing" secondItem="sBT-cU-h7s" secondAttribute="trailing" constant="20" id="79b-2A-2c7"/>
|
||||
<constraint firstItem="0NP-x1-qH2" firstAttribute="leading" secondItem="7Pv-WL-2Rq" secondAttribute="leading" constant="20" id="7EF-L9-lIu"/>
|
||||
<constraint firstItem="MlB-rE-TXV" firstAttribute="top" secondItem="lbt-Wo-6fc" secondAttribute="bottom" constant="8" id="DIc-Sm-VlA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0NP-x1-qH2" secondAttribute="bottom" constant="20" id="Dtd-kf-4oU"/>
|
||||
<constraint firstItem="sBT-cU-h7s" firstAttribute="top" secondItem="7Pv-WL-2Rq" secondAttribute="top" constant="20" id="E5m-wo-X92"/>
|
||||
<constraint firstItem="0NP-x1-qH2" firstAttribute="top" secondItem="MlB-rE-TXV" secondAttribute="bottom" constant="10" id="NbW-5e-wGB"/>
|
||||
<constraint firstItem="lbt-Wo-6fc" firstAttribute="leading" secondItem="7Pv-WL-2Rq" secondAttribute="leading" constant="20" id="cID-bi-rVP"/>
|
||||
<constraint firstItem="lbt-Wo-6fc" firstAttribute="top" secondItem="sBT-cU-h7s" secondAttribute="bottom" constant="6" id="ciY-E8-07P"/>
|
||||
<constraint firstItem="0NP-x1-qH2" firstAttribute="top" secondItem="MlB-rE-TXV" secondAttribute="bottom" constant="8" id="NbW-5e-wGB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="0NP-x1-qH2" secondAttribute="trailing" constant="20" id="ero-D6-tJj"/>
|
||||
<constraint firstAttribute="trailing" secondItem="lbt-Wo-6fc" secondAttribute="trailing" constant="20" id="gMU-gX-3Sg"/>
|
||||
<constraint firstItem="sBT-cU-h7s" firstAttribute="leading" secondItem="7Pv-WL-2Rq" secondAttribute="leading" constant="20" id="nDy-Xc-Ug9"/>
|
||||
<constraint firstItem="MlB-rE-TXV" firstAttribute="leading" secondItem="7Pv-WL-2Rq" secondAttribute="leading" constant="20" id="qb4-Lp-ZMc"/>
|
||||
<constraint firstAttribute="trailing" secondItem="MlB-rE-TXV" secondAttribute="trailing" constant="20" id="v18-62-uee"/>
|
||||
@ -96,10 +84,9 @@
|
||||
<connections>
|
||||
<outlet property="countryButton" destination="MlB-rE-TXV" id="Duc-AC-ZRO"/>
|
||||
<outlet property="fastLoadingButton" destination="sBT-cU-h7s" id="uWa-EB-mbd"/>
|
||||
<outlet property="loadAutomaticallyButton" destination="lbt-Wo-6fc" id="dv0-u8-BTc"/>
|
||||
<outlet property="memorySizeButton" destination="0NP-x1-qH2" id="qYy-3f-o94"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-2" y="32"/>
|
||||
<point key="canvasLocation" x="-2" y="21"/>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
||||
|
@ -13,18 +13,6 @@ class Vic20OptionsPanel: MachinePanel {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: automatic loading tick box
|
||||
@IBOutlet var loadAutomaticallyButton: NSButton?
|
||||
var autoloadingUserDefaultsKey: String {
|
||||
get { return prefixedUserDefaultsKey("autoload") }
|
||||
}
|
||||
|
||||
@IBAction func setShouldLoadAutomatically(_ sender: NSButton!) {
|
||||
let loadAutomatically = sender.state == NSOnState
|
||||
vic20.shouldLoadAutomatically = loadAutomatically
|
||||
UserDefaults.standard.set(loadAutomatically, forKey: self.autoloadingUserDefaultsKey)
|
||||
}
|
||||
|
||||
// MARK: country selector
|
||||
@IBOutlet var countryButton: NSPopUpButton?
|
||||
var countryUserDefaultsKey: String {
|
||||
@ -85,28 +73,21 @@ class Vic20OptionsPanel: MachinePanel {
|
||||
|
||||
let standardUserDefaults = UserDefaults.standard
|
||||
standardUserDefaults.register(defaults: [
|
||||
self.autoloadingUserDefaultsKey: true,
|
||||
self.memorySizeUserDefaultsKey: 5,
|
||||
self.countryUserDefaultsKey: 1
|
||||
])
|
||||
|
||||
let loadAutomatically = standardUserDefaults.bool(forKey: self.autoloadingUserDefaultsKey)
|
||||
vic20.shouldLoadAutomatically = loadAutomatically
|
||||
self.loadAutomaticallyButton?.state = loadAutomatically ? NSOnState : NSOffState
|
||||
|
||||
if !loadAutomatically {
|
||||
let memorySize = standardUserDefaults.integer(forKey: self.memorySizeUserDefaultsKey)
|
||||
var indexToSelect: Int?
|
||||
switch memorySize {
|
||||
case 32: indexToSelect = 2
|
||||
case 8: indexToSelect = 1
|
||||
default: indexToSelect = 0
|
||||
}
|
||||
if let indexToSelect = indexToSelect {
|
||||
self.memorySizeButton?.selectItem(at: indexToSelect)
|
||||
setMemorySize(indexToSelect)
|
||||
}
|
||||
}
|
||||
// let memorySize = standardUserDefaults.integer(forKey: self.memorySizeUserDefaultsKey)
|
||||
// var indexToSelect: Int?
|
||||
// switch memorySize {
|
||||
// case 32: indexToSelect = 2
|
||||
// case 8: indexToSelect = 1
|
||||
// default: indexToSelect = 0
|
||||
// }
|
||||
// if let indexToSelect = indexToSelect {
|
||||
// self.memorySizeButton?.selectItem(at: indexToSelect)
|
||||
// setMemorySize(indexToSelect)
|
||||
// }
|
||||
|
||||
// TODO: this should be part of the configuration
|
||||
let country = standardUserDefaults.integer(forKey: self.countryUserDefaultsKey)
|
||||
|
@ -29,7 +29,6 @@ typedef NS_ENUM(NSInteger, CSVic20MemorySize)
|
||||
@interface CSVic20 : CSMachine <CSKeyboardMachine, CSFastLoading>
|
||||
|
||||
@property (nonatomic, assign) BOOL useFastLoadingHack;
|
||||
@property (nonatomic, assign) BOOL shouldLoadAutomatically;
|
||||
@property (nonatomic, assign) CSVic20Country country;
|
||||
@property (nonatomic, assign) CSVic20MemorySize memorySize;
|
||||
|
||||
|
@ -178,13 +178,6 @@ using namespace Commodore::Vic20;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setShouldLoadAutomatically:(BOOL)shouldLoadAutomatically {
|
||||
_shouldLoadAutomatically = shouldLoadAutomatically;
|
||||
@synchronized(self) {
|
||||
// _vic20.set_should_automatically_load_media(shouldLoadAutomatically ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setCountry:(CSVic20Country)country {
|
||||
_country = country;
|
||||
NSString *charactersROM, *kernelROM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user