cpdef enum MemoryAccess:
    NON_SEQUENTIAL = 0
    SEQUENTIAL = 1

cpdef enum MemoryRegion:
    BIOS_START = 0
    BIOS_END = 16383
    BIOS_REGION = 0
    BIOS_MASK = 16383
    BIOS_SIZE = 16384
    EWRAM_START = 33554432
    EWRAM_END = 33816575
    EWRAM_REGION = 2
    EWRAM_MASK = 262143
    EWRAM_SIZE = 262144
    IWRAM_START = 50331648
    IWRAM_END = 50364415
    IWRAM_REGION = 3
    IWRAM_MASK = 32767
    IWRAM_SIZE = 32768
    IO_START = 67108864
    IO_END = 67109887
    IO_REGION = 4
    IO_MASK = 1023
    IO_SIZE = 1024
    PALRAM_START = 83886080
    PALRAM_END = 83887103
    PALRAM_REGION = 5
    PALRAM_MASK = 1023
    PALRAM_SIZE = 1024
    VRAM_START = 100663296
    VRAM_END = 100761599
    VRAM_REGION = 6
    VRAM_MASK_1 = 98303
    VRAM_MASK_2 = 131071
    VRAM_SIZE = 98304
    OAM_START = 117440512
    OAM_END = 117441535
    OAM_REGION = 7
    OAM_MASK = 1023
    OAM_SIZE = 1024
    GAMEPAK_0_START = 134217728
    GAMEPAK_0_END = 167772159
    GAMEPAK_0_REGION_1 = 8
    GAMEPAK_0_REGION_2 = 9
    GAMEPAK_1_START = 167772160
    GAMEPAK_1_END = 201326591
    GAMEPAK_1_REGION_1 = 10
    GAMEPAK_1_REGION_2 = 11
    GAMEPAK_2_START = 201326592
    GAMEPAK_2_END = 234881023
    GAMEPAK_2_REGION_1 = 12
    GAMEPAK_2_REGION_2 = 13
    GAMEPAK_MASK = 33554431
    GAMEPAK_SIZE = 33554432
    GAMEPAK_REGION_START = 8
    GAMEPAK_REGION_END = 13
    SRAM_START = 234881024
    SRAM_END = 234913791
    SRAM_REGION = 14
    SRAM_MASK = 32767
    SRAM_SIZE = 32768

cpdef enum IOAddress:
    REG_DISPCNT = 67108864
    REG_DISPSTAT = 67108868
    REG_VCOUNT = 67108870
    REG_BG0CNT = 67108872
    REG_BG1CNT = 67108874
    REG_BG2CNT = 67108876
    REG_BG3CNT = 67108878
    REG_BG0HOFS = 67108880
    REG_BG0VOFS = 67108882
    REG_BG1HOFS = 67108884
    REG_BG1VOFS = 67108886
    REG_BG2HOFS = 67108888
    REG_BG2VOFS = 67108890
    REG_BG3HOFS = 67108892
    REG_BG3VOFS = 67108894
    REG_WIN0H = 67108928
    REG_WIN1H = 67108930
    REG_WIN0V = 67108932
    REG_WIN1V = 67108934
    REG_WININ = 67108936
    REG_WINOUT = 67108938
    REG_BLDCNT = 67108944
    REG_BLDALPHA = 67108946
    REG_BLDY = 67108948
    REG_SOUNDBIAS = 67109000
    REG_FIFO_A = 67109024
    REG_FIFO_B = 67109028
    REG_DMA0SAD_L = 67109040
    REG_DMA0SAD_H = 67109042
    REG_DMA0DAD_L = 67109044
    REG_DMA0DAD_H = 67109046
    REG_DMA1SAD_L = 67109052
    REG_DMA1SAD_H = 67109054
    REG_DMA1DAD_L = 67109056
    REG_DMA1DAD_H = 67109058
    REG_DMA2SAD_L = 67109064
    REG_DMA2SAD_H = 67109066
    REG_DMA2DAD_L = 67109068
    REG_DMA2DAD_H = 67109070
    REG_DMA3SAD_L = 67109076
    REG_DMA3SAD_H = 67109078
    REG_DMA3DAD_L = 67109080
    REG_DMA3DAD_H = 67109082
    REG_DMA0CNT_L = 67109048
    REG_DMA0CNT_H = 67109050
    REG_DMA1CNT_L = 67109060
    REG_DMA1CNT_H = 67109062
    REG_DMA2CNT_L = 67109072
    REG_DMA2CNT_H = 67109074
    REG_DMA3CNT_L = 67109084
    REG_DMA3CNT_H = 67109086
    REG_TM0CNT_L = 67109120
    REG_TM0CNT_H = 67109122
    REG_TM1CNT_L = 67109124
    REG_TM1CNT_H = 67109126
    REG_TM2CNT_L = 67109128
    REG_TM2CNT_H = 67109130
    REG_TM3CNT_L = 67109132
    REG_TM3CNT_H = 67109134
    REG_KEYINPUT = 67109168
    REG_KEYCNT = 67109170
    REG_IE = 67109376
    REG_IF = 67109378
    REG_WAITCNT = 67109380
    REG_IME = 67109384
    REG_HALTCNT = 67109632

cpdef enum DMAAddressAdjustment:
    INCREMENT = 0
    DECREMENT = 1
    LEAVE_UNCHANGED = 2
    INCREMENT_RELOAD = 3

cpdef enum DMATransferSize:
    HALFWORD = 0
    WORD = 1

cpdef enum DMAStartTiming:
    DMAStartTiming_IMMEDIATELY = 0
    DMAStartTiming_VBLANK = 1
    DMAStartTiming_HBLANK = 2
    SPECIAL = 3

