From b9931de1bf6ea9475f07e1b1808ebc0084755cd5 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 7 May 2021 00:42:37 -0700 Subject: [PATCH] GB Core: Fix VRAM and WRAM bank sizes --- src/gb/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gb/core.c b/src/gb/core.c index a76168b2b..3b0d8de34 100644 --- a/src/gb/core.c +++ b/src/gb/core.c @@ -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;