From: kub Date: Fri, 17 Jul 2020 17:25:51 +0000 (+0200) Subject: audio, fix for speed regression after last commit X-Git-Tag: v2.00~703 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e5cbf5b6a24a39366c4ead8e67fe23aef98271c;p=picodrive.git audio, fix for speed regression after last commit --- diff --git a/pico/memory.c b/pico/memory.c index ff41ac96..aef3ee8e 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -1009,8 +1009,6 @@ static int ym2612_write_local(u32 a, u32 d, int is_from_z80) int old_mode = ym2612.OPN.ST.mode; int cycles = is_from_z80 ? z80_cyclesDone() : z80_cycles_from_68k(); - if (ym2612.OPN.ST.mode != d) - PsndDoFM(cycles); ym2612.OPN.ST.mode = d; elprintf(EL_YMTIMER, "st mode %02x", d); @@ -1028,6 +1026,7 @@ static int ym2612_write_local(u32 a, u32 d, int is_from_z80) #ifdef __GP2X__ if (PicoIn.opt & POPT_EXT_FM) return YM2612Write_940(a, d, get_scanline(is_from_z80)); #endif + PsndDoFM(cycles); return 1; } return 0; @@ -1069,7 +1068,6 @@ static int ym2612_write_local(u32 a, u32 d, int is_from_z80) #define ym2612_read_local() \ - PsndDoFM(xcycles>>8); \ if (xcycles >= Pico.t.timer_a_next_oflow) \ ym2612.OPN.ST.status |= (ym2612.OPN.ST.mode >> 2) & 1; \ if (xcycles >= Pico.t.timer_b_next_oflow) \