all repos — mgba @ 01ed3f29909fe9e07eca95c5f3ed238f764b6148

mGBA Game Boy Advance Emulator

GBA Memory: Mark Famicom Mini games 22 through 28 as non-mirroring
Vicki Pfau vi@endrift.com
Fri, 13 Nov 2020 01:54:29 -0800
commit

01ed3f29909fe9e07eca95c5f3ed238f764b6148

parent

d7fcbb8c26fdb59fcbd8233d0689e3e52da73f25

2 files changed, 20 insertions(+), 10 deletions(-)

jump to
M CHANGESCHANGES

@@ -34,6 +34,7 @@ - GBA I/O: Green swap register should be readable

- GBA Memory: Improve gamepak prefetch timing - GBA Memory: Stall on VRAM access in mode 2 (fixes mgba.io/i/190) - GBA Memory: Improve robustness of Matrix memory support + - GBA Memory: Mark Famicom Mini games 22 through 28 as non-mirroring - GBA SIO: Fix copying Normal mode transfer values - GBA SIO: Fix Normal mode being totally broken (fixes mgba.io/i/1800) - GBA SIO: Fix deseralizing SIO registers
M src/gba/overrides.csrc/gba/overrides.c

@@ -195,6 +195,16 @@

// Aging cartridge { "TCHK", SAVEDATA_EEPROM, HW_NONE, IDLE_LOOP_NONE, false }, + // Famicom Mini series 3 (FDS), some aren't mirrored (22 - 28) + // See https://forum.no-intro.org/viewtopic.php?f=2&t=4221 for discussion + { "FNMJ", SAVEDATA_EEPROM, HW_NONE, IDLE_LOOP_NONE, false }, + { "FMRJ", SAVEDATA_EEPROM, HW_NONE, IDLE_LOOP_NONE, false }, + { "FPTJ", SAVEDATA_EEPROM, HW_NONE, IDLE_LOOP_NONE, false }, + { "FLBJ", SAVEDATA_EEPROM, HW_NONE, IDLE_LOOP_NONE, false }, + { "FFMJ", SAVEDATA_EEPROM, HW_NONE, IDLE_LOOP_NONE, false }, + { "FTKJ", SAVEDATA_EEPROM, HW_NONE, IDLE_LOOP_NONE, false }, + { "FTUJ", SAVEDATA_EEPROM, HW_NONE, IDLE_LOOP_NONE, false }, + { { 0, 0, 0, 0 }, 0, 0, IDLE_LOOP_NONE, false } };

@@ -205,20 +215,19 @@ override->idleLoop = IDLE_LOOP_NONE;

override->mirroring = false; bool found = false; - if (override->id[0] == 'F') { + int i; + for (i = 0; _overrides[i].id[0]; ++i) { + if (memcmp(override->id, _overrides[i].id, sizeof(override->id)) == 0) { + *override = _overrides[i]; + found = true; + break; + } + } + if (!found && override->id[0] == 'F') { // Classic NES Series override->savetype = SAVEDATA_EEPROM; override->mirroring = true; found = true; - } else { - int i; - for (i = 0; _overrides[i].id[0]; ++i) { - if (memcmp(override->id, _overrides[i].id, sizeof(override->id)) == 0) { - *override = _overrides[i]; - found = true; - break; - } - } } if (config) {