diff --git a/plugins/spu2-x/src/RegTable.cpp b/plugins/spu2-x/src/RegTable.cpp index abcb754de7..5c4bd4cc8d 100644 --- a/plugins/spu2-x/src/RegTable.cpp +++ b/plugins/spu2-x/src/RegTable.cpp @@ -122,7 +122,7 @@ u16 const* const regtable_original[0x401] = PREVB_REG(0,MIX_DEST_B1), PCORE(0,EffectsEndA)+1, - NULL, + PCORE(0,EffectsEndA), PCORE(0,Regs.ENDX), PCORE(0,Regs.ENDX)+1, @@ -225,7 +225,7 @@ u16 const* const regtable_original[0x401] = PREVB_REG(1,MIX_DEST_B1), PCORE(1,EffectsEndA)+1, - NULL, + PCORE(1,EffectsEndA), PCORE(1,Regs.ENDX), PCORE(1,Regs.ENDX)+1, diff --git a/plugins/spu2-x/src/spu2sys.cpp b/plugins/spu2-x/src/spu2sys.cpp index 0a1b5dcf6a..e6baed1715 100644 --- a/plugins/spu2-x/src/spu2sys.cpp +++ b/plugins/spu2-x/src/spu2sys.cpp @@ -1159,15 +1159,11 @@ static void __fastcall RegWrite_Core( u16 value ) break; case REG_S_ENDX: - // If writing any value other than 0 ENDX becomes 0. - if (value) - thiscore.Regs.ENDX = 0; + thiscore.Regs.ENDX &= 0xff0000; break; case (REG_S_ENDX + 2): - // If writing any value other than 0 ENDX becomes 0. - if (value) - thiscore.Regs.ENDX = 0; + thiscore.Regs.ENDX &= 0xffff; break; // Reverb Start and End Address Writes! @@ -1319,6 +1315,10 @@ static void __fastcall RegWrite_Raw( u16 value ) *(regtable[addr>>1]) = value; } +static void __fastcall RegWrite_Null( u16 value ) +{ +} + // -------------------------------------------------------------------------------------- // Macros for tbl_reg_writes // -------------------------------------------------------------------------------------- @@ -1413,7 +1413,7 @@ static RegWriteHandler * const tbl_reg_writes[0x401] = ReverbPair(0,R_MIX_DEST_B0), // 0x0334 ReverbPair(0,R_MIX_DEST_B1), // 0x0338 - RegWrite_Core<0,REG_A_EEA>, NULL, + RegWrite_Core<0,REG_A_EEA>, RegWrite_Null, CoreParamsPair(0,REG_S_ENDX), // 0x0340 // End Point passed flag RegWrite_Core<0,REG_P_STATX>, // 0x0344 // Status register? @@ -1503,7 +1503,7 @@ static RegWriteHandler * const tbl_reg_writes[0x401] = ReverbPair(1,R_MIX_DEST_B0), // 0x0334 ReverbPair(1,R_MIX_DEST_B1), // 0x0338 - RegWrite_Core<1,REG_A_EEA>, NULL, + RegWrite_Core<1,REG_A_EEA>, RegWrite_Null, CoreParamsPair(1,REG_S_ENDX), // 0x0340 // End Point passed flag RegWrite_Core<1,REG_P_STATX>, // 0x0344 // Status register?