diff --git a/DotN64/CPU/VR4300/VR4300.cs b/DotN64/CPU/VR4300/VR4300.cs index eab9a76..22d4fe8 100644 --- a/DotN64/CPU/VR4300/VR4300.cs +++ b/DotN64/CPU/VR4300/VR4300.cs @@ -354,7 +354,7 @@ namespace DotN64.CPU physicalAddress &= ~0b11u; var shift = ((int)address & 0b11 ^ -(int)CP0.Config.BE) << 3; - WriteSysAD(physicalAddress, (ReadSysAD(physicalAddress) & ~(uint.MaxValue << shift)) | (uint)((byte)data << shift)); + WriteSysAD(physicalAddress, (ReadSysAD(physicalAddress) & ~((uint)byte.MaxValue << shift)) | (uint)((byte)data << shift)); } break; case AccessSize.HalfWord: @@ -362,7 +362,7 @@ namespace DotN64.CPU physicalAddress &= ~0b11u; var shift = ((int)address & 0b11 ^ (-(int)CP0.Config.BE << 1)) << 3; - WriteSysAD(physicalAddress, (ReadSysAD(physicalAddress) & ~(uint.MaxValue << shift)) | (uint)((ushort)data << shift)); + WriteSysAD(physicalAddress, (ReadSysAD(physicalAddress) & ~((uint)ushort.MaxValue << shift)) | (uint)((ushort)data << shift)); } break; case AccessSize.Word: