all repos — mgba @ f72c195739c0255b9a5e8b3963cfcc897867e822

mGBA Game Boy Advance Emulator

Labels for I/O regions in the switch statement
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Apr 2013 23:04:01 -0700
commit

f72c195739c0255b9a5e8b3963cfcc897867e822

parent

5d81a4eb182753110d6fa1c27fa91e0242897ba9

1 files changed, 5 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-io.csrc/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;