More buttons on toolbar

This commit is contained in:
tudnai 2020-07-01 23:08:33 -07:00
parent 8318b362fb
commit b31c138604
11 changed files with 179 additions and 50 deletions

View File

@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
32089E4924556DBD0036E667 /* PRNumber3.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 32089E4724556DBD0036E667 /* PRNumber3.ttf */; };
320B3FC424AD88B0005EA133 /* power.png in Resources */ = {isa = PBXBuildFile; fileRef = 320B3FC324AD88B0005EA133 /* power.png */; };
3213936624079C30007F5C4A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32BFFB6022EACC660003B53F /* Main.storyboard */; };
323D042E248980600086A901 /* Preferences.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 323D042D248980600086A901 /* Preferences.storyboard */; };
323D043024898AB70086A901 /* PreferencesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 323D042F24898AB70086A901 /* PreferencesViewController.swift */; };
@ -18,6 +19,7 @@
323E2DD1245531E600156805 /* Apple2e.rom in Resources */ = {isa = PBXBuildFile; fileRef = 323E2DCD245531E500156805 /* Apple2e.rom */; };
32440B85247E27D7000F9DA1 /* 6502.c in Sources */ = {isa = PBXBuildFile; fileRef = 32439F7422ECD8AD0077AAE0 /* 6502.c */; };
32440BA32480D5C0000F9DA1 /* LoRes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32440BA22480D5C0000F9DA1 /* LoRes.swift */; };
324D15D324ADAC71008AAFB0 /* floppy.png in Resources */ = {isa = PBXBuildFile; fileRef = 324D15D224ADAC71008AAFB0 /* floppy.png */; };
325DC40E24AC5ABC00EB8858 /* doc.on.doc.png in Copy Image Files */ = {isa = PBXBuildFile; fileRef = 325DC40D24AC5ABC00EB8858 /* doc.on.doc.png */; };
325DC41024AC691B00EB8858 /* rgb_color.png in Copy Image Files */ = {isa = PBXBuildFile; fileRef = 325DC40F24AC691B00EB8858 /* rgb_color.png */; };
325DC41324AC692D00EB8858 /* rgb_mono.png in Copy Image Files */ = {isa = PBXBuildFile; fileRef = 325DC41124AC692D00EB8858 /* rgb_mono.png */; };
@ -54,6 +56,9 @@
325EB6A82401118300C6B4A4 /* ProDOS_402_System.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB6992401118200C6B4A4 /* ProDOS_402_System.woz */; };
325EB6AA2401118300C6B4A4 /* Sneakers.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB69A2401118300C6B4A4 /* Sneakers.woz */; };
325EB6AC2401118300C6B4A4 /* Xonix.woz in Resources */ = {isa = PBXBuildFile; fileRef = 325EB69B2401118300C6B4A4 /* Xonix.woz */; };
326B56E524AD8E89009BA0AC /* gobackward.png in Resources */ = {isa = PBXBuildFile; fileRef = 326B56E424AD8E89009BA0AC /* gobackward.png */; };
326B56E724AD906D009BA0AC /* doc.text.viewfinder.png in Resources */ = {isa = PBXBuildFile; fileRef = 326B56E624AD906D009BA0AC /* doc.text.viewfinder.png */; };
32877F8D24ADA6AF003A940D /* joystick.png in Resources */ = {isa = PBXBuildFile; fileRef = 32877F8C24ADA6AF003A940D /* joystick.png */; };
3296223224A6622C002DEB78 /* apple_original_logo_design.png in Resources */ = {isa = PBXBuildFile; fileRef = 3296223124A6622C002DEB78 /* apple_original_logo_design.png */; };
3296223424A709CE002DEB78 /* disk_ii_motor_w_floppy.sfx in Resources */ = {isa = PBXBuildFile; fileRef = 3296223324A709CE002DEB78 /* disk_ii_motor_w_floppy.sfx */; };
3296223524A709CE002DEB78 /* disk_ii_motor_w_floppy.sfx in Resources */ = {isa = PBXBuildFile; fileRef = 3296223324A709CE002DEB78 /* disk_ii_motor_w_floppy.sfx */; };
@ -63,6 +68,7 @@
3296223A24A710E5002DEB78 /* disk_ii_io_error.sfx in Copy SFX Files */ = {isa = PBXBuildFile; fileRef = 3296223724A710CD002DEB78 /* disk_ii_io_error.sfx */; };
32A9F74A2467B60B004902A1 /* speaker.c in Sources */ = {isa = PBXBuildFile; fileRef = 32A9F7492467B60B004902A1 /* speaker.c */; };
32A9F74B2467B60B004902A1 /* speaker.c in Sources */ = {isa = PBXBuildFile; fileRef = 32A9F7492467B60B004902A1 /* speaker.c */; };
32AF7C9724AD85E8002D82BF /* select_all.png in Copy Image Files */ = {isa = PBXBuildFile; fileRef = 32AF7C9624AD85E8002D82BF /* select_all.png */; };
32BFFB5B22EACC630003B53F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32BFFB5A22EACC630003B53F /* AppDelegate.swift */; };
32BFFB5D22EACC630003B53F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32BFFB5C22EACC630003B53F /* ViewController.swift */; };
32BFFB5F22EACC660003B53F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32BFFB5E22EACC660003B53F /* Assets.xcassets */; };
@ -262,6 +268,7 @@
dstPath = "";
dstSubfolderSpec = 7;
files = (
32AF7C9724AD85E8002D82BF /* select_all.png in Copy Image Files */,
325DC41024AC691B00EB8858 /* rgb_color.png in Copy Image Files */,
325DC41324AC692D00EB8858 /* rgb_mono.png in Copy Image Files */,
325DC41424AC692D00EB8858 /* mono.png in Copy Image Files */,
@ -278,6 +285,7 @@
/* Begin PBXFileReference section */
32089E4724556DBD0036E667 /* PRNumber3.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = PRNumber3.ttf; sourceTree = "<group>"; };
320B3FC324AD88B0005EA133 /* power.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = power.png; sourceTree = "<group>"; };
323D042D248980600086A901 /* Preferences.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Preferences.storyboard; sourceTree = "<group>"; };
323D042F24898AB70086A901 /* PreferencesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesViewController.swift; sourceTree = "<group>"; };
323D04312489BFD80086A901 /* PreferencesWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesWindowController.swift; sourceTree = "<group>"; };
@ -335,6 +343,7 @@
32440B9C247F9DC7000F9DA1 /* blank.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = blank.woz; sourceTree = "<group>"; };
32440BA0247F9F99000F9DA1 /* LOCKSMITH_V7_REV_B.woz */ = {isa = PBXFileReference; lastKnownFileType = file; path = LOCKSMITH_V7_REV_B.woz; sourceTree = "<group>"; };
32440BA22480D5C0000F9DA1 /* LoRes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoRes.swift; sourceTree = "<group>"; };
324D15D224ADAC71008AAFB0 /* floppy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = floppy.png; sourceTree = "<group>"; };
325DC40D24AC5ABC00EB8858 /* doc.on.doc.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = doc.on.doc.png; sourceTree = "<group>"; };
325DC40F24AC691B00EB8858 /* rgb_color.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rgb_color.png; sourceTree = "<group>"; };
325DC41124AC692D00EB8858 /* rgb_mono.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rgb_mono.png; sourceTree = "<group>"; };
@ -377,12 +386,16 @@
3264261023284F6F008B615F /* Apple2_mmio_8bit_ioaddr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Apple2_mmio_8bit_ioaddr.h; sourceTree = "<group>"; };
326426112328ADF4008B615F /* Apple_II_ROM.s */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.asm; path = Apple_II_ROM.s; sourceTree = "<group>"; };
3268E68E2474E24900047474 /* paddle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = paddle.h; sourceTree = "<group>"; };
326B56E424AD8E89009BA0AC /* gobackward.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gobackward.png; sourceTree = "<group>"; };
326B56E624AD906D009BA0AC /* doc.text.viewfinder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = doc.text.viewfinder.png; sourceTree = "<group>"; };
326ED2EE232D7A0000A41337 /* 6502_functional_test.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = 6502_functional_test.bin; sourceTree = SOURCE_ROOT; };
32877F8C24ADA6AF003A940D /* joystick.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = joystick.png; sourceTree = "<group>"; };
3296223124A6622C002DEB78 /* apple_original_logo_design.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = apple_original_logo_design.png; sourceTree = "<group>"; };
3296223324A709CE002DEB78 /* disk_ii_motor_w_floppy.sfx */ = {isa = PBXFileReference; lastKnownFileType = file; path = disk_ii_motor_w_floppy.sfx; sourceTree = "<group>"; };
3296223724A710CD002DEB78 /* disk_ii_io_error.sfx */ = {isa = PBXFileReference; lastKnownFileType = file; path = disk_ii_io_error.sfx; sourceTree = "<group>"; };
32A9F7482467B60B004902A1 /* speaker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = speaker.h; sourceTree = "<group>"; };
32A9F7492467B60B004902A1 /* speaker.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = speaker.c; sourceTree = "<group>"; };
32AF7C9624AD85E8002D82BF /* select_all.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = select_all.png; sourceTree = "<group>"; };
32B18435233F10BC00DBB4AB /* Shaders.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = Shaders.metal; sourceTree = "<group>"; };
32B18438233FAB3900DBB4AB /* verticies.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = verticies.swift; sourceTree = "<group>"; };
32BFFB5722EACC630003B53F /* Steve ][.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Steve ][.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@ -792,13 +805,19 @@
32F8A8B124A3AE1600EE6735 /* img */ = {
isa = PBXGroup;
children = (
324D15D224ADAC71008AAFB0 /* floppy.png */,
32877F8C24ADA6AF003A940D /* joystick.png */,
3296223124A6622C002DEB78 /* apple_original_logo_design.png */,
32E21BE62491BF8B006C0C72 /* apple-rainbow.png */,
323D04432490B3930086A901 /* dotmatrix_effect.png */,
323D04452490BA1E0086A901 /* scanlines.png */,
325DC40D24AC5ABC00EB8858 /* doc.on.doc.png */,
32E3127224AC0AC400E61891 /* doc.on.clipboard.png */,
326B56E624AD906D009BA0AC /* doc.text.viewfinder.png */,
32AF7C9624AD85E8002D82BF /* select_all.png */,
320B3FC324AD88B0005EA133 /* power.png */,
325DC41224AC692D00EB8858 /* mono.png */,
326B56E424AD8E89009BA0AC /* gobackward.png */,
325DC41124AC692D00EB8858 /* rgb_mono.png */,
325DC40F24AC691B00EB8858 /* rgb_color.png */,
);
@ -1065,10 +1084,15 @@
buildActionMask = 2147483647;
files = (
3296223424A709CE002DEB78 /* disk_ii_motor_w_floppy.sfx in Resources */,
320B3FC424AD88B0005EA133 /* power.png in Resources */,
32877F8D24ADA6AF003A940D /* joystick.png in Resources */,
3296223224A6622C002DEB78 /* apple_original_logo_design.png in Resources */,
3213936624079C30007F5C4A /* Main.storyboard in Resources */,
326B56E724AD906D009BA0AC /* doc.text.viewfinder.png in Resources */,
32BFFB5F22EACC660003B53F /* Assets.xcassets in Resources */,
324D15D324ADAC71008AAFB0 /* floppy.png in Resources */,
323D042E248980600086A901 /* Preferences.storyboard in Resources */,
326B56E524AD8E89009BA0AC /* gobackward.png in Resources */,
32E3126524A7193700E61891 /* disk_ii_arm.sfx in Resources */,
3296223824A710CD002DEB78 /* disk_ii_io_error.sfx in Resources */,
);

View File

@ -1242,14 +1242,14 @@
<size key="minSize" width="32" height="32"/>
<size key="maxSize" width="32" height="32"/>
</toolbarItem>
<toolbarItem implicitItemIdentifier="013D1397-F48F-4180-8F09-FABF3D77AC5A" label="On" paletteLabel="Power On" image="NSTouchBarPlayTemplate" id="8WB-26-vb5">
<toolbarItem implicitItemIdentifier="013D1397-F48F-4180-8F09-FABF3D77AC5A" label="Power" paletteLabel="Power" image="power" id="8WB-26-vb5">
<nil key="toolTip"/>
<size key="minSize" width="30" height="17"/>
<size key="maxSize" width="30" height="43"/>
<button key="view" verticalHuggingPriority="750" id="xQN-Wy-Jjk">
<rect key="frame" x="14" y="14" width="30" height="30"/>
<rect key="frame" x="5" y="14" width="30" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSTouchBarPlayTemplate" imagePosition="only" alignment="center" inset="2" id="l58-sD-xDQ">
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="power" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="l58-sD-xDQ">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
@ -1270,9 +1270,6 @@
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<connections>
<action selector="PowerOff:" target="B8D-0N-5wS" id="5jH-F0-9QE"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="34201AE0-6358-4CC1-A7D5-BEB45E6353C8" label="Pause" paletteLabel="Pause" image="NSTouchBarPauseTemplate" id="QIP-vh-jcn">
<nil key="toolTip"/>
@ -1290,20 +1287,20 @@
<action selector="Pause:" target="B8D-0N-5wS" id="8y5-LX-pph"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="830F10A7-5FE0-4325-BD47-E08A434B58C1" label="Reset" paletteLabel="Reset" image="NSRefreshTemplate" id="fbL-wV-HQ9">
<toolbarItem implicitItemIdentifier="830F10A7-5FE0-4325-BD47-E08A434B58C1" label="Reset" paletteLabel="Reset" image="gobackward" id="fbL-wV-HQ9">
<nil key="toolTip"/>
<size key="minSize" width="30" height="17"/>
<size key="maxSize" width="30" height="43"/>
<button key="view" verticalHuggingPriority="750" id="FgD-BQ-Q0R">
<rect key="frame" x="4" y="14" width="30" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSRefreshTemplate" imagePosition="only" alignment="center" inset="2" id="5Hk-Wa-8bM">
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="gobackward" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="5Hk-Wa-8bM">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<connections>
<action selector="Pause:" target="B8D-0N-5wS" id="37H-RF-Jxo"/>
<action selector="Reset:" target="B8D-0N-5wS" id="xJE-Ri-R9Q"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="D00D9DE2-E274-4915-87A5-C94FEDDB6C22" label="Copy" paletteLabel="Copy" image="doc.on.doc" id="fQR-kz-ht6">
@ -1322,6 +1319,22 @@
<action selector="Copy:" target="B8D-0N-5wS" id="yGp-P6-Yeu"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="9B3244CB-1CE2-4293-9E8C-B9BFD5DD84C4" label="Sel.All" paletteLabel="Sel.All" image="doc.text.viewfinder" id="lzK-Zd-n0z">
<nil key="toolTip"/>
<size key="minSize" width="30" height="17"/>
<size key="maxSize" width="30" height="43"/>
<button key="view" verticalHuggingPriority="750" id="Zh1-J3-sp2">
<rect key="frame" x="5" y="14" width="30" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="doc.text.viewfinder" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="GI9-hQ-1du">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<connections>
<action selector="Copy:" target="B8D-0N-5wS" id="Zqh-qn-MZ3"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="03044CE5-C6C1-4EDF-B0C7-D6F04AE9C7A0" label="Paste" paletteLabel="Paste" image="doc.on.clipboard" id="LFh-iX-9gH">
<nil key="toolTip"/>
<size key="minSize" width="30" height="17"/>
@ -1354,23 +1367,23 @@
<action selector="Mono:" target="B8D-0N-5wS" id="Jus-64-XLY"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="0228EA55-4F19-4473-A924-6F4C7A50EB97" label="+" paletteLabel="Vol Up" image="NSTouchBarAudioOutputVolumeMediumTemplate" id="AMa-TQ-7Ol">
<toolbarItem implicitItemIdentifier="846BFFC1-D37B-43D0-9C23-F69C84B3AF77" label="Mute" paletteLabel="Mute" image="NSTouchBarAudioOutputMuteTemplate" id="lEI-s6-KQK">
<nil key="toolTip"/>
<size key="minSize" width="30" height="17"/>
<size key="maxSize" width="30" height="43"/>
<button key="view" verticalHuggingPriority="750" id="5X8-Hl-B1g">
<rect key="frame" x="6" y="14" width="30" height="30"/>
<button key="view" verticalHuggingPriority="750" id="tie-lD-NFF">
<rect key="frame" x="2" y="14" width="30" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSTouchBarAudioOutputVolumeMediumTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="jbz-XG-aU0">
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSTouchBarAudioOutputMuteTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="hsl-e7-cw1">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<connections>
<action selector="Mono:" target="B8D-0N-5wS" id="e3C-zZ-U8s"/>
<action selector="Mute:" target="B8D-0N-5wS" id="6CM-Fl-bsP"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="F5BAA7C3-C922-4726-B2A8-8A0DE12714FC" label="" paletteLabel="Vol Dn" image="NSTouchBarAudioOutputVolumeLowTemplate" id="hS6-wo-pAT">
<toolbarItem implicitItemIdentifier="F5BAA7C3-C922-4726-B2A8-8A0DE12714FC" label="" paletteLabel="Vol Dn" image="NSTouchBarAudioOutputVolumeLowTemplate" id="hS6-wo-pAT">
<nil key="toolTip"/>
<size key="minSize" width="30" height="17"/>
<size key="maxSize" width="30" height="43"/>
@ -1383,23 +1396,23 @@
</buttonCell>
</button>
<connections>
<action selector="Mono:" target="B8D-0N-5wS" id="72l-O2-0rn"/>
<action selector="VolDn:" target="B8D-0N-5wS" id="rO1-T5-Mmx"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="846BFFC1-D37B-43D0-9C23-F69C84B3AF77" label="Mute" paletteLabel="Spkr" image="NSTouchBarAudioOutputMuteTemplate" id="lEI-s6-KQK">
<toolbarItem implicitItemIdentifier="0228EA55-4F19-4473-A924-6F4C7A50EB97" label="" paletteLabel="Vol Up" image="NSTouchBarAudioOutputVolumeMediumTemplate" id="AMa-TQ-7Ol">
<nil key="toolTip"/>
<size key="minSize" width="30" height="17"/>
<size key="maxSize" width="30" height="43"/>
<button key="view" verticalHuggingPriority="750" id="tie-lD-NFF">
<rect key="frame" x="1" y="14" width="30" height="30"/>
<button key="view" verticalHuggingPriority="750" id="5X8-Hl-B1g">
<rect key="frame" x="6" y="14" width="30" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSTouchBarAudioOutputMuteTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="hsl-e7-cw1">
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSTouchBarAudioOutputVolumeMediumTemplate" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="jbz-XG-aU0">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<connections>
<action selector="Mono:" target="B8D-0N-5wS" id="O0B-SU-2JP"/>
<action selector="VolUp:" target="B8D-0N-5wS" id="nUl-ez-neH"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="3297641D-868D-45FD-9601-5DC57B05A682" label="Color" paletteLabel="Color" image="rgb_color" id="DkF-LW-SE6">
@ -1418,6 +1431,38 @@
<action selector="Color:" target="B8D-0N-5wS" id="X2S-en-E90"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="78DAE6A2-6302-4570-AE0D-86DF6FC4003E" label="Game" paletteLabel="Game" image="joystick" id="EKv-MY-AYy">
<nil key="toolTip"/>
<size key="minSize" width="30" height="17"/>
<size key="maxSize" width="30" height="43"/>
<button key="view" verticalHuggingPriority="750" id="OIt-J3-sHI">
<rect key="frame" x="4" y="14" width="30" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="joystick" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="Rza-nM-he3">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<connections>
<action selector="Mute:" target="B8D-0N-5wS" id="Ras-Xy-psi"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="29BE2D3C-C4DC-492E-A3B5-2AB291155EAF" label="Quick" paletteLabel="Quick" image="floppy" id="43q-EJ-Tuf">
<nil key="toolTip"/>
<size key="minSize" width="30" height="17"/>
<size key="maxSize" width="30" height="43"/>
<button key="view" verticalHuggingPriority="750" id="jWB-Up-pC8">
<rect key="frame" x="4" y="14" width="30" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="floppy" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="7UB-Md-Mng">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<connections>
<action selector="Mute:" target="B8D-0N-5wS" id="99t-ei-OMs"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="E2753C36-8694-4741-A90C-F2B8BF32E609" label="1.023 MHz" paletteLabel="MHz" id="djd-zw-gXS">
<nil key="toolTip"/>
<size key="minSize" width="100" height="26"/>
@ -1456,12 +1501,14 @@
<defaultToolbarItems>
<toolbarItem reference="8WB-26-vb5"/>
<toolbarItem reference="QIP-vh-jcn"/>
<toolbarItem reference="08w-Rr-BIT"/>
<toolbarItem reference="fbL-wV-HQ9"/>
<toolbarItem reference="JET-xj-qZD"/>
<toolbarItem reference="lzK-Zd-n0z"/>
<toolbarItem reference="fQR-kz-ht6"/>
<toolbarItem reference="LFh-iX-9gH"/>
<toolbarItem reference="JET-xj-qZD"/>
<toolbarItem reference="EKv-MY-AYy"/>
<toolbarItem reference="43q-EJ-Tuf"/>
<toolbarItem reference="BWf-Nj-6Yq"/>
<toolbarItem reference="djd-zw-gXS"/>
<toolbarItem reference="BWf-Nj-6Yq"/>
@ -1639,19 +1686,18 @@
<rect key="frame" x="1160" y="8" width="120" height="784"/>
<subviews>
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VKJ-wY-R2U" userLabel="Quick Settings">
<rect key="frame" x="8" y="741" width="104" height="35"/>
<rect key="frame" x="8" y="730" width="104" height="46"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ab2-by-2SH">
<rect key="frame" x="-2" y="31" width="69" height="4"/>
<rect key="frame" x="-2" y="30" width="69" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" allowsUndo="NO" title="CPU Mode" usesSingleLineMode="YES" id="5OW-0F-8QR">
<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>
<popUpButton verticalHuggingPriority="750" id="TEd-9V-yhI">
<rect key="frame" x="0.0" y="-1" width="100" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TEd-9V-yhI">
<rect key="frame" x="0.0" y="-1" width="104" height="23"/>
<popUpButtonCell key="cell" type="roundTextured" title="Normal" bezelStyle="texturedRounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" selectedItem="72n-9g-iH3" id="x7E-wS-qz1">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
@ -1668,6 +1714,10 @@
</connections>
</popUpButton>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="TEd-9V-yhI" secondAttribute="trailing" id="nB6-1j-uGv"/>
<constraint firstItem="TEd-9V-yhI" firstAttribute="leading" secondItem="VKJ-wY-R2U" secondAttribute="leading" id="zTF-bM-aHH"/>
</constraints>
<visibilityPriorities>
<integer value="1000"/>
<integer value="1000"/>
@ -1955,19 +2005,22 @@
</scenes>
<resources>
<image name="NSAdvanced" width="32" height="32"/>
<image name="NSRefreshTemplate" width="11" height="15"/>
<image name="NSTouchBarAudioOutputMuteTemplate" width="26" height="30"/>
<image name="NSTouchBarAudioOutputVolumeLowTemplate" width="23" height="30"/>
<image name="NSTouchBarAudioOutputVolumeMediumTemplate" width="23" height="30"/>
<image name="NSTouchBarColorPickerFont" width="13" height="30"/>
<image name="NSTouchBarPauseTemplate" width="11" height="30"/>
<image name="NSTouchBarPlayTemplate" width="14" height="30"/>
<image name="NSTouchBarRecordStopTemplate" width="12" height="30"/>
<image name="apple_original_logo_design" width="384" height="307.20001220703125"/>
<image name="doc.on.clipboard" width="102.40000152587891" height="102.40000152587891"/>
<image name="doc.on.doc" width="102.40000152587891" height="102.40000152587891"/>
<image name="doc.text.viewfinder" width="102.40000152587891" height="102.40000152587891"/>
<image name="dotmatrix_effect" width="268.79998779296875" height="184.32000732421875"/>
<image name="floppy" width="64" height="64"/>
<image name="gobackward" width="102.40000152587891" height="102.40000152587891"/>
<image name="joystick" width="64" height="64"/>
<image name="mono" width="102.40000152587891" height="102.40000152587891"/>
<image name="power" width="102.40000152587891" height="102.40000152587891"/>
<image name="rgb_color" width="102.40000152587891" height="102.40000152587891"/>
<image name="scanlines" width="268.79998779296875" height="184.32000732421875"/>
</resources>

View File

@ -13,17 +13,23 @@ import AVFoundation
class ToolBarController: NSWindowController {
@IBAction func PowerOn(_ sender: Any) {
ViewController.current?.PowerOn(sender)
}
@IBAction func PowerOff(_ sender: Any) {
ViewController.current?.PowerOff(sender)
switch cpuState {
case cpuState_inited, cpuState_unknown:
ViewController.current?.PowerOn(sender)
default:
ViewController.current?.PowerOff(sender)
}
}
@IBAction func Pause(_ sender: Any) {
ViewController.current?.Pause(sender)
}
@IBAction func Reset(_ sender: Any) {
ViewController.current?.Reset(sender)
}
@IBAction func Copy(_ sender: Any) {
}
@ -81,4 +87,15 @@ class ToolBarController: NSWindowController {
ViewController.current?.setSimulationMode( mode: sender.selectedItem?.title ?? "Normal" )
}
@IBAction func Mute(_ sender: Any) {
spkr_mute()
}
@IBAction func VolDn(_ sender: Any) {
spkr_vol_dn()
}
@IBAction func VolUp(_ sender: Any) {
spkr_vol_up()
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
Resources/img/floppy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
Resources/img/joystick.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
Resources/img/power.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

View File

@ -53,6 +53,7 @@ ALCdevice *dev = NULL;
ALCcontext *ctx = NULL;
#define SPKR_MIN_VOL 0.0001 // OpenAL cannot change volume to 0.0 for some reason, so we just turn volume really low
int spkr_level = SPKR_LEVEL_ZERO;
@ -68,6 +69,9 @@ ALuint spkr_disk_arm_buf = 0;
ALuint spkr_disk_ioerr_buf = 0;
float spkr_vol = 0.5;
const unsigned spkr_fps = DEFAULT_FPS;
unsigned spkr_fps_divider = 1;
unsigned spkr_frame_cntr = 0;
@ -174,6 +178,13 @@ void spkr_init() {
alGenSources(SOURCES_COUNT, spkr_src);
al_check_error();
alListener3f(AL_POSITION, 0.0, 0.0, 0.0);
al_check_error();
alListenerf(AL_GAIN, spkr_vol);
al_check_error();
// alListener3f(AL_ORIENTATION, 0.0, -16.0, 0.0);
// al_check_error();
alSourcei(spkr_src[SPKR_SRC_GAME_SFX], AL_SOURCE_RELATIVE, AL_TRUE);
al_check_error();
alSourcei(spkr_src[SPKR_SRC_GAME_SFX], AL_LOOPING, AL_FALSE);
@ -182,10 +193,6 @@ void spkr_init() {
al_check_error();
alSource3f(spkr_src[SPKR_SRC_GAME_SFX], AL_POSITION, 0.0, 8.0, 0.0);
al_check_error();
alListener3f(AL_POSITION, 0.0, 0.0, 0.0);
al_check_error();
// alListener3f(AL_ORIENTATION, 0.0, -16.0, 0.0);
// al_check_error();
// Set-up disk motor sound source and play buffer
@ -197,10 +204,6 @@ void spkr_init() {
al_check_error();
alSource3f(spkr_src[SPKR_SRC_DISK_MOTOR_SFX], AL_POSITION, 0.0, 8.0, 0.0);
al_check_error();
alListener3f(AL_POSITION, 0.0, 0.0, 0.0);
al_check_error();
// alListener3f(AL_ORIENTATION, 0.0, -16.0, 0.0);
// al_check_error();
// Set-up disk arm sound source and play buffer
@ -212,10 +215,6 @@ void spkr_init() {
al_check_error();
alSource3f(spkr_src[SPKR_SRC_DISK_ARM_SFX], AL_POSITION, 0.0, 8.0, 0.0);
al_check_error();
alListener3f(AL_POSITION, 0.0, 0.0, 0.0);
al_check_error();
// alListener3f(AL_ORIENTATION, 0.0, -16.0, 0.0);
// al_check_error();
// Set-up disk io error sound source and play buffer
@ -227,10 +226,6 @@ void spkr_init() {
al_check_error();
alSource3f(spkr_src[SPKR_SRC_DISK_IOERR_SFX], AL_POSITION, 0.0, 8.0, 0.0);
al_check_error();
alListener3f(AL_POSITION, 0.0, 0.0, 0.0);
al_check_error();
// alListener3f(AL_ORIENTATION, 0.0, -16.0, 0.0);
// al_check_error();
// start from the beginning
@ -241,6 +236,41 @@ void spkr_init() {
}
void spkr_vol_up() {
spkr_vol += 0.1;
if ( spkr_vol > 1 ) {
spkr_vol = 1;
}
alListenerf(AL_GAIN, spkr_vol);
al_check_error();
}
void spkr_vol_dn() {
spkr_vol -= 0.1;
if ( spkr_vol < 0.1 ) {
// use mute to make it completely silent
spkr_vol = 0.1;
}
alListenerf(AL_GAIN, spkr_vol);
al_check_error();
}
void spkr_mute() {
ALfloat vol = 0;
alGetListenerf(AL_GAIN, &vol);
al_check_error();
if ( vol > SPKR_MIN_VOL ) {
alListenerf(AL_GAIN, SPKR_MIN_VOL);
al_check_error();
}
else {
alListenerf(AL_GAIN, spkr_vol);
al_check_error();
}
}
int spkr_unqueue( ALuint src ) {
ALint processed = 0;

View File

@ -58,6 +58,11 @@ extern int spkr_extra_buf;
extern unsigned spkr_play_timeout;
extern unsigned spkr_play_time;
extern float spkr_vol;
extern void spkr_vol_up(void);
extern void spkr_vol_dn(void);
extern void spkr_mute(void);
extern void spkr_init(void);
extern void spkr_exit(void);