From 7e91e1b260973ee45792a66a09a1a4ef588a82ef Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Thu, 2 Nov 2023 10:16:30 -0700 Subject: [PATCH] fix dsi firmware checking --- src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs | 5 +---- .../Consoles/Nintendo/NDS/NDSFirmware.cs | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs index 01eff0026e..f7e417f9e7 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/MelonDS.cs @@ -266,10 +266,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS throw new InvalidOperationException("Invalid firmware length"); } - if (fw.Length == 0x20000) // fw checks dont work on dsi firmware for some reason, need to check what's going wrong - { - NDSFirmware.MaybeWarnIfBadFw(fw, CoreComm.ShowMessage); - } + NDSFirmware.MaybeWarnIfBadFw(fw, CoreComm.ShowMessage); } var error = _core.Init( diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSFirmware.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSFirmware.cs index ab205b957e..9d8937a605 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSFirmware.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NDS/NDSFirmware.cs @@ -56,7 +56,10 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS return; } - CheckDecryptedCodeChecksum(fw, warningCallback); + if (fw.Length != 0x20000) // no code in DSi firmware + { + CheckDecryptedCodeChecksum(fw, warningCallback); + } } private static unsafe ushort Crc16(byte* data, int len, int seed)