comparison genesis.c @ 2080:bafb757e1cd2

Implement CD audio
author Michael Pavone <pavone@retrodev.com>
date Wed, 02 Feb 2022 01:10:07 -0800
parents 8ee7ecbf3f21
children 372625dd9590
comparison
equal deleted inserted replaced
2079:5a2b759f6b2d 2080:bafb757e1cd2
400 uint32_t cur_target = gen->psg->cycles + MAX_SOUND_CYCLES; 400 uint32_t cur_target = gen->psg->cycles + MAX_SOUND_CYCLES;
401 //printf("Running PSG to cycle %d\n", cur_target); 401 //printf("Running PSG to cycle %d\n", cur_target);
402 psg_run(gen->psg, cur_target); 402 psg_run(gen->psg, cur_target);
403 //printf("Running YM-2612 to cycle %d\n", cur_target); 403 //printf("Running YM-2612 to cycle %d\n", cur_target);
404 ym_run(gen->ym, cur_target); 404 ym_run(gen->ym, cur_target);
405 if (gen->expansion) {
406 scd_run(gen->expansion, gen_cycle_to_scd(cur_target, gen));
407 }
405 } 408 }
406 psg_run(gen->psg, target); 409 psg_run(gen->psg, target);
407 ym_run(gen->ym, target); 410 ym_run(gen->ym, target);
411 if (gen->expansion) {
412 scd_run(gen->expansion, gen_cycle_to_scd(target, gen));
413 }
408 414
409 //printf("Target: %d, YM bufferpos: %d, PSG bufferpos: %d\n", target, gen->ym->buffer_pos, gen->psg->buffer_pos * 2); 415 //printf("Target: %d, YM bufferpos: %d, PSG bufferpos: %d\n", target, gen->ym->buffer_pos, gen->psg->buffer_pos * 2);
410 } 416 }
411 417
412 //My refresh emulation isn't currently good enough and causes more problems than it solves 418 //My refresh emulation isn't currently good enough and causes more problems than it solves