Skip to content

Commit

Permalink
Ported OPT_WARP_BOOT from vAmiga
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkwhoffmann committed Mar 30, 2023
1 parent a2eecc0 commit 846f201
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Emulator/Components/C64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ C64::eventName(EventSlot slot, EventID id)
default: return "*** INVALID ***";
}
break;

case SLOT_INS:

switch (id) {
Expand Down Expand Up @@ -282,8 +282,10 @@ C64::_reset(bool hard)
// scheduleAbs<SLOT_CIA2>(cpu.clock, CIA_EXECUTE);
scheduleAbs<SLOT_WBT>(SEC(config.warpBoot), WBT_DISABLE);
if (insEvent) scheduleRel <SLOT_INS> (0, insEvent);

flags = 0;
rasterCycle = 1;
updateWarpState();
}

void
Expand Down
7 changes: 7 additions & 0 deletions GUI/Dialogs/Configuration/CompatibilityConf.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ extension ConfigurationController {

// Warp
comWarpMode.selectItem(withTag: config.warpMode)
comWarpBoot.integerValue = config.warpBoot

// Power button
comPowerButton.isHidden = !bootable
Expand Down Expand Up @@ -64,6 +65,12 @@ extension ConfigurationController {
refresh()
}

@IBAction func comWarpBootAction(_ sender: NSTextField!) {

config.warpBoot = sender.integerValue
refresh()
}

@IBAction func comPresetAction(_ sender: NSPopUpButton!) {

c64.suspend()
Expand Down
1 change: 1 addition & 0 deletions GUI/Dialogs/Configuration/ConfigurationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class ConfigurationController: DialogController {

// Warp mode
@IBOutlet weak var comWarpMode: NSPopUpButton!
@IBOutlet weak var comWarpBoot: NSTextField!

// Buttons
@IBOutlet weak var comPowerButton: NSButton!
Expand Down
31 changes: 31 additions & 0 deletions GUI/XIB files/Configuration.xib
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<outlet property="comSidPowerSave" destination="xx0-43-RDp" id="xyp-xA-a8H"/>
<outlet property="comSsCollisions" destination="qgS-di-RAL" id="dez-ar-RTx"/>
<outlet property="comViciiPowerSave" destination="WZL-K6-LDf" id="cqp-gt-dO7"/>
<outlet property="comWarpBoot" destination="ybs-ej-OVe" id="0hE-Q3-oEB"/>
<outlet property="comWarpMode" destination="4fl-rA-Zcx" id="obe-6R-FjQ"/>
<outlet property="hwCiaModelPopup" destination="MVI-Fh-OO6" id="coA-3a-xgT"/>
<outlet property="hwCiaTimerBBug" destination="4rD-qd-qGj" id="6Nf-wz-IRb"/>
Expand Down Expand Up @@ -1576,6 +1577,15 @@ Gw
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Trj-sJ-IWk">
<rect key="frame" x="327" y="331" width="177" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" refusesFirstResponder="YES" sendsActionOnEndEditing="YES" alignment="left" title="Boot in warp mode for " id="9pc-1w-rKp">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="4fl-rA-Zcx">
<rect key="frame" x="397" y="355" width="197" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
Expand Down Expand Up @@ -1631,6 +1641,27 @@ Gw
<action selector="comSbCollisionsAction:" target="-2" id="exI-gv-cre"/>
</connections>
</button>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ybs-ej-OVe">
<rect key="frame" x="470" y="332" width="37" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="PC0-hK-ne8">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<action selector="comWarpBootAction:" target="-2" id="GoH-83-wxB"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="NJ9-Sp-buV">
<rect key="frame" x="513" y="331" width="68" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" refusesFirstResponder="YES" sendsActionOnEndEditing="YES" alignment="left" title="seconds" id="75R-BA-1QQ">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
</tabViewItem>
Expand Down

0 comments on commit 846f201

Please sign in to comment.