- Initial ROM acceleration removed from the Power Cycle to have a better feeling of a retro computer

- Improved Power Cycle animation
This commit is contained in:
tudnai 2020-05-09 14:40:42 -07:00
parent 2fd25d0c66
commit 3b0f9f9aed
4 changed files with 22 additions and 19 deletions

View File

@ -102,18 +102,22 @@ class ViewController: NSViewController {
var workItem : DispatchWorkItem? = nil;
@IBAction func Power(_ sender: Any) {
upd.suspend()
halted = true
//------------------------------------------------------------
// Animated Splash Screen fade out and (Text) Monitor fade in
hires.isHidden = true
displayField.alphaValue = 0
displayField.isHidden = false
splashScreen.alphaValue = 1
splashScreen.isHidden = false
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
NSAnimationContext.runAnimationGroup({ (context) in
context.duration = 1.0
context.duration = 0.5
// Use the value you want to animate to (NOT the starting value)
self.displayField.animator().alphaValue = 1
self.splashScreen.animator().alphaValue = 0
@ -122,6 +126,11 @@ class ViewController: NSViewController {
self.displayField.alphaValue = 1
self.splashScreen.isHidden = true
})
m6502_ColdReset( Bundle.main.resourcePath, ViewController.romFileName )
self.halted = false
self.upd.resume()
}
//------------------------------------------------------------
@ -141,15 +150,8 @@ class ViewController: NSViewController {
DispatchQueue.global().async(execute: workItem!);
}
#else
upd.suspend()
halted = true
usleep(100000);
m6502_ColdReset( Bundle.main.resourcePath, ViewController.romFileName )
halted = false
upd.resume()
#endif
}

View File

@ -37,7 +37,7 @@ unsigned long long int inst_cnt = 0;
const unsigned long long default_MHz_6502 = 1.023 * M; // 2 * M; // 4 * M; // 8 * M; // 16 * M; // 128 * M; // 256 * M; // 512 * M;
const unsigned long long startup_MHz_6502 = 32 * M;
unsigned long long MHz_6502 = default_MHz_6502;
unsigned long long clk_6502_per_frm = startup_MHz_6502 / fps;
unsigned long long clk_6502_per_frm = default_MHz_6502 / fps;
unsigned long long clk_6502_per_frm_set = default_MHz_6502 / fps;
unsigned long long clk_6502_per_frm_max = 0;
@ -1008,13 +1008,10 @@ 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 = startup_MHz_6502 / fps;
diskAccelerator_count = 15;
// set the default speed
clk_6502_per_frm_set = clk_6502_per_frm = default_MHz_6502 / fps;
}

View File

@ -18,7 +18,7 @@ disk_t disk = {
};
const int diskAccelerator_frames = 2;
int diskAccelerator_count = 15;
int diskAccelerator_count = 0;
int diskAccelerator_speed = 25 * M / fps; // less than actual CPU speed means no acceleration
//const unsigned long long clk_6502_per_frm_diskAccelerator = 25 * M / fps; // disk acceleration bumps up CPU clock to 25 MHz
//const unsigned long long clk_diskAcceleratorTimeout = 1000ULL;

View File

@ -318,6 +318,10 @@ void resetMemory() {
// 64K Main Memory Area
memset( Apple2_64K_RAM, 0, sizeof(Apple2_64K_RAM) );
memset( Apple2_64K_MEM, 0, sizeof(Apple2_64K_MEM) );
// text memory should be filled by spaces
memset( Apple2_64K_AUX + 0x400, 0xA0, 0x800 );
memset( Apple2_64K_RAM + 0x400, 0xA0, 0x800 );
memset( Apple2_64K_MEM + 0x400, 0xA0, 0x800 );
// I/O area should be 0 -- just in case we decide to init RAM with a different pattern...
memset( Apple2_64K_RAM + 0xC000, 0, 0x1000 );
}