MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / spu2M_Write

Function spu2M_Write

pcsx2/SPU2/spu2sys.cpp:78–93  ·  view source on GitHub ↗

writes a signed value to the SPU2 ram Invalidates the ADPCM cache in the process.

Source from the content-addressed store, hash-verified

76// writes a signed value to the SPU2 ram
77// Invalidates the ADPCM cache in the process.
78__forceinline void spu2M_Write(u32 addr, s16 value)
79{
80 // Make sure the cache is invalidated:
81 // (note to self : addr address WORDs, not bytes)
82
83 addr &= 0xfffff;
84 if (addr >= SPU2_DYN_MEMLINE)
85 {
86 const int cacheIdx = addr / pcm_WordsPerBlock;
87 pcm_cache_data[cacheIdx].Validated = false;
88
89 if (SPU2::MsgToConsole() && SPU2::MsgCache())
90 SPU2::ConLog("* SPU2: PcmCache Block Clear at 0x%x (cacheIdx=0x%x)\n", addr, cacheIdx);
91 }
92 *GetMemPtr(addr) = value;
93}
94
95// writes an unsigned value to the SPU2 ram
96__forceinline void spu2M_Write(u32 addr, u16 value)

Callers 1

DmaWriteMethod · 0.85

Calls 4

MsgToConsoleFunction · 0.85
MsgCacheFunction · 0.85
ConLogFunction · 0.85
GetMemPtrFunction · 0.85

Tested by

no test coverage detected