MelonDS: fix system bus reporting itself as big endian when it isn't (and 4-byte read/write methods)

This commit is contained in:
SuuperW 2021-01-16 13:59:31 -06:00
parent de0d0d19e2
commit c218cf302f
1 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
Name = "System Bus";
Size = 0x0B00_0000;
WordSize = 4;
EndianType = Endian.Big;
EndianType = Endian.Little;
Writable = true;
}
@ -88,14 +88,14 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
public override uint PeekUint(long addr, bool bigEndian)
{
uint ret = ARM9Read32((uint)addr);
if (!bigEndian)
if (bigEndian)
ret = SwapEndianness(ret);
return ret;
}
public override void PokeUint(long addr, uint val, bool bigEndian)
{
if (!bigEndian)
if (bigEndian)
val = SwapEndianness(val);
ARM9Write32((uint)addr, val);
}