Mercurial > repos > blastem
comparison blastem.c @ 661:01c51f397db2
Adjust 68K sync cycle when mclk_target gets adjusted
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 01 Jan 2015 22:52:18 -0800 |
parents | e7cae6d9aaa6 |
children | 30ccf56842d6 |
comparison
equal
deleted
inserted
replaced
660:e7cae6d9aaa6 | 661:01c51f397db2 |
---|---|
305 } | 305 } |
306 if (mclks) { | 306 if (mclks) { |
307 vdp_run_context(v_context, mclks); | 307 vdp_run_context(v_context, mclks); |
308 } | 308 } |
309 mclk_target = vdp_cycles_to_frame_end(v_context); | 309 mclk_target = vdp_cycles_to_frame_end(v_context); |
310 context->sync_cycle = mclk_target/MCLKS_PER_68K; | |
310 } else { | 311 } else { |
311 //printf("running VDP for %d cycles\n", mclks - v_context->cycles); | 312 //printf("running VDP for %d cycles\n", mclks - v_context->cycles); |
312 vdp_run_context(v_context, mclks); | 313 vdp_run_context(v_context, mclks); |
313 sync_sound(gen, mclks); | 314 sync_sound(gen, mclks); |
314 } | 315 } |