remove old slot view controller code/nib

This commit is contained in:
Kelvin Sherlock 2021-05-30 18:14:55 -04:00
parent 1b7faf3ac4
commit 751083ea26
4 changed files with 0 additions and 1239 deletions

View File

@ -323,10 +323,8 @@
B6004DEF24FB05D600D38596 /* LogWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = LogWindow.xib; path = Base.lproj/LogWindow.xib; sourceTree = "<group>"; };
B608E17D2502FE0C00D53465 /* TransparentScroller.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TransparentScroller.h; sourceTree = "<group>"; };
B608E17E2502FE0C00D53465 /* TransparentScroller.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TransparentScroller.m; sourceTree = "<group>"; };
B60A6E0B24ECE23F004B7EEF /* apple2gs.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = apple2gs.plist; sourceTree = "<group>"; };
B60A6E1224EE0AE2004B7EEF /* FlippedView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FlippedView.h; sourceTree = "<group>"; };
B60A6E1324EE0AE2004B7EEF /* FlippedView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FlippedView.m; sourceTree = "<group>"; };
B61099E424F5F230005CB652 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/SlotView.xib; sourceTree = "<group>"; };
B61099E624F5F230005CB652 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MediaView.xib; sourceTree = "<group>"; };
B61099EA24F5F36E005CB652 /* apple2e.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = apple2e.plist; sourceTree = "<group>"; };
B61099EB24F5F36E005CB652 /* hkc8800a.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = hkc8800a.plist; sourceTree = "<group>"; };
@ -421,8 +419,6 @@
B65085B625B616AC00354EC9 /* maclc2.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = maclc2.plist; sourceTree = "<group>"; };
B65085B725B616AC00354EC9 /* maclc3.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = maclc3.plist; sourceTree = "<group>"; };
B65085B825B616AC00354EC9 /* maciici.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = maciici.plist; sourceTree = "<group>"; };
B65593AF24ECB61800722E0C /* SlotViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SlotViewController.h; sourceTree = "<group>"; };
B65593B024ECB61800722E0C /* SlotViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SlotViewController.m; sourceTree = "<group>"; };
B65D718525E70BD5008C5F87 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
B66236A724FD9A34006CABD7 /* PreferencesWindowController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PreferencesWindowController.h; sourceTree = "<group>"; };
B66236A824FD9A34006CABD7 /* PreferencesWindowController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PreferencesWindowController.m; sourceTree = "<group>"; };
@ -434,7 +430,6 @@
B6665C1B265C639900254939 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/Autocomplete.xib; sourceTree = "<group>"; };
B66D0FE62611386B000902F1 /* SoftwareList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SoftwareList.m; sourceTree = "<group>"; };
B66D0FE926113AA8000902F1 /* SoftwareList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SoftwareList.h; sourceTree = "<group>"; };
B67BD48424EE249D0073E334 /* apple1.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = apple1.plist; sourceTree = "<group>"; };
B6841BCA251EC88E006A5C39 /* vmnet_helper.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = vmnet_helper.c; sourceTree = "<group>"; };
B6841BD0251EC913006A5C39 /* vmnet_helper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = vmnet_helper; sourceTree = BUILT_PRODUCTS_DIR; };
B6841BDD251ECC29006A5C39 /* vmnet.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vmnet.framework; path = System/Library/Frameworks/vmnet.framework; sourceTree = SDKROOT; };
@ -528,8 +523,6 @@
B649798C24EEC165008ABD20 /* Recovered References */ = {
isa = PBXGroup;
children = (
B67BD48424EE249D0073E334 /* apple1.plist */,
B60A6E0B24ECE23F004B7EEF /* apple2gs.plist */,
);
name = "Recovered References";
sourceTree = "<group>";
@ -687,8 +680,6 @@
B6E9A17F25088B1B005E7525 /* NewSlotViewController.m */,
B6A1A1932528EB1700DB0FD7 /* Menu.m */,
B6A1A1962528EB4600DB0FD7 /* Menu.h */,
B65593B024ECB61800722E0C /* SlotViewController.m */,
B65593AF24ECB61800722E0C /* SlotViewController.h */,
B64979C024EF6703008ABD20 /* MediaViewController.h */,
B64979C124EF6703008ABD20 /* MediaViewController.m */,
B64E15A724EA1D5300E8AD3D /* MachineViewController.h */,
@ -747,7 +738,6 @@
B6BA258324E99BEB005FB8FF /* MainMenu.xib */,
B61099E524F5F230005CB652 /* MediaView.xib */,
B6D6DE3724FAC8B500661A5F /* Preferences.xib */,
B61099E324F5F230005CB652 /* SlotView.xib */,
B64AF1EC250EC35B00A09B9B /* DiskImages.xib */,
B63C1F0925B143C50016A611 /* CheatSheet.xib */,
);
@ -1206,14 +1196,6 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
B61099E324F5F230005CB652 /* SlotView.xib */ = {
isa = PBXVariantGroup;
children = (
B61099E424F5F230005CB652 /* Base */,
);
name = SlotView.xib;
sourceTree = "<group>";
};
B61099E524F5F230005CB652 /* MediaView.xib */ = {
isa = PBXVariantGroup;
children = (

View File

@ -1,632 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15705" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15705"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="SlotViewController">
<connections>
<outlet property="aux_menu" destination="3kq-qn-7YR" id="wic-Ry-yAf"/>
<outlet property="exp_menu" destination="San-wP-1ez" id="X7u-dM-xrI"/>
<outlet property="game_menu" destination="K8G-bZ-6mZ" id="IeQ-ZT-5F6"/>
<outlet property="modem_menu" destination="KHf-kC-BpZ" id="Qab-mA-anC"/>
<outlet property="printer_menu" destination="sTp-en-8Wd" id="zeu-LF-6mV"/>
<outlet property="ram_menu" destination="Yks-M5-vi0" id="h5y-Un-jYJ"/>
<outlet property="rs232_menu" destination="6ln-U2-0Pi" id="7CT-OE-idV"/>
<outlet property="sl0_menu" destination="Jw1-t7-YyU" id="BB5-6y-zyf"/>
<outlet property="sl1_menu" destination="bta-RS-JT4" id="cpI-db-kzX"/>
<outlet property="sl2_menu" destination="cDU-b1-x5a" id="WtL-Fo-Q1B"/>
<outlet property="sl3_menu" destination="aSh-cs-0Nn" id="24o-66-LjH"/>
<outlet property="sl4_menu" destination="kU5-cR-hPZ" id="STc-6r-nxH"/>
<outlet property="sl5_menu" destination="8z4-8f-kLU" id="cLl-Ee-LUD"/>
<outlet property="sl6_menu" destination="GLb-F4-PWe" id="ubk-pt-e1Q"/>
<outlet property="sl7_menu" destination="IV2-3M-qfw" id="s5k-4G-w4r"/>
<outlet property="view" destination="OM3-7F-wiN" id="yre-ts-aHj"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<gridView autoresizesSubviews="NO" misplaced="YES" xPlacement="leading" yPlacement="bottom" rowAlignment="none" translatesAutoresizingMaskIntoConstraints="NO" id="OM3-7F-wiN">
<rect key="frame" x="0.0" y="0.0" width="306" height="459"/>
<rows>
<gridRow yPlacement="center" height="25" id="tHD-ui-hIL">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.ram" id="ze9-jx-lv0">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="Ccd-U2-Gx5">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.sl0" id="YsR-kI-yrh">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="JGU-aq-3uw">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.sl1" id="1io-aZ-v2G">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="gVW-Ya-phU">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.sl2" id="AgS-hm-ePr">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="3fP-qp-zmi">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.sl3" id="98U-4P-iRh">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="86u-5p-UT6">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.sl4" id="hsy-pm-Qjk">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="Wdg-xb-xQx">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.sl5" id="0QC-RB-278">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="ein-Fe-vBw">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.sl6" id="731-3P-DUy">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="qjB-2w-AWE">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.sl7" id="sew-Ds-4I9">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="EEX-dh-jwn">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.exp" id="EOZ-lS-QHF">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="OaZ-ZQ-gKK">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.aux" id="OlF-v7-JZx">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="wQi-Oz-7Ye">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.rs232" id="AeP-bn-blv">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="gr2-eY-995">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.gameio" id="x3I-Bd-9di">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="1xN-lm-s4l">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.printer" id="T9a-lH-z5K">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
<gridRow yPlacement="center" height="25" id="M2s-qn-SIT">
<connections>
<binding destination="-2" name="hidden" keyPath="machine.modem" id="PSe-R3-S3e">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNil</string>
</dictionary>
</binding>
</connections>
</gridRow>
</rows>
<columns>
<gridColumn xPlacement="fill" width="100" id="zpB-Rf-dWg"/>
<gridColumn xPlacement="fill" width="200" id="6Vn-yh-FoQ"/>
</columns>
<gridCells>
<gridCell row="tHD-ui-hIL" column="zpB-Rf-dWg" id="deJ-sv-Hb7">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nHa-QG-HjJ">
<rect key="frame" x="-2" y="439" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="RAM:" id="CvY-8m-Ni9">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="tHD-ui-hIL" column="6Vn-yh-FoQ" id="dak-Ha-01u">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="16" translatesAutoresizingMaskIntoConstraints="NO" id="Yks-M5-vi0">
<rect key="frame" x="104" y="433" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="92u-m2-3yN" id="XFo-KF-ueS">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="k8O-sG-Qld">
<items>
<menuItem title="Item 1" state="on" id="92u-m2-3yN">
<attributedString key="attributedTitle"/>
</menuItem>
<menuItem title="Item 2" id="dPG-tR-M4A"/>
<menuItem title="Item 3" id="q2n-oZ-46s"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="memoryMenuChanged:" target="-2" id="m1Q-Xj-z22"/>
<binding destination="-2" name="content" keyPath="machine.ram" id="UCD-j5-7Bh"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="Ccd-U2-Gx5" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="QI6-Cz-URX">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="v8c-Rp-Mnt">
<rect key="frame" x="-2" y="408" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Slot 0:" id="EF7-NX-RMW">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="Ccd-U2-Gx5" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="0KQ-Qt-8KP">
<popUpButton key="contentView" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Jw1-t7-YyU">
<rect key="frame" x="104" y="402" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="8Iv-mH-mEI" id="47g-IO-4Xt">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="nrR-Tr-UaW">
<items>
<menuItem title="Item 1" state="on" id="8Iv-mH-mEI"/>
<menuItem title="Item 2" id="Prr-6W-NWp"/>
<menuItem title="Item 3" id="xz3-bi-5IM"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="wPZ-cY-9Ir"/>
<binding destination="-2" name="content" keyPath="machine.sl0" id="2aW-3q-Mvt"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="JGU-aq-3uw" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="Y1R-Ob-g2b">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0gP-wH-DVr">
<rect key="frame" x="-2" y="377" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Slot 1:" id="bfg-tf-E34">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="JGU-aq-3uw" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="v8q-Rj-E4q">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="1" translatesAutoresizingMaskIntoConstraints="NO" id="bta-RS-JT4">
<rect key="frame" x="104" y="371" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="dXO-at-nGw" id="kNn-6b-ysf">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="4ah-BI-RD5">
<items>
<menuItem title="Item 1" state="on" id="dXO-at-nGw"/>
<menuItem title="Item 2" id="UZY-8b-qmE"/>
<menuItem title="Item 3" id="zxA-OM-BIY"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="hl3-N2-89k"/>
<binding destination="-2" name="content" keyPath="machine.sl1" id="wQI-oy-SYz"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="gVW-Ya-phU" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="tpv-Yc-qii">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EHZ-ol-QVz">
<rect key="frame" x="-2" y="346" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Slot 2:" id="FlL-pN-rn7">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="gVW-Ya-phU" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="OzN-rM-Pgi">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="2" translatesAutoresizingMaskIntoConstraints="NO" id="cDU-b1-x5a">
<rect key="frame" x="104" y="340" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="vCY-qF-aB3" id="jvL-SH-nvG">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="Hp6-Gt-pVV">
<items>
<menuItem title="Item 1" state="on" id="vCY-qF-aB3"/>
<menuItem title="Item 2" id="pbR-nc-itb"/>
<menuItem title="Item 3" id="L8Z-vH-OCa"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="T5w-C4-Ohq"/>
<binding destination="-2" name="content" keyPath="machine.sl2" id="uXQ-0A-98q"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="3fP-qp-zmi" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="LbW-TT-AQ7">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zGs-8d-L0S">
<rect key="frame" x="-2" y="315" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Slot 3:" id="KZK-h8-8cw">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="3fP-qp-zmi" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="h8H-TB-p2z">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="3" translatesAutoresizingMaskIntoConstraints="NO" id="aSh-cs-0Nn">
<rect key="frame" x="104" y="309" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="2yS-4z-8OR" id="HaE-TD-5Wx">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="zka-z5-hPa">
<items>
<menuItem title="Item 1" state="on" id="2yS-4z-8OR"/>
<menuItem title="Item 2" id="q4H-Fz-zVr"/>
<menuItem title="Item 3" id="HtQ-6y-S25"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="5uS-La-5cM"/>
<binding destination="-2" name="content" keyPath="machine.sl3" id="YgU-fX-fPC"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="86u-5p-UT6" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="hJR-nJ-yYi">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zsX-jd-6ba">
<rect key="frame" x="-2" y="284" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Slot 4:" id="WXv-RF-e7f">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="86u-5p-UT6" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="dHu-cL-FyO">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="4" translatesAutoresizingMaskIntoConstraints="NO" id="kU5-cR-hPZ">
<rect key="frame" x="104" y="278" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="NaS-CV-XQm" id="rOP-eY-UKe">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="Iwv-z3-oJb">
<items>
<menuItem title="Item 1" state="on" id="NaS-CV-XQm"/>
<menuItem title="Item 2" id="ovb-SG-Eg4"/>
<menuItem title="Item 3" id="GVh-L4-3Cp"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="I35-wl-YdH"/>
<binding destination="-2" name="content" keyPath="machine.sl4" id="yfx-hj-6Ly"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="Wdg-xb-xQx" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="dsM-t5-8ng">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ANg-c1-hGf">
<rect key="frame" x="-2" y="253" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Slot 5:" id="EhN-EV-65V">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="Wdg-xb-xQx" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="ffm-pA-jjo">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="5" translatesAutoresizingMaskIntoConstraints="NO" id="8z4-8f-kLU">
<rect key="frame" x="104" y="247" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="gH7-4J-xsg" id="cmc-Gf-Slp">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="Cma-00-qCY">
<items>
<menuItem title="Item 1" state="on" id="gH7-4J-xsg"/>
<menuItem title="Item 2" id="meM-WH-GgP"/>
<menuItem title="Item 3" id="ILg-Ld-9Ri"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="jSe-j9-QUW"/>
<binding destination="-2" name="content" keyPath="machine.sl5" id="Uo1-Rg-wko"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="ein-Fe-vBw" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="PSw-Jx-eS2">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Cr1-RK-Z7V">
<rect key="frame" x="-2" y="222" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Slot 6:" id="uzy-th-5Yc">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="ein-Fe-vBw" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="FsV-vO-KAs">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="6" translatesAutoresizingMaskIntoConstraints="NO" id="GLb-F4-PWe">
<rect key="frame" x="104" y="216" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="VaX-M9-Op0" id="CjU-rC-HUT">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="3xq-Hn-icN">
<items>
<menuItem title="Item 1" state="on" id="VaX-M9-Op0"/>
<menuItem title="Item 2" id="Fhy-5D-e6z"/>
<menuItem title="Item 3" id="9jw-LA-666"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="yZO-kH-P6Q"/>
<binding destination="-2" name="content" keyPath="machine.sl6" id="0ze-xJ-DNX"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="qjB-2w-AWE" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="1WE-Mm-0O3">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="3Ia-XB-C6D">
<rect key="frame" x="-2" y="191" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Slot 7:" id="32J-6e-nRV">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="qjB-2w-AWE" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="Yvr-uR-Hr5">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="7" translatesAutoresizingMaskIntoConstraints="NO" id="IV2-3M-qfw">
<rect key="frame" x="104" y="185" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="8nb-Bq-4R4" id="nKb-Ar-bCb">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="R2a-Mg-LsY">
<items>
<menuItem title="Item 1" state="on" id="8nb-Bq-4R4"/>
<menuItem title="Item 2" id="rFT-bC-KE9"/>
<menuItem title="Item 3" id="4jB-gp-lYT"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="llh-ab-ayK"/>
<binding destination="-2" name="content" keyPath="machine.sl7" id="hT6-pS-WmL"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="EEX-dh-jwn" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="iRl-IX-FSD">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Avf-lX-f2Q">
<rect key="frame" x="-2" y="160" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Expansion:" id="PEU-OV-910">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="EEX-dh-jwn" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="Ehv-aA-Llc">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="8" translatesAutoresizingMaskIntoConstraints="NO" id="San-wP-1ez">
<rect key="frame" x="104" y="154" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="jtv-Qx-oVD" id="42u-b4-3kx">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="1hM-MS-UEz">
<items>
<menuItem title="Item 1" state="on" id="jtv-Qx-oVD"/>
<menuItem title="Item 2" id="UeB-A1-nyv"/>
<menuItem title="Item 3" id="GyZ-dv-MS4"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="fi5-WL-lQa"/>
<binding destination="-2" name="content" keyPath="machine.exp" id="C88-Gb-QTE"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="OaZ-ZQ-gKK" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="wRB-Wh-7kG">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EMz-7i-H38">
<rect key="frame" x="-2" y="129" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Auxiliary:" id="SoV-Qy-h2g">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="OaZ-ZQ-gKK" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="bx6-Rc-x2V">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="9" translatesAutoresizingMaskIntoConstraints="NO" id="3kq-qn-7YR">
<rect key="frame" x="104" y="123" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="vWX-Cb-ldP" id="NqP-Uq-Knv">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="7Ef-KS-ulj">
<items>
<menuItem title="Item 1" state="on" id="vWX-Cb-ldP"/>
<menuItem title="Item 2" id="Yg1-xZ-vXq"/>
<menuItem title="Item 3" id="BwC-w9-hBy"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="uvt-uD-Adn"/>
<binding destination="-2" name="content" keyPath="machine.aux" id="KA7-7x-qeJ"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="wQi-Oz-7Ye" column="zpB-Rf-dWg" xPlacement="fill" yPlacement="center" id="KoQ-xV-fQu">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JAG-sJ-u2B">
<rect key="frame" x="-2" y="98" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="RS 232:" id="iG2-rY-VDv">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="wQi-Oz-7Ye" column="6Vn-yh-FoQ" xPlacement="fill" yPlacement="center" id="zWk-jd-i0V">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="10" translatesAutoresizingMaskIntoConstraints="NO" id="6ln-U2-0Pi">
<rect key="frame" x="104" y="92" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="uu3-rr-iD8" id="daT-eX-4Vu">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="fMw-mh-Qfi">
<items>
<menuItem title="Item 1" state="on" id="uu3-rr-iD8"/>
<menuItem title="Item 2" id="f1r-MS-itp"/>
<menuItem title="Item 3" id="WhP-Di-CHP"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="gmZ-pW-35n"/>
<binding destination="-2" name="content" keyPath="machine.rs232" id="LxA-8b-jb4"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="gr2-eY-995" column="zpB-Rf-dWg" id="xIE-bJ-mzr">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Svb-pu-WPf">
<rect key="frame" x="-2" y="67" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Game I/O:" id="2Gc-mV-zCZ">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="gr2-eY-995" column="6Vn-yh-FoQ" id="nhy-Gp-GLL">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="11" translatesAutoresizingMaskIntoConstraints="NO" id="K8G-bZ-6mZ">
<rect key="frame" x="104" y="61" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="GOm-Tf-6qc" id="Mig-Nu-gZB">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="faU-zS-LgN">
<items>
<menuItem title="Item 1" state="on" id="GOm-Tf-6qc"/>
<menuItem title="Item 2" id="XgG-U0-2G7"/>
<menuItem title="Item 3" id="4Ea-aE-sB1"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="o53-71-xuf"/>
<binding destination="-2" name="content" keyPath="machine.gameio" id="tJw-AS-RUz"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="1xN-lm-s4l" column="zpB-Rf-dWg" id="vPV-KN-NNp">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="31K-iE-RCe">
<rect key="frame" x="-2" y="36" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Printer:" id="QZI-H7-i8m">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="1xN-lm-s4l" column="6Vn-yh-FoQ" id="KRc-Z8-drK">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="12" translatesAutoresizingMaskIntoConstraints="NO" id="sTp-en-8Wd">
<rect key="frame" x="104" y="30" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="TU9-ed-ofw" id="1OL-aw-xNL">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="MSP-Iu-ix3">
<items>
<menuItem title="Item 1" state="on" id="TU9-ed-ofw"/>
<menuItem title="Item 2" id="7wI-Tn-rE0"/>
<menuItem title="Item 3" id="bQc-pc-ccM"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="Fxc-YB-SF9"/>
<binding destination="-2" name="content" keyPath="machine.printer" id="3l1-Hn-v47"/>
</connections>
</popUpButton>
</gridCell>
<gridCell row="M2s-qn-SIT" column="zpB-Rf-dWg" id="8R2-aA-mLq">
<textField key="contentView" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MH0-Nk-5Py">
<rect key="frame" x="-2" y="5" width="104" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Modem:" id="HQq-VN-Ju9">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</gridCell>
<gridCell row="M2s-qn-SIT" column="6Vn-yh-FoQ" id="idI-pW-e7v">
<popUpButton key="contentView" verticalHuggingPriority="750" tag="13" translatesAutoresizingMaskIntoConstraints="NO" id="KHf-kC-BpZ">
<rect key="frame" x="104" y="-1" width="205" height="25"/>
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="CxO-3g-va1" id="jDr-6p-C7y">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="lxi-Z0-ya6">
<items>
<menuItem title="Item 1" state="on" id="CxO-3g-va1"/>
<menuItem title="Item 2" id="OpR-vy-iL5"/>
<menuItem title="Item 3" id="xvH-9B-ge5"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="menuChanged:" target="-2" id="pHW-GG-2VQ"/>
<binding destination="-2" name="content" keyPath="machine.modem" id="hFa-pj-NnN"/>
</connections>
</popUpButton>
</gridCell>
</gridCells>
<point key="canvasLocation" x="268" y="71"/>
</gridView>
<userDefaultsController representsSharedInstance="YES" id="ZGN-Cx-9po"/>
</objects>
</document>

View File

@ -1,50 +0,0 @@
//
// SlotViewController.h
// Ample
//
// Created by Kelvin Sherlock on 8/18/2020.
// Copyright © 2020 Kelvin Sherlock. All rights reserved.
//
#import <Cocoa/Cocoa.h>
NS_ASSUME_NONNULL_BEGIN
@interface SlotViewController : NSViewController
@property (nonatomic) NSString *model;
@property (nonatomic) NSDictionary *machine;
@property NSString *memory;
@property NSUInteger memoryBytes;
@property NSString *sl0;
@property NSString *sl1;
@property NSString *sl2;
@property NSString *sl3;
@property NSString *sl4;
@property NSString *sl5;
@property NSString *sl6;
@property NSString *sl7;
@property NSString *rs232;
@property NSString *aux;
@property NSString *exp;
@property NSString *gameio;
@property NSString *printer;
@property NSString *modem;
@property NSSize resolution;
@property NSArray *args;
@property NSDictionary *media;
//-(void)setMachine: (NSDictionary *)machine;
- (IBAction)menuChanged:(id)sender;
- (IBAction)memoryMenuChanged:(id)sender;
-(IBAction)resetSlots: (id)sender;
@end
NS_ASSUME_NONNULL_END

View File

@ -1,539 +0,0 @@
//
// SlotViewController.m
// Ample
//
// Created by Kelvin Sherlock on 8/18/2020.
// Copyright © 2020 Kelvin Sherlock. All rights reserved.
//
#import "SlotViewController.h"
const unsigned kMemoryMask = 1 << 16;
@interface SlotViewController () {
unsigned _slots_explicit;
unsigned _slots_valid;
unsigned _slots_default;
NSDictionary *_slot_object[14];
NSDictionary *_slot_media[14];
NSDictionary *_machine_media;
}
@property (weak) IBOutlet NSPopUpButton *ram_menu;
@property (weak) IBOutlet NSPopUpButton *sl0_menu;
@property (weak) IBOutlet NSPopUpButton *sl1_menu;
@property (weak) IBOutlet NSPopUpButton *sl2_menu;
@property (weak) IBOutlet NSPopUpButton *sl3_menu;
@property (weak) IBOutlet NSPopUpButton *sl4_menu;
@property (weak) IBOutlet NSPopUpButton *sl5_menu;
@property (weak) IBOutlet NSPopUpButton *sl6_menu;
@property (weak) IBOutlet NSPopUpButton *sl7_menu;
@property (weak) IBOutlet NSPopUpButton *exp_menu;
@property (weak) IBOutlet NSPopUpButton *aux_menu;
@property (weak) IBOutlet NSPopUpButton *rs232_menu;
@property (weak) IBOutlet NSPopUpButton *game_menu;
@property (weak) IBOutlet NSPopUpButton *printer_menu;
@property (weak) IBOutlet NSPopUpButton *modem_menu;
@end
@implementation SlotViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do view setup here.
//[self setModel: @"apple2gs"];
}
-(void)reset {
}
-(void)setModel:(NSString *)model {
if (model == _model) return;
if ([model isEqualToString: _model]) return;
_model = model;
[self loadMachine: model];
}
-(void)resetMachine {
[self setMachine: @{}];
#if 0
[self setSl0: @""];
[self setSl1: @""];
[self setSl2: @""];
[self setSl3: @""];
[self setSl4: @""];
[self setSl5: @""];
[self setSl6: @""];
[self setSl7: @""];
[self setRs232: @""];
[self setAux: @""];
[self setExp: @""];
[self setGameio: @""];
[self setPrinter: @""];
[self setModem: @""];
[self setMemory: @""];
[self setMemoryBytes: 0];
#endif
[self setResolution: NSMakeSize(0, 0)];
_slots_default = 0;
//_slots_explicit = 0;
_slots_valid = 0;
_machine_media = nil;
[self setArgs: @[]];
[self setMedia: @{}];
#if 0
// retain for later?
for (unsigned i = 0; i < 14; ++i) {
_slot_media[i] = nil;
_slot_object[i] = nil;
}
#endif
}
static NSFont *ItalicMenuFont(void) {
NSFont *font = [NSFont menuFontOfSize: 0];
NSFontDescriptor *fd = [font fontDescriptor];
NSFontDescriptor *fd2 = [fd fontDescriptorWithSymbolicTraits: NSFontDescriptorTraitItalic];
return [NSFont fontWithDescriptor: fd2 size: [font pointSize]];
}
// entry 0 is None/Empty for slots, but populated for RAM.
static int SetDefaultMenu(NSArray *items, NSPopUpButton *button) {
static NSDictionary *attr = nil;
if (!attr) {
attr = @{
NSFontAttributeName: ItalicMenuFont()
};
}
unsigned ix = 0;
for (NSDictionary *d in items) {
BOOL def = [(NSNumber *)[d objectForKey: @"default"] boolValue];
if (!def) {
++ix;
continue;
}
NSMenuItem *item = [button itemAtIndex: ix];
NSString *title = [d objectForKey: @"description"];
NSAttributedString *t = [[NSAttributedString alloc] initWithString: title attributes: attr];
[item setAttributedTitle: t];
return ix;
}
return 0;
}
static void DeactivateMenus(NSArray *items, NSPopUpButton *button) {
[button setAutoenablesItems: NO];
unsigned ix = 0;
for (NSDictionary *d in items) {
BOOL value = [(NSNumber *)[d objectForKey: @"disabled"] boolValue];
if (value) {
NSMenuItem *item = [button itemAtIndex: ix];
[item setEnabled: NO];
}
++ix;
}
}
-(void)syncMemory {
int ix = 0;
NSArray *items = [_machine objectForKey: @"ram"];
unsigned default_index = SetDefaultMenu(items, _ram_menu);
_slots_valid |= kMemoryMask;
_slots_default &= ~kMemoryMask;
if (default_index) _slots_default |= kMemoryMask;
if (_slots_explicit & kMemoryMask) {
// if ram was explicitly set, try to keep it.
for (NSDictionary *d in items) {
unsigned size = [(NSNumber *)[d objectForKey: @"intValue"] unsignedIntValue];
if (size == _memoryBytes) {
[_ram_menu selectItemAtIndex: ix];
[self setMemory: [d objectForKey: @"value"]];
return;
}
++ix;
}
}
_slots_explicit &= ~kMemoryMask;
if (default_index) {
NSDictionary *d = [items objectAtIndex: default_index];
[_ram_menu selectItemAtIndex: default_index];
[self setMemory: [d objectForKey: @"value"]];
[self setMemoryBytes: [(NSNumber *)[d objectForKey: @"intValue"] unsignedIntValue]];
} else {
[self setMemoryBytes: 0];
[self setMemory: @""];
[_ram_menu selectItemAtIndex: 0];
}
}
-(void)resetMemory {
NSArray *items = [_machine objectForKey: @"ram"];
if (![items count]) return;
unsigned ix = 0;
for (NSDictionary *d in items) {
BOOL def = [(NSNumber *)[d objectForKey: @"default"] boolValue];
if (!def) {
++ix;
continue;
}
// ram should always have a default.
[_ram_menu selectItemAtIndex: ix];
[self setMemory: [d objectForKey: @"description"]];
_slots_default |= kMemoryMask;
return;
}
// just in case
[_ram_menu selectItemAtIndex: 0];
}
-(void)syncSlot: (NSString *)slot button: (NSPopUpButton *)button index: (unsigned)index {
NSString *value = [self valueForKey: slot];
NSArray *items = [_machine objectForKey: slot];
unsigned mask = 1 << index;
_slots_default &= ~mask;
_slots_valid &= ~mask;
if (![items count]) {
//[self setValue: @"" forKey: slot]; // retain for later.
//_slots_explicit &= ~mask;
return;
}
_slots_valid |= mask;
DeactivateMenus(items, button);
unsigned default_index = SetDefaultMenu(items, button);
if (default_index) _slots_default |= mask;
if (_slots_explicit & mask) {
int ix = 0;
for (NSDictionary *d in items) {
if ([value isEqualToString: [d objectForKey: @"value"]]) {
[button selectItemAtIndex: ix];
_slot_object[index] = d;
_slot_media[index] = [d objectForKey: @"media"];
return;
}
++ix;
}
}
_slots_explicit &= ~mask;
if (default_index) {
NSDictionary *d = [items objectAtIndex: default_index];
[button selectItemAtIndex: default_index];
[self setValue: [d objectForKey: @"value"] forKey: slot];
_slot_object[index] = d;
_slot_media[index] = [d objectForKey: @"media"];
} else {
[button selectItemAtIndex: 0];
[self setValue: @"" forKey: slot];
_slot_object[index] = nil;
_slot_media[index] = nil;
}
}
-(void)resetSlot: (NSString *)slot button: (NSPopUpButton *)button index: (unsigned)index {
NSArray *items = [_machine objectForKey: slot];
if (![items count]) return;
unsigned ix = 0;
for (NSDictionary *d in items) {
BOOL def = [(NSNumber *)[d objectForKey: @"default"] boolValue];
if (!def) {
++ix;
continue;
}
[button selectItemAtIndex: ix];
[self setValue: [d objectForKey: @"value"] forKey: slot];
_slot_object[index] = d;
_slot_media[index] = [d objectForKey: @"media"];
_slots_default |= (1 << index);
return;
}
// just in case
NSDictionary *d = [items firstObject];
[button selectItemAtIndex: 0];
[self setValue: [d objectForKey: @"value"] forKey: slot];
_slot_object[index] = d;
_slot_media[index] = [d objectForKey: @"media"];
}
-(void)syncSlots {
[self syncMemory];
[self syncSlot: @"sl0" button: _sl0_menu index: 0];
[self syncSlot: @"sl1" button: _sl1_menu index: 1];
[self syncSlot: @"sl2" button: _sl2_menu index: 2];
[self syncSlot: @"sl3" button: _sl3_menu index: 3];
[self syncSlot: @"sl4" button: _sl4_menu index: 4];
[self syncSlot: @"sl5" button: _sl5_menu index: 5];
[self syncSlot: @"sl6" button: _sl6_menu index: 6];
[self syncSlot: @"sl7" button: _sl7_menu index: 7];
[self syncSlot: @"exp" button: _exp_menu index: 8];
[self syncSlot: @"aux" button: _aux_menu index: 9];
[self syncSlot: @"rs232" button: _rs232_menu index: 10];
[self syncSlot: @"gameio" button: _game_menu index: 11];
[self syncSlot: @"printer" button: _printer_menu index: 12];
[self syncSlot: @"modem" button: _modem_menu index: 13];
}
-(void)loadMachine: (NSString *)model {
if (!model) {
[self resetMachine];
return;
}
NSBundle *bundle = [NSBundle mainBundle];
NSURL *url= [bundle URLForResource: model withExtension: @"plist"];
NSDictionary *d = [NSDictionary dictionaryWithContentsOfURL: url];
if (!d) {
[self resetMachine];
return;
}
NSArray *r = [d objectForKey: @"resolution"];
NSSize res = NSMakeSize(0, 0);
if (r) {
res.width = [(NSNumber *)[r objectAtIndex: 0 /*@"width"*/] doubleValue];
res.height = [(NSNumber *)[r objectAtIndex: 1 /*@"height"*/] doubleValue];
}
[self setResolution: res];
_machine_media = [d objectForKey: @"media"];
// n.b. - does content binding propogate immediately?
[self setMachine: d];
[self syncSlots];
[self rebuildArgs];
[self rebuildMedia];
}
static NSString *SlotNames[] = {
@"sl0", @"sl1", @"sl2", @"sl3",
@"sl4", @"sl5", @"sl6", @"sl7",
@"exp", @"aux", @"rs232",
@"gameio", @"printer", @"modem",
};
unsigned SlotCount = 14;
- (IBAction)menuChanged:(NSPopUpButton *)sender {
NSInteger tag = [sender tag];
// NSInteger ix = [sender indexOfSelectedItem];
NSString *key = SlotNames[tag];
_slots_explicit |= (1 << tag);
NSDictionary *o = [[sender selectedItem] representedObject];
[self setValue: [o objectForKey: @"value"] forKey: key];
_slot_object[tag] = o;
NSDictionary *newMedia = [o objectForKey: @"media"];
NSDictionary *oldMedia = _slot_media[tag];
if (newMedia != oldMedia) {
_slot_media[tag] = newMedia;
[self rebuildMedia];
}
[self rebuildArgs];
}
- (IBAction)memoryMenuChanged:(NSPopUpButton *)sender {
//
NSDictionary *o = [[sender selectedItem] representedObject];
NSString *title = [o objectForKey: @"description"];
[self setMemory: title];
[self setMemoryBytes: [(NSNumber *)[o objectForKey: @"value"] unsignedIntValue]];
_slots_explicit |= kMemoryMask;
// if pull-down menu
if ([sender pullsDown])
[sender setTitle: title];
[self rebuildArgs];
}
-(IBAction)resetSlots:(id)sender {
/* reset slots to default */
_slots_explicit = 0;
_slots_default = 0;
for (unsigned i = 0 ; i < SlotCount; ++i) {
[self setValue: @"" forKey: SlotNames[i]];
_slot_media[i] = nil;
_slot_object[i] = nil;
}
_memory = @"";
_memoryBytes = 0;
[self resetMemory];
[self resetSlot: @"sl0" button: _sl0_menu index: 0];
[self resetSlot: @"sl1" button: _sl1_menu index: 1];
[self resetSlot: @"sl2" button: _sl2_menu index: 2];
[self resetSlot: @"sl3" button: _sl3_menu index: 3];
[self resetSlot: @"sl4" button: _sl4_menu index: 4];
[self resetSlot: @"sl5" button: _sl5_menu index: 5];
[self resetSlot: @"sl6" button: _sl6_menu index: 6];
[self resetSlot: @"sl7" button: _sl7_menu index: 7];
[self resetSlot: @"exp" button: _exp_menu index: 8];
[self resetSlot: @"aux" button: _aux_menu index: 9];
[self resetSlot: @"rs232" button: _rs232_menu index: 10];
[self resetSlot: @"gameio" button: _game_menu index: 11];
[self resetSlot: @"printer" button: _printer_menu index: 12];
[self resetSlot: @"modem" button: _modem_menu index: 13];
[self rebuildArgs];
[self rebuildMedia];
}
static BOOL should_add_arg(unsigned slot, unsigned valid_slots, unsigned explicit_slots, unsigned default_slots, NSString *value) {
unsigned mask = 1 << slot;
if (~valid_slots & mask) return NO;
if (default_slots & mask) {
if (explicit_slots & mask)
return YES;
return NO;
}
return [value length];
}
-(void)rebuildArgs {
NSMutableArray *args = [NSMutableArray new];
/* if there IS a default card for the slot and nothing is selected, need to -sl0 "" it. */
#define _(ix, a, b) \
if (should_add_arg(ix, _slots_valid, _slots_explicit, _slots_default, a)) { \
[args addObject: b]; [args addObject: a]; \
} \
_(16, _memory, @"-ramsize")
_(0, _sl0, @"-sl0")
_(1, _sl1, @"-sl1")
_(2, _sl2, @"-sl2")
_(3, _sl3, @"-sl3")
_(4, _sl4, @"-sl4")
_(5, _sl5, @"-sl5")
_(6, _sl6, @"-sl6")
_(7, _sl7, @"-sl7")
_(8, _exp, @"-exp")
_(9, _aux, @"-aux")
_(10, _rs232, @"-rs232")
_(11, _gameio, @"-gameio")
_(12, _printer, @"-printer")
_(13, _modem, @"-modem")
#undef _
[self setArgs: args];
}
-(void)rebuildMedia {
#define _(var, o) var += [[o objectForKey: @ # var ] unsignedIntValue]
unsigned cass = 0;
unsigned cdrm = 0;
unsigned hard = 0;
unsigned flop_5_25 = 0;
unsigned flop_3_5 = 0;
unsigned mask = 1;
for (unsigned i = 0; i < 14; ++i, mask <<= 1) {
if (_slots_valid & mask) {
NSDictionary *tmp = _slot_media[i];
if (tmp) {
_(cass, tmp);
_(cdrm, tmp);
_(hard, tmp);
_(flop_5_25, tmp);
_(flop_3_5, tmp);
}
}
}
NSDictionary *tmp = _machine_media;
if (tmp) {
_(cass, tmp);
_(cdrm, tmp);
_(hard, tmp);
_(flop_5_25, tmp);
_(flop_3_5, tmp);
}
[self setMedia: @{
@"cass": @(cass),
@"cdrm": @(cdrm),
@"hard": @(hard),
@"flop_5_25": @(flop_5_25),
@"flop_3_5": @(flop_3_5),
}];
}
@end