mirror of
https://github.com/trudnai/Steve2.git
synced 2025-01-02 03:29:28 +00:00
Disk Accelerator enable soft switch
This commit is contained in:
parent
ccf53fa6a6
commit
3ef337771b
@ -891,10 +891,12 @@ class ViewController: NSViewController {
|
||||
|
||||
@IBAction func QuickDisk(_ sender: NSButton) {
|
||||
if sender.state == .on {
|
||||
diskAccelerator_speed = Int32( 25 * M / Double(fps) )
|
||||
// diskAccelerator_speed = Int32( 25 * M / Double(fps) )
|
||||
diskAccelerator_enabled = 1;
|
||||
}
|
||||
else {
|
||||
diskAccelerator_speed = 0
|
||||
// diskAccelerator_speed = 0
|
||||
diskAccelerator_enabled = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ disk_t disk = {
|
||||
const int diskAccelerator_frames = 2;
|
||||
int diskAccelerator_count = 0;
|
||||
int diskAccelerator_speed = 25 * M / fps; // if less than actual CPU speed means no acceleration
|
||||
|
||||
int diskAccelerator_enabled = 1;
|
||||
|
||||
// motor position from the magnet state
|
||||
// -1 means invalid, not supported
|
||||
@ -68,7 +68,7 @@ const uint8_t log2phy_cpm[16] = {
|
||||
|
||||
|
||||
void disk_accelerator_speedup() {
|
||||
if ( diskAccelerator_speed >= clk_6502_per_frm ) {
|
||||
if ( ( diskAccelerator_enabled ) && ( diskAccelerator_speed >= clk_6502_per_frm ) ) {
|
||||
clk_6502_per_frm =
|
||||
clk_6502_per_frm_max = diskAccelerator_speed; // clk_6502_per_frm_diskAccelerator;
|
||||
diskAccelerator_count = diskAccelerator_frames;
|
||||
|
@ -56,12 +56,7 @@ extern const int position_to_direction[8][8];
|
||||
extern const int diskAccelerator_frames; // number of frames disk acceleration will be on
|
||||
extern int diskAccelerator_count; // counter for the disk acceleration frames
|
||||
extern int diskAccelerator_speed; // if less than the actual CPU speed, no acceleration
|
||||
|
||||
extern int diskAccelerator_count;
|
||||
extern int diskAccelerator_speed;
|
||||
|
||||
//extern const unsigned long long clk_6502_per_frm_diskAccelerator;
|
||||
//extern const unsigned long long clk_diskAcceleratorTimeout;
|
||||
extern int diskAccelerator_enabled;
|
||||
|
||||
extern void disk_phase(void);
|
||||
extern void disk_phase_on( uint8_t currentMagnet );
|
||||
|
Loading…
Reference in New Issue
Block a user