BugFix: Flickering while debugger window is displayed

BugFix: Embedded Font
This commit is contained in:
tudnai 2022-11-10 15:07:30 -08:00
parent 58e0edc400
commit 6ceb1abf8e
5 changed files with 102 additions and 59 deletions

View File

@ -1525,7 +1525,7 @@ Gw
<popUpButton key="view" id="rfS-6q-EKe">
<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="popUpButtonCell:8bV-Aa-zHf:image" imagePosition="only" alignment="right" lineBreakMode="truncatingTail" refusesFirstResponder="YES" imageScaling="proportionallyUpOrDown" inset="2" pullsDown="YES" arrowPosition="noArrow" id="8bV-Aa-zHf">
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" image="Quick Disk" imagePosition="only" alignment="right" lineBreakMode="truncatingTail" refusesFirstResponder="YES" imageScaling="proportionallyUpOrDown" inset="2" pullsDown="YES" arrowPosition="noArrow" id="8bV-Aa-zHf">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="7Vp-Rc-UbT">
@ -1811,8 +1811,8 @@ Gw
<rect key="frame" x="0.0" y="0.0" width="1152" height="736"/>
<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="Text Display" customClass="DisplayView" customModule="Steve___" customModuleProvider="target">
<rect key="frame" x="0.0" y="-480" width="1152" height="768"/>
<textView editable="NO" selectable="NO" drawsBackground="NO" importsGraphics="NO" richText="NO" verticallyResizable="NO" baseWritingDirection="leftToRight" findStyle="bar" allowsCharacterPickerTouchBarItem="NO" textCompletion="NO" id="ccC-Wu-3za" userLabel="Text Display" customClass="DisplayView" customModule="Steve___" customModuleProvider="target">
<rect key="frame" x="0.0" y="-512" width="1152" height="768"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" red="0.0" green="0.99143940210000003" blue="1" alpha="0.76658818490000002" colorSpace="custom" customColorSpace="sRGB"/>
@ -1948,7 +1948,7 @@ Gw
<subviews>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="49f-8R-QCc" userLabel="Disk1 Button">
<rect key="frame" x="0.0" y="75" width="104" height="99"/>
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" image="popUpButtonCell:8bV-Aa-zHf:image" imagePosition="only" alignment="left" lineBreakMode="truncatingTail" refusesFirstResponder="YES" imageScaling="proportionallyUpOrDown" inset="2" pullsDown="YES" arrowPosition="noArrow" altersStateOfSelectedItem="NO" id="CNs-lh-urM" userLabel="Disk1 Pop Up Button Cell">
<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" userLabel="Disk1 Pop Up Button Cell">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="N33-K0-nba" userLabel="Disk1 Menu">
@ -2000,7 +2000,7 @@ Gw
</popUpButton>
<popUpButton translatesAutoresizingMaskIntoConstraints="NO" id="QDr-Cp-9QQ" userLabel="Disk2 Button">
<rect key="frame" x="0.0" y="0.0" width="104" height="99"/>
<popUpButtonCell key="cell" type="bevel" bezelStyle="regularSquare" image="popUpButtonCell:8bV-Aa-zHf: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: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">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="8He-mk-LVI">
@ -2052,8 +2052,7 @@ Gw
</popUpButton>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="49f-8R-QCc" secondAttribute="trailing" identifier="Perfipheries.Trailing - Disk1 Button.Trailing" id="6aB-Qg-JZQ"/>
<constraint firstItem="49f-8R-QCc" firstAttribute="leading" secondItem="5gO-h7-NcU" secondAttribute="leading" identifier="Disk1 Button.Leading - Peripheries.Leading" id="Vej-Ld-EaC"/>
<constraint firstAttribute="height" constant="174" id="5tm-lC-nuP"/>
</constraints>
<visibilityPriorities>
<integer value="1000"/>
@ -2105,10 +2104,10 @@ Gw
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="disk_door_closed" id="CaE-Oz-Qm7"/>
</imageView>
<stackView focusRingType="none" distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lVP-FP-u6x" userLabel="CPU Speed Selection">
<rect key="frame" x="8" y="8" width="104" height="158"/>
<rect key="frame" x="8" y="8" width="104" height="26"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Kym-qZ-Ch2">
<rect key="frame" x="-2" y="142" width="56" height="18"/>
<button hidden="YES" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Kym-qZ-Ch2">
<rect key="frame" x="-2" y="10" width="56" height="18"/>
<buttonCell key="cell" type="check" title="Trace" bezelStyle="regularSquare" imagePosition="left" inset="2" id="cIl-CI-TG2">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@ -2118,10 +2117,10 @@ Gw
</connections>
</button>
<box focusRingType="none" verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="wih-Y6-2Bz">
<rect key="frame" x="0.0" y="133" width="88" height="5"/>
<rect key="frame" x="0.0" y="23" width="88" height="5"/>
</box>
<textField hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0rh-UD-CfH">
<rect key="frame" x="-2" y="142" width="47" height="16"/>
<rect key="frame" x="-2" y="10" width="47" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" refusesFirstResponder="YES" focusRingType="none" alignment="right" title="ILE: 0.1" id="Eaz-eQ-aTu">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -2129,14 +2128,14 @@ Gw
</textFieldCell>
</textField>
<slider hidden="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8yq-X9-qQ4">
<rect key="frame" x="-2" y="141" width="92" height="19"/>
<rect key="frame" x="-2" y="9" width="92" height="19"/>
<sliderCell key="cell" continuous="YES" refusesFirstResponder="YES" state="on" focusRingType="none" alignment="left" maxValue="1" doubleValue="0.10000000000000001" tickMarkPosition="above" sliderType="linear" id="tS0-Xw-KET"/>
<connections>
<action selector="leadingInitEdgeSelected:" target="XfG-lQ-9wD" id="FXh-mX-eVX"/>
</connections>
</slider>
<textField hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="mWJ-H9-Alk">
<rect key="frame" x="-2" y="142" width="44" height="16"/>
<rect key="frame" x="-2" y="10" width="44" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" refusesFirstResponder="YES" focusRingType="none" alignment="right" title="LE: 0.1" id="aIi-wV-21w">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -2144,14 +2143,14 @@ Gw
</textFieldCell>
</textField>
<slider hidden="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fux-hn-RBw">
<rect key="frame" x="-2" y="141" width="92" height="19"/>
<rect key="frame" x="-2" y="9" width="92" height="19"/>
<sliderCell key="cell" continuous="YES" refusesFirstResponder="YES" state="on" focusRingType="none" alignment="left" maxValue="0.99990000000000001" doubleValue="0.10000000000000001" tickMarkPosition="above" sliderType="linear" id="xze-V2-nR4"/>
<connections>
<action selector="leadingEdgeSelected:" target="XfG-lQ-9wD" id="7pV-OO-nhj"/>
</connections>
</slider>
<textField hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Xfd-PR-Oev">
<rect key="frame" x="-2" y="142" width="48" height="16"/>
<rect key="frame" x="-2" y="10" width="48" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" refusesFirstResponder="YES" focusRingType="none" alignment="right" title="ITE: 0.1" id="e8G-NN-xe8">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -2159,14 +2158,14 @@ Gw
</textFieldCell>
</textField>
<slider hidden="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="P91-Ah-VX6">
<rect key="frame" x="-2" y="141" width="92" height="19"/>
<rect key="frame" x="-2" y="9" width="92" height="19"/>
<sliderCell key="cell" continuous="YES" refusesFirstResponder="YES" state="on" focusRingType="none" alignment="left" maxValue="1" doubleValue="0.10000000000000001" tickMarkPosition="above" sliderType="linear" id="50T-K4-rsM"/>
<connections>
<action selector="trailingInitEdgeSelected:" target="XfG-lQ-9wD" id="zXK-9D-9zH"/>
</connections>
</slider>
<textField hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WLe-No-XdS">
<rect key="frame" x="-2" y="142" width="45" height="16"/>
<rect key="frame" x="-2" y="10" width="45" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" refusesFirstResponder="YES" focusRingType="none" alignment="right" title="TE: 0.1" id="uUU-7X-My0">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -2174,14 +2173,14 @@ Gw
</textFieldCell>
</textField>
<slider hidden="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Sn1-VZ-VjW">
<rect key="frame" x="-2" y="141" width="92" height="19"/>
<rect key="frame" x="-2" y="9" width="92" height="19"/>
<sliderCell key="cell" continuous="YES" refusesFirstResponder="YES" state="on" focusRingType="none" alignment="left" maxValue="0.99990000000000001" doubleValue="0.10000000000000001" tickMarkPosition="above" sliderType="linear" id="6HL-sM-Ulk"/>
<connections>
<action selector="trailingEdgeSelected:" target="XfG-lQ-9wD" id="UQ6-Lt-f9t"/>
</connections>
</slider>
<textField hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="adp-hx-NvD">
<rect key="frame" x="-2" y="142" width="40" height="16"/>
<rect key="frame" x="-2" y="10" width="40" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" refusesFirstResponder="YES" focusRingType="none" alignment="right" title="WE: 4" id="M1e-h1-C5X">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -2189,44 +2188,44 @@ Gw
</textFieldCell>
</textField>
<slider hidden="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="alH-N3-GYS">
<rect key="frame" x="-2" y="134" width="92" height="24"/>
<rect key="frame" x="-2" y="2" width="92" height="24"/>
<sliderCell key="cell" continuous="YES" refusesFirstResponder="YES" state="on" focusRingType="none" alignment="left" maxValue="40" doubleValue="4.1025641025641022" tickMarkPosition="above" numberOfTickMarks="40" allowsTickMarkValuesOnly="YES" sliderType="linear" id="M38-l2-wW3"/>
<connections>
<action selector="wozExtraSelected:" target="XfG-lQ-9wD" id="jyY-27-Hdz"/>
</connections>
</slider>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cUp-BM-2iO">
<rect key="frame" x="-2" y="111" width="54" height="16"/>
<textField hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cUp-BM-2iO">
<rect key="frame" x="-2" y="10" width="54" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" refusesFirstResponder="YES" focusRingType="none" alignment="right" title="EMA: 18" id="11J-tH-xLe">
<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>
<slider focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ND1-4Z-iF3">
<rect key="frame" x="-2" y="79" width="92" height="24"/>
<slider hidden="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ND1-4Z-iF3">
<rect key="frame" x="-2" y="2" width="92" height="24"/>
<sliderCell key="cell" continuous="YES" refusesFirstResponder="YES" state="on" focusRingType="none" alignment="left" minValue="1" maxValue="41" doubleValue="18.435897435897434" tickMarkPosition="above" numberOfTickMarks="40" allowsTickMarkValuesOnly="YES" sliderType="linear" id="WQL-gS-1BT"/>
<connections>
<action selector="EMASelected:" target="XfG-lQ-9wD" id="dhd-xf-5TT"/>
</connections>
</slider>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FFM-zm-Wjx">
<rect key="frame" x="-2" y="57" width="13" height="16"/>
<textField hidden="YES" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FFM-zm-Wjx">
<rect key="frame" x="-2" y="10" width="13" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" refusesFirstResponder="YES" focusRingType="none" alignment="right" title="0" id="yIR-MN-Hdl">
<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>
<slider focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="64O-qO-cQV">
<rect key="frame" x="-2" y="32" width="92" height="19"/>
<slider hidden="YES" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="64O-qO-cQV">
<rect key="frame" x="-2" y="9" width="92" height="19"/>
<sliderCell key="cell" continuous="YES" refusesFirstResponder="YES" state="on" focusRingType="none" alignment="left" minValue="-512" maxValue="512" tickMarkPosition="above" sliderType="linear" id="hxk-WO-tJf"/>
<connections>
<action selector="extraBuf:" target="XfG-lQ-9wD" id="gEu-yg-udY"/>
</connections>
</slider>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FZk-VW-alq">
<rect key="frame" x="-2" y="9" width="75" height="17"/>
<rect key="frame" x="-2" y="0.0" width="75" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="ai1-6C-5tW"/>
</constraints>
@ -2236,8 +2235,8 @@ Gw
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<box focusRingType="none" verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="G0a-hc-JMD">
<rect key="frame" x="0.0" y="-2" width="88" height="5"/>
<box hidden="YES" focusRingType="none" verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="G0a-hc-JMD">
<rect key="frame" x="0.0" y="23" width="88" height="5"/>
</box>
</subviews>
<visibilityPriorities>
@ -2305,6 +2304,7 @@ Gw
<constraint firstItem="IAx-Q8-Avg" firstAttribute="leading" secondItem="49f-8R-QCc" secondAttribute="leading" identifier="Disk1 Door Opened.Leading - Disk1 Button.Leading" id="Obi-vy-TGb"/>
<constraint firstItem="5gO-h7-NcU" firstAttribute="leading" secondItem="Fdf-pv-iEw" secondAttribute="leading" constant="8" identifier="Peripheries.Leading - Side Panel.Leading" id="PKR-Iu-37M"/>
<constraint firstItem="AZl-Zl-L9T" firstAttribute="bottom" secondItem="49f-8R-QCc" secondAttribute="bottom" identifier="Disk1 LED On.Bottom - Disk1 Button.Bottom" id="PUU-yT-lkg"/>
<constraint firstAttribute="width" constant="120" id="Vwz-Pj-8cl"/>
<constraint firstItem="lIN-1F-RHJ" firstAttribute="leading" secondItem="49f-8R-QCc" secondAttribute="leading" identifier="Disk1 Image.Leading - Disk1 Button.Leading" id="YNu-WV-S2S"/>
<constraint firstItem="IAx-Q8-Avg" firstAttribute="bottom" secondItem="49f-8R-QCc" secondAttribute="bottom" identifier="Disk1 Door Opened.Bottom - Disk1 Button.Bottom" id="Z0Y-GC-Qoe"/>
<constraint firstItem="KZx-ua-xoJ" firstAttribute="top" secondItem="49f-8R-QCc" secondAttribute="top" identifier="Disk1 Door Closed.Top - Disk1 Button.Top" id="Zwp-4t-6pA"/>
@ -2356,7 +2356,6 @@ Gw
<constraint firstItem="dGn-a4-c1t" firstAttribute="trailing" secondItem="ss1-M1-nGn" secondAttribute="trailing" identifier="ScanLines.Trailing - Test Display Scroller.Trailing" id="XM9-i5-GOP"/>
<constraint firstItem="Fdf-pv-iEw" firstAttribute="leading" secondItem="iIF-Q5-Onc" secondAttribute="trailing" constant="8" identifier="Side Panel.Leading - Background.Trailing" id="Xbh-Ub-1Ng"/>
<constraint firstAttribute="bottom" secondItem="iIF-Q5-Onc" secondAttribute="bottom" identifier="Display Background Bottom" id="acb-Dy-fu5"/>
<constraint firstAttribute="trailing" secondItem="iIF-Q5-Onc" secondAttribute="trailing" constant="136" identifier="Display Background Trailing" id="dO5-Md-6fz"/>
<constraint firstItem="LlM-EV-ruZ" firstAttribute="top" secondItem="ss1-M1-nGn" secondAttribute="top" identifier="HiRes.Top - Test Display Scroller.Top" id="lDs-jy-edU"/>
<constraint firstItem="LlM-EV-ruZ" firstAttribute="bottom" secondItem="ss1-M1-nGn" secondAttribute="bottom" identifier="HiRes.Bottom - Test Display Scroller.Bottom" id="ltj-Ea-Vtb"/>
<constraint firstItem="iIF-Q5-Onc" firstAttribute="top" secondItem="m2S-Jp-Qdl" secondAttribute="top" identifier="Display Background Top" id="m3e-ww-N7S"/>
@ -139131,7 +139130,7 @@ BQB9EQcAfREJAH0RCwB9ERQAfREZAH0RHwB9EScAfREpAH0RKwB9ES0AfREvAH0imwB9IqAAfSKtAH0i
sAB9Ir0AfSLCAH0iygB9Is0AfSLSAH0i2gAAAAAAAAQBAAAAAAAAAFAAAAAAAAAAAAAAAAAAfSLdA
</mutableData>
</image>
<image name="popUpButtonCell:8bV-Aa-zHf:image" width="1" height="1">
<image name="popUpButtonCell:CNs-lh-urM:image" width="1" height="1">
<mutableData key="keyedArchiveRepresentation">
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05T
S2V5ZWRBcmNoaXZlctEICVRyb290gAGvEBcLDBkaIRQmKisyNTo9PkNGR0pUXF1hZFUkbnVsbNYNDg8Q

View File

@ -294,15 +294,28 @@ N V - B D I Z C
NSAttributedString.Key.foregroundColor: NSColor.cyan,
]
func highlight(view: DisplayView, line: Int, attr: [NSAttributedString.Key : Any]) {
if let lineRange = getLineRange(inView: view, forLine: line) {
// view.selectedRange = lineRange
// view.scrollRangeToVisible(lineRange)
if let oldLineRange = getLineRange(inView: view, forLine: line_number_cursor) {
view.layoutManager?.removeTemporaryAttribute(NSAttributedString.Key.backgroundColor, forCharacterRange: oldLineRange)
view.layoutManager?.removeTemporaryAttribute(NSAttributedString.Key.foregroundColor, forCharacterRange: oldLineRange)
func remove_highlight(view: DisplayView, line: Int) {
if line > 0 {
if let lineRange = getLineRange(inView: view, forLine: line) {
view.layoutManager?.removeTemporaryAttribute(NSAttributedString.Key.backgroundColor, forCharacterRange: lineRange)
view.layoutManager?.removeTemporaryAttribute(NSAttributedString.Key.foregroundColor, forCharacterRange: lineRange)
}
}
}
func highlight(view: DisplayView, line: Int, attr: [NSAttributedString.Key : Any]) {
if line > 0 {
// remove old highlighted line
remove_highlight(view: view, line: line)
if let lineRange = getLineRange(inView: view, forLine: line) {
// view.selectedRange = lineRange
// view.scrollRangeToVisible(lineRange)
// remove_highlight(view: view, line: line_number_cursor)
// line_number_cursor = 0
view.layoutManager?.addTemporaryAttributes(attr, forCharacterRange: lineRange)
}
view.layoutManager?.addTemporaryAttributes(attr, forCharacterRange: lineRange)
}
}
@ -334,6 +347,7 @@ N V - B D I Z C
let line = getLine(inView: Disass_Display, forY: location.y)
highlight(view: Disass_Display, line: line_number_at_PC, attr: lineAttrAtPC)
remove_highlight(view: Disass_Display, line: line_number_cursor)
highlight(view: Disass_Display, line: line, attr: lineAttrAtSelected)
line_number_cursor = line
}
@ -345,12 +359,21 @@ N V - B D I Z C
var disass = ""
line_number = 0
let highlighted = self.line_number_at_PC
DispatchQueue.main.async {
self.remove_highlight(view: self.Disass_Display, line: highlighted)
}
line_number_at_PC = 0
var need_disass = false
if m6502.PC > disass_addr && m6502.PC < disass_addr + disass_addr_max {
m6502.PC = disass_addr
}
else {
need_disass = true
disass_addr = m6502.PC
if m6502.PC >= disass_addr_min_pre {
m6502.PC -= disass_addr_min_pre
@ -387,7 +410,10 @@ N V - B D I Z C
DispatchQueue.main.async {
// let isEmpty = self.Disass_Display.string.isEmpty
self.Disass_Display.string = disass
if need_disass {
self.Disass_Display.string = disass
}
let currentScrollLine = self.get_scroll_line(view: self.Disass_Display) + 1
if self.line_number_at_PC <= currentScrollLine || self.line_number_at_PC > currentScrollLine + 35 {
self.scroll_to(view: self.Disass_Display, line: self.line_number_at_PC - 5)
@ -395,30 +421,32 @@ N V - B D I Z C
// at the beginning it takes a while to fill up the buffer -- maybe allocation issue?
if currentScrollLine == 1 {
// so we need to scroll a bit later when the string is already populated
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
self.scroll_to(view: self.Disass_Display, line: self.line_number_at_PC - 5)
}
// }
}
}
self.highlight(view: self.Disass_Display, line: self.line_number_at_PC, attr: self.lineAttrAtPC)
}
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
// your code here
}
// }
m6502 = m6502_saved
}
let UpdateSemaphore = DispatchSemaphore(value: 1)
func Update() {
UpdateSemaphore.wait()
DispatchQueue.global().async {
self.UpdateSemaphore.wait()
DisplayRegisters()
DisplayStack()
DisplayMemory()
DisplayDisassembly()
self.DisplayRegisters()
self.DisplayStack()
self.DisplayMemory()
self.DisplayDisassembly()
UpdateSemaphore.signal()
self.UpdateSemaphore.signal()
}
}
}

View File

@ -32,5 +32,10 @@
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>UIAppFonts</key>
<array>
<string>PrintChar21.ttf</string>
<string>PRNumber3.ttf</string>
</array>
</dict>
</plist>

View File

@ -1265,6 +1265,16 @@ class ViewController: NSViewController {
}
func debugBreak() {
Pause()
// TODO: This should be in Debugger!
if let debugger = DebuggerViewController.shared {
debugger.Update()
}
}
let UpdateSemaphore = DispatchSemaphore(value: 1)
func Update() {
if UpdateSemaphore.wait(timeout: .now() + 0.001) == .timedOut {
@ -1305,21 +1315,21 @@ class ViewController: NSViewController {
switch m6502.interrupt {
case HALT:
Pause()
debugBreak()
case BREAK:
Pause()
debugBreak()
case RET:
if m6502.debugger.mask.ret == 1 {
// Step_Out / Step_Over
if m6502.PC >= m6502.debugger.SP {
Pause()
debugBreak()
}
}
case INV:
Pause()
debugBreak()
default:
break
@ -1340,7 +1350,7 @@ class ViewController: NSViewController {
if let debugger = DebuggerViewController.shared {
debugger.Update()
}
#endif
break
@ -1354,7 +1364,7 @@ class ViewController: NSViewController {
cpuState = cpuState_halted
// last video rendering before halt
Render()
break
case cpuState_halted:

View File

@ -439,6 +439,7 @@ void m6502_Debug(void) {
if ( m6502_dbg_bp_is_exists(m6502.PC) ) {
cpuState = cpuState_halted;
m6502.debugger.wMask = 0;
m6502.debugger.on = 0;
return;
}