Monitor Resize fixes

Sound sfx increased to 192kHz -- much better sound overall!
This commit is contained in:
tudnai 2021-11-19 09:48:56 -08:00
parent 3df6b93c9c
commit d01fae61de
7 changed files with 140 additions and 125 deletions

View File

@ -22,13 +22,10 @@
</PersistentStrings>
</ContextState>
<ContextState
contextName = "BRA:6502_instr_branch.h">
contextName = "ViewController.extraBuf(_:):ViewController.swift">
<PersistentStrings>
<PersistentString
value = "">
</PersistentString>
<PersistentString
value = "RAM[0x346f]">
value = "soundGapLabel">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -52,6 +49,20 @@
<ContextState
contextName = "CMP:6502_instr_compare_test.h">
</ContextState>
<ContextState
contextName = "HiRes.refreshChanged(blockSize:):HiRes.swift">
<PersistentStrings>
<PersistentString
value = "frame">
</PersistentString>
<PersistentString
value = "bounds">
</PersistentString>
<PersistentString
value = "frame.width / Float(HiRes.blockCols)">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "m6502_ColdReset:6502.c">
<PersistentStrings>
@ -75,7 +86,7 @@
contextName = "closure #1 in ViewController.Update():ViewController.swift">
<PersistentStrings>
<PersistentString
value = "MEMcfg.is_80STORE">
value = "txtArr">
</PersistentString>
<PersistentString
value = "self.shadowTxt">
@ -84,10 +95,10 @@
value = "txt">
</PersistentString>
<PersistentString
value = "MEMcfg.txt_page_2">
value = "MEMcfg.is_80STORE">
</PersistentString>
<PersistentString
value = "txtArr">
value = "MEMcfg.txt_page_2">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -154,20 +165,6 @@
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "HiRes.refreshChanged(blockSize:):HiRes.swift">
<PersistentStrings>
<PersistentString
value = "frame">
</PersistentString>
<PersistentString
value = "bounds">
</PersistentString>
<PersistentString
value = "frame.width / Float(HiRes.blockCols)">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "addr_abs:mmio.h">
<PersistentStrings>
@ -314,10 +311,10 @@
contextName = "spkr_update:speaker.c">
<PersistentStrings>
<PersistentString
value = "(uint8_t)spkr_samples[452]">
value = "clk_6502_per_frm_max">
</PersistentString>
<PersistentString
value = "clk_6502_per_frm_max">
value = "(uint8_t)spkr_samples[452]">
</PersistentString>
<PersistentString
value = "spkr_sample_idx">
@ -326,13 +323,13 @@
value = "(uint8_t)spkr_samples[451]">
</PersistentString>
<PersistentString
value = "clkfrm">
value = "clk_6502_per_frm">
</PersistentString>
<PersistentString
value = "(uint8_t)spkr_samples[455]">
</PersistentString>
<PersistentString
value = "clk_6502_per_frm">
value = "clkfrm">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -340,10 +337,16 @@
contextName = "spkr_playUpd:speaker.c">
</ContextState>
<ContextState
contextName = "fetch:mmio.h">
contextName = "MonitorView.frameDidChange(notification:):MonitorView.swift">
<PersistentStrings>
<PersistentString
value = "memread8_low( m6502.PC)">
value = "frame.size">
</PersistentString>
<PersistentString
value = "textDisplay.bounds">
</PersistentString>
<PersistentString
value = "textDisplay.frame">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -379,16 +382,10 @@
contextName = "set_flags_NZ:common.h">
</ContextState>
<ContextState
contextName = "MonitorView.frameDidChange(notification:):MonitorView.swift">
contextName = "fetch:mmio.h">
<PersistentStrings>
<PersistentString
value = "frame.size">
</PersistentString>
<PersistentString
value = "textDisplay.bounds">
</PersistentString>
<PersistentString
value = "textDisplay.frame">
value = "memread8_low( m6502.PC)">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -402,7 +399,7 @@
value = "pdl_value[pdl]">
</PersistentString>
<PersistentString
value = "normalized_time">
value = "normalized_time &gt;= pdl_value[pdl] ? 255 : 0">
</PersistentString>
<PersistentString
value = "(3300 * 255/3300)">
@ -414,7 +411,7 @@
value = "1 * 512 * (1 - ( 3300 / 3300.0 ))">
</PersistentString>
<PersistentString
value = "normalized_time &gt;= pdl_value[pdl] ? 255 : 0">
value = "normalized_time">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -427,18 +424,18 @@
<PersistentString
value = "y">
</PersistentString>
<PersistentString
value = "hires.frame">
</PersistentString>
<PersistentString
value = "textDisplay.bounds">
</PersistentString>
<PersistentString
value = "view">
value = "hires.frame">
</PersistentString>
<PersistentString
value = "hires.layer">
</PersistentString>
<PersistentString
value = "view">
</PersistentString>
<PersistentString
value = "textDisplay.frame">
</PersistentString>
@ -462,7 +459,7 @@
contextName = "LoRes.Update():LoRes.swift">
<PersistentStrings>
<PersistentString
value = "UInt8( (block &gt;&gt; 4) &amp; 0x0F )">
value = "blockChanged[ screenIdx ]">
</PersistentString>
<PersistentString
value = "UInt8(block)">
@ -471,7 +468,7 @@
value = "UInt8(block &amp; 4)">
</PersistentString>
<PersistentString
value = "blockChanged[ screenIdx ]">
value = "UInt8( (block &gt;&gt; 4) &amp; 0x0F )">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -506,10 +503,10 @@
contextName = "set_flags_NZC:common.h">
<PersistentStrings>
<PersistentString
value = "(unsigned)0xFF">
value = "(unsigned)test ">
</PersistentString>
<PersistentString
value = "(unsigned)test ">
value = "(unsigned)0xFF">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -639,7 +636,7 @@
contextName = "spkr_toggle:speaker.c">
<PersistentStrings>
<PersistentString
value = "( (spkr_clk + m6502.clkfrm) / ( default_MHz_6502 * 1000 * 1000 / spkr_sample_rate)) * 2">
value = "(int)spkr_sample_idx_diff">
</PersistentString>
<PersistentString
value = "(int16_t)28000 + (int16_t)-32768">
@ -653,6 +650,9 @@
<PersistentString
value = "(spkr_clk + m6502.clkfrm)">
</PersistentString>
<PersistentString
value = "( (spkr_clk + m6502.clkfrm) / ( default_MHz_6502 * 1000 * 1000 / spkr_sample_rate)) * 2">
</PersistentString>
<PersistentString
value = "spkr_samples[spkr_sample_last_idx]">
</PersistentString>
@ -662,10 +662,10 @@
contextName = "HiRes.draw(_:):HiRes.swift">
<PersistentStrings>
<PersistentString
value = "ctx?.height">
value = "linAddr">
</PersistentString>
<PersistentString
value = "ctx?.data">
value = "HiRes.blockCols">
</PersistentString>
<PersistentString
value = "ctx?.width">
@ -688,14 +688,14 @@
<PersistentString
value = "(blockH7 | ( block &amp; bitMask ))">
</PersistentString>
<PersistentString
value = "ctx?.height">
</PersistentString>
<PersistentString
value = "ctx?.bitsPerComponent">
</PersistentString>
<PersistentString
value = "linAddr">
</PersistentString>
<PersistentString
value = "HiRes.blockCols">
value = "ctx?.data">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -711,13 +711,13 @@
contextName = "HiRes.compute():HiRes.swift">
<PersistentStrings>
<PersistentString
value = "UnsafeRawBufferPointer(result)">
value = "computePipelineState.maxTotalThreadsPerThreadgroup">
</PersistentString>
<PersistentString
value = "result[2]">
</PersistentString>
<PersistentString
value = "computePipelineState.maxTotalThreadsPerThreadgroup">
value = "UnsafeRawBufferPointer(result)">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -766,16 +766,16 @@
value = "m6502">
</PersistentString>
<PersistentString
value = "(void*)Apple2_64K_RAM">
value = "Apple2_64K_RAM + 0x3600">
</PersistentString>
<PersistentString
value = "m6502.PC">
</PersistentString>
<PersistentString
value = "Apple2_64K_AUX + 0x3600">
value = "(void*)Apple2_64K_RAM">
</PersistentString>
<PersistentString
value = "Apple2_64K_RAM + 0x3600">
value = "Apple2_64K_AUX + 0x3600">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -831,7 +831,7 @@
value = "new">
</PersistentString>
<PersistentString
value = "WOZtmp.shift16">
value = "WOZwrite.shift16">
</PersistentString>
<PersistentString
value = "WOZwrite.shift">
@ -843,7 +843,7 @@
value = "(1 &lt;&lt; i) - 1">
</PersistentString>
<PersistentString
value = "WOZwrite.shift16">
value = "WOZtmp.shift16">
</PersistentString>
</PersistentStrings>
</ContextState>
@ -898,10 +898,10 @@
value = "Apple2_64K_AUX + 0xC600">
</PersistentString>
<PersistentString
value = "Apple2_64K_RAM + 0xC600">
value = "(void*)rom">
</PersistentString>
<PersistentString
value = "(void*)rom">
value = "Apple2_64K_RAM + 0xC600">
</PersistentString>
<PersistentString
value = "strlen(fullPath)">
@ -951,10 +951,13 @@
</PersistentStrings>
</ContextState>
<ContextState
contextName = "ViewController.extraBuf(_:):ViewController.swift">
contextName = "BRA:6502_instr_branch.h">
<PersistentStrings>
<PersistentString
value = "soundGapLabel">
value = "">
</PersistentString>
<PersistentString
value = "RAM[0x346f]">
</PersistentString>
</PersistentStrings>
</ContextState>

View File

@ -1294,8 +1294,8 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<rect key="contentRect" x="196" y="240" width="1280" height="840"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
<value key="minSize" type="size" width="640" height="480"/>
<value key="minFullScreenContentSize" type="size" width="768" height="640"/>
<value key="minSize" type="size" width="280" height="192"/>
<value key="minFullScreenContentSize" type="size" width="280" height="192"/>
<toolbar key="toolbar" implicitIdentifier="D7F4F3E7-F7E8-42A7-9D76-F84781D283E0" centeredItem="djd-zw-gXS" autosavesConfiguration="NO" allowsUserCustomization="NO" displayMode="iconAndLabel" sizeMode="regular" id="CJg-XD-KnO">
<allowedToolbarItems>
<toolbarItem implicitItemIdentifier="013D1397-F48F-4180-8F09-FABF3D77AC5A" label="Power" paletteLabel="Power" image="Power" id="8WB-26-vb5">
@ -1450,7 +1450,7 @@
<popUpButton key="view" id="MAv-S5-diZ">
<rect key="frame" x="0.0" y="14" width="43" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" image="Chip" imagePosition="only" alignment="right" lineBreakMode="truncatingTail" refusesFirstResponder="YES" imageScaling="proportionallyUpOrDown" inset="2" pullsDown="YES" arrowPosition="noArrow" id="WVW-Wo-mc9">
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" image="popUpButtonCell:WVW-Wo-mc9:image" imagePosition="only" alignment="right" lineBreakMode="truncatingTail" refusesFirstResponder="YES" imageScaling="proportionallyUpOrDown" inset="2" pullsDown="YES" arrowPosition="noArrow" id="WVW-Wo-mc9">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="Gc4-Or-LMB">
@ -1697,56 +1697,27 @@
</textFieldCell>
</textField>
<scrollView hidden="YES" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" borderType="none" horizontalLineScroll="0.0" horizontalPageScroll="0.0" verticalLineScroll="0.0" verticalPageScroll="0.0" hasHorizontalScroller="NO" hasVerticalScroller="NO" minMagnification="1" translatesAutoresizingMaskIntoConstraints="NO" id="ss1-M1-nGn" userLabel="Scroll View - Display View" customClass="DisplayScrollView" customModule="Steve___" customModuleProvider="target">
<rect key="frame" x="11" y="16" width="1130" height="768"/>
<rect key="frame" x="11" y="16" width="1131" height="768"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="1wa-ZE-lex">
<rect key="frame" x="0.0" y="0.0" width="1130" height="768"/>
<rect key="frame" x="0.0" y="0.0" width="1131" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView editable="NO" selectable="NO" drawsBackground="NO" importsGraphics="NO" richText="NO" horizontallyResizable="YES" verticallyResizable="YES" baseWritingDirection="leftToRight" findStyle="bar" allowsCharacterPickerTouchBarItem="NO" textCompletion="NO" id="ccC-Wu-3za" userLabel="Display" customClass="DisplayView" customModule="Steve___" customModuleProvider="target">
<rect key="frame" x="0.0" y="-224" width="1130" height="768"/>
<rect key="frame" x="0.0" y="-224" width="1131" height="768"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="1130" height="768"/>
<size key="minSize" width="1131" height="768"/>
<size key="maxSize" width="3840" height="2160"/>
<attributedString key="textStorage">
<fragment>
<mutableString key="content">1234567890123456789012345678901234567890@@@@@@@@@1@@@@@@@@@2@@@@@@@@@3@@@@@@@@@4
@@@@@@@@@@@@@@@@@@@3@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@4@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@5@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@6@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@7@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@8@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@9@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@10@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@11@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@12@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@13@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@14@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@15@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@16@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@17@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@18@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@19@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@20@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@21@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@22@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@23@@@@@@@@@@@@@@@@@@@@
</mutableString>
<mutableString key="content">01234567890123456789012345678901234567891@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@3@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@4@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@5@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@9@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@10@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@11@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@12@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@13@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@14@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@15@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@16@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@17@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@18@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@19@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@20@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@21@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@22@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@23@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@</mutableString>
<attributes>
<color key="NSColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="NSColor" name="textColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="32" name="PrintChar21"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="leftToRight" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
<fragment content="@@@@@@@@@@@@@@@@@@24@@@@@@@@@@@@@@@@@@@@">
<attributes>
<color key="NSColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<font key="NSFont" size="32" name="PrintChar21"/>
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="clipping" baseWritingDirection="leftToRight" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
</textView>
@ -1766,21 +1737,21 @@
</scroller>
</scrollView>
<customView hidden="YES" focusRingType="none" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="Gqh-qw-fjy" userLabel="LoRes" customClass="LoRes" customModule="Steve___" customModuleProvider="target">
<rect key="frame" x="16" y="16" width="1120" height="768"/>
<rect key="frame" x="16" y="16" width="1121" height="768"/>
</customView>
<customView hidden="YES" focusRingType="none" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="LlM-EV-ruZ" userLabel="HiRes" customClass="HiRes" customModule="Steve___" customModuleProvider="target">
<rect key="frame" x="16" y="16" width="1120" height="768"/>
<rect key="frame" x="16" y="16" width="1121" height="768"/>
</customView>
<imageView hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="dGn-a4-c1t" userLabel="ScanLines">
<rect key="frame" x="16" y="16" width="1120" height="768"/>
<rect key="frame" x="16" y="16" width="1121" height="768"/>
<imageCell key="cell" refusesFirstResponder="YES" focusRingType="none" alignment="left" imageScaling="axesIndependently" image="scanlines" id="jJ6-qt-oZe"/>
</imageView>
<imageView hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" alphaValue="0.0" translatesAutoresizingMaskIntoConstraints="NO" id="Ghs-c1-ZkA" userLabel="DotmatrixEffect">
<rect key="frame" x="16" y="16" width="1120" height="768"/>
<rect key="frame" x="16" y="16" width="1121" height="768"/>
<imageCell key="cell" refusesFirstResponder="YES" focusRingType="none" alignment="left" imageScaling="axesIndependently" image="dotmatrix_effect" id="nPr-Un-zjz"/>
</imageView>
<customView focusRingType="none" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="D0w-YC-YlJ" userLabel="Splash Screen">
<rect key="frame" x="16" y="16" width="1120" height="768"/>
<rect key="frame" x="16" y="16" width="1121" height="768"/>
<subviews>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9jr-eX-yOC">
<rect key="frame" x="14" y="711" width="291" height="41"/>
@ -1823,7 +1794,7 @@
</textFieldCell>
</textField>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bUo-E1-CYC">
<rect key="frame" x="860" y="16" width="246" height="13"/>
<rect key="frame" x="861" y="16" width="246" height="13"/>
<textFieldCell key="cell" lineBreakMode="clipping" refusesFirstResponder="YES" focusRingType="none" title="© by Tamas Rudnai, 2020" id="tm6-Cq-r7H">
<font key="font" size="12" name="PrintChar21"/>
<color key="textColor" red="0.18823529411764706" green="0.83529411764705885" blue="0.84705882352941175" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -1868,7 +1839,7 @@
<subviews>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="49f-8R-QCc">
<rect key="frame" x="0.0" y="83" width="120" height="103"/>
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" image="popUpButtonCell:CNs-lh-urM:image" imagePosition="only" alignment="left" lineBreakMode="truncatingTail" refusesFirstResponder="YES" imageScaling="proportionallyUpOrDown" inset="2" pullsDown="YES" arrowPosition="noArrow" altersStateOfSelectedItem="NO" id="CNs-lh-urM">
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" image="popUpButtonCell:WVW-Wo-mc9:image" imagePosition="only" alignment="left" lineBreakMode="truncatingTail" refusesFirstResponder="YES" imageScaling="proportionallyUpOrDown" inset="2" pullsDown="YES" arrowPosition="noArrow" altersStateOfSelectedItem="NO" id="CNs-lh-urM">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="N33-K0-nba">
@ -1902,7 +1873,7 @@
</popUpButton>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="QDr-Cp-9QQ">
<rect key="frame" x="0.0" y="0.0" width="120" height="103"/>
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" image="popUpButtonCell:CNs-lh-urM:image" imagePosition="only" alignment="left" lineBreakMode="truncatingTail" refusesFirstResponder="YES" imageScaling="proportionallyUpOrDown" inset="2" pullsDown="YES" arrowPosition="noArrow" altersStateOfSelectedItem="NO" selectedItem="28N-X8-n7Q" id="8FA-1D-k8p">
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" image="popUpButtonCell:WVW-Wo-mc9:image" imagePosition="only" alignment="left" lineBreakMode="truncatingTail" refusesFirstResponder="YES" imageScaling="proportionallyUpOrDown" inset="2" pullsDown="YES" arrowPosition="noArrow" altersStateOfSelectedItem="NO" selectedItem="28N-X8-n7Q" id="8FA-1D-k8p">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="8He-mk-LVI">
@ -2113,7 +2084,7 @@
<constraint firstItem="D0w-YC-YlJ" firstAttribute="trailing" secondItem="ss1-M1-nGn" secondAttribute="trailing" constant="-5" id="5wF-ul-W4h"/>
<constraint firstItem="D0w-YC-YlJ" firstAttribute="top" secondItem="ss1-M1-nGn" secondAttribute="top" id="8bz-WZ-Szj"/>
<constraint firstItem="dGn-a4-c1t" firstAttribute="top" secondItem="ss1-M1-nGn" secondAttribute="top" id="8g8-nm-CxE"/>
<constraint firstItem="ss1-M1-nGn" firstAttribute="trailing" secondItem="iIF-Q5-Onc" secondAttribute="trailing" constant="-11" identifier="Display Margin Trailing" id="AYX-tI-fE9"/>
<constraint firstItem="ss1-M1-nGn" firstAttribute="trailing" secondItem="iIF-Q5-Onc" secondAttribute="trailing" constant="-10" identifier="Display Margin Trailing" id="AYX-tI-fE9"/>
<constraint firstItem="Ghs-c1-ZkA" firstAttribute="bottom" secondItem="ss1-M1-nGn" secondAttribute="bottom" id="DgS-2W-eVa"/>
<constraint firstItem="dGn-a4-c1t" firstAttribute="bottom" secondItem="ss1-M1-nGn" secondAttribute="bottom" id="EBM-Pm-MJ8"/>
<constraint firstItem="Gqh-qw-fjy" firstAttribute="top" secondItem="ss1-M1-nGn" secondAttribute="top" id="FF5-Ke-cOk"/>
@ -138889,7 +138860,7 @@ BQB9EQcAfREJAH0RCwB9ERQAfREZAH0RHwB9EScAfREpAH0RKwB9ES0AfREvAH0imwB9IqAAfSKtAH0i
sAB9Ir0AfSLCAH0iygB9Is0AfSLSAH0i2gAAAAAAAAQBAAAAAAAAAFAAAAAAAAAAAAAAAAAAfSLdA
</mutableData>
</image>
<image name="popUpButtonCell:CNs-lh-urM:image" width="1" height="1">
<image name="popUpButtonCell:WVW-Wo-mc9:image" width="1" height="1">
<mutableData key="keyedArchiveRepresentation">
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05T
S2V5ZWRBcmNoaXZlctEICVRyb290gAGvEBcLDBkaIRQmKisyNTo9PkNGR0pUXF1hZFUkbnVsbNYNDg8Q

View File

@ -27,7 +27,7 @@ class MonitorView: NSView {
@IBOutlet var textDisplay: DisplayView!
let textViewBounds = NSSize(width: 1130, height: 768)
static let textViewBounds = NSSize(width: 280 * 4, height: 192 * 4)
var textDisplay_boundsSize = NSSize()
var textDisplay_width_diff : CGFloat?
var textDisplay_height_diff : CGFloat?
@ -39,7 +39,7 @@ class MonitorView: NSView {
func adjustTextDisplaySize() {
var textFrameSize = frame.size
textFrameSize.width += 1
// textFrameSize.width += 1
if textDisplay_width_diff == nil {
textDisplay_width_diff = textFrameSize.width - textDisplay.frame.width
@ -54,7 +54,7 @@ class MonitorView: NSView {
// couple of times, Cocoa miscalculates them
for _ in 0...5 {
textDisplay.setFrameSize(textFrameSize)
textDisplay.setBoundsSize(textViewBounds)
textDisplay.setBoundsSize(MonitorView.textViewBounds)
}
}

View File

@ -84,9 +84,9 @@ class ToolBarController: NSWindowController, NSWindowDelegate {
print("setDisplayWindowed")
setDisplaySize(
leading: 11,
trailing: 11,
trailing: -11,
top: 16,
bottom: -16,
bottom: 16,
sidePanelSize: 136,
sidePanelHidden: false
)

View File

@ -1058,7 +1058,21 @@ class ViewController: NSViewController {
trailingEdgeLabel.title = "TE: " + String( SPKR_FADE_TRAILING_EDGE )
tailEdgeSlider.floatValue = SPKR_FADE_TRAILING_EDGE
// // BUGFIX: I am not sure why but if I do not adjust the frame and bounds size
// // couple of times, Cocoa miscalculates them
// var size = MonitorView.textViewBounds
// size.width /= 2
// size.height /= 2
// textDisplay.setFrameSize(size)
// textDisplay.setBoundsSize(size)
//
// size.width += 136 + 11 * 2
// size.height += 64 + 11 * 2
// view.setFrameSize(size)
// view.setBoundsSize(size)
}
override func viewDidAppear() {

View File

@ -90,7 +90,7 @@ unsigned spkr_frame_cntr = 0;
unsigned spkr_clk = 0;
const unsigned spkr_seconds = 1;
const unsigned spkr_sample_rate = 44100;
const unsigned spkr_sample_rate = 192000;
const unsigned sfx_sample_rate = 22050; // original sample rate
//const unsigned sfx_sample_rate = 26000; // bit higher pitch
int spkr_extra_buf = 0; // 26; // 800 / spkr_fps;
@ -372,10 +372,10 @@ void spkr_toggle_edge ( int level_max, const float initial_edge, const float fad
float dumping = spkr_level - level_max;
dumping *= initial_edge;
float ema_len = 7;
float ema_len = 21;
if ( idx_diff <= SPKR_SAMPLE_PWM_THRESHOLD ) {
ema_len = 120;
ema_len = 200;
}
spkr_level = spkr_samples[ spkr_sample_idx ];
@ -396,8 +396,27 @@ void spkr_toggle_edge ( int level_max, const float initial_edge, const float fad
}
float SPKR_FADE_LEADING_EDGE = 0.92;
float SPKR_FADE_TRAILING_EDGE = 0.92;
void spkr_toggle_tick ( int level_max, const unsigned idx_diff ) {
spkr_level = SPKR_LEVEL_ZERO;
spkr_samples[ spkr_sample_idx++ ] = level_max;
spkr_samples[ spkr_sample_idx++ ] = level_max; // stereo
spkr_sample_last_idx = spkr_sample_idx;
spkr_last_level = spkr_level;
}
//float SPKR_FADE_LEADING_EDGE = 0.92;
//float SPKR_FADE_TRAILING_EDGE = 0.92;
//float SPKR_INITIAL_LEADING_EDGE = 0.64; // leading edge should be pretty steep to get sharp sound plus to avoid Wavy Navy high pitch sound
//float SPKR_INITIAL_TRAILING_EDGE = 0.64; // need a bit of slope to get Xonix sound good
//float SPKR_FADE_LEADING_EDGE = 0.82;
//float SPKR_FADE_TRAILING_EDGE = 0.82;
//float SPKR_INITIAL_LEADING_EDGE = 0.82; // leading edge should be pretty steep to get sharp sound plus to avoid Wavy Navy high pitch sound
//float SPKR_INITIAL_TRAILING_EDGE = 0.64; // need a bit of slope to get Xonix sound good
float SPKR_FADE_LEADING_EDGE = 0.64;
float SPKR_FADE_TRAILING_EDGE = 0.64;
float SPKR_INITIAL_LEADING_EDGE = 0.64; // leading edge should be pretty steep to get sharp sound plus to avoid Wavy Navy high pitch sound
float SPKR_INITIAL_TRAILING_EDGE = 0.64; // need a bit of slope to get Xonix sound good
@ -422,6 +441,10 @@ void spkr_toggle() {
spkr_sample_idx = ( (spkr_clk + m6502.clkfrm) / ( MHZ(default_MHz_6502) / spkr_sample_rate)) * SPKR_CHANNELS;
spkr_sample_idx &= UINTMAX_MAX - 1;
unsigned spkr_sample_idx_diff = spkr_sample_idx - spkr_sample_last_idx;
// if ( (int)spkr_sample_idx_diff == 0 ) {
// // printf("m:%u\n", spkr_sample_idx_diff);
// spkr_sample_idx_diff = UINT_MAX - spkr_sample_idx_diff;
// }
if ( (int)spkr_sample_idx_diff < 0 ) {
// printf("m:%u\n", spkr_sample_idx_diff);
spkr_sample_idx_diff = UINT_MAX - spkr_sample_idx_diff;
@ -434,12 +457,14 @@ void spkr_toggle() {
spkr_state = 0;
spkr_toggle_edge(SPKR_LEVEL_MIN, SPKR_INITIAL_TRAILING_EDGE, SPKR_FADE_TRAILING_EDGE, spkr_sample_idx_diff);
// spkr_toggle_tick(SPKR_LEVEL_MIN, spkr_sample_idx_diff);
}
else {
// up edge
spkr_state = 1;
spkr_toggle_edge(SPKR_LEVEL_MAX, SPKR_INITIAL_LEADING_EDGE, SPKR_FADE_LEADING_EDGE, spkr_sample_idx_diff);
// spkr_toggle_tick(SPKR_LEVEL_MAX, spkr_sample_idx_diff);
}
@ -569,6 +594,8 @@ void spkr_update() {
spkr_samples[dst++] = spkr_level;
}
// TODO: Problems on Wavy Navy
// if ( ( spkr_sample_idx >= size ) && ( spkr_level == SPKR_LEVEL_ZERO ) ) {
if ( spkr_sample_idx >= size ) {
spkr_sample_idx -= size;
}

View File

@ -41,7 +41,7 @@
// medium
//#define SPKR_LEVEL_MIN (-3072)
//#define SPKR_LEVEL_MAX (+3072)
#define SPKR_LEVEL_MAX 8192
#define SPKR_LEVEL_MAX 32767 // 8192
#define SPKR_LEVEL_MIN (-SPKR_LEVEL_MAX)
#define SPKR_PLAY_TIMEOUT 8U