all repos — mgba @ 2e223c372a2a1f5da649ef0cc20bab1d9355c990

mGBA Game Boy Advance Emulator

GBA Memory: Fix Vast Fame support (fixes #1170)
taizou cactusgunman@gmail.com
Sat, 15 Sep 2018 23:17:59 +0100
commit

2e223c372a2a1f5da649ef0cc20bab1d9355c990

parent

9de8f084ba55460b02d300c1dd8b8e6c56f691d5

2 files changed, 2 insertions(+), 3 deletions(-)

jump to
M CHANGESCHANGES

@@ -51,6 +51,7 @@ - Core: Fix ordering events when scheduling during events

- GBA: Reset WAITCNT properly - GBA Serialize: Fix loading states in Hblank - PSP2: Fix more issues causing poor audio + - GBA Memory: Fix Vast Fame support (taizou) (fixes mgba.io/i/1170) Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M src/gba/vfame.csrc/gba/vfame.c

@@ -246,10 +246,8 @@

// if mode has been set - the address and value of the SRAM write will be modified address = _modifySramAddress(cart->cartType, address, cart->sramMode); value = _modifySramValue(cart->cartType, value, cart->sramMode); - // these writes are mirrored - address &= 0x7FFF; + address &= (SIZE_CART_SRAM - 1); sramData[address] = value; - sramData[address + 0x8000] = value; } static uint32_t _modifySramAddress(enum GBAVFameCartType type, uint32_t address, int mode) {