Zack Buhman 3358d95704 scsp: zeroize dsp
The Saturn BIOS does not (un)initialize the DSP. Without zeroizing the DSP
program, the SCSP DSP appears to have a program that continuously writes to
0x30000 through 0x3ffff in sound RAM, which has the effect of destroying any
samples stored there.
2023-05-19 14:52:15 -07:00

20 lines
323 B
C++

#include <stdint.h>
template <typename T>
inline void copy(T * dst, const T * src, int32_t n) noexcept
{
while (n > 0) {
*dst++ = *src++;
n -= (sizeof (T));
}
}
template <typename T>
inline void fill(T * dst, const T src, int32_t n) noexcept
{
while (n > 0) {
*dst++ = src;
n -= (sizeof (T));
}
}