mirror of
https://github.com/trudnai/Steve2.git
synced 2024-06-02 14:41:30 +00:00
- Optimized Text Rendering
- Optimized HiRes screen hiding
This commit is contained in:
parent
803ce37b0a
commit
cb5339e01f
|
@ -81,7 +81,7 @@
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Debug"
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
savedToolIdentifier = ""
|
savedToolIdentifier = ""
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
|
|
|
@ -353,8 +353,8 @@
|
||||||
timestampString = "590831455.181416"
|
timestampString = "590831455.181416"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "162"
|
startingLineNumber = "168"
|
||||||
endingLineNumber = "162"
|
endingLineNumber = "168"
|
||||||
landmarkName = "HiRes"
|
landmarkName = "HiRes"
|
||||||
landmarkType = "3">
|
landmarkType = "3">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -369,8 +369,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "879"
|
startingLineNumber = "885"
|
||||||
endingLineNumber = "879"
|
endingLineNumber = "885"
|
||||||
landmarkName = "draw(_:)"
|
landmarkName = "draw(_:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -385,8 +385,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "910"
|
startingLineNumber = "916"
|
||||||
endingLineNumber = "910"
|
endingLineNumber = "916"
|
||||||
landmarkName = "draw(_:)"
|
landmarkName = "draw(_:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -401,8 +401,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "907"
|
startingLineNumber = "913"
|
||||||
endingLineNumber = "907"
|
endingLineNumber = "913"
|
||||||
landmarkName = "draw(_:)"
|
landmarkName = "draw(_:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -417,8 +417,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "884"
|
startingLineNumber = "890"
|
||||||
endingLineNumber = "884"
|
endingLineNumber = "890"
|
||||||
landmarkName = "draw(_:)"
|
landmarkName = "draw(_:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -433,8 +433,8 @@
|
||||||
filePath = "A2Mac/ViewController.swift"
|
filePath = "A2Mac/ViewController.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "344"
|
startingLineNumber = "348"
|
||||||
endingLineNumber = "344"
|
endingLineNumber = "348"
|
||||||
landmarkName = "ViewController"
|
landmarkName = "ViewController"
|
||||||
landmarkType = "3">
|
landmarkType = "3">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -481,10 +481,10 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "190"
|
startingLineNumber = "196"
|
||||||
endingLineNumber = "190"
|
endingLineNumber = "196"
|
||||||
landmarkName = "compute()"
|
landmarkName = "HiRes"
|
||||||
landmarkType = "7">
|
landmarkType = "3">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
<BreakpointProxy
|
<BreakpointProxy
|
||||||
|
@ -497,9 +497,9 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "165"
|
startingLineNumber = "171"
|
||||||
endingLineNumber = "165"
|
endingLineNumber = "171"
|
||||||
landmarkName = "init(frame:)"
|
landmarkName = "compute()"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
</BreakpointProxy>
|
</BreakpointProxy>
|
||||||
|
@ -657,8 +657,8 @@
|
||||||
filePath = "A2Mac/ViewController.swift"
|
filePath = "A2Mac/ViewController.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "611"
|
startingLineNumber = "628"
|
||||||
endingLineNumber = "611"
|
endingLineNumber = "628"
|
||||||
landmarkName = "viewDidLoad()"
|
landmarkName = "viewDidLoad()"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -875,8 +875,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "201"
|
startingLineNumber = "207"
|
||||||
endingLineNumber = "201"
|
endingLineNumber = "207"
|
||||||
landmarkName = "render()"
|
landmarkName = "render()"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -939,8 +939,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "893"
|
startingLineNumber = "899"
|
||||||
endingLineNumber = "893"
|
endingLineNumber = "899"
|
||||||
landmarkName = "draw(_:)"
|
landmarkName = "draw(_:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -955,8 +955,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "906"
|
startingLineNumber = "912"
|
||||||
endingLineNumber = "906"
|
endingLineNumber = "912"
|
||||||
landmarkName = "draw(_:)"
|
landmarkName = "draw(_:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -971,8 +971,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "916"
|
startingLineNumber = "922"
|
||||||
endingLineNumber = "916"
|
endingLineNumber = "922"
|
||||||
landmarkName = "draw(_:)"
|
landmarkName = "draw(_:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -987,8 +987,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "585"
|
startingLineNumber = "591"
|
||||||
endingLineNumber = "585"
|
endingLineNumber = "591"
|
||||||
landmarkName = "hiresColorPixel(pixelAddr:pixel:prev:)"
|
landmarkName = "hiresColorPixel(pixelAddr:pixel:prev:)"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -1275,24 +1275,8 @@
|
||||||
filePath = "A2Mac/ViewController.swift"
|
filePath = "A2Mac/ViewController.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "410"
|
startingLineNumber = "414"
|
||||||
endingLineNumber = "410"
|
endingLineNumber = "414"
|
||||||
landmarkName = "Update()"
|
|
||||||
landmarkType = "7">
|
|
||||||
</BreakpointContent>
|
|
||||||
</BreakpointProxy>
|
|
||||||
<BreakpointProxy
|
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
||||||
<BreakpointContent
|
|
||||||
uuid = "C07F6B68-6A7A-4B09-837E-DBFA14DFF068"
|
|
||||||
shouldBeEnabled = "No"
|
|
||||||
ignoreCount = "0"
|
|
||||||
continueAfterRunningActions = "No"
|
|
||||||
filePath = "A2Mac/ViewController.swift"
|
|
||||||
startingColumnNumber = "9223372036854775807"
|
|
||||||
endingColumnNumber = "9223372036854775807"
|
|
||||||
startingLineNumber = "575"
|
|
||||||
endingLineNumber = "575"
|
|
||||||
landmarkName = "Update()"
|
landmarkName = "Update()"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -1307,24 +1291,8 @@
|
||||||
filePath = "A2Mac/ViewController.swift"
|
filePath = "A2Mac/ViewController.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "519"
|
startingLineNumber = "523"
|
||||||
endingLineNumber = "519"
|
endingLineNumber = "523"
|
||||||
landmarkName = "Update()"
|
|
||||||
landmarkType = "7">
|
|
||||||
</BreakpointContent>
|
|
||||||
</BreakpointProxy>
|
|
||||||
<BreakpointProxy
|
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
||||||
<BreakpointContent
|
|
||||||
uuid = "86A35A38-C08C-4F86-B3CF-45B86C2579DC"
|
|
||||||
shouldBeEnabled = "No"
|
|
||||||
ignoreCount = "0"
|
|
||||||
continueAfterRunningActions = "No"
|
|
||||||
filePath = "A2Mac/ViewController.swift"
|
|
||||||
startingColumnNumber = "9223372036854775807"
|
|
||||||
endingColumnNumber = "9223372036854775807"
|
|
||||||
startingLineNumber = "480"
|
|
||||||
endingLineNumber = "480"
|
|
||||||
landmarkName = "Update()"
|
landmarkName = "Update()"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -1962,8 +1930,8 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "643"
|
startingLineNumber = "649"
|
||||||
endingLineNumber = "643"
|
endingLineNumber = "649"
|
||||||
landmarkName = "Update()"
|
landmarkName = "Update()"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
@ -1978,8 +1946,72 @@
|
||||||
filePath = "A2Mac/HiRes.swift"
|
filePath = "A2Mac/HiRes.swift"
|
||||||
startingColumnNumber = "9223372036854775807"
|
startingColumnNumber = "9223372036854775807"
|
||||||
endingColumnNumber = "9223372036854775807"
|
endingColumnNumber = "9223372036854775807"
|
||||||
startingLineNumber = "626"
|
startingLineNumber = "632"
|
||||||
endingLineNumber = "626"
|
endingLineNumber = "632"
|
||||||
|
landmarkName = "Update()"
|
||||||
|
landmarkType = "7">
|
||||||
|
<Locations>
|
||||||
|
<Location
|
||||||
|
uuid = "ADF25D90-51C8-4D88-BD9B-352BC4E00C20 - 6be15f36516fdb02"
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "A2Mac.HiRes.Update() -> ()"
|
||||||
|
moduleName = "A2Mac"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/trudnai/Dropbox/Projects/A2Mac/A2Mac/HiRes.swift"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "632"
|
||||||
|
endingLineNumber = "632"
|
||||||
|
offsetFromSymbolStart = "2114">
|
||||||
|
</Location>
|
||||||
|
<Location
|
||||||
|
uuid = "ADF25D90-51C8-4D88-BD9B-352BC4E00C20 - 6be15f36516fdb02"
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
symbolName = "A2Mac.HiRes.Update() -> ()"
|
||||||
|
moduleName = "A2Mac"
|
||||||
|
usesParentBreakpointCondition = "Yes"
|
||||||
|
urlString = "file:///Users/trudnai/Dropbox/Projects/A2Mac/A2Mac/HiRes.swift"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "632"
|
||||||
|
endingLineNumber = "632"
|
||||||
|
offsetFromSymbolStart = "2147">
|
||||||
|
</Location>
|
||||||
|
</Locations>
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "CD92D488-6E98-41AA-BBBB-B977CB87A11C"
|
||||||
|
shouldBeEnabled = "Yes"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "A2Mac/ViewController.swift"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "576"
|
||||||
|
endingLineNumber = "576"
|
||||||
|
landmarkName = "Update()"
|
||||||
|
landmarkType = "7">
|
||||||
|
</BreakpointContent>
|
||||||
|
</BreakpointProxy>
|
||||||
|
<BreakpointProxy
|
||||||
|
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
||||||
|
<BreakpointContent
|
||||||
|
uuid = "75D38E45-0220-498F-A4A7-C87991F329A1"
|
||||||
|
shouldBeEnabled = "No"
|
||||||
|
ignoreCount = "0"
|
||||||
|
continueAfterRunningActions = "No"
|
||||||
|
filePath = "A2Mac/ViewController.swift"
|
||||||
|
startingColumnNumber = "9223372036854775807"
|
||||||
|
endingColumnNumber = "9223372036854775807"
|
||||||
|
startingLineNumber = "491"
|
||||||
|
endingLineNumber = "491"
|
||||||
landmarkName = "Update()"
|
landmarkName = "Update()"
|
||||||
landmarkType = "7">
|
landmarkType = "7">
|
||||||
</BreakpointContent>
|
</BreakpointContent>
|
||||||
|
|
|
@ -811,7 +811,7 @@
|
||||||
<constraint firstAttribute="width" constant="1120" id="uez-Mi-0Sh"/>
|
<constraint firstAttribute="width" constant="1120" id="uez-Mi-0Sh"/>
|
||||||
<constraint firstAttribute="height" constant="768" id="zl6-au-oZj"/>
|
<constraint firstAttribute="height" constant="768" id="zl6-au-oZj"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" refusesFirstResponder="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" state="on" baseWritingDirection="leftToRight" id="pIk-RC-s5g">
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" refusesFirstResponder="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" state="on" baseWritingDirection="leftToRight" id="pIk-RC-s5g">
|
||||||
<font key="font" size="32" name="PrintChar21"/>
|
<font key="font" size="32" name="PrintChar21"/>
|
||||||
<string key="title">1234567890123456789012345678901234567890
|
<string key="title">1234567890123456789012345678901234567890
|
||||||
@@@@@@@@@1@@@@@@@@@2@@@@@@@@@3@@@@@@@@@4
|
@@@@@@@@@1@@@@@@@@@2@@@@@@@@@3@@@@@@@@@4
|
||||||
|
|
|
@ -383,8 +383,9 @@ class ViewController: NSViewController {
|
||||||
|
|
||||||
var currentVideoMode = videoMode
|
var currentVideoMode = videoMode
|
||||||
var lastFrameTime = CACurrentMediaTime() as Double
|
var lastFrameTime = CACurrentMediaTime() as Double
|
||||||
var frameCounter : UInt = 0
|
var frameCounter : UInt32 = 0
|
||||||
var clkCounter : Double = 0
|
var clkCounter : Double = 0
|
||||||
|
let fpsHalf = fps / 2
|
||||||
|
|
||||||
var halted = true;
|
var halted = true;
|
||||||
|
|
||||||
|
@ -397,7 +398,7 @@ class ViewController: NSViewController {
|
||||||
|
|
||||||
frameCounter += 1
|
frameCounter += 1
|
||||||
|
|
||||||
if ( frameCounter % UInt(fps) == 0 ) {
|
if ( frameCounter % fps == 0 ) {
|
||||||
let currentTime = CACurrentMediaTime() as Double
|
let currentTime = CACurrentMediaTime() as Double
|
||||||
let elpasedTime = currentTime - lastFrameTime
|
let elpasedTime = currentTime - lastFrameTime
|
||||||
lastFrameTime = currentTime
|
lastFrameTime = currentTime
|
||||||
|
@ -413,7 +414,7 @@ class ViewController: NSViewController {
|
||||||
|
|
||||||
frameCnt += 1
|
frameCnt += 1
|
||||||
|
|
||||||
if ( frameCnt == fps / 2 ) {
|
if ( frameCnt == fpsHalf ) {
|
||||||
// flashingSpace = blockChar
|
// flashingSpace = blockChar
|
||||||
ViewController.charConvTbl = ViewController.charConvTblFlashOn
|
ViewController.charConvTbl = ViewController.charConvTblFlashOn
|
||||||
}
|
}
|
||||||
|
@ -445,44 +446,50 @@ class ViewController: NSViewController {
|
||||||
self.txtArr = self.txtClear
|
self.txtArr = self.txtClear
|
||||||
|
|
||||||
// render an empty space to eiminate displaying text portion of the screen covered by graphics
|
// render an empty space to eiminate displaying text portion of the screen covered by graphics
|
||||||
|
let charDisposition = videoMode.col80 == 0 ? 1 : 2
|
||||||
for y in 0 ..< fromLines {
|
for y in 0 ..< fromLines {
|
||||||
if videoMode.col80 == 0 {
|
self.txtArr[ y * (self.textCols * 2 + self.lineEndChars) + self.textCols * charDisposition] = "\n"
|
||||||
self.txtArr[ y * (self.textCols + self.lineEndChars) + self.textCols ] = "\n"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
self.txtArr[ y * (self.textCols * 2 + self.lineEndChars) + self.textCols * 2] = "\n"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// render the rest of the text screen
|
|
||||||
for y in fromLines ..< toLines {
|
|
||||||
for x in 0 ..< self.textCols {
|
|
||||||
let byte = self.textBufferPointer[ self.textLineOfs[y] + x ]
|
|
||||||
let idx = Int(byte);
|
|
||||||
let chr = ViewController.charConvTbl[idx]
|
|
||||||
|
|
||||||
if videoMode.col80 == 0 {
|
|
||||||
self.txtArr[ y * (self.textCols + self.lineEndChars) + x ] = chr
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
self.txtArr[ y * (self.textCols * 2 + self.lineEndChars) + x * 2 + 1] = chr
|
|
||||||
|
|
||||||
let byte = self.textAuxBufferPointer[ self.textLineOfs[y] + x ]
|
// 40 col
|
||||||
|
if videoMode.col80 == 0 {
|
||||||
|
// render the rest of the text screen
|
||||||
|
for y in fromLines ..< toLines {
|
||||||
|
for x in 0 ..< self.textCols {
|
||||||
|
let byte = self.textBufferPointer[ self.textLineOfs[y] + x ]
|
||||||
let idx = Int(byte);
|
let idx = Int(byte);
|
||||||
let chr = ViewController.charConvTbl[idx]
|
let chr = ViewController.charConvTbl[idx]
|
||||||
|
|
||||||
self.txtArr[ y * (self.textCols * 2 + self.lineEndChars) + x * 2] = chr
|
self.txtArr[ y * (self.textCols + self.lineEndChars) + x ] = chr
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if videoMode.col80 == 0 {
|
|
||||||
self.txtArr[ y * (self.textCols + self.lineEndChars) + self.textCols ] = "\n"
|
self.txtArr[ y * (self.textCols + self.lineEndChars) + self.textCols ] = "\n"
|
||||||
}
|
}
|
||||||
else {
|
}
|
||||||
|
// 80 col
|
||||||
|
else {
|
||||||
|
// render the rest of the text screen
|
||||||
|
for y in fromLines ..< toLines {
|
||||||
|
for x in 0 ..< self.textCols {
|
||||||
|
let byte = self.textBufferPointer[ self.textLineOfs[y] + x ]
|
||||||
|
let idx = Int(byte);
|
||||||
|
let chr = ViewController.charConvTbl[idx]
|
||||||
|
|
||||||
|
self.txtArr[ y * (self.textCols * 2 + self.lineEndChars) + x * 2 + 1] = chr
|
||||||
|
|
||||||
|
let byte2 = self.textAuxBufferPointer[ self.textLineOfs[y] + x ]
|
||||||
|
let idx2 = Int(byte2);
|
||||||
|
let chr2 = ViewController.charConvTbl[idx2]
|
||||||
|
|
||||||
|
self.txtArr[ y * (self.textCols * 2 + self.lineEndChars) + x * 2] = chr2
|
||||||
|
}
|
||||||
|
|
||||||
self.txtArr[ y * (self.textCols * 2 + self.lineEndChars) + self.textCols * 2] = "\n"
|
self.txtArr[ y * (self.textCols * 2 + self.lineEndChars) + self.textCols * 2] = "\n"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
txt = String(self.txtArr)
|
txt = String(self.txtArr)
|
||||||
|
|
||||||
if videoMode.col80 != self.currentVideoMode.col80 {
|
if videoMode.col80 != self.currentVideoMode.col80 {
|
||||||
|
@ -570,8 +577,15 @@ class ViewController: NSViewController {
|
||||||
|
|
||||||
if self.savedVideoMode.text != videoMode.text {
|
if self.savedVideoMode.text != videoMode.text {
|
||||||
self.savedVideoMode.text = videoMode.text
|
self.savedVideoMode.text = videoMode.text
|
||||||
|
|
||||||
self.hires.clearScreen()
|
// self.hires.clearScreen()
|
||||||
|
|
||||||
|
if ( videoMode.text == 0 ) {
|
||||||
|
self.hires.isHidden = false
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
self.hires.isHidden = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// only refresh graphics view when needed (aka not in text mode)
|
// only refresh graphics view when needed (aka not in text mode)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user