Bus: Handle CPU-internal narrow writes

The full 32-bits of the GPR are used.

Fixes SoundScope in the BIOS Shell.
This commit is contained in:
Connor McLaughlin
2021-04-26 21:57:00 +10:00
parent 7fb5d6908f
commit 40731b49fc
10 changed files with 102 additions and 124 deletions

View File

@ -1258,11 +1258,11 @@ restart_instruction:
if constexpr (debug)
Cop0DataBreakpointCheck<MemoryAccessType::Write>(addr);
const u8 value = Truncate8(ReadReg(inst.i.rt));
const u32 value = ReadReg(inst.i.rt);
WriteMemoryByte(addr, value);
if constexpr (pgxp_mode >= PGXPMode::Memory)
PGXP::CPU_SB(inst.bits, value, addr);
PGXP::CPU_SB(inst.bits, Truncate8(value), addr);
}
break;
@ -1272,11 +1272,11 @@ restart_instruction:
if constexpr (debug)
Cop0DataBreakpointCheck<MemoryAccessType::Write>(addr);
const u16 value = Truncate16(ReadReg(inst.i.rt));
const u32 value = ReadReg(inst.i.rt);
WriteMemoryHalfWord(addr, value);
if constexpr (pgxp_mode >= PGXPMode::Memory)
PGXP::CPU_SH(inst.bits, value, addr);
PGXP::CPU_SH(inst.bits, Truncate16(value), addr);
}
break;