X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fsh2%2Fmame%2Fsh2pico.c;h=1a70d431c70df60a8aab3b4f8fd57603ce27c595;hb=bf092a3631694f525c3d1179b21ab8941e87e7d7;hp=97557e94927e1ad7e3816f90aba52f9f63681a14;hpb=8cc76b48865096cff1024d1d7cfb4123bf7daba7;p=picodrive.git diff --git a/cpu/sh2/mame/sh2pico.c b/cpu/sh2/mame/sh2pico.c index 97557e9..1a70d43 100644 --- a/cpu/sh2/mame/sh2pico.c +++ b/cpu/sh2/mame/sh2pico.c @@ -88,12 +88,14 @@ int sh2_execute(SH2 *sh2, int cycles) { #ifdef DRC_CMP if (!sh2->delay) { - if (sh2->pc < base_pc || sh2->pc > end_pc) { + if (sh2->pc < base_pc || sh2->pc >= end_pc) { base_pc = sh2->pc; scan_block(base_pc, sh2->is_slave, - op_flags, &end_pc); + op_flags, &end_pc, NULL); } - if ((OP_FLAGS(sh2->pc) & OF_BTARGET) || sh2->pc == base_pc) { + if ((op_flags[(sh2->pc - base_pc) / 2] + & OF_BTARGET) || sh2->pc == base_pc) + { if (sh2->icount < 0) break; }