Set bitmasks for two calculations in RSP_SW_DMEM, to stop errors in Banjo Kazooie when in debug mode for RSP. (Was attempting to cast to a smaller data type, causing a loss of data)
This commit is contained in:
Emmet Young 2012-09-29 16:15:41 +10:00
parent 91ce899df0
commit 917417eb0f
1 changed files with 2 additions and 2 deletions

View File

@ -537,8 +537,8 @@ void RSP_SW_DMEM ( DWORD Addr, DWORD Value ) {
}
*(BYTE *)(RSPInfo.DMEM + (Addr ^ 3)) = (BYTE)(Value >> 0x18);
*(BYTE *)(RSPInfo.DMEM + ((Addr + 1) ^ 3)) = (BYTE)(Value >> 0x10);
*(BYTE *)(RSPInfo.DMEM + ((Addr + 2) ^ 3)) = (BYTE)(Value >> 0x8);
*(BYTE *)(RSPInfo.DMEM + ((Addr + 3) ^ 3)) = (BYTE)(Value);
*(BYTE *)(RSPInfo.DMEM + ((Addr + 2) ^ 3)) = (BYTE)(Value >> 0x8 &0xFF);
*(BYTE *)(RSPInfo.DMEM + ((Addr + 3) ^ 3)) = (BYTE)(Value &0xFF);
return;
}
*(DWORD *)(RSPInfo.DMEM + Addr) = Value;