Skip to Content
The Alchemy Project

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

NameDescription
structEVENTAn event: its function's address, its priority (see EVENT_PASS_TICK) and its flags (EVENT_FLAG_KEEP_RUNNING).
structHEAP_SLOTSThe heap's 64 words in IWRAM (HeapSlotsWork, 0x03000000): the two pools' next free addresses, then each slot's block once allocated, else null.
structAFFINE_TRANSFORMA sprite's rotation and scale: scales in 8.8 fixed point (AFFINE_SCALE_ONE is full size), the angle in 1/65536 turns.
unionOAM_MATRIXOne OAM rotation-scaling matrix: pa, pb, pc and pd in 8.8 fixed point, the inverse of the transform the sprite is drawn with.
structBG_SCROLLThe bg_scroll group.
structDMA_REGISTERSThe dma group.
structSTUBThe stub group.
structARC_TAN_STUBA system module table entry whose two-argument target the world map's tilt calls, the arctangent.
structTRIG_STUBA system module table entry whose one-argument target the world map's tilt calls, the sine or the cosine.
structSYSTEM_STUB_TABLEThe start of the system module's stub table, as far as syCos.
structINPUT_STATEThe input group.
structIO_WRITE_QUEUEThe register writes VBlank carries out once the tick loop has finished a tick, each its value, address and control word; syIOWriteQueueFlushPending empties it.
structOAM_USAGEThe oam group.
structOAM_WORDSThe oam_words group.
structPOSThe point group.
structPROJECTIONThe projection group.
structMAIN_ROUTINE_STATEThe game's blocks the system library's RAM holds, complete here so that each variable globals.h declares has its whole type.
structWORLD_MAP_MARKERA marker sprite's OAM entry, after a word of its own.
structWORLD_MAP_STATEWorldMapStateWork, the map screen's state while it is open: its resources, the cursor and the marker sprites.
structWORLD_MAP_CHOICEMainRoutineStateWork.mapScreenFlag under a label of its own, MapScreenChoice: the destination last chosen on the map screen.
structBUP_SUMMARYA 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.
structBUP_WORKSPACEThe 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.
structBUP_SECTOR_HEADERThe header of a save sector in flash: its signature, the part it holds, its checksum and its counter.
structSERIAL_PACKETThe serial group.
structSERIAL_STATEThe link cable's runtime: its mode and phase, the consoles heard from, the send position and the packet buffers the interrupt handler fills.
structSERIAL_TRANSFER_STATEA console's block transfer state, exchanged with the partner each VBlank: its block number, its status and flags, and a 20-byte block.
structANIMATION_METADATAThe sprite_metadata group.
structVRAM_CACHE_ENTRYA sprite slot of the VRAM cache: the size of its block and where the block starts in sprite VRAM.
structPROJECTED_POINTA point in view space, and where syConvert3Dto2D puts it on the screen.
structVECTOR3

Macros

NameDescription
#defineREG_DISPCNT (*(volatile Uint16 *)0x04000000)Mode, layers, windows.
#defineREG_DISPSTAT (*(volatile Uint16 *)0x04000004)Blank flags and IRQs.
#defineREG_VCOUNT (*(volatile Uint16 *)0x04000006)Line being drawn, 0..227.
#defineDISPLAY_TOTAL_LINES 228The lines REG_VCOUNT counts through in a tick: the DISPLAY_HEIGHT drawn and those of VBlank.
#defineREG_BG1CNT (*(volatile Uint16 *)0x0400000a)BG1.
#defineREG_BG2CNT (*(volatile Uint16 *)0x0400000c)BG2.
#defineREG_BG3CNT (*(volatile Uint16 *)0x0400000e)BG3.
#defineBGCNT_PRIORITY (n) (n)Draw order, 0 in front to 3 behind.
#defineBGCNT_CHAR_BASE (block) ((block) << 2)The 16 KB character block, 0 to 3, the layer's tiles are read from.
#defineBGCNT_MOSAIC 0x0040Applies REG_MOSAIC's block size.
#defineBGCNT_256_COLORS 0x00808bpp tiles, not 16-colour 4bpp ones.
#defineBGCNT_SCREEN_BASE (block) ((block) << 8)The 2 KB screen block, 0 to 31, the layer's map is read from.
#defineBGCNT_WRAP 0x2000Affine backgrounds only: wrap around off the layer's area, which is otherwise transparent.
#defineBGCNT_SIZE (n) ((n) << 14)The background's size: for an affine one, 0 to 3 are 128, 256, 512 and 1024 pixels square.
#defineDISPCNT_MODE_MASK 0x0007REG_DISPCNT's three video mode bits, which hold a DISPCNT_MODE_ value.
#defineREG_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).
#defineREG_BG1VOFS (*(volatile Uint16 *)0x04000016)BG1, vertical
#defineREG_BG2HOFS (*(volatile Uint16 *)0x04000018)BG2, horizontal
#defineREG_BG2VOFS (*(volatile Uint16 *)0x0400001a)BG2, vertical
#defineREG_BG3HOFS (*(volatile Uint16 *)0x0400001c)BG3, horizontal
#defineREG_BG3VOFS (*(volatile Uint16 *)0x0400001e)BG3, vertical
#defineQ_8_8 (n) ((Sint16)((n) * 256))The BG2/BG3 affine matrix entries are signed 8.8 fixed point: texels stepped per screen pixel.
#defineREG_BG2PA (*(volatile Uint16 *)0x04000020)The affine backgrounds' matrices and origins, write-only.
#defineREG_BG2PB (*(volatile Uint16 *)0x04000022)BG2: x step a line
#defineREG_BG2PC (*(volatile Uint16 *)0x04000024)BG2: y step a pixel
#defineREG_BG2PD (*(volatile Uint16 *)0x04000026)BG2: y step a line
#defineREG_BG2X (*(volatile Sint32 *)0x04000028)BG2: origin x
#defineREG_BG2Y (*(volatile Sint32 *)0x0400002c)BG2: origin y
#defineREG_BG3PA (*(volatile Uint16 *)0x04000030)BG3: x step a pixel
#defineREG_BG3PB (*(volatile Uint16 *)0x04000032)BG3: x step a line
#defineREG_BG3PC (*(volatile Uint16 *)0x04000034)BG3: y step a pixel
#defineREG_BG3PD (*(volatile Uint16 *)0x04000036)BG3: y step a line
#defineREG_BG3X (*(volatile Sint32 *)0x04000038)BG3: origin x
#defineREG_BG3Y (*(volatile Sint32 *)0x0400003c)BG3: origin y
#defineREG_WIN0H (*(volatile Uint16 *)0x04000040)The two windows' edges, each a WIN_RANGE value in pixels.
#defineREG_WIN1H (*(volatile Uint16 *)0x04000042)window 1, left and right
#defineREG_WIN0V (*(volatile Uint16 *)0x04000044)window 0, top and bottom
#defineREG_WIN1V (*(volatile Uint16 *)0x04000046)window 1, top and bottom
#defineWIN_RANGE (start, end) (((start) << 8) | (end))A REG_WINxH or REG_WINxV value: the window covers start up to, but not including, end.
#defineWIN_RANGE_END_MASK 0xffA WIN_RANGE value's end, its low byte: the window's right or bottom edge.
#defineREG_WININ (*(volatile Uint16 *)0x04000048)What windows 0 and 1 show.
#defineREG_WINOUT (*(volatile Uint16 *)0x0400004a)What the rest shows.
#defineWININ_WIN0_BG0 0x0001REG_WININ: the layers shown inside window 0 (low byte) and window 1 (high byte).
#defineWININ_WIN0_BG1 0x0002window 0: BG1
#defineWININ_WIN0_BG2 0x0004window 0: BG2
#defineWININ_WIN0_BG3 0x0008window 0: BG3
#defineWININ_WIN0_OBJ 0x0010window 0: sprites
#defineWININ_WIN0_CLR 0x0020window 0: the colour effect
#defineWININ_WIN0_ALL 0x003fwindow 0: everything
#defineWININ_WIN1_BG0 0x0100window 1: BG0
#defineWININ_WIN1_BG1 0x0200window 1: BG1
#defineWININ_WIN1_BG2 0x0400window 1: BG2
#defineWININ_WIN1_BG3 0x0800window 1: BG3
#defineWININ_WIN1_OBJ 0x1000window 1: sprites
#defineWININ_WIN1_CLR 0x2000window 1: the colour effect
#defineWININ_WIN1_ALL 0x3f00window 1: everything
#defineWINOUT_WIN01_BG0 0x0001REG_WINOUT: the layers shown outside both windows (low byte) and inside the sprite window (high byte).
#defineWINOUT_WIN01_BG1 0x0002outside: BG1
#defineWINOUT_WIN01_BG2 0x0004outside: BG2
#defineWINOUT_WIN01_BG3 0x0008outside: BG3
#defineWINOUT_WIN01_OBJ 0x0010outside: sprites
#defineWINOUT_WIN01_CLR 0x0020outside: the colour effect
#defineWINOUT_WIN01_ALL 0x003foutside: everything
#defineWINOUT_WINOBJ_BG0 0x0100sprite window: BG0
#defineWINOUT_WINOBJ_BG1 0x0200sprite window: BG1
#defineWINOUT_WINOBJ_BG2 0x0400sprite window: BG2
#defineWINOUT_WINOBJ_BG3 0x0800sprite window: BG3
#defineWINOUT_WINOBJ_OBJ 0x1000sprite window: sprites
#defineWINOUT_WINOBJ_CLR 0x2000sprite window: the colour effect
#defineWINOUT_WINOBJ_ALL 0x3f00sprite window: everything
#defineREG_MOSAIC (*(volatile Uint16 *)0x0400004c)Mosaic and colour special effects.
#defineREG_BLDCNT (*(volatile Uint16 *)0x04000050)colour effect, targets
#defineBLDCNT_TGT1_BG0 0x0001REG_BLDCNT: the first target layers, the colour effect, then the second target layers that a blend mixes the first ones with.
#defineBLDCNT_TGT1_BG1 0x0002first target: BG1
#defineBLDCNT_TGT1_BG2 0x0004first target: BG2
#defineBLDCNT_TGT1_BG3 0x0008first target: BG3
#defineBLDCNT_TGT1_OBJ 0x0010first target: sprites
#defineBLDCNT_TGT1_BD 0x0020first target: the backdrop
#defineBLDCNT_TGT1_ALL 0x003ffirst target: every layer
#defineBLDCNT_EFFECT_NONE 0x0000no effect, the targets as drawn
#defineBLDCNT_EFFECT_BLEND 0x0040weighted by REG_BLDALPHA
#defineBLDCNT_EFFECT_LIGHTEN 0x0080towards white by REG_BLDY
#defineBLDCNT_EFFECT_DARKEN 0x00c0towards black by REG_BLDY
#defineBLDCNT_EFFECT_MASK 0x00c0the effect's two bits
#defineBLDCNT_TGT2_BG0 0x0100second target: BG0
#defineBLDCNT_TGT2_BG1 0x0200second target: BG1
#defineBLDCNT_TGT2_BG2 0x0400second target: BG2
#defineBLDCNT_TGT2_BG3 0x0800second target: BG3
#defineBLDCNT_TGT2_OBJ 0x1000second target: sprites
#defineBLDCNT_TGT2_BD 0x2000second target: the backdrop
#defineBLDCNT_TGT2_ALL 0x3f00second target: every layer
#defineREG_BLDALPHA (*(volatile Uint16 *)0x04000052)The blend's weights.
#defineBLEND_WEIGHT_MAX 16A blend weight's full strength: BLEND_ALPHA(BLEND_WEIGHT_MAX, 0) shows only the top layer.
#defineBLEND_ALPHA (top, bottom) ((top) | ((bottom) << 8))A REG_BLDALPHA value: top and bottom are the two targets' weights, out of BLEND_WEIGHT_MAX.
#defineBLEND_ALPHA_TOP_MASK 0xffREG_BLDALPHA's low byte, the top target's weight.
#defineREG_BLDY (*(volatile Uint16 *)0x04000054)Fade level, 0 to 16.
#defineBLEND_FADE_MAX 16REG_BLDY's whole fade: the targets drawn all white, or all black.
#defineBG_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.
#defineREG_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.
#defineREG_DMA0 ((volatile Uint16 *)0x040000b0)DMA channel 0's registers as halfwords, for the line scrolls that set the whole channel up.
#defineREG_DMA3 ((volatile Uint32 *)0x040000d4)DMA channel 3's registers as words: the channel syDMAXCopy copies with.
#definePLTT_BACKDROP (*(volatile Uint16 *)0x05000000)Background colour 0, the backdrop shown where no layer draws.
#defineBG_PLTT_SIZE 512Palette RAM sizes and colour counts.
#defineBG_PLTT_COLORS (BG_PLTT_SIZE / 2)the background's 256 colours
#defineOBJ_PLTT_SIZE 512bytes for 256 sprite colours
#defineOBJ_PLTT_COLORS (OBJ_PLTT_SIZE / 2)the sprites' 256 colours
#definePLTT_COLORS (2 * BG_PLTT_COLORS)palette RAM colours (BG then OBJ)
#defineBG_PLTT ((volatile Uint16 *)0x05000000)16 palettes of 16 colours
#definePALETTE_COLORS 16Colours in one 16-colour palette.
#definePALETTE_BYTES (PALETTE_COLORS * 2)Bytes in one 16-colour palette, as a 16-colour picture's resource begins with one.
#defineBG_PLTT_COLOR (palette, color)Colour color of 16-colour background palette palette.
#defineOBJ_PLTT ((volatile Uint16 *)0x05000200)the sprites' 256 colours
#defineOBJ_PLTT_COLOR (palette, color)Colour color of 16-colour sprite palette palette.
#defineRGB_GREEN_SHIFT 5Where a 15-bit colour keeps its green and blue levels, above red's five bits.
#defineRGB_BLUE_SHIFT 10
#defineRGB (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.
#defineIWRAM_START 0x03000000The start of the 32 KB of IWRAM, the CPU's fast internal work memory.
#defineEWRAM_START 0x02000000The start of the 256 KB of EWRAM, the slower external work memory.
#defineEWRAM_END 0x02040000The end of EWRAM: the limit the EWRAM heap's allocators test.
#defineBG_CHAR_BLOCK (n) ((Uint8 *)VRAM + (n) * BG_CHAR_SIZE)Background tile memory's 16 KB character block n, 0 to 3.
#defineBG_SCREEN_BLOCK (n) ((Uint8 *)VRAM + (n) * BG_SCREEN_SIZE)The 2 KB screen block n of VRAM, 0 to 31, that holds a map.
#defineTILE_SIZE_4BPP 32Bytes in an 8x8 tile of 16 colours.
#defineTILE_SIZE_8BPP 64Bytes in an 8x8 tile of 256 colours.
#defineTILE_ROW_SIZE_4BPP (TILE_SIZE_4BPP / 8)The bytes of one pixel row of a 16-colour tile.
#defineSPRITE_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.
#defineSPRITE_TILES_8BPP (width, height) (2 * SPRITE_TILES(width, height))
#defineOBJ_VRAM0 0x06010000Sprite tile memory: the 32 KB from 0x06010000.
#defineOBJ_VRAM ((Uint8 *)OBJ_VRAM0)Sprite tile memory as bytes, where a sprite's tile number counts from.
#defineREG_TM3CNT (*(volatile Uint32 *)0x0400010c)Timer 3's reload value and control as one word; it paces the serial transfers.
#defineREG_TM3CNT_H (*(volatile Uint16 *)0x0400010e)Timer 3's control.
#defineTIMER_INTR_ENABLE 0x0040TMxCNT_H flags.
#defineTIMER_ENABLE 0x0080Starts the timer counting.
#defineTIMER_256CLK 0x0002Counts every 256 cycles, 65536 times a second.
#defineREG_SIODATA32 ((volatile Uint32 *)0x04000120)The serial data: the 32-bit mode's word, or multiplayer's four received halfwords.
#defineREG_SIOCNT (*(volatile Uint32 *)0x04000128)Serial control read as a word, with SIODATA8 above it.
#defineREG_SIOCNT16 (*(volatile Uint16 *)0x04000128)Serial control alone.
#defineREG_SIODATA8 (*(volatile Uint16 *)0x0400012a)The 8-bit mode's data, which multiplayer mode sends from.
#defineREG_KEYINPUT (*(volatile Uint16 *)0x04000130)A 0 bit is a held key.
#defineREG_KEYCNT (*(volatile Uint16 *)0x04000132)Keys for the keypad IRQ.
#defineREG_RCNT (*(volatile Uint16 *)0x04000134)The serial port's mode.
#defineSIO_115200_BPS 0x0003SIOCNT flags.
#defineSIO_START 0x0080starts a transfer; set while one runs
#defineSIO_32BIT_MODE 0x1000normal mode, 32 bits a transfer
#defineSIO_MULTI_MODE 0x2000multiplayer mode
#defineSIO_INTR_ENABLE 0x4000an interrupt when a transfer ends
#defineRCNT_SIO_MODE 0x0000RCNT's mode: 0 leaves the port to SIOCNT's serial modes; bit 15 alone makes it general-purpose pins.
#defineRCNT_GPIO_MODE 0x8000the port as general-purpose pins
#defineDMA_DEST_INC 0x0000DMAxCNT_H flags.
#defineDMA_DEST_DEC 0x0020destination steps down
#defineDMA_DEST_FIXED 0x0040destination stays, as for a register
#defineDMA_DEST_RELOAD 0x0060steps up, back to its start each repeat
#defineDMA_SRC_INC 0x0000source steps up
#defineDMA_SRC_DEC 0x0080source steps down
#defineDMA_SRC_FIXED 0x0100source stays, as for a fill
#defineDMA_REPEAT 0x0200runs again at each start condition
#defineDMA_16BIT 0x0000moves halfwords
#defineDMA_32BIT 0x0400moves words
#defineDMA_DREQ_ON 0x0800channel 3: the cartridge requests it
#defineDMA_START_NOW 0x0000as soon as it's enabled
#defineDMA_START_VBLANK 0x1000
#defineDMA_START_HBLANK 0x2000
#defineDMA_START_SPECIAL 0x3000channels 1 and 2: a sound FIFO's request
#defineDMA_INTR_ENABLE 0x4000an interrupt when it ends
#defineDMA_ENABLE 0x8000arms the channel
#defineDMA_CONTROL_SHIFT 16Where a DMA channel's control halfword (the DMA_ flags) sits in its 32-bit count word.
#defineDMA_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.
#defineDMA_START_TIMING_DRQ_REPEATA 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.
#defineDMA_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).
#defineDMA_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.
#defineDMA_FILL_HALFWORDS (n) ((DMA_ENABLE | DMA_SRC_FIXED) << 16 | (n))
#defineDMA_COPY_HALFWORDS (n) (DMA_ENABLE << 16 | (n))
#defineDMA_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.
#defineDMA_HBLANK_HALFWORD_PER_LINEA halfword each HBlank, as for a scroll or a window edge.
#defineDMA_HBLANK_WORDS_PER_LINE (n)n words each HBlank, as for the affine registers of a background written together.
#defineDMA_HBLANK_WORD_PER_LINE DMA_HBLANK_WORDS_PER_LINE(1)A word each HBlank, as for a pair of registers written together.
#defineCPU_SET_SRC_FIXED 0x01000000BIOS CpuSet control flags, above its count.
#defineCPU_SET_32BIT 0x04000000Words rather than halfwords.
#defineOAM ((void *)0x07000000)The sprites' attributes.
#defineKEYS_MASK 0x3ffthe ten keys' bits; KEYINPUT reads 0 for a held key
#defineDPAD_INDEX (keys) (((keys) >> 4) & 15)The direction pad's four keys (Up, Down, Left, Right) as an index 0 to 15.
#defineREG_BG0CNT (*(volatile Uint16 *)0x04000008)BG0's control (BGCNT_).
#defineREG_BG0VOFS (*(volatile Uint16 *)0x04000012)BG0's vertical scroll.
#defineREG_SOUNDCNT_H (*(volatile Uint16 *)0x04000082)Direct sound's mixing: volumes, speakers, timers and FIFO resets.
#defineSOUND_CGB_MIX_FULL 0x0002SOUNDCNT_H flags: the mixing volumes.
#defineSOUND_A_MIX_FULL 0x0004direct sound A at full, not half
#defineSOUND_B_MIX_FULL 0x0008direct sound B at full, not half
#defineSOUND_ALL_MIX_FULLSounds 1 to 4 and both direct sound channels all at full volume.
#defineSOUND_A_RIGHT_OUTPUT 0x0100Direct sound A and B speakers, timer and FIFO reset.
#defineSOUND_A_LEFT_OUTPUT 0x0200A to the left speaker
#defineSOUND_A_TIMER_0 0x0000A plays at timer 0's rate
#defineSOUND_A_FIFO_RESET 0x0800empties A's FIFO
#defineSOUND_B_RIGHT_OUTPUT 0x1000B to the right speaker
#defineSOUND_B_LEFT_OUTPUT 0x2000B to the left speaker
#defineSOUND_B_TIMER_0 0x0000B plays at timer 0's rate
#defineSOUND_B_FIFO_RESET 0x8000empties B's FIFO
#defineREG_SOUNDBIAS (*(volatile Uint16 *)0x04000088)Sound output bias and direct sound FIFOs.
#defineREG_FIFO_A (*(volatile Uint32 *)0x040000a0)A's samples, 4 a write
#defineREG_FIFO_B (*(volatile Uint32 *)0x040000a4)B's samples, 4 a write
#defineREG_DMA0SAD (*(volatile Uint32 *)0x040000b0)The four DMA channels: source, destination, then the count with the control halfword (CNT_H, the DMA_ flags) above it.
#defineREG_DMA0DAD (*(volatile Uint32 *)0x040000b4)channel 0: destination
#defineREG_DMA0CNT
#defineREG_DMA0CNT_H (*(volatile Uint16 *)0x040000ba)channel 0: control
#defineREG_DMA1SAD (*(volatile Uint32 *)0x040000bc)channel 1: source
#defineREG_DMA1DAD (*(volatile Uint32 *)0x040000c0)channel 1: destination
#defineREG_DMA1CNT
#defineREG_DMA1CNT_H (*(volatile Uint16 *)0x040000c6)channel 1: control
#defineREG_DMA2SAD (*(volatile Uint32 *)0x040000c8)channel 2: source
#defineREG_DMA2DAD (*(volatile Uint32 *)0x040000cc)channel 2: destination
#defineREG_DMA2CNT
#defineREG_DMA2CNT_H (*(volatile Uint16 *)0x040000d2)channel 2: control
#defineREG_DMA3SAD (*(volatile Uint32 *)0x040000d4)channel 3: source
#defineREG_DMA3DAD (*(volatile Uint32 *)0x040000d8)channel 3: destination
#defineREG_DMA3CNT
#defineREG_DMA3CNT_H (*(volatile Uint16 *)0x040000de)channel 3: control
#defineREG_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.
#defineREG_TM0CNT_H (*(volatile Uint16 *)0x04000102)timer 0: control
#defineREG_TM1CNT_L (*(volatile Uint16 *)0x04000104)timer 1: reload
#defineREG_TM1CNT_H (*(volatile Uint16 *)0x04000106)timer 1: control
#defineREG_TM2CNT_L (*(volatile Uint16 *)0x04000108)timer 2: reload
#defineREG_TM2CNT_H (*(volatile Uint16 *)0x0400010a)timer 2: control
#defineREG_IE (*(volatile Uint16 *)0x04000200)Interrupts and cartridge wait states.
#defineREG_IF (*(volatile Uint16 *)0x04000202)pending; a 1 written clears
#defineREG_WAITCNT (*(volatile Uint16 *)0x04000204)cartridge wait states
#defineWAITCNT_SRAM_SLOWEST 0x0003WAITCNT'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.
#defineWAITCNT_SRAM_MASK 0x0003WAITCNT's SRAM wait bits.
#defineREG_IME (*(volatile Uint16 *)0x04000208)All interrupts' master switch.
#defineKEYCNT_SOFT_RESET 0xc00fKEYCNT values: the interrupt fires when all the listed keys are held at once.
#defineKEYCNT_SLEEP_WAKE 0xc304L, R and Select, which wake the sleep.
#defineWAITCNT_GAME 0x4014ROM wait states 3 and 1 with the prefetch buffer on, SRAM at 4; written by the power-on set-up.
#defineDISPSTAT_VBLANK_INTR 0x0008At the start of each VBlank.
#defineDISPSTAT_HBLANK_INTR 0x0010At the end of each line.
#defineDISPSTAT_VCOUNT_INTR 0x0020On the DISPSTAT_VCOUNT_LINE line.
#defineDISPSTAT_VCOUNT_LINE (line) ((line) << 8)DISPSTAT's high byte: the line the VCount interrupt fires on (the LYC compare).
#defineDISPLAY_WIDTH 240The screen's size in pixels.
#defineDISPLAY_HEIGHT 160
#defineDISPLAY_TILE_WIDTH (DISPLAY_WIDTH / 8)The screen's size in 8-pixel tiles.
#defineDISPLAY_TILE_HEIGHT (DISPLAY_HEIGHT / 8)
#defineRGB_RED (color) ((color) & 0x1f)A 15-bit colour's red, green and blue levels, 0 to 31 each.
#defineRGB_GREEN (color) (((color) >> RGB_GREEN_SHIFT) & 0x1f)
#defineRGB_BLUE (color) (((color) >> RGB_BLUE_SHIFT) & 0x1f)
#defineRGB_LEVEL_MAX 31A colour channel's brightest level.
#defineRGB_WHITE RGB(RGB_LEVEL_MAX, RGB_LEVEL_MAX, RGB_LEVEL_MAX)The brightest colour, every channel at its highest level.
#defineRED_BITS RGB(RGB_LEVEL_MAX, 0, 0)A 15-bit colour's red, green and blue bits.
#defineGREEN_BITS RGB(0, RGB_LEVEL_MAX, 0)
#defineBLUE_BITS RGB(0, 0, RGB_LEVEL_MAX)
#defineVRAM 0x06000000Video RAM: background tiles and maps, then sprite tiles.
#defineBG_CHAR_SIZE 16384Bytes in a character block, 16 KB.
#defineBG_SCREEN_SIZE 2048Bytes in a screen block, 2 KB.
#defineBG_SCREEN_WIDTH 32Tiles in a row of a screen block, whose map is 32 tiles square.
#defineMAP_ROW_BYTES (BG_SCREEN_WIDTH * 2)The bytes of one row of a text background map, 32 entries.
#defineMAP_ROW_WORDS (MAP_ROW_BYTES / 4)The words of the same row, two entries a word.
#defineTILE_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.
#defineTILE_PAIR_STEP ((Uint32)2 << 16 | 2)
#defineBG_TILE_PALETTE (n) ((n) << 12)A screen block entry's 16-colour palette, in its top four bits.
#defineBG_TILE_PALETTE_OF (entry) (((entry) >> 12) & 0xf)The palette a map entry draws its tile with, 0 to 15.
#definePIXELS_4BPP (color) ((color) * 0x11111111u)A word of eight 4-bit pixels, all colour color: one row of a 16-colour tile.
#definePIXELS_8BPP (color) ((color) * 0x01010101)A word of four 8-bit pixels, all colour color.
#defineSIO_MULTI_SI 0x0004Multiplayer: this console's SI pin, clear on the parent.
#defineSIO_MULTI_SD 0x0008Multiplayer: every console is ready.
#defineSIO_ID 0x0030Multiplayer: this console's id, 0 the parent.
#defineSIO_ID_SHIFT 4SIO_ID's lowest bit.
#defineSIO_ID_OF (control) (((control) << 26) >> 30)The multiplayer id (SIO_ID) in a SIOCNT value, taken out by shifts.
#defineSIO_ERROR 0x0040Multiplayer: the last transfer failed.
#defineSIO_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.
#defineOAM_SIZE 1024OAM's size in bytes: 128 sprites of 8 bytes.
#defineOBJ_SIZE_8X8 0x00000000A 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.
#defineOBJ_SIZE_16X16 0x40000000
#defineOBJ_SIZE_32X32 0x80000000
#defineOBJ_SIZE_64X64 0xc0000000
#defineOBJ_SIZE_16X8 0x00004000
#defineOBJ_SIZE_32X8 0x40004000
#defineOBJ_SIZE_32X16 0x80004000
#defineOBJ_SIZE_64X32 0xc0004000
#defineOBJ_SIZE_8X16 0x00008000
#defineOBJ_SIZE_16X32 0x80008000
#defineOBJ_SIZE_32X64 0xc0008000
#defineOBJ_AFFINE 0x00000100Drawn through its affine matrix.
#defineOBJ_DOUBLE_SIZE 0x00000200An affine sprite drawn in a box twice its size, so turning never clips it.
#defineOBJ_X (x) ((x) << 16)A sprite's x in the attr01 word of an OAM_WORDS entry, whose attribute 1 is its high half.
#defineOBJ_MODE (mode) ((mode) << 10)An SPR_MODE.
#defineOBJ_256_COLORS 0x000020008bpp tiles, as BGCNT_256_COLORS.
#defineOBJ_HFLIP 0x10000000A plain sprite mirrored left to right.
#defineOBJ_VFLIP 0x20000000A plain sprite mirrored top to bottom.
#defineOBJ_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.
#defineOBJ_PALETTE (n) ((n) << 12)
#defineOBJ_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.
#defineOBJ_X_MASK 0x1ffAttribute 1's nine bits of x: a sprite left of the screen is at 512 less its distance.
#defineOBJ_Y_MASK 0xffAttribute 0's eight bits of y: a sprite's y wraps round at 256 lines.
#defineOBJ_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.
#defineOBJ_TILE_MASK 0x3ffAttribute 2's ten bits of tile number, counted in 4-bit tiles from the start of sprite VRAM.
#defineKEYCNT_DISARMED 0xc3ffRequires all ten keys together to prevent the reset chord retriggering it.
#defineEVENT_PASS_TICK 0x480An event's priority: the high byte picks the pass that runs it, the low byte ranks it within the pass (higher runs first).
#defineEVENT_PASS_VBLANK 0xc80
#defineEVENT_PASS_VBLANK_FIRST (EVENT_PASS_VBLANK + 127)The highest rank in the VBlank pass: an event added here runs first of the VBlank events.
#defineEVENT_PRIORITY_EMPTY -1An empty slot's priority, sorted last: the sort reads priorities signed.
#defineEVENT_PRIORITY_REMOVED 0x7fffA removed event's priority: its odd high byte matches no pass, and as the highest priority it sorts to the front of the table.
#defineEVENT_STATE_HIGH (task) (((Uint8 *)&(task)->priority)[1])An event's priority's high byte: the pass it runs in.
#defineEVENT_SUSPENDED 1The bit of an event's high priority byte (EVENT_STATE_HIGH) that suspends it.
#defineEVENT_FLAG_KEEP_RUNNING 1The bit of an event's flags that keeps it running while sySuspendOverlayEvents suspends the others.
#defineEVENT_IN_OVERLAY (task) (((task)->callback >> 24) == EWRAM_START >> 24)Whether the event's function is in EWRAM, where a scene's overlay runs.
#defineINTR_FLAG_VBLANK (1 << IRQ_VBLANK)The bits of IE and IF for the interrupts the game handles.
#defineINTR_FLAG_TIMER3 (1 << IRQ_TIMER3)
#defineINTR_FLAG_SERIAL (1 << IRQ_SERIAL)
#defineINTR_FLAG_KEYPAD (1 << IRQ_KEYPAD)
#defineINTR_FLAG_GAMEPAK (1 << IRQ_GAMEPAK)
#defineRamIwramIrqMain FIXED_ADDRESS((Uint8 *), 0x03000100, syIWRAMIRQMain)Where syInstallIWRAMAndIRQs copies the resident IWRAM code.
#defineRamIrqVector FIXED_ADDRESS((void **), 0x03007ffc, IrqVector)The BIOS's interrupt vector at the top of IWRAM.
#defineRamHeapSlots FIXED_ADDRESS((HEAP_SLOTS *), 0x03000000, HeapSlotsWork)
#defineHEAP_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.
#defineAFFINE_SCALE_ONE (1 << 8)The affine group.
#defineDMA0_CONTROL 5DMA channel 0's control halfword (DMA0CNT_H) among REG_DMA0's halfwords.
#defineDMA3 ((volatile DMA_REGISTERS *)&REG_DMA3SAD)DMA3, the channel the game copies with, as its three registers.
#defineTICKS_PER_SECOND 60The tick group.
#defineIO_WRITE_QUEUE_SIZE 32The io_write_queue group.
#defineIO_WRITE_BYTE (1 << 16)Writes a byte.
#defineIO_WRITE_HALFWORD (2 << 16)Writes a halfword.
#defineIO_WRITE_WORD (3 << 16)Writes a word.
#defineIO_WRITE_SET (4 << 16)ORs the value into the register instead of storing it.
#defineIO_WRITE_CLEAR (8 << 16)Clears the value's bits in the register instead of storing it.
#definesyWordsClearEntryThe iwram_call group.
#definesyWordsFillEntry
#definesyMulFX(left * right) >> 16 with a 64-bit product: the 16.16 product of two 16.16 numbers.
#definesyFixedDivEntryvalue / divisor as a 16.16 number: value times 2^30 / divisor, shifted down 14.
#definesySquartEntryThe square root of value, rounded down; 0 for a negative value.
#definesyDecompressBitRunsPaints 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.
#definesyMultiMatrixEntryMultiplies the current matrix by matrix.
#definesyVectorTransformEntryReads all three word-aligned coordinates before writing the result.
#definesyIntegerDivideEntry
#definesyIntegerDivideUnsignedEntry
#definesyDecompressSpritePictureEntry
#definesyWordsCopyEntry
#definesyWordsCopyOffset 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.
#definesyWordsCopyLinkedsyWordsCopy 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.
#defineRECIPROCAL_OF (d) (0xffffffffU / (d) + 1)The mul_fx group.
#defineBATTLE_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.
#defineBATTLE_PROJECTION_CENTER_Y 120
#defineRamMapMetatileBufferThe ram_buffer group.
#defineRamDecodeBuffer FIXED_ADDRESS((Uint8 *), 0x0201c000, DecodeBuffer)
#defineRamMapCollision FIXED_ADDRESS((Uint8 *), 0x0202c000, MapGridShapes)
#defineRamMapScenePoints FIXED_ADDRESS((Uint8 *), 0x0202e008, MapScenePoints)
#defineRamBgTileBuffer FIXED_ADDRESS((Uint8 *), 0x02038000, BgTileBuffer)
#defineRamMapBlocks FIXED_ADDRESS((Uint8 *), 0x02020000, MetatileTiles)The metatile tiles table (MetatileTiles), as fdMapGridRenderMetatileTilesRow reads it.
#defineRamMapShapeGrid FIXED_ADDRESS((Uint8 *), 0x02024000, MapShapeGrid)
#defineRamIwramHeapEndThe end of the IWRAM heap, which the allocators test against, and the bottom of the stacks.
#defineRamTickCount FIXED_ADDRESS((Uint32 *), 0x0300122c, TickCount)The tick counter, as the overlays of Airs Rock, Atteka Inlet and Ancient Lemuria read it.
#defineRamWorldMapScrollThe map screen's scroll (x, then y, 16.16 pixels), as fdMapScreenUpdateScroll reads it.
#defineRamWorldMapStateThe map screen's state, as its setup (fdMapScreenInit) reaches it.
#defineRamWorldMapCursorWhere fdMapScreenUpdateScroll reads the cursor from (x, then y, 16.16 pixels): the setup points it at the state's cursor.
#defineRamWorldMapCursorStartThe cursor's place when the screen opens (x, then y, 16.16 pixels).
#defineSCENE_STATE_CHOSEN_DJINN 6480Where 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.
#defineBUP_IMAGE_GAME_FLAGS 64Where a save image, EWRAM from BupBuffer as a part holds it, keeps the game flags, MainRoutineStateWork and CharacterUnits.
#defineBUP_IMAGE_MAIN_ROUTINE_STATE 576
#defineBUP_IMAGE_UNITS 1312
#defineBROKEN_SEAL_SAVE_IMAGE_UNITS 1280Where 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.
#defineSERIAL_PACKET_BYTES 32The bytes of one packet buffer in SERIAL_STATE.storage.
#defineSERIAL_BLOCK_NUMBER_MASK 0x7fSERIAL_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).
#defineSERIAL_BLOCK_REWIND 0x80bit 7: rewind to the block number
#defineSERIAL_STATUS_RUNNING 0x80SERIAL_TRANSFER_STATE.status's bit 7, set when a send or receive starts; the receiver counts its blocks in the low bits (sySerialStepBlockTransfer).
#defineVRAM_CACHE_ENTRY_GLYPH_TILES 95The window sprites' glyph tiles (WIN_STATE.glyphTiles), a cache entry kept for this one use.
#defineVRAM_CACHE_CLEAR ((const void *)-1)syVRAMCacheLoad's source that clears the entry's VRAM instead of copying.

Typedefs

NameDescription
typedef void (*EVENT_FUNC )(void);
typedef void (*INTERRUPT_HANDLER )(void);

Enumerations

NameDescription
enumDISPLAY_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.
enumKEY_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.
enumSPR_MODE { OBJ_MODE_NORMAL, OBJ_MODE_SEMI_TRANSPARENT, OBJ_MODE_WINDOW }A sprite's mode, OAM attribute 0's bits 11..10.
enumOAM_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.
enumOBJ_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.
enumOBJ_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").
enumEVENT_LIMITS { EVENT_COUNT }The event group.
enumanonymous enum { IRQ_VBLANK, IRQ_HBLANK, IRQ_VCOUNT, IRQ_TIMER0, IRQ_TIMER1, … }The irq group.
enumHEAP_SLOT { HEAP_SLOT_MATRIX_STACK, HEAP_SLOT_SPRITE_ANIMATIONS, HEAP_SL … }The heap slots shared across folders, by byte offset into HeapSlotsWork.
enumanonymous enum { MATRIX_TRANSLATION_X, MATRIX_TRANSLATION_Y, MATRIX_TRANSLATI … }The matrix group.
enumanonymous enum { BUP_FLASH_TIMER, BUP_FLASH_IDENTIFY_ATTEMPTS, BUP_SECTOR_COU … }The save group.
enumSERIAL_PHASE { SERIAL_PHASE_SEARCHING, SERIAL_PHASE_CONNECTED }SERIAL_STATE.phase.
enumSERIAL_MODE { SERIAL_MODE_CHILD, SERIAL_MODE_CLOCKING }SERIAL_STATE.mode: how this console takes part in the link.
enumLINK_STAT { LINK_STATUS_HEARD_BOTH, LINK_STATUS_CLOCKING, LINK_STATUS_ER … }The link status bits sySerialExchangePayloads returns.
enumSERIAL_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.
enumSERIAL_RECEIVE_STATE { SERIAL_RECEIVE_IDLE, SERIAL_RECEIVE_ACTIVE, SERIAL_RECEIVE_D … }SERIAL_TRANSFER_STATE.flags: how far this console's receive has got.
enumSERIAL_SEND_STATE { SERIAL_SEND_IDLE, SERIAL_SEND_MORE, SERIAL_SEND_LAST }SERIAL_TRANSFER_STATE.peerFlags: the kind of block this console sends.
enumVRAM_BLOCK_LIMITS { VRAM_CACHE_ENTRY_COUNT, VRAM_BLOCK_COUNT, VRAM_BLOCK_BYTES, … }The vram_cache group.

Functions

NameDescription
FIXEDsyIWRAMMulFX (FIXED a, FIXED b)

Variables

NameDescription
extern Uint8syIWRAMIRQMain []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 Uint8HeapSlotsWork []
extern Uint8syIWRAMWordsClear []
extern Uint8syIWRAMWordsFill []
extern Uint8syIWRAMDivFX []
extern Uint8syIWRAMSquart []
extern Uint8syIWRAMExpandBitRuns []
extern Uint8syIWRAMMultiMatrix []
extern Uint8syIWRAMTransformVector []
extern Uint8syIWRAMSignedDivide []
extern Uint8syIWRAMUnsignedDivide []
extern Uint8syIWRAMDecompress []
extern Uint8syIWRAMWordsCopy []

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 *)&REG_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.

EnumeratorValueDescription
DISPCNT_MODE_00x0000Four text backgrounds.
DISPCNT_MODE_10x0001BG0 and BG1 text, BG2 affine.
DISPCNT_MODE_20x0002BG2 and BG3 affine.
DISPCNT_OBJ_1D_MAP0x0040Sprite tiles in one run, not a 2D sheet.
DISPCNT_BG0_ON0x0100
DISPCNT_BG1_ON0x0200
DISPCNT_BG2_ON0x0400
DISPCNT_BG3_ON0x0800
DISPCNT_OBJ_ON0x1000
DISPCNT_WIN0_ON0x2000
DISPCNT_WIN1_ON0x4000
DISPCNT_OBJWIN_ON0x8000The 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.

EnumeratorValueDescription
KEY_A0x001
KEY_B0x002
KEY_SELECT0x004
KEY_START0x008
KEY_RIGHT0x010
KEY_LEFT0x020
KEY_UP0x040
KEY_DOWN0x080
KEY_R0x100
KEY_L0x200
KEYS_HORIZONTALKEY_RIGHT | KEY_LEFT
KEYS_VERTICALKEY_UP | KEY_DOWN
KEYS_DPADKEYS_HORIZONTAL | KEYS_VERTICAL
KEYS_SHOULDERSKEY_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.

EnumeratorValueDescription
OBJ_MODE_NORMAL0
OBJ_MODE_SEMI_TRANSPARENT1blended as BLDCNT's first target
OBJ_MODE_WINDOW2drawn 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.

EnumeratorValueDescription
OAM_AFFINE_OFF0
OAM_AFFINE_ON1
OAM_AFFINE_DOUBLE_SIZE3

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.

EnumeratorValueDescription
OBJ_COLORS_160
OBJ_COLORS_2561

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").

EnumeratorValueDescription
OBJ_SHAPE_SQUARE0
OBJ_SHAPE_HORIZONTAL1wider than tall
OBJ_SHAPE_VERTICAL2taller 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.

EnumeratorValueDescription
EVENT_COUNT24

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.

EnumeratorValueDescription
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.

EnumeratorValueDescription
HEAP_SLOT_MATRIX_STACKoffsetof(HEAP_SLOTS, matrixStack)
HEAP_SLOT_SPRITE_ANIMATIONSoffsetof(HEAP_SLOTS, spriteAnimations)
HEAP_SLOT_SPRITESoffsetof(HEAP_SLOTS, sprites)
HEAP_SLOT_ACTORSoffsetof(HEAP_SLOTS, actors)
HEAP_SLOT_ACTOR_SYSTEMoffsetof(HEAP_SLOTS, actorSystem)
HEAP_SLOT_WORLD_MAP_AFFINEoffsetof(HEAP_SLOTS, worldMapAffine)
HEAP_SLOT_MAP_GRIDoffsetof(HEAP_SLOTS, mapGrid)
HEAP_SLOT_BATTLEoffsetof(HEAP_SLOTS, battleState)
HEAP_SLOT_BATTLE_SCANLINESoffsetof(HEAP_SLOTS, battleScanlines)
HEAP_SLOT_BATTLE_UNUSEDoffsetof(HEAP_SLOTS, battleUnused)
HEAP_SLOT_CAMERAoffsetof(HEAP_SLOTS, cameraState)
HEAP_SLOT_TILE_SCRATCHoffsetof(HEAP_SLOTS, tileScratch)
HEAP_SLOT_WINDOWoffsetof(HEAP_SLOTS, windowState)
HEAP_SLOT_PARTY_STATUSoffsetof(HEAP_SLOTS, partyStatus)
HEAP_SLOT_ICON_TRANSFERoffsetof(HEAP_SLOTS, glyphTransfer)
HEAP_SLOT_SELECTION_MENUoffsetof(HEAP_SLOTS, selectionMenu)
HEAP_SLOT_TICK_SCRATCHoffsetof(HEAP_SLOTS, frameScratch)
HEAP_SLOT_PICTURE_UPLOADERoffsetof(HEAP_SLOTS, pictureUploader)
HEAP_SLOT_MIND_READoffsetof(HEAP_SLOTS, mindRead)
HEAP_SLOT_BATTLE_EFFECToffsetof(HEAP_SLOTS, battleEffect)
HEAP_SLOT_BATTLE_CANVASoffsetof(HEAP_SLOTS, battleCanvas)
HEAP_SLOT_BATTLE_SHEEToffsetof(HEAP_SLOTS, battleSheet)
HEAP_SLOT_RAM_CODEoffsetof(HEAP_SLOTS, ramCode)
HEAP_SLOT_FIELDoffsetof(HEAP_SLOTS, fieldState)
HEAP_SLOT_PALETTE_CYCLESoffsetof(HEAP_SLOTS, paletteCycles)
HEAP_SLOT_WEATHERoffsetof(HEAP_SLOTS, weather)
HEAP_SLOT_FIELD_BLENDoffsetof(HEAP_SLOTS, fieldBlend)
HEAP_SLOT_SCREEN_TRANSITIONoffsetof(HEAP_SLOTS, screenTransition)
HEAP_SLOT_PALETTE_FADEoffsetof(HEAP_SLOTS, paletteFade)
HEAP_SLOT_LINE_SCROLLoffsetof(HEAP_SLOTS, lineScroll)
HEAP_SLOT_GROUND_MASKoffsetof(HEAP_SLOTS, groundMask)
HEAP_SLOT_BATTLE_MESSAGEoffsetof(HEAP_SLOTS, battleMsg)
HEAP_SLOT_ROPEoffsetof(HEAP_SLOTS, rope)
HEAP_SLOT_TIGHTROPEoffsetof(HEAP_SLOTS, tightrope)
HEAP_SLOT_HANGING_VINEoffsetof(HEAP_SLOTS, hangingVine)
HEAP_SLOT_BATTLE_ENTRY_TIMERoffsetof(HEAP_SLOTS, battleEntryTimer)
HEAP_SLOT_TITLE_INTROoffsetof(HEAP_SLOTS, titleIntro)
HEAP_SLOT_BATTLE_BACKGROUNDoffsetof(HEAP_SLOTS, battleBg)
HEAP_SLOT_CANVAS_MAPoffsetof(HEAP_SLOTS, canvasMap)
HEAP_SLOT_RAM_CODE_PAIREDoffsetof(HEAP_SLOTS, ramCodePaired)
HEAP_SLOT_MESSAGE_DECODERoffsetof(HEAP_SLOTS, msgDecoder)
HEAP_SLOT_BUPoffsetof(HEAP_SLOTS, bupState)
HEAP_SLOT_SETTINGS_MENUoffsetof(HEAP_SLOTS, settingsMenu)
HEAP_SLOT_ENEMY_UNITSoffsetof(HEAP_SLOTS, enemyUnits)
HEAP_SLOT_MENUoffsetof(HEAP_SLOTS, menuState)
HEAP_SLOT_FIELD_EFFECToffsetof(HEAP_SLOTS, fieldEffectState)
HEAP_SLOT_BATTLE_MENUoffsetof(HEAP_SLOTS, battleMenuState)
HEAP_SLOT_ICON_MENUoffsetof(HEAP_SLOTS, iconMenu)
HEAP_SLOT_TRIAL_ROAD_LINKoffsetof(HEAP_SLOTS, trialRoadLink)
HEAP_SLOT_CANVAS_SPRITEoffsetof(HEAP_SLOTS, canvasSprite)
HEAP_SLOT_ARC_EFFECToffsetof(HEAP_SLOTS, arcEffect)
HEAP_SLOT_DJINNI_HINTSoffsetof(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.

EnumeratorValueDescription
MATRIX_TRANSLATION_XM30
MATRIX_TRANSLATION_YM31
MATRIX_TRANSLATION_ZM32
MATRIX_WORDS12

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.

EnumeratorValueDescription
BUP_FLASH_TIMER2The timer handed to the SDK's flash library.
BUP_FLASH_IDENTIFY_ATTEMPTS8Tries, a tick apart.
BUP_SECTOR_COUNT15Flash sectors used; as a sector number, "none" in the save functions.
BUP_SECTORS_PER_PART3A part fills three sectors in a row.
BUP_SECTOR_SIZE4096
BUP_PART_NONE16The part id of a free or invalidated sector.
BUP_FILE_COUNT3The save files, parts 0 to 2.
BUP_PART_EXTRA3The part after the files, whose summary is the extra one in the save's state.
BUP_COUNTER_LIMIT65000The highest counter a write keeps; a copy written past it is rewritten as 1.
BUP_CHECKSUM_BYTESBUP_SECTORS_PER_PART * BUP_SECTOR_SIZE - 16Payload 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.

EnumeratorValueDescription
SERIAL_PHASE_SEARCHING0looking for the partner
SERIAL_PHASE_CONNECTED1

Definition at line 1795 of file definitions.h.

SERIAL_MODE

enum SERIAL_MODE

SERIAL_STATE.mode: how this console takes part in the link.

EnumeratorValueDescription
SERIAL_MODE_CHILD0
SERIAL_MODE_CLOCKINGSIO_MULTI_SDSIO_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.

enum LINK_STAT

The link status bits sySerialExchangePayloads returns.

EnumeratorValueDescription
LINK_STATUS_HEARD_BOTH3both consoles heard from this tick
LINK_STATUS_CLOCKING0x80this console clocks the transfers
LINK_STATUS_ERROR0x1000last transfer interrupt found SIOCNT's SIO_ERROR bit set
LINK_STATUS_EXTRA_CONSOLE0x2000SIOCNT'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.

EnumeratorValueDescription
SERIAL_CHANNEL_PACKET_COMPLETE1Its fourteenth halfword arrived.
SERIAL_CHANNEL_ERROR2A 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.

EnumeratorValueDescription
SERIAL_RECEIVE_IDLE0
SERIAL_RECEIVE_ACTIVE1
SERIAL_RECEIVE_DONE2the 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.

EnumeratorValueDescription
SERIAL_SEND_IDLE0
SERIAL_SEND_MORE1a block with more to follow
SERIAL_SEND_LAST2

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.

EnumeratorValueDescription
VRAM_CACHE_ENTRY_COUNT96
VRAM_BLOCK_COUNT512
VRAM_BLOCK_BYTES64
VRAM_BLOCK_OWNER_FREE255
VRAM_CACHE_OFFSET_FREE65535
VRAM_CACHE_SIZE_NO_BLOCKS16The largest size an entry has while it holds no blocks: syVRAMCacheReleaseVRAM leaves 1, which keeps the entry taken.
VRAM_CACHE_LOAD_MAX8192the 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.

On this page

StructuresMacrosTypedefsEnumerationsFunctionsVariablesDescriptionMacros in detailREG_DISPCNTREG_DISPSTATREG_VCOUNTDISPLAY_TOTAL_LINESREG_BG1CNTREG_BG2CNTREG_BG3CNTBGCNT_PRIORITYBGCNT_CHAR_BASEBGCNT_MOSAICBGCNT_256_COLORSBGCNT_SCREEN_BASEBGCNT_WRAPBGCNT_SIZEDISPCNT_MODE_MASKREG_BG1HOFSREG_BG1VOFSREG_BG2HOFSREG_BG2VOFSREG_BG3HOFSREG_BG3VOFSQ_8_8REG_BG2PAREG_BG2PBREG_BG2PCREG_BG2PDREG_BG2XREG_BG2YREG_BG3PAREG_BG3PBREG_BG3PCREG_BG3PDREG_BG3XREG_BG3YREG_WIN0HREG_WIN1HREG_WIN0VREG_WIN1VWIN_RANGEWIN_RANGE_END_MASKREG_WININREG_WINOUTWININ_WIN0_BG0WININ_WIN0_BG1WININ_WIN0_BG2WININ_WIN0_BG3WININ_WIN0_OBJWININ_WIN0_CLRWININ_WIN0_ALLWININ_WIN1_BG0WININ_WIN1_BG1WININ_WIN1_BG2WININ_WIN1_BG3WININ_WIN1_OBJWININ_WIN1_CLRWININ_WIN1_ALLWINOUT_WIN01_BG0WINOUT_WIN01_BG1WINOUT_WIN01_BG2WINOUT_WIN01_BG3WINOUT_WIN01_OBJWINOUT_WIN01_CLRWINOUT_WIN01_ALLWINOUT_WINOBJ_BG0WINOUT_WINOBJ_BG1WINOUT_WINOBJ_BG2WINOUT_WINOBJ_BG3WINOUT_WINOBJ_OBJWINOUT_WINOBJ_CLRWINOUT_WINOBJ_ALLREG_MOSAICREG_BLDCNTBLDCNT_TGT1_BG0BLDCNT_TGT1_BG1BLDCNT_TGT1_BG2BLDCNT_TGT1_BG3BLDCNT_TGT1_OBJBLDCNT_TGT1_BDBLDCNT_TGT1_ALLBLDCNT_EFFECT_NONEBLDCNT_EFFECT_BLENDBLDCNT_EFFECT_LIGHTENBLDCNT_EFFECT_DARKENBLDCNT_EFFECT_MASKBLDCNT_TGT2_BG0BLDCNT_TGT2_BG1BLDCNT_TGT2_BG2BLDCNT_TGT2_BG3BLDCNT_TGT2_OBJBLDCNT_TGT2_BDBLDCNT_TGT2_ALLREG_BLDALPHABLEND_WEIGHT_MAXBLEND_ALPHABLEND_ALPHA_TOP_MASKREG_BLDYBLEND_FADE_MAXBG_CANVAS_MAPREG_BG0HOFSREG_DMA0REG_DMA3PLTT_BACKDROPBG_PLTT_SIZEBG_PLTT_COLORSOBJ_PLTT_SIZEOBJ_PLTT_COLORSPLTT_COLORSBG_PLTTPALETTE_COLORSPALETTE_BYTESBG_PLTT_COLOROBJ_PLTTOBJ_PLTT_COLORRGB_GREEN_SHIFTRGB_BLUE_SHIFTRGBIWRAM_STARTEWRAM_STARTEWRAM_ENDBG_CHAR_BLOCKBG_SCREEN_BLOCKTILE_SIZE_4BPPTILE_SIZE_8BPPTILE_ROW_SIZE_4BPPSPRITE_TILESSPRITE_TILES_8BPPOBJ_VRAM0OBJ_VRAMREG_TM3CNTREG_TM3CNT_HTIMER_INTR_ENABLETIMER_ENABLETIMER_256CLKREG_SIODATA32REG_SIOCNTREG_SIOCNT16REG_SIODATA8REG_KEYINPUTREG_KEYCNTREG_RCNTSIO_115200_BPSSIO_STARTSIO_32BIT_MODESIO_MULTI_MODESIO_INTR_ENABLERCNT_SIO_MODERCNT_GPIO_MODEDMA_DEST_INCDMA_DEST_DECDMA_DEST_FIXEDDMA_DEST_RELOADDMA_SRC_INCDMA_SRC_DECDMA_SRC_FIXEDDMA_REPEATDMA_16BITDMA_32BITDMA_DREQ_ONDMA_START_NOWDMA_START_VBLANKDMA_START_HBLANKDMA_START_SPECIALDMA_INTR_ENABLEDMA_ENABLEDMA_CONTROL_SHIFTDMA_BUSYDMA_START_TIMING_DRQ_REPEATDMA_COPY_WORDSDMA_FILL_WORDSDMA_FILL_HALFWORDSDMA_COPY_HALFWORDSDMA_COPY_HALFWORDS_DOWNDMA_HBLANK_HALFWORD_PER_LINEDMA_HBLANK_WORDS_PER_LINEDMA_HBLANK_WORD_PER_LINECPU_SET_SRC_FIXEDCPU_SET_32BITOAMKEYS_MASKDPAD_INDEXREG_BG0CNTREG_BG0VOFSREG_SOUNDCNT_HSOUND_CGB_MIX_FULLSOUND_A_MIX_FULLSOUND_B_MIX_FULLSOUND_ALL_MIX_FULLSOUND_A_RIGHT_OUTPUTSOUND_A_LEFT_OUTPUTSOUND_A_TIMER_0SOUND_A_FIFO_RESETSOUND_B_RIGHT_OUTPUTSOUND_B_LEFT_OUTPUTSOUND_B_TIMER_0SOUND_B_FIFO_RESETREG_SOUNDBIASREG_FIFO_AREG_FIFO_BREG_DMA0SADREG_DMA0DADREG_DMA0CNTREG_DMA0CNT_HREG_DMA1SADREG_DMA1DADREG_DMA1CNTREG_DMA1CNT_HREG_DMA2SADREG_DMA2DADREG_DMA2CNTREG_DMA2CNT_HREG_DMA3SADREG_DMA3DADREG_DMA3CNTREG_DMA3CNT_HREG_TM0CNT_LREG_TM0CNT_HREG_TM1CNT_LREG_TM1CNT_HREG_TM2CNT_LREG_TM2CNT_HREG_IEREG_IFREG_WAITCNTWAITCNT_SRAM_SLOWESTWAITCNT_SRAM_MASKREG_IMEKEYCNT_SOFT_RESETKEYCNT_SLEEP_WAKEWAITCNT_GAMEDISPSTAT_VBLANK_INTRDISPSTAT_HBLANK_INTRDISPSTAT_VCOUNT_INTRDISPSTAT_VCOUNT_LINEDISPLAY_WIDTHDISPLAY_HEIGHTDISPLAY_TILE_WIDTHDISPLAY_TILE_HEIGHTRGB_REDRGB_GREENRGB_BLUERGB_LEVEL_MAXRGB_WHITERED_BITSGREEN_BITSBLUE_BITSVRAMBG_CHAR_SIZEBG_SCREEN_SIZEBG_SCREEN_WIDTHMAP_ROW_BYTESMAP_ROW_WORDSTILE_PAIRTILE_PAIR_STEPBG_TILE_PALETTEBG_TILE_PALETTE_OFPIXELS_4BPPPIXELS_8BPPSIO_MULTI_SISIO_MULTI_SDSIO_IDSIO_ID_SHIFTSIO_ID_OFSIO_ERRORSIO_ERROR_OFOAM_SIZEOBJ_SIZE_8X8OBJ_SIZE_16X16OBJ_SIZE_32X32OBJ_SIZE_64X64OBJ_SIZE_16X8OBJ_SIZE_32X8OBJ_SIZE_32X16OBJ_SIZE_64X32OBJ_SIZE_8X16OBJ_SIZE_16X32OBJ_SIZE_32X64OBJ_AFFINEOBJ_DOUBLE_SIZEOBJ_XOBJ_MODEOBJ_256_COLORSOBJ_HFLIPOBJ_VFLIPOBJ_PRIORITYOBJ_PALETTEOBJ_AFFINE_PARAMETEROBJ_X_MASKOBJ_Y_MASKOBJ_POSITIONOBJ_TILE_MASKKEYCNT_DISARMEDEVENT_PASS_TICKEVENT_PASS_VBLANKEVENT_PASS_VBLANK_FIRSTEVENT_PRIORITY_EMPTYEVENT_PRIORITY_REMOVEDEVENT_STATE_HIGHEVENT_SUSPENDEDEVENT_FLAG_KEEP_RUNNINGEVENT_IN_OVERLAYINTR_FLAG_VBLANKINTR_FLAG_TIMER3INTR_FLAG_SERIALINTR_FLAG_KEYPADINTR_FLAG_GAMEPAKRamIwramIrqMainRamIrqVectorRamHeapSlotsHEAP_SLOT_ATAFFINE_SCALE_ONEDMA0_CONTROLDMA3TICKS_PER_SECONDIO_WRITE_QUEUE_SIZEIO_WRITE_BYTEIO_WRITE_HALFWORDIO_WRITE_WORDIO_WRITE_SETIO_WRITE_CLEARsyWordsClearEntrysyWordsFillEntrysyMulFXsyFixedDivEntrysySquartEntrysyDecompressBitRunssyMultiMatrixEntrysyVectorTransformEntrysyIntegerDivideEntrysyIntegerDivideUnsignedEntrysyDecompressSpritePictureEntrysyWordsCopyEntrysyWordsCopyOffsetsyWordsCopyLinkedRECIPROCAL_OFBATTLE_PROJECTION_CENTER_XBATTLE_PROJECTION_CENTER_YRamMapMetatileBufferRamDecodeBufferRamMapCollisionRamMapScenePointsRamBgTileBufferRamMapBlocksRamMapShapeGridRamIwramHeapEndRamTickCountRamWorldMapScrollRamWorldMapStateRamWorldMapCursorRamWorldMapCursorStartSCENE_STATE_CHOSEN_DJINNBUP_IMAGE_GAME_FLAGSBUP_IMAGE_MAIN_ROUTINE_STATEBUP_IMAGE_UNITSBROKEN_SEAL_SAVE_IMAGE_UNITSSERIAL_PACKET_BYTESSERIAL_BLOCK_NUMBER_MASKSERIAL_BLOCK_REWINDSERIAL_STATUS_RUNNINGVRAM_CACHE_ENTRY_GLYPH_TILESVRAM_CACHE_CLEARTypedefs in detailEVENT_FUNCINTERRUPT_HANDLEREnumerations in detailDISPLAY_CONTROLKEY_MASKSPR_MODEOAM_AFFINE_MODEOBJ_COLOBJ_SHAPEEVENT_LIMITSanonymous enumHEAP_SLOTanonymous enumanonymous enumSERIAL_PHASESERIAL_MODELINK_STATSERIAL_CHANNEL_FLAGSERIAL_RECEIVE_STATESERIAL_SEND_STATEVRAM_BLOCK_LIMITSFunctions in detailsyIWRAMMulFXVariables in detailHeapSlotsWorksyIWRAMWordsClearsyIWRAMWordsFillsyIWRAMDivFXsyIWRAMSquartsyIWRAMExpandBitRunssyIWRAMMultiMatrixsyIWRAMTransformVectorsyIWRAMSignedDividesyIWRAMUnsignedDividesyIWRAMDecompresssyIWRAMWordsCopy