comparison blastem.c @ 374:d42a8a3e4894

Fix YM2612 busy flag
author Mike Pavone <pavone@retrodev.com>
date Sun, 02 Jun 2013 21:12:43 -0700
parents 5dcf7551bb36
children 1c8d74f2ab0b
comparison
equal deleted inserted replaced
373:91d28a868551 374:d42a8a3e4894
197 uint32_t mclks = context->current_cycle * MCLKS_PER_68K; 197 uint32_t mclks = context->current_cycle * MCLKS_PER_68K;
198 sync_z80(z_context, mclks); 198 sync_z80(z_context, mclks);
199 if (mclks >= mclks_per_frame) { 199 if (mclks >= mclks_per_frame) {
200 ym_run(gen->ym, context->current_cycle); 200 ym_run(gen->ym, context->current_cycle);
201 gen->ym->current_cycle -= mclks_per_frame/MCLKS_PER_68K; 201 gen->ym->current_cycle -= mclks_per_frame/MCLKS_PER_68K;
202 if (gen->ym->write_cycle != CYCLE_NEVER) {
203 gen->ym->write_cycle = gen->ym->write_cycle >= mclks_per_frame/MCLKS_PER_68K ? gen->ym->write_cycle - mclks_per_frame/MCLKS_PER_68K : 0;
204 }
202 //printf("reached frame end | 68K Cycles: %d, MCLK Cycles: %d\n", context->current_cycle, mclks); 205 //printf("reached frame end | 68K Cycles: %d, MCLK Cycles: %d\n", context->current_cycle, mclks);
203 vdp_run_context(v_context, mclks_per_frame); 206 vdp_run_context(v_context, mclks_per_frame);
204 psg_run(gen->psg, mclks/MCLKS_PER_PSG); 207 psg_run(gen->psg, mclks/MCLKS_PER_PSG);
205 gen->psg->cycles -= mclks_per_frame/MCLKS_PER_PSG; 208 gen->psg->cycles -= mclks_per_frame/MCLKS_PER_PSG;
206 if (!headless) { 209 if (!headless) {