all repos — mgba @ b3dc065144f44d782d069d0d6ad34abe2332d0e5

mGBA Game Boy Advance Emulator

Read DISPCNT, fix video register writing
Jeffrey Pfau jeffrey@endrift.com
Fri, 11 Oct 2013 22:04:41 -0700
commit

b3dc065144f44d782d069d0d6ad34abe2332d0e5

parent

de39f23a1bb4b2cb7a005e16bdb8820d47c2702e

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M src/gba/gba-io.csrc/gba/gba-io.c

@@ -9,7 +9,7 @@ }

void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { if (address < REG_SOUND1CNT_LO && address != REG_DISPSTAT) { - gba->video.renderer->writeVideoRegister(gba->video.renderer, address, value); + value = gba->video.renderer->writeVideoRegister(gba->video.renderer, address, value); } else { switch (address) { // Video

@@ -276,6 +276,7 @@ case REG_DMA2CNT_LO:

case REG_DMA3CNT_LO: // Write-only register return 0; + case REG_DISPCNT: case REG_VCOUNT: case REG_DMA0CNT_HI: case REG_DMA1CNT_HI: