- Adjusted disk accelerator (back to 2 frames)

- Removed some debug prints
- Adjusted speaker extra buffer
This commit is contained in:
tudnai 2020-06-08 21:12:40 -07:00
parent f2f725b8c5
commit a73fb79792
3 changed files with 5 additions and 4 deletions

View File

@ -69,7 +69,7 @@ ALuint spkr_buffers[BUFFER_COUNT];
const int spkr_fps = fps;
const int spkr_seconds = 1;
const unsigned spkr_sample_rate = 44100;
unsigned spkr_extra_buf = 780 / fps;
unsigned spkr_extra_buf = 800 / fps;
const unsigned spkr_buf_size = spkr_seconds * spkr_sample_rate * 2 / spkr_fps;
int16_t spkr_samples [ spkr_buf_size * spkr_fps * BUFFER_COUNT * 2]; // stereo
unsigned spkr_sample_idx = 0;

View File

@ -18,7 +18,7 @@ disk_t disk = {
0, // clk_since_last_read
};
const int diskAccelerator_frames = 1;
const int diskAccelerator_frames = 2;
int diskAccelerator_count = 0;
int diskAccelerator_speed = 25 * M / fps; // if less than actual CPU speed means no acceleration
@ -68,7 +68,8 @@ void disk_phase() {
disk.phase.count = maxDiskPhaseNum;
}
spkr_toggle();
// TODO: Add track positioning sfx
// spkr_toggle();
// printf("Head Position: p:%d d:%d l:%d: ph:%u)\n", position, direction, lastPosition, disk.phase.count);

View File

@ -383,7 +383,7 @@ uint8_t woz_read() {
uint16_t usedBytes = woz_trks[track].bytes_used < WOZ_TRACK_BYTE_COUNT ? woz_trks[track].bytes_used : WOZ_TRACK_BYTE_COUNT;
if ( usedBytes ) {
if ( clkelpased > clkBeforeAdjusting ) {
printf("NEED SYNC : %llu (clkBefRd:%d)\n", clkelpased, clkBeforeSync);
// printf("NEED SYNC : %llu (clkBefRd:%d)\n", clkelpased, clkBeforeSync);
clkBeforeSync = 0;
bitOffset = (clkelpased >> 2) & 7;
trackOffset += clkelpased >> 5;