include/system/definitions.h
The system library's types and constants, as SGL's sl_def.h holds its own: the hardware's registers, and each group's structures, enums and fixed values. More…
Included by color_scale_kernel.c, glyph_arm.c, window_spans.c, field_effect.h, globals.h, mul_fx.h and system.h.
Structures
| Name | Description | |
|---|---|---|
struct | EVENT | An event: its function's address, its priority (see EVENT_PASS_TICK) and its flags (EVENT_FLAG_KEEP_RUNNING). |
struct | HEAP_SLOTS | The heap's 64 words in IWRAM (HeapSlotsWork, 0x03000000): the two pools' next free addresses, then each slot's block once allocated, else null. |
struct | AFFINE_TRANSFORM | A sprite's rotation and scale: scales in 8.8 fixed point (AFFINE_SCALE_ONE is full size), the angle in 1/65536 turns. |
union | OAM_MATRIX | One OAM rotation-scaling matrix: pa, pb, pc and pd in 8.8 fixed point, the inverse of the transform the sprite is drawn with. |
struct | BG_SCROLL | The bg_scroll group. |
struct | DMA_REGISTERS | The dma group. |
struct | STUB | The stub group. |
struct | ARC_TAN_STUB | A system module table entry whose two-argument target the world map's tilt calls, the arctangent. |
struct | TRIG_STUB | A system module table entry whose one-argument target the world map's tilt calls, the sine or the cosine. |
struct | SYSTEM_STUB_TABLE | The start of the system module's stub table, as far as syCos. |
struct | INPUT_STATE | The input group. |
struct | IO_WRITE_QUEUE | The register writes VBlank carries out once the tick loop has finished a tick, each its value, address and control word; syIOWriteQueueFlushPending empties it. |
struct | OAM_USAGE | The oam group. |
struct | OAM_WORDS | The oam_words group. |
struct | POS | The point group. |
struct | PROJECTION | The projection group. |
struct | MAIN_ROUTINE_STATE | The game's blocks the system library's RAM holds, complete here so that each variable globals.h declares has its whole type. |
struct | WORLD_MAP_MARKER | A marker sprite's OAM entry, after a word of its own. |
struct | WORLD_MAP_STATE | WorldMapStateWork, the map screen's state while it is open: its resources, the cursor and the marker sprites. |
struct | WORLD_MAP_CHOICE | MainRoutineStateWork.mapScreenFlag under a label of its own, MapScreenChoice: the destination last chosen on the map screen. |
struct | BUP_SUMMARY | A save file's summary for the file screen: the leader's name, level and class, the area, play time, coins, Djinn and party. secondPartPlayTime is filled on reading from the start of the file's next sector (offset 0x10, or 0x110 for the extra summary); if it differs from playTime, the file was not written whole. |
struct | BUP_WORKSPACE | The save's state: which of the BUP_SECTOR_COUNT flash sectors hold a part, their part ids and counters, one part's three sectors and the summaries. |
struct | BUP_SECTOR_HEADER | The header of a save sector in flash: its signature, the part it holds, its checksum and its counter. |
struct | SERIAL_PACKET | The serial group. |
struct | SERIAL_STATE | The link cable's runtime: its mode and phase, the consoles heard from, the send position and the packet buffers the interrupt handler fills. |
struct | SERIAL_TRANSFER_STATE | A console's block transfer state, exchanged with the partner each VBlank: its block number, its status and flags, and a 20-byte block. |
struct | ANIMATION_METADATA | The sprite_metadata group. |
struct | VRAM_CACHE_ENTRY | A sprite slot of the VRAM cache: the size of its block and where the block starts in sprite VRAM. |
struct | PROJECTED_POINT | A point in view space, and where syConvert3Dto2D puts it on the screen. |
struct | VECTOR3 |
Macros
| Name | Description | |
|---|---|---|
#define | REG_DISPCNT (*(volatile Uint16 *)0x04000000) | Mode, layers, windows. |
#define | REG_DISPSTAT (*(volatile Uint16 *)0x04000004) | Blank flags and IRQs. |
#define | REG_VCOUNT (*(volatile Uint16 *)0x04000006) | Line being drawn, 0..227. |
#define | DISPLAY_TOTAL_LINES 228 | The lines REG_VCOUNT counts through in a tick: the DISPLAY_HEIGHT drawn and those of VBlank. |
#define | REG_BG1CNT (*(volatile Uint16 *)0x0400000a) | BG1. |
#define | REG_BG2CNT (*(volatile Uint16 *)0x0400000c) | BG2. |
#define | REG_BG3CNT (*(volatile Uint16 *)0x0400000e) | BG3. |
#define | BGCNT_PRIORITY (n) (n) | Draw order, 0 in front to 3 behind. |
#define | BGCNT_CHAR_BASE (block) ((block) << 2) | The 16 KB character block, 0 to 3, the layer's tiles are read from. |
#define | BGCNT_MOSAIC 0x0040 | Applies REG_MOSAIC's block size. |
#define | BGCNT_256_COLORS 0x0080 | 8bpp tiles, not 16-colour 4bpp ones. |
#define | BGCNT_SCREEN_BASE (block) ((block) << 8) | The 2 KB screen block, 0 to 31, the layer's map is read from. |
#define | BGCNT_WRAP 0x2000 | Affine backgrounds only: wrap around off the layer's area, which is otherwise transparent. |
#define | BGCNT_SIZE (n) ((n) << 14) | The background's size: for an affine one, 0 to 3 are 128, 256, 512 and 1024 pixels square. |
#define | DISPCNT_MODE_MASK 0x0007 | REG_DISPCNT's three video mode bits, which hold a DISPCNT_MODE_ value. |
#define | REG_BG1HOFS (*(volatile Uint16 *)0x04000014) | The text backgrounds' scroll offsets, write-only: the map pixel, 0 to 511, at the screen's left edge (HOFS) or top edge (VOFS). |
#define | REG_BG1VOFS (*(volatile Uint16 *)0x04000016) | BG1, vertical |
#define | REG_BG2HOFS (*(volatile Uint16 *)0x04000018) | BG2, horizontal |
#define | REG_BG2VOFS (*(volatile Uint16 *)0x0400001a) | BG2, vertical |
#define | REG_BG3HOFS (*(volatile Uint16 *)0x0400001c) | BG3, horizontal |
#define | REG_BG3VOFS (*(volatile Uint16 *)0x0400001e) | BG3, vertical |
#define | Q_8_8 (n) ((Sint16)((n) * 256)) | The BG2/BG3 affine matrix entries are signed 8.8 fixed point: texels stepped per screen pixel. |
#define | REG_BG2PA (*(volatile Uint16 *)0x04000020) | The affine backgrounds' matrices and origins, write-only. |
#define | REG_BG2PB (*(volatile Uint16 *)0x04000022) | BG2: x step a line |
#define | REG_BG2PC (*(volatile Uint16 *)0x04000024) | BG2: y step a pixel |
#define | REG_BG2PD (*(volatile Uint16 *)0x04000026) | BG2: y step a line |
#define | REG_BG2X (*(volatile Sint32 *)0x04000028) | BG2: origin x |
#define | REG_BG2Y (*(volatile Sint32 *)0x0400002c) | BG2: origin y |
#define | REG_BG3PA (*(volatile Uint16 *)0x04000030) | BG3: x step a pixel |
#define | REG_BG3PB (*(volatile Uint16 *)0x04000032) | BG3: x step a line |
#define | REG_BG3PC (*(volatile Uint16 *)0x04000034) | BG3: y step a pixel |
#define | REG_BG3PD (*(volatile Uint16 *)0x04000036) | BG3: y step a line |
#define | REG_BG3X (*(volatile Sint32 *)0x04000038) | BG3: origin x |
#define | REG_BG3Y (*(volatile Sint32 *)0x0400003c) | BG3: origin y |
#define | REG_WIN0H (*(volatile Uint16 *)0x04000040) | The two windows' edges, each a WIN_RANGE value in pixels. |
#define | REG_WIN1H (*(volatile Uint16 *)0x04000042) | window 1, left and right |
#define | REG_WIN0V (*(volatile Uint16 *)0x04000044) | window 0, top and bottom |
#define | REG_WIN1V (*(volatile Uint16 *)0x04000046) | window 1, top and bottom |
#define | WIN_RANGE (start, end) (((start) << 8) | (end)) | A REG_WINxH or REG_WINxV value: the window covers start up to, but not including, end. |
#define | WIN_RANGE_END_MASK 0xff | A WIN_RANGE value's end, its low byte: the window's right or bottom edge. |
#define | REG_WININ (*(volatile Uint16 *)0x04000048) | What windows 0 and 1 show. |
#define | REG_WINOUT (*(volatile Uint16 *)0x0400004a) | What the rest shows. |
#define | WININ_WIN0_BG0 0x0001 | REG_WININ: the layers shown inside window 0 (low byte) and window 1 (high byte). |
#define | WININ_WIN0_BG1 0x0002 | window 0: BG1 |
#define | WININ_WIN0_BG2 0x0004 | window 0: BG2 |
#define | WININ_WIN0_BG3 0x0008 | window 0: BG3 |
#define | WININ_WIN0_OBJ 0x0010 | window 0: sprites |
#define | WININ_WIN0_CLR 0x0020 | window 0: the colour effect |
#define | WININ_WIN0_ALL 0x003f | window 0: everything |
#define | WININ_WIN1_BG0 0x0100 | window 1: BG0 |
#define | WININ_WIN1_BG1 0x0200 | window 1: BG1 |
#define | WININ_WIN1_BG2 0x0400 | window 1: BG2 |
#define | WININ_WIN1_BG3 0x0800 | window 1: BG3 |
#define | WININ_WIN1_OBJ 0x1000 | window 1: sprites |
#define | WININ_WIN1_CLR 0x2000 | window 1: the colour effect |
#define | WININ_WIN1_ALL 0x3f00 | window 1: everything |
#define | WINOUT_WIN01_BG0 0x0001 | REG_WINOUT: the layers shown outside both windows (low byte) and inside the sprite window (high byte). |
#define | WINOUT_WIN01_BG1 0x0002 | outside: BG1 |
#define | WINOUT_WIN01_BG2 0x0004 | outside: BG2 |
#define | WINOUT_WIN01_BG3 0x0008 | outside: BG3 |
#define | WINOUT_WIN01_OBJ 0x0010 | outside: sprites |
#define | WINOUT_WIN01_CLR 0x0020 | outside: the colour effect |
#define | WINOUT_WIN01_ALL 0x003f | outside: everything |
#define | WINOUT_WINOBJ_BG0 0x0100 | sprite window: BG0 |
#define | WINOUT_WINOBJ_BG1 0x0200 | sprite window: BG1 |
#define | WINOUT_WINOBJ_BG2 0x0400 | sprite window: BG2 |
#define | WINOUT_WINOBJ_BG3 0x0800 | sprite window: BG3 |
#define | WINOUT_WINOBJ_OBJ 0x1000 | sprite window: sprites |
#define | WINOUT_WINOBJ_CLR 0x2000 | sprite window: the colour effect |
#define | WINOUT_WINOBJ_ALL 0x3f00 | sprite window: everything |
#define | REG_MOSAIC (*(volatile Uint16 *)0x0400004c) | Mosaic and colour special effects. |
#define | REG_BLDCNT (*(volatile Uint16 *)0x04000050) | colour effect, targets |
#define | BLDCNT_TGT1_BG0 0x0001 | REG_BLDCNT: the first target layers, the colour effect, then the second target layers that a blend mixes the first ones with. |
#define | BLDCNT_TGT1_BG1 0x0002 | first target: BG1 |
#define | BLDCNT_TGT1_BG2 0x0004 | first target: BG2 |
#define | BLDCNT_TGT1_BG3 0x0008 | first target: BG3 |
#define | BLDCNT_TGT1_OBJ 0x0010 | first target: sprites |
#define | BLDCNT_TGT1_BD 0x0020 | first target: the backdrop |
#define | BLDCNT_TGT1_ALL 0x003f | first target: every layer |
#define | BLDCNT_EFFECT_NONE 0x0000 | no effect, the targets as drawn |
#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_EFFECT_MASK 0x00c0 | the effect's two bits |
#define | BLDCNT_TGT2_BG0 0x0100 | second target: BG0 |
#define | BLDCNT_TGT2_BG1 0x0200 | second target: BG1 |
#define | BLDCNT_TGT2_BG2 0x0400 | second target: BG2 |
#define | BLDCNT_TGT2_BG3 0x0800 | second target: BG3 |
#define | BLDCNT_TGT2_OBJ 0x1000 | second target: sprites |
#define | BLDCNT_TGT2_BD 0x2000 | second target: the backdrop |
#define | BLDCNT_TGT2_ALL 0x3f00 | second target: every layer |
#define | REG_BLDALPHA (*(volatile Uint16 *)0x04000052) | The blend's weights. |
#define | BLEND_WEIGHT_MAX 16 | A blend weight's full strength: BLEND_ALPHA(BLEND_WEIGHT_MAX, 0) shows only the top layer. |
#define | BLEND_ALPHA (top, bottom) ((top) | ((bottom) << 8)) | A REG_BLDALPHA value: top and bottom are the two targets' weights, out of BLEND_WEIGHT_MAX. |
#define | BLEND_ALPHA_TOP_MASK 0xff | REG_BLDALPHA's low byte, the top target's weight. |
#define | REG_BLDY (*(volatile Uint16 *)0x04000054) | Fade level, 0 to 16. |
#define | BLEND_FADE_MAX 16 | REG_BLDY's whole fade: the targets drawn all white, or all black. |
#define | BG_CANVAS_MAP ((volatile Sint16 *)BG_SCREEN_BLOCK(7)) | Screen block 7: BG2's affine map of a battle effect's canvas, a byte a tile. |
#define | REG_BG0HOFS ((void *)0x04000010) | BG0HOFS as an address for a DMA: copies of BgScrollWork over all four backgrounds' scroll registers start here, and Mind Read's HBlank DMA writes one halfword a line into it. |
#define | REG_DMA0 ((volatile Uint16 *)0x040000b0) | DMA channel 0's registers as halfwords, for the line scrolls that set the whole channel up. |
#define | REG_DMA3 ((volatile Uint32 *)0x040000d4) | DMA channel 3's registers as words: the channel syDMAXCopy copies with. |
#define | PLTT_BACKDROP (*(volatile Uint16 *)0x05000000) | Background colour 0, the backdrop shown where no layer draws. |
#define | BG_PLTT_SIZE 512 | Palette RAM sizes and colour counts. |
#define | BG_PLTT_COLORS (BG_PLTT_SIZE / 2) | the background's 256 colours |
#define | OBJ_PLTT_SIZE 512 | bytes for 256 sprite colours |
#define | OBJ_PLTT_COLORS (OBJ_PLTT_SIZE / 2) | the sprites' 256 colours |
#define | PLTT_COLORS (2 * BG_PLTT_COLORS) | palette RAM colours (BG then OBJ) |
#define | BG_PLTT ((volatile Uint16 *)0x05000000) | 16 palettes of 16 colours |
#define | PALETTE_COLORS 16 | Colours in one 16-colour palette. |
#define | PALETTE_BYTES (PALETTE_COLORS * 2) | Bytes in one 16-colour palette, as a 16-colour picture's resource begins with one. |
#define | BG_PLTT_COLOR (palette, color) | Colour color of 16-colour background palette palette. |
#define | OBJ_PLTT ((volatile Uint16 *)0x05000200) | the sprites' 256 colours |
#define | OBJ_PLTT_COLOR (palette, color) | Colour color of 16-colour sprite palette palette. |
#define | RGB_GREEN_SHIFT 5 | Where a 15-bit colour keeps its green and blue levels, above red's five bits. |
#define | RGB_BLUE_SHIFT 10 | |
#define | RGB (r, g, b) (((b) << RGB_BLUE_SHIFT) | ((g) << RGB_GREEN_SHIFT … | 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 | IWRAM_START 0x03000000 | The start of the 32 KB of IWRAM, the CPU's fast internal work memory. |
#define | EWRAM_START 0x02000000 | The start of the 256 KB of EWRAM, the slower external work memory. |
#define | EWRAM_END 0x02040000 | The end of EWRAM: the limit the EWRAM heap's allocators test. |
#define | BG_CHAR_BLOCK (n) ((Uint8 *)VRAM + (n) * BG_CHAR_SIZE) | Background tile memory's 16 KB character block n, 0 to 3. |
#define | BG_SCREEN_BLOCK (n) ((Uint8 *)VRAM + (n) * BG_SCREEN_SIZE) | The 2 KB screen block n of VRAM, 0 to 31, that holds a map. |
#define | TILE_SIZE_4BPP 32 | Bytes in an 8x8 tile of 16 colours. |
#define | TILE_SIZE_8BPP 64 | Bytes in an 8x8 tile of 256 colours. |
#define | TILE_ROW_SIZE_4BPP (TILE_SIZE_4BPP / 8) | The bytes of one pixel row of a 16-colour tile. |
#define | SPRITE_TILES (width, height) ((width) / 8 * ((height) / 8)) | The tiles a sprite of width by height pixels takes in sprite tile memory, counted in its 32-byte steps, of 16 colours and of 256 (two steps a tile): a picture's sprites follow one another so. |
#define | SPRITE_TILES_8BPP (width, height) (2 * SPRITE_TILES(width, height)) | |
#define | OBJ_VRAM0 0x06010000 | Sprite tile memory: the 32 KB from 0x06010000. |
#define | OBJ_VRAM ((Uint8 *)OBJ_VRAM0) | Sprite tile memory as bytes, where a sprite's tile number counts from. |
#define | REG_TM3CNT (*(volatile Uint32 *)0x0400010c) | Timer 3's reload value and control as one word; it paces the serial transfers. |
#define | REG_TM3CNT_H (*(volatile Uint16 *)0x0400010e) | Timer 3's control. |
#define | TIMER_INTR_ENABLE 0x0040 | TMxCNT_H flags. |
#define | TIMER_ENABLE 0x0080 | Starts the timer counting. |
#define | TIMER_256CLK 0x0002 | Counts every 256 cycles, 65536 times a second. |
#define | REG_SIODATA32 ((volatile Uint32 *)0x04000120) | The serial data: the 32-bit mode's word, or multiplayer's four received halfwords. |
#define | REG_SIOCNT (*(volatile Uint32 *)0x04000128) | Serial control read as a word, with SIODATA8 above it. |
#define | REG_SIOCNT16 (*(volatile Uint16 *)0x04000128) | Serial control alone. |
#define | REG_SIODATA8 (*(volatile Uint16 *)0x0400012a) | The 8-bit mode's data, which multiplayer mode sends from. |
#define | REG_KEYINPUT (*(volatile Uint16 *)0x04000130) | A 0 bit is a held key. |
#define | REG_KEYCNT (*(volatile Uint16 *)0x04000132) | Keys for the keypad IRQ. |
#define | REG_RCNT (*(volatile Uint16 *)0x04000134) | The serial port's mode. |
#define | SIO_115200_BPS 0x0003 | SIOCNT flags. |
#define | SIO_START 0x0080 | starts a transfer; set while one runs |
#define | SIO_32BIT_MODE 0x1000 | normal mode, 32 bits a transfer |
#define | SIO_MULTI_MODE 0x2000 | multiplayer mode |
#define | SIO_INTR_ENABLE 0x4000 | an interrupt when a transfer ends |
#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 | the port as general-purpose pins |
#define | DMA_DEST_INC 0x0000 | DMAxCNT_H flags. |
#define | DMA_DEST_DEC 0x0020 | destination steps down |
#define | DMA_DEST_FIXED 0x0040 | destination stays, as for a register |
#define | DMA_DEST_RELOAD 0x0060 | steps up, back to its start each repeat |
#define | DMA_SRC_INC 0x0000 | source steps up |
#define | DMA_SRC_DEC 0x0080 | source steps down |
#define | DMA_SRC_FIXED 0x0100 | source stays, as for a fill |
#define | DMA_REPEAT 0x0200 | runs again at each start condition |
#define | DMA_16BIT 0x0000 | moves halfwords |
#define | DMA_32BIT 0x0400 | moves words |
#define | DMA_DREQ_ON 0x0800 | channel 3: the cartridge requests it |
#define | DMA_START_NOW 0x0000 | as soon as it's enabled |
#define | DMA_START_VBLANK 0x1000 | |
#define | DMA_START_HBLANK 0x2000 | |
#define | DMA_START_SPECIAL 0x3000 | channels 1 and 2: a sound FIFO's request |
#define | DMA_INTR_ENABLE 0x4000 | an interrupt when it ends |
#define | DMA_ENABLE 0x8000 | arms the channel |
#define | DMA_CONTROL_SHIFT 16 | Where a DMA channel's control halfword (the DMA_ flags) sits in its 32-bit count word. |
#define | DMA_BUSY ((Uint32)DMA_ENABLE << 16) | DMA_ENABLE in a channel's 32-bit count and control word, which the hardware clears once the transfer is done. |
#define | DMA_START_TIMING_DRQ_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) ((DMA_ENABLE | DMA_32BIT) << 16 | (n)) | DMA control words: copy n words or halfwords at once, or one halfword or word each HBlank to a register reloaded every line (a scanline table that drives a window edge, a scroll or an affine register). |
#define | DMA_FILL_WORDS (n) ((DMA_ENABLE | DMA_32BIT | DMA_SRC_FIXED) << 16 | (n)) | Fill n words or halfwords with the value at the source, as The Broken Seal's. |
#define | DMA_FILL_HALFWORDS (n) ((DMA_ENABLE | DMA_SRC_FIXED) << 16 | (n)) | |
#define | DMA_COPY_HALFWORDS (n) (DMA_ENABLE << 16 | (n)) | |
#define | DMA_COPY_HALFWORDS_DOWN (n) | n halfwords copied from the last back to the first, source and destination stepping down, so that a run can move up over itself. |
#define | DMA_HBLANK_HALFWORD_PER_LINE | A halfword each HBlank, as for a scroll or a window edge. |
#define | DMA_HBLANK_WORDS_PER_LINE (n) | n words each HBlank, as for the affine registers of a background written together. |
#define | DMA_HBLANK_WORD_PER_LINE DMA_HBLANK_WORDS_PER_LINE(1) | A word each HBlank, as for a pair of registers written together. |
#define | CPU_SET_SRC_FIXED 0x01000000 | BIOS CpuSet control flags, above its count. |
#define | CPU_SET_32BIT 0x04000000 | Words rather than halfwords. |
#define | OAM ((void *)0x07000000) | The sprites' attributes. |
#define | KEYS_MASK 0x3ff | the ten keys' bits; KEYINPUT reads 0 for a held key |
#define | DPAD_INDEX (keys) (((keys) >> 4) & 15) | The direction pad's four keys (Up, Down, Left, Right) as an index 0 to 15. |
#define | REG_BG0CNT (*(volatile Uint16 *)0x04000008) | BG0's control (BGCNT_). |
#define | REG_BG0VOFS (*(volatile Uint16 *)0x04000012) | BG0's vertical scroll. |
#define | REG_SOUNDCNT_H (*(volatile Uint16 *)0x04000082) | Direct sound's mixing: volumes, speakers, timers and FIFO resets. |
#define | SOUND_CGB_MIX_FULL 0x0002 | SOUNDCNT_H flags: the mixing volumes. |
#define | SOUND_A_MIX_FULL 0x0004 | direct sound A at full, not half |
#define | SOUND_B_MIX_FULL 0x0008 | direct sound B at full, not half |
#define | SOUND_ALL_MIX_FULL | Sounds 1 to 4 and both direct sound channels all at full volume. |
#define | SOUND_A_RIGHT_OUTPUT 0x0100 | Direct sound A and B speakers, timer and FIFO reset. |
#define | SOUND_A_LEFT_OUTPUT 0x0200 | A to the left speaker |
#define | SOUND_A_TIMER_0 0x0000 | A plays at timer 0's rate |
#define | SOUND_A_FIFO_RESET 0x0800 | empties A's FIFO |
#define | SOUND_B_RIGHT_OUTPUT 0x1000 | B to the right speaker |
#define | SOUND_B_LEFT_OUTPUT 0x2000 | B to the left speaker |
#define | SOUND_B_TIMER_0 0x0000 | B plays at timer 0's rate |
#define | SOUND_B_FIFO_RESET 0x8000 | empties B's FIFO |
#define | REG_SOUNDBIAS (*(volatile Uint16 *)0x04000088) | Sound output bias and direct sound FIFOs. |
#define | REG_FIFO_A (*(volatile Uint32 *)0x040000a0) | A's samples, 4 a write |
#define | REG_FIFO_B (*(volatile Uint32 *)0x040000a4) | B's samples, 4 a write |
#define | REG_DMA0SAD (*(volatile Uint32 *)0x040000b0) | The four DMA channels: source, destination, then the count with the control halfword (CNT_H, the DMA_ flags) above it. |
#define | REG_DMA0DAD (*(volatile Uint32 *)0x040000b4) | channel 0: destination |
#define | REG_DMA0CNT | |
#define | REG_DMA0CNT_H (*(volatile Uint16 *)0x040000ba) | channel 0: control |
#define | REG_DMA1SAD (*(volatile Uint32 *)0x040000bc) | channel 1: source |
#define | REG_DMA1DAD (*(volatile Uint32 *)0x040000c0) | channel 1: destination |
#define | REG_DMA1CNT | |
#define | REG_DMA1CNT_H (*(volatile Uint16 *)0x040000c6) | channel 1: control |
#define | REG_DMA2SAD (*(volatile Uint32 *)0x040000c8) | channel 2: source |
#define | REG_DMA2DAD (*(volatile Uint32 *)0x040000cc) | channel 2: destination |
#define | REG_DMA2CNT | |
#define | REG_DMA2CNT_H (*(volatile Uint16 *)0x040000d2) | channel 2: control |
#define | REG_DMA3SAD (*(volatile Uint32 *)0x040000d4) | channel 3: source |
#define | REG_DMA3DAD (*(volatile Uint32 *)0x040000d8) | channel 3: destination |
#define | REG_DMA3CNT | |
#define | REG_DMA3CNT_H (*(volatile Uint16 *)0x040000de) | channel 3: control |
#define | REG_TM0CNT_L (*(volatile Uint16 *)0x04000100) | Timers 0 to 2: CNT_L is the reload value, and reads back the count; CNT_H takes the TIMER_ flags. |
#define | REG_TM0CNT_H (*(volatile Uint16 *)0x04000102) | timer 0: control |
#define | REG_TM1CNT_L (*(volatile Uint16 *)0x04000104) | timer 1: reload |
#define | REG_TM1CNT_H (*(volatile Uint16 *)0x04000106) | timer 1: control |
#define | REG_TM2CNT_L (*(volatile Uint16 *)0x04000108) | timer 2: reload |
#define | REG_TM2CNT_H (*(volatile Uint16 *)0x0400010a) | timer 2: control |
#define | REG_IE (*(volatile Uint16 *)0x04000200) | Interrupts and cartridge wait states. |
#define | REG_IF (*(volatile Uint16 *)0x04000202) | pending; a 1 written clears |
#define | REG_WAITCNT (*(volatile Uint16 *)0x04000204) | cartridge wait states |
#define | WAITCNT_SRAM_SLOWEST 0x0003 | WAITCNT's slowest SRAM wait (bits 1 and 0), 8 cycles: the wait the SDK's flash functions read the chip with; programming and erasing use the chip's wait[0], then restore it. |
#define | WAITCNT_SRAM_MASK 0x0003 | WAITCNT's SRAM wait bits. |
#define | REG_IME (*(volatile Uint16 *)0x04000208) | All interrupts' master switch. |
#define | KEYCNT_SOFT_RESET 0xc00f | KEYCNT values: the interrupt fires when all the listed keys are held at once. |
#define | KEYCNT_SLEEP_WAKE 0xc304 | L, R and Select, which wake the sleep. |
#define | WAITCNT_GAME 0x4014 | ROM wait states 3 and 1 with the prefetch buffer on, SRAM at 4; written by the power-on set-up. |
#define | DISPSTAT_VBLANK_INTR 0x0008 | At the start of each VBlank. |
#define | DISPSTAT_HBLANK_INTR 0x0010 | At the end of each line. |
#define | DISPSTAT_VCOUNT_INTR 0x0020 | On the DISPSTAT_VCOUNT_LINE line. |
#define | DISPSTAT_VCOUNT_LINE (line) ((line) << 8) | DISPSTAT's high byte: the line the VCount interrupt fires on (the LYC compare). |
#define | DISPLAY_WIDTH 240 | The screen's size in pixels. |
#define | DISPLAY_HEIGHT 160 | |
#define | DISPLAY_TILE_WIDTH (DISPLAY_WIDTH / 8) | The screen's size in 8-pixel tiles. |
#define | DISPLAY_TILE_HEIGHT (DISPLAY_HEIGHT / 8) | |
#define | RGB_RED (color) ((color) & 0x1f) | A 15-bit colour's red, green and blue levels, 0 to 31 each. |
#define | RGB_GREEN (color) (((color) >> RGB_GREEN_SHIFT) & 0x1f) | |
#define | RGB_BLUE (color) (((color) >> RGB_BLUE_SHIFT) & 0x1f) | |
#define | RGB_LEVEL_MAX 31 | A colour channel's brightest level. |
#define | RGB_WHITE RGB(RGB_LEVEL_MAX, RGB_LEVEL_MAX, RGB_LEVEL_MAX) | The brightest colour, every channel at its highest level. |
#define | RED_BITS RGB(RGB_LEVEL_MAX, 0, 0) | A 15-bit colour's red, green and blue bits. |
#define | GREEN_BITS RGB(0, RGB_LEVEL_MAX, 0) | |
#define | BLUE_BITS RGB(0, 0, RGB_LEVEL_MAX) | |
#define | VRAM 0x06000000 | Video RAM: background tiles and maps, then sprite tiles. |
#define | BG_CHAR_SIZE 16384 | Bytes in a character block, 16 KB. |
#define | BG_SCREEN_SIZE 2048 | Bytes in a screen block, 2 KB. |
#define | BG_SCREEN_WIDTH 32 | Tiles in a row of a screen block, whose map is 32 tiles square. |
#define | MAP_ROW_BYTES (BG_SCREEN_WIDTH * 2) | The bytes of one row of a text background map, 32 entries. |
#define | MAP_ROW_WORDS (MAP_ROW_BYTES / 4) | The words of the same row, two entries a word. |
#define | TILE_PAIR (n) ((Uint32)((n) + 1) << 16 | (n)) | Two screen entries in a word, tiles n and n + 1 side by side, for numbering a map's tiles two at a time; adding TILE_PAIR_STEP moves both on by two. |
#define | TILE_PAIR_STEP ((Uint32)2 << 16 | 2) | |
#define | BG_TILE_PALETTE (n) ((n) << 12) | A screen block entry's 16-colour palette, in its top four bits. |
#define | BG_TILE_PALETTE_OF (entry) (((entry) >> 12) & 0xf) | The palette a map entry draws its tile with, 0 to 15. |
#define | PIXELS_4BPP (color) ((color) * 0x11111111u) | A word of eight 4-bit pixels, all colour color: one row of a 16-colour tile. |
#define | PIXELS_8BPP (color) ((color) * 0x01010101) | A word of four 8-bit pixels, all colour color. |
#define | SIO_MULTI_SI 0x0004 | Multiplayer: this console's SI pin, clear on the parent. |
#define | SIO_MULTI_SD 0x0008 | Multiplayer: every console is ready. |
#define | SIO_ID 0x0030 | Multiplayer: this console's id, 0 the parent. |
#define | SIO_ID_SHIFT 4 | SIO_ID's lowest bit. |
#define | SIO_ID_OF (control) (((control) << 26) >> 30) | The multiplayer id (SIO_ID) in a SIOCNT value, taken out by shifts. |
#define | SIO_ERROR 0x0040 | Multiplayer: the last transfer failed. |
#define | SIO_ERROR_OF (control) (((control) << 25) >> 31) | The SIO_ERROR bit of a SIOCNT value, taken out by shifts as SIO_ID_OF takes the id. |
#define | OAM_SIZE 1024 | OAM's size in bytes: 128 sprites of 8 bytes. |
#define | OBJ_SIZE_8X8 0x00000000 | A sprite's attributes 0 and 1 as one word, attr0 | attr1 << 16, the way functions that build their own sprite lists write them; x, 0 to 511, is shifted into the high half and y, 0 to 255, is the low byte. |
#define | OBJ_SIZE_16X16 0x40000000 | |
#define | OBJ_SIZE_32X32 0x80000000 | |
#define | OBJ_SIZE_64X64 0xc0000000 | |
#define | OBJ_SIZE_16X8 0x00004000 | |
#define | OBJ_SIZE_32X8 0x40004000 | |
#define | OBJ_SIZE_32X16 0x80004000 | |
#define | OBJ_SIZE_64X32 0xc0004000 | |
#define | OBJ_SIZE_8X16 0x00008000 | |
#define | OBJ_SIZE_16X32 0x80008000 | |
#define | OBJ_SIZE_32X64 0xc0008000 | |
#define | OBJ_AFFINE 0x00000100 | Drawn through its affine matrix. |
#define | OBJ_DOUBLE_SIZE 0x00000200 | An affine sprite drawn in a box twice its size, so turning never clips it. |
#define | OBJ_X (x) ((x) << 16) | A sprite's x in the attr01 word of an OAM_WORDS entry, whose attribute 1 is its high half. |
#define | OBJ_MODE (mode) ((mode) << 10) | An SPR_MODE. |
#define | OBJ_256_COLORS 0x00002000 | 8bpp tiles, as BGCNT_256_COLORS. |
#define | OBJ_HFLIP 0x10000000 | A plain sprite mirrored left to right. |
#define | OBJ_VFLIP 0x20000000 | A plain sprite mirrored top to bottom. |
#define | OBJ_PRIORITY (n) ((n) << 10) | Attribute 2 above its tile number: the sprite's priority, 0 in front to 3 behind, and its 16-colour palette. |
#define | OBJ_PALETTE (n) ((n) << 12) | |
#define | OBJ_AFFINE_PARAMETER (value) ((value) << 16) | An affine parameter in the high half of an OAM_WORDS entry's attr2 word: the entries 4n to 4n + 3 hold affine matrix n's four. |
#define | OBJ_X_MASK 0x1ff | Attribute 1's nine bits of x: a sprite left of the screen is at 512 less its distance. |
#define | OBJ_Y_MASK 0xff | Attribute 0's eight bits of y: a sprite's y wraps round at 256 lines. |
#define | OBJ_POSITION (x, y) (OBJ_X((x) & OBJ_X_MASK) | ((y) & OBJ_Y_MASK)) | A sprite's place in its attr01 word: x in attribute 1's nine bits and y in attribute 0's eight, each wrapped as the screen wraps them. |
#define | OBJ_TILE_MASK 0x3ff | Attribute 2's ten bits of tile number, counted in 4-bit tiles from the start of sprite VRAM. |
#define | KEYCNT_DISARMED 0xc3ff | Requires all ten keys together to prevent the reset chord retriggering it. |
#define | EVENT_PASS_TICK 0x480 | An event's priority: the high byte picks the pass that runs it, the low byte ranks it within the pass (higher runs first). |
#define | EVENT_PASS_VBLANK 0xc80 | |
#define | EVENT_PASS_VBLANK_FIRST (EVENT_PASS_VBLANK + 127) | The highest rank in the VBlank pass: an event added here runs first of the VBlank events. |
#define | EVENT_PRIORITY_EMPTY -1 | An empty slot's priority, sorted last: the sort reads priorities signed. |
#define | EVENT_PRIORITY_REMOVED 0x7fff | A removed event's priority: its odd high byte matches no pass, and as the highest priority it sorts to the front of the table. |
#define | EVENT_STATE_HIGH (task) (((Uint8 *)&(task)->priority)[1]) | An event's priority's high byte: the pass it runs in. |
#define | EVENT_SUSPENDED 1 | The bit of an event's high priority byte (EVENT_STATE_HIGH) that suspends it. |
#define | EVENT_FLAG_KEEP_RUNNING 1 | The bit of an event's flags that keeps it running while sySuspendOverlayEvents suspends the others. |
#define | EVENT_IN_OVERLAY (task) (((task)->callback >> 24) == EWRAM_START >> 24) | Whether the event's function is in EWRAM, where a scene's overlay runs. |
#define | INTR_FLAG_VBLANK (1 << IRQ_VBLANK) | The bits of IE and IF for the interrupts the game handles. |
#define | INTR_FLAG_TIMER3 (1 << IRQ_TIMER3) | |
#define | INTR_FLAG_SERIAL (1 << IRQ_SERIAL) | |
#define | INTR_FLAG_KEYPAD (1 << IRQ_KEYPAD) | |
#define | INTR_FLAG_GAMEPAK (1 << IRQ_GAMEPAK) | |
#define | RamIwramIrqMain FIXED_ADDRESS((Uint8 *), 0x03000100, syIWRAMIRQMain) | Where syInstallIWRAMAndIRQs copies the resident IWRAM code. |
#define | RamIrqVector FIXED_ADDRESS((void **), 0x03007ffc, IrqVector) | The BIOS's interrupt vector at the top of IWRAM. |
#define | RamHeapSlots FIXED_ADDRESS((HEAP_SLOTS *), 0x03000000, HeapSlotsWork) | |
#define | HEAP_SLOT_AT (state, kind) (*(void **)((Uint8 *)(state) + (kind))) | Heap slot kind of the heap's words state, by its byte offset (enum HEAP_SLOT): the block, or null while none is allocated. |
#define | AFFINE_SCALE_ONE (1 << 8) | The affine group. |
#define | DMA0_CONTROL 5 | DMA channel 0's control halfword (DMA0CNT_H) among REG_DMA0's halfwords. |
#define | DMA3 ((volatile DMA_REGISTERS *)®_DMA3SAD) | DMA3, the channel the game copies with, as its three registers. |
#define | TICKS_PER_SECOND 60 | The tick group. |
#define | IO_WRITE_QUEUE_SIZE 32 | The io_write_queue group. |
#define | IO_WRITE_BYTE (1 << 16) | Writes a byte. |
#define | IO_WRITE_HALFWORD (2 << 16) | Writes a halfword. |
#define | IO_WRITE_WORD (3 << 16) | Writes a word. |
#define | IO_WRITE_SET (4 << 16) | ORs the value into the register instead of storing it. |
#define | IO_WRITE_CLEAR (8 << 16) | Clears the value's bits in the register instead of storing it. |
#define | syWordsClearEntry | The iwram_call group. |
#define | syWordsFillEntry | |
#define | syMulFX | (left * right) >> 16 with a 64-bit product: the 16.16 product of two 16.16 numbers. |
#define | syFixedDivEntry | value / divisor as a 16.16 number: value times 2^30 / divisor, shifted down 14. |
#define | sySquartEntry | The square root of value, rounded down; 0 for a negative value. |
#define | syDecompressBitRuns | Paints value into destination's 16-pixel rows of bytes wherever a glyph's rows of bits, a halfword each, are set, as a glyph's shadow is drawn: twelve rows, fourteen outside the Japanese edition. |
#define | syMultiMatrixEntry | Multiplies the current matrix by matrix. |
#define | syVectorTransformEntry | Reads all three word-aligned coordinates before writing the result. |
#define | syIntegerDivideEntry | |
#define | syIntegerDivideUnsignedEntry | |
#define | syDecompressSpritePictureEntry | |
#define | syWordsCopyEntry | |
#define | syWordsCopyOffset FIXED_OFFSET(1584, syIWRAMWordsCopy, syIWRAMIRQMain) | syWordsCopy's offset from syIWRAMIRQMain, for the callers that reach it from the linked IWRAM code rather than at its fixed address. |
#define | syWordsCopyLinked | syWordsCopy reached through the linked IWRAM code's symbol, syIWRAMIRQMain, at its offset rather than at its fixed address (syWordsCopyEntry): the same function at the same address. |
#define | RECIPROCAL_OF (d) (0xffffffffU / (d) + 1) | The mul_fx group. |
#define | BATTLE_PROJECTION_CENTER_X (DISPLAY_WIDTH / 2) | Where the battle engine centres its projection on the screen: across the middle, and 120 pixels down, below the screen's middle. |
#define | BATTLE_PROJECTION_CENTER_Y 120 | |
#define | RamMapMetatileBuffer | The ram_buffer group. |
#define | RamDecodeBuffer FIXED_ADDRESS((Uint8 *), 0x0201c000, DecodeBuffer) | |
#define | RamMapCollision FIXED_ADDRESS((Uint8 *), 0x0202c000, MapGridShapes) | |
#define | RamMapScenePoints FIXED_ADDRESS((Uint8 *), 0x0202e008, MapScenePoints) | |
#define | RamBgTileBuffer FIXED_ADDRESS((Uint8 *), 0x02038000, BgTileBuffer) | |
#define | RamMapBlocks FIXED_ADDRESS((Uint8 *), 0x02020000, MetatileTiles) | The metatile tiles table (MetatileTiles), as fdMapGridRenderMetatileTilesRow reads it. |
#define | RamMapShapeGrid FIXED_ADDRESS((Uint8 *), 0x02024000, MapShapeGrid) | |
#define | RamIwramHeapEnd | The end of the IWRAM heap, which the allocators test against, and the bottom of the stacks. |
#define | RamTickCount FIXED_ADDRESS((Uint32 *), 0x0300122c, TickCount) | The tick counter, as the overlays of Airs Rock, Atteka Inlet and Ancient Lemuria read it. |
#define | RamWorldMapScroll | The map screen's scroll (x, then y, 16.16 pixels), as fdMapScreenUpdateScroll reads it. |
#define | RamWorldMapState | The map screen's state, as its setup (fdMapScreenInit) reaches it. |
#define | RamWorldMapCursor | Where fdMapScreenUpdateScroll reads the cursor from (x, then y, 16.16 pixels): the setup points it at the state's cursor. |
#define | RamWorldMapCursorStart | The cursor's place when the screen opens (x, then y, 16.16 pixels). |
#define | SCENE_STATE_CHOSEN_DJINN 6480 | Where SceneLocalState keeps, by element, the Djinni gmPartyAddIsaacsParty picked at random from The Broken Seal's Djinn the party lacks: its place in its element plus one, or 0 when the party has them all. |
#define | BUP_IMAGE_GAME_FLAGS 64 | Where a save image, EWRAM from BupBuffer as a part holds it, keeps the game flags, MainRoutineStateWork and CharacterUnits. |
#define | BUP_IMAGE_MAIN_ROUTINE_STATE 576 | |
#define | BUP_IMAGE_UNITS 1312 | |
#define | BROKEN_SEAL_SAVE_IMAGE_UNITS 1280 | Where The Broken Seal's save image keeps its units (CharacterUnits), 32 bytes before this game's BUP_IMAGE_UNITS: the Clear scene copies an image it receives by link from the main routine's state on that much further on, its units landing on this game's. |
#define | SERIAL_PACKET_BYTES 32 | The bytes of one packet buffer in SERIAL_STATE.storage. |
#define | SERIAL_BLOCK_NUMBER_MASK 0x7f | SERIAL_TRANSFER_STATE.active and SerialBlockNumber hold a block number in their low seven bits, counting up and wrapping; the receiver's, with bit 7 set, asks the sender to rewind to that block (sySerialStepBlockTransfer). |
#define | SERIAL_BLOCK_REWIND 0x80 | bit 7: rewind to the block number |
#define | SERIAL_STATUS_RUNNING 0x80 | SERIAL_TRANSFER_STATE.status's bit 7, set when a send or receive starts; the receiver counts its blocks in the low bits (sySerialStepBlockTransfer). |
#define | VRAM_CACHE_ENTRY_GLYPH_TILES 95 | The window sprites' glyph tiles (WIN_STATE.glyphTiles), a cache entry kept for this one use. |
#define | VRAM_CACHE_CLEAR ((const void *)-1) | syVRAMCacheLoad's source that clears the entry's VRAM instead of copying. |
Typedefs
| Name | Description | |
|---|---|---|
typedef void (* | EVENT_FUNC )(void); | |
typedef void (* | INTERRUPT_HANDLER )(void); |
Enumerations
| Name | Description | |
|---|---|---|
enum | DISPLAY_CONTROL { DISPCNT_MODE_0, DISPCNT_MODE_1, DISPCNT_MODE_2, DISPCNT_OBJ_ … } | REG_DISPCNT's video modes and bits: each _ON bit shows its layer or turns its window on. |
enum | KEY_MASK { KEY_A, KEY_B, KEY_SELECT, KEY_START, KEY_RIGHT, KEY_LEFT, KE … } | The keys' bits as REG_KEYINPUT and REG_KEYCNT lay them out; the game's key state (PerWork) holds them set for a pressed key. |
enum | SPR_MODE { OBJ_MODE_NORMAL, OBJ_MODE_SEMI_TRANSPARENT, OBJ_MODE_WINDOW } | A sprite's mode, OAM attribute 0's bits 11..10. |
enum | OAM_AFFINE_MODE { OAM_AFFINE_OFF, OAM_AFFINE_ON, OAM_AFFINE_DOUBLE_SIZE } | A sprite's affine mode, OAM attribute 0's bits 9..8: a plain sprite, one scaled or turned through its matrix, or one drawn so in a box twice its size so that a scale above 1 is not cut off. |
enum | OBJ_COL { OBJ_COLORS_16, OBJ_COLORS_256 } | A sprite's colours, OAM attribute 0's bit 13: 16 colours from one of the 16 palettes, or 256. |
enum | OBJ_SHAPE { OBJ_SHAPE_SQUARE, OBJ_SHAPE_HORIZONTAL, OBJ_SHAPE_VERTICAL } | A sprite's shape, OAM attribute 0's bits 15..14; its size, attribute 1's bits 15..14, gives its dimensions with it (GBATEK, "LCD OBJ - OAM Attributes"). |
enum | EVENT_LIMITS { EVENT_COUNT } | The event group. |
enum | anonymous enum { IRQ_VBLANK, IRQ_HBLANK, IRQ_VCOUNT, IRQ_TIMER0, IRQ_TIMER1, … } | The irq group. |
enum | HEAP_SLOT { HEAP_SLOT_MATRIX_STACK, HEAP_SLOT_SPRITE_ANIMATIONS, HEAP_SL … } | The heap slots shared across folders, by byte offset into HeapSlotsWork. |
enum | anonymous enum { MATRIX_TRANSLATION_X, MATRIX_TRANSLATION_Y, MATRIX_TRANSLATI … } | The matrix group. |
enum | anonymous enum { BUP_FLASH_TIMER, BUP_FLASH_IDENTIFY_ATTEMPTS, BUP_SECTOR_COU … } | The save group. |
enum | SERIAL_PHASE { SERIAL_PHASE_SEARCHING, SERIAL_PHASE_CONNECTED } | SERIAL_STATE.phase. |
enum | SERIAL_MODE { SERIAL_MODE_CHILD, SERIAL_MODE_CLOCKING } | SERIAL_STATE.mode: how this console takes part in the link. |
enum | LINK_STAT { LINK_STATUS_HEARD_BOTH, LINK_STATUS_CLOCKING, LINK_STATUS_ER … } | The link status bits sySerialExchangePayloads returns. |
enum | SERIAL_CHANNEL_FLAG { SERIAL_CHANNEL_PACKET_COMPLETE, SERIAL_CHANNEL_ERROR } | SERIAL_STATE.channelFlags: what the transfer interrupts saw of a console's packets since the last tick. |
enum | SERIAL_RECEIVE_STATE { SERIAL_RECEIVE_IDLE, SERIAL_RECEIVE_ACTIVE, SERIAL_RECEIVE_D … } | SERIAL_TRANSFER_STATE.flags: how far this console's receive has got. |
enum | SERIAL_SEND_STATE { SERIAL_SEND_IDLE, SERIAL_SEND_MORE, SERIAL_SEND_LAST } | SERIAL_TRANSFER_STATE.peerFlags: the kind of block this console sends. |
enum | VRAM_BLOCK_LIMITS { VRAM_CACHE_ENTRY_COUNT, VRAM_BLOCK_COUNT, VRAM_BLOCK_BYTES, … } | The vram_cache group. |
Functions
| Name | Description | |
|---|---|---|
FIXED | syIWRAMMulFX (FIXED a, FIXED b) |
Variables
| Name | Description | |
|---|---|---|
extern Uint8 | syIWRAMIRQMain [] | The interrupt dispatcher at the start of the IWRAM-resident code, whose other functions are reached at fixed offsets from it (the iwram_call group). |
extern Uint8 | HeapSlotsWork [] | |
extern Uint8 | syIWRAMWordsClear [] | |
extern Uint8 | syIWRAMWordsFill [] | |
extern Uint8 | syIWRAMDivFX [] | |
extern Uint8 | syIWRAMSquart [] | |
extern Uint8 | syIWRAMExpandBitRuns [] | |
extern Uint8 | syIWRAMMultiMatrix [] | |
extern Uint8 | syIWRAMTransformVector [] | |
extern Uint8 | syIWRAMSignedDivide [] | |
extern Uint8 | syIWRAMUnsignedDivide [] | |
extern Uint8 | syIWRAMDecompress [] | |
extern Uint8 | syIWRAMWordsCopy [] |
Description
The system library's types and constants, as SGL's sl_def.h holds its own:
the hardware's registers, and each group's structures, enums and fixed
values. system.h includes it; a file built by another compiler can include it
alone.
Macros in detail
REG_DISPCNT
#define REG_DISPCNT (*(volatile Uint16 *)0x04000000)
Mode, layers, windows.
Referenced by btEffectApplyWindowBlendRegisters(), btEffectConfigureEffectDisplay(), btEffectEndCanvasLayer(), btEffectHideBg1AndRestoreBackdrop(), btEffectOpenCanvasLayer(), btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunCanvasBurst(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunGeode(), btEffectRunIris(), btEffectRunShatteringOpening(), btEffectRunUlysses(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btElementGlowEnd(), btElementGlowPlay(), btRun(), btStagingRunAttack(), btTransitionRun(), btTransitionRunMosaicFadeOut(), fdActorSystemResumeProjectionAndHideLayers(), fdActorSystemSuspendProjectionAndShowSprites(), fdEffectStartWindowHBlankDMA(), fdHeadingClose(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyDiceStart(), fdLuckyWheelsRun(), fdLuckyWheelsStart(), fdMapGridLoadMap(), fdMapScreenShow(), fdScreenTransitionStart(), fdScreenTransitionUpdateScanline(), fdScreenTransitionUpdateScanlineTable(), fdSpriteViewerRun(), fdSuperLuckyDiceRun(), fdSuperLuckyDiceStart(), fdWorldMapApplyAffinePage(), fdWorldMapInitPerspective(), mnBattleCommandRowRun(), mnCreditsRun(), mnEndingImageStart() and 31 more.
Definition at line 17 of file definitions.h.
REG_DISPSTAT
#define REG_DISPSTAT (*(volatile Uint16 *)0x04000004)
Blank flags and IRQs.
Referenced by syInstallIWRAMAndIRQs() and syIntFunction().
Definition at line 19 of file definitions.h.
REG_VCOUNT
#define REG_VCOUNT (*(volatile Uint16 *)0x04000006)
Line being drawn, 0..227.
Referenced by fdScreenTransitionUpdateScanline(), scScrollHBlank(), sySoundSetFixedSampleFrequency() and sySynch().
Definition at line 21 of file definitions.h.
DISPLAY_TOTAL_LINES
#define DISPLAY_TOTAL_LINES 228
The lines REG_VCOUNT counts through in a tick: the DISPLAY_HEIGHT drawn and
those of VBlank. A line's HBlank comes before the next line is drawn, the
last line's before line 0.
Definition at line 25 of file definitions.h.
REG_BG1CNT
#define REG_BG1CNT (*(volatile Uint16 *)0x0400000a)
BG1.
Referenced by btBackgroundLoad(), btBackgroundSetMode(), btEffectHideBg1AndRestoreBackdrop(), btEffectRunAttackSlash(), btEffectRunCloudSwirl(), btEffectRunCriticalHit(), btEffectRunGeode(), btEffectRunMeteorBlow(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunUlysses(), btEffectSetupCanvasTileMap(), btTransitionRun(), btTransitionRunMosaicFadeOut(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdMapGridLoadMap(), fdMapScreenShow(), fdSuperLuckyDiceRun(), fdWorldMapEndStillImage(), fdWorldMapInitPerspective(), fdWorldMapPresentStillImage(), mnCommandRowPutBg1Behind(), mnCommandRowPutBg1InFront(), mnTitleIntroScrollClouds(), mnTitleIntroShowLighthouse(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scInit() and scShamanVillageBlowAwaySand().
Definition at line 30 of file definitions.h.
REG_BG2CNT
#define REG_BG2CNT (*(volatile Uint16 *)0x0400000c)
BG2.
Referenced by btBackgroundShowZoomedPage(), btEffectEndCanvasLayer(), btEffectFillWhiteBand(), btEffectOpenCanvasLayer(), btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunDjinniCharge(), btEffectRunDragonFire(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunLobbedShells(), btEffectRunMegiddo(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunThor(), btEffectRunTorch(), btEffectRunTwistingColumn(), btEffectRunUlysses(), btEffectRunVine(), btEffectRunVoidBeam(), btEffectRunWindFunnel(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btEffectStartTiledCanvas(), btEffectStartTiledCanvasFilled(), btElementGlowPlay(), btTransitionRunMosaicFadeOut(), fdLuckyWheelsRun(), fdMapGridLoadMap(), fdWorldMapEndStillImage(), fdWorldMapInitPerspective(), fdWorldMapPresentStillImage(), mnCreditsRun() and 11 more.
Definition at line 32 of file definitions.h.
REG_BG3CNT
#define REG_BG3CNT (*(volatile Uint16 *)0x0400000e)
BG3.
Referenced by btTransitionRunMosaicFadeOut(), fdMapGridLoadMap(), fdWorldMapEndStillImage(), fdWorldMapInitPerspective(), fdWorldMapPresentStillImage(), mnCreditsRun(), mnEndingImageStart(), mnTitleIntroShowBookTwoCard(), mnTitleIntroShowPresentsCard() and scInit().
Definition at line 34 of file definitions.h.
BGCNT_PRIORITY
#define BGCNT_PRIORITY(n) (n)
Draw order, 0 in front to 3 behind.
Referenced by btEffectEndCanvasLayer(), btEffectHideBg1AndRestoreBackdrop(), btEffectOpenAndCloseTiledCanvas(), btEffectRunAstralBlast(), btEffectRunAttackSlash(), btEffectRunAzul(), btEffectRunBallLightning(), btEffectRunBind(), btEffectRunBladeRain(), btEffectRunBolt(), btEffectRunBreak(), btEffectRunBreaths(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCards(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCool(), btEffectRunCriticalHit(), btEffectRunCruelRuin(), btEffectRunCurse(), btEffectRunDaedalus(), btEffectRunDjinniCharge(), btEffectRunDouse(), btEffectRunDrainMotes(), btEffectRunElementCards(), btEffectRunEruption(), btEffectRunFallingSword(), btEffectRunFire(), btEffectRunFrost(), btEffectRunFroth(), btEffectRunFume(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGatheringLights(), btEffectRunGeode(), btEffectRunGeyser(), btEffectRunGrowingColumns(), btEffectRunHeartbreak(), btEffectRunHeavyBlow(), btEffectRunHelmSplitter(), btEffectRunHurricane(), btEffectRunIce(), btEffectRunIris(), btEffectRunJuggle(), btEffectRunKirin(), btEffectRunLegend(), btEffectRunLifeShear(), btEffectRunLightSurge() and 60 more.
Definition at line 37 of file definitions.h.
BGCNT_CHAR_BASE
#define BGCNT_CHAR_BASE(block) ((block) << 2)
The 16 KB character block, 0 to 3, the layer's tiles are read from.
Referenced by btEffectEndCanvasLayer(), btEffectFillWhiteBand(), btEffectOpenCanvasLayer(), btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunDjinniCharge(), btEffectRunDragonFire(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunLobbedShells(), btEffectRunMegiddo(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunThor(), btEffectRunTorch(), btEffectRunTwistingColumn(), btEffectRunUlysses(), btEffectRunVine(), btEffectRunVoidBeam(), btEffectRunWindFunnel(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btEffectStartTiledCanvas(), btEffectStartTiledCanvasFilled(), btElementGlowPlay(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdMapGridLoadMap(), fdSuperLuckyDiceRun(), fdWorldMapEndStillImage(), fdWorldMapInitPerspective(), fdWorldMapPresentStillImage() and 9 more.
Definition at line 39 of file definitions.h.
BGCNT_MOSAIC
#define BGCNT_MOSAIC 0x0040
Applies REG_MOSAIC's block size.
Referenced by btTransitionRunMosaicFadeOut().
Definition at line 41 of file definitions.h.
BGCNT_256_COLORS
#define BGCNT_256_COLORS 0x0080
8bpp tiles, not 16-colour 4bpp ones.
Referenced by btEffectEndCanvasLayer(), btEffectFillWhiteBand(), btEffectHideBg1AndRestoreBackdrop(), btEffectOpenCanvasLayer(), btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCriticalHit(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunDjinniCharge(), btEffectRunDragonFire(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunLobbedShells(), btEffectRunMegiddo(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunThor(), btEffectRunTorch(), btEffectRunTwistingColumn(), btEffectRunUlysses(), btEffectRunVine(), btEffectRunVoidBeam(), btEffectRunWindFunnel(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btEffectStartTiledCanvas(), btEffectStartTiledCanvasFilled(), btElementGlowPlay(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdMapScreenShow(), fdPsynergyRing() and 5 more.
Definition at line 43 of file definitions.h.
BGCNT_SCREEN_BASE
#define BGCNT_SCREEN_BASE(block) ((block) << 8)
The 2 KB screen block, 0 to 31, the layer's map is read from.
Referenced by btEffectEndCanvasLayer(), btEffectFillWhiteBand(), btEffectHideBg1AndRestoreBackdrop(), btEffectOpenCanvasLayer(), btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCriticalHit(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunDjinniCharge(), btEffectRunDragonFire(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunLobbedShells(), btEffectRunMegiddo(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunThor(), btEffectRunTorch(), btEffectRunTwistingColumn(), btEffectRunUlysses(), btEffectRunVine(), btEffectRunVoidBeam(), btEffectRunWindFunnel(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btEffectStartTiledCanvas(), btEffectStartTiledCanvasFilled(), btElementGlowPlay(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdMapGridLoadMap() and 22 more.
Definition at line 45 of file definitions.h.
BGCNT_WRAP
#define BGCNT_WRAP 0x2000
Affine backgrounds only: wrap around off the layer's area, which is otherwise transparent.
Referenced by btCameraSetRange(), btEffectRunAtalanta(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCondemn(), btEffectRunDouse(), btEffectRunHeartbreak(), btEffectRunIce(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunLifeShear(), btEffectRunMeteorBlow(), btEffectRunRay(), btEffectRunSerac(), btEffectRunStarfieldFall(), btEffectRunThor(), btEffectRunTorch(), fdWorldMapEndStillImage(), fdWorldMapInitPerspective() and fdWorldMapPresentStillImage().
Definition at line 48 of file definitions.h.
BGCNT_SIZE
#define BGCNT_SIZE(n) ((n) << 14)
The background's size: for an affine one, 0 to 3 are 128, 256, 512 and 1024 pixels square.
Referenced by btEffectStartTiledCanvas(), btEffectStartTiledCanvasFilled(), fdMapScreenShow(), fdWorldMapEndStillImage(), fdWorldMapInitPerspective(), fdWorldMapPresentStillImage() and scWorldMapLoadTidalWave().
Definition at line 51 of file definitions.h.
DISPCNT_MODE_MASK
#define DISPCNT_MODE_MASK 0x0007
REG_DISPCNT's three video mode bits, which hold a DISPCNT_MODE_ value.
Referenced by fdScreenTransitionUpdateScanline() and fdWorldMapApplyAffinePage().
Definition at line 74 of file definitions.h.
REG_BG1HOFS
#define REG_BG1HOFS (*(volatile Uint16 *)0x04000014)
The text backgrounds' scroll offsets, write-only: the map pixel, 0 to 511, at the screen's left edge (HOFS) or top edge (VOFS).
BG1, horizontal
Referenced by btEffectArmBg1HBlankDMA(), btIrisChangeBackdrop(), fdLineScrollArmDMA(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun(), scAirsRockDriftFog(), scAirsRockLiftFog(), scIsletsStartWaveDMA(), scScrollHBlank() and scSeaOfTimeAnimateSea().
Definition at line 77 of file definitions.h.
REG_BG1VOFS
#define REG_BG1VOFS (*(volatile Uint16 *)0x04000016)
BG1, vertical
Referenced by fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun() and scEasternAlhafraStartWaveDMA().
Definition at line 78 of file definitions.h.
REG_BG2HOFS
#define REG_BG2HOFS (*(volatile Uint16 *)0x04000018)
BG2, horizontal
Referenced by fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun(), scGarohWavePathLayer() and scLemuriaStartRippleDMA().
Definition at line 79 of file definitions.h.
REG_BG2VOFS
#define REG_BG2VOFS (*(volatile Uint16 *)0x0400001a)
BG2, vertical
Referenced by fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 80 of file definitions.h.
REG_BG3HOFS
#define REG_BG3HOFS (*(volatile Uint16 *)0x0400001c)
BG3, horizontal
Definition at line 81 of file definitions.h.
REG_BG3VOFS
#define REG_BG3VOFS (*(volatile Uint16 *)0x0400001e)
BG3, vertical
Referenced by scIdejimaApplyWaveLines().
Definition at line 82 of file definitions.h.
Q_8_8
#define Q_8_8(n) ((Sint16)((n) * 256))
The BG2/BG3 affine matrix entries are signed 8.8 fixed point: texels stepped
per screen pixel. Q_8_8(1) draws the layer at its own size and Q_8_8(0.5)
twice as large.
Referenced by btCameraSetRange(), btEffectResetBg2Pa(), btEffectRunAtalanta(), btEffectRunBackgroundFadeIn(), btEffectRunBind(), btEffectRunBurstShower(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCondemn(), btEffectRunCruelRuin(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDjinnBeams(), btEffectRunDjinniCharge(), btEffectRunDjinniSign(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunFirePuppet(), btEffectRunFlora(), btEffectRunFume(), btEffectRunGaia(), btEffectRunGeode(), btEffectRunHaures(), btEffectRunHealingMotes(), btEffectRunHeartbreak(), btEffectRunHelmSplitter(), btEffectRunHurricane(), btEffectRunImpactBurst(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunLifeShear(), btEffectRunMeteorBlow(), btEffectRunMirroredWall(), btEffectRunNeptune(), btEffectRunRay(), btEffectRunRisingDragon(), btEffectRunRisingDragonEnemy(), btEffectRunSabreDance(), btEffectRunSerac(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunStatBoost(), btEffectRunThor(), btEffectRunTorch(), btEffectRunTumblingQuads(), btEffectRunUlysses() and 26 more.
Definition at line 87 of file definitions.h.
REG_BG2PA
#define REG_BG2PA (*(volatile Uint16 *)0x04000020)
The affine backgrounds' matrices and origins, write-only.
BG2: x step a pixel
Referenced by btBackgroundShowZoomedPage(), btDisplayApplyBg2Affine(), btEffectFillWhiteBand(), btEffectResetBg2Pa(), btEffectRunAtalanta(), btEffectRunBackgroundFadeIn(), btEffectRunBind(), btEffectRunBurstShower(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCondemn(), btEffectRunCruelRuin(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDjinnBeams(), btEffectRunDjinniCharge(), btEffectRunDjinniSign(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunFirePuppet(), btEffectRunFlora(), btEffectRunFume(), btEffectRunGaia(), btEffectRunGeode(), btEffectRunHealingMotes(), btEffectRunHeartbreak(), btEffectRunHelmSplitter(), btEffectRunHurricane(), btEffectRunImpactBurst(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunLifeShear(), btEffectRunMeteorBlow(), btEffectRunMirroredWall(), btEffectRunNeptune(), btEffectRunRay(), btEffectRunRisingDragon(), btEffectRunRisingDragonEnemy(), btEffectRunSabreDance(), btEffectRunSerac(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunStatBoost(), btEffectRunThor(), btEffectRunTorch(), btEffectRunTumblingQuads() and 11 more.
Definition at line 90 of file definitions.h.
REG_BG2PB
#define REG_BG2PB (*(volatile Uint16 *)0x04000022)
BG2: x step a line
Referenced by btEffectRunBackgroundFadeIn(), btEffectRunCloudSwirl(), btEffectRunShatteringOpening(), btEffectSetupCanvasWindows(), btElementGlowInitStarField() and fdWorldMapInitPerspective().
Definition at line 91 of file definitions.h.
REG_BG2PC
#define REG_BG2PC (*(volatile Uint16 *)0x04000024)
BG2: y step a pixel
Referenced by btEffectRunBackgroundFadeIn(), btEffectRunCloudSwirl(), btEffectRunShatteringOpening(), btEffectSetupCanvasWindows(), btElementGlowInitStarField() and fdWorldMapInitPerspective().
Definition at line 92 of file definitions.h.
REG_BG2PD
#define REG_BG2PD (*(volatile Uint16 *)0x04000026)
BG2: y step a line
Referenced by btDisplayApplyBg2Affine(), btEffectRunBackgroundFadeIn(), btEffectRunCloudSwirl(), btEffectRunShatteringOpening(), btEffectRunUlysses(), btEffectSetupCanvasWindows(), btElementGlowInitStarField() and fdWorldMapInitPerspective().
Definition at line 93 of file definitions.h.
REG_BG2X
#define REG_BG2X (*(volatile Sint32 *)0x04000028)
BG2: origin x
Referenced by btDisplayApplyBg2Affine(), btEffectAdvanceBg2OnInterval(), btEffectApplyBg2Reference(), btEffectArmBg2AffineHBlankDMA(), btEffectRunBackgroundFadeIn(), btEffectRunBind(), btEffectRunBladeRain(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCool(), btEffectRunCruelRuin(), btEffectRunCurse(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDjinnBeams(), btEffectRunDjinniSign(), btEffectRunEclipse(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunFlora(), btEffectRunFrost(), btEffectRunGaia(), btEffectRunGeode(), btEffectRunGrowingColumns(), btEffectRunHaures(), btEffectRunHealingMotes(), btEffectRunHeartbreak(), btEffectRunHelmSplitter(), btEffectRunHurricane(), btEffectRunImpactBurst(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunLifeShear(), btEffectRunMeteorBlow(), btEffectRunMirroredWall(), btEffectRunQuake(), btEffectRunRay(), btEffectRunSabreDance(), btEffectRunSerac(), btEffectRunShatteringOpening(), btEffectRunSleep(), btEffectRunSpiderWeb(), btEffectRunSpire(), btEffectRunStarfieldFall(), btEffectRunStatBoost(), btEffectRunStatReduction(), btEffectRunStoneJustice() and 15 more.
Definition at line 94 of file definitions.h.
REG_BG2Y
#define REG_BG2Y (*(volatile Sint32 *)0x0400002c)
BG2: origin y
Referenced by btDisplayApplyBg2Affine(), btEffectAdvanceBg2OnInterval(), btEffectApplyBg2Reference(), btEffectRunBackgroundFadeIn(), btEffectRunCloudSwirl(), btEffectRunGeode(), btEffectRunMeteorBlow(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunUlysses(), btEffectRunVengeance(), btEffectSetupCanvasWindows(), btElementGlowInitStarField() and fdWorldMapInitPerspective().
Definition at line 95 of file definitions.h.
REG_BG3PA
#define REG_BG3PA (*(volatile Uint16 *)0x04000030)
BG3: x step a pixel
Referenced by fdWorldMapInitPerspective().
Definition at line 96 of file definitions.h.
REG_BG3PB
#define REG_BG3PB (*(volatile Uint16 *)0x04000032)
BG3: x step a line
Referenced by fdWorldMapInitPerspective().
Definition at line 97 of file definitions.h.
REG_BG3PC
#define REG_BG3PC (*(volatile Uint16 *)0x04000034)
BG3: y step a pixel
Referenced by fdWorldMapInitPerspective().
Definition at line 98 of file definitions.h.
REG_BG3PD
#define REG_BG3PD (*(volatile Uint16 *)0x04000036)
BG3: y step a line
Referenced by fdWorldMapInitPerspective().
Definition at line 99 of file definitions.h.
REG_BG3X
#define REG_BG3X (*(volatile Sint32 *)0x04000038)
BG3: origin x
Referenced by fdWorldMapInitPerspective().
Definition at line 100 of file definitions.h.
REG_BG3Y
#define REG_BG3Y (*(volatile Sint32 *)0x0400003c)
BG3: origin y
Referenced by fdWorldMapInitPerspective().
Definition at line 101 of file definitions.h.
REG_WIN0H
#define REG_WIN0H (*(volatile Uint16 *)0x04000040)
The two windows' edges, each a WIN_RANGE value in pixels.
window 0, left and right
Referenced by btEffectApplyWindowBlendRegisters(), btEffectArmWin0HBlankDMA(), btEffectBuildWindowEdgeTable(), btEffectRunBoreas(), btEffectRunCharon(), btEffectRunGeode(), btEffectRunKirin(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunVengeance(), btElementGlowPlay(), btStagingRunAttack(), btTransitionRun(), fdEffectStartWindowHBlankDMA(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 104 of file definitions.h.
REG_WIN1H
#define REG_WIN1H (*(volatile Uint16 *)0x04000042)
window 1, left and right
Referenced by btEffectApplyWindowBlendRegisters(), btEffectRunGeode(), btEffectRunVengeance(), btStagingRunAttack(), btTransitionRun(), fdEffectStartWindowHBlankDMA(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 105 of file definitions.h.
REG_WIN0V
#define REG_WIN0V (*(volatile Uint16 *)0x04000044)
window 0, top and bottom
Referenced by btEffectApplyWindowBlendRegisters(), btEffectRunDaedalusStrike(), btEffectRunMeteorBlow(), btEffectRunTrident(), btEffectRunVengeance(), btElementGlowPlay(), btStagingRunAttack(), btTransitionRun(), fdEffectStartWindowHBlankDMA(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 106 of file definitions.h.
REG_WIN1V
#define REG_WIN1V (*(volatile Uint16 *)0x04000046)
window 1, top and bottom
Referenced by btEffectApplyWindowBlendRegisters(), btEffectRunMeteorBlow(), btEffectRunRamses(), btEffectRunTrident(), btEffectRunVengeance(), btStagingRunAttack(), btTransitionRun(), fdEffectStartWindowHBlankDMA(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 107 of file definitions.h.
WIN_RANGE
#define WIN_RANGE(start, end) (((start) << 8) | (end))
A REG_WINxH or REG_WINxV value: the window covers start up to, but not
including, end.
Referenced by btEffectBuildWindowEdgeTable(), btEffectRunBoreas(), btEffectRunCharon(), btEffectRunDaedalusStrike(), btEffectRunGeode(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunTrident(), btEffectRunVengeance(), btElementGlowPlay(), btStagingRunAttack(), btTransitionRun(), fdEffectStartWindowHBlankDMA(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 111 of file definitions.h.
WIN_RANGE_END_MASK
#define WIN_RANGE_END_MASK 0xff
A WIN_RANGE value's end, its low byte: the window's right or bottom edge.
Referenced by mnIconMenuDrawIcons().
Definition at line 113 of file definitions.h.
REG_WININ
#define REG_WININ (*(volatile Uint16 *)0x04000048)
What windows 0 and 1 show.
Referenced by btEffectApplyWindowBlendRegisters(), btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunBackgroundFadeIn(), btEffectRunBoreas(), btEffectRunCharon(), btEffectRunDaedalusStrike(), btEffectRunDouse(), btEffectRunGeode(), btEffectRunIce(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunShatteringOpening(), btEffectRunTrident(), btEffectRunVengeance(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btElementGlowPlay(), btStagingRunAttack(), btTransitionRun(), fdEffectStartWindowHBlankDMA(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 115 of file definitions.h.
REG_WINOUT
#define REG_WINOUT (*(volatile Uint16 *)0x0400004a)
What the rest shows.
Referenced by btEffectApplyWindowBlendRegisters(), btEffectConfigureEffectDisplay(), btEffectRunBackgroundFadeIn(), btEffectRunGeode(), btEffectRunMeteorBlow(), btEffectRunShatteringOpening(), btEffectRunTrident(), btEffectRunVengeance(), btEffectSetupCanvasTileMap(), btEffectSetupCanvasWindows(), btElementGlowPlay(), btMessageWaitForAdvance(), btMessageWaitForAdvanceAt(), btPlaybackRun(), btStagingRunAttack(), btTransitionRun(), fdEffectStartWindowHBlankDMA(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdScreenTransitionFinish(), fdScreenTransitionStart(), fdScreenTransitionStartWindowHeld(), fdScreenTransitionUpdateScanlineTable(), fdSuperLuckyDiceRun(), scAirsRockInsideVanishStone(), scAnemosInnerSanctumDropMimicStone(), scAnkohlRuinsInitSand(), scCrackedTileFall(), scMagmaRockInsideFadeStoneAway() and scMarsLighthouseEntranceFallThroughCrack().
Definition at line 117 of file definitions.h.
WININ_WIN0_BG0
#define WININ_WIN0_BG0 0x0001
REG_WININ: the layers shown inside window 0 (low byte) and window 1 (high
byte). CLR lets the colour effect of REG_BLDCNT apply there.
window 0: BG0
Referenced by btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdScreenTransitionUpdateScanlineTable(), fdSuperLuckyDiceRun(), mnStatusScreenRun() and ScreenTransitionShapes.
Definition at line 121 of file definitions.h.
WININ_WIN0_BG1
#define WININ_WIN0_BG1 0x0002
window 0: BG1
Referenced by btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 122 of file definitions.h.
WININ_WIN0_BG2
#define WININ_WIN0_BG2 0x0004
window 0: BG2
Referenced by btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 123 of file definitions.h.
WININ_WIN0_BG3
#define WININ_WIN0_BG3 0x0008
window 0: BG3
Definition at line 124 of file definitions.h.
WININ_WIN0_OBJ
#define WININ_WIN0_OBJ 0x0010
window 0: sprites
Referenced by btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun() and mnStatusScreenRun().
Definition at line 125 of file definitions.h.
WININ_WIN0_CLR
#define WININ_WIN0_CLR 0x0020
window 0: the colour effect
Referenced by btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 126 of file definitions.h.
WININ_WIN0_ALL
#define WININ_WIN0_ALL 0x003f
window 0: everything
Referenced by btElementGlowPlay(), fdHeadingShow(), fdScreenTransitionFinish(), fdScreenTransitionStart() and fdScreenTransitionStartWindowHeld().
Definition at line 127 of file definitions.h.
WININ_WIN1_BG0
#define WININ_WIN1_BG0 0x0100
window 1: BG0
Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunBackgroundFadeIn(), btEffectRunBoreas(), btEffectRunCharon(), btEffectRunDaedalusStrike(), btEffectRunDouse(), btEffectRunGeode(), btEffectRunIce(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunShatteringOpening(), btEffectRunTrident(), btEffectRunVengeance(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun() and ScreenTransitionShapes.
Definition at line 128 of file definitions.h.
WININ_WIN1_BG1
#define WININ_WIN1_BG1 0x0200
window 1: BG1
Referenced by btEffectRunCharon(), btEffectRunDaedalusStrike(), btEffectRunDouse(), btEffectRunIce(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunRamses(), btEffectRunTrident(), btEffectRunVengeance(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 129 of file definitions.h.
WININ_WIN1_BG2
#define WININ_WIN1_BG2 0x0400
window 1: BG2
Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunBackgroundFadeIn(), btEffectRunCharon(), btEffectRunDaedalusStrike(), btEffectRunGeode(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunRamses(), btEffectRunShatteringOpening(), btEffectRunTrident(), btEffectRunVengeance(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 130 of file definitions.h.
WININ_WIN1_BG3
#define WININ_WIN1_BG3 0x0800
window 1: BG3
Definition at line 131 of file definitions.h.
WININ_WIN1_OBJ
#define WININ_WIN1_OBJ 0x1000
window 1: sprites
Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunBackgroundFadeIn(), btEffectRunDouse(), btEffectRunGeode(), btEffectRunIce(), btEffectRunShatteringOpening(), btEffectRunVengeance(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 132 of file definitions.h.
WININ_WIN1_CLR
#define WININ_WIN1_CLR 0x2000
window 1: the colour effect
Referenced by btEffectConfigureEffectDisplay(), btEffectOpenCanvasLayer(), btEffectRunBackgroundFadeIn(), btEffectRunBoreas(), btEffectRunCharon(), btEffectRunDaedalusStrike(), btEffectRunDouse(), btEffectRunGeode(), btEffectRunIce(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunShatteringOpening(), btEffectRunTrident(), btEffectRunVengeance(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 133 of file definitions.h.
WININ_WIN1_ALL
#define WININ_WIN1_ALL 0x3f00
window 1: everything
Referenced by fdScreenTransitionStartWindowHeld().
Definition at line 134 of file definitions.h.
WINOUT_WIN01_BG0
#define WINOUT_WIN01_BG0 0x0001
REG_WINOUT: the layers shown outside both windows (low byte) and inside the
sprite window (high byte).
outside: BG0
Referenced by btEffectRunGeode(), btEffectRunMeteorBlow(), btEffectRunVengeance(), btEffectSetupCanvasTileMap(), btEffectSetupCanvasWindows(), btElementGlowPlay(), btStagingRunAttack(), btTransitionRun(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdScreenTransitionFinish(), fdScreenTransitionStart(), fdScreenTransitionStartWindowHeld(), fdScreenTransitionUpdateScanlineTable(), fdSuperLuckyDiceRun(), scAirsRockInsideVanishStone(), scAnkohlRuinsInitSand(), scCrackedTileFall(), scMagmaRockInsideFadeStoneAway(), scMarsLighthouseEntranceFallThroughCrack() and ScreenTransitionShapes.
Definition at line 138 of file definitions.h.
WINOUT_WIN01_BG1
#define WINOUT_WIN01_BG1 0x0002
outside: BG1
Referenced by btEffectRunVengeance(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdScreenTransitionUpdateScanlineTable(), fdSuperLuckyDiceRun(), scAirsRockInsideVanishStone(), scAnkohlRuinsInitSand(), scCrackedTileFall(), scMagmaRockInsideFadeStoneAway() and scMarsLighthouseEntranceFallThroughCrack().
Definition at line 139 of file definitions.h.
WINOUT_WIN01_BG2
#define WINOUT_WIN01_BG2 0x0004
outside: BG2
Referenced by btMessageWaitForAdvance(), btMessageWaitForAdvanceAt(), btPlaybackRun(), fdHeadingShow(), fdLuckyWheelsRun(), fdScreenTransitionUpdateScanlineTable(), scAirsRockInsideVanishStone(), scAnkohlRuinsInitSand(), scCrackedTileFall(), scMagmaRockInsideFadeStoneAway() and scMarsLighthouseEntranceFallThroughCrack().
Definition at line 140 of file definitions.h.
WINOUT_WIN01_BG3
#define WINOUT_WIN01_BG3 0x0008
outside: BG3
Referenced by fdHeadingShow(), fdScreenTransitionUpdateScanlineTable(), scAirsRockInsideVanishStone(), scAnkohlRuinsInitSand(), scCrackedTileFall(), scMagmaRockInsideFadeStoneAway() and scMarsLighthouseEntranceFallThroughCrack().
Definition at line 141 of file definitions.h.
WINOUT_WIN01_OBJ
#define WINOUT_WIN01_OBJ 0x0010
outside: sprites
Referenced by btEffectRunGeode(), btEffectRunVengeance(), btElementGlowPlay(), btMessageWaitForAdvance(), btMessageWaitForAdvanceAt(), btPlaybackRun(), fdHeadingShow(), fdScreenTransitionUpdateScanlineTable(), scAirsRockInsideVanishStone(), scAnkohlRuinsInitSand(), scCrackedTileFall(), scMagmaRockInsideFadeStoneAway() and scMarsLighthouseEntranceFallThroughCrack().
Definition at line 142 of file definitions.h.
WINOUT_WIN01_CLR
#define WINOUT_WIN01_CLR 0x0020
outside: the colour effect
Referenced by btEffectRunGeode(), btEffectRunMeteorBlow(), btEffectRunVengeance(), btEffectSetupCanvasTileMap(), btEffectSetupCanvasWindows(), btStagingRunAttack(), btTransitionRun(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsRun() and fdSuperLuckyDiceRun().
Definition at line 143 of file definitions.h.
WINOUT_WIN01_ALL
#define WINOUT_WIN01_ALL 0x003f
outside: everything
Referenced by scAnemosInnerSanctumDropMimicStone().
Definition at line 144 of file definitions.h.
WINOUT_WINOBJ_BG0
#define WINOUT_WINOBJ_BG0 0x0100
sprite window: BG0
Referenced by btEffectRunMeteorBlow(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun(), scAnemosInnerSanctumDropMimicStone(), scAnkohlRuinsInitSand(), scCrackedTileFall() and scMarsLighthouseEntranceFallThroughCrack().
Definition at line 145 of file definitions.h.
WINOUT_WINOBJ_BG1
#define WINOUT_WINOBJ_BG1 0x0200
sprite window: BG1
Referenced by btEffectRunMeteorBlow(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun(), scAnemosInnerSanctumDropMimicStone(), scAnkohlRuinsInitSand(), scCrackedTileFall() and scMarsLighthouseEntranceFallThroughCrack().
Definition at line 146 of file definitions.h.
WINOUT_WINOBJ_BG2
#define WINOUT_WINOBJ_BG2 0x0400
sprite window: BG2
Referenced by btEffectRunMeteorBlow(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun(), scAnemosInnerSanctumDropMimicStone(), scCrackedTileFall() and scMarsLighthouseEntranceFallThroughCrack().
Definition at line 147 of file definitions.h.
WINOUT_WINOBJ_BG3
#define WINOUT_WINOBJ_BG3 0x0800
sprite window: BG3
Referenced by scAnemosInnerSanctumDropMimicStone(), scAnkohlRuinsInitSand(), scCrackedTileFall() and scMarsLighthouseEntranceFallThroughCrack().
Definition at line 148 of file definitions.h.
WINOUT_WINOBJ_OBJ
#define WINOUT_WINOBJ_OBJ 0x1000
sprite window: sprites
Referenced by scAnkohlRuinsInitSand().
Definition at line 149 of file definitions.h.
WINOUT_WINOBJ_CLR
#define WINOUT_WINOBJ_CLR 0x2000
sprite window: the colour effect
Referenced by btEffectRunVengeance(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun() and scAnemosInnerSanctumDropMimicStone().
Definition at line 150 of file definitions.h.
WINOUT_WINOBJ_ALL
#define WINOUT_WINOBJ_ALL 0x3f00
sprite window: everything
Referenced by btEffectRunGeode(), btEffectSetupCanvasTileMap(), btEffectSetupCanvasWindows(), btStagingRunAttack(), btTransitionRun(), scAirsRockInsideVanishStone() and scMagmaRockInsideFadeStoneAway().
Definition at line 151 of file definitions.h.
REG_MOSAIC
#define REG_MOSAIC (*(volatile Uint16 *)0x0400004c)
Mosaic and colour special effects.
mosaic block sizes
Referenced by btTransitionRunMosaicFadeOut(), fdMapGridLoadMap() and fdWorldMapInitPerspective().
Definition at line 154 of file definitions.h.
REG_BLDCNT
#define REG_BLDCNT (*(volatile Uint16 *)0x04000050)
colour effect, targets
Referenced by btAutoBattleRunPsynergy(), btBackgroundFadeAlphaIn(), btBackgroundFadeAlphaOut(), btBackgroundStepHighlightBlend(), btBrightenAllLayers(), btEffectApplyWindowBlendRegisters(), btEffectConfigureEffectDisplay(), btEffectEndCanvasLayer(), btEffectFillWhiteBand(), btEffectOpenCanvasLayer(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBladeRain(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCurse(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDouse(), btEffectRunEclipse(), btEffectRunElementCards(), btEffectRunFlare(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGeode(), btEffectRunGrowingColumns(), btEffectRunHaures(), btEffectRunIce(), btEffectRunImpactBurst(), btEffectRunIris(), btEffectRunLobbedShells(), btEffectRunMeteorBlow(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunSabreDance(), btEffectRunShatteringOpening(), btEffectRunSleep(), btEffectRunSpire(), btEffectRunStarfieldFall(), btEffectRunStoneJustice(), btEffectRunThorn(), btEffectRunUlysses(), btEffectRunVine(), btEffectRunWyrdCurse() and 84 more.
Definition at line 155 of file definitions.h.
BLDCNT_TGT1_BG0
#define BLDCNT_TGT1_BG0 0x0001
REG_BLDCNT: the first target layers, the colour effect, then the second
target layers that a blend mixes the first ones with.
first target: BG0
Referenced by mnTitleIntroShowBookTwoCard(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scAirsRockWhirlwindOpensTheTop(), scClearFadeInBlend(), scJupiterLighthouseFlashSky(), scShamanVillageBlowAwaySand(), scStaffCreditBlendBeacon(), scStaffCreditUpdateTransitionBlend(), scWorldMapLoadTidalWave() and scWorldMapUpdateTransitionBlend().
Definition at line 159 of file definitions.h.
BLDCNT_TGT1_BG1
#define BLDCNT_TGT1_BG1 0x0002
first target: BG1
Referenced by btEffectRunCloudSwirl(), btEffectRunCybele(), btEffectRunEclipse(), btEffectRunFlare(), btEffectRunGaia(), btEffectRunImpactBurst(), btEffectRunMeteorBlow(), btEffectRunStarfieldFall(), btEffectRunUlysses(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasTileMap(), btTransitionRunMosaicFadeOut(), fdEffectStartFadeOverlay(), fdSpriteViewerRun(), fdWorldMapInitPerspective(), fdWorldMapUpdateRegionTint(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scGaiaRockInsideRaiseSandTablet(), scGaiaRockInsideReadSandTablet(), scInit(), scLemuriaSpringDrainSpring(), scMarsLighthouseHallStartDoorways(), scScrollHBlank(), scShamanVillageBlowAwaySand(), scTitleRevealScreen() and scWorldMapQueueBlend().
Definition at line 160 of file definitions.h.
BLDCNT_TGT1_BG2
#define BLDCNT_TGT1_BG2 0x0004
first target: BG2
Referenced by btBackgroundFadeAlphaIn(), btBackgroundFadeAlphaOut(), btEffectFillWhiteBand(), btEffectRunAzul(), btEffectRunBladeRain(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDouse(), btEffectRunEclipse(), btEffectRunElementCards(), btEffectRunFlare(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGeode(), btEffectRunGrowingColumns(), btEffectRunIce(), btEffectRunImpactBurst(), btEffectRunIris(), btEffectRunMeteorBlow(), btEffectRunShatteringOpening(), btEffectRunThorn(), btEffectRunUlysses(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasWindows(), btEffectStartBubbleColumn(), btElementGlowPlay(), btTransitionRunMosaicFadeOut(), fdEffectStartFadeOverlay(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdLuckyWheelsUpdate(), fdSuperLuckyDiceRun(), fdWorldMapInitPerspective(), fdWorldMapUpdateRegionTint(), mnCreditsRun(), mnEndingImageStart(), mnTitleIntroScrollClouds(), scAirsRockInsideVanishStone(), scInit(), scMagmaRockInsideDrainLava(), scMagmaRockInsideFadeStoneAway(), scMagmaRockInsideRaiseLava(), scShamanVillageBlowAwaySand(), scTitleRevealScreen() and scWorldMapQueueBlend().
Definition at line 161 of file definitions.h.
BLDCNT_TGT1_BG3
#define BLDCNT_TGT1_BG3 0x0008
first target: BG3
Referenced by btTransitionRunMosaicFadeOut(), fdEffectStartFadeOverlay(), fdWorldMapInitPerspective(), fdWorldMapUpdateRegionTint(), scTitleRevealScreen() and scWorldMapQueueBlend().
Definition at line 162 of file definitions.h.
BLDCNT_TGT1_OBJ
#define BLDCNT_TGT1_OBJ 0x0010
first target: sprites
Referenced by btBackgroundStepHighlightBlend(), fdEffectStartFadeOverlay(), fdLuckyWheelsUpdate(), fdWorldMapInitPerspective(), mnTitleIntroUpdateLogo(), mnTitleShowTitleScreen(), scAirsRockInsideShebaLearnsReveal(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAquaRockInsidePiersLearnsParch(), scCavernsFinishMovingAngaraBlock(), scClearFadeInBlend(), scFlameThrowersStart(), scGaiaRockInsideFelixLearnsSand(), scInit(), scJupiterLighthouseFlashSky(), scKandoreanTempleStartLiftRoom(), scKandoreanTempleStartVentRoom(), scKibomboLightSignalFire(), scMagmaRockInsideFinishPushingPillar(), scMagmaRockInsideLearnBlaze(), scMarsLighthouseAerieLightBeacon(), scSettlementsSetUpKaltIsland(), scShamanVillageSetUpVillage(), scVentsStart() and SinkPillar().
Definition at line 163 of file definitions.h.
BLDCNT_TGT1_BD
#define BLDCNT_TGT1_BD 0x0020
first target: the backdrop
Referenced by btTransitionRunMosaicFadeOut().
Definition at line 164 of file definitions.h.
BLDCNT_TGT1_ALL
#define BLDCNT_TGT1_ALL 0x003f
first target: every layer
Referenced by btBrightenAllLayers() and scInit().
Definition at line 165 of file definitions.h.
BLDCNT_EFFECT_NONE
#define BLDCNT_EFFECT_NONE 0x0000
no effect, the targets as drawn
Definition at line 166 of file definitions.h.
BLDCNT_EFFECT_BLEND
#define BLDCNT_EFFECT_BLEND 0x0040
weighted by REG_BLDALPHA
Referenced by btBackgroundFadeAlphaIn(), btBackgroundFadeAlphaOut(), btEffectFillWhiteBand(), btEffectRunAzul(), btEffectRunBladeRain(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDouse(), btEffectRunEclipse(), btEffectRunElementCards(), btEffectRunFlare(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGeode(), btEffectRunGrowingColumns(), btEffectRunHaures(), btEffectRunIce(), btEffectRunImpactBurst(), btEffectRunIris(), btEffectRunMeteorBlow(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunThorn(), btEffectRunUlysses(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasTileMap(), btEffectSetupCanvasWindows(), btEffectStartBubbleColumn(), btElementGlowPlay(), btMotionCallBeast(), btMotionDismissBeast(), fdBlendScriptRun(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdLuckyWheelsUpdate(), fdSpriteViewerRun(), fdSuperLuckyDiceRun(), mnCreditsRun(), mnEndingImageStart(), mnTitleIntroScrollClouds(), mnTitleIntroShowBookTwoCard(), mnTitleIntroUpdateLogo(), mnTitleShowTitleScreen(), scAirsRockInsideVanishStone(), scAirsRockInsideWakeEntranceStatue() and 21 more.
Definition at line 167 of file definitions.h.
BLDCNT_EFFECT_LIGHTEN
#define BLDCNT_EFFECT_LIGHTEN 0x0080
towards white by REG_BLDY
Referenced by btBackgroundStepHighlightBlend(), btBrightenAllLayers(), fdEffectStartFadeOverlay(), fdWorldMapInitPerspective(), fdWorldMapUpdateRegionTint(), scWorldMapQueueBlend() and syScreenFadeUpdate().
Definition at line 168 of file definitions.h.
BLDCNT_EFFECT_DARKEN
#define BLDCNT_EFFECT_DARKEN 0x00c0
towards black by REG_BLDY
Referenced by btTransitionRunMosaicFadeOut(), fdLuckyWheelsUpdate(), fdWorldMapUpdateRegionTint(), scTitleRevealScreen() and syScreenFadeUpdate().
Definition at line 169 of file definitions.h.
BLDCNT_EFFECT_MASK
#define BLDCNT_EFFECT_MASK 0x00c0
the effect's two bits
Referenced by fdBlendScriptRun().
Definition at line 170 of file definitions.h.
BLDCNT_TGT2_BG0
#define BLDCNT_TGT2_BG0 0x0100
second target: BG0
Referenced by mnTitleShowTitleScreen(), scApojiiIslandsDouseAquaStone() and scTitleRevealScreen().
Definition at line 171 of file definitions.h.
BLDCNT_TGT2_BG1
#define BLDCNT_TGT2_BG1 0x0200
second target: BG1
Referenced by btTransitionRunMosaicFadeOut(), mnTitleIntroScrollClouds(), mnTitleIntroUpdateLogo(), mnTitleShowTitleScreen(), scApojiiIslandsDouseAquaStone(), scClearFadeInBlend(), scInit(), scShamanVillageBlowAwaySand() and scTitleRevealScreen().
Definition at line 172 of file definitions.h.
BLDCNT_TGT2_BG2
#define BLDCNT_TGT2_BG2 0x0400
second target: BG2
Referenced by btTransitionRunMosaicFadeOut(), mnTitleShowTitleScreen(), scAirsRockWhirlwindClearsWall(), scApojiiIslandsDouseAquaStone(), scClearFadeInBlend() and scTitleRevealScreen().
Definition at line 173 of file definitions.h.
BLDCNT_TGT2_BG3
#define BLDCNT_TGT2_BG3 0x0800
second target: BG3
Referenced by btTransitionRunMosaicFadeOut(), mnCreditsRun(), mnEndingImageStart(), mnTitleIntroShowBookTwoCard(), mnTitleShowTitleScreen(), scAirsRockWhirlwindClearsWall(), scApojiiIslandsDouseAquaStone(), scClearFadeInBlend(), scShamanVillageBlowAwaySand() and scTitleRevealScreen().
Definition at line 174 of file definitions.h.
BLDCNT_TGT2_OBJ
#define BLDCNT_TGT2_OBJ 0x1000
second target: sprites
Referenced by btTransitionRunMosaicFadeOut().
Definition at line 175 of file definitions.h.
BLDCNT_TGT2_BD
#define BLDCNT_TGT2_BD 0x2000
second target: the backdrop
Referenced by btBackgroundFadeAlphaIn(), btBackgroundFadeAlphaOut(), btTransitionRunMosaicFadeOut(), mnCreditsRun(), mnEndingImageStart(), mnTitleShowTitleScreen(), scClearFadeInBlend() and scTitleRevealScreen().
Definition at line 176 of file definitions.h.
BLDCNT_TGT2_ALL
#define BLDCNT_TGT2_ALL 0x3f00
second target: every layer
Referenced by btBackgroundStepHighlightBlend(), btEffectFillWhiteBand(), btEffectRunAzul(), btEffectRunBladeRain(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDouse(), btEffectRunEclipse(), btEffectRunElementCards(), btEffectRunFlare(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGeode(), btEffectRunGrowingColumns(), btEffectRunHaures(), btEffectRunIce(), btEffectRunImpactBurst(), btEffectRunIris(), btEffectRunMeteorBlow(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunThorn(), btEffectRunUlysses(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasTileMap(), btEffectSetupCanvasWindows(), btEffectStartBubbleColumn(), btElementGlowPlay(), btMotionCallBeast(), btMotionDismissBeast(), fdEffectStartFadeOverlay(), fdGroundParticlesStart(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdLuckyWheelsUpdate(), fdMapScreenUpdateMarkers(), fdMotesStart(), fdSpriteViewerRun(), fdSuperLuckyDiceRun(), fdWeatherStartRain(), fdWorldMapInitPerspective(), fdWorldMapUpdateRegionTint(), scAirsRockInsideShebaLearnsReveal(), scAirsRockInsideVanishStone(), scAirsRockInsideWakeEntranceStatue() and 36 more.
Definition at line 177 of file definitions.h.
REG_BLDALPHA
#define REG_BLDALPHA (*(volatile Uint16 *)0x04000052)
The blend's weights.
Referenced by btAutoBattleRunPsynergy(), btBackgroundFadeAlphaIn(), btBackgroundFadeAlphaOut(), btBackgroundStepHighlightBlend(), btEffectApplyWindowBlendRegisters(), btEffectConfigureEffectDisplay(), btEffectFillWhiteBand(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBackstab(), btEffectRunBallLightning(), btEffectRunBladeRain(), btEffectRunBoreas(), btEffectRunBreaths(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCondemn(), btEffectRunCool(), btEffectRunCrescentSlash(), btEffectRunCruelRuin(), btEffectRunCrystal(), btEffectRunDaedalus(), btEffectRunDaedalusStrike(), btEffectRunDeathPlunge(), btEffectRunDiamondBerg(), btEffectRunDjinniCharge(), btEffectRunDjinniEntrance(), btEffectRunDragonCloud(), btEffectRunDragonFire(), btEffectRunDrainMotes(), btEffectRunEclipse(), btEffectRunElementBurst(), btEffectRunElementCards(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFallingSword(), btEffectRunFire(), btEffectRunFirePuppet(), btEffectRunFlare(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunFlurry(), btEffectRunFormChange(), btEffectRunFroth() and 162 more.
Definition at line 180 of file definitions.h.
BLEND_WEIGHT_MAX
#define BLEND_WEIGHT_MAX 16
A blend weight's full strength: BLEND_ALPHA(BLEND_WEIGHT_MAX, 0) shows only
the top layer.
Referenced by btAutoBattleRunPsynergy(), btBackgroundFadeAlphaIn(), btBackgroundFadeAlphaOut(), btBackgroundStepHighlightBlend(), btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBallLightning(), btEffectRunBoreas(), btEffectRunCastingImpact(), btEffectRunCharon(), btEffectRunEclipse(), btEffectRunGeyser(), btEffectRunHeartbreak(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunLifeShear(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunThor(), btEffectRunVengeance(), btEffectRunVoidBeam(), btEffectRunWaterSheet(), btEffectRunZagan(), btElementGlowPlay(), btHighlightSetModes(), btMessageWaitForAdvance(), btMessageWaitForAdvanceAt(), btMotionCallBeast(), btMotionDismissBeast(), btStagingRunFullScreen(), btTransitionRun(), fdEffectStartFadeOverlay(), fdMapScreenUpdateMarkers(), LemuriaSpringAlphaSteps, mnCreditsRun(), mnEndingImageScroll(), mnTitleIntroScrollClouds(), mnTitleIntroShowBookTwoCard(), mnTitleIntroUpdateLogo(), mnTitleShowTitleScreen(), scAirsRockDriftFog(), scAirsRockInsideVanishStone(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAirsRockLiftFog(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scAirsRockWhirlwindOpensTheTop(), scAnemosInnerSanctumLightSymbol() and 31 more.
Definition at line 183 of file definitions.h.
BLEND_ALPHA
#define BLEND_ALPHA(top, bottom) ((top) | ((bottom) << 8))
A REG_BLDALPHA value: top and bottom are the two targets' weights, out of
BLEND_WEIGHT_MAX.
Referenced by ALIGNED, btAutoBattleRunPsynergy(), btBackgroundFadeAlphaIn(), btBackgroundFadeAlphaOut(), btBackgroundStepHighlightBlend(), btEffectRunAzul(), btEffectRunBallLightning(), btEffectRunBurstShower(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCharon(), btEffectRunCrescentSlash(), btEffectRunDrainMotes(), btEffectRunFroth(), btEffectRunGeyser(), btEffectRunHeavyBlow(), btEffectRunIris(), btEffectRunLifeShear(), btEffectRunMeteorBlow(), btEffectRunRagingHeat(), btEffectRunSoulShatter(), btEffectRunUlysses(), btEffectRunVengeance(), btEffectRunVoidBeam(), btEffectRunWaterSheet(), btEffectRunZagan(), btElementGlowPlay(), btHighlightSetModes(), btMessageWaitForAdvance(), btMessageWaitForAdvanceAt(), btPaletteMirrorBgColors(), btStagingRunFullScreen(), btTransitionRun(), fdEffectStartFadeOverlay(), fdGroundParticlesStart(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdLuckyWheelsUpdate(), fdMotesStart(), fdSuperLuckyDiceRun(), fdWeatherStartRain(), fdWorldMapInitPerspective(), LemuriaSpringAlphaSteps, mnEndingImageStart(), mnTitleIntroScrollClouds(), mnTitleIntroShowBookTwoCard(), mnTitleIntroUpdateLogo(), mnTitleShowTitleScreen(), scAirsRockDriftFog(), scAirsRockInsideShebaLearnsReveal() and 45 more.
Definition at line 186 of file definitions.h.
BLEND_ALPHA_TOP_MASK
#define BLEND_ALPHA_TOP_MASK 0xff
REG_BLDALPHA's low byte, the top target's weight.
Referenced by scAnemosInnerSanctumLightSymbol(), scGaiaRockInsideRaiseSandTablet() and scGaiaRockInsideReadSandTablet().
Definition at line 188 of file definitions.h.
REG_BLDY
#define REG_BLDY (*(volatile Uint16 *)0x04000054)
Fade level, 0 to 16.
Referenced by btBackgroundStepHighlightBlend(), btHighlightSetModes(), fdBlendScriptRun(), fdEffectStartFadeOverlay(), fdGroundParticlesStart(), fdLuckyWheelsFinishTick(), fdMapScreenUpdateMarkers(), fdMotesStart(), fdWeatherStartRain(), fdWorldMapInitPerspective(), fdWorldMapUpdateRegionTint(), scTitleRevealScreen(), scWorldMapQueueBlend() and syScreenFadeUpdate().
Definition at line 190 of file definitions.h.
BLEND_FADE_MAX
#define BLEND_FADE_MAX 16
REG_BLDY's whole fade: the targets drawn all white, or all black.
Referenced by scTitleRevealScreen().
Definition at line 192 of file definitions.h.
BG_CANVAS_MAP
#define BG_CANVAS_MAP ((volatile Sint16 *)BG_SCREEN_BLOCK(7))
Screen block 7: BG2's affine map of a battle effect's canvas, a byte a tile.
Referenced by btEffectRunVengeance(), btEffectStartTiledCanvas() and btEffectStartTiledCanvasFilled().
Definition at line 195 of file definitions.h.
REG_BG0HOFS
#define REG_BG0HOFS ((void *)0x04000010)
BG0HOFS as an address for a DMA: copies of BgScrollWork over all four
backgrounds' scroll registers start here, and Mind Read's HBlank DMA writes
one halfword a line into it.
Referenced by fdMindReadStartRipple(), mnTitleShowCamelotLogo(), mnTitleShowPublisherLogo(), mnTitleShowTitleScreen(), scAirsRockLiftFog(), scClearLoadBackground(), scTitleLoadBackground(), syVBlankHandler() and WAVE_SCROLL.
Definition at line 199 of file definitions.h.
REG_DMA0
#define REG_DMA0 ((volatile Uint16 *)0x040000b0)
DMA channel 0's registers as halfwords, for the line scrolls that set the whole channel up.
Referenced by btEffectArmBg1HBlankDMA(), btEffectArmBg2AffineHBlankDMA(), btEffectArmMeteorBlowPaletteDMA(), btEffectArmPaletteHBlankDMA(), btEffectArmWin0HBlankDMA(), btEffectBuildWindowEdgeTable(), fdEffectStartWindowHBlankDMA(), fdLineScrollArmDMA(), fdLuckyWheelsFinishTick(), fdMindReadStartRipple(), fdScreenTransitionUpdateDissolve(), fdScreenTransitionUpdateScanlineTable(), fdWorldMapApplyAffinePage(), scAirsRockDriftFog(), scAirsRockLiftFog(), scEasternAlhafraStartWaveDMA(), scGarohWavePathLayer(), scIdejimaApplyWaveLines(), scInit(), scIsletsStartWaveDMA(), scLemuriaStartRippleDMA(), scSeaOfTimeAnimateSea() and WAVE_SCROLL.
Definition at line 203 of file definitions.h.
REG_DMA3
#define REG_DMA3 ((volatile Uint32 *)0x040000d4)
DMA channel 3's registers as words: the channel syDMAXCopy copies with.
Referenced by btAutoBattleBuildActions(), btBackgroundLoad(), btBackgroundSetMode(), btBackgroundSetPaletteLevel(), btBackgroundShowZoomedPage(), btDMAStopDMA3(), btEffectBuildBlitter(), btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunCastingImpact(), btEffectRunCoatlicue(), btEffectRunCriticalHit(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunFlora(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunNeptune(), btEffectRunNereidCopy(), btEffectRunTorch(), btEffectStepPaletteToResource(), btElementGlowInitStarField(), btRenderDrawMeshWireframe(), btRenderDrawTexturedMesh(), btRenderFillMesh(), btShiftVRAMTiles(), btTransitionUploadTileVariant(), CopyScrollMap(), dbIncreaseItemAndLevelSelectItem(), dbShopTestSelectItem(), fdActorCreate(), fdActorRestore(), fdActorTableSnapshot(), fdBattleEffectShiftRowsDown(), fdBattleEffectStartCanvasSprite(), fdBattleEffectUploadCanvas(), fdBlendScriptStart(), fdGroundParticlesStart(), fdHeadingClose(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsFinishTick(), fdLuckyWheelsRun(), fdLuckyWheelsStepSparkColors(), fdLuckyWheelsTransferCanvas(), fdMapCopyPalette(), fdMapScreenDraw(), fdMapScreenDrawColumn(), fdMapScreenDrawRow(), fdPaletteCycleAdd() and 106 more.
Definition at line 206 of file definitions.h.
PLTT_BACKDROP
#define PLTT_BACKDROP (*(volatile Uint16 *)0x05000000)
Background colour 0, the backdrop shown where no layer draws.
Referenced by btEffectFillWhiteBand(), btEffectRunAtalanta(), btEffectRunBoreas(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunHaures(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunStarfieldFall(), btEffectRunThor(), fdEngineRun(), fdScreenTransitionStart(), fdStartEncounterTransition(), sySynch() and syWindowLoadGraphics().
Definition at line 209 of file definitions.h.
BG_PLTT_SIZE
#define BG_PLTT_SIZE 512
Palette RAM sizes and colour counts.
bytes for 256 background colours
Referenced by fdLuckyWheelsRun(), fdMapCopyPalette(), fdWorldMapLoadGraphics(), fdWorldMapPreloadCurrentTileBlock(), mnTitleIntroLoadPictureTiles(), mnTitleIntroShowLighthouse(), mnTitlePaletteFadeBuildColors(), mnTitlePaletteFadeInit(), mnTitlePaletteFadeUpdate() and scInit().
Definition at line 212 of file definitions.h.
BG_PLTT_COLORS
#define BG_PLTT_COLORS (BG_PLTT_SIZE / 2)
the background's 256 colours
Referenced by fdLuckyDiceRun(), fdLuckyWheelsRun(), fdSuperLuckyDiceRun(), mnTitlePaletteFadeBuildColors(), mnTitlePaletteFadeInit() and mnTitlePaletteFadeUpdate().
Definition at line 213 of file definitions.h.
OBJ_PLTT_SIZE
#define OBJ_PLTT_SIZE 512
bytes for 256 sprite colours
Referenced by btEffectRunAtalanta(), btEffectRunCoatlicue(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunNeptune(), fdPsynergyParch() and mnTitleIntroUpdateLogo().
Definition at line 214 of file definitions.h.
OBJ_PLTT_COLORS
#define OBJ_PLTT_COLORS (OBJ_PLTT_SIZE / 2)
the sprites' 256 colours
Referenced by btEffectRunJudgment() and fdLuckyDiceRun().
Definition at line 215 of file definitions.h.
PLTT_COLORS
#define PLTT_COLORS (2 * BG_PLTT_COLORS)
palette RAM colours (BG then OBJ)
Referenced by mnTitlePaletteFadeBuildColors() and mnTitlePaletteFadeUpdate().
Definition at line 216 of file definitions.h.
BG_PLTT
#define BG_PLTT ((volatile Uint16 *)0x05000000)
16 palettes of 16 colours
Referenced by btEffectArmMeteorBlowPaletteDMA(), btEffectArmPaletteHBlankDMA(), btEffectConvertBackgroundToBlueRamp(), btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunBackstab(), btEffectRunBallLightning(), btEffectRunBreak(), btEffectRunBubbleColumn(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCool(), btEffectRunCrescentSlash(), btEffectRunCriticalHit(), btEffectRunCrystal(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDaedalusStrike(), btEffectRunDeathPlunge(), btEffectRunDjinniEntrance(), btEffectRunDragonFire(), btEffectRunDrainMotes(), btEffectRunEclipse(), btEffectRunElementBurst(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFallingSword(), btEffectRunFirePuppet(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunFlurry(), btEffectRunFormChange(), btEffectRunGaia(), btEffectRunGeode(), btEffectRunHaunt(), btEffectRunHaures(), btEffectRunHealingMotes(), btEffectRunHeavyBlow(), btEffectRunHelmSplitter(), btEffectRunHurricane(), btEffectRunJudgment(), btEffectRunLeapingStrike(), btEffectRunLobbedShells(), btEffectRunMars() and 80 more.
Definition at line 219 of file definitions.h.
PALETTE_COLORS
#define PALETTE_COLORS 16
Colours in one 16-colour palette.
Referenced by ApojiiIslandsFallsColors, ApojiiIslandsFallsCycled, ApojiiIslandsSeaColors, ApojiiIslandsSeaCycled, ApojiiIslandsShoreColors, ApojiiIslandsShoreCycled, ApojiiIslandsSprayColors, ApojiiIslandsSprayCycled, ApojiiIslandsStoneColors, ApojiiIslandsStoneCycled, btEffectConvertBackgroundToBlueRamp(), btEffectRunAtalanta(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunFlora(), btEffectRunHaures(), btEffectRunJudgment(), btEffectRunNeptune(), btEffectRunUlysses(), btPaletteCopyWithBrightnessOffset(), fdCyclonePlotArc(), fdHoverGlowUpdate(), fdLuckyWheelsDarkenStep(), fdPaletteCycleStep(), fdPaletteEditorRun(), fdPsynergyArrow(), fdPsynergyCyclone(), fdPsynergyUpdateBurst(), fdPsynergyUpdateRing(), fdSuperLuckyDiceRun(), MarsLighthouseHallLedgePalette, MarsLighthouseHallLedgeSavedPalette, mnDjinnMenuAdjustPalettes(), mnGraphicsExpandVRAMTilesByColorTable(), mnIconLoadWithPalette(), mnPaletteLightenHighlight(), mnPaletteLoadIconsIntoHighlight(), mnTextDrawStringAsTiles(), mnTextSetColor(), mnWindowOverlayTilePattern(), scChampaCliffCavesDrawForgeFire(), scChampaCliffCavesLoadColumn(), scChampaCliffCavesLoadGlow(), scChampaCliffCavesStartFlash(), scEpilogueLoadPortraitFrame(), scGarohInitVillage(), scIdejimaUseDriftPalette(), scInit() and 13 more.
Definition at line 221 of file definitions.h.
PALETTE_BYTES
#define PALETTE_BYTES (PALETTE_COLORS * 2)
Bytes in one 16-colour palette, as a 16-colour picture's resource begins with one.
Referenced by fdLuckyWheelsRun(), fdSuperLuckyDiceRun() and scJupiterLighthouseLoadPalettes().
Definition at line 224 of file definitions.h.
BG_PLTT_COLOR
#define BG_PLTT_COLOR(palette, color)
Colour color of 16-colour background palette palette.
Referenced by btBackgroundLoad(), btBackgroundSetMode(), btEffectConvertBackgroundToBlueRamp(), btEffectDarkenBackgroundStep(), btEffectDimBackgroundStep(), btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBoreas(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunDrainMotes(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunHaures(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunNeptune(), btEffectRunOdyssey(), btEffectRunRamses(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunThor(), btEffectRunUlysses(), btEffectRunWyrdCurse(), btEffectRunZagan(), btEffectUpdatePhasePalette(), btGraphicsLoadGreyRamp(), btIrisChangeBackdrop(), btIrisWipeScreen(), btPaletteBrightenBattleBg(), btPaletteBrightenBgEntries(), btPaletteBrightenSavedBattleBg(), dbIncreaseItemAndLevelSelectItem(), dbShopTestSelectItem(), fdLuckyWheelsDarkenStep(), fdLuckyWheelsRun(), fdPaletteCycleStep(), fdPsynergyGreyMindReadPalette(), fdPsynergyRestoreMindReadPalette(), fdPsynergyUpdateRing(), fdStartEncounterTransition() and 48 more.
Definition at line 226 of file definitions.h.
OBJ_PLTT
#define OBJ_PLTT ((volatile Uint16 *)0x05000200)
the sprites' 256 colours
Referenced by btBackgroundLoad(), btBackgroundSetMode(), btEffectRunAtalanta(), btEffectRunCatastrophe(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunNeptune(), dbIncreaseItemAndLevelSelectItem(), dbShopTestSelectItem(), fdLuckyDiceRun(), fdLuckyWheelsDarkenStep(), fdLuckyWheelsRun(), fdPaletteFadeInit(), fdPaletteFadeUpdate(), fdPsynergyParch(), fdSuperLuckyDiceRun(), mnBattleCommandRowLoadIconTiles(), mnPaletteLoadIconsIntoHighlight(), mnStatusScreenRun(), mnStatusScreenRunPartyRow(), mnTitleIntroShowLighthouse(), mnTitleIntroUpdateLogo(), mnTitlePaletteFadeInit(), mnTitlePaletteFadeUpdate(), scChampaCliffCavesDrawForgeFire(), scPaletteSetColorsFade(), syPaletteLoadBasicSpriteColors() and syWindowLoadGraphics().
Definition at line 229 of file definitions.h.
OBJ_PLTT_COLOR
#define OBJ_PLTT_COLOR(palette, color)
Colour color of 16-colour sprite palette palette.
Referenced by btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunFlora(), btEffectRunHaures(), btEffectRunIris(), fdLuckyWheelsRun(), fdPsynergyArrow(), fdPsynergyCyclone(), fdPsynergyUpdateBurst(), fdPsynergyUpdatePound(), fdPsynergyUpdateRing(), fdSuperLuckyDiceRun(), mnIconLoadWithPalette(), mnSettingsMenuOpen(), scApojiiIslandsCycleAquaStoneColors(), scChampaCliffCavesStartFlash(), scEpilogueLoadPortraitFrame(), scLohoFireCannon(), scNorthernReachesShatterIceWall(), scShamanVillageLoadLettering(), scStaffCreditShowBeacon(), scTitleLoadSprites() and scTrialRoadDrawRaceMap().
Definition at line 231 of file definitions.h.
RGB_GREEN_SHIFT
#define RGB_GREEN_SHIFT 5
Where a 15-bit colour keeps its green and blue levels, above red's five bits.
Referenced by fdPaletteFadeBuild(), fdPaletteFadePackTarget(), fdPaletteFadeUpdate(), mnTitlePaletteFadeBuildColors() and mnTitlePaletteFadeUpdate().
Definition at line 235 of file definitions.h.
RGB_BLUE_SHIFT
#define RGB_BLUE_SHIFT 10
Referenced by fdPaletteFadeBuild(), fdPaletteFadeClampShiftedComponent(), fdPaletteFadePackTarget(), fdPaletteFadeUpdate() and mnPaletteLightenHighlight().
Definition at line 236 of file definitions.h.
RGB
#define RGB(r, g, b) (((b) << RGB_BLUE_SHIFT) | ((g) << RGB_GREEN_SHIFT) | (r))
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.
Referenced by AncientLemuriaShiningWaterColors, BlazeTintColors, btBackgroundSetMode(), btEffectConvertBackgroundToBlueRamp(), btEffectRunAzul(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDrainMotes(), btEffectRunEruption(), btEffectRunFallingSword(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunHaures(), btEffectRunHeavyBlow(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunKirin(), btEffectRunMeteorBlow(), btEffectRunOdyssey(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunTorch(), btEffectRunUlysses(), btEffectRunWyrdCurse(), btEffectRunZagan(), btEffectStepPaletteToResource(), btEffectUpdatePhasePalette(), btGraphicsLoadGreyRamp(), btIrisChangeBackdrop(), btIrisWipeScreen(), btPaletteBrightenBattleBg(), btPaletteBrightenBgEntries(), btPaletteBrightenSavedBattleBg(), btPaletteCopyWithBrightnessOffset(), fdDjinnRunJupiterJoinEffect(), fdDjinnRunMarsJoinEffect(), fdDjinnRunMercuryJoinEffect(), fdDjinnRunVenusJoinEffect(), fdHoverGlowGetColor(), fdLuckyDiceScaleRGB555Buffer() and 73 more.
Definition at line 239 of file definitions.h.
IWRAM_START
#define IWRAM_START 0x03000000
The start of the 32 KB of IWRAM, the CPU's fast internal work memory.
Referenced by syInit().
Definition at line 242 of file definitions.h.
EWRAM_START
#define EWRAM_START 0x02000000
The start of the 256 KB of EWRAM, the slower external work memory.
Definition at line 244 of file definitions.h.
EWRAM_END
#define EWRAM_END 0x02040000
The end of EWRAM: the limit the EWRAM heap's allocators test.
Referenced by syHeapAllocate(), syHeapAllocateEWRAM(), syHeapFillFreeWords(), syHeapGetRemainingEWRAM(), syHeapSlotAllocate() and syHeapSlotAllocateEWRAM().
Definition at line 246 of file definitions.h.
BG_CHAR_BLOCK
#define BG_CHAR_BLOCK(n) ((Uint8 *)VRAM + (n) * BG_CHAR_SIZE)
Background tile memory's 16 KB character block n, 0 to 3.
Referenced by btBackgroundLoad(), btEffectConvertBackgroundToBlueRamp(), btEffectEndCanvasLayer(), btEffectEndElementStreaks(), btEffectOpenCanvasLayer(), btEffectProcessPendingBlock2Transfer(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBurstShower(), btEffectRunCanvasBurst(), btEffectRunCastingImpact(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCriticalHit(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunDjinniEntrance(), btEffectRunEclipse(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunGeode(), btEffectRunHurricane(), btEffectRunImpactBurst(), btEffectRunLobbedShells(), btEffectRunMeteorBlow(), btEffectRunMoteFountain(), btEffectRunQuake(), btEffectRunSerac(), btEffectRunShatteringOpening(), btEffectRunSpiderWeb(), btEffectRunStarfieldFall(), btEffectRunUlysses(), btEffectSetupBlendedDisplay(), btEffectSetupCanvasTileMap(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btEffectTransferCanvas(), btEffectTransferFullScreenImage(), btEffectTransferHalvedCanvas(), btElementGlowEnd(), btElementGlowPlay(), btElementGlowUploadStarField(), fdHeadingClose(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdMapGridLoadMap(), fdPaletteEditorRun(), fdPsynergyRing(), fdScreenTransitionFillTilemapAndColorTile(), fdScreenTransitionUpdateDissolve() and 44 more.
Definition at line 249 of file definitions.h.
BG_SCREEN_BLOCK
#define BG_SCREEN_BLOCK(n) ((Uint8 *)VRAM + (n) * BG_SCREEN_SIZE)
The 2 KB screen block n of VRAM, 0 to 31, that holds a map.
Referenced by btBackgroundLoad(), btBackgroundSetMode(), btEffectBuildCanvasTilemap(), btEffectBuildRepeatingTilemap(), btEffectRunCatastrophe(), btEffectRunShatteringOpening(), btEffectRunUlysses(), btEffectStartElementStreaks(), btTransitionDrawRows(), btTransitionRun(), fdBgMapDrawClipped16x16(), fdHeadingClose(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdMapScreenShow(), fdPsynergyEndRing(), fdPsynergyRing(), fdScreenTransitionFillTilemapAndColorTile(), fdSuperLuckyDiceRun(), fdWorldMapLoadGraphics(), mnBattleCommandRowRun(), mnCreditsRun(), mnEndingImageStart(), mnTitleIntroScrollClouds(), mnTitleIntroScrollLighthouse(), mnTitleIntroShowBookTwoCard(), mnTitleIntroShowLighthouse(), mnTitleIntroShowPresentsCard(), mnWindowSystemUploadTilemap(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scAirsRockWhirlwindOpensTheTop(), scJupiterLighthouseFlashSky(), scShamanVillageBlowAwaySand(), syPrint(), syPrintClear() and sySerialTestRun().
Definition at line 251 of file definitions.h.
TILE_SIZE_4BPP
#define TILE_SIZE_4BPP 32
Bytes in an 8x8 tile of 16 colours.
Referenced by btEffectRunCharon(), btEffectRunMegaera(), btTransitionRun(), btTransitionUploadTileVariant(), dbPsynergyTestStartRings(), fdBlankOverlayDrawMarks(), fdEffectSpriteInitWithFadeOverlay(), fdEffectSpriteInitWithFadeOverlayBlended(), fdFadeOverlayDrawMarks(), fdHangingVineDraw(), fdHeadingWipeTilePixel(), fdLuckyWheelsRun(), fdPaletteEditorRun(), fdPsynergyEndSand(), fdPsynergyGrindOnTarget(), fdPsynergyParch(), fdPsynergySand(), fdRopeDraw(), fdScoopUpdate(), fdScreenTransitionFillTilemapAndColorTile(), fdScreenTransitionUpdateDissolve(), fdSpriteComposePicture(), fdSuperLuckyDiceRun(), fdTightropeDraw(), fdTilesetAnimationUpdate(), mnBattleCollectPartyCommands(), mnBattleDjinnMenuRun(), mnBattleStatusDrawPageArrows(), mnBuildPatternTiles(), mnDisplayScrollDrawMessageLine(), mnDjinnMenuDrawStatPreview(), mnDjinnMenuRunPreview(), mnDjinnMenuShowMemberStatus(), mnEndingImageInitStrips(), mnGlyphAddBlankSprite(), mnGlyphDraw(), mnGlyphDrawAsSprite(), mnGraphicsExpandVRAMTilesByColorTable(), mnIconBuildAbilityIconTiles(), mnIconBuildCommandIconTiles(), mnIconBuildItemIconTiles(), mnIconBuildMiscellaneousIconTiles(), mnIconLoadWithPalette(), mnItemIconLoadLayersIntoSlot(), mnOpenBackdropScreen(), mnPageArrowsDraw(), mnPartyStatusDraw(), mnRangeIconBuildTiles(), mnSaveProgressOpen(), mnShopCreatePriceSprite() and 28 more.
Definition at line 253 of file definitions.h.
TILE_SIZE_8BPP
#define TILE_SIZE_8BPP 64
Bytes in an 8x8 tile of 256 colours.
Referenced by btEffectRunCharon(), btEffectRunGeode(), btEffectSetupCanvasTileMap(), fdMapScreenDraw(), fdMapScreenDrawColumn(), fdMapScreenDrawRow(), fdPsynergyBurst(), fdSpriteDissolveStep(), fdWorldMapPresentStillImage(), mnBattleCommandRowLoadIconTiles(), mnTitleShowCamelotLogo(), scAirsRockInsidePoundStake(), scAirsRockInsideStepOntoStake() and scTitleLoadBackground().
Definition at line 255 of file definitions.h.
TILE_ROW_SIZE_4BPP
#define TILE_ROW_SIZE_4BPP (TILE_SIZE_4BPP / 8)
The bytes of one pixel row of a 16-colour tile.
Referenced by mnQuantityBarFill(), mnShopDrawPriceDigit() and mnWindowSystemInitBattle().
Definition at line 257 of file definitions.h.
SPRITE_TILES
#define SPRITE_TILES(width, height) ((width) / 8 * ((height) / 8))
The tiles a sprite of width by height pixels takes in sprite tile memory,
counted in its 32-byte steps, of 16 colours and of 256 (two steps a tile): a
picture's sprites follow one another so.
Referenced by fdLuckyWheelsUpdate(), fdSuperLuckyDiceDrawLargeNumber(), fdSuperLuckyDiceDrawNumber() and fdSuperLuckyDiceRun().
Definition at line 261 of file definitions.h.
SPRITE_TILES_8BPP
#define SPRITE_TILES_8BPP(width, height) (2 * SPRITE_TILES(width, height))
Referenced by fdLuckyDiceRun(), fdLuckyWheelsUpdate(), scParticleUpdateFalling() and scVenusLighthouseEntranceUpdateDust().
Definition at line 262 of file definitions.h.
OBJ_VRAM0
#define OBJ_VRAM0 0x06010000
Sprite tile memory: the 32 KB from 0x06010000.
Referenced by btEffectRunDaedalus(), btEffectRunHaures(), btEffectRunIris(), btEffectRunMegaera(), btEffectRunNeptune(), btPlaybackRun(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdPsynergyEndSand(), fdPsynergyGrindOnTarget(), fdPsynergyParch(), fdPsynergySand(), fdScoopUpdate(), fdSpriteComposePicture(), fdSpriteDissolveStep(), fdSuperLuckyDiceRun(), mnCreditsInitCrawlSprites(), mnCreditsInitTextSpritesAtPage(), mnDisplayScrollDrawMessageLine(), mnEndingImageInitStrips(), mnGlyphAddBlankSprite(), mnGlyphDraw(), mnGlyphDrawAsSprite(), mnTitleIntroShowLighthouse(), scAirsRockInsidePoundStake(), scAirsRockInsideStepOntoStake() and syVRAMCacheLoad().
Definition at line 264 of file definitions.h.
OBJ_VRAM
#define OBJ_VRAM ((Uint8 *)OBJ_VRAM0)
Sprite tile memory as bytes, where a sprite's tile number counts from.
Referenced by btEffectRunAtalanta(), btEffectRunCharon(), fdBattleEffectStartCanvasSprite() and fdBattleEffectUploadCanvas().
Definition at line 266 of file definitions.h.
REG_TM3CNT
#define REG_TM3CNT (*(volatile Uint32 *)0x0400010c)
Timer 3's reload value and control as one word; it paces the serial transfers.
Referenced by sySerialDisableTransfer() and sySerialStartClocking().
Definition at line 270 of file definitions.h.
REG_TM3CNT_H
#define REG_TM3CNT_H (*(volatile Uint16 *)0x0400010e)
Timer 3's control.
Referenced by sySerialHandleTransferInterrupt() and sySerialPrepareSendPacket().
Definition at line 272 of file definitions.h.
TIMER_INTR_ENABLE
#define TIMER_INTR_ENABLE 0x0040
TMxCNT_H flags.
Referenced by sySerialHandleTransferInterrupt() and sySerialPrepareSendPacket().
Definition at line 275 of file definitions.h.
TIMER_ENABLE
#define TIMER_ENABLE 0x0080
Starts the timer counting.
Referenced by sySerialHandleTransferInterrupt(), sySerialPrepareSendPacket() and sySoundSetFixedSampleFrequency().
Definition at line 277 of file definitions.h.
TIMER_256CLK
#define TIMER_256CLK 0x0002
Counts every 256 cycles, 65536 times a second.
Definition at line 279 of file definitions.h.
REG_SIODATA32
#define REG_SIODATA32 ((volatile Uint32 *)0x04000120)
The serial data: the 32-bit mode's word, or multiplayer's four received halfwords.
Referenced by sySerialHandleTransferInterrupt().
Definition at line 283 of file definitions.h.
REG_SIOCNT
#define REG_SIOCNT (*(volatile Uint32 *)0x04000128)
Serial control read as a word, with SIODATA8 above it.
Referenced by btCameraUpdate(), btRun(), scClearReceiveByLink(), scLinkLobbyPeerSlotMatches(), sySerialExchangePayloads(), sySerialHandleTransferInterrupt(), sySerialInit(), sySerialPollAndTransfer(), sySerialPollStatus(), sySerialStepBlockTransfer() and sySerialWaitForStatusMask().
Definition at line 285 of file definitions.h.
REG_SIOCNT16
#define REG_SIOCNT16 (*(volatile Uint16 *)0x04000128)
Serial control alone.
Referenced by sySerialDisableTransfer(), sySerialHandleTransferInterrupt() and sySerialInit().
Definition at line 287 of file definitions.h.
REG_SIODATA8
#define REG_SIODATA8 (*(volatile Uint16 *)0x0400012a)
The 8-bit mode's data, which multiplayer mode sends from.
Definition at line 289 of file definitions.h.
REG_KEYINPUT
#define REG_KEYINPUT (*(volatile Uint16 *)0x04000130)
A 0 bit is a held key.
Referenced by syVBlankHandler().
Definition at line 291 of file definitions.h.
REG_KEYCNT
#define REG_KEYCNT (*(volatile Uint16 *)0x04000132)
Keys for the keypad IRQ.
Referenced by syInit(), syInputHandleKeyInterrupt(), syInstallIWRAMAndIRQs() and sySynch().
Definition at line 293 of file definitions.h.
REG_RCNT
#define REG_RCNT (*(volatile Uint16 *)0x04000134)
The serial port's mode.
Referenced by sySerialInit().
Definition at line 295 of file definitions.h.
SIO_115200_BPS
#define SIO_115200_BPS 0x0003
SIOCNT flags.
multiplayer's fastest baud rate
Referenced by sySerialDisableTransfer() and sySerialInit().
Definition at line 298 of file definitions.h.
SIO_START
#define SIO_START 0x0080
starts a transfer; set while one runs
Referenced by sySerialHandleTransferInterrupt(), sySerialPollAndTransfer() and sySerialPollStatus().
Definition at line 299 of file definitions.h.
SIO_32BIT_MODE
#define SIO_32BIT_MODE 0x1000
normal mode, 32 bits a transfer
Referenced by sySerialInit().
Definition at line 300 of file definitions.h.
SIO_MULTI_MODE
#define SIO_MULTI_MODE 0x2000
multiplayer mode
Referenced by sySerialDisableTransfer() and sySerialInit().
Definition at line 301 of file definitions.h.
SIO_INTR_ENABLE
#define SIO_INTR_ENABLE 0x4000
an interrupt when a transfer ends
Referenced by sySerialInit() and sySerialStartClocking().
Definition at line 302 of file definitions.h.
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.
Referenced by sySerialInit().
Definition at line 306 of file definitions.h.
RCNT_GPIO_MODE
#define RCNT_GPIO_MODE 0x8000
the port as general-purpose pins
Referenced by sySerialInit().
Definition at line 307 of file definitions.h.
DMA_DEST_INC
#define DMA_DEST_INC 0x0000
DMAxCNT_H flags. A 32-bit control word takes them shifted above its count:
(DMA_ENABLE | DMA_32BIT) << 16 | words.
destination steps up
Definition at line 311 of file definitions.h.
DMA_DEST_DEC
#define DMA_DEST_DEC 0x0020
destination steps down
Definition at line 312 of file definitions.h.
DMA_DEST_FIXED
#define DMA_DEST_FIXED 0x0040
destination stays, as for a register
Definition at line 313 of file definitions.h.
DMA_DEST_RELOAD
#define DMA_DEST_RELOAD 0x0060
steps up, back to its start each repeat
Referenced by fdLineScrollArmDMA() and fdWorldMapApplyAffinePage().
Definition at line 314 of file definitions.h.
DMA_SRC_INC
#define DMA_SRC_INC 0x0000
source steps up
Definition at line 315 of file definitions.h.
DMA_SRC_DEC
#define DMA_SRC_DEC 0x0080
source steps down
Definition at line 316 of file definitions.h.
DMA_SRC_FIXED
#define DMA_SRC_FIXED 0x0100
source stays, as for a fill
Definition at line 317 of file definitions.h.
DMA_REPEAT
#define DMA_REPEAT 0x0200
runs again at each start condition
Referenced by fdLineScrollArmDMA(), fdWorldMapApplyAffinePage() and scIsletsStartWaveDMA().
Definition at line 318 of file definitions.h.
DMA_16BIT
#define DMA_16BIT 0x0000
moves halfwords
Definition at line 319 of file definitions.h.
DMA_32BIT
#define DMA_32BIT 0x0400
moves words
Referenced by fdLineScrollArmDMA() and fdWorldMapApplyAffinePage().
Definition at line 320 of file definitions.h.
DMA_DREQ_ON
#define DMA_DREQ_ON 0x0800
channel 3: the cartridge requests it
Referenced by scIsletsStartWaveDMA().
Definition at line 321 of file definitions.h.
DMA_START_NOW
#define DMA_START_NOW 0x0000
as soon as it's enabled
Definition at line 322 of file definitions.h.
DMA_START_VBLANK
#define DMA_START_VBLANK 0x1000
Definition at line 323 of file definitions.h.
DMA_START_HBLANK
#define DMA_START_HBLANK 0x2000
Referenced by fdLineScrollArmDMA() and fdWorldMapApplyAffinePage().
Definition at line 324 of file definitions.h.
DMA_START_SPECIAL
#define DMA_START_SPECIAL 0x3000
channels 1 and 2: a sound FIFO's request
Referenced by scIsletsStartWaveDMA().
Definition at line 325 of file definitions.h.
DMA_INTR_ENABLE
#define DMA_INTR_ENABLE 0x4000
an interrupt when it ends
Definition at line 326 of file definitions.h.
DMA_ENABLE
#define DMA_ENABLE 0x8000
arms the channel
Referenced by btEffectArmBg1HBlankDMA(), btEffectArmBg2AffineHBlankDMA(), btEffectArmMeteorBlowPaletteDMA(), btEffectArmPaletteHBlankDMA(), btEffectArmWin0HBlankDMA(), btEffectBuildWindowEdgeTable(), fdEffectStartWindowHBlankDMA(), fdLineScrollArmDMA(), fdLuckyWheelsFinishTick(), fdMindReadStartRipple(), fdScreenTransitionUpdateDissolve(), fdScreenTransitionUpdateScanlineTable(), fdWaitDMA(), fdWorldMapApplyAffinePage(), scAirsRockDriftFog(), scAirsRockLiftFog(), scEasternAlhafraStartWaveDMA(), scGarohWavePathLayer(), scIsletsStartWaveDMA(), scLemuriaStartRippleDMA() and WAVE_SCROLL.
Definition at line 327 of file definitions.h.
DMA_CONTROL_SHIFT
#define DMA_CONTROL_SHIFT 16
Where a DMA channel's control halfword (the DMA_ flags) sits in its 32-bit count word.
Referenced by fdLineScrollArmDMA(), fdWaitDMA() and fdWorldMapApplyAffinePage().
Definition at line 331 of file definitions.h.
DMA_BUSY
#define DMA_BUSY ((Uint32)DMA_ENABLE << 16)
DMA_ENABLE in a channel's 32-bit count and control word, which the hardware
clears once the transfer is done.
Referenced by btEffectRunIris(), gmWaitDMA(), scTitleLoadSprites() and syDMAWait().
Definition at line 334 of file definitions.h.
DMA_START_TIMING_DRQ_REPEAT
#define DMA_START_TIMING_DRQ_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.
Referenced by btEffectArmBg1HBlankDMA(), btEffectArmBg2AffineHBlankDMA(), btEffectArmMeteorBlowPaletteDMA(), btEffectArmPaletteHBlankDMA(), btEffectArmWin0HBlankDMA(), btEffectBuildWindowEdgeTable(), fdEffectStartWindowHBlankDMA(), fdLineScrollArmDMA(), fdLuckyWheelsFinishTick(), fdMindReadStartRipple(), fdScreenTransitionUpdateDissolve(), fdScreenTransitionUpdateScanlineTable(), fdWorldMapApplyAffinePage(), scAirsRockDriftFog(), scAirsRockLiftFog(), scEasternAlhafraStartWaveDMA(), scGarohWavePathLayer(), scLemuriaStartRippleDMA() and WAVE_SCROLL.
Definition at line 337 of file definitions.h.
DMA_COPY_WORDS
#define DMA_COPY_WORDS(n) ((DMA_ENABLE | DMA_32BIT) << 16 | (n))
DMA control words: copy n words or halfwords at once, or one halfword or word each HBlank to a register reloaded every line (a scanline table that drives a window edge, a scroll or an affine register).
Referenced by btAutoBattleBuildActions(), btBackgroundLoad(), btBackgroundShowZoomedPage(), btDMAStopDMA3(), btEffectBuildBlitter(), btEffectRunAttackSlash(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunNereidCopy(), btEffectStepPaletteToResource(), btElementGlowInitStarField(), btElementGlowPlay(), btRenderDrawMeshWireframe(), btRenderDrawTexturedMesh(), btRenderFillMesh(), btTransitionUploadTileVariant(), CopyScrollMap(), fdActorRestore(), fdActorTableSnapshot(), fdBattleEffectShiftRowsDown(), fdBattleEffectStartCanvasSprite(), fdBattleEffectUploadCanvas(), fdHeadingClose(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsFinishTick(), fdLuckyWheelsRun(), fdLuckyWheelsStepSparkColors(), fdLuckyWheelsTransferCanvas(), fdMapCopyPalette(), fdMapScreenDraw(), fdMapScreenDrawColumn(), fdMapScreenDrawRow(), fdPaletteCycleStep(), fdPaletteFadeBuild(), fdPaletteFadeInit(), fdPaletteFadeUpdate(), fdPsynergyDecodePicture(), fdPsynergyParch(), fdPsynergyRing(), fdScreenTransitionFillTilemapAndColorTile(), fdScreenTransitionUpdateDissolve(), fdStartColorTransition(), fdSuperLuckyDiceRun(), fdTilesetAnimationUpdate(), fdWeatherUpdateLightning(), fdWorldMapEndStillImage(), fdWorldMapLoadAreaGraphics() and 88 more.
Definition at line 343 of file definitions.h.
DMA_FILL_WORDS
#define DMA_FILL_WORDS(n) ((DMA_ENABLE | DMA_32BIT | DMA_SRC_FIXED) << 16 | (n))
Fill n words or halfwords with the value at the source, as The Broken Seal's.
Referenced by fdActorCreate(), fdBlendScriptStart(), fdGroundParticlesStart(), mnCreditsInitCrawlSprites(), mnCreditsInitTextSpritesAtPage(), mnSettingsMenuInitState(), syBupInvalidateSector() and syBupWritePart().
Definition at line 345 of file definitions.h.
DMA_FILL_HALFWORDS
#define DMA_FILL_HALFWORDS(n) ((DMA_ENABLE | DMA_SRC_FIXED) << 16 | (n))
Referenced by scSeaOfTimeFacePoseidon().
Definition at line 346 of file definitions.h.
DMA_COPY_HALFWORDS
#define DMA_COPY_HALFWORDS(n) (DMA_ENABLE << 16 | (n))
Referenced by btBackgroundLoad(), btBackgroundSetMode(), btBackgroundSetPaletteLevel(), btEffectRunAtalanta(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunFlora(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunNeptune(), btEffectRunTorch(), btEffectStepPaletteToResource(), btIrisWipeScreen(), btShiftVRAMTiles(), dbIncreaseItemAndLevelSelectItem(), dbShopTestSelectItem(), fdLuckyWheelsStepSparkColors(), fdPaletteCycleAdd(), fdPaletteCycleStep(), fdPaletteFadeBuild(), fdPsynergyUpdateBurst(), mnIconLoadWithPalette(), mnOpenBackdropScreen(), mnPaletteLightenHighlight(), mnPaletteLoadIconsIntoHighlight(), mnPartyStatusDrawBars(), mnSettingsMenuOpen(), mnStatusScreenRun(), mnStatusScreenRunPartyRow(), mnTitlePaletteFadeBuildColors(), mnWindowSystemInitBattle(), scChampaCliffCavesStartFlash(), scEpilogueLoadPortraitFrame(), scInit(), scLohoFireCannon(), scNorthernReachesShatterIceWall(), scStaffCreditPlayLighthouseTransition(), scStaffCreditShowBeacon(), scTrialRoadDrawRaceMap(), scWorldMapLoadTidalWave(), scWorldMapPlayLighthouseTransition(), syPaletteLoadBasicSpriteColors() and syWindowLoadGraphics().
Definition at line 347 of file definitions.h.
DMA_COPY_HALFWORDS_DOWN
#define DMA_COPY_HALFWORDS_DOWN(n)
n halfwords copied from the last back to the first, source and destination stepping down, so that a run can move up over itself.
Referenced by btEffectRunTorch().
Definition at line 350 of file definitions.h.
DMA_HBLANK_HALFWORD_PER_LINE
#define DMA_HBLANK_HALFWORD_PER_LINE
A halfword each HBlank, as for a scroll or a window edge.
Referenced by btBackgroundShowZoomedPage(), btEffectArmMeteorBlowPaletteDMA(), btEffectArmPaletteHBlankDMA(), btEffectArmWin0HBlankDMA(), btEffectBuildWindowEdgeTable(), fdLuckyWheelsFinishTick(), fdMindReadStartRipple(), scAirsRockDriftFog(), scAirsRockLiftFog(), scEasternAlhafraStartWaveDMA(), scGarohWavePathLayer(), scIdejimaApplyWaveLines(), scIsletsStartWaveDMA(), scLemuriaStartRippleDMA(), scSeaOfTimeAnimateSea() and WAVE_SCROLL.
Definition at line 353 of file definitions.h.
DMA_HBLANK_WORDS_PER_LINE
#define DMA_HBLANK_WORDS_PER_LINE(n)
n words each HBlank, as for the affine registers of a background written together.
Definition at line 357 of file definitions.h.
DMA_HBLANK_WORD_PER_LINE
#define DMA_HBLANK_WORD_PER_LINE DMA_HBLANK_WORDS_PER_LINE(1)
A word each HBlank, as for a pair of registers written together.
Referenced by btEffectArmBg1HBlankDMA(), btEffectArmBg2AffineHBlankDMA() and fdEffectStartWindowHBlankDMA().
Definition at line 363 of file definitions.h.
CPU_SET_SRC_FIXED
#define CPU_SET_SRC_FIXED 0x01000000
BIOS CpuSet control flags, above its count.
Definition at line 366 of file definitions.h.
CPU_SET_32BIT
#define CPU_SET_32BIT 0x04000000
Words rather than halfwords.
Definition at line 368 of file definitions.h.
OAM
#define OAM ((void *)0x07000000)
The sprites' attributes.
Referenced by fdLuckyDiceRun(), fdLuckyWheelsFinishTick(), fdSuperLuckyDiceRun(), mnCreditsStopTextSprites(), mnCreditsUpdateCrawlSprites(), mnCreditsUpdateTextSprites(), mnTitleIntroShowLighthouse(), mnTitleIntroUpdateLogo(), mnTitlePlaceLogoPiece() and syVBlankHandler().
Definition at line 371 of file definitions.h.
KEYS_MASK
#define KEYS_MASK 0x3ff
the ten keys' bits; KEYINPUT reads 0 for a held key
Referenced by syVBlankHandler().
Definition at line 393 of file definitions.h.
DPAD_INDEX
#define DPAD_INDEX(keys) (((keys) >> 4) & 15)
The direction pad's four keys (Up, Down, Left, Right) as an index 0 to 15.
Referenced by fdActorCrossRope(), fdActorCrossTightrope(), fdActorFlyOnWorldMap(), fdActorMoveAsSand(), fdActorMoveAsSandOnWorldMap(), fdActorMoveByKeys(), fdActorMoveOnWorldMap(), fdActorSailOnMap(), fdActorSailOnWorldMap(), fdActorUpdateHoverControl(), fdActorUpdatePlayerControl(), fdActorUpdateWalkingControl(), fdInputGetDpadAngle(), fdInputGetDpadAngleEightWay(), fdLeaderSlideOnIce(), fdLeaderStepOffRope(), fdLeaderStepOffTightrope(), fdMapScreenUpdateMarkers(), scLeaderSlideOnIceFromEdge() and scMarsLighthouseTowersPushPipeOrJump().
Definition at line 396 of file definitions.h.
REG_BG0CNT
#define REG_BG0CNT (*(volatile Uint16 *)0x04000008)
BG0's control (BGCNT_).
Referenced by btTransitionRun(), btTransitionRunMosaicFadeOut(), fdPsynergyEndRing(), fdPsynergyRing(), mnTitleIntroShowBookTwoCard(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scAirsRockWhirlwindOpensTheTop(), scJupiterLighthouseFlashSky(), scShamanVillageBlowAwaySand(), scWorldMapLoadTidalWave() and syPrintClear().
Definition at line 399 of file definitions.h.
REG_BG0VOFS
#define REG_BG0VOFS (*(volatile Uint16 *)0x04000012)
BG0's vertical scroll.
Referenced by btClearBg0Vofs(), btTransitionResetBg0Scroll() and mnGraphicsInstallBg1VCountHandler().
Definition at line 401 of file definitions.h.
REG_SOUNDCNT_H
#define REG_SOUNDCNT_H (*(volatile Uint16 *)0x04000082)
Direct sound's mixing: volumes, speakers, timers and FIFO resets.
Definition at line 404 of file definitions.h.
SOUND_CGB_MIX_FULL
#define SOUND_CGB_MIX_FULL 0x0002
SOUNDCNT_H flags: the mixing volumes.
sounds 1 to 4 at full volume
Definition at line 407 of file definitions.h.
SOUND_A_MIX_FULL
#define SOUND_A_MIX_FULL 0x0004
direct sound A at full, not half
Definition at line 408 of file definitions.h.
SOUND_B_MIX_FULL
#define SOUND_B_MIX_FULL 0x0008
direct sound B at full, not half
Definition at line 409 of file definitions.h.
SOUND_ALL_MIX_FULL
#define SOUND_ALL_MIX_FULL
Sounds 1 to 4 and both direct sound channels all at full volume.
Definition at line 412 of file definitions.h.
SOUND_A_RIGHT_OUTPUT
#define SOUND_A_RIGHT_OUTPUT 0x0100
Direct sound A and B speakers, timer and FIFO reset.
A to the right speaker
Definition at line 416 of file definitions.h.
SOUND_A_LEFT_OUTPUT
#define SOUND_A_LEFT_OUTPUT 0x0200
A to the left speaker
Definition at line 417 of file definitions.h.
SOUND_A_TIMER_0
#define SOUND_A_TIMER_0 0x0000
A plays at timer 0's rate
Definition at line 418 of file definitions.h.
SOUND_A_FIFO_RESET
#define SOUND_A_FIFO_RESET 0x0800
empties A's FIFO
Definition at line 419 of file definitions.h.
SOUND_B_RIGHT_OUTPUT
#define SOUND_B_RIGHT_OUTPUT 0x1000
B to the right speaker
Definition at line 420 of file definitions.h.
SOUND_B_LEFT_OUTPUT
#define SOUND_B_LEFT_OUTPUT 0x2000
B to the left speaker
Definition at line 421 of file definitions.h.
SOUND_B_TIMER_0
#define SOUND_B_TIMER_0 0x0000
B plays at timer 0's rate
Definition at line 422 of file definitions.h.
SOUND_B_FIFO_RESET
#define SOUND_B_FIFO_RESET 0x8000
empties B's FIFO
Definition at line 423 of file definitions.h.
REG_SOUNDBIAS
#define REG_SOUNDBIAS (*(volatile Uint16 *)0x04000088)
Sound output bias and direct sound FIFOs.
output bias, rate
Definition at line 426 of file definitions.h.
REG_FIFO_A
#define REG_FIFO_A (*(volatile Uint32 *)0x040000a0)
A's samples, 4 a write
Definition at line 427 of file definitions.h.
REG_FIFO_B
#define REG_FIFO_B (*(volatile Uint32 *)0x040000a4)
B's samples, 4 a write
Definition at line 428 of file definitions.h.
REG_DMA0SAD
#define REG_DMA0SAD (*(volatile Uint32 *)0x040000b0)
The four DMA channels: source, destination, then the count with the control
halfword (CNT_H, the DMA_ flags) above it.
channel 0: source
Referenced by btBackgroundShowZoomedPage().
Definition at line 432 of file definitions.h.
REG_DMA0DAD
#define REG_DMA0DAD (*(volatile Uint32 *)0x040000b4)
channel 0: destination
Definition at line 433 of file definitions.h.
REG_DMA0CNT
#define REG_DMA0CNT
Definition at line 434 of file definitions.h.
REG_DMA0CNT_H
#define REG_DMA0CNT_H (*(volatile Uint16 *)0x040000ba)
channel 0: control
Definition at line 437 of file definitions.h.
REG_DMA1SAD
#define REG_DMA1SAD (*(volatile Uint32 *)0x040000bc)
channel 1: source
Referenced by sySoundSetFixedSampleFrequency().
Definition at line 438 of file definitions.h.
REG_DMA1DAD
#define REG_DMA1DAD (*(volatile Uint32 *)0x040000c0)
channel 1: destination
Definition at line 439 of file definitions.h.
REG_DMA1CNT
#define REG_DMA1CNT
Definition at line 440 of file definitions.h.
REG_DMA1CNT_H
#define REG_DMA1CNT_H (*(volatile Uint16 *)0x040000c6)
channel 1: control
Definition at line 443 of file definitions.h.
REG_DMA2SAD
#define REG_DMA2SAD (*(volatile Uint32 *)0x040000c8)
channel 2: source
Referenced by sySoundSetFixedSampleFrequency().
Definition at line 444 of file definitions.h.
REG_DMA2DAD
#define REG_DMA2DAD (*(volatile Uint32 *)0x040000cc)
channel 2: destination
Definition at line 445 of file definitions.h.
REG_DMA2CNT
#define REG_DMA2CNT
Definition at line 446 of file definitions.h.
REG_DMA2CNT_H
#define REG_DMA2CNT_H (*(volatile Uint16 *)0x040000d2)
channel 2: control
Definition at line 449 of file definitions.h.
REG_DMA3SAD
#define REG_DMA3SAD (*(volatile Uint32 *)0x040000d4)
channel 3: source
Referenced by fdLineScrollInitWave().
Definition at line 450 of file definitions.h.
REG_DMA3DAD
#define REG_DMA3DAD (*(volatile Uint32 *)0x040000d8)
channel 3: destination
Definition at line 451 of file definitions.h.
REG_DMA3CNT
#define REG_DMA3CNT
Definition at line 452 of file definitions.h.
REG_DMA3CNT_H
#define REG_DMA3CNT_H (*(volatile Uint16 *)0x040000de)
channel 3: control
Definition at line 455 of file definitions.h.
REG_TM0CNT_L
#define REG_TM0CNT_L (*(volatile Uint16 *)0x04000100)
Timers 0 to 2: CNT_L is the reload value, and reads back the count; CNT_H
takes the TIMER_ flags.
timer 0: reload
Referenced by sySoundSetFixedSampleFrequency().
Definition at line 459 of file definitions.h.
REG_TM0CNT_H
#define REG_TM0CNT_H (*(volatile Uint16 *)0x04000102)
timer 0: control
Referenced by sySoundSetFixedSampleFrequency().
Definition at line 460 of file definitions.h.
REG_TM1CNT_L
#define REG_TM1CNT_L (*(volatile Uint16 *)0x04000104)
timer 1: reload
Definition at line 461 of file definitions.h.
REG_TM1CNT_H
#define REG_TM1CNT_H (*(volatile Uint16 *)0x04000106)
timer 1: control
Definition at line 462 of file definitions.h.
REG_TM2CNT_L
#define REG_TM2CNT_L (*(volatile Uint16 *)0x04000108)
timer 2: reload
Definition at line 463 of file definitions.h.
REG_TM2CNT_H
#define REG_TM2CNT_H (*(volatile Uint16 *)0x0400010a)
timer 2: control
Definition at line 464 of file definitions.h.
REG_IE
#define REG_IE (*(volatile Uint16 *)0x04000200)
Interrupts and cartridge wait states.
the interrupts enabled
Referenced by mnSaveDeletePartMasked(), mnSaveWritePartMasked(), syInstallIWRAMAndIRQs(), syIntFunction(), sySerialDisableTransfer(), sySerialInit() and sySerialStartClocking().
Definition at line 467 of file definitions.h.
REG_IF
#define REG_IF (*(volatile Uint16 *)0x04000202)
pending; a 1 written clears
Referenced by sySerialDisableTransfer(), sySerialInit() and sySerialStartClocking().
Definition at line 468 of file definitions.h.
REG_WAITCNT
#define REG_WAITCNT (*(volatile Uint16 *)0x04000204)
cartridge wait states
Referenced by syInit().
Definition at line 469 of file definitions.h.
WAITCNT_SRAM_SLOWEST
#define WAITCNT_SRAM_SLOWEST 0x0003
WAITCNT's slowest SRAM wait (bits 1 and 0), 8 cycles: the wait the SDK's flash functions read the chip with; programming and erasing use the chip's wait[0], then restore it.
Definition at line 474 of file definitions.h.
WAITCNT_SRAM_MASK
#define WAITCNT_SRAM_MASK 0x0003
WAITCNT's SRAM wait bits.
Definition at line 476 of file definitions.h.
REG_IME
#define REG_IME (*(volatile Uint16 *)0x04000208)
All interrupts' master switch.
Referenced by btElementGlowPlay(), syInstallIWRAMAndIRQs(), syIRQLock(), syIRQUnlock(), sySerialCollectReceivedPayloads(), sySerialDisableTransfer(), sySerialInit(), sySerialStartClocking() and syWaitForVBlankInterrupt().
Definition at line 478 of file definitions.h.
KEYCNT_SOFT_RESET
#define KEYCNT_SOFT_RESET 0xc00f
KEYCNT values: the interrupt fires when all the listed keys are held at once.
A, B, Select and Start.
Referenced by syInit() and sySynch().
Definition at line 481 of file definitions.h.
KEYCNT_SLEEP_WAKE
#define KEYCNT_SLEEP_WAKE 0xc304
L, R and Select, which wake the sleep.
Referenced by sySynch().
Definition at line 482 of file definitions.h.
WAITCNT_GAME
#define WAITCNT_GAME 0x4014
ROM wait states 3 and 1 with the prefetch buffer on, SRAM at 4; written by the power-on set-up.
Referenced by syInit().
Definition at line 486 of file definitions.h.
DISPSTAT_VBLANK_INTR
#define DISPSTAT_VBLANK_INTR 0x0008
At the start of each VBlank.
Referenced by syIntFunction().
Definition at line 491 of file definitions.h.
DISPSTAT_HBLANK_INTR
#define DISPSTAT_HBLANK_INTR 0x0010
At the end of each line.
Definition at line 493 of file definitions.h.
DISPSTAT_VCOUNT_INTR
#define DISPSTAT_VCOUNT_INTR 0x0020
On the DISPSTAT_VCOUNT_LINE line.
Definition at line 495 of file definitions.h.
DISPSTAT_VCOUNT_LINE
#define DISPSTAT_VCOUNT_LINE(line) ((line) << 8)
DISPSTAT's high byte: the line the VCount interrupt fires on (the LYC compare).
Referenced by syIntFunction().
Definition at line 498 of file definitions.h.
DISPLAY_WIDTH
#define DISPLAY_WIDTH 240
The screen's size in pixels.
Referenced by btEffectBuildWindowEdgeTable(), btEffectRunCards(), btEffectRunCharon(), btEffectRunGeode(), btEffectRunHaures(), btEffectRunKirin(), btEffectRunNeptune(), btEffectRunRamses(), btEffectRunVengeance(), btElementGlowPlay(), btStagingRunAttack(), btTransitionRun(), fdEffectSpriteDraw(), fdEffectUpdateSparkles(), fdGroundParticlesDraw(), fdGroundParticlesUpdate(), fdHangingVineDraw(), fdHeadingShow(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdLuckyWheelsUpdate(), fdMapGridUpdateLayerScroll(), fdMapScreenDraw(), fdMapScreenInit(), fdMapScreenUpdateMarkers(), fdMapScreenUpdateScroll(), fdMotesUpdate(), fdPlaceAtEntrance(), fdPlaceAtEntranceRow(), fdRenderApplyProjectedPlacement(), fdRenderApplyProjectedPlacementAtDepth(), fdRenderPlaceProjectedSprite(), fdRisingParticlesUpdate(), fdRopeDraw(), fdScreenTransitionUpdateScanlineTable(), fdSuperLuckyDiceRun(), fdTightropeDraw(), fdViewMoveStart(), fdWeatherUpdateRain(), fdWorldMapInitPerspective(), fdWorldMapUpdateView(), mnWindowSpriteUpdateAll(), scClearLoadBackground() and scWhirlwindUpdate().
Definition at line 500 of file definitions.h.
DISPLAY_HEIGHT
#define DISPLAY_HEIGHT 160
Referenced by AirsRockWaveLines, btCameraSetRange(), btEffectBuildWindowEdgeTable(), btEffectRunAzul(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCharon(), btEffectRunCondemn(), btEffectRunFlurry(), btEffectRunGatheringLights(), btEffectRunHaunt(), btEffectRunMeteorBlow(), btEffectRunStarfieldFall(), btEffectRunStreakVolley(), btEffectRunTargetMotes(), btEffectRunTorch(), btEffectRunUnusedOrbitingSpirals(), EasternAlhafraWaveLines, fdEffectSpriteDraw(), fdEffectStartWindowHBlankDMA(), fdEffectUpdateSparkles(), fdGroundParticlesDraw(), fdGroundParticlesUpdate(), fdHangingVineDraw(), fdLineScrollBuildPage(), fdLuckyDiceRun(), fdLuckyWheelsRun(), fdLuckyWheelsSetUpBetting(), fdMapGridRenderMetatileTilesColumn(), fdMapGridSetCameraCenter(), fdMapGridUpdateLayerScroll(), fdMapScreenDraw(), fdMapScreenInit(), fdMapScreenUpdateScroll(), fdMotesUpdate(), fdPlaceAtEntrance(), fdPlaceAtEntranceRow(), fdPsynergyUpdateMindReadWave(), fdRenderApplyProjectedPlacement(), fdRenderApplyProjectedPlacementAtDepth(), fdRenderPlaceProjectedSprite(), fdRisingParticlesUpdate(), fdRopeDraw(), fdScreenTransitionFinish(), fdScreenTransitionStart(), fdScreenTransitionUpdate(), fdScreenTransitionUpdateFromCenter(), fdScreenTransitionUpdateScanline(), fdScreenTransitionUpdateScanlineTable(), fdSuperLuckyDiceRun() and 31 more.
Definition at line 501 of file definitions.h.
DISPLAY_TILE_WIDTH
#define DISPLAY_TILE_WIDTH (DISPLAY_WIDTH / 8)
The screen's size in 8-pixel tiles.
Referenced by fdBgMapDrawClipped16x16(), fdLuckyWheelsRun(), fdMessageShowAtActor(), fdSuperLuckyDiceRun(), mnAreaNameWindowShow(), mnBattleCommandRowRun(), mnBattleTargetRunSelection(), mnFieldMessageShow(), mnFieldMessageShowCentered(), mnFileListFillHighlight(), mnIconMenuCenter(), mnPartyStatusBuildLayoutBounds(), mnScanlineWindowBuildSpans(), mnTitleIntroScrollLighthouse(), mnTitleIntroShowLighthouse(), mnTitleShowPublisherLogo(), mnTitleShowTitleScreen(), mnWindowDrawBorder(), mnWindowDrawFlashBorder(), mnWindowEraseBorderRect(), mnWindowFitOnScreen(), mnWindowHighlightRect(), mnWindowMapTextCanvasTiles(), mnWindowMarkVisibleTextTiles(), mnWindowSetHighlightRect(), mnWindowSetRectPalette(), mnWindowSetTextTileBitRect(), mnWindowSetTextTileRect(), scClearLoadBackground() and scEpilogueShowLine().
Definition at line 503 of file definitions.h.
DISPLAY_TILE_HEIGHT
#define DISPLAY_TILE_HEIGHT (DISPLAY_HEIGHT / 8)
Referenced by fdBgMapDrawClipped16x16(), fdLuckyWheelsRun(), fdMessageShowAtActor(), fdScreenTransitionFillTilemapAndColorTile(), fdSuperLuckyDiceRun(), mnFileListFillHighlight(), mnPauseMenuOpen(), mnScanlineWindowBuildSpans(), mnTextDrawMessageAsTiles(), mnTextDrawPrefixedNumberAtOffset(), mnTextDrawStringAtOffset(), mnTextDrawWideStringAsTiles(), mnTitleIntroShowBookTwoCard(), mnTitleIntroShowLighthouse(), mnTitleIntroShowPresentsCard(), mnTitleShowPublisherLogo(), mnTitleShowTitleScreen(), mnWindowEraseBorderRect(), mnWindowFitOnScreen(), mnWindowHighlightRect(), mnWindowMarkVisibleTextTiles(), mnWindowPutGlyph(), mnWindowSetHighlightRect(), mnWindowSetRectPalette(), mnWindowSetTextTileBitRect(), mnWindowSetTextTileRect(), scClearLoadBackground() and scShamanVillageBlowAwaySand().
Definition at line 504 of file definitions.h.
RGB_RED
#define RGB_RED(color) ((color) & 0x1f)
A 15-bit colour's red, green and blue levels, 0 to 31 each.
Referenced by btBackgroundSetMode(), btEffectConvertBackgroundToBlueRamp(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunFallingSword(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunShatteringOpening(), btEffectRunZagan(), btEffectStepPaletteToResource(), btPaletteBrightenBattleBg(), btPaletteBrightenBgEntries(), btPaletteBrightenSavedBattleBg(), btPaletteCopyWithBrightnessOffset(), fdLuckyWheelsDarkenStep(), fdLuckyWheelsStepSparkColors(), fdPaletteEditorRun(), fdPaletteFadeBuild(), fdSuperLuckyDiceBrightenColors(), fdSuperLuckyDiceRun(), mnCreditsLoadBackground(), mnDjinnMenuAdjustPalettes(), mnPaletteLightenHighlight(), mnTitlePaletteFadeBuildColors(), scChampaCliffCavesFadeColors(), scInit(), scIsletCaveDarkenPalette(), scKibomboFlickerColor(), scKibomboFlickerRedColor(), scMtAlephSummitPulseColors(), scMtAlephSummitShiftColors(), scMtAlephSummitStepColorsToward(), scSeaOfTimeAnimateSea() and scStaffCreditStepPaletteColors().
Definition at line 506 of file definitions.h.
RGB_GREEN
#define RGB_GREEN(color) (((color) >> RGB_GREEN_SHIFT) & 0x1f)
Referenced by btBackgroundSetMode(), btEffectConvertBackgroundToBlueRamp(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunFallingSword(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunOdyssey(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunUlysses(), btEffectRunZagan(), btEffectStepPaletteToResource(), btIrisChangeBackdrop(), btPaletteBrightenBattleBg(), btPaletteBrightenBgEntries(), btPaletteBrightenSavedBattleBg(), btPaletteCopyWithBrightnessOffset(), fdLuckyWheelsDarkenStep(), fdLuckyWheelsStepSparkColors(), fdPaletteEditorRun(), fdPaletteFadeBuild(), fdSuperLuckyDiceBrightenColors(), mnCreditsLoadBackground(), mnDjinnMenuAdjustPalettes(), mnPaletteLightenHighlight(), mnTitlePaletteFadeBuildColors(), scChampaCliffCavesFadeColors(), scInit(), scIsletCaveDarkenPalette(), scKibomboFlickerColor(), scKibomboFlickerRedColor(), scMtAlephSummitPulseColors(), scMtAlephSummitShiftColors(), scMtAlephSummitStepColorsToward(), scSeaOfTimeAnimateSea() and scStaffCreditStepPaletteColors().
Definition at line 507 of file definitions.h.
RGB_BLUE
#define RGB_BLUE(color) (((color) >> RGB_BLUE_SHIFT) & 0x1f)
Referenced by btBackgroundSetMode(), btEffectConvertBackgroundToBlueRamp(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunFallingSword(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunOdyssey(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunUlysses(), btEffectRunZagan(), btEffectStepPaletteToResource(), btIrisChangeBackdrop(), btPaletteBrightenBattleBg(), btPaletteBrightenBgEntries(), btPaletteBrightenSavedBattleBg(), btPaletteCopyWithBrightnessOffset(), fdLuckyWheelsDarkenStep(), fdLuckyWheelsStepSparkColors(), fdPaletteEditorRun(), fdPaletteFadeBuild(), fdSuperLuckyDiceBrightenColors(), fdSuperLuckyDiceRun(), mnCreditsLoadBackground(), mnDjinnMenuAdjustPalettes(), mnTitlePaletteFadeBuildColors(), scChampaCliffCavesFadeColors(), scInit(), scIsletCaveDarkenPalette(), scKibomboFlickerColor(), scKibomboFlickerRedColor(), scMtAlephSummitPulseColors(), scMtAlephSummitShiftColors(), scMtAlephSummitStepColorsToward(), scSeaOfTimeAnimateSea() and scStaffCreditStepPaletteColors().
Definition at line 508 of file definitions.h.
RGB_LEVEL_MAX
#define RGB_LEVEL_MAX 31
A colour channel's brightest level.
Referenced by btEffectConvertBackgroundToBlueRamp(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunEclipse(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunHaures(), btEffectRunHeavyBlow(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunMeteorBlow(), btEffectRunOdyssey(), btEffectRunRisingDragonEnemy(), btEffectRunShatteringOpening(), btEffectRunStarfieldFall(), btEffectRunUlysses(), btEffectUpdatePhasePalette(), btIrisChangeBackdrop(), btPaletteBrightenBattleBg(), btPaletteBrightenBgEntries(), btPaletteBrightenSavedBattleBg(), btPaletteCopyWithBrightnessOffset(), fdEffectHueChannelRamp(), fdHoverGlowGetColor(), fdMindReadAdvanceTint(), fdPaletteEditorRun(), fdPaletteFadeBuild(), fdPaletteFadeClampComponent(), fdPaletteFadeClampShiftedComponent(), fdPsynergyArrow(), fdPsynergyCyclone(), fdPsynergyParch(), fdPsynergyUpdateBurst(), fdPsynergyUpdatePound(), fdStartEncounterTransition(), fdSuperLuckyDiceBrightenColors(), fdSuperLuckyDiceRun(), mnColorScaleComponents(), mnDjinnMenuAdjustPalettes(), mnPaletteLightenHighlight(), mnTitlePaletteFadeClampChannel(), mnTitlePaletteFadeClampShiftedChannel(), mnWindowColorApply() and 8 more.
Definition at line 510 of file definitions.h.
RGB_WHITE
#define RGB_WHITE RGB(RGB_LEVEL_MAX, RGB_LEVEL_MAX, RGB_LEVEL_MAX)
The brightest colour, every channel at its highest level.
Referenced by btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCruelRuin(), btEffectRunFlora(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunShatteringOpening(), btEffectRunZagan(), fdPaletteEditorRun(), fdPsynergyParch(), fdPsynergyRestoreMindReadPalette(), fdStartEncounterTransition(), mnTitleIntroScrollClouds(), mnTitleIntroScrollLighthouse(), mnTitleIntroShowLighthouse(), scAirsRockInsideShebaLearnsReveal(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindOpensTheTop(), scAnemosInnerSanctumLightSymbol(), scAquaRockDouseSummitWaterStone(), scAquaRockDouseWaterStone(), scAquaRockInsidePiersLearnsParch(), scGabombaStatueChamberGabombaNamesWitchDoctor(), scGabombaStatueChamberStatueSpeaks(), scGabombaStatueHearTheOffering(), scGabombaStatueWatchTheChargesStick(), scGaiaRockInsideFelixLearnsSand(), scGarohInitVillage(), scInit(), scJupiterLighthouseCastTheJupiterStar(), scJupiterLighthouseFlashSky(), scJupiterLighthouseRaiseBeaconLight(), scKibomboStatueFlashes(), scMagmaRockInsideLearnBlaze(), scMarsLighthouseAerieFaceDoomDragon(), scMarsLighthouseHallHearDragonStatue(), scMarsLighthouseHallLightFlame(), scMarsLighthouseHallReadEarthInscription(), scMarsLighthouseHallReadFireInscription(), scMarsLighthouseHallReadWaterInscription(), scMarsLighthouseHallReadWindInscription(), scMarsLighthouseStarRoomBurstIce(), scMarsLighthouseStarRoomTakeMarsStar(), scMarsLighthouseStarRoomUseMarsStar(), scNorthernReachesShatterIceWall(), scTundariaTowerRefluxAppears(), scWorldMapLoadTidalWave() and 3 more.
Definition at line 512 of file definitions.h.
RED_BITS
#define RED_BITS RGB(RGB_LEVEL_MAX, 0, 0)
A 15-bit colour's red, green and blue bits.
Referenced by btColorBufferScaleArm(), fdPaletteFadeBuild(), fdPaletteFadePackTarget(), fdPaletteFadeUpdate(), mnTitlePaletteFadeBuildColors() and mnTitlePaletteFadeUpdate().
Definition at line 514 of file definitions.h.
GREEN_BITS
#define GREEN_BITS RGB(0, RGB_LEVEL_MAX, 0)
Referenced by btColorBufferScaleArm(), fdPaletteFadeBuild(), fdPaletteFadePackTarget(), fdPaletteFadeUpdate(), mnTitlePaletteFadeBuildColors() and mnTitlePaletteFadeUpdate().
Definition at line 515 of file definitions.h.
BLUE_BITS
#define BLUE_BITS RGB(0, 0, RGB_LEVEL_MAX)
Referenced by btColorBufferScaleArm(), fdPaletteFadeBuild(), fdPaletteFadePackTarget(), fdPaletteFadeUpdate(), mnTitlePaletteFadeBuildColors() and mnTitlePaletteFadeUpdate().
Definition at line 516 of file definitions.h.
VRAM
#define VRAM 0x06000000
Video RAM: background tiles and maps, then sprite tiles.
Referenced by fdMapScreenDraw(), fdMapScreenDrawColumn(), fdMapScreenDrawRow(), scStaffCreditShowBeacon() and scWorldMapLoadTidalWave().
Definition at line 518 of file definitions.h.
BG_CHAR_SIZE
#define BG_CHAR_SIZE 16384
Bytes in a character block, 16 KB.
Referenced by btEffectRunQuake(), btElementGlowEnd(), btElementGlowPlay(), btElementGlowUploadStarField(), fdMapGridLoadMap(), mnDjinnMenuDrawStatPreview(), mnDjinnMenuRunPreview() and mnTitleShowCamelotLogo().
Definition at line 520 of file definitions.h.
BG_SCREEN_SIZE
#define BG_SCREEN_SIZE 2048
Bytes in a screen block, 2 KB.
Referenced by btBackgroundLoad(), fdHeadingClose(), fdHeadingShow(), fdLuckyWheelsRun(), mnTitleShowCamelotLogo(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue(), scAirsRockWhirlwindOpensTheTop() and scJupiterLighthouseFlashSky().
Definition at line 522 of file definitions.h.
BG_SCREEN_WIDTH
#define BG_SCREEN_WIDTH 32
Tiles in a row of a screen block, whose map is 32 tiles square.
Referenced by btBackgroundLoad(), btEffectBuildRepeatingTilemap(), btEffectSetupCanvasTileMap(), btTransitionDrawRows(), btTransitionRun(), fdBgMapDrawClipped16x16(), fdHeadingShow(), fdLuckyWheelsRun(), fdMapGridRenderMetatileTilesColumn(), fdMapGridRenderMetatileTilesRow(), fdMapGridSetCameraCenter(), fdMapScreenDraw(), fdMapScreenDrawColumn(), fdMapScreenDrawRow(), fdMapScreenShow(), fdPaletteEditorRun(), fdScreenTransitionFillTilemapAndColorTile(), fdSuperLuckyDiceRun(), fdWorldMapLoadGraphics(), mnBattleCommandRowRun(), mnBgScreenFillRect(), mnFileListFillHighlight(), mnPartyStatusDrawBars(), mnSaveProgressAdvance(), mnScanlineWindowBuildSpans(), mnTextDrawMessageAsTiles(), mnTextDrawPrefixedNumberAtOffset(), mnTextDrawStringAtOffset(), mnTextDrawWideStringAsTiles(), mnTitleIntroScrollClouds(), mnTitleIntroScrollLighthouse(), mnTitleIntroShowBookTwoCard(), mnTitleIntroShowLighthouse(), mnTitleIntroShowPresentsCard(), mnWindowClearInteriorTiles(), mnWindowClearTextTilesInRect(), mnWindowCopyTilemapRegion(), mnWindowDrawBorder(), mnWindowDrawDividerLine(), mnWindowDrawFlashBorder(), mnWindowEraseBorderRect(), mnWindowMapTextCanvasTiles(), mnWindowMarkVisibleTextTiles(), mnWindowPutGlyph(), scAirsRockWhirlwindClearsFog(), scAirsRockWhirlwindClearsWall(), scClearFillTileGrid(), scClearFillTileGridInOrder(), scJupiterLighthouseFlashSky(), scShamanVillageBlowAwaySand() and 2 more.
Definition at line 524 of file definitions.h.
MAP_ROW_BYTES
#define MAP_ROW_BYTES (BG_SCREEN_WIDTH * 2)
The bytes of one row of a text background map, 32 entries.
Referenced by btEffectBuildCanvasTilemap(), btEffectRunUlysses(), btEffectSetupCanvasTileMap(), btTransitionBuildFlatTilemap(), scAirsRockInsideWakeEntranceStatue(), scAirsRockInsideWakeHallStatue() and scAirsRockWhirlwindOpensTheTop().
Definition at line 526 of file definitions.h.
MAP_ROW_WORDS
#define MAP_ROW_WORDS (MAP_ROW_BYTES / 4)
The words of the same row, two entries a word.
Referenced by btEffectBuildCanvasTilemap(), btEffectRunUlysses() and btTransitionBuildFlatTilemap().
Definition at line 528 of file definitions.h.
TILE_PAIR
#define TILE_PAIR(n) ((Uint32)((n) + 1) << 16 | (n))
Two screen entries in a word, tiles n and n + 1 side by side, for numbering a
map's tiles two at a time; adding TILE_PAIR_STEP moves both on by two.
Referenced by btTransitionBuildFlatTilemap(), fdMapScreenShow() and fdWorldMapLoadGraphics().
Definition at line 531 of file definitions.h.
TILE_PAIR_STEP
#define TILE_PAIR_STEP ((Uint32)2 << 16 | 2)
Referenced by btTransitionBuildFlatTilemap(), fdMapScreenShow() and fdWorldMapLoadGraphics().
Definition at line 532 of file definitions.h.
BG_TILE_PALETTE
#define BG_TILE_PALETTE(n) ((n) << 12)
A screen block entry's 16-colour palette, in its top four bits.
Referenced by fdLuckyWheelsRun(), fdPaletteEditorRun(), fdScreenTransitionFillTilemapAndColorTile(), mnDjinnMenuRunPreview(), mnDjinnMenuShowMemberStatus(), mnFileListFillHighlight(), mnTextDrawStringAsTiles(), mnTitleIntroScrollClouds(), mnTitleIntroShowBookTwoCard(), mnTitleIntroShowPresentsCard(), mnWindowHighlightRect(), mnWindowSetHighlightRect(), mnWindowSetRectPalette(), mnWindowSetTextTileBitRect(), mnWindowSetTextTileRect(), mnWindowSetTilemapEntry(), scShamanVillageBlowAwaySand(), scStaffCreditShowBeacon(), syPrint() and sySerialTestRun().
Definition at line 534 of file definitions.h.
BG_TILE_PALETTE_OF
#define BG_TILE_PALETTE_OF(entry) (((entry) >> 12) & 0xf)
The palette a map entry draws its tile with, 0 to 15.
Referenced by mnWindowSetRectPalette().
Definition at line 536 of file definitions.h.
PIXELS_4BPP
#define PIXELS_4BPP(color) ((color) * 0x11111111u)
A word of eight 4-bit pixels, all colour color: one row of a 16-colour
tile.
Referenced by btTransitionRun(), fdEffectStartFadeOverlay(), mnCreditsInitCrawlSprites(), mnCreditsInitTextSpritesAtPage(), mnEndingImageInitStrips(), mnItemMenuRun(), mnOpenBackdropScreen(), mnPartyStatusDrawBars(), mnPsynergyMenuRun(), scAnkohlRuinsInitSand(), scCrackedTileFind() and scMarsLighthouseEntranceStartHoleMask().
Definition at line 539 of file definitions.h.
PIXELS_8BPP
#define PIXELS_8BPP(color) ((color) * 0x01010101)
A word of four 8-bit pixels, all colour color.
Referenced by btEffectRunHaures(), fdFadeOverlayFillTiles(), mnCreditsClearBuffer(), mnCreditsLoadBackground(), mnEndingImageShow(), mnTextDrawStringAsTiles() and scStaffCreditDrawGlowRings().
Definition at line 541 of file definitions.h.
SIO_MULTI_SI
#define SIO_MULTI_SI 0x0004
Multiplayer: this console's SI pin, clear on the parent.
Referenced by sySerialPollAndTransfer() and sySerialPollStatus().
Definition at line 543 of file definitions.h.
SIO_MULTI_SD
#define SIO_MULTI_SD 0x0008
Multiplayer: every console is ready.
Referenced by sySerialPollAndTransfer() and sySerialPollStatus().
Definition at line 545 of file definitions.h.
SIO_ID
#define SIO_ID 0x0030
Multiplayer: this console's id, 0 the parent.
Referenced by sySerialPollAndTransfer().
Definition at line 547 of file definitions.h.
SIO_ID_SHIFT
#define SIO_ID_SHIFT 4
SIO_ID's lowest bit.
Definition at line 549 of file definitions.h.
SIO_ID_OF
#define SIO_ID_OF(control) (((control) << 26) >> 30)
The multiplayer id (SIO_ID) in a SIOCNT value, taken out by shifts.
Referenced by btCameraUpdate(), btRun(), scClearReceiveByLink(), scLinkLobbyPeerSlotMatches(), sySerialGetLinkStatus(), sySerialStepBlockTransfer() and sySerialWaitForStatusMask().
Definition at line 551 of file definitions.h.
SIO_ERROR
#define SIO_ERROR 0x0040
Multiplayer: the last transfer failed.
Definition at line 553 of file definitions.h.
SIO_ERROR_OF
#define SIO_ERROR_OF(control) (((control) << 25) >> 31)
The SIO_ERROR bit of a SIOCNT value, taken out by shifts as SIO_ID_OF takes
the id.
Referenced by sySerialHandleTransferInterrupt().
Definition at line 556 of file definitions.h.
OAM_SIZE
#define OAM_SIZE 1024
OAM's size in bytes: 128 sprites of 8 bytes.
Referenced by fdLuckyDiceRun(), fdLuckyWheelsUpdate(), fdSuperLuckyDiceRun(), mnCreditsStopTextSprites(), mnCreditsUpdateCrawlSprites(), mnCreditsUpdateTextSprites(), mnTitleIntroShowLighthouse(), mnTitleIntroUpdateLogo(), syInit() and sySynch().
Definition at line 558 of file definitions.h.
OBJ_SIZE_8X8
#define OBJ_SIZE_8X8 0x00000000
A sprite's attributes 0 and 1 as one word, attr0 | attr1 << 16, the way functions that build their own sprite lists write them; x, 0 to 511, is shifted into the high half and y, 0 to 255, is the low byte.
Referenced by fdPsynergyBurst(), fdSpriteCreate() and scJupiterLighthouseStartBeam().
Definition at line 598 of file definitions.h.
OBJ_SIZE_16X16
#define OBJ_SIZE_16X16 0x40000000
Referenced by btEffectRunFlora(), btEffectRunIris(), btGeyserDraw(), btMessageWaitForAdvanceAt(), dbPsynergyTest2StartRocks(), fdBlankOverlayDrawMarks(), fdEffectInitSparkles(), fdFadeOverlayDrawMarks(), fdGroundParticlesStart(), fdHangingVineDraw(), fdLuckyDiceRun(), fdLuckyWheelsUpdate(), fdMapScreenInit(), fdMotesStart(), fdPsynergyArrow(), fdPsynergyBlaze(), fdPsynergyBurst(), fdPsynergyGrindOnTarget(), fdPsynergyParch(), fdPsynergyPound(), fdPsynergyRing(), fdPsynergyScoop(), fdRisingParticlesStart(), fdSandSpawnGrain(), fdSpriteCreate(), fdSummonTabletPlayRunes(), fdSuperLuckyDiceDrawNumber(), fdSuperLuckyDiceRun(), fdWeatherStartRain(), mnBattleCollectPartyCommands(), mnBattleDjinnMenuShowChangePreview(), mnBattleItemMenuRun(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun(), mnBattleTargetRunSelection(), scAlhafranCaveSetUpJail(), scAnkohlRuinsDrawSand(), scApojiiIslandsDrawMetatileMarkers(), scAquaRockInsideDrawPillars(), scAquaRockInsideDrawSplashes(), scChampaCliffCavesStartFlash(), scEasternAlhafraStartFallingRocks(), scGabombaStatueDrawRaisedBlocks(), scInit(), scLightSpritesDraw(), scLohoFireCannon(), scMagmaRockInsideStartFallingRocks(), scMagmaRockStartFallingRocks(), scNorthernReachesShatterIceWall() and 6 more.
Definition at line 599 of file definitions.h.
OBJ_SIZE_32X32
#define OBJ_SIZE_32X32 0x80000000
Referenced by btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunNeptune(), fdLuckyDiceRun(), fdLuckyWheelsUpdate(), fdPsynergyArrow(), fdPsynergyBlaze(), fdPsynergyHover(), fdPsynergyScoop(), fdPsynergyStartSceneSprite(), fdSandInitLeaderSprite(), fdSpriteCreate(), fdSuperLuckyDiceDrawLargeNumber(), fdSuperLuckyDiceRun(), mnBattleCollectPartyCommands(), mnBattleCommandRowLoadIcon(), mnBattleStatusScreenRun(), mnDjinnShowJoinedMessage(), mnIconMenuDrawIcons(), mnPartyShowJoinedMessage(), mnPartyShowPairJoinedMessage(), scInit() and scShamanVillageUpdateLettering().
Definition at line 600 of file definitions.h.
OBJ_SIZE_64X64
#define OBJ_SIZE_64X64 0xc0000000
Referenced by btEffectRunCharon(), btEffectRunHaures(), fdBattleEffectDrawCanvasSprite(), fdPsynergyCyclone(), fdPsynergyParch(), fdPsynergyPound(), fdSpriteCreate(), fdSuperLuckyDiceRun(), mnBattleStatusScreenRun(), scChampaCliffCavesLoadGlow(), scEpilogueLoadPortraitFrame() and scLemuriaPalaceLoadMaps().
Definition at line 601 of file definitions.h.
OBJ_SIZE_16X8
#define OBJ_SIZE_16X8 0x00004000
Referenced by btEffectRunDaedalus(), btEffectSpriteCreateWithTiles(), fdSpriteCreate(), scAquaRockInsideDrawPillars() and scTrialRoadDrawRaceMap().
Definition at line 602 of file definitions.h.
OBJ_SIZE_32X8
#define OBJ_SIZE_32X8 0x40004000
Referenced by mnCreditsInitCrawlSprites(), mnCreditsInitTextSpritesAtPage(), mnCreditsUpdateCrawlSprites(), mnCreditsUpdateTextSprites(), mnEndingImageInitStrips() and mnTitleShowTitleScreen().
Definition at line 603 of file definitions.h.
OBJ_SIZE_32X16
#define OBJ_SIZE_32X16 0x80004000
Referenced by btEffectRunDaedalus(), dbPsynergyTestStartRings(), fdBattleEffectSpawnScaledArcObjects(), fdLuckyWheelsUpdate(), fdSpriteCreate(), mnCreditsInitCrawlSprites(), mnCreditsInitTextSpritesAtPage(), mnEndingImageInitStrips(), scContigoStartSparkle(), scGaugeUpdate(), scJupiterLighthouseStartBeam(), scMarsLighthouseAerieStartRisingRings() and scShamanVillageUpdateLettering().
Definition at line 604 of file definitions.h.
OBJ_SIZE_64X32
#define OBJ_SIZE_64X32 0xc0004000
Referenced by fdLuckyDiceRun() and fdSpriteCreate().
Definition at line 605 of file definitions.h.
OBJ_SIZE_8X16
#define OBJ_SIZE_8X16 0x00008000
Referenced by btMessageWaitForAdvance(), fdSpriteCreate(), scGabombaStatueDrawClock() and scTitleUpdateSpriteReveal().
Definition at line 606 of file definitions.h.
OBJ_SIZE_16X32
#define OBJ_SIZE_16X32 0x80008000
Referenced by fdSpriteCreate(), fdSuperLuckyDiceRun(), scCrackedTileUpdate(), scMarsLighthouseEntranceDrawHoleMask() and scTrialRoadDrawRaceMap().
Definition at line 607 of file definitions.h.
OBJ_SIZE_32X64
#define OBJ_SIZE_32X64 0xc0008000
Referenced by btEffectRunDaedalus(), fdSpriteCreate(), scChampaCliffCavesLoadColumn() and scLightSpritesDraw().
Definition at line 608 of file definitions.h.
OBJ_AFFINE
#define OBJ_AFFINE 0x00000100
Drawn through its affine matrix.
Referenced by fdLuckyDiceRun(), fdSuperLuckyDiceRun() and mnIconMenuDrawIcons().
Definition at line 610 of file definitions.h.
OBJ_DOUBLE_SIZE
#define OBJ_DOUBLE_SIZE 0x00000200
An affine sprite drawn in a box twice its size, so turning never clips it.
Referenced by fdLuckyDiceRun(), fdSuperLuckyDiceRun() and mnIconMenuDrawIcons().
Definition at line 612 of file definitions.h.
OBJ_X
#define OBJ_X(x) ((x) << 16)
A sprite's x in the attr01 word of an OAM_WORDS entry, whose attribute 1 is
its high half.
Referenced by btEffectRunCharon(), btGeyserDraw(), fdHangingVineDraw(), fdLuckyDiceRun(), fdLuckyWheelsUpdate(), fdRopeDraw(), fdSuperLuckyDiceRun(), fdTightropeDraw(), mnCreditsInitCrawlSprites(), mnCreditsInitTextSpritesAtPage(), mnCreditsUpdateCrawlSprites(), mnCreditsUpdateTextSprites(), mnDjinnShowJoinedMessage(), mnEndingImageInitStrips(), mnIconMenuDrawIcons(), mnPartyShowJoinedMessage(), mnPartyShowPairJoinedMessage(), mnWindowSpriteCreate(), scAnkohlRuinsDrawSand(), scApojiiIslandsDrawMetatileMarkers(), scAquaRockDrawFallingBubbles(), scAquaRockDrawRisingBubbles(), scAquaRockInsideDrawPillars(), scAquaRockInsideDrawSplashes(), scCrackedTileUpdate(), scGabombaStatueDrawClock(), scGabombaStatueDrawRaisedBlocks(), scGaugeUpdate(), scLightSpritesDraw(), scMarsLighthouseEntranceDrawHoleMask(), scShamanVillageUpdateLettering(), scTitleUpdateSpriteReveal(), scTrialRoadDrawFountains() and scTrialRoadDrawRaceMap().
Definition at line 615 of file definitions.h.
OBJ_MODE
#define OBJ_MODE(mode) ((mode) << 10)
An SPR_MODE.
Referenced by btMessageWaitForAdvance(), fdEffectInitSparkles(), fdFadeOverlayDrawMarks(), fdGroundParticlesStart(), fdLuckyWheelsUpdate(), fdMotesStart(), fdRisingParticlesStart(), fdWeatherStartRain(), mnBattleCollectPartyCommands(), mnBattleDjinnMenuShowChangePreview(), mnBattleStatusScreenRun(), mnGlyphDraw(), scAnkohlRuinsDrawSand(), scApojiiIslandsDrawMetatileMarkers(), scCrackedTileUpdate(), scMarsLighthouseEntranceDrawHoleMask() and scTitleUpdateSpriteReveal().
Definition at line 617 of file definitions.h.
OBJ_256_COLORS
#define OBJ_256_COLORS 0x00002000
8bpp tiles, as BGCNT_256_COLORS.
Referenced by btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunDaedalus(), btEffectRunEclipse(), btEffectRunFlora(), btEffectRunHaures(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunNeptune(), btEffectSpriteCreateWithTiles(), btGeyserDraw(), btMessageWaitForAdvance(), fdHangingVineDraw(), fdLuckyDiceRun(), fdLuckyWheelsUpdate(), fdRopeDraw(), fdSpriteCreate(), fdSuperLuckyDiceRun(), fdTightropeDraw(), mnBattleCollectPartyCommands(), mnBattleCommandRowLoadIcon(), mnBattleStatusScreenRun(), mnBattleTargetRunSelection(), mnIconMenuDrawIcons(), scAquaRockDrawFallingBubbles(), scAquaRockDrawRisingBubbles(), scAquaRockInsideDrawPillars(), scAquaRockInsideDrawSplashes(), scGabombaStatueDrawRaisedBlocks(), scLightSpritesDraw(), scTrialRoadDrawFountains() and scYampiDesertCreateScoopGem().
Definition at line 619 of file definitions.h.
OBJ_HFLIP
#define OBJ_HFLIP 0x10000000
A plain sprite mirrored left to right.
Referenced by fdLuckyDiceRun(), fdLuckyWheelsUpdate(), scApojiiIslandsDrawMetatileMarkers(), scLightSpritesDraw() and scTrialRoadDrawRaceMap().
Definition at line 621 of file definitions.h.
OBJ_VFLIP
#define OBJ_VFLIP 0x20000000
A plain sprite mirrored top to bottom.
Referenced by fdLuckyWheelsUpdate().
Definition at line 623 of file definitions.h.
OBJ_PRIORITY
#define OBJ_PRIORITY(n) ((n) << 10)
Attribute 2 above its tile number: the sprite's priority, 0 in front to 3 behind, and its 16-colour palette.
Referenced by btEffectRunCruelRuin(), btEffectSpriteCreateWithTiles(), btGeyserDraw(), fdBlankOverlayDrawMarks(), fdEffectInitSparkles(), fdFadeOverlayDrawMarks(), fdGroundParticlesStart(), fdHangingVineDraw(), fdLuckyDiceRun(), fdLuckyWheelsUpdate(), fdMapScreenInit(), fdMotesStart(), fdRisingParticlesStart(), fdRopeDraw(), fdSuperLuckyDiceRun(), fdTightropeDraw(), fdWeatherStartRain(), mnEndingImageInitStrips(), scAnkohlRuinsDrawSand(), scApojiiIslandsDrawMetatileMarkers(), scAquaRockDrawFallingBubbles(), scAquaRockDrawRisingBubbles(), scAquaRockInsideDrawPillars(), scAquaRockInsideDrawSplashes(), scCrackedTileUpdate(), scGabombaStatueDrawClock(), scGabombaStatueDrawRaisedBlocks(), scGaugeUpdate(), scLightSpritesDraw(), scMarsLighthouseEntranceDrawHoleMask(), scTrialRoadDrawFountains(), scTrialRoadDrawRaceMap() and scYampiDesertCreateScoopGem().
Definition at line 626 of file definitions.h.
OBJ_PALETTE
#define OBJ_PALETTE(n) ((n) << 12)
Referenced by btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunFlora(), btEffectRunIris(), fdEffectInitSparkles(), fdGroundParticlesStart(), fdLuckyWheelsUpdate(), fdMotesStart(), fdRisingParticlesStart(), fdSuperLuckyDiceDrawLargeNumber(), fdSuperLuckyDiceDrawNumber(), fdSuperLuckyDiceRun(), fdWeatherStartRain(), mnDjinnShowJoinedMessage(), mnPartyShowJoinedMessage(), mnPartyShowPairJoinedMessage(), scApojiiIslandsDrawMetatileMarkers(), scTitleUpdateSpriteReveal() and scTrialRoadDrawRaceMap().
Definition at line 627 of file definitions.h.
OBJ_AFFINE_PARAMETER
#define OBJ_AFFINE_PARAMETER(value) ((value) << 16)
An affine parameter in the high half of an OAM_WORDS entry's attr2 word: the
entries 4n to 4n + 3 hold affine matrix n's four.
Referenced by fdLuckyDiceRun() and fdSuperLuckyDiceRun().
Definition at line 630 of file definitions.h.
OBJ_X_MASK
#define OBJ_X_MASK 0x1ff
Attribute 1's nine bits of x: a sprite left of the screen is at 512 less its distance.
Referenced by btGeyserDraw(), fdHangingVineDraw(), fdLuckyDiceRun(), fdLuckyWheelsUpdate(), fdMapScreenUpdateMarkers(), fdRopeDraw(), fdSuperLuckyDiceRun(), fdTightropeDraw(), mnCursorAdvance(), mnWindowSpriteCreate(), scApojiiIslandsDrawMetatileMarkers(), scAquaRockDrawFallingBubbles(), scAquaRockDrawRisingBubbles(), scCrackedTileUpdate(), scGabombaStatueDrawRaisedBlocks(), scLightSpritesDraw(), scMarsLighthouseEntranceDrawHoleMask(), scShamanVillageUpdateLettering(), scTrialRoadDrawFountains() and scTrialRoadDrawRaceMap().
Definition at line 633 of file definitions.h.
OBJ_Y_MASK
#define OBJ_Y_MASK 0xff
Attribute 0's eight bits of y: a sprite's y wraps round at 256 lines.
Referenced by btGeyserDraw(), fdHangingVineDraw(), fdLuckyDiceRun(), fdLuckyWheelsUpdate(), fdRopeDraw(), fdSuperLuckyDiceRun(), fdTightropeDraw(), mnIconMenuDrawIcons(), mnWindowSpriteCreate(), scApojiiIslandsDrawMetatileMarkers(), scAquaRockDrawFallingBubbles(), scAquaRockDrawRisingBubbles(), scCrackedTileUpdate(), scGabombaStatueDrawRaisedBlocks(), scLightSpritesDraw(), scMarsLighthouseEntranceDrawHoleMask(), scTrialRoadDrawFountains() and scTrialRoadDrawRaceMap().
Definition at line 635 of file definitions.h.
OBJ_POSITION
#define OBJ_POSITION(x, y) (OBJ_X((x) & OBJ_X_MASK) | ((y) & OBJ_Y_MASK))
A sprite's place in its attr01 word: x in attribute 1's nine bits and y in attribute 0's eight, each wrapped as the screen wraps them.
Referenced by fdLuckyDiceRun(), fdSuperLuckyDiceDrawLargeNumber(), fdSuperLuckyDiceDrawNumber() and fdSuperLuckyDiceRun().
Definition at line 638 of file definitions.h.
OBJ_TILE_MASK
#define OBJ_TILE_MASK 0x3ff
Attribute 2's ten bits of tile number, counted in 4-bit tiles from the start
of sprite VRAM.
Referenced by btEffectRunCruelRuin(), btEffectRunDaedalus(), scParticleUpdateFalling(), scStaffCreditSpawnGrowingPair() and scWorldMapSpawnTwinSparks().
Definition at line 641 of file definitions.h.
KEYCNT_DISARMED
#define KEYCNT_DISARMED 0xc3ff
Requires all ten keys together to prevent the reset chord retriggering it.
Referenced by syInputHandleKeyInterrupt() and syInstallIWRAMAndIRQs().
Definition at line 643 of file definitions.h.
EVENT_PASS_TICK
#define EVENT_PASS_TICK 0x480
An event's priority: the high byte picks the pass that runs it, the low byte ranks it within the pass (higher runs first). An odd high byte means the event is suspended, so no pass matches it.
The two passes: the VBlank handler runs EVENT_PASS_VBLANK's events, and
sySynch() runs EVENT_PASS_TICK's once a tick. Each ranks 0x80, the middle of
the low byte, so an event added at EVENT_PASS_TICK + 10 runs before those
added at EVENT_PASS_TICK.
Referenced by btEffectOpenCanvasLayer(), btEffectRunCriticalHit(), btEffectRunDaedalus(), btEffectRunEclipse(), btEffectRunUlysses(), btEffectRunVoidBeam(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btElementGlowInitStarField(), btPlaybackSchedulePhase(), btRun(), btStagingRunAttack(), btStagingRunFullScreen(), btStagingRunItem(), btStagingRunPsynergyCast(), btTransitionRun(), dbPsynergyTest2StartRocks(), fdActorSystemInit(), fdBattleEffectStartArcEffect(), fdBattleEffectStartCanvasSprite(), fdBlendScriptStart(), fdEffectInitSlots(), fdEffectInitSparkles(), fdEffectStartBlankOverlay(), fdEffectStartFadeOverlay(), fdGroundParticlesStart(), fdHangingVineInit(), fdLineScrollInitWave(), fdLuckyWheelsRun(), fdMapGridLoadMap(), fdMotesStart(), fdPaletteCycleStart(), fdPaletteFadeInit(), fdParticleBurstStart(), fdPsynergyArrow(), fdPsynergyBlaze(), fdPsynergyBurst(), fdPsynergyCyclone(), fdPsynergyHover(), fdPsynergyLash(), fdPsynergyLoadResources(), fdPsynergyPound(), fdPsynergyResumeCloakCheck(), fdPsynergyReveal(), fdPsynergyRing(), fdPsynergySand(), fdPsynergyScoop(), fdPsynergyStartCloak(), fdPsynergyStartMindReadWave(), fdPsynergyStartSceneSprite() and 214 more.
Definition at line 676 of file definitions.h.
EVENT_PASS_VBLANK
#define EVENT_PASS_VBLANK 0xc80
Referenced by btEffectRunAnnihilation(), btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBackstab(), btEffectRunBallLightning(), btEffectRunBladeRain(), btEffectRunBoreas(), btEffectRunBubbleColumn(), btEffectRunBurstShower(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCondemn(), btEffectRunCrescentSlash(), btEffectRunCruelRuin(), btEffectRunCrystal(), btEffectRunCurse(), btEffectRunDaedalus(), btEffectRunDeathPlunge(), btEffectRunDjinniSign(), btEffectRunDouse(), btEffectRunDrainMotes(), btEffectRunEclipse(), btEffectRunFire(), btEffectRunFlare(), btEffectRunFlora(), btEffectRunFlurry(), btEffectRunFroth(), btEffectRunGaspFamily(), btEffectRunGatheringLights(), btEffectRunGeode(), btEffectRunGeyser(), btEffectRunHaunt(), btEffectRunHaures(), btEffectRunHeavyBlow(), btEffectRunHelmSplitter(), btEffectRunIce(), btEffectRunJudgment(), btEffectRunJuggle(), btEffectRunKirin(), btEffectRunLeapingStrike(), btEffectRunLobbedShells(), btEffectRunMeteorBlow(), btEffectRunMirroredWall(), btEffectRunNeptune(), btEffectRunProjectileVolley() and 44 more.
Definition at line 677 of file definitions.h.
EVENT_PASS_VBLANK_FIRST
#define EVENT_PASS_VBLANK_FIRST (EVENT_PASS_VBLANK + 127)
The highest rank in the VBlank pass: an event added here runs first of the VBlank events.
Referenced by btBackgroundLoad(), btBackgroundSetMode(), btEffectRunGeode(), btEffectRunStarfieldFall() and btEffectRunUlysses().
Definition at line 680 of file definitions.h.
EVENT_PRIORITY_EMPTY
#define EVENT_PRIORITY_EMPTY -1
An empty slot's priority, sorted last: the sort reads priorities signed.
Referenced by syInitEvent().
Definition at line 682 of file definitions.h.
EVENT_PRIORITY_REMOVED
#define EVENT_PRIORITY_REMOVED 0x7fff
A removed event's priority: its odd high byte matches no pass, and as the highest priority it sorts to the front of the table.
Referenced by syCloseEvent().
Definition at line 685 of file definitions.h.
EVENT_STATE_HIGH
#define EVENT_STATE_HIGH(task) (((Uint8 *)&(task)->priority)[1])
An event's priority's high byte: the pass it runs in.
Referenced by syCountEventsInPass(), syExecuteEvent(), syResumeEvent(), syResumeOverlayEvents(), syRunPassBeforeTickEvents(), sySuspendEvent() and sySuspendOverlayEvents().
Definition at line 688 of file definitions.h.
EVENT_SUSPENDED
#define EVENT_SUSPENDED 1
The bit of an event's high priority byte (EVENT_STATE_HIGH) that suspends it.
Referenced by syResumeEvent(), syResumeOverlayEvents(), sySuspendEvent() and sySuspendOverlayEvents().
Definition at line 690 of file definitions.h.
EVENT_FLAG_KEEP_RUNNING
#define EVENT_FLAG_KEEP_RUNNING 1
The bit of an event's flags that keeps it running while
sySuspendOverlayEvents suspends the others.
Referenced by sySuspendOverlayEvents().
Definition at line 693 of file definitions.h.
EVENT_IN_OVERLAY
#define EVENT_IN_OVERLAY(task) (((task)->callback >> 24) == EWRAM_START >> 24)
Whether the event's function is in EWRAM, where a scene's overlay runs.
Referenced by syResumeOverlayEvents() and sySuspendOverlayEvents().
Definition at line 695 of file definitions.h.
INTR_FLAG_VBLANK
#define INTR_FLAG_VBLANK (1 << IRQ_VBLANK)
The bits of IE and IF for the interrupts the game handles.
Referenced by syInstallIWRAMAndIRQs().
Definition at line 720 of file definitions.h.
INTR_FLAG_TIMER3
#define INTR_FLAG_TIMER3 (1 << IRQ_TIMER3)
Referenced by sySerialDisableTransfer(), sySerialInit() and sySerialStartClocking().
Definition at line 721 of file definitions.h.
INTR_FLAG_SERIAL
#define INTR_FLAG_SERIAL (1 << IRQ_SERIAL)
Referenced by sySerialDisableTransfer(), sySerialInit() and sySerialStartClocking().
Definition at line 722 of file definitions.h.
INTR_FLAG_KEYPAD
#define INTR_FLAG_KEYPAD (1 << IRQ_KEYPAD)
Referenced by syInstallIWRAMAndIRQs().
Definition at line 723 of file definitions.h.
INTR_FLAG_GAMEPAK
#define INTR_FLAG_GAMEPAK (1 << IRQ_GAMEPAK)
Referenced by syInstallIWRAMAndIRQs().
Definition at line 724 of file definitions.h.
RamIwramIrqMain
#define RamIwramIrqMain FIXED_ADDRESS((Uint8 *), 0x03000100, syIWRAMIRQMain)
Where syInstallIWRAMAndIRQs copies the resident IWRAM code.
Referenced by syInstallIWRAMAndIRQs().
Definition at line 750 of file definitions.h.
RamIrqVector
#define RamIrqVector FIXED_ADDRESS((void **), 0x03007ffc, IrqVector)
The BIOS's interrupt vector at the top of IWRAM.
Referenced by syInstallIWRAMAndIRQs().
Definition at line 752 of file definitions.h.
RamHeapSlots
#define RamHeapSlots FIXED_ADDRESS((HEAP_SLOTS *), 0x03000000, HeapSlotsWork)
Referenced by btAbilityApplyToTarget(), btActionRunBuild(), btAdjustDebugValue(), btAIChooseAction(), btAIChooseRandomTarget(), btAIChooseTarget(), btAnimationObjectAllocateEmpty(), btAppendLinkedActions(), btAutoBattleRunAction(), btAutoBattleRunApproachAttack(), btAutoBattleRunAttackOrItem(), btAutoBattleRunPsynergy(), btAwardSpoils(), btBackgroundInit(), btBackgroundLoad(), btBackgroundSetMode(), btBackgroundSetPaletteLevel(), btBackgroundShowZoomedPage(), btBackgroundStepHighlightBlend(), btBuildEnemyActions(), btCameraAdjustByShoulderKeys(), btCameraApplyPhasedDelta(), btCameraApplyTransform(), btCameraApplyVerticalShake(), btCameraSetCommandView(), btCameraSetDefaultView(), btCameraSetRange(), btCameraSetView(), btCameraSetViewAtDepth(), btCameraShake(), btCameraUpdate(), btCanvasBlitMirroredQuarters(), btChangeEnemyForm(), btDisplayApplyBg2Affine(), btEffectAdvanceBg2OnInterval(), btEffectAdvanceScrollOnInterval(), btEffectApplyBg2Reference(), btEffectApplyWindowBlendRegisters(), btEffectArmBg1HBlankDMA(), btEffectArmBg2AffineHBlankDMA(), btEffectArmMeteorBlowPaletteDMA(), btEffectArmPaletteHBlankDMA(), btEffectBuildCanvasBlitters(), btEffectClearTintTimers(), btEffectConvertBackgroundToBlueRamp(), btEffectCountDownBattlerTints(), btEffectCreateSprites(), btEffectDarkenBackgroundStep(), btEffectDimBackgroundStep(), btEffectDrawClippedCanvasLine() and 1279 more.
Definition at line 1012 of file definitions.h.
HEAP_SLOT_AT
#define HEAP_SLOT_AT(state, kind) (*(void **)((Uint8 *)(state) + (kind)))
Heap slot kind of the heap's words state, by its byte offset (enum
HEAP_SLOT): the block, or null while none is allocated.
Referenced by fdActorCrossRope(), fdActorCrossTightrope(), syHeapSlotAllocate() and syHeapSlotAllocateEWRAM().
Definition at line 1016 of file definitions.h.
AFFINE_SCALE_ONE
#define AFFINE_SCALE_ONE (1 << 8)
The affine group. Sprite rotation and scaling: a sprite's transform and the
OAM matrices this tick hands out for it. Full size in an AFFINE_TRANSFORM's
8.8 scales.
Referenced by fdHangingVineDraw(), fdLuckyDiceRun(), fdRopeDraw() and fdTightropeDraw().
Definition at line 1021 of file definitions.h.
DMA0_CONTROL
#define DMA0_CONTROL 5
DMA channel 0's control halfword (DMA0CNT_H) among REG_DMA0's halfwords.
Referenced by fdLineScrollArmDMA() and fdMindReadStartRipple().
Definition at line 1064 of file definitions.h.
DMA3
#define DMA3 ((volatile DMA_REGISTERS *)®_DMA3SAD)
DMA3, the channel the game copies with, as its three registers.
Referenced by gmMainRoutineStateInitDefaults().
Definition at line 1067 of file definitions.h.
TICKS_PER_SECOND
#define TICKS_PER_SECOND 60
The tick group. The tick loop's globals: the frames a tick takes, the CPU
load display and the VBlank flags, which sySynch() (system/system_frame.c)
and the VBlank handler share. Ticks in a second: the screen refreshes about
60 times a second.
Referenced by fdScriptWaitTwoSecondsOrPress(), mnBattleMenuUpdateEachTick(), mnStringFormatPlayTime(), mnStringFormatStopwatch(), mnTitleShowCamelotLogo(), mnTitleShowPublisherLogo(), scGabombaStatueDrawClock(), scGabombaStatueFormatClock(), scGabombaStatueResetClock(), scGabombaStatueRestartClock(), scGabombaStatueStartClock(), scGabombaStatueTickClock(), scGondowanCliffsWaitToLand(), scInit(), scShamanVillageCountDownToStart() and TitlePromptBlendLevels.
Definition at line 1108 of file definitions.h.
IO_WRITE_QUEUE_SIZE
#define IO_WRITE_QUEUE_SIZE 32
The io_write_queue group. The I/O write queue: register writes held until
VBlank. The writes the queue holds.
Referenced by scSettlementsCycleWaterColors().
Definition at line 1137 of file definitions.h.
IO_WRITE_BYTE
#define IO_WRITE_BYTE (1 << 16)
Writes a byte.
Definition at line 1154 of file definitions.h.
IO_WRITE_HALFWORD
#define IO_WRITE_HALFWORD (2 << 16)
Writes a halfword.
Referenced by btBackgroundSetMode(), btEffectConfigureEffectDisplay(), btEffectEndCanvasLayer(), btEffectHideBg1AndRestoreBackdrop(), btEffectOpenCanvasLayer(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunCanvasBurst(), btEffectRunCharon(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunGeode(), btEffectRunJudgment(), btEffectRunMegiddo(), btEffectRunMeteorBlow(), btEffectRunShatteringOpening(), btEffectRunUlysses(), btEffectStartCanvasLayer(), btEffectStartElementStreaks(), btTransitionRun(), fdMapScreenShow(), fdMapScreenUpdateMarkers(), fdScreenTransitionStart(), fdWorldMapUpdateRegionTint(), mnBattleCommandRowRun(), scApojiiIslandsDouseAquaStone(), scAquaRockInsideBlockMoaiWithPillar(), scClearFadeInBlend(), scInit(), scMarsLighthouseHallFadeDoorway(), scMarsLighthouseHallStartDoorways(), scShamanVillageUpdateLettering(), scTitleRevealScreen(), scWorldMapLoadTidalWave() and scWorldMapQueueBlend().
Definition at line 1156 of file definitions.h.
IO_WRITE_WORD
#define IO_WRITE_WORD (3 << 16)
Writes a word.
Referenced by btEffectRunCloudSwirl(), btEffectRunGeode(), btEffectRunJudgment() and btEffectRunSerac().
Definition at line 1158 of file definitions.h.
IO_WRITE_SET
#define IO_WRITE_SET (4 << 16)
ORs the value into the register instead of storing it.
Definition at line 1160 of file definitions.h.
IO_WRITE_CLEAR
#define IO_WRITE_CLEAR (8 << 16)
Clears the value's bits in the register instead of storing it.
Definition at line 1162 of file definitions.h.
syWordsClearEntry
#define syWordsClearEntry
The iwram_call group. The functions resident in IWRAM, called at their fixed
addresses: the fixed-point multiply and divides, the square root, word fills
and copies, the matrix multiply and the picture decoder. Fixed addresses of
the functions resident in IWRAM.
Referenced by btBackgroundLoad(), btClearSerialTransferPayload(), btEffectDrawShadedDisc(), btEffectDrawShadedDiscQuarter(), btEffectRunBallLightning(), btEffectRunCatastrophe(), btEffectRunCriticalHit(), btEffectRunCybele(), btEffectRunDaedalus(), btEffectRunDjinniSign(), btEffectRunFlora(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunHurricane(), btEffectRunMegaera(), btEffectRunMeteorBlow(), btEffectRunSerac(), btEffectRunTwistingColumn(), btEffectRunVoidBeam(), btEffectRunWyrdCurse(), btElementGlowEnd(), btElementGlowInitStarField(), btElementGlowPlay(), btFormationBuildEnemyList(), btObjectSpawnObjectsForList(), btPlaybackRun(), btRun(), btStagingPlanDaedalus(), fdEngineRun(), fdMapGridLoadMap(), fdPsynergyDecodePicture(), fdTilesetAnimationStartAll(), fdWorldMapWriteLayerMetatileTile(), mnTextDrawGlyphPair(), mnWindowSystemInitBattle(), mnWindowSystemInitField(), scAnemosInnerSanctumDullahanStartLightSprites(), scAnkohlRuinsInitSand(), scApojiiIslandsStartMetatileMarkers(), scAquaRockInsideStartPillars(), scAquaRockInsideStartSplashes(), scAquaRockStartBubbles(), scClearApplyImportedData(), scClearEnterPassword(), scCrackedTileFind(), scFlameThrowersCreate(), scGabombaStatueLayChannel(), scGabombaStatueLayPath(), scGabombaStatueSetUpChannelPuzzle(), scGabombaStatueStartClock() and 11 more.
Definition at line 1168 of file definitions.h.
syWordsFillEntry
#define syWordsFillEntry
Referenced by btEffectRunAnnihilation(), btEffectRunAzul(), btEffectRunBallLightning(), btEffectRunBolt(), btEffectRunBreaths(), btEffectRunCards(), btEffectRunCatastrophe(), btEffectRunCloudSwirl(), btEffectRunCoatlicue(), btEffectRunCondemn(), btEffectRunDaedalusStrike(), btEffectRunDiamondBerg(), btEffectRunFallingSword(), btEffectRunFirePuppet(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunFlurry(), btEffectRunFormChange(), btEffectRunFume(), btEffectRunGaspFamily(), btEffectRunGeode(), btEffectRunHeartbreak(), btEffectRunIris(), btEffectRunJudgment(), btEffectRunLifeShear(), btEffectRunMegaera(), btEffectRunMegiddo(), btEffectRunOdyssey(), btEffectRunPlasma(), btEffectRunPlumeEdge(), btEffectRunRadiantFire(), btEffectRunRay(), btEffectRunRisingDragon(), btEffectRunRisingDragonEnemy(), btEffectRunSerac(), btEffectRunSparkGroups(), btEffectRunTargetStrike(), btEffectRunThor(), btEffectRunTumblingQuads(), btEffectRunWhirlwind(), btEffectRunZagan(), btRun(), fdBattleEffectShiftRowsDown(), fdBattleEffectStartCanvasSprite(), fdEffectSpriteInit(), fdLuckyWheelsRun(), mnBattleDjinnMenuRun(), mnBuildPatternTiles(), mnCreditsDrawLine(), mnDjinnMenuShowMemberStatus() and 4 more.
Definition at line 1171 of file definitions.h.
syMulFX
#define syMulFX
(left * right) >> 16 with a 64-bit product: the 16.16 product of two 16.16 numbers.
Referenced by btCameraSetRange(), btEffectRunCloudSwirl(), btEffectRunIris(), btEffectRunThor(), btEffectRunVoidBeam(), btElementGlowInitStarField(), btElementGlowUpdateStarField(), btIrisDrawSplash(), btMotionLeapBack(), btMotionProjectCursorPoint(), btMotionProjectPos(), btMotionProjectScaledPos(), btMulFX(), btObjectSpawnObjectsForList(), btRenderDrawMeshWireframe(), btRenderDrawTexturedMesh(), btRenderFillMesh(), btUnitProjectToScreen(), fdActorCrossRope(), fdActorCrossTightrope(), fdActorFlyOnWorldMap(), fdActorMoveAsSand(), fdActorMoveAsSandOnWorldMap(), fdActorMoveOnWorldMap(), fdActorSailOnMap(), fdActorSailOnWorldMap(), fdActorScriptWanderNearHome(), fdActorSetMoveTarget(), fdActorSystemPlaceSprites(), fdActorUpdateAllMotion(), fdActorUpdateAllOnField(), fdActorUpdatePlayerControl(), fdActorWander(), fdCameraFollowWatchedInBounds(), fdCanvasPlotPolarPixel(), fdEffectCircleAnchor(), fdEffectRunSparkEmitter(), fdEffectSpriteDraw(), fdEffectSwayParticle(), fdEffectWanderAroundAnchor(), fdEncounterCountStepsAndSelectFormation(), fdHangingVineUpdate(), fdLeaderSlideOnIce(), fdMapGridLoadMap(), fdMapGridSetCameraCenter(), fdMapGridUpdateLayerScroll(), fdMapScreenUpdateMarkers(), fdMapScreenUpdateScroll(), fdMotionStepTowardTarget(), fdPaletteFadeBuild() and 83 more.
Definition at line 1177 of file definitions.h.
syFixedDivEntry
#define syFixedDivEntry
value / divisor as a 16.16 number: value times 2^30 / divisor, shifted down 14.
Referenced by syDivFX().
Definition at line 1181 of file definitions.h.
sySquartEntry
#define sySquartEntry
The square root of value, rounded down; 0 for a negative value.
Referenced by fdRopeLash(), fdRopeLayCoil(), fdRopeRecoil(), fdRopeThrow(), fdTightropeLay(), fdTightropeLayBowed(), fdTightropeLayCoil(), fdTightropeThrow() and sySquartIWRAM().
Definition at line 1185 of file definitions.h.
syDecompressBitRuns
#define syDecompressBitRuns
Paints value into destination's 16-pixel rows of bytes wherever a glyph's rows of bits, a halfword each, are set, as a glyph's shadow is drawn: twelve rows, fourteen outside the Japanese edition.
Referenced by mnTextDrawGlyphPair().
Definition at line 1190 of file definitions.h.
syMultiMatrixEntry
#define syMultiMatrixEntry
Multiplies the current matrix by matrix.
Referenced by fdActorSystemProjectSprites() and syMultiMatrix().
Definition at line 1196 of file definitions.h.
syVectorTransformEntry
#define syVectorTransformEntry
Reads all three word-aligned coordinates before writing the result. Input may be an array or a record's coordinate prefix; output may overlap it.
Referenced by syCalcPoint().
Definition at line 1201 of file definitions.h.
syIntegerDivideEntry
#define syIntegerDivideEntry
Referenced by syIntegerDivide().
Definition at line 1205 of file definitions.h.
syIntegerDivideUnsignedEntry
#define syIntegerDivideUnsignedEntry
Referenced by syIntegerDivideUnsigned() and syMatrixBuildLookAt().
Definition at line 1209 of file definitions.h.
syDecompressSpritePictureEntry
#define syDecompressSpritePictureEntry
Referenced by syDecompressSpritePicture().
Definition at line 1213 of file definitions.h.
syWordsCopyEntry
#define syWordsCopyEntry
Referenced by btAbilityApplyToTarget(), btActionSwap(), btAwardSpoils(), btEffectRunAstralBlast(), btEffectRunAtalanta(), btEffectRunAzul(), btEffectRunBackstab(), btEffectRunBreak(), btEffectRunBubbleColumn(), btEffectRunCoatlicue(), btEffectRunCool(), btEffectRunCrescentSlash(), btEffectRunCrystal(), btEffectRunDaedalusStrike(), btEffectRunDeathPlunge(), btEffectRunDragonFire(), btEffectRunDrainMotes(), btEffectRunEclipse(), btEffectRunElementPillar(), btEffectRunEruption(), btEffectRunFallingSword(), btEffectRunFirePuppet(), btEffectRunFlora(), btEffectRunFlurry(), btEffectRunFormChange(), btEffectRunGaia(), btEffectRunGeode(), btEffectRunHaunt(), btEffectRunHaures(), btEffectRunHelmSplitter(), btEffectRunHurricane(), btEffectRunJudgment(), btEffectRunLeapingStrike(), btEffectRunLobbedShells(), btEffectRunMegaera(), btEffectRunMeteorBlow(), btEffectRunMoteFountain(), btEffectRunPlumeEdge(), btEffectRunProjectileVolley(), btEffectRunRadiantFire(), btEffectRunRisingDragon(), btEffectRunRisingDragonEnemy(), btEffectRunRushingStrike(), btEffectRunShiningStar(), btEffectRunStarMine(), btEffectRunStarSwarm(), btEffectRunStatReduction(), btEffectRunStreakVolley(), btEffectRunTargetBursts(), btEffectRunTargetStrike() and 42 more.
Definition at line 1217 of file definitions.h.
syWordsCopyOffset
#define syWordsCopyOffset FIXED_OFFSET(1584, syIWRAMWordsCopy, syIWRAMIRQMain)
syWordsCopy's offset from syIWRAMIRQMain, for the callers that reach it from
the linked IWRAM code rather than at its fixed address.
Definition at line 1224 of file definitions.h.
syWordsCopyLinked
#define syWordsCopyLinked
syWordsCopy reached through the linked IWRAM code's symbol, syIWRAMIRQMain,
at its offset rather than at its fixed address (syWordsCopyEntry): the same
function at the same address.
Referenced by btEffectRunDaedalus(), mnItemMenuRunCommands() and scGaugeDraw().
Definition at line 1228 of file definitions.h.
RECIPROCAL_OF
#define RECIPROCAL_OF(d) (0xffffffffU / (d) + 1)
The mul_fx group. syMulFXArm, the 16.16 fixed-point multiply. The reciprocal
of d as a 32-bit fraction, rounded up: the high word of v times it is v /
d, for the small v divided here.
Referenced by ExperienceOneTenth, gmUnitCalculateBaseElements(), mnStringFormatNumber() and syStringFormatDecimal().
Definition at line 1246 of file definitions.h.
BATTLE_PROJECTION_CENTER_X
#define BATTLE_PROJECTION_CENTER_X (DISPLAY_WIDTH / 2)
Where the battle engine centres its projection on the screen: across the middle, and 120 pixels down, below the screen's middle.
Referenced by btCameraSetView(), btCameraSetViewAtDepth(), btCameraShake(), btEffectEndCanvasLayer(), btEffectRunCatastrophe(), btEffectRunCrystal(), btEffectRunDjinniCharge(), btEffectRunDjinniSign(), btEffectRunFormChange(), btEffectRunGaspFamily(), btEffectRunProcne(), btEffectRunSabreDance(), btEffectRunTumblingQuads(), btEffectRunTwistingColumn(), btEffectRunUlysses(), btEffectRunWindFunnel(), btEffectRunZagan() and btIrisRestoreBattle().
Definition at line 1297 of file definitions.h.
BATTLE_PROJECTION_CENTER_Y
#define BATTLE_PROJECTION_CENTER_Y 120
Referenced by btCameraApplyVerticalShake(), btCameraSetCommandView(), btCameraSetView(), btCameraSetViewAtDepth(), btCameraShake(), btEffectEndCanvasLayer(), btEffectRunCatastrophe(), btEffectRunCharon(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunCrystal(), btEffectRunDaedalus(), btEffectRunDjinniSign(), btEffectRunEclipse(), btEffectRunFormChange(), btEffectRunGaspFamily(), btEffectRunHaures(), btEffectRunRisingDragonEnemy(), btEffectRunSabreDance(), btEffectRunTumblingQuads(), btEffectRunUlysses(), btEffectRunWindFunnel(), btEffectRunZagan(), btEffectSetupBlendedDisplay() and btIrisRestoreBattle().
Definition at line 1298 of file definitions.h.
RamMapMetatileBuffer
#define RamMapMetatileBuffer
The ram_buffer group. EWRAM's and IWRAM's buffers at fixed addresses, named
by their address where a function reaches them so (FIXED_ADDRESS, with the
linked symbol beside it), and the scene's own state. EWRAM's buffers at fixed
addresses: the map's metatiles, the decode buffer, the map's collision
shapes, its scene points and the BG tiles.
Referenced by btEffectArmWin0HBlankDMA(), btEffectDrawStreaks(), btEffectRunAnnihilation(), btEffectRunAtalanta(), btEffectRunAttackSlash(), btEffectRunAzul(), btEffectRunBackgroundFadeIn(), btEffectRunBallLightning(), btEffectRunBreaths(), btEffectRunCanvasBurst(), btEffectRunCards(), btEffectRunCastingImpact(), btEffectRunCatastrophe(), btEffectRunCloudSwirl(), btEffectRunCrescentSlash(), btEffectRunCriticalHit(), btEffectRunCruelRuin(), btEffectRunCrystal(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunDiamondBerg(), btEffectRunDjinniCharge(), btEffectRunDragonCloud(), btEffectRunEclipse(), btEffectRunFirePuppet(), btEffectRunFlashingStrike(), btEffectRunFlora(), btEffectRunFormChange(), btEffectRunFroth(), btEffectRunGaia(), btEffectRunGaspFamily(), btEffectRunHeartbreak(), btEffectRunJudgment(), btEffectRunJuggle(), btEffectRunLegend(), btEffectRunMegiddo(), btEffectRunMercury(), btEffectRunNeptune(), btEffectRunOdyssey(), btEffectRunQuake(), btEffectRunRadiantFire(), btEffectRunRagingHeat(), btEffectRunRisingDragon(), btEffectRunRisingDragonEnemy(), btEffectRunRushingStrike(), btEffectRunSerac(), btEffectRunShatteringOpening(), btEffectRunSleep(), btEffectRunStarfieldFall(), btEffectRunSwirlSwipe() and 63 more.
Definition at line 1305 of file definitions.h.
RamDecodeBuffer
#define RamDecodeBuffer FIXED_ADDRESS((Uint8 *), 0x0201c000, DecodeBuffer)
Referenced by fdTilesetAnimationUpdate().
Definition at line 1307 of file definitions.h.
RamMapCollision
#define RamMapCollision FIXED_ADDRESS((Uint8 *), 0x0202c000, MapGridShapes)
Referenced by fdMapGridCheckCollision(), fdMapGridCheckCollisionAbove(), fdMapGridCheckCollisionAt(), fdMapGridGetTerrainHeight(), fdMapGridGetTerrainHeightAbove(), fdMapGridGetTerrainKind(), fdMapGridGetTerrainKindAt(), fdMapGridGetTerrainKindOrBumpAt(), fdMapGridLoadMap(), fdWorldMapGetCollision(), fdWorldMapLoadGraphics(), scAquaRockInsideSetPillarHeight(), scAquaRockInsideSetPillarsHeight(), scGeyserUpdate() and scTrialRoadUpdateFountains().
Definition at line 1308 of file definitions.h.
RamMapScenePoints
#define RamMapScenePoints FIXED_ADDRESS((Uint8 *), 0x0202e008, MapScenePoints)
Referenced by fdScenePointGetPos().
Definition at line 1309 of file definitions.h.
RamBgTileBuffer
#define RamBgTileBuffer FIXED_ADDRESS((Uint8 *), 0x02038000, BgTileBuffer)
Referenced by fdWorldMapLoadGraphics().
Definition at line 1310 of file definitions.h.
RamMapBlocks
#define RamMapBlocks FIXED_ADDRESS((Uint8 *), 0x02020000, MetatileTiles)
The metatile tiles table (MetatileTiles), as fdMapGridRenderMetatileTilesRow
reads it.
Referenced by fdActorGetCueMetatileAheadOfCurrent(), fdGetCollisionAheadOfLeader(), fdGetCollisionUnderLeader(), fdMapGridCopyDrawnPicturesRect(), fdMapGridCopyMetatileTilesHalfColumn(), fdMapGridCopyMetatileTilesIndicesRect(), fdMapGridCopyMetatileTilesToScreen(), fdMapGridGetMetatileAt(), fdMapGridRenderMetatileTilesRow(), fdTilesetAnimationUpdate(), fdUpdateWalking(), fdWorldMapDrawMetatileColumn(), fdWorldMapDrawMetatileRow(), fdWorldMapLoadGraphics(), fdWorldMapPreloadCurrentTileBlock() and fdWorldMapWriteLayerMetatileTile().
Definition at line 1313 of file definitions.h.
RamMapShapeGrid
#define RamMapShapeGrid FIXED_ADDRESS((Uint8 *), 0x02024000, MapShapeGrid)
Referenced by fdActorPlaceMovedBlock(), fdActorSetMetatileShape(), scHeldActorRaiseMetatile(), scMagmaRockInsideSetMetatileShape(), scPillarLowerHeldMetatiles() and scPillarRaise().
Definition at line 1314 of file definitions.h.
RamIwramHeapEnd
#define RamIwramHeapEnd
The end of the IWRAM heap, which the allocators test against, and the bottom of the stacks.
Referenced by syHeapAllocate(), syHeapAllocateEWRAM(), syHeapFillFreeWords(), syHeapSlotAllocate() and syHeapSlotAllocateEWRAM().
Definition at line 1318 of file definitions.h.
RamTickCount
#define RamTickCount FIXED_ADDRESS((Uint32 *), 0x0300122c, TickCount)
The tick counter, as the overlays of Airs Rock, Atteka Inlet and Ancient Lemuria read it.
Referenced by scAirsRockDriftFog(), scAncientLemuriaCycleWaterColors() and scAttekaInletRotateHullBandAndSurfColors().
Definition at line 1323 of file definitions.h.
RamWorldMapScroll
#define RamWorldMapScroll
The map screen's scroll (x, then y, 16.16 pixels), as fdMapScreenUpdateScroll
reads it.
Referenced by fdMapScreenInit().
Definition at line 1327 of file definitions.h.
RamWorldMapState
#define RamWorldMapState
The map screen's state, as its setup (fdMapScreenInit) reaches it.
Referenced by fdMapScreenInit(), fdMapScreenStepToPlace() and fdMapScreenUpdateMarkers().
Definition at line 1331 of file definitions.h.
RamWorldMapCursor
#define RamWorldMapCursor
Where fdMapScreenUpdateScroll reads the cursor from (x, then y, 16.16
pixels): the setup points it at the state's cursor.
Referenced by fdMapScreenInit().
Definition at line 1335 of file definitions.h.
RamWorldMapCursorStart
#define RamWorldMapCursorStart
The cursor's place when the screen opens (x, then y, 16.16 pixels).
Referenced by fdMapScreenInit() and fdMapScreenUpdateMarkers().
Definition at line 1338 of file definitions.h.
SCENE_STATE_CHOSEN_DJINN
#define SCENE_STATE_CHOSEN_DJINN 6480
Where SceneLocalState keeps, by element, the Djinni gmPartyAddIsaacsParty
picked at random from The Broken Seal's Djinn the party lacks: its place in
its element plus one, or 0 when the party has them all. An element's last
Djinni stands for it in actor placements and Djinni battles.
Referenced by fdDjinnJoinParty(), fdRequestDjinnBattle(), fdScriptSpawnActorTable() and gmPartyAddIsaacsParty().
Definition at line 1344 of file definitions.h.
BUP_IMAGE_GAME_FLAGS
#define BUP_IMAGE_GAME_FLAGS 64
Where a save image, EWRAM from BupBuffer as a part holds it, keeps the game
flags, MainRoutineStateWork and CharacterUnits. The Clear Data and the data
transferred from The Broken Seal come in this layout.
Referenced by gmDataTransferApply() and scClearReceiveByLink().
Definition at line 1755 of file definitions.h.
BUP_IMAGE_MAIN_ROUTINE_STATE
#define BUP_IMAGE_MAIN_ROUTINE_STATE 576
Referenced by gmClearDataApply(), gmDataTransferApply() and scClearReceiveByLink().
Definition at line 1756 of file definitions.h.
BUP_IMAGE_UNITS
#define BUP_IMAGE_UNITS 1312
Referenced by gmClearDataApply(), gmDataTransferApply() and scClearReceiveByLink().
Definition at line 1757 of file definitions.h.
BROKEN_SEAL_SAVE_IMAGE_UNITS
#define BROKEN_SEAL_SAVE_IMAGE_UNITS 1280
Where The Broken Seal's save image keeps its units (CharacterUnits), 32 bytes
before this game's BUP_IMAGE_UNITS: the Clear scene copies an image it
receives by link from the main routine's state on that much further on, its
units landing on this game's.
Referenced by scClearReceiveByLink().
Definition at line 1762 of file definitions.h.
SERIAL_PACKET_BYTES
#define SERIAL_PACKET_BYTES 32
The bytes of one packet buffer in SERIAL_STATE.storage.
Referenced by sySerialInit().
Definition at line 1821 of file definitions.h.
SERIAL_BLOCK_NUMBER_MASK
#define SERIAL_BLOCK_NUMBER_MASK 0x7f
SERIAL_TRANSFER_STATE.active and SerialBlockNumber hold a block number in
their low seven bits, counting up and wrapping; the receiver's, with bit 7
set, asks the sender to rewind to that block (sySerialStepBlockTransfer).
Referenced by sySerialStepBlockTransfer().
Definition at line 1915 of file definitions.h.
SERIAL_BLOCK_REWIND
#define SERIAL_BLOCK_REWIND 0x80
bit 7: rewind to the block number
Referenced by sySerialStepBlockTransfer().
Definition at line 1916 of file definitions.h.
SERIAL_STATUS_RUNNING
#define SERIAL_STATUS_RUNNING 0x80
SERIAL_TRANSFER_STATE.status's bit 7, set when a send or receive starts; the
receiver counts its blocks in the low bits (sySerialStepBlockTransfer).
Referenced by scLobbyResetTransferState(), syLinkBattleResetTransferState(), sySerialStartReceive(), sySerialStartSend() and sySerialStepBlockTransfer().
Definition at line 1919 of file definitions.h.
VRAM_CACHE_ENTRY_GLYPH_TILES
#define VRAM_CACHE_ENTRY_GLYPH_TILES 95
The window sprites' glyph tiles (WIN_STATE.glyphTiles), a cache entry kept
for this one use.
Referenced by mnWindowSystemStartBattleUpdate() and mnWindowSystemStartFieldUpdate().
Definition at line 1999 of file definitions.h.
VRAM_CACHE_CLEAR
#define VRAM_CACHE_CLEAR ((const void *)-1)
syVRAMCacheLoad's source that clears the entry's VRAM instead of copying.
Referenced by mnBattleItemMenuRun(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun() and syVRAMCacheLoad().
Definition at line 2013 of file definitions.h.
Typedefs in detail
EVENT_FUNC
typedef void (*EVENT_FUNC)(void);
Referenced by fdPsynergyGreyMindReadPalette(), fdPsynergyRestoreMindReadPalette(), fdPsynergyStartMindReadWave(), fdWorldMapStepZoom(), mnIconMenuOpen(), scFieldCloseEvent(), scFieldSetTickEvent(), scInit(), scLemuriaSpringInitTossSimulation(), scLinkLobbyEnterBattle(), syCloseEvent(), syExecuteEvent(), syFindEvent(), syResumeEvent(), syRunPassBeforeTickEvents(), sySetEvent(), sySetEventFlags(), sySetTickEvent() and sySuspendEvent().
Definition at line 652 of file definitions.h.
INTERRUPT_HANDLER
typedef void (*INTERRUPT_HANDLER)(void);
Referenced by DefaultIrqHandlers, IrqHandlers and syIntFunction().
Definition at line 726 of file definitions.h.
Enumerations in detail
DISPLAY_CONTROL
enum DISPLAY_CONTROL
REG_DISPCNT's video modes and bits: each _ON bit shows its layer or turns its
window on.
| Enumerator | Value | Description |
|---|---|---|
DISPCNT_MODE_0 | 0x0000 | Four text backgrounds. |
DISPCNT_MODE_1 | 0x0001 | BG0 and BG1 text, BG2 affine. |
DISPCNT_MODE_2 | 0x0002 | BG2 and BG3 affine. |
DISPCNT_OBJ_1D_MAP | 0x0040 | Sprite tiles in one run, not a 2D sheet. |
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 | The sprite window. |
Definition at line 55 of file definitions.h.
KEY_MASK
enum KEY_MASK
The keys' bits as REG_KEYINPUT and REG_KEYCNT lay them out; the game's key
state (PerWork) holds them set for a pressed key.
| Enumerator | Value | Description |
|---|---|---|
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 |
Definition at line 375 of file definitions.h.
SPR_MODE
enum SPR_MODE
A sprite's mode, OAM attribute 0's bits 11..10.
| Enumerator | Value | Description |
|---|---|---|
OBJ_MODE_NORMAL | 0 | |
OBJ_MODE_SEMI_TRANSPARENT | 1 | blended as BLDCNT's first target |
OBJ_MODE_WINDOW | 2 | drawn into the OBJ window, not shown |
Definition at line 561 of file definitions.h.
OAM_AFFINE_MODE
enum OAM_AFFINE_MODE
A sprite's affine mode, OAM attribute 0's bits 9..8: a plain sprite, one scaled or turned through its matrix, or one drawn so in a box twice its size so that a scale above 1 is not cut off.
| Enumerator | Value | Description |
|---|---|---|
OAM_AFFINE_OFF | 0 | |
OAM_AFFINE_ON | 1 | |
OAM_AFFINE_DOUBLE_SIZE | 3 |
Definition at line 571 of file definitions.h.
OBJ_COL
enum OBJ_COL
A sprite's colours, OAM attribute 0's bit 13: 16 colours from one of the 16 palettes, or 256.
| Enumerator | Value | Description |
|---|---|---|
OBJ_COLORS_16 | 0 | |
OBJ_COLORS_256 | 1 |
Definition at line 580 of file definitions.h.
OBJ_SHAPE
enum OBJ_SHAPE
A sprite's shape, OAM attribute 0's bits 15..14; its size, attribute 1's bits 15..14, gives its dimensions with it (GBATEK, "LCD OBJ - OAM Attributes").
| Enumerator | Value | Description |
|---|---|---|
OBJ_SHAPE_SQUARE | 0 | |
OBJ_SHAPE_HORIZONTAL | 1 | wider than tall |
OBJ_SHAPE_VERTICAL | 2 | taller than wide |
Definition at line 588 of file definitions.h.
EVENT_LIMITS
enum EVENT_LIMITS
The event group. Events, their priorities and the event table, with room for 24 events. How many events can run at once.
| Enumerator | Value | Description |
|---|---|---|
EVENT_COUNT | 24 |
Definition at line 647 of file definitions.h.
anonymous enum
enum { IRQ_VBLANK, IRQ_HBLANK, IRQ_VCOUNT, IRQ_TIMER0, … }
The irq group. The interrupt sources, their handler table and the resident
IWRAM code the interrupts enter through. The hardware's interrupt sources:
each one's bit number in IE and IF, and its slot in IrqHandlers.
| Enumerator | Value | Description |
|---|---|---|
IRQ_VBLANK | ||
IRQ_HBLANK | ||
IRQ_VCOUNT | ||
IRQ_TIMER0 | ||
IRQ_TIMER1 | ||
IRQ_TIMER2 | ||
IRQ_TIMER3 | ||
IRQ_SERIAL | ||
IRQ_DMA0 | ||
IRQ_DMA1 | ||
IRQ_DMA2 | ||
IRQ_DMA3 | ||
IRQ_KEYPAD | ||
IRQ_GAMEPAK | ||
IRQ_COUNT |
Definition at line 700 of file definitions.h.
HEAP_SLOT
enum HEAP_SLOT
The heap slots shared across folders, by byte offset into HeapSlotsWork.
| Enumerator | Value | Description |
|---|---|---|
HEAP_SLOT_MATRIX_STACK | offsetof(HEAP_SLOTS, matrixStack) | |
HEAP_SLOT_SPRITE_ANIMATIONS | offsetof(HEAP_SLOTS, spriteAnimations) | |
HEAP_SLOT_SPRITES | offsetof(HEAP_SLOTS, sprites) | |
HEAP_SLOT_ACTORS | offsetof(HEAP_SLOTS, actors) | |
HEAP_SLOT_ACTOR_SYSTEM | offsetof(HEAP_SLOTS, actorSystem) | |
HEAP_SLOT_WORLD_MAP_AFFINE | offsetof(HEAP_SLOTS, worldMapAffine) | |
HEAP_SLOT_MAP_GRID | offsetof(HEAP_SLOTS, mapGrid) | |
HEAP_SLOT_BATTLE | offsetof(HEAP_SLOTS, battleState) | |
HEAP_SLOT_BATTLE_SCANLINES | offsetof(HEAP_SLOTS, battleScanlines) | |
HEAP_SLOT_BATTLE_UNUSED | offsetof(HEAP_SLOTS, battleUnused) | |
HEAP_SLOT_CAMERA | offsetof(HEAP_SLOTS, cameraState) | |
HEAP_SLOT_TILE_SCRATCH | offsetof(HEAP_SLOTS, tileScratch) | |
HEAP_SLOT_WINDOW | offsetof(HEAP_SLOTS, windowState) | |
HEAP_SLOT_PARTY_STATUS | offsetof(HEAP_SLOTS, partyStatus) | |
HEAP_SLOT_ICON_TRANSFER | offsetof(HEAP_SLOTS, glyphTransfer) | |
HEAP_SLOT_SELECTION_MENU | offsetof(HEAP_SLOTS, selectionMenu) | |
HEAP_SLOT_TICK_SCRATCH | offsetof(HEAP_SLOTS, frameScratch) | |
HEAP_SLOT_PICTURE_UPLOADER | offsetof(HEAP_SLOTS, pictureUploader) | |
HEAP_SLOT_MIND_READ | offsetof(HEAP_SLOTS, mindRead) | |
HEAP_SLOT_BATTLE_EFFECT | offsetof(HEAP_SLOTS, battleEffect) | |
HEAP_SLOT_BATTLE_CANVAS | offsetof(HEAP_SLOTS, battleCanvas) | |
HEAP_SLOT_BATTLE_SHEET | offsetof(HEAP_SLOTS, battleSheet) | |
HEAP_SLOT_RAM_CODE | offsetof(HEAP_SLOTS, ramCode) | |
HEAP_SLOT_FIELD | offsetof(HEAP_SLOTS, fieldState) | |
HEAP_SLOT_PALETTE_CYCLES | offsetof(HEAP_SLOTS, paletteCycles) | |
HEAP_SLOT_WEATHER | offsetof(HEAP_SLOTS, weather) | |
HEAP_SLOT_FIELD_BLEND | offsetof(HEAP_SLOTS, fieldBlend) | |
HEAP_SLOT_SCREEN_TRANSITION | offsetof(HEAP_SLOTS, screenTransition) | |
HEAP_SLOT_PALETTE_FADE | offsetof(HEAP_SLOTS, paletteFade) | |
HEAP_SLOT_LINE_SCROLL | offsetof(HEAP_SLOTS, lineScroll) | |
HEAP_SLOT_GROUND_MASK | offsetof(HEAP_SLOTS, groundMask) | |
HEAP_SLOT_BATTLE_MESSAGE | offsetof(HEAP_SLOTS, battleMsg) | |
HEAP_SLOT_ROPE | offsetof(HEAP_SLOTS, rope) | |
HEAP_SLOT_TIGHTROPE | offsetof(HEAP_SLOTS, tightrope) | |
HEAP_SLOT_HANGING_VINE | offsetof(HEAP_SLOTS, hangingVine) | |
HEAP_SLOT_BATTLE_ENTRY_TIMER | offsetof(HEAP_SLOTS, battleEntryTimer) | |
HEAP_SLOT_TITLE_INTRO | offsetof(HEAP_SLOTS, titleIntro) | |
HEAP_SLOT_BATTLE_BACKGROUND | offsetof(HEAP_SLOTS, battleBg) | |
HEAP_SLOT_CANVAS_MAP | offsetof(HEAP_SLOTS, canvasMap) | |
HEAP_SLOT_RAM_CODE_PAIRED | offsetof(HEAP_SLOTS, ramCodePaired) | |
HEAP_SLOT_MESSAGE_DECODER | offsetof(HEAP_SLOTS, msgDecoder) | |
HEAP_SLOT_BUP | offsetof(HEAP_SLOTS, bupState) | |
HEAP_SLOT_SETTINGS_MENU | offsetof(HEAP_SLOTS, settingsMenu) | |
HEAP_SLOT_ENEMY_UNITS | offsetof(HEAP_SLOTS, enemyUnits) | |
HEAP_SLOT_MENU | offsetof(HEAP_SLOTS, menuState) | |
HEAP_SLOT_FIELD_EFFECT | offsetof(HEAP_SLOTS, fieldEffectState) | |
HEAP_SLOT_BATTLE_MENU | offsetof(HEAP_SLOTS, battleMenuState) | |
HEAP_SLOT_ICON_MENU | offsetof(HEAP_SLOTS, iconMenu) | |
HEAP_SLOT_TRIAL_ROAD_LINK | offsetof(HEAP_SLOTS, trialRoadLink) | |
HEAP_SLOT_CANVAS_SPRITE | offsetof(HEAP_SLOTS, canvasSprite) | |
HEAP_SLOT_ARC_EFFECT | offsetof(HEAP_SLOTS, arcEffect) | |
HEAP_SLOT_DJINNI_HINTS | offsetof(HEAP_SLOTS, djinniHints) |
Definition at line 956 of file definitions.h.
anonymous enum
enum { MATRIX_TRANSLATION_X, MATRIX_TRANSLATION_Y, MATRIX_TRANSLATION_Z, MATRIX_WORDS }
The matrix group. The current 3D matrix, its one-deep stack, and the unit matrix. A transform's twelve 16.16 words: a 3x3 rotation, then the translation's x, y and z.
| Enumerator | Value | Description |
|---|---|---|
MATRIX_TRANSLATION_X | M30 | |
MATRIX_TRANSLATION_Y | M31 | |
MATRIX_TRANSLATION_Z | M32 | |
MATRIX_WORDS | 12 |
Definition at line 1235 of file definitions.h.
anonymous enum
enum { BUP_FLASH_TIMER, BUP_FLASH_IDENTIFY_ATTEMPTS, BUP_SECTOR_COUNT, BUP_SECTORS_PER_PART, … }
The save group. The save in flash: its sectors, parts and summaries, and the save's state. The save's place in flash and its limits.
| Enumerator | Value | Description |
|---|---|---|
BUP_FLASH_TIMER | 2 | The timer handed to the SDK's flash library. |
BUP_FLASH_IDENTIFY_ATTEMPTS | 8 | Tries, a tick apart. |
BUP_SECTOR_COUNT | 15 | Flash sectors used; as a sector number, "none" in the save functions. |
BUP_SECTORS_PER_PART | 3 | A part fills three sectors in a row. |
BUP_SECTOR_SIZE | 4096 | |
BUP_PART_NONE | 16 | The part id of a free or invalidated sector. |
BUP_FILE_COUNT | 3 | The save files, parts 0 to 2. |
BUP_PART_EXTRA | 3 | The part after the files, whose summary is the extra one in the save's state. |
BUP_COUNTER_LIMIT | 65000 | The highest counter a write keeps; a copy written past it is rewritten as 1. |
BUP_CHECKSUM_BYTES | BUP_SECTORS_PER_PART * BUP_SECTOR_SIZE - 16 | Payload bytes summed into the checksum: a part's three sectors less its header. |
Definition at line 1659 of file definitions.h.
SERIAL_PHASE
enum SERIAL_PHASE
SERIAL_STATE.phase.
| Enumerator | Value | Description |
|---|---|---|
SERIAL_PHASE_SEARCHING | 0 | looking for the partner |
SERIAL_PHASE_CONNECTED | 1 |
Definition at line 1795 of file definitions.h.
SERIAL_MODE
enum SERIAL_MODE
SERIAL_STATE.mode: how this console takes part in the link.
| Enumerator | Value | Description |
|---|---|---|
SERIAL_MODE_CHILD | 0 | |
SERIAL_MODE_CLOCKING | SIO_MULTI_SD | SIO_MULTI_SD alone of SIOCNT's SIO_START and SIO_MULTI_SD: this console armed timer 3 and clocks the transfers. |
Definition at line 1802 of file definitions.h.
LINK_STAT
enum LINK_STAT
The link status bits sySerialExchangePayloads returns.
| Enumerator | Value | Description |
|---|---|---|
LINK_STATUS_HEARD_BOTH | 3 | both consoles heard from this tick |
LINK_STATUS_CLOCKING | 0x80 | this console clocks the transfers |
LINK_STATUS_ERROR | 0x1000 | last transfer interrupt found SIOCNT's SIO_ERROR bit set |
LINK_STATUS_EXTRA_CONSOLE | 0x2000 | SIOCNT's multiplayer id is 2 or more |
Definition at line 1811 of file definitions.h.
SERIAL_CHANNEL_FLAG
enum SERIAL_CHANNEL_FLAG
SERIAL_STATE.channelFlags: what the transfer interrupts saw of a console's
packets since the last tick.
| Enumerator | Value | Description |
|---|---|---|
SERIAL_CHANNEL_PACKET_COMPLETE | 1 | Its fourteenth halfword arrived. |
SERIAL_CHANNEL_ERROR | 2 | A transfer interrupt found SIOCNT's error bit (SIO_ERROR) set. |
Definition at line 1889 of file definitions.h.
SERIAL_RECEIVE_STATE
enum SERIAL_RECEIVE_STATE
SERIAL_TRANSFER_STATE.flags: how far this console's receive has got.
| Enumerator | Value | Description |
|---|---|---|
SERIAL_RECEIVE_IDLE | 0 | |
SERIAL_RECEIVE_ACTIVE | 1 | |
SERIAL_RECEIVE_DONE | 2 | the last block taken |
Definition at line 1897 of file definitions.h.
SERIAL_SEND_STATE
enum SERIAL_SEND_STATE
SERIAL_TRANSFER_STATE.peerFlags: the kind of block this console sends.
| Enumerator | Value | Description |
|---|---|---|
SERIAL_SEND_IDLE | 0 | |
SERIAL_SEND_MORE | 1 | a block with more to follow |
SERIAL_SEND_LAST | 2 |
Definition at line 1905 of file definitions.h.
VRAM_BLOCK_LIMITS
enum VRAM_BLOCK_LIMITS
The vram_cache group. The VRAM cache: numbered entries, each holding a run of
64-byte blocks of sprite VRAM for a sprite or a loaded picture. The VRAM
cache's sizes: its entries, the 64-byte blocks of sprite VRAM it hands out,
and the markers of a free block and a free entry.
| Enumerator | Value | Description |
|---|---|---|
VRAM_CACHE_ENTRY_COUNT | 96 | |
VRAM_BLOCK_COUNT | 512 | |
VRAM_BLOCK_BYTES | 64 | |
VRAM_BLOCK_OWNER_FREE | 255 | |
VRAM_CACHE_OFFSET_FREE | 65535 | |
VRAM_CACHE_SIZE_NO_BLOCKS | 16 | The largest size an entry has while it holds no blocks: syVRAMCacheReleaseVRAM leaves 1, which keeps the entry taken. |
VRAM_CACHE_LOAD_MAX | 8192 | the most bytes syVRAMCacheLoad takes at once |
Definition at line 1983 of file definitions.h.
Functions in detail
syIWRAMMulFX
FIXED syIWRAMMulFX(FIXED a, FIXED b)
FIXED syIWRAMMulFX(FIXED a, FIXED b) __attribute__((long_call))
Referenced by fdActorUpdateAllOnField(), fdCameraFollowLeaderInBounds(), fdHangingVineSwing(), fdTightropeLayBowed(), scOrbitUpdate() and scWhirlwindUpdate().
Definition at lines 734 and 736 of file definitions.h.
Variables in detail
HeapSlotsWork
extern Uint8 HeapSlotsWork[]
Definition at line 730 of file definitions.h.
syIWRAMWordsClear
extern Uint8 syIWRAMWordsClear[]
Definition at line 731 of file definitions.h.
syIWRAMWordsFill
extern Uint8 syIWRAMWordsFill[]
Definition at line 732 of file definitions.h.
syIWRAMDivFX
extern Uint8 syIWRAMDivFX[]
Definition at line 738 of file definitions.h.
syIWRAMSquart
extern Uint8 syIWRAMSquart[]
Definition at line 739 of file definitions.h.
syIWRAMExpandBitRuns
extern Uint8 syIWRAMExpandBitRuns[]
Definition at line 740 of file definitions.h.
syIWRAMMultiMatrix
extern Uint8 syIWRAMMultiMatrix[]
Definition at line 741 of file definitions.h.
syIWRAMTransformVector
extern Uint8 syIWRAMTransformVector[]
Definition at line 742 of file definitions.h.
syIWRAMSignedDivide
extern Uint8 syIWRAMSignedDivide[]
Definition at line 743 of file definitions.h.
syIWRAMUnsignedDivide
extern Uint8 syIWRAMUnsignedDivide[]
Definition at line 744 of file definitions.h.
syIWRAMDecompress
extern Uint8 syIWRAMDecompress[]
Definition at line 745 of file definitions.h.
syIWRAMWordsCopy
extern Uint8 syIWRAMWordsCopy[]
Definition at line 746 of file definitions.h.