From: notaz Date: Mon, 30 Oct 2023 23:43:12 +0000 (+0200) Subject: spu: sync on koff X-Git-Tag: r24~73 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32fbd56b83ec74d8bcb54e1f732b6140cb90da7e;p=pcsx_rearmed.git spu: sync on koff otherwise problems with FIFA99 --- diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c index b8620268..05968b61 100644 --- a/plugins/dfsound/registers.c +++ b/plugins/dfsound/registers.c @@ -230,6 +230,7 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val, log_unhandled("koff1 %04x %d\n", val, cycles - spu.last_keyon_cycles); val &= ~regAreaGet(H_SPUon1); } + do_samples_if_needed(cycles, 0, 2); SoundOff(0,16,val); break; //-------------------------------------------------// @@ -239,6 +240,7 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val, log_unhandled("koff2 %04x %d\n", val, cycles - spu.last_keyon_cycles); val &= ~regAreaGet(H_SPUon2); } + do_samples_if_needed(cycles, 0, 2); SoundOff(16,24,val); break; //-------------------------------------------------// diff --git a/plugins/dfsound/spu.c b/plugins/dfsound/spu.c index 057502e4..8e4ae177 100644 --- a/plugins/dfsound/spu.c +++ b/plugins/dfsound/spu.c @@ -211,7 +211,7 @@ static int check_irq(int ch, unsigned char *pos) { if((spu.spuCtrl & (CTRL_ON|CTRL_IRQ)) == (CTRL_ON|CTRL_IRQ) && pos == spu.pSpuIrq) { - //printf("ch%d irq %04x\n", ch, pos - spu.spuMemC); + //printf("ch%d irq %04zx\n", ch, pos - spu.spuMemC); do_irq(); return 1; }