From 3fc2a4c27be8c8cd5f8cf53a0d56c263275b8501 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 27 Jul 2011 20:06:46 +0300 Subject: spu: simplify irq and flag handling shalma's recent work taken into account when working on this. NOT verified on read hardware. --- plugins/dfsound/registers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/dfsound/registers.c') diff --git a/plugins/dfsound/registers.c b/plugins/dfsound/registers.c index c36c27e..ac495d6 100644 --- a/plugins/dfsound/registers.c +++ b/plugins/dfsound/registers.c @@ -191,6 +191,8 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val) break; //-------------------------------------------------// case H_SPUctrl: + if(!(spuCtrl & CTRL_IRQ)) + spuStat&=~STAT_IRQ; spuCtrl=val; break; //-------------------------------------------------// @@ -214,7 +216,7 @@ void CALLBACK SPUwriteRegister(unsigned long reg, unsigned short val) //-------------------------------------------------// case H_SPUirqAddr: spuIrq = val; - pSpuIrq=spuMemC+((unsigned long) val<<3); + pSpuIrq=spuMemC+(((unsigned long) val<<3)&~0xf); break; //-------------------------------------------------// case H_SPUrvolL: -- cgit v1.2.3