Read DISPCNT, fix video register writing

This commit is contained in:
Jeffrey Pfau 2013-10-11 22:04:41 -07:00
parent de39f23a1b
commit b3dc065144
1 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,7 @@ void GBAIOInit(struct GBA* gba) {
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 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) {
case REG_DMA3CNT_LO:
// Write-only register
return 0;
case REG_DISPCNT:
case REG_VCOUNT:
case REG_DMA0CNT_HI:
case REG_DMA1CNT_HI: