Alchemy
Loading...
Searching...
No Matches

io_reg.h File Reference

The hardware's I/O registers and their bits, as pret names them. More...

Go to the source code of this file.

Macros

#define REG_DISPCNT   (*(volatile u16 *)0x04000000)
#define REG_DISPSTAT   (*(volatile u16 *)0x04000004)
#define DISPSTAT_VBLANK_INTR   0x0008
#define DISPSTAT_HBLANK_INTR   0x0010
#define DISPSTAT_VCOUNT_INTR   0x0020
#define DISPSTAT_VCOUNT_LINE(line)
 DISPSTAT's high byte: the line the VCount interrupt fires on (the LYC compare).
#define REG_VCOUNT   (*(volatile u16 *)0x04000006)
#define REG_BG1CNT   (*(volatile u16 *)0x0400000a)
#define REG_BG2CNT   (*(volatile u16 *)0x0400000c)
#define REG_BG3CNT   (*(volatile u16 *)0x0400000e)
#define BGCNT_PRIORITY(n)
#define BGCNT_CHAR_BASE(block)
#define BGCNT_MOSAIC   0x0040
#define BGCNT_256_COLORS   0x0080
#define BGCNT_SCREEN_BASE(block)
#define BGCNT_WRAP   0x2000
 Affine backgrounds only: wrap around instead of showing the backdrop.
#define BGCNT_SIZE(n)
 The background's size: for an affine one, 0 to 3 are 128, 256, 512 and 1024 pixels square.
#define REG_BG1HOFS   (*(volatile u16 *)0x04000014)
#define REG_BG1VOFS   (*(volatile u16 *)0x04000016)
#define REG_BG2HOFS   (*(volatile u16 *)0x04000018)
#define REG_BG2VOFS   (*(volatile u16 *)0x0400001a)
#define REG_BG3HOFS   (*(volatile u16 *)0x0400001c)
#define REG_BG3VOFS   (*(volatile u16 *)0x0400001e)
#define Q_8_8(n)
 The BG2/BG3 affine matrix entries are signed 8.8 fixed point: texels stepped per screen pixel.
#define REG_BG2PA   (*(volatile u16 *)0x04000020)
#define REG_BG2PB   (*(volatile u16 *)0x04000022)
#define REG_BG2PC   (*(volatile u16 *)0x04000024)
#define REG_BG2PD   (*(volatile u16 *)0x04000026)
#define REG_BG2X   (*(volatile s32 *)0x04000028)
#define REG_BG2Y   (*(volatile s32 *)0x0400002c)
#define REG_BG3PA   (*(volatile u16 *)0x04000030)
#define REG_BG3PB   (*(volatile u16 *)0x04000032)
#define REG_BG3PC   (*(volatile u16 *)0x04000034)
#define REG_BG3PD   (*(volatile u16 *)0x04000036)
#define REG_BG3X   (*(volatile s32 *)0x04000038)
#define REG_BG3Y   (*(volatile s32 *)0x0400003c)
#define REG_WIN0H   (*(volatile u16 *)0x04000040)
#define REG_WIN1H   (*(volatile u16 *)0x04000042)
#define REG_WIN0V   (*(volatile u16 *)0x04000044)
#define REG_WIN1V   (*(volatile u16 *)0x04000046)
#define WIN_RANGE(start, end)
 A REG_WINxH or REG_WINxV value: the window covers start up to, but not including, end.
#define REG_WININ   (*(volatile u16 *)0x04000048)
#define REG_WINOUT   (*(volatile u16 *)0x0400004a)
#define WININ_WIN0_BG0   0x0001
#define WININ_WIN0_BG1   0x0002
#define WININ_WIN0_BG2   0x0004
#define WININ_WIN0_BG3   0x0008
#define WININ_WIN0_OBJ   0x0010
#define WININ_WIN0_CLR   0x0020
#define WININ_WIN0_ALL   0x003f
#define WININ_WIN1_BG0   0x0100
#define WININ_WIN1_BG1   0x0200
#define WININ_WIN1_BG2   0x0400
#define WININ_WIN1_BG3   0x0800
#define WININ_WIN1_OBJ   0x1000
#define WININ_WIN1_CLR   0x2000
#define WININ_WIN1_ALL   0x3f00
#define WINOUT_WIN01_BG0   0x0001
#define WINOUT_WIN01_BG1   0x0002
#define WINOUT_WIN01_BG2   0x0004
#define WINOUT_WIN01_BG3   0x0008
#define WINOUT_WIN01_OBJ   0x0010
#define WINOUT_WIN01_CLR   0x0020
#define WINOUT_WIN01_ALL   0x003f
#define WINOUT_WINOBJ_BG0   0x0100
#define WINOUT_WINOBJ_BG1   0x0200
#define WINOUT_WINOBJ_BG2   0x0400
#define WINOUT_WINOBJ_BG3   0x0800
#define WINOUT_WINOBJ_OBJ   0x1000
#define WINOUT_WINOBJ_CLR   0x2000
#define WINOUT_WINOBJ_ALL   0x3f00
#define REG_MOSAIC   (*(volatile u16 *)0x0400004c)
#define REG_BLDCNT   (*(volatile u16 *)0x04000050)
#define BLDCNT_TGT1_BG0   0x0001
#define BLDCNT_TGT1_BG1   0x0002
#define BLDCNT_TGT1_BG2   0x0004
#define BLDCNT_TGT1_BG3   0x0008
#define BLDCNT_TGT1_OBJ   0x0010
#define BLDCNT_TGT1_BD   0x0020
#define BLDCNT_TGT1_ALL   0x003f
#define BLDCNT_EFFECT_NONE   0x0000
#define BLDCNT_EFFECT_BLEND   0x0040
 weighted by REG_BLDALPHA
#define BLDCNT_EFFECT_LIGHTEN   0x0080
 towards white by REG_BLDY
#define BLDCNT_EFFECT_DARKEN   0x00c0
 towards black by REG_BLDY
#define BLDCNT_TGT2_BG0   0x0100
#define BLDCNT_TGT2_BG1   0x0200
#define BLDCNT_TGT2_BG2   0x0400
#define BLDCNT_TGT2_BG3   0x0800
#define BLDCNT_TGT2_OBJ   0x1000
#define BLDCNT_TGT2_BD   0x2000
#define BLDCNT_TGT2_ALL   0x3f00
#define REG_BLDALPHA   (*(volatile u16 *)0x04000052)
#define BLEND_ALPHA(top, bottom)
 A REG_BLDALPHA value: top and bottom are the two targets' weights, out of 16.
#define REG_BLDY   (*(volatile u16 *)0x04000054)
#define BG_CANVAS_MAP   ((volatile s16 *)0x06003800)
#define REG_BG0HOFS   ((void *)0x04000010)
#define REG_DMA0   ((volatile u16 *)0x040000b0)
#define REG_DMA3   ((volatile u32 *)0x040000d4)
#define PLTT_BACKDROP   (*(volatile u16 *)0x05000000)
#define BG_PLTT   ((volatile u16 *)0x05000000)
#define BG_PLTT_COLOR(palette, color)
#define OBJ_PLTT   ((volatile u16 *)0x05000200)
#define OBJ_PLTT_COLOR(palette, color)
#define RGB(r, g, b)
 A 15-bit colour from its red, green and blue levels (0 to 31 each), as the palette stores it: blue in the high bits.
#define BG_CHAR_BLOCK(n)
#define BG_SCREEN_BLOCK(n)
#define TILE_SIZE_4BPP   32
#define OBJ_VRAM0   0x06010000
 Sprite tile memory, as pret names it: the 32 KB from 0x06010000.
#define REG_TM3CNT   (*(volatile u32 *)0x0400010c)
#define REG_TM3CNT_H   (*(volatile u16 *)0x0400010e)
#define TIMER_INTR_ENABLE   0x0040
 TMxCNT_H flags, as pret names them.
#define TIMER_ENABLE   0x0080
#define REG_SIODATA32   ((volatile u32 *)0x04000120)
#define REG_SIOCNT   (*(volatile u32 *)0x04000128)
#define REG_SIOCNT16   (*(volatile u16 *)0x04000128)
#define REG_SIODATA8   (*(volatile u16 *)0x0400012a)
#define REG_KEYINPUT   (*(volatile u16 *)0x04000130)
#define REG_KEYCNT   (*(volatile u16 *)0x04000132)
#define REG_RCNT   (*(volatile u16 *)0x04000134)
#define SIO_115200_BPS   0x0003
#define SIO_START   0x0080
#define SIO_32BIT_MODE   0x1000
#define SIO_MULTI_MODE   0x2000
#define SIO_INTR_ENABLE   0x4000
#define RCNT_SIO_MODE   0x0000
 RCNT's mode: 0 leaves the port to SIOCNT's serial modes; bit 15 alone makes it general-purpose pins.
#define RCNT_GPIO_MODE   0x8000
#define DMA_DEST_INC   0x0000
#define DMA_DEST_DEC   0x0020
#define DMA_DEST_FIXED   0x0040
#define DMA_DEST_RELOAD   0x0060
#define DMA_SRC_INC   0x0000
#define DMA_SRC_DEC   0x0080
#define DMA_SRC_FIXED   0x0100
#define DMA_REPEAT   0x0200
#define DMA_16BIT   0x0000
#define DMA_32BIT   0x0400
#define DMA_DREQ_ON   0x0800
#define DMA_START_NOW   0x0000
#define DMA_START_VBLANK   0x1000
#define DMA_START_HBLANK   0x2000
#define DMA_START_SPECIAL   0x3000
#define DMA_INTR_ENABLE   0x4000
#define DMA_ENABLE   0x8000
#define DMA_START_TIMING_DRQ_REPEAT   (DMA_START_SPECIAL | DMA_DREQ_ON | DMA_REPEAT)
 A DMA control's start timing (bits 12 and 13), cartridge request (bit 11) and repeat (bit 9): the bits cleared before a channel is stopped.
#define DMA_COPY_WORDS(n)
#define DMA_COPY_HALFWORDS(n)
#define DMA_HBLANK_HALFWORD_PER_LINE   ((DMA_ENABLE | DMA_START_HBLANK | DMA_REPEAT | DMA_DEST_RELOAD) << 16 | 1)
#define DMA_HBLANK_WORD_PER_LINE
#define CPU_SET_SRC_FIXED   0x01000000
 BIOS CpuSet control flags, above its count.
#define CPU_SET_32BIT   0x04000000
#define OAM   ((void *)0x07000000)
#define OAM_SIZE   0x400
 OAM's size in bytes: 128 sprites of 8 bytes.
#define KEYS_MASK   0x3ff
#define REG_BG0CNT   (*(volatile u16 *)0x04000008)
#define REG_BG0VOFS   (*(volatile u16 *)0x04000012)
#define REG_SOUNDCNT_H   (*(volatile u16 *)0x04000082)
#define SOUND_CGB_MIX_FULL   0x0002
#define SOUND_A_MIX_FULL   0x0004
#define SOUND_B_MIX_FULL   0x0008
#define SOUND_ALL_MIX_FULL   (SOUND_CGB_MIX_FULL | SOUND_A_MIX_FULL | SOUND_B_MIX_FULL)
#define SOUND_A_RIGHT_OUTPUT   0x0100
#define SOUND_A_LEFT_OUTPUT   0x0200
#define SOUND_A_TIMER_0   0x0000
#define SOUND_A_FIFO_RESET   0x0800
#define SOUND_B_RIGHT_OUTPUT   0x1000
#define SOUND_B_LEFT_OUTPUT   0x2000
#define SOUND_B_TIMER_0   0x0000
#define SOUND_B_FIFO_RESET   0x8000
#define REG_SOUNDBIAS   (*(volatile u16 *)0x04000088)
#define REG_FIFO_A   (*(volatile u32 *)0x040000a0)
#define REG_FIFO_B   (*(volatile u32 *)0x040000a4)
#define REG_DMA0SAD   (*(volatile u32 *)0x040000b0)
#define REG_DMA0DAD   (*(volatile u32 *)0x040000b4)
#define REG_DMA0CNT   (*(volatile u32 *)0x040000b8)
#define REG_DMA0CNT_H   (*(volatile u16 *)0x040000ba)
#define REG_DMA1SAD   (*(volatile u32 *)0x040000bc)
#define REG_DMA1DAD   (*(volatile u32 *)0x040000c0)
#define REG_DMA1CNT   (*(volatile u32 *)0x040000c4)
#define REG_DMA1CNT_H   (*(volatile u16 *)0x040000c6)
#define REG_DMA2SAD   (*(volatile u32 *)0x040000c8)
#define REG_DMA2DAD   (*(volatile u32 *)0x040000cc)
#define REG_DMA2CNT   (*(volatile u32 *)0x040000d0)
#define REG_DMA2CNT_H   (*(volatile u16 *)0x040000d2)
#define REG_DMA3SAD   (*(volatile u32 *)0x040000d4)
#define REG_DMA3DAD   (*(volatile u32 *)0x040000d8)
#define REG_DMA3CNT   (*(volatile u32 *)0x040000dc)
#define REG_DMA3CNT_H   (*(volatile u16 *)0x040000de)
#define REG_TM0CNT_L   (*(volatile u16 *)0x04000100)
#define REG_TM0CNT_H   (*(volatile u16 *)0x04000102)
#define REG_TM1CNT_L   (*(volatile u16 *)0x04000104)
#define REG_TM1CNT_H   (*(volatile u16 *)0x04000106)
#define REG_TM2CNT_L   (*(volatile u16 *)0x04000108)
#define REG_TM2CNT_H   (*(volatile u16 *)0x0400010a)
#define REG_IE   (*(volatile u16 *)0x04000200)
#define REG_IF   (*(volatile u16 *)0x04000202)
#define REG_WAITCNT   (*(volatile u16 *)0x04000204)
#define REG_IME   (*(volatile u16 *)0x04000208)
#define KEYCNT_SOFT_RESET   0xc00f
 A, B, Select and Start.
#define KEYCNT_DISARMED   0xc3ff
 Requires all ten keys together to prevent the reset chord retriggering it.
#define KEYCNT_SHOULDERS_WAKE   0xc300
 L and R, which wake the sleep.
#define KEYCNT_SLEEP_WAKE   0xc304
#define WAITCNT_GAME   0x4014

Enumerations

enum  DisplayControl {
  DISPCNT_MODE_0 = 0x0000 , DISPCNT_MODE_1 = 0x0001 , DISPCNT_MODE_2 = 0x0002 , DISPCNT_OBJ_1D_MAP = 0x0040 ,
  DISPCNT_BG0_ON = 0x0100 , DISPCNT_BG1_ON = 0x0200 , DISPCNT_BG2_ON = 0x0400 , DISPCNT_BG3_ON = 0x0800 ,
  DISPCNT_OBJ_ON = 0x1000 , DISPCNT_WIN0_ON = 0x2000 , DISPCNT_WIN1_ON = 0x4000 , DISPCNT_OBJWIN_ON = 0x8000
}
enum  KeyMask {
  KEY_A = 0x001 , KEY_B = 0x002 , KEY_SELECT = 0x004 , KEY_START = 0x008 ,
  KEY_RIGHT = 0x010 , KEY_LEFT = 0x020 , KEY_UP = 0x040 , KEY_DOWN = 0x080 ,
  KEY_R = 0x100 , KEY_L = 0x200 , KEYS_HORIZONTAL = KEY_RIGHT | KEY_LEFT , KEYS_VERTICAL = KEY_UP | KEY_DOWN ,
  KEYS_DPAD = KEYS_HORIZONTAL | KEYS_VERTICAL , KEYS_SHOULDERS = KEY_R | KEY_L
}

Detailed Description

The hardware's I/O registers and their bits, as pret names them.

Definition in file io_reg.h.

Macro Definition Documentation

◆ REG_DISPCNT

◆ REG_DISPSTAT

#define REG_DISPSTAT   (*(volatile u16 *)0x04000004)

Definition at line 10 of file io_reg.h.

Referenced by Runtime_InstallIwramAndIrqs(), and Runtime_SetIrqHandler().

◆ DISPSTAT_VBLANK_INTR

#define DISPSTAT_VBLANK_INTR   0x0008

Definition at line 13 of file io_reg.h.

Referenced by Runtime_SetIrqHandler().

◆ DISPSTAT_HBLANK_INTR

#define DISPSTAT_HBLANK_INTR   0x0010

Definition at line 14 of file io_reg.h.

◆ DISPSTAT_VCOUNT_INTR

#define DISPSTAT_VCOUNT_INTR   0x0020

Definition at line 15 of file io_reg.h.

◆ DISPSTAT_VCOUNT_LINE

#define DISPSTAT_VCOUNT_LINE ( line)
Value:
((line) << 8)

DISPSTAT's high byte: the line the VCount interrupt fires on (the LYC compare).

Definition at line 18 of file io_reg.h.

Referenced by Runtime_SetIrqHandler().

◆ REG_VCOUNT

◆ REG_BG1CNT

◆ REG_BG2CNT

◆ REG_BG3CNT

#define REG_BG3CNT   (*(volatile u16 *)0x0400000e)

◆ BGCNT_PRIORITY

◆ BGCNT_CHAR_BASE

◆ BGCNT_MOSAIC

#define BGCNT_MOSAIC   0x0040

Definition at line 26 of file io_reg.h.

Referenced by BattlePres_RunMosaicFadeOut(), and Title_LoadIntroBackgrounds().

◆ BGCNT_256_COLORS

◆ BGCNT_SCREEN_BASE

◆ BGCNT_WRAP

#define BGCNT_WRAP   0x2000

◆ BGCNT_SIZE

#define BGCNT_SIZE ( n)
Value:
((n) << 14)

The background's size: for an affine one, 0 to 3 are 128, 256, 512 and 1024 pixels square.

Definition at line 33 of file io_reg.h.

Referenced by BattleFx_BeginTiledCanvas(), and Map_InitializePerspectiveScene().

◆ REG_BG1HOFS

#define REG_BG1HOFS   (*(volatile u16 *)0x04000014)

Definition at line 49 of file io_reg.h.

Referenced by DisplayScroll_ArmHBlankDma(), LuckyDice_Run(), and ReelGame_Run().

◆ REG_BG1VOFS

#define REG_BG1VOFS   (*(volatile u16 *)0x04000016)

Definition at line 50 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ REG_BG2HOFS

#define REG_BG2HOFS   (*(volatile u16 *)0x04000018)

Definition at line 51 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ REG_BG2VOFS

#define REG_BG2VOFS   (*(volatile u16 *)0x0400001a)

Definition at line 52 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ REG_BG3HOFS

#define REG_BG3HOFS   (*(volatile u16 *)0x0400001c)

Definition at line 53 of file io_reg.h.

Referenced by DisplayScroll_ArmHBlankDma(), and TretTreeBranch_ApplyBg3ScrollAtScanline().

◆ REG_BG3VOFS

#define REG_BG3VOFS   (*(volatile u16 *)0x0400001e)

Definition at line 54 of file io_reg.h.

◆ Q_8_8

◆ REG_BG2PA

◆ REG_BG2PB

#define REG_BG2PB   (*(volatile u16 *)0x04000022)

Definition at line 62 of file io_reg.h.

Referenced by BattleFx_InitializeStarField(), and Map_InitializePerspectiveScene().

◆ REG_BG2PC

#define REG_BG2PC   (*(volatile u16 *)0x04000024)

Definition at line 63 of file io_reg.h.

Referenced by BattleFx_InitializeStarField(), and Map_InitializePerspectiveScene().

◆ REG_BG2PD

#define REG_BG2PD   (*(volatile u16 *)0x04000026)

Definition at line 64 of file io_reg.h.

Referenced by BattleFx_InitializeStarField(), and Map_InitializePerspectiveScene().

◆ REG_BG2X

◆ REG_BG2Y

#define REG_BG2Y   (*(volatile s32 *)0x0400002c)

◆ REG_BG3PA

#define REG_BG3PA   (*(volatile u16 *)0x04000030)

Definition at line 67 of file io_reg.h.

Referenced by Map_InitializePerspectiveScene().

◆ REG_BG3PB

#define REG_BG3PB   (*(volatile u16 *)0x04000032)

Definition at line 68 of file io_reg.h.

Referenced by Map_InitializePerspectiveScene().

◆ REG_BG3PC

#define REG_BG3PC   (*(volatile u16 *)0x04000034)

Definition at line 69 of file io_reg.h.

Referenced by Map_InitializePerspectiveScene().

◆ REG_BG3PD

#define REG_BG3PD   (*(volatile u16 *)0x04000036)

Definition at line 70 of file io_reg.h.

Referenced by Map_InitializePerspectiveScene().

◆ REG_BG3X

#define REG_BG3X   (*(volatile s32 *)0x04000038)

Definition at line 71 of file io_reg.h.

Referenced by Map_InitializePerspectiveScene().

◆ REG_BG3Y

#define REG_BG3Y   (*(volatile s32 *)0x0400003c)

Definition at line 72 of file io_reg.h.

Referenced by Map_InitializePerspectiveScene().

◆ REG_WIN0H

◆ REG_WIN1H

◆ REG_WIN0V

◆ REG_WIN1V

◆ WIN_RANGE

#define WIN_RANGE ( start,
end )

◆ REG_WININ

◆ REG_WINOUT

◆ WININ_WIN0_BG0

#define WININ_WIN0_BG0   0x0001

Definition at line 86 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ WININ_WIN0_BG1

#define WININ_WIN0_BG1   0x0002

Definition at line 87 of file io_reg.h.

Referenced by LuckyDice_Run(), ReelGame_Run(), and Title_LoadIntroBackgrounds().

◆ WININ_WIN0_BG2

#define WININ_WIN0_BG2   0x0004

Definition at line 88 of file io_reg.h.

Referenced by LuckyDice_Run(), ReelGame_Run(), and Title_LoadIntroBackgrounds().

◆ WININ_WIN0_BG3

#define WININ_WIN0_BG3   0x0008

Definition at line 89 of file io_reg.h.

◆ WININ_WIN0_OBJ

#define WININ_WIN0_OBJ   0x0010

Definition at line 90 of file io_reg.h.

Referenced by LuckyDice_Run(), ReelGame_Run(), and Title_LoadIntroBackgrounds().

◆ WININ_WIN0_CLR

#define WININ_WIN0_CLR   0x0020

Definition at line 91 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ WININ_WIN0_ALL

#define WININ_WIN0_ALL   0x003f

Definition at line 92 of file io_reg.h.

Referenced by BattleFx_PlayUnitElementEffect().

◆ WININ_WIN1_BG0

◆ WININ_WIN1_BG1

#define WININ_WIN1_BG1   0x0200

◆ WININ_WIN1_BG2

◆ WININ_WIN1_BG3

#define WININ_WIN1_BG3   0x0800

Definition at line 96 of file io_reg.h.

◆ WININ_WIN1_OBJ

◆ WININ_WIN1_CLR

◆ WININ_WIN1_ALL

#define WININ_WIN1_ALL   0x3f00

Definition at line 99 of file io_reg.h.

◆ WINOUT_WIN01_BG0

#define WINOUT_WIN01_BG0   0x0001

Definition at line 103 of file io_reg.h.

Referenced by BattleFx_PlayUnitElementEffect(), LuckyDice_Run(), and ReelGame_Run().

◆ WINOUT_WIN01_BG1

#define WINOUT_WIN01_BG1   0x0002

Definition at line 104 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ WINOUT_WIN01_BG2

#define WINOUT_WIN01_BG2   0x0004

Definition at line 105 of file io_reg.h.

Referenced by ReelGame_Run().

◆ WINOUT_WIN01_BG3

#define WINOUT_WIN01_BG3   0x0008

Definition at line 106 of file io_reg.h.

◆ WINOUT_WIN01_OBJ

#define WINOUT_WIN01_OBJ   0x0010

Definition at line 107 of file io_reg.h.

Referenced by BattleFx_PlayUnitElementEffect().

◆ WINOUT_WIN01_CLR

#define WINOUT_WIN01_CLR   0x0020

Definition at line 108 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ WINOUT_WIN01_ALL

#define WINOUT_WIN01_ALL   0x003f

Definition at line 109 of file io_reg.h.

◆ WINOUT_WINOBJ_BG0

#define WINOUT_WINOBJ_BG0   0x0100

Definition at line 110 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ WINOUT_WINOBJ_BG1

#define WINOUT_WINOBJ_BG1   0x0200

Definition at line 111 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ WINOUT_WINOBJ_BG2

#define WINOUT_WINOBJ_BG2   0x0400

Definition at line 112 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ WINOUT_WINOBJ_BG3

#define WINOUT_WINOBJ_BG3   0x0800

Definition at line 113 of file io_reg.h.

◆ WINOUT_WINOBJ_OBJ

#define WINOUT_WINOBJ_OBJ   0x1000

Definition at line 114 of file io_reg.h.

◆ WINOUT_WINOBJ_CLR

#define WINOUT_WINOBJ_CLR   0x2000

Definition at line 115 of file io_reg.h.

Referenced by LuckyDice_Run(), and ReelGame_Run().

◆ WINOUT_WINOBJ_ALL

#define WINOUT_WINOBJ_ALL   0x3f00

Definition at line 116 of file io_reg.h.

◆ REG_MOSAIC

#define REG_MOSAIC   (*(volatile u16 *)0x0400004c)

◆ REG_BLDCNT

#define REG_BLDCNT   (*(volatile u16 *)0x04000050)

Definition at line 119 of file io_reg.h.

Referenced by AltmillerCave_ApplyFadeBlend(), AltmillerCave_InitializeDarkness(), AltmillerCave_RestoreBabiAndInviteParty(), Battle_RunEncounter(), BattleFx_BeginCanvasLayer(), BattleFx_ConfigureEffectDisplay(), BattleFx_EndCanvasLayer(), BattleFx_OpenCanvasLayer(), BattleFx_PlayUnitElementEffect(), BattleFx_RunBladeRain(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCurse(), BattleFx_RunCybele(), BattleFx_RunDouse(), BattleFx_RunFlare(), BattleFx_RunFlashingStrike(), BattleFx_RunGaia(), BattleFx_RunGrowingColumns(), BattleFx_RunIce(), BattleFx_RunImpactBurst(), BattleFx_RunParticleStreams(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunShatteringOpening(), BattleFx_RunSleep(), BattleFx_RunSpire(), BattleFx_RunThorn(), BattleFx_RunVine(), BattleFx_SetupBlendedDisplay(), BattleFx_SetupCanvasTileMap(), BattleFx_StartFadeOverlay(), BattleMotion_InterpolatePosition(), BattlePres_RunEntryTransition(), BattlePres_SetActorModes(), BattlePresentation_RunPairedUnitTransition(), BattlePresentation_RunUnitTransition(), Clear_UpdateBlend(), Colosso_FadeInCompetitor(), Colosso_UpdateLettering(), CrossboneIslePlatformRooms_InitializeScene2(), DisplayBlend_RunScript(), DisplayScroll_RunSlideshow(), Event_CastReveal(), Fade_Update(), FieldFx_StartGroundParticles(), FieldMotes_Start(), Graphics_AdvancePaletteCycle(), Graphics_ApplyWindowBlendRegisters(), Graphics_FadeAlphaIn(), Graphics_FadeAlphaOut(), Graphics_SetBlendControl(), Io_SetBlendControl(), LemurianShip_SetupScene(), LuckyDice_Run(), Map_InitializePerspectiveScene(), Map_LoadLayeredScene(), Map_UpdateWorldMapMarkers(), MercuryLighthouse_Initialize(), MercuryLighthouseEntrance_Initialize(), RaiseTheShip(), ReelGame_InitTitle(), ReelGame_Run(), ReelGame_RunFrame(), Scene_RunEntrySetup(), SetBlendTarget(), Title_LoadIntroBackgrounds(), Title_RevealScreen(), Title_ShowIntro(), Title_UpdateIntroSprites(), TolbiSpring_Initialize(), TolbiSpring_RiseAndFadeIn(), TretTreeBranch_Initialize(), and Ui_RunIconMonitor().

◆ BLDCNT_TGT1_BG0

#define BLDCNT_TGT1_BG0   0x0001

Definition at line 123 of file io_reg.h.

Referenced by Clear_UpdateBlend().

◆ BLDCNT_TGT1_BG1

◆ BLDCNT_TGT1_BG2

◆ BLDCNT_TGT1_BG3

#define BLDCNT_TGT1_BG3   0x0008

◆ BLDCNT_TGT1_OBJ

◆ BLDCNT_TGT1_BD

#define BLDCNT_TGT1_BD   0x0020

Definition at line 128 of file io_reg.h.

Referenced by BattlePres_RunMosaicFadeOut().

◆ BLDCNT_TGT1_ALL

#define BLDCNT_TGT1_ALL   0x003f

Definition at line 129 of file io_reg.h.

Referenced by Graphics_SetBlendControl(), and Title_LoadIntroBackgrounds().

◆ BLDCNT_EFFECT_NONE

#define BLDCNT_EFFECT_NONE   0x0000

Definition at line 130 of file io_reg.h.

◆ BLDCNT_EFFECT_BLEND

◆ BLDCNT_EFFECT_LIGHTEN

#define BLDCNT_EFFECT_LIGHTEN   0x0080

◆ BLDCNT_EFFECT_DARKEN

#define BLDCNT_EFFECT_DARKEN   0x00c0

towards black by REG_BLDY

Definition at line 133 of file io_reg.h.

Referenced by BattlePres_RunMosaicFadeOut(), ReelGame_RunFrame(), and Title_RevealScreen().

◆ BLDCNT_TGT2_BG0

#define BLDCNT_TGT2_BG0   0x0100

Definition at line 134 of file io_reg.h.

Referenced by Colosso_FadeInCompetitor(), Title_RevealScreen(), and Title_ShowIntro().

◆ BLDCNT_TGT2_BG1

#define BLDCNT_TGT2_BG1   0x0200

◆ BLDCNT_TGT2_BG2

#define BLDCNT_TGT2_BG2   0x0400

◆ BLDCNT_TGT2_BG3

◆ BLDCNT_TGT2_OBJ

#define BLDCNT_TGT2_OBJ   0x1000

Definition at line 138 of file io_reg.h.

Referenced by BattlePres_RunMosaicFadeOut().

◆ BLDCNT_TGT2_BD

◆ BLDCNT_TGT2_ALL

◆ REG_BLDALPHA

#define REG_BLDALPHA   (*(volatile u16 *)0x04000052)

Definition at line 142 of file io_reg.h.

Referenced by AltmillerCave_ApplyFadeBlend(), AltmillerCave_InitializeDarkness(), AltmillerCave_RestoreBabiAndInviteParty(), AltmillerCave_StartReveal(), BattleFx_BeginCanvasLayer(), BattleFx_ConfigureEffectDisplay(), BattleFx_OpenCanvasLayer(), BattleFx_PlayUnitElementEffect(), BattleFx_RunBladeRain(), BattleFx_RunBoreas(), BattleFx_RunBurstScene(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCondemn(), BattleFx_RunDjinniEntrance(), BattleFx_RunDragonCloud(), BattleFx_RunElementBurst(), BattleFx_RunElementPillar(), BattleFx_RunFire(), BattleFx_RunFlare(), BattleFx_RunFroth(), BattleFx_RunGaia(), BattleFx_RunGround(), BattleFx_RunGrowingColumns(), BattleFx_RunHail(), BattleFx_RunJudgment(), BattleFx_RunJupiter(), BattleFx_RunKirin(), BattleFx_RunLobbedShells(), BattleFx_RunNeptune(), BattleFx_RunNereid(), BattleFx_RunOrbitingSkulls(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPlasma(), BattleFx_RunPrism(), BattleFx_RunRagnarok(), BattleFx_RunShatteringOpening(), BattleFx_RunSparkGroups(), BattleFx_RunSpiderWeb(), BattleFx_RunStreakVolley(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTitanBlade(), BattleFx_RunTorch(), BattleFx_RunVenus(), BattleFx_RunVolcano(), BattleFx_RunWhirlwind(), BattleFx_SetupBlendedDisplay(), BattleFx_SetupCanvasTileMap(), BattleFx_StartElementStreaks(), BattleFx_StartFadeOverlay(), BattlePres_RunEntryTransition(), BattlePres_SetActorModes(), BattlePresentation_RunPairedUnitTransition(), BattlePresentation_RunUnitTransition(), BattlePresentation_WaitForAdvance(), BattlePresentation_WaitForPromptAt(), Clear_UpdateBlend(), Colosso_FadeInCompetitor(), Colosso_UpdateLettering(), CrossboneIslePlatformRooms_InitializeScene2(), DisplayBlend_RunScript(), DisplayScroll_RunSlideshow(), Event_BeginRevealBlend(), Event_CastReveal(), Event_EndRevealBlend(), Event_HurryToThePlaza(), FieldFx_StartGroundParticles(), FieldMotes_Start(), Graphics_AdvancePaletteCycle(), Graphics_ApplyWindowBlendRegisters(), Graphics_FadeAlphaIn(), Graphics_FadeAlphaOut(), Io_SetBlendAlpha(), LemurianShip_SetupScene(), LuckyDice_Run(), Map_InitializePerspectiveScene(), Map_ShowWorldMap(), Map_UpdateWorldMapMarkers(), MercuryLighthouse_Initialize(), MercuryLighthouseEntrance_Initialize(), RaiseTheShip(), ReelGame_Run(), ReelGame_RunFrame(), SetBlendAlpha(), Ship_UpdateSwell(), Title_LoadIntroBackgrounds(), Title_RevealScreen(), Title_ShowIntro(), Title_UpdateIntroSprites(), TolbiSpring_Initialize(), TolbiSpring_RiseAndFadeIn(), and TretTreeBranch_Initialize().

◆ BLEND_ALPHA

#define BLEND_ALPHA ( top,
bottom )
Value:
((top) | ((bottom) << 8))

A REG_BLDALPHA value: top and bottom are the two targets' weights, out of 16.

Definition at line 145 of file io_reg.h.

Referenced by BattleFx_BeginCanvasLayer(), BattleFx_ConfigureEffectDisplay(), BattleFx_OpenCanvasLayer(), BattleFx_PlayUnitElementEffect(), BattleFx_RunBladeRain(), BattleFx_RunBoreas(), BattleFx_RunBurstScene(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCondemn(), BattleFx_RunDjinniEntrance(), BattleFx_RunDragonCloud(), BattleFx_RunElementBurst(), BattleFx_RunElementPillar(), BattleFx_RunFire(), BattleFx_RunFlare(), BattleFx_RunFroth(), BattleFx_RunGaia(), BattleFx_RunGround(), BattleFx_RunGrowingColumns(), BattleFx_RunHail(), BattleFx_RunJudgment(), BattleFx_RunJupiter(), BattleFx_RunKirin(), BattleFx_RunLobbedShells(), BattleFx_RunNeptune(), BattleFx_RunNereid(), BattleFx_RunOrbitingSkulls(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPlasma(), BattleFx_RunPrism(), BattleFx_RunRagnarok(), BattleFx_RunShatteringOpening(), BattleFx_RunSparkGroups(), BattleFx_RunSpiderWeb(), BattleFx_RunStreakVolley(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTitanBlade(), BattleFx_RunTorch(), BattleFx_RunVenus(), BattleFx_RunVolcano(), BattleFx_RunWhirlwind(), BattleFx_SetupBlendedDisplay(), BattleFx_SetupCanvasTileMap(), BattleFx_StartElementStreaks(), BattleFx_StartFadeOverlay(), BattlePres_RunEntryTransition(), BattlePres_SetActorModes(), BattlePresentation_RunPairedUnitTransition(), BattlePresentation_RunUnitTransition(), BattlePresentation_WaitForAdvance(), BattlePresentation_WaitForPromptAt(), Clear_UpdateBlend(), Colosso_FadeInCompetitor(), Event_CastReveal(), Event_HurryToThePlaza(), FieldFx_StartGroundParticles(), FieldMotes_Start(), Graphics_AdvancePaletteCycle(), Graphics_FadeAlphaIn(), Graphics_FadeAlphaOut(), LuckyDice_Run(), Map_InitializePerspectiveScene(), MercuryLighthouse_Initialize(), MercuryLighthouseEntrance_Initialize(), ReelGame_Run(), ReelGame_RunFrame(), Title_LoadIntroBackgrounds(), Title_RevealScreen(), Title_UpdateIntroSprites(), and TretTreeBranch_Initialize().

◆ REG_BLDY

◆ BG_CANVAS_MAP

#define BG_CANVAS_MAP   ((volatile s16 *)0x06003800)

Definition at line 148 of file io_reg.h.

Referenced by BattleFx_BeginTiledCanvas().

◆ REG_BG0HOFS

◆ REG_DMA0

◆ REG_DMA3

#define REG_DMA3   ((volatile u32 *)0x040000d4)

Definition at line 153 of file io_reg.h.

Referenced by AltinPeak_StepPaletteAnim(), AltmillerCave_BeginRetreat(), BattleBackground_Load(), BattleEffect_InitializeBuffers(), BattleEffect_InitializeSharedScene(), BattleFx_BuildBuffer(), BattleFx_InitializeStarField(), BattleFx_RunJudgment(), BattleFx_RunParticleStreams(), BattleFx_RunTorch(), BattlePres_RunEntryTransition(), BattlePres_UpdateHBlankScroll(), BattlePresentation_BuildSortedUnitEntries(), BattlePresentation_ConfigurePaletteFade(), BattlePresentation_InitializeTilePattern(), BattlePresentation_SetPaletteLevel(), BattlePresentation_UploadTileVariant(), CharacterSelector_RunRearrange(), Clear_LoadBackground(), ColorBuffer_BackupAndBrighten(), ColorBuffer_BackupAndBrightenPartial(), ColorBuffer_BackupAndDarken(), ColorBuffer_BackupAndDarkenPartial(), ColorBuffer_BackupAndHalve(), ColorBuffer_BackupAndHalveNonzero(), ColorBuffer_BackupAndScaleNonzeroThreeQuarters(), ColorBuffer_BackupAndScaleThreeQuarters(), Colosso_DrawGauge(), Colosso_LoadLettering(), CrossboneIslePillarRooms_ReadMapCell(), CrossboneIslePillarRooms_SortPillarActors(), DebugMenu_SelectItem(), DisplayBlend_StartScript(), DisplayScroll_InitializeHBlankDma(), DisplayScroll_UpdateObjects(), DisplayTransition_FillTilemapAndSolidTile(), Dma_StopAllThenRunHook(), Event_MovePillar(), FieldFx_UpdateLightning(), HeatGauge_Draw(), IoWriteQueue_FlushPending(), ItemLevel_SelectAbility(), ItemLevel_SelectItem(), ItemMenu_SelectGiveQuantity(), KolimaForestBend_Initialize(), KolimaPalette_Capture(), KolimaPalette_Restore(), KolimaPalette_SaveFirst(), KolimaPalette_SaveSecond(), LuckyDice_Run(), Map_LoadAreaGraphics(), Map_ShowBg1FromBuffer(), Map_ShowWorldMap(), Map_WriteLayerCellTile(), MapAnimation_PresentFrame(), MapAnimation_Update(), Menu_OpenBackdropScreen(), NameEntry_EditOwnerName(), ObjectTable_Restore(), ObjectTable_Snapshot(), OptionMenu_Open(), Palette_CopyObjectBankToBackground14(), Palette_LightenBankHighlight(), Palette_LoadBasicObjColors(), Palette_StepTowardResource(), Palette_Transform(), PaletteFade_Init(), PaletteFade_Update(), PaletteQueue_Add(), PaletteQueue_StepCycles(), PartyTalkMenu_Choose(), ReelGame_Run(), ReelGame_RunFrame(), ReelGame_TransferCanvas(), Resource_DecompressHalfwords(), RunLuckyDice(), RunReelGame(), Runtime_InstallIwramAndIrqs(), SaveState_ReadSlotAndCheckChecksum(), SerialRuntime_CollectReceivedPayloads(), SerialRuntime_PrepareSendPacket(), SerialRuntime_StepBlockTransfer(), SerialTest_Run(), ShipGlow_CyclePalette(), Shop_CreatePriceSprite(), Shop_SaveAndTintFieldPalette(), Shop_SelectQuantity(), Sound_LoadPresetParameters(), Sprite_ComposeAnimationFrame(), StatusMenu_Run(), System_CopyBuildStamp(), System_VBlankHandler(), Title_LoadBackground(), Title_LoadIntroBackgrounds(), Title_LoadSprites(), Title_ShowAnimatedSplash(), Title_ShowIntro(), Title_ShowSplashScreen(), Title_UpdateIntroSprites(), Transform_BuildLookAt(), Transform_Load(), Transform_Pop(), Transform_Push(), Transform_Store(), TretPalette_SaveSceneColors(), Ui_LoadWindowGraphics(), UiGlyph_LoadEntryWithPalette(), UiText_BuildRenderEntries(), UiText_DrawGlyph(), UiText_LoadRemappedGlyph(), UiText_ScrollCanvasUp(), UiWindow_DrawStatusBarTiles(), UiWindow_OverlayTilePattern(), UiWork_Initialize(), UiWork_InitializeWithResourceCounters(), UiWork_UploadDirtyBlocks(), Vram_CopyTile(), VramCache_Load(), WaitFrames(), WorldMap_BeginStillView(), and WorldMap_LoadGraphics().

◆ PLTT_BACKDROP

◆ BG_PLTT

#define BG_PLTT   ((volatile u16 *)0x05000000)

Definition at line 157 of file io_reg.h.

Referenced by BattleEffect_InitializeBuffers(), BattleFx_ArmPaletteHBlankDma(), BattleFx_BuildBuffer(), BattleFx_InitializeStarField(), BattleFx_RunAstralBlast(), BattleFx_RunAtalanta(), BattleFx_RunBeamSequence(), BattleFx_RunBind(), BattleFx_RunBoreas(), BattleFx_RunBreak(), BattleFx_RunBurstScene(), BattleFx_RunBurstShower(), BattleFx_RunCondemn(), BattleFx_RunCybele(), BattleFx_RunDjinnBeams(), BattleFx_RunDjinniEntrance(), BattleFx_RunDrain(), BattleFx_RunElementBurst(), BattleFx_RunElementPillar(), BattleFx_RunEruption(), BattleFx_RunFroth(), BattleFx_RunGaia(), BattleFx_RunGatheringLights(), BattleFx_RunHaunt(), BattleFx_RunHealingMotes(), BattleFx_RunJudgment(), BattleFx_RunLobbedShells(), BattleFx_RunMars(), BattleFx_RunMirroredWall(), BattleFx_RunMoteFountain(), BattleFx_RunNeptune(), BattleFx_RunNereid(), BattleFx_RunOrbitingSkulls(), BattleFx_RunOrbitingSpirals(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPlanetDiver(), BattleFx_RunPlasma(), BattleFx_RunProcne(), BattleFx_RunProjectileVolley(), BattleFx_RunRamses(), BattleFx_RunRingAndSparkScene(), BattleFx_RunRushingStrike(), BattleFx_RunShatteringOpening(), BattleFx_RunShiningStar(), BattleFx_RunSparkGroups(), BattleFx_RunStatBoost(), BattleFx_RunStatReduction(), BattleFx_RunStreakVolley(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetBursts(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunTorch(), BattleFx_RunTriangleStrike(), BattleFx_RunVolcano(), BattleFx_RunWhirlwind(), BattleFx_StartElementStreaks(), BattleFx_StepPaletteToResource(), BattlePalette_UpdateBlend(), BattlePres_RunItem(), CharacterSelector_RunRearrange(), Clear_LoadBackground(), Graphics_AdjustPaletteBank(), Graphics_ClearCharacterBlockAndPalette(), Graphics_ConvertBackgroundToBlueRamp(), Graphics_LoadCharacterBlockAndPalette(), Graphics_UpdatePhasePalette(), KolimaPalette_Capture(), LuckyDice_Run(), Map_LoadAreaGraphics(), Map_LoadLayeredScene(), Map_ShowWorldMap(), Palette_BrightenBgEntries(), Palette_CopyBanksWithBrightnessOffset(), Palette_StepTowardResource(), PaletteFade_Init(), PaletteFade_Update(), PaletteQueue_Add(), ReelGame_Run(), Resource_LoadAndDecompress(), StatusMenu_Run(), Title_LoadBackground(), Title_LoadIntroBackgrounds(), Title_ShowAnimatedSplash(), Title_ShowIntro(), Title_ShowSplashScreen(), TretPalette_SaveSceneColors(), and UiText_LoadRemappedGlyph().

◆ BG_PLTT_COLOR

◆ OBJ_PLTT

◆ OBJ_PLTT_COLOR

#define OBJ_PLTT_COLOR ( palette,
color )
Value:
(OBJ_PLTT[(palette) * 16 + (color)])
#define OBJ_PLTT
Definition io_reg.h:159

Definition at line 160 of file io_reg.h.

Referenced by Colosso_DrawGauge(), Colosso_LoadLettering(), OptionMenu_Open(), ReelGame_Run(), Title_LoadSprites(), and UiGlyph_LoadEntryWithPalette().

◆ RGB

◆ BG_CHAR_BLOCK

#define BG_CHAR_BLOCK ( n)
Value:
((u8 *)0x06000000 + (n) * 0x4000)
unsigned char u8
Definition types.h:11

Definition at line 166 of file io_reg.h.

Referenced by BattleBackground_Load(), BattleFx_BeginCanvasLayer(), BattleFx_EndCanvasLayer(), BattleFx_EndElementStreaks(), BattleFx_FlushPendingGraphicsTransfer(), BattleFx_OpenCanvasLayer(), BattleFx_PlayUnitElementEffect(), BattleFx_ProcessPendingGraphicsTransfer(), BattleFx_RunCastingImpact(), BattleFx_RunDjinniEntrance(), BattleFx_RunImpactBurst(), BattleFx_RunParticleStreams(), BattleFx_RunQuake(), BattleFx_RunRingAndSparkScene(), BattleFx_RunShatteringOpening(), BattleFx_SetupBlendedDisplay(), BattleFx_SetupCanvasTileMap(), BattleFx_UploadStarField(), CastingImpact_EndPrelude(), DisplayTransition_FillTilemapAndSolidTile(), DisplayTransition_UpdateFrame(), DjinnMenu_Run(), Graphics_ClearCharacterBlockAndPalette(), Graphics_ConvertBackgroundToBlueRamp(), Graphics_LoadCharacterBlockAndPalette(), Graphics_ResetVramBlockAndReleaseHeapBlocks(), ItemMenu_Run(), Map_LoadLayeredScene(), Map_ShowBg1FromBuffer(), Map_ShowWorldMap(), MapAnimation_PresentFrame(), MapAnimation_Update(), Menu_BuildPatternTiles(), Menu_OpenBackdropScreen(), ReelGame_Run(), StatusMenu_Run(), Title_LoadIntroBackgrounds(), Title_ShowAnimatedSplash(), Title_ShowIntro(), Title_ShowSplashScreen(), Ui_LoadWindowGraphics(), UiText_LoadRemappedGlyph(), UiText_RenderStringTiles(), UiWindow_OverlayTilePattern(), UiWork_Initialize(), Vram_CopyTile(), WorldMap_BeginStillView(), and WorldMap_LoadGraphics().

◆ BG_SCREEN_BLOCK

◆ TILE_SIZE_4BPP

#define TILE_SIZE_4BPP   32

◆ OBJ_VRAM0

#define OBJ_VRAM0   0x06010000

◆ REG_TM3CNT

#define REG_TM3CNT   (*(volatile u32 *)0x0400010c)

◆ REG_TM3CNT_H

#define REG_TM3CNT_H   (*(volatile u16 *)0x0400010e)

Definition at line 173 of file io_reg.h.

Referenced by SerialRuntime_PrepareSendPacket().

◆ TIMER_INTR_ENABLE

#define TIMER_INTR_ENABLE   0x0040

TMxCNT_H flags, as pret names them.

Definition at line 176 of file io_reg.h.

Referenced by SerialRuntime_PrepareSendPacket().

◆ TIMER_ENABLE

#define TIMER_ENABLE   0x0080

Definition at line 177 of file io_reg.h.

Referenced by AudioEngine_SetPcmRate(), and SerialRuntime_PrepareSendPacket().

◆ REG_SIODATA32

#define REG_SIODATA32   ((volatile u32 *)0x04000120)

Definition at line 179 of file io_reg.h.

Referenced by SerialRuntime_HandleTransferInterrupt().

◆ REG_SIOCNT

◆ REG_SIOCNT16

#define REG_SIOCNT16   (*(volatile u16 *)0x04000128)

Definition at line 181 of file io_reg.h.

Referenced by SerialRuntime_DisableTransfer(), and SerialRuntime_Initialize().

◆ REG_SIODATA8

#define REG_SIODATA8   (*(volatile u16 *)0x0400012a)

Definition at line 182 of file io_reg.h.

◆ REG_KEYINPUT

#define REG_KEYINPUT   (*(volatile u16 *)0x04000130)

Definition at line 183 of file io_reg.h.

Referenced by System_VBlankHandler().

◆ REG_KEYCNT

#define REG_KEYCNT   (*(volatile u16 *)0x04000132)

◆ REG_RCNT

#define REG_RCNT   (*(volatile u16 *)0x04000134)

Definition at line 185 of file io_reg.h.

Referenced by SerialRuntime_Initialize().

◆ SIO_115200_BPS

#define SIO_115200_BPS   0x0003

Definition at line 188 of file io_reg.h.

Referenced by SerialRuntime_DisableTransfer(), and SerialRuntime_Initialize().

◆ SIO_START

#define SIO_START   0x0080

Definition at line 189 of file io_reg.h.

◆ SIO_32BIT_MODE

#define SIO_32BIT_MODE   0x1000

Definition at line 190 of file io_reg.h.

Referenced by SerialRuntime_Initialize().

◆ SIO_MULTI_MODE

#define SIO_MULTI_MODE   0x2000

Definition at line 191 of file io_reg.h.

Referenced by SerialRuntime_DisableTransfer(), and SerialRuntime_Initialize().

◆ SIO_INTR_ENABLE

#define SIO_INTR_ENABLE   0x4000

Definition at line 192 of file io_reg.h.

Referenced by SerialRuntime_Initialize().

◆ RCNT_SIO_MODE

#define RCNT_SIO_MODE   0x0000

RCNT's mode: 0 leaves the port to SIOCNT's serial modes; bit 15 alone makes it general-purpose pins.

Definition at line 196 of file io_reg.h.

Referenced by SerialRuntime_Initialize().

◆ RCNT_GPIO_MODE

#define RCNT_GPIO_MODE   0x8000

Definition at line 197 of file io_reg.h.

Referenced by SerialRuntime_Initialize().

◆ DMA_DEST_INC

#define DMA_DEST_INC   0x0000

Definition at line 201 of file io_reg.h.

◆ DMA_DEST_DEC

#define DMA_DEST_DEC   0x0020

Definition at line 202 of file io_reg.h.

◆ DMA_DEST_FIXED

#define DMA_DEST_FIXED   0x0040

Definition at line 203 of file io_reg.h.

Referenced by AudioEngine_Initialize(), and AudioEngine_SuspendDirectSound().

◆ DMA_DEST_RELOAD

#define DMA_DEST_RELOAD   0x0060

Definition at line 204 of file io_reg.h.

Referenced by MapAnimation_ApplyAffineFrame().

◆ DMA_SRC_INC

#define DMA_SRC_INC   0x0000

Definition at line 205 of file io_reg.h.

◆ DMA_SRC_DEC

#define DMA_SRC_DEC   0x0080

Definition at line 206 of file io_reg.h.

◆ DMA_SRC_FIXED

#define DMA_SRC_FIXED   0x0100

Definition at line 207 of file io_reg.h.

Referenced by DisplayBlend_StartScript(), GameState_InitDefaults(), and Title_ShowIntro().

◆ DMA_REPEAT

#define DMA_REPEAT   0x0200

◆ DMA_16BIT

#define DMA_16BIT   0x0000

Definition at line 209 of file io_reg.h.

◆ DMA_32BIT

◆ DMA_DREQ_ON

#define DMA_DREQ_ON   0x0800

Definition at line 211 of file io_reg.h.

◆ DMA_START_NOW

#define DMA_START_NOW   0x0000

Definition at line 212 of file io_reg.h.

◆ DMA_START_VBLANK

#define DMA_START_VBLANK   0x1000

Definition at line 213 of file io_reg.h.

◆ DMA_START_HBLANK

#define DMA_START_HBLANK   0x2000

Definition at line 214 of file io_reg.h.

Referenced by MapAnimation_ApplyAffineFrame().

◆ DMA_START_SPECIAL

#define DMA_START_SPECIAL   0x3000

Definition at line 215 of file io_reg.h.

Referenced by AudioEngine_ResumeDirectSound().

◆ DMA_INTR_ENABLE

#define DMA_INTR_ENABLE   0x4000

Definition at line 216 of file io_reg.h.

◆ DMA_ENABLE

#define DMA_ENABLE   0x8000

Definition at line 217 of file io_reg.h.

Referenced by AltinPeak_StepPaletteAnim(), AltmillerCave_BeginRetreat(), AudioEngine_Initialize(), AudioEngine_ResumeDirectSound(), AudioEngine_SuspendDirectSound(), BattleEffect_InitializeBuffers(), BattleEffect_InitializeSharedScene(), BattleFx_ArmBg0HBlankDma(), BattleFx_BuildBuffer(), BattleFx_StartWindowHBlankDma(), BattlePalette_UpdateBlend(), CharacterSelector_RunRearrange(), Clear_LoadBackground(), Colosso_DrawGauge(), Colosso_LoadLettering(), CrossboneIslePillarRooms_ReadMapCell(), CrossboneIslePillarRooms_SortPillarActors(), DebugMenu_SelectItem(), DisplayBlend_StartScript(), DisplayScroll_ArmHBlankDma(), DisplayScroll_DisarmHBlankDma(), DisplayTransition_FillTilemapAndSolidTile(), DisplayTransition_UpdateFrame(), DisplayTransition_UpdateScanlineTable(), Dma_Stop(), Dma_Wait(), Event_MovePillar(), FieldFx_UpdateLightning(), Game_ResetForNewGame(), GameState_InitDefaults(), ItemLevel_SelectAbility(), ItemLevel_SelectItem(), ItemMenu_SelectGiveQuantity(), KolimaForestBend_Initialize(), KolimaPalette_Capture(), KolimaPalette_Restore(), KolimaPalette_SaveFirst(), KolimaPalette_SaveSecond(), LuckyDice_Run(), Map_LoadAreaGraphics(), Map_ShowBg1FromBuffer(), Map_ShowWorldMap(), Map_WriteLayerCellTile(), MapAnimation_ApplyAffineFrame(), MapAnimation_PresentFrame(), MapAnimation_Update(), Menu_OpenBackdropScreen(), ObjectTable_Restore(), ObjectTable_Snapshot(), Palette_CopyObjectBankToBackground14(), Palette_LightenBankHighlight(), Palette_LoadBasicObjColors(), Palette_StepTowardResource(), Palette_Transform(), PaletteQueue_Add(), PaletteQueue_StepCycles(), ReelGame_Run(), ReelGame_RunFrame(), ReelGame_TransferCanvas(), Ripple_Stop(), RunLuckyDice(), RunReelGame(), ShipGlow_CyclePalette(), Shop_CreatePriceSprite(), Shop_SaveAndTintFieldPalette(), Shop_SelectQuantity(), Sprite_ComposeAnimationFrame(), StatusMenu_Run(), System_Initialize(), System_VBlankHandler(), Title_LoadBackground(), Title_LoadIntroBackgrounds(), Title_LoadSprites(), Title_ShowIntro(), TretPalette_SaveSceneColors(), Ui_LoadWindowGraphics(), WaitFrames(), WorldMap_BeginStillView(), and WorldMap_LoadGraphics().

◆ DMA_START_TIMING_DRQ_REPEAT

#define DMA_START_TIMING_DRQ_REPEAT   (DMA_START_SPECIAL | DMA_DREQ_ON | DMA_REPEAT)

◆ DMA_COPY_WORDS

#define DMA_COPY_WORDS ( n)
Value:
((DMA_ENABLE | DMA_32BIT) << 16 | (n))
#define DMA_32BIT
Definition io_reg.h:210
#define DMA_ENABLE
Definition io_reg.h:217

Definition at line 226 of file io_reg.h.

Referenced by BattleBackground_Load(), BattleFx_InitializeStarField(), BattleFx_PlayUnitElementEffect(), BattlePres_RunEntryTransition(), BattlePres_UpdateHBlankScroll(), BattlePresentation_BuildSortedUnitEntries(), BattlePresentation_UploadTileVariant(), ColorBuffer_BackupAndBrighten(), ColorBuffer_BackupAndBrightenPartial(), ColorBuffer_BackupAndDarken(), ColorBuffer_BackupAndDarkenPartial(), ColorBuffer_BackupAndHalve(), ColorBuffer_BackupAndHalveNonzero(), ColorBuffer_BackupAndScaleNonzeroThreeQuarters(), ColorBuffer_BackupAndScaleThreeQuarters(), DisplayScroll_UpdateObjects(), Dma_StopAllThenRunHook(), Graphics_LoadCharacterBlockAndPalette(), Palette_Transform(), PaletteFade_Init(), PaletteFade_Update(), Resource_DecompressHalfwords(), Runtime_InstallIwramAndIrqs(), SaveState_InitializeWorkspace(), SaveState_InvalidateSlot(), SaveState_ReadRecordPayload(), SaveState_ReadSlotAndCheckChecksum(), SaveState_WriteRecord(), SerialRuntime_CollectReceivedPayloads(), SerialRuntime_PrepareSendPacket(), SerialRuntime_StepBlockTransfer(), SerialTest_Run(), Sound_LoadPresetParameters(), System_CopyBuildStamp(), System_VBlankHandler(), Title_LoadIntroBackgrounds(), Title_ShowAnimatedSplash(), Title_ShowIntro(), Title_ShowSplashScreen(), Title_UpdateIntroSprites(), Transform_BuildLookAt(), Ui_LoadWindowGraphics(), VramCache_Load(), and WaitFrames().

◆ DMA_COPY_HALFWORDS

#define DMA_COPY_HALFWORDS ( n)

◆ DMA_HBLANK_HALFWORD_PER_LINE

◆ DMA_HBLANK_WORD_PER_LINE

#define DMA_HBLANK_WORD_PER_LINE
Value:
<< 16 | \
1)
#define DMA_DEST_RELOAD
Definition io_reg.h:204
#define DMA_START_HBLANK
Definition io_reg.h:214
#define DMA_REPEAT
Definition io_reg.h:208

Definition at line 230 of file io_reg.h.

Referenced by BattleFx_ArmBg2AffineHBlankDma(), BattleFx_StartWindowHBlankDma(), and DisplayScroll_ArmHBlankDma().

◆ CPU_SET_SRC_FIXED

#define CPU_SET_SRC_FIXED   0x01000000

BIOS CpuSet control flags, above its count.

Definition at line 236 of file io_reg.h.

Referenced by AudioEngine_Initialize(), AudioEngine_SuspendDirectSound(), and CgbAudio_Initialize().

◆ CPU_SET_32BIT

#define CPU_SET_32BIT   0x04000000

◆ OAM

#define OAM   ((void *)0x07000000)

◆ OAM_SIZE

#define OAM_SIZE   0x400

OAM's size in bytes: 128 sprites of 8 bytes.

Definition at line 241 of file io_reg.h.

Referenced by DisplayScroll_UpdateObjects(), and System_VBlankHandler().

◆ KEYS_MASK

#define KEYS_MASK   0x3ff

Definition at line 259 of file io_reg.h.

Referenced by System_VBlankHandler().

◆ REG_BG0CNT

#define REG_BG0CNT   (*(volatile u16 *)0x04000008)

◆ REG_BG0VOFS

#define REG_BG0VOFS   (*(volatile u16 *)0x04000012)

Definition at line 262 of file io_reg.h.

Referenced by BattlePresentation_ClearBg0VerticalOffset(), and Graphics_ClearBg0Vofs().

◆ REG_SOUNDCNT_H

#define REG_SOUNDCNT_H   (*(volatile u16 *)0x04000082)

Definition at line 263 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ SOUND_CGB_MIX_FULL

#define SOUND_CGB_MIX_FULL   0x0002

Definition at line 266 of file io_reg.h.

◆ SOUND_A_MIX_FULL

#define SOUND_A_MIX_FULL   0x0004

Definition at line 267 of file io_reg.h.

◆ SOUND_B_MIX_FULL

#define SOUND_B_MIX_FULL   0x0008

Definition at line 268 of file io_reg.h.

◆ SOUND_ALL_MIX_FULL

#define SOUND_ALL_MIX_FULL   (SOUND_CGB_MIX_FULL | SOUND_A_MIX_FULL | SOUND_B_MIX_FULL)

Definition at line 269 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ SOUND_A_RIGHT_OUTPUT

#define SOUND_A_RIGHT_OUTPUT   0x0100

Definition at line 271 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ SOUND_A_LEFT_OUTPUT

#define SOUND_A_LEFT_OUTPUT   0x0200

Definition at line 272 of file io_reg.h.

◆ SOUND_A_TIMER_0

#define SOUND_A_TIMER_0   0x0000

Definition at line 273 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ SOUND_A_FIFO_RESET

#define SOUND_A_FIFO_RESET   0x0800

Definition at line 274 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ SOUND_B_RIGHT_OUTPUT

#define SOUND_B_RIGHT_OUTPUT   0x1000

Definition at line 275 of file io_reg.h.

◆ SOUND_B_LEFT_OUTPUT

#define SOUND_B_LEFT_OUTPUT   0x2000

Definition at line 276 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ SOUND_B_TIMER_0

#define SOUND_B_TIMER_0   0x0000

Definition at line 277 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ SOUND_B_FIFO_RESET

#define SOUND_B_FIFO_RESET   0x8000

Definition at line 278 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ REG_SOUNDBIAS

#define REG_SOUNDBIAS   (*(volatile u16 *)0x04000088)

Definition at line 279 of file io_reg.h.

◆ REG_FIFO_A

#define REG_FIFO_A   (*(volatile u32 *)0x040000a0)

Definition at line 280 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ REG_FIFO_B

#define REG_FIFO_B   (*(volatile u32 *)0x040000a4)

Definition at line 281 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ REG_DMA0SAD

#define REG_DMA0SAD   (*(volatile u32 *)0x040000b0)

Definition at line 282 of file io_reg.h.

Referenced by BattlePres_UpdateHBlankScroll().

◆ REG_DMA0DAD

#define REG_DMA0DAD   (*(volatile u32 *)0x040000b4)

Definition at line 283 of file io_reg.h.

◆ REG_DMA0CNT

#define REG_DMA0CNT   (*(volatile u32 *)0x040000b8)

Definition at line 284 of file io_reg.h.

◆ REG_DMA0CNT_H

#define REG_DMA0CNT_H   (*(volatile u16 *)0x040000ba)

Definition at line 285 of file io_reg.h.

◆ REG_DMA1SAD

#define REG_DMA1SAD   (*(volatile u32 *)0x040000bc)

Definition at line 286 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ REG_DMA1DAD

#define REG_DMA1DAD   (*(volatile u32 *)0x040000c0)

Definition at line 287 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ REG_DMA1CNT

#define REG_DMA1CNT   (*(volatile u32 *)0x040000c4)

Definition at line 288 of file io_reg.h.

Referenced by AudioEngine_Initialize(), and AudioEngine_SuspendDirectSound().

◆ REG_DMA1CNT_H

#define REG_DMA1CNT_H   (*(volatile u16 *)0x040000c6)

◆ REG_DMA2SAD

#define REG_DMA2SAD   (*(volatile u32 *)0x040000c8)

Definition at line 290 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ REG_DMA2DAD

#define REG_DMA2DAD   (*(volatile u32 *)0x040000cc)

Definition at line 291 of file io_reg.h.

Referenced by AudioEngine_Initialize().

◆ REG_DMA2CNT

#define REG_DMA2CNT   (*(volatile u32 *)0x040000d0)

Definition at line 292 of file io_reg.h.

Referenced by AudioEngine_Initialize(), and AudioEngine_SuspendDirectSound().

◆ REG_DMA2CNT_H

#define REG_DMA2CNT_H   (*(volatile u16 *)0x040000d2)

◆ REG_DMA3SAD

#define REG_DMA3SAD   (*(volatile u32 *)0x040000d4)

Definition at line 294 of file io_reg.h.

◆ REG_DMA3DAD

#define REG_DMA3DAD   (*(volatile u32 *)0x040000d8)

Definition at line 295 of file io_reg.h.

◆ REG_DMA3CNT

#define REG_DMA3CNT   (*(volatile u32 *)0x040000dc)

Definition at line 296 of file io_reg.h.

◆ REG_DMA3CNT_H

#define REG_DMA3CNT_H   (*(volatile u16 *)0x040000de)

Definition at line 297 of file io_reg.h.

◆ REG_TM0CNT_L

#define REG_TM0CNT_L   (*(volatile u16 *)0x04000100)

Definition at line 298 of file io_reg.h.

Referenced by AudioEngine_SetPcmRate(), and SetFlashTimerIntr().

◆ REG_TM0CNT_H

#define REG_TM0CNT_H   (*(volatile u16 *)0x04000102)

Definition at line 299 of file io_reg.h.

Referenced by AudioEngine_SetPcmRate().

◆ REG_TM1CNT_L

#define REG_TM1CNT_L   (*(volatile u16 *)0x04000104)

Definition at line 300 of file io_reg.h.

◆ REG_TM1CNT_H

#define REG_TM1CNT_H   (*(volatile u16 *)0x04000106)

Definition at line 301 of file io_reg.h.

◆ REG_TM2CNT_L

#define REG_TM2CNT_L   (*(volatile u16 *)0x04000108)

Definition at line 302 of file io_reg.h.

◆ REG_TM2CNT_H

#define REG_TM2CNT_H   (*(volatile u16 *)0x0400010a)

Definition at line 303 of file io_reg.h.

◆ REG_IE

◆ REG_IF

#define REG_IF   (*(volatile u16 *)0x04000202)

◆ REG_WAITCNT

◆ REG_IME

◆ KEYCNT_SOFT_RESET

#define KEYCNT_SOFT_RESET   0xc00f

A, B, Select and Start.

Definition at line 311 of file io_reg.h.

Referenced by System_Initialize(), and WaitFrames().

◆ KEYCNT_DISARMED

#define KEYCNT_DISARMED   0xc3ff

Requires all ten keys together to prevent the reset chord retriggering it.

Definition at line 313 of file io_reg.h.

Referenced by Input_HandleKeyInterrupt(), and Runtime_InstallIwramAndIrqs().

◆ KEYCNT_SHOULDERS_WAKE

#define KEYCNT_SHOULDERS_WAKE   0xc300

L and R, which wake the sleep.

Definition at line 314 of file io_reg.h.

Referenced by WaitFrames().

◆ KEYCNT_SLEEP_WAKE

#define KEYCNT_SLEEP_WAKE   0xc304

Definition at line 315 of file io_reg.h.

◆ WAITCNT_GAME

#define WAITCNT_GAME   0x4014

Definition at line 317 of file io_reg.h.

Referenced by System_Initialize().

Enumeration Type Documentation

◆ DisplayControl

Enumerator
DISPCNT_MODE_0 

four text backgrounds

DISPCNT_MODE_1 

BG0 and BG1 text, BG2 affine.

DISPCNT_MODE_2 

BG2 and BG3 affine.

DISPCNT_OBJ_1D_MAP 
DISPCNT_BG0_ON 
DISPCNT_BG1_ON 
DISPCNT_BG2_ON 
DISPCNT_BG3_ON 
DISPCNT_OBJ_ON 
DISPCNT_WIN0_ON 
DISPCNT_WIN1_ON 
DISPCNT_OBJWIN_ON 

Definition at line 35 of file io_reg.h.

◆ KeyMask

enum KeyMask
Enumerator
KEY_A 
KEY_B 
KEY_SELECT 
KEY_START 
KEY_RIGHT 
KEY_LEFT 
KEY_UP 
KEY_DOWN 
KEY_R 
KEY_L 
KEYS_HORIZONTAL 
KEYS_VERTICAL 
KEYS_DPAD 
KEYS_SHOULDERS 

Definition at line 242 of file io_reg.h.