diff --git a/CHANGES b/CHANGES index af395f570..410c5946a 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,7 @@ Bugfixes: - GB Video: Fix dot clock timing being slightly wrong - GB MBC: Pocket Cam memory should be accessible without enabling - GB Memory: Initialize peripheral pointers + - GB MBC: Fix SRAM sizes 4 and 5 Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722) diff --git a/src/gb/mbc.c b/src/gb/mbc.c index 6c262e1d3..00560f648 100644 --- a/src/gb/mbc.c +++ b/src/gb/mbc.c @@ -110,6 +110,12 @@ void GBMBCInit(struct GB* gb) { case 3: gb->sramSize = 0x8000; break; + case 4: + gb->sramSize = 0x20000; + break; + case 5: + gb->sramSize = 0x10000; + break; } if (gb->memory.mbcType == GB_MBC_AUTODETECT) {