tonc_libgba.h File Reference
#include "tonc_memmap.h"
Defines | |
#define | VRAM MEM_VRAM |
#define | IWRAM MEM_IWRAM |
#define | EWRAM MEM_EWRAM |
#define | EWRAM_END (MEM_EWRAM+EWRAM_SIZE) |
#define | SRAM MEM_SRAM |
#define | SystemCall swi_call |
#define | FILL CS_FILL |
#define | COPY16 CS_CPY16 |
#define | COPY32 CS_CPY32 |
#define | DMA16 DMA_16 |
#define | DMA32 DMA_32 |
#define | GAMEPAK_DRQ DMA_GAMEPAK |
#define | DMA_IMMEDIATE DMA_AT_NOW |
#define | DMA_VBLANK DMA_AT_VBLANK |
#define | DMA_HBLANK DMA_AT_HBLANK |
#define | DMA_Copy(channel, source, dest, mode) DMA_TRANSFER(dest, source, mode, channel, DMA_ON) |
#define | DMA0COPY(source, dest, mode) DMA_Copy(0,(source),(dest),(mode)) |
#define | DMA1COPY(source, dest, mode) DMA_Copy(1,(source),(dest),(mode)) |
#define | DMA2COPY(source, dest, mode) DMA_Copy(2,(source),(dest),(mode)) |
#define | DMA3COPY(source, dest, mode) DMA_Copy(3,(source),(dest),(mode)) |
#define | DPAD KEY_DIR |
#define | KEYIRQ_ENABLE KCNT_IRQ |
#define | KEYIRQ_OR KCNT_OR |
#define | KEYIRQ_AND KCNT_AND |
#define | scanKeys key_poll |
#define | keysDown() key_hit(KEY_FULL) |
#define | keysDownRepeat() key_repeat(KEY_FULL) |
#define | keysUp() key_released(KEY_FULL) |
#define | keysHeld() key_is_down(KEY_FULL) |
#define | setRepeat key_repeat_limits |
#define | INT_VECTOR REG_ISR_MAIN |
#define | MODE32_NORMAL MBOOT_NORMAL |
#define | MODE16_MULTI MBOOT_MULTI |
#define | MODE32_2MHZ MBOOT_FAST |
#define | PCM_DMA_BUF 1584 |
#define | MAX_DIRECTSOUND_CHANNELS 12 |
#define | SND1_L_ENABLE SDMG_LSQR1 |
#define | SND2_L_ENABLE SDMG_LSQR2 |
#define | SND3_L_ENABLE SDMG_LWAVE |
#define | SND4_L_ENABLE SDMG_LNOISE |
#define | SND1_R_ENABLE SDMG_RSQR1 |
#define | SND2_R_ENABLE SDMG_RSQR2 |
#define | SND3_R_ENABLE SDMG_RWAVE |
#define | SND4_R_ENABLE SDMG_RNOISE |
#define | SNDA_VOL_50 SDS_A50 |
#define | SNDA_VOL_100 SDS_A100 |
#define | SNDB_VOL_50 SDS_B50 |
#define | SNDB_VOL_100 SDS_B100 |
#define | SNDA_R_ENABLE SDS_AR |
#define | SNDA_L_ENABLE SDS_AL |
#define | SNDA_RESET_FIFO SDS_ARESET |
#define | SNDB_R_ENABLE SDS_BR |
#define | SNDB_L_ENABLE SDS_BL |
#define | SNDB_RESET_FIFO SDS_BRESET |
#define | WAVE_RAM ((vu16*)(REG_BASE+0x0090)) |
#define | OBJATTR OBJ_ATTR |
#define | OBJAFFINE OBJ_AFFINE |
#define | OAM oam_mem |
#define | OBJ_BASE_ADR ((void*)(tile_mem[4])) |
#define | SPRITE_GFX (( u16*)(tile_mem[4])) |
#define | BITMAP_OBJ_BASE_ADR ((void*)(tile_mem[5])) |
#define | SQUARE (ATTR0_SQUARE>>14) |
#define | WIDE (ATTR0_WIDE>>14) |
#define | TALL (ATTR0_TALL>>14) |
#define | ATTR0_NORMAL ATTR0_REG |
#define | ATTR0_ROTSCALE ATTR0_AFF |
#define | ATTR0_DISABLED ATTR0_HIDE |
#define | ATTR0_ROTSCALE_DOUBLE ATTR0_AFF_DBL_BIT |
#define | ATTR0_COLOR_16 ATTR0_4BPP |
#define | ATTR0_COLOR_256 ATTR0_8BPP |
#define | ATTR1_FLIP_X ATTR1_HFLIP |
#define | ATTR1_FLIP_Y ATTR1_VFLIP |
#define | ATTR1_ROTDATA(n) ATTR1_AFF_ID(m) |
#define | ATTR2_PRIORITY(n) ATTR2_PRIO(m) |
#define | ATTR2_PALETTE(n) ATTR2_PALBANK(m) |
#define | OBJ_ROT_SCALE_ON ATTR0_AFF |
#define | OBJ_DISABLE ATTR0_HIDE |
#define | OBJ_DOUBLE ATTR0_AFF_DBL_BIT |
#define | OBJ_TRANSLUCENT ATTR0_BLEND |
#define | OBJ_OBJWINDOW ATTR0_WINDOW |
#define | OBJ_MOSAIC ATTR0_MOSAIC |
#define | OBJ_16_COLOR ATTR0_4BPP |
#define | OBJ_256_COLOR ATTR0_8BPP |
#define | OBJ_SQUARE ATTR0_SQUARE |
#define | OBJ_WIDE ATTR0_WIDE |
#define | OBJ_TALL ATTR0_TALL |
#define | OBJ_Y(m) ATTR0_Y(m) |
#define | OBJ_MODE(m) ((m)<<10) |
#define | OBJ_SHAPE(m) ATTR0_SHAPE(m) |
#define | OBJ_HFLIP ATTR1_HFLIP |
#define | OBJ_VFLIP ATTR1_VFLIP |
#define | OBJ_X(m) ATTR1_X(m) |
#define | OBJ_ROT_SCALE(m) ATTR1_AFF_ID(m) |
#define | OBJ_SIZE(m) ATTR1_SIZE(m) |
#define | OBJ_CHAR(m) ATTR2_ID(m) |
#define | OBJ_PRIORITY(m) ATTR2_PRIO(m) |
#define | OBJ_PALETTE(m) ATTR2_PALBANK(m) |
#define | TIMER_COUNT TM_CASCADE |
#define | TIMER_IRQ TM_IRQ |
#define | TIMER_START TM_ENABLE |
#define | BG_COLORS pal_bg_mem |
#define | BG_PALETTE pal_bg_mem |
#define | OBJ_COLORS pal_obj_mem |
#define | SPRITE_PALETTE pal_obj_mem |
#define | MODE_0 DCNT_MODE0 |
#define | MODE_1 DCNT_MODE1 |
#define | MODE_2 DCNT_MODE2 |
#define | MODE_3 DCNT_MODE3 |
#define | MODE_4 DCNT_MODE4 |
#define | MODE_5 DCNT_MODE5 |
#define | BACKBUFFER DCNT_PAGE |
#define | OBJ_1D_MAP DCNT_OBJ_1D |
#define | LCDC_OFF DCNT_BLANK |
#define | BG0_ENABLE DCNT_BG0 |
#define | BG1_ENABLE DCNT_BG1 |
#define | BG2_ENABLE DCNT_BG2 |
#define | BG3_ENABLE DCNT_BG3 |
#define | OBJ_ENABLE DCNT_OBJ |
#define | WIN0_ENABLE DCNT_WIN0 |
#define | WIN1_ENABLE DCNT_WIN1 |
#define | OBJ_WIN_ENABLE DCNT_WINOBJ |
#define | BG_ALL_ENABLE (0x0F00) |
#define | LCDC_VBL_FLAG DSTAT_IN_VBL |
#define | LCDC_HBL_FLAG DSTAT_IN_HBL |
#define | LCDC_VCNT_FLAG DSTAT_IN_VCT |
#define | LCDC_VBL DSTAT_VBL_IRQ |
#define | LCDC_HBL DSTAT_HBL_IRQ |
#define | LCDC_VCNT DSTAT_VCT_IRQ |
#define | VCOUNT DSTAT_VCT |
#define | bg_scroll BG_POINT |
#define | BGCTRL REG_BGCNT |
#define | BG_OFFSET REG_BG_OFS |
#define | BG_16_COLOR BG_4BPP |
#define | BG_256_COLOR BG_8BPP |
#define | BG_SIZE_0 BG_SIZE0 |
#define | BG_SIZE_1 BG_SIZE1 |
#define | BG_SIZE_2 BG_SIZE2 |
#define | BG_SIZE_3 BG_SIZE3 |
#define | BG_WID_32 BG_SIZE_0 |
#define | BG_WID_64 BG_SIZE_1 |
#define | BG_HT_32 BG_SIZE_0 |
#define | BG_HT_64 BG_SIZE_2 |
#define | TEXTBG_SIZE_256x256 BG_REG_32x32 |
#define | TEXTBG_SIZE_512x256 BG_REG_64x32 |
#define | TEXTBG_SIZE_256x512 BG_REG_32x64 |
#define | TEXTBG_SIZE_512x512 BG_REG_64x64 |
#define | ROTBG_SIZE_128x128 BG_AFF_16x16 |
#define | ROTBG_SIZE_256x256 BG_AFF_32x32 |
#define | ROTBG_SIZE_512x512 BG_AFF_64x64 |
#define | ROTBG_SIZE_1024x1024 BG_AFF_128x128 |
#define | BG_PRIORITY(m) BG_PRIO(m) |
#define | BG_TILE_BASE(m) BG_CBB(m) |
#define | BG_MAP_BASE(m) BG_SBB(m) |
#define | TILE_BASE(m) BG_CBB(m) |
#define | MAP_BASE(m) BG_SBB(m) |
#define | CHAR_BASE_ADR(m) (void*)(tile_mem[m]) |
#define | CHAR_BASE_BLOCK(m) (void*)(tile_mem[m]) |
#define | TILE_BASE_ADR(m) (void*)(tile_mem[m]) |
#define | MAP_BASE_ADR(m) (void*)(se_mem[m]) |
#define | SCREEN_BASE_BLOCK(m) (void*)(se_mem[m]) |
#define | MODE3_LINE M3LINE |
#define | MODE5_LINE M5LINE |
#define | MODE3_FB m3_mem |
#define | MODE5_FB m5_mem |
#define | MODE5_BB m5_mem_back |
#define | RGB5 RGB15 |
#define | RGB8(r, g, b) ( ((r)>>3) | (((g)>>3)<<5) | (((b)>>3)<<10) ) |
SIOCNT bits | |
#define | SIO_8BIT 0x0000 |
Normal 8-bit communication mode. | |
#define | SIO_32BIT 0x1000 |
Normal 32-bit communication mode. | |
#define | SIO_MULTI 0x2000 |
Multi-play communication mode. | |
#define | SIO_UART 0x3000 |
UART communication mode. | |
#define | SIO_IRQ 0x4000 |
Enable serial irq. | |
Baud rate settings | |
#define | SIO_9600 0x0000 |
#define | SIO_38400 0x0001 |
#define | SIO_57600 0x0002 |
#define | SIO_115200 0x0003 |
#define | SIO_CLK_INT (1<<0) |
Select internal clock. | |
#define | SIO_2MHZ_CLK (1<<1) |
Select 2MHz clock. | |
#define | SIO_RDY (1<<2) |
Opponent SO state. | |
#define | SIO_SO_HIGH (1<<3) |
Our SO state. | |
#define | SIO_START (1<<7) |
SIO modes set with REG_RCNT | |
#define | R_NORMAL 0x0000 |
#define | R_MULTI 0x0000 |
#define | R_UART 0x0000 |
#define | R_GPIO 0x8000 |
#define | R_JOYBUS 0xC000 |
General purpose mode control bits used with REG_RCNT | |
#define | GPIO_SC 0x0001 |
#define | GPIO_SD 0x0002 |
#define | GPIO_SI 0x0004 |
#define | GPIO_SO 0x0008 |
#define | GPIO_SC_IO 0x0010 |
#define | GPIO_SD_IO 0x0020 |
#define | GPIO_SI_IO 0x0040 |
#define | GPIO_SO_IO 0x0080 |
#define | GPIO_SC_INPUT 0x0000 |
#define | GPIO_SD_INPUT 0x0000 |
#define | GPIO_SI_INPUT 0x0000 |
#define | GPIO_SO_INPUT 0x0000 |
#define | GPIO_SC_OUTPUT 0x0010 |
#define | GPIO_SD_OUTPUT 0x0020 |
#define | GPIO_SI_OUTPUT 0x0040 |
#define | GPIO_SO_OUTPUT 0x0080 |
Sound 3 control bits | |
#define | SOUND3_STEP32 (0<<5) |
#define | SOUND3_STEP64 (1<<5) |
#define | SOUND3_SETBANK(n) (n<<6) |
#define | SOUND3_PLAY (1<<7) |
#define | SOUND3_STOP (0<<7) |
Typedefs | |
typedef void(* | IntFn )(void) |
Enumerations | |
enum | SPRITE_SIZECODE { Sprite_8x8 = 0, Sprite_16x16, Sprite_32x32, Sprite_64x64, Sprite_16x8 = 0, Sprite_32x8, Sprite_32x16, Sprite_64x32, Sprite_8x16 = 0, Sprite_8x32, Sprite_16x32, Sprite_32x64 } |
Detailed Description
- Author:
- J Vijn
- Date:
- 20070921 - 20070921
Generated on Mon Aug 25 17:03:56 2008 for libtonc by 1.5.3