[SPU] Emulate SPUSTAT[5:0] as a mirror of SPUCNT[5:0]
authorgameblabla <gameblabla@protonmail.com>
Thu, 19 Aug 2021 04:26:28 +0000 (06:26 +0200)
committergameblabla <gameblabla@protonmail.com>
Thu, 19 Aug 2021 04:26:28 +0000 (06:26 +0200)
Fix is from PCSX-Redux :
grumpycoders/pcsx-redux@4e905d7

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