writes a signed value to the SPU2 ram Invalidates the ADPCM cache in the process.
| 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) |
no test coverage detected