Labels for I/O regions in the switch statement
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Apr 2013 23:04:01 -0700
1 files changed,
5 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba-io.c
→
src/gba/gba-io.c
@@ -8,9 +8,12 @@ }
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 @@ case REG_DMA3CNT_HI:
value = GBAMemoryWriteDMACNT_HI(&gba->memory, 3, value); break; + // Timers case REG_TM0CNT_LO: GBATimerWriteTMCNT_LO(gba, 0, value); return;@@ -66,6 +70,7 @@ value &= 0x00C7;
GBATimerWriteTMCNT_HI(gba, 3, value); break; + // Interrupts and misc case REG_WAITCNT: GBAAdjustWaitstates(&gba->memory, value); break;