gba.h File Reference
Go to the source code of this file.
Define Documentation
#define WRAM_START 0x03000000 |
Internal work RAM.
Definition at line 53 of file gba.h.
#define WRAM_END (WRAM_START + 0x8000) |
Definition at line 54 of file gba.h.
#define INT_VECTOR (WRAM_END - 4) |
#define REG_DISPCNT 0x04000000 |
#define REG_STAT 0x04000004 |
Definition at line 61 of file gba.h.
#define REG_VCOUNT 0x04000006 |
Definition at line 62 of file gba.h.
#define REG_BG0CNT 0x04000008 |
Definition at line 63 of file gba.h.
#define REG_BG1CNT 0x0400000a |
Definition at line 64 of file gba.h.
#define REG_BG2CNT 0x0400000c |
#define REG_BG3CNT 0x0400000e |
Definition at line 66 of file gba.h.
#define REG_BG0HOFS 0x04000010 |
Definition at line 67 of file gba.h.
#define REG_BG0VOFS 0x04000012 |
Definition at line 68 of file gba.h.
#define REG_BG1HOFS 0x04000014 |
Definition at line 69 of file gba.h.
#define REG_BG1VOFS 0x04000016 |
Definition at line 70 of file gba.h.
#define REG_BG2HOFS 0x04000018 |
Definition at line 71 of file gba.h.
#define REG_BG2VOFS 0x0400001a |
Definition at line 72 of file gba.h.
#define REG_BG3HOFS 0x0400001c |
Definition at line 73 of file gba.h.
#define REG_BG3VOFS 0x0400001e |
Definition at line 74 of file gba.h.
#define REG_BG2PA 0x04000020 |
Definition at line 75 of file gba.h.
#define REG_BG2PB 0x04000022 |
Definition at line 76 of file gba.h.
#define REG_BG2PC 0x04000024 |
Definition at line 77 of file gba.h.
#define REG_BG2PD 0x04000026 |
Definition at line 78 of file gba.h.
#define REG_BG2X 0x04000028 |
Definition at line 79 of file gba.h.
#define REG_BG2Y 0x0400002c |
Definition at line 80 of file gba.h.
#define REG_BG3PA 0x04000030 |
Definition at line 81 of file gba.h.
#define REG_BG3PB 0x04000032 |
Definition at line 82 of file gba.h.
#define REG_BG3PC 0x04000034 |
Definition at line 83 of file gba.h.
#define REG_BG3PD 0x04000036 |
Definition at line 84 of file gba.h.
#define REG_BG3X 0x04000038 |
Definition at line 85 of file gba.h.
#define REG_BG3Y 0x0400003c |
Definition at line 86 of file gba.h.
#define REG_WINCNT 0x04000040 |
Definition at line 87 of file gba.h.
#define REG_WININ 0x04000048 |
Definition at line 88 of file gba.h.
#define REG_WINOUT 0x0400004a |
Definition at line 89 of file gba.h.
#define REG_MOSAIC 0x0400004c |
Definition at line 90 of file gba.h.
#define REG_BLDCNT 0x04000050 |
Definition at line 91 of file gba.h.
#define REG_BLDALPHA 0x04000052 |
Definition at line 92 of file gba.h.
#define REG_BLDY 0x04000054 |
Definition at line 93 of file gba.h.
#define REG_SOUND1CNT 0x04000060 |
Sound control.
Definition at line 98 of file gba.h.
#define REG_SOUND2CNT 0x04000068 |
Definition at line 99 of file gba.h.
#define REG_SOUND3CNT 0x04000070 |
#define REG_SOUND4CNT 0x04000078 |
#define REG_SOUNDCNT 0x04000080 |
#define REG_SOUNDBIAS 0x04000088 |
#define REG_WAVE_RAM0 0x04000090 |
#define REG_WAVE_RAM1 0x04000094 |
#define REG_WAVE_RAM2 0x04000098 |
#define REG_WAVE_RAM3 0x0400009c |
#define REG_FIFO_A 0x040000a0 |
#define REG_FIFO_B 0x040000a4 |
#define REG_DMA0SAD 0x040000b0 |
DMA control.
Definition at line 114 of file gba.h.
#define REG_DMA0DAD 0x040000b4 |
#define REG_DMA0CNT 0x040000b8 |
#define REG_DMA1SAD 0x040000bc |
#define REG_DMA1DAD 0x040000c0 |
#define REG_DMA1CNT 0x040000c4 |
#define REG_DMA2SAD 0x040000c8 |
#define REG_DMA2DAD 0x040000cc |
#define REG_DMA2CNT 0x040000d0 |
#define REG_DMA3SAD 0x040000d4 |
#define REG_DMA3DAD 0x040000d8 |
#define REG_DMA3CNT 0x040000dc |
#define REG_TMR0CNT 0x04000100 |
Timer control.
Definition at line 130 of file gba.h.
#define REG_TMR1CNT 0x04000104 |
#define REG_TMR2CNT 0x04000108 |
#define REG_TMR3CNT 0x0400010c |
#define REG_SIODATA32 0x04000120 |
Serial communication control.
Definition at line 138 of file gba.h.
#define REG_SIOCNT 0x04000128 |
#define REG_SIODATA8 0x0400012a |
#define REG_KEYINPUT 0x04000130 |
Keyboard control.
Definition at line 145 of file gba.h.
#define REG_KEYCNT 0x04000132 |
#define REG_RCNT 0x04000134 |
General I/O control.
Definition at line 151 of file gba.h.
#define REG_JOYCNT 0x04000140 |
JOY Bus control.
Definition at line 156 of file gba.h.
#define REG_JOYSTAT 0x04000158 |
#define REG_JOY_RECV 0x04000150 |
#define REG_JOY_TRANS 0x04000154 |
#define REG_IE 0x04000200 |
#define REG_IF 0x04000202 |
#define REG_WAITCNT 0x04000204 |
#define REG_IME 0x04000208 |
#define INT_VBLANK 0x0001 |
#define INT_HBLANK 0x0002 |
#define INT_VCOUNT 0x0004 |
#define INT_KEYPAD 0x1000 |
#define INT_GAMEPAK 0x2000 |
#define REG_HALTCNT 0x04000300 |
Power management control.
Definition at line 190 of file gba.h.
#define outw |
( |
_reg, |
|
|
_val |
|
) |
(*((volatile unsigned short *)(_reg)) = (_val)) |
#define outdw |
( |
_reg, |
|
|
_val |
|
) |
(*((volatile unsigned long *)(_reg)) = (_val)) |
#define inw |
( |
_reg |
|
) |
(*((volatile unsigned short *)(_reg))) |
#define indw |
( |
_reg |
|
) |
(*((volatile unsigned long *)(_reg))) |
#define GBAKEY_SELECT 0x0003 |
#define GBAKEY_START 0x0008 |
#define GBAKEY_RIGHT 0x0010 |
#define GBAKEY_LEFT 0x0020 |
#define GBAKEY_DOWN 0x0080 |
#define TMR_PRE_64 0x00010000 |
Timer control.
Definition at line 213 of file gba.h.
#define TMR_PRE_256 0x00020000 |
#define TMR_PRE_1024 0x00030000 |
#define TMR_IRQ_ENA 0x00400000 |
#define TMR_ENA 0x00800000 |
#define SIO_BAUD_9600 0x0000 |
SIO control.
Definition at line 222 of file gba.h.
#define SIO_BAUD_38400 0x0001 |
#define SIO_BAUD_57600 0x0002 |
#define SIO_BAUD_115200 0x0003 |
#define SIO_CTS_ENA 0x0004 |
#define SIO_PARITY_ODD 0x0008 |
#define SIO_TX_FULL 0x0010 |
#define SIO_RX_EMPTY 0x0020 |
#define SIO_DATA_8BIT 0x0080 |
#define SIO_FIFO_ENA 0x0100 |
#define SIO_PARITY_ENA 0x0200 |
#define SIO_SEND_ENA 0x0400 |
#define SIO_RECV_ENA 0x0800 |
#define SIO_MODE_32BIT 0x1000 |
#define SIO_MODE_MULTI 0x2000 |
#define SIO_MODE_UART 0x3000 |
#define SIO_IRQ_ENA 0x4000 |