- Startup speed is set by ColdReset, so it will work always

- HiRes screen is being cleared when switched back to text mode
- Turned off Debug app for Release mode
This commit is contained in:
tudnai 2020-05-05 23:03:36 -07:00
parent 961708373c
commit 303de91fc6
4 changed files with 25 additions and 6 deletions

View File

@ -61,8 +61,8 @@
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"

View File

@ -129,12 +129,18 @@ class HiRes: NSView {
}
}
}
func clearScreen() {
HiRes.context?.clear( CGRect(x: 0, y: 0, width: frame.width, height: frame.height) )
needsDisplay = true
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
initHiResLineAddresses()
HiRes.context?.clear( CGRect(x: 0, y: 0, width: frame.width, height: frame.height) )
clearScreen()
// currentContext?.setShouldAntialias(false)
// currentContext?.interpolationQuality = CGInterpolationQuality.none

View File

@ -288,6 +288,10 @@ class ViewController: NSViewController {
}
var savedVideoMode = videoMode_t.init()
override func keyUp(with event: NSEvent) {
print("KBD Event")
// switch event.modifierFlags.intersection(.deviceIndependentFlagsMask) {
@ -564,6 +568,12 @@ class ViewController: NSViewController {
// self.hires.setNeedsDisplay( CGRect(x: 400, y: 600, width: 50, height: 50) )
// self.hires.setNeedsDisplay( CGRect(x: 500, y: 600, width: 50, height: 50) )
if self.savedVideoMode.text != videoMode.text {
self.savedVideoMode.text = videoMode.text
self.hires.clearScreen()
}
// only refresh graphics view when needed (aka not in text mode)
if ( videoMode.text == 0 ) {
// self.hires.needsDisplay = true

View File

@ -841,7 +841,9 @@ void m6502_ColdReset( const char * bundlePath, const char * romFileName ) {
mhz = (double)MHz_6502 / M;
unsigned long long saved_frm_set = clk_6502_per_frm_set;
clk_6502_per_frm_max = clk_6502_per_frm_set = 0;
clk_6502_per_frm =
clk_6502_per_frm_max =
clk_6502_per_frm_set = 0;
// wait 100ms to be sure simulation has been halted
usleep(100000);
@ -1005,8 +1007,9 @@ void m6502_ColdReset( const char * bundlePath, const char * romFileName ) {
// memcpy( RAM + 0x1000, counter_fast, sizeof(counter));
// m6502.PC = 0x1000;
clk_6502_per_frm_set = saved_frm_set;
clk_6502_per_frm_set = saved_frm_set;
clk_6502_per_frm = startup_MHz_6502 / fps;
diskAccelerator_count = 15;
}