mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
HLE DSP: Proper audio pipe responses
This commit is contained in:
parent
2e696deccf
commit
a85ca0459a
1 changed files with 20 additions and 18 deletions
|
@ -13,27 +13,29 @@ namespace Audio {
|
||||||
}
|
}
|
||||||
|
|
||||||
void HLE_DSP::resetAudioPipe() {
|
void HLE_DSP::resetAudioPipe() {
|
||||||
// Hardcoded responses for now
|
#define DSPOffset(var) (0x8000 + offsetof(Audio::HLE::SharedMemory, var) / 2)
|
||||||
// These are DSP DRAM offsets for various variables
|
|
||||||
|
// These are DSP shared memory offsets for various variables
|
||||||
// https://www.3dbrew.org/wiki/DSP_Memory_Region
|
// https://www.3dbrew.org/wiki/DSP_Memory_Region
|
||||||
static constexpr std::array<u16, 16> responses = {
|
static constexpr std::array<u16, 16> responses = {
|
||||||
0x000F, // Number of responses
|
0x000F, // Number of responses
|
||||||
0xBFFF, // Frame counter
|
DSPOffset(frameCounter), // Frame counter
|
||||||
0x9E92, // Source configs
|
DSPOffset(sourceConfigurations), // Source configs
|
||||||
0x8680, // Source statuses
|
DSPOffset(sourceStatuses), // Source statuses
|
||||||
0xA792, // ADPCM coefficients
|
DSPOffset(adpcmCoefficients), // ADPCM coefficients
|
||||||
0x9430, // DSP configs
|
DSPOffset(dspConfiguration), // DSP configs
|
||||||
0x8400, // DSP status
|
DSPOffset(dspStatus), // DSP status
|
||||||
0x8540, // Final samples
|
DSPOffset(finalSamples), // Final samples
|
||||||
0x9492, // Intermediate mix samples
|
DSPOffset(intermediateMixSamples), // Intermediate mix samples
|
||||||
0x8710, // Compressor
|
DSPOffset(compressor), // Compressor
|
||||||
0x8410, // Debug
|
DSPOffset(dspDebug), // Debug
|
||||||
0xA912, // ??
|
DSPOffset(unknown10), // ??
|
||||||
0xAA12, // ??
|
DSPOffset(unknown11), // ??
|
||||||
0xAAD2, // ??
|
DSPOffset(unknown12), // ??
|
||||||
0xAC52, // Surround sound biquad filter 1
|
DSPOffset(unknown13), // Surround sound biquad filter 1
|
||||||
0xAC5C // Surround sound biquad filter 2
|
DSPOffset(unknown14) // Surround sound biquad filter 2
|
||||||
};
|
};
|
||||||
|
#undef DSPOffset
|
||||||
|
|
||||||
std::vector<u8>& audioPipe = pipeData[DSPPipeType::Audio];
|
std::vector<u8>& audioPipe = pipeData[DSPPipeType::Audio];
|
||||||
audioPipe.resize(responses.size() * sizeof(u16));
|
audioPipe.resize(responses.size() * sizeof(u16));
|
||||||
|
|
Loading…
Add table
Reference in a new issue