all repos — mgba @ 830cad3e7bc24281d8d9da31672c020693a17c5b

mGBA Game Boy Advance Emulator

GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
Vicki Pfau vi@endrift.com
Fri, 12 Oct 2018 11:13:55 -0700
commit

830cad3e7bc24281d8d9da31672c020693a17c5b

parent

50d735b99b0dbb6e24eda5c40176f1519dc651ec

2 files changed, 4 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -3,6 +3,7 @@ Bugfixes:

- GBA: All IRQs have 7 cycle delay (fixes mgba.io/i/539, mgba.io/i/1208) Misc: - GBA Savedata: EEPROM performance fixes + - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash 0.7.0: (Future) Features:
M src/gba/savedata.csrc/gba/savedata.c

@@ -259,6 +259,9 @@ } else {

end = savedata->vf->size(savedata->vf); if (end < flashSize) { savedata->vf->truncate(savedata->vf, flashSize); + } else if (end >= SIZE_CART_FLASH1M) { + flashSize = SIZE_CART_FLASH1M; + savedata->type = SAVEDATA_FLASH1M; } savedata->data = savedata->vf->map(savedata->vf, flashSize, savedata->mapMode); }