mirror of https://github.com/mgba-emu/mgba.git
GB Core: Fix VRAM and WRAM bank sizes
This commit is contained in:
parent
6b99d319fb
commit
b9931de1bf
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue