From 9ef2f2d8a4b7eb3e7284fd1b78132cbc8d6a50ca Mon Sep 17 00:00:00 2001 From: ariahiro64 Date: Fri, 20 Oct 2023 04:49:34 -0400 Subject: [PATCH] hotfix --- src/flashcart/ed64/ed64.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/flashcart/ed64/ed64.c b/src/flashcart/ed64/ed64.c index 37dcdbc4..e9e75f36 100644 --- a/src/flashcart/ed64/ed64.c +++ b/src/flashcart/ed64/ed64.c @@ -147,7 +147,7 @@ static flashcart_err_t ed64_load_rom(char *rom_path, flashcart_progress_callback fix_file_size(&fil); - size_t rom_size = f_size(&fil) - KiB(128); + size_t rom_size = f_size(&fil); // FIXME: if the cart is not V3 or X5 or X7, we need probably need to - 128KiB for save compatibility. // Or somehow warn that certain ROM's will have corruption due to the address space being used for saves. @@ -158,6 +158,11 @@ static flashcart_err_t ed64_load_rom(char *rom_path, flashcart_progress_callback return FLASHCART_ERR_LOAD; } + if (rom_size == MiB(64)) + { + rom_size -= KiB(128); + } + size_t sdram_size = rom_size; size_t chunk_size = MiB(1);