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

Function spu2M_WriteFast

pcsx2/SPU2/Mixer.cpp:352–368  ·  view source on GitHub ↗

writes a signed value to the SPU2 ram Performs no cache invalidation -- use only for dynamic memory ranges of the SPU2 (between 0x0000 and SPU2_DYN_MEMLINE)

Source from the content-addressed store, hash-verified

350// Performs no cache invalidation -- use only for dynamic memory ranges
351// of the SPU2 (between 0x0000 and SPU2_DYN_MEMLINE)
352static __forceinline void spu2M_WriteFast(u32 addr, s16 value)
353{
354 // Fixes some of the oldest hangs in pcsx2's history! :p
355 for (int i = 0; i < 2; i++)
356 {
357 if (Cores[i].IRQEnable && Cores[i].IRQA == addr)
358 {
359 //printf("Core %d special write IRQ Called (IRQ passed). IRQA = %x\n",i,addr);
360 SetIrqCall(i);
361 }
362 }
363// throw an assertion if the memory range is invalid:
364#ifndef DEBUG_FAST
365 pxAssume(addr < SPU2_DYN_MEMLINE);
366#endif
367 *GetMemPtr(addr) = value;
368}
369
370
371static __forceinline StereoOut32 MixVoice(uint coreidx, uint voiceidx)

Callers 3

MixVoiceFunction · 0.85
MixCoreFunction · 0.85
spu2MixFunction · 0.85

Calls 2

SetIrqCallFunction · 0.85
GetMemPtrFunction · 0.85

Tested by

no test coverage detected