comparison blastem.c @ 321:146c87616b05

Don't update interrupt mask on non-interrupt exceptions
author Mike Pavone <pavone@retrodev.com>
date Sat, 11 May 2013 21:19:31 -0700
parents e5e8b48ad157
children 1b00258b1f29
comparison
equal deleted inserted replaced
320:67b6d351df0e 321:146c87616b05
178 } 178 }
179 } else { 179 } else {
180 z_context->current_cycle = mclks / MCLKS_PER_Z80; 180 z_context->current_cycle = mclks / MCLKS_PER_Z80;
181 } 181 }
182 } 182 }
183 183 uint32_t frame=0;
184 m68k_context * sync_components(m68k_context * context, uint32_t address) 184 m68k_context * sync_components(m68k_context * context, uint32_t address)
185 { 185 {
186 //TODO: Handle sync targets smaller than a single frame 186 //TODO: Handle sync targets smaller than a single frame
187 genesis_context * gen = context->system; 187 genesis_context * gen = context->system;
188 vdp_context * v_context = gen->vdp; 188 vdp_context * v_context = gen->vdp;
195 //printf("reached frame end | 68K Cycles: %d, MCLK Cycles: %d\n", context->current_cycle, mclks); 195 //printf("reached frame end | 68K Cycles: %d, MCLK Cycles: %d\n", context->current_cycle, mclks);
196 vdp_run_context(v_context, MCLKS_PER_FRAME); 196 vdp_run_context(v_context, MCLKS_PER_FRAME);
197 if (!headless) { 197 if (!headless) {
198 break_on_sync |= wait_render_frame(v_context); 198 break_on_sync |= wait_render_frame(v_context);
199 } 199 }
200 frame++;
200 mclks -= MCLKS_PER_FRAME; 201 mclks -= MCLKS_PER_FRAME;
201 vdp_adjust_cycles(v_context, MCLKS_PER_FRAME); 202 vdp_adjust_cycles(v_context, MCLKS_PER_FRAME);
202 io_adjust_cycles(&gamepad_1, context->current_cycle, MCLKS_PER_FRAME/MCLKS_PER_68K); 203 io_adjust_cycles(&gamepad_1, context->current_cycle, MCLKS_PER_FRAME/MCLKS_PER_68K);
203 io_adjust_cycles(&gamepad_2, context->current_cycle, MCLKS_PER_FRAME/MCLKS_PER_68K); 204 io_adjust_cycles(&gamepad_2, context->current_cycle, MCLKS_PER_FRAME/MCLKS_PER_68K);
204 context->current_cycle -= MCLKS_PER_FRAME/MCLKS_PER_68K; 205 context->current_cycle -= MCLKS_PER_FRAME/MCLKS_PER_68K;