X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fsh2mame%2Fsh2pico.c;h=fb4bea63ea0c13400f5e052dec1b439b937f502c;hb=2ea2cbfe8ba1607505f4fa7a4b4e9074c6337066;hp=463261ec5940dcfa9aa4075fd457162cd4d773b5;hpb=1b3f58449285f3cfcc8ae0e1aefdada44a9e9bc5;p=picodrive.git diff --git a/cpu/sh2mame/sh2pico.c b/cpu/sh2mame/sh2pico.c index 463261e..fb4bea6 100644 --- a/cpu/sh2mame/sh2pico.c +++ b/cpu/sh2mame/sh2pico.c @@ -55,8 +55,6 @@ void sh2_reset(SH2 *sh2) sh2->pc = RL(0); sh2->r[15] = RL(4); sh2->sr = I; - - sh2->internal_irq_level = -1; } /* Execute cycles - returns number of cycles actually run */ @@ -64,6 +62,7 @@ int sh2_execute(SH2 *sh2_, int cycles) { sh2 = sh2_; sh2_icount = cycles; + sh2->cycles_aim += cycles; do { @@ -112,7 +111,7 @@ int sh2_execute(SH2 *sh2_, int cycles) } sh2_icount--; } - while (sh2_icount > 0); + while (sh2_icount > 0 || sh2->delay); /* can't interrupt before delay */ return cycles - sh2_icount; }