From f72c195739c0255b9a5e8b3963cfcc897867e822 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 19 Apr 2013 23:04:01 -0700 Subject: [PATCH] Labels for I/O regions in the switch statement --- src/gba/gba-io.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gba/gba-io.c b/src/gba/gba-io.c index 3606f3f96..4aeef0cc2 100644 --- a/src/gba/gba-io.c +++ b/src/gba/gba-io.c @@ -8,9 +8,12 @@ void GBAIOInit(struct GBA* gba) { void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { switch (address) { + // Video case REG_DISPSTAT: GBAVideoWriteDISPSTAT(&gba->video, value); break; + + // DMA case REG_DMA0CNT_LO: GBAMemoryWriteDMACNT_LO(&gba->memory, 0, value); break; @@ -36,6 +39,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { value = GBAMemoryWriteDMACNT_HI(&gba->memory, 3, value); break; + // Timers case REG_TM0CNT_LO: GBATimerWriteTMCNT_LO(gba, 0, value); return; @@ -66,6 +70,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { GBATimerWriteTMCNT_HI(gba, 3, value); break; + // Interrupts and misc case REG_WAITCNT: GBAAdjustWaitstates(&gba->memory, value); break;