summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorxperia64 <xperiancedapps@gmail.com>2022-06-09 18:32:21 -0400
committerTillmann Karras <tilkax@gmail.com>2025-04-25 00:51:45 +0100
commitbbc11edd7dc2c07d6505659188fbac16a9ada456 (patch)
treefae0807f599c2eefe7136e00ca224b82b5806c12 /Source/Core
parent908094714b5478aab4ec9eeb9de56ca8d4d50662 (diff)
Rework WriteD3 based on hardware testing
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/DSP/DSPAccelerator.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/Core/Core/DSP/DSPAccelerator.cpp b/Source/Core/Core/DSP/DSPAccelerator.cpp
index bdfcb65943..b039d275a5 100644
--- a/Source/Core/Core/DSP/DSPAccelerator.cpp
+++ b/Source/Core/Core/DSP/DSPAccelerator.cpp
@@ -45,16 +45,20 @@ void Accelerator::WriteD3(u16 value)
// Pikmin 2 Wii writes non-stop to 0x10008000-0x1000801f (non-zero values too)
// Zelda TP Wii writes non-stop to 0x10000000-0x1000001f (non-zero values too)
- switch (m_sample_format)
+ // Writes only seem to be accepted when the upper most bit of the address is set
+ if (m_current_address & 0x80000000)
{
- case 0xA: // u16 writes
+ // The format doesn't matter for D3 writes, all writes are u16 and the address is treated as if
+ // we are in a 16-bit format
WriteMemory(m_current_address * 2, value >> 8);
WriteMemory(m_current_address * 2 + 1, value & 0xFF);
m_current_address++;
- break;
- default:
- ERROR_LOG_FMT(DSPLLE, "dsp_write_aram_d3() - unknown format {:#x}", m_sample_format);
- break;
+ }
+ else
+ {
+ ERROR_LOG_FMT(DSPLLE,
+ "dsp_write_aram_d3() - tried to write to address {:#x} without high bit set",
+ m_current_address);
}
}