X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2F32x%2F32x.c;h=14d1c8473df12a0c2f404bdb6e24b997e7c966c2;hb=ebf923683facb316a0e9fc8d26a7a0b4e4bacbfc;hp=e95fccdde27d707f58e8875b31ce5ae6a647bc98;hpb=fa8fb7544593a0ed43f3354cc5f41150464b55bf;p=picodrive.git diff --git a/pico/32x/32x.c b/pico/32x/32x.c index e95fccd..14d1c84 100644 --- a/pico/32x/32x.c +++ b/pico/32x/32x.c @@ -203,7 +203,6 @@ void PicoUnload32x(void) void PicoReset32x(void) { if (PicoAHW & PAHW_32X) { - msh2.m68krcycles_done = ssh2.m68krcycles_done = SekCyclesDone(); p32x_trigger_irq(NULL, SekCyclesDone(), P32XI_VRES); p32x_sh2_poll_event(&msh2, SH2_IDLE_STATES, 0); p32x_sh2_poll_event(&ssh2, SH2_IDLE_STATES, 0); @@ -295,9 +294,9 @@ typedef void (event_cb)(unsigned int now); unsigned int p32x_event_times[P32X_EVENT_COUNT]; static unsigned int event_time_next; static event_cb *p32x_event_cbs[P32X_EVENT_COUNT] = { - [P32X_EVENT_PWM] = p32x_pwm_irq_event, - [P32X_EVENT_FILLEND] = fillend_event, - [P32X_EVENT_HINT] = hint_event, + p32x_pwm_irq_event, + fillend_event, + hint_event, }; // schedule event at some time 'after', in m68k clocks @@ -364,7 +363,7 @@ static void p32x_run_events(unsigned int until) oldest, event_time_next); } -static inline void run_sh2(SH2 *sh2, int m68k_cycles) +static INLINE void run_sh2(SH2 *sh2, int m68k_cycles) { int cycles, done; @@ -548,6 +547,9 @@ void PicoFrame32x(void) p32x_sh2_poll_event(&msh2, SH2_STATE_VPOLL, 0); p32x_sh2_poll_event(&ssh2, SH2_STATE_VPOLL, 0); + if (PicoAHW & PAHW_MCD) + pcd_prepare_frame(); + PicoFrameStart(); PicoFrameHints(); sh2_drc_frame();