GB Memory: VRAM access
Jeffrey Pfau jeffrey@endrift.com
Tue, 19 Jan 2016 22:09:11 -0800
1 files changed,
4 insertions(+),
3 deletions(-)
jump to
M
src/gb/memory.c
→
src/gb/memory.c
@@ -134,8 +134,7 @@ case GB_REGION_CART_BANK1 + 3:
return memory->romBank[address & (GB_SIZE_CART_BANK0 - 1)]; case GB_REGION_VRAM: case GB_REGION_VRAM + 1: - // TODO - return 0; + return gb->video.vram[address & (GB_SIZE_VRAM - 1)]; case GB_REGION_EXTERNAL_RAM: case GB_REGION_EXTERNAL_RAM + 1: // TODO@@ -183,7 +182,9 @@ memory->mbc(memory, address, value);
return; case GB_REGION_VRAM: case GB_REGION_VRAM + 1: - // TODO + // TODO: Block access in wrong modes + gb->video.vram[address & (GB_SIZE_VRAM - 1)] = value; + gb->video.renderer->writeVRAM(gb->video.renderer, address & (GB_SIZE_VRAM - 1)); return; case GB_REGION_EXTERNAL_RAM: case GB_REGION_EXTERNAL_RAM + 1: