From 32fbd56b83ec74d8bcb54e1f732b6140cb90da7e Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 31 Oct 2023 01:43:12 +0200 Subject: [PATCH] spu: sync on koff otherwise problems with FIFA99 --- plugins/dfsound/registers.c | 2 ++ plugins/dfsound/spu.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.39.2