X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=picodrive.git;a=blobdiff_plain;f=pico%2Fpico_cmn.c;fp=pico%2Fpico_cmn.c;h=1f89da905973081253ee36ff8223ea6238ba0228;hp=95b6b10376bec92551b2f45e06686ef6cb04e417;hb=0a0073dc9fae7d867d737623d30917cc4b285b16;hpb=ee3c39efd2cf51cd654b6240f6fb595673f10f45 diff --git a/pico/pico_cmn.c b/pico/pico_cmn.c index 95b6b10..1f89da9 100644 --- a/pico/pico_cmn.c +++ b/pico/pico_cmn.c @@ -113,9 +113,7 @@ static int PicoFrameHints(void) z80_resetCycles(); PsndStartFrame(); - // Load H-Int counter - hint = (pv->status & PVS_ACTIVE) ? pv->hint_cnt : pv->reg[10]; - + hint = pv->hint_cnt; pv->status |= PVS_ACTIVE; for (y = 0; ; y++) @@ -306,11 +304,14 @@ static int PicoFrameHints(void) PAD_DELAY(); - if ((pv->status & PVS_ACTIVE) && --hint < 0) - { - hint = pv->reg[10]; // Reload H-Int counter - do_hint(pv); + if (unlikely(pv->status & PVS_ACTIVE)) { + if (--hint < 0) { + hint = pv->reg[10]; // Reload H-Int counter + do_hint(pv); + } } + else + hint = pv->reg[10]; // Run scanline: Pico.t.m68c_line_start = Pico.t.m68c_aim;