mirror of https://github.com/mgba-emu/mgba.git
GB MBC: Force minimum SRAM size on rare MBCs that always have SRAM
This commit is contained in:
parent
1b81c08de8
commit
32b7cc2fba
1
CHANGES
1
CHANGES
|
@ -85,6 +85,7 @@ Other fixes:
|
|||
- FFmpeg: Fix encoding of time base
|
||||
- GB: Fix crash when changing ROM while in banked address space
|
||||
- GB: Fix loading model overrides
|
||||
- GB MBC: Force minimum SRAM size on rare MBCs that always have SRAM
|
||||
- GB Serialize: Fix crash when loading pre-0.7 SGB savestates
|
||||
- GB Video: Fix SGB video logs
|
||||
- GB Video: Discard SGB packets in non-SGB mVLs
|
||||
|
|
|
@ -353,6 +353,9 @@ void GBMBCInit(struct GB* gb) {
|
|||
gb->memory.mbcWrite = _GBMBC6;
|
||||
gb->memory.mbcRead = _GBMBC6Read;
|
||||
gb->memory.directSramAccess = false;
|
||||
if (!gb->sramSize) {
|
||||
gb->sramSize = GB_SIZE_EXTERNAL_RAM; // Force minimum size for convenience
|
||||
}
|
||||
gb->sramSize += GB_SIZE_MBC6_FLASH; // Flash is concatenated at the end
|
||||
break;
|
||||
case GB_MBC7:
|
||||
|
@ -386,6 +389,9 @@ void GBMBCInit(struct GB* gb) {
|
|||
case GB_POCKETCAM:
|
||||
gb->memory.mbcWrite = _GBPocketCam;
|
||||
gb->memory.mbcRead = _GBPocketCamRead;
|
||||
if (!gb->sramSize) {
|
||||
gb->sramSize = GB_SIZE_EXTERNAL_RAM; // Force minimum size for convenience
|
||||
}
|
||||
if (gb->memory.cam && gb->memory.cam->startRequestImage) {
|
||||
gb->memory.cam->startRequestImage(gb->memory.cam, GBCAM_WIDTH, GBCAM_HEIGHT, mCOLOR_ANY);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue