[SPU] Emulate SPUSTAT[5:0] as a mirror of SPUCNT[5:0] (#190)
authorgameblabla <gameblabla@users.noreply.github.com>
Wed, 18 Aug 2021 20:58:45 +0000 (20:58 +0000)
committerGitHub <noreply@github.com>
Wed, 18 Aug 2021 20:58:45 +0000 (23:58 +0300)
Fix is from PCSX-Redux :
https://github.com/grumpycoders/pcsx-redux/commit/4e905d7953a26bffd52f486dc5b03c2a19075d01

I have tested the fix against Loonies 8192 (a PSn00bSDK made homebrew game) and it no longer
locks up during loading.

Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
plugins/dfsound/registers.c

index bb64658..d508c06 100644 (file)
@@ -315,7 +315,7 @@ unsigned short CALLBACK SPUreadRegister(unsigned long reg)
      return spu.spuCtrl;\r
 \r
     case H_SPUstat:\r
-     return spu.spuStat;\r
+     return (spu.spuStat & ~0x3F) | (spu.spuCtrl & 0x3F);\r
         \r
     case H_SPUaddr:\r
      return (unsigned short)(spu.spuAddr>>3);\r