From c218cf302fa157f9e4de5afcdf7da11dc27d1d02 Mon Sep 17 00:00:00 2001 From: SuuperW Date: Sat, 16 Jan 2021 13:59:31 -0600 Subject: [PATCH] MelonDS: fix system bus reporting itself as big endian when it isn't (and 4-byte read/write methods) --- .../Consoles/Nintendo/NDS/MelonDS_MemoryDomains.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_MemoryDomains.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_MemoryDomains.cs index 3d1b91c5fb..670c01a4ae 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_MemoryDomains.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS_MemoryDomains.cs @@ -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); }