mirror of
https://github.com/trudnai/Steve2.git
synced 2025-01-03 10:29:32 +00:00
Turn off disk acceleration immediately when there is a sound
This commit is contained in:
parent
d008094078
commit
17927f4ab0
@ -16,6 +16,7 @@
|
||||
|
||||
#include "speaker.h"
|
||||
#include "6502.h"
|
||||
#include "disk.h" // to be able to disable disk acceleration
|
||||
|
||||
|
||||
#define min(x,y) (x) < (y) ? (x) : (y)
|
||||
@ -143,6 +144,12 @@ void spkr_toggle() {
|
||||
|
||||
spkr_play_time = 0;
|
||||
|
||||
if ( diskAccelerator_count ) {
|
||||
// turn off disk acceleration immediately
|
||||
diskAccelerator_count = 0;
|
||||
clk_6502_per_frm = clk_6502_per_frm_max = clk_6502_per_frm_set;
|
||||
}
|
||||
|
||||
if ( clk_6502_per_frm_set < clk_6502_per_frm_max_sound ) {
|
||||
|
||||
spkr_play_time = spkr_play_timeout;
|
||||
|
@ -57,6 +57,9 @@ extern const int diskAccelerator_frames; // number of frames disk acceleratio
|
||||
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 const unsigned long long clk_6502_per_frm_diskAccelerator;
|
||||
//extern const unsigned long long clk_diskAcceleratorTimeout;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user