mirror of
https://github.com/trudnai/Steve2.git
synced 2024-06-12 18:45:22 +00:00
- 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:
parent
961708373c
commit
303de91fc6
|
@ -61,8 +61,8 @@
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Release"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = ""
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
useCustomWorkingDirectory = "NO"
|
useCustomWorkingDirectory = "NO"
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
|
|
@ -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) {
|
required init?(coder aDecoder: NSCoder) {
|
||||||
super.init(coder: aDecoder)
|
super.init(coder: aDecoder)
|
||||||
initHiResLineAddresses()
|
initHiResLineAddresses()
|
||||||
HiRes.context?.clear( CGRect(x: 0, y: 0, width: frame.width, height: frame.height) )
|
clearScreen()
|
||||||
|
|
||||||
// currentContext?.setShouldAntialias(false)
|
// currentContext?.setShouldAntialias(false)
|
||||||
// currentContext?.interpolationQuality = CGInterpolationQuality.none
|
// currentContext?.interpolationQuality = CGInterpolationQuality.none
|
||||||
|
|
|
@ -288,6 +288,10 @@ class ViewController: NSViewController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var savedVideoMode = videoMode_t.init()
|
||||||
|
|
||||||
|
|
||||||
override func keyUp(with event: NSEvent) {
|
override func keyUp(with event: NSEvent) {
|
||||||
print("KBD Event")
|
print("KBD Event")
|
||||||
// switch event.modifierFlags.intersection(.deviceIndependentFlagsMask) {
|
// 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: 400, y: 600, width: 50, height: 50) )
|
||||||
// self.hires.setNeedsDisplay( CGRect(x: 500, 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)
|
// only refresh graphics view when needed (aka not in text mode)
|
||||||
if ( videoMode.text == 0 ) {
|
if ( videoMode.text == 0 ) {
|
||||||
// self.hires.needsDisplay = true
|
// self.hires.needsDisplay = true
|
||||||
|
|
|
@ -841,7 +841,9 @@ void m6502_ColdReset( const char * bundlePath, const char * romFileName ) {
|
||||||
mhz = (double)MHz_6502 / M;
|
mhz = (double)MHz_6502 / M;
|
||||||
|
|
||||||
unsigned long long saved_frm_set = clk_6502_per_frm_set;
|
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
|
// wait 100ms to be sure simulation has been halted
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
|
@ -1005,8 +1007,9 @@ void m6502_ColdReset( const char * bundlePath, const char * romFileName ) {
|
||||||
// memcpy( RAM + 0x1000, counter_fast, sizeof(counter));
|
// memcpy( RAM + 0x1000, counter_fast, sizeof(counter));
|
||||||
// m6502.PC = 0x1000;
|
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user