GB Core: Fix VRAM and WRAM bank sizes

This commit is contained in:
Vicki Pfau 2021-05-07 00:42:37 -07:00
parent 6b99d319fb
commit b9931de1bf
1 changed files with 2 additions and 2 deletions

View File

@ -816,13 +816,13 @@ void* _GBGetMemoryBlock(struct mCore* core, size_t id, size_t* sizeOut) {
*sizeOut = gb->memory.romSize;
return gb->memory.rom;
case GB_REGION_VRAM:
*sizeOut = GB_SIZE_WORKING_RAM_BANK0 * (isCgb ? 1 : 2);
*sizeOut = GB_SIZE_VRAM_BANK0 * (isCgb ? 1 : 2);
return gb->video.vram;
case GB_REGION_EXTERNAL_RAM:
*sizeOut = gb->sramSize;
return gb->memory.sram;
case GB_REGION_WORKING_RAM_BANK0:
*sizeOut = GB_SIZE_VRAM * (isCgb ? 8 : 2);
*sizeOut = GB_SIZE_WORKING_RAM_BANK0 * (isCgb ? 8 : 2);
return gb->memory.wram;
case GB_BASE_OAM:
*sizeOut = GB_SIZE_OAM;