mirror of https://github.com/mgba-emu/mgba.git
GB Memory: VRAM access
This commit is contained in:
parent
dabc92bf5f
commit
5fb2cfde1d
|
@ -134,8 +134,7 @@ uint8_t GBLoad8(struct LR35902Core* cpu, uint16_t address) {
|
|||
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 @@ void GBStore8(struct LR35902Core* cpu, uint16_t address, int8_t 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:
|
||||
|
|
Loading…
Reference in New Issue