Skip to content

Commit 45fcccd

Browse files
committed
Fix write8() to route SPU register writes through writeRegister
On real hardware, byte stores to SPU MMIO addresses write the full 16-bit value. Mirrors the existing check in write16(). Signed-off-by: Nicolas 'Pixel' Noble <nicolas@nobis-crew.org>
1 parent 67bae7b commit 45fcccd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/core/psxhw.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,11 @@ void PCSX::HW::write8(uint32_t add, uint32_t rawvalue) {
480480
g_emulator->m_mem->initMsan(value);
481481
break;
482482
default:
483+
if ((hwadd >= 0x1f801c00) && (hwadd < 0x1f801e00)) {
484+
g_emulator->m_spu->writeRegister(add, (uint16_t)rawvalue);
485+
break;
486+
}
487+
483488
if (addressInRegisterSpace(hwadd)) {
484489
uint32_t *ptr = (uint32_t *)&g_emulator->m_mem->m_hard[hwadd & 0xffff];
485490
*ptr = SWAP_LEu32(rawvalue);

0 commit comments

Comments
 (0)