Matching Progress
By level
| Level | Meaning | Functions | Code bytes | Data bytes | Of all code |
|---|---|---|---|---|---|
| matched | assembles to the original bytes | 3,736 | 249,251 | 23,638 | 100.0% |
| readable | matched, and meets the readability standard | 3,736 | 249,251 | 23,638 | 100.0% |
| verified | readable, and passed an independent review | 3,736 | 249,251 | 23,638 | 100.0% |
Each level includes the next one up: verified functions are also readable, and readable functions are also matched. The share counts code bytes only; data bytes are tables and fill the source also emits.
By bank
| Bank | Code bytes | Matched code | Matched data | Matched | Matched fns | Readable | Verified |
|---|---|---|---|---|---|---|---|
$C0 | 60,857 | 60,857 | 4,679 | 100.0% | 747 | 747 | 747 |
$C1 | 62,682 | 62,682 | 2,854 | 100.0% | 764 | 764 | 764 |
$C2 | 60,695 | 60,695 | 4,841 | 100.0% | 1,396 | 1,396 | 1,396 |
$C3 | 4,076 | 4,076 | 223 | 100.0% | 43 | 43 | 43 |
$C6 | 3,619 | 3,619 | 477 | 100.0% | 51 | 51 | 51 |
$C7 | 2,672 | 2,672 | 929 | 100.0% | 36 | 36 | 36 |
$CC | 4,995 | 4,995 | 0 | 100.0% | 14 | 14 | 14 |
$CD | 15,824 | 15,824 | 560 | 100.0% | 365 | 365 | 365 |
$CE | 3,729 | 3,729 | 256 | 100.0% | 10 | 10 | 10 |
$CF | 7,013 | 7,013 | 411 | 100.0% | 58 | 58 | 58 |
$D1 | 5,858 | 5,858 | 532 | 100.0% | 67 | 67 | 67 |
$FD | 15,668 | 15,668 | 6,695 | 100.0% | 158 | 158 | 158 |
$FF | 1,563 | 1,563 | 1,181 | 100.0% | 27 | 27 | 27 |
By day
By address
Each cell is a 4 KB slice of a bank; select one for the routines inside. The address map shows every code bank.
Boot and field engine: game loop, NMI, location loading, map, event scripts, sprites
Battle engine: main loop, turn lists, enemy scripts, actions, menu, targeting, status bar
Scene mode (locations $01F0 and up), menu entry points, text decoder
Kernel of the compressed scene module (its decompressor $C3:0557 is called from many banks); the module itself is packed at $C3:1313
Scene helper routines ($C6:E000-$EE3F) and scene tables
Sound driver interface (the engine calls $C7:0004 for audio commands), the SPC700 sound driver, samples
Item and tech name tables read by the battle menu, plus code
Called every battle frame through $CD:0009
Battle routines called from $CD and $D1 ($CE:E000-$F0DF)
Battle bootstrap at $CF:FB65
Battle window maps (the command window is copied from $D1:5800)
Main init, battle helpers, field HDMA and location animation set-up
Menu helper routines ($FF:F540-$FFFF)
- matched (and readable)
- every routine verified
- ✓3routines verified so far
- not matched yet
- bar: share of the slice matched
Bank $C0 · $C0:0000–$0FFF
$C0:0000
Verified · 43
- verified
ReentryVectors$C0:0000 · 14 B · EngineMid-game re-entry vector table at the start of the bank. - verified
GameLoop$C0:000E · 79 B · Enginefull (cold) init, then the game loop - verified
GameLoop_Main$C0:005D · 21 B · Enginewarm-restart entry. - verified
GameLoop_NotBankC2$C0:0072 · 11 B · Enginereached when bit 15 of Loc_Id - Loc_FirstBankC2 is set. - verified
GameLoop_LoadField$C0:007D · 26 B · Engineloads the field location Loc_Id and falls into the per-frame loop. - verified
GameLoop_FrameBody$C0:0097 · 40 B · Enginethe per-frame field loop. - verified
Field_EndOfFrame$C0:00BF · 31 B · EngineEnd-of-frame work, called once per frame just before Field_WaitFrame waits for the NMI; it is not an interrupt handler and waits for nothing itself. - verified
Field_EndOfFrameShort$C0:00DE · 13 B · Enginethe EngFD_UnkC2C1 + FdVec_FFF7 part of Field_EndOfFrame only, for the fade and idle loops. - verified
Field_IdleFrame$C0:00EB · 9 B · Engineone frame of field upkeep without game logic: Field_FrameUpdate, Field_EndOfFrameShort, Field_WaitFrame (tail jump, whose RTS returns to this routine's caller). - verified
LoadLocation$C0:00F4 · 39 B · EngineOne-time location-load called once per scene entry from GameLoop_LoadField (its only caller, JSR at $C0:0088). - verified
Field_SaveState$C0:011B · 138 B · Engine(was Sub_011B.) Saves the field before handing control to bank $C2 (BankC2_Entry8000), so Field_RestoreState can rebuild it after: - if Field_Unk29 is set, force it to 1 and clear Field_Unk26/27... - verified
Field_RestoreState$C0:01A5 · 167 B · Engine(was Sub_01A5.) Rebuilds the field after a bank-$C2 round trip: 1. - verified
Scene_Unk024C$C0:024C · 55 B · EngineThe check DefaultHandler makes before starting a battle (its SceneFlag_Battle path): C=1 means no battle after all, and DefaultHandler then clears the flag; C=0 goes on to the battle. - verified
Scene_Unk0283$C0:0283 · 200 B · EngineRebuilds the field after a battle; DefaultHandler calls it right after JSL EngCall_BattleMain. - verified
Field_Unk034B$C0:034B · 68 B · EngineScene_Unk024C's no-battle path, and the end of Scene_Unk0283's rebuild (fall-through). - verified
Field_Unk038F$C0:038F · 12 B · EngineFills the field/battle hand-off block before a battle (see the FieldBtl* structs in ram_engine.inc): FieldBtl_SaveTileAttrs, FieldBtl_SavePartyPos, FieldBtl_SaveObjs, then FieldBtl_SavePpu as a... - verified
FieldBtl_SaveTileAttrs$C0:039B · 127 B · EngineCopies the 16 x 16-tile window of Map_TileAttrA at the screen origin (Map_TileOriginX/Y / 2, wrapped with Map_ColMask1 / Map_RowMask1) to FieldBtl_AttrA, the same window of Map_TileAttrB to... - verified
FieldBtl_SavePartyPos$C0:041A · 211 B · EngineFor each party member present (Party_ObjSlot, Party_ObjSlot1, Party_ObjSlot2; bit 7 = none) fills its FieldBtlPc record: tile X/Y relative to FieldBtl_OriginX/Y (Map_TileOriginX/Y / 2, unmasked... - verified
FieldBtl_SaveObjs$C0:04ED · 106 B · EngineMarks all 8 FieldBtlObj records empty (Unk05/Unk06 = FieldBtl_NoObj) and all 8 FieldBtl_ObjSlots $FF, then runs FieldBtl_SaveObj for Field_BattleObjList entries 0-5 until one has bit 7 set. - verified
FieldBtl_SaveObj$C0:0557 · 192 B · EngineSaves one object (A = its slot) in a FieldBtlObj record, unless its Obj_VramTile low byte is FieldBtl_ObjTileLimit or more (then it does nothing). - verified
Field_Unk0617$C0:0617 · 86 B · EngineFills Field_BattleObjList for Scene_Unk024C: walks the object slots from Evt_ObjCount x 2 down to 2 (slot 0 is never looked at) and lists each one that has Obj_Unk1A81 bit 7 set or Obj_Unk0F00... - verified
FieldBtl_SavePpu$C0:066D · 168 B · EngineFills FieldBtlPpu from the field's screen settings: the three tilemap bytes (each a Map_TilemapVram* high byte ORed with a size byte), the main/sub screen and colour-math values, Fade_FixedColor... - verified
FieldBtl_Restore$C0:0715 · 86 B · EngineScene_Unk0283's object rebuild after a battle: FieldBtl_RestOriginX/Y = Map_TileOriginX/Y / 2, FieldBtl_RestoreObjs, FieldBtl_RestoreParty (both with 8-bit X/Y), then Oam_BuildShadow. - verified
FieldBtl_RestoreObjs$C0:076B · 129 B · EngineFor each of the 8 FieldBtl_ObjSlots that holds a slot (bit 7 clear): Obj_DrawUnlink the object (Obj_Cur = slot), then FieldBtl_RestoreObj with X = its record offset (n x FieldBtl_ObjRecSize). - verified
FieldBtl_RestoreObj$C0:07EC · 133 B · EnginePuts one object (A = slot) back from its FieldBtlObj record (X = record offset). - verified
FieldBtl_RestoreParty$C0:0871 · 47 B · EngineObj_DrawUnlink then FieldBtl_RestorePc for each party member from its FieldBtlPc record. - verified
FieldBtl_RestorePc$C0:08A0 · 101 B · EngineFieldBtl_RestoreObj's restore path for a party member (A = slot, X = FieldBtlPc record offset): Obj_TileX/Y, the low bytes of Obj_PosX/Y, Obj_LastFrame, Obj_ScreenX/Y and Obj_AnimTimer = 0 from... - verified
Field_RestoreSaveBlock$C0:0905 · 19 B · Engine(was Sub_0905.) Copies SceneSave_Buffer ($7F:2000) back over Field_SaveBlock ($7E:0920, $14E0 bytes). - verified
Field_StashSaveBlock$C0:0918 · 19 B · Engine(was Sub_0918.) Copies Field_SaveBlock ($7E:0920, $14E0 bytes) to SceneSave_Buffer ($7F:2000). - verified
LocLoad_Unk092B$C0:092B · 53 B · EngineFirst location-load step: Loc_RecOfs = (Loc_Id & $FF) x LocRom_RecSize, plus LocRom_HalfOfs when Loc_Id bit 8 is set, i.e. - verified
LocLoad_Unk0960$C0:0960 · 125 B · EngineLoads the graphics of layers 1 and 2. - verified
LocLoad_Unk09DD$C0:09DD · 55 B · EngineUnpacks the layer 1/2 metatile table: unless LocRom.Tileset12 is LocRom_SetNone, its LocGfx_Meta12Ptrs entry is unpacked with Decomp_ToWramVec to Map_Meta12TL ($7E:B000), over the MapProps that... - verified
LocLoad_Unk0A14$C0:0A14 · 60 B · EngineUnpacks the layer-3 metatile table: unless Field_UnkBB is set (no layer 3, LocLoad_Unk6DCF) or LocRom.Tileset3 is LocRom_SetNone, its LocGfx_Meta3Ptrs entry is unpacked with Decomp_ToWramVec to... - verified
LocLoad_DrawMap$C0:0A50 · 175 B · EngineDraws the freshly loaded map: - Map_LoadTreasureTiles (DP=$1D00), Ppu_SetBgLayout and Ppu_ApplyMapScreens; - with DP=$1D00: Map_InitOrigin, LocLoad_EmptyStep, the tilemap VRAM bases... - verified
Field_RefreshHdmaLong$C0:0AFF · 41 B · Engine(was the stub AudioDrvSync; it touches no sound.) A JSL service for other banks (ReentryVectors [2]): with DP_Field and DB=$00, sets Field_Unk53Bit7, runs EngFD_UnkC2C1 twice (so both of its... - verified
Scene_ResumeNmi$C0:0B28 · 38 B · EngineScene_ReloadStep's last setup: EngFD_UnkC124 (writes HDMA table bytes in bank $7F from the map's tilemap settings; not traced), EngFD_UnkC2C1 (with 8-bit X/Y) and Hdma_InitChannelsFD, then waits... - verified
InitHW$C0:0B4E · 22 B · EngineDisables interrupts, enables forced blank, clears NMI/DMA/HDMA, and sets DB=$00 (PHA/PLB), which GameLoop_Main and other callers rely on. - verified
InstallNMI$C0:0B64 · 17 B · EngineWrites JML NmiHandler ($C0:EA63) into the RAM trampoline at $7E:0500. - verified
InstallIRQ$C0:0B75 · 17 B · EngineWrites JML IrqHandler ($C0:ECCC) into the RAM trampoline at $7E:0504. - verified
Field_InitLoadState$C0:0B86 · 240 B · Engine(was FrameStateInit.) Called once per location load from GameLoop_LoadField, not per frame. - verified
Field_SceneChangeTick$C0:0C76 · 258 B · Engine(was Sub_0C76.) Runs every frame from GameLoop_FrameBody. - verified
ModeE6_Handler$C0:0D78 · 231 B · EngineTile animation for map-tile state $E6: a 1x2 column, the tile at (Field_TileAnimX, Field_TileAnimY) and the one above it. - verified
ModeEC_Handler$C0:0E5F · 437 B · EngineTile animation for map-tile state $EC: a 2x2 block, columns col..col+1, rows row-1..row.
Bank $C0 · $C0:1000–$1FFF
$C0:1000
Verified · 35
- verified
ModeEE_Handler$C0:1014 · 437 B · EngineTile animation for map-tile state $EE: a 2x2 block, columns col-1..col, rows row-1..row (ModeEC_Handler mirrored). - verified
ModeFA_Handler$C0:11C9 · 651 B · EngineTile animation for map-tile state $FA: a 2-wide, 3-tall block, columns col..col+1, rows row-2..row. - verified
ModeFC_Handler$C0:1454 · 648 B · EngineTile animation for map-tile state $FC: a 2-wide, 3-tall block, columns col-1..col, rows row-2..row (ModeFA_Handler mirrored). - verified
DefaultHandler$C0:16DC · 509 B · EngineThe rest of Field_SceneChangeTick's request handling: reached by BRL when Field_SceneFlags bit 4 is clear or the tile mode is not one of the five Mode*_Handlers, by BRL at the end of ModeE6-FA... - verified
Field_PauseAndMenuInput$C0:18D9 · 172 B · Engine(was Sub_18D9.) Per-frame pause and menu input, called from GameLoop_FrameBody before Field_SceneChangeTick. - verified
Field_FadeToBankC2Mode5$C0:1985 · 66 B · Engine(was Sub_1985.) Called from Field_PauseAndMenuInput when Pad_Unk00F6 bit 0 is set. - verified
Field_RunBankC2Mode5$C0:19C7 · 60 B · Engine(was Sub_19C7.) Calls BankC2_Entry8000 with A = 5, X = 0 (meaning of 5 unverified; earlier notes called it "BG mode 5"), then reloads the field: restore state, re-init changed party members, move... - verified
Party_ReinitIfChanged$C0:1A03 · 169 B · Engine(was Sub_1A03.) After a bank-$C2 round trip: if Party_Members no longer matches the copy taken at load (Party_MembersCache), re-run the init function of every character object that exists... - verified
Field_ActionButton$C0:1AAC · 51 B · Engine(was Field_Unk1AAC.) Per-frame check of the action button: does nothing unless Pad_Unk00F6 bit 7 (A, if Pad_Unk00F6 has the Pad_Pressed layout) is set. - verified
Sub_1ADF$C0:1ADF · 87 B · Engine (unnamed)Purpose unknown: every variable it touches (Field_Unk34, Field_Unk62-66, Pad_Unk00F6-F8) is still unidentified, so it keeps its address name. - verified
Bg_TilemapIndex64x32$C0:1B36 · 29 B · Engine(was Sub_1B36.) Word offset of an 8x8 tile in a 64x32 BG tilemap made of two 32x32 screens side by side. - verified
LocLoad_AudioSetup$C0:1B53 · 61 B · EngineLoadLocation's sound step. - verified
Audio_PlayTileSfxA$C0:1B90 · 2 B · Engine(was Sub_1B90.) Plays sound effect Audio_SfxTileAnimA through the sound driver: Audio_CmdId = $19 (play effect), Arg0 = effect id, Arg1 = the low byte of the party leader's Obj_ScreenX (presumably... - verified
Audio_PlaySfxAtLeader$C0:1B92 · 21 B · Engineshared tail; Audio_PlayTileSfxA falls in here and Audio_PlayTileSfxB branches here (BRA at $C0:1BA9). - verified
Audio_PlayTileSfxB$C0:1BA7 · 4 B · Engine(was Sub_1BA7.) Plays sound effect Audio_SfxTileAnimB: same as Audio_PlayTileSfxA with the other effect id, sharing its tail Audio_PlaySfxAtLeader. - verified
MusicCueDispatch$C0:1BAB · 59 B · EngineBefore a battle, probably: with FieldBtl_EvtKeepMusic clear, Audio_Unk1E10 = $FF and command Audio_Cmd14 with Audio_CmdArg0 = Audio_SfxUnkFA ($45 at load: the battle music, probably); with it set... - verified
AudioFadeDispatch$C0:1BE6 · 278 B · EngineAfter a battle, probably, by FieldBtl_Result: - 1 (wait for a button and restart: the party lost, probably) unless FieldBtl_EvtNoReset: Audio_Unk1E10 = 0; Audio_CmdUnk81 (0, 0, $FF); Audio_Cmd14... - verified
Field_FindObjInFront$C0:1CFC · 90 B · EngineLooks for an object the leader can act on in the facing direction. - verified
Field_ObjInReachTable$C0:1D56 · 8 B · EngineField_FindObjInFront's reach test for each facing, indexed by Obj_Facing x 2. - verified
Field_ObjInReachUp$C0:1D5E · 38 B · EngineFacing 0: the object in Field_UnkEB is in reach when it is above the leader (Obj_PosY - Field_FindLeaderY negative) by less than Field_ReachAhead and off the leader's column by less than... - verified
Field_ObjInReachDown$C0:1D84 · 35 B · EngineFacing 1: as Field_ObjInReachUp for an object below the leader (Obj_PosY - Field_FindLeaderY not negative). - verified
Field_ObjInReach_No$C0:1DA7 · 4 B · Engine - verified
Field_ObjInReachLeft$C0:1DAB · 38 B · EngineFacing 2: as Field_ObjInReachUp with X and Y swapped: in reach when the object is left of the leader (Obj_PosX - Field_FindLeaderX negative) by less than Field_ReachAhead and off its row by less... - verified
Field_ObjInReachRight$C0:1DD1 · 35 B · EngineFacing 3: as Field_ObjInReachLeft for an object right of the leader (Obj_PosX - Field_FindLeaderX not negative). - verified
Field_CheckTileInFront$C0:1DF4 · 158 B · EngineThe action button's map check: treasure on the tile in front of the leader. - verified
Field_TileInFrontTable$C0:1E92 · 8 B · EngineField_CheckTileInFront's tile pick for each facing, indexed by Obj_Facing x 2. - verified
Field_TileInFrontUp$C0:1E9A · 45 B · EngineFacing 0: the tile one row above the leader (Obj_TileY - 1). - verified
Field_TileInFrontDown$C0:1EC7 · 23 B · EngineFacing 1: the tile one row below the leader. - verified
Field_TileInFront_No$C0:1EDE · 2 B · Engine - verified
Field_TileInFrontLeft$C0:1EE0 · 23 B · EngineFacing 2: the tile one column left of the leader. - verified
Field_TileInFrontRight$C0:1EF7 · 23 B · EngineFacing 3: the tile one column right of the leader. - verified
Field_CheckTileInFront_Start$C0:1F0E · 22 B · EngineField_CheckTileInFront's tail: A = the TreasureKind_* value. - verified
Fade_StepBrightness$C0:1F24 · 54 B · Engine(was Sub_1F24.) Brightness fade: steps Fade_Brightness one unit toward Fade_BrightnessTarget every Fade_BrightnessDelay+1 frames and clears FadeFlag_Brightness when it gets there (or reaches 0... - verified
Fade_StepFixedColor$C0:1F5A · 45 B · Engine(was Sub_1F5A.) Fixed-colour fade: steps Fade_FixedColor one unit toward Fade_FixedColorTarget every Fade_FixedColorDelay+1 frames and clears FadeFlag_FixedColor when it gets there. - verified
Field_Unk1F87$C0:1F87 · 299 B · EngineBy Field_Unk29 (the message state): - 0: nothing.
Bank $C0 · $C0:2000–$2FFF
$C0:2000
Verified · 49
- verified
Field_MsgClearBuf$C0:20B2 · 64 B · EngineZeroes the 1 KB text buffer Field_Unk7EF000 ($7E:F000-$7E:F3FF) as Map_ClearBufC800 does: two MVNs copy the 32 zero bytes at GfxRom_D2 to its first 64 bytes, then each MVN copies the zeroed part... - verified
Field_MsgStart$C0:20F2 · 52 B · EngineStarts the text window on the message: TextWin_StrIndex = Field_Unk2A; the string table TextWin_StrTable = FieldMsg_TreasureStrs ($DE:FF00) while Field54_WatchBox is set in Field_Unk54 (a treasure... - verified
Field_MsgStep$C0:2126 · 187 B · EngineOne step of the message text. - verified
Field_EventHookDispatch$C0:21E1 · 13 B · EngineRuns the Field_EventHook handler for this frame: entry Field_EventHook - 1 of Field_EventHookTable; nothing when it is 0. - verified
Field_EventHookTable$C0:21EE · 32 B · Engine16 handler addresses, indexed by (Field_EventHook - 1) x 2. - verified
Field_HookWinGrow0$C0:220E · 91 B · EngineHook 1: one frame of a growing window shape. - verified
Field_HookWinShrink0$C0:2269 · 111 B · EngineHook 2: the reverse of hook 1. - verified
Field_HookWinC3E$C0:22D8 · 81 B · EngineHook 3. - verified
Field_HookIdle$C0:2329 · 1 B · Engine - verified
Field_HookWinGrow1$C0:232A · 96 B · EngineHook 4: hook 1 with the colour window instead of BG windows: WOBJSEL enables colour window 1, CGWSEL limits colour math to inside the window (with the sub screen added), and BankC3_Entry0008 runs... - verified
Field_HookWinShrink1$C0:238A · 88 B · EngineHook 5: the reverse of hook 4 (mode 1, colour window). - verified
Field_HookWinShrink1_Off$C0:23E2 · 39 B · Engine - verified
Field_HookWinQuad$C0:2409 · 267 B · EngineHook 6: a colour-window shape from four moving points, for WinFx_QuadTimer frames. - verified
Field_HookWinFixedA$C0:2514 · 117 B · EngineHooks 7 and 8: a fixed shape (centre WinFx_FixedX/Y, size WinFx_FixedSizeA, mode 0) on BG3's window 1, inverted; colour math outside the window only. - verified
Field_HookWinFixedB$C0:2589 · 133 B · EngineHooks 9 and 10: as hooks 7/8 with size WinFx_FixedSizeB, window 1 on BG2 and BG3 (not inverted), and different layer and colour-math bytes: Ppu_Unk0BD7/Hdma_Unk7F1520 = BG3... - verified
Field_HookLeaveToBankC3$C0:260E · 65 B · EngineHook 11: leaves the field for good. - verified
Field_HookWinPulse$C0:264F · 214 B · EngineHook 12, a blocking sequence that runs its own frames (each one Field_EndOfFrameShort + Field_WaitFrame, with no Field_FrameUpdate): redraws the map (Field_BuildC800Mode1, Field_Unk74E8/74F7... - verified
Field_WinPulseDraw$C0:2725 · 40 B · EngineOne frame of Field_HookWinPulse's shape: WinFx_Size to WinFx_ArgSize, table WinFx_TableA or WinFx_TableB by Field_Unk53, then BankC3_Entry0008 in mode $80 (WinFx_ArgX/Y were set by the caller). - verified
Field_ServiceUnk54$C0:274D · 158 B · Engine(was Field_Unk274D.) Per-frame service of the Field_Unk54 requests, first match wins: - bit 4 (Field54_Credits): build the next line of the staff credits. - verified
Field_ServiceUnk54_SendLine$C0:27EB · 57 B · Engine - verified
Field_FadeInAfterReload$C0:2824 · 36 B · Engine(was Sub_2824.) Fade-in after a reload: unless Scene_ReloadStep returns nonzero, raises Fade_Brightness one step per frame (input disabled around Field_FrameUpdate) until it reaches full brightness. - verified
Scene_SettleFrames$C0:2848 · 36 B · EngineThe field-load fade-in: a copy of Field_FadeInAfterReload just before it, differing in one call. - verified
Scene_ReloadStep$C0:286C · 62 B · EngineRebuilds the screen after a location load or a bank-$C2 round trip, before the fade-in: TileAnimList_ApplyAll, LocLoad_DrawMap, the object resets Field_ResetUnk0B88, Field_ResetUnk0B80... - verified
TileAnimList_Clear$C0:28AA · 22 B · EngineFills TileAnimList with TileAnimList_Empty (all 16 entries). - verified
TileAnimList_AddCurrent$C0:28C0 · 33 B · EngineAdds the tile at Field_TileAnimX/Y (the 16-bit word) to TileAnimList: from the first entry on, it stops at an entry equal to it (already listed) or puts it in the first empty one. - verified
TileAnimList_ApplyAll$C0:28E1 · 24 B · EngineRuns TileAnimList_ApplyOne for each TileAnimList entry up to the first empty one (or all 16). - verified
TileAnimList_ApplyOne$C0:28F9 · 254 B · EnginePuts the animated states of one listed tile into Map_TileProps, by the state at the index A holds (only the five start states count; any other leaves the map alone): - $E6: the tile and the one... - verified
Field_Unk29F7$C0:29F7 · 385 B · EngineWrites a 32 x 10 tilemap (Field_UploadUnk1D00Bytes, $280 bytes) to Field_Unk7EF000 through the WRAM data port, DP = DP_PPU; Field_UploadUnk1D00 then sends it to VRAM $1D00. - verified
Field_Unk2B78$C0:2B78 · 201 B · EngineWrites a 32 x 8 tilemap (Field_UploadUnk1C00Bytes, $200 bytes) to Field_Unk7EF000 through the WRAM data port, DP = DP_PPU, over what Field_Unk29F7 left there; Field_UploadUnk1C00 then sends it to... - verified
ScrollStepAccum$C0:2C41 · 391 B · EngineSteps the scroll positions of layers 2 and 3 by signed per-frame speeds in 1/16 pixels, the copies of them that FieldBtlPpu.Scroll2 holds for the battle. - verified
VramDma_Upload$C0:2DC8 · 41 B · EngineCopies a block to VRAM with DMA channel 7: VMADDL = VramDma_Addr, VMAIN = increment after the high byte, DMAP7 = VramDma_Mode, B-bus target VMDATAL, source VramDma_Src/SrcBank, VramDma_Size bytes. - verified
ClearRAMDMA$C0:2DF1 · 45 B · EngineZeros a WRAM region via DMA channel 7, sourcing from MPYL (always 0 since M7A=M7B=0). - verified
Sys_HaltWithColor$C0:2E1E · 73 B · Engine(was the stub LoadSavePath.) Stops the game on a single colour: the first 21 bytes are InitHW's body written inline (interrupts off, forced blank, NMI/DMA/HDMA off, DB=$00), then it also clears... - verified
Evt_OpAA_SetAnimRow$C0:2E67 · 6 B · EngineEvent opcode $AA (2 bytes: $AA, row): Obj_Cur's Obj_AnimRow = row, Obj_AnimMode = Obj_AnimModeNormal (1), and Obj_AnimTimer, ObjX_AnimLoops and Obj_AnimColumn = 0 (the row starts over at once); X... - verified
Evt_SetAnimRow$C0:2E6D · 7 B · Engine - verified
Evt_SetAnimMode$C0:2E74 · 19 B · Engine - verified
Evt_OpB3_AnimRow0$C0:2E87 · 4 B · EngineEvent opcode $B3 (1 byte): Evt_SetAnimRow with row 0 (ObjAnim_RowStand, the row Obj_SetStandAnim uses); X = Y + 1, C=1. - verified
Evt_OpB4_AnimRow1$C0:2E8B · 4 B · EngineEvent opcode $B4 (1 byte): Evt_SetAnimRow with row 1 (ObjAnim_RowWalk, the row Obj_SetMoveAnim walks with); X = Y + 1, C=1. - verified
Evt_OpAE_AnimReset$C0:2E8F · 11 B · EngineEvent opcode $AE (1 byte): Obj_Cur's Obj_AnimRow = 0 (ObjAnim_RowStand) and Obj_AnimMode = 0, then as Evt_SetAnimMode (timer, loops and column 0); X = Y + 1, C=1. - verified
Evt_OpAB_PlayAnimOnce$C0:2E9A · 103 B · EngineEvent opcode $AB (2 bytes: $AB, row): plays animation row once in mode 2 and waits for it. - verified
Evt_OpB7_PlayAnimLoops$C0:2F01 · 112 B · EngineEvent opcode $B7 (3 bytes: $B7, row, count): as Evt_OpAB_PlayAnimOnce with ObjX_AnimLoops = count + 1 at the start (Obj_AnimTickAndQueue takes 2 off per pass of the row and stops at 1); done: X =... - verified
Evt_OpAC_ShowFrame$C0:2F71 · 37 B · EngineEvent opcode $AC (2 bytes: $AC, frame): Obj_Cur shows a fixed frame: Obj_FixedFrame = frame, column and timer 0, Obj_AnimRow = $FF when Obj_AnimMode was 0 (as in Evt_OpAB_PlayAnimOnce)... - verified
Evt_OpAD_WaitRuns$C0:2F96 · 48 B · EngineEvent opcode $AD (2 bytes: $AD, n): waits n of the object's script runs. - verified
Evt_OpB9_Wait4$C0:2FC6 · 4 B · EngineEvent opcode $B9 (1 byte): Evt_WaitRuns with n = 4; X = Y + 1 when done. - verified
Evt_OpBA_Wait8$C0:2FCA · 4 B · EngineEvent opcode $BA (1 byte): Evt_WaitRuns with n = 8; X = Y + 1 when done. - verified
Evt_OpBD_Wait32$C0:2FCE · 4 B · EngineEvent opcode $BD (1 byte): Evt_WaitRuns with n = $20; X = Y + 1 when done. - verified
Evt_OpBC_Wait16$C0:2FD2 · 2 B · EngineEvent opcode $BC (1 byte): Evt_WaitRuns with n = $10. - verified
Evt_WaitRuns$C0:2FD4 · 41 B · Engine - verified
Evt_OpAF_PartyControlOnce$C0:2FFD · 5 B · EngineEvent opcode $AF (1 byte): one run of Evt_OpB0_PartyControl, then the script goes on: X = Y + 1 (the next opcode, for the next run), C=0.
Bank $C0 · $C0:3000–$3FFF
$C0:3000
Verified · 76
- verified
Evt_OpB0_PartyControl$C0:3002 · 91 B · EngineEvent opcode $B0 (1 byte): the script of a party member's object stays here (X = Y, C=0 on every path) and moves it each run. - verified
Obj_Unk305D$C0:305D · 86 B · Sprites & objectsSteps Obj_Cur toward the point $80 / $F0 within its tile (Obj_TileCentreX, Obj_TileFootY: the middle column, the bottom row of the tile), one frame at a time. - verified
Obj_Unk30B3$C0:30B3 · 161 B · Sprites & objectsSteps Obj_Cur onto the position of the object in ObjFront_Other, one frame at a time: compares Obj_PosX and then Obj_PosY of the two with the low four bits masked (Obj_PosCoarseMask). - verified
Evt_StartTargetFunc2$C0:3154 · 93 B · EngineThe touch counterpart of Evt_StartTargetFunc1: starts function 2 of the object in Field_UnkEB. - verified
Evt_PushTarget$C0:31B1 · 187 B · EngineMoves the object in Field_UnkEB one tile on in the leader's facing, probably a push. - verified
Evt_OpD9_PartyWalkToTiles$C0:326C · 494 B · EngineEvent opcode $D9 (7 bytes: $D9, then column, row for the leader, member 2 and member 3): walks the party members to three tiles. - verified
Evt_OpDA_PartyGather$C0:345A · 229 B · EngineEvent opcode $DA (1 byte): party members 2 and 3 walk to the leader. - verified
Evt_OpB1_Yield$C0:353F · 4 B · EngineEvent opcode $B1 (1 byte): ends the object's run here: X = Y + 1 (the next opcode, for the next run), C=0. - verified
Evt_OpB2_Halt$C0:3543 · 3 B · EngineEvent opcode $B2 (1 byte): stops the object on this opcode for good: X = Y (the opcode again), C=0. - verified
Evt_OpB5_FollowObj$C0:3546 · 9 B · EngineEvent opcode $B5 (2 bytes: $B5, slot): runs Evt_Op94_WalkToObj (a step toward the object in slot) and stays on this opcode for good: X = Y, C=0 whatever the walk returned. - verified
Evt_OpB6_FollowPc$C0:354F · 8 B · EngineEvent opcode $B6 (2 bytes: $B6, p): runs Evt_Op95_WalkToPc (a step toward party member p) with X = Y returned: the opcode stays. - verified
Evt_OpB8_SetMsgPtr$C0:3557 · 25 B · EngineEvent opcode $B8 (4 bytes: $B8, ptr (3 bytes)): Field_Unk2B (word) and Field_Unk2D (bank) = ptr, the pointer the message opcodes need (probably to the location's message table); X = Y + 4, C=1. - verified
Evt_OpBB_Msg$C0:3570 · 69 B · EngineEvent opcode $BB (2 bytes: $BB, msg): shows message msg (probably; see the banner) with Field_Unk30 = 0. - verified
Evt_OpC1_MsgUnk30_1$C0:35B5 · 71 B · EngineEvent opcode $C1 (2 bytes: $C1, msg): as Evt_OpBB_Msg with Field_Unk30 = 1. - verified
Evt_OpC2_MsgUnk30_2$C0:35FC · 71 B · EngineEvent opcode $C2 (2 bytes: $C2, msg): as Evt_OpBB_Msg with Field_Unk30 = 2. - verified
Evt_OpC0_MsgChoice$C0:3643 · 49 B · EngineEvent opcode $C0 (3 bytes: $C0, msg, choices): as Evt_OpBB_Msg (Field_Unk30 = 0), with a choice: on starting, Field_Unk65 = choices bits 0-1 and Field_Unk64 = bits 2-3 (Evt_ChoiceMask)... - verified
Evt_MsgChoiceStart$C0:3674 · 54 B · Engine - verified
Evt_OpC3_MsgChoiceUnk30_1$C0:36AA · 51 B · EngineEvent opcode $C3 (3 bytes: $C3, msg, choices): as Evt_OpC0_MsgChoice with Field_Unk30 = 1. - verified
Evt_OpC4_MsgChoiceUnk30_2$C0:36DD · 52 B · EngineEvent opcode $C4 (3 bytes: $C4, msg, choices): as Evt_OpC0_MsgChoice with Field_Unk30 = 2 (it reaches Evt_MsgChoiceStart with a BRL). - verified
Evt_Op33_SetPalette$C0:3711 · 70 B · EngineEvent opcode $33 (2 bytes: $33, slot): Obj_Cur's Obj_OamAttr = slot x 2 & ObjPal_AttrMask (the palette bits; the other attribute bits are cleared), and its 12 colours (Obj_PalSrc in bank $E4) are... - verified
Evt_OpC8_EnterBankC2$C0:3757 · 41 B · EngineEvent opcode $C8 (2 bytes: $C8, arg): hands over to bank $C2 the way Field_SceneChangeTick's SceneFlag_Reload path does, with Field_BankC2Arg = arg, and goes on once the field is back... - verified
Evt_OpC9_IfHasItem$C0:3780 · 49 B · EngineEvent opcode $C9 (3 bytes: $C9, item, n): BankC1_Entry8003 service 0 (BankC1Svc_FindItem) with Y = item. - verified
Evt_OpCA_AddItem$C0:37B1 · 11 B · EngineEvent opcode $CA (2 bytes: $CA, item): BankC1_Entry8003 service 1 (BankC1Svc_AddItem, one more of item Y = item); X = Y + 2, C=1. - verified
Evt_AddItemTail$C0:37BC · 11 B · Engine - verified
Evt_OpC7_AddItemVar$C0:37C7 · 28 B · EngineEvent opcode $C7 (2 bytes: $C7, a): as Evt_OpCA_AddItem with the item taken from the low byte of event word a (Evt_Unk7F0200 + a x 2): BRA to Evt_AddItemTail; X = Y + 2, C=1. - verified
Evt_OpCB_RemoveItem$C0:37E3 · 22 B · EngineEvent opcode $CB (2 bytes: $CB, item): BankC1_Entry8003 service 2 (BankC1Svc_RemoveItem: one fewer of item Y = item, the entry emptied at 0; nothing when it is not held); X = Y + 2, C=1. - verified
Evt_OpD7_GetItemCount$C0:37F9 · 46 B · EngineEvent opcode $D7 (3 bytes: $D7, item, a): BankC2_Entry8004 command $0C (BankC2Cmd_ItemCount) with X = item gives the count held (0 when none); it goes to the low byte of event word a... - verified
Evt_OpCC_IfHasGold$C0:3827 · 52 B · EngineEvent opcode $CC (4 bytes: $CC, amount (word), n): BankC1_Entry8003 service 3 (BankC1Svc_HasGold) with Y = amount. - verified
Evt_OpCD_AddGold$C0:385B · 25 B · EngineEvent opcode $CD (3 bytes: $CD, amount (word)): BankC1_Entry8003 service 4 (BankC1Svc_AddGold) with Y = amount; X = Y + 3, C=1. - verified
Evt_OpCE_RemoveGold$C0:3874 · 25 B · EngineEvent opcode $CE (3 bytes: $CE, amount (word)): BankC1_Entry8003 service 5 (BankC1Svc_RemoveGold: takes amount off the gold when there is that much); X = Y + 3, C=1. - verified
Evt_OpCF_IfCharListed$C0:388D · 49 B · EngineEvent opcode $CF (3 bytes: $CF, char, n): BankC2_Entry8004 command 3 (BankC2Cmd_FindListed) with Y = char. - verified
Evt_OpD0_AddCharToReserve$C0:38BE · 21 B · EngineEvent opcode $D0 (2 bytes: $D0, char): BankC2_Entry8004 command 4 (BankC2Cmd_AddToReserve) with Y = char; X = Y + 2. - verified
Evt_OpD1_UnlistChar$C0:38D3 · 21 B · EngineEvent opcode $D1 (2 bytes: $D1, char): BankC2_Entry8004 command 5 (BankC2Cmd_Unlist: the character's place in Menu_PartyOrder is marked empty); X = Y + 2. - verified
Evt_OpD2_IfCharInParty$C0:38E8 · 49 B · EngineEvent opcode $D2 (3 bytes: $D2, char, n): BankC2_Entry8004 command 0 (BankC2Cmd_FindInParty) with Y = char. - verified
Evt_OpD3_AddCharToParty$C0:3919 · 53 B · EngineEvent opcode $D3 (2 bytes: $D3, char): BankC2_Entry8004 command 1 (BankC2Cmd_AddToParty) with Y = char, then ObjQ_Unk78 = ObjQ_Unk78Set1. - verified
Evt_OpD4_MoveCharToReserve$C0:394E · 185 B · EngineEvent opcode $D4 (2 bytes: $D4, char): takes the character's object out of the party, by the first of Party_ObjSlot / 1 / 2 (present) whose Obj_Unk1101 is char (read as the object's character... - verified
Evt_OpD6_DropCharObj$C0:3A07 · 97 B · EngineEvent opcode $D6 (2 bytes: $D6, char): the first present party member (Party_ObjSlot, then 1, then 2) whose Obj_Unk1101 is char gets Obj_Unk1100 = 3 (Obj_Unk1100Out), and its place in... - verified
Evt_OpD5_BankC2Cmd0A$C0:3A68 · 27 B · EngineEvent opcode $D5 (3 bytes: $D5, a, b): BankC2_Entry8004 command $0A (BankC2Cmd_Unk0A) with Y = a and X = b; X = Y + 3. - verified
Evt_OpD8_StartBattle$C0:3A83 · 52 B · EngineEvent opcode $D8 (3 bytes: $D8, a, b): starts a battle and goes on after it: - SceneFlag_Battle set in Field_SceneFlags (not started yet): X = the opcode, C=0; - else FadeFlag_AfterBattle set in... - verified
Evt_OpE0_Warp$C0:3AB7 · 58 B · EngineEvent opcode $E0 (5 bytes: $E0, location (word), column, row): sets Loc_DestId / Loc_DestX (column, row) / Loc_DestFacing from the operands, SceneFlag_Warp in Field_SceneFlags and Fade_Brightness... - verified
Evt_OpDC_SetPrevLoc$C0:3AF1 · 42 B · EngineEvent opcode $DC (5 bytes: $DC, location (word), column, row): sets Loc_PrevId, Loc_PrevX (column, row) and Loc_PrevFacing from the operands, as Field_InitLoadState would have stored them for that... - verified
Evt_OpDD_SetLoc$C0:3B1B · 42 B · EngineEvent opcode $DD (5 bytes: $DD, location (word), column, row): sets Loc_Id, Loc_EntryX (column, row) and Loc_EntryFacing from the operands without loading anything; X = Y + 5, C=1. - verified
Evt_OpDE_SetLocUnk1E$C0:3B45 · 6 B · EngineEvent opcode $DE (5 bytes, as $DD): Field_Unk1E = 1 (Field_Unk1EOn; Field_FadeInAfterReload clears it), then BRA to Evt_OpDD_SetLoc. - verified
Evt_OpE1_WarpNow$C0:3B4B · 77 B · EngineEvent opcode $E1 (5 bytes: $E1, location (word), column, row): warps at once, without the fade-out: Loc_Dest* from the operands (as Evt_OpE0_Warp), then it waits for vblank (RDNMI bit 7), runs... - verified
Evt_OpDF_WarpNowUnk1E$C0:3B98 · 6 B · EngineEvent opcode $DF (5 bytes, as $E1): Field_Unk1E = 1 (Field_Unk1EOn), then BRA to Evt_OpE1_WarpNow (never returns). - verified
Evt_OpE2_WarpVars$C0:3B9E · 103 B · EngineEvent opcode $E2 (5 bytes: $E2, a, b, c, d): as Evt_OpE0_Warp with the destination in event words (Evt_Unk7F0200 + n x 2): Loc_DestId = word a (all 16 bits, not masked), Loc_DestX = word b's low... - verified
Evt_OpE3_SetControl$C0:3C05 · 12 B · EngineEvent opcode $E3 (2 bytes: $E3, value): Field_ControlEnabled = value (0 stops the pause/menu paths; the Map_Unk7F3700 scripts start with E3 00 and end with E3 01 or E3 00); X = Y + 2, C=1. - verified
Evt_OpE8_SoundCmd18$C0:3C11 · 30 B · EngineEvent opcode $E8 (2 bytes: $E8, a): sends sound-driver command $18 (Audio_Cmd18, the command bank $C2 sends as C2Scene_SoundCmd18; meaning not traced) with Audio_CmdArg0 = a and Audio_CmdArg1 =... - verified
Evt_OpEA_PlayMusic$C0:3C2F · 29 B · EngineEvent opcode $EA (2 bytes: $EA, track): Menu_Config1E = track and Audio_CmdPlayMusic sent with Audio_CmdArg0 = track, as LocLoad_AudioSetup starts a location's music (Audio_CmdArg1/2 left as they... - verified
Evt_OpEB_SoundCmds81To83$C0:3C4C · 76 B · EngineEvent opcode $EB (3 bytes: $EB, a, b): sends three sound-driver commands through Audio_DriverCommand: Audio_CmdUnk81 with arguments a, b, Audio_Cmd81Arg; then Audio_Cmd82 and Audio_Cmd83, each... - verified
Evt_OpEC_SoundCmd$C0:3C98 · 36 B · EngineEvent opcode $EC (4 bytes: $EC, command, a, b): Audio_CmdId = command, Audio_CmdArg0 = a, Audio_CmdArg1 = b (Audio_CmdArg2 left as it was), sent through Audio_DriverCommand; X = Y + 4, C=0. - verified
Evt_OpED_WaitApuio1$C0:3CBC · 9 B · EngineEvent opcode $ED (1 byte): waits while APUIO1 (the sound CPU's port 1) reads nonzero: X = the opcode then, else X = Y + 1; C=0 either way. - verified
Evt_OpEE_WaitApuio3$C0:3CC5 · 11 B · EngineEvent opcode $EE (1 byte): waits while the low nibble of APUIO3 (the sound CPU's port 3) is nonzero: X = the opcode then, else X = Y + 1; C=0 either way. - verified
Evt_OpF0_FadeBrightness$C0:3CD0 · 45 B · EngineEvent opcode $F0 (2 bytes: $F0, b): the high nibble of b is a screen brightness (0-15). - verified
Evt_OpF2_WaitBrightness$C0:3CFD · 10 B · EngineEvent opcode $F2 (1 byte): waits while FadeFlag_Brightness is set (a brightness fade runs): X = the opcode then, else X = Y + 1; C=0 either way. - verified
Evt_OpF1_FadeFixedColor$C0:3D07 · 115 B · EngineEvent opcode $F1 (2 bytes: $F1, 0, or 3 bytes: $F1, colour, s): the fixed colour (Fade_FixedColor, COLDATA-style: bits 5-7 the channels, bits 0-4 the intensity). - verified
Evt_OpF3_WaitFixedColor$C0:3D7A · 10 B · EngineEvent opcode $F3 (1 byte): waits while FadeFlag_FixedColor is set (a fixed-colour fade runs): X = the opcode then, else X = Y + 1; C=0 either way. - verified
Evt_OpF4_SetShake$C0:3D84 · 19 B · EngineEvent opcode $F4 (2 bytes: $F4, value): Field_UnkBC = value (nonzero: Map_Unk91AC sets Map_ShakeX/Y from Eng_Unk0400, a screen shake by that inference); with 0, Map_ShakeX and Map_ShakeY = 0 too. - verified
Evt_OpE4_CopyMapRegion$C0:3D97 · 46 B · EngineEvent opcode $E4 (8 bytes: $E4, source column, row, end column, row, destination column, row, planes): MapCopy_SrcX/Y, MapCopy_EndX/Y, MapCopy_DstX/Y and Field_Unk44 (the MapCopy_* plane bits)... - verified
Evt_OpE5_CopyMapRegionRedraw$C0:3DC5 · 47 B · EngineEvent opcode $E5 (8 bytes, as $E4): the same MapCopy_* and Field_Unk44 setup, then Field_MapRedrawSel = the plane bits 0-2 (MapCopy_L1-L3, the layers) and SceneFlag_MapRedraw set, so... - verified
Evt_OpE6_SetDrift$C0:3DF4 · 60 B · EngineEvent opcode $E6 (5 bytes: $E6, x, y, layers, frames): for each of Map_Layer1/2/3 set in layers, the word Map_Drift1X/2X/3X (with its Y byte) = x, y: the per-frame amounts Map_Unk91AC adds to that... - verified
Evt_OpE7_ScrollTo$C0:3E30 · 44 B · EngineEvent opcode $E7 (3 bytes: $E7, column, row): scrolls the view to a map tile through Map_Unk91AC's scroll-to, by Map_ScrollToMode: - 0 (start): Map_ScrollToX = column x 2, Map_ScrollToY = row x 2... - verified
Evt_OpF8_BankC2Cmd06And07$C0:3E5C · 11 B · EngineEvent opcode $F8 (1 byte): BankC2_Entry8004 commands 6 and 7 (BankC2Cmd_Unk06, BankC2Cmd_Unk07); X = Y + 1. - verified
Evt_BankC2CmdTail$C0:3E67 · 7 B · Engine - verified
Evt_OpF9_BankC2Cmd06$C0:3E6E · 7 B · EngineEvent opcode $F9 (1 byte): BankC2_Entry8004 command 6 alone (see Evt_OpF8_BankC2Cmd06And07) through Evt_BankC2CmdTail; X = Y + 1, C as on entry (0: the run ends). - verified
Evt_OpFA_BankC2Cmd07$C0:3E75 · 7 B · EngineEvent opcode $FA (1 byte): BankC2_Entry8004 command 7 alone (see Evt_OpF8_BankC2Cmd06And07) through Evt_BankC2CmdTail; X = Y + 1, C as on entry (0: the run ends). - verified
Evt_OpFF9F_BankC2Cmd08$C0:3E7C · 8 B · EngineOpcode $FF $9F (2 bytes): BankC2_Entry8004 command 8 (BankC2Cmd_Unk08, Menu_CmdSetSram7FE2, which stores $FF at $30:7FE2) through Evt_BankC2CmdTail; X = Y + 2. - verified
Evt_Op29_StartCredits$C0:3E84 · 82 B · EngineEvent opcode $29 (2 bytes: $29, b): sets layer 3 up for the staff credits, probably (the font load and the Credits_Text position): Map_OwnStep3 set in Map_OwnStepFlags and in Map_LayerEdgeOff... - verified
Evt_Op2A_Field54Bit2$C0:3ED6 · 2 B · EngineEvent opcode $2A (1 byte): sets Field_Unk54 bit 2 (Field54_MapReq's low bit), a request Field_ServiceUnk54 serves (bits 2-3 shifted left once go to the map redraw); X = Y + 1, C=0. - verified
Evt_SetField54Tail$C0:3ED8 · 6 B · Engine - verified
Evt_Op2B_Field54Bit3$C0:3EDE · 4 B · EngineEvent opcode $2B (1 byte): sets Field_Unk54 bit 3 (Field54_Bit3, the other bit of Field54_MapReq) through Evt_SetField54Tail; X = Y + 1, C=0. - verified
Evt_Op32_CreditsLine$C0:3EE2 · 4 B · EngineEvent opcode $32 (1 byte): sets Field54_Credits in Field_Unk54, so Field_ServiceUnk54 writes the next staff-credits line, through Evt_SetField54Tail; X = Y + 1, C=0. - verified
Evt_Op2C_SetLayer3Pos$C0:3EE6 · 44 B · EngineEvent opcode $2C (3 bytes: $2C, x, y): Map_Acc3X/Y = 0, Map_Unk1D8F (layer 3 X) = x x 8 and Map_Unk1D91 (layer 3 Y) = y x 8, both 16-bit (8-pixel units, probably). - verified
Evt_Op2F_SetCreditsPos$C0:3F12 · 20 B · EngineEvent opcode $2F (3 bytes: $2F, column, row): Credits_Column = column, Credits_Row = row (where Field_ServiceUnk54 puts the next credits line); X = Y + 3, C=1. - verified
Evt_OpFE_WinQuad$C0:3F26 · 137 B · EngineEvent opcode $FE (18 bytes: $FE, frames, then eight pairs start, end for X0, Y0, X1, Y1, X2, Y2, X3, Y3): starts hook 6 (Field_HookWinQuad) moving four points from their starts to their ends in... - verified
Evt_OpFF_Misc$C0:3FAF · 95 B · EngineEvent opcode $FF (2 bytes or more: $FF, sub, ...): sub is kept in EvtFF_Sub.
Bank $C0 · $C0:4000–$4FFF
$C0:4000
Verified · 56
- verified
Evt_OpFFTable$C0:400E · 40 B · Engine20 handler addresses for opcode $FF's second byte $90-$A3, indexed by (sub - $90) x 2 (JSR (abs,X) at $C0:4009 in Evt_OpFF_Misc). - verified
Evt_OpFF90_WinGrow0$C0:4036 · 31 B · EngineOpcode $FF $90 (5 bytes: $FF, $90, x, y, limit): WinFx_CenterX/Y = x, y, WinFx_SizeLimit = limit, WinFx_Size = 0, Field_EventHook = EventHook_WinGrow0 (hook 1 grows the window shape to the limit)... - verified
Evt_OpFF91_WinShrink0$C0:4055 · 8 B · EngineOpcode $FF $91 (2 bytes): Field_EventHook = EventHook_WinShrink0 (hook 2 shrinks the shape to 0 and turns the window off); X = Y + 2 (no wait). - verified
Evt_OpFF92_WinC3E1$C0:405D · 86 B · EngineOpcode $FF $92 (2 bytes): runs hook 3 (Field_HookWinC3E, the BankC3_Entry000E effect) with mode 1 and WinFx_Size 0, and waits for it to end: - Field_EventHook 0 (start): while WinFx_C3EMode... - verified
Evt_OpFF94_WinC3E1Dark$C0:40B3 · 60 B · EngineOpcode $FF $94 (2 bytes): as Evt_OpFF92_WinC3E1 (mode 1) with WinFx_Size = 3 (WinFx_SizeBit1 | WinFx_SizeBit0), so hook 3 leaves the window on; when it is done this opcode sets Fade_Brightness = 0... - verified
Evt_OpFF93_WinC3E2$C0:40EF · 86 B · EngineOpcode $FF $93 (2 bytes): as Evt_OpFF92_WinC3E1 with mode 2 (WinFx_C3EMode2) and WinFx_Size = 1 (WinFx_SizeBit0); the window is cleared when done, X = Y + 2. - verified
Evt_OpFF95_WinC3E2Dark$C0:4145 · 60 B · EngineOpcode $FF $95 (2 bytes): as Evt_OpFF94_WinC3E1Dark with mode 2 (WinFx_C3EMode2) and WinFx_Size = 2 (WinFx_SizeBit1): when done Fade_Brightness = 0, Field_EventHook = 0, X = Y + 2. - verified
Evt_OpFF96_Reset$C0:4181 · 16 B · EngineOpcode $FF $96 (2 bytes): waits for vblank (RDNMI bit 7), InitHW, S = StackTop and JML MainInit: the game restarts from its cold init (a reset, probably the end of a game). - verified
Evt_OpFF97_WinGrow1$C0:4191 · 31 B · EngineOpcode $FF $97 (5 bytes: $FF, $97, x, y, limit): as Evt_OpFF90_WinGrow0 with Field_EventHook = EventHook_WinGrow1 (hook 4, the colour-window version); X = Y + 5 (no wait). - verified
Evt_OpFF98_WinShrink1$C0:41B0 · 4 B · EngineOpcode $FF $98 (2 bytes): Field_EventHook = EventHook_WinShrink1 (hook 5) through Evt_OpFF_SetHookTail; X = Y + 2 (no wait). - verified
Evt_OpFF99_WinFixedA$C0:41B4 · 4 B · EngineOpcode $FF $99 (2 bytes): Field_EventHook = EventHook_WinFixedA1 (hooks 7/8) through Evt_OpFF_SetHookTail; X = Y + 2 (no wait). - verified
Evt_OpFF9A_WinFixedB$C0:41B8 · 2 B · EngineOpcode $FF $9A (2 bytes): Field_EventHook = EventHook_WinFixedB1 (hooks 9/10); X = Y + 2 (no wait). - verified
Evt_OpFF_SetHookTail$C0:41BA · 6 B · Engine - verified
Evt_OpFF9B_LeaveToBankC3$C0:41C0 · 4 B · EngineOpcode $FF $9B (2 bytes): Field_EventHook = EventHook_LeaveToBankC3 (hook 11 redraws the map and leaves the field for bank $C3 on its next frame) through Evt_OpFF_SetHookTail; X = Y + 2. - verified
Evt_OpFF9C_WinShrink1Off$C0:41C4 · 4 B · EngineOpcode $FF $9C (2 bytes): Field_EventHook = EventHook_WinShrink1Off (hook 14, hook 5's shutdown: the window off at once) through Evt_OpFF_SetHookTail; X = Y + 2. - verified
Evt_OpFF9E_WinPulse$C0:41C8 · 20 B · EngineOpcode $FF $9E (2 bytes): runs hook 12 (Field_HookWinPulse, which ends by setting EventHook_Idle) and waits for it: Field_EventHook 0: it is set to EventHook_WinPulse, X = the opcode... - verified
Evt_OpFF9D_ClearPush$C0:41DC · 8 B · EngineOpcode $FF $9D (2 bytes): clears Field54_Push in Field_Unk54, which lets Evt_PushTarget start another push; X = Y + 2. - verified
Evt_Op57_InitChar0$C0:41E4 · 8 B · EngineEvent opcode $57 (1 byte): Chr_ObjSlot[0] = Obj_Cur, then Evt_InitCharTail with character 0 (see Evt_Op80_InitCharObj). - verified
Evt_Op5C_InitChar1$C0:41EC · 8 B · EngineEvent opcode $5C (1 byte): as Evt_Op57_InitChar0 for character 1. - verified
Evt_Op62_InitChar2$C0:41F4 · 8 B · EngineEvent opcode $62 (1 byte): as Evt_Op57_InitChar0 for character 2. - verified
Evt_Op68_InitChar4$C0:41FC · 8 B · EngineEvent opcode $68 (1 byte): as Evt_Op57_InitChar0 for character 4. - verified
Evt_Op6A_InitChar3$C0:4204 · 8 B · EngineEvent opcode $6A (1 byte): as Evt_Op57_InitChar0 for character 3. - verified
Evt_Op6C_InitChar5$C0:420C · 8 B · EngineEvent opcode $6C (1 byte): as Evt_Op57_InitChar0 for character 5. - verified
Evt_Op6D_InitChar6$C0:4214 · 6 B · EngineEvent opcode $6D (1 byte): as Evt_Op57_InitChar0 for character 6, then falls into Evt_InitCharTail, which stores A (the character) in EvtChar_Id and BRAs to Evt_InitCharCommon; the other one-byte... - verified
Evt_InitCharTail$C0:421A · 4 B · Engine - verified
Evt_Op80_InitCharObj$C0:421E · 76 B · EngineEvent opcode $80 (2 bytes: $80, char): Chr_ObjSlot[char] = Obj_Cur (char 0-6; a larger one stores nothing), then Evt_InitCharCommon, which the one-byte character opcodes reach too (EvtChar_Id =... - verified
Evt_InitCharCommon$C0:426A · 524 B · Engine - verified
Evt_Op81_InitSprite$C0:4476 · 23 B · EngineEvent opcode $81 (2 bytes: $81, record): Obj_Cur becomes an object with sprite recordrecord: Obj_Unk1100 = Obj_Unk1100Kind3, Obj_Unk1B01 = Obj_Unk1B01Solid, Obj_Unk1101 = record, then... - verified
Evt_LoadSpriteRec$C0:448D · 202 B · Engine - verified
Evt_InitWramSprite$C0:4557 · 57 B · EngineThe common start of Evt_Op82_InitWramSprite and Evt_Op83_InitEnemySprite (A = the Obj_Unk1100 kind, 4 or 5): Obj_Unk1100 = A, Obj_Unk1101 = the operand after the opcode (also left in WRMPYA for... - verified
Evt_Op82_InitWramSprite$C0:4590 · 335 B · EngineEvent opcode $82 (2 bytes: $82, n): Evt_InitWramSprite with kind 4 (Obj_Unk1100Kind4), then Obj_Unk1B01 = Obj_Unk1B01Solid and sprite record SprRec_FirstNpc + n of RomE4_SprRec loaded as... - verified
Evt_Op83_InitEnemySprite$C0:46DF · 392 B · EngineEvent opcode $83 (3 bytes: $83, n, b): Evt_InitWramSprite with kind 5 (Obj_Unk1100Kind5), Obj_Unk1B01 = Obj_Unk1B01Solid, then record n of RomE4_EnemySprRec (EvtSpr_EnemyRecBytes each; its first... - verified
Evt_Op84_SetUnk1B01$C0:4867 · 15 B · EngineEvent opcode $84 (2 bytes: $84, value): Obj_Cur's Obj_Unk1B01 = value (bit 0: the object blocks the leader, Obj_Unk1B01Solid; bit 1: it can be pushed, Obj_Unk1B01Push). - verified
Evt_Op87_SetScriptPeriod$C0:4876 · 28 B · EngineEvent opcode $87 (2 bytes: $87, n): Obj_Cur's Obj_Unk1000 = (n + 1) | its old bit 7 (Obj_Unk1000Bit7 kept): the object's script runs every n + 1 frames (Vblank_Unk59D9 reloads Obj_Unk1001 from... - verified
Evt_Op88_ObjPalAnim$C0:4892 · 444 B · EngineEvent opcode $88 ($88, kind, ...): palette animations on Obj_Cur's own palette (its colour 0 is EvtPal_Base = Obj_OamAttr x 8 + EvtPal_SpriteColor0: Obj_OamAttr holds the palette slot x 2). - verified
Evt_Op2E_PalAnim$C0:4A4E · 222 B · EngineEvent opcode $2E ($2E, kind, ...): as Evt_Op88_ObjPalAnim's kinds $4x/$5x and $8x, with absolute colour numbers instead of the object's palette. - verified
Evt_FindFreeAnimB$C0:4B2C · 29 B · EngineFinds a free FieldAnimB record (.Unk0 = 0) among the first FieldAnimB_Searched (8) of the 12, from record 0 on; records 8-11 are never handed out here. - verified
Evt_Op89_SetSpeed$C0:4B49 · 15 B · EngineEvent opcode $89 (2 bytes: $89, speed): Obj_Cur's Obj_Speed = speed (the step the Obj_SetVelocity* routines scale the direction by). - verified
Evt_Op8A_SetSpeedVar$C0:4B58 · 28 B · EngineEvent opcode $8A (2 bytes: $8A, a): as Evt_Op89_SetSpeed with the low byte of the event word a. - verified
Evt_Op8B_PlaceAtTile$C0:4B74 · 79 B · EngineEvent opcode $8B (3 bytes: $8B, column, row): puts Obj_Cur on the tile: Obj_PosX = column << 8 | EvtChar_SubXCentre, Obj_PosY = row << 8 | EvtChar_SubYLower. - verified
Evt_Op8C_PlaceAtTileVar$C0:4BC3 · 100 B · EngineEvent opcode $8C (3 bytes: $8C, a, b): as Evt_Op8B_PlaceAtTile with the column and row from the low bytes of the event words a and b, except that Obj_PosX's low byte is not set (only Obj_TileX... - verified
Evt_Op8D_SetPos$C0:4C27 · 77 B · EngineEvent opcode $8D (5 bytes: $8D, the words x, y): Obj_Cur's Obj_PosX = x, Obj_PosY = y (16-bit: tile in the high byte); with Obj_OamFlags bit 7 set the priorities follow the new tile (Obj_TileY <<... - verified
Evt_Op8E_SetOamFlags$C0:4C74 · 97 B · EngineEvent opcode $8E (2 bytes: $8E, flags): Obj_Cur's Obj_OamFlags = flags. - verified
Evt_Op90_SetUnk1A81On$C0:4CD5 · 4 B · EngineEvent opcode $90 (1 byte): Obj_Cur's Obj_Unk1A81 = Obj_Unk1A81On (1: its frames are built, so it is probably shown). - verified
Evt_Op90_Store$C0:4CD9 · 7 B · Engine - verified
Evt_Op91_ClearUnk1A81$C0:4CE0 · 6 B · EngineEvent opcode $91 (1 byte): Obj_Cur's Obj_Unk1A81 = 0 (no frame build: hidden, probably); X = Y + 1, C=0 through Evt_Op90_Store. - verified
Evt_Op7E_SetUnk1A81Bit7$C0:4CE6 · 6 B · EngineEvent opcode $7E (1 byte): Obj_Cur's Obj_Unk1A81 = $80 (bit 7 only, FieldBtl_ObjUnk1A81Bit: outside 1..$7F, so no frame build, and the battle hand-off treats the object specially); X = Y + 1, C=0... - verified
Evt_Op7C_SetObjUnk1A81On$C0:4CEC · 13 B · EngineEvent opcode $7C (2 bytes: $7C, slot): as Evt_Op90_SetUnk1A81On for the object in slot: Obj_Unk1A81 = Obj_Unk1A81On. - verified
Evt_Op7D_ClearObjUnk1A81$C0:4CF9 · 13 B · EngineEvent opcode $7D (2 bytes: $7D, slot): as Evt_Op91_ClearUnk1A81 for the object in slot: Obj_Unk1A81 = 0. - verified
Evt_Op7A_ArcToTile$C0:4D06 · 287 B · EngineEvent opcode $7A (4 bytes: $7A, column, row, g): moves Obj_Cur along an arc (Obj_ArcMode, probably a jump) to map tile (column, row). - verified
Evt_Op7B_ArcSteps$C0:4E25 · 78 B · EngineEvent opcode $7B (5 bytes: $7B, vx, vy, g, frames): as Evt_Op7A_ArcToTile with the arc given directly: first run Obj_VelX = vx, Obj_VelY = vy, Obj_ArcGravity = g, Obj_MoveFrames = frames... - verified
Evt_Op92_WalkDir$C0:4E73 · 84 B · EngineEvent opcode $92 (3 bytes: $92, direction, frames): walks Obj_Cur in a direction for a number of frames. - verified
Evt_Op9C_MoveDir$C0:4EC7 · 67 B · EngineEvent opcode $9C (3 bytes: $9C, direction, frames): as Evt_Op92_WalkDir without the facing and the animation: Obj_Direction, ObjX_Unk7F0B00 = ObjX_Unk7F0B00Dir, Obj_MoveFrames, Obj_Unk1A80 + 1 and... - verified
Evt_Op9D_MoveDirVar$C0:4F0A · 87 B · EngineEvent opcode $9D (3 bytes: $9D, a, b): as Evt_Op9C_MoveDir with the direction and the frames taken from the low bytes of the event words Evt_Unk7F0200 + a x 2 and + b x 2. - verified
Evt_Op96_WalkToTile$C0:4F61 · 137 B · EngineEvent opcode $96 (3 bytes: $96, column, row): walks Obj_Cur to a map tile, one step per script run. - verified
Evt_Op9A_WalkTowardTile$C0:4FEA · 154 B · EngineEvent opcode $9A (4 bytes: $9A, column, row, frames): as Evt_Op96_WalkToTile, but a single step of the given frames (Obj_MoveFrames = ObjX_Unk7F0B00 = frames, Obj_Unk1A80 + 1); once Obj_Unk1A80 is...
Bank $C0 · $C0:5000–$5FFF
$C0:5000
Verified · 62
- verified
Evt_Op97_WalkToTileVar$C0:5084 · 165 B · EngineEvent opcode $97 (3 bytes: $97, a, b): as Evt_Op96_WalkToTile with the column and row from the low bytes of the event words Evt_Unk7F0200 + a x 2 and + b x 2. - verified
Evt_OpA0_MoveToTile$C0:5129 · 104 B · EngineEvent opcode $A0 (3 bytes: $A0, column, row): as Evt_Op96_WalkToTile without the facing and the animations (no Obj_Facing write, no Obj_SetMoveAnim / Obj_SetStandAnim): arrived (after any... - verified
Evt_OpA1_MoveToTileVar$C0:5191 · 132 B · EngineEvent opcode $A1 (3 bytes: $A1, a, b): as Evt_OpA0_MoveToTile with the column and row from the low bytes of the event words Evt_Unk7F0200 + a x 2 and + b x 2. - verified
Evt_Op94_WalkToObj$C0:5215 · 19 B · EngineEvent opcode $94 (2 bytes: $94, slot): walks Obj_Cur next to the object in slot (object x 2), one step per script run. - verified
Evt_Op94_Body$C0:5228 · 152 B · Engine - verified
Evt_Op9E_MoveToObj$C0:52C0 · 19 B · EngineEvent opcode $9E (2 bytes: $9E, slot): as Evt_Op94_WalkToObj without the facing and the animations; Evt_Op9E_Body (X = the target's slot) is also entered by Evt_Op9F_MoveToPc. - verified
Evt_Op9E_Body$C0:52D3 · 119 B · Engine - verified
Evt_Op98_WalkTowardObj$C0:534A · 33 B · EngineEvent opcode $98 (3 bytes: $98, slot, frames): as Evt_Op94_WalkToObj but a single step of the given frames (Obj_MoveFrames = ObjX_Unk7F0B00 = frames, Obj_Unk1A80 + 1); with Obj_Unk1A80 set it... - verified
Evt_Op98_Body$C0:536B · 165 B · Engine - verified
Evt_Op95_WalkToPc$C0:5410 · 25 B · EngineEvent opcode $95 (2 bytes: $95, p): Evt_Op94_WalkToObj toward a party member's object (X = Party_ObjSlot + p; p = 0, 2 or 4, the party position x 2) through Evt_Op94_Body; X = the opcode, C=0... - verified
Evt_Op8F_FollowPc$C0:5429 · 204 B · EngineEvent opcode $8F (2 bytes: $8F, p): walks Obj_Cur toward a party member's object (X = Party_ObjSlot + p; p = 0, 2 or 4, the party position x 2), one step per script run, as Evt_Op94_WalkToObj... - verified
Evt_Op9F_MoveToPc$C0:54F5 · 25 B · EngineEvent opcode $9F (2 bytes: $9F, p): Evt_Op9E_MoveToObj toward a party member's object (X = Party_ObjSlot + p; p = 0, 2 or 4, the party position x 2) through Evt_Op9E_Body; X = the opcode, C=0... - verified
Evt_Op99_WalkTowardPc$C0:550E · 39 B · EngineEvent opcode $99 (3 bytes: $99, p, frames): Evt_Op98_WalkTowardObj toward a party member's object (X = Party_ObjSlot + p) through Evt_Op98_Body; with Obj_Unk1A80 set it waits for Obj_MoveFrames =... - verified
Evt_Op0F_FaceUp$C0:5535 · 4 B · EngineEvent opcode $0F (1 byte): Obj_Cur faces up (facing 0) through Evt_SetFacing; X = Y + 1. - verified
Evt_Op17_FaceDown$C0:5539 · 4 B · EngineEvent opcode $17 (1 byte): Obj_Cur faces down (facing 1) through Evt_SetFacing; X = Y + 1. - verified
Evt_Op1B_FaceLeft$C0:553D · 4 B · EngineEvent opcode $1B (1 byte): Obj_Cur faces left (facing 2) through Evt_SetFacing; X = Y + 1. - verified
Evt_Op1D_FaceRight$C0:5541 · 4 B · EngineEvent opcode $1D (1 byte): Obj_Cur faces right (facing 3) through Evt_SetFacing; X = Y + 1. - verified
Evt_OpA6_Face$C0:5545 · 6 B · EngineEvent opcode $A6 (2 bytes: $A6, facing): Obj_Cur's Obj_Facing = the operand. - verified
Evt_SetFacing$C0:554B · 2 B · Engine - verified
Evt_SetFacingOfX$C0:554D · 10 B · Engine - verified
Evt_OpA7_FaceVar$C0:5557 · 21 B · EngineEvent opcode $A7 (2 bytes: $A7, a): Obj_Cur's Obj_Facing = the low byte of the event word Evt_Unk7F0200 + a x 2, through Evt_SetFacing. - verified
Evt_Op1E_ObjFaceUp$C0:556C · 13 B · EngineEvent opcode $1E (2 bytes: $1E, slot): the object in slot (object x 2) faces up (facing 0) through Evt_SetFacingOfX. - verified
Evt_Op1F_ObjFaceDown$C0:5579 · 13 B · EngineEvent opcode $1F (2 bytes: $1F, slot): the object in slot (object x 2) faces down (facing 1) through Evt_SetFacingOfX. - verified
Evt_Op25_ObjFaceLeft$C0:5586 · 13 B · EngineEvent opcode $25 (2 bytes: $25, slot): the object in slot (object x 2) faces left (facing 2) through Evt_SetFacingOfX. - verified
Evt_Op26_ObjFaceRight$C0:5593 · 13 B · EngineEvent opcode $26 (2 bytes: $26, slot): the object in slot (object x 2) faces right (facing 3) through Evt_SetFacingOfX. - verified
Evt_OpA8_FaceObj$C0:55A0 · 9 B · EngineEvent opcode $A8 (2 bytes: $A8, slot): turns Obj_Cur toward the object in slot. - verified
Evt_OpA8_Body$C0:55A9 · 92 B · Engine - verified
Evt_OpA9_FacePc$C0:5605 · 15 B · EngineEvent opcode $A9 (2 bytes: $A9, p): Evt_OpA8_FaceObj toward a party member's object (X = Party_ObjSlot + p, p = 0, 2 or 4) through Evt_OpA8_Body. - verified
Obj_SetMoveAnim$C0:5614 · 119 B · Sprites & objectsPicks Obj_Cur's animation row from its speed. - verified
Obj_SetStandAnim$C0:568B · 27 B · Sprites & objects - verified
Scene_PostLoadInit$C0:56A6 · 46 B · EngineThe object side of a location load, run once by GameLoop_LoadField after LoadLocation: ObjQ_Unk69 = $0048, ObjQ_ScanlineLimit = $0078, VramQ_Valid = 0 (empty VRAM queue); then Field_ResetUnk0B88... - verified
LocLoad_Unk56D4$C0:56D4 · 53 B · EngineThe last location-load step: unpacks the location's event data. - verified
Evt_InitObjects$C0:5709 · 544 B · EngineResets the object tables for the Evt_ObjCount objects of the new location and runs each one's init function: 1. - verified
Evt_ClearUnk0920$C0:5929 · 51 B · EngineSets the 16 bytes Evt_Unk0920 to Evt_Unk0920Free ($FF), one STA each. - verified
Evt_RunObj0Func1$C0:595C · 33 B · Engine(was Sub_595C.) Runs one event-script function of object 0: the offset stored at Evt_Data+2 (object 0's second function pointer), executing opcodes through Evt_OpcodeTable until opcode $00. - verified
Evt_RunObjInit$C0:597D · 92 B · Engine(was Sub_597D.) Runs object Obj_Cur's init function: the first of its 16 function offsets (Evt_Data + Obj_Cur*16, i.e. 32 bytes per object) is executed through Evt_OpcodeTable until opcode $00. - verified
Vblank_Unk59D9$C0:59D9 · 109 B · EngineWith DP=$1000 (the Obj_Unk1000 page), for each object slot below Evt_ObjSlotEnd (= Evt_ObjCount x 2, stored here) whose Obj_Unk1000 has bit 7 clear: Obj_Unk1001 is counted down (when not already... - verified
Vblank_ReadScanlineCounters$C0:5A46 · 77 B · EngineRuns the queued objects' scripts while there is time left in the frame: before each object it reads the V counter (as Field_ProcessAnimQueue does) and stops once it is at ObjQ_Unk69 or more but... - verified
Evt_RunObjScriptSteps$C0:5A93 · 50 B · EngineRuns object X's script from Obj_ScriptPos: Obj_Cur = X, then up to Field_Unk68 opcodes (Evt_StepsLeft counts them; 5 from load) through Evt_OpcodeTable, each with Y = the opcode's Evt_Data offset... - verified
Evt_StartTargetFunc1$C0:5AC5 · 90 B · EngineStarts function 1 of the object in Field_UnkEB (the one the action button found). - verified
Evt_RedirectObjScript$C0:5B1F · 68 B · EngineEvt_StartTargetFunc1's save without its target: for the object in Field_UnkEB, unless Obj_Unk1100 has bit 7 set or Obj_Unk1C00 is 0, saves Obj_ScriptPos in the ObjX_Unk7F0580 table of level... - verified
Map_LeaderPastRowMax$C0:5B63 · 14 B · EngineMap_Unk9175's test for a downward step: C=1 when the leader's Obj_TileY is past Map_Unk1D1D (TileY >= Map_Unk1D1D + 1). - verified
Map_LeaderPastRowMin$C0:5B71 · 8 B · EngineMap_Unk9175's test for an upward step: C=1 when the leader's Obj_TileY <= Map_Unk1D1C + 1. - verified
Map_LeaderPastColMax$C0:5B79 · 13 B · EngineMap_Unk9175's test for a rightward step: C=1 when the leader's Obj_TileX >= Map_Unk1D1B. - verified
Map_LeaderPastColMin$C0:5B86 · 7 B · EngineMap_Unk9175's test for a leftward step: C=1 when the leader's Obj_TileX <= Map_Unk1D1A. - verified
Evt_HasActionTarget$C0:5B8D · 8 B · EngineC=1 when Field_UnkEB holds an object (bit 7 clear), C=0 when it is $80 (none). - verified
Evt_FindSolidObjInFront$C0:5B95 · 93 B · EngineLooks for a solid object within a tile in front of Obj_Cur. - verified
Evt_InFrontTests$C0:5BF2 · 8 B · EngineEvt_FindSolidObjInFront's tests by Obj_Facing x 2 (facings 0-3). - verified
Evt_InFrontUp$C0:5BFA · 38 B · EngineFacing 0: C=1 when ObjFront_Other is above Obj_Cur and within a tile: its Obj_PosY - ObjFront_Y is negative with magnitude under ObjFront_Reach, and its |Obj_PosX - ObjFront_X| is under it too. - verified
Evt_InFrontDown$C0:5C20 · 35 B · EngineFacing 1: C=1 when ObjFront_Other is below Obj_Cur within a tile: Obj_PosY - ObjFront_Y from 0 to under ObjFront_Reach and |Obj_PosX - ObjFront_X| under it, with the same SBC carries as Evt_InFrontUp. - verified
Evt_InFrontNo$C0:5C43 · 4 B · Engine - verified
Evt_InFrontLeft$C0:5C47 · 38 B · EngineFacing 2: as Evt_InFrontUp on the other axis: C=1 when Obj_PosX - ObjFront_X is negative with magnitude under ObjFront_Reach and |Obj_PosY - ObjFront_Y| is under it (same SBC carries). - verified
Evt_InFrontRight$C0:5C6D · 35 B · EngineFacing 3: as Evt_InFrontDown on the other axis: C=1 when Obj_PosX - ObjFront_X is from 0 to under ObjFront_Reach and |Obj_PosY - ObjFront_Y| is under it (same SBC carries). - verified
Evt_FindOrAddUnk0920$C0:5C90 · 55 B · EngineLooks up Evt_Unk0920Key in the Evt_Unk0920Entries (16) bytes of Evt_Unk0920: found at n, A = Evt_Unk0930[n] (the Obj_Cur stored with it) and C=1. - verified
LocLoad_CheckEvtData$C0:5CC7 · 37 B · EngineTwo checks LocLoad_Unk56D4 makes on the event data it has just unpacked; each failure ends in Sys_HaltWithColor: - Evt_ObjCount = Evt_BadObjCount ($0D) with first Evt_Data byte Evt_BadFirstByte... - verified
LocLoad_InitUnk7F3700$C0:5CEC · 75 B · EngineSeeds the 134 bytes at Map_Unk7F3700 from LocLoad_Unk7F3700Init with five MVNs: 32 bytes from the table's start to $7F:3700, then three times 32 bytes from LocLoad_Unk7F3700Init_Rec1 to $7F:3720... - verified
LocLoad_Unk7F3700Init$C0:5D37 · 55 B · EngineLocLoad_InitUnk7F3700's source: 25 bytes for $7F:3700, 24 for the three blocks at $7F:3720-$7F:3760 (Rec1; the copies take 32 and so also read Rec4 and the first two bytes of Evt_OpcodeTable) and... - verified
Evt_OpcodeTable$C0:5D6E · 512 B · EngineThe event-script opcode handlers, one word per opcode $00-$FF (bank $C0 addresses), indexed by opcode x 2: the script runners read the opcode byte at Evt_Data + the script position, set Y = that... - verified
Evt_UnusedOpcode$C0:5F6E · 6 B · EngineThe handler Evt_OpcodeTable gives every unused event opcode ($01, $3A, $3D, $3E, $45, $46, $6E, $70, $74, $78, $79, $85, $86, $93, $9B, $A2-$A5, $BE, $BF, $C5, $C6, $DB, $E9, $EF, $F5-$F7... - verified
Evt_Op00_Return$C0:5F74 · 66 B · EngineEvent opcode $00 (1 byte): ends the function Obj_Cur is running. - verified
Evt_Op02_CallObjFunc$C0:5FB6 · 8 B · EngineEvent opcode $02 (3 bytes: $02, slot, level/function): makes the object in slot run one of its functions, without waiting. - verified
Evt_Op02_Body$C0:5FBE · 192 B · Engine
Bank $C0 · $C0:6000–$6FFF
$C0:6000
Verified · 136
- verified
Evt_Op03_CallObjFuncRetry$C0:607E · 8 B · EngineEvent opcode $03 (3 bytes: $03, slot, level/function): as Evt_Op02_CallObjFunc, but it starts the call or waits: while the target's Obj_Unk1C01 is nonzero or the new level is not below the... - verified
Evt_Op03_Body$C0:6086 · 131 B · Engine - verified
Evt_Op04_CallObjFuncWait$C0:6109 · 25 B · EngineEvent opcode $04 (3 bytes: $04, slot, level/function): as Evt_Op03_CallObjFuncRetry, and then waits for the function to end. - verified
Evt_Op04_Start$C0:6122 · 141 B · Engine - verified
Evt_Op04_WaitSlot$C0:61AF · 58 B · Engine - verified
Evt_Op05_CallPcFunc$C0:61E9 · 21 B · EngineEvent opcode $05 (3 bytes: $05, p, level/function): Evt_Op02_CallObjFunc on party member p's object (Party_ObjSlot + p). - verified
Evt_Op06_CallPcFuncRetry$C0:61FE · 22 B · EngineEvent opcode $06 (3 bytes: $06, p, level/function): Evt_Op03_CallObjFuncRetry on party member p's object. - verified
Evt_Op07_CallPcFuncWait$C0:6214 · 44 B · EngineEvent opcode $07 (3 bytes: $07, p, level/function): Evt_Op04_CallObjFuncWait on party member p's object: with ObjX_CallWait 0 through Evt_Op04_Start (no member, bit 7 set: X = Y + 3, C=1), else... - verified
Evt_Op08_BlockCalls$C0:6240 · 7 B · EngineEvent opcode $08 (1 byte): Obj_Cur's Obj_Unk1C01 = 1. - verified
Evt_Op08_Next$C0:6247 · 4 B · Engine - verified
Evt_Op09_AllowCalls$C0:624B · 9 B · EngineEvent opcode $09 (1 byte): Obj_Cur's Obj_Unk1C01 = 0 (undoes Evt_Op08_BlockCalls); X = Y + 1, C=1 through Evt_Op08_Next. - verified
Evt_Op0A_RemoveObj$C0:6254 · 21 B · EngineEvent opcode $0A (2 bytes: $0A, slot): the object in slot gets Obj_Unk1100 = $80 (bit 7: Vblank_Unk59D9 never queues its script and the call opcodes skip it) and Obj_Unk1A81 = 0 (no frame build)... - verified
Evt_Op0B_StopObjScript$C0:6269 · 25 B · EngineEvent opcode $0B (2 bytes: $0B, slot): sets bit 7 of the object's Obj_Unk1000 (Obj_Unk1000Bit7): Vblank_Unk59D9 stops counting its script timer, so its script no longer runs, and the call opcodes... - verified
Evt_Op0C_StartObjScript$C0:6282 · 19 B · EngineEvent opcode $0C (2 bytes: $0C, slot): clears bit 7 of the object's Obj_Unk1000 (undoes Evt_Op0B_StopObjScript); X = Y + 2, C=1 through Evt_Op0E_Next. - verified
Evt_Op0D_SetUnk1C80$C0:6295 · 15 B · EngineEvent opcode $0D (2 bytes: $0D, value): Obj_Cur's Obj_Unk1C80 = value (bit 0 Obj_Unk1C80Block: tile blocking in Obj_SetVelocityChecked; bit 1 Obj_Unk1C80Front: Evt_FindSolidObjInFront looks for... - verified
Evt_Op0E_SetUnk1C81$C0:62A4 · 13 B · EngineEvent opcode $0E (2 bytes: $0E, value): Obj_Cur's Obj_Unk1C81 = value (bit 0 Obj1C81_CentreOnTile, bit 1 Obj1C81_OntoObj: what the walk opcodes do on arriving). - verified
Evt_Op0E_Next$C0:62B1 · 4 B · Engine - verified
Evt_Op10_JumpFwd$C0:62B5 · 22 B · EngineEvent opcode $10 (2 bytes: $10, n): the script goes on n bytes after the operand byte: X = Y + 1 + n, C=1. - verified
Evt_Op11_JumpBack$C0:62CB · 19 B · EngineEvent opcode $11 (2 bytes: $11, n): the script goes back n bytes from the operand byte: X = Y + 1 - n, C=1 (through Evt_Op10_JumpFwd's .store). - verified
Evt_Op12_IfVarByte$C0:62DE · 53 B · EngineEvent opcode $12 (5 bytes: $12, a, value, cmp, n): EvtIf_Left = the low byte of event word a, EvtIf_Right = value; comparison cmp of Evt_CmpTable8 (0 =, 1 !=, 2 >, 3 <, 4 >=, 5 <=, 6 AND nonzero... - verified
Evt_Op13_IfVarWord$C0:6313 · 54 B · EngineEvent opcode $13 (6 bytes: $13, a, value (word), cmp, n): as Evt_Op12_IfVarByte with the whole event word a and a 16-bit value, through Evt_CmpTable16. - verified
Evt_JumpFromOfsPos$C0:6349 · 24 B · Engine - verified
Evt_Op14_IfVarVarByte$C0:6361 · 67 B · EngineEvent opcode $14 (5 bytes: $14, a, b, cmp, n): as Evt_Op12_IfVarByte with EvtIf_Right = the low byte of event word b. - verified
Evt_Op15_IfVarVarWord$C0:63A4 · 66 B · EngineEvent opcode $15 (5 bytes: $15, a, b, cmp, n): as Evt_Op14_IfVarVarByte with the whole event words, through Evt_CmpTable16. - verified
Evt_Op16_IfMemByte$C0:63E6 · 92 B · EngineEvent opcode $16 (5 bytes: $16, m, value, cmp, n): EvtIf_Left = the byte at Evt_Mem7F + m, or at Evt_Mem7F + $100 + m when bit 7 (EvtIf_Page1Flag) of cmp is set; EvtIf_Right = value; comparison... - verified
Evt_Op18_IfUnk7F0000Below$C0:6442 · 37 B · EngineEvent opcode $18 (3 bytes: $18, value, n): goes on (X = Y + 3) while Eng_Unk7F0000 < value; from value up it jumps n bytes on from the n byte. - verified
Evt_CmpTable8$C0:6467 · 16 B · EngineThe byte comparisons of the condition opcodes $12, $14 and $16, indexed by cmp x 2 (JSR (Evt_CmpTable8,X) with 8-bit X). - verified
Evt_CmpTable16$C0:6477 · 16 B · EngineThe word comparisons of opcodes $13 and $15, in the order of Evt_CmpTable8. - verified
Evt_Cmp8Eq$C0:6487 · 8 B · EngineThe byte comparisons of Evt_CmpTable8: each compares EvtIf_Left with EvtIf_Right (unsigned) and returns C=0 when the relation holds, C=1 when not: Eq =, Ne !=, Gt >, Lt <, Ge >=, Le <=, And (Left... - verified
Evt_Cmp8Ne$C0:648F · 8 B · Engine - verified
Evt_Cmp8Gt$C0:6497 · 10 B · Engine - verified
Evt_Cmp8Lt$C0:64A1 · 8 B · Engine - verified
Evt_Cmp8Ge$C0:64A9 · 10 B · Engine - verified
Evt_Cmp8Holds$C0:64B3 · 2 B · Engine - verified
Evt_Cmp8Le$C0:64B5 · 10 B · Engine - verified
Evt_Cmp8And$C0:64BF · 8 B · Engine - verified
Evt_Cmp8Or$C0:64C7 · 8 B · Engine - verified
Evt_Cmp16Eq$C0:64CF · 12 B · Engine - verified
Evt_Cmp16Ne$C0:64DB · 12 B · Engine - verified
Evt_Cmp16Gt$C0:64E7 · 14 B · Engine - verified
Evt_Cmp16Lt$C0:64F5 · 14 B · Engine - verified
Evt_Cmp16Ge$C0:6503 · 14 B · Engine - verified
Evt_Cmp16Le$C0:6511 · 14 B · Engine - verified
Evt_Cmp16Holds$C0:651F · 4 B · Engine - verified
Evt_Cmp16And$C0:6523 · 12 B · Engine - verified
Evt_Cmp16Or$C0:652F · 12 B · Engine - verified
Evt_Op19_SetUnk7F0A80Var$C0:653B · 19 B · EngineEvent opcode $19 (2 bytes: $19, a): Obj_Cur's ObjX_Unk7F0A80 = event word a; X = Y + 2, C=1, through the store at the end of Evt_Op1C_SetUnk7F0A80Mem (BRA Evt_Op1C_SetUnk7F0A80Mem_store). - verified
Evt_Op1C_SetUnk7F0A80Mem$C0:654E · 26 B · EngineEvent opcode $1C (3 bytes: $1C, m (word)): Obj_Cur's ObjX_Unk7F0A80 = the word at Evt_Mem7F + m; X = Y + 3, C=1. - verified
Evt_Op1A_IfUnk7F0A80$C0:6568 · 39 B · EngineEvent opcode $1A (3 bytes: $1A, value, n): goes on (X = Y + 3) when the low byte of Obj_Cur's ObjX_Unk7F0A80 equals value, else jumps n bytes on from the n byte. - verified
Evt_Op20_GetPartyMember0$C0:658F · 27 B · EngineEvent opcode $20 (2 bytes: $20, a): event word a's low byte = the first byte of Party_Members (the character id of party member 1, probably the leader); X = Y + 2, C=1. - verified
Evt_Op21_GetObjTile$C0:65AA · 8 B · EngineEvent opcode $21 (4 bytes: $21, slot, a, b): event word a's low byte = the object's Obj_TileX, event word b's = its Obj_TileY; X = Y + 4, C=1. - verified
Evt_Op21_Body$C0:65B2 · 57 B · Engine - verified
Evt_Op22_GetPcTile$C0:65EB · 13 B · EngineEvent opcode $22 (4 bytes: $22, p, a, b): Evt_Op21_GetObjTile for party member p's object (Party_ObjSlot + p); X = Y + 4, C=1. - verified
Evt_Op23_GetObjFacing$C0:65F8 · 8 B · EngineEvent opcode $23 (3 bytes: $23, slot, a): event word a's low byte = the object's Obj_Facing; X = Y + 3, C=1. - verified
Evt_Op23_Body$C0:6600 · 31 B · Engine - verified
Evt_Op24_GetPcFacing$C0:661F · 13 B · EngineEvent opcode $24 (3 bytes: $24, p, a): Evt_Op23_GetObjFacing for party member p's object; X = Y + 3, C=1. - verified
Evt_Op27_IfObjUnk0F00$C0:662C · 41 B · EngineEvent opcode $27 (3 bytes: $27, slot, n): goes on (X = Y + 3) when the object's Obj_Unk0F00 is nonzero (it has a frame to build), else jumps n bytes on from the n byte. - verified
Evt_Op28_IfObjInsideScreen$C0:6655 · 80 B · EngineEvent opcode $28 (3 bytes: $28, slot, n): goes on (X = Y + 3) when the object is well inside the screen, by Evt_Op8F_FollowPc's test: its Obj_TileX minus EvtFollow_ScrCol (Map_TileOriginX / 2) is... - verified
Evt_Op2D_IfAnyHeld$C0:66A5 · 13 B · EngineEvent opcode $2D (2 bytes: $2D, n): goes on when Pad_Unk00F8 or Pad_Unk00F9 is nonzero (any button or D-pad direction held, through the button map), else jumps. - verified
Evt_Op30_IfMapHeldBit1$C0:66B2 · 10 B · EngineEvent opcode $30 (2 bytes: $30, n): goes on when Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1, the button the D-pad handlers run with) is held, else jumps. - verified
Evt_Op31_IfMapHeldBit7$C0:66BC · 10 B · EngineEvent opcode $31 (2 bytes: $31, n): goes on when Pad_Unk00F8 bit 7 (Pad_Unk00F8Bit7) is held, else jumps. - verified
Evt_Op34_IfHeldA$C0:66C6 · 10 B · EngineEvent opcode $34 (2 bytes: $34, n): goes on when A (Pad_A) is held in Menu_PadHeld, else jumps. - verified
Evt_PadJump$C0:66D0 · 21 B · Engine - verified
Evt_Op35_IfHeldB$C0:66E5 · 10 B · EngineEvent opcode $35 (2 bytes: $35, n): goes on when B (Pad_B) is held in Menu_PadHeld, else jumps. - verified
Evt_Op36_IfHeldX$C0:66EF · 10 B · EngineEvent opcode $36 (2 bytes: $36, n): goes on when X (Pad_X) is held in Menu_PadHeld, else jumps. - verified
Evt_Op37_IfHeldY$C0:66F9 · 8 B · EngineEvent opcode $37 (2 bytes: $37, n): goes on when Y (Pad_Y) is held in Menu_PadHeld, else jumps. - verified
Evt_PadGoOn$C0:6701 · 4 B · Engine - verified
Evt_Op38_IfHeldL$C0:6705 · 10 B · EngineEvent opcode $38 (2 bytes: $38, n): goes on when L (Pad_L) is held in Menu_PadHeld, else jumps. - verified
Evt_Op39_IfHeldR$C0:670F · 10 B · EngineEvent opcode $39 (2 bytes: $39, n): goes on when R (Pad_R) is held in Menu_PadHeld, else jumps. - verified
Evt_Op3B_IfMapPressedBit1$C0:6719 · 11 B · EngineEvent opcode $3B (2 bytes: $3B, n): when Pad_Unk00F6Latch bit 1 (Pad_Unk00F6Bit1) is set it is cleared and the script goes on, else it jumps. - verified
Evt_Op3C_IfMapPressedBit7$C0:6724 · 14 B · EngineEvent opcode $3C (2 bytes: $3C, n): as Evt_Op3B_IfMapPressedBit1 with bit 7 (Pad_Unk00F6Bit7, the button Field_ActionButton acts on). - verified
Evt_Op3F_IfPressedA$C0:6732 · 14 B · EngineEvent opcode $3F (2 bytes: $3F, n): when A (Pad_A) is set in Pad_PressedLatch it is cleared and the script goes on, else it jumps. - verified
Evt_Op40_IfPressedB$C0:6740 · 14 B · EngineEvent opcode $40 (2 bytes: $40, n): as Evt_Op3F_IfPressedA with B (Pad_B); goes on through Evt_PadGoOn2. - verified
Evt_Op41_IfPressedX$C0:674E · 14 B · EngineEvent opcode $41 (2 bytes: $41, n): as Evt_Op3F_IfPressedA with X (Pad_X); goes on through Evt_PadGoOn2. - verified
Evt_Op42_IfPressedY$C0:675C · 14 B · EngineEvent opcode $42 (2 bytes: $42, n): as Evt_Op3F_IfPressedA with Y (Pad_Y); goes on through Evt_PadGoOn2. - verified
Evt_Op43_IfPressedL$C0:676A · 14 B · EngineEvent opcode $43 (2 bytes: $43, n): as Evt_Op3F_IfPressedA with L (Pad_L); goes on through Evt_PadGoOn2. - verified
Evt_Op44_IfPressedR$C0:6778 · 12 B · EngineEvent opcode $44 (2 bytes: $44, n): as Evt_Op3F_IfPressedA with R (Pad_R). - verified
Evt_PadGoOn2$C0:6784 · 4 B · Engine - verified
Evt_Op47_SetScanlineLimit$C0:6788 · 10 B · EngineEvent opcode $47 (2 bytes: $47, v): the low byte of ObjQ_ScanlineLimit = v (Field_ProcessAnimQueue stops building frames once the V counter reaches it); X = Y + 2, C=1 through Evt_PadGoOn2. - verified
Evt_Op48_GetLongByte$C0:6792 · 16 B · EngineEvent opcode $48 (5 bytes: $48, ptr, a): event word a's low byte = the byte at ptr; X = Y + 5, C=1. - verified
Evt_ReadSrcPtrAndVar$C0:67A2 · 37 B · EngineReads the operands of opcodes $48 / $49: EvtMem_Src = the 3 bytes at Y + 1 (ptr), then X = the event word index (the byte at Y + 4) x 2, with EvtMem_Pos = Y + 4. - verified
Evt_Op49_GetLongWord$C0:67C7 · 16 B · EngineEvent opcode $49 (5 bytes: $49, ptr, a): event word a = the word at ptr; X = Y + 5, C=1. - verified
Evt_Op4A_SetLongByte$C0:67D7 · 12 B · EngineEvent opcode $4A (5 bytes: $4A, ptr, value): the byte at ptr = value; X = Y + 5, C=1. - verified
Evt_ReadDstPtr$C0:67E3 · 24 B · EngineReads the pointer operand of opcodes $4A-$4D: EvtMem_Dst = the 3 bytes at Y + 1; X = Y + 4 (the next operand). - verified
Evt_Op4B_SetLongWord$C0:67FB · 17 B · EngineEvent opcode $4B (6 bytes: $4B, ptr, value (word)): the word at ptr = value; X = Y + 6, C=1. - verified
Evt_Op4C_SetLongVarByte$C0:680C · 29 B · EngineEvent opcode $4C (5 bytes: $4C, ptr, a): the byte at ptr = event word a's low byte; X = Y + 5, C=1. - verified
Evt_Op4D_SetLongVarWord$C0:6829 · 29 B · EngineEvent opcode $4D (5 bytes: $4D, ptr, a): the word at ptr = event word a; X = Y + 5, C=1. - verified
Evt_Op4E_CopyData$C0:6846 · 95 B · EngineEvent opcode $4E (variable: $4E, dst (word), bank, len (word), then len - 2 data bytes): copies the data bytes with MVN to dst in bank $7E when bank is $7E, else in bank $7F (any other bank byte)... - verified
Evt_Op4F_SetVarByte$C0:68A5 · 33 B · EngineEvent opcode $4F (3 bytes: $4F, value, a): event word a's low byte = value; X = Y + 3, C=1. - verified
Evt_Op50_SetVarWord$C0:68C6 · 35 B · EngineEvent opcode $50 (4 bytes: $50, value (word), a): event word a = value; X = Y + 4, C=1. - verified
Evt_Op51_CopyVarByte$C0:68E9 · 42 B · EngineEvent opcode $51 (3 bytes: $51, a, b): event word b's low byte = event word a's low byte (a is read as a word, only its low byte stored); X = Y + 3, C=1. - verified
Evt_Op52_CopyVarWord$C0:6913 · 42 B · EngineEvent opcode $52 (3 bytes: $52, a, b): event word b = event word a; X = Y + 3, C=1. - verified
Evt_Op53_GetMemByte$C0:693D · 39 B · EngineEvent opcode $53 (4 bytes: $53, m (word), a): event word a's low byte = the byte at Evt_Mem7F + m (read as a word, its low byte stored); X = Y + 4, C=1. - verified
Evt_Op54_GetMemWord$C0:6964 · 39 B · EngineEvent opcode $54 (4 bytes: $54, m (word), a): event word a = the word at Evt_Mem7F + m; X = Y + 4, C=1. - verified
Evt_Op55_GetUnk7F0000$C0:698B · 27 B · EngineEvent opcode $55 (2 bytes: $55, a): event word a's low byte = Eng_Unk7F0000; X = Y + 2, C=1. - verified
Evt_Op56_SetMemByte$C0:69A6 · 30 B · EngineEvent opcode $56 (4 bytes: $56, value, m (word)): the byte at Evt_Mem7F + m = value; X = Y + 4, C=1. - verified
Evt_Op58_SetMemVarByte$C0:69C4 · 39 B · EngineEvent opcode $58 (4 bytes: $58, a, m (word)): the byte at Evt_Mem7F + m = event word a's low byte; X = Y + 4, C=1. - verified
Evt_Op59_SetMemVarWord$C0:69EB · 39 B · EngineEvent opcode $59 (4 bytes: $59, a, m (word)): the word at Evt_Mem7F + m = event word a; X = Y + 4, C=1. - verified
Evt_Op5A_SetUnk7F0000$C0:6A12 · 13 B · EngineEvent opcode $5A (2 bytes: $5A, value): Eng_Unk7F0000 = value; X = Y + 2, C=1. - verified
Evt_Op5B_AddVarByte$C0:6A1F · 38 B · EngineEvent opcode $5B (3 bytes: $5B, value, a): event word a's low byte += value; X = Y + 3, C=1. - verified
Evt_Op5D_AddVarVarByte$C0:6A45 · 47 B · EngineEvent opcode $5D (3 bytes: $5D, a, b): event word b's low byte += event word a's low byte; X = Y + 3, C=1. - verified
Evt_Op5E_AddVarVarWord$C0:6A74 · 47 B · EngineEvent opcode $5E (3 bytes: $5E, a, b): event word b += event word a; X = Y + 3, C=1. - verified
Evt_Op5F_SubVarByte$C0:6AA3 · 38 B · EngineEvent opcode $5F (3 bytes: $5F, value, a): event word a's low byte -= value; X = Y + 3, C=1. - verified
Evt_Op60_SubVarWord$C0:6AC9 · 40 B · EngineEvent opcode $60 (4 bytes: $60, value (word), a): event word a -= value; X = Y + 4, C=1. - verified
Evt_Op61_SubVarVarByte$C0:6AF1 · 47 B · EngineEvent opcode $61 (3 bytes: $61, a, b): event word b's low byte -= event word a's low byte; X = Y + 3, C=1. - verified
Evt_Op63_SetVarBit$C0:6B20 · 43 B · EngineEvent opcode $63 (3 bytes: $63, bit, a): sets bit number bit (0-7, through BitSet) in event word a's low byte; X = Y + 3, C=1. - verified
Evt_Op64_ClearVarBit$C0:6B4B · 43 B · EngineEvent opcode $64 (3 bytes: $64, bit, a): clears bit number bit (0-7, through BitClear) in event word a's low byte; X = Y + 3, C=1. - verified
Evt_Op65_SetMemBit$C0:6B76 · 46 B · EngineEvent opcode $65 (3 bytes: $65, bit, m): sets a bit of the byte at Evt_Mem7F + m, or at Evt_Mem7F + $100 + m when bit 7 of the bit operand is set; the bit number is the operand's bits 0-3... - verified
Evt_Op66_ClearMemBit$C0:6BA4 · 46 B · EngineEvent opcode $66 (3 bytes: $66, bit, m): clears a bit of the byte at Evt_Mem7F + m, or at Evt_Mem7F + $100 + m when bit 7 of the bit operand is set; the bit number is the operand's bits 0-3... - verified
Evt_Op67_AndVarByte$C0:6BD2 · 37 B · EngineEvent opcode $67 (3 bytes: $67, mask, a): ANDs event word a's low byte with mask; X = Y + 3, C=1. - verified
Evt_Op69_OrVarByte$C0:6BF7 · 37 B · EngineEvent opcode $69 (3 bytes: $69, mask, a): ORs event word a's low byte with mask; X = Y + 3, C=1. - verified
Evt_Op6B_EorVarByte$C0:6C1C · 37 B · EngineEvent opcode $6B (3 bytes: $6B, mask, a): EORs event word a's low byte with mask; X = Y + 3, C=1. - verified
Evt_Op6F_ShrVarByte$C0:6C41 · 40 B · EngineEvent opcode $6F (3 bytes: $6F, count, a): shifts event word a's low byte right count times; X = Y + 3, C=1. - verified
Evt_Op71_IncVarByte$C0:6C69 · 28 B · EngineEvent opcode $71 (2 bytes: $71, a): adds 1 to event word a's low byte (wrapping in the byte); X = Y + 2, C=1. - verified
Evt_Op72_IncVarWord$C0:6C85 · 28 B · EngineEvent opcode $72 (2 bytes: $72, a): adds 1 to event word a; X = Y + 2, C=1. - verified
Evt_Op73_DecVarByte$C0:6CA1 · 28 B · EngineEvent opcode $73 (2 bytes: $73, a): subtracts 1 from event word a's low byte (wrapping in the byte); X = Y + 2, C=1. - verified
Evt_Op75_SetVarByte1$C0:6CBD · 25 B · EngineEvent opcode $75 (2 bytes: $75, a): event word a's low byte = 1; X = Y + 2, C=1. - verified
Evt_Op76_SetVarWord1$C0:6CD6 · 26 B · EngineEvent opcode $76 (2 bytes: $76, a): event word a = 1; X = Y + 2, C=1. - verified
Evt_Op77_ClearVarByte$C0:6CF0 · 25 B · EngineEvent opcode $77 (2 bytes: $77, a): event word a's low byte = 0; X = Y + 2, C=1. - verified
Evt_Op7F_RandomVarByte$C0:6D09 · 38 B · EngineEvent opcode $7F (2 bytes: $7F, a): event word a's low byte = the next RandomTable byte: Field_Unk0400Copy is incremented and indexes it (as Obj_SetVelocityChecked does); X = Y + 2, C=1. - verified
LocLoad_UploadPack$C0:6D2F · 54 B · EngineOne graphics pack of LocLoad_Unk0960: reads the pack number at [LocGfx_PackListPtr]; unless it is LocRom_SetNone, unpacks its LocGfx_PackPtrs entry with Decomp_ToWramVec to LocGfx_Stage and... - verified
LocLoad_UnpackPacks67$C0:6D65 · 106 B · EngineThe end of LocLoad_Unk0960: with LocGfx_PackListPtr on entry byte 6 of the LocGfx_Lists entry, unpacks pack 6 to LocGfx_Unk7F6000, steps the pointer (16-bit INX this time), and unpacks pack 7 to... - verified
LocLoad_Unk6DCF$C0:6DCF · 88 B · EngineLoads the layer-3 graphics: if LocRom.Tileset3 is LocRom_SetNone it only sets Field_UnkBB = 1 (no layer 3; LocLoad_Unk0A14 and LocLoad_UnkA33B test it). - verified
Credits_LoadGfx$C0:6E27 · 53 B · EngineUnpacks the pack at Credits_GfxPack ($FD:0000) to LocGfx_StageL3 and uploads Credits_GfxBytes of it to VRAM LocGfx_VramL3, as LocLoad_Unk6DCF loads a location's layer-3 graphics. - verified
Field_UploadUnk1F00$C0:6E5C · 68 B · EngineUploads one of eight bank-$FF graphics sets picked, like Pal_LoadUnkRow0's colours, by Menu_Config01 bits 0-2: the set's first Field_UploadUnk1F00Bytes ($200) go to VRAM $1F00 and the next... - verified
Field_UploadUnk1F00Srcs$C0:6EA0 · 16 B · EngineField_UploadUnk1F00's eight source offsets in bank $FF, one per Menu_Config01 setting; each set is $280 bytes ($200 + $80). - verified
Field_UploadUnk1D00$C0:6EB0 · 27 B · EngineUploads Field_UploadUnk1D00Bytes ($280) from Field_Unk7EF000 to VRAM $1D00 (VramDma_Upload, word writes): the 32 x 10 tilemap Field_Unk29F7 writes there (a bordered panel, probably a window... - verified
Field_UploadUnk5800$C0:6ECB · 38 B · EngineUploads Field_UploadUnk5800Bytes ($400) from Field_Unk7EF000 to VRAM word Field_UploadVram5800 + Field_Unk31 x $200 (VramDma_Upload, word writes). - verified
Field_UploadUnk1C00$C0:6EF1 · 27 B · EngineAs Field_UploadUnk1D00 with VRAM $1C00 and Field_UploadUnk1C00Bytes ($200), from the same Field_Unk7EF000: the 32 x 8 tilemap of tiles $00-$FF that Field_Unk2B78 writes there. - verified
Field_UploadUnk0000$C0:6F0C · 82 B · EngineFour uploads of Field_UploadUnk0000Bytes ($40) from bank $FF to the start of VRAM: FieldRom_Unk9CF0 + 0 / $40 / $80 / $C0 to VRAM $0000, $0100, $0030 and $0130 (two 2-tile pieces in each of two... - verified
Field_UploadUnk57E0$C0:6F5E · 27 B · EngineUploads Field_UploadUnk57E0Bytes ($40) from FieldRom_Unk9260 ($FF:9260) to VRAM $57E0, the last $20 words of the area LocLoad_Unk6DCF fills from LocGfx_VramL3 ($5000), so it overwrites the end of... - verified
Field_ResetUnk0B88$C0:6F79 · 33 B · EngineWith DP=$2100, writes Field_Unk0B80Empty ($80) to the Field_Unk0B88Bytes (30) bytes of Field_Unk0B88 through the WRAM port. - verified
Obj_Unk6F9A$C0:6F9A · 13 B · Sprites & objectsRuns Obj_TileSlotHandlers entry Obj_Unk1100 of Obj_Cur, unless bit 7 of it is set. - verified
Obj_TileSlotHandlers$C0:6FA7 · 18 B · Sprites & objectsObj_Unk6F9A's handlers by Obj_Unk1100 (9 words, kinds 0-8). - verified
Obj_TileSlotNone$C0:6FB9 · 1 B · Sprites & objectsObj_TileSlotHandlers' entry for the kinds that take no tile slot: RTS. - verified
Obj_TileSlotAllocKind$C0:6FBA · 156 B · Sprites & objectsGives Obj_Cur tile slots in Obj_TileSlot by its size class (Obj_SprSize & ObjSpr_SizeMask): - class 0: the first free slot from ObjTile_SingleTop ($19) down to 1 (slot 0 is never tried); - classes...
Bank $C0 · $C0:7000–$7FFF
$C0:7000
Verified · 41
- verified
Obj_Unk7056$C0:7056 · 46 B · Sprites & objectsGives back Obj_Cur's tile slot(s): n = Obj_TileRecOfs / $20 (the slot Obj_TileSlotAllocKind took). - verified
LocLoad_Unk7084$C0:7084 · 101 B · EngineCopies the location's palette rows: LocPal_Rom entry LocRom.Palette (LocPal_SetBytes = 7 x 30 bytes, offset by the hardware multiplier) goes with seven MVNs of LocPal_RowBytes each to Pal_LocRows... - verified
Pal_LoadUnkRow0$C0:70E9 · 69 B · EngineSets colours 1-15 of Pal_Buf row 0 and then copies all of Pal_Buf (Pal_BufBytes) to Pal_CgramBuf ($7E:2200): - 30 bytes from FieldRom_PalRow0Sets + 2 + n x 16, n = Menu_Config01 (Menu_Config+1)... - verified
Pal_UploadCgram$C0:712E · 38 B · EngineSends Pal_CgramBuf (Pal_BufBytes from $7E:2200) to CGRAM from colour 0 with DMA channel 7 (mode 0, B-bus CGDATA). - verified
Pal_UploadCgram_Rts$C0:7154 · 1 B · Engine - verified
Field_ResetUnk0B80$C0:7155 · 27 B · EngineWrites Field_Unk0B80Empty ($80) to the 8 bytes of Field_Unk0B80, one STA each (see Field_ResetUnk0B88). - verified
Obj_Unk7170$C0:7170 · 17 B · Sprites & objectsUnless Field_Unk54 bit 7 is set or Obj_Cur's Obj_Unk1100 has bit 7 set, runs Obj_PalSlotHandlers entry Obj_Unk1100 (kinds 0-11) to give the object a palette slot. - verified
Obj_PalSlotHandlers$C0:7181 · 24 B · Sprites & objectsObj_Unk7170's handlers by Obj_Unk1100 (12 words, kinds 0-11). - verified
Obj_PalSlotKind0$C0:7199 · 2 B · Sprites & objectsKind 0: X = ObjPal_SlotKind0 (slot 5), then falls into Obj_PalSlotFixed. - verified
Obj_PalSlotFixed$C0:719B · 119 B · Sprites & objectsGives Obj_Cur the palette slot X (5, 6 or 7 for kinds 0, 1 and 2). - verified
Obj_PalSlotKind1$C0:7212 · 5 B · Sprites & objectsKind 1: Obj_PalSlotFixed with X = ObjPal_SlotKind1 (slot 6). - verified
Obj_PalSlotKind2$C0:7217 · 5 B · Sprites & objectsKind 2: Obj_PalSlotFixed with X = ObjPal_SlotKind2 (slot 7). - verified
Obj_PalSlotAny$C0:721C · 152 B · Sprites & objectsKinds 3, 4 and 7-11: first looks through slots 0 to ObjPal_AnyEnd - 1 (0-4) for a taken one whose owner has Obj_Cur's Obj_PalSrc and, at the first, chains Obj_Cur after the owner (Obj_PalPrev =... - verified
Obj_Unk72B4$C0:72B4 · 152 B · Sprites & objectsAs Obj_PalSlotAny over slots ObjPal_BtlFirst to ObjPal_BtlEnd - 1 (1-3): kinds 5 and 6 through Obj_PalSlotHandlers, and FieldBtl_SaveObj for an object with Obj_Unk1A81 bit 7 set. - verified
Obj_Unk734C$C0:734C · 77 B · Sprites & objectsTakes Obj_Cur out of its palette slot's chain, unless Field_Unk54 bit 7 is set (then nothing, C=1). - verified
Map_InitMasksAndLimits$C0:7399 · 269 B · EngineTurns the six layer sizes LocLoad_UnkA33B just set into the wrap masks the row / column writers use: Map_ColMask1 from Map_Unk0BCB, Map_RowMask1 from Map_Unk0BCD, Map_ColMask2 / RowMask2 from... - verified
Map_InitOrigin$C0:74A6 · 46 B · EngineSets the scroll origin for the leader's entry point: Map_InitOriginX and Map_InitOriginY, then, when Map_Unk0BC9 has bit 7 set (layer 2 at half rate), layer 2's half-rate origin and bounds... - verified
Field_Unk74D4$C0:74D4 · 13 B · EngineResets layer 1's scroll: zeroes Map_BgColBias / Map_BgRowBias and the scroll words Map_Unk1D87 / Map_Unk1D89, then runs Sub_C07F9A for the new edge addresses. - verified
Field_Unk74D4_Tail$C0:74E1 · 7 B · Engine - verified
Field_Unk74E8$C0:74E8 · 15 B · EngineAs Field_Unk74D4 for layer 2: zeroes Map_BgColBias2 / Map_BgRowBias2, Map_Unk1D8B and Map_Unk1D8D, then Field_Unk74D4_Tail. - verified
Field_Unk74F7$C0:74F7 · 15 B · EngineAs Field_Unk74D4 for layer 3: zeroes Map_BgColBias3 / Map_BgRowBias3, Map_Unk1D8F and Map_Unk1D91, then Field_Unk74D4_Tail. - verified
Map_InitOriginX$C0:7506 · 77 B · EnginePuts layer 1's left origin (Map_TileOriginX, in 8x8 tiles: metatile column x 2) so that the entry column Loc_EntryX is Map_OriginLeadX metatiles from the screen's left edge, kept inside the limits... - verified
Map_InitOriginY$C0:7553 · 77 B · EngineAs Map_InitOriginX for rows: Map_TileOriginY from Loc_EntryY and the limits Map_Unk1D1C-1D1D, the leader Map_OriginLeadY metatiles below the top edge; the bottom bound Map_Unk1D10 = origin +... - verified
Map_ClearBufC800$C0:75A0 · 73 B · Engine(was Map_Unk75A0.) Zeroes the 2 KB WRAM buffer Map_BufC800 ($7E:C800–$7E:CFFF) that Field_BuildC800Mode1/2/4 fill: the first MVN copies the 32 zero bytes at GfxRom_D2 to its start, and each later... - verified
Field_BuildC800Mode1$C0:75E9 · 41 B · EngineMap layer redraws, row / column writers and edge VRAM addresses ($C0:75E9–$C0:8242) The map sits in WRAM as metatile numbers. - verified
Map_WriteRow1$C0:7612 · 466 B · EngineWrites one row of layer-1 tilemap words to WMDATA (WRAM at WMADD). - verified
Map_WriteCol1$C0:77E4 · 264 B · EngineWrites one column of layer-1 tilemap words to WMDATA, top to bottom. - verified
Field_BuildC800Mode2$C0:78EC · 227 B · EngineRedraws layer 2 into Map_BufC800 (WMADD = $7E:C800) with Map_WriteRow2, 16 metatiles (Map_RedrawLen) per row, one of three ways: - Map_LayerEdgeOff bit 1 clear, Map_Unk0BC9 bit 7 clear: as... - verified
Map_WriteRow2$C0:79CF · 474 B · EngineAs Map_WriteRow1 for layer 2: masks Map_RowMask2 / Map_ColMask2, the number's low byte from Map_Layer2Tiles and bit 8 from Map_TileHiBits bit 1, Map_Meta12* words. - verified
Map_WriteCol2$C0:7BA9 · 268 B · EngineAs Map_WriteCol1 for layer 2 (Map_RowMask2 / Map_ColMask2, Map_Layer2Tiles, Map_TileHiBits bit 1, Map_Meta12*); an odd first row also gives 2 x Map_BuildLen + 1 words. - verified
Field_BuildC800Mode4$C0:7CB5 · 177 B · EngineAs Field_BuildC800Mode2 for layer 3 with Map_WriteRow3, without the half-rate path: Map_LayerEdgeOff bit 2 clear redraws 32 rows from Map_TileOriginY / Map_TileOriginX; set builds the fixed map... - verified
Map_WriteRow3$C0:7D66 · 250 B · EngineAs Map_WriteRow1 for layer 3: masks Map_RowMask3 / Map_ColMask3, an 8-bit metatile number from Map_Layer3Tiles (zero-extended), words from Map_Meta3*. - verified
Map_WriteCol3$C0:7E60 · 248 B · EngineAs Map_WriteCol1 for layer 3 (Map_RowMask3 / Map_ColMask3, Map_Layer3Tiles zero-extended, Map_Meta3*); an odd first row gives 2 x Map_BuildLen + 1 words. - verified
Map_UploadBufTo7400$C0:7F58 · 5 B · EngineSends Map_BufC800 to VRAM through VramDma_Upload (VramDma_Mode 1, source $7E:C800): Map_UploadBufTo7400 ($7F58) 2 KB to VRAM word $7400; Map_UploadBufTo7000 ($7F5D) 2 KB to VRAM word $7000... - verified
Map_UploadBufTo7000$C0:7F5D · 3 B · Engine - verified
Map_UploadBufToX$C0:7F60 · 2 B · Engine - verified
Map_UploadBuf2K$C0:7F62 · 5 B · Engine - verified
Map_UploadBuf_Tail$C0:7F67 · 16 B · Engine - verified
Map_UploadBuf4K$C0:7F77 · 7 B · Engine - verified
LocLoad_ClearPage1D00$C0:7F7E · 28 B · EngineZeroes the 256 bytes at $00:1D00-$1DFF (the map page !DP_Map, low WRAM) with ClearRAMDMA: DmaFill_Size = $0100, DmaFill_Dest = $1D00, DmaFill_Bank = $00. - verified
Sub_C07F9A$C0:7F9A · 419 B · Engine (unnamed)Purpose not established (no reader of its results traced).
Bank $C0 · $C0:8000–$8FFF
$C0:8000
Verified · 50
- verified
Bg_RowSpan64x32$C0:813D · 100 B · EngineSplits a run of 34 tilemap words (Map_EdgeRowTiles) along row Y from column A of a 64x32 tilemap (two 32x32 screens, the right one Bg_ScreenWords further on) into pieces contiguous in VRAM. - verified
Bg_RowSpan64x32Addr$C0:81A1 · 53 B · EngineThe addresses of Bg_RowSpan64x32 without the sizes, in other registers: X = word offset of (A, Y), A = offset of the start of row Y in the other screen, Y = X - 31 (the third piece's address; the... - verified
Bg_ColSpan64x32$C0:81D6 · 66 B · EngineSplits a 32-word column of the 64x32 tilemap, column A from row Y and wrapping at the screen's bottom, into two pieces: X = word offset of (A, Y), Y = offset of (A, row 0) in the same screen... - verified
Bg_ColSpan64x32Addr$C0:8218 · 43 B · EngineThe addresses of Bg_ColSpan64x32 without the sizes: X = word offset of (A, Y), A = offset of (A, row 0) in the same screen. - verified
Map_BuildRowYInc1$C0:8243 · 32 B · EngineLayer-1 row for a rising Y scroll: WMADD = Map_BufC800, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D10; runs Map_WriteRow1 and sets bit 0 in... - verified
Map_BuildRowYInc2$C0:8263 · 34 B · EngineLayer-2 row for a rising Y scroll: WMADD = Map_BufD000, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D10; runs Map_WriteRow2 and sets bit 1 in... - verified
Map_BuildRowYInc2Half$C0:8285 · 32 B · EngineLayer-2 row for a rising Y scroll: WMADD = Map_BufD000, Map_BuildCol = Map_Unk1D12 - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D18; runs Map_WriteRow2 and sets bit 1 in... - verified
Map_BuildRowYInc3$C0:82A5 · 32 B · EngineLayer-3 row for a rising Y scroll: WMADD = Map_BufD800, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D10; runs Map_WriteRow3 and sets bit 2 in... - verified
Map_BuildRowYDec1$C0:82C5 · 32 B · EngineLayer-1 row for a falling Y scroll: WMADD = Map_BufC800, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_TileOriginY; runs Map_WriteRow1 and sets bit 0 in... - verified
Map_BuildRowYDec2$C0:82E5 · 32 B · EngineLayer-2 row for a falling Y scroll: WMADD = Map_BufD000, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_TileOriginY; runs Map_WriteRow2 and sets bit 1 in... - verified
Map_BuildRowYDec2Half$C0:8305 · 32 B · EngineLayer-2 row for a falling Y scroll: WMADD = Map_BufD000, Map_BuildCol = Map_Unk1D12 - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D16; runs Map_WriteRow2 and sets bit 1 in... - verified
Map_BuildRowYDec3$C0:8325 · 32 B · EngineLayer-3 row for a falling Y scroll: WMADD = Map_BufD800, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_TileOriginY; runs Map_WriteRow3 and sets bit 2 in... - verified
Map_BuildColXInc1$C0:8345 · 32 B · EngineLayer-1 column for a rising X scroll: WMADD = Map_BufC800 + Map_BufColOfs, Map_BuildCol = Map_Unk1D0C, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol1 and... - verified
Map_BuildColXInc2$C0:8365 · 32 B · EngineLayer-2 column for a rising X scroll: WMADD = Map_BufD000 + Map_BufColOfs, Map_BuildCol = Map_Unk1D0C, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol2 and... - verified
Map_BuildColXInc2Half$C0:8385 · 32 B · EngineLayer-2 column for a rising X scroll: WMADD = Map_BufD000 + Map_BufColOfs, Map_BuildCol = Map_Unk1D14, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_Unk1D16 - 1; runs Map_WriteCol2 and sets... - verified
Map_BuildColXInc3$C0:83A5 · 32 B · EngineLayer-3 column for a rising X scroll: WMADD = Map_BufD800 + Map_BufColOfs, Map_BuildCol = Map_Unk1D0C, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol3 and... - verified
Map_BuildColXDec1$C0:83C5 · 32 B · EngineLayer-1 column for a falling X scroll: WMADD = Map_BufC800 + Map_BufColOfs, Map_BuildCol = Map_TileOriginX, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol1... - verified
Map_BuildColXDec2$C0:83E5 · 32 B · EngineLayer-2 column for a falling X scroll: WMADD = Map_BufD000 + Map_BufColOfs, Map_BuildCol = Map_TileOriginX, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol2... - verified
Map_BuildColXDec2Half$C0:8405 · 32 B · EngineLayer-2 column for a falling X scroll: WMADD = Map_BufD000 + Map_BufColOfs, Map_BuildCol = Map_Unk1D12, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_Unk1D16 - 1; runs Map_WriteCol2 and sets... - verified
Map_BuildColXDec3$C0:8425 · 32 B · EngineLayer-3 column for a falling X scroll: WMADD = Map_BufD800 + Map_BufColOfs, Map_BuildCol = Map_TileOriginX, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol3... - verified
Map_UploadRowYInc1$C0:8445 · 98 B · EngineLayer-1 row upload for Map_BuiltRowYInc bit 0: sends the row in Map_BufC800 to VRAM as three pieces, at most, of Map_EdgeSize1 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_EdgeDmaRow$C0:84A7 · 26 B · EngineThe shared end of the row uploads: VMAIN = increment by 1 word after the high byte, DMA channel 7 in word mode (DMAP_TwoRegs) to VMDATAL, source bank $7E, and starts it. - verified
Map_UploadRowYInc2$C0:84C1 · 98 B · EngineLayer-2 row upload for Map_BuiltRowYInc bit 1: sends the row in Map_BufD000 to VRAM as three pieces, at most, of Map_EdgeSize2 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadRowYInc3$C0:8523 · 98 B · EngineLayer-3 row upload for Map_BuiltRowYInc bit 2: sends the row in Map_BufD800 to VRAM as three pieces, at most, of Map_EdgeSize3 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadRowYDec1$C0:8585 · 98 B · EngineLayer-1 row upload for Map_BuiltRowYDec bit 0: sends the row in Map_BufC800 to VRAM as three pieces, at most, of Map_EdgeSize1 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadRowYDec2$C0:85E7 · 98 B · EngineLayer-2 row upload for Map_BuiltRowYDec bit 1: sends the row in Map_BufD000 to VRAM as three pieces, at most, of Map_EdgeSize2 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadRowYDec3$C0:8649 · 98 B · EngineLayer-3 row upload for Map_BuiltRowYDec bit 2: sends the row in Map_BufD800 to VRAM as three pieces, at most, of Map_EdgeSize3 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadColXInc1$C0:86AB · 50 B · EngineLayer-1 column upload for Map_BuiltColXInc bit 0: sends the column at Map_BufC800 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize1 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_EdgeDmaCol$C0:86DD · 26 B · EngineAs Map_EdgeDmaRow with VMAIN = increment by 32 words after the high byte (VRAM_INC_32), so the words go down a tilemap column. - verified
Map_UploadColXInc2$C0:86F7 · 50 B · EngineLayer-2 column upload for Map_BuiltColXInc bit 1: sends the column at Map_BufD000 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize2 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_UploadColXInc3$C0:8729 · 50 B · EngineLayer-3 column upload for Map_BuiltColXInc bit 2: sends the column at Map_BufD800 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize3 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_UploadColXDec1$C0:875B · 50 B · EngineLayer-1 column upload for Map_BuiltColXDec bit 0: sends the column at Map_BufC800 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize1 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_UploadColXDec2$C0:878D · 50 B · EngineLayer-2 column upload for Map_BuiltColXDec bit 1: sends the column at Map_BufD000 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize2 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_UploadColXDec3$C0:87BF · 50 B · EngineLayer-3 column upload for Map_BuiltColXDec bit 2: sends the column at Map_BufD800 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize3 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Field_Unk87F1$C0:87F1 · 45 B · EngineBuilds the right-hand edge column of each layer after a full redraw and recomputes the edge addresses: Map_BuildColXInc1; for layer 2, unless Map_LayerEdgeOff has Map_Layer2 set... - verified
Field_FrameUpdate$C0:881E · 60 B · EngineField work done every frame, before input-driven checks such as Field_ActionButton: resets Field_UnkEB (the action-button target) to none, then with DP=$1D00 runs Map_ResetUnk1D2E, clears... - verified
Field_Unk885A$C0:885A · 139 B · EngineA two-step job driven by Field_Unk38, run frame after frame by DefaultHandler's map-redraw path until it clears Field_Unk38: - Field_Unk38 = 1: zero Map_Unk1D2E/1D30/1D32/1D33. - verified
Map_ResetUnk1D2E$C0:88E5 · 9 B · EngineCopies Map_Unk1D2A to Map_Unk1D2E and Map_Unk1D2B to Map_Unk1D30 at the start of every Field_FrameUpdate (so those two hold per-frame values derived from a standing pair; meaning unknown). - verified
Field_DpadDispatch$C0:88EE · 20 B · EngineUnless Field_Unk38 is busy, runs the Field_DpadHandlerTable entry picked by Pad_Unk00F9 bits 0-3 (16 entries; the D-pad bits, if Pad_Unk00F9 is laid out like Pad_Pressed's high byte), with 8-bit X/Y. - verified
Field_DpadHandlerTable$C0:8902 · 34 B · EngineField_DpadDispatch's handler for each value of Pad_Unk00F9 bits 0-3, read as Right (bit 0), Left (1), Down (2) and Up (3) from what the handlers do; impossible pairs (Left+Right, Up+Down) and... - verified
Field_DpadNone$C0:8924 · 1 B · EngineNo direction (or an impossible combination): leaves Map_Unk1D2C/1D2D at the 0 Field_FrameUpdate set and Map_Unk1D2E/1D30 as they are. - verified
Field_DpadRight$C0:8925 · 31 B · EngineRight: Map_Unk1D2C = +$10 and Map_Unk1D2E += $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadLeft$C0:8944 · 31 B · EngineLeft: Map_Unk1D2C = -$10 and Map_Unk1D2E -= $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadUp$C0:8963 · 31 B · EngineUp: Map_Unk1D2D = -$10 and Map_Unk1D30 -= $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadDown$C0:8982 · 31 B · EngineDown: Map_Unk1D2D = +$10 and Map_Unk1D30 += $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadDownRight$C0:89A1 · 49 B · EngineDown+Right: both steps +$10, both sums up by $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadDownLeft$C0:89D2 · 53 B · EngineDown+Left: X step -$10 (sum down), Y step +$10 (sum up); $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadUpRight$C0:8A07 · 53 B · EngineUp+Right: X step +$10 (sum up), Y step -$10 (sum down); $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadUpLeft$C0:8A3C · 49 B · EngineUp+Left: both steps -$10, both sums down by $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Map_Unk8A6D$C0:8A6D · 1,800 B · EngineProbably the leader's collision with the map and with other objects (inferred: it zeroes the parts of the step whose moved box would have a corner on a blocking tile or touch a blocking object...
Bank $C0 · $C0:9000–$9FFF
$C0:9000
Verified · 50
- verified
Map_Unk9175$C0:9175 · 55 B · EngineField_FrameUpdate's step after the D-pad: zeroes Map_Unk1D32/1D33, then copies Map_Unk1D2E (signed X step) into Map_Unk1D32 unless the leader is already at the limit in that direction... - verified
Map_Unk91AC$C0:91AC · 565 B · EngineAdds up this frame's scroll amounts for three sets of layer scroll words and splits them into whole pixels for Map_Unk93E1, which runs next. - verified
Map_Unk93E1$C0:93E1 · 106 B · EngineApplies the pixels Map_Unk91AC split out this frame to the three sets of scroll words, then has the new tilemap edges built: - zeroes Map_EdgeRowYInc/YDec and Map_EdgeColXInc/XDec; - layer 1... - verified
Map_Scroll1XInc$C0:944B · 50 B · EngineLayer 1, X rising: once per pixel in Map_Move1XPos, Map_Unk1D87 + 1 and the fine counter Map_Unk1D93 + 1 (0-$0F, wrapping). - verified
Map_Scroll1XDec$C0:947D · 48 B · EngineLayer 1, X falling: as Map_Scroll1XInc with Map_Move1XNeg, stepping Map_Unk1D87 and Map_Unk1D93 down; the crossings are 0 to $0F and $08 to $07, and lower the low bytes of Map_Unk1D0C and... - verified
Map_Scroll1YInc$C0:94AD · 50 B · EngineLayer 1, Y rising: as Map_Scroll1XInc with Map_Move1YPos, Map_Unk1D89 and the fine counter Map_Unk1D96; the crossings raise the low bytes of Map_TileOriginY and Map_Unk1D10 and store Map_Layer1 in... - verified
Map_Scroll1YDec$C0:94DF · 48 B · EngineLayer 1, Y falling: as Map_Scroll1XDec with Map_Move1YNeg, Map_Unk1D89 and Map_Unk1D96; the crossings lower the low bytes of Map_TileOriginY and Map_Unk1D10 (in this order, unlike the X version)... - verified
Map_Scroll2XInc$C0:950F · 54 B · EngineLayer 2, X rising: once per pixel in Map_Move2XPos, Map_Unk1D8B + 1 and the fine counter Map_Unk1D94 + 1 (0-$0F, wrapping). - verified
Map_Scroll2XDec$C0:9545 · 52 B · EngineLayer 2, X falling: as Map_Scroll2XInc with Map_Move2XNeg, stepping down (crossings 0 to $0F and $08 to $07; Map_EdgeColXDec). - verified
Map_Scroll2YInc$C0:9579 · 54 B · EngineLayer 2, Y rising: as Map_Scroll2XInc with Map_Move2YPos, Map_Unk1D8D and Map_Unk1D97 (Map_EdgeRowYInc). - verified
Map_Scroll2YDec$C0:95AF · 52 B · EngineLayer 2, Y falling: as Map_Scroll2XDec with Map_Move2YNeg, Map_Unk1D8D and Map_Unk1D97 (Map_EdgeRowYDec). - verified
Map_Scroll2XIncHalf$C0:95E3 · 54 B · EngineLayer 2 at half rate, X rising (Map_Unk0BC9 bit 7): once per step in Map_Move2XPos the fine counter Map_Unk1D94 + 1, here 0-$1F (wrapping), and Map_Unk1D8B + 1 only when the new count is even, so... - verified
Map_Scroll2XDecHalf$C0:9619 · 52 B · EngineLayer 2 at half rate, X falling: as Map_Scroll2XIncHalf with Map_Move2XNeg, counting down (crossings 0 to $1F and $10 to $0F, which lower Map_Unk1D14 and Map_Unk1D12 and set Map_Layer2 in... - verified
Map_Scroll2YIncHalf$C0:964D · 54 B · EngineLayer 2 at half rate, Y rising: as Map_Scroll2XIncHalf with Map_Move2YPos, Map_Unk1D97 and Map_Unk1D8D; the crossings raise Map_Unk1D16 and Map_Unk1D18 (Map_EdgeRowYInc). - verified
Map_Scroll2YDecHalf$C0:9683 · 52 B · EngineLayer 2 at half rate, Y falling: as Map_Scroll2XDecHalf with Map_Move2YNeg, Map_Unk1D97 and Map_Unk1D8D; the crossings lower Map_Unk1D16 and Map_Unk1D18 (Map_EdgeRowYDec). - verified
Map_Scroll3XInc$C0:96B7 · 54 B · EngineLayer 3, X rising: as Map_Scroll2XInc with Map_Move3XPos, Map_Unk1D8F, Map_Unk1D95 and the Map_Layer3 bit. - verified
Map_Scroll3XDec$C0:96ED · 52 B · EngineLayer 3, X falling: as Map_Scroll2XDec with Map_Move3XNeg, Map_Unk1D8F, Map_Unk1D95 and the Map_Layer3 bit. - verified
Map_Scroll3YInc$C0:9721 · 62 B · EngineLayer 3, Y rising: as Map_Scroll2YInc with Map_Move3YPos, Map_Unk1D91, Map_Unk1D98 and the Map_Layer3 bit; also adds 4 to Map_Unk1DFB per pixel (four INCs; what reads it is not traced). - verified
Map_Scroll3YDec$C0:975F · 60 B · EngineLayer 3, Y falling: as Map_Scroll2YDec with Map_Move3YNeg, Map_Unk1D91, Map_Unk1D98 and the Map_Layer3 bit; also subtracts 4 from Map_Unk1DFB per pixel. - verified
Map_EdgeColsXInc$C0:979B · 49 B · EngineFor each layer bit set in Map_EdgeColXInc (1, 2, 3 in that order) runs that layer's column builder (Map_BuildColXInc1/2/3) and then adds 1 to the layer's column bias (Map_BgColBias... - verified
Map_EdgeColsXIncHalf$C0:97CC · 49 B · EngineAs Map_EdgeColsXInc, with Map_BuildColXInc2Half as layer 2's builder (used while Map_Unk0BC9 bit 7 is set). - verified
Map_EdgeColsXDec$C0:97FD · 49 B · EngineAs Map_EdgeColsXInc for Map_EdgeColXDec: builders Map_BuildColXDec1/ 2/3, and the column biases go down by 1 (wrapping at 64). - verified
Map_EdgeColsXDecHalf$C0:982E · 49 B · EngineAs Map_EdgeColsXDec, with Map_BuildColXDec2Half for layer 2. - verified
Map_EdgeRowsYInc$C0:985F · 49 B · EngineAs Map_EdgeColsXInc for rows: for each layer bit in Map_EdgeRowYInc runs Map_BuildRowYInc1/2/3 and adds 1 to the layer's row bias (Map_BgRowBias, Map_BgRowBias2, Map_BgRowBias3), wrapping at 32. - verified
Map_EdgeRowsYIncHalf$C0:9890 · 49 B · EngineAs Map_EdgeRowsYInc, with Map_BuildRowYInc2Half for layer 2. - verified
Map_EdgeRowsYDec$C0:98C1 · 49 B · EngineAs Map_EdgeRowsYInc for Map_EdgeRowYDec: builders Map_BuildRowYDec1/ 2/3, and the row biases go down by 1 (wrapping at 32). - verified
Map_EdgeRowsYDecHalf$C0:98F2 · 49 B · EngineAs Map_EdgeRowsYDec, with Map_BuildRowYDec2Half for layer 2. - verified
Map_ProbeHitsObj$C0:9923 · 187 B · EngineMap_Unk8A6D's object test of the point Map_ProbeX/Y. - verified
Map_Unk99DE$C0:99DE · 65 B · EngineField_FrameUpdate's step after Map_Unk9175: may drop the frame's steps in Map_Unk1D2E (X) and Map_Unk1D30 (Y). - verified
Map_StepStopDown$C0:9A1F · 30 B · EngineMap_Unk99DE's test for a downward step, A = n (step / 16). - verified
Map_StepStopUp$C0:9A3D · 35 B · EngineMap_Unk99DE's test for an upward step, A = n. - verified
Map_StepStopRight$C0:9A60 · 30 B · EngineAs Map_StepStopDown for a rightward step: L = Map_Unk1D0C / 2 against Map_Unk1D1B, the leader's Obj_ScreenX against Screen_HalfX (C=1 when it is in the left half or at $80), Map_Unk1D93 + n... - verified
Map_StepStopLeft$C0:9A7E · 35 B · EngineAs Map_StepStopUp for a leftward step: Map_Unk1D1A against T = Map_TileOriginX / 2, the leader's Obj_ScreenX against Screen_HalfX (C=1 when it is in the right half), Map_Unk1D93 - n. - verified
Map_ProbeTileAttrs$C0:9AA1 · 17 B · EngineReads the map bytes of one tile for the collision probes. - verified
Map_ProbeTileAttrs_Load$C0:9AB2 · 22 B · Engine - verified
Map_ProbeTileAttrsAny$C0:9AC8 · 11 B · EngineAs Map_ProbeTileAttrs without the treasure test: always reads the three bytes (branches into Map_ProbeTileAttrs_Load) and returns C=0. - verified
Map_ProbeTileLevel$C0:9AD3 · 290 B · EngineDecides which half of the probed tile the point Map_ProbeX/Y is in and loads that half's level. - verified
Map_SlopeShift$C0:9BF5 · 22 B · Engine/ Map_SlopeBase / Map_SlopeSide: Map_ProbeTileLevel's line for shapes 2-$17, indexed by Map_ProbeShape (shape - 2). - verified
Map_SlopeBase$C0:9C0B · 22 B · Engine - verified
Map_SlopeSide$C0:9C21 · 22 B · Engine - verified
Map_ProbeLevelBlocked$C0:9C37 · 37 B · EngineWhether the half tile Map_ProbeTileLevel picked blocks the leader, against Field_Unk55 (looks like the level the leader stands on): - Map_ProbeNoLevel set: blocks only when Field_Unk55 is... - verified
Map_StepTileEffects$C0:9C5C · 359 B · EngineMap_Unk8A6D's commit of a step it has kept. - verified
Map_InitEntryTile$C0:9DC3 · 102 B · EngineThe sibling of Map_StepTileEffects for a location load: it reads the entry tile (Loc_EntryX/Y) with Map_ProbeTileAttrsAny and Map_ProbeTileLevel at the bottom middle of the tile (Map_ProbeX low... - verified
Party_Unk9E29$C0:9E29 · 91 B · EngineThe leader's step (kind-0 object of Evt_OpB0_PartyControl): picks its animation (Party_LeaderAnim), then, when Map_Unk1D32 or Map_Unk1D33 (its X / Y step this frame) is nonzero, steps Field_UnkAB... - verified
Party_LeaderAnim$C0:9E84 · 77 B · EngineThe leader's facing and animation row from this frame's D-pad step (Map_Unk1D2C/1D2D) and tile flags (Map_Unk1D34): - flags with Map_ProbeShape1E (bit 2): with no Y step the animation stops... - verified
Party_Member2Anim$C0:9ED1 · 79 B · EngineAs Party_LeaderAnim from a log entry: the facing and row from PartyLog_PadX/Y and PartyLog_Flags at X (the D-pad step the leader had there). - verified
Party_Member3Anim$C0:9F20 · 79 B · EngineParty_Member2Anim again, byte for byte, for member 3. - verified
Party_FollowerHoldAnim$C0:9F6F · 131 B · EngineA follower's animation while it holds its place (Party_UnkA26B / A2CE when it is close enough behind), from the log entry X it is at: with PartyLog_Flags 0, Party_AnimNoStep (stand / idle). - verified
Party_AnimNoStep$C0:9FF2 · 5 B · EngineParty_AnimTable's handler for no step (entry 0 and every code that is not a D-pad direction): X = Obj_Cur, then Party_AnimIdle. - verified
Party_AnimTable$C0:9FF7 · 130 B · EngineThe facing / animation handler for each step code (JSR (Party_AnimTable,X) in Party_LeaderAnim, Party_Member2Anim, Party_Member3Anim and Party_FollowerHoldAnim; X = code & $7E, so entries 0-63).
Bank $C0 · $C0:A000–$AFFF
$C0:A000
Verified · 46
- verified
Party_AnimLeftWalk$C0:A079 · 10 B · EngineParty_AnimTable handlers for the four straight directions: Obj_Cur's Obj_Facing = the direction, then Party_AnimWalk (walk row) or Party_AnimRun (run row). - verified
Party_AnimRightWalk$C0:A083 · 10 B · Engine - verified
Party_AnimUpWalk$C0:A08D · 10 B · Engine - verified
Party_AnimDownWalk$C0:A097 · 10 B · Engine - verified
Party_AnimLeftRun$C0:A0A1 · 10 B · Engine - verified
Party_AnimRightRun$C0:A0AB · 10 B · Engine - verified
Party_AnimUpRun$C0:A0B5 · 10 B · Engine - verified
Party_AnimDownRun$C0:A0BF · 10 B · Engine - verified
Party_AnimDownLeftWalk$C0:A0C9 · 21 B · EngineParty_AnimTable handlers for the diagonals: Obj_Cur keeps its facing when it is one of the two directions, else faces the horizontal one; then Party_AnimWalk or Party_AnimRun. - verified
Party_AnimDownRightWalk$C0:A0DE · 21 B · Engine - verified
Party_AnimUpLeftWalk$C0:A0F3 · 21 B · Engine - verified
Party_AnimUpRightWalk$C0:A108 · 21 B · Engine - verified
Party_AnimDownLeftRun$C0:A11D · 21 B · Engine - verified
Party_AnimDownRightRun$C0:A132 · 21 B · Engine - verified
Party_AnimUpLeftRun$C0:A147 · 21 B · Engine - verified
Party_AnimUpRightRun$C0:A15C · 21 B · Engine - verified
Party_AnimWalk$C0:A171 · 27 B · EngineField_Unk58 = 0 (the frames-standing count, probably: Field_WaitFrame counts it up and Party_AnimIdle tests it), then the object at Y gets Obj_AnimRow = ObjAnim_RowWalk, column 0 and Obj_AnimTimer... - verified
Party_AnimRun$C0:A18C · 70 B · EngineField_Unk58 = 0, then the object at Y gets Obj_AnimRow = ObjAnim_RowRun (column and timer 0, unless already set); but when the leader has no step this frame (Map_Unk1D32 and 1D33 both 0), Y is the... - verified
Party_AnimRowUnk19$C0:A1D2 · 23 B · EngineThe object at Y gets Obj_AnimRow = ObjAnim_RowUnk19 (column and timer 0, unless already set). - verified
Party_AnimIdle$C0:A1E9 · 107 B · EngineNo step: the animation row while standing, for the object at Y. - verified
Party_AnimRowUnk1B$C0:A254 · 23 B · EngineThe object at Y gets Obj_AnimRow = ObjAnim_RowUnk1B (column and timer 0, unless already set): the row on a shape-$1E tile (Map_ProbeShape1E) with a Y step. - verified
Party_UnkA26B$C0:A26B · 99 B · EngineMember 2's step (kind-1 object of Evt_OpB0_PartyControl), on Party_ObjSlot1's object: Obj_VelX = Obj_VelY = 0; then the lag is Field_UnkAB - Field_UnkAC (& $7F). - verified
Party_UnkA2CE$C0:A2CE · 109 B · EngineMember 3's step (kind 2), as Party_UnkA26B on Party_ObjSlot2's object, following member 2: the lag is Field_UnkAC - Field_UnkAD, it replays from Field_UnkAD and ends in Party_Member3Anim. - verified
LocLoad_UnkA33B$C0:A33B · 461 B · EngineThe map-properties step of a location load (name kept: LoadLocation and Field_RestoreState call it by it). - verified
LocLoad_EmptyStep$C0:A508 · 1 B · EngineA lone RTS: does nothing. - verified
Ppu_ApplyMapScreens$C0:A509 · 24 B · EngineWrites the screen settings LocLoad_UnkA33B took from MapProps to the PPU: Ppu_Unk0BD7 to TM, Ppu_Unk0BD8 to TS, Ppu_Unk0BDF to CGADSUB, and 0 to MOSAIC (mosaic off). - verified
Map_UnpackTilePlanes$C0:A521 · 330 B · EngineReads the rest of the unpacked MapProps (from MapProps.Planes, through the WRAM data port) into the map's per-tile planes. - verified
Map_LoadExitTiles$C0:A66B · 167 B · EngineBuilds Map_TileExitIdx for the location: first every tile of all 64 rows gets Map_ExitNone (row 0 filled, then copied to rows 63 down to 1 with MVN, one Map_PlaneBytes row at a time), then... - verified
Map_LoadTreasureTiles$C0:A712 · 170 B · EngineAs Map_LoadExitTiles for treasure: Map_TreasureIdx gets Map_TreasureNone on every tile (row 0, then MVN copies), then Map_TreasureRec0 = the first word of TreasureRom_LocOfs and the location's... - verified
Map_TreasureTaken$C0:A7BC · 45 B · EngineTests the Treasure_Flags bit of the record at Map_RecOfs: its number is (Map_RecOfs - Map_TreasureRec0) / 4, as in Field_CheckTileInFront. - verified
Obj_ResetFrameState$C0:A7E9 · 39 B · Sprites & objectsFor each location object (Evt_ObjCount of them) writes 0 to its Obj_Unk0F00 (no frame to build) and Obj_LastFrameNone to its Obj_LastFrame (so the next frame is always rebuilt), through the WRAM... - verified
Vblank_UnkA810$C0:A810 · 125 B · EngineThe per-frame object pass. - verified
Obj_UpdateInView$C0:A88D · 186 B · Sprites & objectsTests object Obj_Cur against the view window and sets it up or drops it as it enters or leaves. - verified
Obj_FlagInView$C0:A947 · 67 B · Sprites & objectsThe view test for objects whose Obj_Unk1100 is Obj_Unk1100Seven: only sets Obj_Unk0F00 = Obj_Unk0F00Active in the window and 0 out of it, with no set-up, linking or release. - verified
Obj_DrawUnlink$C0:A98A · 67 B · Sprites & objectsTakes object Obj_Cur out of its draw bucket, if it is in one (Obj_DrawOut bit 7 clear). - verified
Obj_DrawLink$C0:A9CD · 58 B · Sprites & objectsPuts object Obj_Cur at the head of the draw bucket for its Obj_ScreenY, unless it is already in one (Obj_DrawOut bit 7 clear). - verified
Obj_MoveStep$C0:AA07 · 192 B · Sprites & objectsOne frame of movement for object Obj_Cur (Obj_Unk1100 3 and up), while Obj_MoveFrames is nonzero (it is decremented first). - verified
Obj_MoveStep_Arc$C0:AAC7 · 54 B · Sprites & objects - verified
Obj_MoveStepFree$C0:AAFD · 72 B · Sprites & objectsMovement for objects with Obj_Unk1100 below Obj_Unk1100FreeMove: with Obj_ArcMode set, the arc step (BRA Obj_MoveStep_Arc); otherwise, while Obj_MoveFrames is nonzero (decremented first), the low... - verified
Obj_CalcScreenPos$C0:AB45 · 93 B · Sprites & objectsScreen position of object Obj_Cur from its map position and the layer-1 view: ObjScr_ViewX = Map_TileOriginX (low byte) x 8 + (Map_Unk1D87 & 7), ObjScr_ViewY likewise from Map_TileOriginY and... - verified
Obj_CalcDirection$C0:ABA2 · 199 B · Sprites & objectsDirection from point (ObjDir_FromX, ObjDir_FromY) to (ObjDir_ToX, ObjDir_ToY), map tiles, as an angle in Obj_Direction: 256 per turn, $00 = +X (right), $40 = +Y (down), $80 = -X, $C0 = -Y. - verified
Obj_SetVelocity$C0:AC69 · 148 B · Sprites & objectsSets object X's steps from Obj_Direction and Obj_Speed with the hardware multiplier: Obj_VelY = speed x sin / 256 and Obj_VelX = speed x cos / 256 (Rom_SineTable256 at the direction and at the... - verified
Obj_SetVelocityChecked$C0:ACFD · 410 B · Sprites & objectsAs Obj_SetVelocity (steps from Obj_Direction and Obj_Speed, the sine into ObjVel_Y and the cosine into ObjVel_X, sign-extended into ObjVel_YHi / ObjVel_XHi), but it looks at the map tile the... - verified
Obj_SetVelocityChecked_Probe$C0:AE97 · 153 B · Sprites & objects - verified
Obj_SetVelocityAxis$C0:AF30 · 30 B · Sprites & objectsZeroes one of the two steps in ObjVel_X / ObjVel_Y, then probes and stores them through Obj_SetVelocityChecked_Probe: when |Y step| >= |X step| the Y step goes, else the X step. - verified
Field_UnkAF4E$C0:AF4E · 328 B · EngineCopies the rectangle MapCopy_SrcX..MapCopy_EndX x MapCopy_SrcY..
Bank $C0 · $C0:B000–$BFFF
$C0:B000
Verified · 24
- verified
Map_CopyRegionPlane$C0:B096 · 80 B · EngineCopies the MapCopy_* rectangle within one map plane, the one at $7E:MapCopy_Plane: one MVN per row of MapCopy_Width + 1 bytes, from MapCopy_SrcX/Y + MapCopy_Plane to MapCopy_DstX/Y +... - verified
Field_UnkB0E6$C0:B0E6 · 65 B · EngineThe location-load counterpart of Vblank_UnkA810: for every object slot below Evt_ObjCount x 2 (Evt_ObjSlotEnd) whose Obj_Unk1100 has bit 7 clear and is not Obj_Unk1100Seven, Obj_ActivateIfInView... - verified
Obj_ActivateIfInView$C0:B127 · 107 B · Sprites & objectsObj_UpdateInView's set-up half for a location load: when Obj_Unk1A81 is 1..$7F and the object lies in the view window, sets it up exactly as Obj_UpdateInView does (Obj_DrawPrev / Obj_DrawNext /... - verified
Obj_ResetStates$C0:B192 · 32 B · Sprites & objects(was Sub_B192.) Clears Obj_State for every object the location defines (count in Evt_ObjCount), pointing DP at the Obj_State table so each clear is a 2-byte dp store, then tail-jumps to... - verified
VramQ_Flush$C0:B1B2 · 82 B · EngineUploads every pending entry of the VRAM upload queue (VramQ_*, filled by Obj_BuildFrame4, Obj_BuildFrame8, Obj_BuildFrame8Pass1, Obj_BuildFrame12Pass2 and Obj_BuildFrame12Pass2Alt) with DMA... - verified
Obj_ResetDrawLists$C0:B204 · 94 B · Sprites & objectsEmpties the draw buckets: with DP=$2100 it writes ObjQ_Empty ($80) to the first 32 bytes at Obj_DrawBucket through the WRAM port, then MVNs spread them over the rest of the page ($0E20-$0EFF: 32... - verified
Oam_HideFirst4$C0:B262 · 15 B · EngineParks OAM shadow sprites 0-3 below the screen: their Y bytes in Oam_LowTable = Oam_HiddenY. - verified
Oam_BuildShadow$C0:B271 · 55 B · Engine(was PostVBlank.) Rebuilds the OAM shadow ($0700 low table, $0900 high table) for the next frame; it runs before Field_WaitFrame's wait for the NMI, not after a VBlank. - verified
Oam_BucketLoop$C0:B2A8 · 10 B · Engine - verified
Oam_CheckChain$C0:B2B2 · 14 B · Engine - verified
Oam_NextBucket$C0:B2C0 · 8 B · Engine - verified
Oam_HideRange1$C0:B2C8 · 16 B · Engine - verified
Oam_EndRange1$C0:B2D8 · 6 B · Engine - verified
Oam_HideRange2$C0:B2DE · 16 B · Engine - verified
Oam_EndRange2$C0:B2EE · 6 B · Engine - verified
Oam_HideRange3$C0:B2F4 · 16 B · Engine - verified
Oam_EndRange3$C0:B304 · 5 B · Engine - verified
Spr_AppendToOam$C0:B309 · 1,016 B · Engine(was Sub_B309.) Appends object Obj_Cur's sprite to the OAM shadow. - verified
Spr_PrepareTiles$C0:B701 · 135 B · Engine(was Sub_B701.) Brings object Obj_Cur's SprTile records up to date before Spr_AppendToOam copies them. - verified
Spr_Place4$C0:B788 · 322 B · Engine(was Sub_B788.) Re-places a 4-tile (size 0) object: with DB=$7F, each SprTile record's X = Spr_BaseX + OfsX (bit 8 packed into Obj_OamHiA with the large-size bits) and Y = Spr_BaseY + OfsY... - verified
Spr_Load4$C0:B8CA · 411 B · Engine(was Sub_B8CA.) Builds a 4-tile (size 0) object's SprTile records from SprTileSrc (OfsX, OfsY, Tile/Attr), placing them at the object's position as Spr_Place4 does (same three Y clamps). - verified
Spr_Place8$C0:BA65 · 631 B · Engine(was Sub_BA65.) Re-places an 8-tile (size 1) object from its existing SprTile records: two groups of 4 records give X and the two high-table bytes (Obj_OamHiA, Obj_OamHiA+1), then all 8 Y... - verified
Spr_Load8$C0:BCDC · 790 B · Engine(was Sub_BCDC.) Builds an 8-tile (size 1) object's SprTile records from SprTileSrc and places them: OfsX, OfsY and Tile/Attr are copied from SprTileSrc, then X, the two high-table bytes and Y are set. - verified
Spr_Place12$C0:BFF2 · 717 B · Engine(was Sub_BFF2.) Re-places a 12-tile (size 2) object from its existing SprTile records: three groups of 4 records give X and the high-table bytes (Obj_OamHiA, Obj_OamHiA+1, Obj_OamHiB), then the 12...
Bank $C0 · $C0:C000–$CFFF
$C0:C000
Verified · 11
- verified
Spr_Load12$C0:C2BF · 1,064 B · Engine(was Sub_C2BF.) Builds a 12-tile (size 2) object's SprTile records from SprTileSrc and places them: OfsX, OfsY and Tile/Attr are copied from SprTileSrc, then X, the three high-table bytes and Y... - verified
Spr_PackHiBits4$C0:C6E7 · 83 B · Engine(was Sub_C6E7.) For the 4 SprTile records starting at X: X = Spr_BaseX + OfsX, and returns in A the OAM high-table byte for them (X bit 8 of each, large-size bits set). - verified
Spr_Place24$C0:C73A · 592 B · Engine(was Sub_C73A.) Re-places a 24-tile (size 3) object: six Spr_PackHiBits4 groups fill Obj_OamHiA/B/C, then all 24 Y positions are rebuilt from Spr_BaseY + OfsY with the clamp variant chosen by... - verified
Obj_AnimTickAndQueue$C0:C98A · 236 B · Sprites & objectsPer-object animation tick, called for object Obj_Cur from the object loop ($C0:A832, $C0:A878). - verified
Field_ProcessAnimQueue$C0:CA76 · 99 B · EngineBuilds queued object frames while there is time left in the frame, called from Field_EndOfFrame ($C0:00D6). - verified
Obj_BuildSpriteFrameStep$C0:CAD9 · 49 B · Sprites & objectsOne step of building object Obj_Cur's current frame, graphics included: skips (C=0) unless Obj_Unk1100 bit 7 is clear, Obj_Unk1A81 is 1..$7F and Obj_Unk0F00 is nonzero; then by size class... - verified
Obj_BuildFrameLayout$C0:CB0A · 48 B · Sprites & objects(was Sub_CB0A.) Like Obj_BuildSpriteFrameStep, but for objects whose tiles are already in VRAM: tail-calls Obj_FrameLayout4 / 8 / 12, which only rewrite the SprTile records for Obj_LastFrame. - verified
Obj_AnimFrameLookup$C0:CB3A · 162 B · Sprites & objects(was Sub_CB3A.) Returns in A the frame number object X should show: Anim_FramePtr = Obj_AnimFrameTbl + (Obj_Facing × Obj_AnimFacingStride) + row*4 + Obj_AnimColumn, row = Obj_AnimRow (or... - verified
Obj_BuildFrame4$C0:CBDC · 492 B · Sprites & objects(was Sub_CBDC.) Builds frame A (Obj_FixedFrame in mode 3, else Obj_AnimFrameLookup) of a 4-tile object, in one pass. - verified
Obj_FrameLayout4$C0:CDC8 · 301 B · Sprites & objects(was Sub_CDC8.) Rewrites the 4 SprTile records of a 4-tile object for Obj_LastFrame directly (tiles already in VRAM): offsets from the frame record, Tile = Obj_VramTile + 2n, attributes as in... - verified
Obj_BuildFrame8$C0:CEF5 · 559 B · Sprites & objects(was Sub_CEF5.) Builds the current frame of an 8-tile object.
Bank $C0 · $C0:D000–$DFFF
$C0:D000
Verified · 11
- verified
Obj_FrameLayout8$C0:D124 · 358 B · Sprites & objects(was Sub_D124.) As Obj_FrameLayout4 for an 8-tile object (frame record 80 bytes, positions after 32 tile words); the first four tiles take Obj_PrioLow, the last four Obj_PrioHigh (by index, not by... - verified
Obj_BuildFrame8Pass0$C0:D28A · 131 B · Sprites & objects(was Sub_D28A.) First pass of an 8-tile frame: look the frame up, SprBuf_Alloc2 (2 adjacent SprBuf chunks), copy tiles 0-15 into the first chunk, INC Obj_State, return C=1 (more to do). - verified
Obj_BuildFrame8Pass1$C0:D30D · 490 B · Sprites & objects(was Sub_D30D.) Second pass: tiles 16-31 into the second chunk (Obj_TileBuf + $200), queue the VRAM upload ($200 bytes to Obj_VramTile*16, $200 more to the next tile row), write the 8 SprTileSrc... - verified
Obj_BuildFrame12$C0:D4F7 · 79 B · Sprites & objects(was Sub_D4F7.) Builds the current frame of a 12-tile object over three passes chosen by the Obj_State count (0 / 1 / 2+), each with an "Alt" variant when Obj_VramTile is ObjTile_AltLayout ($68... - verified
Obj_BuildFrame12Pass0$C0:D546 · 194 B · Sprites & objects(was Sub_D546.) Pass 0: frame lookup, SprBuf_Alloc3 (3 adjacent SprBuf chunks), tiles 0-7 to the buffer start and tiles 8-15 to +$200, INC Obj_State; C=1. - verified
Obj_BuildFrame12Pass0Alt$C0:D608 · 131 B · Sprites & objects(was Sub_D608.) Pass 0 for the ObjTile_AltLayout ($68) layout: frame lookup, SprBuf_Alloc3, tiles 0-15 in one run to the buffer start, INC Obj_State; C=1 (C=0 when nothing changed or no chunks are... - verified
Obj_BuildFrame12Pass1$C0:D68B · 173 B · Sprites & objects(was Sub_D68B.) Pass 1: tiles 16-23 to +$100, tiles 24-31 to +$300; INC Obj_State; C=1. - verified
Obj_BuildFrame12Pass1Alt$C0:D738 · 173 B · Sprites & objects(was Sub_D738.) Pass 1 for the ObjTile_AltLayout ($68) layout: tiles 16-23 to +$200, tiles 24-31 to +$400; INC Obj_State; C=1. - verified
Obj_BuildFrame12Pass2$C0:D7E5 · 644 B · Sprites & objects(was Sub_D7E5.) Pass 2: tiles 32-47 to +$400, queue the VRAM upload ($500 bytes from Obj_TileBuf to Obj_VramTile*16, then $100 bytes from +$500 to 3 tile rows further on, +$300 words), write the... - verified
Obj_BuildFrame12Pass2Alt$C0:DA69 · 703 B · Sprites & objects(was Sub_DA69.) Pass 2 for the ObjTile_AltLayout ($68) layout: tiles 32-39 to +$300 and 40-47 to +$500, queue the upload ($100 bytes to Obj_VramTile*16, then $500 bytes from +$100 to the next tile... - verified
Obj_FrameLayout12$C0:DD28 · 1,026 B · Sprites & objects(was Sub_DD28.) Rewrites the 12 SprTile records of a 12-tile object for Obj_LastFrame (tiles already in VRAM): offsets from the frame record (120 bytes, positions after 48 tile words), tile...
Bank $C0 · $C0:E000–$EFFF
$C0:E000
Verified · 21
- verified
Spr_LoadLargeObj$C0:E12A · 1,034 B · Engine(was Sub_E12A.) Loads a 24-tile ("large") object in one go. - verified
Spr_CopyTileFlipped$C0:E534 · 339 B · Engine(was Sub_E534.) Copies one 32-byte 4bpp tile, mirrored left-right, from Spr_GfxPtr + (tile number × 32) to the WRAM tile buffer through WMDATA: each byte goes through BitReverseTable ($C0:FD00)... - verified
Spr_CopyTile$C0:E687 · 178 B · Engine(was Sub_E687.) Copies one 32-byte 4bpp tile from Spr_GfxPtr + (tile number × 32) to Spr_WramPtr in bank $7F, then moves WMADD past it so a following Spr_CopyTileFlipped writes the next tile. - verified
Spr_CopyTileD4$C0:E739 · 131 B · EngineCopies a 32-byte tile from GfxRom_D4+X to $7F:Y (BRL from Spr_CopyTile when the graphics are in bank $D4). - verified
Spr_CopyTileD2$C0:E7BC · 131 B · EngineCopies a 32-byte tile from GfxRom_D2+X to $7F:Y (BRL from Spr_CopyTile when the graphics are in bank $D2). - verified
Spr_CopyTileD3$C0:E83F · 131 B · EngineCopies a 32-byte tile from GfxRom_D3+X to $7F:Y (BRL from Spr_CopyTile when the graphics are in bank $D3). - verified
Spr_CopyTile7F$C0:E8C2 · 115 B · EngineCopies a 32-byte tile from $7F:X to $7F:Y (BRL from Spr_CopyTile when the graphics are already in WRAM); abs,X reads since DB = $7F. - verified
SprBuf_FreeAll$C0:E935 · 29 B · Engine(was Sub_E935.) Marks all eight SprBuf_Owner entries free ($80), with DP pointed at $0B00 so each store is a 2-byte dp store. - verified
SprBuf_Alloc1$C0:E952 · 40 B · Engine(was Sub_E952.) Gives object Obj_Cur one $200-byte chunk of the WRAM tile buffer: the first free entry n (0-3) of SprBuf_Owner gets Obj_Cur, and Obj_TileBuf = SprBuf_Base + n*$200. - verified
SprBuf_Alloc2$C0:E97A · 48 B · Engine(was Sub_E97A.) As SprBuf_Alloc1 for two adjacent free chunks (start entries 0-2). - verified
SprBuf_Alloc3$C0:E9AA · 56 B · Engine(was Sub_E9AA.) As SprBuf_Alloc1 for three adjacent free chunks (start entries 0-1). - verified
SprBuf_Free1$C0:E9E2 · 29 B · Engine(was Sub_E9E2.) Releases the SprBuf chunk owned by Obj_Cur: finds it among the first 4 SprBuf_Owner entries and marks it free. - verified
SprBuf_Free2$C0:E9FF · 32 B · Engine(was Sub_E9FF.) As SprBuf_Free1 for a 2-chunk object: the first of the 3 possible start entries owned by Obj_Cur and the one after it are freed. - verified
SprBuf_Free3$C0:EA1F · 35 B · Engine(was Sub_EA1F.) As SprBuf_Free1 for a 3-chunk object (2 possible start entries). - verified
SprBuf_FreeObj$C0:EA42 · 33 B · EngineReleases the SprBuf chunks owned by Obj_Cur whatever its size: finds the first of the SprBuf_UsedEntries SprBuf_Owner entries that holds Obj_Cur, frees it ($80 = Obj_None) and goes on freeing the... - verified
NmiHandler$C0:EA63 · 509 B · EngineThe field's vertical-blank interrupt, entered through the RAM trampoline InstallNMI writes (JML NmiHandler at $7E:0500). - verified
Field_WaitFrame$C0:EC60 · 23 B · EngineThe field's frame wait: counts Field_Unk58 up (16-bit INC, ANDed with Field_Unk58Mask), INCs Nmi_FramePending and spins until NmiHandler has done the frame's uploads and zeroed it. - verified
Credits_UploadLine$C0:EC77 · 44 B · EngineSends the staff-credits line Field_ServiceUnk54 built in Credits_LineBuf to VRAM: Credits_DmaSize bytes to VRAM word Credits_VramAddr with DMA channel 7 (word writes, VMAIN increment after the... - verified
Oam_UploadShadow$C0:ECA3 · 41 B · EngineCopies the OAM shadow (Oam_LowTable and Oam_HighTable, $00:0700, Oam_ShadowBytes = $220) to OAM from address 0 with DMA channel 7 (mode 0, B-bus target OAMDATA). - verified
IrqHandler$C0:ECCC · 73 B · EngineReached through the RAM trampoline InstallIRQ writes (JML IrqHandler at IrqTrampoline). - verified
Irq_UploadTileAnim$C0:ED15 · 841 B · EngineWith DP = DP_Field (set here and left set; IrqHandler restores D): Irq_DrawChoiceCursor when Field_Unk63 is not negative; then one queued tilemap job, by Field_VramQueueFlags: - VramQueue_TileAnim...
Bank $C0 · $C0:F000–$FFFF
$C0:F000
Verified · 36
- verified
Irq_DrawChoiceCursor$C0:F05E · 178 B · EngineDraws a 2x2-tile picture (tiles $0FC/$0FD over $0FE/$0FF, palette 2, priority: ChoiceCursor_TileTop / TileBottom) at choice row Field_Unk63 of the tilemap Field_UploadUnk1C00 sends to VRAM $1C00... - verified
Irq_ChoiceCursorClearRow3$C0:F110 · 21 B · EnginePuts Field_Unk2B78's grid entries back where choice row 3's cursor goes: VRAM ChoiceCursor_VramRow0 + 3 x VramRowStep ($1CC2) gets ChoiceCursor_GridRow0 + 3 x GridRowStep and + 1 ($29C2, $29C3... - verified
Irq_ChoiceCursorClearTail$C0:F125 · 6 B · Engine - verified
Irq_ChoiceCursorClearRow2$C0:F12B · 23 B · EngineAs Irq_ChoiceCursorClearRow3 for choice row 2: VRAM $1C82 gets $2982, $2983 (tiles $182/$183), $1CA2 gets $2992, $2993 (through Irq_ChoiceCursorClearTail). - verified
Irq_ChoiceCursorClearRow1$C0:F142 · 23 B · EngineAs Irq_ChoiceCursorClearRow3 for choice row 1: VRAM $1C42 gets $2942, $2943 (tiles $142/$143), $1C62 gets $2952, $2953 (through Irq_ChoiceCursorClearTail). - verified
Irq_ChoiceCursorClearRow0$C0:F159 · 23 B · EngineAs Irq_ChoiceCursorClearRow3 for choice row 0: VRAM $1C02 gets $2902, $2903 (tiles $102/$103), $1C22 gets $2912, $2913 (through Irq_ChoiceCursorClearTail). - verified
BankC0_OldBuildLeftovers$C0:F170 · 400 B · EngineNot code and, as far as found, never read. - verified
Rom_AngleTable$C0:F300 · 1,024 B · ROM headerThe direction (256 per turn, $40 = a quarter) of the vector (run, rise) for run and rise 0-31, at rise x 32 + run: within about 1 of atan2(rise, run) x 256 / 2 pi (checked against the ROM for all... - verified
Rom_DirToFacing$C0:F700 · 256 B · ROM headerThe facing (0 up, 1 down, 2 left, 3 right, the Obj_Facing values) for each direction 0-255 (Rom_AngleTable's units): $00-$1F 3, $20-$5F 1, $60-$9F 2, $A0-$DF 0, $E0-$FF 3 (checked against the... - verified
Rom_SineTable256$C0:F800 · 256 B · ROM headerSigned sine, 256 steps per turn: entry N = 127 x sin(N x 2 pi / 256) rounded to nearest ($00, $7F at $40, $00 at $80, $81 at $C0; checked against the ROM for all 256 entries). - verified
Rom_SineTable$C0:F900 · 1,024 B · ROM header|sin| for 1024 steps per turn, scaled to $FF: entry N is within 1 of 255 x |sin(N x 2 pi / 1024)| ($00 at $000 and $200, $FF around $100 and $300); checked against the ROM. - verified
BitReverseTable$C0:FD00 · 256 B · EngineByte N is N with its 8 bits in reverse order (bit 0 ↔ bit 7, 1 ↔ 6, ...): $01 → $80, $02 → $40, $03 → $C0. - verified
RandomTable$C0:FE00 · 256 B · EngineThe game's pseudo-random bytes, probably: a shuffle of 0-255 (every value appears exactly once; checked against the ROM). - verified
Reset$C0:FF00 · 16 B · Boottarget of the emulation-mode RESET vector ($FFFC) - verified
NMI_Stub$C0:FF10 · 4 B · BootNative-mode interrupt stubs ($FF10–$FF17) - verified
IRQ_Stub$C0:FF14 · 4 B · Boot - verified
BRK_Handler$C0:FF18 · 8 B · Bootnative BRK and emulation-mode COP both land here - verified
BitSet$C0:FF20 · 8 B · EngineBitmask lookup tables ($FF20–$FF2F) BitSet[N] = (1 << N), BitClear[N] = ~(1 << N), for N = 0..7. - verified
BitClear$C0:FF28 · 8 B · Engine - verified
ScrollWaveA$C0:FF30 · 64 B · EngineWave tables ($FF30–$FFAF) One period of a sine-like wave between -6 and +6 (32 signed 16-bit entries), stored twice. - verified
ScrollWaveB$C0:FF70 · 64 B · Engine - verified
RomExtHeader$C0:FFB0 · 13 B · ROM headerSNES cartridge header ($FFB0–$FFDF), standard layout - verified
RomExpansionRam$C0:FFBD · 1 B · ROM header - verified
RomSpecialVersion$C0:FFBE · 1 B · ROM header - verified
RomCartridgeSubtype$C0:FFBF · 1 B · ROM header - verified
ROMTitle$C0:FFC0 · 21 B · ROM header - verified
RomMapMode$C0:FFD5 · 1 B · ROM header - verified
RomType$C0:FFD6 · 1 B · ROM header - verified
RomSize$C0:FFD7 · 1 B · ROM header - verified
RomSramSize$C0:FFD8 · 1 B · ROM header - verified
RomRegion$C0:FFD9 · 1 B · ROM header - verified
RomDeveloperId$C0:FFDA · 1 B · ROM header - verified
RomVersion$C0:FFDB · 1 B · ROM header - verified
RomChecksumComplement$C0:FFDC · 2 B · ROM header - verified
RomChecksum$C0:FFDE · 2 B · ROM header - verified
RomVectors$C0:FFE0 · 32 B · ROM headerInterrupt vector table ($FFE0–$FFFF) Native mode: $FFE4–$FFEF.
Bank $C1 · $C1:0000–$0FFF
$C1:0000
Verified · 66
- verified
EngCall_BattleMain$C1:0000 · 3 B · EngineThe bank's entry block: nine 3-byte JMPs, most of them reached from other banks by JSL (those targets return with RTL or never return; $0003, $0006 and $0015 are not, see the list), then the two... - verified
BattleSys_RunServiceVec$C1:0003 · 3 B · Battle system - verified
BattleSys_ExitVec$C1:0006 · 3 B · Battle system - verified
BankC1_VecCFE300$C1:0009 · 3 B · Engine - verified
BankC1_VecCFE58A$C1:000C · 3 B · Engine - verified
BankC1_VecCCE000$C1:000F · 3 B · Engine - verified
BankC1_VecRefreshMenu$C1:0012 · 3 B · Engine - verified
BankC1_VecRts$C1:0015 · 3 B · Engine - verified
BankC1_VecLongDispatch$C1:0018 · 3 B · Engine - verified
BankC1_EnterBattleJml$C1:001B · 4 B · Engine - verified
BankC1_ExitBattleJml$C1:001F · 4 B · Engine - verified
BattleSys_SceneSetup$C1:0023 · 34 B · Battle systemService 0 (!BattleSys_ServiceUnk0), the first service BattleSys_Main requests: the battle's display set-up, probably. - verified
BattleSys_RunService$C1:0045 · 11 B · Battle systemThe service dispatcher: runs BattleSys_ServiceTable entry A (JSR (T,X) with X = A * 2) and puts A, X and Y back as they were. - verified
BattleSys_RunService_Rts$C1:0050 · 1 B · Battle system - verified
BattleSys_ServiceTable$C1:0051 · 20 B · Battle systemThe services of BattleSys_RunService, by number * 2. - verified
BankC1_LongDispatch$C1:0065 · 6 B · EngineA long-callable dispatcher (through BankC1_VecLongDispatch): runs BankC1_LongDispatchTable entry A, then RTL. - verified
BankC1_LongDispatchTable$C1:006B · 2 B · EngineBankC1_LongDispatch's table: entry 0 only (see there). - verified
BattleSys_Service6$C1:006D · 5 B · Battle systemService 6 (!BattleSys_ServiceUnk6): JSL BattleCF_RemoveMarkedEnemies (the enemies marked in !Battle_UnkAEB3 leave, !Battler_Present cleared, except one with !Battler_Unk9FF7 0, !Battler_ActAttr... - verified
BankC1_JmlCCE000$C1:0072 · 4 B · EngineThe JMLs behind three of the entry vectors (see EngCall_BattleMain): $0072 to Battle_InitUploadStep ($CC:E000, BankC1_VecCCE000), BankC1_JmlCFE300 ($0076) to BattleCF_VblankUploads ($CF:E300... - verified
BankC1_JmlCFE300$C1:0076 · 4 B · Engine - verified
BankC1_JmlCFE58A$C1:007A · 4 B · Engine - verified
BattleSys_PumpFrames$C1:007E · 11 B · Battle systemWaits for the next frame: sets !Battle_FramePending, then calls BattleSys_IdleVecCD0036 again and again until something else clears the flag. - verified
Battle_Mul8$C1:0089 · 30 B · Battle engine8×8→16 HW multiply via WRMPYA/WRMPYB/RDMPYL. - verified
Battle_Mul8x16$C1:00A7 · 48 B · Battle engine8×16→24 multiply in two hardware passes (the top byte of the product is zeroed first, so nothing from the caller is accumulated): pass 1: Factor8 × low byte of Factor16 -> Product+0/+1 pass 2... - verified
Battle_Divide$C1:00D7 · 54 B · Battle engine16÷8 HW divide via WRDIVL/WRDIVH/WRDIVB, quotient from RDDIVL and remainder from RDMPYL. - verified
Battle_ShiftLeft8$C1:010D · 4 B · Battle engine$C1:010D–$C1:011E — Shift helpers (18 bytes, $010D–$011E) Overlapping fall-through stubs for power-of-2 left/right shifts on A. - verified
Battle_ShiftLeft4$C1:0111 · 1 B · Battle engine - verified
Battle_ShiftLeft3$C1:0112 · 4 B · Battle engine - verified
Battle_ShiftRight8$C1:0116 · 2 B · Battle engine - verified
Battle_ShiftRight6$C1:0118 · 1 B · Battle engine - verified
Battle_ShiftRight5$C1:0119 · 1 B · Battle engine - verified
Battle_ShiftRight4$C1:011A · 1 B · Battle engine - verified
Battle_ShiftRight3$C1:011B · 4 B · Battle engine - verified
BattleMsg_FormatNumberDigits$C1:011F · 85 B · Battle text & numbersFormat the 16-bit value in !BattleMsg_NumValue (0-999) into digit tiles: !BattleMsg_Digit1000 = blank, Digit100 / Digit10 / Digit1 = digits, tiles looked up in !BattleRom_DigitTiles. - verified
BattleMsg_FormatTwoDigits$C1:0174 · 53 B · Battle text & numbersTwo-digit variant of BattleMsg_FormatNumberDigits: formats !BattleMsg_NumValue as tens+ones only. - verified
BattleMsg_ReencodeTextBuffer$C1:01A9 · 80 B · Battle text & numbersBack up the 16 raw text bytes the caller left in !BattleMsg_TextTiles to !BattleMsg_TextSource, blank both tile rows (TextTiles/TextTopTiles), then re-encode each text byte into a lower-row tile... - verified
Battle_SinLookup$C1:01F9 · 41 B · Battle engineScaled sine: returns (sin(A) × !Battle_SinScale) >> 8 in A. - verified
Battle_CalcAngle$C1:0222 · 119 B · Battle engineDirection angle between two screen points (256 units per turn). - verified
BattleUI_BuildStatusBarFrame$C1:0299 · 108 B · Battle status barRebuilds the battle status-bar map (BattleUI_StatusTile, $0CC0): 1. - verified
BattleUI_DrawPcNamePanel$C1:0305 · 448 B · Battle status bar - verified
BattleUI_NextNamePanel$C1:04C5 · 226 B · Battle status bar - verified
BattleUI_UpdateNextPcPanel$C1:05A7 · 308 B · Battle status barPer-frame peer of BattleUI_BuildStatusBarFrame: refreshes one PC's HP/MP digits per call (round robin through !BattleUI_NextPanelSlot), then redraws every present PC's ATB gauge (layouts 1/2). - verified
BattleUI_DrawAtbGauges$C1:06DB · 20 B · Battle status bar - verified
BattleUI_UpdateNextPcPanel_Exit$C1:06EF · 1 B · Battle status bar - verified
BattleUI_DrawSlotGaugeBar$C1:06F0 · 149 B · Battle status barDraw the 4-tile ATB gauge of PC slot !BattleUI_Slot into the status map at BattleRom_HpCellL1[slot] + !BattleUI_GaugeCellOffset. - verified
BattleMenu_DrawCommandList$C1:0785 · 153 B · Battle menuDraw the command list of PC slot A (6 rows × 7 columns) into the status map at offset slot × 12, from one of two ROM tile tables: !BattleRom_CmdListTech — "Attack", "Tech", "Item" on rows 1/3/5... - verified
BattleMenu_DrawCommandWindowFrames$C1:081E · 84 B · Battle menuDraw the 7×6 command-window frame of every PC in the roster into !BattleMenu_WindowMap, then highlight the shown PC's name and fall into BattleUI_ClearActivePanelColumn. - verified
BattleUI_ClearActivePanelColumn$C1:0872 · 118 B · Battle status barZero the two tile columns of the shown PC's command column (6 rows, offset !BattleMenu_ActivePc × 12) in the status map, then, if !BattleUI_PanelRedraw is set and no target selection is running... - verified
BattleUI_HighlightPcName$C1:08E8 · 65 B · Battle status barHighlight PC slot A's name in the status bar: look up the slot's offset in !BattleRom_NameAttrL1 (layout 1) or !BattleRom_NameAttrL02 (layouts 0 and 2) and set the attribute of a 5-wide × 2-high... - verified
BattleMenu_DrawCommandWindowFrame$C1:0929 · 52 B · Battle menuCopy one 7-column × 6-row command-window frame (corners, borders and fill) from !BattleRom_CommandWindowFrame into !BattleMenu_WindowMap at !BattleUI_MapOffset. - verified
BattleMenu_RenderItemListRows$C1:095D · 83 B · Battle menuRenders the 3 visible item-list lines: 1. - verified
BattleMenu_RenderItemRow$C1:09B0 · 215 B · Battle menu, then its RTS BattleMenu_RenderItemRow_Exit (1 byte, $0A87) Renders one item-list line for the Item_BattleList record at !BattleMenu_ItemRecOffset into the item map at !BattleMenu_RowMapOffset. - verified
BattleMenu_RenderItemRow_Exit$C1:0A87 · 1 B · Battle menu - verified
BattleMenu_RenderTechListRows$C1:0A88 · 75 B · Battle menuRenders 4 tech-list lines (2 per outer loop pass) for the active PC into the tech text buffer (BattleMenu_TechTextTile). - verified
BattleMenu_BuildTechAvailFlags$C1:0AD3 · 56 B · Battle menuBuilds !Tech_ListAvail (20 entries, one per list line) for the active PC's tech list: line code $FB-$FF (blank, header or skip line) → 0, anything else → 1. - verified
BattleMenu_RenderTechRow$C1:0B0B · 171 B · Battle menuRenders one tech-list line: blanks the text rows (!BattleMsg_TextTiles / TextTopTiles), fills them by the line code !Tech_ListCode[TechCodeIdx], and copies them into the tech text buffer at... - verified
BattleMenu_DrawTechLowerRow$C1:0BB6 · 29 B · Battle menuBlank-line / header exit path of BattleMenu_RenderTechRow: advances !BattleMenu_TechRowNum, blanks the lead cells, then copies 18 lower-row tiles from !BattleMsg_TextTiles into the line from col 3... - verified
BattleMenu_BlankNameLeadCells$C1:0BD3 · 45 B · Battle menuBlanks cols 3-5, the lead cells left of the name (which starts at col 6), on both rows of the tech-list line at !BattleMenu_RowMapOffset (blank tile, palette 3). - verified
BattleMenu_BlankNameTailCells$C1:0C00 · 45 B · Battle menuTech-name exit path of BattleMenu_RenderTechRow (reached by its tail JMP): blanks cols 17-20 (right of the 11-tile name) on both rows of the line (blank tile, palette 3); the mirror of... - verified
BattleMenu_UpdateWindows$C1:0C2D · 25 B · Battle menuPer-frame window upkeep dispatcher. - verified
BattleMenu_UpdateWindows_Exit$C1:0C46 · 3 B · Battle menu - verified
BattleMenu_UpdateMainWindow$C1:0C49 · 58 B · Battle menuMain command-window upkeep (submenu 0): - If !BattleMenu_RosterIdx differs from !BattleMenu_RosterIdxDrawn: reload the command window map and rebuild the status bar. - verified
BattleMenu_UpdateTechWindow$C1:0C83 · 471 B · Battle menuTech-window refresh (submenu 1, after UpdateTechMpAvail): 1. - verified
BattleMenu_DrawTechCursorRow$C1:0E5A · 96 B · Battle menuClears the cursor columns, then (unless a target is being selected) draws the 2×2 row cursor ($60-$63) at the shown PC's !Pc_TechRow, placed through !BattleRom_TechCursorCell. - verified
BattleMenu_ClearTechCursorTiles$C1:0EBA · 39 B · Battle menuBlanks cols 1-2 (the row-cursor columns) of all 6 tech-window rows. - verified
BattleMenu_UpdateTechMpAvail$C1:0EE1 · 348 B · Battle menuGrades the 3 visible tech-list lines (submenu 1) and colours each line in the window map: palette 2 = usable, palette 3 = greyed.
Bank $C1 · $C1:1000–$1FFF
$C1:1000
Verified · 54
- verified
BattleMenu_Return$C1:103D · 1 B · Battle menuShared RTS, also the JMP target of BattleMenu_UpdateMainWindow, BattleMenu_DrawTechCursorRow and BattleMenu_UpdateWindows_Exit. - verified
BattleSys_SlotMenuReadyPredicate$C1:103E · 16 B · Battle systemReturns A=0 if PC slot !BattleMenu_ReadySlotArg is menu-ready: in the roster (!BattleMenu_Roster entry not negative) and !Pc_LockStatus clear; nonzero otherwise. - verified
BattleMsg_BlankLeadingZeros$C1:104E · 32 B · Battle text & numbersLeading-zero suppression for the number formatter's digits. - verified
BattleSys_UpkeepTwoFrames$C1:106E · 117 B · Battle systemService 3 of the same-bank $C10045 service dispatcher (reached only by JSR $0003/$0045 inside bank $C1; returns RTS; dispatch table at $C10051, entry 3 = $106E; searched: no JSR, JMP or JSL... - verified
BattleMenu_RefreshIfDirtyL$C1:10E3 · 23 B · Battle menuJSL-entry twin of BattleMenu_RefreshIfDirtyAndTick, reached via the bank's cross-bank entry-vector table: JSL $C10012 -> JMP $C110E3. - verified
BattleMenu_RefreshIfDirtyAndTick$C1:10FA · 27 B · Battle menuSame-bank JSR twin of BattleMenu_RefreshIfDirtyL — identical dirty- flag gate and menu rebuild chain, but always follows up with a cross-bank per-frame service tick (BattleSys_FrameTickVec) before... - verified
BattleMenu_DrawCursorSprites$C1:1115 · 62 B · Battle menuBuilds OAM sprites 0-3 (BattleOam) for the command cursor over the shown PC: each of the 4 template sprites in BattleRom_CursorSprite is offset by the PC's !Battler_ScreenX/Y, and its palette bits... - verified
BattleMenu_ProcessInput$C1:1153 · 142 B · Battle menuBattle command-window input handler. - verified
BattleMenu_CycleActivePcPrev$C1:11E1 · 55 B · Battle menuLeft D-pad: step !BattleMenu_RosterIdx back (wrap 0..2), skipping roster entries that are negative. - verified
BattleMenu_CycleActivePcNext$C1:1218 · 56 B · Battle menuRight D-pad: mirror of CycleActivePcPrev — steps !BattleMenu_RosterIdx forward (wrap at 3 back to 0) instead; the same sound 0 and the same cursor-memory handling. - verified
BattleMenu_CursorUp$C1:1250 · 20 B · Battle menuUp D-pad: step the shown PC's !Pc_MenuRow back (wrap 0..2) and flag the cursor redraw (!BattleUI_PanelRedraw). - verified
BattleMenu_CursorDown$C1:1264 · 23 B · Battle menuDown D-pad: step the shown PC's !Pc_MenuRow forward (wrap at 3 back to 0) and flag the cursor redraw (!BattleUI_PanelRedraw). - verified
BattleMenu_ConfirmCommand$C1:127B · 33 B · Battle menuConfirm-button dispatch: sets !BattleUI_UnkA0D7 to $FF (compared by BattleUI_BuildStatusBarFrame with the first selected target), calls BattleFx_SetPtrA2FromTable for the shown PC, then tail-jumps... - verified
BattleMenu_ChooseAttack$C1:129C · 32 B · Battle menuRow 0 (Attack) confirm: message call with "none", flags the cursor redraw, sets !BattleTgt_Mode = attack, !BattleMenu_CmdMenu = 0, builds the target list, sets !BattleMenu_TargetMoved (so... - verified
BattleMenu_OpenTechList$C1:12BC · 49 B · Battle menuRow 1 (Tech) confirm: unless !BattleMenu_Lock bit 0 is set, renders the tech list lines, builds !Tech_ListAvail, switches to the tech list (!BattleMenu_Submenu = !BattleMenu_CmdMenu = 1) and... - verified
BattleMenu_OpenItemList$C1:12ED · 51 B · Battle menuRow 2 (Item) confirm: unless !BattleMenu_Lock is non-zero, renders the item list at !BattleMenu_ItemScroll, queues the item map upload, copies the item box frame (!BattleRom_ItemBoxMap) into... - verified
BattleMenu_TechListInput$C1:1320 · 73 B · Battle menuPer-frame input handler while the tech list is open (submenu 1). - verified
BattleMenu_TechConfirm$C1:1369 · 38 B · Battle menuConfirms the highlighted tech: aborts unless the rows have been graded (!BattleMenu_TechAvailDone) and Tech_CursorEntry.Flags bit 7 is clear. - verified
BattleMenu_TechListCancel$C1:138F · 30 B · Battle menuCloses the tech list: reload the command window, back to the main menu, force a window rebuild, and restore this PC's saved tech-list cursor (!Pc_SavedTechRow / SavedTechScroll -> !Pc_TechRow /... - verified
BattleMenu_TechListPrev$C1:13AD · 71 B · Battle menuUp/Left in the tech list: walks backward from !BattleMenu_TechListIdx to the previous line whose !Tech_ListAvail is non-zero. - verified
BattleMenu_TechListNext$C1:13F4 · 73 B · Battle menuDown/Right in the tech list: mirror of TechListPrev — walks forward instead of backward, bounded by the list length (!Pc_TechCount) instead of the start of the list, and scrolls down instead of up... - verified
BattleMenu_ItemListInput$C1:143D · 91 B · Battle menuPer-frame input handler while the item list is open (submenu 2). - verified
BattleMenu_ItemConfirm$C1:1498 · 67 B · Battle menuConfirms the highlighted item: record offset = (!BattleMenu_ItemScroll + !BattleMenu_ItemRow) * 5 into Item_BattleList (id, target mode, flags, quantity, PC mask). - verified
BattleMenu_ItemListCancel$C1:14DB · 17 B · Battle menuCloses the item list: reload the command window, back to the main menu, force a window rebuild, and invalidate the scroll-arrow cache. - verified
BattleMenu_ItemCursorUp$C1:14EC · 22 B · Battle menuUp/Left in the item list: decrement !BattleMenu_ItemRow, scrolling the list up via ItemListScrollUp when already at the top row. - verified
BattleMenu_ItemCursorDown$C1:1502 · 26 B · Battle menuDown/Right in the item list: increment !BattleMenu_ItemRow (max 2), scrolling the list down via ItemListScrollDown when already at the bottom row. - verified
BattleMenu_ItemListPageDown$C1:151C · 27 B · Battle menuPage-down button: page the item list down 3 rows at once, clamped at scroll position $FA. - verified
BattleMenu_ItemListPageUp$C1:1537 · 20 B · Battle menuPage-up button: page the item list up 3 rows at once, clamped at 0. - verified
BattleMenu_ItemListRefresh$C1:154B · 22 B · Battle menuRe-renders the item list rows, invalidates both draw caches and clears !BattleMenu_ItemRefresh. - verified
BattleMenu_TargetSelectInput$C1:1561 · 185 B · Battle menuPer-frame input handler while target selection runs (entered from BattleMenu_ProcessInput when !BattleMenu_TargetSelect != 0). - verified
BattleMenu_CommitAction$C1:161A · 308 B · Battle menuConfirms the currently-selected target and builds the command record for the shown PC's chosen action (attack/tech/item), then queues it and hands the menu to the next ready PC. - verified
BattleMenu_ConsumePartnerSlot$C1:174E · 30 B · Battle menuRemoves PC slot !BattleMenu_PartnerArg from the ready state as part of committing a double/triple tech: if it's in the roster, decrements !BattleMenu_ReadyCount; either way marks its roster entry... - verified
BattleMenu_TargetNext$C1:176C · 26 B · Battle menuRight/Down while cycling targets: advance !BattleTgt_Cursor (wrap at 11), skipping empty candidate entries, and select the battler it lands on (!BattleTgt_Selected). - verified
BattleMenu_TargetPrev$C1:1786 · 22 B · Battle menuLeft/Up while cycling targets: mirror of TargetNext — steps !BattleTgt_Cursor back (wrap to 10) instead. - verified
Battle_ClearPadEdges$C1:179C · 5 B · Battle engineClears both pad-edge bytes and returns. - verified
BattleMenu_ItemListScrollUp$C1:17A1 · 16 B · Battle menuScrolls the item list up one row: decrements !BattleMenu_ItemScroll (min 0), then re-renders and invalidates both draw caches (row cursor, arrows). - verified
BattleMenu_ItemListScrollUp_SetScroll$C1:17B1 · 2 B · Battle menu - verified
BattleMenu_ItemListScrollUp_RenderTail$C1:17B3 · 3 B · Battle menu - verified
BattleMenu_ItemListScrollUp_SkipRender$C1:17B6 · 9 B · Battle menu - verified
BattleMenu_ItemListScrollDown$C1:17BF · 18 B · Battle menuScrolls the item list down one row: increments !BattleMenu_ItemScroll (clamped at $FA), then re-renders and invalidates both draw caches. - verified
BattleMenu_ItemListScrollDown_RenderTail$C1:17D1 · 3 B · Battle menu - verified
BattleMenu_ItemListScrollDown_SkipRender$C1:17D4 · 9 B · Battle menu - verified
BattleMenu_UpdateCursorOverlay$C1:17DD · 828 B · Battle menuCursor/overlay refresh at the end of the menu rebuild chain (after ProcessInput), so like it only on frames with !BattleMenu_Dirty set: JSR from BattleMenu_RefreshIfDirtyL... - verified
BattleMenu_EnqueueReadyBattler$C1:1B19 · 60 B · Battle menuService 1 of the $C10045 service dispatcher (dispatch table at $C10051: service 0 -> $0023, 1 -> here, 2 -> RemoveBattlerFromReady). - verified
Battle_PlaySfx0$C1:1B55 · 18 B · Battle engineAPU command !Sfx_CmdPlay with sound id 0: fills !Sfx_Command / !Sfx_Param1 / !Sfx_Param2 (the same command block bank $C0's Audio_PlayTileSfxA fills) and calls the audio driver entry. - verified
BattleMenu_DequeueReadyBattler$C1:1B67 · 67 B · Battle menuPops the head of !BattleMenu_ReadyQueue (up to 3 deep, count in !BattleMenu_ReadyQueueLen) into the roster: clears its !Battle_Unk9F38, restores its tech-list cursor (!Pc_SavedTechRow /... - verified
BattleMenu_RemoveBattlerFromReady$C1:1BAA · 144 B · Battle menuService 2 of the $C10045 service dispatcher (dispatch table at $C10051; reached only by same-bank JSR from bank $C1, see BattleMenu_EnqueueReadyBattler). - verified
BattleMenu_LoadCommandWindowMap$C1:1C3A · 16 B · Battle menuCopies the $180-byte command window map (!BattleRom_CommandWindowMap, bank $D1) into !BattleMenu_WindowMap. - verified
Battle_DrawBattlerFrame$C1:1C4A · 11 B · Battle engineDecodes frame !Battle_FrameId of battler !Battle_FrameSlot into the battler's tile buffer in bank $7E, unless the battler uses frame layout 3 (!Battle_FrameLayoutStrip), which this entry leaves alone. - verified
Battle_DrawBattlerFrameAnyLayout$C1:1C55 · 804 B · Battle engineDecodes one animation frame of a battler into bank $7E tiles: 1. - verified
BattleMenu_BuildTargetList$C1:1F79 · 100 B · Battle menuRecords the requesting PC (!BattleTgt_Caster), resets the selection state (!BattleTgt_Result/CanCycle/TargetAll, two Unk bytes) and blanks !BattleTgt_Candidates and !BattleTgt_Selected (indices... - verified
BattleTgt_RunAreaQuery$C1:1FDD · 13 B · Battle targetingService 7 of the $C10045 service dispatcher (dispatch table at $C10051; reached only by same-bank JSR from bank $C1, see BattleMenu_EnqueueReadyBattler). - verified
BattleTgt_AreaTable$C1:1FEA · 14 B · Battle targeting - verified
BattleTgt_ModeTable$C1:1FF8 · 66 B · Battle targetingTarget-mode handler table, indexed by (!BattleTgt_Mode & $7F) clamped to $20, called from BattleMenu_BuildTargetList.
Bank $C1 · $C1:2000–$2FFF
$C1:2000
Verified · 64
- verified
BattleTgt_SingleAlly$C1:203A · 11 B · Battle targetingDefault mode: one PC (slots 0-2), cursor may cycle. - verified
BattleTgt_CollectValidTargets$C1:2045 · 85 B · Battle targeting - verified
BattleTgt_AllAllies$C1:209A · 15 B · Battle targetingevery PC - verified
BattleTgt_SingleEnemy$C1:20A9 · 13 B · Battle targetingone enemy (3-10), cursor may cycle. - verified
BattleTgt_AllEnemies$C1:20B6 · 16 B · Battle targeting - verified
BattleTgt_Everyone$C1:20C6 · 16 B · Battle targetingall battlers 0-10 - verified
BattleTgt_Self$C1:20D6 · 10 B · Battle targetingthe shown PC only - verified
BattleTgt_SingleKoAlly$C1:20E0 · 86 B · Battle targetingLists the PCs whose BattlerStats.Status has bit 7 set — by context, KO'd allies, i.e. - verified
BattleTgt_PcByCharId5$C1:2136 · 4 B · Battle targetingTargets the one party member whose !Pc_CharId equals !BattleTgt_WantedChar (5 for this entry, 4 via BattleTgt_PcByCharId4). - verified
BattleTgt_FindPcByCharId$C1:213A · 41 B · Battle targeting - verified
BattleTgt_PcByCharId4$C1:2163 · 6 B · Battle targeting; state as PcByCharId5 - verified
BattleTgt_EnemyLineFromCaster$C1:2169 · 70 B · Battle targeting - verified
BattleTgt_EnemyLineFromChar3$C1:21AF · 84 B · Battle targetingas above, but the source is the party member with character id 3 (!Pc_CharRobo, inferred: Robo; the name keeps the numeric id). - verified
BattleTgt_EnemyLineFromCaster2$C1:2203 · 72 B · Battle targetingsame as EnemyLineFromCaster with !BattleTgt_AreaVariant = 1 - verified
BattleTgt_CasterRadius$C1:224B · 20 B · Battle targetingarea $10 around the caster - verified
BattleTgt_EnemyRadius$C1:225F · 69 B · Battle targetingarea around a chosen enemy; size $19 for mode $1A, else $09 - verified
BattleTgt_Char3Radius$C1:22A4 · 47 B · Battle targetingarea around party member id 3; size $19 for mode $14, else $10. - verified
BattleTgt_Char6Radius$C1:22D3 · 34 B · Battle targetingarea $19 around party member id 6. - verified
BattleTgt_EnemyRow$C1:22F5 · 52 B · Battle targetingchosen enemy as anchor for BattleTgt_AreaRow (a +/-$20 band around the anchor's !Battler_ScreenY) - verified
BattleTgt_PartyTriangle$C1:2329 · 9 B · Battle targetingenemies inside the triangle formed by the three PCs (BattleTgt_AreaPartyTriangle) - verified
BattleTgt_AreaRow$C1:2332 · 114 B · Battle targeting"Row" area: every eligible battler on the scanned side whose screen y (!Battler_ScreenY) lies within +/-$20 of the centre battler's y. - verified
BattleTgt_AreaPartyTriangle$C1:23A4 · 511 B · Battle targetingEnemies inside the triangle whose corners are the screen positions of party slots 0, 1 and 2 (!Battler_ScreenX/Y for slots 0-2). - verified
BattleTgt_AreaLine$C1:25A3 · 350 B · Battle targeting"Line" area from the source battler (!BattleTgt_AreaCentre) towards the aimed-at battler (!BattleTgt_AreaAim), half-width r = AreaSize * 8 (passed to Battle_SinLookup as !Battle_SinScale; AreaSize... - verified
BattleTgt_AreaCircle$C1:2701 · 172 B · Battle targeting"Circle" area around the centre battler (!BattleTgt_AreaCentre). - verified
BattleTgt_AreaAddAnchor$C1:27AD · 24 B · Battle targetingShared tail of the area scans: puts !BattleTgt_Anchor at the front of !BattleTgt_Candidates if it belongs to the scanned side (see the AreaCircle header), then falls into BattleTgt_CompactCandidates. - verified
BattleTgt_CompactCandidates$C1:27C5 · 20 B · Battle targetingif the front slot is empty, shift the list left by one. - verified
BattleTgt_ClearLists$C1:27D9 · 15 B · Battle targetingblank candidate and selection lists (12 entries each, one more than they use) - verified
BattleTgt_SelectAllCandidates$C1:27E8 · 18 B · Battle targetingset target-all and copy the 11 candidates into the selection list - verified
BattleTgt_CycleNext$C1:27FA · 26 B · Battle targetingadvance !BattleTgt_Cursor to the next non-empty candidate (wrap at 11); no-op on an empty list. - verified
BattleTgt_CyclePrev$C1:2814 · 25 B · Battle targetingmirror of CycleNext - verified
BattleTgt_AnyCandidate$C1:282D · 16 B · Battle targetingZ=1 if all 11 candidate slots are $FF, Z=0 as soon as one isn't - verified
Battle_CacheBattlerCoordsAll$C1:283D · 29 B · Battle engineCopies every present battler's screen position into its probe position and rebuilds its box. - verified
Battle_CalcBattlerBox$C1:285A · 86 B · Battle engineBuilds battler X's box from its probe position: left = ProbeX - HalfWidth, clamped at 0 right = ProbeX + HalfWidth, clamped at $FF top = ProbeY - Height, clamped at 0 bottom = ProbeY + 8, or... - verified
Battle_BoxOverlapsOthers$C1:28B0 · 118 B · Battle engineTests the box of battler !Battle_BoxTestSlot against the box of every other present battler, skipping those with !Battler_Unk9FF7 or !Battler_UnkA5CD bit 7 set. - verified
Battle_BoxHitsBlockedCell$C1:2926 · 96 B · Battle engineTests whether the box of battler !Battle_BoxTestSlot covers a blocked cell of !Battle_CellMap (16x16-pixel cells, 16 per row). - verified
BattlePos_Query$C1:2986 · 44 B · Battle engineService 5 of the same-bank $C10045 service dispatcher (reached only by JSR $0003/$0045 inside bank $C1; returns RTS; dispatch table at $C10051, entry 5 = $2986; searched: no JSR, JMP or JSL... - verified
BattlePos_NearestPc$C1:29B2 · 73 B · Battle engine/ BattlePos_FarthestPc / BattlePos_NearestEnemy / BattlePos_FarthestEnemy ($C129B2–$C12AE2, 305 bytes; queries 0-3) - verified
BattlePos_FarthestPc$C1:29FB · 72 B · Battle engine - verified
BattlePos_NearestEnemy$C1:2A43 · 85 B · Battle engine - verified
BattlePos_FarthestEnemy$C1:2A98 · 75 B · Battle engine - verified
BattlePos_WithinDist40XY$C1:2AE3 · 12 B · Battle engineBattlePos_WithinDist* ($C12AE3–$C12BBB, 217 bytes; queries 4 and 14) - verified
BattlePos_WithinDist32XY$C1:2AEF · 12 B · Battle engine - verified
BattlePos_WithinDist64XY$C1:2AFB · 12 B · Battle engine - verified
BattlePos_WithinDist4XY$C1:2B07 · 12 B · Battle engine - verified
BattlePos_WithinDist4XYTwin$C1:2B13 · 12 B · Battle engine - verified
BattlePos_WithinDist16XY$C1:2B1F · 12 B · Battle engine - verified
BattlePos_WithinDist48$C1:2B2B · 12 B · Battle engine - verified
BattlePos_WithinDist32$C1:2B37 · 10 B · Battle engine - verified
BattlePos_CheckPairDist$C1:2B41 · 8 B · Battle engine - verified
BattlePos_CheckDist$C1:2B49 · 115 B · Battle engine - verified
BattlePos_SameRowBand$C1:2BBC · 30 B · Battle engine/ BattlePos_SubjectAbove / BattlePos_SubjectLeft ($C12BBC–$C12C01, 70 bytes; queries 5-7) - verified
BattlePos_SubjectAbove$C1:2BDA · 20 B · Battle engine - verified
BattlePos_SubjectLeft$C1:2BEE · 20 B · Battle engine - verified
BattlePos_PathClear$C1:2C02 · 165 B · Battle enginePlaces the subject's probe position out from its screen position in the direction Battle_CalcAngle gives from the subject to the other battler, at a radius of !Battle_SinScale (see the quirk... - verified
BattlePos_SubjectLowerHalf$C1:2CA7 · 19 B · Battle engine/ BattlePos_SubjectUpperHalf / BattlePos_SubjectRightPart / BattlePos_SubjectLeftPart ($C12CA7–$C12CF2, 76 bytes; queries 9-12) - verified
BattlePos_SubjectUpperHalf$C1:2CBA · 19 B · Battle engine - verified
BattlePos_SubjectRightPart$C1:2CCD · 19 B · Battle engine - verified
BattlePos_SubjectLeftPart$C1:2CE0 · 19 B · Battle engine - verified
BattlePos_DistDifference$C1:2CF3 · 142 B · Battle engineMeasures, from the other battler's screen position, the squared distance to the subject (d1) and to the battler in !BattlePos_Arg (d2), and stores |d2 - d1| / 256 (low byte) in !BattlePos_Found. - verified
BattlePos_ModeTable$C1:2D81 · 30 B · Battle enginequery handlers by !BattlePos_Mode, called from BattlePos_Query. - verified
Battle_TickPcSlots$C1:2D9F · 384 B · Battle enginePer-frame animation step for the three PCs. - verified
Battle_UnkThunk2F1F$C1:2F1F · 3 B · Battle enginea lone JMP to the RTS that ends Battle_TickEnemyGroup ($C1:34A6). - verified
Battle_UpdatePcFacing$C1:2F22 · 117 B · Battle engineTurns PC !Battle_TickSlot toward its nearest enemy, one PC at a time: !Battle_FacingTurn holds the PC whose turn it is (bit 7 = the turn was handed on and has not been taken yet). - verified
Battle_PickStatusAnim$C1:2F97 · 197 B · Battle enginePicks the animation and the status effect for battler !Battle_TickSlot from its status bytes: - default animation 3 (!Battle_AnimDefault), or 0 for an untargetable battler; effect !Battle_FxNone...
Bank $C1 · $C1:3000–$3FFF
$C1:3000
Verified · 31
- verified
Battle_PickNextStatusAnim$C1:305C · 48 B · Battle engineRuns Battle_PickStatusAnim for one battler per call, the slot in !Battle_StatusAnimNext (if present), and moves it on; past slot 10 it counts a wrap in !Battle_StatusAnimWraps and goes back to... - verified
Battle_ApplyPendingEffect$C1:308C · 42 B · Battle engineFor battler !Battle_TickSlot, if present: when the effect picked (!Battler_FxWanted) differs from the one running (!Battler_FxApplied), records it, stops the overlay and the colour cycle, clears... - verified
Battle_FxReset$C1:30B6 · 43 B · Battle engineEffect 0 (none): clears the battler's effect flags; for a PC also copies the saved palette (!Battle_PaletteSaved, 26 bytes from !Battler_Palette * 16) back over the live one, undoing a tint or... - verified
Battle_FxOverlay2Tint$C1:30E1 · 96 B · Battle engineEffect 3: resets, starts overlay 2 and marks the battler tinted (!Battler_FxTinted); for a PC also restores the saved palette from byte 2 on (24 bytes) and then writes the 4 bytes at... - verified
Battle_FxOverlay7$C1:3141 · 34 B · Battle engineEffect $0E: resets and starts overlay 7. - verified
Battle_FxOverlay6$C1:3163 · 34 B · Battle engineEffect 9: resets and starts overlay 6. - verified
Battle_FxColourCycle$C1:3185 · 12 B · Battle engineEffects 6, 7, $0B, $0C and $0D: resets and starts the colour cycle from step 0. - verified
Battle_FxOverlay1$C1:3191 · 31 B · Battle engineEffects 1, 2 and $0A: starts overlay 1. - verified
Battle_FxOverlay3$C1:31B0 · 34 B · Battle engineEffect 4: resets and starts overlay 3. - verified
Battle_FxOverlay4$C1:31D2 · 34 B · Battle engineEffect 5: resets and starts overlay 4. - verified
Battle_FxOverlay5$C1:31F4 · 34 B · Battle engineEffect 8: resets and starts overlay 5. - verified
Battle_FxHandlerTable$C1:3216 · 30 B · Battle engineOne handler per status effect id 0-$0E, called from Battle_ApplyPendingEffect. - verified
Battle_TickEnemyGroup$C1:3234 · 627 B · Battle engineThe enemy counterpart of Battle_TickPcSlots, which jumps here instead of ticking the PCs while !Battle_UnkA4 is 1-3 (A = that value). - verified
Battle_DrawAllBattlerFrames$C1:34A7 · 52 B · Battle engineDraws the starting frame (!Battler_StartFrame) of every present battler, any frame layout (Battle_DrawBattlerFrameAnyLayout), then sets the three PC animation timers to 1, 2 and 3 so the PCs take... - verified
Battle_StartPose$C1:34DB · 52 B · Battle engineThe last step of the battle set-up (service 0, which JMPs here): turns every PC toward its nearest enemy, then plays animation $0C on the targetable PCs (animation 0 on the others) through... - verified
Battle_FaceAllPcsNearestEnemy$C1:350F · 62 B · Battle engineSets !Battler_Facing of PCs 2, 1, 0 from the angle to each one's nearest enemy (position query 2 through service 5, as in Battle_UpdatePcFacing, but for every PC at once and without the presence... - verified
BattleSys_DefeatPose$C1:354D · 32 B · Battle systemService 9 of the same-bank $C10045 service dispatcher (reached only by JSR $0003/$0045 inside bank $C1; returns RTS; dispatch table at $C10051, entry 9 = $354D; no JSR, JMP or JSL reaches $354D... - verified
BattleSys_VictoryPose$C1:356D · 112 B · Battle systemService 8 of the same-bank $C10045 service dispatcher (reached only by JSR $0003/$0045 inside bank $C1; returns RTS; dispatch table at $C10051, entry 8 = $356D; no JSR, JMP or JSL reaches $356D... - verified
Battle_RunPcPose$C1:35DD · 189 B · Battle engineCopies, for each present PC, the first 8 entries of its pose list into !Pc_PoseTicks (durations, halved) and !Pc_PoseFrames (frame ids, for its current facing): the lists come from bank $E4 at... - verified
Battle_PoseStep$C1:369A · 122 B · Battle engineOne pose step, run on every second call: !Battle_UnkE5 flips between 0 (set it, return) and 1 (clear it, step). - verified
Battle_TickEnemyMovers$C1:3714 · 39 B · Battle enginePer-frame enemy movement. - verified
Battle_RunEnemyMover$C1:373B · 37 B · Battle engineRuns the mover of enemy !Battle_MoverEnemy, if that enemy is present: copies !Enemy_TargetWanted into !Enemy_MoveTarget, then, unless !Enemy_Anim is negative, stores the id in !Battle_MoverAnim... - verified
Battle_EnemyMoverTable$C1:3760 · 18 B · Battle engineOne mover per !BattleRom_EnemyMover entry, called from Battle_RunEnemyMover. - verified
Battle_MoverIdle$C1:3772 · 40 B · Battle engineMover 0 (move 4): stays put. - verified
Battle_MoverApproach$C1:379A · 293 B · Battle engineMover 1: walks towards the target until within reach. - verified
Battle_MoverCharge$C1:38BF · 154 B · Battle engineMover 2 (move 7): heads straight for the target from the enemy's position every time and starts the step, until a step is blocked by a blocking cell or another battler (the target included): then... - verified
Battle_MoverAxis$C1:3959 · 228 B · Battle engineMover 3: lines the enemy up with the target along one axis. - verified
Battle_MoverKeepRange$C1:3A3D · 389 B · Battle engineMover 4 (moves 6 and $10): makes for the point on a ring around the target, radius $40 (move $10: $80), on the enemy's side of it. - verified
Battle_MoverOrbit$C1:3BC2 · 625 B · Battle engineMover 5 (moves $0D-$0F): circles the target on a ring of radius !Battle_OrbitRadius ($20; move $0E: $40). - verified
Battle_MoverLoop$C1:3E33 · 295 B · Battle engineMover 6 (moves $0A-$0C): flies round a loop near where it started. - verified
Battle_MoverFixedDir$C1:3F5A · 199 B · Battle engineMover 7 (moves $11-$18): steps in a fixed direction from the enemy's position: $11 up, $12 down, $13 right, $14 left, $15 down-right, $16 down-left, $17 up-left, any other (move $18) up-right.
Bank $C1 · $C1:4000–$4FFF
$C1:4000
Verified · 29
- verified
Battle_MoverToCentre$C1:4021 · 55 B · Battle engineMover 8 (move $19): heads from the enemy's position for the middle of the screen (!Battle_ScreenCentreX/Y), faces that way and starts the step, with no probe and no collision test. - verified
BattleSys_RunAction$C1:4058 · 358 B · Battle systemService 4 of the $C10045 service API (dispatch table at $C10051, entry 4 = $4058; no JSR, JMP or JSL reaches $4058 directly; the one request found is LDA #4 / JSR $C1:0003 at $C1:BFA4, called from... - verified
BattleAct_FlagLethalPcHits$C1:41BE · 84 B · Battle engineFor each PC 0-2, sets its !Battler_UnkA119 to 1 when its pending hit record (!Battle_ActPcHitAmount/Kind, 4 bytes per PC) has kind 3, the PC's HP is not 0, the amount is not 0 and the amount is at... - verified
BattleAct_TickCalcs$C1:4212 · 40 B · Battle engineFor each of the 6 entries of !Battle_ActCalcSel that is non-zero, runs handler (value - 1) of the unmatched table behind BattleAct_RunCalc and stores the two bytes it leaves in... - verified
BattleAct_StepBattlerAnims$C1:423A · 214 B · Battle enginePlays the battlers' action animations, decoding at most one frame per call. - verified
BattleAct_LoadScript$C1:4310 · 28 B · Battle engineClears the 16-byte action parameter block (!Battle_ActScriptId .. $9886), sets !Battle_ActUnkArg987C to $FF (none) and calls the loader for !Battle_ActKind through BattleAct_LoaderTable (kinds 4... - verified
BattleAct_LoadAttack$C1:432C · 628 B · Battle engineKind 1. - verified
BattleAct_LoadTech$C1:45A0 · 442 B · Battle engineKind 2: reads the 7-byte record !Battle_ActId of BattleRom_PcTechAct (PC caster) or BattleRom_EnemyTechAct (enemy caster), including !Battle_ActUnkArg987C, then: frames !BattleRom_ActFrames for... - verified
BattleAct_LoadNone$C1:475A · 1 B · Battle engineKind 0 (and any kind of 4 and up): loads nothing, so no thread starts. - verified
BattleAct_LoadKind3$C1:475B · 216 B · Battle engineKind 3: like the PC branch of BattleAct_LoadTech, for any caster, with record !Battle_ActId - $BC of BattleRom_Kind3Act; frames !BattleRom_ActFrames, palettes !BattleRom_Kind3Pals, objects... - verified
BattleAct_LoadCommon$C1:4833 · 185 B · Battle engineThe end of every loader: - loads graphics set !Battle_ActGfxSetA (BattleAnim_LoadGfx4Vec) and !Battle_ActGfxSetB (BattleAnim_LoadGfx2Vec) and waits a frame; - calls BattleAnim_UnkVecCD0018 with... - verified
BattleAct_IndexObjLists$C1:48EC · 87 B · Battle engineSplits the 4-byte records at bank $CE + !Battle_ActObjPtr into the lists of the 16 action objects, by the top three bits of each record's first byte: 000 an ordinary record; 1xx ends the... - verified
BattleAct_UnpackFrames$C1:4943 · 188 B · Battle engineWaits a frame (BattleSys_PumpFrames, BattleMenu_RefreshIfDirtyAndTick) and builds up to 4 sprite frames from the unpacked data in !Battle_ActFrameBuf, going on from !Battle_ActFrameNum and... - verified
BattleAct_CheckReach$C1:49FF · 114 B · Battle engineFor a PC caster: sets !Battle_ActNear to 1, then to 0 when the main target (entry 3 of !Battle_ActBattlers) is not within 40 pixels (BattlePos_WithinDist40XY), and turns the caster towards the... - verified
BattleAct_FindPath$C1:4A71 · 333 B · Battle engineBreadth-first search on !Battle_PathMap from the cell of the start point ($80, $81) to the cell of the goal point ($82, $83); the cell of a point is (y & $F0) | (x >> 4). - verified
BattleAct_RunThreads$C1:4BBE · 224 B · Battle engineRuns one step of each live thread, in the order 0-4 then 8-15: thread n runs when its !Battle_ActThreadOn byte is non-zero, thread 4 only when !Battle_ActTargetMask is non-zero too, and threads... - verified
BattleAct_RunThread$C1:4C9E · 82 B · Battle engineRuns one thread for this frame. - verified
BattleAct_OpEndThread$C1:4CF0 · 7 B · Battle engineOpcode $00: switches the thread off (!Battle_ActThreadOn = 0). - verified
BattleAct_OpEndScript$C1:4CF7 · 13 B · Battle engineOpcode $01, and the handler of every unused opcode in the table: counts !Battle_ActScriptDone up, which ends the action (service 4 waits for it). - verified
BattleAct_OpLoopAnim$C1:4D04 · 4 B · Battle engineOpcode $02 <n>: starts animation n of the thread's actor in mode 2 (loop) and goes on with the next opcode in the same frame; advances 2. - verified
BattleAct_StartAnim$C1:4D08 · 282 B · Battle engine - verified
BattleAct_OpPlayAnim$C1:4E22 · 128 B · Battle engineOpcode $03 <n>: plays animation n once and waits for it to end, then advances 2. - verified
BattleAct_OpShowAnimFrame$C1:4EA2 · 120 B · Battle engineOpcodes $04-$06 <n> (one handler; the opcode is not looked at): starts animation n with the actor's stop byte set to 1, so that BattleAct_StepBattlerAnims shows its entry 0 and switches it off... - verified
BattleAct_OpResetSpeed$C1:4F1A · 58 B · Battle engineOpcode $07: sets the actor's move delay and speed (!Battle_ActorMoveDelay / !Battle_ActorMoveSpeed) back to the battler's defaults (!Battler_DefMoveDelay / !Battler_DefMoveSpeed, set at battle... - verified
BattleAct_OpSetSpeed$C1:4F54 · 107 B · Battle engineOpcodes $08-$0F (one handler): sets the actor's move delay and speed (!Battle_ActorMoveDelay / !Battle_ActorMoveSpeed) from entry (opcode - 8) of !BattleRom_ActMoveDelay / !BattleRom_ActMoveSpeed... - verified
BattleAct_OpMoveTo$C1:4FBF · 18 B · Battle engineThe move opcodes: move the thread's actor in a straight line to a point, at its !Battle_ActorMoveSpeed pixels per step and !Battle_ActorMoveDelay frames per step, then go on. - verified
BattleAct_OpMoveToUnkPoint$C1:4FD1 · 18 B · Battle engine - verified
BattleAct_OpMoveToCalc$C1:4FE3 · 10 B · Battle engine - verified
BattleAct_MoveToPoint$C1:4FED · 328 B · Battle engine
Bank $C1 · $C1:5000–$5FFF
$C1:5000
Verified · 78
- verified
BattleAct_StartBattlerMove$C1:5135 · 185 B · Battle engineStarts a straight move of battler X to the point in !Battle_ActCalcOutA/B (x, y): keeps its position (!Battler_ScreenX/Y) in !Battle_ActorFromX/Y and the point in !Battle_ActorToX/Y, turns it... - verified
BattleAct_OpCurveTo$C1:51EE · 23 B · Battle engineThe curving move opcodes: like the move opcodes $10-$12 (BattleAct_OpMoveTo) they move the thread's actor to a point and wait for it, but with mover kind !Battle_MoveKindCurve: the mover... - verified
BattleAct_OpCurveToUnkPoint$C1:5205 · 23 B · Battle engine - verified
BattleAct_OpCurveToCalc$C1:521C · 15 B · Battle engine - verified
BattleAct_CurveToPoint$C1:522B · 389 B · Battle engine - verified
BattleAct_CurveTurnDir$C1:53B0 · 89 B · Battle engineWhich way a curving move turns from heading DP $82 to the angle !Battle_GeoAngle (Battle_CalcAngle's, to the point): A = 0 (increase the angle) or 1 (decrease it), the shorter way. - verified
BattleAct_OpPathTo$C1:5409 · 18 B · Battle engineThe path-walk opcodes: a battler of threads 0-3 walks to a point cell by cell round what stands in the way, then the thread goes on. - verified
BattleAct_OpPathToUnkPoint$C1:541B · 18 B · Battle engine - verified
BattleAct_OpPathToCalc$C1:542D · 10 B · Battle engine - verified
BattleAct_PathToPoint$C1:5437 · 474 B · Battle engine - verified
BattleAct_OpSetPos$C1:5611 · 14 B · Battle engineThe place opcodes: put the thread's actor at a point at once (no move). - verified
BattleAct_SetPosToPoint$C1:561F · 77 B · Battle engine - verified
BattleAct_OpSetPosUnkPoint$C1:566C · 17 B · Battle engine - verified
BattleAct_OpSetPosCalc$C1:567D · 23 B · Battle engine - verified
BattleAct_OpFollow$C1:5694 · 39 B · Battle engineOpcode $1C <n>: on an object thread, makes the object follow something: !Battle_ActObjFollow of the object = entry n of !Battle_ActBattlers (a battler slot) for n below !Battle_ActFollowFirstObj... - verified
BattleAct_OpUnfollow$C1:56BB · 17 B · Battle engineOpcode $1D <j>: object thread j follows nothing any more (!Battle_ActObjFollow = !Battle_ActFollowNone), whatever thread runs it. - verified
BattleAct_OpCall$C1:56CC · 47 B · Battle engineOpcode $1E <n>: calls subscript n: keeps the address after the opcode (pointer + 2, the carry going into the bank) in the thread's !Battle_ActThreadReturn / !Battle_ActThreadReturnBank and goes to... - verified
BattleAct_OpReturn$C1:56FB · 25 B · Battle engineOpcode $1F: returns from a subscript (BattleAct_OpCall): the script pointer = the thread's !Battle_ActThreadReturn / ReturnBank, and the next opcode runs in the same frame. - verified
BattleAct_OpPause$C1:5714 · 14 B · Battle engineOpcode $20 <n>: ends the thread's turn for this frame and has BattleAct_RunThread only count !Battle_ActThreadWait = n down on the next n frames before running the next opcode; advances 2. - verified
BattleAct_OpReturnIfVar1F0$C1:5722 · 10 B · Battle engineOpcode $21: when variable $1F (!Battle_ActUnkPointY) is 0, returns from the subscript like opcode $1F; otherwise advances 1 (and the thread waits for the next frame). - verified
BattleAct_OpWaitVar$C1:572C · 23 B · Battle engineOpcode $22 <n> <v>: waits until variable n (!Battle_ActVars + n) is v: while it is not, stays on the opcode (advance 0); then goes on with the next opcode in the same frame, advancing 3. - verified
BattleAct_OpWaitVar1C$C1:5743 · 19 B · Battle engineOpcode $23 <v>: as opcode $22 for variable $1C (!Battle_ActVar1C); advances 2 when it is v. - verified
BattleAct_OpWaitVar1D$C1:5756 · 19 B · Battle engineOpcode $24 <v>: as opcode $23 for variable $1D (!Battle_ActVar1D). - verified
BattleAct_OpEndIfNoTarget$C1:5769 · 20 B · Battle engineOpcode $25 <i>: when entry i of !Battle_ActTargetSet is the end marker (bit 7 set: the set has fewer than i + 1 slots), switches the thread off (BattleAct_OpEndThread); otherwise goes on with the... - verified
BattleAct_OpShowAnimEntry$C1:577D · 137 B · Battle engineOpcode $26 <n> <f>: like opcodes $04-$06 (BattleAct_OpShowAnimFrame) with the stop byte f from the operand: starts animation n with the actor's stop byte = f, so that BattleAct_StepBattlerAnims... - verified
BattleAct_OpSetUnkA5CD$C1:5806 · 4 B · Battle engineOpcodes $27 (BattleAct_OpSetUnkA5CD, value 1) and $28 (BattleAct_OpClearUnkA5CD, value 0): set !Battler_UnkA5CD of the thread's battler (threads 0-3) or of every slot of the target set (thread 4)... - verified
BattleAct_StoreUnkA5CD$C1:580A · 54 B · Battle engine - verified
BattleAct_OpClearUnkA5CD$C1:5840 · 4 B · Battle engine - verified
BattleAct_OpSetUnk9FF7$C1:5844 · 4 B · Battle engineOpcodes $29 (BattleAct_OpSetUnk9FF7, value 1) and $2A (BattleAct_OpClearUnk9FF7, value 0): as opcodes $27/$28 for !Battler_Unk9FF7 (bit 7: skipped by the target scans). - verified
BattleAct_StoreUnk9FF7$C1:5848 · 49 B · Battle engine - verified
BattleAct_OpClearUnk9FF7$C1:5879 · 4 B · Battle engine - verified
BattleAct_OpClearUnkA4A4$C1:587D · 46 B · Battle engineOpcode $2B: zeroes !Battler_UnkA4A4 and !Battler_UnkA4AF of the thread's battler (threads 0-3) or of every slot of the target set (thread 4); object threads change nothing. - verified
BattleAct_OpUnkRevive$C1:58AB · 49 B · Battle engineOpcode $2C: for the thread's battler (threads 0-3) or every slot of the target set (thread 4): counts !Battler_Present up and zeroes !Battler_KoFlag; object threads change nothing. - verified
BattleAct_OpSetUnkCFFF$C1:58DC · 8 B · Battle engineOpcode $2D: !BattleFx_HoldAnims = 1 (BattleFx_HoldAnimsTick holds the palette animations); advances 1. - verified
BattleAct_OpClearUnkCFFF$C1:58E4 · 8 B · Battle engineOpcode $2E: !BattleFx_HoldAnims = 0 (BattleFx_HoldAnimsTick lets the held palette animations run again); advances 1. - verified
BattleAct_OpSetVar$C1:58EC · 18 B · Battle engineThe script variable opcodes ($C158EC–$C159B8): set, count and add to the bytes of !Battle_ActVars; variables $1C and $1D have opcodes of their own. - verified
BattleAct_OpSetVar1C$C1:58FE · 14 B · Battle engineOpcode $31 <v>: !Battle_ActVar1C = v; advances 2. - verified
BattleAct_OpSetVar1D$C1:590C · 14 B · Battle engineOpcode $32 <v>: !Battle_ActVar1D = v; advances 2. - verified
BattleAct_OpCalcToUnkPoint$C1:591A · 23 B · Battle engineOpcode $33 <n>: runs BattleAct_RunCalc handler n and keeps its point in !Battle_ActUnkPointX/Y (variables $1E/$1F), for the "UnkPoint" move opcodes; advances 2, and the thread waits for the next... - verified
BattleAct_OpIncVar$C1:5931 · 15 B · Battle engineOpcode $34 <n>: variable n + 1; advances 2. - verified
BattleAct_OpIncVar1C$C1:5940 · 11 B · Battle engineOpcode $35: !Battle_ActVar1C + 1; advances 1. - verified
BattleAct_OpIncVar1D$C1:594B · 11 B · Battle engineOpcode $36: !Battle_ActVar1D + 1; advances 1. - verified
BattleAct_OpDecVar$C1:5956 · 15 B · Battle engineOpcode $37 <n>: variable n - 1; advances 2. - verified
BattleAct_OpDecVar1C$C1:5965 · 11 B · Battle engineOpcode $38: !Battle_ActVar1C - 1; advances 1. - verified
BattleAct_OpDecVar1D$C1:5970 · 11 B · Battle engineOpcode $39: !Battle_ActVar1D - 1; advances 1. - verified
BattleAct_OpAddVar$C1:597B · 22 B · Battle engineOpcode $3A <n> <v>: variable n + v (8-bit, wraps); advances 3. - verified
BattleAct_OpAddVar1C$C1:5991 · 18 B · Battle engineOpcode $3B <v>: !Battle_ActVar1C + v; advances 2. - verified
BattleAct_OpAddVarTo1C$C1:59A3 · 22 B · Battle engineOpcode $3C <n>: !Battle_ActVar1C + variable n; advances 2. - verified
BattleAct_OpCalcToResult$C1:59B9 · 43 B · Battle engineOpcodes $3D-$40 and $45-$46 <n> (one handler): runs BattleAct_RunCalc handler n once and stores its two results in entry k of !Battle_ActCalcResult: k = opcode - $3D for $3D-$40 (0-3), opcode... - verified
BattleAct_OpCopyVar$C1:59E4 · 22 B · Battle engineOpcode $41 <a> <b>: variable b = variable a; advances 3. - verified
BattleAct_OpCopyVar1C$C1:59FA · 18 B · Battle engineOpcode $42 <n>: variable n = !Battle_ActVar1C; advances 2. - verified
BattleAct_OpOffsetToUnkPoint$C1:5A0C · 50 B · Battle engineOpcode $43 <n> <x> <y>: !Battle_ActUnkPointX/Y = (x, y) plus the point of BattleAct_RunCalc handler n (each 8-bit, wrapping); advances 4. - verified
BattleAct_OpActorPosToUnkPoint$C1:5A3E · 50 B · Battle engineOpcode $44: !Battle_ActUnkPointX/Y = the position of the thread's actor: !Battler_ScreenX/Y of its !Battle_ActBattlers entry, or the object's !Battle_ActObjX/Y on threads 8-15. - verified
BattleAct_OpAddVarClamped$C1:5A70 · 41 B · Battle engineOpcode $49 <n> <d>: variable n + d, with d signed and the result clamped to 0-$FF (a carry out of a positive add gives $FF, a negative add with no carry gives 0); advances 3. - verified
BattleAct_OpSwapVar1C1D$C1:5A99 · 22 B · Battle engineOpcodes $4A and $4D: swaps !Battle_ActVar1C and !Battle_ActVar1D; advances 1. - verified
BattleAct_OpSwapVar1C1E$C1:5AAF · 22 B · Battle engineOpcode $4E: swaps !Battle_ActVar1C and variable $1E (!Battle_ActUnkPointX); advances 1. - verified
BattleAct_OpSwapVar1C1F$C1:5AC5 · 22 B · Battle engineOpcode $4F: swaps !Battle_ActVar1C and variable $1F (!Battle_ActUnkPointY); advances 1. - verified
BattleAct_OpShowHitNumbers$C1:5ADB · 534 B · Battle engineOpcodes $50-$55: shows the hit numbers of record set (opcode & 7) as digit sprites over the battlers and waits until they have bounced. - verified
BattleAct_OpClearUnk9FF7Bit7$C1:5CF1 · 2 B · Battle engineOpcodes $5D (BattleAct_OpClearUnk9FF7Bit7, DP $8E = 0) and $5E (BattleAct_OpSetUnk9FF7Bit7, DP $8E = $80): sets bit 7 of the thread's battler's !Battler_Unk9FF7 (the target scans' skip bit) to... - verified
BattleAct_StoreUnk9FF7Bit7$C1:5CF3 · 31 B · Battle engine - verified
BattleAct_OpSetUnk9FF7Bit7$C1:5D12 · 6 B · Battle engine - verified
BattleAct_OpNop2$C1:5D18 · 5 B · Battle engineOpcode $5F <x>: does nothing; advances 2 (over its operand). - verified
BattleAct_OpLoadPalEntry$C1:5D1D · 118 B · Battle engineThe palette opcodes ($C15D1D–$C15FA4): colour sets from the action's palette list (!Battle_ActPalPtr) and its four palette sequences, opcode $69's special palette and its blink, and the colour... - verified
BattleAct_OpStartPalSeq$C1:5D93 · 46 B · Battle engineOpcodes $61-$64 <delay> <first> <last>: starts palette sequence opcode - $61 (0-3) for BattleAct_StepPalettes ($CC:F1E7): it loads the palette-list entries first..last in turn, one every delay... - verified
BattleAct_OpStopPalSeq$C1:5DC1 · 18 B · Battle engineOpcodes $65-$68: stops palette sequence opcode - $65 (0-3); the colours it last loaded stay. - verified
BattleAct_OpSetSpecialPalette$C1:5DD3 · 9 B · Battle engineOpcode $69 <n>: gives the thread's battler (threads 0-3) or every slot of the target set (threads 4-15, the object threads included) !Battler_Palette = !Battle_SpecialPalette, and fills that... - verified
BattleAct_SpecialPaletteBody$C1:5DDC · 171 B · Battle engine - verified
BattleAct_OpRestorePalette$C1:5E87 · 4 B · Battle engineOpcode $6A: undoes opcode $69: gives the thread's battler (threads 0-3) or every slot of the target set (threads 4-15) its !Battler_BasePalette back. - verified
BattleAct_RestorePaletteBody$C1:5E8B · 84 B · Battle engine - verified
BattleAct_OpStartPalCycle$C1:5EDF · 52 B · Battle engineOpcode $6B <delay>: starts the colour rotation of BattleCF_FrameUpdate ($CF:E600 on): every delay frames it turns the colours of !Battle_PaletteLive+$82-$99 (the special palette's 12 colours) on... - verified
BattleAct_OpBlinkPalette$C1:5F13 · 135 B · Battle engineOpcode $6C <n> <frames>: blinks between opcode $69's special palette n and the battler's own palette. - verified
BattleAct_OpStopPalCycle$C1:5F9A · 11 B · Battle engineOpcode $6D: stops opcode $6B's colour rotation (!Battle_UnkAB4E and !Battle_PalCycleLo = 0); the colours stay as they were turned. - verified
BattleAct_OpIncAllObjUnkA1D8$C1:5FA5 · 14 B · Battle engineThe object counter opcodes ($C15FA5–$C15FDD): count !Battle_ActObjUnkA1D8 up or clear it, for all eight object threads or for the running one. - verified
BattleAct_OpClearAllObjUnkA1D8$C1:5FB3 · 14 B · Battle engineOpcode $6F: zeroes !Battle_ActObjUnkA1D8 of object threads 0-7; advances 1. - verified
BattleAct_OpIncObjUnkA1D8$C1:5FC1 · 2 B · Battle engineOpcode $70: counts !Battle_ActObjUnkA1D8 of the running object thread (!Battle_ActObjThread) up; advances 1. - verified
BattleAct_Op70Body$C1:5FC3 · 16 B · Battle engine - verified
BattleAct_OpClearObjUnkA1D8$C1:5FD3 · 11 B · Battle engineOpcode $71: zeroes !Battle_ActObjUnkA1D8 of the running object thread; advances 1. - verified
BattleAct_OpSetFacing$C1:5FDE · 123 B · Battle engineOpcode $72 <mode>: sets the facing of the thread's actor from BattleAct_CalcFacing with A = mode: !Battler_Facing of the thread's battler (threads 0-3) or of every slot of the target set (thread...
Bank $C1 · $C1:6000–$6FFF
$C1:6000
Verified · 40
- verified
BattleAct_OpLinkObjBit7$C1:6059 · 6 B · Battle engineOpcodes $73 (BattleAct_OpLinkObjBit7, DP $8E = $80) and $74 (BattleAct_OpLinkObjBit6, DP $8E = $40) <n>: links the running object thread j (!Battle_ActObjThread) to the battler s in entry n of... - verified
BattleAct_OpLinkObjBit6$C1:605F · 4 B · Battle engine - verified
BattleAct_LinkObjBody$C1:6063 · 48 B · Battle engine - verified
BattleAct_OpCopyHeading$C1:6093 · 83 B · Battle engineThe heading opcodes ($C16093–$C1619D and $C16258): set !Battle_ActorUnkA5AA (the battlers) or !Battle_ActObjUnkA5B5 (the object threads), the heading a curving move with operand $FF starts from. - verified
BattleAct_OpHeadingFromCalc$C1:60E6 · 110 B · Battle engineOpcode $76 <a> <b>: runs BattleAct_RunCalc handler b and then a, takes each one's two results as a point's x/y, and stores the angle Battle_CalcAngle gives from point a (origin) to point b as the... - verified
BattleAct_OpAddHeading$C1:6154 · 74 B · Battle engineOpcode $77 <d>: adds d (mod 256, so a turn either way) to the heading of the same actors as opcode $75. - verified
BattleAct_OpSound$C1:619E · 35 B · Battle engineThe sound opcodes ($C1619E–$C1621A): fill the APU command block (!Sfx_Command, !Sfx_Param1/2) and run Audio_ProcessEntry. - verified
BattleAct_OpSoundCalc$C1:61C1 · 42 B · Battle engineOpcodes $7A/$7B <id> <calc>: APU command $18 (opcode $7A) or $19 (opcode $7B) with !Sfx_Param1 = id and !Sfx_Param2 = the first result of BattleAct_RunCalc handler calc (probably an x, as opcodes... - verified
BattleAct_OpPcAttackSfxA$C1:61EB · 10 B · Battle engineOpcodes $7C (BattleAct_OpPcAttackSfxA) and $7D (BattleAct_OpPcAttackSfxB): APU command $18 with !Sfx_Param1 = the sound of the PC attack record (!Battle_ActPcAttackRec) in !BattleRom_PcAttackSfxA... - verified
BattleAct_OpPcAttackSfxB$C1:61F5 · 8 B · Battle engine - verified
BattleAct_PlayPcAttackSfx$C1:61FD · 30 B · Battle engine - verified
BattleAct_OpRunVecCD001B$C1:621B · 33 B · Battle engineOpcode $80 <len> ...: copies len & $0F bytes of the script, from the length byte on, to !Battle_ActOp80Args (DP $53 on), runs BattleAct_UnkVecCD001B and advances by that count + 1 (the opcode and... - verified
BattleAct_OpSetCalcSel$C1:623C · 28 B · Battle engineOpcodes $81-$84 (entries 0-3) and $47/$48 (entries 4 and 5) <n>: !Battle_ActCalcSel[entry] = n + 1, so BattleAct_TickCalcs runs BattleAct_RunCalc handler n for that entry every frame; advances 2. - verified
BattleAct_OpSetHeading$C1:6258 · 65 B · Battle engineOpcode $85 <h>: sets the heading (see the heading opcodes above) of the thread's battler (threads 0-3 and 5-7), of every slot of the target set (thread 4; the target set here, unlike opcodes... - verified
BattleAct_OpArcToCalc$C1:6299 · 2 B · Battle engineThe arc opcodes: like the move opcodes $10-$12 (BattleAct_OpMoveTo) they move the thread's actor in a straight line to a point and wait for it, but with mover kind !Battle_MoveKindArc... - verified
BattleAct_ArcToCalcDir$C1:629B · 15 B · Battle engine - verified
BattleAct_ArcToPoint$C1:62AA · 671 B · Battle engine - verified
BattleAct_ArcQuarterPoint$C1:6549 · 113 B · Battle engineOpcodes $9C/$9D: moves !Battle_GeoPointX/Y to a quarter of the way from !Battle_GeoOriginX/Y: Origin + (|Point - Origin| / 4, rounded down) with the delta's sign, per axis (8-bit, no carry out). - verified
BattleAct_CalcMoveStep$C1:65BA · 183 B · Battle engineUnit step of a straight move from !Battle_GeoOriginX/Y to !Battle_GeoPointX/Y, as signed 8.8 pixels: the axis with the larger distance (x on a tie) moves 1.0 ($0100) per step, the other (smaller *... - verified
BattleAct_CalcMidpointSteps$C1:6671 · 189 B · Battle engineFrom !Battle_GeoOriginX/Y and !Battle_GeoPointX/Y: sets !Battle_ActMoveUnitX/Y to the delta * 4 with the delta's sign (as signed 8.8, 1/64 of the delta: probably a move of 64 steps)... - verified
BattleAct_OpArcToUnkPoint$C1:672E · 2 B · Battle engineOpcodes $99/$9D <m>: the arc move (BattleAct_OpArcToCalc) to the point in !Battle_ActUnkPointX/Y, height subtracted; length 2. - verified
BattleAct_ArcToUnkPointDir$C1:6730 · 19 B · Battle engine - verified
BattleAct_OpArcDownToCalc$C1:6743 · 7 B · Battle engineOpcode $9A <mode> <n>: opcode $98 (BattleAct_OpArcToCalc) with the height added instead of subtracted (DP $8F = 1). - verified
BattleAct_OpArcDownToUnkPoint$C1:674A · 7 B · Battle engineOpcode $9B <m>: opcode $99 (BattleAct_OpArcToUnkPoint) with the height added instead of subtracted (DP $8F = 1). - verified
BattleAct_OpMoveAlongHeading$C1:6751 · 458 B · Battle engineOpcode $A2: moves the thread's actor along its heading (!Battle_ActorUnkA5AA; for the objects !Battle_ActObjUnkA5B5) with mover kind !Battle_MoveKindHeading (BattleCF_MoveHeading; up to $FF steps... - verified
BattleAct_OpStartPosHistory$C1:691B · 16 B · Battle engineOpcode $A4 <delay> <b>: starts the position history of the thread's battler (threads 0-3) or of every slot of !Battle_ActTargetSet (threads 4-7; unlike most opcodes, threads 5-7 take the set too)... - verified
BattleAct_SetPosHistory$C1:692B · 143 B · Battle engine - verified
BattleAct_OpStopPosHistory$C1:69BA · 9 B · Battle engineOpcode $A5: !Battler_PosHistOn = 0 for the same battlers as opcode $A4 (BattleAct_OpStartPosHistory); advances 1. - verified
BattleAct_OpMoveHeadingSteps$C1:69C3 · 301 B · Battle engineOpcode $A8 <n>: moves the thread's actor along its heading (!Battle_ActorUnkA5AA; objects !Battle_ActObjUnkA5B5) with mover kind !Battle_MoveKindHeading for n steps (!Battle_ActorHeadSteps = n... - verified
BattleAct_OpMoveHeadingChecked$C1:6AF0 · 515 B · Battle engineOpcode $A9 <n>: opcode $A8 (BattleAct_OpMoveHeadingSteps) with opcode $A2's test of the cell ahead (BattleAct_OpMoveAlongHeading), and for the battlers also the box test: BattleAct_ProbeBoxOverlap... - verified
BattleAct_OpCircleToCalc$C1:6CF3 · 29 B · Battle engineOpcode $C0 <n> <r> <a> <q>: moves the thread's actor round a circle whose centre is the point left by BattleAct_RunCalc handler n, with mover kind !Battle_MoveKindCircle (BattleCF_MoveCircle; see... - verified
BattleAct_CircleMove$C1:6D10 · 4 B · Battle engine - verified
BattleAct_CircleMoveKind$C1:6D14 · 541 B · Battle engine - verified
BattleAct_OpCircleToUnkPoint$C1:6F31 · 34 B · Battle engineOpcode $C1 <r> <a> <q>: opcode $C0 (BattleAct_OpCircleToCalc) round the point in !Battle_ActUnkPointX/Y; length 4. - verified
BattleAct_OpEllipseToCalc$C1:6F53 · 34 B · Battle engineOpcode $C2 <n> <r> <a> <q>: opcode $C0 (BattleAct_OpCircleToCalc) with mover kind !Battle_MoveKindEllipse (BattleCF_MoveEllipse), which differs from the circle mover only in using half the radius... - verified
BattleAct_OpEllipseToUnkPoint$C1:6F75 · 37 B · Battle engineOpcode $C3 <r> <a> <q>: opcode $C2 (BattleAct_OpEllipseToCalc) round the point in !Battle_ActUnkPointX/Y; length 4. - verified
BattleAct_OpStepUnkA4AF$C1:6F9A · 14 B · Battle engineOpcode $C4 <t> <d>: each frame adds d to the thread's battler's !Battler_UnkA4AF (the y offset the movers and the position history use) and waits (advance 0), until the value equals t, then... - verified
BattleAct_StepUnkA4AF$C1:6FA8 · 71 B · Battle engine - verified
BattleAct_OpStepUnkA4AFTo0$C1:6FEF · 13 B · Battle engineOpcode $C5 <d>: opcode $C4 (BattleAct_OpStepUnkA4AF) with t = 0: steps !Battler_UnkA4AF back to 0 by d per frame; length 2. - verified
BattleAct_OpIncUnkA5D8$C1:6FFC · 47 B · Battle engineOpcode $D0: counts the thread's battler's !Battler_UnkA5D8 up by 1 (no reader of it found); length 1.
Bank $C1 · $C1:7000–$7FFF
$C1:7000
Verified · 42
- verified
BattleAct_OpClearUnkA5D8$C1:702B · 47 B · Battle engineOpcode $D1: zeroes !Battler_UnkA5D8, for the same battlers as opcode $D0 (BattleAct_OpIncUnkA5D8); length 1. - verified
BattleAct_OpMoveKind4ToCalc$C1:705A · 436 B · Battle engineOpcode $D2 <n>: sets up, without starting it, a move of the thread's actor to the point left by BattleAct_RunCalc handler n with mover kind !Battle_MoveKindUnk4 (BattleCF_MoveKind4); length 2; it... - verified
BattleAct_OpMoveToMidpoint$C1:720E · 315 B · Battle engineOpcode $D3: sets up, without starting it, a straight move of the thread's actor to the raised midpoint opcode $D2 left (!Battle_ActUnkMidX/Y, copied to !Battle_ActCalcOutA/B); length 1; it... - verified
BattleAct_OpRunMoveAfterUnkAAFC$C1:7349 · 27 B · Battle engineOpcode $D4: waits (advance 0) while the 16-bit !Battle_ActUnkAAFC (with !Battle_ActUnkAAFD) is not 0, counting it down by 1 a frame; at 0 it goes on as opcode $D6. - verified
BattleAct_OpRunMove$C1:7364 · 63 B · Battle engine - verified
BattleAct_OpRunMove_Wait$C1:73A3 · 5 B · Battle engine - verified
BattleAct_OpRunMove_Done$C1:73A8 · 5 B · Battle engine - verified
BattleAct_OpRunMoveAfterMajorDist$C1:73AD · 94 B · Battle engineOpcode $D5: opcode $D4 (BattleAct_OpRunMoveAfterUnkAAFC) with the other delay opcode $D3 leaves: waits while the 16-bit !Battle_MoveMajorDist is not 0, counting it down by 1 a frame; then sets the... - verified
BattleAct_OpPointTowardCalc$C1:740B · 169 B · Battle engineOpcode $D7 <d> <n>: sets !Battle_ActUnkPointX/Y to the point d pixels (along the major axis) from the thread's actor towards the point left by BattleAct_RunCalc handler n: .along adds the unit... - verified
BattleAct_OpShake$C1:74B4 · 134 B · Battle engineOpcode $D8 <a> <p> <f>: starts mover kind !Battle_MoveKindShake (BattleCF_MoveShake) for the thread's battler and advances at once (length 4): !Battler_ShakeAmp = a, !Battler_ShakePeriod = p... - verified
BattleAct_OpSetActAttr$C1:753A · 63 B · Battle engineOpcode $D9 <v>: sets the thread's actor's attribute value to v (!Battler_ActAttr for a battler, every slot of !Battle_ActTargetSet for thread 4, !Battle_ActObjAttr for object j; probably sprite... - verified
BattleAct_OpResetActAttr$C1:7579 · 66 B · Battle engineOpcode $DA: puts the thread's actor's attribute value back to its initial one (!Battler_ActAttrInit into !Battler_ActAttr, for thread 4 every slot of !Battle_ActTargetSet, !Battle_ActObjAttrInit... - verified
BattleAct_AdvanceScript$C1:75BB · 17 B · Battle engineMoves the thread's script pointer !Battle_ActScriptPtr on by A bytes: a 16-bit add to the offset, with the carry going into the bank byte (added 16-bit, so DP $E9 takes part too). - verified
BattleAct_CalcFacing$C1:75CC · 11 B · Battle engineRuns the BattleAct_FacingModeTable handler for mode A (0-$18), which leaves the facing in !Battle_ActFacingOut: modes 0-9 copy the facing of !Battle_ActBattlers entry A, $0A-$13 face entry A... - verified
BattleAct_FaceLikeEntry$C1:75D7 · 12 B · Battle engineFacing modes 0-9: the !Battler_Facing of !Battle_ActBattlers entry Y. - verified
BattleAct_FaceTowardEntry$C1:75E3 · 39 B · Battle engineFacing modes $0A-$13: the facing from the actor's point (DP $80/$81) toward the screen position of !Battle_ActBattlers entry Y - $0A, from Battle_CalcAngle and !BattleRom_FacingByAngle. - verified
BattleAct_FaceFixed$C1:760A · 8 B · Battle engineFacing modes $14-$17: facing Y - $14 (!Battle_FacingUp, Down, Left, Right). - verified
BattleAct_FaceTowardCentre$C1:7612 · 28 B · Battle engineFacing mode $18: the facing from the actor's point (DP $80/$81) toward the middle of the screen (!Battle_ScreenCentreX/Y). - verified
BattleAct_RunCalc$C1:762E · 11 B · Battle engineRuns the BattleAct_CalcTable handler for number A (0-$47), which leaves a point in !Battle_ActCalcOutA (x) and !Battle_ActCalcOutB (y) (two script variables for handlers $2A-$31; nothing for $12). - verified
BattleAct_CalcEntryPos$C1:7639 · 17 B · Battle engineHandlers 0-8: the screen position (!Battler_ScreenX/Y) of !Battle_ActBattlers entry Y. - verified
BattleAct_CalcEntryOffsetPos$C1:764A · 51 B · Battle engineHandlers 9-$11: the screen position of !Battle_ActBattlers entry Y - 9 plus its !Battler_ScreenOffsetX/Y. - verified
BattleAct_CalcNone$C1:767D · 1 B · Battle engineHandler $12: does nothing; !Battle_ActCalcOutA/B keep what the last handler left. - verified
BattleAct_CalcMid03$C1:767E · 8 B · Battle engineHandler $13: the midpoint of !Battle_ActBattlers entries 0 and 3 (the caster and the main target), through BattleAct_CalcMid02's BattleAct_CalcMidWithEntry0. - verified
BattleAct_CalcMid01$C1:7686 · 8 B · Battle engineHandler $14: the midpoint of !Battle_ActBattlers entries 0 and 1, through BattleAct_CalcMid02's BattleAct_CalcMidWithEntry0. - verified
BattleAct_CalcMid02$C1:768E · 5 B · Battle engineHandler $15: the midpoint of the screen positions of two battler slots, (x1 + x2) / 2 and (y1 + y2) / 2 worked out 16-bit. - verified
BattleAct_CalcMidWithEntry0$C1:7693 · 4 B · Battle engine - verified
BattleAct_CalcMidFromSlot$C1:7697 · 65 B · Battle engine - verified
BattleAct_CalcCentroid$C1:76D8 · 118 B · Battle engineHandler $16: meant as the centre of !Battle_ActBattlers entries 0-2 (the caster and its two partners): sums the three screen x and the three screen y 16-bit and divides by 3 with Battle_Divide. - verified
BattleAct_CalcAheadOfActor$C1:774E · 131 B · Battle engineHandler $17: the point $18 pixels from the thread's actor along its move angle: y + the sine of the angle and x + the sine of the angle + $40, each from Battle_SinLookup with scale $18 (a signed... - verified
BattleAct_CalcFixedPoint$C1:77D1 · 9 B · Battle engineHandler $18: the point ($80, $80). - verified
BattleAct_CalcSavedPos$C1:77DA · 18 B · Battle engineHandlers $19-$1B: the position saved for !Battle_ActBattlers entry Y - $19 (0-2) in !Battle_ActSavedX/Y. - verified
BattleAct_CalcObjOffset$C1:77EC · 31 B · Battle engineHandlers $1C-$23: the position of object Y - $1C (0-7) plus its !Battle_ActObjOfsX/Y, 16-bit, stored 16-bit. - verified
BattleAct_CalcLerpToTarget$C1:780B · 246 B · Battle engineHandlers $24-$29 and $32-$3F: a point on the line from one battler to the main target (!Battle_ActMainTarget): (w1 * P + w2 * T) >> 3 per coordinate, with the weight pair (w1, w2) k of... - verified
BattleAct_CalcVarPair$C1:7901 · 19 B · Battle engineHandlers $2A-$31: script variables 2k and 2k + 1 of !Battle_ActVars, k = n - $2A (0-7), as the pair (not necessarily a point). - verified
BattleAct_CalcMid12$C1:7914 · 12 B · Battle engineHandler $40: the midpoint of !Battle_ActBattlers entries 1 and 2 (the two partners), through BattleAct_CalcMid02's BattleAct_CalcMidFromSlot. - verified
BattleAct_CalcLerpToObj0$C1:7920 · 129 B · Battle engineHandlers $41-$47: a point on the line from !Battle_ActBattlers entry 0 (the caster) to object 0 (the low bytes of !Battle_ActObjX/Y), (w1 * P + w2 * O) >> 3 with weight pair n - $41 of... - verified
BattleAct_FacingModeTable$C1:79A1 · 50 B · Battle engineBattleAct_CalcFacing's handler per facing mode 0-$18, called through JSR (BattleAct_FacingModeTable,X) with X = mode * 2. - verified
BattleAct_CalcTable$C1:79D3 · 144 B · Battle engineBattleAct_RunCalc's handler per number 0-$47, called through JSR (BattleAct_CalcTable,X) with X = number * 2. - verified
BattleAct_LoaderTable$C1:7A63 · 8 B · Battle engineAction loader per !Battle_ActKind 0-3, called by BattleAct_LoadScript through JSR (BattleAct_LoaderTable,X) with X = kind * 2 (kinds 4 and up are taken as 0). - verified
BattleAct_OpcodeTable$C1:7A6B · 448 B · Battle engineHandler per action-script opcode, called by BattleAct_RunThread through JSR (BattleAct_OpcodeTable,X) with X = opcode * 2. - verified
BattleAct_ProbeBoxOverlap$C1:7C2B · 18 B · Battle enginePuts battler X's probe (!Battler_ProbeX/Y) at its screen position, builds its box (Battle_CalcBattlerBox) and tests it against the other battlers' boxes (Battle_BoxOverlapsOthers, tail JMP). - verified
BankC1_OldBuildLeftovers$C1:7C3D · 963 B · EngineNot code and, as far as found, never read: xref finds no call or jump to $C1:7C3D or to any of the segment starts below, and the absolute $7C3D-$7FFF operands in bank $C1 code are WRAM reads (DB =...
Bank $C1 · $C1:8000–$8FFF
$C1:8000
Verified · 27
- verified
BankC1_BattleStartVec$C1:8000 · 3 B · EngineVector into BattleSys_Main. - verified
BankC1_Entry8003$C1:8003 · 3 B · EngineLong vector into BankC1_RunService ($C1:CFC2), which pushes P, X, DP and DB itself (PHP, REP #$30, PHX, PHD, PHB), sets DB=$7E and DP=0, runs entry A (low byte) of BankC1_ServiceTable with... - verified
BattleSys_Main$C1:8006 · 1,115 B · Battle systemThe battle from its setup to its end; it never returns, leaving through BattleSys_ExitVec ($C1:0006 -> $001F -> JML $CF:FBE5). - verified
BattleSys_Unk8461$C1:8461 · 988 B · Battle systemHandler of turn list 12, the battlers' turns (inferred: a ready PC is queued for the command menu by service 1, BattleMenu_EnqueueReadyBattler; a ready enemy's !Battler_UnkAFAB, probably its ATB... - verified
BattleSys_Unk883D$C1:883D · 37 B · Battle systemFor each PC slot 0-2 whose !Battler_UnkAF0A entry is not $FF: DP $14 (16-bit) = the slot, BattleSys_UnkB575, then BattleSys_UnkB3F9 with X = the slot. - verified
BattleSys_ClearUnkB192$C1:8862 · 20 B · Battle systemZeroes the 4-byte !Battle_UnkB192 record of battler slot !Battle_UnkB18B. - verified
BattleSys_ListHandler0$C1:8876 · 79 B · Battle systemTurn list 0 (BattleSys_ListHandlerTable entry 0): the usual handler (see the banner); at the end of its runs it clears BattlerStats.Status2 bit 7 of the slot. - verified
BattleSys_ListHandler1$C1:88C5 · 150 B · Battle systemTurn list 1: a repeating hit on the slot (inferred from the amount going to !Battle_ActPcHitAmount with kind 3, which BattleAct_FlagLethalPcHits checks as damage; probably poison). - verified
BattleSys_Unk895B$C1:895B · 26 B · Battle systemSets up the action block for a kind-2 action (BattleAct_LoaderTable's loader 2; the tech loader, inferred in !Battle_ActId's note) with record A, caster slot 0, no flags and the main-target mask... - verified
BattleSys_ListHandler2$C1:8975 · 68 B · Battle systemTurn list 2: the usual handler, but after its last run it only stops the entry: no status bit is cleared. - verified
BattleSys_ListHandler3$C1:89B9 · 76 B · Battle systemTurn list 3: the usual handler; at the end of its runs it clears bit 7 of the slot's BattlerStats.Unk4C+1 (+$4D). - verified
BattleSys_ListHandler4$C1:8A05 · 76 B · Battle systemTurn list 4: the usual handler; at the end of its runs it clears bit 6 of the slot's BattlerStats.Unk4C+1 (+$4D). - verified
BattleSys_ListHandler5$C1:8A51 · 76 B · Battle systemTurn list 5: the usual handler; at the end of its runs it clears bit 6 of the slot's BattlerStats.Unk4C+2 (+$4E). - verified
BattleSys_ListHandler6$C1:8A9D · 1 B · Battle systemTurn list 6: does nothing (RTS). - verified
BattleSys_ListHandler7$C1:8A9E · 1 B · Battle systemTurn list 7: does nothing (RTS), like list 6. - verified
BattleSys_ListHandler8$C1:8A9F · 113 B · Battle systemTurn list 8: re-arms the entry (flags = 1) with the timer = reload, halved when bit 7 of the slot's BattlerStats.Unk4C+1 or Unk4C+6 (+$4D, +$52) is set, doubled (from the reload, so this wins)... - verified
BattleSys_ListHandler9$C1:8B10 · 169 B · Battle systemTurn list 9: re-arms the entry with the timer halved / doubled as list 8 does, clears the list's !Battle_ListDue bit and counts !Battle_ListRuns down; at 0 (set back to 10), unless the slot is... - verified
BattleSys_ListHandler10$C1:8BB9 · 79 B · Battle systemTurn list 10: the usual handler; at the end of its runs it clears bit 2 of the slot's BattlerStats.Unk4C+2 (+$4E). - verified
BattleSys_ListHandler11$C1:8C08 · 1 B · Battle systemTurn list 11: does nothing (RTS), like lists 6 and 7. - verified
BattleSys_Unk8C09$C1:8C09 · 53 B · Battle systemRuns BattleAi_RunMainPart (probably an enemy's behaviour script: it reads a pointer from the $CC:8B08 table by the id in A) for each enemy entry 0-7 with !Battle_UnkB2B6 0 whose !Battle_UnkAF15... - verified
BattleAi_TestPassed$C1:8C3E · 187 B · Battle engineCalled by a test handler whose test holds (42 JSR sites from $C1:8EA7 to $C1:9803, all in the test handlers): records the test code and runs the block's next action through BattleAi_ChooseTable. - verified
BattleAi_EnemyTurn$C1:8CF9 · 430 B · Battle engineRuns the action an enemy's script chose, on its turn (BattleSys_Unk8461) or as a reaction (!Battle_UnkB2C0 set). - verified
BattleAi_Test00$C1:8EA7 · 4 B · Battle engineTest code $00: always holds (BattleAi_TestPassed at once). - verified
BattleAi_TestHpHalfOrLess$C1:8EAB · 102 B · Battle engineBattleAi_TestTable entry $01. - verified
BattleAi_TestStatusBits$C1:8F11 · 118 B · Battle engineBattleAi_TestTable entry $02. - verified
BattleAi_TestTargetId$C1:8F87 · 83 B · Battle engineBattleAi_TestTable entry $03. - verified
BattleAi_TestEnemyIdPresent$C1:8FDA · 57 B · Battle engineBattleAi_TestTable entry $04.
Bank $C1 · $C1:9000–$9FFF
$C1:9000
Verified · 66
- verified
BattleAi_TestEnemyCountAtMost$C1:9013 · 50 B · Battle engineBattleAi_TestTable entry $05. - verified
BattleAi_TestTimeAtLeast$C1:9045 · 61 B · Battle engineBattleAi_TestTable entry $06. - verified
BattleAi_TestUnkB320$C1:9082 · 60 B · Battle engineBattleAi_TestTable entry $07. - verified
BattleAi_TestHpAtMost$C1:90BE · 114 B · Battle engineBattleAi_TestTable entry $08. - verified
BattleAi_TestStatByteAtLeast$C1:9130 · 94 B · Battle engineBattleAi_TestTable entry $09. - verified
BattleAi_TestStatByteBits$C1:918E · 107 B · Battle engineBattleAi_TestTable entry $0A. - verified
BattleAi_TestStatByteAtMost$C1:91F9 · 100 B · Battle engineBattleAi_TestTable entry $0B. - verified
BattleAi_TestTargetWithin32$C1:925D · 70 B · Battle engineBattleAi_TestTable entry $0C. - verified
BattleAi_TestAnySameRow$C1:92A3 · 113 B · Battle engineBattleAi_TestTable entry $0D. - verified
BattleAi_TestAnyAboveOrLeft$C1:9314 · 121 B · Battle engineBattleAi_TestTable entry $0E. - verified
BattleAi_TestPathClear$C1:938D · 89 B · Battle engineBattleAi_TestTable entry $0F. - verified
BattleAi_TestScreenArea$C1:93E6 · 68 B · Battle engineBattleAi_TestTable entry $10. - verified
BattleAi_TestB19EKind$C1:942A · 74 B · Battle engineBattleAi_TestTable entry $11. - verified
BattleAi_TestB19EKindAndId$C1:9474 · 94 B · Battle engineBattleAi_TestTable entry $12. - verified
BattleAi_TestB19EBit4$C1:94D2 · 66 B · Battle engineBattleAi_TestTable entry $13. - verified
BattleAi_TestB19ESlot$C1:9514 · 134 B · Battle engineBattleAi_TestTable entry $14. - verified
BattleAi_TestB19EByte2Bits$C1:959A · 60 B · Battle engineBattleAi_TestTable entry $15. - verified
BattleAi_TestAlways16$C1:95D6 · 4 B · Battle engineBattleAi_TestTable entry $16: always holds (BattleAi_TestPassed at once), as test $00. - verified
BattleAi_TestChance$C1:95DA · 32 B · Battle engineBattleAi_TestTable entry $17. - verified
BattleAi_TestStatByteEquals$C1:95FA · 88 B · Battle engineBattleAi_TestTable entries $18 and $23-$28. - verified
BattleAi_TestAlways19$C1:9652 · 4 B · Battle engineBattleAi_TestTable entry $19: always holds (BattleAi_TestPassed at once), as test $00. - verified
BattleAi_TestOtherEnemy$C1:9656 · 79 B · Battle engineBattleAi_TestTable entry $1A. - verified
BattleAi_TestPcCountAtMost$C1:96A5 · 47 B · Battle engineBattleAi_TestTable entry $1B. - verified
BattleAi_TestUnkAF0AMatch$C1:96D4 · 84 B · Battle engineBattleAi_TestTable entry $1C. - verified
BattleAi_TestTargetGone$C1:9728 · 52 B · Battle engineBattleAi_TestTable entry $1D. - verified
BattleAi_TestChooseAndGoOn$C1:975C · 9 B · Battle engineBattleAi_TestTable entry $1E: BattleAi_TestPassed (the action is chosen), then !Battle_UnkAF24 = !BattleAi_TestFailed, so the caller still goes on to the next block. - verified
BattleAi_TestTargetWithin48$C1:9765 · 70 B · Battle engineBattleAi_TestTable entry $1F. - verified
BattleAi_TestUnkAEB3Set$C1:97AB · 21 B · Battle engineBattleAi_TestTable entry $20. - verified
BattleAi_TestUnkAF15Set$C1:97C0 · 21 B · Battle engineBattleAi_TestTable entry $21. - verified
BattleAi_TestUnkB158$C1:97D5 · 59 B · Battle engineBattleAi_TestTable entry $22. - verified
BattleAi_ChooseAnimTarget$C1:9810 · 42 B · Battle engineBattleAi_ChooseTable entry $00. - verified
BattleAi_ChooseTarget$C1:983A · 138 B · Battle engineBattleAi_ChooseTable entries $01 and $02. - verified
BattleAi_ChooseNop03$C1:98C4 · 1 B · Battle engineBattleAi_ChooseTable entry $03: does nothing (RTS). - verified
BattleAi_ChooseByChance$C1:98C5 · 155 B · Battle engineBattleAi_ChooseTable entry $04 (!BattleAi_ActRestart). - verified
BattleAi_ChooseNop05$C1:9960 · 1 B · Battle engineBattleAi_ChooseTable entry $05: does nothing (RTS). - verified
BattleAi_ChooseNop06$C1:9961 · 1 B · Battle engineBattleAi_ChooseTable entry $06: does nothing (RTS). - verified
BattleAi_ChooseClear07$C1:9962 · 4 B · Battle engineBattleAi_ChooseTable entry $07: !Battle_UnkAF24 = 0. - verified
BattleAi_ChooseNop08$C1:9966 · 1 B · Battle engineBattleAi_ChooseTable entry $08: does nothing (RTS). - verified
BattleAi_ChooseActId$C1:9967 · 17 B · Battle engineBattleAi_ChooseTable entry $09: !BattleAi_ActId = record byte 1. - verified
BattleAi_ChooseNop0A$C1:9978 · 1 B · Battle engineBattleAi_ChooseTable entry $0A: does nothing (RTS). - verified
BattleAi_ChooseClear0B$C1:9979 · 4 B · Battle engineBattleAi_ChooseTable entry $0B: !Battle_UnkAF24 = 0. - verified
BattleAi_ChooseNop0C$C1:997D · 1 B · Battle engineBattleAi_ChooseTable entry $0C: does nothing (RTS). - verified
BattleAi_ChooseNop0D$C1:997E · 1 B · Battle engineBattleAi_ChooseTable entry $0D: does nothing (RTS). - verified
BattleAi_ChooseNop0E$C1:997F · 1 B · Battle engineBattleAi_ChooseTable entry $0E: does nothing (RTS). - verified
BattleAi_ChooseNop0F$C1:9980 · 1 B · Battle engineBattleAi_ChooseTable entry $0F: does nothing (RTS). - verified
BattleAi_ChooseIfGoneEnemy$C1:9981 · 51 B · Battle engineBattleAi_ChooseTable entries $10 and $16. - verified
BattleAi_ChooseClear11$C1:99B4 · 4 B · Battle engineBattleAi_ChooseTable entries $11-$15: !Battle_UnkAF24 = 0. - verified
BattleAi_RunNothing$C1:99B8 · 6 B · Battle engineBattleAi_RunTable entry $00: !BattleAi_RunMode = !BattleAi_RunNone (the enemy does nothing this turn; choose handler $00 has only set its animation and target). - verified
BattleAi_RunAttack$C1:99BE · 123 B · Battle engineBattleAi_RunTable entry $01. - verified
BattleAi_RunTech$C1:9A39 · 269 B · Battle engineBattleAi_RunTable entry $02. - verified
BattleAi_RunNop03$C1:9B46 · 1 B · Battle engineBattleAi_RunTable entry $03: RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunNop04$C1:9B47 · 1 B · Battle engineBattleAi_RunTable entry $04 (!BattleAi_ActRestart): RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunChooseRepeat$C1:9B48 · 68 B · Battle engineBattleAi_RunTable entry $05. - verified
BattleAi_RunNop06$C1:9B8C · 1 B · Battle engineBattleAi_RunTable entry $06: RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunSwapInEnemy$C1:9B8D · 225 B · Battle engineBattleAi_RunTable entry $07. - verified
BattleAi_RunNop08$C1:9C6E · 1 B · Battle engineBattleAi_RunTable entry $08: RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunLeave$C1:9C6F · 68 B · Battle engineBattleAi_RunTable entry $09. - verified
BattleAi_RunKoSelf$C1:9CB3 · 104 B · Battle engineBattleAi_RunTable entry $0A. - verified
BattleAi_RunSetStatByte$C1:9D1B · 87 B · Battle engineBattleAi_RunTable entry $0B. - verified
BattleAi_RunAddStatByte$C1:9D72 · 92 B · Battle engineBattleAi_RunTable entry $0C. - verified
BattleAi_RunSetFlags$C1:9DCE · 148 B · Battle engineBattleAi_RunTable entry $0D. - verified
BattleAi_RunNop0E$C1:9E62 · 1 B · Battle engineBattleAi_RunTable entry $0E: RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunMessage$C1:9E63 · 21 B · Battle engineBattleAi_RunTable entry $0F. - verified
BattleAi_RunRestoreEnemies$C1:9E78 · 226 B · Battle engineBattleAi_RunTable entry $10. - verified
BattleAi_RunSetStatBytes$C1:9F5A · 120 B · Battle engineBattleAi_RunTable entry $11. - verified
BattleAi_RunSetStatsTech$C1:9FD2 · 380 B · Battle engineBattleAi_RunTable entry $12.
Bank $C1 · $C1:A000–$AFFF
$C1:A000
Verified · 83
- verified
BattleAi_RunAddUnkB158$C1:A14E · 58 B · Battle engineBattleAi_RunTable entry $13. - verified
BattleAi_RunAddStatBytes$C1:A188 · 131 B · Battle engineBattleAi_RunTable entry $14. - verified
BattleAi_RunAddStatsTech$C1:A20B · 395 B · Battle engineBattleAi_RunTable entry $15. - verified
BattleAi_RunRestoreAndSetStats$C1:A396 · 59 B · Battle engineBattleAi_RunTable entry $16. - verified
BattleAi_AddStatByteAtY$C1:A3D1 · 37 B · Battle engineAdds DP $10 to the byte at (DP $0E),Y (a stat-block byte: DP $0E/$0F = the offset, Y = the block address): bit 7 (!BattleAi_StatDeltaSub) set subtracts the low 7 bits, with 0 as the floor; else... - verified
BattleAi_TargetNone$C1:A3F6 · 1 B · Battle engineBattleAi_TargetTable entry $00: returns at once, so the list stays as it was (all $FF) and !BattleAi_TargetCount is not written. - verified
BattleAi_TargetPcs$C1:A3F7 · 26 B · Battle engineBattleAi_TargetTable entry $01: lists PC slots 0-2 whose !Battler_UnkAEFF is not $FF (present), in slot order, from entry 0; !BattleAi_TargetCount = how many (0-3). - verified
BattleAi_TargetAll$C1:A411 · 29 B · Battle engineBattleAi_TargetTable entry $02: the present PCs (BattleAi_TargetPcs), then each enemy slot 3-10 whose !Battler_UnkAEFF is not $FF, appended in slot order; !BattleAi_TargetCount = the total. - verified
BattleAi_TargetSelf$C1:A42E · 15 B · Battle engineBattleAi_TargetTable entry $03: the acting enemy itself, !BattleAi_Targets[0] = !Battle_UnkB252 + 3 (its slot), present or not; !BattleAi_TargetCount = 1. - verified
BattleAi_TargetFromUnkB19E$C1:A43D · 21 B · Battle engineBattleAi_TargetTable entry $04: !BattleAi_Targets[0] = the low nibble of the first byte of the acting enemy's 4-byte !Battle_UnkB19E record (offset !Battle_UnkB252 * 4), taken as a slot without... - verified
BattleAi_TargetRandomPc$C1:A452 · 93 B · Battle engineBattleAi_TargetTable entry $05: one random present PC. - verified
BattleAi_TargetNearestPc$C1:A4AF · 49 B · Battle engineBattleAi_TargetTable entry $06: !BattleAi_TargetCount = 0, then position query !BattlePos_QueryNearestPc (service 5) from the acting enemy (!BattlePos_Subject = !Battle_UnkB252 + 3). - verified
BattleAi_TargetFarthestPc$C1:A4E0 · 40 B · Battle engineBattleAi_TargetTable entry $07: as BattleAi_TargetNearestPc with position query !BattlePos_QueryFarthestPc, but only !BattlePos_Found not negative is checked (no !Battler_UnkAEFF test). - verified
BattleAi_TargetLowestHpPc$C1:A508 · 57 B · Battle engineBattleAi_TargetTable entry $08: the PC with the lowest non-zero BattlerStats.CurHp, meant over PC slots 0-2; presence is not checked. - verified
BattleAi_TargetPcStatus$C1:A541 · 10 B · Battle engineBattleAi_TargetTable entry $09: BattleAi_TargetsByPcByte with DP $0A = PcStatBlk.Status: the present PCs whose Status byte is non-zero (any status), not KO'd, cut to one by BattleAi_PickPcTarget. - verified
BattleAi_TargetPcStatus2$C1:A54B · 10 B · Battle engineBattleAi_TargetTable entry $0A: as BattleAi_TargetPcStatus with PcStatBlk.Status2 (any bit set). - verified
BattleAi_TargetPcUnk1F$C1:A555 · 10 B · Battle engineBattleAi_TargetTable entry $0B: as BattleAi_TargetPcStatus with PcStatBlk.Unk1F (= BattlerStats.Unk4C; any bit set). - verified
BattleAi_TargetPcUnk20$C1:A55F · 10 B · Battle engineBattleAi_TargetTable entry $0C: as BattleAi_TargetPcStatus with PcStatBlk.Unk20 (= BattlerStats.Unk4C+1; any bit set). - verified
BattleAi_TargetPcUnk21$C1:A569 · 10 B · Battle engineBattleAi_TargetTable entry $0D: as BattleAi_TargetPcStatus with PcStatBlk.Unk21 (= BattlerStats.Unk4C+2; any bit set). - verified
BattleAi_TargetPcStatus2Bit1$C1:A573 · 48 B · Battle engineBattleAi_TargetTable entry $0E: the PCs (slots 0-2) whose PcStatBlk.Status2 has bit 1 (!BattleAi_PcByteMask = $02), through BattleAi_AddPcByByte (present, not KO'd, marked by .Unk20), cut to one... - verified
BattleAi_TargetPcStatus2Bit7$C1:A5A3 · 48 B · Battle engineBattleAi_TargetTable entry $0F: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Status2 bit 7 (mask $80). - verified
BattleAi_TargetPcStatus2Bit2$C1:A5D3 · 48 B · Battle engineBattleAi_TargetTable entry $10: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Status2 bit 2 (mask $04). - verified
BattleAi_TargetPcUnk21Bit2$C1:A603 · 48 B · Battle engineBattleAi_TargetTable entry $11: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Unk21 (= BattlerStats.Unk4C+2) bit 2 (mask $04). - verified
BattleAi_TargetPcUnk21Bit6$C1:A633 · 48 B · Battle engineBattleAi_TargetTable entry $12: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Unk21 (= BattlerStats.Unk4C+2) bit 6 (mask $40). - verified
BattleAi_TargetPcUnk20Bit4$C1:A663 · 48 B · Battle engineBattleAi_TargetTable entry $13: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Unk20 (= BattlerStats.Unk4C+1) bit 4 (mask $10). - verified
BattleAi_TargetPcUnk01Bit3$C1:A693 · 48 B · Battle engineBattleAi_TargetTable entry $14: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Unk01 (= BattlerStats.Unk2E) bit 3 (mask $08). - verified
BattleAi_TargetOtherEnemies$C1:A6C3 · 42 B · Battle engineBattleAi_TargetTable entry $15: the enemy slots 3-10 whose !Battler_UnkAEFF is not $FF (present), in slot order, leaving out the acting enemy (slot !Battle_UnkB252 + 3, kept in DP $0A/$0B)... - verified
BattleAi_TargetEnemies$C1:A6ED · 28 B · Battle engineBattleAi_TargetTable entry $16: the enemy slots 3-10 whose !Battler_UnkAEFF is not $FF (present), in slot order, the acting enemy included; !BattleAi_TargetCount = how many. - verified
BattleAi_TargetNearestEnemy$C1:A709 · 46 B · Battle engineBattleAi_TargetTable entry $17: position query !BattlePos_QueryNearestEnemy (service 5) from the acting enemy (!BattlePos_Subject = !Battle_UnkB252 + 3). - verified
BattleAi_TargetFarthestEnemy$C1:A737 · 46 B · Battle engineBattleAi_TargetTable entry $18: as BattleAi_TargetNearestEnemy with position query !BattlePos_QueryFarthestEnemy. - verified
BattleAi_TargetLowestHpEnemy$C1:A765 · 68 B · Battle engineBattleAi_TargetTable entry $19: the present enemy (slots 3-10, !Battler_UnkAEFF not $FF) with the lowest non-zero HP (PcStatBlk.CurHp through !BattleRom_PcStatBlock), the acting enemy included... - verified
BattleAi_TargetOtherEnemyStatus$C1:A7A9 · 60 B · Battle engineBattleAi_TargetTable entry $1A: the enemies (slots 3-10, through BattleAi_AddPcByByte: present, not KO'd, marked by .Unk20) whose PcStatBlk.Status byte is non-zero (!BattleAi_PcByteMask =... - verified
BattleAi_TargetEnemyStatus$C1:A7E5 · 52 B · Battle engineBattleAi_TargetTable entry $1B: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status non-zero, self (slot !Battle_UnkB18B) included. - verified
BattleAi_TargetOtherEnemyStatus2$C1:A819 · 60 B · Battle engineBattleAi_TargetTable entry $1C: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 non-zero, leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetEnemyStatus2$C1:A855 · 52 B · Battle engineBattleAi_TargetTable entry $1D: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 non-zero, self (slot !Battle_UnkB18B) included. - verified
BattleAi_TargetOtherEnemyUnk1F$C1:A889 · 60 B · Battle engineBattleAi_TargetTable entry $1E: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Unk1F (= BattlerStats.Unk4C) non-zero, leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetEnemyUnk1F$C1:A8C5 · 52 B · Battle engineBattleAi_TargetTable entry $1F: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Unk1F (= BattlerStats.Unk4C) non-zero, self (slot !Battle_UnkB18B) included. - verified
BattleAi_TargetOtherEnemyStatus2Bit1$C1:A8F9 · 60 B · Battle engineBattleAi_TargetTable entry $20: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 bit 1 (mask $02), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyStatus2Bit7$C1:A935 · 60 B · Battle engineBattleAi_TargetTable entry $21: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 bit 7 (mask $80), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyStatus2Bit2$C1:A971 · 60 B · Battle engineBattleAi_TargetTable entry $22: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 bit 2 (mask $04), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyUnk21Bit6$C1:A9AD · 60 B · Battle engineBattleAi_TargetTable entry $23: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Unk21 (= BattlerStats.Unk4C+2) bit 6 (mask $40), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyStatusBit1$C1:A9E9 · 60 B · Battle engineBattleAi_TargetTable entry $24: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status bit 1 (mask $02), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyUnk19Bit0$C1:AA25 · 60 B · Battle engineBattleAi_TargetTable entry $25: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Unk19 (= BattlerStats.Unk46) bit 0 (mask $01), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetLowestHpOtherEnemy$C1:AA61 · 74 B · Battle engineBattleAi_TargetTable entry $26: as BattleAi_TargetLowestHpEnemy, but slot !Battle_UnkB18B ("self"; see the BattleAi_TargetTable banner for whose slot it holds in each pass) is left out. - verified
BattleAi_TargetEnemy0$C1:AAAB · 11 B · Battle engineBattleAi_TargetTable entry $27: !BattleAi_Targets[0] = slot 3 (enemy entry 0), present or not; !BattleAi_TargetCount = 1. - verified
BattleAi_TargetEnemy1$C1:AAB6 · 11 B · Battle engineBattleAi_TargetTable entry $28: as BattleAi_TargetEnemy0 with slot 4 (entry 1). - verified
BattleAi_TargetEnemy2$C1:AAC1 · 11 B · Battle engineBattleAi_TargetTable entry $29: as BattleAi_TargetEnemy0 with slot 5 (entry 2). - verified
BattleAi_TargetEnemy3$C1:AACC · 11 B · Battle engineBattleAi_TargetTable entry $2A: as BattleAi_TargetEnemy0 with slot 6 (entry 3). - verified
BattleAi_TargetEnemy4$C1:AAD7 · 11 B · Battle engineBattleAi_TargetTable entry $2B: as BattleAi_TargetEnemy0 with slot 7 (entry 4). - verified
BattleAi_TargetEnemy5$C1:AAE2 · 11 B · Battle engineBattleAi_TargetTable entry $2C: as BattleAi_TargetEnemy0 with slot 8 (entry 5). - verified
BattleAi_TargetEnemy6$C1:AAED · 11 B · Battle engineBattleAi_TargetTable entry $2D: as BattleAi_TargetEnemy0 with slot 9 (entry 6). - verified
BattleAi_TargetEnemy7$C1:AAF8 · 11 B · Battle engineBattleAi_TargetTable entry $2E: as BattleAi_TargetEnemy0 with slot 10 (entry 7). - verified
BattleAi_TargetRandomUnkAF15$C1:AB03 · 75 B · Battle engineBattleAi_TargetTable entry $2F: lists the enemy entries n (0-7) whose !Battle_UnkAF15 byte has bit 7 (!Battle_AF15Bit7; such an enemy is out of the fight, probably: BattleSys_UpdateKo treats it as... - verified
BattleAi_TargetSlot0$C1:AB4E · 11 B · Battle engineBattleAi_TargetTable entry $30: as BattleAi_TargetEnemy0 with slot 0. - verified
BattleAi_TargetSlot1$C1:AB59 · 11 B · Battle engineBattleAi_TargetTable entry $31: as BattleAi_TargetEnemy0 with slot 1. - verified
BattleAi_TargetSlot2$C1:AB64 · 11 B · Battle engineBattleAi_TargetTable entry $32: as BattleAi_TargetEnemy0 with slot 2. - verified
BattleAi_TargetSlot3$C1:AB6F · 11 B · Battle engineBattleAi_TargetTable entry $33: as BattleAi_TargetEnemy0 with slot 3. - verified
BattleAi_TargetSlot4$C1:AB7A · 11 B · Battle engineBattleAi_TargetTable entry $34: as BattleAi_TargetEnemy0 with slot 4. - verified
BattleAi_TargetSlot5$C1:AB85 · 11 B · Battle engineBattleAi_TargetTable entry $35: as BattleAi_TargetEnemy0 with slot 5. - verified
BattleAi_TargetSlot6$C1:AB90 · 11 B · Battle engineBattleAi_TargetTable entry $36: as BattleAi_TargetEnemy0 with slot 6. - verified
BattleAi_TargetHighestHpPc$C1:AB9B · 46 B · Battle engineBattleAi_TargetTable entry $37: the PC (slots 0-2) with the highest BattlerStats.CurHp; presence and KO are not checked. - verified
BattleAi_TargetRandomOtherEnemy$C1:ABC9 · 75 B · Battle engineBattleAi_TargetTable entry $38: lists the present enemy slots 3-10 other than the acting enemy (as BattleAi_TargetOtherEnemies), then, with two or more, Battle_RandRange (0 to count - 1) picks one... - verified
BattleAi_ReadTargets$C1:AC14 · 24 B · Battle engineReads the target code of a script record and fills !BattleAi_Targets: BattleAi_ClearTargets first, then !Battle_UnkB1D2 + 1 and the code at that address. - verified
BattleAi_ReadTargets_Code$C1:AC2C · 19 B · Battle engine - verified
BattleAi_ReadTargets_Done$C1:AC3F · 7 B · Battle engine - verified
BattleAi_ClearTargets$C1:AC46 · 17 B · Battle engineSets the 11 bytes of !BattleAi_Targets and of !Battle_UnkAD8E to $FF (empty). - verified
BattleSys_UnkAC57$C1:AC57 · 7 B · Battle systemBattleSys_UnkBFA4 (it requests service 4, BattleSys_RunAction, which plays the action block), then BattleSys_UnkAC85. - verified
BattleSys_UnkAC5E$C1:AC5E · 39 B · Battle systemIf !Battle_UnkAEB2 is set: !Battle_UnkAE85[n] = 1 for each enemy n (0-7) whose !Battle_UnkAEB3 entry is non-zero, then, unless !Battle_Unk2989 has bit 5, service !BattleSys_ServiceUnk6... - verified
BattleSys_UnkAC85$C1:AC85 · 4 B · Battle systemCalls Battle_ApplyHits. - verified
BattleAi_SetCmdBits$C1:AC89 · 69 B · Battle engineORs the slot A + 3 (an enemy entry + 3) into !Battle_UnkB18E and zeroes !Battle_UnkB191, then by !BattleAi_ActCode: 0: !Battle_UnkB18F = 0; 1: !Battle_UnkB18E |= $80, !Battle_UnkB18F = 0... - verified
BattleAi_ArgToDp0E$C1:ACCE · 36 B · Battle engineDP $0E = !BattleAi_ActArg mapped: 1 and 2 give 4, 3 and 4 give $0D, any other value stays as it is. - verified
BattleAi_FillActBlock$C1:ACF2 · 23 B · Battle engineStarts the action block for the acting battler: !Battle_UnkAE90 = 0, !Battle_ActCaster = !Battle_UnkB18B, !Battle_ActKind = !BattleAi_ActCode, !Battle_ActId = !BattleAi_ActId. - verified
BattleAi_SetMainMask$C1:AD09 · 44 B · Battle engine!Battle_ActMainMask = 0, then, if !BattleAi_TargetCount is non-zero and !BattleAi_Targets[0] is a slot (not $FF), the bit of that slot (!BattleAi_MaskSlot0 >> slot, bit 15 = slot 0) is ORed in. - verified
BattleAi_SetTargetMask$C1:AD35 · 51 B · Battle engine!Battle_ActTargetMask = the bits of !BattleAi_Targets entries 1 to !BattleAi_TargetCount - 1 (entry 0 is the main target, see BattleAi_SetMainMask; !BattleAi_MaskSlot0 >> slot, bit 15 = slot 0). - verified
BattleAi_TargetsByPcByte$C1:AD68 · 57 B · Battle engineLists each present, not KO'd PC whose stat-block byte at offset DP $0A (from !BattleRom_PcStatBlock) is non-zero, through BattleAi_AddPcByByte for PCs 0, 1, 2 with !BattleAi_PcByteMask = $FF, then... - verified
BattleAi_PickPcTarget$C1:ADA1 · 128 B · Battle engineCuts a list built by BattleAi_AddPcByByte down to one target: - !BattleAi_TargetCount 0: nothing. - verified
BattleAi_PickMarkedTarget$C1:AE21 · 79 B · Battle engineAfter a test has marked the entries of !BattleAi_Targets it accepts (!BattleAi_TargetMarked), cuts the list down to one target: - !BattleAi_TargetCount 0: the test fails (!Battle_UnkAF24 + 1). - verified
BattleAi_AddPcByByte$C1:AE70 · 99 B · Battle engineAdds PC slot !BattleAi_PcSlot to !BattleAi_Targets when it is present (!Battler_UnkAEFF not $FF), the byte at offset DP $0A in its stat block (address from !BattleRom_PcStatBlock[X]) has any of... - verified
BattleAi_UnkAED3$C1:AED3 · 42 B · Battle engineNo caller found (no JSR, JSL or pointer to $AED3 in the ROM; maybe dead). - verified
BattleAi_NoteFirstTest$C1:AEFD · 37 B · Battle engineRun by a test handler that holds, just before BattleAi_TestPassed: - !Battle_UnkB1CF has !BattleAi_SecondTest (this is the first of a block's two tests): !BattleAi_FirstTarget = the slot (low... - verified
Battle_RandRange$C1:AF22 · 87 B · Battle engineA random number from the low bound X (low byte) up to, but not including, the high bound A: low + (RandomTableFD[!Battle_RandIdx] mod (high - low)), then !Battle_RandIdx + 1. - verified
Battle_RandRangeAlt$C1:AF79 · 89 B · Battle engineBattle_RandRange with its own index: the same code, but the entry of RandomTableFD is taken at !Battle_UnkB3E6 (not !Battle_RandIdx), and !Battle_UnkB3E6 is the counter stepped. - verified
BattleAi_RunMainPart$C1:AFD2 · 193 B · Battle engineRuns the main part of an enemy's script: block after block until one holds or the part ends.
Bank $C1 · $C1:B000–$BFFF
$C1:B000
Verified · 36
- verified
BattleSys_UnkB093$C1:B093 · 35 B · Battle systemBattlerStats.Unk2F bit 0 = (.CurHp <= .MaxHp / 8): set when the HP is down to an eighth or less, cleared otherwise (the bit Battle_PickStatusAnim tests, so probably the low-HP pose). - verified
BattleSys_UnkB0B6$C1:B0B6 · 365 B · Battle systemSets which turn lists battler Y takes part in from its status bits: bit 0 (!Battle_ListPartBit) of its !Battle_ListFlags byte in list n = Status2 bit 7 (list 0), bit 6 (1), bit 5 (2), bit 4 (8)... - verified
BattleSys_UnkB223$C1:B223 · 86 B · Battle systemBattleSys_UpdateKo for each slot 0-10 (counter !Battle_UnkB2D3); after it, an enemy slot whose entry is empty ($FF) and whose !Enemy_TargetWanted slot is empty too gets !Battle_UnkB242 = $FF and... - verified
BattleSys_UpdateKo$C1:B279 · 322 B · Battle systemThe KO check of battler Y. - verified
BattleSys_UnkB3BB$C1:B3BB · 23 B · Battle systemKeeps only bit 6 (!FieldBtl_ObjKind6Flag) of the 8 FieldBtlObj.Flags bytes, so after the battle FieldBtl_RestoreObj removes every saved field object (Flags 0) except those with that bit. - verified
BattleSys_UnkB3D2$C1:B3D2 · 39 B · Battle systemFor each enemy entry n (0-7) still present (!Battler_UnkAF0A not $FF) without !Battle_UnkAF15 bit 7: FieldBtlObj[n].Flags = $40 (only !FieldBtl_ObjKind6Flag), so FieldBtl_RestoreObj puts that... - verified
BattleSys_UnkB3F9$C1:B3F9 · 73 B · Battle systemDrops the latched command of PC X when the PC cannot act: KO'd (Status bit 7), BattlerStats.Unk4C+2 | +7 bit 7, or Status2 bits 7, 2 or 1 (!Battle_NoActMask2). - verified
BattleSys_UnkB442$C1:B442 · 70 B · Battle systemCopies each PC's 80-byte block from its BattlerStats record (.Unk2D on, the !BattleRom_PcStatBlock bytes) back to its character's record in !Menu_CharRecords ($50 bytes per !Pc_CharId); slots... - verified
BattleAi_FindReactPart$C1:B488 · 34 B · Battle engineFinds the reaction part of an enemy's script: the script is !BattleRom_AiScriptPtrs[id], BattleAi_PickScript may swap in a fixed one, and from there it skips to the byte after the first $FF (the... - verified
BattleAi_PickScript$C1:B4AA · 63 B · Battle engine!Battle_UnkB1D2 = X, the enemy's own script address, unless the BattlerStats record of the enemy (slot !Battle_UnkB252 + 3) says otherwise: - .Unk4C+2 or .Unk4C+7 has bit 7 (!BattleAi_Unk4CBit7)... - verified
BattleSys_UnkB4E9$C1:B4E9 · 140 B · Battle systemPuts the battle's item list back into the inventory (probably what !Battle_InvIds / InvCounts are): first BattleSys_RefundItem for PCs 0, 1, 2; then for each of the 256 Item_BattleList records... - verified
BattleSys_UnkB575$C1:B575 · 348 B · Battle systemBuilds !Battle_CmdGroups from the three BattleCmd.Partners bytes (row p holds p and each other PC named in p's nibbles, $FF elsewhere; a nibble naming p itself, $F or any other value adds... - verified
BattleSys_RefundItem$C1:B6D1 · 61 B · Battle systemIf the BattleCmd.Kind of PC DP $14 has bit 6 (an item command still pending), clears the bit and gives the item back: the first Item_BattleList record (of 256) whose .Id is the command's .ActionId... - verified
BattleSys_UnkB70E$C1:B70E · 23 B · Battle systemFor the !Battle_Unk2989 bit-5 battle: all three PCs latched and queued at once: !Battle_UnkB188-B18A = $81 (bit 7 | 1), each BattleCmd.State = $41 (bit 6, "queued", | 1). - verified
BattleSys_UnkB725$C1:B725 · 61 B · Battle systemFor the !Battle_Unk2989 bit-5 battle: !Battle_CmdQueue[0] = PC 0, !Battle_CmdQueueLen = 1, each !Pc_AtbCur = 0 and !Pc_AtbMax = $30, and the three BattleCmd records (21 bytes) are copied from bank... - verified
BattleSys_UnkB762$C1:B762 · 144 B · Battle systemKeeps the 8 !Battle_UnkAEB3 bytes in !Battle_UnkAE65 and zeroes them and !Battle_UnkAEB2, then for each of the 8 entries of !Battle_UnkB3AC (the slots of the last action, per BattleSys_Unk8461)... - verified
BattleSys_UnkB7F2$C1:B7F2 · 27 B · Battle systemService !BattleSys_ServiceRemoveReady (BattleMenu_RemoveBattlerFromReady) for PC slots 0, 1 and 2 in turn: takes every PC out of the menu's ready state. - verified
BattleAi_TestTable$C1:B80D · 82 B · Battle engineHandlers of the script's test codes $00-$28, by code * 2: JSR (T,X) in BattleAi_RunMainPart ($C1:B006, $C1:B021) and BattleSys_Unk8461 ($C1:874E, $C1:8769). - verified
BattleAi_ChooseTable$C1:B85F · 46 B · Battle engineHandlers of the action codes $00-$16 as a block is chosen, by code * 2: JSR (T,X) in BattleAi_TestPassed ($C1:8CE7). - verified
BattleAi_RunTable$C1:B88D · 46 B · Battle engineHandlers of the same action codes $00-$16 on the enemy's turn, by code * 2: JSR (T,X) in BattleAi_EnemyTurn ($C1:8D88). - verified
BattleAi_TargetTable$C1:B8BB · 114 B · Battle engineHandlers of the script's target codes $00-$38, by code * 2: JSR (T,X) in BattleAi_ReadTargets ($C1:AC2E). - verified
BattleSys_ListHandlerTable$C1:B92D · 26 B · Battle systemHandler of each turn list, indexed by list number * 2: BattleSys_Main runs entry n (JSR (T,X) at $C1:8333) for each list whose !Battle_ListDue bit is set. - verified
BattleSys_ListOffsetTable$C1:B947 · 26 B · Battle systemAddress of each turn list's !Battle_ListFlags bytes (list * 11 past the start), indexed by list number * 2; BattleSys_Main's scan reads it with LDA.l at $C1:82C5. - verified
BattleSys_RemoveReadyLong$C1:B961 · 6 B · Battle systemService !BattleSys_ServiceRemoveReady (BattleMenu_RemoveBattlerFromReady) for bank-$FD code: a long-callable wrapper. - verified
BattleSys_UnkB967$C1:B967 · 761 B · Battle systemRuns a PC's committed command. - verified
BattleSys_UnkBC60$C1:BC60 · 129 B · Battle systemDoes nothing: its first instruction branches to its RTS, so the rest ($C1:BC62-$BCDF) is dead. - verified
BattleSys_UnkBCE1$C1:BCE1 · 23 B · Battle systemEnds a PC's turn: reloads the gauge of the PC !Battle_UnkB18B (!Battler_UnkAFAB = !Battle_UnkB158, then BattleSys_UnkBD6F), sets its turn-list-12 byte to 1 if it was non-zero (re-armed, not due). - verified
BattleSys_UnkBCE1_ClearRecords$C1:BCF8 · 115 B · Battle system - verified
BattleSys_UnkBCE1_Done$C1:BD6B · 4 B · Battle system - verified
BattleSys_UnkBD6F$C1:BD6F · 68 B · Battle systemApplies the battler's speed bits to its !Battler_UnkAFAB (the gauge reload): halved when BattlerStats.Unk4C+1 or +6 has bit 7 (!Battle_ListHalveBit), then doubled, at most $FF, when .Status2 has... - verified
BattleSys_ResetTechUsers$C1:BDB3 · 403 B · Battle systemAfter a tech (BattleSys_UnkB967's tech path, played or skipped): clears the BattleCmd record of the first user's slot (.State, .Kind, .Menu, .Target, .ActionId = 0; slot = !Battle_UnkB1BE of... - verified
BattleSys_UnkBF46$C1:BF46 · 51 B · Battle systemBy byte 0 of record !Battle_UnkB18C of !BattleRom_UnkCC05CC (4 B each): bit 7 -> BattleSys_Effect29, else bit 2 -> BattleSys_Effect2A, else bit 6 -> BattleSys_Effect2B, else nothing. - verified
BattleSys_UnkBF79$C1:BF79 · 8 B · Battle system!Battle_UnkAF23 = 0, then BattleSys_RunTechParts (which adds 1 to it when a PC's attack-kind part finds no enemy). - verified
BattleSys_UnkBF81$C1:BF81 · 35 B · Battle systemCopies the 17 bytes of record !Battle_UnkB18C of !BattleRom_UnkCC213F to !Battle_UnkAEE6. - verified
BattleSys_UnkBFA4$C1:BFA4 · 6 B · Battle systemService !BattleSys_ServiceRunAction (BattleSys_RunAction), which plays the action block. - verified
BattleSys_RunPcAttack$C1:BFAA · 128 B · Battle systemPlays the attack of battler !Battle_UnkB18B on the slot in !Battle_UnkAD8E: !Battle_UnkB1FC bit 1 is set over it; the action block is cleared (id, flags, both masks, !Battle_ActUnkAE9B = 0...
Bank $C1 · $C1:C000–$CFFF
$C1:C000
Verified · 34
- verified
Battle_ScaleByte20$C1:C02A · 57 B · Battle engineDP $30/$31 = about x / 5: x * 64 - x * 8 - x * 4 - x / 2 - x / 4 (= x * 51.25), / 256. - verified
Battle_ScaleByte30$C1:C063 · 55 B · Battle engineDP $30/$31 = about x * 3 / 10: x * 128 - x * 32 - x * 16 - x * 2 - x (= x * 77), / 256. - verified
Battle_ScaleByte60$C1:C09A · 66 B · Battle engineDP $30/$31 = about x * 3 / 5: x * 256 - x * 64 - x * 32 - x * 4 - x * 2 - x / 4 (= x * 153.75), / 256. - verified
Battle_ScaleWord60$C1:C0DC · 61 B · Battle engineDP $30/$31 = about x * 3 / 5: x - x / 4 - x / 8 - x / 64 - x / 128 - x / 1024, all 16 bits. - verified
Battle_ScaleByte80$C1:C119 · 55 B · Battle engineDP $30/$31 = about x * 4 / 5: x * 256 - x * 32 - x * 16 - x * 2 - x (= x * 205), / 256. - verified
Battle_ScaleWord80$C1:C150 · 50 B · Battle engineDP $30/$31 = about x * 4 / 5: x - x / 8 - x / 16 - x / 128 - x / 256, all 16 bits. - verified
Battle_ScaleByte10$C1:C182 · 48 B · Battle engineDP $30/$31 = about x / 10: x * 32 - x * 4 - x * 2 - x / 4 (= x * 25.75), / 256. - verified
Battle_ScaleWord10$C1:C1B2 · 43 B · Battle engineDP $30/$31 = about x / 10: x / 8 - x / 64 - x / 128 - x / 1024, all 16 bits. - verified
BattleSys_UnkC1DD$C1:C1DD · 1,818 B · Battle systemChecks that the users of the action !Battle_UnkB18C (a tech, an item, or an enemy's action) can act and resolves its targets into !Battle_UnkAD8E (slots, $FF-ended) and !Battle_UnkAD8D (their count). - verified
BattleSys_MapEmptyTarget$C1:C8F7 · 20 B · Battle systemA battler slot for a target: $FF stays $FF; a slot whose !Battler_UnkAEFF entry is present comes back as it is; an empty one comes back as its !Battle_UnkAE6D entry (BattleFD_UnkB223 fills that... - verified
Battle_Mul16$C1:C90B · 31 B · Battle engine16 x 16 -> 32-bit unsigned shift-and-add multiply: !Battle_MathHi:MathLo = !Battle_MathA * !Battle_MathB. - verified
Battle_Div32$C1:C92A · 50 B · Battle engine32 / 16-bit unsigned restoring divide of !Battle_MathHi:MathA by !Battle_MathB: !Battle_MathRem = the remainder, !Battle_MathLo = the quotient's low word. - verified
BattleSys_AreaParamTable$C1:C95C · 14 B · Battle systemThe area parameter routines of BattleSys_UnkC1DD, by bits 6-0 of an area record entry's byte 1 (JSR (BattleSys_AreaParamTable,X) at $C1:C732). - verified
BattleSys_UnkC96A$C1:C96A · 176 B · Battle systemSingle techs of PC DP $06: for each tech id from !BattleRom_CharFirstTech[character] up to the next character's first (8 techs), whose bit in !Battle_TechBits1[character] is set (bit 7 first)... - verified
BattleSys_UnkCA1A$C1:CA1A · 302 B · Battle systemDouble techs of PC DP $06: for each tech $39-$65 whose bit in !Battle_TechBits2 is set (3 techs per byte, bit 7 first), whose two users are both in the party (!Battle_UnkB1BE not negative) and one... - verified
BattleSys_TechMpCost1$C1:CB48 · 25 B · Battle systemA = the MP cost of the first user's part of tech A: !BattleRom_TechMpCost[BattleRom_TechRec[A].Part1 & $7F]. - verified
BattleSys_TechMpCost2$C1:CB61 · 25 B · Battle systemAs BattleSys_TechMpCost1, for the second user (.Part2). - verified
BattleSys_TechMpCost3$C1:CB7A · 25 B · Battle systemAs BattleSys_TechMpCost1, for the third user (.Part3). - verified
BattleSys_LoadTechUsers$C1:CB93 · 48 B · Battle system!Battle_TechUsers = the three character ids of the user set of tech A (BattleRom_TechRec[A].UserSet & $7F, 3 bytes each in !BattleRom_TechUserSets; $FF = no user). - verified
BattleSys_StoreMpCost$C1:CBC3 · 51 B · Battle systemY = the cost Y as BattleSys_AdjustMpCost cuts it for the PC of character id A (slot !Battle_UnkB1BE[A], its !Pc_UnkB3BA), stored to the tech menu entry at the address in DP $04: .MpCost0 for slot... - verified
BattleSys_AdjustMpCost$C1:CBF6 · 21 B · Battle systemCuts the MP cost in Y's low byte by A, the PC's !Pc_UnkB3BA: $A2 halves it, $A3 quarters it (each halving rounds up); any other value leaves it. - verified
BattleSys_StoreMpCost10$C1:CC0B · 51 B · Battle systemAs BattleSys_StoreMpCost, into the entry 10 records past the address in DP $04 (TechMenuRec[10]). - verified
BattleSys_StoreMpCost18$C1:CC3E · 51 B · Battle systemAs BattleSys_StoreMpCost, into the entry 18 records past the address in DP $04 (TechMenuRec[18]). - verified
BattleSys_PayTechMp$C1:CC71 · 90 B · Battle systemTakes cost Y, cut by BattleSys_AdjustMpCost, off BattlerStats.CurMp of the PC with character id A (slot !Battle_UnkB1BE[A]: 0, 1, any other value as 2). - verified
BattleSys_UnkCCCB$C1:CCCB · 308 B · Battle systemTriple tech of PC DP $06: the first tech $66-$74 whose bit in !Battle_TechBits3 is set (one tech per byte, bit 7) and whose three users are all in the party gets entry 18 (TechMenuRec[18]): tech... - verified
BattleSys_UnkCDFF$C1:CDFF · 55 B · Battle systemBuilds the battle's item list: zeroes the 256 Item_BattleList records ($500 bytes), then walks the inventory from entry DP $00 = 0: an empty entry (!Battle_InvIds 0) goes to... - verified
BattleSys_UnkCE36$C1:CE36 · 4 B · Battle systemBattleFD_UnkAEF2, then falls into BattleSys_UnkCE3A. - verified
BattleSys_UnkCE3A$C1:CE3A · 219 B · Battle systemSets up the stat block (!BattleRom_PcStatBlock) of PC DP $02, if the slot has an entry: .Unk0B-.Unk11 are copied to .Unk36-.Unk3C, then for each of three records in bank $CC, 6 bytes each, DP $08... - verified
BattleSys_UnkCF15$C1:CF15 · 61 B · Battle systemFor each PC slot 0-2 (present or not), with Y = its stat block address (!BattleRom_PcStatBlock): BattleFD_ItemRecOffset with A = the block's byte at offset DP $06 (LDA (DP $06),Y), then DP $0A... - verified
BattleSys_UnkCF52$C1:CF52 · 23 B · Battle systemX = (B : DP $06) * 4 (16-bit), A = 0: it loads DP $06 into A (the incoming A is not used), tests it for $29, but both branches do the same (REP, ASL, ASL, CLC), so the test has no effect. - verified
BattleSys_UnkCF69$C1:CF69 · 85 B · Battle systemAdds a record's bonus to the stat block at DP $00: byte 5 of the bank-$CC record at offset DP $08 (!BattleRom_EquipBonus); if it is not 0, its low nibble is added to PcStatBlk.Unk3F, .Unk40... - verified
BattleAi_EnemyTurnJsr$C1:CFBE · 4 B · Battle engineBattleAi_EnemyTurn through a JSR of its own. - verified
BankC1_RunService$C1:CFC2 · 39 B · EngineSaves P, X (16-bit), DP and DB, sets DB=$7E and DP=0, and runs entry A (low byte) of BankC1_ServiceTable with M=1, X=0, A = 0 (B too) and Y as it came; then pulls DB, DP, X and P back and returns... - verified
BankC1_FindItem$C1:CFE9 · 28 B · EngineService 0 (!BankC1Svc_FindItem): A = the item id Y when an !Battle_InvIds entry holds it (X = its index), else 0.
Bank $C1 · $C1:D000–$DFFF
$C1:D000
Verified · 47
- verified
BankC1_AddItem$C1:D005 · 81 B · EngineService 1 (!BankC1Svc_AddItem): one more of item Y. - verified
BankC1_RemoveItem$C1:D056 · 48 B · EngineService 2 (!BankC1Svc_RemoveItem): one fewer of item Y. - verified
BankC1_HasGold$C1:D086 · 28 B · EngineService 3 (!BankC1Svc_HasGold): A = $FF when the gold is at least Y (its low word not below Y, or its high byte not 0) or Y = 0, else 0. - verified
BankC1_AddGold$C1:D0A2 · 75 B · EngineService 4 (!BankC1Svc_AddGold): adds Y to the 24-bit gold. - verified
BankC1_RemoveGold$C1:D0ED · 57 B · EngineService 5 (!BankC1Svc_RemoveGold): takes Y off the 24-bit gold. - verified
BankC1_ServiceTable$C1:D126 · 12 B · EngineBankC1_RunService's services, by its A (JSR (BankC1_ServiceTable,X) at $C1:CFE1). - verified
BattleSys_EffRecArgsUnk66$C1:D132 · 29 B · Battle systemDP $16 = the caster's BattlerStats.Unk66 (!Battle_UnkB1F4), DP $18 = effect byte 1 & $1F, DP $1A = effect byte 2 (DP $17/$19/$1B = 0). - verified
BattleSys_EffRecArgs12$C1:D14F · 17 B · Battle systemDP $16 = effect byte 1, DP $18 = effect byte 2 (DP $17/$19 = 0). - verified
BattleSys_EffRecArg10Unk46$C1:D160 · 20 B · Battle systemDP $16 = effect byte 10, DP $18 = the target's BattlerStats.Unk46 (!Battle_UnkB1F6) (DP $17/$19 = 0). - verified
BattleSys_EffRecStatPair$C1:D174 · 44 B · Battle systemTwo stat bytes picked by the effect record: DP $16 = the caster's BattlerStats byte at .Unk2D + effect byte 3, DP $18 = the target's at .Unk2D + effect byte 4 (DP $17/$19 = 0). - verified
BattleSys_EffRecArgs12B$C1:D1A0 · 4 B · Battle systemBattleSys_EffRecArgs12 through a JSR of its own. - verified
BattleSys_EffRecArgs56$C1:D1A4 · 17 B · Battle systemDP $16 = effect byte 5 (!Battle_UnkAEEB), DP $18 = effect byte 6 (DP $17/$19 = 0). - verified
BattleSys_EffRecArg11$C1:D1B5 · 6 B · Battle systemDP $1A = effect byte 11 (8-bit; DP $1B left alone): the bits BattleSys_RecordMiss reads. - verified
BattleSys_CasterUnk73$C1:D1BB · 20 B · Battle systemDP $20 = the caster's BattlerStats.Unk73, DP $1E = its .Unk74 (DP $1F/$21 = 0). - verified
BattleSys_EffRecArgs12C$C1:D1CF · 4 B · Battle systemBattleSys_EffRecArgs12 through a JSR of its own, as BattleSys_EffRecArgs12B (two identical unreferenced copies). - verified
BattleSys_LoadEffectArgs$C1:D1D3 · 38 B · Battle systemFrom the !BattleRom_UnkCC05CC record of !Battle_UnkB18C: DP $16 = byte 3 & $3F, DP $18 = byte 2 & $0F, DP $1A = byte 1 (each 16-bit, high byte 0): BattleSys_RestoreHpMp's amount base, factor and bits. - verified
BattleSys_LoadEffectArg3$C1:D1F9 · 17 B · Battle systemDP $16 = byte 3 of the !BattleRom_UnkCC05CC record of !Battle_UnkB18C, all of it (16-bit, high byte 0). - verified
BattleSys_LoadEffectArgs12$C1:D20A · 23 B · Battle systemDP $16 = byte 1 and DP $18 = byte 2 of the !BattleRom_UnkCC05CC record of !Battle_UnkB18C, whole. - verified
BattleSys_Effect00$C1:D221 · 29 B · Battle systemEffect type 0: BattleSys_LoadCasterStats, then per target BattleSys_LoadTargetStats, BattleSys_EffRecArgsUnk66, BattleSys_RestoreHpMp, BattleSys_StoreTargetCmd; then !Battle_UnkB200 = 0. - verified
BattleSys_Effect01$C1:D23E · 41 B · Battle systemEffect type 1: as BattleSys_Effect00, but per target BattleSys_EffRecArgs12 and BattleSys_CureStatus, and when bit 6 of effect byte 1 (DP $16) is set also BattleSys_EffRecArgsUnk66 and... - verified
BattleSys_Effect02$C1:D267 · 119 B · Battle systemEffect type 2, per target: unless !Battle_UnkAE4D has !Battle_AE4DBit5, a percentage roll: the chance is effect byte 5 + the caster's BattlerStats.Unk66 / effect byte 6 (Battle_Div32, 8-bit sum)... - verified
BattleSys_Effect03$C1:D2DE · 146 B · Battle systemEffect type 3, per target: - unless !Battle_UnkAE4D has !Battle_AE4DBit4: BattleSys_EffRecArg10Unk46 and BattleSys_TestEnemyUnk46; DP $16 non-zero = a miss (BattleSys_EffRecArg11, DP $1C = 1... - verified
BattleSys_Effect04$C1:D370 · 1 B · Battle systemEffect type 4: does nothing. - verified
BattleSys_Effect05$C1:D371 · 78 B · Battle systemEffect type 5: DP $20 = effect byte 1 (not read here nor by BattleSys_DrainHpMp), BattleSys_LoadCasterStats; per target: BattleSys_LoadTargetStats, DP $1E = effect byte 1, !Battle_UnkAD9B = 0... - verified
BattleSys_Effect06$C1:D3BF · 53 B · Battle systemEffect type 6, for the last target only: BattleSys_LoadCasterStats, BattleSys_LoadTargetStats, BattleSys_EffRecArgs12, BattleSys_StealItem; DP $16 = $FE after it = a miss (BattleSys_EffRecArg11... - verified
BattleSys_Effect07$C1:D3F4 · 61 B · Battle systemEffect type 7: BattleSys_Effect00, then the caster's BattlerStats.CurHp goes into !Battle_UnkAD89 and is recorded as a hit on the caster (Battle_RecordHit, Y = !Battle_UnkB18B, !Battle_UnkB202 =... - verified
BattleSys_Effect08$C1:D431 · 94 B · Battle systemEffect type 8: BattleSys_Effect03 run effect byte 1 times (!Battle_UnkB2D0 counts down; 0 would mean 256), each time with !Battle_UnkAD8D put back to the count it came with (!Battle_UnkB2ED) and... - verified
BattleSys_EffectNone$C1:D48F · 1 B · Battle systemEffect types $09-$28 of BattleSys_EffectTable: does nothing. - verified
BattleSys_Effect29$C1:D490 · 29 B · Battle systemEffect type $29; also an item whose !BattleRom_UnkCC05CC byte 0 has bit 7 (BattleSys_UnkBF46). - verified
BattleSys_Effect2A$C1:D4AD · 41 B · Battle systemEffect type $2A; also an item whose !BattleRom_UnkCC05CC byte 0 has bit 2 (and not bit 7). - verified
BattleSys_Effect2B$C1:D4D6 · 29 B · Battle systemEffect type $2B; also an item whose !BattleRom_UnkCC05CC byte 0 has bit 6 (and not bits 7 or 2). - verified
BattleSys_Effect2C$C1:D4F3 · 21 B · Battle systemEffect type $2C: clears bit 6 (!Battle_StatusBit6) of the BattlerStats.Status of the last target only (BattleSys_LoadTargetStats), and !Battle_UnkB200 = 0. - verified
BattleSys_StoreTargetCmd$C1:D508 · 27 B · Battle systemCopies the four bytes !Battle_UnkB18E-!Battle_UnkB191 (the action's command bytes, see !Battle_UnkB18E) into the !Battle_UnkB192 record of the current target, !Battle_UnkAD8E[!Battle_UnkAD8D - 1]. - verified
BattleSys_RunTechParts$C1:D523 · 556 B · Battle systemRuns the parts of tech !Battle_UnkB18C (on the attack path the !BattleRom_PcAttackNum number) for its users. - verified
BattleSys_CheckTechMp$C1:D74F · 117 B · Battle systemWhether every user of tech !Battle_UnkB18C (!Battle_TechUsers, as loaded) can take part: for each of users 0-2 (!Battle_UnkB2D0 the index; a $FF id is skipped and the loop goes on), the user's... - verified
BattleSys_UnkD7C4$C1:D7C4 · 269 B · Battle systemAn enemy's action for action code 2 (BattleAi_EnemyTurn): the enemy counterpart of BattleSys_RunTechParts with one part. - verified
BattleSys_UnkD8D1$C1:D8D1 · 262 B · Battle systemAn enemy's action for the action codes other than 2: BattleSys_UnkD7C4 with the records at !BattleRom_UnkCC88CB (the ones BattleFD_LoadUnkB18E2 reads) and the effect records at... - verified
BattleSys_EffectTable$C1:D9D7 · 90 B · Battle systemThe effect routines by effect type (byte 0 of the effect record in !Battle_UnkAEE6), called with JSR (BattleSys_EffectTable,X) by BattleSys_RunTechParts ($C1:D704), BattleSys_UnkD7C4 ($C1:D893)... - verified
BattleSys_TechMpCostTable$C1:DA31 · 6 B · Battle systemThe MP cost routine of each user (0-2) of a tech, called by BattleSys_CheckTechMp with JSR (BattleSys_TechMpCostTable,X) at $C1:D783. - verified
BattleSys_RestoreHpMp$C1:DA37 · 295 B · Battle systemRestores the current target's HP and/or MP, by the bits of DP $1A: - bit 7 (!Battle_RestoreHpBit), HP: the amount is DP $16 * DP $18 (Battle_Mul16), plus a random 0 .. - verified
BattleSys_CureStatus$C1:DB5E · 76 B · Battle systemClears the current target's statuses: .Status keeps only bits 7-6 (bit 7, KO, is cleared first when DP $16 has bit 7, !Battle_CureKoBit), .Status2 is cleared (with an AND #0), and .Unk4C keeps... - verified
BattleSys_SetStatus$C1:DBAA · 186 B · Battle systemSets the status bits DP $18 in status byte DP $16 of the current target (BattlerStats.Status + DP $16): - DP $16 = $FF (!Battle_StatusIdxNone): nothing; DP $16 stays $FF. - verified
BattleSys_RollHit$C1:DC64 · 73 B · Battle systemThe hit roll of BattleSys_Effect03: with DP $16 = the caster's stat and DP $18 = the target's (BattleSys_EffRecStatPair, then BattleSys_AdjustHit and BattleSys_AdjustEvade), the chance is DP $16 *... - verified
BattleSys_ApplyDamage$C1:DCAD · 474 B · Battle systemApplies BattleSys_Effect03's damage to the current target: - the target's .Status2 bits 1-2 (!Battle_Status2Bits12) are cleared; - !Battle_UnkAD89 = (256 - DP $18) * DP $16 / 256 (DP $16 the... - verified
BattleSys_TestEnemyUnk46$C1:DE87 · 23 B · Battle systemBattleSys_Effect03's first test: DP $16 = 1 when the target is an enemy (slot 3 or more) and DP $16 (effect byte 10) has a bit in common with DP $18 (its BattlerStats.Unk46... - verified
BattleSys_AdjustHit$C1:DE9E · 82 B · Battle systemLowers the caster's value for BattleSys_RollHit (DP $16, from BattleSys_EffRecStatPair) by the caster's .Status2: bits 0 or 2 (!Battle_Status2Bits02) make it DP $16 * 5 / 20 + 1, else bit 6... - verified
BattleSys_AdjustEvade$C1:DEF0 · 278 B · Battle systemChanges the target's value for BattleSys_RollHit (DP $18, from BattleSys_EffRecStatPair) by its statuses, the first that applies: - .Unk4C+1 | .Unk4C+6 bit 6 (!Battle_List4StatusBit): DP $18 * 5 /...
Bank $C1 · $C1:E000–$EFFF
$C1:E000
Verified · 37
- verified
BattleSys_ArmStatusList$C1:E006 · 239 B · Battle systemStarts the turn list that times a status bit BattleSys_SetStatus has just set in byte DP $16 of the target !Battle_UnkB1FD: for the first of these bits in DP $18 the list's !Battle_ListTimers... - verified
BattleSys_CalcDamage$C1:E0F5 · 1,350 B · Battle systemBattleSys_Effect03's damage, by the formula kind DP $16 (effect byte 5, BattleSys_EffRecArgs56). - verified
BattleSys_WakeTarget$C1:E63B · 36 B · Battle systemWhen the current target's .Status2 has bit 1 or 2 (!Battle_Status2Bits12), clears them and restarts its turn: its turn-list-12 flags = !Battle_ListPartBit, !Battler_UnkAFAB (the gauge reload) =... - verified
BattleSys_AdjustDefence$C1:E65F · 271 B · Battle systemThe defence BattleSys_ApplyDamage takes off the damage (DP $18, 0-255, out of 256), from DP $18 = effect byte 6 (BattleSys_EffRecArgs56): $3E (!Battle_DefUnk6B) means the target's... - verified
BattleSys_RollUpTo1A$C1:E76E · 13 B · Battle systemDP $1A = a random number from 0 to DP $1A (Battle_RandRange with the high bound DP $1A + 1); X is kept. - verified
BattleSys_DrainHpMp$C1:E77B · 292 B · Battle systemBattleSys_Effect05's drain, probably: DP $1A = 3 (!Battle_Eff05Bit7Arg) works on HP, 7 (!Battle_Eff05Bit6Arg) on MP. - verified
Battle_HitEntryOffset$C1:E89F · 33 B · Battle engineDP $0E = !Battle_UnkAD9B * !Battle_HitSetSize + !Battle_UnkB1FD * 4: the offset of slot !Battle_UnkB1FD's entry in set !Battle_UnkAD9B of the !Battle_ActPcHitAmount records (the callers index... - verified
BattleSys_CasterHitOffset$C1:E8C0 · 34 B · Battle systemDP $10 = !Battle_UnkAD9B * !Battle_HitSetSize + !Battle_UnkB18B * 4: the offset of the caster's entry in set !Battle_UnkAD9B of the !Battle_ActPcHitAmount records (Battle_HitEntryOffset's... - verified
BattleSys_RecordMiss$C1:E8E2 · 148 B · Battle systemRecords a miss on the current target !Battle_UnkB1FD, probably: its !Battle_ActPcHitAmount entry in set !Battle_UnkAD9B gets amount 0 and kind 5 (!Battle_ActHitKind5, drawn as tiles, not a... - verified
BattleSys_UnkE976$C1:E976 · 45 B · Battle systemA percentage roll (0-99, kept in DP $0E) against DP $16 (effect byte 1 as BattleSys_Effect03 passes it): when DP $16 is at least the roll, DP $16 = 1 and BattleSys_SetStatus runs (status byte 1... - verified
BattleSys_LoadCasterStats$C1:E9A3 · 21 B · Battle system!Battle_UnkB1F4 = the BattlerStats offset of the acting battler !Battle_UnkB18B (slot * $80). - verified
BattleSys_LoadTargetStats$C1:E9B8 · 29 B · Battle systemThe current target, !Battle_UnkAD8E[!Battle_UnkAD8D - 1]: its slot goes to !Battle_UnkB1FD and its BattlerStats offset (slot * $80) to !Battle_UnkB1F6. - verified
BattleSys_StealItem$C1:E9D5 · 154 B · Battle systemAn item taken from the target enemy, probably (BattleSys_Effect06; BattleSys_Effect03 with !Battle_AE4DBit1). - verified
BattleSys_RunUnkB2CCHandlers$C1:EA6F · 46 B · Battle systemRuns BattleSys_RunUnkB2CCHandler for the part's !Battle_UnkB2CC when it is not 0, then, when !Battle_UnkAE4E (effect byte 8) has bit 7 (!Battle_AE4EBit7), loads the caster's .Unk73 / .Unk74... - verified
BattleSys_ClearPcStatuses$C1:EA9D · 75 B · Battle systemFor PC slots 0-2 (!Battle_UnkB18B = the slot, BattleSys_LoadCasterStats): .Status2 and .Unk4C-.Unk4C+7 = 0, .Status keeps only bit 7 (!Battle_StatusKo), .Unk2F bit 0 (!Battle_StatsUnk2FBit) is... - verified
BattleSys_ClearPcKo$C1:EAE8 · 38 B · Battle systemFor PC slots 0-2 (!Battle_UnkB18B = the slot): BattleSys_UnkBC60 (which does nothing), BattleSys_LoadCasterStats, then .Status = 0, so the KO bit BattleSys_ClearPcStatuses kept goes too. - verified
BattleSys_CopyEffectBytes78$C1:EB0E · 14 B · Battle system!Battle_UnkAE4D = byte 7 and !Battle_UnkAE4E = byte 8 of the effect record in !Battle_UnkAEE6 (meaning unknown). - verified
BattleSys_RunUnkB2CCHandler$C1:EB1C · 45 B · Battle systemReads record !Battle_UnkB2CC of !BattleRom_UnkCC2A05 (3 bytes): DP $1C = byte 1, DP $1E = byte 2, DP $20 = byte 0, and runs entry byte 0 of BattleSys_HitModTable (JSR (table,X), X = byte 0 * 2, 8... - verified
BattleSys_ReviveHeal$C1:EB49 · 31 B · Battle systemNot called (xref finds no call; no table entry is known). - verified
Battle_SumHitSets$C1:EB68 · 144 B · Battle engineFolds the enemy entries (slots 3-10) of the !Battle_ActPcHitAmount sets 1 to DP $1A into set 0: for set n from DP $1A down to 1, each entry's amount is added to set n - 1's (16-bit, carry... - verified
Battle_RecordHit$C1:EBF8 · 65 B · Battle engineStores !Battle_UnkAD89 as slot Y's amount in !Battle_HitAmount set !Battle_UnkB2C7, and !Battle_UnkB202 as the high byte of its !Battle_HitFlags (the low byte is left alone). - verified
Battle_ClearCancelledHits$C1:EC39 · 70 B · Battle engineFor each battler slot whose entry has !Battle_HitCancelBitHi in any of the 3 !Battle_HitAmount sets, zeroes its amount in all three; for an enemy slot also !Battle_UnkAEB2, its !Battle_UnkAEB3... - verified
Battle_ApplyHits$C1:EC7F · 266 B · Battle engineBattle_ClearCancelledHits, then for each battler slot (X = its BattlerStats offset, Y = its entry): - HP, skipped when the entry of set 0 has the MP bit in its flags (the HP amounts of sets 1 and... - verified
BattleSys_HitModChanceMul$C1:ED89 · 48 B · Battle systemModifier $00. - verified
BattleSys_HitModNone$C1:EDB9 · 1 B · Battle systemModifier $01: does nothing. - verified
BattleSys_HitModScale$C1:EDBA · 32 B · Battle systemModifier $02: !Battle_UnkAD89 = !Battle_UnkAD89 x DP $1C / DP $1E (Battle_Mul16, then Battle_Div32 of the 32-bit product; the low 16 bits of the quotient are kept). - verified
BattleSys_HitModUnk47Scale$C1:EDDA · 35 B · Battle systemModifier $03: when the target's BattlerStats.Unk47 has any of the bits DP $1C, !Battle_UnkAD89 = !Battle_UnkAD89 x DP $1E / 2 (16-bit product, halved). - verified
BattleSys_HitModPerEmptyPc$C1:EDFD · 42 B · Battle systemModifier $04: !Battle_UnkAD89 x (1 + the number of PC slots 0-2 whose !Battler_UnkAEFF is $FF, no PC there). - verified
BattleSys_HitModPlayTime$C1:EE27 · 120 B · Battle systemModifier $05: a factor picked by the play-time clock. - verified
BattleSys_HitModRandomStatus$C1:EE9F · 49 B · Battle systemModifier $06: sets one of four .Status2 bits on the target, picked by a roll from 0 to 100 (BattleSys_RollUpTo1A with 100): below 40 bit 2 ($04), 40-64 bit 7 ($80), 65-89 bit 1 ($02), 90-99 bit 6... - verified
BattleSys_HitModUnk47Status$C1:EED0 · 39 B · Battle systemModifier $07: on a roll <= 80, and when the target's BattlerStats.Unk47 has any of the bits DP $1C, sets the .Status2 bits DP $1E (BattleSys_SetStatus, DP $16 = 1). - verified
BattleSys_HitModChanceStatus$C1:EEF7 · 29 B · Battle systemModifier $08: on a roll <= DP $1C, sets the .Status2 bits DP $1E on the target (BattleSys_SetStatus, DP $16 = 1). - verified
BattleSys_HitModLeaveOneHp$C1:EF14 · 37 B · Battle systemModifier $09: on a roll <= DP $1C, !Battle_UnkAD89 = the target's .CurHp - 1 (so the hit leaves it 1 HP) and !Battle_UnkB1FC bit 0 (!Battle_B1FCBit0) is set, so BattleSys_ApplyDamage skips its x 7... - verified
BattleSys_HitModUnk6CScale$C1:EF39 · 131 B · Battle systemModifier $0A: the first of bits 7, 6, 5, 4 set in !Battle_UnkB190 (byte 1 of the action's !Battle_UnkB18C record) picks n = 0-3 (!Battle_Unk6CIndex); with none of them, nothing happens. - verified
BattleSys_HitModScaleThenUnk6C$C1:EFBC · 7 B · Battle systemModifier $0B: BattleSys_HitModScale (x DP $1C / DP $1E), then BattleSys_HitModUnk6CScale. - verified
BattleSys_HitModRollDp1A$C1:EFC3 · 16 B · Battle systemModifier $0C: DP $1A = 1 when a roll is below DP $1C (strictly, unlike the others), else 0. - verified
BattleSys_AddBattleItem$C1:EFD3 · 99 B · Battle systemAdds one of item DP $06 to the battle's item list (Item_BattleList): when an entry holds the id, its .Quantity + 1 (capped at 99).
Bank $C1 · $C1:F000–$FFFF
$C1:F000
Verified · 30
- verified
BattleSys_HitModRestore$C1:F036 · 95 B · Battle systemModifier $0D, by the bits of DP $1C: - bit 7: a full HP restore of the target, probably: !Battle_UnkAD89 = its .MaxHp, recorded by Battle_RecordHit for slot !Battle_UnkB1FD with !Battle_UnkB202 =... - verified
BattleSys_HitModHalveHp$C1:F095 · 40 B · Battle systemModifier $0E: unless the target's BattlerStats.Unk46 has bit 7 (!Battle_Unk46Bit7: probably a resistance to this kind of attack), on a roll <= DP $1C !Battle_UnkAD89 = the target's .CurHp / 2. - verified
BattleSys_HitModClearBits$C1:F0BD · 28 B · Battle systemModifier $0F: clears the bits DP $1E in the target's byte at BattlerStats.Unk2D + DP $1C. - verified
BattleSys_HitModHpDigit$C1:F0D9 · 52 B · Battle systemModifier $10: !Battle_UnkAD89 = !Battle_UnkAD89 x (the caster's .CurHp mod 10, its last decimal digit) / DP $1E. - verified
BattleSys_HitModZeroHp$C1:F10D · 37 B · Battle systemModifier $11: sets an HP to 0. - verified
BattleSys_HitModKoOrDrop$C1:F132 · 149 B · Battle systemModifier $12: unless the target's BattlerStats.Unk46 has bit 7 (!Battle_Unk46Bit7), on a roll <= DP $1C its .CurHp = 0. - verified
BattleSys_HitModAltBoost$C1:F1C7 · 40 B · Battle systemModifier $13: only when !Battle_ActUnkAE9B bit 7 (!Battle_ActAltFlag, set by BattleSys_HitModChanceMul) is set: DP $1E = 1 makes !Battle_UnkAD89 9999 (!Battle_HitAmountMax), anything else doubles... - verified
BattleSys_HitModSetBits$C1:F1EF · 22 B · Battle systemModifier $14: sets the bits DP $1E in the target's byte at BattlerStats.Unk2D + DP $1C (the counterpart of BattleSys_HitModClearBits). - verified
BattleSys_AwardTechPoints$C1:F205 · 214 B · Battle systemThe tech points and the techs they teach. - verified
BattleSys_BuildComboMasks$C1:F2DB · 191 B · Battle system!Battle_ComboPcBit+n = $80 >> the character id of PC slot n (0 for an empty slot, !Battler_UnkAEFF $FF), the three sorted from low to high (three compare-and-swap steps); then !Battle_ComboMasks =... - verified
BattleSys_SpendTechPoints$C1:F39A · 197 B · Battle systemPays the battle's tech points into character !Battle_TpCharId's single techs (the PC whose BattlerStats offset is DP $00): the award !Battle_UnkB2DB is kept in DP $30, then BattleSys_TryNextTech... - verified
BattleSys_TryNextTech$C1:F45F · 128 B · Battle systemDP $3B = the character's first single tech id (!BattleRom_CharTechs); the next tech is DP $3B + its !Battle_TechCount. - verified
BattleSys_LearnSingleTech$C1:F4DF · 84 B · Battle systemThe character learns its next single tech: bit ($80 >> its !Battle_TechCount) is set in its !Battle_TechBits1 byte, the PC's !Battle_UnkB2B3 entry (!Battle_UnkB1F4) gets bit 3 (message 5), the... - verified
BattleSys_LearnComboTechs$C1:F533 · 240 B · Battle systemThe double or triple techs of one !BattleRom_ComboTechs record. - verified
BattleSys_LevelUpStep$C1:F623 · 406 B · Battle systemOne level step for the block at !Battle_ExpRec: BattleSys_ApplyExpStep; when it raised the level (!Battle_NoLevelUp = 0), BattleSys_GrowHpMp, then the stats from the character's 7-byte... - verified
BattleSys_ApplyExpStep$C1:F7B9 · 184 B · Battle system!Battle_NoLevelUp = $FF; then, unless the block's .Status has bit 7 (KO'd; BattleSys_AwardExpAndTp never gets there, as a KO'd PC's !Battler_UnkAEFF is $FF): - level 99 or more: !Battle_UnkB28C =... - verified
BattleSys_GrowHpMp$C1:F871 · 151 B · Battle system.MaxHp of the block at !Battle_ExpRec + the HP gain of the first pair in the character's !BattleRom_HpGrowth row (8 bytes: (top level, gain) pairs) whose top level is at least .Level, capped at... - verified
BattleSys_AddExp$C1:F908 · 54 B · Battle systemAdds !Battle_UnkB28C to the 24-bit .Exp of the block at X (carry into the high byte); when the high byte is then $98 or more it is set to $98, and a low word of $9680 or more to $967F (so at most... - verified
BattleSys_AwardExpAndTp$C1:F93E · 173 B · Battle systemThe experience and tech points of a won battle. - verified
BattleSys_AwardReserveExp$C1:F9EB · 118 B · Battle systemExperience for the characters not in the battle: !Battle_UnkB1F4 = 3, !Battle_RosterBits = the low byte of !Menu_Unk29AF (bit 7 = character 0, shifted left per id); for each character id 0-6 whose... - verified
BattleSys_HitModTable$C1:FA61 · 42 B · Battle systemThe hit modifiers BattleSys_RunUnkB2CCHandler runs, by byte 0 of a !BattleRom_UnkCC2A05 record (JSR (BattleSys_HitModTable,X) at $C1:EB45); see the banner before BattleSys_HitModChanceMul. - verified
Battle_SetupBattle$C1:FA8B · 803 B · Battle engineBattleSys_Main's first step: builds the battle state before the shuffles. - verified
Battle_CalcUnk56$C1:FDAE · 17 B · Battle engineA / 24 + $44: Battle_SetupBattle's BattlerStats.Unk56 from .Unk3F for a PC whose .Unk2D is 5. - verified
Battle_Mul16Long$C1:FDBF · 4 B · Battle engineJSL form of Battle_Mul16. - verified
BankC1_AddItemLong$C1:FDC3 · 4 B · EngineJSL form of BankC1_AddItem (add one of item Y). - verified
BattleSys_RunPcAttackLong$C1:FDC7 · 4 B · Battle systemJSL form of BattleSys_RunPcAttack. - verified
Battle_RandRangeLong$C1:FDCB · 4 B · Battle engineJSL form of Battle_RandRange. - verified
BattleSys_RefundItemLong$C1:FDCF · 4 B · Battle systemJSL form of BattleSys_RefundItem. - verified
BankC1_OldBuildTail$C1:FDD3 · 556 B · Engineand BankC1_DebugFlag ($C1:FFFF) - verified
BankC1_DebugFlag$C1:FFFF · 1 B · EngineThe last byte of the bank, read as !BattleRom_DebugFlag (LDA.l) by BattleSys_Main: non-zero enables its pad-2 Select win.
Bank $C2 · $C2:0000–$0FFF
$C2:0000
Verified · 61
- verified
BankC2_Entry0000$C2:0000 · 3 B · Enginethe bank's entry vectors, five JMPs reached from other banks by JML/JSL: $0000 BankC2_Entry0000 → BankC2_SceneBoot (JML from GameLoop_Main for Loc_Id $01F0-$81EF; it never returns) $0003... - verified
BankC2_Entry0003$C2:0003 · 3 B · Engine - verified
BankC2_Entry0006$C2:0006 · 3 B · Engine - verified
BankC2_Entry0009$C2:0009 · 3 B · Engine - verified
BankC2_Entry000C$C2:000C · 3 B · Engine - verified
BankC2_SceneBoot$C2:000F · 52 B · EngineStarts the bank's scene mode (inferred name: GameLoop_Main sends Loc_Id $01F0-$81EF here; what those locations show is not traced). - verified
BankC2_InitHwRegs$C2:0043 · 205 B · EngineWrites the PPU registers from OBSEL to SETINI (all but INIDISP and the data ports OAMDATA, VMDATAL/H and CGDATA) and the CPU registers WRIO-VTIMEH with fixed values, through DP=$2100 and then... - verified
C2Scene_InstallInterrupts$C2:0110 · 31 B · EngineWrites JML C2Scene_NmiHandler and JML C2Scene_IrqHandler into the WRAM trampolines that the native NMI and IRQ stubs in bank $00 jump through, as InstallNMI/InstallIRQ ($C0:0B64/$0B75) do for the... - verified
C2Scene_ClearDp$C2:012F · 47 B · EngineZeroes the direct page $00-$EF (an STZ of the first word, then an overlapping MVN), then sets the PPU shadows that C2Scene_NmiHandler copies out to their starting values: forced blank, mode 1 with... - verified
C2Scene_NmiHandler$C2:015E · 487 B · EngineThe scene mode's NMI (reached through !NmiTrampoline, installed by C2Scene_InstallInterrupts). - verified
C2Scene_IrqHandler$C2:0345 · 1 B · Enginethe scene mode's IRQ, an RTI (installed by C2Scene_InstallInterrupts; nothing here enables IRQs). - verified
C2Scene_WaitFrame$C2:0346 · 7 B · EngineWaits until the next NMI: spins until C2Scene_FrameCounter changes. - verified
C2Scene_HideAllSprites$C2:034D · 162 B · EngineParks all 128 sprites of the OAM shadow below the screen: Y = Oam_HiddenY in every low-table entry, and the high table zeroed (small size, X bit 8 clear). - verified
C2Scene_VramQInit$C2:03EF · 22 B · EngineEmpties and unlocks the VRAM upload queue: clears C2Scene_VramQLock and C2Scene_VramQEnd, points C2Scene_VramQBufPtr at C2Scene_VramQBuf ($7E:F000) and zeroes all 16 C2Scene_VramQ entries (dp... - verified
C2Scene_VramQFlush$C2:0405 · 79 B · EngineRuns the queued VRAM uploads: for each 8-byte C2Scene_VramQ entry up to C2Scene_VramQEnd, one DMA on channel 0 (word writes to VMDATAL/H) from .Bank:.Src, .Size bytes, to VRAM word .Dest with... - verified
C2Scene_WaitFrames$C2:0454 · 26 B · EngineWaits X frames (C2Scene_WaitFrame each time). - verified
C2Scene_WaitOneFrame$C2:046E · 3 B · EngineA JMP to C2Scene_WaitFrame: waits for the next NMI without sending a pending sound command. - verified
C2Scene_TaskClearAll$C2:0471 · 25 B · EngineFrees all 64 task records (zeroes each .Handler) and points C2Scene_TaskCur at the first record, so that tasks spawned before any task runs copy their parameters from record 0. - verified
C2Scene_TaskSpawn$C2:048A · 10 B · EngineStarts a task with handler X in the first free record from record 4 on (records 0-3 are left to C2Scene_TaskSpawnLow, which enters at C2Scene_TaskSpawn_Search with its own range). - verified
C2Scene_TaskSpawn_Search$C2:0494 · 57 B · Engine - verified
C2Scene_TaskSpawnLow$C2:04CD · 12 B · EngineC2Scene_TaskSpawn over records 0-3 only: the same search and setup (it branches into C2Scene_TaskSpawn_Search). - verified
C2Scene_TaskSpawnScript$C2:04D9 · 34 B · EngineSpawns a C2Scene_TaskRunScript task (C2Scene_TaskSpawn, records 4-63) and gives it a script: .ScriptPtr = X, .ScriptBank = A, .Unk0A = 0. - verified
C2Scene_TaskSpawnScriptLow$C2:04FB · 34 B · EngineC2Scene_TaskSpawnScript in records 0-3 (C2Scene_TaskSpawnLow). - verified
C2Scene_TaskRunAll$C2:051D · 54 B · EngineRuns every live task once (from the NMI, each frame): for each record of C2Scene_TaskRecords with a non-zero .Handler, sets C2Scene_TaskCur to it and calls the handler (C2Scene_TaskCallHandler)... - verified
C2Scene_TaskCallHandler$C2:0553 · 3 B · EngineJMP (C2Scene_TaskHandler): a JSR here calls the task's handler, which returns to C2Scene_TaskRunAll. - verified
C2Scene_LayerMetatiles$C2:0556 · 6 B · EnginePer BG layer 1-3 (index (layer - 1) * 2): where its metatile definitions are in bank $7E. - verified
C2Scene_LayerMaps$C2:055C · 6 B · EnginePer layer: where its map (96 x 64 metatile numbers, C2Scene_MapBytes) is in bank $7E. - verified
C2Scene_LayerVramMaps$C2:0562 · 6 B · EnginePer layer: the VRAM word address of its tilemap. - verified
C2Scene_Unk0568$C2:0568 · 260 B · EngineScrolls BG layer C2Scene_ScrollLayer horizontally by C2Scene_ScrollPx pixels (signed: negative moves the view left), one pixel per pass. - verified
C2Scene_Unk066C$C2:066C · 263 B · EngineC2Scene_Unk0568 for the vertical: scrolls the layer's C2Scene_Bg1VScroll + slot by C2Scene_ScrollPx pixels (negative: up), wrapping in 0-$3FF, with its tile Y (C2Scene_BgTileY + slot) in 0-127. - verified
C2Scene_EdgeColLeft$C2:0773 · 79 B · EngineBuilds one tile column of a layer edge into the buffer at C2Scene_VramQBufPtr: C2Scene_EdgeColTiles (30) tiles from the left half of metatile column C2Scene_EdgeCol, starting at metatile row... - verified
C2Scene_EdgeColRight$C2:07C2 · 79 B · EngineC2Scene_EdgeColLeft for the right half of the metatiles: .TopRight and .BottomRight. - verified
C2Scene_EdgeColSetup$C2:0811 · 50 B · EngineSets up a column build: C2Scene_EdgeMapOfs = C2Scene_EdgeRow * 96 (the row's offset in the map), C2Scene_EdgeMapPtr = the layer's map + C2Scene_EdgeCol, C2Scene_EdgeBuf = C2Scene_VramQBufPtr's... - verified
C2Scene_EdgeRowTop$C2:0843 · 76 B · EngineBuilds one tile row of a layer edge into the buffer at C2Scene_VramQBufPtr: C2Scene_EdgeRowTiles (34) tiles from the top half of metatile row C2Scene_EdgeRow, starting at metatile column... - verified
C2Scene_EdgeRowBottom$C2:088F · 76 B · EngineC2Scene_EdgeRowTop for the bottom half of the metatiles: .BottomLeft and .BottomRight. - verified
C2Scene_EdgeRowSetup$C2:08DB · 50 B · EngineSets up a row build: C2Scene_EdgeMapOfs = C2Scene_EdgeCol (the column), C2Scene_EdgeMapPtr = the layer's map + C2Scene_EdgeRow * 96, C2Scene_EdgeBuf = C2Scene_VramQBufPtr's address... - verified
C2Scene_QueueEdgeCol$C2:090D · 84 B · EngineQueues the column built at C2Scene_VramQBufPtr for VRAM: one C2Scene_VramQ entry of C2Scene_ColBufHalf bytes from bank $7E, VMAIN stepping 32 words, to tile column (C2Scene_EdgeCol / 8) AND 63 of... - verified
C2Scene_QueueEdgeRow$C2:0961 · 100 B · EngineQueues the row built at C2Scene_VramQBufPtr for VRAM as two C2Scene_VramQ entries of C2Scene_RowBufHalf bytes from bank $7E, VMAIN stepping one word: the buffer's first half to tile row... - verified
C2Scene_DrawBgLayer$C2:09C5 · 167 B · EngineRedraws the visible part of BG layer C2Scene_DrawLayer (1 or 2; the value is taken AND C2Scene_LayerMask) from the layer's tile position C2Scene_BgTileX/Y (word (layer - 1)): - the layer's scroll... - verified
C2Scene_BuildBgColumn$C2:0A6C · 66 B · EngineBuilds one tilemap column pair (two tile columns of 32 words) in the buffer at C2Scene_VramQBufPtr: C2Scene_DrawRows metatiles of map column C2Scene_DrawMapCol from row C2Scene_DrawMapRow down... - verified
C2Scene_DrawMetatile$C2:0AAE · 46 B · EnginePuts one metatile into the column buffer: the map byte at C2Scene_DrawMapColPtr + C2Scene_DrawMapRowOfs selects an 8-byte C2Scene_Metatile record; its .TopLeft and .BottomLeft go to the left tile... - verified
C2Scene_UploadBgColumn$C2:0ADC · 119 B · EngineDMAs the two tile columns built by C2Scene_BuildBgColumn to VRAM on channel 7, with VMAIN stepping 32 words (one tilemap row) per word: the left column to tile column C2Scene_DrawColX / 8 of the... - verified
C2Scene_SprAdd$C2:0B53 · 163 B · EngineTakes the first node off the free list and fills it from the running task (C2Scene_TaskCur): .X = .SprX, .Y = .SprY, .Tile = .SprTile, .Attr = .SprAttr, .Frame = C2Scene_SprFramePtr. - verified
C2Scene_SprInitLinks$C2:0BF6 · 87 B · EngineBuilds C2Scene_SprLinkInit, the .Prev/.Next pair of each node on a free list in address order: node 0's .Prev is C2Scene_SprFreeHead, node n's .Prev is node n-1 and its .Next node n+1, and node... - verified
C2Scene_SprResetLists$C2:0C4D · 157 B · EngineEmpties the sprite list for the new frame (from the NMI): the active head points at itself, the free head at node 0 (.Next) and node 63 (.Prev), and every node gets its .Prev/.Next back from... - verified
C2Scene_SprDrawList$C2:0CEA · 30 B · EngineDraws the active sprite list (from the NMI, after the tasks): calls C2Scene_SprDrawNode for each node from C2Scene_SprActiveHead's .Next until the walk comes back to the head. - verified
C2Scene_SprDrawNode$C2:0D08 · 261 B · EngineWrites the OAM entries of one sprite-list node X. - verified
C2Scene_OamHiBitsTable$C2:0E0D · 16 B · EngineThe OAM high-table bits of one sprite, indexed by (slot AND 3) * 4 + size * 2 + X bit 8: the 2-bit value size:Xbit8 shifted to the slot's place in its byte (C2Scene_SprDrawNode). - verified
C2Anim_Run$C2:0E1D · 45 B · EngineRuns the running task's animation script (.AnimPtr, .AnimBank) from where it stopped: calls the handler of each op from C2Anim_OpTable with C2Anim_Ptr on the opcode. - verified
C2Anim_OpTable$C2:0E4A · 16 B · EngineThe handler of each animation opcode 0-7 (C2Anim_Run: JSR (T,X) with X = the opcode * 2). - verified
C2Anim_OpClearByte$C2:0E5A · 17 B · EngineAnimation op 0, 2 bytes: zeroes the task's byte at offset arg 1 (any of the 64 record bytes, through C2Scene_TaskCur). - verified
C2Anim_OpIncByte$C2:0E6B · 19 B · EngineAnimation op 1, 2 bytes: adds 1 to the task's byte at offset arg 1. - verified
C2Anim_OpDecByte$C2:0E7E · 19 B · EngineAnimation op 2, 2 bytes: subtracts 1 from the task's byte at offset arg 1. - verified
C2Anim_OpJumpBack$C2:0E91 · 18 B · EngineAnimation op 3, 2 bytes: moves the script by the signed byte arg 1, counted from the opcode: A = the offset sign-extended. - verified
C2Anim_OpShowFrame$C2:0EA3 · 57 B · EngineAnimation op 4, 4 bytes: shows the sprite frame at arg 1-2 (an address in the script's bank) for arg 3 frames. - verified
C2Anim_OpWait$C2:0EDC · 36 B · EngineAnimation op 5, 2 bytes: waits arg 1 calls without drawing, counting in .AnimTimer as C2Anim_OpShowFrame does (0 loads it, then -1 per call; at 0 it advances 2 at once). - verified
C2Anim_OpQueueVram$C2:0F00 · 53 B · EngineAnimation op 6, 8 bytes: adds a VRAM DMA to the queue the NMI flushes (C2Scene_VramQ at C2Scene_VramQEnd): .Bank = arg 1, .Src = arg 2-3, .Dest = arg 4-5, .Size = arg 6-7, .Vmain =... - verified
C2Anim_OpEnd$C2:0F35 · 3 B · EngineAnimation op 7: stops (A = 0, Z=1) with C=1 and does not advance, so every later call stops here again. - verified
C2Scene_TaskMove$C2:0F38 · 43 B · EngineMoves the running task by its velocity, in 16.16 fixed point: .XFrac/.SprX += .XVelFrac/.XVel and .YFrac/.SprY += .YVelFrac/.YVel (inferred from the carry chain: the fraction words are added first... - verified
C2Scene_TaskRunScript$C2:0F63 · 46 B · EngineTask handler of the script tasks (C2Scene_TaskSpawnScript and C2Scene_TaskSpawnScriptLow install it); also called by other handlers (the party leader's and members' script states). - verified
C2Script_OpTable$C2:0F91 · 166 B · EngineThe handler of each script opcode $00-$52 (C2Scene_TaskRunScript: JSR (T,X) with X = the opcode * 2); a larger opcode is not checked for and would jump through the code after the table.
Bank $C2 · $C2:1000–$1FFF
$C2:1000
Verified · 111
- verified
C2Script_ResetTask$C2:1037 · 90 B · EngineOp $00, 1 byte: zeroes the task's record from +$05 on, except the script fields +$07-$0A: .ScriptReturn, the animation, the sprite fields, position and velocity and all words up to +$3F (16-bit... - verified
C2Script_SetSprPalette$C2:1091 · 23 B · EngineOp $01, 2 bytes: .SprAttr = .SprAttr AND $F1 OR arg 1: replaces bits 1-3, which C2Scene_SprDrawNode puts in the OAM palette bits. - verified
C2Script_SetSprPriority$C2:10A8 · 23 B · EngineOp $02, 2 bytes: .SprAttr = .SprAttr AND $4F OR arg 1: replaces bits 4 and 5 (the OAM priority bits) and bit 7 (C2Scene_SprAttrScroll). - verified
C2Script_SpawnUnk1CF5$C2:10BF · 14 B · EngineOp $03, 10 bytes: starts a C2Scene_TaskUnk1CF5 task (C2Scene_TaskSpawn, records 4-63), which copies this task's record, and advances 10. - verified
C2Script_SpawnUnk1DD4$C2:10CD · 51 B · EngineOp $04, 6 bytes: puts its arguments in this task's record, .Unk35 = arg 1-2, .Unk37 = arg 3, .OpState = arg 4 (high byte 0), .OpTarget = arg 5, and starts a C2Scene_TaskUnk1DD4 task, which copies... - verified
C2Script_GoToLocation$C2:1100 · 105 B · EngineOp $05, 5 bytes: sets up a location change in the field's location block (DP_Field) and selects scene mode C2Scene_ModeUnk2: - Loc_ReturnId = the current Loc_Id; Loc_ReturnX = BG2's tile X... - verified
C2Script_Halt$C2:1169 · 2 B · EngineOp $06: stops (A = 0, Z=1) without advancing, every frame: the script ends there but its task stays (C as C2Scene_TaskRunScript left it, 0 from its ASL). - verified
C2Script_SetMapCell$C2:116B · 71 B · EngineOp $07, 5 bytes: writes metatile number arg 4 into BG layer arg 1's map (C2Scene_LayerMaps, bank $7E) at column arg 2, row arg 3 (row * 96 + column, with the hardware multiplier). - verified
C2Script_SetMemberWord$C2:11B2 · 68 B · EngineOp $08, 4 bytes: stores the word arg 1-2 for character arg 3: at C2Scene_Unk1B41 for character 7, else at the C2Scene_MemberWords word of the party position (Party_Members) that holds that... - verified
C2Script_SpawnScript$C2:11F6 · 22 B · EngineOp $09, 4 bytes: starts another script task (C2Scene_TaskSpawnScript, records 4-63) on the script at arg 1-2 in bank arg 3. - verified
C2Script_ClearTaskByte$C2:120C · 17 B · EngineOp $0A, 2 bytes: task byte arg 1 = 0. - verified
C2Script_IncTaskByte$C2:121D · 19 B · EngineOp $0B, 2 bytes: task byte arg 1 + 1. - verified
C2Script_DecTaskByte$C2:1230 · 19 B · EngineOp $0C, 2 bytes: task byte arg 1 - 1. - verified
C2Script_SetTaskByte$C2:1243 · 20 B · EngineOp $0D, 3 bytes: task byte arg 1 = arg 2. - verified
C2Script_OrTaskByte$C2:1257 · 22 B · EngineOp $0E, 3 bytes: task byte arg 1 OR= arg 2 (sets those bits). - verified
C2Script_ClearTaskBits$C2:126D · 24 B · EngineOp $0F, 3 bytes: task byte arg 1 AND= NOT arg 2 (clears those bits). - verified
C2Script_ClearRamByte$C2:1285 · 17 B · EngineOp $10, 3 bytes: RAM byte at arg 1-2 = 0. - verified
C2Script_IncRamByte$C2:1296 · 17 B · EngineOp $11, 3 bytes: RAM byte at arg 1-2 + 1. - verified
C2Script_DecRamByte$C2:12A7 · 17 B · EngineOp $12, 3 bytes: RAM byte at arg 1-2 - 1. - verified
C2Script_SetRamByte$C2:12B8 · 22 B · EngineOp $13, 4 bytes: RAM byte at arg 1-2 = arg 3. - verified
C2Script_OrRamByte$C2:12CE · 25 B · EngineOp $14, 4 bytes: RAM byte at arg 1-2 OR= arg 3. - verified
C2Script_ClearRamBits$C2:12E7 · 27 B · EngineOp $15, 4 bytes: RAM byte at arg 1-2 AND= NOT arg 3. - verified
C2Script_TaskByteToRam$C2:1302 · 26 B · EngineOp $16, 4 bytes: RAM byte at arg 2-3 = task byte arg 1. - verified
C2Script_RamByteToTask$C2:131C · 26 B · EngineOp $17, 4 bytes: task byte arg 1 = RAM byte at arg 2-3. - verified
C2Script_CopyTaskByte$C2:1336 · 26 B · EngineOp $18, 3 bytes: task byte arg 1 = task byte arg 2. - verified
C2Script_CopyRamByte$C2:1350 · 26 B · EngineOp $19, 5 bytes: RAM byte at arg 1-2 = RAM byte at arg 3-4. - verified
C2Script_Jump$C2:136A · 11 B · EngineOp $1A, 3 bytes: C2Script_Ptr = arg 1-2 (an address in the script's bank), then advance 1, so the script goes on at arg 1-2 + 1. - verified
C2Script_LoopTaskByte$C2:1375 · 35 B · EngineOp $1B, 3 bytes: task byte arg 1 - 1; while it is not 0, branch by arg 2; at 0, advance 3 (a counted loop). - verified
C2Script_IfTaskByteZero$C2:1398 · 32 B · EngineOp $1C, 3 bytes: if task byte arg 1 is 0, branch by arg 2; else advance 3. - verified
C2Script_IfTaskByteNonZero$C2:13B8 · 32 B · EngineOp $1D, 3 bytes: if task byte arg 1 is not 0, branch by arg 2; else advance 3. - verified
C2Script_IfTaskByteNe$C2:13D8 · 36 B · EngineOp $1E, 4 bytes: if task byte arg 1 is not arg 2, branch by arg 3; else advance 4. - verified
C2Script_IfTaskByteEq$C2:13FC · 36 B · EngineOp $1F, 4 bytes: if task byte arg 1 is arg 2, branch by arg 3; else advance 4. - verified
C2Script_IfTaskBitsSet$C2:1420 · 36 B · EngineOp $20, 4 bytes: if task byte arg 1 AND arg 2 is not 0, branch by arg 3; else advance 4. - verified
C2Script_IfTaskBitsClear$C2:1444 · 37 B · EngineOp $21, 4 bytes: if task byte arg 1 AND arg 2 is 0, branch by arg 3; else advance 4. - verified
C2Script_IfRamByteZero$C2:1469 · 34 B · EngineOp $22, 4 bytes: if the RAM byte at arg 1-2 is 0, branch by arg 3; else advance 4. - verified
C2Script_IfRamByteNonZero$C2:148B · 34 B · EngineOp $23, 4 bytes: if the RAM byte at arg 1-2 is not 0, branch by arg 3; else advance 4. - verified
C2Script_IfRamByteNe$C2:14AD · 37 B · EngineOp $24, 5 bytes: if the RAM byte at arg 1-2 is not arg 3, branch by arg 4; else advance 5. - verified
C2Script_IfRamByteEq$C2:14D2 · 37 B · EngineOp $25, 5 bytes: if the RAM byte at arg 1-2 is arg 3, branch by arg 4; else advance 5. - verified
C2Script_IfRamBitsSet$C2:14F7 · 37 B · EngineOp $26, 5 bytes: if the RAM byte at arg 1-2 AND arg 3 is not 0, branch by arg 4; else advance 5. - verified
C2Script_IfRamBitsClear$C2:151C · 37 B · EngineOp $27, 5 bytes: if the RAM byte at arg 1-2 AND arg 3 is 0, branch by arg 4; else advance 5. - verified
C2Script_IfRamByteLess$C2:1541 · 37 B · EngineOp $4C, 5 bytes: if the RAM byte at arg 1-2 is below arg 3 (unsigned), branch by arg 4; else advance 5. - verified
C2Script_IfRamByteGe$C2:1566 · 37 B · EngineOp $4D, 5 bytes: if the RAM byte at arg 1-2 is arg 3 or more (unsigned), branch by arg 4; else advance 5. - verified
C2Script_SpawnUnk20A2$C2:158B · 14 B · EngineOp $28, 2 bytes: starts a C2Scene_TaskUnk20A2 task (C2Scene_TaskSpawn), which copies this record (and so this op's .ScriptPtr: probably it reads arg 1 from there; not traced). - verified
C2Script_SpawnUnk2105$C2:1599 · 14 B · EngineOp $29, 2 bytes: as C2Script_SpawnUnk20A2 with C2Scene_TaskUnk2105. - verified
C2Script_SpawnUnk21F8$C2:15A7 · 14 B · EngineOp $2A, 3 bytes: as C2Script_SpawnUnk20A2 with C2Scene_TaskUnk21F8. - verified
C2Script_SpawnUnk2194$C2:15B5 · 14 B · EngineOp $2B, 3 bytes: as C2Script_SpawnUnk20A2 with C2Scene_TaskUnk2194. - verified
C2Script_SetPosition$C2:15C3 · 28 B · EngineOp $2C, 5 bytes: .SprX = arg 1-2 and .SprY = arg 3-4, both fractions 0. - verified
C2Script_Skip1$C2:15DF · 4 B · EngineOp $2D, 2 bytes: does nothing and advances 2 (the byte after the opcode is skipped). - verified
C2Script_SetXVelocity$C2:15E3 · 22 B · EngineOp $2E, 5 bytes: .XVelFrac = arg 1-2, .XVel = arg 3-4. - verified
C2Script_SetYVelocity$C2:15F9 · 22 B · EngineOp $2F, 5 bytes: .YVelFrac = arg 1-2, .YVel = arg 3-4. - verified
C2Script_SetAnim$C2:160F · 14 B · EngineOp $30, 2 bytes: starts animation script arg 1 (C2Scene_SetAnim). - verified
C2Script_MoveFrames$C2:161D · 46 B · EngineOp $31, 2 bytes: for arg 1 frames, each frame moves the task by its velocity (C2Scene_TaskMove), wraps the position into the map (C2Scene_WrapTaskPos), runs its animation (C2Anim_Run) and stops... - verified
C2Script_ScrollFrames$C2:164B · 175 B · EngineOp $32, 2 bytes: scrolls BG layers 1 and 2 (and BG3) by the task's velocity for arg 1 frames, counted in .ScriptWait as C2Script_MoveFrames does. - verified
C2Script_ScrollLayerFrames$C2:16FA · 95 B · EngineOp $51, 3 bytes: C2Script_ScrollFrames for one layer, arg 1 (passed to C2Scene_Unk0568/066C as is), for arg 2 frames, and without BG3. - verified
C2Script_PanKeepFraction$C2:1759 · 43 B · EngineDrops the whole pixels from the task's position, keeping the fraction as a value in -1..+1: .SprX = -1 if it was negative with a non-zero .XFrac, else 0; the same for .SprY with .YFrac. - verified
C2Script_PanTakeX$C2:1784 · 39 B · EngineTells whether the X accumulator (.XFrac/.SprX) holds at least one whole pixel either way: C=1 with C2Tmp_01 = the low byte of .SprX (signed pixels), else C=0. - verified
C2Script_PanTakeY$C2:17AB · 39 B · EngineC2Script_PanTakeX for .YFrac/.SprY. - verified
C2Script_QueueVram$C2:17D2 · 53 B · EngineOp $33, 8 bytes: C2Anim_OpQueueVram's code on the script pointer: adds a VRAM DMA to the queue the NMI flushes (C2Scene_VramQ at C2Scene_VramQEnd): .Bank = arg 1, .Src = arg 2-3, .Dest = arg 4-5... - verified
C2Script_CallNear$C2:1807 · 21 B · EngineOp $34, 3 bytes: calls the routine at arg 1-2 in bank $C2 (JSR to .call, a JMP (C2Script_CallVec)) with M=1, then advances 3. - verified
C2Script_CallLong$C2:181C · 29 B · EngineOp $4E, 4 bytes: calls the routine at the long address arg 1-3 (JSL to .call, a JML [C2Script_CallVec]) with M=1; it returns with RTL. - verified
C2Script_SpawnTask$C2:1839 · 15 B · EngineOp $35, 3 bytes: starts a task with handler arg 1-2 (an address in bank $C2) in records 4-63 (C2Scene_TaskSpawn), which copies this task's record from +$05 on. - verified
C2Script_Call$C2:1848 · 23 B · EngineOp $36, 3 bytes: a subroutine call in the script: .ScriptReturn = the address of the next op, and the script continues at arg 1-2 (same bank): C2Script_Ptr = arg - 1 and A = 1, which... - verified
C2Script_Return$C2:185F · 12 B · EngineOp $37, 1 byte: returns from C2Script_Call: the script continues at .ScriptReturn (C2Script_Ptr = it - 1, A = 1). - verified
C2Script_Wait$C2:186B · 35 B · EngineOp $38, 2 bytes: waits arg 1 frames, counted in .ScriptWait as C2Script_MoveFrames counts: 0 loads it with arg 1 and stops, then -1 per frame; at 0 it advances 2. - verified
C2Script_WaitAnimating$C2:188E · 38 B · EngineOp $39, 2 bytes: C2Script_Wait, running the task's animation (C2Anim_Run) on each frame it waits. - verified
C2Script_StopIfOlder$C2:18B4 · 19 B · EngineOp $3A, 3 bytes: compares arg 1-2 with the task's age (.Frames, +1 per frame it has run). - verified
C2Script_SoundCmd18$C2:18C7 · 9 B · EngineOp $3B, 3 bytes: C2Script_PlaySfx with sound command C2Scene_SoundCmd18 instead of Audio_CmdPlaySfx: it sets the command byte and branches to C2Script_PlaySfx_SetArgs. - verified
C2Script_PlaySfx$C2:18D0 · 7 B · EngineOp $3C, 3 bytes: queues sound command Audio_CmdPlaySfx with arg 1 and arg 2 as its first two argument bytes (the third is left as it was) at rank 0 (C2Scene_QueueSoundCmd: it replaces any queued... - verified
C2Script_PlaySfx_SetArgs$C2:18D7 · 26 B · Engine - verified
C2Script_SoundCmd10IfClear$C2:18F1 · 8 B · EngineOp $3D, 2 bytes: C2Script_SoundCmd10 unless C2Scene_Unk7F01ED is non-zero: then it branches to C2Script_SoundCmd10_Done, which only advances 2. - verified
C2Script_SoundCmd10$C2:18F9 · 32 B · EngineOp $4A, 2 bytes: queues sound command C2Scene_SoundCmd10 with arg 1 and C2Scene_SoundArgUnused ($FF) as its other two argument bytes, at rank 0 (C2Scene_QueueSoundCmd), and also stores arg 1 in... - verified
C2Script_SoundCmd10_Done$C2:1919 · 6 B · Engine - verified
C2Script_SoundCmd$C2:191F · 40 B · EngineOp $4B, 5 bytes: queues the sound command arg 1 with argument bytes arg 2-4, at rank 0 (C2Scene_QueueSoundCmd). - verified
C2Script_DrawLayer$C2:1947 · 18 B · EngineOp $3E, 2 bytes: redraws BG layer arg 1 from its map (C2Scene_DrawBgLayer), e.g. - verified
C2Script_MoveToX$C2:1959 · 105 B · EngineOp $3F, 5 bytes: moves the task along X until .SprX = arg 1-2, at the speed of its X velocity. - verified
C2Script_MoveToY$C2:19C2 · 105 B · EngineOp $40, 5 bytes: C2Script_MoveToX along Y: target .SprY = arg 1-2, C2Scene_NegateYVel, animation arg 3 when going up (target above .SprY) and arg 4 when going down; .YFrac/.SprY += the Y velocity. - verified
C2Script_Halt2$C2:1A2B · 2 B · EngineOp $41, 1 byte: the same code as C2Script_Halt (op $06): stops (A = 0, Z=1) without advancing, every frame; the task stays. - verified
C2Script_SpawnScriptLow$C2:1A2D · 22 B · EngineOp $43, 4 bytes: C2Script_SpawnScript in records 0-3: starts a script task (C2Scene_TaskSpawnScriptLow) on the script at arg 1-2 in bank arg 3. - verified
C2Script_SpawnTaskLow$C2:1A43 · 15 B · EngineOp $42, 3 bytes: C2Script_SpawnTask in records 0-3 (C2Scene_TaskSpawnLow): handler arg 1-2. - verified
C2Script_SetListBit7$C2:1A52 · 30 B · EngineOp $44, 3 bytes: sets C2Scene_ListEntryBit7 in the first byte of entry arg 2 of list arg 1 (0 = C2Scene_ListA, 1 = ListB, 2 = ListC: the helper in C2Script_ListEntryTable leaves the entry's... - verified
C2Script_ListEntryTable$C2:1A70 · 6 B · EngineThe helper per list number (C2Script_SetListBit7 and C2Script_ClearListBit7: JSR (T,X) with X = the list * 2). - verified
C2Script_ListAEntry$C2:1A76 · 20 B · EngineC2Tmp_10/$11 = the 16-bit address of entry arg 2 of C2Scene_ListA (entry * 7, as entry * 8 - entry, + the list). - verified
C2Script_ListBEntry$C2:1A8A · 17 B · EngineC2Tmp_10/$11 = the address of entry arg 2 of C2Scene_ListB (entry * 3 + the list). - verified
C2Script_ListCEntry$C2:1A9B · 17 B · EngineC2Tmp_10/$11 = the address of entry arg 2 of C2Scene_ListC (entry * 3 + the list). - verified
C2Script_ClearListBit7$C2:1AAC · 30 B · EngineOp $45, 3 bytes: C2Script_SetListBit7, clearing the bit instead. - verified
C2Script_AddTaskByte$C2:1ACA · 23 B · EngineOp $46, 3 bytes: task byte arg 1 += arg 2 (8-bit, wrapping). - verified
C2Script_SubTaskByte$C2:1AE1 · 26 B · EngineOp $47, 3 bytes: task byte arg 1 -= arg 2 (8-bit, wrapping). - verified
C2Script_AddRamByte$C2:1AFB · 26 B · EngineOp $48, 4 bytes: RAM byte at arg 1-2 (through DB) += arg 3. - verified
C2Script_SubRamByte$C2:1B15 · 26 B · EngineOp $49, 4 bytes: RAM byte at arg 1-2 (through DB) -= arg 3. - verified
C2Script_CopyMapBlock$C2:1B2F · 177 B · EngineOp $4F, 9 bytes: copies a block of metatile numbers from one BG layer map to another place (C2Scene_BgMaps, bank $7E; 96 bytes per row): source layer arg 1 at column arg 2, row arg 3; destination... - verified
C2Script_DrawMetatile$C2:1BE0 · 161 B · EngineOp $50, 5 bytes: draws metatile arg 4 at cell (column arg 2, row arg 3) of BG layer arg 1's tilemap in VRAM, by queuing two VRAM DMAs of C2Scene_MetatileRowBytes each (C2Scene_VramQ): the... - verified
C2Script_End$C2:1C81 · 3 B · EngineOp $52, 1 byte: stops (A = 0, Z=1) with C=1, which ends the task when C2Scene_TaskRunScript is its handler (C2Scene_TaskRunAll frees it). - verified
C2Scene_NegateXVel$C2:1C84 · 26 B · EngineNegates the task's X velocity as one 32-bit value (.XVelFrac/.XVel: invert both words and add 1 with the carry), turning it around. - verified
C2Scene_NegateYVel$C2:1C9E · 26 B · EngineC2Scene_NegateXVel for .YVelFrac/.YVel. - verified
C2Scene_WrapTaskPos$C2:1CB8 · 34 B · EngineWraps the task's position into the scene map: .SprX gets C2Scene_MapWidthPx (1536, the 96 metatile columns) added when it is negative or taken off when it is that or more (once, so it assumes the... - verified
C2Scene_SetAnim$C2:1CDA · 27 B · EngineStarts animation script A (low byte) on the running task: .AnimPtr = entry A of C2SceneRom_AnimTable, .AnimBank = C2SceneRom_AnimBank (the table's own bank), .AnimTimer = 0. - verified
C2Scene_TaskUnk1CF5$C2:1CF5 · 13 B · EngineTask handler: runs the state in .State (C2Scene_UploadTask; the record's .Unk02, 0 from C2Scene_TaskSpawn) through C2Scene_UploadTileStates: 0 C2Scene_UploadTilesStart, 1 C2Scene_UploadTilesStep. - verified
C2Scene_UploadTileStates$C2:1D02 · 4 B · EngineThe state handlers of C2Scene_TaskUnk1CF5 (JMP (T,X) with X = .State * 2). - verified
C2Scene_UploadTilesStart$C2:1D06 · 70 B · EngineState 0: sets .State to 1 (a 16-bit INC, so +$03 would take a carry; it never does), then copies op $03's arguments from the spawning op (.OpPtr): .Src = arg 1-2, .SrcBank = arg 3, .Dest = arg 4-5... - verified
C2Scene_UploadTilesStep$C2:1D4C · 105 B · EngineState 1, each frame: queues the next part, min(.PerFrame, .Left) units of 32 bytes, as one VRAM DMA (C2Scene_VramQ: .Bank = .SrcBank, .Src = .Src, .Dest = .Dest, .Size = units * 32... - verified
C2Scene_ClearPalette$C2:1DB5 · 31 B · EngineZeroes C2Scene_PaletteBuf (512 B, $0920-$0B1F: every color black) and the 16 bytes after it, C2Scene_Unk0B20 ($0B20-$0B2F), a word at a time. - verified
C2Scene_TaskUnk1DD4$C2:1DD4 · 100 B · EngineTask handler (palette load). - verified
C2Scene_TaskPalFade$C2:1E38 · 9 B · EngineTask handler (palette fade, started by C2Scene_TaskUnk1DD4): runs .State through C2Scene_PalFadeStates: 0 C2Scene_PalFadeStart, 1 C2Scene_PalFadeStep, 2 C2Scene_PalFadeEnd. - verified
C2Scene_PalFadeStates$C2:1E41 · 6 B · EngineThe state handlers of C2Scene_TaskPalFade (X = .State * 2). - verified
C2Scene_PalFadeStart$C2:1E47 · 63 B · EngineState 0: .State = 1; counts itself in C2Scene_Unk0B20 for .ArgPalette; copies the arguments to .Palette, .Rate, .Src and .SrcBank (the step arrays will overwrite them); .Timer = 0, .Steps = 0... - verified
C2Scene_PalFadeStep$C2:1E86 · 47 B · EngineState 1, each frame: if C2Scene_Unk0B20 for the palette is not 1 (another palette task has started on it) it goes to C2Scene_PalFadeEnd (BNE into it) and the fade stops where it is. - verified
C2Scene_PalFadeEnd$C2:1EB5 · 11 B · EngineState 2 (and C2Scene_PalFadeStep's give-up): takes the task out of C2Scene_Unk0B20 for its palette and ends it (C=1). - verified
C2Scene_PalFadePlan$C2:1EC0 · 81 B · EnginePlans a fade: for each of the 16 colors, from the palette's current color (.Colors, through DB) to the new one (.Src/.SrcBank, long), sets the color's red, green and blue count bytes in .RedStep... - verified
C2Scene_PalFadePlanColor$C2:1F11 · 116 B · EngineFor one color: per channel (red: bits 0-4, green: bits 5-9, blue: bits 10-14), d = new - current (-31..31) gives the count byte: 0 when equal, d when rising, or C2Scene_FadeDownFlag OR (-d +... - verified
C2Scene_PalFadeApply$C2:1F85 · 71 B · EngineTakes one fade step on all 16 colors of the palette at .Colors: each color is read, stepped (C2Scene_PalFadeStepColor) and written back (through DB). - verified
C2Scene_PalFadeStepColor$C2:1FCC · 150 B · EngineOne fade step of one color (C2Scene_FadeCur): for each channel's count byte c (red, green, blue): 0 leaves the channel; a rising count moves the channel up one when C2Scene_PalFadeStepTable[c] is...
Bank $C2 · $C2:2000–$2FFF
$C2:2000
Verified · 82
- verified
C2Scene_PalFadeStepTable$C2:2062 · 64 B · EngineIndexed by a fade count 0-63 (C2Scene_PalFadeStepColor): 1 = move the channel this step (counts 32-63), 0 = not yet (0-31). - verified
C2Scene_TaskUnk20A2$C2:20A2 · 9 B · EngineTask handler (fade out, op $28): runs .State through C2Scene_FadeOutStates: 0 C2Scene_FadeOutStart, 1 C2Scene_FadeOutStep. - verified
C2Scene_FadeOutStates$C2:20AB · 4 B · EngineThe state handlers of C2Scene_TaskUnk20A2 (X = .State * 2). - verified
C2Scene_FadeOutStart$C2:20AF · 48 B · EngineState 0: if a fade-out already runs (C2Scene_FadeOutBusy) the task just ends. - verified
C2Scene_FadeOutStep$C2:20DF · 38 B · EngineState 1, each frame: once .Timer reaches .Rate it zeroes .Timer's low byte and takes C2Scene_Brightness down one. - verified
C2Scene_TaskUnk2105$C2:2105 · 9 B · EngineTask handler (fade in, op $29): runs .State through C2Scene_FadeInStates: 0 C2Scene_FadeInStart, 1 C2Scene_FadeInUnblank, 2 C2Scene_FadeInStep, 3 C2Scene_FadeInEnd. - verified
C2Scene_FadeInStates$C2:210E · 8 B · EngineThe state handlers of C2Scene_TaskUnk2105 (X = .State * 2). - verified
C2Scene_FadeInStart$C2:2116 · 60 B · EngineState 0: if any fade runs (C2Scene_Unk1BF6 non-zero) it ends through C2Scene_FadeInEnd. - verified
C2Scene_FadeInUnblank$C2:2152 · 29 B · EngineState 1: ends (C2Scene_FadeInEnd) if a fade-out has started. - verified
C2Scene_FadeInStep$C2:216F · 30 B · EngineState 2: ends (C2Scene_FadeInEnd) if a fade-out has started. - verified
C2Scene_FadeInEnd$C2:218D · 7 B · EngineState 3, and where the other fade-in states end: clears C2Scene_FadeInBusy and ends the task (C=1). - verified
C2Scene_TaskUnk2194$C2:2194 · 15 B · EngineTask handler (mosaic shrink, op $2B): runs .State through C2Scene_MosaicOutStates: 0 C2Scene_MosaicOutStart, 1 C2Scene_MosaicOutStep. - verified
C2Scene_MosaicOutStates$C2:21A3 · 4 B · EngineThe state handlers of C2Scene_TaskUnk2194 (X = .State * 2). - verified
C2Scene_MosaicOutStart$C2:21A7 · 47 B · EngineState 0: .State = 1; ORs op $2B's arg 1 into C2Scene_MosaicShadow (the BGs to apply it to, bits 0-3); arg 2 is the frames per step: 0 sets the size to 0 at once (keeping the BG bits) and ends. - verified
C2Scene_MosaicOutStep$C2:21D6 · 34 B · EngineState 1: once .Timer reaches .Rate, .Timer's low byte = 0 and the mosaic size (C2Scene_MosaicShadow bits 4-7) goes down one; when it is already 0 the task ends (C=1) instead. - verified
C2Scene_TaskUnk21F8$C2:21F8 · 13 B · EngineTask handler (mosaic grow, op $2A): runs .State through C2Scene_MosaicInStates: 0 C2Scene_MosaicInStart, 1 C2Scene_MosaicInStep. - verified
C2Scene_MosaicInStates$C2:2205 · 4 B · EngineThe state handlers of C2Scene_TaskUnk21F8 (X = .State * 2). - verified
C2Scene_MosaicInStart$C2:2209 · 47 B · EngineState 0: as C2Scene_MosaicOutStart (op $2A's arg 1 ORed into C2Scene_MosaicShadow, arg 2 the frames per step), but rate 0 sets the size to the largest (C2Scene_MosaicSizeMask: 16x16 blocks) at once. - verified
C2Scene_MosaicInStep$C2:2238 · 34 B · EngineState 1: once .Timer reaches .Rate, .Timer's low byte = 0 and the mosaic size goes up one; when that makes it the largest ($F0) the task ends (C=1). - verified
Trig_Cos1024$C2:225A · 4 B · EngineSigned sine or cosine of a 16-bit angle with 1024 steps per turn, read from !Rom_SineTable: A = sin(angle) × 255 (−255..+255; the table holds |sin| as one byte per step, negated for the second... - verified
Trig_Sin1024$C2:225E · 21 B · Engine - verified
C2Scene_Unk2273$C2:2273 · 4 B · EngineThe cosine of direction A (adds a quarter turn and falls into the sub-entry C2Scene_Unk2277, $C2:2277, the sine). - verified
C2Scene_Unk2277$C2:2277 · 38 B · Engine - verified
C2Scene_Unk229D$C2:229D · 144 B · EngineThe direction (0-255) from the point (C2Tmp_08, C2Tmp_0A) to the point (C2Tmp_0C, C2Tmp_0E) on the scene's wrapping map: each difference that is half the map or more (Y 512 of 1024, X 768 of 1536... - verified
C2Scene_ClearUnk1B30$C2:232D · 9 B · EngineZeroes the two bytes right after the task records, C2Scene_Unk1B30 and C2Scene_Unk1B31 (their use is not traced). - verified
C2Scene_Random$C2:2336 · 15 B · EngineReturns the next byte of RandomTable ($C0:FE00): the one at index C2Scene_Unk1B30, which then goes up by one (wrapping at 256). - verified
C2Scene_BoxesOverlap$C2:2345 · 99 B · EngineTests whether two boxes overlap. - verified
C2Scene_Main$C2:23A8 · 39 B · EngineThe scene mode's main program, entered once from BankC2_SceneBoot. - verified
C2Scene_MainLoop$C2:23CF · 12 B · Engine - verified
C2Scene_ModeTable$C2:23DB · 20 B · EngineC2Scene_MainLoop's handler for each C2Scene_Mode value 0-9. - verified
C2Scene_ModeIdle$C2:23EF · 19 B · EngineC2Scene_Mode 0, 1 and 7: if a sound command is pending (C2Scene_SoundCmdState), sends it with Audio_DriverCommand as C2Scene_WaitFrames does; then back to C2Scene_MainLoop. - verified
C2Scene_Mode3$C2:2402 · 211 B · EngineMode 3: acts on the C2Scene_ListA entry at byte offset C2Scene_Unk1B32 (probably an exit the player has reached): - its .Loc is C2Scene_ListANoLoc: starts the script whose address is word .EntryX... - verified
C2Scene_Mode2$C2:24D5 · 52 B · EngineMode 2 (set by script op $05) and the end of C2Scene_Mode3: leaves the scene. - verified
C2Scene_TurnAround$C2:2509 · 4 B · EngineFacing 0-3 -> the opposite facing (the facing EOR 1). - verified
C2Scene_Mode4$C2:250D · 17 B · EngineMode 4: interrupts, NMI, DMA and HDMA off, the flag tail copied back (C2Scene_RestoreFlagTail), and again, for good: it never leaves (probably waits for a reset; C2Scene_TrigListC sets mode 4). - verified
C2Scene_Mode5$C2:251E · 111 B · EngineModes 5 (C2Scene_ModeMenu) and 9: run the menu over the scene. - verified
C2Scene_Mode6$C2:258D · 144 B · EngineMode 6: runs C2Scene_MapView (it sets BG mode 7 and runs its own tasks until the mode changes from 6: probably a mode-7 view) between a mosaic fade out and in. - verified
C2Scene_Mode8$C2:261D · 139 B · EngineMode 8: runs C2Scene_Dial (it clears VRAM and the tasks itself) over a saved scene. - verified
C2Scene_ClearVram$C2:26A8 · 44 B · EngineZeroes all of VRAM with one DMA on channel 7: word writes to VMDATAL/H from the fixed source C2Scene_ZeroWord, VRAM address 0, a byte count of 0 (= 65536 bytes). - verified
C2Scene_ZeroWord$C2:26D4 · 2 B · EngineThe fixed DMA source of C2Scene_ClearVram. - verified
C2Scene_SaveFlagTail$C2:26D6 · 26 B · EngineCopies the last 16 bytes of Menu_FlagBlock7F ($7F:01F0-$01FF) to C2Scene_FlagTailCopy and its first byte (Eng_Unk7F0000) to C2Scene_Flag0Copy. - verified
C2Scene_RestoreFlagTail$C2:26F0 · 19 B · EngineCopies C2Scene_FlagTailCopy (16 bytes) back to $7F:01F0-$01FF, the end of Menu_FlagBlock7F (C2Scene_Flag0Copy is not written back). - verified
C2Scene_SetStartPos$C2:2703 · 29 B · EngineC2Scene_StartX/Y = the field's entry tile (Loc_EntryX/Y, in the field's direct page at $0100) times 8: probably the start position in pixels (inferred only from the scaling). - verified
C2Scene_SetStartScroll$C2:2720 · 45 B · EnginePuts the entry tile (Loc_EntryX/Y) in the middle of the screen: C2Scene_BgTileX (both words) = Loc_EntryX - 16, plus 192 if that is negative; C2Scene_BgTileY (both words) = Loc_EntryY - 14, plus... - verified
C2Scene_GetHeaderPtr$C2:274D · 27 B · EngineC2Scene_HeaderPtr = $C6:(the word of C2SceneRom_HeaderTable for scene (Loc_Id AND C2Scene_LocIdMask) - Loc_FirstBankC2). - verified
C2Scene_LoadObjGfx$C2:2768 · 84 B · EngineUnpacks the scene's C2Scene_ObjPackCount sprite graphics packs (header bytes C2Scene_HdrObjGfx..+3, C2SceneRom_ObjPacks) into C2Scene_DecompBuf, C2Scene_PackSlotSize bytes apart (C2Scene_LoadVram... - verified
C2Scene_LoadUnkC800$C2:27BC · 34 B · EngineUnpacks entry C2Scene_UnkC800Pack of C2SceneRom_ObjPacks (the same for every scene) to C2Scene_UnkC800 ($7E:C800); what it holds is not traced. - verified
C2Scene_LoadBgGfx$C2:27DE · 72 B · EngineUnpacks the scene's C2Scene_BgPackCount BG graphics packs (header bytes C2Scene_HdrBgGfx..+6, C2SceneRom_BgPacks) into C2Scene_DecompBuf, C2Scene_PackSlotSize bytes apart ($7F:9000-$FFFF... - verified
C2Scene_LoadBg3Gfx$C2:2826 · 46 B · EngineUnpacks header byte C2Scene_HdrBg3Gfx's C2SceneRom_BgPacks entry into C2Scene_DecompBuf (C2Scene_LoadVram DMAs it to the BG3 tiles at VRAM $7000). - verified
C2Scene_LoadBg3Map$C2:2854 · 46 B · EngineUnpacks header byte C2Scene_HdrBg3Map's C2SceneRom_Bg3MapPacks entry into C2Scene_DecompBuf (C2Scene_LoadVram DMAs it to the BG3 tilemap at VRAM $7800). - verified
C2Scene_LoadPalettes$C2:2882 · 107 B · EngineUnpacks the scene's palettes (header byte C2Scene_HdrPalettes, C2SceneRom_PalettePacks) into C2Scene_PaletteStage, then the party palettes (entry C2Scene_PartyPalPack) into C2Scene_PartyPalSrc... - verified
C2Scene_CopyPartyPalette$C2:28ED · 21 B · EngineCopies C2Scene_PartyPalSize bytes of character A's palette (C2Scene_PartyPalSrc + 32 * A) to Y in bank $7F. - verified
C2Scene_LoadUnkB800$C2:2902 · 46 B · EngineUnpacks header byte C2Scene_HdrUnkB800's C2SceneRom_BgPacks entry into C2Scene_UnkB800 ($7E:B800); what it holds is not traced. - verified
C2Scene_LoadUnkC000$C2:2930 · 46 B · EngineUnpacks header byte C2Scene_HdrUnkC000's C2SceneRom_PalettePacks entry into C2Scene_UnkC000 ($7E:C000); what it holds is not traced (probably more palettes, from the table it uses). - verified
C2Scene_LoadMetatiles$C2:295E · 46 B · EngineUnpacks header byte C2Scene_HdrMetatiles's C2SceneRom_MetatilePacks entry into C2Scene_Metatiles ($7E:3000), the metatile set of layer 1 (and probably of layer 2 at $7E:3800; see... - verified
C2Scene_LoadBgMaps$C2:298C · 46 B · EngineUnpacks header byte C2Scene_HdrMaps's C2SceneRom_MapPacks entry into C2Scene_BgMaps ($7E:4000), layer 1's metatile map (and probably layer 2's at $7E:5800; see C2Scene_LayerMaps). - verified
C2Scene_LoadUnk7000$C2:29BA · 46 B · EngineUnpacks header byte C2Scene_HdrUnk7000's C2SceneRom_Unk7000Packs entry into C2Scene_Unk7000 ($7E:7000), which is where C2Scene_LayerMaps puts layer 3's map; what it holds is not traced. - verified
C2Scene_LoadUnk7200$C2:29E8 · 46 B · EngineUnpacks header byte C2Scene_HdrUnk7200's C2SceneRom_Unk7200Packs entry into C2Scene_Unk7200 ($7E:7200); what it holds is not traced. - verified
C2Scene_LoadScript$C2:2A16 · 46 B · EngineUnpacks header byte C2Scene_HdrScript's C2SceneRom_ScriptPacks entry into C2Scene_ScriptBuf ($7F:0400), over the list data C2Scene_LoadLists has already split up. - verified
C2Scene_LoadLists$C2:2A44 · 285 B · EngineUnpacks header byte C2Scene_HdrLists's C2SceneRom_ListPacks entry into C2Scene_ListPack ($7F:0400), then splits it into four lists through WMADD/WMDATA (bank $7E): a count byte, then that many... - verified
C2Scene_LoadPartyGfx$C2:2B61 · 91 B · EngineUnpacks the party graphics (C2SceneRom_ObjPacks entry C2Scene_PartyObjPack, the same for every scene) into C2Scene_DecompBuf, then builds C2Scene_PartyGfx from it: for each party member... - verified
C2Scene_CopyPartyGfx$C2:2BBC · 19 B · EngineCopies C2Scene_PartyGfxSize bytes of character A's graphics (C2Scene_DecompBuf + $400 * A) to Y in bank $7F. - verified
C2Scene_CopyPartyGfxB$C2:2BCF · 44 B · EngineCopies character A's two C2Scene_PartyGfxBSize-byte blocks (C2Scene_PartyGfxSrcB + $40 * A, and C2Scene_PartyGfxBGap bytes further) to Y and Y + C2Scene_PartyGfxBGap in bank $7F. - verified
C2Scene_ClearHdmaArea$C2:2BFB · 34 B · EngineZeroes C2Scene_HdmaArea ($7E:8621-$8E20, 2048 bytes) through WMADD/WMDATA, with DP = $2100 for the register stores. - verified
C2Scene_LoadScene$C2:2C1D · 118 B · EngineThe last setup step of C2Scene_Main: loads the scene and starts its script. - verified
C2Scene_ReloadScene$C2:2C93 · 46 B · EngineLoads the scene's graphics again (scene modes 5 and 8 call it after C2Scene_RestoreState and C2Scene_VramQInit; mode 8 skips it when $7F:01F4 AND $0A or $7F:01F5 AND $02 is non-zero ($C2:265E)... - verified
C2Scene_LoadVram$C2:2CC1 · 175 B · EngineFills VRAM and CGRAM for the scene, each pack staged at C2Scene_DecompBuf and DMAed with C2Scene_DmaToVram: - the four sprite packs (C2Scene_LoadObjGfx) to VRAM $0000 ($4000 B); - the party... - verified
C2Scene_DmaToVram$C2:2D70 · 33 B · EngineDMAs A bytes from X in bank $7F to VRAM word address Y on channel 7 (word writes to VMDATAL/H, VMAIN stepping after the high byte). - verified
C2Scene_LoadLocExtraGfx$C2:2D91 · 146 B · EngineOnce Eng_Unk7F0000 has reached C2Scene_ExtraGfxFlagMin, four scenes get extra graphics: C2Scene_LoadExtraObjPack, then C2Scene_ExtraObjBytes of it DMAed to VRAM $0C00 (Loc_Id $01F0-$01F2) or $0000... - verified
C2Scene_SaveState$C2:2E23 · 79 B · EngineCopies the scene's state to bank $7F with MVN: dp $00-$EF to C2Scene_SaveDp; $0700-$1DFF (with C2Scene_PaletteBuf and the task records) to C2Scene_SaveLowRam; the sprite nodes, link table and list... - verified
C2Scene_RestoreState$C2:2E72 · 79 B · EngineThe reverse of C2Scene_SaveState: copies the six saved blocks from bank $7F back where they came from (the direct page $00-$EF included). - verified
C2Scene_ScrFadeOut$C2:2EC1 · 3 B · EngineFade out at 1 frame per step (op $28, C2Scene_TaskUnk20A2), then end. - verified
C2Scene_ScrFadeIn$C2:2EC4 · 3 B · EngineFade in at 1 frame per step (op $29, C2Scene_TaskUnk2105), then end. - verified
C2Scene_ScrMosaicFadeOut$C2:2EC7 · 9 B · EngineStarted by C2Scene_Mode6: clears the task's fields (op $00), starts a mosaic grow (op $2A) on BG1-3 (arg 1 = 7) at 2 frames per step, waits 16 frames, fades out at 1 frame per step, ends. - verified
C2Scene_ScrMosaicFadeIn$C2:2ED0 · 9 B · EngineStarted by C2Scene_Mode6 on the way back: clears the task's fields, fades in at 1 frame per step, waits 8 frames, starts a mosaic shrink (op $2B) on BG1-3 at 2 frames per step, ends. - verified
C2Scene_QueueSoundCmd$C2:2ED9 · 54 B · EngineQueues the sound command in C2Scene_SoundCmdBuf (command byte and three argument bytes) for the frame loop to send: copies it to the driver block Audio_CmdId-Audio_CmdArg2, keeps its rank... - verified
C2Scene_ZoneSoundAtEntry$C2:2F0F · 63 B · EngineSends C2Scene_SoundCmd10 straight to the driver (Audio_DriverCommand) with the zone sound of the field's entry tile: metatile column Loc_EntryX / 2, row Loc_EntryY / 2 (C2Scene_GetSoundZone... - verified
C2Scene_ZoneSoundAtView$C2:2F4E · 70 B · EngineQueues (C2Scene_QueueSoundCmd) C2Scene_SoundCmd10 with the zone sound of the metatile at the middle of BG1's view: column BgTileX / 2 + 8, row (BgTileY / 2 + 7) AND 63; or with Menu_Config1E's... - verified
C2Scene_TaskZoneSound$C2:2F94 · 9 B · EngineTask handler: runs .State through C2Scene_ZoneSoundStates. - verified
C2Scene_ZoneSoundStates$C2:2F9D · 8 B · EngineC2Scene_TaskZoneSound's handler for each .State. - verified
C2Scene_ZoneSoundInit$C2:2FA5 · 9 B · EngineState 0: .State = 1, C2Scene_SoundZone = C2Scene_ZoneNone; falls into C2Scene_ZoneSoundWatch. - verified
C2Scene_ZoneSoundWatch$C2:2FAE · 142 B · EngineState 1, every frame: - while C2Scene_Unk7F01ED is set: queues C2Scene_SoundCmd10 with Menu_Config1E's byte at rank 0 (again each frame; C2Scene_Unk02AE takes it when queued); - else, only in an...
Bank $C2 · $C2:3000–$3FFF
$C2:3000
Verified · 112
- verified
C2Scene_ZoneSoundWait$C2:303C · 19 B · EngineState 2: once .Timer's low byte (zeroed by C2Scene_ZoneSoundWatch, then one more each frame from C2Scene_TaskRunAll) reaches C2Scene_ZoneFadeFrames: .State = 3 and the new zone's sound is queued... - verified
C2Scene_ZoneSoundResume$C2:304F · 39 B · EngineState 3: unless a command is being sent (C2Scene_SoundCmdState negative), queues C2Scene_SoundCmd81 with 0, C2Scene_SoundArgUnused, C2Scene_SoundArgUnused at rank 0 and sets .State back to 1... - verified
C2Scene_ZoneSoundQueue$C2:3076 · 40 B · EngineQueues C2Scene_SoundCmd10 with the sound of zone C2Scene_SoundZone (C2Scene_ZoneSounds), argument bytes 2-3 C2Scene_SoundArgUnused and C2Scene_SoundArg80, at rank 0; when queued, the sound goes to... - verified
C2Scene_ObjWatch$C2:309E · 35 B · EngineWhile C2Scene_Mode is 0 or 1 and C2Scene_TrigWatch is in its check state (C2Scene_Unk0280 = 0): copies C2Scene_Unk027E to C2Scene_Unk027F and runs its state through C2Scene_ObjWatchStates. - verified
C2Scene_ObjWatchStates$C2:30C1 · 12 B · EngineC2Scene_ObjWatch's handler for each C2Scene_Unk027E state 0-5. - verified
C2Scene_ObjWatchIdle$C2:30CD · 219 B · EngineState 0. - verified
C2Scene_ScrGoToLoc1D8$C2:31A8 · 10 B · EngineScene script (C2Scene_TaskRunScript) started by C2Scene_ObjWatchIdle: fade out, wait, then leave for location $1D8 (op $05 argument word $03D8: Loc_Id $1D8, entry facing 1) at tile (7, 8). - verified
C2Scene_ObjWatchNone$C2:31B2 · 2 B · EngineState 1, and C2Scene_ObjSel 0 and 1 in C2Scene_ObjFullTable and C2Scene_ObjEmptyTable (shared label): nothing; C=0. - verified
C2Scene_ObjWatchBusyA$C2:31B4 · 14 B · EngineStates 2 and 3: wait until object A's (C2Scene_Unk0294) or object B's (C2Scene_ObjBFlags) C2Scene_ObjBusy bit is clear, then state C2Scene_ObjWatchStEmpty. - verified
C2Scene_ObjWatchBusyB$C2:31C2 · 14 B · Engine - verified
C2Scene_ObjWatchFull$C2:31D0 · 34 B · EngineState 4: counts the party members in C2Scene_PartyCount (each Party_Members byte with bit 7 clear; bit 7 is taken to mean an empty slot) and runs C2Scene_ObjSel through C2Scene_ObjFullTable: for... - verified
C2Scene_ObjFullTable$C2:31F2 · 8 B · EngineC2Scene_ObjWatchFull's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_ObjFullNone$C2:31FA · 2 B · EngineNo object selected: nothing; C=0. - verified
C2Scene_ObjFullA$C2:31FC · 16 B · EngineObject A's (C2Scene_Unk0294) or B's (C2Scene_ObjBFlags) count equal to C2Scene_PartyCount: state C2Scene_ObjWatchStBusyA or C2Scene_ObjWatchStBusyB. - verified
C2Scene_ObjFullB$C2:320C · 16 B · Engine - verified
C2Scene_ObjWatchEmpty$C2:321C · 8 B · EngineState 5: runs C2Scene_ObjSel through C2Scene_ObjEmptyTable: when the selected object's count is 0, back to state C2Scene_ObjWatchStIdle with no object selected. - verified
C2Scene_ObjEmptyTable$C2:3224 · 8 B · EngineC2Scene_ObjWatchEmpty's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_ObjEmptyNone$C2:322C · 2 B · EngineNo object selected: nothing; C=0. - verified
C2Scene_ObjEmptyA$C2:322E · 15 B · EngineObject A's (C2Scene_Unk0294) or B's (C2Scene_ObjBFlags) count at 0: C2Scene_Unk027E = C2Scene_ObjWatchStIdle and C2Scene_ObjSel = 0. - verified
C2Scene_ObjEmptyB$C2:323D · 15 B · Engine - verified
C2Scene_PartyBox$C2:324C · 8 B · EngineC2Scene_BoxesOverlap extents (left, right, up, down) of the party in C2Scene_ObjWatchIdle: 8 each way. - verified
C2Scene_ObjABox$C2:3254 · 8 B · EngineExtents of object A: only 8 down from its position. - verified
C2Scene_ObjBBox$C2:325C · 8 B · EngineExtents of object B: the same as object A's. - verified
C2Scene_TrigWatch$C2:3264 · 17 B · EngineCopies its state C2Scene_Unk0280 to C2Scene_Unk0281 and runs it through C2Scene_TrigWatchStates (0: C2Scene_TrigWatchCheck, C2Scene_TrigStWait: C2Scene_TrigWatchWait). - verified
C2Scene_TrigWatchStates$C2:3275 · 4 B · EngineC2Scene_TrigWatch's handler for each C2Scene_Unk0280 state. - verified
C2Scene_TrigWatchCheck$C2:3279 · 62 B · EngineState 0. - verified
C2Scene_TrigWatchWait$C2:32B7 · 22 B · EngineState C2Scene_TrigStWait (set when a ListB script starts): once C2Scene_Unk1B43 is non-zero, back to state 0 with the three C2Scene_Unk1B32 words at C2Scene_Unk1B32Init. - verified
C2Scene_FindTrigEntries$C2:32CD · 124 B · EngineFor C2Scene_ListA, ListB and ListC in turn: the byte offset of the first entry that has C2Scene_ListEntryBit7 set and whose first word AND C2Scene_ListTileMask equals C2Scene_TrigTile, or... - verified
C2Scene_TrigDispatch$C2:3349 · 53 B · EngineZeroes C2Scene_Unk1B58, builds C2Scene_TrigFound from which of the three C2Scene_Unk1B32 words is not C2Scene_NoEntry (bit 7 of the high byte clear): C2Scene_TrigFoundA (ListA), C2Scene_TrigFoundC... - verified
C2Scene_TrigActions$C2:337E · 16 B · EngineC2Scene_TrigDispatch's action for each C2Scene_TrigFound mask: ListB wins over ListA's task byte, ListA over ListC's mode. - verified
C2Scene_TrigNone$C2:338E · 1 B · EngineNo entry at the tile: nothing. - verified
C2Scene_TrigListA$C2:338F · 11 B · EngineA ListA entry (and no ListB one): the current task's .Unk02 (C2Scene_TaskCur) = C2Scene_TrigTaskState1, and the entry's .Unk02 to C2Scene_Unk1B58 (C2Scene_GetListAUnk02). - verified
C2Scene_TrigListC$C2:339A · 16 B · EngineA ListC entry only: the current task's .Unk02 = C2Scene_TrigTaskState1, a ListC byte to C2Scene_Unk1B47 (C2Scene_GetListCUnk03), and scene mode C2Scene_ModeHalt (C2Scene_Mode4, which never leaves). - verified
C2Scene_TrigListB$C2:33AA · 42 B · EngineA ListB entry (and no ListA one): starts its C2Scene_ListD script (C2Scene_GetListBScript; bank $7F, as C2Scene_Mode3 does), zeroes C2Scene_MemberWords, clears the entry's C2Scene_ListEntryBit7... - verified
C2Scene_TrigListAB$C2:33D4 · 48 B · EngineA ListA and a ListB entry: the ListA entry's .Unk02 to C2Scene_Unk1B58 (C2Scene_GetListAUnk02), then as C2Scene_TrigListB, and C2Scene_Unk1B43 = 0. - verified
C2Scene_LeaderTask$C2:3404 · 41 B · EngineTask handler. - verified
C2Scene_LeaderStates$C2:342D · 12 B · EngineC2Scene_LeaderTask's handler for each C2Scene_Unk027E state 0-5. - verified
C2Scene_LeaderWalk$C2:3439 · 36 B · EngineObjWatch state 0. - verified
C2Scene_LeaderWalkSteps$C2:345D · 16 B · EngineC2Scene_LeaderWalk's handler per C2Scene_Unk0280 state (4 words each) and .State. - verified
C2Scene_LeaderOnObjA$C2:346D · 12 B · EngineObjWatch state 2 (C2Scene_ObjWatchStBusyA): the party's position C2Scene_StartX/Y = object A's (C2Scene_ObjAX/Y), every frame; then falls into C2Scene_LeaderNone. - verified
C2Scene_LeaderNone$C2:3479 · 2 B · EngineObjWatch state 1, and the end of C2Scene_LeaderOnObjA: nothing; C=0. - verified
C2Scene_LeaderOnObjB$C2:347B · 14 B · EngineObjWatch state 3 (C2Scene_ObjWatchStBusyB): as C2Scene_LeaderOnObjA with object B (C2Scene_ObjBX/Y). - verified
C2Scene_LeaderBoard$C2:3489 · 10 B · EngineObjWatch state 4 (C2Scene_ObjWatchStFull): runs entry .State of C2Scene_LeaderBoardSteps (walk to the selected object, then count in). - verified
C2Scene_LeaderBoardSteps$C2:3493 · 8 B · EngineC2Scene_LeaderBoard's handler for .State 0-3. - verified
C2Scene_LeaderLeave$C2:349B · 8 B · EngineObjWatch state 5 (C2Scene_ObjWatchStEmpty): runs entry C2Scene_ObjSel of C2Scene_LeaderLeaveTable. - verified
C2Scene_LeaderLeaveTable$C2:34A3 · 8 B · EngineC2Scene_LeaderLeave's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_LeaderLeaveNone$C2:34AB · 2 B · EngineNo object selected: nothing; C=0. - verified
C2Scene_LeaderLeaveA$C2:34AD · 32 B · EngineLeaving object A (B): .State = 0, the sprite and C2Scene_StartX/Y at the object's position (C2Scene_ObjAX/Y, C2Scene_ObjBX/Y), one off the object's flags byte (C2Scene_Unk0294, C2Scene_ObjBFlags... - verified
C2Scene_LeaderLeaveB$C2:34CD · 43 B · Engine - verified
C2Scene_LeaderInit$C2:34F8 · 111 B · EngineStep 0 of TrigWatch state 0: sets the sprite up and falls into C2Scene_LeaderInput. - verified
C2Scene_LeaderInput$C2:3567 · 390 B · EngineStep 1 of TrigWatch state 0: reads the held buttons (Pad_Unk00F8 and the D-pad in Pad_Unk00F9) in scene mode C2Scene_ModeIdle1 only (in mode 0 it only animates). - verified
C2Scene_LeaderStep$C2:36ED · 133 B · EngineStep 2 of TrigWatch state 0, one frame of a step: moves the sprite (C2Scene_TaskMove, C2Scene_WrapTaskPos); scrolls BG layers 1 and 2 by .XVel pixels across (C2Scene_Unk0568) and by .YVel pixels... - verified
C2Scene_LeaderScriptStart$C2:3772 · 47 B · EngineStep 0 of TrigWatch state C2Scene_TrigStWait: while the first C2Scene_MemberWords word is 0, nothing. - verified
C2Scene_LeaderScriptRun$C2:37A1 · 26 B · EngineStep 1 of TrigWatch state C2Scene_TrigStWait: runs the script (C2Scene_TaskRunScript); when it ends (C=1) .State = 2 instead of the task ending. - verified
C2Scene_LeaderScriptDone$C2:37BB · 2 B · EngineStep 2 of TrigWatch state C2Scene_TrigStWait (the script has ended): nothing until a watcher's state changes; C=0. - verified
C2Scene_LeaderBoardStart$C2:37BD · 13 B · EngineStep 0 of ObjWatch state 4: the target (.TargetX/Y) = the selected object's position (C2Scene_ObjAX/Y or C2Scene_ObjBX/Y, by C2Scene_ObjSel through C2Scene_LeaderBoardTargets); the four velocity... - verified
C2Scene_LeaderBoardTargets$C2:37CA · 8 B · EngineC2Scene_LeaderBoardStart's code for C2Scene_ObjSel 0-3. - verified
C2Scene_LeaderBoardSel0$C2:37D2 · 4 B · Engine - verified
C2Scene_LeaderBoardSel1$C2:37D6 · 2 B · Engine - verified
C2Scene_LeaderBoardObjA$C2:37D8 · 16 B · Engine - verified
C2Scene_LeaderBoardObjB$C2:37E8 · 79 B · Engine - verified
C2Scene_LeaderBoardY$C2:3837 · 142 B · EngineStep 1 of ObjWatch state 4: moves the sprite (C2Scene_TaskMove, C2Scene_WrapTaskPos); C2Scene_StartX/Y and Loc_EntryX/Y from the position (C2Scene_SetEntryTile); BG layers 1 and 2 scrolled by... - verified
C2Scene_LeaderBoardX$C2:38C5 · 85 B · EngineStep 2 of ObjWatch state 4: moves the sprite (C2Scene_TaskMove, C2Scene_WrapTaskPos); at the target's X, .State = 3 and the object's count goes up by one (C2Scene_ObjCountUp). - verified
C2Scene_LeaderBoardDone$C2:391A · 2 B · EngineStep 3 of ObjWatch state 4 (counted in): nothing; C=0. - verified
C2Scene_TrailFill$C2:391C · 24 B · EngineFills all C2Scene_TrailLen entries of C2Scene_TrailX/Y with C2Scene_StartX/Y. - verified
C2Scene_TrailPush$C2:3934 · 31 B · EngineStores the task's .SprX/.SprY at C2Scene_TrailPos in C2Scene_TrailX/Y and moves C2Scene_TrailPos one word on (wrapping after 16). - verified
C2Scene_SetWalkAnim$C2:3953 · 44 B · EngineStarts the walk animation of the task's facing: entry .Facing * 2 (bit 7 shifted out) + .Unk26 bit 0 of C2Scene_WalkAnims, C2Scene_AltAnimOfs further on when C2Scene_AnimChar is... - verified
C2Scene_WalkAnims$C2:397F · 8 B · EngineWalk animation numbers (C2Scene_SetAnim), two per facing: up, down, left, right. - verified
C2Scene_SetStandAnim$C2:3987 · 35 B · EngineStarts the stand animation of the task's facing: entry .Facing AND C2Scene_FacingMask of C2Scene_StandAnims, C2Scene_AltAnimOfs further on for C2Scene_AltAnimChar, as C2Scene_SetWalkAnim. - verified
C2Scene_StandAnims$C2:39AA · 4 B · EngineStand animation numbers per facing: up, down, left, right. - verified
C2Scene_OnTrigTiles$C2:39AE · 21 B · EngineC=1 when both upper property nibbles (.PropUL, .PropUR) have bit 2 set (C2Scene_TilePropTrig); the leader's callers then set C2Scene_TrigRecheck and C2Scene_TrigKeep, and C2Scene_ObjBFly does not... - verified
C2Scene_TileBlocked$C2:39C3 · 18 B · EngineC=1 when either upper property nibble (.PropUL, .PropUR) has bit 0 or 1 set (C2Scene_TilePropWall): the step is not taken. - verified
C2Scene_GetTileProps$C2:39D5 · 129 B · EngineReads the property nibbles of the four 8x8 tiles around the pixel point (C2Scene_PropX, C2Scene_PropY) into the task's .PropUL-.PropDR (C2Scene_GetTileProp, with BG2's metatile map at $7E:5800 and... - verified
C2Scene_SetStepTarget$C2:3A56 · 57 B · Engine.TargetX/Y = the task's position, moved C2Scene_TilePx (8) pixels in the direction of each non-zero whole-pixel velocity (.XVel, .YVel; minus for a negative one). - verified
C2Scene_WrapStepTarget$C2:3A8F · 34 B · EngineWraps .TargetX/Y into the scene map as C2Scene_WrapTaskPos does the position: X + or - C2Scene_MapWidthPx (once), Y AND C2Scene_MapHeightMask. - verified
C2Scene_ObjCountUp$C2:3AB1 · 9 B · EngineAdds one to the selected object's flags byte (its count, C2Scene_ObjCountMask): C2Scene_Unk0294 for C2Scene_ObjSelA, C2Scene_ObjBFlags for C2Scene_ObjSelB, nothing for 0 and 1. - verified
C2Scene_ObjCountUpTable$C2:3ABA · 8 B · EngineC2Scene_ObjCountUp's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_ObjCountUpNone$C2:3AC2 · 1 B · Engine - verified
C2Scene_ObjCountUpA$C2:3AC3 · 4 B · Engine - verified
C2Scene_ObjCountUpB$C2:3AC7 · 4 B · Engine - verified
C2Scene_SetEntryTile$C2:3ACB · 23 B · EngineLoc_EntryX/Y = C2Scene_StartX/Y / 8 (the party's 8x8 tile; the inverse of C2Scene_SetStartPos). - verified
C2Scene_MemberTask$C2:3AE2 · 45 B · EngineTask handler. - verified
C2Scene_MemberStates$C2:3B0F · 12 B · EngineC2Scene_MemberTask's handler for each C2Scene_Unk027E state 0-5. - verified
C2Scene_MemberWalk$C2:3B1B · 61 B · EngineObjWatch state 0. - verified
C2Scene_MemberWalkSteps$C2:3B58 · 16 B · EngineC2Scene_MemberWalk's handler per C2Scene_Unk0280 state (4 words each) and .State. - verified
C2Scene_MemberNone$C2:3B68 · 2 B · EngineObjWatch states 1-3: nothing (the member stays where it is while the object is busy); C=0. - verified
C2Scene_MemberBoard$C2:3B6A · 10 B · EngineObjWatch state 4 (C2Scene_ObjWatchStFull): runs entry .State of C2Scene_MemberBoardSteps. - verified
C2Scene_MemberBoardSteps$C2:3B74 · 8 B · EngineC2Scene_MemberBoard's handler for .State 0-3. - verified
C2Scene_MemberLeave$C2:3B7C · 8 B · EngineObjWatch state 5 (C2Scene_ObjWatchStEmpty): runs entry C2Scene_ObjSel of C2Scene_MemberLeaveTable. - verified
C2Scene_MemberLeaveTable$C2:3B84 · 8 B · EngineC2Scene_MemberLeave's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_MemberLeaveNone$C2:3B8C · 2 B · EngineNo object selected: nothing; C=0. - verified
C2Scene_MemberLeaveA$C2:3B8E · 26 B · EngineLeaving object A: .State = 0, the sprite at C2Scene_ObjAX/Y, one off C2Scene_Unk0294 (the object's count), every frame of the state, as C2Scene_LeaderLeaveA but without C2Scene_StartX/Y, .Unk26... - verified
C2Scene_MemberLeaveB$C2:3BA8 · 26 B · EngineC2Scene_MemberLeaveA for object B (C2Scene_ObjBX/Y, C2Scene_ObjBFlags). - verified
C2Scene_MemberInit$C2:3BC2 · 119 B · EngineStep 0 of TrigWatch state 0: sets the sprite up and falls into C2Scene_MemberFollow. - verified
C2Scene_MemberFollow$C2:3C39 · 161 B · EngineStep 1 of TrigWatch state 0: decides the next move. - verified
C2Scene_MemberMoveX$C2:3CDA · 97 B · EngineStep 2 of TrigWatch state 0, a leg in X. - verified
C2Scene_MemberMoveY$C2:3D3B · 97 B · EngineStep 3 of TrigWatch state 0: C2Scene_MemberMoveX with the axes swapped (.SprY, .TargetY; the next leg is in X: .State 2, C2Scene_MemberXLeg). - verified
C2Scene_MemberScriptStart$C2:3D9C · 37 B · EngineStep 0 of TrigWatch state C2Scene_TrigStWait: as C2Scene_LeaderScriptStart with the member's own word, C2Scene_MemberWords + .Slot * 2 (no tile property read here). - verified
C2Scene_MemberScriptRun$C2:3DC1 · 34 B · EngineStep 1 of TrigWatch state C2Scene_TrigStWait: runs the script; when it ends, .State = 2. - verified
C2Scene_MemberScriptDone$C2:3DE3 · 2 B · EngineStep 2 of TrigWatch state C2Scene_TrigStWait: nothing; C=0. - verified
C2Scene_MemberBoardStart$C2:3DE5 · 50 B · EngineStep 0 of ObjWatch state 4: the target is the party's position on its 8x8 tile (C2Scene_MemberLeaderTarget); route, first leg, facing and walk animation as C2Scene_MemberFollow plans them; .Frames... - verified
C2Scene_MemberBoardX$C2:3E17 · 100 B · EngineStep 1 of ObjWatch state 4, a leg in X: moves until .SprX = .TargetX. - verified
C2Scene_MemberBoardY$C2:3E7B · 100 B · EngineStep 2 of ObjWatch state 4: C2Scene_MemberBoardX with the axes swapped (.SprY, .TargetY; the next leg is in X: .State 1, C2Scene_MemberXLeg). - verified
C2Scene_MemberBoardDone$C2:3EDF · 2 B · EngineStep 3 of ObjWatch state 4 (counted in): nothing; C=0. - verified
C2Scene_LeaderNear16$C2:3EE1 · 70 B · EngineC=1 when the party's position (C2Scene_StartX/Y) is within C2Scene_NearLo16 pixels before and C2Scene_NearHi16 - 1 after the member's .SprX/.SprY on both axes (unsigned compares, so the box does... - verified
C2Scene_LeaderNear32$C2:3F27 · 70 B · EngineC2Scene_LeaderNear16 with C2Scene_NearLo32 / C2Scene_NearHi32 (32 pixels). - verified
C2Scene_MemberTrailTarget$C2:3F6D · 39 B · Engine.TargetX/Y = a trail entry: the last one C2Scene_TrailPush wrote (C2Scene_TrailPos - 2) for slot 1 (.Slot bit 0), the one before it (- 4) otherwise. - verified
C2Scene_MemberLeaderTarget$C2:3F94 · 19 B · Engine.TargetX/Y = C2Scene_StartX/Y AND C2Scene_TileSnapMask (the start of the party's 8x8 tile). - verified
C2Scene_MemberDelta$C2:3FA7 · 21 B · Engine.DeltaX/Y = .TargetX/Y - .SprX/Y. - verified
C2Scene_MemberRoute$C2:3FBC · 44 B · EnginePlans .Route from the member's position to its target. - verified
C2Scene_MemberRouteTable$C2:3FE8 · 8 B · EngineC2Scene_MemberRoute's handler for each C2Scene_PathBlocked result 0-3. - verified
C2Scene_MemberRouteOpen$C2:3FF0 · 92 B · Engine
Bank $C2 · $C2:4000–$4FFF
$C2:4000
Verified · 57
- verified
C2Scene_MemberRouteYFirst$C2:404C · 10 B · Engine - verified
C2Scene_MemberRouteXFirst$C2:4056 · 10 B · Engine - verified
C2Scene_MemberRouteTrail$C2:4060 · 132 B · Engine - verified
C2Scene_FaceVelocity$C2:40E4 · 65 B · Engine.PrevFacing = .Facing's direction; .Facing keeps only C2Scene_WalkMoving and gets the direction of the whole-pixel velocity: left / right for a negative / positive .XVel, else up / down for .YVel. - verified
C2Scene_MemberFirstLeg$C2:4125 · 19 B · EngineSets the velocity of the route's first leg: C2Scene_MemberYLeg for a C2Scene_RouteYFirst route, else C2Scene_MemberXLeg. - verified
C2Scene_MemberXLeg$C2:4138 · 26 B · EngineA leg in X: .XVel = -1 for a negative .DeltaX, else +1; .XVelFrac, .YVel and .YVelFrac 0. - verified
C2Scene_MemberYLeg$C2:4152 · 26 B · EngineC2Scene_MemberXLeg for Y: .YVel = -1 / +1 by .DeltaY, the other three velocity words 0. - verified
C2Scene_MemberStand$C2:416C · 24 B · EngineNot moving (.Facing loses C2Scene_WalkMoving) and the stand animation of the member's character (the Party_Members byte of .Slot; C2Scene_SetStandAnim, tail call). - verified
C2Scene_MemberWalkAnim$C2:4184 · 49 B · EngineZeroes the member's idle count (C2Scene_IdleFrames + .Slot) and starts the walk animation (C2Scene_SetWalkAnim) unless it already runs for an unchanged direction (.Facing = .PrevFacing with... - verified
C2Scene_PathBlocked$C2:41B5 · 80 B · EngineTests the two one-turn paths between 8x8 tiles (C2Scene_RouteFromX, C2Scene_RouteFromY) and (C2Scene_RouteToX, C2Scene_RouteToY) for wall tiles: C2Scene_PathXYBlocked when the path along the row... - verified
C2Scene_ScanRow$C2:4205 · 85 B · EngineWalks C2Scene_ScanX one column at a time to C2Scene_ScanEnd along tile row C2Scene_ScanY - 1 (the row above the point, as the leader's .PropUL/UR), testing each new column's property nibble... - verified
C2Scene_ScanCol$C2:425A · 131 B · EngineC2Scene_ScanRow down or up a column: C2Scene_ScanY (and C2Scene_ScanEnd) are taken one row up, then C2Scene_ScanY walks to C2Scene_ScanEnd testing the two tiles of each new row at columns... - verified
C2Scene_ObjATask$C2:42DD · 9 B · EngineTask handler: runs the C2Scene_ObjAStates handler of .State. - verified
C2Scene_ObjAStates$C2:42E6 · 18 B · EngineC2Scene_ObjATask's handler for each .State 0-8. - verified
C2Scene_ObjAInit$C2:42F8 · 211 B · EngineState 0: puts the sprite at C2Scene_ObjAX/Y (fractions and .SprTile 0), then by C2Scene_Unk0294: - C2Scene_ObjBusy clear: .State C2Scene_ObjAStWait, .SprAttr C2Scene_ObjAttrPrio2, facing down... - verified
C2Scene_ObjAWait$C2:43CB · 113 B · EngineState 1: runs the animation until C2Scene_ObjWatch reaches state C2Scene_ObjWatchStBusyA (the whole party is in), then sets C2Scene_ObjBusy and: - without C2Scene_ObjAFlag5: sets... - verified
C2Scene_ObjARise$C2:443C · 123 B · EngineState 2: moves by the velocity (C2Scene_TaskMove, C2Scene_WrapTaskPos) until .Frames reaches .Duration; on frame C2Scene_RiseAttrAt the sprite gets .SprAttr C2Scene_ObjAttrPrio3. - verified
C2Scene_ObjAFly$C2:44B7 · 446 B · EngineState 3 (C2Scene_ObjAStFly): in scene mode C2Scene_ModeIdle1, with any bit of Pad_Unk00F8 (read as a word) set, the first that applies: - Pad_Unk00F8Bit7 with C2Scene_ObjAOnSpot: unless... - verified
C2Scene_ObjAMove$C2:4675 · 109 B · EngineState 4: moves by the velocity (C2Scene_TaskMove, C2Scene_WrapTaskPos) and scrolls BG layers 1 and 2 with it (C2Scene_Unk0568 by .XVel, C2Scene_Unk066C by .YVel, the low bytes), as the leader's... - verified
C2Scene_ObjALand$C2:46E2 · 70 B · EngineState 5 (C2Scene_ObjAStLand): moves by the velocity until .Frames reaches .Duration (low byte), with .SprAttr C2Scene_ObjAttrPrio2 from frame C2Scene_LandAttrAt; C2Anim_Run. - verified
C2Scene_ObjAAfterMode8$C2:4728 · 251 B · EngineState 6 (C2Scene_ObjAStMode8): waits for C2Scene_ObjANextLoc, which C2Scene_ObjAWait and C2Scene_ObjAFly zero before scene mode C2Scene_ModeUnk8 (mode 8's sub-program C2Scene_Dial sets it). - verified
C2Scene_ObjAScript$C2:4823 · 101 B · EngineState 7 (C2Scene_ObjAStScript): runs the task's own script (C2Scene_TaskRunScript on .ScriptPtr: C2Scene_ObjAScrArrive or C2Scene_ObjAScrLeave). - verified
C2Scene_ObjAWaitEmpty$C2:4888 · 17 B · EngineState 8 (C2Scene_ObjAStWaitEmpty): when C2Scene_ObjWatch reaches C2Scene_ObjWatchStEmpty (the party is getting out), .State 0; C2Anim_Run every frame. - verified
C2Scene_ObjAStepVel$C2:4899 · 16 B · EngineC2Scene_ObjAFly's step velocity per facing: .XVel then .YVel (whole pixels a frame, signed). - verified
C2Scene_ObjAFaceAnim$C2:48A9 · 28 B · EngineStarts the animation of the task's .Facing: entry .Facing of C2Scene_ObjAFaceAnims, or of C2Scene_ObjAFaceAnims5 with C2Scene_ObjAFlag5 (C2Scene_SetAnim, by JMP). - verified
C2Scene_ObjAFaceAnims$C2:48C5 · 4 B · EngineAnimation numbers per facing (up, down, left, right) of C2Scene_ObjAFaceAnim. - verified
C2Scene_ObjAFaceAnims5$C2:48C9 · 4 B · EngineThe same with C2Scene_ObjAFlag5. - verified
C2Scene_ObjAJump$C2:48CD · 27 B · EngineMoves the task C2Scene_ObjAJumpPx (512) pixels in X the way .XVel points (back when it is negative) and wraps the position (C2Scene_WrapTaskPos, by JMP). - verified
C2Scene_ObjAOverlap$C2:48E8 · 47 B · EngineC=1 when object A is active (C2Scene_ObjActive in C2Scene_Unk0294), at the current location (Loc_Id equal to C2Scene_ObjALoc, unmasked) and its box (C2Scene_ObjAFlyBox at C2Scene_ObjAX/Y) overlaps... - verified
C2Scene_ObjBOverlap$C2:4917 · 47 B · EngineC2Scene_ObjAOverlap for object B: active (C2Scene_ObjBFlags), Loc_Id C2Scene_ObjBLocId (unmasked) and C2Scene_ObjBLandBox at C2Scene_ObjBX/Y against box A. - verified
C2Scene_ObjAFlyBox$C2:4946 · 8 B · EngineC2Scene_BoxesOverlap extents (left, right, up, down) of object A in C2Scene_ObjAFly and C2Scene_ObjASpotWatch: 8 each way. - verified
C2Scene_ObjBLandBox$C2:494E · 8 B · EngineObject B's extents for C2Scene_ObjBOverlap: 8 each way. - verified
C2Scene_SpotBox$C2:4956 · 8 B · EngineThe extents of the spot at C2Scene_SpotX/Y (C2Scene_ObjASpotWatch): 8 each way. - verified
C2Scene_ObjAMarkTask$C2:495E · 9 B · EngineTask handler of a second sprite that goes with object A (no reference in the bank's code, as C2Scene_ObjATask): runs the C2Scene_ObjAMarkStates handler of .State. - verified
C2Scene_ObjAMarkStates$C2:4967 · 4 B · EngineC2Scene_ObjAMarkTask's handler for .State 0 and 1. - verified
C2Scene_ObjAMarkInit$C2:496B · 33 B · EngineState 0: ends the task (C=1) unless object A is at this location (Loc_Id AND C2Scene_LocIdMask equal to C2Scene_ObjALoc). - verified
C2Scene_ObjAMarkShow$C2:498C · 67 B · EngineState 1, every frame: with C2Scene_ObjAFlag5 and C2Scene_ObjAAloft set, animation C2Scene_AnimMarkBelow at C2Scene_ObjAX, C2Scene_ObjAY + C2Scene_Lift (24 pixels below object A: probably its... - verified
C2Scene_ObjASpotWatch$C2:49CF · 91 B · EngineTask handler (no reference in the bank's code): while C2Scene_ObjWatch is in C2Scene_ObjWatchStBusyA (the party in object A) and C2Scene_ObjAInMode8 is clear, tests object A's box... - verified
C2Scene_ObjASound$C2:4A2A · 46 B · EngineQueues C2Scene_SoundCmd10 with C2Scene_ObjASongArg (arguments C2Scene_SoundArgUnused, C2Scene_SoundArg80, rank 0), as C2Scene_ZoneSoundQueue does with a zone's sound; when it is queued (C=0) the... - verified
C2Scene_ObjAGetProps$C2:4A58 · 67 B · EngineAfter C2Scene_GetTileProps (C2Scene_PropX/Y = the point's 8x8 column and row): .PropBL = the property nibble of the tile below-left (column - 1, wrapping to C2Scene_MapTilesX - 1, row + 1 AND 127)... - verified
C2Scene_ObjAScrGo1DD$C2:4A9B · 18 B · EngineScript of a task C2Scene_ObjARise starts with C2Scene_Flag0ObjAGo1DD: the new task (a copy of object A's record) puts its sprite at .SprY $198 with animation $1B, fades out and leaves for location... - verified
C2Scene_ObjAScrLeave$C2:4AAD · 223 B · EngineObject A's own script for state C2Scene_ObjAStScript after mode 8 chose a location (C2Scene_ObjAAfterMode8). - verified
C2Scene_ObjAScrArrive$C2:4B8C · 108 B · EngineObject A's own script when the scene loads with the party in it after mode 8 (C2Scene_ObjAInit). - verified
C2Scene_ObjAScrSlowVel$C2:4BF8 · 35 B · EngineScript subroutine (C2Script_Call): the velocity half a pixel a frame in the .Facing direction (the other axis left as it is). - verified
C2Scene_ObjAScrFastVel$C2:4C1B · 35 B · EngineC2Scene_ObjAScrSlowVel at 8 pixels a frame. - verified
C2Scene_ObjAScrDash$C2:4C3E · 10 B · EngineScript subroutine: task byte +$22 rounds of 2 frames' movement (C2Script_MoveFrames), each starting a C2Scene_ObjAScrTrail task. - verified
C2Scene_ObjAScrTrail$C2:4C48 · 39 B · EngineScript of the tasks C2Scene_ObjAScrDash starts (each a copy of object A's record, so at its position): the animation for the copied .Facing ($33 up, $32 down, $34 left, $35 right), shown for 8... - verified
C2Scene_ObjAScrUnk4C6F$C2:4C6F · 32 B · EngineA script with no reference found (no pointer to it in the bank): fade out, swap the low bytes of Loc_Id and Loc_ReturnId (through task byte +$22), C2Scene_ObjALoc = Loc_Id, scene mode... - verified
C2Scene_ObjAScrSpot$C2:4C8F · 54 B · EngineScript of the task C2Scene_ObjAFly starts on the spot (C2Scene_ObjAOnSpot): fade out, Loc_Id, Loc_EntryX/Y and Loc_EntryFacing copied to Loc_ReturnId-Loc_ReturnFacing, then location $1C1 at tile... - verified
C2Scene_ObjBTask$C2:4CC5 · 9 B · EngineTask handler: runs the C2Scene_ObjBStates handler of .State. - verified
C2Scene_ObjBStates$C2:4CCE · 12 B · EngineC2Scene_ObjBTask's handler for each .State 0-5. - verified
C2Scene_ObjBInit$C2:4CDA · 93 B · EngineState 0: the sprite at C2Scene_ObjBX/Y (fractions and .SprTile 0), facing down (.Facing, .PrevFacing). - verified
C2Scene_ObjBWait$C2:4D37 · 66 B · EngineState 1: runs the animation until C2Scene_ObjWatch reaches C2Scene_ObjWatchStBusyB (the party is in B); then sets C2Scene_ObjBusy in C2Scene_ObjBFlags, .State 2, the property nibbles at the... - verified
C2Scene_ObjBRise$C2:4D79 · 86 B · EngineState 2: as C2Scene_ObjARise with fixed counts: moves for C2Scene_RiseFrames frames (.SprAttr C2Scene_ObjBAttrPrio3 from frame C2Scene_RiseAttrAt); then .State C2Scene_ObjBStFly, C2Scene_ObjBAloft... - verified
C2Scene_ObjBFly$C2:4DCF · 431 B · EngineState 3 (C2Scene_ObjBStFly): in scene mode C2Scene_ModeIdle1, with any bit of Pad_Unk00F8 (a word) set: - Pad_Unk00F8Bit7 comes down when none of .PropUL-DR and .PropBL/B has a bit of... - verified
C2Scene_ObjBMove$C2:4F7E · 109 B · EngineState 4: C2Scene_ObjAMove for object B: moves, scrolls BG layers 1 and 2, C2Scene_Unk1BF1/1BF3 = the velocity, C2Anim_Run, C2Scene_ObjBX/Y = the position, and at the target .State =... - verified
C2Scene_ObjBLand$C2:4FEB · 76 B · EngineState 5 (C2Scene_ObjBStLand): moves for C2Scene_LandFrames frames (.SprAttr C2Scene_ObjBAttrPrio2 from frame C2Scene_LandAttrAt); then C2Scene_ObjBusy and C2Scene_ObjBLanding cleared, .State...
Bank $C2 · $C2:5000–$5FFF
$C2:5000
Verified · 127
- verified
C2Scene_ObjBStepVel$C2:5037 · 16 B · EngineC2Scene_ObjBFly's step velocity per facing (.XVel, .YVel), as C2Scene_ObjAStepVel. - verified
C2Scene_ObjBFaceAnims$C2:5047 · 4 B · EngineObject B's animation per facing (up, down, left, right). - verified
C2Scene_ObjBMarkTask$C2:504B · 9 B · EngineTask handler of object B's second sprite (no reference in the bank's code): runs the C2Scene_ObjBMarkStates handler of .State. - verified
C2Scene_ObjBMarkStates$C2:5054 · 4 B · EngineC2Scene_ObjBMarkTask's handler for .State 0 and 1. - verified
C2Scene_ObjBMarkInit$C2:5058 · 16 B · EngineState 0: .State 1, .SprAttr C2Scene_ObjAttrPrio3, .SprTile 0; falls into C2Scene_ObjBMarkShow. - verified
C2Scene_ObjBMarkShow$C2:5068 · 39 B · EngineState 1, every frame: the C2Scene_ObjBMarkOfs entry of C2Scene_ObjBAloft (0: above B, C2Scene_AnimMarkAbove; 1: below, C2Scene_AnimMarkBelow): the sprite at C2Scene_ObjBX, C2Scene_ObjBY + the... - verified
C2Scene_ObjBMarkOfs$C2:508F · 8 B · EnginePer C2Scene_ObjBAloft: the Y offset from object B and the animation. - verified
C2Scene_ObjBMateTask$C2:5097 · 9 B · EngineTask handler of one of object B's mates (see the banner): runs the C2Scene_ObjBMateStates handler of .State. - verified
C2Scene_ObjBMateStates$C2:50A0 · 12 B · EngineC2Scene_ObjBMateTask's handler for each .State 0-5. - verified
C2Scene_ObjBMateInit$C2:50AC · 100 B · EngineState 0: the sprite at C2Scene_ObjBX/Y (fractions and .SprTile 0), facing down, .SprAttr C2Scene_MemberAttr with the slot's palette (C2Scene_Member1Pal for .Slot C2Scene_Slot1, else... - verified
C2Scene_ObjBMateWait$C2:5110 · 60 B · EngineState 1: nothing (C=0) until C2Scene_ObjWatch reaches C2Scene_ObjWatchStBusyB. - verified
C2Scene_ObjBMateRise$C2:514C · 89 B · EngineState 2: moves for C2Scene_RiseFrames frames (OAM priority 3 from frame C2Scene_RiseAttrAt), saving the position (C2Scene_ObjBMateSavePos) and running the animation each frame. - verified
C2Scene_ObjBMateFollow$C2:51A5 · 130 B · EngineState 3, also re-entered from C2Scene_ObjBMateMove every C2Scene_MateAimFrames frames: - with C2Scene_ObjBLanding (object B is coming down): .State C2Scene_MateStLand, .Frames 0, +$22 = 0, .SprY... - verified
C2Scene_ObjBMateMove$C2:5227 · 34 B · EngineState 4: for C2Scene_MateAimFrames frames moves without overshooting the target (C2Scene_ObjBMateClampVel, C2Scene_TaskMove, C2Scene_WrapTaskPos), saves the position and runs the animation; then... - verified
C2Scene_ObjBMateLand$C2:5249 · 65 B · EngineState 5 (C2Scene_MateStLand): moves until .Frames passes C2Scene_LandFrames, which is $30 frames (C2Scene_TaskRunAll has already counted .Frames to 1 on the frame Follow ended), saving the... - verified
C2Scene_ObjBMateClampVel$C2:528A · 147 B · EngineKeeps a step from going past the target: per axis, when the distance to .TargetX (.TargetY) is less than the whole pixels of the speed (|.XVel| with the fraction's borrow), the velocity becomes... - verified
C2Scene_ObjBMateSpot$C2:531D · 68 B · Engine.TargetX/Y = the mate's spot beside object B: C2Scene_ObjBX/Y plus the C2Scene_ObjBMateSpots entry of (Loc_EntryFacing's facing * 2 + .Slot - 1), snapped to the 8x8 tile (C2Scene_TileSnapMask) and... - verified
C2Scene_ObjBMateToObjB$C2:5361 · 19 B · Engine.TargetX/Y = C2Scene_ObjBX/Y. - verified
C2Scene_ObjBMateAim$C2:5374 · 95 B · EngineVelocity 0, then the direction from the position to .TargetX/Y (C2Scene_Unk229D). - verified
C2Scene_ObjBMateGlideVel$C2:53D3 · 105 B · EngineThe velocity that reaches .TargetX/Y in C2Scene_MateGlideFrames frames: per axis the distance with its bytes swapped (XBA) divided by C2Scene_MateGlideFrames with the hardware divider, the... - verified
C2Scene_ObjBMateSpots$C2:543C · 32 B · EngineC2Scene_ObjBMateSpot's X and Y offsets from object B per party facing (up, down, left, right) and slot (1, 2): 24 pixels across and 24 along. - verified
C2Scene_ObjBMateFaceDir$C2:545C · 20 B · Engine.PrevFacing = .Facing; .Facing = Rom_DirToFacing's entry for the direction in C2Scene_AimDir (C2Scene_ObjBMateAim's). - verified
C2Scene_ObjBMateFaceAnim$C2:5470 · 28 B · EngineWhen .Facing differs from .PrevFacing: starts entry (.Slot - 1) * 4 + .Facing of C2Scene_ObjBMateFaceAnims (C2Scene_SetAnim, by JMP). - verified
C2Scene_ObjBMateFaceAnims$C2:548C · 8 B · EngineThe mates' animation per slot (1, then 2) and facing (up, down, left, right). - verified
C2Scene_ObjBMateMarkTask$C2:5494 · 9 B · EngineTask handler of a mate's second sprite (.Slot as the mate's; no reference in the bank's code): runs the C2Scene_ObjBMateMarkStates handler of .State. - verified
C2Scene_ObjBMateMarkStates$C2:549D · 10 B · EngineC2Scene_ObjBMateMarkTask's handler for each .State 0-4. - verified
C2Scene_ObjBMateMarkInit$C2:54A7 · 103 B · EngineState 0: .SprAttr C2Scene_ObjAttrPrio3. - verified
C2Scene_ObjBMateMarkWait$C2:550E · 52 B · EngineState 1: nothing (C=0) until C2Scene_ObjWatch reaches C2Scene_ObjWatchStBusyB; then .State 2, .Frames 0, velocity half a pixel up and half a pixel sideways (right for slot 1, left for slot 2), and... - verified
C2Scene_ObjBMateMarkRise$C2:5542 · 43 B · EngineState 2: moves for C2Scene_RiseFrames frames with C2Anim_Run; then .State C2Scene_MateStFollow, .SprY + C2Scene_MateMarkDrop, animation C2Scene_AnimMarkBelow, and falls into... - verified
C2Scene_ObjBMateMarkFollow$C2:556D · 100 B · EngineState 3: with C2Scene_ObjBLanding: .State C2Scene_MateMarkStLand, .Frames 0, the target C2Scene_ObjBX, C2Scene_ObjBY - C2Scene_Lift, .SprY - C2Scene_MateMarkDrop, the glide velocity to the target... - verified
C2Scene_ObjBMateMarkLand$C2:55D1 · 52 B · EngineState 4 (C2Scene_MateMarkStLand): moves until .Frames passes C2Scene_LandFrames, $30 frames (.Frames is already 1 when it starts); then .State C2Scene_MateStWait, fractions and velocity 0. - verified
C2Scene_ObjBMateSavePos$C2:5605 · 35 B · EngineCopies the task's position to C2Scene_ObjBMate1X/Y (.Slot bit 0 set: slot 1) or C2Scene_ObjBMate2X/Y, where the mark tasks read it. - verified
C2Scene_LabelTask$C2:5628 · 15 B · EngineTask handler (no reference in the bank's code, as the object tasks): draws string C2Scene_Unk1B58 of C2SceneRom_LabelStrings with the text window code into a buffer, uploads it to VRAM and shows... - verified
C2Scene_LabelStates$C2:5637 · 8 B · EngineC2Scene_LabelTask's handler for each .State 0-3. - verified
C2Scene_LabelInit$C2:563F · 36 B · EngineState 0: .State 1, .SprAttr C2Scene_ObjAttrPrio3, .SprTile 0, the animation and frame templates copied to C2Scene_Unk8600/8604 (C2Scene_Unk5775), and the animation pointer on C2Scene_Unk8600 (its... - verified
C2Scene_LabelWait$C2:5663 · 54 B · EngineState 1: nothing (C=0) while C2Scene_Unk1B58 is 0. - verified
C2Scene_LabelDraw$C2:5699 · 96 B · EngineState 2: one TextWin_Step of one character (TextWin_StepCount 1) per frame while TextWin_Status comes back TextWin_StatusStepDone (C=0). - verified
C2Scene_LabelShow$C2:56F9 · 124 B · EngineState 3: with C2Scene_Unk1B58 0, .State C2Scene_LabelStWait and the buffer cleared (C2Scene_ClearUnk8621), and the sprite still drawn this frame; with C2Scene_Unk1B59 set (probably "the label... - verified
C2Scene_Unk5775$C2:5775 · 35 B · EngineCopies C2Scene_Unk8600Init (4 bytes) to C2Scene_Unk8600 and C2Scene_Unk8604Init (C2Scene_Unk8604Size bytes, MVN) to C2Scene_Unk8604: an animation script for C2Scene_LabelTask's sprite... - verified
C2Scene_ClearUnk8621$C2:5798 · 24 B · EngineZeroes the first C2Scene_Unk8621Bytes bytes of C2Scene_HdmaArea ($7E:8621-$8A20, up to C2Scene_HdmaValues): a zero word at the start, then an overlapping MVN. - verified
C2Scene_Unk57B0$C2:57B0 · 18 B · EngineData with no reference found in the bank (no pointer to any of its bytes): 0, 1, 2, 3, 3, 4, 5, 6, 6, two zeros, then $F4 down to $D0 in steps of 6. - verified
C2Scene_Unk8600Init$C2:57C2 · 4 B · EngineC2Scene_Unk5775's source for C2Scene_Unk8600. - verified
C2Scene_Unk8604Init$C2:57C6 · 25 B · EngineC2Scene_Unk5775's source for C2Scene_Unk8604: a 0 word, $D0, then five groups $E0+2n,$01,$10+16n,$D0 (n = 0-4), and $EA,$01. - verified
TextWin_Init$C2:57DF · 68 B · EngineStarts string TextWin_StrIndex: TextWin_TextPtr = the 16-bit entry TextWin_StrIndex of the table at TextWin_StrTable, in the table's bank; state 0 (TextWin_State), status TextWin_StatusStart... - verified
TextWin_Step$C2:5823 · 31 B · EngineOne step of the text box: TextWin_CheckStatus decides from TextWin_Status whether to go on (C=0); if so, the handler of TextWin_State in TextWin_StateTable runs. - verified
TextWin_StateTable$C2:5842 · 8 B · EngineTextWin_Step's handler for each TextWin_State (TextWin_State0-3). - verified
TextWin_CheckStatus$C2:584A · 7 B · EngineJumps to TextWin_Status's handler in TextWin_StatusTable, which returns C=1 to skip this step's state handler (status 0, TextWin_StatusIdle) or C=0 to run it. - verified
TextWin_StatusTable$C2:5851 · 66 B · EngineTextWin_CheckStatus's handler for each TextWin_Status value $00-$20. - verified
TextWin_StatusIdle$C2:5893 · 2 B · EngineStatus 0: nothing to do; C=1 so TextWin_Step skips the state handler. - verified
TextWin_StatusRun$C2:5895 · 2 B · EngineTextWin_StatusRun: C=0, run the state handler. - verified
TextWin_StatusPenLeft$C2:5897 · 4 B · Engine - verified
TextWin_StatusPenIndent$C2:589B · 23 B · Engine - verified
TextWin_State0$C2:58B2 · 12 B · EngineState 0: reads the next string byte (TextWin_TextPtr + 1): - a glyph (TextWin_FirstGlyph or more): TextWin_State0_Draw puts it in TextWin_Glyph (16-bit, with B as the high byte: 0, or the prefix... - verified
TextWin_State0_Draw$C2:58BE · 69 B · Engine - verified
TextWin_CodeTable$C2:5903 · 66 B · EngineTextWin_State0's handler for each control code $00-$20 (Y = the code). - verified
TextWin_CodeStatusArg$C2:5945 · 10 B · EngineCode $03: the next string byte to TextWin_Code3Arg, then as TextWin_CodeSetStatus. - verified
TextWin_CodeSetStatus$C2:594F · 4 B · Engine - verified
TextWin_CodeNum8$C2:5953 · 50 B · EngineCode $0D: prints the byte at TextWin_Unk3D (which steps on by 1). - verified
TextWin_CodeNum16$C2:5985 · 67 B · EngineCode $0E: as TextWin_CodeNum8 for the 16-bit value at TextWin_Unk3D (steps on by 2): five decimal digits (TextWin_Dec16, TextWin_TrimZeros5), or four hex digits, high byte first. - verified
TextWin_CodeNum24$C2:59C8 · 52 B · EngineCode $0F: the 24-bit value at TextWin_Unk3D (steps on by 3) as eight decimal digits (TextWin_Dec24, TextWin_TrimZeros8); unlike codes $0D and $0E it ignores TextWin_NumHex. - verified
TextWin_StartDec$C2:59FC · 21 B · Engine - verified
TextWin_StartHex$C2:5A11 · 21 B · Engine - verified
TextWin_CodeArgName$C2:5A26 · 38 B · EngineCode $11: the name whose TextWin_CharNamePtrs index is the byte at TextWin_Unk3D (which steps on by 1): TextWin_SubPtr at it in bank $7E, TextWin_SubLeft = its length (TextWin_CharNameLen), state... - verified
TextWin_CodeExt$C2:5A4C · 62 B · EngineCode $12 and the next string byte b: b from TextWin_Code12Dict up is dictionary entry TextWin_Code12DictBase + (b - 8) (as TextWin_State0's dictionary bytes, also kept in TextWin_DictCode); below... - verified
TextWin_ExtTable$C2:5A8A · 4 B · EngineTextWin_CodeExt's handler for b = 0 and 1. - verified
TextWin_ExtTechName$C2:5A8E · 66 B · EngineCode $12 $00: name number (the byte at TextWin_Unk3D, which steps on) of TextWinRom_TechNames (TextWin_RomNameSize bytes each, by the multiplier): TextWin_SubLeft = its length up to the first... - verified
TextWin_ExtEnemyName$C2:5AD0 · 44 B · EngineCode $12 $01: name number (the byte at TextWin_Unk3D) of TextWinRom_EnemyNames, all TextWin_RomNameSize bytes of it (the padding is drawn too). - verified
TextWin_StartSubName$C2:5AFC · 10 B · Engine - verified
TextWin_CodeWide$C2:5B06 · 14 B · EngineCodes $01 and $02 (TextWin_Wide1/2): the next string byte with the code as its high byte is a 16-bit glyph ($01xx or $02xx), drawn by TextWin_State0_Draw. - verified
TextWin_CodeNop$C2:5B14 · 1 B · EngineCode $10: nothing; the step ends. - verified
TextWin_CodeCharName$C2:5B15 · 38 B · EngineCodes TextWin_FirstCharName-$19: the name at TextWin_CharNamePtrs entry (code - $13), in bank $7E, its length by TextWin_CharNameLen, drawn in state TextWin_StateDict. - verified
TextWin_CodeName0$C2:5B3B · 27 B · EngineCode $1A: the first name at TextWin_CharNames (the one TextWin_CharNamePtrs entry 0 also points at), as TextWin_CodeCharName. - verified
TextWin_CodeNadia$C2:5B56 · 26 B · EngineCode $1E: the TextWin_StrNadiaLen glyphs at TextWin_StrNadia ($C2:6146, which spell "Nadia" with $A0 = "A", $BA = "a"), in state TextWin_StateDict. - verified
TextWin_CodeMemberName$C2:5B70 · 43 B · EngineCodes TextWin_FirstMemberName-$1D: the name of the character in party position (code - $1B): Party_Members gives the TextWin_CharNamePtrs index; then as TextWin_CodeCharName. - verified
TextWin_CodeItemName$C2:5B9B · 59 B · EngineCode $1F: the name of item Treasure_ItemId (its low byte) in TextWinRom_ItemNames, from its second byte (the first is an icon), up to the first TextWin_NamePad (TextWin_NameLen10). - verified
TextWin_CodeName7$C2:5BD6 · 31 B · EngineCode $20: the eighth name at TextWin_CharNames ($7E:2C4D, after the seven TextWin_CharNamePtrs points at), as TextWin_CodeCharName. - verified
TextWin_State1$C2:5BF5 · 51 B · EngineState TextWin_StateDict: draws the next glyph of the sub-string at TextWin_SubPtr (a TextWin_Wide1/2 byte makes the next byte the low byte of a 16-bit glyph). - verified
TextWin_State1Next$C2:5C28 · 8 B · EngineTextWin_State1's exit by (sub-string left) + 2 * (steps left). - verified
TextWin_State1End$C2:5C30 · 2 B · Engine - verified
TextWin_State1Pause$C2:5C32 · 5 B · Engine - verified
TextWin_State1Resume$C2:5C37 · 5 B · Engine - verified
TextWin_State1Loop$C2:5C3C · 2 B · Engine - verified
TextWin_State2$C2:5C3E · 35 B · EngineState TextWin_StateDec: draws the next decimal digit at TextWin_SubPtr as glyph TextWin_DigitGlyph0 + the digit, then exits as TextWin_State1 does (TextWin_State2Next). - verified
TextWin_State2Next$C2:5C61 · 8 B · EngineTextWin_State2's exit, as TextWin_State1Next. - verified
TextWin_State2End$C2:5C69 · 2 B · Engine - verified
TextWin_State2Pause$C2:5C6B · 5 B · Engine - verified
TextWin_State2Resume$C2:5C70 · 5 B · Engine - verified
TextWin_State2Loop$C2:5C75 · 2 B · Engine - verified
TextWin_State3$C2:5C77 · 51 B · EngineState TextWin_StateHex: the same code as TextWin_State1 (glyph bytes, with the two-byte prefixes) with its own exits (TextWin_State3Next); the hex digits TextWin_HexByte stored are drawn this way. - verified
TextWin_State3Next$C2:5CAA · 8 B · EngineTextWin_State3's exit, as TextWin_State1Next. - verified
TextWin_State3End$C2:5CB2 · 2 B · Engine - verified
TextWin_State3Pause$C2:5CB4 · 5 B · Engine - verified
TextWin_State3Resume$C2:5CB9 · 5 B · Engine - verified
TextWin_State3Loop$C2:5CBE · 2 B · Engine - verified
TextWin_HexByte$C2:5CC0 · 67 B · EngineAppends the two hex digit glyphs of TextWin_HexIn (high digit first, from TextWin_HexGlyphs) to TextWin_Digits at TextWin_HexPos, which goes up by one per glyph (by two for a TextWin_WideGlyphMin... - verified
TextWin_HexGlyphs$C2:5D03 · 32 B · EngineThe glyph of each hex digit 0-F (TextWin_HexByte): "0"-"9" are $D4-$DD, "A"-"F" $A0-$A5. - verified
TextWin_NameLen10$C2:5D23 · 17 B · EngineA = the number of bytes at TextWin_SubPtr before the first TextWin_NamePad, at most 10. - verified
TextWin_NameLen11$C2:5D34 · 17 B · EngineAs TextWin_NameLen10, at most 11 (a whole TextWinRom name). - verified
TextWin_CharNameLen$C2:5D45 · 17 B · EngineA = the number of bytes at TextWin_SubPtr before the first 0, at most TextWin_CharNameMax. - verified
TextWin_TrimZeros8$C2:5D56 · 59 B · EngineDrops the leading zero digits of the 8 (5, 3) digits at TextWin_Digits, keeping at least one: while the first is 0, shifts the rest down one byte. - verified
TextWin_TrimZeros5$C2:5D91 · 28 B · Engine - verified
TextWin_TrimZeros3$C2:5DAD · 23 B · Engine - verified
TextWin_DrawGlyph$C2:5DC4 · 114 B · EngineDraws glyph TextWin_Glyph at TextWin_PenX into TextWin_GfxBuf and moves the pen on by the glyph's width: - TextWin_FontPtr = TextWinRom_Font + glyph * 24, TextWin_FontNibPtr = TextWinRom_FontRight... - verified
TextWin_Blit2bpp$C2:5E36 · 83 B · EngineDraws the glyph's 24 bytes with TextWin_Blit2bppRow, one per TextWin_GlyphRow: the first 8 (TextWin_GlyphTopPairs pairs) at TextWin_OutPtr on, then TextWin_OutPtr + TextWin_NextRow2bpp and the... - verified
TextWin_Blit2bppRow$C2:5E89 · 38 B · EngineOne glyph byte: A = byte TextWin_GlyphRow of TextWin_FontPtr in the high byte and of TextWin_FontNibPtr in the low (its high nibble for an even TextWin_GlyphLow, its low nibble moved up for an odd... - verified
TextWin_Blit2bppShifts$C2:5EAF · 16 B · EngineTextWin_Blit2bppRow's entry for each pen shift 0-7. - verified
TextWin_Blit2bppShr0$C2:5EBF · 16 B · Engine - verified
TextWin_Blit2bppShr4$C2:5ECF · 1 B · Engine - verified
TextWin_Blit2bppShr3$C2:5ED0 · 1 B · Engine - verified
TextWin_Blit2bppShr2$C2:5ED1 · 1 B · Engine - verified
TextWin_Blit2bppShr1$C2:5ED2 · 19 B · Engine - verified
TextWin_Blit2bppShl3$C2:5EE5 · 3 B · Engine - verified
TextWin_Blit2bppShl2$C2:5EE8 · 3 B · Engine - verified
TextWin_Blit2bppShl1$C2:5EEB · 28 B · Engine - verified
TextWin_Blit4bpp$C2:5F07 · 83 B · EngineAs TextWin_Blit2bpp with TextWin_Blit4bppRow and TextWin_NextRow4bpp: the second part goes $200 bytes on, and the tiles are TextWin_TileOfs4bpp's, $20 bytes apart (probably 4bpp tiles, the glyph... - verified
TextWin_Blit4bppRow$C2:5F5A · 38 B · EngineTextWin_Blit2bppRow with the tile offsets of TextWin_TileOfs4bpp. - verified
TextWin_Blit4bppShifts$C2:5F80 · 16 B · EngineTextWin_Blit4bppRow's entry for each pen shift 0-7. - verified
TextWin_Blit4bppShr0$C2:5F90 · 16 B · Engine - verified
TextWin_Blit4bppShr4$C2:5FA0 · 1 B · Engine - verified
TextWin_Blit4bppShr3$C2:5FA1 · 1 B · Engine - verified
TextWin_Blit4bppShr2$C2:5FA2 · 1 B · Engine - verified
TextWin_Blit4bppShr1$C2:5FA3 · 19 B · Engine - verified
TextWin_Blit4bppShl3$C2:5FB6 · 3 B · Engine - verified
TextWin_Blit4bppShl2$C2:5FB9 · 3 B · Engine - verified
TextWin_Blit4bppShl1$C2:5FBC · 28 B · Engine - verified
TextWin_CharNamePtrs$C2:5FD8 · 14 B · EngineThe 16-bit addresses (bank $7E) of the first 7 names at TextWin_CharNames, TextWin_CharNameSize bytes apart (codes $11 and $13-$19). - verified
TextWin_TileOfs2bpp$C2:5FE6 · 128 B · EngineTextWin_Blit2bppRow: the TextWin_GfxBuf offset of each 8-pixel tile column of the pen (index pen / 8; the glyph spans up to three, + 1 and + 2).
Bank $C2 · $C2:6000–$6FFF
$C2:6000
Verified · 60
- verified
TextWin_TileOfs4bpp$C2:6066 · 128 B · EngineAs TextWin_TileOfs2bpp for TextWin_Blit4bppRow, $20 bytes per tile: columns 0-15 from $000, 16-31 from $400, then $200 and $600. - verified
TextWin_GlyphWidths$C2:60E6 · 96 B · EngineThe pen advance in pixels of each glyph $A0-$FF (TextWin_DrawGlyph; index glyph - TextWin_FirstGlyph). - verified
TextWin_StrNadia$C2:6146 · 5 B · EngineGlyphs "Nadia" (TextWin_CodeNadia, code $1E). - verified
TextWin_DivBits$C2:614B · 19 B · EngineOne decimal digit by shift and subtract: TextWin_DivQuot = A / divisor, A = the remainder, for a divisor that the caller put in TextWin_DivSub shifted left by Y - 1 (Y = the quotient bits). - verified
TextWin_Dec8$C2:615E · 34 B · EngineTextWin_NumValue's first byte as 3 decimal digits (0-9 each) at TextWin_DecDigits, most significant first (TextWin_DivBits by 100 and 10; the remainder is the last digit). - verified
TextWin_Dec16$C2:6180 · 61 B · EngineTextWin_NumValue's first word as 5 decimal digits at TextWin_DecDigits (TextWin_DivBits in 16 bits by 10000, 1000, 100 and 10; the remainder is the last digit, stored as a word... - verified
TextWin_Dec24$C2:61BD · 116 B · EngineTextWin_NumValue's 24 bits as 8 decimal digits at TextWin_DecDigits (TextWin_Div24Bits by 10000000 ... 10; the last digit is what is left of TextWin_NumValue's first byte). - verified
TextWin_Div24Bits$C2:6231 · 50 B · EngineTextWin_DivBits for 24 bits, in place: TextWin_NumValue (3 bytes) is the value and becomes the remainder; TextWin_Div24Sub (3 bytes, shifted left by Y - 1) the divisor; TextWin_Div24Quot gets Y... - verified
C2Scene_GetListAUnk02$C2:6263 · 11 B · EngineC2Scene_Unk1B58 = .Unk02 of the ListA entry at offset C2Scene_Unk1B32. - verified
C2Scene_GetListBScript$C2:626E · 24 B · EngineC2Scene_Unk1B45 = the C2Scene_ListD word (a script address in bank $7F) picked by .Script of the ListB entry at offset C2Scene_Unk1B32+2. - verified
C2Scene_GetListCUnk03$C2:6286 · 11 B · EngineC2Scene_Unk1B47 = the byte 3 past the start of the ListC entry at offset C2Scene_Unk1B32+4. - verified
C2Scene_GetMapCell$C2:6291 · 29 B · EngineA = the metatile number at column C2Scene_PropCol (0-95), row C2Scene_PropRow of the map at C2Scene_PropMap (byte row * 96 + column). - verified
C2Scene_GetTileProp$C2:62AE · 63 B · EngineA = the property nibble of 8x8 tile C2Scene_PropCol (0-191), C2Scene_PropRow (0-127): the metatile at column / 2, row / 2 of the map at C2Scene_PropMap; its byte row bit 0 (byte metatile * 2 + row... - verified
C2Scene_GetSoundZone$C2:62ED · 50 B · EngineReturns the 4-bit zone of metatile C2Scene_ZoneCol, C2Scene_ZoneRow from the zone map at the start of C2Scene_Unk7200 (bank $7E): byte row * 48 + column / 2 (the row product with the hardware... - verified
C2Scene_MapView$C2:631F · 192 B · EngineMode 6's sub-program (inferred from what it builds; see the banner): BG mode 7, sprite tiles at VRAM $6000 (OBSEL), colour math adding the fixed colour on the backdrop only; clears VRAM, the VRAM... - verified
C2Scene_MapViewBuild$C2:63DF · 33 B · EngineBuilds the mode-7 picture: unpacks the scene's BG graphics (C2Scene_LoadBgGfx) and takes one colour per tile from them (C2Scene_MapTileColors); then draws the pixels from layer 2's map... - verified
C2Scene_MapTileColors$C2:6400 · 83 B · EngineFor each of the C2Scene_MapTileCount 4bpp tiles in C2Scene_DecompBuf (32 bytes each: the seven BG packs), writes one byte to C2Scene_TileColors through WMDATA: the colour number (0-15) of the... - verified
C2Scene_MapTilePixelBit$C2:6453 · 9 B · EngineShifts bit 4 of the tile byte at C2Scene_TilePtr + Y (bank DB) into C2Scene_TileColor from the right: four ROLs bring bit 4 into the carry. - verified
C2Scene_MapDrawPixels$C2:645C · 226 B · EngineDraws the mode-7 picture's tiles, a band of 8 pixel rows (4 metatile rows) at a time, in C2Scene_VramQBuf (C2Scene_VramQBufPtr, bank $7E): mode-7 tiles are 8 x 8 bytes, one byte per pixel, and the... - verified
C2Scene_MapCellPixels$C2:653E · 80 B · EngineDraws one metatile cell as two pixels, at C2Scene_MapOut and 8 bytes (one pixel row) below: the colours (C2Scene_TileColors) of the metatile's top-right and bottom-right tiles, each ORed with that... - verified
C2Scene_MapFilterColor$C2:658E · 36 B · EngineTurns some pixel colours (palette * 16 + colour) into 0, the transparent colour that shows the gradient: at Loc_Id C2Scene_MapLoc1F3 the colours $40-$4E; at any other location $0F, $2F and $24-$2B. - verified
C2Scene_MapBuildTilemap$C2:65B2 · 186 B · EngineWrites the mode-7 tilemap: a 32 x 32 tile block of bytes at C2Scene_VramQBuf, zeroed (tile 0: blank), with the picture's tiles 1-192 in 16 rows of 12 from column C2Scene_MapTileCol0, row... - verified
C2Scene_TaskMapZoom$C2:666C · 9 B · EngineTask handler started by C2Scene_MapView: runs .State through C2Scene_MapZoomStates. - verified
C2Scene_MapZoomStates$C2:6675 · 8 B · EngineC2Scene_TaskMapZoom's handler for each .State. - verified
C2Scene_MapZoomInit$C2:667D · 46 B · EngineState 0: .State = 1; the mode-7 centre at the leader's place in the picture: C2Scene_M7X = C2Scene_StartX / 16 + 16 (one pixel per 16-pixel metatile, the picture 2 tiles in) and C2Scene_M7Y =... - verified
C2Scene_MapZoomOut$C2:66AB · 62 B · EngineState 1, once per frame: .DivA and .DivB = entry .Step of C2SceneRom_ZoomDivA/B ($FF/$7F down to $10/$08: the picture shrinks), .Step + 2; when it reaches $40 (all 32 entries used) .Step = $3E... - verified
C2Scene_MapZoomWait$C2:66E9 · 27 B · EngineState 2: when Pad_Unk00F6 has C2Scene_MapViewExitBtn (bit 3), .State = 3 and the script C2Scene_ScrMapViewExit starts. - verified
C2Scene_MapZoomIn$C2:6704 · 50 B · EngineState 3, once per frame: .DivA/.DivB = entry .Step of the tables, then .Step - 2, and the matrix: the zoom of C2Scene_MapZoomOut backwards (entries 31 down to 1). - verified
C2Scene_MapZoomMatrix$C2:6736 · 125 B · EngineSets the mode-7 matrix shadows from the task's .Angle, .DivA and .DivB: C2Scene_M7A = 8 cos / DivA, C2Scene_M7B = 8 sin / DivA, C2Scene_M7C = -8 sin / DivB, C2Scene_M7D = 8 cos / DivB (sine and... - verified
C2Scene_MapZoomDivide$C2:67B3 · 71 B · EngineThe four divisions of C2Scene_MapZoomMatrix on the hardware divider, each next dividend and divisor written while the previous division runs (NOPs pad the waits): C2Scene_ZoomA = Cos8 / DivA... - verified
C2Scene_TaskLeaderMarker$C2:67FA · 65 B · EngineTask handler (started by C2Scene_ScrMapViewMarkers): a marker sprite at the leader's place on the zoomed-out picture. - verified
C2Scene_TaskObjAMarker$C2:683B · 79 B · EngineTask handler (started by C2Scene_ScrMapViewMarkers): as C2Scene_TaskLeaderMarker for object A (C2Scene_ObjAX/Y), with C2Scene_AnimObjAMarker; but on the first call, unless Loc_Id AND... - verified
C2Scene_MapMarkerPos$C2:688A · 25 B · EngineTurns the task's .SprX/.SprY (scene pixels) into the screen position on the zoomed-out picture: .SprX = .SprX / 8 + 32, .SprY = .SprY / 8 + 48 (the full zoom shows the picture's 1 x 2 pixels per... - verified
C2Scene_TaskLocMarker$C2:68A3 · 65 B · EngineTask handler (started by C2Scene_ScrMapViewMarkers): first call: .State = 1, .SprAttr = C2Scene_MapMarkerAttr, .SprX = the C2Scene_LocMarkerX word of this location (Loc_Id AND C2Scene_LocIdMask... - verified
C2Scene_LocMarkerX$C2:68E4 · 16 B · EngineC2Scene_TaskLocMarker's screen X for Loc_Id $1F0-$1F7 (index (location - Loc_FirstBankC2) * 2). - verified
C2Scene_MapViewGradient$C2:68F4 · 113 B · EngineSets up a blue gradient behind the picture: HDMA channel 1 in indirect mode writes COLDATA every line from C2Scene_HdmaTable record 0, two runs of 112 lines (C2Scene_MapGradRun: repeat flag and... - verified
C2Scene_MapViewLabel$C2:6965 · 139 B · EngineDraws a string into sprite tiles $20-$3F (VRAM C2Scene_MapLabelVram) with the text window code: clears the first $400 bytes of C2Scene_HdmaArea (C2Scene_ClearUnk8621) and uses them as the glyph... - verified
C2Scene_MapLabelStr$C2:69F0 · 8 B · EngineC2Scene_MapViewLabel's string number for Loc_Id $1F0-$1F7 (read as a word; only the low byte is kept). - verified
C2Scene_ScrMapViewStart$C2:69F8 · 7 B · EngineStarted by C2Scene_MapView: clears the task's fields, starts a mosaic shrink on BG1 and BG2 (op $2B, arg 1 = 3) at 2 frames per step and a fade in at 2 frames per step, ends. - verified
C2Scene_ScrMapViewExit$C2:69FF · 11 B · EngineStarted by C2Scene_MapZoomWait: raises C2Scene_MapMarkersOff (the markers end), starts a mosaic grow on BG1 and BG2 at 2 frames per step, waits 8 frames, fades out at 2 frames per step, ends... - verified
C2Scene_ScrMapViewMarkers$C2:6A0A · 14 B · EngineStarted by C2Scene_MapZoomOut when fully zoomed out: clears the task's fields, C2Scene_MapMarkersOff = 0, and starts the three marker tasks. - verified
C2Scene_AnimLeaderMarker$C2:6A18 · 8 B · EngineAnimation (C2Anim_Run) of C2Scene_TaskLeaderMarker: frame C2Scene_FrameMapMarkerA for 16 frames, nothing for 16, again: a blink. - verified
C2Scene_AnimObjAMarker$C2:6A20 · 10 B · EngineAnimation of C2Scene_TaskObjAMarker: 8 frames of nothing, frame C2Scene_FrameMapMarkerB for 16, 8 of nothing, again. - verified
C2Scene_FrameMapMarkerA$C2:6A2A · 5 B · EngineSprite frame (C2Scene_SprDrawNode): one piece at (-4, -4), tile 0 (the first tile C2Scene_MapView loaded from C2SceneRom_MapMarkerTiles). - verified
C2Scene_FrameMapMarkerB$C2:6A2F · 5 B · EngineThe same with tile 2 (the second marker tile). - verified
C2Scene_Dial$C2:6A34 · 148 B · EngineMode 8's sub-program: clears VRAM, the VRAM queue and the tasks; BG mode 7, OBSEL OBSEL_Size8And16_Base6000; BG1 scroll (C2Scene_DialBg1X, C2Scene_DialBg1Y), the BG2/BG3 scrolls, C2Scene_M7B, M7C... - verified
C2Scene_TaskDial$C2:6AC8 · 9 B · EngineTask handler started by C2Scene_DialLoad: runs .State through C2Scene_DialStates. - verified
C2Scene_DialStates$C2:6AD1 · 6 B · EngineC2Scene_TaskDial's handler for each .State. - verified
C2Scene_DialInit$C2:6AD7 · 135 B · EngineState 0: .State = 1; .Sel = the current location's entry (C2Scene_DialFindLoc). - verified
C2Scene_DialInput$C2:6B5E · 182 B · EngineState 1: reads Pad_Unk00F8 as a word and tests, in this order (first match wins, so e.g. C2Scene_DialBtnFwd beats C2Scene_PadRight and C2Scene_PadUp): C2Scene_DialBtnBack (back)... - verified
C2Scene_DialTurn$C2:6C14 · 131 B · EngineState 2, once per frame. - verified
C2Scene_DialLocs$C2:6C97 · 14 B · EngineThe Loc_Id of each marker 0-6 (C2Scene_DialSelLoc, C2Scene_DialFindLoc). - verified
C2Scene_DialLocsLate$C2:6CA5 · 14 B · EngineThe list used once C2Scene_Flag0Copy is C2Scene_DialLateFlag or more: marker 5 is $01F6 instead of $01F4. - verified
C2Scene_DialAngles$C2:6CB3 · 14 B · EngineThe hand's angle (Trig_Sin1024 units, 1024 per turn) for marker 0-6. - verified
C2Scene_DialDrawHand$C2:6CC1 · 620 B · Engine - verified
C2Scene_DialHandShape$C2:6F2D · 6 B · EngineThe hand's three points (dx, dy, signed bytes) about the centre at angle 0: the tip 40 pixels up, the base 4 pixels left and right. - verified
C2Scene_DialMul$C2:6F33 · 82 B · EngineSigned multiply: C2Scene_MulProduct (24-bit, $19-$1B) = the signed byte C2Scene_MulByte times the signed word C2Scene_MulWord, from the magnitudes on the hardware multiplier (low byte, then high... - verified
C2Scene_TaskSwirl$C2:6F85 · 9 B · EngineTask handler started by C2Scene_DialLoad: runs .State through C2Scene_SwirlStates (0: set up, 1: every frame after). - verified
C2Scene_SwirlStates$C2:6F8E · 4 B · EngineC2Scene_TaskSwirl's handler for each .State. - verified
C2Scene_SwirlInit$C2:6F92 · 245 B · EngineState 0: .State = 1, .Angle = 0.
Bank $C2 · $C2:7000–$7FFF
$C2:7000
Verified · 71
- verified
C2Scene_SwirlStep$C2:7087 · 188 B · EngineState 1, every frame: toggles C2Scene_DialSwirlBuf and points C2Scene_HdmaValues 2-5 at the other pair of buffers (C2Scene_SwirlCosB/ SinB, or back to A); copies the shown pair one line up into it... - verified
C2Scene_TaskDialMark$C2:7143 · 9 B · EngineTask handler of the seven markers (C2Scene_DialLoad starts one per .Sel 0-6): runs .State through C2Scene_DialMarkStates. - verified
C2Scene_DialMarkStates$C2:714C · 10 B · EngineC2Scene_TaskDialMark's handler for each .State. - verified
C2Scene_DialMarkInit$C2:7156 · 43 B · EngineState 0: .State = 1, .SprAttr = C2Scene_ObjAttrPrio3, .SprTile = 0, .SprX/.SprY = the bytes of C2Scene_DialMarkPos for .Sel (high bytes 0). - verified
C2Scene_DialMarkHidden$C2:7181 · 30 B · EngineState 1: nothing drawn until C2Scene_DialSel = .Sel; then .State = 2, the marker's select animation (C2Scene_DialMarkAnims, first byte) is started and run. - verified
C2Scene_DialMarkSelect$C2:719F · 15 B · EngineState 2: runs the animation; once .AnimTimer is 0 at the start of a frame, .State = 3. - verified
C2Scene_DialMarkShown$C2:71AE · 30 B · EngineState 3: runs the animation; when C2Scene_DialSel is no longer .Sel, .State = 4 and the deselect animation (C2Scene_DialMarkAnims, second byte) starts first. - verified
C2Scene_DialMarkDeselect$C2:71CC · 17 B · EngineState 4: runs the animation; once .AnimTimer is 0 at the start of a frame, .State = 1 (hidden again). - verified
C2Scene_DialMarkPos$C2:71DD · 14 B · EngineScreen X and Y (one byte each) of markers 0-6: around (C2Scene_DialCentreX, C2Scene_DialCentreY), marker 1 at the hand's tip for angle 0. - verified
C2Scene_DialMarkAnims$C2:71EB · 14 B · EngineC2SceneRom_AnimTable numbers of markers 0-6: select, then deselect. - verified
C2Scene_DialUnpack$C2:71F9 · 39 B · EngineUnpacks entry C2Tmp_08 of C2Scene_DialPacks, its source in bank A, to bank $7F (Decomp_ToWramVec). - verified
C2Scene_DialPacks$C2:7220 · 12 B · EngineSource and destination (bank $7F) address of the three packs C2Scene_DialLoad unpacks (the source banks are its arguments). - verified
C2Scene_DialUploadPixels$C2:722C · 40 B · EngineDMAs C2Scene_DialPixelBytes bytes of C2Scene_DecompBuf to VMDATAH from VRAM word 0: the pixels of mode-7 tiles 0-31. - verified
C2Scene_DialUploadMap$C2:7254 · 100 B · EngineDMAs the 32 rows of 32 words at C2Scene_DecompBuf (pack 2: tilemap low bytes, pixel high bytes) to VRAM 16 times, once at each C2Scene_DialMapBlocks address: a 4 x 4 grid of 32 x 32 blocks over... - verified
C2Scene_DialMapBlocks$C2:72B8 · 32 B · EngineVRAM word address of each 32 x 32 block of C2Scene_DialUploadMap. - verified
C2Scene_DialUploadObjTiles$C2:72D8 · 73 B · EngineFor each of C2Scene_DialObjLeft bytes of the list at C2Scene_DialList (24-bit, stepped on): DMAs 4bpp tile (byte) of the source at C2Scene_DialObjSrc (24-bit; tile * 32 added) to VRAM... - verified
C2Scene_DialObjTileList$C2:7321 · 64 B · EngineThe tiles of pack 0 that become sprite tiles 0-$3F (C2Scene_DialUploadObjTiles). - verified
C2Scene_DialUnpackNibbles$C2:7361 · 40 B · EngineSplits the C2Scene_DialNibbleBytes bytes at C2SceneRom_DialNibbles into two bytes each, high nibble first, written through WMDATA to C2Scene_DecompBuf: one byte per pixel, as mode-7 tiles take them. - verified
C2Scene_DialLoad$C2:7389 · 209 B · EngineLoads the dial and starts its tasks: - pack 0 (bank C2Scene_DialPack0Bank) into C2Scene_DecompBuf; its $800 bytes from C2Scene_DialObjSrcB to sprite tiles $40 on (VRAM C2Scene_DialObjVramB), and... - verified
C2Scene_DialSelLoc$C2:745A · 32 B · EngineA = the Loc_Id word of marker .Sel (task X) in C2Scene_DialLocs, or in C2Scene_DialLocsLate once C2Scene_Flag0Copy is C2Scene_DialLateFlag or more. - verified
C2Scene_DialFindLoc$C2:747A · 52 B · EngineA = the marker (0-6) whose location in the list C2Scene_DialSelLoc would use is Loc_Id AND C2Scene_LocIdMask; 6 when none is. - verified
C2Scene_ScrDialFadeIn$C2:74AE · 5 B · EngineStarted last by C2Scene_DialLoad: fade in at 1 frame per step, wait 16 frames, end. - verified
C2Scene_ScrDialFadeOut$C2:74B3 · 5 B · EngineStarted by C2Scene_Dial when the mode changes: fade out at 1 frame per step, wait 16 frames, end. - verified
C2Scene_ScrDialCentre$C2:74B8 · 76 B · EngineStarted by C2Scene_DialLoad: a large sprite (.SprTile bit 14: C2Scene_SprTileLarge in the high byte) at (C2Scene_DialCentreX + 4, $60) with priority bits $30 and palette bits 8, animation $36... - verified
C2Scene_ScrDialPalCycle$C2:7504 · 73 B · EngineStarted by C2Scene_DialLoad: for good, palette 0 faded (12 frames per step) to the next of seven 32-byte rows of C2Scene_UnkC000 ($7E:C020 to $7E:C0C0, then $7E:C000), 384 frames apart. - verified
C2Scene_PlaceBelowView$C2:754D · 40 B · EngineScript routine: puts the task at a random X 64-191 pixels into BG2's view (C2Scene_BgTileX+2 x 8 + a random 0-127 + 64) and 256 pixels below the view's top (C2Scene_BgTileY+2 + 32 tile rows, x 8)... - verified
C2Scene_PlaceBelowViewAt178$C2:7575 · 35 B · EngineScript routine: as C2Scene_PlaceBelowView, but X is pixel $178 (tile column C2Scene_PlaceFixedCol) + a random 0-255, not relative to the view; Y is again 256 pixels below the top of BG2's view. - verified
C2Scene_RandomVelocity$C2:7598 · 43 B · EngineScript routine: gives the task one of 16 velocities at random: the four words of entry (random AND 15) of C2SceneRom_RandVelocities go to .XVelFrac, .XVel, .YVelFrac and .YVel. - verified
C2Scene_TaskBg3Drift$C2:75C3 · 58 B · EngineTask handler (started by op $35 at $C3:8BBD): while object A is not in mode 8, counts frames in .Var22 and moves BG3 one pixel left every 4th frame and one pixel down every 8th; then adds the... - verified
C2Scene_TaskBg3DriftWave$C2:75FD · 85 B · EngineTask handler (op $35 at $C3:980D, next to C2Scene_TaskBg3Wave's at $C3:9811): as C2Scene_TaskBg3Drift, but BG3 moves one pixel left and one down together every 4th frame, and the leader's Y move... - verified
C2Scene_TaskBg3Wave$C2:7652 · 176 B · EngineTask handler (op $35 at $C3:9811): a horizontal wave on BG3. - verified
C2Scene_TaskBg3Slide$C2:7702 · 87 B · EngineTask handler (op $35 at $C3:9F92): while object A is not in mode 8, moves BG3 by a fixed velocity, X about -3.46 and Y +2 pixels a frame (set into .XVelFrac-.YVel on the first frame, .State 0 ->... - verified
C2Scene_TaskBg3LineWave$C2:7759 · 153 B · EngineTask handler (no reference found; laid out as C2Scene_TaskBg3Wave): in forced blank only turns HDMA channel 1 off; waits while object A is in mode 8. - verified
C2Scene_TaskBg3SlideFast$C2:77F2 · 87 B · EngineTask handler (op $35 at $C3:AC92): C2Scene_TaskBg3Slide with the velocity X about -17.32 and Y -10 pixels a frame. - verified
C2Scene_TaskBg1Pan$C2:7849 · 23 B · EngineTask handler (no op $35 reference found): counts frames in .Var22 (8-bit) and every 4th frame scrolls layer 1 one pixel (C2Scene_Unk0568 with C2Scene_ScrollLayer = C2Scene_ScrollPx = 1), which... - verified
C2Scene_ClearParty$C2:7860 · 15 B · EngineScript routine: marks all three Party_Members slots empty (C2Scene_PartySlotEmpty). - verified
C2Scene_SaveParty$C2:786F · 25 B · EngineScript routine: copies the three Party_Members bytes to C2Scene_PartySave (C2Scene_RestoreParty puts them back). - verified
C2Scene_RestoreParty$C2:7888 · 25 B · EngineScript routine: copies C2Scene_PartySave back to Party_Members. - verified
C2Scene_TaskInView$C2:78A1 · 66 B · EngineScript routine (op $34 at $C3:8E82, followed by an op $23 test of $0000): C2Tmp_00 = 1 when the task is in BG2's view with a margin, else 0. - verified
C2Scene_Win1Init$C2:78E3 · 46 B · EngineScript routine: sets up C2Scene_HdmaTable[0] (two runs of 112 lines) as HDMA channel 1 to WH0/WH1 (indirect, two registers), turns the channel on, zeroes the buffer toggle .Var24 and falls into... - verified
C2Scene_Win1Step$C2:7911 · 70 B · Engine - verified
C2Scene_Win2Init$C2:7957 · 42 B · EngineScript routine (op $34 at $C3:A937): sets up C2Scene_HdmaTable[1] (two runs of 112 lines) as HDMA channel 2 to WH2/WH3 (indirect, two registers) and turns the channel on. - verified
C2Scene_Win2Step$C2:7981 · 71 B · EngineScript routine (op $34 at $C3:A93E, right after C2Scene_Win2Init's): adds one to .Var24 and picks C2Scene_SwirlCosB (now odd) or C2Scene_SwirlCosA (even) as WinFx_TablePtr (bank $7E), has... - verified
C2Scene_AddGravity$C2:79C8 · 24 B · EngineScript routine: adds 1/8 pixel a frame (C2Scene_GravityFrac) to the task's Y velocity (.YVelFrac, carrying into .YVel). - verified
C2Scene_NudgeXRandom$C2:79E0 · 44 B · EngineScript routine (op $34 at $C3:B792 and $C3:CB7E): moves the task right by a random 0-48 pixels: a random byte x C2Scene_NudgeRange / 256 (WRMPYA/B), rounded up when the low byte of the product has... - verified
C2Scene_RandPosA$C2:7A0C · 19 B · EngineScript routine: .SprX = $220 + a random 0-255, then falls into the sub-entry C2Scene_RandYA ($C2:7A1F): .SprY = $38 + a random 0-255. - verified
C2Scene_RandYA$C2:7A1F · 18 B · Engine - verified
C2Scene_RandPosB$C2:7A31 · 19 B · EngineScript routine: as C2Scene_RandPosA with .SprX = $E0 + a random 0-255, falling into the sub-entry C2Scene_RandYB ($C2:7A44): .SprY = -$48 + a random 0-255. - verified
C2Scene_RandYB$C2:7A44 · 18 B · Engine - verified
C2Scene_NoiseInit$C2:7A56 · 89 B · EngineScript routine (op $34 at $C3:C953): sets up C2Scene_HdmaTable[0] (two runs of 112 lines) as both HDMA channel 1 to BG1HOFS and channel 2 to BG2HOFS (indirect, one register twice: both layers get... - verified
C2Scene_NoiseStep$C2:7AAF · 43 B · EngineScript routine: moves both C2Scene_HdmaValues words 0-1 on by 32 lines (C2Scene_NoiseStep bytes), back to C2Scene_HandBufA when they reach its end ($8D16), so the screen shows the next part of the... - verified
C2Scene_NoiseShow$C2:7ADA · 17 B · EngineScript routine (op $34 at $C3:CA30): points C2Scene_HdmaValues words 0-1 at C2Scene_HandBufA and its second half (the noise). - verified
C2Scene_NoiseHide$C2:7AEB · 17 B · EngineScript routine (no reference found): points C2Scene_HdmaValues words 0-1 at C2Scene_HandBufB and its second half (every line the plain C2Scene_Bg1HScroll that C2Scene_NoiseInit stored). - verified
C2Scene_UnpackBgPack$C2:7AFC · 36 B · EngineScript routine (op $34 at $C3:A130 and $C3:C16E): unpacks the C2SceneRom_BgPacks entry at byte offset C2Tmp_08 (entry x 3, a word set by the script) into C2Scene_DecompBuf. - verified
C2Scene_UnpackBg3MapPack$C2:7B20 · 36 B · EngineScript routine (op $34 in the unpacked C2SceneRom_ScriptPacks 2, $C3:9F41, at +$0286 and 6, $C3:BF7B, at +$027E, each a few ops after that pack's op $34 to C2Scene_UnpackBgPack; the bytes are... - verified
C2Scene_SetUnk7F00AABit0$C2:7B44 · 11 B · EngineScript routine (op $34 at $C3:CCA3): sets bit 0 of C2Scene_Unk7F00AA (a byte of Menu_FlagBlock7F; what it means is not traced). - verified
C2Scene_SetUnk7F019ABit3$C2:7B4F · 11 B · EngineScript routine (op $34 at $C3:9238): sets bit 3 of C2Scene_Unk7F019A (Menu_FlagBlock7F; meaning not traced). - verified
C2Scene_LoadExtraObjPack$C2:7B5A · 37 B · EngineUnpacks entry C2Scene_ExtraObjPack of C2SceneRom_ObjPacks into C2Scene_DecompBuf. - verified
C2Scene_LoadExtraPalette$C2:7B7F · 32 B · EngineUnpacks entry C2Scene_ExtraPalPack of C2SceneRom_PalettePacks to A:X (C2Scene_LoadLocExtraGfx passes bank $00 and an address inside C2Scene_PaletteBuf). - verified
C2Scene_LoadUnkC600$C2:7B9F · 37 B · EngineUnpacks entry C2Scene_UnkC600Pack of C2SceneRom_PalettePacks into C2Scene_UnkC600 ($7E:C600); what it holds is not traced. - verified
C2Scene_TestUnk7F00F7Bit1$C2:7BC4 · 13 B · EngineScript routine (op $34 at $C3:98F4): C2Tmp_00 = 1 when bit 1 of C2Scene_Unk7F00F7 is set, else 0. - verified
C2Scene_SetConfig1E$C2:7BD1 · 7 B · EngineScript routine (op $34 at $C3:B665 and $C3:C669): Menu_Config1E (the byte LocLoad_AudioSetup keeps the music track in) = C2Tmp_00. - verified
C2Scene_BuildPatternTiles$C2:7BD8 · 80 B · EngineScript routine (no op $34 reference found): builds ten 4bpp tiles at C2Scene_PatternTiles ($7F:9000, the unpack buffer): zeroes the first eight ($100 bytes) and sets the two after them... - verified
C2Scene_PatternRows$C2:7C28 · 32 B · EngineBit plane 0 rows of the four tile pairs C2Scene_BuildPatternTiles builds, 8 rows per pair, sparse to full. - verified
C2Scene_SetUnk7F00CE$C2:7C48 · 7 B · EngineScript routine (no op $34 reference found): C2Scene_Unk7F00CE = C2Tmp_00. - verified
C2Scene_SetUnk7F00DA$C2:7C4F · 7 B · EngineScript routine (op $34 at $C3:C448): C2Scene_Unk7F00DA = C2Tmp_00. - verified
C2Scene_Bg2HWaveInit$C2:7C56 · 65 B · EngineScript routine (op $34 at $C3:C18F): sets up C2Scene_HdmaTable[0] (two runs of 112 lines) as HDMA channel 1 to BG2HOFS (indirect, one register twice) and turns it on, zeroes the buffer toggle... - verified
C2Scene_Bg2VWaveInit$C2:7C97 · 65 B · EngineScript routine (no op $34 reference found): as C2Scene_Bg2HWaveInit for BG2VOFS: C2Scene_HdmaTable[1] as HDMA channel 2, zeroes .Var26 and $7E:9176-$7E:95D5 (C2Scene_SwirlCosA to the end of... - verified
C2Scene_Bg2HWaveStep$C2:7CD8 · 134 B · EngineScript routine (op $34 at $C3:C1A1, probably once a frame): one step of a wave that runs up BG2: adds one to .Var26 and, by its parity, shows C2Scene_HandBufA (now even) or C2Scene_HandBufB (odd)... - verified
C2Scene_Bg2VWaveStep$C2:7D5E · 134 B · EngineScript routine (no op $34 reference found): C2Scene_Bg2HWaveStep for BG2VOFS: C2Scene_SwirlCosA (even) or C2Scene_SwirlCosB (odd) through C2Scene_HdmaValues words 2-3 (C2Scene_HdmaTable[1]). - verified
BankC2_FreeSpace7DE4$C2:7DE4 · 540 B · Engine$FF fill up to $C2:8000, where the menu part of the bank starts (BankC2_Entry8000).
Bank $C2 · $C2:8000–$8FFF
$C2:8000
Verified · 112
- verified
BankC2_Entry8000$C2:8000 · 2 B · EngineThree BRAs, the bank's second set of fixed entry points, each reached by JSL from other banks: $8000 BankC2_Entry8000 → BankC2_MenuEntry (A = an argument chosen by the caller, 0-6: the menu) $8002... - verified
BankC2_Entry8002$C2:8002 · 2 B · Engine - verified
BankC2_Entry8004$C2:8004 · 2 B · Engine - verified
BankC2_ReadPadLong$C2:8006 · 4 B · EngineMenu_ReadPad as a long call (the BankC2_Entry8002 vector). - verified
BankC2_CommandLong$C2:800A · 4 B · EngineMenu_RunCommand as a long call (the BankC2_Entry8004 vector). - verified
BankC2_MenuEntry$C2:800E · 129 B · EngineThe menu (reached by BRA from BankC2_Entry8000). - verified
Menu_EntryModes$C2:808F · 7 B · EngineMenu_Mode for each BankC2_MenuEntry argument 0-6 (an index into Menu_ModeLists). - verified
Menu_InitSystems$C2:8096 · 166 B · EngineThe menu's setup: DP=$0000; copies Menu_InterruptVectors (JML Menu_Nmi, JML Menu_Irq) over NmiTrampoline/IrqTrampoline ($0500-$0507; the MVN leaves DB=$7E); sends five sound-driver commands... - verified
Menu_CalcUnk0D38$C2:813C · 46 B · Engine - verified
Menu_BuildPartyLists$C2:816A · 38 B · EngineLists the characters of Menu_PartyOrder that are present (bit 7 clear) in Menu_PartyList, with their positions in Menu_PartyListPos, and counts them: Menu_PartyActive (positions 0-2) and... - verified
Menu_RunThreads$C2:8190 · 74 B · EngineThe menu's scheduler; never returns. - verified
Menu_RunThreadsNext$C2:81DA · 60 B · Engine - verified
Menu_ThreadEnd$C2:8216 · 8 B · Engine - verified
Menu_Yield$C2:821E · 13 B · Engine - verified
Menu_YieldFrames$C2:822B · 11 B · Engine - verified
Menu_YieldSave$C2:8236 · 19 B · Engine - verified
Menu_StartThread$C2:8249 · 12 B · EnginePuts a new thread in the slot at byte offset X: .Entry = A, .State = new and .Wait = 1 (it starts on the scheduler's next pass). - verified
Menu_KillThreads$C2:8255 · 23 B · EngineFrees the slots whose bit is set in A's low byte (bit n: slot n). - verified
Menu_MainThread$C2:826C · 3 B · EngineThread 1 (Menu_RunThreads starts it at the sub-entry Menu_MainThreadStart, $C2:826F): each frame calls handler Menu_ThreadVar of Menu_Mode's list in Menu_ModeLists (a list of 16-bit addresses in... - verified
Menu_MainThreadStart$C2:826F · 34 B · Engine - verified
Menu_ModeNone$C2:8291 · 1 B · EngineAn RTS that Menu_ModeLists entries 8-10 point at as their list: read as a list it gives handler $CA60 for index 0, so modes 8-10 are probably not used. - verified
Menu_ModeLists$C2:8292 · 32 B · EngineOne 16-bit address (bank $C2) per Menu_Mode $00-$0F: the list of handler addresses Menu_MainThread indexes by Menu_ThreadVar. - verified
Menu_Exit$C2:82B2 · 47 B · EngineLeaves the menu back to the caller of BankC2_Entry8000: frees every thread (Menu_KillThreads), Menu_Unk834D, fades out (Menu_FadeOut), forced blank, NMI off (auto-joypad on), DMA and HDMA off, S =... - verified
Menu_Unk82E1$C2:82E1 · 63 B · EngineZeroes Menu_Unk2857 (5 bytes), then for each of the 7 Menu_CharRecords whose Menu_CharRec.Unk2A is $AE-$B2: when the Menu_Unk04A4 byte of that value (- $AE) is non-zero, sets the Menu_Unk2857 byte... - verified
Menu_ExitToGame$C2:8320 · 15 B · EngineLeaves the menu for the game loop: frees every thread, Menu_Unk834D, fades out, then the sub-entry Menu_ExitRestart ($C2:832F; also BankC2_MenuEntry's new-game path): forced blank, NMI off... - verified
Menu_ExitRestart$C2:832F · 30 B · Engine - verified
Menu_Unk834D$C2:834D · 56 B · EngineFor each active party member (Menu_PartyOrder positions 0-2 not empty) copies the 6-byte bank-$D1 record of its weapon (Menu_WeaponRecSrc returns the MVN's source and the count - 1) into... - verified
Menu_QueueVramRom$C2:8385 · 9 B · EngineAppends the 8-byte VRAM upload (Menu_VramRec) at $C2:X to Menu_VramQueue (at Menu_VramQueueEnd, which then goes up by 8; Menu_FlushVramQueue sends them); the sub-entry Menu_QueueVramWram... - verified
Menu_QueueVramWram$C2:838E · 7 B · Engine - verified
Menu_QueueVramTail$C2:8395 · 13 B · Engine - verified
Menu_VramQueueSlot$C2:83A2 · 16 B · EngineY = Menu_VramQueue + Menu_VramQueueEnd (the next record's address) and A = 7 (the MVN count of 8 bytes). - verified
Menu_StartFadeIn$C2:83B2 · 11 B · EngineStarts Menu_FadeInThread in slot 0. - verified
Menu_FadeInThread$C2:83BD · 13 B · EngineThread: waits a frame, fades the brightness up by 2 a frame (Menu_Fade) and ends. - verified
Menu_FadeOut$C2:83CA · 6 B · EngineMenu_Fade with a step of -2 (to black). - verified
Menu_Fade$C2:83D0 · 54 B · EngineFades the screen: Menu_FadeStep = A (signed), Menu_FadeFrames = 1; then repeatedly adds the step to Menu_InidispShadow's brightness (bits 0-3): past 0 or down to it the brightness is left at 0 and... - verified
Menu_InterruptVectors$C2:8406 · 8 B · EngineCopied over NmiTrampoline / IrqTrampoline ($0500-$0507) by Menu_InitSystems: JML Menu_Nmi and JML Menu_Irq, the menu's interrupt handlers. - verified
Menu_Nmi$C2:840E · 100 B · EngineThe menu's NMI handler: saves DB, X, Y, P, then on its own stack (Menu_NmiStackTop; the old S kept in Menu_NmiSavedSp) A, D and P; DB = $00, DP = Menu_NmiDp. - verified
Menu_Irq$C2:8472 · 1 B · EngineThe menu's IRQ handler (through the JML at $C2:840A): returns at once. - verified
Menu_NmiPad$C2:8473 · 93 B · EngineThe menu NMI's pad step. - verified
Menu_RepeatDelays$C2:84D0 · 2 B · EngineMenu_PadRepeatDelay for Menu_RepeatStage 0 and 1. - verified
Menu_ReadPad$C2:84D2 · 26 B · EngineThe pad reader behind BankC2_Entry8002, run once a frame by the scene NMI and by other banks: reads joypad 1 (Menu_PollPad), maps it through the button configuration (Menu_MapButtons) and advances... - verified
Menu_PollPad$C2:84EC · 89 B · EngineWaits for the auto-joypad read to finish and rebuilds the pad words from JOY1 (layout as Pad_Pressed: low byte A X L R B Y Select Start, high byte Up Down Left Right in bits 3-0)... - verified
Menu_MapButtons$C2:8545 · 16 B · EngineTurns the three pad words into the game's button bytes through the configured button map (Menu_ButtonMap, 8 masks in the Pad_Pressed layout Menu_PollPad builds, not JOY1's): bit n of the result is... - verified
Menu_MapButtonsOne$C2:8555 · 89 B · Engine - verified
Menu_TickPlayTime$C2:85AE · 34 B · EngineAdds one frame to the play-time clock unless Menu_PlayTimePaused is set: Menu_PlayTime byte 0 counts up, and each byte that reaches its limit in Menu_PlayTimeLimits goes back to 0 and carries into... - verified
Menu_PlayTimeLimits$C2:85D0 · 6 B · EngineThe count at which each Menu_PlayTime byte wraps, lowest first: frames (60), seconds (60), minutes in two digits (10, then 6) and hours in two digits (10, 10). - verified
Menu_NmiUpload$C2:85D6 · 141 B · EngineThe menu NMI's frame upload (Menu_Nmi runs it with HDMA off when the menu loop has a frame ready): - BG1HOFS-BG3VOFS from the 12 bytes at Menu_ScrollShadow, each register written twice (low... - verified
Menu_FlushVramQueue$C2:8663 · 70 B · EngineSends Menu_VramQueue to VRAM, newest record first, each by DMA channel 7 to VMDATAL/H (two registers): VMADD = .Dest, from .SrcBank:.Src, .Size bytes (the direct page walks the records), then... - verified
Menu_UploadPalette$C2:86A9 · 52 B · EngineWhen Menu_PalDirty is non-zero: zeroes it and sends the 512 bytes of Menu_PalBuf ($7E:9480) to CGRAM from colour 0 by DMA channel 7. - verified
Menu_BuildGradient$C2:86DD · 148 B · EngineBuilds an HDMA table of colour math lines for channel 0 (direct, two registers: CGADSUB then COLDATA, set here; the table address is set by the menu NMI from Menu_GradBufSel): copies... - verified
Menu_GradientSteps$C2:8771 · 32 B · Engine16 CGADSUB / COLDATA pairs for Menu_BuildGradient: add (CGADSUB $02: BG2) the fixed colour of intensity 8 down to 0 (COLDATA $E8-$E0, all three channels), then subtract ($82) intensity 1 up to 7. - verified
Menu_AddItem$C2:8791 · 60 B · EngineAdds Menu_ItemCount of item Menu_ItemId to the inventory: to its slot (Menu_FindItem) or else to the first empty one (id stored, count 0), the count capped at 99. - verified
Menu_ItemSetCount$C2:87CD · 8 B · Engine - verified
Menu_RemoveItem$C2:87D5 · 37 B · EngineTakes Menu_ItemCount of item Menu_ItemId from its slot: A = Menu_ItemShort when it has fewer (nothing changed), Menu_InvFull when it is not there; else the new count is stored (Menu_ItemSetCount)... - verified
Menu_FindItem$C2:87FA · 28 B · EngineFinds the slot of item A with a non-zero count: C=0 with X = the slot and Menu_ItemSlot = X (a word), or C=1 with X = 0 (all 256 slots looked at). - verified
Menu_LoadCharRec$C2:8816 · 10 B · EngineMenu_LoadCharRecA for character A, keeping P and X. - verified
Menu_LoadPartyCharRec$C2:8820 · 25 B · EngineLoads the character at Menu_PartyList[Menu_CurMember] (Menu_LoadCharRecA); Menu_CurIsReserve = $FF when that index is past the active members (Menu_PartyActive), else 0. - verified
Menu_LoadCharRecA$C2:8839 · 72 B · EngineCopies the Menu_CharRecords record of character A (A x $50) to Menu_CurCharRec (its address kept in Menu_CurCharRecPtr), then the 6-byte Menu_Unk2C23 entry of the record's first byte AND 7 to... - verified
Menu_ItemCategory$C2:8881 · 38 B · EngineThe category of item A by Menu_ItemCategoryBounds (0: below $5A, 1: $5A-$7A, 2: $7B-$93, 3: $94-$BB, 4: from $BC) into Menu_ItemCategory, and its index within the category (A - the category's... - verified
Menu_ItemCategoryBounds$C2:88A7 · 6 B · EngineThe first item id of categories 0-4, then the end of the ids ($F2, the slot count Menu_ListEquipItems scans; not read by Menu_ItemCategory). - verified
Menu_ItemDataPtrA$C2:88AD · 43 B · EngineMenu_ItemCategory for item A, then X = Menu_ItemDataPtr = the address (bank $CC: the callers read the record with LDA $CC0000,X; only the pointer and size tables are in bank $FF) of the item's... - verified
Menu_ItemDataPtrB$C2:88D8 · 40 B · EngineAs Menu_ItemDataPtrA for the second set of per-category tables (MenuRom_ItemTablesB, MenuRom_ItemRecSizesB), using the Menu_ItemCategory / Menu_ItemIndex left by an earlier call; result in... - verified
Menu_CountEquippedBy$C2:8900 · 79 B · EngineFor each character of Menu_EquipChars (up to 7, stopping at the first with bit 7 set): Menu_EquipFlags[n] = 1 when the byte of its Menu_CharRecords record at the category's Menu_EquipSlotOffsets... - verified
Menu_EquipSlotOffsets$C2:894F · 4 B · EngineThe Menu_CharRec offset of the equipped item of categories 0-3 ($29, $28, $27, $2A), as Menu_CountEquippedBy reads it (inferred from that use only). - verified
Menu_ListEquipItems$C2:8953 · 137 B · EngineLists the inventory items of Menu_ListKind's id range (Menu_EquipListRanges: 0 $00-$59, 1 $7B-$93, 2 $5A-$7A, 3 $94-$BB) that the current character can equip (Menu_CanEquip: A non-zero), from... - verified
Menu_EquipListRanges$C2:89DC · 8 B · EngineFirst id and end id of each Menu_ListKind (Menu_ListEquipItems). - verified
Menu_StartCursorA$C2:89E4 · 14 B · EngineMenu_CursorYOfs = 0 and starts Menu_CursorThreadA in slot 6. - verified
Menu_CursorThreadA$C2:89F2 · 8 B · EngineThread: Menu_CursorStepA, wait a frame, for ever. - verified
Menu_CursorStepA$C2:89FA · 55 B · EngineOne frame of cursor A: blinks (Menu_CursorBlink) and, in the shown phase, when row Menu_Unk0D9D - Menu_Unk0416 + Menu_CursorIndex is below 10 (probably the row on screen of a scrolled list), puts... - verified
Menu_StartCursorB$C2:8A31 · 20 B · EngineMenu_CursorTileAttr = Menu_Unk0772 and starts Menu_CursorThreadB in slot 6. - verified
Menu_CursorThreadB$C2:8A45 · 83 B · EngineThread: each frame blinks (Menu_CursorBlink) and, in its phase with bit 0 clear, puts sprite 0 at Menu_CursorIndex's Menu_CursorPos (X + 2; Y - 1) with Menu_CursorTileAttr. - verified
Menu_StartCursorC$C2:8A98 · 26 B · EngineMenu_BlinkMask = $FC, Menu_CursorTileAttr = Menu_Unk0772, and starts Menu_CursorThreadC in slot 6. - verified
Menu_CursorThreadC$C2:8AB2 · 8 B · EngineThread: Menu_CursorStepC, wait a frame, for ever. - verified
Menu_CursorStepC$C2:8ABA · 27 B · EngineOne frame of cursor C: blinks with Menu_BlinkMask (Menu_CursorBlinkMasked) and, in its phase with bit 0 clear, puts sprite 0 at Menu_CursorIndex's Menu_CursorPos (X + 2, Y - 1) with... - verified
Menu_StartCursorD$C2:8AD5 · 32 B · EngineStarts Menu_CursorThreadD in slot 6 with the three blink timers at 3, 1 and 2 and Menu_CursorBlink = 2 (sprite 1 starts hidden). - verified
Menu_CursorThreadD$C2:8AF5 · 8 B · EngineThread: Menu_CursorStepD, wait a frame, for ever. - verified
Menu_CursorStepD$C2:8AFD · 108 B · EngineOne frame of cursor D, one blinking cursor per active party member (Menu_PartyActive of them): tiles and attributes $3020 into all three sprites (and $20 into Menu_Unk0D9B); each of the three... - verified
Menu_CursorBlinkMasked$C2:8B69 · 5 B · EngineBlink timer 0: clears the bits of Menu_BlinkTimers[0] that A has set (Menu_CursorBlinkMasked passes Menu_BlinkMask; the sub-entry Menu_CursorBlink, $C2:8B6E, $FC, leaving a count 0-3), counts it... - verified
Menu_CursorBlink$C2:8B6E · 23 B · Engine - verified
Menu_CursorPosAB$C2:8B85 · 14 B · EngineThe sprite position for cursor index A: with M=1, A = X + 2 and B = Y - 1 of its Menu_CursorPos record (X = the record offset, Menu_CursorRecOffset). - verified
Menu_StartListArrows$C2:8B93 · 19 B · EngineMenu_ArrowsOff = 0 and starts Menu_ListArrowsThread in slot 4. - verified
Menu_Times4$C2:8BA6 · 18 B · EngineA = the low byte of A x 4, through the hardware multiplier (two XBAs and a NOP as the wait). - verified
Menu_ListArrowsThread$C2:8BB8 · 126 B · EngineThread (slot 4): each frame counts Menu_ArrowTimer (7..0) and toggles bit 0 of Menu_ArrowBlink when it wraps. - verified
Menu_RunCommand$C2:8C36 · 36 B · EngineRuns command A (Menu_CommandTable) with Menu_CmdChar = Y and Menu_ItemId = X (low bytes), stores its result A in Menu_CmdResult, runs Menu_Unk834D (for every command) and returns the result. - verified
Menu_RunCommand_Return$C2:8C5A · 1 B · Engine - verified
Menu_CommandTable$C2:8C5B · 26 B · EngineMenu_RunCommand's handlers by command number (BankC2Cmd_* in constants_engine.inc). - verified
Menu_CmdFindInParty$C2:8C75 · 4 B · EngineCommand 0: Menu_CmdFindListed over the 3 active positions only. - verified
Menu_CmdAddToParty$C2:8C79 · 26 B · EngineCommand 1: puts character Menu_CmdChar in the active party. - verified
Menu_CmdJoin$C2:8C93 · 15 B · Engineposition Y = Menu_CmdChar, and its bit in Menu_Unk29AF (BankFF_CharBits: $80 for character 0 ... $01 for 7) set; A = the character. - verified
Menu_CmdPartyToReserve$C2:8CA2 · 28 B · EngineCommand 2: when character Menu_CmdChar is in the active party, the members after it move up one, the third position is emptied (bit 7 set on the byte now there), and the character goes to the... - verified
Menu_CmdPushReserve$C2:8CBE · 17 B · Engine - verified
Menu_CmdFindListed$C2:8CCF · 2 B · EngineCommand 3: looks for character Menu_CmdChar in Menu_PartyOrder positions 0 to Menu_CmdLimit - 1 (all 9 here; 3 from the sub-entry Menu_CmdFindListed_Limit, A = the count, used by Menu_CmdFindInParty). - verified
Menu_CmdFindListed_Limit$C2:8CD1 · 20 B · Engine - verified
Menu_CmdAddToReserve$C2:8CE5 · 18 B · EngineCommand 4: unless character Menu_CmdChar is listed already, puts it in the first empty reserve position (Menu_CmdJoin, which also sets its Menu_Unk29AF bit); nothing when the reserve is full. - verified
Menu_CmdUnlist$C2:8CF7 · 14 B · EngineCommand 5: empties the Menu_PartyOrder position of character Menu_CmdChar (bit 7 set; nothing moves up). - verified
Menu_CmdRefillWord3$C2:8D05 · 23 B · EngineCommand 6: Menu_RecRefillWord3 for each of the 7 Menu_CharRecords. - verified
Menu_RecRefillWord3$C2:8D1C · 41 B · EngineFor the Menu_CharRecords record at Y: word .Word3 = word .Word5 plus a bonus by .Unk2A ($A1: half of .Word5, $A0: a quarter, else none), capped at 999. - verified
Menu_CmdRefillByte7$C2:8D45 · 30 B · EngineCommand 7: for each of the 7 Menu_CharRecords, byte .Word7 = byte .Word9 (low bytes only). - verified
Menu_CmdSetSram7FE2$C2:8D63 · 7 B · EngineCommand 8: Menu_SramUnk7FE2 = $FF (BankC2_MenuEntry's new-game path zeroes it; meaning not traced). - verified
Menu_CmdBootCheckSaves$C2:8D6A · 37 B · EngineCommand 9 (BankC2_BootArg, from GameLoop at boot): runs BankFF_UnkF9C4 for Menu_SaveSlot = 0, 1, 2 until one returns A = 0: the save-slot check (the slot's signature word and checksum in SRAM... - verified
Menu_CmdEquip$C2:8D8F · 80 B · EngineCommand $0A: equipment of character record Menu_CmdChar (the Menu_CharRecords index), item Menu_ItemId: - id 0: the four equipment bytes (Menu_EquipSlotOffsets) get the "no item" ids of... - verified
Menu_EquipNoneIds$C2:8DDF · 4 B · Enginethe "no item" id of categories 0-3. - verified
Menu_CmdEquipItem$C2:8DE3 · 59 B · Enginethe item path (Menu_ItemId non-zero). - verified
Menu_CmdItemCount$C2:8E1E · 15 B · EngineCommand $0C: A = the count of item Menu_ItemId held (Menu_FindItem), 0 when there is none. - verified
Menu_ApplyHeal$C2:8E2D · 85 B · EngineMenu_HealShown's six words = $FFFF (nothing to show); the amounts (Menu_CalcHealAmounts); then for member Menu_UseTarget, or with Menu_UseKind bit 3 every active member (Menu_PartyActive of them... - verified
Menu_HealHp$C2:8E82 · 41 B · EngineMember X / 2's HP amount (Menu_HealAmounts), or the record's .Unk3F (max HP) when Menu_UseAmountB bit 6 is set (the 16-bit BIT of Menu_UseAmountA: V = bit 14); at most 999; that goes to... - verified
Menu_HealMp$C2:8EAB · 33 B · EngineAs Menu_HealHp for MP: amount Menu_HealAmounts[3 + X / 2], or .Word9 (max MP) when full, to Menu_HealShown[3 + X / 2] (no cap), added to .Word7, at most .Word9. - verified
Menu_CalcHealAmounts$C2:8ECC · 137 B · EngineThe six Menu_HealAmounts words (HP for members 0-2, then MP), with DB=$00 for the multiplier. - verified
Menu_UseHealOn$C2:8F55 · 23 B · EngineMenu_UseHealItem's confirm: Menu_ApplyHeal, colours $84-$87 = MenuRom_HealNumberPal, Menu_ShowHealNumbers. - verified
Menu_ShowHealNumbers$C2:8F6C · 95 B · EngineShows the Menu_HealShown amounts over the members' sprites and waits for them: the digit tiles (BankFF_WidenTiles) queued (Menu_VramRecDigits); the palette flagged; Menu_HealCount and... - verified
Menu_HealNumberHp$C2:8FCB · 36 B · EngineMember Menu_CurMember's HP amount (Menu_HealShown[member]), unless negative (none): its BCD (Menu_BinToBcd, 2 bytes) word to Menu_HealShown at Menu_Tmp00 (the packed index), Menu_HealParts = 1... - verified
Menu_HealNumberMp$C2:8FEF · 39 B · EngineAs Menu_HealNumberHp for the MP amount (Menu_HealShown + 6, one byte to BCD), into Menu_HealShown + 6 at Menu_Tmp00, Menu_HealParts bit 1.
Bank $C2 · $C2:9000–$9FFF
$C2:9000
Verified · 63
- verified
Menu_HealNumbersThread$C2:9016 · 49 B · EngineThe thread of Menu_ShowHealNumbers (slot 7): with Menu_HealParts bit 0, the HP numbers (Menu_HealBounce from entry 0, 4 digits, values at Menu_HealShown) with sound 6 (Menu_PlaySfxNow); then with... - verified
Menu_HealBounce$C2:9047 · 76 B · EngineSound A (Menu_PlaySfxNow), then a frame at a time (a yield between): OAM high-table bytes $0908-$090A (entries 32-43) zeroed; the next byte of MenuRom_HealBounce (Menu_HealStep + 1) is the lift; a... - verified
Menu_HealNumberSprites$C2:9093 · 101 B · EnginePuts the BCD value Menu_NumBcd as digit sprites from OAM entry 32 + Y / 4 on, digit Menu_Tmp00 (the highest) down to 0: leading zeros (but not the ones digit) take an entry without writing it; at... - verified
Menu_HealNumberXOfs$C2:90F8 · 4 B · EngineBy the highest digit drawn (0-3): the first sprite's X offset, -4, -8, -12, -16 (the number centred on .ScreenX). - verified
Menu_StashInventory$C2:90FC · 37 B · EngineWith Menu_Unk0D7E set: the inventory ($200 bytes, Menu_InvIds and Menu_InvCounts) is copied to Menu_InvStash and the ids are zeroed (the counts stay), so the item and equipment screens show none. - verified
Menu_UnstashInventory$C2:9121 · 22 B · EngineWith Menu_Unk0D7E set: Menu_InvStash is copied back over the inventory ($200 bytes). - verified
Menu_CharRecalc$C2:9137 · 55 B · EngineMenu_CharCalcStats; with accessory Menu_DoubleStat5Item, stat 5 is doubled (ASL); then the record's .Word3 = Menu_CurCharRec's (as capped by Menu_EquipStatCat3), and the 11 derived bytes... - verified
Menu_CharCalcStats$C2:916E · 109 B · EngineMenu_StatBoosts, Menu_WeaponPower and Menu_ArmorSum ($0DAE-$0DB6) = 0; Menu_EquipSlotStats for slots 3, 2, 1, 0 (Menu_EquipSlotIdx); then for i = 6 down to 0, stat s = MenuRom_StatOrder[i]... - verified
Menu_AttackFormulas$C2:91DB · 16 B · EngineThe attack formula by character (record byte 0 AND 7): A for 0, 3, 4, 6 and 7, B for 1 and 2, C for 5. - verified
Menu_AttackFormulaA$C2:91EB · 56 B · EngineWRDIV = 5 x Menu_WeaponPower + 12 x stat 0; A = 9 (the divisor). - verified
Menu_AttackFormulaB$C2:9223 · 25 B · EngineWRDIV = 2 x (stat 4 + Menu_WeaponPower); A = 3. - verified
Menu_AttackFormulaC$C2:923C · 37 B · EngineWRDIV = 16 x stat 0 + MenuRom_Char5Attack[record byte $12] (a word table; the doubled index is taken 8-bit); A = 9. - verified
Menu_EquipSlotStats$C2:9261 · 13 B · EngineAdds equipment slot Menu_EquipSlotIdx (0-3) to the sums through Menu_EquipStatTable. - verified
Menu_EquipStatTable$C2:926E · 8 B · EngineMenu_EquipSlotStats' routine per slot: 0 the weapon byte (.Unk29), 1 .Unk28, 2 .Unk27, 3 the accessory (.Unk2A), the category order of Menu_EquipSlotOffsets. - verified
Menu_EquipStatWeapon$C2:9276 · 11 B · EngineMenu_WeaponPower = Menu_ItemSortKeys[weapon], then its boosts (Menu_AddItemBoosts, a branch). - verified
Menu_EquipStatCat1$C2:9281 · 5 B · EngineX = the .Unk28 item, then Menu_EquipStatCat2's .add. - verified
Menu_EquipStatCat2$C2:9286 · 15 B · EngineMenu_ArmorSum += Menu_ItemSortKeys[.Unk27 item] (from .add: the item in X), then its boosts (Menu_AddItemBoosts). - verified
Menu_EquipStatCat3$C2:9295 · 44 B · EngineThe accessory: Menu_CurMaxHp = .Word5 + .Word5 / 2 (Menu_BonusHalfId) or / 4 (Menu_BonusQuarterId) or + 0, at most 999; .Word3 lowered to it when above; then the accessory's boosts (falls into... - verified
Menu_AddItemBoosts$C2:92C1 · 51 B · EngineFor item X: v = Menu_ItemInfo4[X]; when non-zero, the word MenuRom_ItemBoosts[v] gives in its low byte (bit 0 dropped) one bit per stat order entry from bit 7 down (MenuRom_StatOrder[i] for the... - verified
Menu_UnpackConfig$C2:92F4 · 91 B · EngineZeroes $0D86-$0D91, then splits the first three Menu_Config bytes into one variable per field: byte 0 bits 3-7 into Menu_CfgA3-A7 (0 or 1 each) and bits 0-2 into Menu_CfgALow; byte 1 bits 0-2 into... - verified
Menu_PackConfig$C2:934F · 89 B · EngineThe reverse of Menu_UnpackConfig: Menu_Config byte 0 = Menu_CfgA7, A6, A5, A4, A3 (bit 0 of each) in bits 7-3 and Menu_CfgALow AND 7; byte 1 = Menu_CfgB7, B6 in bits 7-6, (Menu_CfgBMid AND 7) x 8... - verified
Menu_CanEquip$C2:93A8 · 23 B · EngineWhether the current character can equip item Menu_ItemId: A = Menu_ItemEquipChars[id] AND the character's BankFF_CharBits bit (the character id is the first byte of Menu_CurCharRec); non-zero = yes. - verified
Menu_PageScroll$C2:93BF · 78 B · EnginePages a list on Menu_PadAction bits 1 (back) and 0 (on; bit 1 wins): the new top is Menu_PageTop - Menu_PageStep (no borrow test: a wrap is caught by the compare with Menu_PageMax, and the top... - verified
Menu_InitPpuAndRam$C2:940D · 259 B · EnginePuts the PPU and CPU registers into the menu's starting state, then clears all of VRAM and most of bank $7E with DMA. - verified
Menu_DmaZeroWord$C2:9510 · 2 B · Enginethe fixed DMA source of Menu_InitPpuAndRam's VRAM clear and of Menu_DmaClearWram. - verified
Menu_DmaClearWram$C2:9512 · 48 B · EngineZeroes Y bytes of bank $7E from address X with DMA channel 0 (fixed source Menu_DmaZeroWord, one register: WMDATA). - verified
Menu_DmaCopyFFToWram$C2:9542 · 44 B · EngineCopies Y bytes from bank $FF (MenuRom_DmaCopyBank), address A, to bank $7E at address X with DMA channel 0 (stepping source, one register: WMDATA). - verified
Menu_InitNewGameData$C2:956E · 77 B · EngineSets up the data of a new game (inferred from what it fills). - verified
Menu_ClearConfigAndFlags$C2:95BB · 80 B · EngineZeroes Menu_FlagBlock7F ($7F:0000-$01FF), the page $7E:0400-$04FF (Menu_PlayTime and what follows) and Menu_Config ($2990-$29AF), then copies MenuRom_DefaultConfig (12 B) to Menu_Config and the 9... - verified
Menu_Expand3bppTiles$C2:960B · 35 B · EngineExpands A 3bpp tiles (24 bytes: planes 0-1, then plane 2) from bank $FF at X to 4bpp tiles in bank $7E at Y: the 16 bytes of planes 0-1 are copied (MVN), then each plane-2 byte is stored with... - verified
Menu_TilesOrPlane3$C2:962E · 37 B · EngineFor Y 4bpp tiles from X: each row's plane 3 = planes 0 OR 1 OR 2, so every non-zero pixel gets colour + 8 (colours 1-7 become 9-15). - verified
Menu_TilesOrPlanes23$C2:9653 · 37 B · EngineFor Y 4bpp tiles from X: each row's planes 2 and 3 = planes 0 OR 1, so colours 1-3 become 13-15. - verified
Menu_TileOrPlane2$C2:9678 · 21 B · EngineFor the 4bpp tile at X: each row's plane 2 = planes 0 OR 1 and plane 3 = 0 (one word store), so colours 1-3 become 5-7. - verified
Menu_LoadGraphics$C2:968D · 445 B · EngineBuilds the menu's tiles in Menu_TileBuf / Menu_Bg3TileBuf and sends them to VRAM through Menu_VramQueue (forced blank: Menu_InitSystems runs it after Menu_InitPpuAndRam), then loads part of the... - verified
Menu_ClearOam$C2:984A · 43 B · EngineHides every sprite of the OAM copy: all 128 low-table entries = X 0, Y $E0, tile 0, attributes $E0 (the word Menu_OamHidden, $E000, repeated) and the 32 high-table bytes = Menu_OamHighInit ($AA... - verified
Menu_BuildItemTables$C2:9875 · 275 B · EnginePrepares the menu's item and character data: - Menu_CleanInventory; - Menu_Unk0D7C/0D7E: 0, or $FFFF when Menu_Flag7F00BA has bit 0 set (0D7C) and also bit 1 clear (0D7E); Menu_Unk0D32/0D34 = 0... - verified
Menu_CleanInventory$C2:9988 · 42 B · EngineEmpties every inventory slot (id and count = 0) whose count is 0, or whose id is 0, a category's "no item" id ($5A, $7B, $94) or Menu_ItemIdEnd and above. - verified
Menu_RefreshAllChars$C2:99B2 · 24 B · EngineFor characters 0-6: Menu_LoadCharRec, then Menu_CharRecalc (the derived stats, written back to the record). - verified
Menu_Mode00List$C2:99CA · 4 B · EngineMenu_ModeLists entry 0: the handlers Menu_MainThread runs by Menu_ThreadVar. - verified
Menu_MainMenuInit$C2:99CE · 77 B · EngineHandler 0 of mode 0. - verified
Menu_MainMenuLoop$C2:9A1B · 125 B · EngineHandler 1 of mode 0, every frame: Menu_CursorSel = Menu_MainSel, Menu_PadInput (the pad: it moves Menu_CursorSel and sets Menu_PadAction). - verified
Menu_ReturnToMainMenu$C2:9A98 · 21 B · EngineBack from a submenu to mode 0: Menu_Mode = 0, Menu_ThreadVar = 1 (Menu_MainMenuLoop), the threads of Menu_SubThreads killed, Menu_MainMenuRedraw, and a tail jump to Menu_PlaySound0. - verified
Menu_MainMenuMaps$C2:9AAD · 167 B · EngineBuilds two tilemaps in WRAM: a 16 x 6 window frame at Menu_MainFrame (tiles $3FA4-$3FAC: corners, edges and fill; row 1 copied to rows 2-4) and the background pattern of BG2 at Menu_Bg2Map (the 2... - verified
Menu_MainMenuPreview$C2:9B54 · 17 B · EngineThe preview of icon Menu_MainSel: its Menu_MainPreviewTable routine, then Menu_MainMenuIcons. - verified
Menu_MainPreviewTable$C2:9B65 · 12 B · EngineMenu_MainMenuPreview's routine per icon 0-5 (Menu_Icon0Preview to Menu_Icon3Preview for icons 0-3; Menu_UnkC9E5, the party order of mode 5, for icon 4 and Menu_UnkD065, the save slots of mode 6... - verified
Menu_MainMenuRedraw$C2:9B71 · 18 B · EngineRedraws mode 0 after a submenu: icon Menu_MainSel's Menu_MainRedrawTable routine, Menu_MainMenuIcons, then a tail jump to Menu_QueueVramRom with Menu_VramRecBg2B (VRAM $6040 = $7E:3E80, $680 bytes). - verified
Menu_MainRedrawTable$C2:9B83 · 12 B · EngineMenu_MainMenuRedraw's routine per icon 0-5 (Menu_Icon0Redraw to Menu_Icon3Redraw for icons 0-3; Menu_UnkCAE6 for icon 4 and Menu_UnkD0DB for icon 5). - verified
Menu_MainMenuIcons$C2:9B8F · 79 B · EngineMenu_RunDrawList with MenuRom_MainIconList; Menu_HdmaenShadow |= Menu_MainHdmaBits (HDMA channels 0 and 1 and Menu_NmiMoveReq: the NMI copies Menu_NmiMoveSize = $1E bytes from $7E:9750 to... - verified
Menu_MainIconSprites$C2:9BDE · 75 B · EngineOAM entries 0-5 = MenuRom_MainIconOam (the six icons), the selected icon's tile + $20; entries 6 and 7 = arrows (tile $22, Menu_ArrowAttr, the second flipped vertically) at the selected icon's X +... - verified
Menu_Mode01List$C2:9C29 · 8 B · EngineMenu_ModeLists entry $01: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below). - verified
Menu_Mode01H0$C2:9C31 · 8 B · EngineHandler 0: Menu_PlaySound0, Menu_ThreadVar + 1 (to handler 1) and a tail jump to Menu_Mode01Init. - verified
Menu_Mode01H1$C2:9C39 · 55 B · EngineHandler 1, every frame: Menu_PadInput. - verified
Menu_Mode01H2$C2:9C70 · 53 B · EngineHandler 2, every frame: Menu_PadInput. - verified
Menu_Mode01H3$C2:9CA5 · 87 B · EngineHandler 3, every frame: Menu_PadInput. - verified
Menu_EquipClearCharFlag$C2:9CFC · 27 B · EngineWith Menu_ListKind 0: the character id at Menu_PartyList[Menu_Unk0412] (the cursor row alone, not Menu_CurMember = row + Menu_Unk0413: with the list scrolled this is another member's id) gets its... - verified
Menu_MemberCursor$C2:9D17 · 68 B · EngineHandler 1's cursor: when the member list scrolls (Menu_MemberMaxTop non-zero), an edge move (Menu_CursorDpad bit 7) scrolls it a row (Menu_MemberListScroll). - verified
Menu_MemberListScroll$C2:9D5B · 84 B · EngineScrolls the member list one row: without Down (an Up edge), Menu_Unk0413 - 1 unless it is 0, the new row drawn at $7E:3580, the rows copied to row $26, Menu_ScrollStep = -4, Menu_RowScrollWord =... - verified
Menu_MemberScrollAnim$C2:9DAF · 199 B · EngineThe member list's row scroll: Menu_CurMember = Menu_CursorSel + Menu_Unk0413 is loaded and drawn at Menu_MapPtr (Menu_DrawMemberRow), its 6 x 12 tiles in both maps get attribute bit 4... - verified
Menu_HighlightMemberRow$C2:9E76 · 58 B · EngineFor the 3 member rows (6 x 12 tiles each from $7E:2E84, $180 bytes apart, and the same in the BG2 map): attribute bit 4 set (palette + 4, where Menu_Icon0Preview puts the dimmed colours) except on... - verified
Menu_SetMemberRowAttr$C2:9EB0 · 29 B · EngineMenu_SetRowsAttr on 6 rows of Y's low byte tiles from Menu_Tmp04, OR Y's high byte (attribute bits 4-7 cleared, then set), in the BG1 map and $1000 bytes on (the BG2 map); a tail jump for the second. - verified
Menu_EquipSlotIdle$C2:9ECD · 56 B · EngineHandler 2's frame without confirm or cancel: Menu_DrawSlotName, Menu_MemberPageSwitch, Menu_PlaySound0 when Menu_CursorSel differs from Menu_Unk0FC5 (which takes it), Menu_HighlightSlot... - verified
Menu_EquipItemIdle$C2:9F05 · 217 B · EngineHandler 3's frame without confirm or cancel, on the item list (Menu_EquipList, top row Menu_EquipListTop). - verified
Menu_ShiftItemListMap$C2:9FDE · 45 B · EngineMoves the item list's tilemap rows ($7E:4F80-$537F) by one item (two tile rows, $80 bytes) after a scroll: with Menu_ScrollStep positive (read as the high byte of the word at Menu_ScrollStep - 1)...
Bank $C2 · $C2:A000–$AFFF
$C2:A000
Verified · 70
- verified
Menu_MemberPageSwitch$C2:A00B · 70 B · EngineOn Menu_PadAction's page bits: bit 1 the next member (Menu_Unk85 wraps to 0), bit 0 the one before (0 wraps to Menu_Unk85 - 1). - verified
Menu_Icon0Preview$C2:A051 · 150 B · EngineMenu_MainPreviewTable entry 0. - verified
Menu_DimPalette$C2:A0E7 · 26 B · EngineCopies colours 0-23 of Menu_PalBuf to Y at half brightness: each colour shifted right one bit with the bits that came down from the next channel masked off (AND $3DEF). - verified
Menu_Icon0Redraw$C2:A101 · 25 B · EngineMenu_MainRedrawTable entry 0: colours $70-$77 = MenuRom_Icon0RedrawPal, Menu_UnstashInventory, Menu_HdmaenShadow = Menu_Icon0HdmaBits. - verified
Menu_Mode01Init$C2:A11A · 86 B · EngineMode 1's set-up (Menu_Mode01H0 jumps here): Menu_StashInventory; the tilemap $7E:3600-$3DFF zeroed; colours $70-$73 and $74-$77 both = the 4 colours at MenuRom_Mode01Pal; the draw list... - verified
Menu_MemberArrows$C2:A170 · 66 B · EngineThe list arrows of the member list, with DB=$00 for the multiplier and divider: nothing when Menu_MemberMaxTop is 0. - verified
Menu_DrawMemberRows$C2:A1B2 · 55 B · EngineDraws the member rows from Menu_Unk0413 on into the tilemap from $7E:2E00, 6 rows ($180 bytes) apart, until Menu_Unk85 members or 3 rows (the map address reaching $3280): Menu_DrawMemberRow for a... - verified
Menu_DrawEmptyRow$C2:A1E9 · 6 B · EngineRuns the draw list MenuRom_EmptyRowList (a tail jump). - verified
Menu_MemberRowFlags$C2:A1EF · 39 B · EngineFor the loaded character (Menu_CurCharRec): Menu_Unk0D4D = its id (record byte 0 AND 7) OR $20; Menu_Unk0D5D = 4 when its Menu_Unk0D38 quotient is at least the record's word +3, else 0 (probably... - verified
Menu_DrawMemberRow$C2:A216 · 9 B · EngineMenu_MemberRowFlags, then the draw list MenuRom_MemberRowList (a tail jump). - verified
Menu_RedrawMember$C2:A21F · 16 B · EngineMenu_DrawMemberStatus, then the member's row again at the top of the list map ($7E:2E00, Menu_DrawMemberRow). - verified
Menu_DrawMemberStatus$C2:A22F · 68 B · EngineThe selected member: the clock (Menu_DrawClock at Menu_MainClockTile), Menu_CurMember = Menu_Unk0412 + Menu_Unk0413, Menu_LoadPartyCharRec and Menu_CharRecalc, the draw list MenuRom_StatusList... - verified
Menu_DrawCharIcon$C2:A273 · 83 B · EngineDraws a 6 x 2 tile block at $7E:2EEC / $7E:2F2C: the 12 tile words from MenuRom_CharIconTiles[e] on, e = Menu_CharIconIndex[the loaded character's id], and copies 16 colours from... - verified
Menu_CharIconIndex$C2:A2C6 · 7 B · EnginePer character id 0-6: the byte offset into MenuRom_CharIconTiles and MenuRom_CharIconPals (Menu_DrawCharIcon). - verified
Menu_EquipSlotsClose$C2:A2CD · 84 B · EngineBack from handler 2 to handler 1: Menu_ScrollStep's low byte = 0, Menu_CursorSel = Menu_Unk0412, Menu_CurMember = it + Menu_Unk0413 and loaded (Menu_LoadPartyCharRec), Menu_DrawEquipNames (X =... - verified
Menu_EquipSlotsOpen$C2:A321 · 106 B · EngineFrom handler 1 to handler 2: the draw list MenuRom_SlotsOpenList, Menu_CurMember = Menu_Unk0412 + Menu_Unk0413 loaded and its row drawn at the top of the BG1 map ($7E:2E00, Menu_DrawMemberRow)... - verified
Menu_DrawSlotName$C2:A38B · 47 B · EngineMenu_ListKind = Menu_CursorSel (the slot) and its name, Menu_EquipSlotNames[slot] (10 tiles, bank $C2), drawn at $7E:3086 with Menu_TextWord = 0 (Menu_DrawString); then the two tile rows at... - verified
Menu_EquipSlotNames$C2:A3BA · 40 B · EngineThe four slot names, 10 bytes each in the menu's text encoding ($FF blank, $A0 'A', $BA 'a'): " Weapon ", " Helmet ", " Armor ", and "Accessory" followed by a 0 byte, which ends the string. - verified
Menu_HighlightSlot$C2:A3E2 · 11 B · EngineMenu_SetSlotRowsAttr from $7E:3062. - verified
Menu_SetSlotRowsAttr$C2:A3ED · 45 B · EngineFor the 4 slot rows (two tile rows each, $80 bytes apart) from X: the attribute byte of 11 tiles in both tile rows (Menu_SetAttr2Rows) = $1C (palette 7) except on row Menu_ListKind (the selected... - verified
Menu_EquipItemsOpen$C2:A41A · 67 B · EngineFrom handler 2 to handler 3: Menu_EquipItemsSlideIn, the draw list MenuRom_ItemsOpenList, Menu_VramRecBg2B queued, Menu_ArrowX/Y = $68 / $42, Menu_EquipListSetup, the NMI move Menu_ScrollBuild ->... - verified
Menu_EquipListRefresh$C2:A45D · 6 B · EngineMenu_ArrowX/Y = $68 / $62, then falls into Menu_EquipListSetup. - verified
Menu_EquipListSetup$C2:A463 · 72 B · EngineThe item list of slot Menu_ListKind: Menu_ListEquipItems, WRDIVL/H = $1500 (the dividend of Menu_ListPageSetup's arrow factors), Menu_VramRecBg3 queued; Menu_EquipListTop = 0, Menu_Unk0D26 =... - verified
Menu_EquipSlotRecOfs$C2:A4AB · 4 B · EnginePer slot (Menu_ListKind 0-3): the character record's byte that holds it (Menu_Unk0D26; Menu_Mode01H3 swaps that byte with the inventory). - verified
Menu_EquipItemsSlideIn$C2:A4AF · 105 B · EngineHandler 2 to 3 (Menu_EquipItemsOpen): the draw list MenuRom_ItemsSlideInList; the 12 words at Menu_Unk5CC2 = Menu_ItemsSlideInWordA; the NMI move Menu_ScrollBuild -> Menu_Mode01HdmaTable... - verified
Menu_EquipItemsSlideStep$C2:A518 · 81 B · EngineOne frame of the item slides: Menu_SlideWordA += Menu_SlideStep and the 12 words at Menu_Unk5CC2 = it; Menu_SlideWordB += Menu_SlideStep and the 28 words from Menu_Unk5D42 = it... - verified
Menu_DrawEquipList$C2:A569 · 49 B · EngineDraws Menu_EquipPageRows (8) rows of the item list from entry Menu_EquipListTop of Menu_EquipList on, each with Menu_DrawEquipItem at Menu_EquipListMap ($7E:4FC6) + $80 per row (two tile rows). - verified
Menu_DrawEquipItem$C2:A59A · 41 B · EngineDraws item Menu_ItemId at $7E:X with Menu_TextWord = Menu_ItemNameAttr (attribute byte $20) for the string: its name from Menu_ItemNamePtr, without the name's first byte (Y + 1, count 10 of the... - verified
Menu_EquipPreviewItem$C2:A5C3 · 36 B · EngineHandler 3's frame: the item under the cursor, Menu_EquipList[ Menu_EquipListTop + Menu_CursorSel - 4] (the list's first row is cursor record 4), goes to Menu_ItemId and into the slot's byte of... - verified
Menu_EquipCompareStats$C2:A5E7 · 91 B · EngineRecomputes the stats with the item tried on (Menu_CharCalcStats; stat 5 doubled with accessory Menu_DoubleStat5Item, as Menu_CharRecalc does), then compares each value with the one the record copy... - verified
Menu_EquipCompareOfs$C2:A642 · 11 B · EngineMenu_EquipCompareStats' order: Menu_CharRec offsets of attack, defence and stats 0, 2, 5, 3, 1, 4, 6 (.Derived + 7, + 8, + 0 ...); its loop reads the first 9. - verified
Menu_EquipItemsClose$C2:A64D · 74 B · EngineBack from handler 3 to handler 2 (Menu_Mode01H3, after a confirm or a cancel): the selected member again (Menu_DrawMemberStatus, which reloads the record copy), Menu_CalcUnk0D38, the member's row... - verified
Menu_EquipItemsSlideOut$C2:A697 · 89 B · EngineThe reverse of Menu_EquipItemsSlideIn: the draw list MenuRom_ItemsSlideOutList; Menu_VramRecClock and Menu_VramRecBg2B queued; the NMI move Menu_ScrollBuild -> Menu_Mode01HdmaTable... - verified
Menu_DrawEquipNames$C2:A6F0 · 46 B · EngineThe names of the four equipped items of the record copy, in slot order (weapon .Unk29, .Unk27, .Unk28, accessory .Unk2A), one under the other from $7E:X, $80 bytes (two tile rows) apart... - verified
Menu_EquipSlotsSlideIn$C2:A71E · 153 B · EngineHandler 1 to 2 (Menu_Mode01H1, before Menu_EquipSlotsOpen): the draw list MenuRom_SlotsSlideInList; the NMI move Menu_ScrollBuild -> Menu_EquipHdmaTable, Menu_Mode01HdmaBytesA bytes... - verified
Menu_EquipSlotsSlideStep$C2:A7B7 · 165 B · EngineOne frame of Menu_EquipSlotsSlideIn: the 12 words at Menu_Unk5CC2 = (word + 6) AND $1FF OR $6000, the 12 at Menu_Unk5D42 = (word + Menu_ScrollOfs) AND $1FF OR $6000. - verified
Menu_EquipSlotsSlideOut$C2:A85C · 276 B · EngineHandler 2 back to 1 (Menu_Mode01H2, before Menu_EquipSlotsClose): a frame's wait; the draw list MenuRom_SlotsSlideOutList; the 12 words at $7E:3044 and at $7E:3084 (Menu_SlotsClearA/B, the slot... - verified
Menu_EquipSlotsBackStep$C2:A970 · 150 B · EngineOne frame of Menu_EquipSlotsSlideOut: the 12 words at Menu_Unk5CC2 = (word - 6) AND $1FF OR $6000, the 12 at Menu_Unk5D42 = (word - Menu_ScrollOfs) AND $1FF OR $6000; Menu_BandA + 6, and 6 off... - verified
Menu_MemberListHdma$C2:AA06 · 19 B · EngineMenu_EquipSlotsSlideOut's start table (copied to Menu_ScrollBuild): $10 lines of $FFFF, $30 lines of $01E0, three times $30 lines of $01D0 (the three member rows, 48 lines each), $10 lines of... - verified
Menu_PutHdmaEntry$C2:AA19 · 27 B · EngineWrites HDMA entries of A lines with the value Menu_Tmp00/01 through WMDATA (the caller has set WMADDL/H): one entry for A below $80; for A = $80-$FE two, A - $7F lines then $7F lines (a count byte... - verified
Menu_Mode02List$C2:AA34 · 12 B · EngineMenu_ModeLists entry $02: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the item screen). - verified
Menu_Mode02H0$C2:AA40 · 10 B · EngineHandler 0: Menu_PlaySound0, Menu_ThreadVar = 2 (handler 2, the list) and a tail jump to Menu_Mode02Init. - verified
Menu_Mode02H1$C2:AA4A · 60 B · EngineHandler 1, every frame, the row above the list: Menu_PadInput. - verified
Menu_Mode02H2$C2:AA86 · 66 B · EngineHandler 2, every frame, the list: Menu_ItemsPicked = $FFFF (no slot picked), Menu_PadInput. - verified
Menu_Mode02H3$C2:AAC8 · 130 B · EngineHandler 3, every frame, with a slot picked (Menu_ItemsPicked): Menu_PadInput. - verified
Menu_Mode02H4$C2:AB4A · 24 B · EngineHandler 4, sort: Menu_SortInventory, a frame's wait, the list redrawn (Menu_DrawItemList), Menu_VramRecClock queued, Menu_CursorSel = $0A and Menu_ThreadVar = 1 (back to the row above the list). - verified
Menu_SortInventory$C2:AB62 · 135 B · EngineRebuilds the inventory sorted: Menu_SortHave (256 bytes) and Menu_SortCounts (256) zeroed, and $20 bytes from $7E:0F02 (after Menu_ItemsPicked; why is not traced); every slot's id is marked in... - verified
Menu_SortGroup$C2:ABE9 · 41 B · EngineAppends sort group X to the inventory at slot Y: the ids from Menu_SortGroupFirst[X] on, Menu_SortGroupCount[X] of them, that are marked in Menu_SortHave and lack Menu_ItemInfo0 bit 3, each with... - verified
Menu_SortGroupFirst$C2:AC12 · 5 B · EnginePer sort group 0-4: the first id. - verified
Menu_SortGroupCount$C2:AC17 · 6 B · EnginePer sort group 0-4: the number of ids. - verified
Menu_Mode02H5$C2:AC1D · 29 B · EngineHandler 5, the equipment info of Menu_ShowEquipInfo: Menu_CursorHold + 1 (the cursor does not move), Menu_PadInput; on confirm or cancel Menu_PlaySound0, Menu_HdmaenShadow bit 2 cleared (the... - verified
Menu_ItemListCursor$C2:AC3A · 199 B · EngineHandlers 2 and 3 without confirm or cancel. - verified
Menu_ShiftInvListMap$C2:AD01 · 45 B · EngineMoves the item list's tilemap rows by one entry ($80 bytes, two tile rows) after a scroll: with Menu_ScrollStep positive (read as the high byte of the word at Menu_ScrollStep - 1), $7E:2F80-$347F... - verified
Menu_ItemListSelect$C2:AD2E · 34 B · EngineThe slot under the list cursor: Menu_Unk0D26 = (Menu_ItemsTop + Menu_CursorSel) AND $FF (a word), Menu_Unk04CA = its count, Menu_ItemId = its id, and its description (Menu_DrawDescText). - verified
Menu_Icon1Preview$C2:AD50 · 115 B · EngineMenu_MainPreviewTable entry 1: the draw list MenuRom_Icon1List; Menu_TextWord = 0; Menu_Unk0D77 = $FF and Menu_Unk0D78 = $FF (the next Menu_DrawDescText draws); colours $50-$57 = MenuRom_Icon1PalA... - verified
Menu_Icon1Redraw$C2:ADC3 · 13 B · EngineMenu_MainRedrawTable entry 1: Menu_UnstashInventory, Menu_HdmaenShadow = Menu_Icon1HdmaBits. - verified
Menu_Mode02Init$C2:ADD0 · 80 B · EngineMode 2's set-up (Menu_Mode02H0 jumps here): Menu_StashInventory; the draw list MenuRom_Mode02List; Menu_ArrowX/Y = $E8 / $50, WRDIVL/H = Menu_ItemsArrowSpan; Menu_TextAttr = 0; the paging of the... - verified
Menu_RedrawCursorRow$C2:AE20 · 35 B · EngineRedraws the list row of Menu_ItemsCursor (Menu_DrawItemRow at Menu_InvListFirst + $80 x (Menu_ItemsCursor AND $0F)), with Menu_CursorSel = Menu_ItemsCursor for the call (the caller's word at... - verified
Menu_DrawItemList$C2:AE43 · 34 B · EngineDraws the ten list rows: Menu_DrawItemRow for Menu_CursorSel = 0 to 9 at Menu_InvListFirst + $80 x row; the caller's word at Menu_CursorSel is put back. - verified
Menu_DrawItemRow$C2:AE65 · 16 B · EngineMenu_DrawInvSlot for slot Menu_ItemsTop + Menu_CursorSel (an 8-bit sum) at $7E:X. - verified
Menu_DrawInvSlot$C2:AE75 · 28 B · EngineSlot Y: Menu_RowItemCount = its count and Menu_RowItemId = its id; an id with Menu_ItemInfo0 bit 1 (usable from the menu) gets Menu_TextAttr bit 3 set (palette + 2; Menu_DrawString clears the bit... - verified
Menu_ShowEquipInfo$C2:AE91 · 37 B · EngineThe equipment info of handler 5: Menu_ClearInfoRows, the characters who can equip Menu_ItemId (Menu_ListEquipChars), its value and label (Menu_EquipValueLabel), the draw list MenuRom_EquipInfoList... - verified
Menu_ListEquipChars$C2:AEB6 · 85 B · EngineMenu_EquipCharNames (42 bytes, seven 6-byte entries) zeroed, then for each character bit of Menu_ItemEquipChars[Menu_ItemId] AND Menu_Unk29AF (probably the recruited characters), from bit 7... - verified
Menu_EquipValueLabel$C2:AF0B · 47 B · EngineMenu_InfoValue = Menu_ItemSortKeys[Menu_ItemId] (the weapon's power or the armour value); Menu_ItemCategory of the id (A is the word at Menu_ItemId: its low byte is used); the 11 bytes at bank $FF... - verified
Menu_EquipLabelPtrs$C2:AF3A · 8 B · EnginePer item category 0-3: the bank-$FF address of the 11-byte label Menu_EquipValueLabel copies (categories 1 and 2 share one). - verified
Menu_UseTargetsOpen$C2:AF42 · 67 B · EngineOpens the member window of an item use: the draw list MenuRom_UseTargetsList; object 7 off (its .Id = $FF); Menu_SprResetChars; Menu_ClearInfoRows; Menu_VramRecBg3Rows62 queued; a frame's wait... - verified
Menu_HideCharSprites$C2:AF85 · 24 B · EngineSets bit 0 of .Flags18 of objects 0-6 (non-zero: Menu_SprThread does not place them). - verified
Menu_ShowCharSprites$C2:AF9D · 24 B · EngineClears bit 0 of .Flags18 of objects 0-6 again. - verified
Menu_ClearInfoRows$C2:AFB5 · 56 B · EngineBG3 map rows 0-1 at Menu_Bg3TileBuf ($80 bytes) zeroed, then 14 words from column 15 of row 0 = Menu_InfoRowWordA and 14 from column 15 of row 1 = Menu_InfoRowWordB. - verified
Menu_PlaceMemberSprites$C2:AFED · 88 B · EngineThe member rows of the use window: Menu_TextWord = 0; for each active member (Menu_CurMember 0 up to Menu_PartyActive, stopping at one Menu_LoadPartyCharRec does not load, or when the word at...
Bank $C2 · $C2:B000–$BFFF
$C2:B000
Verified · 82
- verified
Menu_MemberSprYX$C2:B045 · 6 B · EnginePer member row 0-2: the word Menu_PlaceMemberSprites stores at .ScreenY: Y = $78, $A0, $C8 (40 lines apart), X low byte $E4. - verified
Menu_DrawInvEntry$C2:B04B · 96 B · EngineOne inventory row at $7E:X: for id Menu_RowItemId 0, 24 blank bytes (Menu_Unk9B76's $FF) with Menu_DrawString after a PLP (a tail jump). - verified
Menu_UseItem$C2:B0AB · 66 B · EngineUses item Menu_ItemId (category 4, Menu_ItemInfo0 bit 1): Menu_ItemCategory; Menu_UseKind = ((BattleRom_ItemTargetMode[index] + 1) AND 3) x 4 (bits 2-3; bit 3 = all members, as... - verified
Menu_UseItemDone$C2:B0ED · 1 B · Engine - verified
Menu_UseKindTable$C2:B0EE · 12 B · EngineMenu_UseItem's routine by Menu_FirstSetBit (bit 7, 6, 5, 4, 3, none). - verified
Menu_FirstSetBit$C2:B0FA · 13 B · EngineX = 2 x the number of clear bits above the first set bit of A, testing bits 7 down to 3; X = $0A when none of them is set. - verified
Menu_UseRandomItem$C2:B107 · 6 B · EngineMenu_UseKindTable entry 3: Menu_RollRandomItem, then a tail jump to Menu_UseHealItem. - verified
Menu_RollRandomItem$C2:B10D · 48 B · EnginePicks the random item's effect: r = RandomTable[Menu_NmiFrames] x 100 / 256 (0-99, the multiplier's high byte); the first Menu_RandomItemOdds entry above r gives the setter (Menu_RandomItemSets)... - verified
Menu_RandomItemOdds$C2:B13D · 4 B · EngineMenu_RollRandomItem's bounds out of 100: 5, 20, 50 (and 100, not read). - verified
Menu_RandomItemSets$C2:B141 · 8 B · EngineMenu_RollRandomItem's setters: 5%, 15%, 30% and 50%. - verified
Menu_RandomItemSetA$C2:B149 · 11 B · EngineMenu_UseKind = $C2 (HP and MP), Menu_UseAmountB = $40 (full). - verified
Menu_RandomItemSetB$C2:B154 · 11 B · EngineMenu_UseKind = $82 (HP), Menu_UseAmountB = $40 (full). - verified
Menu_RandomItemSetC$C2:B15F · 16 B · EngineMenu_UseKind = $41 (MP), Menu_UseAmountB = 3, Menu_UseAmountA = $8A (a fixed 10 x 3 = 30). - verified
Menu_RandomItemSetD$C2:B16F · 16 B · EngineMenu_UseKind = $80 (HP), Menu_UseAmountB = 1, Menu_UseAmountA = $B2 (a fixed 50 x 1 = 50). - verified
Menu_UseHealItem$C2:B17F · 12 B · EngineMenu_UseKindTable entry 0 (an HP / MP item): Menu_UseAmountA = $B2 (fixed, 50 per Menu_UseAmountB) with Menu_UseKind bit 7 (HP), else $8A (fixed, 10 per unit: MP). - verified
Menu_UseTargets$C2:B18B · 60 B · Engine - verified
Menu_UseLeave$C2:B1C7 · 49 B · Engine - verified
Menu_UseFullItem$C2:B1F8 · 8 B · EngineMenu_UseKindTable entry 4: Menu_UseKind = $CA (HP, MP, all members) and a jump into Menu_UseHealItem's member loop (Menu_UseTargets); Menu_UseAmountA is not set here (Menu_CalcHealAmounts always... - verified
Menu_UseStatItem$C2:B200 · 74 B · EngineMenu_UseKindTable entry 5 (no effect bit): a stat item. - verified
Menu_StatTargetCursor$C2:B24A · 43 B · EngineThe stat item's member cursor: a Menu_CursorSel off the member rows (Menu_CursorSel - Menu_UseRowFirst at least Menu_PartyActive) wraps: to the last row on Up (Menu_CursorDpad bit 3), else to the... - verified
Menu_StatTargetCheck$C2:B275 · 50 B · EngineMenu_Unk0DBC = 0; Menu_CurMember = Menu_CursorSel - Menu_UseRowFirst, Menu_PlaySound0 when it is not Menu_UseTarget (which takes it); the member loaded (Menu_LoadPartyCharRec); with Menu_UseKind... - verified
Menu_ApplyStatItem$C2:B2A7 · 111 B · EngineUses a stat item on member Menu_UseTarget: colours $84-$87 = MenuRom_Icon0Pal (the same 4 colours as icon 0's $24-$27); the six words at Menu_HealShown = $FFFF and the target's (Menu_UseTarget AND... - verified
Menu_StatCountOfs$C2:B316 · 6 B · EnginePer stat entry 1-6 (Menu_UseKind; read as Menu_StatCountOfs - 1 + X, so entry 0 would be the RTS before): the offset from record byte $2F (.StatCounts) of the count Menu_ApplyStatItem raises. - verified
Menu_AfterItemUse$C2:B31C · 55 B · EngineAfter a use: one of the picked slot's item taken (Menu_ItemCount = 1, Menu_ItemId = Menu_InvIds[Menu_ItemsPicked]; for Menu_ItemRandom a new effect rolled first, Menu_RollRandomItem... - verified
Menu_Mode03List$C2:B353 · 10 B · EngineMenu_ModeLists entry $03: the handlers Menu_MainThread runs by Menu_ThreadVar (the tech screen, Menu_Mode03H0-H4). - verified
Menu_Mode03H0$C2:B35D · 8 B · EngineHandler 0: Menu_PlaySound0, Menu_ThreadVar + 1 (handler 1) and a tail jump to Menu_Mode03Init. - verified
Menu_Mode03H1$C2:B365 · 8 B · EngineHandler 1: the draw list MenuRom_TechMembersList, Menu_ThreadVar + 1, and on into handler 2 (sub-entry Menu_Mode03H2, $C2:B36D), every frame, the member window: Menu_LastMember = Menu_Unk84 (the... - verified
Menu_Mode03H2$C2:B36D · 65 B · Engine - verified
Menu_Mode03H3$C2:B3AE · 224 B · EngineHandler 3, every frame, the tech list: Menu_HdmaenShadow = Menu_TechHdmaBits, Menu_PadInput. - verified
Menu_Mode03H4$C2:B48E · 139 B · EngineHandler 4, every frame, the target window: Menu_PadInput, Menu_TechTargetCursor. - verified
Menu_TechCastLoops$C2:B519 · 7 B · EnginePer character id 0-6 (object 7's .Id): the .LoopFrame Menu_Mode03H4 gives the caster's copy with .Anim Menu_TechCastAnim (the frame the looping animation goes back to, probably the end of the... - verified
Menu_TechMemberCursor$C2:B520 · 72 B · EngineHandler 2's frame without confirm or cancel: Left / Right (Menu_CursorDpad bits 1 / 0) step Menu_TechPage down / up, wrapping in 0-2; Menu_ListCursorEdge, then Menu_RepeatFast = 0 (STZ: the N of... - verified
Menu_TechMemberScroll$C2:B568 · 96 B · EngineScrolls the member window one row, as Menu_MemberListScroll does in mode 1: without Down (an Up edge) Menu_TechMemberTop - 1 unless it is 0, the incoming member's sprite row 3 (above the window... - verified
Menu_TechMemberScrollAnim$C2:B5C8 · 230 B · EngineThe member window's row scroll (mode 1's Menu_MemberScrollAnim, BG1 only): Menu_HdmaenShadow = Menu_TechScrollHdmaBits; the incoming member (Menu_TechMemberRow + Menu_TechMemberTop) loaded, its... - verified
Menu_TechPageMark$C2:B6AE · 37 B · EngineThe page names' tiles: the 10 x 2 tiles at $7E:2EE4 get attribute byte $15, then the 2 x 2 at $7E:2EE4 + Menu_TechPage x 8 get $11 (Menu_SetAttr2Rows; probably the chosen page lit, the others dimmed). - verified
Menu_TechListIdle$C2:B6D3 · 92 B · EngineHandler 3's frame without confirm or cancel: the caster loaded. - verified
Menu_TechListScroll$C2:B72F · 157 B · EngineScrolls the tech list a row (as Menu_EquipItemIdle does mode 1's item list) unless it is at that end: on row 0 with Menu_TechListTop 0, or on another row (the bottom one) with the top at... - verified
Menu_TechShiftListMap$C2:B7CC · 87 B · EngineMoves the tech list's tilemap rows by one tech (two tile rows, $80 bytes) after a scroll, 11 tiles wide from column 18: with Menu_ScrollStep positive (read as the high byte of the word at... - verified
Menu_TechTargetCursor$C2:B823 · 27 B · EngineHandler 4's cursor: Menu_UseTargetCursor (as an item's), then the caster loaded again and Menu_Unk0DBC = 0 (nothing to do) when the caster's MP (record .Word7, low byte) is below Menu_TechUseCost. - verified
Menu_UseTargetCursor$C2:B83E · 50 B · EngineThe member cursor of an HP / MP restore (an item's or a tech's): for a single target (Menu_UseKind bit 3 clear) a Menu_CursorSel off the member rows (Menu_CursorSel - Menu_UseRowFirst at least... - verified
Menu_UseTargetCheck$C2:B870 · 106 B · EngineMenu_Unk0DBC = 0; Menu_CurMember = Menu_CursorSel - Menu_UseRowFirst, Menu_PlaySound0 when it is not Menu_UseTarget (which takes it) and the target is single (Menu_UseKind bit 3 clear). - verified
Menu_Icon2Preview$C2:B8DA · 134 B · EngineMenu_MainPreviewTable entry 2: the draw list MenuRom_Icon2List; Menu_TechMemberRow = 0 when it is not below Menu_PartyActive; Menu_LoadCharPalettes, a frame's wait, Menu_StartSprThread; the member... - verified
Menu_Icon2Redraw$C2:B960 · 25 B · EngineMenu_MainRedrawTable entry 2: Menu_HdmaenShadow = 1, Menu_StartSprThread, the draw list MenuRom_Icon2RedrawList, Menu_VramRecClock queued. - verified
Menu_Mode03Init$C2:B979 · 104 B · EngineMode 3's set-up (Menu_Mode03H0 jumps here): the draw list MenuRom_Mode03List; Menu_CursorSel = Menu_TechMemberRow + $0B (the member's row record); the palette flagged; Menu_Unk84 = $FF (so... - verified
Menu_TechCasterSprite$C2:B9E1 · 40 B · EngineObject 7 as the caster's copy in the list window: Menu_SprUploadMax = 2; the member (Menu_TechMemberRow + Menu_TechMemberTop) loaded; .Anim, .Kind and .Flags18 = 0, .ScreenY / .ScreenX low byte =... - verified
Menu_TechLoadCaster$C2:BA09 · 38 B · EngineObject 7's .TileAttr high byte (the palette) = that of the loaded character's own object (page Menu_Times64 of its id; the offset is read back from Menu_Unk0D2C); then, with DP = object 7's page... - verified
Menu_TechDrawMemberRow$C2:BA2F · 32 B · EngineOne member row of the tech screen at Menu_MapPtr: Menu_MemberRowFlags; Menu_Unk0D5E = 4 when the loaded character's MP (record .Word7, low byte) is below Menu_TechCost's low byte, else 0 (probably... - verified
Menu_TechDrawMembers$C2:BA4F · 173 B · EngineThe member window: Menu_SprResetChars, object 7's .Flags18 = $FF; rows = Menu_Unk85 (the members), at most 3, kept in Menu_TechRowsLeft; from member Menu_TechMemberTop, row by row (Menu_TechSprRow... - verified
Menu_TechRowSprite$C2:BAFC · 30 B · EnginePuts the sprite object of character A (page Menu_Times64 of it) in member row Menu_TechSprRow: .Id = A, .Flags18 = 0, .ScreenX low byte = $1C, .ScreenY = Menu_TechRowSprY[Menu_TechSprRow]. - verified
Menu_TechRowSprY$C2:BB1A · 5 B · EnginePer Menu_TechSprRow: the .ScreenY of rows 0-2 ($38, $68, $98: 48 lines apart), 3 (above the window, $08) and 4 (below, $C8), the rows a member scrolls in from. - verified
Menu_TechShowCost$C2:BB1F · 49 B · EngineThe list cursor's tech: Menu_TechPartners (Menu_TechId, the members it needs); its MP cost (Menu_TechMpCost, in Menu_TechCost) and the cost table index into Menu_TechCostIdx[0]; Menu_TextAttr = 4... - verified
Menu_TechListOpen$C2:BB50 · 60 B · EngineThe list window: WRDIVL/H = $1500; Menu_ListTop = Menu_TechListTop x 4; the paging of Menu_TechCount techs eight rows a page from cursor record 0 (Menu_ListPageSetup with Y = the word at... - verified
Menu_TechDrawRows$C2:BB8C · 74 B · Engine - verified
Menu_TechPartners$C2:BBD6 · 76 B · EngineMenu_TechMembers[1-2] = $FF; Menu_SprResetChars; Menu_TechId = Menu_TechList[Menu_TechListRow + Menu_TechListTop] (the cursor's tech); the characters its Menu_TechShown byte needs... - verified
Menu_TechMpCost$C2:BC22 · 55 B · EngineThe MP cost of tech Menu_TechId for the loaded character: on page 0 (Menu_TechPage) X = the id; else (REP #$30) X = the byte at Menu_TechCostIdxs + 64 x (record byte 0 AND $0F, the character) +... - verified
Menu_TechCostCut$C2:BC59 · 22 B · EngineA = the MP cost in A's low byte as the loaded character's accessory (record .Unk2A) cuts it: $A2 halves it, $A3 halves it twice, each time rounded up (LSR, ADC #0); other accessories leave it... - verified
Menu_TechPageCheck$C2:BC6F · 63 B · EngineA key of the member and page, (Menu_TechMemberRow + Menu_TechMemberTop) x 16 OR Menu_TechPage, compared with Menu_Unk84 (which takes it); nothing more when equal. - verified
Menu_TechBuildList$C2:BCAE · 31 B · EngineMenu_TechList's first 24 bytes = $FF, then Menu_TechListBytes and Menu_TechListIds. - verified
Menu_TechListBytes$C2:BCCD · 51 B · EngineLists in Menu_TechBytesList the tech bytes (Menu_TechShown indexes) of page Menu_TechPage (Menu_TechPages: the first byte and the count) whose MenuRom_TechByteMembers has the loaded character's... - verified
Menu_TechListIds$C2:BD00 · 64 B · EngineFor each byte n of Menu_TechBytesList (to the $FF): every set bit of Menu_TechShown[n], from bit 7, is one tech, numbered from Menu_TechFirstIds[n] up (the loop ends at Menu_TechFirstIds[n + 1])... - verified
Menu_TechFirstIds$C2:BD40 · 37 B · EnginePer tech byte 0-36 (Menu_TechShown): the id of the tech of its bit 7. - verified
Menu_TechPages$C2:BD65 · 6 B · EnginePer Menu_TechPage 0-2: the first tech byte and the count (bytes 0-6, 7-21 and 22-36: probably the single, double and triple techs). - verified
Menu_TechDrawList$C2:BD6B · 46 B · EngineThe eight list rows from entry Menu_Tmp00 of Menu_TechList: each id goes to Menu_TechId and is drawn (Menu_TechDrawRow) at $7E:3024 on, $80 bytes a row. - verified
Menu_TechDrawRow$C2:BD99 · 25 B · EngineDraws list row Menu_TechId at $7E:X: its name (Menu_TechDrawName), or for $80 and up (the $FF after the list) 11 blank tiles: the string at Menu_Unk9B76 ($FF bytes) through Menu_DrawString, a tail... - verified
Menu_TechDrawName$C2:BDB2 · 57 B · EngineDraws the name of tech A (11 tiles at MenuRom_TechNames + 11 x A, by the hardware multiplier) at $7E:Menu_MapPtr, with Menu_TextAttr = $0C for a tech with Menu_TechInfo bit 6 (BankFF_UnkF813's... - verified
Menu_TechNextMark$C2:BDEB · 22 B · EngineOn page 0, for a tech with Menu_TechInfo bit 6 (the one being learnt, probably), the draw list MenuRom_TechNextList. - verified
Menu_TechDescIfNew$C2:BE01 · 21 B · EngineMenu_TechDescText when Menu_TechId is not the string drawn last (Menu_Unk0D77) or Menu_Unk0D78 bit 7 is set (the same test is made again there). - verified
Menu_TechPageTitle$C2:BE16 · 29 B · EngineThe page's title string: Menu_HdmaenShadow = Menu_TechHdmaBits, Menu_TextDest = $5356, Menu_Unk0DC9 = $0A, string Menu_TechPage + $76 of the tech text table, through Menu_TechDescText's set-up... - verified
Menu_TechDescText$C2:BE33 · 17 B · EngineMenu_DrawDescText for the tech screen: Menu_TextDest = $5344, Menu_Unk0DC9 = 1, A = Menu_TechId; then (sub-entry Menu_TechTextSetup, $C2:BE44, also the tail of Menu_TechPageTitle) unless A is the... - verified
Menu_TechTextSetup$C2:BE44 · 53 B · Engine - verified
Menu_TechTargetsOpen$C2:BE79 · 85 B · EngineOpens (or, after a use, redraws) the target window of handler 4: the caster (Menu_TechMemberRow + Menu_TechMemberTop, a 16-bit store: the byte after Menu_CurMember = 0) loaded, its cost... - verified
Menu_VramRecTechRows$C2:BECE · 7 B · EngineA Menu_VramRec: VRAM $5840 = $7E:2E80 (BG1 map rows 2-9), $200 bytes; its unused last byte is the first of Menu_VramRecTechLow. - verified
Menu_VramRecTechLow$C2:BED5 · 7 B · EngineA Menu_VramRec: VRAM $5C00 = $7E:3600 (the first half of what Menu_VramRecBg1Low sends), $400 bytes; its unused last byte is the PHP opcode of Menu_TechTargetRows. - verified
Menu_TechTargetRows$C2:BEDC · 83 B · EngineThe target window's rows: for each active member from 0 (Menu_CurMember, stopping at one Menu_LoadPartyCharRec does not load, or when the word at Menu_Unk51, ORed into its result, is non-zero... - verified
Menu_TechTargetSprYX$C2:BF2F · 6 B · EnginePer target row 0-2: the word Menu_TechTargetRows stores at .ScreenY: Y = $58, $78, $98 (32 lines apart), X low byte $E4. - verified
Menu_Mode04List$C2:BF35 · 8 B · EngineMenu_ModeLists entry $04: the handlers Menu_MainThread runs by Menu_ThreadVar (the settings screen, Menu_Mode04H0-H3). - verified
Menu_Mode04H0$C2:BF3D · 8 B · EngineHandler 0: Menu_PlaySound0, Menu_ThreadVar + 1 (handler 1) and a tail jump to Menu_Mode04Init. - verified
Menu_Mode04H1$C2:BF45 · 40 B · EngineHandler 1, every frame, the entry list: Menu_HdmaenShadow = Menu_CfgHdmaBits, Menu_PadInput. - verified
Menu_Mode04H2$C2:BF6D · 50 B · EngineHandler 2, every frame, the button map: Menu_PadInput. - verified
Menu_Mode04H3$C2:BF9F · 53 B · EngineHandler 3, every frame, entry 7's choice of Menu_CfgCLow (cursor records $0C-$0F): Menu_PadInput. - verified
Menu_CfgEntryRun$C2:BFD4 · 43 B · EngineMenu_CfgCursor = Menu_CursorSel and that entry's Menu_CfgEntryTable routine (JSR (abs,X), with P saved around it); Menu_CfgPrevCursor = Menu_CfgCursor (which the routine may have changed); the... - verified
Menu_CfgEntryTable$C2:BFFF · 24 B · EnginePer entry (cursor record) 0-11: the routine Menu_CfgEntryRun calls each frame the cursor is on it (with M=1, X=0).
Bank $C2 · $C2:C000–$CFFF
$C2:C000
Verified · 108
- verified
Menu_CfgEntry0$C2:C017 · 33 B · EngineCursor entry 0: on a confirm Menu_CfgA3 = (it + 1) AND 1, also in Menu_CfgShown, and sound command $F3 with it as the argument (Audio_CmdId / Audio_CmdArg0, Audio_DriverCommand; probably the... - verified
Menu_CfgEntry2$C2:C038 · 18 B · EngineCursor entry 2: on a confirm Menu_CfgA5 = (it + 1) AND 1, also in Menu_CfgShown+2. - verified
Menu_CfgEntry3$C2:C04A · 18 B · EngineCursor entry 3: on a confirm Menu_CfgB6 = (it + 1) AND 1, also in Menu_CfgShown+7. - verified
Menu_CfgEntry4$C2:C05C · 18 B · EngineCursor entry 4: on a confirm Menu_CfgB7 = (it + 1) AND 1, also in Menu_CfgShown+8. - verified
Menu_CfgEntry1$C2:C06E · 18 B · EngineCursor entry 1: on a confirm Menu_CfgA6 = (it + 1) AND 1, also in Menu_CfgShown+3. - verified
Menu_CfgEntry7$C2:C080 · 21 B · EngineCursor entry 7: on a confirm Menu_CursorSel = Menu_CfgCLow + $0C (its record among $0C-$0F), Menu_CfgCLowOpen + 1 and Menu_ThreadVar = 3 (handler 3 picks the value). - verified
Menu_CfgEntry9$C2:C095 · 18 B · EngineCursor entry 9: on a confirm Menu_CfgA7 = (it + 1) AND 1, also in Menu_CfgShown+9. - verified
Menu_CfgEntry5$C2:C0A7 · 18 B · EngineCursor entry 5: on a confirm Menu_CursorSel and Menu_CfgCursor = $0A (entry 10) and Menu_CfgSubOpen = 1 (entries 10 and 11 lead back here). - verified
Menu_CfgEntry10$C2:C0B9 · 24 B · EngineCursor entry 10: Left / Right step Menu_CfgALow in 0-7 (Menu_CfgStepValue); confirm or cancel: Menu_CursorSel and Menu_CfgCursor = 5 (back to entry 5), Menu_CfgSubOpen = 0. - verified
Menu_CfgEntry11$C2:C0D1 · 24 B · EngineCursor entry 11: as entry 10 for Menu_CfgBMid. - verified
Menu_CfgEntry8$C2:C0E9 · 67 B · EngineCursor entry 8, the button map switch: on a confirm Menu_CfgA4 = (it + 1) AND 1, also in Menu_CfgShown+1; when it becomes 1 the map opens. - verified
Menu_CfgEntry6$C2:C12C · 56 B · EngineCursor entry 6, the window style: while Menu_CfgStyleEdit is set, Left / Right step Menu_WinStyle in 0-7 (Menu_CfgStepValue), Menu_Unk0D47 = $0010 and the style's tiles and colours loaded... - verified
Menu_CfgStepValue$C2:C164 · 31 B · EngineWith Left or Right (Menu_CursorDpad bits 1 / 0) the byte at $7E:X goes down / up by 1, wrapping in 0-7; then the three selectors are redrawn (Menu_CfgDrawSelectors) and Menu_PlaySound0. - verified
Menu_CfgMapCursor$C2:C183 · 132 B · EngineHandler 2's frame without Left or cancel. - verified
Menu_CfgMapButtons$C2:C207 · 8 B · EngineThe buttons a map row cycles through, as Pad_Pressed bits: A, B, X, Y, R, L, Select, then $FF (the end). - verified
Menu_CfgMapAssign$C2:C20F · 43 B · EngineGives map row Menu_CursorSel - $0F the button Menu_Tmp00: Menu_CfgMapEdit = Menu_CfgButtonMap again (9 bytes), Menu_Tmp04 = 0, Menu_CfgMapSet for the row; then Menu_CfgMapSet again for the entry... - verified
Menu_CfgMapSet$C2:C23A · 50 B · EngineSets map entry Menu_CfgMapEntry[X] (X itself: the table is 0-7) of Menu_CfgMapEdit to Menu_Tmp00, with Menu_Tmp01 = that entry's old button in Menu_ButtonMap; then copies the entry's clash list (a... - verified
Menu_CfgMapSwap$C2:C26C · 26 B · EngineFor the Menu_Tmp02 + 1 entries copied to Menu_ScrollBuild (from the last): an entry whose Menu_CfgMapEdit byte is Menu_Tmp00 (the new button) gets Menu_Tmp01 (the old one) and is kept in... - verified
Menu_CfgMapFixPages$C2:C286 · 55 B · EngineKeeps the page buttons R and L on map entries 6 and 7 unless rows 0-1 (Menu_CfgMapEdit entries 0 and 1, ORed) use them: entry 7 holding R becomes entry 6's button; without R in entries 0-1, entry... - verified
Menu_CfgMapEntry$C2:C2BD · 8 B · EnginePer row 0-7: its Menu_CfgMapEdit / Menu_ButtonMap entry (the same number). - verified
Menu_CfgMapClashPtrs$C2:C2C5 · 14 B · EnginePer entry 0-6: the address of its clash list (see Menu_CfgMapSet). - verified
Menu_CfgMapClash0$C2:C2D3 · 8 B · EngineThe clash lists: a count, then the map entries whose button the entry may take over (and so must give its old one): entry 0 all the others. - verified
Menu_CfgMapClash1$C2:C2DB · 7 B · Engine - verified
Menu_CfgMapClash2$C2:C2E2 · 6 B · Engine - verified
Menu_CfgMapClash3$C2:C2E8 · 4 B · Engine - verified
Menu_CfgMapClash4$C2:C2EC · 5 B · Engine - verified
Menu_CfgMapClash5$C2:C2F1 · 6 B · Engine - verified
Menu_CfgMapClash6$C2:C2F7 · 4 B · Engine - verified
Menu_CfgMapClash7$C2:C2FB · 4 B · Engine - verified
Menu_Icon3Preview$C2:C2FF · 152 B · EngineMenu_MainPreviewTable entry 3: thread 3's .Wait + 1; the draw list MenuRom_Icon3List; the 14 words from Menu_Bg3TileBuf+$44 (row 1, tile 2 of a 32-tile map) = $21FF, then its tiles 14-15 = $21FB... - verified
Menu_Icon3Redraw$C2:C397 · 30 B · EngineMenu_MainRedrawTable entry 3: Menu_HdmaenShadow = Menu_Icon3HdmaBits, the entry icon's four tile words (Menu_CfgIconMap) zeroed, Menu_VramRecClock queued. - verified
Menu_Mode04Init$C2:C3B5 · 47 B · EngineMode 4's set-up (Menu_Mode04H0 jumps here): Menu_CursorSel and Menu_CursorMovedFrom = Menu_CfgCursor; the draw list MenuRom_Mode04List; Menu_Unk0D0E = $0189; Menu_Unk0D77 and Menu_Unk0D78 = $FF... - verified
Menu_CfgDrawToggles$C2:C3E4 · 55 B · EngineThe on / off marks: for n = 9 down to 0, a 2 x 2 block at the BG map address Menu_CfgToggleMaps[n] (tile words $1530-$1533 for 0, $1534-$1537 for 1) by bit 0 of Menu_CfgShown[n] EOR... - verified
Menu_CfgToggleMaps$C2:C41B · 20 B · EnginePer Menu_CfgShown byte 0-9: the tilemap address of its mark. - verified
Menu_CfgToggleInvert$C2:C42F · 11 B · EnginePer Menu_CfgShown byte 0-9: 1 shows that byte's 0 as the "1" mark (only Menu_CfgA3's); the last byte is only read as the high byte of entry 9's word. - verified
Menu_CfgCopyShown$C2:C43A · 28 B · EngineMenu_CfgShown = the ten bytes Menu_CfgA3 ... - verified
Menu_CfgDrawSelectors$C2:C456 · 36 B · EngineThe three 0-7 selectors: Menu_CfgALow at $7E:2EA6, Menu_CfgBMid at $2F66, Menu_WinStyle at $2FE6, each through Menu_CfgDrawSelector (falling into it for the last): sub-entry Menu_CfgDrawSelector... - verified
Menu_CfgDrawSelector$C2:C47A · 27 B · Engine - verified
Menu_CfgDrawCLow$C2:C495 · 39 B · EngineMenu_CfgCLow's row: the 9 x 2 tiles at $7E:3064 get attribute byte $0C, then the 3 x 2 at $3064 + 6 x (Menu_CfgCLow AND 3) get 0 (Menu_SetAttr2Rows; probably the chosen one lit). - verified
Menu_CfgEntryIcon$C2:C4BC · 61 B · EngineThe cursor entry's icon and text: the 2 x 2 tile words at Menu_CfgIconMap from MenuRom_CfgIcons[Menu_CfgCursor] (the word, then + 1, + 2, + 3); Menu_Unk0DCE = Menu_CfgCursor and Menu_Unk0DCF =... - verified
Menu_CfgEntryByte$C2:C4F9 · 12 B · EnginePer entry 0-11: the offset from Menu_CfgA3 of its byte (entry 5's, $0B, is $0D91, and entry 11's, $0A, is $0D90 (Menu_CfgBMid): both past the ten). - verified
Menu_CfgEntryStrBase$C2:C505 · 12 B · EnginePer entry 0-11: the number added to its byte for Menu_Unk0DCF. - verified
Menu_LoadWindowGfx$C2:C511 · 55 B · EngineLoads the tiles of window style Menu_WinStyle (Menu_Config01 bits 0-2, copied by Menu_LoadGraphics): Menu_SprScratch = $3DC0 (use not traced; Menu_SprLoad uses the bytes as scratch)... - verified
Menu_WindowVramRec$C2:C548 · 7 B · EngineThe Menu_VramRec of Menu_LoadWindowGfx: VRAM $3DC0 = $7E:8800 (Menu_WinTileBuf), $280 bytes. - verified
Menu_UnkC54F$C2:C54F · 43 B · EngineApplies and draws the button map: the local subroutine .select copies MenuRom_DefaultButtonMap (9 bytes, MVN count 8) to Menu_ButtonMap, then, when Menu_CfgA4 is non-zero, Menu_CfgButtonMap over... - verified
Menu_UnkC57A$C2:C57A · 45 B · EngineDraws the button map's six rows from Menu_ButtonMap: for row n = 0-5 (Menu_Tmp00, 16-bit) the tile word of Menu_ButtonMap entry n's button (Menu_ButtonLetter) at Menu_CfgMapRowMap +... - verified
Menu_CfgMapRowOfs$C2:C5A7 · 12 B · EnginePer map row 0-5: the offset in Menu_CfgMapRowMap of its letter, two tile rows ($80 bytes) apart from tile row 13, column 26 on. - verified
Menu_ButtonLetter$C2:C5B3 · 20 B · EngineA = the tile word of the button in A's low byte: the highest set bit picks the entry of MenuRom_ButtonLetters (bit 7 entry 0, ... bit 1 entry 6: the font letters A, X, L, R, B, Y, S). - verified
Menu_UnkC5C7$C2:C5C7 · 90 B · EngineMarks the map rows the edit changes: Menu_CfgMapOld = Menu_CfgButtonMap (8 bytes, MVN count 7), then the entry of the row under the cursor (Menu_CursorSel - Menu_CfgMapRecFirst) set to $FF there... - verified
Menu_Mode05List$C2:C621 · 6 B · EngineMenu_ModeLists entry $05: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the party order; handler 2 is shared with mode 7). - verified
Menu_Mode05H0$C2:C627 · 33 B · EngineHandler 0: with fewer than two rows to pick (Menu_XchgPartyCount + Menu_XchgReserveCount, as icon 4's preview left them) Menu_Mode = 0, Menu_ThreadVar + 1 (back to Menu_MainMenuLoop) and a tail... - verified
Menu_XchgNextFree$C2:C648 · 1 B · EngineMenu_CursorSel = the first row from X + 1 on (from X on for the sub-entry Menu_XchgFirstFree, $C2:C649, which the callers use) whose Menu_XchgRows entry has neither bit 7 (empty) nor bit 6... - verified
Menu_XchgFirstFree$C2:C649 · 20 B · Engine - verified
Menu_Mode05H1$C2:C65D · 23 B · EngineHandler 1, every frame, nothing picked yet: Menu_PadInput. - verified
Menu_XchgPickFirst$C2:C674 · 69 B · Engine - verified
Menu_Mode05H2$C2:C6B9 · 46 B · EngineHandler 2 of modes 5 and 7, every frame, one row picked: Menu_PadInput; neither button as in handler 1. - verified
Menu_XchgClearPicks$C2:C6E7 · 37 B · Engine - verified
Menu_XchgSwap$C2:C70C · 120 B · EngineSwaps the characters at positions Menu_XchgPick and Menu_XchgPick2 of Menu_PartyOrder (Menu_Tmp00 the go-between), Menu_BuildPartyLists, then swaps their 10 x 5 tile blocks (Menu_DrawCmdSwapBlocks... - verified
Menu_XchgBlockPos$C2:C784 · 34 B · EngineThe map position of row A's block: Menu_Tmp00 = the column (Menu_XchgPartyX for rows 0-2; Menu_XchgReserveX for rows 3 on, which count from 0 again; Menu_XchgAloneX when Menu_Unk0D36 is non-zero)... - verified
Menu_Mode07List$C2:C7A6 · 6 B · EngineMenu_ModeLists entry $07: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the party order from BankC2_MenuEntry; handler 2 is mode 5's). - verified
Menu_Mode07H0$C2:C7AC · 52 B · EngineHandler 0: Menu_Unk0D36 (both bytes) = Menu_CurMember (the entry's X: non-zero shows only the party); Menu_XchgMusic; icon 4's preview (Menu_UnkC9E5); the cursor on the first row that can be... - verified
Menu_Mode07H1$C2:C7E0 · 37 B · EngineHandler 1 of mode 7, every frame: Menu_PadInput; neither button as mode 5's handler 1. - verified
Menu_XchgCursor$C2:C805 · 86 B · EngineThe cursor step after Menu_PadInput: Menu_CursorYOfs = 0 (8-bit); with five reserve members or more and a move that hit an edge (Menu_CursorDpad bit 7) Menu_XchgEdge (the list scrolls). - verified
Menu_XchgEdge$C2:C85B · 95 B · EngineA move off the shown reserve rows: after an Up move Menu_CursorSel = 3 (the top row) and, when Menu_Unk80 is non-zero, Menu_Unk80 - 1, Menu_CursorYOfs = Menu_XchgUpYOfs (-48), Menu_XchgScrollPos =... - verified
Menu_XchgScroll$C2:C8BA · 143 B · EngineScrolls the reserve list by one member: Menu_CurMember = Menu_PartyActive + the reserve row coming in (Menu_CursorSel - 3 + Menu_Unk80; also in Menu_Tmp00), its record (Menu_LoadPartyCharRec) and... - verified
Menu_XchgShiftSprites$C2:C949 · 42 B · EngineFor each reserve row (Menu_XchgReserveCount down to 1): the object of its character (Menu_Times64 of the Menu_PartyOrder byte) gets .ScreenY - Menu_ScrollStep (8-bit) and .Anim = 0. - verified
Menu_XchgPoses$C2:C973 · 59 B · EngineThe sprites' poses: .Anim = Menu_XchgPoseStand for the characters at positions 8 down to 0 (Menu_Tmp00), Menu_XchgPoseCursor for the one at Menu_XchgCurEntry and, while Menu_XchgPick is set (bit 7... - verified
Menu_XchgSkip$C2:C9AE · 55 B · EngineMoves the cursor off a row it cannot take. - verified
Menu_UnkC9E5$C2:C9E5 · 126 B · EngineMenu_MainPreviewTable entry 4 (also run by Menu_Mode07H0): thread 3's .Wait = 3; every object hidden (Menu_SprHideAll); the routine of Menu_XchgPreviewTable by Menu_Unk0D36 bit 1... - verified
Menu_XchgPreviewTable$C2:CA63 · 4 B · EngineMenu_UnkC9E5's routine by Menu_Unk0D36 bit 1: Menu_XchgPreviewA (clear), Menu_XchgPreviewB (set). - verified
Menu_XchgPreviewA$C2:CA67 · 114 B · EngineThe draw list MenuRom_XchgListA; Menu_MapPtr = Menu_XchgMap; string 4 of MenuRom_NameStrings (5 with Menu_Unk0D7C set) drawn 4bpp into Menu_TextGfxA (Menu_DrawText4bpp; TextWin_StrIndex, StrTable... - verified
Menu_XchgTextVramRec$C2:CAD9 · 7 B · EngineThe Menu_VramRec of Menu_XchgPreviewA: VRAM $1000 = Menu_TextGfxA ($7E:5E00), $1000 bytes. - verified
Menu_XchgPreviewB$C2:CAE0 · 6 B · EngineA tail jump to Menu_RunDrawList with MenuRom_XchgListB. - verified
Menu_UnkCAE6$C2:CAE6 · 13 B · EngineMenu_MainRedrawTable entry 4: Menu_HdmaenShadow = Menu_XchgHdmaBits and Menu_StartSprThread. - verified
Menu_XchgInit$C2:CAF3 · 152 B · EngineThe screen of modes 5 and 7: the draw list MenuRom_XchgList; Menu_ClearOam; Menu_HdmaenShadow = Menu_XchgHdmaBits; Menu_Unk0D0E = Menu_XchgUnk0D0E; Menu_LoadCharPalettes; Menu_XchgDimLocked; the... - verified
Menu_XchgMusic$C2:CB8B · 52 B · EngineMode 7's music: Menu_XchgMusicOn = 0; nothing more with Menu_Unk7F01CF bit 6 set. - verified
Menu_XchgMusicThread$C2:CBBF · 44 B · EngineThread in slot 2 (Menu_XchgMusic starts it): yields until APUIO1 reads 0; then command Audio_Cmd14 with song Menu_XchgSongId and arguments $80, $80, then Audio_CmdUnk81 with $01, $FF, $FF... - verified
Menu_XchgSendSound$C2:CBEB · 12 B · EngineSends the command already in Audio_CmdId / Audio_CmdArg0 with Audio_CmdArg1 = Audio_CmdArg2 = $80 (Audio_DriverCommand), then falls into the sub-entry Menu_XchgSound81 ($C2:CBF7): command... - verified
Menu_XchgSound81$C2:CBF7 · 23 B · Engine - verified
Menu_XchgLeave$C2:CC0E · 65 B · EngineMode 7's exit: with Menu_XchgMusicOn set, Audio_CmdUnk81 with $08, $01, $01 (Menu_XchgSound81, as Menu_XchgMusic); Menu_FadeOut; then, with Menu_XchgMusicOn set, it yields until APUIO1 reads 0 and... - verified
Menu_XchgDimLocked$C2:CC4F · 100 B · EngineDims the party rows 0-2 whose Menu_XchgRows entry has bit 7 or 6 set: sprite colours (Menu_XchgDimChar, see the quirk) and 6 map rows of its block, on Menu_XchgMap and on Menu_Bg2Map ($1000 on)... - verified
Menu_XchgDimChar$C2:CCB3 · 40 B · EngineHalves colours 1-15 of the sprite palette of the character at position A (A AND $BF: without the locked bit; nothing when bit 7 is set, which never happens from its caller): the 16-bit read at... - verified
Menu_XchgPlaceSprites$C2:CCDB · 80 B · EngineDraws the rows and sprites of the members shown: the reserve rows first (Menu_XchgSprIdx from entry 3, Menu_XchgRowIdx from 0, Menu_CurMember = Menu_PartyActive + Menu_Unk80), each with... - verified
Menu_XchgBuildRows$C2:CD2B · 112 B · EngineBuilds Menu_XchgRows: all nine bytes = Menu_XchgEmpty; Menu_XchgPartyCount = 0; for positions 0-2 of Menu_PartyOrder with a character, in order: + 1 to the count, and the entry = the position... - verified
Menu_XchgAddSprite$C2:CD9B · 48 B · EngineOne member's row and sprite: Menu_LoadPartyCharRec (the character at Menu_PartyList[Menu_CurMember]); unless that had no character (its non-zero A, ORed with the Menu_Unk51 word, expected 0)... - verified
Menu_XchgRowMaps$C2:CDCB · 24 B · EnginePer table entry 0-11 (Menu_XchgSprIdx / 2): the Menu_MapPtr of Menu_DrawMemberRow. - verified
Menu_XchgPlaceAll$C2:CDE3 · 71 B · EnginePlaces the shown members' sprites again (rows not drawn): Menu_XchgHideSprites; Menu_Tmp02 (the table entry x 2) from entry 0 (9 with only the party shown), Menu_Tmp00 (the row) from 0... - verified
Menu_XchgHideSprites$C2:CE2A · 31 B · EngineObjects 6 down to 0: .Id = Menu_SprOff, .Anim = 0, .Flags18 = 0 (as Menu_SprHideAll, which also does object 7). - verified
Menu_XchgPlaceOne$C2:CE49 · 37 B · EnginePlaces the sprite of row Menu_Tmp00 (Menu_XchgRows entry; nothing for an empty one, bit 7): the character at the entry's position (AND Menu_XchgPosMask) gets .Id = the character and .ScreenY /... - verified
Menu_XchgSprPos$C2:CE6E · 24 B · EnginePer table entry 0-11 (as Menu_XchgRowMaps): a sprite's .ScreenY (low byte) and .ScreenX's low byte (high byte). - verified
Menu_XchgScreenMap$C2:CE86 · 16 B · EngineBankFF_BuildScreenMap, Menu_XchgScreenVramRec queued, then a tail jump to Menu_QueueVramRom with Menu_VramRecBg3Full. - verified
Menu_XchgScreenVramRec$C2:CE96 · 7 B · EngineThe Menu_VramRec of Menu_XchgScreenMap: VRAM $7000 = $7E:B000 (BankFF_ScreenGfxDest), $600 bytes. - verified
Menu_XchgStartWave$C2:CE9D · 37 B · EngineBG3SC = Menu_XchgBg3sc (written to the register, long); the Menu_WavePhase / Menu_WaveTick word = 0; Menu_XchgWaveThread started at Menu_XchgWaveStart in slot 2; the 12 bytes of... - verified
Menu_XchgWaveThread$C2:CEC2 · 12 B · EngineThread in slot 2, started at the sub-entry Menu_XchgWaveStart ($C2:CECE): BankFF_StepWave, then for ever: Menu_XchgWaveHdmaBit set in Menu_HdmaenShadow, two frames' wait (Menu_YieldFrames)... - verified
Menu_XchgWaveStart$C2:CECE · 6 B · Engine - verified
Menu_Mode06List$C2:CED4 · 8 B · EngineMenu_ModeLists entry $06: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the save screen; mode $0B shares handlers 2 and 3). - verified
Menu_Mode06H0$C2:CEDC · 33 B · EngineHandler 0: when bit 6 is set in the low byte of Menu_Unk0D34 ($FF when the menu was opened from a field location with bit 7 of Menu_Unk7F01CF clear) or in C2Scene_Unk0294, C2Scene_Unk0299 or... - verified
Menu_Mode06H1$C2:CEFD · 13 B · EngineHandler 1, every frame: Menu_PadInput. - verified
Menu_Mode06H1Confirm$C2:CF0A · 23 B · Engine - verified
Menu_SaveRedraw$C2:CF21 · 15 B · Engine - verified
Menu_SaveSlotVramRec$C2:CF30 · 7 B · EngineThe Menu_VramRec of Menu_SaveRedraw: VRAM Menu_SlotTextVram ($7900) = Menu_SlotTextBufs ($7E:7000), $600 bytes (the three slots' text). - verified
Menu_SaveToSlot$C2:CF37 · 39 B · EngineSaves to slot Menu_SlotIdx: sound effect Menu_SaveSfx (Audio_CmdPlaySfx, Audio_CmdArg1 = Menu_SaveSfxArg; Audio_DriverCommand), Menu_SlotValid of the slot = $FF, BankFF_SaveSlot, a frame's wait... - verified
Menu_Mode06Leave$C2:CF5E · 3 B · EngineHandler 1's cancel: a jump to Menu_ReturnToMainMenu. - verified
Menu_Mode06H2$C2:CF61 · 39 B · EngineHandler 2 of modes 6 and $0B, every frame, the question over a slot that holds a save: Menu_PadInput; neither button: Menu_PlaySound0 when Menu_CursorSel is not Menu_Unk81. - verified
Menu_SaveAskBack$C2:CF88 · 10 B · Engine - verified
Menu_Mode06H3$C2:CF92 · 16 B · EngineHandler 3 of modes 6 and $0B, every frame: Menu_Unk0D9B - 1 (the main cursor not drawn this frame), Menu_PadInput; either button: a branch to Menu_SaveAskBack. - verified
Menu_UnkCFA2$C2:CFA2 · 89 B · EngineThe save screen's cursor step: Menu_SlotIdx = Menu_LoadHiliteRow = Menu_CursorSel (the slot; Menu_PlaySound0 when it differs from the previous one, the old Menu_LoadHiliteRow), the row's highlight... - verified
Menu_UnkCFFB$C2:CFFB · 73 B · EngineThe highlight of row Menu_LoadHiliteRow, probably: Menu_SlotHiliteBuf = Menu_SlotHiliteData (33 bytes), Menu_ScrollBuild = Menu_ScrollSaved (16 bytes: the 3-byte entries of a line count and a...
Bank $C2 · $C2:D000–$DFFF
$C2:D000
Verified · 70
- verified
Menu_SlotHiliteData$C2:D044 · 33 B · EngineCopied to Menu_SlotHiliteBuf by Menu_UnkCFFB: 16 bytes $47, 16 bytes $C7, then $02 (the byte the highlighted entry points at). - verified
Menu_UnkD065$C2:D065 · 118 B · EngineMenu_MainPreviewTable entry 5 (also run by Menu_Mode0BH0): the load screen's draw list MenuRom_LoadList; the slot windows (Menu_DrawSlotWindows); Menu_VramRecUnkFC53 queued; the palette not... - verified
Menu_UnkD0DB$C2:D0DB · 10 B · EngineMenu_MainRedrawTable entry 5: Menu_HdmaenShadow = Menu_SaveHdmaBits. - verified
Menu_UnkD0E5$C2:D0E5 · 40 B · EngineThe save screen over icon 5's preview: Menu_CursorSel = Menu_LoadHiliteRow (the slot shown); the draw list MenuRom_SaveList; the palette flagged; Menu_HdmaenShadow = Menu_SaveHdmaBits; the row's... - verified
Menu_DrawSlotWindows$C2:D10D · 36 B · EngineFor slots 0-2 (Menu_SlotIdx): Menu_DrawSlotWindow at Menu_MapPtr (from Menu_SlotWinMap, + $100: 4 rows, each time; the INC of its high byte is absolute, $0062, with DP $0000 and DB $7E the same... - verified
Menu_DrawSlotWindow$C2:D131 · 37 B · EngineSlot Menu_SlotIdx's window at Menu_MapPtr: its label, 2 tile words (and the row below) from attribute Menu_SlotLabelAttr and tile 2 x slot + 1 (Menu_PutTextTilesAttr); 7 tiles on (X + 10 after the... - verified
Menu_LoadSlotSummaries$C2:D156 · 66 B · EngineMenu_SlotWinStyle (3 bytes) = 0, Menu_Unk0D4C = $FF, then for slots 0-2 (Menu_SlotIdx): Menu_SlotValid[slot] = 0; BankFF_UnkF9C4; when it leaves Menu_Tmp00 = 0 the slot is valid (Menu_SlotValid =... - verified
Menu_SlotLabelVramRec$C2:D198 · 7 B · EngineMenu_VramRec: VRAM $7000 = $7E:6E00 ($200 bytes: the slot labels of Menu_DrawSlotLabel). - verified
Menu_ReadSlotSummary$C2:D19F · 199 B · EngineCopies what the slot screen shows of slot Menu_SlotIdx from SRAM into its Menu_SlotSummaries block ($40 bytes at $7E:7600 + slot x $40). - verified
Menu_SlotLocName$C2:D266 · 39 B · EngineMenu_SlotWinStyle[slot] = the SRAM byte at +$0591 AND 7, probably the slot's copy of Menu_Config01 ($7E:2991; inferred: +$0591 is where it falls if the slot copies $7E:2400 on, as the records at... - verified
Menu_DrawEmptySlot$C2:D28D · 9 B · EngineString Menu_StrEmptySlot, then falls into Menu_DrawSlotText. - verified
Menu_DrawSlotText$C2:D296 · 46 B · EngineDraws string TextWin_StrIndex of MenuRom_SlotStrings into slot Menu_SlotIdx's text buffer (Menu_TextDest = $7E:7000 + slot x $200, cleared first: $200 bytes) with Menu_DrawText. - verified
Menu_DrawSlotLabel$C2:D2C4 · 66 B · EngineDraws string Menu_StrSlotLabel0 + slot of MenuRom_SlotLabelStrings at Menu_SlotLabelFirst ($7E:6E10) + slot x $20 (Menu_DrawText), then shifts it right by 2 pixels Menu_SlotLabelShifts[slot] times... - verified
Menu_ShiftLabelRight$C2:D306 · 35 B · EngineShifts the 2bpp text at Menu_TextDest right by 2 pixels: two tiles side by side (+0 and +$10), and the same for the row of tiles below (+$100 and +$110); bits leave the second tile on the right. - verified
Menu_SlotLabelShifts$C2:D329 · 3 B · EngineTimes Menu_DrawSlotLabel shifts each slot's label right by 2 pixels. - verified
Menu_UnkD32C$C2:D32C · 64 B · EngineSlot Menu_SlotIdx's window: Menu_WinStyle = its Menu_SlotWinStyle; Menu_DrawAddr = Menu_SlotWinMapA + slot x $100; a window of Menu_SlotWinSize (24 x 4 tiles) in that style and its palette row... - verified
Menu_UnkD36C$C2:D36C · 243 B · EngineThe details of slot Menu_SlotIdx: Menu_Unk0D5D's low byte = 0 (8-bit STZ); nothing more for row 3 or a slot without a save (Menu_SlotValid 0). - verified
Menu_SlotEraVramRec$C2:D45F · 7 B · EngineThe Menu_VramRec of Menu_UnkD36C: VRAM $7808 = Menu_TextGfxA ($7E:5E00), $1F0 bytes. - verified
Menu_SlotMemberIcon$C2:D466 · 78 B · EngineA 2 x 2 tile icon for character Menu_Tmp00 (slot member Menu_SlotMemberIdx) at Menu_MapPtr + Menu_SlotIconOfs: the attribute bytes = member x 4 OR Menu_SlotIconAttr (tile bit 8 and palette 4 +... - verified
Menu_SlotIconTiles$C2:D4B4 · 7 B · EnginePer character 0-6: the first of its icon's 4 tiles (with tile bit 8 from the attribute: tiles $1E0-$1FB). - verified
Menu_SaveAskOpen$C2:D4BB · 26 B · EngineThe overwrite question: Menu_CursorSel = Menu_SaveRecYes, the draw list MenuRom_SaveAskList, Menu_HdmaenShadow = Menu_SaveAskHdmaBits, Menu_VramRecBg2B queued. - verified
Menu_SaveAskClose$C2:D4D5 · 27 B · EngineCloses the question: the load screen's close list MenuRom_LoadAskClose, Menu_HdmaenShadow = Menu_SaveHdmaBitsB, Menu_CursorSel = Menu_LoadSavedRow (the slot's row again), Menu_VramRecBg2B queued. - verified
Menu_Mode0BList$C2:D4F0 · 8 B · EngineMenu_ModeLists entry $0B: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below; handlers 2 and 3 are mode 6's, named after it). - verified
Menu_Mode0BH0$C2:D4F8 · 14 B · EngineHandler 0: the main menu's tilemaps (Menu_MainMenuMaps), mode 6's preview (Menu_UnkD065: the slot windows and the last saved slot's details) and the save screen over it (Menu_UnkD0E5), then... - verified
Menu_Mode0BH1$C2:D506 · 19 B · EngineHandler 1, every frame: Menu_PadInput. - verified
Menu_Mode0CList$C2:D519 · 18 B · EngineMenu_ModeLists entry $0C: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the shop). - verified
Menu_Mode0CH0$C2:D52B · 27 B · EngineHandler 0: the shop's set-up (Menu_ShopInit); cursor C (Menu_StartCursorC) on record Menu_ShopRecCursorC with Menu_BlinkMask = Menu_ShopBlinkMask and Menu_CursorTileAttr = Menu_ShopCursorTile (set... - verified
Menu_Mode0CH1$C2:D546 · 69 B · EngineHandler 1, every frame, the top row (buy / sell): Menu_SprUploadMax = 1, Menu_PadInput. - verified
Menu_Mode0CH2$C2:D58B · 82 B · EngineHandler 2, every frame, the buy list: Menu_PadInput. - verified
Menu_ShopListClose$C2:D5DD · 40 B · Engine - verified
Menu_ShopResetPoses$C2:D605 · 19 B · EngineFor sprite objects 6 down to 0: .Anim = 0 (probably the standing pose; Menu_ShopMemberInfo sets Menu_ShopAnimCanEquip on the members who can equip the item). - verified
Menu_Mode0CH5$C2:D618 · 45 B · EngineHandler 5, every frame, the count to buy: Menu_CursorHold = $FF (the cursor does not move), Menu_PadInput. - verified
Menu_Mode0CH3$C2:D645 · 75 B · EngineHandler 3, every frame, the sell list: Menu_PadInput. - verified
Menu_Mode0CH4$C2:D690 · 51 B · EngineHandler 4, every frame, the count to sell: Menu_CursorHold = $FF, Menu_PadInput. - verified
Menu_Mode0CH6$C2:D6C3 · 82 B · EngineHandler 6, every frame, the member sprites: Menu_PadInput. - verified
Menu_Mode0CH7$C2:D715 · 99 B · EngineHandler 7, every frame, the member's equipment slots: Menu_PadInput. - verified
Menu_Mode0CH8$C2:D778 · 87 B · EngineHandler 8, every frame, the slot's item list: Menu_PadInput. - verified
Menu_ShopBuyMove$C2:D7CF · 227 B · EngineHandler 2's frame without confirm or cancel, on the buy list (Menu_ShopIds, top row Menu_ShopBuyTop). - verified
Menu_ShopSellMove$C2:D8B2 · 227 B · EngineMenu_ShopBuyMove for the sell list: the same steps with Menu_ShopSellTop / Menu_ShopSellRow, the list Menu_SellIds / Menu_SellCounts (Menu_Unk04CA = the slot's count), its length Menu_ShopSellLen... - verified
Menu_ShopShiftMap$C2:D995 · 108 B · EngineMoves the list's rows in the tilemap after a one-row scroll; the direction is the sign of Menu_ScrollStep's low byte (3 or -3), read as bit 15 of the word at Menu_ScrollStep - 1. - verified
Menu_ShopQtyStep$C2:DA01 · 52 B · EngineThe D-pad step of the count windows (handlers 4 and 5): Menu_ShopMulArg = Menu_ShopUnitPrice (3 bytes: the word and a 0; the 16-bit STZ also zeroes $0007), Menu_ShopMulLen = 3; Menu_CursorHold =... - verified
Menu_ShopQtyDirs$C2:DA35 · 8 B · EngineMenu_ShopQtyStep's routine by Menu_CursorDir (0 Right, 1 Left, 2 Down, 3 Up). - verified
Menu_ShopQtyRight$C2:DA3D · 19 B · EngineThe count window's D-pad steps; the count is Menu_ItemCount, kept from 1 to Menu_Unk04CA - 1 (the most + 1, set by the handler that opened the window). - verified
Menu_ShopQtyLeft$C2:DA50 · 20 B · Engine - verified
Menu_ShopQtyUp$C2:DA64 · 31 B · Engine - verified
Menu_ShopQtyDown$C2:DA83 · 71 B · Engine - verified
Menu_ShopInit$C2:DACA · 206 B · EngineMode $0C's set-up (Menu_Mode0CH0): Menu_ShopMemberSel = Menu_ShopRecMember0, Menu_CursorSel = Menu_ShopRecBuy; Menu_ClearOam; the draw list MenuRom_ShopList; the members (Menu_ShopListMembers)... - verified
Menu_ShopVramRec$C2:DB98 · 7 B · EngineMenu_VramRec queued by Menu_ShopInit: VRAM $1000 = $7E:B000 (Menu_SprUnpackBuf, where BankFF_BuildTileSets builds its tiles), $1100 bytes. - verified
Menu_ShopCalcPrices$C2:DB9F · 73 B · EngineThe buy price of each shop item, into Menu_ShopBuyPrices[id] (a word per id): Menu_ItemInfo1[id] (probably the item's price) x the word at Menu_PriceFactor through Menu_UnkFD58 (probably... - verified
Menu_ShopListMembers$C2:DBE8 · 54 B · EngineMenu_EquipChars = the ids of Menu_PartyList without the empty ones (bit 7 set), then $FF; Menu_ShopMemberCount = how many. - verified
Menu_ShopMemberSprites$C2:DC1E · 86 B · EngineMenu_SprHideAll, Menu_SprUploadMax = 7; then for each member of Menu_EquipChars (Menu_CurMember counting from 0, the 16-bit LDX also reading $0072; until the $FF): Menu_LoadCharRec; the sprite... - verified
Menu_ShopSprX$C2:DC74 · 7 B · EngineThe member sprites' .ScreenX, one per member 0-6 (indexed by Menu_Tmp02 in Menu_ShopMemberSprites), 32 pixels apart. - verified
Menu_ShopBuyOpen$C2:DC7B · 67 B · EngineOpens the buy list (Menu_Mode0CH1's confirm on Menu_ShopRecBuy): Menu_Unk0D78 = $FF (the next Menu_DrawDescText draws again), Menu_CursorSel = 0, Menu_ArrowX/Y = Menu_ShopArrowXY; the draw list... - verified
Menu_ShopCountIds$C2:DCBE · 28 B · EngineMenu_ShopBuyLen = the number of ids before the first 0 in Menu_ShopIds; the bytes from that 0 to the end of its 32 are zeroed. - verified
Menu_ShopCountHeld$C2:DCDA · 40 B · EngineFor each shop item until the id 0: Menu_ShopHeld = the count of the first inventory slot (Menu_InvIds / Menu_InvCounts) holding that id with a count other than 0, or 0 when there is none. - verified
Menu_ShopBuyDrawRows$C2:DD02 · 30 B · EngineThe 8 rows of the buy list from Menu_ShopBuyTop (Menu_ShopBuyDrawRow for rows 0-7, Menu_MapPtr from Menu_ShopListMap down $80 bytes a row until Menu_ShopMapBelow). - verified
Menu_ShopBuyDrawRow$C2:DD20 · 32 B · EngineRow Menu_ShopRow of the buy list: Menu_ItemId = Menu_ShopIds[top + row], Menu_ShopPrice (its word) = its Menu_ShopBuyPrices entry, and Menu_ShopDrawRow at Menu_MapPtr. - verified
Menu_ShopListPaging$C2:DD40 · 22 B · EngineThe paging of a shop list of Y entries, 8 rows a page from cursor record 0 (Menu_Tmp00 = 8, Menu_PageCursorFirst = 0), with WRDIVL/H = Menu_ShopArrowSpan (the dividend of the list arrows'... - verified
Menu_ShopDrawRow$C2:DD56 · 38 B · EngineOne list row at Menu_MapPtr: for an id (Menu_ItemId) its name (Menu_DrawItemName) and after it Menu_ShopPrice's word in 5 digits (Menu_DrawNumber, flags Menu_ShopPriceDigits: leading zeros blank)... - verified
Menu_ShopMemberInfo$C2:DD7C · 161 B · EngineWhat the members think of item Menu_ItemId (0: nothing). - verified
Menu_ShopSlotOfsTable$C2:DE1D · 4 B · EngineThe Menu_CharRec offset of the slot of item categories 0-3 (as Menu_EquipSlotOffsets: weapon .Unk29, .Unk28, .Unk27, accessory .Unk2A). - verified
Menu_ShopMemberNums$C2:DE21 · 53 B · EngineA member's numbers in the shop: at Menu_ShopInfoMap + Y the tile byte Menu_ShopEquippedTile when it has the item equipped (Menu_EquipFlags[Menu_CurMember]); then the attack pair (the record's... - verified
Menu_ShopNumPair$C2:DE56 · 66 B · EngineDraws a member's value Menu_Tmp00 (0-255) as two tile words: tile bytes at Menu_ShopNumMap + Y and + 2, attribute bytes at + 1 and + 3. - verified
Menu_ShopSellOpen$C2:DE98 · 52 B · EngineOpens the sell list (Menu_Mode0CH1's confirm on Menu_ShopRecSell): Menu_ArrowX/Y = Menu_ShopArrowXY; the draw list MenuRom_ShopSellList; with Menu_CfgA5 clear Menu_ShopSellRow/Top = 0... - verified
Menu_ShopSellBuild$C2:DECC · 101 B · EngineBuilds the sell list from the inventory: the first 8 bytes of Menu_SellIds zeroed; then for each of the 256 slots its count goes to Menu_SellCounts at the next list place, and the id too when it... - verified
Menu_ShopSellDrawRows$C2:DF31 · 32 B · EngineThe 8 rows of the sell list from Menu_ShopSellTop (Menu_ShopSellDrawRow for rows 0-7, Menu_MapPtr from Menu_ShopListMap down $80 bytes a row). - verified
Menu_ShopSellDrawRow$C2:DF51 · 37 B · EngineRow Menu_ShopRow of the sell list: Menu_ItemId = Menu_SellIds[top + row] (a 16-bit store: Menu_Unk04CA = 0), Menu_ShopPrice (its word) = the item's Menu_ItemInfo1 word / 2, rounded up (the LSR's... - verified
Menu_ShopQtyOpen$C2:DF76 · 79 B · EngineOpens the count window (handlers 2 and 3 on a confirm): Menu_InfoValue = Menu_ItemSortKeys[Menu_ItemId] (the weapon power or armour value); Menu_ShopListSel = Menu_CursorSel, Menu_CursorSel =... - verified
Menu_ShopQtyLists$C2:DFC5 · 10 B · EngineMenu_ShopQtyOpen's draw list (bank $FF) by item category 0-4: one for category 0, one for 1 and 2, one for 3 and 4 (what each shows is not traced; Menu_InfoValue is set just before). - verified
Menu_ShopQtyClose$C2:DFCF · 50 B · EngineCloses the count window: Menu_CursorSel = Menu_ShopListSel; the 32 bytes from Menu_ShopQtyRowMap zeroed; Menu_ShopLast (and $0084) = $FF from the A the MVN leaves (the next list frame redraws the...
Bank $C2 · $C2:E000–$EFFF
$C2:E000
Verified · 104
- verified
Menu_ShopQtyDraw$C2:E001 · 17 B · EngineThe count window's numbers: the draw list MenuRom_ShopQtyList (probably Menu_ItemCount and Menu_ShopPrice; not traced) and Menu_VramRecBg1Low queued. - verified
Menu_ShopDescNone$C2:E012 · 5 B · EngineMenu_DrawDescText with A = Menu_Unk51 (expected 0): string 0, probably the line shown with no item (a tail jump). - verified
Menu_ShopToMembers$C2:E017 · 65 B · EngineFrom the top row to the member sprites (Menu_Mode0CH1 on Up / Down): Menu_ShopMenuSel = Menu_CursorSel, Menu_ThreadVar = 6, Menu_CursorSel = Menu_ShopMemberSel; Menu_ShopAttrArg =... - verified
Menu_ShopMemberAttr$C2:E058 · 26 B · EngineMenu_SetRowsAttr on the two tile rows at Menu_ShopMarkMap + 8 x member Menu_Tmp00 (low byte), with A = Menu_ShopAttrArg: its low byte the tiles per row, its high byte the attribute bits 4-7 to set. - verified
Menu_ShopDimMembers$C2:E072 · 51 B · EngineFor the members 0 to Menu_Unk85 - 1 (Menu_ShopRow, from Menu_Unk51): Menu_ShopMemberAttr with Menu_ShopAttrArg as given, and its palette (BankFF_LoadE4Palette of its Menu_EquipChars id, halved... - verified
Menu_ShopEquipOpen$C2:E0A5 · 76 B · EngineThe equipment of the member under the cursor (Menu_Mode0CH6's confirm): Menu_CompareAttrs (7 bytes) zeroed; Menu_CurMember = Menu_CursorSel - Menu_ShopRecMember0 and its record loaded... - verified
Menu_ShopSlotRows$C2:E0F1 · 23 B · EngineThe slot rows highlighted (Menu_ShopSlotAttr), Menu_ArrowX/Y = Menu_ShopEquipArrowXY, the slot's item list set up (Menu_EquipListSetup) and Menu_VramRecBg1Rows24 queued. - verified
Menu_ShopEquipNext$C2:E108 · 72 B · EngineChanges the member in the equipment view on Menu_PadAction's page bits: Menu_PadPageBack the next member (to 0 after the last, Menu_Unk85 - 1), Menu_PadPageOn the one before (to the last before 0). - verified
Menu_ShopSlotAttr$C2:E150 · 18 B · EngineMenu_ListKind (written absolute) = Menu_CursorSel (the slot), then Menu_SetSlotRowsAttr from Menu_ShopSlotRowsMap (the selected slot's rows keep palette 0, the others get palette 7). - verified
Menu_ShopTryItem$C2:E162 · 40 B · EngineHandler 8's item under the cursor tried on: the member's record again (Menu_LoadPartyCharRec), Menu_ItemId = Menu_EquipList[Menu_EquipListTop + Menu_CursorSel - Menu_EquipListFirstRec], stored in... - verified
Menu_ShopCompare$C2:E18A · 82 B · EngineThe stats with the record copy as it is (Menu_CharCalcStats; stat 5 doubled with accessory Menu_DoubleStat5Item, as Menu_CharRecalc does); for the 7 stats in Menu_ShopCompareOfs order the new... - verified
Menu_ShopCompareOfs$C2:E1DC · 7 B · EngineMenu_ShopCompare's order: the Menu_CharRec offsets of stats 0, 2, 5, 3, 1, 4, 6 in .Derived (Menu_EquipCompareOfs' entries 2-8). - verified
Menu_Mode0DList$C2:E1E3 · 10 B · EngineMenu_ModeLists entry $0D: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the name entry). - verified
Menu_Mode0DH0$C2:E1ED · 20 B · EngineHandler 0: Menu_NamedOnce |= Menu_CurMember. - verified
Menu_Mode0DH3$C2:E201 · 8 B · EngineHandler 3 (after handler 2's choice and its fade-out), also branched to by handler 0: the name screen (Menu_NameInit), Menu_ThreadVar + 1 (handler 4 from here, handler 1 from handler 0) and a tail... - verified
Menu_Mode0DH4$C2:E209 · 21 B · EngineHandler 4, every frame after handler 3: waits for a button (any bit of Pad_Pressed, read as a word), then Menu_PlaySound0, Menu_HdmaenShadow = Menu_NameHdmaBits, Menu_ArrowsOff = 0 and... - verified
Menu_Mode0DH1$C2:E21E · 24 B · EngineHandler 1, every frame, the grid: Menu_PadInput, Menu_NameGridStep (D-pad, confirm and cancel); with Start newly pressed (Pad_Pressed bit 0) Menu_NameFinish, and when it took the name (A = 0) a... - verified
Menu_Mode0DH2$C2:E236 · 49 B · EngineHandler 2, every frame, the choice before the first name: Menu_PadInput, the line under the cursor (Menu_NameChoiceText). - verified
Menu_NameGridStep$C2:E267 · 49 B · EngineThe grid's frame: Menu_NamePrevPos (a word) = cursor record 0's X and Y; WRMPYA = 16 (the grid's cell size, used by the steps); for a direction (Menu_CursorDir not negative) its step from... - verified
Menu_NameGridDirs$C2:E298 · 8 B · EngineMenu_NameGridStep's routine by Menu_CursorDir (0 Right, 1 Left, 2 Down, 3 Up). - verified
Menu_NameUp$C2:E2A0 · 10 B · EngineThe grid cursor's steps, wrapping: Menu_NameUp row - 1 (7 below 0), Menu_NameDown ($C2:E2AA) row + 1 (0 from 8); then (.row) Menu_NameRow = it, WRMPYB = it, Menu_NameUnk0F0A = 0, and cursor record... - verified
Menu_NameDown$C2:E2AA · 34 B · Engine - verified
Menu_NameLeft$C2:E2CC · 10 B · Engine - verified
Menu_NameRight$C2:E2D6 · 30 B · Engine - verified
Menu_NameEdit$C2:E2F4 · 34 B · EngineConfirm: Menu_NameAddChar, then Menu_PlaySound0. - verified
Menu_NameAddChar$C2:E316 · 52 B · EngineThe character under the grid cursor, MenuRom_NameChars[Menu_NameRow x 10 + Menu_NameCol], goes to Menu_NameBuf[Menu_NameLen] (at most index 4: with 5 characters the last is replaced), and... - verified
Menu_NameCursorX$C2:E34A · 25 B · EngineThe X of the two sprites under the name (OAM entries 96 and 97, Menu_NameCursorOam) = Menu_NameCursorX0 + 8 x Menu_NameLen (at most 4): probably the mark at the next character's place. - verified
Menu_NameFinish$C2:E363 · 45 B · EngineStart on the name entry: the first byte of the character's name (Menu_NameDest, in TextWin_CharNames) = 0, so the old name is not found by the test after; the entry trimmed into Menu_NameTrimmed... - verified
Menu_NameTrim$C2:E390 · 80 B · EngineMenu_NameTrimmed (6 bytes) zeroed; Menu_NameBuf's 6 bytes copied to Menu_NameWork; from the end, the trailing spaces (Menu_NameSpace) are zeroed, zeros skipped, up to the first other byte; then... - verified
Menu_NameTaken$C2:E3E0 · 46 B · EngineCompares Menu_NameTrimmed with each of the 8 names of TextWin_CharNames (6 bytes apart), up to 5 bytes or a 0 in both: on a match Menu_PlaySound1 and A = $FF; else A = 0 (TDC). - verified
Menu_NameInit$C2:E40E · 304 B · EngineThe name screen: Menu_CursorSel = 0; the draw list MenuRom_NameList; the grid's text built at Menu_NameGridText (Menu_NameGridBuild) and put at Menu_NameGridMap with Menu_DrawString (Menu_TextAttr... - verified
Menu_NameVramRec$C2:E53E · 7 B · EngineMenu_VramRec queued by Menu_NameInit: VRAM $7800 = Menu_TextGfxA ($7E:5E00), $800 bytes. - verified
Menu_NameGridBuild$C2:E545 · 49 B · EngineThe grid's text at Menu_NameGridText: 8 rows, each the 10 characters of MenuRom_NameChars in turn with a byte $FF after each, then Menu_NameNewLine; a 0 at the end. - verified
Menu_NameChoiceInit$C2:E576 · 93 B · EngineThe choice screen before the first name: $480 bytes of MenuRom_NameChoiceMap to Menu_Unk3600, then 12 more blocks of 16 bytes from the ROM after it, each to every other 16 bytes of the map... - verified
Menu_NameChoiceText$C2:E5D3 · 56 B · EngineThe line of the choice under the cursor: string Menu_CursorSel + 1 of MenuRom_NameStrings, drawn (as Menu_DrawDescText does, by the text thread Menu_StartDescText starts) into Menu_NameChoiceDest... - verified
Menu_Mode0EList$C2:E60B · 8 B · EngineMenu_ModeLists entry $0E: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the load screen). - verified
Menu_Mode0EH0$C2:E613 · 8 B · EngineHandler 0: the load screen (Menu_LoadInit), Menu_ThreadVar + 1 (handler 1) and a tail jump to Menu_StartFadeIn. - verified
Menu_Mode0EH1$C2:E61B · 104 B · EngineHandler 1, every frame, the slot list. - verified
Menu_Mode0EH1_new$C2:E683 · 17 B · Engine - verified
Menu_Mode0EH1_start$C2:E694 · 26 B · Engine - verified
Menu_Mode0EH2$C2:E6AE · 87 B · EngineHandler 2, every frame, the slot to start from (after Menu_LoadAskSlot): Menu_PadInput. - verified
Menu_Mode0EH3$C2:E705 · 62 B · EngineHandler 3, every frame, the erase question (records 4 yes, 5 no): Menu_PadInput; neither button: Menu_PlaySound0 when the cursor moved. - verified
Menu_LoadCursor$C2:E743 · 128 B · EngineThe load screen's cursor: while the row Menu_CursorSel has Menu_SlotValid 0 (row 3: Menu_Unk0D4C), it moves on, up (- 1) after an Up move (Menu_CursorDpad), else down, wrapping over rows 0-3. - verified
Menu_LoadInit$C2:E7C3 · 126 B · EngineThe load screen: the draw list MenuRom_LoadList; the slot windows (Menu_DrawSlotWindows); Menu_SlotIdx = Menu_SramLastSlot (the slot saved last), or 3 (row 3) when no slot is valid; Menu_CursorSel... - verified
Menu_LoadAskSlot$C2:E841 · 73 B · EngineThe question of handler 2: Menu_LoadMsgShown + 1 (Menu_UnkD36C then skips only $C2:D39E-$D403, after its test at $C2:D399: its draw list ($FF:C15E), Menu_DrawClock, a text line (Menu_DrawText of a... - verified
Menu_LoadMsgVramRec$C2:E88A · 7 B · EngineMenu_VramRec queued by Menu_LoadAskSlot: VRAM $7108 = Menu_TextGfxA ($7E:5E00), $600 bytes. - verified
Menu_LoadEraseOpen$C2:E891 · 38 B · EngineThe erase question (Menu_Mode0EH1 jumps here): Menu_SlotIdx = the row (Menu_CursorSel, with B = 0 from the TDC); Menu_LoadSavedRow = it, Menu_CursorSel = Menu_LoadRecYes, Menu_HdmaenShadow =... - verified
Menu_LoadEraseSlot$C2:E8B7 · 93 B · EngineErases slot Menu_SlotIdx: Menu_SlotValid and Menu_SlotWinStyle of it = 0; the low byte of its Menu_SramSlotSign = slot x 2 (no longer BankFF_SlotSign, so the slot reads as empty). - verified
Menu_VramRecUnkE914$C2:E914 · 7 B · EngineA Menu_VramRec: VRAM $5840 = $7E:2E80, $80 bytes (the first two rows Menu_VramRecClock sends). - verified
Menu_MainCursorThread$C2:E91B · 8 B · EngineThread 3 (Menu_RunThreads starts it): Menu_DrawMainCursor, wait a frame, for ever. - verified
Menu_ResetMainCursor$C2:E923 · 10 B · EngineMenu_ClearOam (every sprite hidden), Menu_Unk56 = 0 (no flip), then the cursor part of Menu_DrawMainCursor (its .cursor, which ends with this routine's PLP). - verified
Menu_DrawMainCursor$C2:E92D · 79 B · EngineHides OAM entries 16-95 of the copy at $0700 (Y $E0, large) and, unless Menu_Unk0D9B was non-zero (it is cleared: one frame skipped), places the main cursor in entry 28 (Menu_OamMainCursor): X/Y... - verified
Menu_PadInputThread$C2:E97C · 8 B · EngineMenu_PadInput, wait a frame, for ever: a thread body like Menu_MainCursorThread's. - verified
Menu_PadInput$C2:E984 · 85 B · EngineMenu_CursorMove first (with the caller's P), then rebuilds Menu_PadAction from 0: bit 7 (confirm) when Pad_Pressed has a bit of Menu_ButtonMap entry 0, bit 6 (cancel) for entry 1 (the entries... - verified
Menu_PadActionButtons$C2:E9D9 · 9 B · EngineMenu_ButtonMap entries Menu_PadInput tests for Menu_PadAction bits 7 and 6: only the first two bytes (0 and 1) are read; the other seven ($00 $00 $00 $08 $06 $07 $FF) are not read by any code... - verified
Menu_CursorMove$C2:E9E2 · 61 B · EngineMenu_Unk81 = Menu_CursorSel (the selection before this call) and Menu_CursorDpad = the D-pad bits of Menu_PadRepeat (its high byte: Up, Down, Left, Right = bits 3-0). - verified
Menu_CursorDirTable$C2:EA1F · 8 B · EngineMenu_CursorMove's routine per Menu_CursorDir 0-3 (Right, Left, Down, Up). - verified
Menu_CursorRecOffset$C2:EA27 · 15 B · EngineX = (A AND $FF) x 6: the byte offset of a 6-byte Menu_CursorPos record. - verified
Menu_CursorToUp$C2:EA36 · 5 B · EngineMenu_CursorDirTable's routines: Menu_CursorSel = the record's .Up (here), .Down (Menu_CursorToDown, $EA3B), .Left (Menu_CursorToLeft, $EA40) or .Right (Menu_CursorToRight, $EA45) byte, each stored... - verified
Menu_CursorToDown$C2:EA3B · 5 B · Engine - verified
Menu_CursorToLeft$C2:EA40 · 5 B · Engine - verified
Menu_CursorToRight$C2:EA45 · 3 B · Engine - verified
Menu_CursorStoreNeighbour$C2:EA48 · 11 B · Engine - verified
Menu_ListCursorEdge$C2:EA53 · 46 B · EngineAfter Menu_PadInput in a paged list. - verified
Menu_ListPageSetup$C2:EA81 · 57 B · EngineSets up the paging of a list of Y entries shown Menu_Tmp00 rows at a time: Menu_PageStep = the rows; the largest top row (Y - rows, or 0 when the list fits) goes to Menu_Tmp01, Menu_ListMaxTop... - verified
Menu_PlaySound$C2:EABA · 8 B · EngineMenu_SendSound with the caller's A: sound command $18, argument A (probably a sound effect id: command $19 is Audio_CmdPlaySfx; what $18 does differently is not traced). - verified
Menu_PlaySound0$C2:EAC2 · 10 B · EngineMenu_SendSound with id 0: the sound of a cursor move (Menu_MainMenuLoop plays it on a new icon, the mode 1 handlers when Menu_CursorSel changed) and of a return to the main menu, probably the... - verified
Menu_PlaySound1$C2:EACC · 10 B · EngineMenu_SendSound with id 1 (the mode 1 handler at $C2:9C83 plays it when Menu_EquipListLen is 0 instead of opening the list: probably the refusal sound). - verified
Menu_PlayPendingSound$C2:EAD6 · 35 B · EngineMenu_NmiTimer = 0 (so the command is sent now), then: Menu_Unk0DBC bit 1 set: it is cleared and sound 6 played; else bit 0 set: it is cleared and sound 7 played; else nothing. - verified
Menu_PlaySfxNow$C2:EAF9 · 10 B · EngineAudio_CmdPlaySfx with argument A, always sent: Menu_NmiTimer is zeroed first, then Menu_SendSoundArg. - verified
Menu_SendSound$C2:EB03 · 5 B · EngineAudio_CmdId = Audio_Cmd18, Audio_CmdArg0 = A; then (also Menu_SendSoundArg, $EB08, with the command already set) the command is sent only while Menu_NmiTimer is 0: Menu_NmiTimer = 3 (the menu NMI... - verified
Menu_SendSoundArg$C2:EB08 · 23 B · Engine - verified
Menu_ListScrollStep$C2:EB1F · 124 B · EngineOne frame of a list's smooth scroll (set up by Menu_ListScrollInit): builds Menu_ScrollRows entries of an HDMA-style table (3 bytes: line count, 16-bit value) in Menu_ScrollBuild from... - verified
Menu_ListScrollInit$C2:EB9B · 157 B · EngineSets up a one-row smooth scroll of the table at Menu_NmiMoveDest (Menu_NmiMoveSize bytes, the caller sets both; n = Menu_ScrollRows entries of 3 bytes: line count, 16-bit value): - Menu_NmiMoveSrc... - verified
Menu_DrawPortrait$C2:EC38 · 91 B · EngineDraws a 6 x 6 tile block at Menu_MapPtr (rows $40 bytes apart): the tiles MenuRom_PortraitTiles[Menu_PortraitChar] + 0 to 35 in order, each with Menu_Tmp01 as its attribute byte; then copies the... - verified
Menu_SetRowsAttr$C2:EC93 · 25 B · EngineFor X rows from Menu_MapPtr down (Menu_MapPtr += $40 each): Menu_SetRowAttr on A's low byte tiles, which keeps each attribute byte's bits 0-3 and ORs in A's high byte. - verified
Menu_SetAttr2Rows$C2:ECAC · 22 B · EngineSets the attribute byte of A's low byte tiles (0: 256) at Menu_MapPtr and of the ones a row ($40 bytes) below to A's high byte. - verified
Menu_SetRowAttr$C2:ECC2 · 25 B · EngineMenu_SetRowsAttr's row: for A's low byte tiles (0: 256) at Menu_MapPtr, attribute byte = (it AND $0F) OR the byte at 7,S: the high byte of the A that Menu_SetRowsAttr pushed (under this routine's... - verified
Menu_LoadSlotWindowStyle$C2:ECDB · 45 B · EngineWith DB=$7E: Menu_Unk0D47 low byte = Menu_WinStyle x 20, high byte = (Menu_SlotIdx + 1) x 4 + 3 (bits 2-4 the palette row, so row slot + 1); then Menu_DrawWindowFrame, Menu_FillWindowInside and... - verified
Menu_LoadWindowPal$C2:ED08 · 41 B · EngineCopies the 8 colours of window style Menu_WinStyle (bits 0-2) from MenuRom_WindowPals (16 bytes per style) into colours 8-15 of palette row n of Menu_PalBuf, n = bits 2-4 of Menu_Unk0D47's high... - verified
Menu_RunDrawList$C2:ED31 · 40 B · EngineRuns the draw list at $FF:X: for each command byte c below $80, the MenuRom_DrawArgLens[c] + 1 bytes after it go to Menu_DrawArg0 on (an MVN, so DB = $7E while the command runs) and... - verified
Menu_DrawCmdTable$C2:ED59 · 22 B · EngineMenu_RunDrawList's command routines by byte offset: commands $00-$14 (even). - verified
Menu_CopyDrawArgsUnused$C2:ED6F · 8 B · EngineINX, then an MVN of A + 1 bytes from $FF:X to Menu_DrawArg0: the argument copy of Menu_RunDrawList as a routine. - verified
Menu_DrawCmdFill$C2:ED77 · 25 B · EngineCommand $00 (4 argument bytes): fills Menu_DrawArg0 bytes (a word, at least 3) from Menu_MapPtr with the word Menu_DrawArg2, which is also kept in Menu_TextWord. - verified
Menu_DrawPosToAddr$C2:ED90 · 26 B · EngineMenu_DrawAddr = Menu_MapPtr + row x $40 + column x 2, from Menu_DrawArg2 (column = bits 0-4, row = the high byte). - verified
Menu_DrawCmdWindow$C2:EDAA · 6 B · EngineCommand $04 (6 argument bytes): Menu_DrawCmdFrame (the frame), then Menu_FillWindowInside (with the inside size the frame left). - verified
Menu_DrawCmdFrame$C2:EDB0 · 6 B · EngineCommand $12 (6 argument bytes: style, attribute byte, position, width, height): Menu_DrawWindowSetup, then Menu_DrawWindowFrame. - verified
Menu_DrawCmdInside$C2:EDB6 · 29 B · EngineCommand $14 (6 argument bytes, as Menu_DrawCmdFrame): the inside of a window only: Menu_DrawWindowSetup, Menu_DrawInnerW = (width AND $1F) - 2, Menu_DrawInnerH = (height AND $3F) - 2... - verified
Menu_DrawWindowSetup$C2:EDD3 · 35 B · EngineThe window's first tile: Menu_Unk0D47 low byte = style x 20 (the style is Menu_DrawArg0 AND $3F when its bit 7 is set, else Menu_WinStyle AND 7; 20 tiles per style), high byte = Menu_DrawArg1 (its... - verified
Menu_DrawWindowFrame$C2:EDF6 · 45 B · EngineDraws the frame of a window at Menu_DrawAddr, Menu_DrawArg4 AND $1F tiles wide (w) and Menu_DrawArg5 AND $3F tall (h), from tile word t = Menu_Unk0D47: the top row (Menu_FrameEdgeRow: t, then t+1... - verified
Menu_FrameEdgeRow$C2:EE23 · 53 B · EngineOne edge row of the frame at Menu_DrawAddr2: tiles t, t+1, t+2 (t = Menu_FrameTile), the pair t+1 / t+2 repeated by an MVN up to column w - 2 (none when Menu_DrawInnerW is below 2), then t OR 3 at... - verified
Menu_FrameSides$C2:EE58 · 39 B · EngineMenu_DrawInnerH side rows from Menu_DrawAddr2: the left edge t (t = Menu_FrameTile) and the right edge t+1 (at + Menu_FrameRightOfs, an indirect store), (t+1) EOR 3 for the next row. - verified
Menu_FillWindowInside$C2:EE7F · 118 B · EngineFills the inside of the window at Menu_DrawAddr (from one row down and one column right: + $42), Menu_DrawInnerW tiles wide and Menu_DrawInnerH tall, with the 4 x 4 pattern Menu_WinFillPattern... - verified
Menu_WinFillPattern$C2:EEF5 · 16 B · EngineTile offsets of the window inside, 4 rows of 4 (Menu_FillWindowInside adds them to the style's first tile). - verified
Menu_DrawCmdCopyBlock$C2:EF05 · 38 B · EngineCommand $02 (6 argument bytes): copies a block of Menu_DrawArg4 tiles by Menu_DrawArg5 rows from position Menu_DrawArg0 to position Menu_DrawArg2 (both through Menu_DrawPosToAddr; Menu_DrawArg2 is... - verified
Menu_CopyMapRows$C2:EF2B · 29 B · EngineMenu_DrawInnerH times: Menu_DrawInnerW + 1 bytes from Menu_DrawAddr to Menu_DrawAddr2 (MVN in bank $7E), both moved one row ($40) down. - verified
Menu_DrawCmdString$C2:EF48 · 29 B · EngineCommand $06 (5 argument bytes): Menu_DrawString of string Menu_DrawArg0 (a word index into MenuRom_StringPtrs, strings in bank $FF) at position Menu_DrawArg2, with Menu_DrawArg4 as the count and... - verified
Menu_DrawString$C2:EF65 · 25 B · EngineDraws the string at B:Y to the tilemap at $7E:X: Menu_TextFlags = A's low byte, Menu_TextLeft = it AND $7F (tiles to put; 0: 256), Menu_DrawAddr2 = X (the line start), DB = B, Menu_DrawStringLoop... - verified
Menu_DrawStringLoop$C2:EF7E · 25 B · EngineThe string loop: a 0 byte ends it; codes $01-$0F run their Menu_TextCtrlTable routine (Menu_TextCtrl) and do not count; other bytes are put (Menu_PutChar) and counted down in Menu_TextLeft, which... - verified
Menu_PutChar$C2:EF97 · 39 B · EnginePuts tile A with attribute Menu_TextAttr at $7E:X (long stores) and X += 2. - verified
Menu_TextCtrl$C2:EFBE · 21 B · EngineRuns control code A's Menu_TextCtrlTable routine: JMP (Menu_TextVec) with the return address pushed by PER so that its RTS lands on Menu_TextCtrlRet, whose RTS returns to Menu_DrawStringLoop. - verified
Menu_TextCtrlRet$C2:EFD3 · 1 B · Engine - verified
Menu_TextCtrlTable$C2:EFD4 · 32 B · EngineMenu_TextCtrl's routine per control code $00-$0F; $00 (never dispatched: 0 ends a string) and $0D-$0F are Menu_TextCtrlRet (no effect). - verified
Menu_TextNewLine$C2:EFF4 · 17 B · EngineCode $01: Menu_DrawAddr2 (the line start) += $80 (two rows), or $40 with Menu_TextFlags bit 7 set; X = it.
Bank $C2 · $C2:F000–$FFFF
$C2:F000
Verified · 106
- verified
Menu_TextSetPos$C2:F005 · 9 B · EngineCode $02 (a word): Menu_DrawAddr2 = X = Menu_MapPtr + the word. - verified
Menu_TextSkip2$C2:F00E · 3 B · Engine - verified
Menu_TextNumber$C2:F011 · 13 B · EngineCode $03 (4 bytes: the value's address, then the Menu_DrawNumber word: flags, bank): Menu_DrawNumber at X. - verified
Menu_TextSkip4$C2:F01E · 4 B · Engine - verified
Menu_TextSubString$C2:F022 · 20 B · EngineCode $04 (a 24-bit pointer): Menu_DrawStringLoop on the string there (DB = its bank byte), sharing Menu_TextLeft. - verified
Menu_TextName$C2:F036 · 50 B · EngineCode $05 (a word): the string at $7E:word as one-row text of at most 5 tiles (Menu_TextLeft/Flags = 5 / $80 meanwhile), padded with tile $FF to 5; then Menu_TextLeft/Flags back and X = the start + 10. - verified
Menu_TextSetAttr$C2:F068 · 9 B · EngineCode $0A (a byte): Menu_TextAttr = it. - verified
Menu_TextCopyTile$C2:F071 · 28 B · EngineCode $07 (a word): the tile word at $7E:word is copied to the map at X (X += 2) and counted in Menu_TextLeft. - verified
Menu_TextBlanks$C2:F08D · 21 B · EngineCode $08 (a byte n): n tiles $FF (Menu_PutChar; 0: 65536), not counted in Menu_TextLeft. - verified
Menu_TextPalFrom$C2:F0A2 · 22 B · EngineCode $06 (a word): Menu_TextAttr's palette bits (2-4) = those of the byte at $7E:word. - verified
Menu_TextSetFlags$C2:F0B8 · 9 B · EngineCode $09 (a byte): Menu_TextFlags = it. - verified
Menu_TextHex$C2:F0C1 · 16 B · EngineCode $0B (4 bytes, as code $03): Menu_DrawHex at X. - verified
Menu_TextNumberOrBar$C2:F0D1 · 67 B · EngineCode $0C (3 bytes: a limit index k, then a word address in bank $7E): the byte there as 2 digits with leading zeros blank (Menu_DrawNumber, flags $11) while it is below MenuRom_NumLimits[k] ($63 =... - verified
Menu_DrawNumber$C2:F114 · 43 B · EngineDraws the 1-3 byte value at B:Y (B = A's high byte) in decimal at $7E:X. - verified
Menu_BinToBcd$C2:F13F · 59 B · EngineMenu_NumBcd (4 bytes, BCD) = the Menu_NumBytes-byte value at Y (lowest byte first): for each set bit, its value in BCD from Menu_BcdBitValues is added in decimal mode. - verified
Menu_BcdBitValues$C2:F17A · 96 B · Engine2^0 to 2^23 as 4-byte BCD numbers (lowest byte first), for Menu_BinToBcd. - verified
Menu_DrawBcdDigits$C2:F1DA · 49 B · EngineWith DB=$7E, draws Menu_NumDigits + 1 digits of Menu_NumBcd at Menu_NumPos (Y), highest first (from byte Menu_NumDigits / 2, its high nibble only when Menu_NumDigits is odd), with Menu_PutBcdDigit. - verified
Menu_PutBcdDigit$C2:F20B · 28 B · EnginePuts digit A AND $0F at Y (tile $D4 + digit, Menu_TextAttr), Y += 2. - verified
Menu_DrawHex$C2:F227 · 37 B · EngineDraws the 4 bytes at B:Y (B = A's high byte) in hex at $7E:X: A's low byte + 1 digits (Menu_DrawHexDigits); Menu_NumDigits/Flags = A (as a word). - verified
Menu_DrawHexDigits$C2:F24C · 29 B · EngineMenu_NumDigits + 1 hex digits of the 4 bytes at Menu_NumBcd at Y, highest first (as Menu_DrawBcdDigits, no zero blanking). - verified
Menu_PutHexDigit$C2:F269 · 20 B · EnginePuts tile Menu_HexDigitTiles[A AND $0F] with Menu_TextAttr at Y, Y += 2. - verified
Menu_HexDigitTiles$C2:F27D · 16 B · EngineThe tiles of hex digits 0-F (Menu_PutHexDigit): $73-$7C for 0-9, then $F1 $F2 $36 $7D $38 $34 for A-F. - verified
Menu_DrawClock$C2:F28D · 63 B · EngineDraws hours:minutes at $7E:X from the play-time digits at Y (minute ones, minute tens, hour ones, hour tens, then a maxed flag: three callers pass Menu_PlayTime+2, Menu_UnkD36C ($C2:D3AA) passes... - verified
Menu_ClockPair$C2:F2CC · 16 B · EngineA = byte Y+1 x 10 + byte Y (tens and ones), Y += 2; Menu_NumBcd's first byte = tens x 2. - verified
Menu_DrawItemName$C2:F2DC · 6 B · EngineMenu_ItemNamePtr for id A, then Menu_DrawString: 11 tiles of bank $CC at $7E:X (two-row text). - verified
Menu_ItemNamePtr$C2:F2E2 · 17 B · EngineY = Menu_ItemNamePtrs[A AND $FF] (a bank-$CC address), A = $CC0B (the bank and Menu_DrawString's count, 11). - verified
Menu_DrawDescText$C2:F2F3 · 63 B · EngineDraws string A of the table at $CC:2EB1 with the text-window decoder (Menu_StartDescText), unless it is the string drawn last (A = Menu_Unk0D77) and Menu_Unk0D78 bit 7 is clear: then nothing. - verified
Menu_DrawCmdSetMap$C2:F332 · 5 B · EngineCommand $08 (2 argument bytes): Menu_MapPtr = Menu_DrawArg0. - verified
Menu_DrawCmdMapRec$C2:F337 · 43 B · EngineCommand $0C (4 argument bytes): with DB=$00, fills the 8-byte record at Menu_DrawArg0 (low WRAM) as a Menu_VramRec: .Dest = Menu_DrawArg2, .Src = $9000 + (Menu_DrawArg0 AND $F0) x 8, .SrcBank and... - verified
Menu_DeadF362$C2:F362 · 2 B · EngineREP #$10 that no code reaches: Menu_DrawCmdMapRec ends with RTS before it, Menu_DrawCmdTable points at $F364, and no JSR/JMP or pointer to $F362 was found. - verified
Menu_DrawCmdCopyRom$C2:F364 · 20 B · EngineCommands $0A and $0E (2 argument bytes): copies the n bytes after the count byte n at $FF:Menu_DrawArg0 to Menu_MapPtr (MVN; n = 0: 256). - verified
Menu_DrawCmdSwapBlocks$C2:F378 · 82 B · EngineCommand $10 (6 argument bytes): swaps the block of Menu_DrawArg4 AND $1F tiles by Menu_DrawArg5 AND $3F rows at position Menu_DrawArg2 with the one at Menu_DrawArg0 (Menu_DrawArg2 is overwritten... - verified
Menu_InitSprites$C2:F3CA · 88 B · EngineSets up objects 0-6: .Id = n, .TileAttr = Menu_SprInitAttrs[n], .Anim = 0, .Dir = 1, Menu_SprLoad and Menu_SprAnimate; then object 7 gets .TileAttr = Menu_SprInitAttrs[7] and objects 7 and 8 .Id =... - verified
Menu_SprLoad$C2:F422 · 294 B · EngineLoads the definition of the object at DP: .Flags18 = 0, .PrevAnim and .LastFrame = $FF (so the next Menu_SprAnimate starts over and uploads), the banks of .FrameListPtr/.TimeListPtr = $E4... - verified
Menu_SprInitAttrs$C2:F548 · 20 B · Engine.TileAttr per object (OAM tile and attribute words: tile bits 0-8, palette bits 9-11); Menu_InitSprites reads entries 0-7, entries 8 and 9 are not read in matched code. - verified
Menu_SprDefTables$C2:F55C · 6 B · EngineBank-$E4 addresses of the definition records of kinds 0, 1 and 2 (Menu_SprLoad; $F000 and $F023 have 5-byte records, $F600 10-byte ones). - verified
Menu_SprTileCounts$C2:F562 · 4 B · Engine.TileCount by definition byte 4 bits 0-1: the frame size in units of 16 tiles (Menu_SprUploadTiles) and of 40 frame bytes (Menu_SprFrameBytes). - verified
Menu_SprResetChars$C2:F566 · 34 B · EngineObjects 6 down to 0: .Id = n, .Anim = 0, .Flags18 = $40 (animated by Menu_SprThread but not handed to Menu_SprPlaceOam). - verified
Menu_SprHideAll$C2:F588 · 31 B · EngineObjects 7 down to 0: .Id = $FF (off), .Anim = 0, .Flags18 = 0. - verified
Menu_LoadCharPalettes$C2:F5A7 · 70 B · EngineColours 1-12 of sprite palettes 1-7 (Menu_PalBuf colours $91 + 16n) from the first 7 entries of MenuRom_E4Palettes, then colours 13-15 of each from the bank-$D1 record of character n's weapon... - verified
Menu_WeaponRecSrc$C2:F5ED · 57 B · EngineFor character A: its weapon (Menu_CharRec.Unk29, the category-0 byte of Menu_EquipSlotOffsets) into Menu_LastWeapon, then X = Menu_Unk21BASrc + 6 x MenuRom_WeaponUnkIdx[weapon], the source of the... - verified
Menu_Times64$C2:F626 · 29 B · EngineY = Menu_Unk0D2C = (A AND $FF) x $40 (by the hardware multiplier), P kept, A kept for a caller with M=0 (with M=1 see Exit). - verified
Menu_StartSprThread$C2:F643 · 20 B · EngineMenu_Unk0D2E = Menu_Unk0D30 = 0 and starts Menu_SprThread in slot 5 (Menu_SprSlot). - verified
Menu_SprThread$C2:F657 · 68 B · EngineThread (slot 5): each frame, Menu_SprUploads = 0, then for objects 0-8 (DP = each page; the tenth page is not visited): skipped when .Id or .Flags18 has bit 7 set; when .Anim differs from... - verified
Menu_SprNextFrame$C2:F69B · 2 B · Engine - verified
Menu_SprAnimate$C2:F69D · 49 B · EngineSteps the animation of the object at DP. - verified
Menu_SprDir0$C2:F6CE · 3 B · Engine - verified
Menu_SprDir1$C2:F6D1 · 1 B · Engine - verified
Menu_SprDir2$C2:F6D2 · 2 B · Engine - verified
Menu_SprDir3$C2:F6D4 · 4 B · Engine - verified
Menu_SprDirTable$C2:F6D8 · 8 B · Engine - verified
Menu_SprAnimEnd$C2:F6E0 · 117 B · Engine - verified
Menu_SprFrameBytes$C2:F755 · 7 B · EngineBytes per frame record by .TileCount (40 per unit: 32 of tile list, 8 of .FrameData); entries 0, 4 and 5 are not used by the Menu_SprTileCounts values. - verified
Menu_SprUploadTiles$C2:F75C · 277 B · EngineBuilds the frame's tiles in WRAM and queues them for VRAM: Y = Menu_SprVramRec.Src = Menu_SprTileBuf ($8000) + (Menu_Unk0D72 word x 2 AND $FF00), plus 1 when bit 7 of $0D73 is set (the ASL's carry... - verified
Menu_SprPlaceOam$C2:F871 · 148 B · EnginePlaces object n's sprites (DP = its page, n = (DP - Menu_SprPages) / $40) in the OAM copy from entry 64 + 4n (Menu_SprOam + 16n): .TileCount x 4 16x16 sprites, each at the object's .ScreenX +... - verified
Menu_DrawText4bpp$C2:F905 · 7 B · EngineMenu_DrawText with TextWin_Mode = Menu_TextWinMode4bpp (low nibble 1: TextWin_Blit4bpp) instead of Menu_TextWinMode: the BRA joins it at its store (.mode). - verified
Menu_DrawText$C2:F90C · 55 B · EngineDraws the string set up in TextWin_StrIndex/StrTable into the buffer at $7E:Menu_TextDest with the text-window decoder: TextWin_Mode = Menu_TextWinMode, TextWin_GfxBuf = $7E:Menu_TextDest... - verified
Menu_CfgEntryText$C2:F943 · 111 B · EngineThe settings screen's text for entry Menu_Unk0DCE with value string Menu_Unk0DCF (strings of MenuRom_CfgTextTable): TextWin_Mode = 0, TextWin_GfxBuf's bank = $7E, TextWin_StrTable =... - verified
Menu_CfgTextThread$C2:F9B2 · 84 B · EngineA thread (slot 2, from Menu_CfgEntryText): Menu_Unk0DD0 = $80, Menu_TextDest = $4E0A, Menu_TextGlyphs and Menu_TextCol = 0, TextWin_GfxBuf and Menu_TextGfxSrc = $5E00, Menu_TextPenStart = 8... - verified
Menu_CfgValueThread$C2:FA06 · 67 B · Engine - verified
Menu_StartDescText$C2:FA49 · 86 B · EngineStarts the text-window decoder on the string the caller set up (TextWin_StrIndex / StrTable) for Menu_DescTextThread: TextWin_Mode = 0, TextWin_GfxBuf's bank = $7E, Menu_TextGlyphs and... - verified
Menu_DescTextThread$C2:FA9F · 6 B · EngineA thread (slot 2, from Menu_StartDescText): the steps (Menu_TextStepLoop), then the thread ends (Menu_ThreadEnd). - verified
Menu_TextStepWait$C2:FAA5 · 3 B · EngineThe step loop of the text threads, entered at Menu_TextStepLoop ($C2:FAA8; Menu_TextStepWait, a frame's wait first, is where it goes on after each step): TextWin_StepCount = Menu_TextSteps... - verified
Menu_TextStepLoop$C2:FAA8 · 65 B · Engine - verified
Menu_TextUpload$C2:FAE9 · 174 B · EngineAfter a decoder step, when TextWin_Unk17 (glyphs drawn) is not Menu_TextGlyphs (which takes it): Menu_TextRec (at Menu_SprScratch) = VRAM Menu_TextTileDest from $7E:Menu_TextGfxSrc, $400 bytes... - verified
Menu_PutTextTiles$C2:FB97 · 29 B · EngineY tile words from $7E:X on, a row pair as Menu_TextUpload writes them: the first word = (A AND $EF) OR $3100 (A's low byte the tile, attribute byte $31), the row below ($40 bytes on) the same with... - verified
Menu_PutTextTilesAttr$C2:FBB4 · 26 B · EngineAs Menu_PutTextTiles with A's whole word: the first word = A AND $33EF (high-byte bits 2-3 and 6-7 cleared: palette bits 0-1 and both flips, and the tile's bit 4; tile bits 8-9, palette bit 2 and... - verified
Menu_VramRecBg1Big$C2:FBCE · 7 B · EngineVRAM $5800 = $7E:2E00, $C00 bytes. - verified
Menu_VramRecBg1High$C2:FBD5 · 7 B · EngineVRAM $5800 = $7E:2E00, $800 bytes (the half before Menu_VramRecBg1Low's). - verified
Menu_VramRecBg1Rows16$C2:FBDC · 7 B · EngineVRAM $5A00 = $7E:3200, $240 bytes. - verified
Menu_VramRecClock$C2:FBE3 · 7 B · EngineVRAM $5840 = $7E:2E80, $640 bytes (queued after the clock is drawn, Menu_MainMenuLoop, and by most menu screens). - verified
Menu_VramRecBg1Low$C2:FBEA · 7 B · EngineVRAM $5C00 = $7E:3600, $800 bytes. - verified
Menu_VramRecBg1Rows24$C2:FBF1 · 7 B · EngineVRAM $5B00 = $7E:3400, $600 bytes. - verified
Menu_VramRecBg2$C2:FBF8 · 7 B · EngineVRAM $6000 = $7E:3E00 (Menu_Bg2Map), $1000 bytes. - verified
Menu_VramRecBg2B$C2:FBFF · 7 B · EngineVRAM $6040 = $7E:3E80, $680 bytes. - verified
Menu_VramRecBg2Low$C2:FC06 · 7 B · EngineVRAM $6400 = $7E:4600, $800 bytes. - verified
Menu_VramRecBg2Rows2$C2:FC0D · 7 B · EngineVRAM $6040 = $7E:3E80, $300 bytes. - verified
Menu_VramRecBg3Full$C2:FC14 · 7 B · EngineVRAM $6800 = $7E:4E00, $1000 bytes. - verified
Menu_VramRecBg3$C2:FC1B · 7 B · EngineVRAM $6800 = $7E:4E00, $680 bytes. - verified
Menu_VramRecBg3Rows4$C2:FC22 · 7 B · EngineVRAM $6880 = $7E:4F00, $480 bytes. - verified
Menu_VramRecBg3Rows3$C2:FC29 · 7 B · EngineVRAM $6860 = $7E:4EC0, $440 bytes. - verified
Menu_VramRecBg3Rows16$C2:FC30 · 7 B · EngineVRAM $6A00 = $7E:5200, $400 bytes. - verified
Menu_VramRecBg3Rows62$C2:FC37 · 7 B · EngineVRAM $6FC0 = $7E:4E00, $80 bytes. - verified
Menu_VramRecBg3Rows60$C2:FC3E · 7 B · EngineVRAM $6F80 = $7E:5D00, $100 bytes. - verified
Menu_VramRecBg3Rows58$C2:FC45 · 7 B · EngineVRAM $6F40 = $7E:5C80, $100 bytes. - verified
Menu_VramRecBg3Rows48$C2:FC4C · 7 B · EngineVRAM $6E00 = $7E:4E00, $400 bytes. - verified
Menu_VramRecUnkFC53$C2:FC53 · 7 B · EngineVRAM $7800 = $7E:6E00 (Menu_SlotLabelArea), $800 bytes: the slot labels and the three Menu_SlotTextBufs after them (queued by Menu_LoadInit and by Menu_UnkD065 at $C2:D071; the text threads send... - verified
Menu_VramRecDigits$C2:FC5A · 7 B · EngineVRAM $5740 = $7E:8E80 (Menu_ShadowTiles), $140 bytes. - verified
Menu_VramRecUnkFC61$C2:FC61 · 7 B · EngineVRAM $1800 = $7E:3600, $600 bytes (queued by Menu_NameChoiceInit, which builds the choice screen's map there from MenuRom_NameChoiceMap). - verified
Menu_VramRecRomTiles$C2:FC68 · 7 B · EngineVRAM $2010 = MenuRom_VramTiles ($FF:EB88), $480 bytes; its last byte ($FC6E) is .Size's high byte, so its .Unk7 (the byte after it, $FC6F) is the first of Menu_VramRecsFont. - verified
Menu_VramRecsFont$C2:FC6F · 16 B · EngineTwo Menu_VramRec records Menu_LoadGraphics copies into Menu_VramQueue: VRAM $0000 = Menu_TileBuf ($2000 B) and VRAM $7000 = Menu_Bg3TileBuf ($1000 B). - verified
Menu_VramRecFontB$C2:FC7F · 8 B · EngineVRAM $1000 = Menu_TileBuf, $1300 bytes (Menu_LoadGraphics step 2). - verified
Menu_VramRecObj$C2:FC87 · 8 B · EngineVRAM $4000 (the sprite tiles) = Menu_TileBuf, $800 bytes (Menu_LoadGraphics step 5). - verified
Menu_VramRecsWin$C2:FC8F · 23 B · EngineThree records Menu_LoadGraphics copies (24 bytes: the third record's unused last byte is the first byte of MenuRom_DefaultConfig, $C2:FCA6): VRAM $2010 = $FF:0000 ($1F80 B), VRAM $3000 =... - verified
MenuRom_DefaultConfig$C2:FCA6 · 3 B · EngineThe first of the 12 bytes Menu_ClearConfigAndFlags copies to Menu_Config for a new game ($84, $A0, $01; MenuRom_DefaultButtonMap follows as bytes 3-11). - verified
MenuRom_DefaultButtonMap$C2:FCA9 · 9 B · EngineBytes 3-11 of the new game's Menu_Config: the default button map as masks in the Pad_Pressed layout that Menu_PollPad builds (low byte A X L R B Y Select Start, not JOY1's: $08 is B and $02 Select... - verified
Menu_ShopBuyQtyInit$C2:FCB2 · 47 B · EngineThe count window's start for a buy: Menu_ItemCount = 1, Menu_ShopPriceHi = 0, Menu_ShopPrice and Menu_ShopUnitPrice = Menu_ShopBuyPrices[Menu_ItemId] (a word; B = 0 from the TDC for the index)... - verified
Menu_ShopSellQtyInit$C2:FCE1 · 60 B · EngineThe same for a sale: the price is the Menu_ItemInfo1 word of Menu_ItemId halved, rounded up (the LSR's carry added with the Menu_Unk51 word, expected 0), and the dividend 9,999,999 - the gold... - verified
Menu_ShopDivide$C2:FD1D · 59 B · EngineMenu_ShopQuot (3 bytes) = the 24-bit Menu_Tmp00-02 / the 16-bit Menu_ShopMulArg, the remainder in Menu_ShopRem: the dividend goes to Menu_ShopQuot+1 to +3 (two word stores; the second also writes... - verified
Menu_UnkFD58$C2:FD58 · 16 B · EngineMenu_ShopProduct = the Menu_Tmp00 word x the Menu_ShopMulLen bytes at Menu_ShopMulArg: Menu_UnkFD68 for the low byte, then the high byte (Menu_Tmp01 into WRMPYA) through the rest of Menu_UnkFD68... - verified
Menu_UnkFD68$C2:FD68 · 47 B · EngineMenu_ShopProduct (4 bytes) = 0, then for each of the Menu_ShopMulLen bytes of Menu_ShopMulArg (X from Menu_Unk51, expected 0; Y from the Menu_Unk51 word) its hardware product with Menu_Tmp00's low... - verified
Menu_ShopGainGold$C2:FD97 · 36 B · EngineThe gold (Menu_Unk2C53, 3 bytes) + Menu_ShopPrice (3 bytes); a carry out of the third byte sets it to Menu_GoldMax's ($98), never in practice (at most 9,999,999 + 99 x 65,535, a 16-bit unit price... - verified
Menu_ShopPayGold$C2:FDBB · 36 B · EngineThe gold - Menu_ShopPrice (3 bytes); a borrow sets the third byte to $98 as Menu_ShopGainGold's carry does, so paying more than the gold would leave $98xxxx (then capped at 9,999,999 or not)... - verified
Menu_ShopCapGold$C2:FDDF · 43 B · EngineCaps the gold (Menu_Unk2C53, 3 bytes) at Menu_GoldMax (9,999,999): when it is at or above it, it becomes Menu_GoldMax and X = Menu_GoldCapped (also for exactly 9,999,999, stored again); else X = 0. - verified
Menu_Mode0FList$C2:FE0A · 2 B · EngineMenu_ModeLists entry $0F: Menu_Exit alone (it never returns, so no second entry is read; the bytes after it are not a list). - verified
BankC2_OldBuildLeftovers$C2:FE0C · 500 B · EngineNot code and, as far as found, never read: tools/xref.py, run on every address of $C2:FE0C-$FFFF, finds no call or jump from matched code.
Bank $C3 · $C3:0000–$0FFF
$C3:0000
Verified · 39
- verified
BankC3_Entry0000$C3:0000 · 2 B · Enginethe bank's entry vectors, reached from other banks by JML/JSL: $0000 BankC3_Entry0000 → C3_BootModule (JML from Field_HookLeaveToBankC3 and Evt_OpFF_Misc; never returns) $0002 Decomp_ToWramVec →... - verified
Decomp_ToWramVec$C3:0002 · 6 B · Engine - verified
BankC3_Entry0008$C3:0008 · 6 B · Engine - verified
BankC3_Entry000E$C3:000E · 3 B · Engine - verified
BankC3_Entry0011$C3:0011 · 3 B · Engine - verified
C3_BootModule$C3:0014 · 99 B · EngineLeaves the field for the program packed at $C3:1313 (the bank $C3 module): points the NMI and IRQ trampolines at C3_BootNmi and C3_BootIrq, keeps the caller's A in C3_EntryArg, unpacks the module... - verified
WinFx_BuildCircle$C3:0077 · 326 B · EngineWrites a window table for a circle: one 2-byte entry per line (left edge, right edge; WinFx_EmptyEntry = nothing on that line) at WinFx_TablePtr, in bank $7F if WinFx_TableBank bit 0 is set, else $7E. - verified
WinFx_Exit$C3:01BD · 9 B · Engine - verified
WinFx_FillEmpty$C3:01C6 · 4 B · EngineFills window-table entries with WinFx_EmptyEntry: stores it at X and copies it forward with an MVN of WinFx_Tmp + 1 bytes into X + 2 on (the bank by WinFx_TableBank bit 0). - verified
WinFx_FillEmptyFrom$C3:01CA · 26 B · Engine - verified
WinFx_StepWipe$C3:01E4 · 249 B · EngineOne frame of a per-line wipe, run while WinFx_C3EMode is nonzero (Field_HookWinC3E calls it once a frame through BankC3_Entry000E and uses the result as HDMA data for window 2, probably one window... - verified
C3_RandomByte$C3:02DD · 42 B · EngineReturns a new pseudo-random byte in A and keeps it in C3_RandSeed: A (with C rotated in) plus C3_RandSeed, stored; then X's low byte, the seed, C3_FrameCount, the H counter (OPHCT; the counters... - verified
C3_ScaleBitmap$C3:0307 · 546 B · EngineDraws a scaled copy of a bitmap (one byte per pixel, bits 0-3 used, 64-byte source rows from C3Scale_SrcBase) into rows of 4-bitplane bytes, 32 bytes per output row from C3Scale_Dest. - verified
C3_BootIrq$C3:0529 · 31 B · EngineIRQ handler of the bank $C3 module, during its unpacking and after: C3_BootModule points the IRQ trampoline here, and no write to the trampolines ($0500-$0507) was found in the unpacked module... - verified
C3_BootNmi$C3:0548 · 15 B · EngineNMI handler while the module is unpacked: acknowledges the NMI (RDNMI) and sets INIDISP to full brightness, display on, ending the forced blank C3_BootIrq set at line 211 of the frame before. - verified
Decomp_ToWram$C3:0557 · 860 B · EngineUnpacks the data at Decomp_SrcBank:Decomp_Src into WRAM from Decomp_Dest, writing through WMDATA, and stores the number of bytes written in Decomp_OutLen. - verified
C3_ModuleNmi$C3:08B3 · 22 B · EngineThe module's NMI handler (C3_ModuleFrame points the NMI trampoline here when it ends): saves A, X, Y, DP and DB, runs one frame (C3_ModuleFrame), sends a pending song request (C3_SongCheck), and... - verified
C3_NmiBusy$C3:08C9 · 7 B · EngineNMI handler while C3_ModuleFrame runs (it points the NMI trampoline here first): acknowledges the NMI (RDNMI) and returns, so a frame that overruns is not re-entered. - verified
C3_ModuleFrame$C3:08D0 · 117 B · EngineOne frame of the module, from its NMI: DP = DB = 0, acknowledges the NMI, HDMA off, the NMI trampoline to C3_NmiBusy, interrupts on again if C3_EntryArg has C3_BootIrqOn, forced blank; then... - verified
C3_IrqAck$C3:0945 · 7 B · EngineAn IRQ handler that only acknowledges the IRQ (TIMEUP) and returns. - verified
C3_MulSigned$C3:094C · 80 B · EngineSigned multiply with the CPU multiplier: C3_MulA (16-bit) x C3_MulB (8-bit) into C3_MulProduct, signed. - verified
C3_CopyFEto7E$C3:099C · 4 B · EngineMVN from ROM bank $FE (C3Rom_PackPtrs' bank) to WRAM bank $7E, then RTL: copies A + 1 bytes from $FE:X to $7E:Y. - verified
C3_CopyFEto7F$C3:09A0 · 4 B · EngineAs C3_CopyFEto7E, to WRAM bank $7F. - verified
C3_SongCheck$C3:09A4 · 53 B · EngineSends a song change to the sound driver: unless C3_SongBusy is set or C3_EntryArg has bit 5 (C3_EntryNoSong), and if C3_SongReq differs from C3_SongCur, it copies the request to C3_SongCur and... - verified
C3_CopyCodeOrder$C3:09D9 · 16 B · EngineEight source offsets for C3_BuildCopyCode's outer passes: $000, $200, $100, $300, $400, $600, $500, $700 (16-bit, indexed by the pass x 2). - verified
C3_BuildCopyCode$C3:09E9 · 165 B · EngineWrites a routine through WMDATA (WMADD set by the caller): 1,024 pairs LDA abs / STA dp (each a 16-bit word, so the routine runs with M=0), with LDA #page / TCD before every 128 pairs, and a final... - verified
C3_ReadPad$C3:0A8E · 113 B · EngineThe module's pad handling, once a frame: waits for the auto-joypad read, keeps JOY1 in C3_Pad; L+R+Select+Start alone (C3_PadSoftReset) resets the game (forced blank, NMI and HDMA off, JML Reset)... - verified
C3_RunScript$C3:0AFF · 441 B · EngineRuns a script of the module from C3Script_Ptr until an opcode yields. - verified
C3_TaskListRemove$C3:0CB8 · 21 B · EngineClears the first word of C3_TaskList equal to X. - verified
C3_NmiListRemove$C3:0CCD · 21 B · EngineAs C3_TaskListRemove, for C3_NmiTaskList. - verified
C3_TaskListAdd$C3:0CE2 · 22 B · EngineStores X in the first zero word of C3_TaskList (no bound: a full list is searched past its end). - verified
C3_NmiListAdd$C3:0CF8 · 22 B · EngineAs C3_TaskListAdd, for C3_NmiTaskList (run by C3Mod_RunNmiTasks). - verified
C3_SprListSmall$C3:0D0E · 80 B · EngineAdds a list of small sprites to the OAM shadow: the list (in bank $7E at A, read through WMDATA) is a byte n + 1, then n records of tile, attribute, X, Y. - verified
C3_SprListLarge$C3:0D5E · 94 B · EngineAs C3_SprListSmall for large sprites with a 9-bit X: X = byte + C3_SprBaseX (16-bit); from $100 up it is replaced by $101 (off screen, through the word C3_OffscreenX: low byte $01, bit 15 set); a... - verified
C3_SprOneSmall$C3:0DBC · 55 B · EngineAdds one small sprite from a 4-byte record in bank $7E at X (tile, attribute, X, Y; X and Y + C3_SprBaseX / C3_SprBaseY, 8-bit) at C3_OamPos; its high-table byte (through C3_OamHiPtr) is shifted... - verified
C3_SprOneLarge$C3:0DF3 · 54 B · EngineAs C3_SprOneSmall for a large sprite: the high-table byte is always shifted right by 2 with size = 1 and X bit 8 = 0. - verified
C3_FindDivisor$C3:0E29 · 13 B · EngineCounts the divisor up until the quotient falls below C3_ScratchF4: each pass waits two NOPs, adds 1 to X, reads the quotient of the division running (RDDIVL) and starts the next one with WRDIVB =... - verified
BankC3_StaffText$C3:0E36 · 196 B · EngineASCII, lines ended by $0A (the text starts with a $0A, so its first line is empty): the staff of the jet-bike race (the module), as in the ROM ("JONNY" spelt so). - verified
WinFx_BuildQuad$C3:0EFA · 263 B · EngineWrites a window table (2 bytes per line: left edge, right edge) for the four-sided shape through WinFx_QuadPoints (X, Y bytes of points 0-3, in order) at WinFx_QuadTablePtr in bank...
Bank $C3 · $C3:1000–$1FFF
$C3:1000
Verified · 4
- verified
WinFx_QuadEdgeFlat$C3:1001 · 36 B · Engine - verified
WinFx_QuadEdge$C3:1025 · 149 B · EngineDraws one edge of WinFx_BuildQuad's shape into the table byte column WinFx_QuadTablePtr points at (left bytes, or right bytes once it was moved up by one): from (WinFx_QuadX0, WinFx_QuadY0) to... - verified
WinFx_QuadExit$C3:10BA · 6 B · Engine - verified
BankC3_EndMarker$C3:10C0 · 11 B · EngineASCII "CODE END C3" right after the kernel's last RTL ($C3:10BF, WinFx_QuadExit's, where WinFx_QuadEdge and WinFx_BuildQuad end), probably left by the build to mark the end of the code.
Bank $C3 · $C3:2000–$2FFF
$C3:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:3000–$3FFF
$C3:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:4000–$4FFF
$C3:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:5000–$5FFF
$C3:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:6000–$6FFF
$C3:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:7000–$7FFF
$C3:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:8000–$8FFF
$C3:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:9000–$9FFF
$C3:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:A000–$AFFF
$C3:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:B000–$BFFF
$C3:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:C000–$CFFF
$C3:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:D000–$DFFF
$C3:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:E000–$EFFF
$C3:E000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:F000–$FFFF
$C3:F000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:0000–$0FFF
$C6:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:1000–$1FFF
$C6:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:2000–$2FFF
$C6:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:3000–$3FFF
$C6:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:4000–$4FFF
$C6:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:5000–$5FFF
$C6:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:6000–$6FFF
$C6:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:7000–$7FFF
$C6:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:8000–$8FFF
$C6:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:9000–$9FFF
$C6:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:A000–$AFFF
$C6:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:B000–$BFFF
$C6:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:C000–$CFFF
$C6:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:D000–$DFFF
$C6:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:E000–$EFFF
$C6:E000
Verified · 51
- verified
C6Scene_Win1HdmaOn$C6:E000 · 40 B · EngineScript routine (pack 1 +$05C3): sets up C2Scene_HdmaTable[0] (two runs of 112 lines) as HDMA channel 1 to WH0/WH1 (indirect, two registers) and turns the channel on: the set-up part of... - verified
C6Scene_UnpackObjPackA$C6:E028 · 37 B · EngineScript routine (pack 0 +$11FD, pack 2 +$0295 and +$08A0, pack 3 +$02F8, pack 4 +$0D1D and +$112C, pack 5 +$020F and +$02BA, pack 6 +$0A15): unpacks entry C6Scene_ObjPackA of C2SceneRom_ObjPacks... - verified
C6Scene_UnpackPalPackA$C6:E04D · 37 B · EngineScript routine (pack 0 +$120D, pack 2 +$02A5 and +$08B0, pack 3 +$0308, pack 4 +$0D3D and +$113C, pack 5 +$021F and +$02CA, pack 6 +$0A25; each two script ops after an object unpack, an op $03 on... - verified
C6Scene_FadeGradInit$C6:E072 · 143 B · EngineScript routine (pack 3 +$031E): a fade from white. - verified
C6Scene_PlaceOnEdgeRandom$C6:E101 · 111 B · EngineScript routine (pack 3 +$05CB): puts the task on the edge of a shape drawn as a table of 2-byte line entries (left edge, right edge, by the use; pack 3 sets C2Tmp_10-$12 to $7E:9176 with op $13... - verified
C6Scene_Grad2Init$C6:E170 · 143 B · EngineScript routine (pack 4 +$02CE): sets up C2Scene_HdmaTable[1] (two runs of 112 lines) as HDMA channel 2 to COLDATA (indirect, one register), turns it on, points C2Scene_HdmaValues words 2-3 at... - verified
C6Scene_Grad2Ramp$C6:E1FF · 56 B · EngineScript routine (pack 4 +$039A): writes C6Scene_Grad2Init's 48-line ramp (16 down to 9, two lines each; 8 down to 1, four each) into C6Scene_Grad2 at the byte offset .Var22 (through WMDATA, bank $7E). - verified
C6Scene_GetFlagF2Bits$C6:E237 · 10 B · EngineScript routine (pack 1 +$0184): C2Tmp_00 = bits 2-5 of the copy of $7F:01F2 (C2Scene_FlagTailCopy+2) as a number 0-15, probably for the script's next test of $0000. - verified
C6Scene_WipeWinInit$C6:E241 · 61 B · EngineScript routine (pack 0 +$0FB0, pack 2 +$0442, pack 5 +$0162, pack 7 +$094E, each followed by C6Scene_WipeWinStep): sets up C2Scene_HdmaTable[1] (two runs of 112 lines) as HDMA channel 2 to WH1... - verified
C6Scene_WipeWinStep$C6:E27E · 49 B · Engine - verified
C6Scene_ClearUnk7F0062$C6:E2AF · 6 B · EngineScript routine (pack 0 +$0FE3, pack 2 +$0475, pack 3 +$0670, pack 5 +$01B2, pack 7 +$0981, each soon after a C6Scene_WipeWinStep): zeroes C6Scene_Unk7F0062 (what reads it is not traced). - verified
C6Scene_Bg3Accel$C6:E2B5 · 99 B · EngineScript routine (pack 4 +$0947 and +$0953): moves BG3 by the task's velocity, the fractions kept in .XFrac/.YFrac and the whole pixels added to C2Scene_Bg3HScroll/VScroll (as C2Scene_TaskMove does... - verified
C6Scene_Win1HdmaOnB$C6:E318 · 40 B · EngineScript routine (pack 6 +$08A1 and +$0937, each followed by C6Scene_Win1EllipseStep): a byte-identical copy of C6Scene_Win1HdmaOn (HDMA channel 1 to WH0/WH1 from C2Scene_HdmaTable[0], turned on). - verified
C6Scene_Win2HdmaOn$C6:E340 · 40 B · EngineScript routine (pack 6 +$071A and +$08DF, each followed by C6Scene_Win2EllipseStep): sets up C2Scene_HdmaTable[1] (two runs of 112 lines) as HDMA channel 2 to WH2/WH3 (indirect, two registers) and... - verified
C6Scene_Win1EllipseStep$C6:E368 · 41 B · EngineScript routine (pack 6 +$08A5, +$08B0, +$08C7, +$093B, +$0944): adds one to .Var24 (a word) and takes C2Scene_HandBufB (now odd) or C2Scene_HandBufA (even) as the table: C2Scene_HdmaValues words... - verified
C6Scene_Win2EllipseStep$C6:E391 · 39 B · Engine - verified
C6Scene_EllipseBuild$C6:E3B8 · 144 B · Engine - verified
C6Scene_Win1HdmaOnC$C6:E448 · 40 B · EngineScript routine (pack 4 +$02A3, +$1570 and +$1769, pack 5 +$0494 and +$04DE, pack 6 +$06CE, each followed by C6Scene_Win1CapsuleStep): a byte-identical copy of C6Scene_Win1HdmaOn (HDMA channel 1 to... - verified
C6Scene_Win2HdmaOnB$C6:E470 · 40 B · EngineScript routine (pack 1 +$06FA, pack 4 +$1574 and +$176D, pack 5 +$0528, each followed by C6Scene_Win2CapsuleStep): a byte-identical copy of C6Scene_Win2HdmaOn (HDMA channel 2 to WH2/WH3 from... - verified
C6Scene_Win1CapsuleStep$C6:E498 · 38 B · EngineScript routine (pack 4 +$02C2 and 14 more sites to +$17FD, pack 5 +$0498 to +$04FC (6 sites), pack 6 +$06D5 to +$06FE (4 sites)): takes C2Scene_HandBufB (.Var26 odd) or C2Scene_HandBufA (even) as... - verified
C6Scene_Win2CapsuleStep$C6:E4BE · 36 B · Engine - verified
C6Scene_CapsuleBuild$C6:E4E2 · 134 B · Engine - verified
C6Scene_FadeGradStep$C6:E568 · 27 B · EngineScript routine (pack 3 +$0339, in a loop the script runs 58 times, op $1B, with an op $32 in each pass): moves C2Scene_HdmaValues words 0 and 1 on by C6Scene_GradStepBytes (8 lines of... - verified
C6Scene_Bg2VNudge$C6:E583 · 18 B · EngineScript routine (no op $4E site found in the unpacked scripts): moves BG2 two pixels down (.Var22 bit 0 clear) or up (set): two INC or DEC of C2Scene_Bg2VScroll, 8-bit with M=1, so only its low... - verified
C6Scene_Bg1WaveInit$C6:E595 · 48 B · EngineScript routine (pack 5 +$03A1, followed by C6Scene_Bg1WaveStep): sets up C2Scene_HdmaTable[2] (two runs of 112 lines) as HDMA channel 3 to BG1VOFS (indirect, one register written twice), turns it... - verified
C6Scene_Bg1WaveStep$C6:E5C5 · 120 B · EngineScript routine (pack 5 +$03A5 and +$03AB): writes one frame of a vertical wave on BG1: picks C2Scene_SwirlSinA (.Var24 odd) or C2Scene_SwirlSinB (even), points C2Scene_HdmaValues words 4-5... - verified
C6Scene_SetUnk7F01ED$C6:E63D · 7 B · EngineScript routine (pack 4 +$115D): C2Scene_Unk7F01ED = 1 (script op $3D then skips its sound command). - verified
C6Scene_ClearUnk7F01ED$C6:E644 · 6 B · EngineScript routine (pack 4 +$06E9 and +$083A): C2Scene_Unk7F01ED = 0. - verified
C6Scene_UnpackObjPackB$C6:E64A · 37 B · EngineScript routine (pack 4 +$0D2D, between C6Scene_UnpackObjPackA and C6Scene_UnpackPalPackA): as C6Scene_UnpackObjPackA with entry C6Scene_ObjPackB of C2SceneRom_ObjPacks. - verified
C6Scene_UnpackPalPackB$C6:E66F · 37 B · EngineScript routine (pack 4 +$0D55, after C6Scene_UnpackPalPackA): as C6Scene_UnpackPalPackA with entry C6Scene_PalPackB of C2SceneRom_PalettePacks (into C2Scene_PaletteStage). - verified
C6Scene_PlaceInViewRandom$C6:E694 · 60 B · EngineScript routine (pack 4 +$0FD3 to +$1015, 7 sites): puts the task at a random point: .SprX = BG2's tile X x 8 (C2Scene_BgTileX+2) + a random 0-127 + 64, as C2Scene_PlaceBelowView; .SprY = $60 + a... - verified
C6Scene_NudgeRandomDir$C6:E6D0 · 126 B · EngineScript routine (pack 4 +$0FAA): moves the task by a random distance d (0-63) in a random direction a (0-255, C2Scene_Unk2273/Unk2277's units): .SprX + cos(a) x d / 256 and .SprY + sin(a) x d /... - verified
BankC6_UnkE74E$C6:E74E · 49 B · EngineTests the 8x8 tile (C2Tmp_00, C2Tmp_01) against a rectangle of columns C2Tmp_04 to C2Tmp_05 - 1 and rows C2Tmp_02 to C2Tmp_03 - 1 (unsigned bytes): C2Tmp_06 = 0 when the tile is inside, else bit 0... - verified
C6Scene_AddYAccel$C6:E77F · 24 B · EngineScript routine (pack 4 +$0ED9 and 10 more sites to +$10DF): adds the 16.16 value .Var22 (fraction) / .Var24 (whole) to the task's Y velocity (.YVelFrac, carrying into .YVel): C2Scene_AddGravity... - verified
BankC6_UnkE797$C6:E797 · 99 B · EngineObject A's landing check (the name is the stub's: verified C2Scene_ObjAFly calls it so; better: C6Scene_ObjANoLandHere). - verified
C6Scene_MapPicture$C6:E7FA · 205 B · EngineScript routine (pack 0 +$11F0): draws the Mode 7 picture of the two maps as C2Scene_MapDrawPixels does, but whole: zeroes C2Scene_DecompBuf ($7F:9000-$BFFF, C6Scene_PicBytes), then for each of the... - verified
C6Scene_MapCellPixels$C6:E8C7 · 72 B · EngineDraws one metatile cell as two pixels, at [C6Scene_PicOut] and 8 bytes (one pixel row) below: the colours (C2Scene_TileColors) of the metatile's top-right and bottom-right tiles, each ORed with... - verified
C6Scene_PerspInit$C6:E90F · 230 B · EngineScript routine (pack 0 +$11F7): sets up HDMA channels 2-5 to M7A, M7B, M7C and M7D (indirect, one register written twice: a word a line) from C2Scene_HdmaTable[1]-[4] (two runs of 112 lines each... - verified
C6Scene_PerspStep$C6:E9F5 · 294 B · Engine - verified
C6Scene_PerspQuadrants$C6:EB1B · 8 B · EngineC6Scene_PerspStep's fill for each sign pair (index = C2Tmp_10 bits 0-1: cos < 0, sin < 0). - verified
C6Scene_PerspTiltSteps$C6:EB23 · 24 B · EngineThe depth step t per line pair (8.8, so 0 to just under 1), read by C6Scene_PerspStep at .Tilt (a byte offset; pack 0 steps it up with op $0B and down with op $0C, e.g. +$1369, +$139B, +$1481... - verified
C6Scene_PerspQuad0$C6:EB3B · 91 B · EngineThe fills of C6Scene_PerspStep, one per quadrant (C6Scene_PerspQuad0 and the sub-entries C6Scene_PerspQuad1 ($C6:EB96), C6Scene_PerspQuad2 ($C6:EC09) and C6Scene_PerspQuad3 ($C6:EC7C), reached... - verified
C6Scene_PerspQuad1$C6:EB96 · 115 B · Engine - verified
C6Scene_PerspQuad2$C6:EC09 · 115 B · Engine - verified
C6Scene_PerspQuad3$C6:EC7C · 136 B · Engine - verified
C6Scene_PerspTail$C6:ED04 · 221 B · Engine - verified
C6Scene_PerspDivide$C6:EDE1 · 66 B · EngineThe four quotients of a line pair (WRDIV/RDDIV): C2Tmp_00 = |c| / dA, C2Tmp_02 = |s| / dA, C2Tmp_04 = -(|s| / dB), C2Tmp_06 = |c| / dB, with |c|, |s| = C2Tmp_08, C2Tmp_0A and the 8-bit divisors dA... - verified
C6Scene_AddAngle$C6:EE23 · 14 B · EngineScript routine (pack 0 +$1248 and 14 more sites to +$146F, each before C6Scene_PerspStep): .Angle (+$22) + C2Tmp_08. - verified
C6Scene_SetUnk7F00CD$C6:EE31 · 7 B · EngineScript routine (pack 2 +$09A3 and +$09AE, pack 7 +$0779, +$0A27, +$0A32, +$0A5F, +$0A6A): C2Scene_Unk7F00CD = C2Tmp_00 (8-bit; set by the script before). - verified
C6Scene_ClearUnk7F01F5Bit0$C6:EE38 · 11 B · EngineScript routine (pack 2 +$08CF): clears bit 0 of C2Scene_Unk7F01F5. - verified
BankC6_CodeEndFill$C6:EE43 · 445 B · Engine$00 fill after the last routine, up to the data from $C6:F000 on.
Bank $C6 · $C6:F000–$FFFF
$C6:F000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:0000–$0FFF
$C7:0000
Verified · 36
- verified
Audio_DriverInit$C7:0000 · 4 B · EngineThe bank's entry block: four 3-byte JMPs, each followed by a NOP. - verified
Audio_DriverCommand$C7:0004 · 4 B · Engine - verified
Audio_VecLoadNewSamples$C7:0008 · 4 B · Engine - verified
Audio_VecSendSampleDir$C7:000C · 4 B · Engine - verified
Audio_BootBlockPtrs$C7:0010 · 12 B · EngineThe six blocks Audio_Boot sends through the IPL ROM, in this order, as bank $C7 addresses. - verified
Audio_BootBlockAram$C7:001C · 12 B · EngineThe ARAM destination of each Audio_BootBlockPtrs block (sent in APUIO2/3 with the IPL ROM's transfer command). - verified
Audio_TableDirectory$C7:0028 · 16 B · EngineEight bank $C7 addresses: the tables the code below reads. - verified
Audio_Boot$C7:0038 · 264 B · EngineStarts the sound driver from nothing, through the APU's IPL ROM: 1. - verified
Audio_RunCommand$C7:0140 · 21 B · EngineRuns the command in Audio_CmdId (arguments Audio_CmdArg0-2), then clears Audio_CmdId. - verified
Audio_RunCommand_Dispatch$C7:0155 · 61 B · Engine - verified
Audio_CommandDone$C7:0192 · 15 B · Engine - verified
Audio_CmdLoadSong$C7:01A1 · 389 B · EngineCommands $10, $11, $14 and $15 (Audio_SongCmdTable): load song Audio_CmdArg0. - verified
Audio_LoadNewSamples$C7:0326 · 85 B · EngineSong load, part 2: puts each sample of Audio_NewSamples in the next free slot with Audio_UploadSample, in list order. - verified
Audio_SendSampleDir$C7:037B · 325 B · EngineSong load, part 3: sends the song's samples' directory entries and parameter words. - verified
Audio_SendSongData$C7:04C0 · 348 B · EngineSong load, part 4, and its end: 1. - verified
Audio_CmdSend$C7:061C · 57 B · EngineCommands $18-$2F and $80-$FF: sends the block to the APU as it is: APUIO3 = Audio_CmdArg2, APUIO2 = Arg1, APUIO1 = Arg0, then APUIO0 = Audio_CmdId, and reads APUIO0 up to !Audio_Timeout times for... - verified
Audio_UploadSample$C7:0655 · 200 B · EngineSends the sample in slot Audio_SaveX (Audio_SlotSample entry, 1-62) to ARAM at the slot's Audio_SlotAram address: a triples transfer (!Audio_XferTriples), retried after Audio_AbortXfer until... - verified
Audio_CmdSongAlias$C7:071D · 23 B · EngineCommands $30-$3F: replaces the whole command block with entry (command & $0F) of Audio_SongAliasTable (command $10, song = the low nibble, Arg1 = Arg2 = $FF) and sorts it again from... - verified
Audio_AdjustSongCmd$C7:0734 · 33 B · EngineSets bit 2 (!Audio_CmdListedBit) of Audio_CmdId when the command is $14 or above, or when Audio_CmdArg0 is on Audio_SongBit2List (bytes up to the first one with bit 7 set). - verified
Audio_CmdSwapSample$C7:0755 · 398 B · EngineCommand $71: puts sample Audio_CmdArg0 (1-62; not range-checked) in the slot of the current song's first sample (Audio_FirstSlot), so directory entry $20 plays it. - verified
Audio_CmdBlockVariant$C7:08E3 · 63 B · EngineCommand $70: picks the $2F00 block by Audio_CmdArg0 (0 = AudioRom_Block2F00, nonzero = AudioRom_Block2F00Alt; the battle music cues send 1 before a battle and 0 after it). - verified
Audio_UploadBlock2F00$C7:0922 · 184 B · EngineSends the $1800-byte block for ARAM !AudioAram_Block2F00: AudioRom_Block2F00 while Audio_Unk1E10 is 0, AudioRom_Block2F00Alt otherwise. - verified
Audio_SendSeq$C7:09DA · 16 B · EngineOne step of a transfer: writes A to APUIO0 and waits (no limit) until APUIO0 reads back the same value, then returns the next sequence value, (A + 1) & !Audio_SeqMask. - verified
Audio_AbortXfer$C7:09EA · 19 B · EngineCalled when the APU did not echo a header's mode in APUIO1: sends one more step with APUIO0 = Audio_Seq (waits for the echo, no limit; APUIO1-3 as the header left them) and resets Audio_Seq to... - verified
Audio_SetEchoDelay$C7:09FD · 21 B · EngineAudio_EchoDelay = A, Audio_EchoPage = !Audio_EchoTopPage - 8 x A, then Audio_DropEchoSlots. - verified
Audio_DropEchoSlots$C7:0A12 · 39 B · EngineFinds the first slot whose end (the next Audio_SlotAram entry; its high byte, the page) is on or above Audio_EchoPage and empties it and every slot after it: from there, byte by byte up to slot... - verified
Audio_StartSong$C7:0A39 · 95 B · EngineThe first part of a song load: sends the song command to the APU. - verified
Audio_SongAliasTable$C7:0A98 · 64 B · EngineAudio_CmdSongAlias: for command $30 + n, the command block it becomes (command, Arg0, Arg1, Arg2): $10, n, $FF, $FF. - verified
Audio_SongBit2List$C7:0AD8 · 1 B · EngineAudio_AdjustSongCmd's song list, ended by a byte with bit 7 set. - verified
Audio_SongCmdTable$C7:0AD9 · 16 B · EngineAudio_RunCommand_Dispatch's jump table for commands $10-$17 (JMP (T,X) with X = (command & $0F) x 2). - verified
Audio_SongCount$C7:0AE9 · 1 B · EngineThe number of songs (Audio_SongTable entries); Audio_CmdLoadSong ignores a song number not below it. - verified
Audio_SampleTable$C7:0AEA · 186 B · Engine62 long pointers, one per sample (sample n at entry n - 1; 62 is the largest number in AudioRom_SongSamples): BRR data, probably (every length is a multiple of 9, the BRR block size), a 16-bit... - verified
Audio_SampleLoop$C7:0BA4 · 124 B · EngineOne word per sample: the loop start as an offset from the sample's ARAM start (Audio_SendSampleDir and Audio_CmdSwapSample add it to get the directory entry's second word). - verified
Audio_SampleParamA$C7:0C20 · 124 B · EngineOne word per sample, sent to !AudioAram_SongParamA for the song's samples (meaning not traced on the SPC700 side). - verified
Audio_SampleParamB$C7:0C9C · 124 B · EngineOne word per sample, sent to !AudioAram_SongParamB: first byte $FF or $FE; second byte $E0 for most, otherwise $EA-$F4; the ADSR pair, probably (from the values only). - verified
Audio_SongTable$C7:0D18 · 249 B · EngineAudio_SongCount ($53) long pointers, one per song: its data, a 16-bit length first (Audio_SendSongData sends it to !AudioAram_Song).
Bank $C7 · $C7:1000–$1FFF
$C7:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:2000–$2FFF
$C7:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:3000–$3FFF
$C7:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:4000–$4FFF
$C7:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:5000–$5FFF
$C7:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:6000–$6FFF
$C7:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:7000–$7FFF
$C7:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:8000–$8FFF
$C7:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:9000–$9FFF
$C7:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:A000–$AFFF
$C7:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:B000–$BFFF
$C7:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:C000–$CFFF
$C7:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:D000–$DFFF
$C7:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:E000–$EFFF
$C7:E000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:F000–$FFFF
$C7:F000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:0000–$0FFF
$CC:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:1000–$1FFF
$CC:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:2000–$2FFF
$CC:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:3000–$3FFF
$CC:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:4000–$4FFF
$CC:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:5000–$5FFF
$CC:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:6000–$6FFF
$CC:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:7000–$7FFF
$CC:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:8000–$8FFF
$CC:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:9000–$9FFF
$CC:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:A000–$AFFF
$CC:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:B000–$BFFF
$CC:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:C000–$CFFF
$CC:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:D000–$DFFF
$CC:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:E000–$EFFF
$CC:E000
Verified · 5
- verified
Battle_InitUploadStep$CC:E000 · 558 B · Battle engineOne stage of the battle's opening VRAM uploads, run once per call while !Battle_InitUploadStage is 1-3 (each stage counts it up; 0 and 4 on do nothing). - verified
Battle_InitUploadObjTiles$CC:E22E · 98 B · Battle engineSends the first two 64-byte pieces of !BattleRom_ObjTilePieces (the four pieces bank $C0's Field_UploadUnk0000 sends) to VRAM $0000 and $0100 over DMA channel 7, which it first sets itself to mode... - verified
Battle_InitUploadObjTilesDead$CC:E290 · 84 B · Battle engineNever reached (no call or jump to it was found; Battle_InitUploadObjTiles returns just before it): the uploads of pieces 3 and 4 of !BattleRom_ObjTilePieces to VRAM $0060 and $0160 (bank $C0 sends... - verified
Battle_InitScene$CC:E2E4 · 2,723 B · Battle engineBattle set-up: the scene ($CC:E2E4–$CC:F06A) - verified
Battle_InitSceneGfx$CC:ED87 · 732 B · Battle engineThe fourth step of BattleSys_SceneSetup: sprite and tile set-up, then the VRAM uploads.
Bank $CC · $CC:F000–$FFFF
$CC:F000
Verified · 9
- verified
Battle_ReencodeText$CC:F063 · 8 B · Battle engineRe-encodes the text in !BattleMsg_TextTiles into its two tile rows: BankC1_LongDispatch entry 0 (BattleMsg_ReencodeTextBuffer) through the bank-$C1 vector, with A = 0. - verified
BattleAct_ResetState$CC:F06B · 151 B · Battle engineAction helpers ($CC:F06B–$CC:F364) - verified
BattleAct_ResetFxApplied$CC:F102 · 14 B · Battle engineSets !Battler_FxApplied of all 11 battler slots to !Battle_FxAppliedStale ($55, a value no effect has), so the next effect picked is applied again. - verified
Battle_BuildOccupiedCellMap$CC:F110 · 70 B · Battle engineCopies !Battle_CellMap to !Battle_PathMap (MVN, 256 B) and marks with !Battle_CellBlocked ($40) the cell under each present battler ((y & $F0) | x / 16). - verified
BattleAct_BuildBattlerList$CC:F156 · 145 B · Battle engineBuilds the action's battler lists from the action block: !Battle_ActBattlers = caster, !Battle_ActUnkAE97, !Battle_ActUnkAE98 (for a PC caster a negative one becomes one of the other two PCs... - verified
BattleAct_StepPalettes$CC:F1E7 · 145 B · Battle engineSteps the four palette sequences: for each one on, counts its timer down; at 0 reloads it from the delay, moves the step on (back to the first entry past the last) and copies the entry's colour... - verified
BattleAct_TickUnkA1A8$CC:F278 · 49 B · Battle engineFor the 8 object threads: counts down !Battle_ActObjAnimTimer of each whose !Battle_ActUnkA1A8 is set; then runs BattleAct_StepObjAnim for each set one whose timer is 0. - verified
BattleAct_StepObjAnim$CC:F2A9 · 188 B · Battle engineMoves object thread DP $80 to the next record of its object list: the record (4 B in bank $CE, BattleRom_ActObjRec) is entry !Battle_ActObjAnimEntry + 1 of the facing's block (facing *... - verified
Battle_Mul8CC$CC:F365 · 30 B · Battle engineA byte-identical copy of Battle_Mul8 ($C1:0089): 8×8→16 hardware multiply through WRMPYA/WRMPYB/RDMPYL.
Bank $CD · $CD:0000–$0FFF
$CD:0000
Verified · 89
- verified
BattleSys_VecCD0000$CD:0000 · 3 B · Battle systemThe bank's entry block: 19 three-byte JMPs, all but two ($000F and $001E, see the Callers note) reached by JSL from other banks (their targets end in RTL). - verified
BattleSys_VecCD0003$CD:0003 · 3 B · Battle system - verified
BattleSys_VecCD0006$CD:0006 · 3 B · Battle system - verified
BattleSys_FrameTickVec$CD:0009 · 3 B · Battle system - verified
BattleSys_VecCD000C$CD:000C · 3 B · Battle system - verified
BattleSys_VecCD000F$CD:000F · 3 B · Battle system - verified
BattleSys_VecCD0012$CD:0012 · 3 B · Battle system - verified
BattleAnim_LoadGfx4Vec$CD:0015 · 3 B · Battle engine - verified
BattleAnim_UnkVecCD0018$CD:0018 · 3 B · Battle engine - verified
BattleAct_UnkVecCD001B$CD:001B · 3 B · Battle engine - verified
BattleSys_VecCD001E$CD:001E · 3 B · Battle system - verified
BattleSys_UnkVecCD0021$CD:0021 · 3 B · Battle system - verified
BattleSys_VecCD0024$CD:0024 · 3 B · Battle system - verified
BattleMsg_ShowFromTableCC3A09Vec$CD:0027 · 3 B · Battle text & numbers - verified
BattleAnim_LoadGfx2Vec$CD:002A · 3 B · Battle engine - verified
BattleMsg_ShowMsg0BIfKeyChangedVec$CD:002D · 3 B · Battle text & numbers - verified
BattleMsg_UnkVecCD0030$CD:0030 · 3 B · Battle text & numbers - verified
BattleMsg_UnkVecCD0033$CD:0033 · 3 B · Battle text & numbers - verified
BattleSys_IdleVecCD0036$CD:0036 · 3 B · Battle system - verified
BattleCD_EnterBattle$CD:0039 · 5 B · Battle engineThe bank-$CD step of the battle's start: JSL BattleFx_Init ($D1:F1B0: it sets DB=$7E and DP=0, installs JML $D1:E77C / JML $D1:FE97 (BattleFx_Nmi / BattleFx_Irq) as the NMI and IRQ trampolines at... - verified
BattleCD_ActOp80$CD:003E · 5 B · Battle engineAction opcode $80's long call (BattleAct_OpRunVecCD001B, after it copied its operand bytes to !Battle_ActOp80Args): JSL BattleFx_Op80Dispatch ($D1:F67A), then RTL. - verified
BattleCD_EnemyDissolve$CD:0043 · 93 B · Battle engineTakes an enemy off the screen, for BattleCF_RemoveMarkedEnemies (A = its battler slot, after that moved it to the special palette). - verified
BattleCD_EnemyDissolveFx$CD:00A0 · 106 B · Battle engine - verified
BattleCD_DissolveStep$CD:010A · 147 B · Battle engineOne step of BattleCD_EnemyDissolve: advances !Battle_DissolvePhase by the !BattleRom_DissolvePhaseStep entry !Battle_DissolvePattern & 7 ($17 for the pattern 7 the dissolve uses: odd, so 64 steps... - verified
BattleCD_MsgTimeTable$CD:019D · 8 B · Battle engineFrames a battle message stays up, by the message-speed setting (BattleCD_GetMsgTime: bits 3-5 of config byte $2991): $20, $40, ..., $E0, then $FF. - verified
BattleCD_GetMsgTime$CD:01A5 · 14 B · Battle engineA = BattleCD_MsgTimeTable entry by bits 3-5 of !Menu_Config+1: the frames a message stays up at the configured speed (inferred from the uses: BattleCD_ShowMessage waits that long, the others load... - verified
BattleCD_ShowMessage$CD:01B3 · 87 B · Battle engineShows battle message A (string A of !BattleRom_MsgStrings, its arguments at $0200, BattleMsg_InfoArgs / !Battle_MsgArg0) and waits for it: plays the message's sound (BattleFx_MsgSfx entry A... - verified
BattleCD_Wait16Frames$CD:020A · 11 B · Battle engineWaits 16 frames (BattleCD_WaitFrameRefresh 16 times). - verified
BattleCD_ShowMessageTimed$CD:0215 · 32 B · Battle engineAs BattleCD_ShowMessage without the sound and without waiting: starts message A of !BattleRom_MsgStrings (BattleCD_StartText, BattleCD_ShowText), loads !Battle_MsgTimer with BattleCD_GetMsgTime... - verified
BattleCD_ClearTextGfxL$CD:0235 · 4 B · Battle engineBattleCD_ClearTextGfx as a long call (JSL from BattleFx_Init at $D1:F3FE). - verified
BattleCD_ClearTextGfx$CD:0239 · 37 B · Battle engineZeroes the message graphics buffer !Battle_TextGfxBuf ($7E:B400-$B7FF, $400 bytes) by words: eight stores per pass, each covering one $80-byte eighth of it, for X = $80 down to 2. - verified
BattleCD_StartText$CD:025E · 33 B · Battle engineStarts string A of the table the caller put in TextWin_StrTable: TextWin_StrIndex = A, !Battle_MsgTiming = 0, !Battle_TextUnkA1 = 0, TextWin_GfxBuf = !Battle_TextGfxBuf (bank $7E), TextWin_Mode =... - verified
BattleCD_ShowText$CD:027F · 22 B · Battle engineDraws the started string: TextWin_StepCount = A (the callers pass !BattleCD_TextStepCount from BattleCD_StartText), one TextWin_Step (through BankC2_Entry0009), two BattleCD_WaitFrame, then... - verified
BattleCD_ShowScriptMessage$CD:0295 · 54 B · Battle engineAn enemy script's message (the run handlers pass a script byte in A: most pass !Battle_UnkB3C7; BattleAi_RunTech, BattleAi_RunSetFlags and BattleAi_RunMessage pass one read straight from the... - verified
BattleCD_ShowEnemyInfo$CD:02CB · 13 B · Battle engineThe battle menu's info panel for the highlighted enemy target (BattleMenu_UpdateCursorOverlay; BattleMenu_ChooseAttack also calls BattleCD_ShowTargetInfo): A = a key, the target slot... - verified
BattleCD_ShowTargetInfo$CD:02D8 · 56 B · Battle engine - verified
BattleCD_ShowTechInfo$CD:0310 · 48 B · Battle engineThe info panel for the tech (or item) under the menu cursor: A = the key, string A of !BattleRom_TechInfoStrings. - verified
BattleCD_PadRepeat$CD:0340 · 89 B · Battle engineTurns the held buttons into presses with auto-repeat, once a frame (BattleCD_NmiMain runs it on both its paths, after BankC2_Entry8002 read the pad), all 16-bit: !Battle_PadPrev = the last frame's... - verified
BattleCD_SetNmiMode1$CD:0399 · 5 B · Battle engine!Battle_NmiMode = 1: from the next NMI, BattleCD_NmiDispatch runs BattleCD_NmiMain instead of BattleCD_NmiSetup (service 0's first bank-$CD step). - verified
BattleCD_ApuCmd81$CD:039E · 22 B · Battle engineSends APU command !Audio_CmdUnk81 with arguments !BattleCD_Cmd81Arg1 and 0 (Audio_ProcessEntry; the field's AudioFadeDispatch sends the same command with other arguments around its music changes... - verified
BattleCD_ExitBattle$CD:03B4 · 150 B · Battle engineThe bank-$CD part of the battle's end (BattleCF_ExitBattle runs it just before it returns to the field). - verified
BattleCD_WaitNmiAck$CD:044A · 9 B · Battle engineDP $47 = 1, then waits until something else sets it back to 0 (at both call sites the NMI handler is BattleFx_NmiAlt, which BattleCD_ExitBattle installs just before and which zeroes DP $47). - verified
BattleCD_EndLayerFx$CD:0453 · 83 B · Battle engineEnds a layer effect (BattleCD_FrameTick runs it when the effect is done, !Battle_BgFxEnded set, and no action runs; BattleCD_ExitBattle when one is still loaded): puts layer 3's tiles back (the... - verified
BattleCD_IdleTick$CD:04A6 · 4 B · Battle engineBattleSys_PumpFrames' long call while it waits for the frame: BattleCD_PauseWait, RTL. - verified
BattleCD_FrameTick$CD:04AA · 53 B · Battle engineThe bank's per-frame work outside the NMI (BattleSys_FrameTickVec, and JSL from this bank's own waits): unless !Battle_Paused, the pending sound (BattleCD_PlayPendingSfx); BattleCD_PauseWait... - verified
BattleCD_StepText$CD:04DF · 30 B · Battle engineWhen !Battle_TextStepping is set: one TextWin_Step (through BankC2_Entry0009) with TextWin_StepCount = 1; !Battle_TextStepping = TextWin_Status after it (0 once the string is done, so the stepping... - verified
BattleCD_StartOpenWipe$CD:04FD · 25 B · Battle engineService 0's start of the opening wipe: sound !BattleCD_SfxWipe (BattleCD_ApuCmd18, X = !BattleCD_SfxArgCentre), a frame, !Battle_WipeSteps = !BattleCD_WipeSteps and !Battle_WipeMode =... - verified
BattleCD_StartCloseWipe$CD:0516 · 30 B · Battle engineThe battle end's closing wipe: !Battle_UnkCE16 = 1, a frame, !BattleFx_CeSetBase = !BattleCD_CA25Unk0C and !BattleFx_CeSetReload + 1, a frame, !Battle_WipeSteps = !BattleCD_WipeSteps... - verified
BattleCD_WipeRunning$CD:0534 · 8 B · Battle engineA = 1 while a wipe has steps left (!Battle_WipeSteps non-zero), else 0; Z set iff 0 (BattleSys_SceneSetup and BattleCD_ExitBattle loop on it). - verified
BattleCD_WipeStepOpen$CD:053C · 59 B · Battle engineOne step of the opening wipe in all nine tables: entry 1's line count - 1, entry 2's + 2, entry 3's - 1; then the entry-2 data addresses of tables 5 and 3 (!Battle_HdmaTables+$E8 and +$8E) - 4. - verified
BattleCD_WipeStepClose$CD:0577 · 59 B · Battle engineThe opposite step: entry 1's line count + 1, entry 2's - 2, entry 3's + 1 in all nine tables; tables 3 and 5's entry-2 data addresses + 4. - verified
BattleCD_StepWipe$CD:05B2 · 77 B · Battle engineOne step of the wipe in progress (BattleCD_NmiMain runs it twice a frame), by !Battle_WipeMode: - 0: nothing; - !BattleCD_WipeOpen ($FF, set by BattleCD_StartOpenWipe): first !BattleFx_CeSetBase =... - verified
BattleCD_TileUploadVram$CD:05FF · 8 B · Battle engineVRAM word addresses for BattleCD_NmiUploadText's tilemap-page upload, by !Battle_TilePageSlot * 2: $7C00, $7C10, $7E00, $7E10. - verified
BattleCD_NmiUploadText$CD:0607 · 171 B · Battle engineBattleCD_NmiMain's uploads while no wipe runs: - a tilemap page requested by the layer-effect script (!Battle_TilePageReq, set by BattleCD_RunFxScript): unless it is the same slot... - verified
BattleCD_ZeroWord$CD:06B2 · 2 B · Battle engineThe fixed DMA source BattleCD_NmiUploadText clears VRAM from. - verified
BattleCD_NmiLayerScroll$CD:06B4 · 8 B · Battle engineRuns the BattleCD_ScrollModeTable entry !Battle_LayerFxMode (0-3; set to 0 or 1 by BattleCD_StepFxChannels and 0 by BattleCD_EndLayerFx; who sets 2 and 3 is not traced): the HDMA scroll data for... - verified
BattleCD_ScrollModeTable$CD:06BC · 8 B · Battle engineBattleCD_NmiLayerScroll's handlers by !Battle_LayerFxMode. - verified
BattleCD_ScrollPlain$CD:06C4 · 66 B · Battle engineFills the HDMA scroll data of layers 1-3 (!Battle_HdmaScroll1-3, 32 entries of 4 bytes, an x and a y word, each) with one x/y pair per layer: FieldBtlPpu.Scroll2's words (the battle's layer... - verified
BattleCD_ScrollFill$CD:0706 · 102 B · Battle engine - verified
BattleCD_ScrollFxBg3$CD:076C · 77 B · Battle engineAs BattleCD_ScrollPlain, but layer 3's pair is the effect's scroll: !BattleFx_ShakeX + !Battle_FxScrollAddX + !Battle_ShakeOfs3X and !BattleFx_ShakeY + !BattleFx_BounceOut + !Battle_ShakeOfs3Y... - verified
BattleCD_ScrollWavesBg3$CD:07B9 · 41 B · Battle engineBattleCD_ScrollWaves, then a second run of 32 entries for layer 3 only (X from $80 up to the 8-bit wrap): x = layer 3's x pair, plus the per-line offset in !Battle_WaveOffsets (the same X) when... - verified
BattleCD_ScrollWaves$CD:07E2 · 171 B · Battle engineThe pairs as BattleCD_ScrollFxBg3 computes them (in DP $45-$4F); then for each of the 32 entries the x of a layer gets the entry's per-line offset from !Battle_WaveOffsets (bank $7E, by the... - verified
BattleCD_NmiMain$CD:088D · 321 B · Battle engineThe NMI's work in modes 1 and 2 (BattleCD_NmiDispatch), entered with DB=$00: - with !Battle_CgramPending ($7E:CE0F) set: the palette (BattleCD_UploadCgram), DB=$7E, the queued VRAM upload... - verified
BattleCD_UploadCgram$CD:09CE · 35 B · Battle engineCopies the whole palette, !Battle_CgramBytes bytes of !Battle_PaletteLiveLo (bank $7E), to CGRAM from colour 0 by DMA on channel 7 (one register written twice: CGDATA). - verified
BattleCD_NmiSetup$CD:09F1 · 237 B · Battle engineThe NMI's work in mode 0 (the first frames, until BattleCD_SetNmiMode1): the palette (BattleCD_UploadCgram); HDMA channels 0-6 set up as indirect channels on the first seven tables of... - verified
BattleCD_TickCDC9$CD:0ADE · 16 B · Battle engineWhile FieldAnimB[0].Unk4 (palette animation record 0's frame counter) is 0: !BattleFx_GradStart counts down and wraps from below 0 to !BattleCD_CDC9Period (a 14-frame cycle, 13 down to 0... - verified
BattleCD_SetWh0Table$CD:0AEE · 40 B · Battle enginePoints HDMA channel 7 at one of the last two tables of !Battle_HdmaTables (indirect, 4 registers from WH0, line data in bank $7E): table 8 on odd frames of !Battle_FrameCount, table 7 on even ones... - verified
BattleCD_RandByte$CD:0B16 · 8 B · Battle engineA = RandomTable entry (A + !Battle_FrameCount + C) & $FF: a byte of the field's random table picked by the frame count. - verified
BattleCD_ClampPalAnims$CD:0B1E · 51 B · Battle engineWith !Battle_Unk99D2 positive and non-zero: for each of the palette animation records 8-11 (FieldAnimB, 12 bytes each, the ones the battle fills) with a kind (.Unk0 non-zero) and a first colour... - verified
BattleCD_StepShake$CD:0B51 · 306 B · Battle engineThe screen shake, once a frame, for two axes: - x (!Battle_ShakeXOn): every !Battle_ShakeXRandPeriod frames a new random byte (BattleCD_RandByte) in !Battle_ShakeXRand; every... - verified
BattleCD_NmiTable$CD:0C83 · 6 B · Battle engineBattleCD_NmiDispatch's handler by !Battle_NmiMode. - verified
BattleCD_ScrollStepL$CD:0C89 · 12 B · Battle engineThe field's ScrollStepAccum (through ReentryVectors vector [1]: the drift of layers 2 and 3 in FieldBtlPpu.Scroll2) between PHB/PHD/PHP and PLP/PLD/PLB, then A = D (TDC) and RTL. - verified
BattleCD_NmiDispatch$CD:0C95 · 8 B · Battle engineThe NMI's bank-$CD work: runs BattleCD_NmiTable entry !Battle_NmiMode (0 BattleCD_NmiSetup, 1 and 2 BattleCD_NmiMain), then RTL. - verified
BattleCD_InitHdmaDataL$CD:0C9D · 4 B · Battle engineBattleCD_InitHdmaData as a long call (JSL from BattleFx_Init at $D1:F1DB). - verified
BattleCD_InitHdmaData$CD:0CA1 · 85 B · Battle engineSets the HDMA line data from the screen the field left (FieldBtlPpu): the tilemap bytes of channel 0 (!Battle_HdmaTilemaps: BG1SC, BG2SC, BG4SC from .Tilemap1, .Tilemap2, .Unk59; BG2SC's bit 0... - verified
BattleCD_RestoreScreen$CD:0CF6 · 50 B · Battle engine - verified
BattleCD_StartLayerFx$CD:0D28 · 11 B · Battle engineAction set-up's call (BattleAct_LoadCommon, A = !Battle_ActUnkArg987C): !Battle_Unk5D9B = 0, loads layer effect A (BattleCD_LoadLayerFx) and starts its channels (BattleCD_StartFxChannels); RTL. - verified
BattleCD_StartFxChannels$CD:0D33 · 47 B · Battle engineClears the three 32-byte channel blocks from !Battle_FxChannels ($CA32-$CA91, by words), then starts channel 0 (X = 0) with script !Battle_FxScriptIds+0 and channel 1 (X = $10) with +1, each... - verified
BattleCD_RunEndFx$CD:0D62 · 49 B · Battle engineThe battle end's effect X (BattleCD_LayerFx84 / BattleCD_LayerFx87): APU command !BattleCD_ApuCmd80 (arguments 0, $FF), a frame, then !Audio_CmdPlayMusic with !BattleCD_EndSong (bank $C7 loads... - verified
BattleCD_LayerFx87$CD:0D93 · 30 B · Battle engineOne of the battle end's effects (BattleCD_ExitBattle): !Battle_Unk99D2 = 0, BattleCD_ApuCmd81, frames until APUIO1 reads 0, effect !BattleCD_FxEnd87 (BattleCD_RunEndFx), then frames until... - verified
BattleCD_LayerFx84$CD:0DB1 · 73 B · Battle engineThe other end effect: BattleCD_ApuCmd81, frames until APUIO1 reads 0, !BattleFx_GradTickMask = 3, !BattleFx_GradForce = $80; the wait below once; 128 more frames; effect !BattleCD_FxEnd84... - verified
BattleCD_WaitLayerFxIdle$CD:0DFA · 11 B · Battle engineWaits (BattleCD_WaitFrameRefresh) while !Battle_Unk5D9B is set. - verified
BattleCD_RunLayerFx$CD:0E05 · 30 B · Battle engineRuns layer effect A to its end: waits for the one before (BattleCD_WaitLayerFxIdle), loads A (BattleCD_LoadLayerFx), starts its channels, !Battle_Unk5D9B + 1, then frames... - verified
BattleCD_RestorePalRows$CD:0E23 · 18 B · Battle engineCopies the 16 bytes at !Battle_PalRowSave (colours 24-31, saved by BattleFx_Init) back to bytes $30-$3F of both !Battle_PaletteSavedLo and !Battle_PaletteLiveLo. - verified
BattleCD_FxRecSetup$CD:0E35 · 44 B · Battle engineShared start of BattleCD_LoadFxPalA/B: the palette rows back (BattleCD_RestorePalRows); DP $55 = 1 when FieldBtlPpu.ColorMath bit 6 (!BattleCD_CgadsubHalf, half colour math, if it is a CGADSUB... - verified
BattleCD_LoadFxPalA$CD:0E61 · 24 B · Battle engineUnless the half-colour-math flag of BattleCD_FxRecSetup (DP $55) is set: copies 8 bytes of !BattleRom_FxRecA (from the setup's offset X) to !Battle_PalAnimRec10+1, !Battle_PalAnimRec10 = DP $53... - verified
BattleCD_LoadFxPalB$CD:0E79 · 36 B · Battle engine - verified
BattleCD_LayerFxSetsScreen$CD:0E9D · 32 B · Battle engineC=0 and A = 0 when the current layer effect (!Battle_LayerFxId) is !BattleCD_FxPlain86 or !BattleCD_FxPlainFirst-!BattleCD_FxPlainLast ($7B-$7F); else C=1 with A = the id. - verified
BattleCD_LoadLayerFx$CD:0EBD · 327 B · Battle engineLoads layer effect X (0-$FF; X = !BattleCD_FxByBattle stays when !Battle_UnkA018 is 7, else becomes +1 when !Battle_UnkA017 is 7, else +2: a variant by the battle, probably): - !Battle_LayerFxId =...
Bank $CD · $CD:1000–$1FFF
$CD:1000
Verified · 116
- verified
BattleCD_LoadLayerFx_colours$CD:1004 · 78 B · Battle engine - verified
BattleCD_FillFxTilemaps$CD:1052 · 43 B · Battle engineFills the effect's tilemap pages !Battle_FxTilemaps ($7E:D000-$FFFF) with the entry !BattleCD_FxBlankEntry (tile $EE, attribute 0), by words: .fill (JSR'd with X = 0 and $1000, run with X = $2000)... - verified
BattleCD_BuildFxTilemap$CD:107D · 315 B · Battle engineBuilds the effect's tilemap pages into !Battle_FxTilemaps, one page of $200 bytes per block, !Battle_FxRecord's low 6 bits of blocks (the count byte is cut to them), from map !Battle_FxRecMap on... - verified
BattleCD_LoadFxRecord$CD:11B8 · 44 B · Battle engineCopies the 6-byte !BattleRom_FxRecords entry X & $7FFF to !Battle_FxRecord ($C9FC-$CA01: the block count byte, the tile set, the first map word, !Battle_FxRecUnkCA00 and the rows per block), using... - verified
BattleCD_LoadFxTiles$CD:11E4 · 53 B · Battle engineBuilds one set of 64 2bpp tiles (16 bytes each, $400 bytes) in !Battle_ActFrameBuf ($7E:2D00, from Y = 0): the set's 64 entry words are at $CF:8000 + X * 64 (DP $53-$55); each names a source tile... - verified
BattleCD_TileHandlers2$CD:1219 · 8 B · Battle engineBattleCD_LoadFxTiles' tile copiers by the entry's flip bits (bit 14 = 2, bit 15 = 4). - verified
BattleCD_TileVHFlip2$CD:1221 · 8 B · Battle engineA 2bpp tile flipped both ways: BattleCD_TileVFlip2 at Y, then the horizontal flip of BattleCD_TileHFlip2 (JMP BattleCD_TileReverse2) at the same Y. - verified
BattleCD_TileVFlip2$CD:1229 · 76 B · Battle engineA 2bpp tile flipped vertically: BattleCD_TileCopy2, then the eight row words swapped end for end (row 0 with 7, 1 with 6, ...), using DP $69. - verified
BattleCD_TileHFlip2$CD:1275 · 5 B · Battle engineA 2bpp tile flipped horizontally: BattleCD_TileCopy2, then its 16 bytes at Y through BitReverseTable (each byte's bits reversed: the row mirrored), 4 a pass with the count in DP $61. - verified
BattleCD_TileReverse2$CD:127A · 62 B · Battle engine - verified
BattleCD_TileCopy2$CD:12B8 · 72 B · Battle engineCopies the entry's 2bpp tile: 16 bytes from $CF:0000 + (entry AND $1FFF) * 8 (!BattleRom_FxTileGfx) to !Battle_ActFrameBuf + Y, a word at a time (in the order 0, 8, 2, $A, ...), then Y + 16. - verified
BattleCD_PlaneMasks$CD:1300 · 8 B · Battle engineMasks for the upper two bit planes of a 4bpp tile built from a 2bpp one (BattleCD_Tile4Planes): by a 2-bit value, none, plane 2, plane 3, both (the pixels' colour + 0, 4, 8 or 12). - verified
BattleCD_FxGfxVram$CD:1308 · 12 B · Battle engineVRAM word addresses of the six graphics parts BattleCD_LoadFxGfx2/4 upload, $400 bytes each: $0C00, $0E00, ..., $1600. - verified
BattleCD_LoadFxGfx2$CD:1314 · 15 B · Battle engineLoads the action's graphics sets (BattleAct_LoadCommon, A = !Battle_ActGfxSetB): sets A and A+1 as parts 4 and 5. - verified
BattleCD_LoadFxGfx4$CD:1323 · 69 B · Battle engine - verified
BattleCD_ConvertFxGfx$CD:1368 · 98 B · Battle engineBuilds DP $67 (the callers pass 32) 4bpp tiles of graphics set X in !Battle_ActFrameBuf from Y = 0: the set's entry words are at !BattleRom_FxGfxLists + X * 64 (DP $53-$55, bank $CF); the set's... - verified
BattleCD_PickPlaneBits$CD:13CA · 10 B · Battle engineA = 2 * the 2-bit field (DP $5B AND 6) / 2 of the colour byte in DP $5D, through BattleCD_FieldShifts (a JMP into the shift chain BattleCD_ShiftField6, whose RTS returns for it). - verified
BattleCD_FieldShifts$CD:13D4 · 8 B · Battle engineBattleCD_PickPlaneBits' entry points into the shift chain: field 0 (bits 0-1, no shift), 1 (bits 2-3), 2 (bits 4-5), 3 (bits 6-7). - verified
BattleCD_ShiftField6$CD:13DC · 2 B · Battle engineA = (A >> 6 AND 3) * 2; the entries BattleCD_ShiftField4 ($13DE), BattleCD_ShiftField2 ($13E0) and BattleCD_ShiftField0 ($13E2) shift 4, 2 and 0 bits before the same AND and ASL. - verified
BattleCD_ShiftField4$CD:13DE · 2 B · Battle engine - verified
BattleCD_ShiftField2$CD:13E0 · 2 B · Battle engine - verified
BattleCD_ShiftField0$CD:13E2 · 4 B · Battle engine - verified
BattleCD_TileHandlers4$CD:13E6 · 8 B · Battle engineBattleCD_ConvertFxGfx's tile builders by the entry's flip bits (bit 14 = 2, bit 15 = 4). - verified
BattleCD_Tile4VHFlip$CD:13EE · 8 B · Battle engineA 4bpp tile flipped both ways: BattleCD_Tile4VFlip at Y, then the horizontal flip (JMP BattleCD_TileReverse4) at the same Y. - verified
BattleCD_Tile4VFlip$CD:13F6 · 79 B · Battle engineA 4bpp tile flipped vertically: BattleCD_Tile4Copy, then the eight row words of planes 0-1 swapped end for end (.rows, JSR'd), and those of planes 2-3 (.rows again, falling in, at Y + 16), using... - verified
BattleCD_Tile4HFlip$CD:1445 · 5 B · Battle engineA 4bpp tile flipped horizontally: BattleCD_Tile4Copy, then its 32 bytes through BitReverseTable, 4 a pass (DP $61 counts 8 passes). - verified
BattleCD_TileReverse4$CD:144A · 62 B · Battle engine - verified
BattleCD_Tile4Planes$CD:1488 · 129 B · Battle engineOne 4bpp tile from a 2bpp one: for each of the 8 row words w at !BattleRom_FxGfxSrc + X (bank $D0): planes 0-1 = w, and planes 2-3 (16 bytes on) = (w with its bytes swapped OR w) AND the plane... - verified
BattleCD_Tile4Copy$CD:1509 · 204 B · Battle engineBuilds the entry's 4bpp tile at Y from !BattleRom_FxGfxSrc + (entry AND $1FFF) * 8 (the entry word is kept in DP $65): - entry bit 13 set: BattleCD_Tile4Planes (a 2bpp source); - clear... - verified
BattleCD_StartFxChannel$CD:15D5 · 52 B · Battle engineStarts channel X (0 or $10) on script A: the pointer from !BattleRom_FxScriptPtrs entry A (bank $D1, through DP $53-$55), the period = its first byte AND $0F, the countdown + 1 (from 0: the first... - verified
BattleCD_StepFxChannels$CD:1609 · 75 B · Battle engineThe channels' tick (BattleCD_NmiMain, once a frame): nothing while !Battle_BgFxEnded is set or !Battle_Unk5D9B is 0. - verified
BattleCD_RunFxScript$CD:1654 · 82 B · Battle engineOne step of channel X's script (see the banner), with the pointer in DP $40-$42: opcodes ($80-$FE) run (BattleCD_RunFxOp) and the pointer moves past their operand byte, until a page byte, $7F or... - verified
BattleCD_RunFxOp$CD:16A6 · 15 B · Battle engineRuns script opcode A ($80-$FE): DP $43 = X (the channel), the pointer in DP $40 past the opcode, then BattleCD_FxOpTable entry A - $80 (the 8-bit ASL drops bit 7; the handlers start at $CD:17A9... - verified
BattleCD_FxOpTable$CD:16B5 · 244 B · Battle engineThe handler of each script opcode $80-$F9, by (opcode - $80) * 2 (JSR (T,X) in BattleCD_RunFxOp). - verified
BattleCD_FxOpPokeByte$CD:17A9 · 21 B · Battle engineOpcode $F9 (value, address word): stores the value at that address in bank $7E. - verified
BattleCD_FxOpCopyColour$CD:17BE · 33 B · Battle engineOpcode $F8 (source, destination): copies colour source to colour destination (0-255) in both !Battle_PaletteSavedLo and !Battle_PaletteLiveLo. - verified
BattleCD_FxOpSetCE0E$CD:17DF · 6 B · Battle engineOpcode $F7 (value): !BattleFx_GradForce = the value. - verified
BattleCD_FxOpWaitCE10$CD:17E5 · 26 B · Battle engineOpcode $F6 (n): while !BattleFx_GradRotRaw is 0, branches back n (see the banner); then (and always) !BattleFx_GradRotRaw = 0. - verified
BattleCD_FxOpSetCD46$CD:17FF · 6 B · Battle engineOpcode $F5 (value): !BattleFx_UnkCD46 = the value. - verified
BattleCD_FxOpSwayQuad$CD:1805 · 5 B · Battle engineOpcode $F4 (quad): JSL BattleFx_SwayQuad, which reads the operand through DP $40: fills that quad of !BattleFx_Quads with a beam from the top of the screen, swaying with the frame count, down to... - verified
BattleCD_FxOpRequestBgSet$CD:180A · 9 B · Battle engineOpcode $F2 (value): asks BattleCD_FrameTick for one JSL BattleFx_LoadBgSet with A = the value (!Battle_UnkCD45 = the value, !BattleFx_BgRequest + 1). - verified
BattleCD_FxOpWaitBgSet$CD:1813 · 23 B · Battle engineOpcode $F1 (n): while !BattleFx_BgRequest is set (the call opcode $F2 asked for has not run yet), branches back n (see the banner). - verified
BattleCD_FxOpValueFromVar0F$CD:182A · 10 B · Battle engineOpcode $F0 (n): !Battle_FxValues entry n = variable $0F (!Battle_ActVars). - verified
BattleCD_FxOpCountCD3C$CD:1834 · 23 B · Battle engineOpcode $EF (no operand): !Battle_UnkCD3C + 1; when it wraps to 0, the palette animation records 8-11 are stopped (FieldAnimB .Unk0 = 0). - verified
BattleCD_FxOpWaveWindowB$CD:184B · 5 B · Battle engineOpcode $F3 (step): JSL BattleFx_WaveWindowB, which reads the operand through DP $40: !BattleFx_CountA grows by it and window table 0 gets wavy edges (angles from !BattleFx_CountB, which counts up). - verified
BattleCD_FxOpGrowBand$CD:1850 · 5 B · Battle engineOpcode $EE (kind): JSL BattleFx_GrowBand, which reads the operand through DP $40: a band around the point in !Battle_ActCalcResult, one step wider per run, into this frame's window table (0 a... - verified
BattleCD_FxOpWaveWindowA$CD:1855 · 5 B · Battle engineOpcode $ED (step): JSL BattleFx_WaveWindowA, which reads the operand through DP $40: !BattleFx_CountA grows by it and window table 0 gets wavy edges (angles from the frame count). - verified
BattleCD_FxOpRampWin2$CD:185A · 5 B · Battle engineOpcode $EC (one operand byte, which nothing reads): JSL BattleFx_RampWin2 (a ramp of left edges into the second pairs of window table 0, up from line !BattleFx_RampBottom - !BattleFx_CountA... - verified
BattleCD_FxOpWaveWindowBByFrame$CD:185F · 5 B · Battle engineOpcode $EB (step): JSL BattleFx_WaveWindowB_ByFrame (BattleFx_WaveWindowB with the angles from the frame count), which reads the operand through DP $40. - verified
BattleCD_FxOpSetBackdrop$CD:1864 · 16 B · Battle engineOpcode $EA (colour word): colour 0 (the backdrop) of both !Battle_PaletteSavedLo and !Battle_PaletteLiveLo = the word. - verified
BattleCD_FxOpGrowBox$CD:1874 · 5 B · Battle engineOpcode $E8 (step): JSL BattleFx_GrowBox, which reads the operand through DP $40: !BattleFx_BoxHalfHeight grows by it and this frame's window table gets a box centred on line 106. - verified
BattleCD_FxOpAddBoxInset$CD:1879 · 5 B · Battle engineOpcode $E9 (step): JSL BattleFx_AddBoxInset, which adds the operand (read through DP $40) to !BattleFx_BoxInset. - verified
BattleCD_FxOpWaveBg3$CD:187E · 68 B · Battle engineOpcode $E7 (n): layer 3's wave scroll. - verified
BattleCD_FxOpSetHoldAnims$CD:18C2 · 6 B · Battle engineOpcode $E6 (value): !BattleFx_HoldAnims = the value (non-zero holds the palette animations, BattleFx_HoldAnimsTick; action opcodes $2D/$2E set it too). - verified
BattleCD_FxOpIncVar$CD:18C8 · 7 B · Battle engineOpcode $E5 (n): variable n (!Battle_ActVars) + 1. - verified
BattleCD_FxOpSoundAtCalc$CD:18CF · 16 B · Battle engineOpcode $E4 (sound): leaves the sound pending for BattleCD_PlayPendingSfx (BattleCD_FrameTick) with X = the first byte of !Battle_ActCalcResult (an x, probably: the pan). - verified
BattleCD_FxOpCalcToTriangle$CD:18DF · 40 B · Battle engineOpcode $E3 (object 0/1): the object's three screen points (!Battle_FxTriX0-Y2) = the six bytes of !Battle_ActCalcResult entries 0-2 (x, y of each). - verified
BattleCD_FxOpSetCD2E$CD:1907 · 6 B · Battle engineOpcode $E2 (value): !Battle_UnkCD2E = the value (non-zero: the NMI skips its BattleCD_WaitScanline). - verified
BattleCD_FxOpSetCD2D$CD:190D · 6 B · Battle engineOpcode $E0 (value): !Battle_UnkCD2D = the value (non-zero: the NMI skips BattleCE_UnkF066). - verified
BattleCD_FxOpRandomShake$CD:1913 · 5 B · Battle engineOpcode $DF (base x, base y, mask): JSL BattleFx_RandomShake, which reads the three operand bytes through DP $40 (and moves DP $40 on by 2): the channel's !BattleFx_ShakeX/Y = -(random & mask + base). - verified
BattleCD_FxOpSetCD29$CD:1918 · 6 B · Battle engineOpcode $DE (value): !Battle_UnkCD29 = the value (the NMI copies it to !Battle_UnkA028 every frame). - verified
BattleCD_FxOpSaveCalcPoints$CD:191E · 5 B · Battle engineOpcode $DD (object): JSL BattleFx_SaveCalcPoints, which reads the operand through DP $40: the object's triangle (!Battle_FxTriX0-Y2) = the six bytes of !Battle_ActCalcResult. - verified
BattleCD_FxOpSound$CD:1923 · 15 B · Battle engineOpcode $DC (sound): leaves the sound pending for BattleCD_PlayPendingSfx with X = !BattleCD_SfxArgCentre. - verified
BattleCD_FxOpCopyWin1ToWin2$CD:1932 · 5 B · Battle engineOpcode $DB (one operand byte, which nothing reads): JSL BattleFx_CopyWin1ToWin2 (the other window table's first pairs into this frame's table's second pairs). - verified
BattleCD_FxOpWedge$CD:1937 · 122 B · Battle engineOpcode $DA (unused byte, pair n): fills a triangle (BattleCD_FillTriangle, object 0, DP $20 = 0) from the point P = !Battle_ActCalcResult entry 2n to the two points Q +/- w at right angles to... - verified
BattleCD_FxOpBeamFromPair$CD:19B1 · 17 B · Battle engineOpcode $D9 (object, pair n): as opcode $AC (BattleCD_FxOpBeam), but the angle is taken from the points of pair n itself: entries 2n and 2n+1 of !Battle_ActCalcResult clamped to the screen... - verified
BattleCD_FxOpAddVar$CD:19C2 · 35 B · Battle engineOpcode $D8 (n, value): variable n (!Battle_ActVars) + value; with n's bit 7 set, variable n AND $7F = 0 instead (the value is skipped). - verified
BattleCD_FxOpDrift$CD:19E5 · 108 B · Battle engineOpcode $D7 (b), on the channel's !Battle_FxChanWork bytes: - b bit 7 set: six random values 0-31 (BattleCD_RandByte, each seeded with the one before, the first with b) into work bytes 0-5; - else... - verified
BattleCD_FxBranchBack2$CD:1A51 · 21 B · Battle engineThe taken branch of the two-operand tests (opcodes $D6 and $D5): branches back by the second operand n (DP $40 - n with DP $40 at the first operand; see the banner). - verified
BattleCD_FxOpWaitValueIsVar0E$CD:1A66 · 20 B · Battle engineOpcode $D6 (index, n): while !Battle_FxValues entry index differs from variable $0E, branches back n (BattleCD_FxBranchBack2); else skips both operands. - verified
BattleCD_FxOpWaitValueZero$CD:1A7A · 17 B · Battle engineOpcode $D5 (index, n): while !Battle_FxValues entry index is not 0, branches back n (BattleCD_FxBranchBack2); else skips both operands. - verified
BattleCD_FxOpValueSubVar09$CD:1A8B · 17 B · Battle engineOpcode $D4 (index): !Battle_FxValues entry index - variable $09, not below 0. - verified
BattleCD_FxOpValueAddVar0C$CD:1A9C · 22 B · Battle engineOpcode $D3 (index): !Battle_FxValues entry index + variable $0C, at most variable $0E (the 8-bit sum is compared: a sum past $FF wraps first). - verified
BattleCD_FxOpColoursFromVar0A$CD:1AB2 · 12 B · Battle engineOpcode $D2 (one operand byte, not read): both colour sets (!Battle_FxScriptIds+2/+3) = variable $0A, then the colour copy of BattleCD_LoadLayerFx (BattleCD_LoadLayerFx_colours, tail jump): colours... - verified
BattleCD_FxOpSwitchHigh$CD:1ABE · 13 B · Battle engineOpcode $D1 (n, then a list of script addresses): jumps to the address in word (variable n's high nibble) of the list after the operand (DP $40 = that word - 1; see the banner). - verified
BattleCD_FxOpSwitchLow$CD:1ACB · 22 B · Battle engine - verified
BattleCD_FxOpMirrorWin1ToWin2$CD:1AE1 · 5 B · Battle engineOpcode $CF (offset): JSL BattleFx_MirrorWin1ToWin2, which reads the operand through DP $40: as opcode $DB, mirrored left to right, for 28 lines of each 28-line block, starting at byte offset the... - verified
BattleCD_FxOpStepBounce$CD:1AE6 · 5 B · Battle engineOpcode $CE (one operand byte, which nothing reads): JSL BattleFx_StepBounce, one step of the channel's bounce (set up by opcode $CD): !BattleFx_BounceOut moves. - verified
BattleCD_FxOpSetupBounce$CD:1AEB · 52 B · Battle engineOpcode $CD (d): sets up the channel's bounce for BattleFx_StepBounce (opcode $CE): !BattleFx_BounceDir = 0 (rising), !BattleFx_BounceBase = the channel's !BattleFx_BounceOut, !BattleFx_BounceSpeed... - verified
BattleCD_ClampCalcAngle$CD:1B1F · 3 B · Battle engineClamps the points of !Battle_ActCalcResult entries 0 and 1 to the screen (BattleCD_ClampCalcPair), then falls into BattleCD_CalcAngle ($1B22): DP $23-$26 = the two points at... - verified
BattleCD_CalcAngle$CD:1B22 · 32 B · Battle engine - verified
BattleCD_ClampX$CD:1B42 · 14 B · Battle engineA clamped to !BattleCD_ScreenXMin-!BattleCD_ScreenXMax (8-$F8). - verified
BattleCD_ClampY$CD:1B50 · 14 B · Battle engineA clamped to !BattleCD_ScreenYMin-!BattleCD_ScreenYMax (8-$D4). - verified
BattleCD_FxOpJumpIf99D2Is1$CD:1B5E · 15 B · Battle engineOpcode $CB (address word): with !Battle_Unk99D2 AND $7F = 1, jumps to the address (BattleCD_FxOpJump); else skips it. - verified
BattleCD_FxOpJump$CD:1B6D · 11 B · Battle engineOpcode $CA (address word): jumps to the script address (in the script's bank; DP $40 = the address - 1, see the banner). - verified
BattleCD_FxOpSwapPalettes$CD:1B78 · 34 B · Battle engineOpcode $C9 (no operand): !Battle_UnkA101 + 1, and bit 3 of the eleven battlers' !Battler_Palette and of !BattleMenu_CursorPalette flipped (palette number +/- 8). - verified
BattleCD_FxOpSwapObjPalettes$CD:1B9A · 5 B · Battle engineOpcode $E1 (no operand: BattleFx_SwapObjPalettes moves DP $40 back by one): JSL BattleFx_SwapObjPalettes, which swaps OBJ palette rows 1-3 with rows 5-7 (live and saved). - verified
BattleCD_FxOpScrollYToEnemy$CD:1B9F · 12 B · Battle engineOpcode $C8 (one operand byte, not read): the channel's !BattleFx_BounceOut + (!BattleCD_FxEnemyLine - slot 3's !Battler_ScreenY) (DP $45, 16-bit), through BattleCD_FxAddScrollY (tail jump). - verified
BattleCD_FxOpObjYToEnemy$CD:1BAB · 21 B · Battle engineOpcode $C7 (object): the object's !Battle_FxObjCentreY - (!BattleCD_FxEnemyLine - slot 3's !Battler_ScreenY). - verified
BattleCD_SinMul45$CD:1BC0 · 14 B · Battle engineA = DP $45 * sin(A) / 256 (BattleCD_SinMul with Y = DP $45) for 16-bit-index callers: X and Y are saved at 16 bits around the SEP #$10. - verified
BattleCD_FxOpWobble$CD:1BCE · 100 B · Battle engineOpcode $C6 (object, three phase steps, three angle bases): the object's phases !Battle_FxObjPhaseA/B/C + the steps; then its angles !Battle_FxObjAngleX = base 1 + $20 * sin(phase A) / 256... - verified
BattleCD_FxOpScrollToCalc$CD:1C32 · 2 B · Battle engineOpcode $AA (n): layer 3 scrolled so that the point of !Battle_ActCalcResult entry n is its origin: the channel's !BattleFx_ShakeX/Y = -x, -y (16-bit). - verified
BattleCD_ScrollToCalc$CD:1C34 · 39 B · Battle engine - verified
BattleCD_FxCircleRadii$CD:1C5B · 8 B · Battle engineRadius sets of BattleCD_FxCircleFromTable, 4 bytes each: the first circle's x and y radius, the second's x and y radius. - verified
BattleCD_FxOpCircleAtCalc$CD:1C63 · 24 B · Battle engineOpcode $C5 (radius set): layer 3 circles around the point of !Battle_ActCalcResult entry 0: the point (BattleCD_ScrollToCalc, A = 0) as the centre (DP $4D/$4E, the scroll negated back), then... - verified
BattleCD_FxOpCircleGrow$CD:1C7B · 68 B · Battle engineOpcode $C4 (k): layer 3 circles around !BattleCD_FxCircleX/Y. - verified
BattleCD_FxCircleFromTable$CD:1CBF · 22 B · Battle engineDP $49-$4C = BattleCD_FxCircleRadii set k (the script's operand), then falls into BattleCD_FxCircleStep ($1CD5): the channel's angles (!Battle_FxChanWork bytes 5, 6, 7) + 2, + 5, + 6; the point x... - verified
BattleCD_FxCircleStep$CD:1CD5 · 120 B · Battle engine - verified
BattleCD_FxOpIncVar0F$CD:1D4D · 9 B · Battle engineOpcode $C3 (no operand): variable $0F + 1. - verified
BattleCD_FxOpObjStepCapped$CD:1D56 · 61 B · Battle engineOpcode $C2 (object, limit, three steps): the object's !Battle_FxObjUnkDA/DC/DE each + its step, stored only while the 8-bit sum stays below the limit. - verified
BattleCD_FxOpWaitLine$CD:1D93 · 5 B · Battle engineOpcode $C1 (line): busy-waits for that scanline (BattleCD_WaitScanline, tail jump). - verified
BattleCD_FxOpShake$CD:1D98 · 111 B · Battle engineOpcode $C0 (flag, then seven bytes): the screen shake (BattleCD_StepShake). - verified
BattleCD_FxOpWaitPalAnims$CD:1E07 · 32 B · Battle engineOpcode $BF (n): while any of the palette animation records 8-11 runs (FieldAnimB .Unk0 non-zero), branches back n (see the banner). - verified
BattleCD_FxOpDrawModel2$CD:1E27 · 15 B · Battle engineOpcode $BE (object): draws model 2 (DP $4F = $20) for the object with its !Battle_FxObjDepth (BattleCD_FxDrawModel, tail jump). - verified
BattleCD_FxOpSetObjD1$CD:1E36 · 15 B · Battle engineOpcode $BD (b): !Battle_FxObjUnkD1 of object (b AND 1) = b >> 4: the kind of shape slot b AND 1 (BattleCD_FxDrawShape; opcode $8A sets it too). - verified
BattleCD_FxOpTurnObj$CD:1E45 · 55 B · Battle engineOpcode $BC (object, four steps): the object's !Battle_FxObjAngleX, !Battle_FxObjAngleY, !Battle_FxObjAngleZ and !Battle_FxObjDepth each + its step. - verified
BattleCD_FxOpDrawModel$CD:1E7C · 21 B · Battle engineOpcode $BB (b): draws model (b AND $0F) (DP $4F = b << 4, 8-bit) for object (b AND 1) with its !Battle_FxObjDepth (BattleCD_FxDrawModel, tail jump). - verified
BattleCD_FxOpSpinModel$CD:1E91 · 25 B · Battle engineOpcode $BA (b): turns object b (the whole byte as the index; the scripts presumably pass 0 or 1) a step (!Battle_FxObjAngleY + 1, !Battle_FxObjAngleX + 2, !Battle_FxObjAngleZ + 1) and draws model... - verified
BattleCD_FxDrawModel$CD:1EAA · 77 B · Battle engine - verified
BattleCD_FxRotateVertex$CD:1EF7 · 69 B · Battle engineRotates vertex A (0-2) of a model of BattleFx_FxModels (16 bytes per model, DP $4F = its offset; 4 bytes per vertex: x, y, z, unused) by object X's angles: !Battle_FxRotInX/Y = the vertex's x and... - verified
BattleCD_FxOpColours$CD:1F3C · 11 B · Battle engineOpcode $B9 (set): both colour sets (!Battle_FxScriptIds+2/+3) = the operand, then the colour copy of BattleCD_LoadLayerFx (BattleCD_LoadLayerFx_colours, tail jump): colours 25-27 and 29-31 of both... - verified
BattleCD_FxOpFillHangingTriangle$CD:1F47 · 6 B · Battle engineOpcode $B8 (object): BattleCD_FillHangingTriangle with A = the object (0 or 1): its right triangle hanging from the top of the screen. - verified
BattleCD_FxOpTilePageSlot$CD:1F4D · 6 B · Battle engineOpcode $B7 (slot): !Battle_TilePageSlot = the slot (which BattleCD_TileUploadVram address the script's tilemap pages go to). - verified
BattleCD_FxOpWindowBand$CD:1F53 · 77 B · Battle engineOpcodes $B5 and $B6 (index): a band of !Battle_FxWinLines around the middle line. - verified
BattleCD_FxOpCentreAndScroll$CD:1FA0 · 40 B · Battle engineOpcode $B4 (object): the object's centre from its triangle (BattleCD_FxOpTriCentre, same operand), then layer 3 scrolled so that the centre is its origin: the channel's !BattleFx_ShakeX/Y =... - verified
BattleCD_FxOpWaveTable$CD:1FC8 · 131 B · Battle engineOpcode $B3 (an operand byte, stored to DP $45 and overwritten: not used): fills the 106 entries of !Battle_FxWaveTable (8 bytes each: an x word and a y word, twice) for this frame.
Bank $CD · $CD:2000–$2FFF
$CD:2000
Verified · 102
- verified
BattleCD_FxWaveStoreX$CD:204B · 102 B · Battle engineBattleCD_FxOpWaveTable's x: stores A (signed, widened to 16 bits) as entry Y's two x words, then starts |sin(DP $45)| * !BattleCD_FxWaveAmpY on the multiplier for the y and returns C=1 when that... - verified
BattleCD_FxWaveStoreY$CD:20B1 · 34 B · Battle engineBattleCD_FxOpWaveTable's y: A + $20, widened to 16 bits as signed, plus DP $49, stored as entry Y's two y words. - verified
BattleCD_FxOpCopyWindowEdges$CD:20D3 · 5 B · Battle engineOpcode $B2 (one operand byte, not read here; BattleCE_CopyWindowEdges reads it): JSL BattleCE_CopyWindowEdges, which copies one window's edge pair of lines s/4 to s/4 + 215, with s = the operand x... - verified
BattleCD_FxOpScaleObj$CD:20D8 · 21 B · Battle engineOpcode $B1 (object, step): the object's !Battle_FxObjScale + step. - verified
BattleCD_FxOpBgMode$CD:20ED · 6 B · Battle engineOpcode $B0 (value): !Battle_HdmaMode (the BGMODE line data) = the value. - verified
BattleCD_FxOpTriangleOfPcs$CD:20F3 · 40 B · Battle engineOpcode $AF (object): the object's triangle (!Battle_FxTriX0-Y2) = the screen positions of PC slots 0, 1 and 2 (!Battler_ScreenX/Y). - verified
BattleCD_ScaleToCentre$CD:211B · 88 B · Battle engineA = c + (A - c) * DP $21 / 256, with c = DP $47 (the centre): moves a coordinate towards the centre by the scale (BattleCD_FxOpFillTriangle). - verified
BattleCD_FxOpFillTriangle$CD:2173 · 77 B · Battle engineOpcode $AE (b): fills the triangle of object (b AND 1) (!BattleFx_QuadSlot = it): its three points, each moved towards !Battle_FxObjCentreX/Y by !Battle_FxObjScale (BattleCD_ScaleToCentre), into... - verified
BattleCD_FxOpTriCentre$CD:21C0 · 461 B · Battle engineOpcode $AD (object): the object's !Battle_FxObjScale = $FF and its centre !Battle_FxObjCentreX/Y = where two medians of its triangle meet (the centroid): the line from the midpoint of points 0-1... - verified
BattleCD_NormaliseDiv$CD:238D · 166 B · Battle enginePrepares BattleCD_Div16 for a quotient scaled by 256: shifts the dividend DP $23 left by n, its leading zero bits (at most 8), and the divisor DP $25 right by 8 - n. - verified
BattleCD_ClampCalcPair$CD:2433 · 3 B · Battle engineClamps the two points at !Battle_ActCalcResult+X (x, y, x, y) to the screen: the x bytes with BattleCD_ClampX (8-$F8), the y bytes with BattleCD_ClampY (8-$D4). - verified
BattleCD_ClampCalcPair01$CD:2436 · 42 B · Battle engine - verified
BattleCD_FxOpBeam$CD:2460 · 6 B · Battle engineOpcode $AC (object, pair n): a beam of half-width w (variable $0E, signed) between P = !Battle_ActCalcResult entry 2n and Q = entry 2n+1, at right angles to !Battle_FxAngle (from entries 2 and 3... - verified
BattleCD_FxOpBeamQuad$CD:2466 · 141 B · Battle engine - verified
BattleCD_FxOpCalcToValues$CD:24F3 · 37 B · Battle engineOpcode $AB (b): the point of !Battle_ActCalcResult entry (b AND $7F) (entries 0 and 1 clamped to the screen first, BattleCD_ClampCalcPair01) into !Battle_FxValues: x to entry 2 and y to entry 4... - verified
BattleCD_FxOpWaitVarSet$CD:2518 · 35 B · Battle engineOpcode $A9 (n, back): while variable n (!Battle_ActVars) is 0, branches back by the second operand (see the banner); else skips both operands. - verified
BattleCD_FxOpWaves$CD:253B · 293 B · Battle engineOpcode $8F (layers, amplitude, speed): the per-line wave offsets (!Battle_WaveOffsets) of the wave scroll. - verified
BattleCD_FxOpSetObjAngles$CD:2660 · 39 B · Battle engineOpcode $A7 (object, three angles): the object's !Battle_FxObjAngleX/Y/Z = the angles, !Battle_FxObjDepth = 0, !Battle_FxObjScale = $FF. - verified
BattleCD_FxOpReloadCeSet$CD:2687 · 9 B · Battle engineOpcode $87 (value): !BattleFx_CeSetBase = the value and !BattleFx_CeSetReload + 1 (as the message and wipe code bump them), so BattleFx_ReloadCeSet reloads the set. - verified
BattleCD_FxOpSaveObjs$CD:2690 · 32 B · Battle engineOpcode $A5 (slot 0-7): copies the two objects' fields (!Battle_FxObjCentreX on, !BattleCD_FxObjBytes bytes) to save slot slot of !Battle_FxObjSaves (offset from BattleCD_FxObjSaveOfs). - verified
BattleCD_FxObjSaveOfs$CD:26B0 · 16 B · Battle engineOffset of each save slot in !Battle_FxObjSaves (slot * !BattleCD_FxObjBytes). - verified
BattleCD_FxOpLoadObjs$CD:26C0 · 32 B · Battle engineOpcode $A6 (slot 0-7): the two objects' fields back from save slot slot (the reverse of BattleCD_FxOpSaveObjs). - verified
BattleCD_FxOpSetObjPhases$CD:26E0 · 55 B · Battle engineOpcode $A4 (object, six values): the object's !Battle_FxObjPhaseA/B/C and !Battle_FxObjUnkDA/DC/DE (the radii of the ring opcodes) = the values. - verified
BattleCD_FxOpStepEllipse$CD:2717 · 119 B · Battle engineOpcode $A3 (object, then dx, dy, dr, dsx, dsy, dphase): steps the object's flat ring: !Battle_FxObjCentreX/Y + dx/dy, the three radii !Battle_FxObjUnkDA/DC/DE each + dr, !Battle_FxObjSquashX/Y +... - verified
BattleCD_FxOpSetEllipse$CD:278E · 60 B · Battle engineOpcode $A2 (object, x, y, radius): the object's flat ring: !Battle_FxObjCentreX/Y = x, y; the three radii !Battle_FxObjUnkDA/DC/DE = radius; phases !Battle_FxObjPhaseA/B/C = !BattleCD_FxPhaseA/B/C... - verified
BattleCD_FxOpStepRing3d$CD:27CA · 121 B · Battle engineOpcode $A8 (object, then dx, dy, dz, dr, dax, day, daz, dscale): steps the object's turning ring: !Battle_FxObjCentreX/Y and !Battle_FxObjDepth + dx/dy/dz, the three radii !Battle_FxObjUnkDA/DC/DE... - verified
BattleCD_FxRing3dTriangle$CD:2843 · 94 B · Battle engineThe object's triangle from its turning ring: for each of the three vertices, radius !Battle_FxObjUnkDA/DC/DE and phase !Battle_FxObjPhaseA/B/C, the point BattleCD_FxRingVertex rotates, plus... - verified
BattleCD_FxRingVertex$CD:28A1 · 49 B · Battle engineOne ring vertex of object X at phase A, radius DP $47: !Battle_FxRotInX = sin(phase) / 2 * radius / 256 and !Battle_FxRotInY = the same with cos (BattleCD_HalfSinMul), !Battle_FxRotInZ = the... - verified
BattleCD_FxEllipseTriangle$CD:28D2 · 128 B · Battle engineThe object's triangle from its flat ring: for each vertex k (radius !Battle_FxObjUnkDA/DC/DE, phase !Battle_FxObjPhaseA/B/C), y = !Battle_FxObjCentreY + cos(phase) / 2 * radius / 256 * |sin(squash... - verified
BattleCD_FxOpFillObjTriangle$CD:2952 · 6 B · Battle engineOpcode $A1 (object): BattleCD_FillObjTriangle with A = the object (0 or 1): its triangle filled as it is, without the scaling of opcode $AE. - verified
BattleCD_FxOpRegToWork$CD:2958 · 9 B · Battle engineOpcode $8C (n, 0-3): the channel's !Battle_FxChanReg word to its work word n (!Battle_FxChanWork + 2n), through BattleCD_FxRegToWorkTable (JMP (T,X); a larger n would read the handler code as... - verified
BattleCD_FxRegToWorkTable$CD:2961 · 8 B · Battle engineBattleCD_FxOpRegToWork's handler per work word. - verified
BattleCD_FxRegToWork0$CD:2969 · 12 B · Battle engineWork word 0 (!Battle_FxChanWork) of channel Y = its !Battle_FxChanReg. - verified
BattleCD_FxRegToWork1$CD:2975 · 12 B · Battle engineWork word 1 (!Battle_FxChanWork+2) of channel Y = its !Battle_FxChanReg. - verified
BattleCD_FxRegToWork2$CD:2981 · 12 B · Battle engineWork word 2 (!Battle_FxChanWork+4) of channel Y = its !Battle_FxChanReg. - verified
BattleCD_FxRegToWork3$CD:298D · 12 B · Battle engineWork word 3 (!Battle_FxChanWork+6) of channel Y = its !Battle_FxChanReg. - verified
BattleCD_FxOpWorkToReg$CD:2999 · 9 B · Battle engineOpcode $8D (n, 0-3): the channel's work word n to its !Battle_FxChanReg, through BattleCD_FxWorkToRegTable (JMP (T,X)). - verified
BattleCD_FxWorkToRegTable$CD:29A2 · 8 B · Battle engineBattleCD_FxOpWorkToReg's handler per work word. - verified
BattleCD_FxWork0ToReg$CD:29AA · 12 B · Battle engine!Battle_FxChanReg of channel Y = its work word 0 (!Battle_FxChanWork). - verified
BattleCD_FxWork1ToReg$CD:29B6 · 12 B · Battle engine!Battle_FxChanReg of channel Y = its work word 1 (!Battle_FxChanWork+2). - verified
BattleCD_FxWork2ToReg$CD:29C2 · 12 B · Battle engine!Battle_FxChanReg of channel Y = its work word 2 (!Battle_FxChanWork+4). - verified
BattleCD_FxWork3ToReg$CD:29CE · 12 B · Battle engine!Battle_FxChanReg of channel Y = its work word 3 (!Battle_FxChanWork+6). - verified
BattleCD_FxOpFillWindow$CD:29DA · 9 B · Battle engineOpcode $88 (n): JSL BattleFx_FillWindow with A and X = n * 2: this frame's window table all empty (0), first pairs empty (1), second pairs empty (2) or first pairs full (3). - verified
BattleCD_FxOpPalAnim$CD:29E3 · 95 B · Battle engineOpcode $8E (seven bytes b0-b6): fills a palette animation record (FieldAnimB, 4-11, picked by b5 AND 7 through BattleCD_FxPalAnimRecs: 0 is record 11, 7 is record 4): .Unk0 = b0 AND $F0 (the... - verified
BattleCD_FxPalAnimRecs$CD:2A42 · 8 B · Battle engineOffset from palette animation record 4 (FieldAnimB[4]) of the record BattleCD_FxOpPalAnim fills, by b5 AND 7: records 11 down to 4. - verified
BattleCD_FxOpMisc$CD:2A4A · 7 B · Battle engineOpcode $80 (sub-op): jumps to BattleCD_FxMiscTable entry sub-op. - verified
BattleCD_FxMiscTable$CD:2A51 · 58 B · Battle engineThe sub-handlers of script opcode $80, by sub-op * 2. - verified
BattleCD_FxMiscIncEnemy9FF7$CD:2A8B · 12 B · Battle engineSub-op $1B: !Battler_Unk9FF7 + 1 for battler slots 3-10 (the eight enemies). - verified
BattleCD_FxMiscWhitenObjRows$CD:2A97 · 5 B · Battle engineSub-op $1C: JSL BattleFx_WhitenObjRows5To7 (OBJ palette rows 5-7, saved and live, white). - verified
BattleCD_FxMiscWhitenRows$CD:2A9C · 5 B · Battle engineSub-op $1A: JSL BattleFx_WhitenRows (background palette rows 2-7 and OBJ rows 1-3, saved and live, white). - verified
BattleCD_FxMiscIncGradRot$CD:2AA1 · 4 B · Battle engineSub-op $19: !BattleFx_GradRotRaw + 1 (what script opcode $F6 waits for). - verified
BattleCD_FxMiscMoveBgRows$CD:2AA5 · 5 B · Battle engineSub-op $18: JSL BattleFx_MoveBgRowsUp (background palette rows 2-4 and their animations moved to rows 5-7). - verified
BattleCD_FxMiscLoadBgRows$CD:2AAA · 5 B · Battle engineSub-op $17: JSL BattleFx_LoadBgRows2To4 (background palette rows 2-4 loaded again, their animations moved back). - verified
BattleCD_FxMarkRandomDrop$CD:2AAF · 23 B · Battle engineMarks a random entry of !BattleFx_WaveMoving: the RandomTable byte at !BattleFx_CountB (which counts up) picks the word, which gets + 1. - verified
BattleCD_FxMiscDropWaveBase$CD:2AC6 · 41 B · Battle engineSub-op $16: three random entries marked (BattleCD_FxMarkRandomDrop), then every one of the 212 !BattleFx_WaveBaseX words (4 bytes apart: the words BattleFx_WaveWindowA adds its wave to) whose... - verified
BattleCD_FxMiscClearWaveBase$CD:2AEF · 22 B · Battle engineSub-op $15: zeroes !BattleFx_WaveBaseX and the !BattleFx_WaveMoving marks after it ($7E:E500-$EB9F, !BattleCD_FxWaveClearBytes). - verified
BattleCD_FxMiscResetWave$CD:2B05 · 13 B · Battle engineSub-op $14: !BattleFx_CountA = !BattleFx_WaveRadius and !BattleFx_CountB = 0 (one word: the wave windows' radius r1 = !BattleFx_WaveRadius - !BattleFx_CountA is then 0), and !Battle_FrameCount =... - verified
BattleCD_FxMiscClampCalcY$CD:2B12 · 21 B · Battle engineSub-op $12: the y of !Battle_ActCalcResult entry 0 clamped to !BattleCD_FxCalcYMin-!BattleCD_ScreenYMax. - verified
BattleCD_FxMiscAnimFrom99D3$CD:2B27 · 30 B · Battle engineSub-op $11: !Battle_Unk99D2 bit 7 set, and palette animation records 10 and 11 (FieldAnimB) set to work on colours !Battle_Unk99D3 up to 127 (.Unk1 = !Battle_Unk99D3, .Unk2 = !BattleCD_BgColours... - verified
BattleCD_FxMiscBlackBands$CD:2B45 · 23 B · Battle engineSub-op $10: the value byte of each of the 32 entries of !Battle_FxBandsBlue, !Battle_FxBandsGreen and !Battle_FxBandsRed = !BattleCD_ColDataBlack (all three channels, intensity 0); the line counts... - verified
BattleCD_FxMiscClearExitAttr$CD:2B5C · 8 B · Battle engineSub-op $0F: !Battler_ActAttr of the battler in !Battle_ExitFxSlot (the enemy BattleCD_EnemyDissolve takes off) = 0. - verified
BattleCD_FxMiscAddLineOffsets$CD:2B64 · 5 B · Battle engineSub-op $0D: JSL BattleFx_AddLineOffsets (the bytes at $7E:0A00, from sub-op $0C for one, added to lines 48-175 of this frame's window table), with C = 0 for its first ADC (the dispatcher's ASL). - verified
BattleCD_FxMiscSineOffsets$CD:2B69 · 63 B · Battle engineSub-op $0C: fills the 256 bytes of !Battle_WaveOffsets ($7E:0A00) with a sine of amplitude !BattleCD_FxSineAmp: byte n = !BattleRom_AbsSine entry (4n AND $FF) x 12 / 256, negated for entries... - verified
BattleCD_FxMiscBobSub$CD:2BA8 · 42 B · Battle engineSub-op $0B: the channel's !BattleFx_BounceOut - the signed byte !BattleRom_FxBobSteps entry !Battle_FxBobStep (the channel's), which then counts up (wrapping after 256 runs). - verified
BattleCD_FxMiscBobAdd$CD:2BD2 · 42 B · Battle engineSub-op $0A: as sub-op $0B (BattleCD_FxMiscBobSub), but the step is added to the channel's !BattleFx_BounceOut. - verified
BattleCD_FxMiscSprites$CD:2BFC · 131 B · Battle engineSub-op $09: puts 16 sprites from !Battle_FxSprTemplate into OAM entries 4-19 of the shadow (!Oam_LowTable), after moving entries 4-111 down to 20-127 (MVP, low table and high-table bytes; the... - verified
BattleCD_FxMiscClearPhases$CD:2C7F · 12 B · Battle engineSub-op $08: !Battle_FxObjPhaseA, PhaseB and PhaseC of both objects = 0 (one word each). - verified
BattleCD_FxMiscNarrowTri$CD:2C8B · 13 B · Battle engineSub-op $07: object 0's triangle: first point's y + 2, second point's y - 2 (the side between them shrinks by 4). - verified
BattleCD_FxMiscSetTri$CD:2C98 · 27 B · Battle engineSub-op $06: object 0's triangle = (0, 1), (0, !BattleCD_FxTriLowY), (!BattleCD_FxTriTipX, !BattleCD_FxTriTipY): a wedge from the left edge of the screen. - verified
BattleCD_FxMiscRotateTri$CD:2CB3 · 41 B · Battle engineSub-op $05: object 0's points move round one place: the first point to the second, the second to the third, the third to the first. - verified
BattleCD_FxMiscClearWaveTable$CD:2CDC · 25 B · Battle engineSub-op $04: zeroes !BattleFx_WinTableBytes bytes from !Battle_FxWaveTable ($7E:C15D-$C4DC, which window table 0 overlaps from $C161) and !Battle_WavePhase. - verified
BattleCD_FxMiscCentreLine$CD:2CF5 · 23 B · Battle engineSub-op $02: object 0's triangle = (!BattleCD_FxScreenMidX, 0) and twice (!BattleCD_FxScreenMidX, !BattleCD_ScreenYMax): a vertical line down the middle (sub-op $03 then widens its base). - verified
BattleCD_FxMiscWidenTri$CD:2D0C · 19 B · Battle engineSub-op $03: object 0's triangle: second point's x + 2, third point's x - 2 (no carry or limit). - verified
BattleCD_FxMiscRotateBands$CD:2D1F · 26 B · Battle engineSub-op $01: the value bytes of the 96 band entries (!Battle_FxBandsBlue, Green and Red one after the other, 4 bytes apart) move one entry back, the first going to the last. - verified
BattleCD_FxMiscTallBands$CD:2D39 · 11 B · Battle engineSub-op $13: !Battle_Unk5D9A = 1 and the colour bands built with !BattleCD_FxBandLinesTall lines each. - verified
BattleCD_FxMiscBandsStep$CD:2D44 · 6 B · Battle engine - verified
BattleCD_FxMiscBands$CD:2D4A · 129 B · Battle engine - verified
BattleCD_FxOpSetPeriod$CD:2DCB · 11 B · Battle engineOpcode $81 (n): the channel's period and countdown (its block's bytes +6 and +7, see BattleCD_StartFxChannel) = n: the script then steps every n frames, the next step n frames on. - verified
BattleCD_FxOpScrollStep$CD:2DD6 · 20 B · Battle engineOpcode $82 (b): moves the channel's layer-3 scroll additions by d = (b AND $1F) + 1 in the direction b / 32 (0-7), through BattleCD_FxScrollDirTable (JMP (T,X)); "X" is the channel's... - verified
BattleCD_FxScrollDirTable$CD:2DEA · 16 B · Battle engineBattleCD_FxOpScrollStep's helpers, by direction (b / 32) * 2. - verified
BattleCD_FxScrollAddYSubX$CD:2DFA · 25 B · Battle engineThe channel's !BattleFx_BounceOut + the word at DP $45 and its !Battle_FxScrollAddX - it (direction 7 of script opcode $82). - verified
BattleCD_FxAddScrollY$CD:2E13 · 16 B · Battle engineThe channel's !BattleFx_BounceOut + the word at DP $45 (direction 6 of script opcode $82; also called by script opcodes $C8 and $D7). - verified
BattleCD_FxScrollAddYAddX$CD:2E23 · 25 B · Battle engineThe channel's !BattleFx_BounceOut and its !Battle_FxScrollAddX + the word at DP $45 (direction 5 of script opcode $82). - verified
BattleCD_FxSubScrollX$CD:2E3C · 17 B · Battle engineThe channel's !Battle_FxScrollAddX - the word at DP $45 (direction 4 of script opcode $82; also script opcode $D7's tail jump). - verified
BattleCD_FxAddScrollX$CD:2E4D · 17 B · Battle engineThe channel's !Battle_FxScrollAddX + the word at DP $45 (direction 3 of script opcode $82; also script opcode $D7's tail jump). - verified
BattleCD_FxScrollSubYSubX$CD:2E5E · 26 B · Battle engineThe channel's !BattleFx_BounceOut and its !Battle_FxScrollAddX - the word at DP $45 (direction 2 of script opcode $82). - verified
BattleCD_FxSubScrollY$CD:2E78 · 17 B · Battle engineThe channel's !BattleFx_BounceOut - the word at DP $45 (direction 1 of script opcode $82; also called by script opcode $D7). - verified
BattleCD_FxScrollSubYAddX$CD:2E89 · 25 B · Battle engineThe channel's !Battle_FxScrollAddX + the word at DP $45 and its !BattleFx_BounceOut - it (direction 0 of script opcode $82). - verified
BattleCD_FxOpLoopStart$CD:2EA2 · 19 B · Battle engineOpcode $83 (n): starts a loop of the channel: its !Battle_FxLoopCount = n + 1 and !Battle_FxLoopPtr = DP $40 (this operand), so that opcode $84 runs the bytes after the operand n + 1 times (n =... - verified
BattleCD_FxOpLoopEnd$CD:2EB5 · 19 B · Battle engineOpcode $84 (no operand): the channel's !Battle_FxLoopCount - 1; while it is not 0, DP $40 = !Battle_FxLoopPtr (the next byte read is the loop's first); at 0 the script goes on (DP $40 - 1). - verified
BattleCD_FxOpPageLoopStart$CD:2EC8 · 22 B · Battle engineOpcode $85 (n): as opcode $83 (BattleCD_FxOpLoopStart), and the channel's tile page base (its block's byte +8, added to the script's page bytes) = 0. - verified
BattleCD_FxOpPageLoopEnd$CD:2EDE · 25 B · Battle engineOpcode $86 (no operand): as opcode $84 (BattleCD_FxOpLoopEnd), and the channel's tile page base + 1 each time round, 0 when the loop ends: the loop's page bytes show the next pages each time. - verified
BattleCD_FxOpMosaic$CD:2EF7 · 87 B · Battle engineOpcode $90 (b): the MOSAIC byte of channel 6's line data (!Battle_HdmaMode+1, MOSAIC probably): its layer bits (0-3) = b's high nibble, its size (bits 4-7) the old size + (b AND $0F), at most... - verified
BattleCD_FxOpCall$CD:2F4E · 19 B · Battle engineOpcode $91 (address word): a call in the script's bank: the channel's !Battle_FxReturnPtr = DP $40 + 1 (the operand's last byte), DP $40 = the address - 1 (the next byte read is at the address). - verified
BattleCD_FxOpReturn$CD:2F61 · 13 B · Battle engineOpcode $92 (no operand): DP $40 = the channel's !Battle_FxReturnPtr: the script goes on after the last opcode $91. - verified
BattleCD_FxOpColourMath$CD:2F6E · 29 B · Battle engineOpcode $93 (TS, CGWSEL, CGADSUB): the line data's TS byte (!Battle_HdmaScreens+1) = the first operand, CGWSEL (!Battle_HdmaColour) the second, CGADSUB (!Battle_HdmaColour+1) the third AND... - verified
BattleCD_FxOpW12Sel$CD:2F8B · 32 B · Battle engineOpcode $94 (b): W12SEL (!Battle_WinRegs) = b, and !Battle_UnkC155 and !Battle_UnkC157 both = !BattleCD_FxEdgesNone ($00FF) when b bit 3 is set, else !BattleCD_FxEdgesAll ($FF00). - verified
BattleCD_FxOpW34Sel$CD:2FAB · 6 B · Battle engineOpcode $95 (b): W34SEL (!Battle_WinRegs+1) = b. - verified
BattleCD_FxOpWObjSel$CD:2FB1 · 6 B · Battle engineOpcode $96 (b): WOBJSEL (!Battle_WinRegs+2) = b. - verified
BattleCD_FxOpDrawShape$CD:2FB7 · 5 B · Battle engineOpcode $8B (slot): BattleCD_FxDrawShape with A = the slot (tail jump). - verified
BattleCD_FxOpStepShape$CD:2FBC · 49 B · Battle engineOpcode $89 (slot, dx, dy, dsize): steps shape slot's values in !Battle_FxValues (see BattleCD_FxDrawShape): the centre x (entry slot + 2) + dx, the centre y (slot + 4) + dy, at most... - verified
BattleCD_FxOpSetShape$CD:2FED · 42 B · Battle engineOpcode $8A (b, x, y, size): shape slot b AND 1: its kind (!Battle_FxObjUnkD1 entry slot, 0-5 for BattleCD_FxShapeTable) = b / 16, and its centre x, centre y and size in !Battle_FxValues (entries...
Bank $CD · $CD:3000–$3FFF
$CD:3000
Verified · 58
- verified
BattleCD_FxOpSubWinScreens$CD:3017 · 9 B · Battle engineOpcode $A0 (b): the line data's TSW byte (!Battle_HdmaScreens+3) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpMainWinScreens$CD:3020 · 9 B · Battle engineOpcode $9F (b): the line data's TMW byte (!Battle_HdmaScreens+2) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpSubScreens$CD:3029 · 9 B · Battle engineOpcode $9E (b): the line data's TS byte (!Battle_HdmaScreens+1) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpMainScreens$CD:3032 · 9 B · Battle engineOpcode $9D (b): the line data's TM byte (!Battle_HdmaScreens) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpColData$CD:303B · 72 B · Battle engineOpcode $9C (value, step): the COLDATA value !Battle_WinRegs+5. - verified
BattleCD_FxOpCgAddSub$CD:3083 · 9 B · Battle engineOpcode $9B (b): the line data's CGADSUB byte (!Battle_HdmaColour+1) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpCgWSel$CD:308C · 6 B · Battle engineOpcode $9A (b): the line data's CGWSEL byte (!Battle_HdmaColour) = b. - verified
BattleCD_FxOpWBgLog$CD:3092 · 38 B · Battle engineOpcode $98 (b): WBGLOG (!Battle_WinRegs+3) = b AND $3F; before it, with b bit 7 set !Battle_UnkC157 = !BattleCD_FxEdgesFF and !Battle_UnkC155 = !BattleCD_FxEdgesAll; else with bits 4-5 both set... - verified
BattleCD_FxOpWObjLog$CD:30B8 · 6 B · Battle engineOpcode $99 (b): WOBJLOG (!Battle_WinRegs+4) = b. - verified
BattleCD_FxOpHalfPlane$CD:30BE · 118 B · Battle engineOpcode $97 (angle, step, flags): one window of this frame's window table becomes the half of the screen on one side of a line through the centre (BattleCE_DrawHalfPlane). - verified
BattleCD_FxLineDeltas$CD:3134 · 85 B · Battle engineThe deltas of the line from !BattleCE_LineP1 to !BattleCE_LineP2 for BattleCE_DrawHalfPlane: !BattleCE_LineDirX = $FF (P2 left of P1), 0 or 1 (right), !BattleCE_LineAbsDX = |x2 - x1|, and the same... - verified
BattleCD_FxDrawShape$CD:3189 · 21 B · Battle engineDraws shape slot A: !Battle_FxShapeSlot = A, the half widths of a circle of its size (BattleCD_FxCircleHalfWidths); with size AND $7F = 0 nothing more. - verified
BattleCD_FxShapeTable$CD:319E · 12 B · Battle engineBattleCD_FxDrawShape's handler of each shape kind, by kind * 2. - verified
BattleCD_FxCircleHalfWidths$CD:31AA · 84 B · Battle engineWith r = the size of shape slot !Battle_FxShapeSlot AND $7F: r = 0 returns C=0. - verified
BattleCD_FxBuildCircle$CD:31FE · 117 B · Battle engineBuilds a circle centred on x = the slot's centre x (!Battle_FxValues entry slot + 2) into !Battle_FxWinLines from the half widths (BattleCD_FxCircleHalfWidths, which aimed WMADD at the middle... - verified
BattleCD_FxBuildDome$CD:3273 · 196 B · Battle engineAs BattleCD_FxBuildCircle, but only every other line (the first, the third, ...: DP $4F counts them) is also written through WMDATA: the upper half is a half circle, the lower half one half as tall. - verified
BattleCD_FxBuildWide$CD:3337 · 126 B · Battle engineAs BattleCD_FxBuildCircle with every half width doubled (DP $51): an ellipse twice as wide as it is tall. - verified
BattleCD_FxShapeCircle$CD:33B5 · 6 B · Battle engineShape kind 0: a circle (BattleCD_FxBuildCircle, BattleCD_FxCopyShape). - verified
BattleCD_FxShapeDome$CD:33BB · 6 B · Battle engineShape kind 1: a circle with its lower half squashed to half height (BattleCD_FxBuildDome, BattleCD_FxCopyShapeDome). - verified
BattleCD_FxShapeHanging$CD:33C1 · 6 B · Battle engineShape kind 2: kind 1's shape hanging from the top of the screen (BattleCD_FxBuildDome, BattleCD_FxCopyShapeHanging). - verified
BattleCD_FxShapeTall$CD:33C7 · 6 B · Battle engineShape kind 3: an ellipse twice as tall as wide (BattleCD_FxBuildCircle, BattleCD_FxCopyShapeTall). - verified
BattleCD_FxShapeWide$CD:33CD · 6 B · Battle engineShape kind 4: an ellipse twice as wide as tall (BattleCD_FxBuildWide, BattleCD_FxCopyShape). - verified
BattleCD_FxShapeBig$CD:33D3 · 6 B · Battle engineShape kind 5: a circle of twice the size (BattleCD_FxBuildWide, then each line twice: BattleCD_FxCopyShapeTall). - verified
BattleCD_FxCopyShapeTall$CD:33D9 · 164 B · Battle engineCopies the 2r words of !Battle_FxWinLines from word $80 - r (r = the slot's size byte, bit 7 included) into the slot's window of this frame's table, each word to two lines, from line y - 2r (y =... - verified
BattleCD_FxCopyShapeHanging$CD:347D · 176 B · Battle engineAs BattleCD_FxCopyShapeDome, then lines 0 to y - 1 of the slot's window (y = its centre y) all get the middle line's pair (!Battle_FxWinLinesMid): a column from the top of the screen down to the... - verified
BattleCD_FxCopyShapeDome$CD:352D · 120 B · Battle engineCopies the words of !Battle_FxWinLines from word $80 - r to $80 + r / 2 (r = the slot's size byte, bit 7 included; the full upper half and the squashed lower half BattleCD_FxBuildDome wrote) into... - verified
BattleCD_FxCopyShape$CD:35A5 · 113 B · Battle engineCopies the 2r words of !Battle_FxWinLines from word $80 - r (r = the size byte of shape slot !Battle_FxShapeSlot, bit 7 included) into the slot's window of this frame's table from line y - r (y =... - verified
BattleCD_FxCopyLines$CD:3616 · 65 B · Battle engineCopies n = (DP $4B - Y) / 2 words of !Battle_FxWinLines from offset Y on into this frame's window table (!BattleFx_WinTable1 when bit 0 of !Battle_FrameCount is set, else !BattleFx_WinTable0) from... - verified
BattleCD_FillObjTriangle$CD:3657 · 37 B · Battle engineFills the triangle of object A (0 or 1) as it is in !Battle_FxTriX0 on (no scaling): !BattleFx_QuadSlot = A, DP $20 = 0, the three points into DP $12-$17, then falls into BattleCD_FillTriangle. - verified
BattleCD_FillTriangle$CD:367C · 558 B · Battle engineFills the triangle of the points in DP $12-$17 (x, y each) into the edge pair !BattleFx_QuadSlot picks of this frame's window table, with DB=$00 (PHB, TDC / PHA / PLB, then PLB). - verified
BattleCD_WinLineBases$CD:38AA · 8 B · Battle engineBattleCD_AimWinLine's and BattleCD_AimWinTopFill's base addresses, by (frame bit 0 * 2 + !BattleFx_QuadSlot bit 0) * 2: window table 0's first and second pair, then table 1's. - verified
BattleCD_AimWinLineL$CD:38B2 · 4 B · Battle engineJSL entry of BattleCD_AimWinLine (BattleFx_RasterQuad's). - verified
BattleCD_AimWinLine$CD:38B6 · 47 B · Battle engineAims the WRAM port at line A of this frame's window table, at the edge pair !BattleFx_QuadSlot bit 0 picks: WMADD = $7E:(BattleCD_WinLineBases entry + 4A). - verified
BattleCD_EdgeSlope$CD:38E5 · 63 B · Battle engineY = (DP $0B - DP $0C) * 256 / DP $0D, signed (the hardware divides the size of the difference; a negative one negates the quotient): with x's and a line count, an edge's x step per line in 8.8... - verified
BattleCD_FillHangingTriangle$CD:3924 · 492 B · Battle engineFills a right triangle of object A (0 or 1) hanging from the top of the screen: !BattleFx_QuadSlot = A, DP $20 = 0, the object's first two points into DP $12-$15 and its third point replaced by... - verified
BattleCD_AimWinTopFill$CD:3B10 · 79 B · Battle engineAims the WRAM port at line 0 of this frame's window table, at the pair !BattleFx_QuadSlot bit 0 picks (BattleCD_WinLineBases), then writes the pair (X's high byte, Y's high byte) on A lines... - verified
BattleCD_PlayPendingSfx$CD:3B5F · 18 B · Battle enginePlays the sound a script opcode left pending: when !Battle_SfxPending is set, clears it and sends !Battle_SfxPendingId with X = !Battle_SfxPendingArg through BattleCD_ApuCmd18 (tail jump). - verified
BattleCD_ApuCmd18$CD:3B71 · 17 B · Battle engineSends APU command !Sfx_CmdUnk18 (Audio_ProcessEntry) with !Sfx_Param1 = A and !Sfx_Param2 = X's low byte: a sound, probably (the callers pass the dissolve's and the wipe's sounds and the script... - verified
BattleCD_WaitScanline$CD:3B82 · 41 B · Battle engineBusy-waits for scanline A: past the vertical blank (HVBJOY bit 7), then into an H-blank and out of it; then, skipping H-blanks, latches the counters (SLHV, STAT78 resets the read order) and reads... - verified
BattleCD_Div16$CD:3BAB · 41 B · Battle engine16-bit unsigned division by shift and subtract: !BattleCD_MathOut = !BattleCD_MathA / !BattleCD_MathB, !BattleCD_MathOutHi the remainder. - verified
BattleCD_Mul8x16$CD:3BD4 · 41 B · Battle engine8 x 16-bit unsigned multiplication on the CPU's multiplier: the 24-bit DP $27-$29 = DP $23 (a byte) * the word at DP $25, as $23 * $25 plus $23 * $26 shifted left 8. - verified
BattleCD_CosMul$CD:3BFD · 3 B · Battle engineA = Y * cos(A) / 256: adds a quarter turn ($40) and falls into BattleCD_SinMul ($3C00), which gives A = Y * sin(A) / 256 with the sine from !BattleRom_AbsSine (255 for 1; table index bit 7 = the... - verified
BattleCD_SinMul$CD:3C00 · 85 B · Battle engine - verified
BattleCD_CosMulStart$CD:3C55 · 3 B · Battle engineThe first half of BattleCD_CosMul / BattleCD_SinMul for BattleCD_Rotate3d: adds a quarter turn and falls into BattleCD_SinMulStart ($3C58), which starts |sin(A)| * |Y| on the multiplier and... - verified
BattleCD_SinMulStart$CD:3C58 · 55 B · Battle engine - verified
BattleCD_Rotate3d$CD:3C8F · 257 B · Battle engineRotates the point !Battle_FxRotInX/Y/Z (signed bytes) into !Battle_FxRotOutX/Y/Z: first by the angle in DP $4B about the y axis (x' = cos*x + sin*z, z' = cos*z - sin*x), then by DP $49 about the x... - verified
BattleCD_HalfSinMul$CD:3D90 · 51 B · Battle engineA = sin(A) / 2 * DP $47 / 256: the |sin| entry halved (LSR) times the unsigned byte at DP $47 on the multiplier, the high byte, negated for angles $80-$FF. - verified
BattleCD_HalfSinMul2$CD:3DC3 · 94 B · Battle engineAs BattleCD_HalfSinMul, then the result's magnitude times |sin(DP $45)| (DP $49) / 256: A = sin(A) / 2 * DP $47 / 256 * |sin(DP $45)| / 256, negated for angles A of $80-$FF (the sign of sin(DP... - verified
BattleCD_Mul8Unused$CD:3E21 · 26 B · Battle engineDP $49 = DP $45 * DP $47 (8 x 8-bit, on the multiplier). - verified
BattleCD_WaitFrames$CD:3E3B · 9 B · Battle engineWaits A frames: BattleCD_WaitFrameRefresh A times (A = 0 waits 256). - verified
BattleCD_PauseWait$CD:3E44 · 49 B · Battle engineHolds the battle while !Battle_Paused is set: APU command !BattleCD_ApuCmdPause with argument !BattleCD_ApuCmdPause (and !Field_FadeBusy set to the same value), then frame by frame... - verified
BattleCD_WaitFrameRefresh$CD:3E75 · 8 B · Battle engineOne frame (BattleCD_WaitFrame), then the battle menu's refresh (BankC1_VecRefreshMenu: BattleMenu_RefreshIfDirtyL). - verified
BattleCD_WaitFrame$CD:3E7D · 17 B · Battle engineWaits for the next frame: !BattleFx_FrameWait + 1, then BattleCD_PauseWait until it is back to 0 (BattleFx_Nmi, $D1:E77C, clears it at the end of its work: TDC, STA.l $7E:CA20; BattleFx_Init also... - verified
BattleCD_DmaToVram$CD:3E8E · 38 B · Battle engineDMA channel 7 from A:X to VRAM word address Y, DP $45 bytes (mode 1: VMDATAL/VMDATAH), with DB = $00 inside and put back. - verified
BattleCD_RunQueuedDma$CD:3EB4 · 26 B · Battle engineThe NMI's half of BattleCD_QueueVramDma: when !Battle_DmaQueueReq is set, sends the queued piece (!Battle_DmaQueueSrc / Bank to !Battle_DmaQueueVram, !Battle_DmaQueuePiece bytes) through... - verified
BattleCD_QueueVramDmaL$CD:3ECE · 4 B · Battle engineBattleCD_QueueVramDma for long callers (bank $D1), RTL. - verified
BattleCD_QueueVramDma$CD:3ED2 · 204 B · Battle engineUploads A:X to VRAM word address Y, DP $53 bytes, through the NMI (BattleCD_RunQueuedDma), in pieces of at most $1000 bytes while !Battle_CgramPending is set and $400 bytes else (re-checked before... - verified
BattleCD_OldBuildLeftovers$CD:3F9E · 98 B · Battle engineNo code reaches these bytes.
Bank $CD · $CD:4000–$4FFF
$CD:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:5000–$5FFF
$CD:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:6000–$6FFF
$CD:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:7000–$7FFF
$CD:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:8000–$8FFF
$CD:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:9000–$9FFF
$CD:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:A000–$AFFF
$CD:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:B000–$BFFF
$CD:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:C000–$CFFF
$CD:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:D000–$DFFF
$CD:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:E000–$EFFF
$CD:E000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:F000–$FFFF
$CD:F000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:0000–$0FFF
$CE:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:1000–$1FFF
$CE:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:2000–$2FFF
$CE:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:3000–$3FFF
$CE:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:4000–$4FFF
$CE:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:5000–$5FFF
$CE:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:6000–$6FFF
$CE:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:7000–$7FFF
$CE:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:8000–$8FFF
$CE:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:9000–$9FFF
$CE:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:A000–$AFFF
$CE:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:B000–$BFFF
$CE:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:C000–$CFFF
$CE:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:D000–$DFFF
$CE:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:E000–$EFFF
$CE:E000
Verified · 9
- verified
BattleCE_CopyWindowEdges$CE:E000 · 142 B · Battle engineCopies one window's edge pair of 216 lines from the window table not written this frame into the one that is: from !BattleFx_WinTable0 into !BattleFx_WinTable1 when bit 0 of !Battle_FrameCount is... - verified
BattleCE_WaveTable$CE:E08E · 256 B · Battle engine128 signed words: a coarse wave of amplitude 2 (0, 1, 2, 1, 0, -1, -2, -1, each held for several words) with a period of 64 words, written twice so that any 64-word window of the first half reads... - verified
BattleCE_UnkE18E$CE:E18E · 57 B · Battle engineThe layer-2 wave, a frame's step (the name is the stub's: matched bank-$CD code calls it so). - verified
BattleCE_CopyWordsToLines$CE:E1C7 · 1,537 B · Battle engine256 unrolled pairs LDA (2k),Y / STA (4k),X for k = 255 down to 0, then RTS. - verified
BattleCE_RunCopyWords$CE:E7C8 · 7 B · Battle engineJSL entry for BattleCE_CopyWordsToLines: JSR to a JMP (!BattleCE_CopyEntry), so that the copy's RTS comes back here for the RTL. - verified
BattleCE_CalcAngle$CE:E7CF · 182 B · Battle engineThe direction from the second point to the first, 256 per turn, as Battle_CalcAngle (bank $C1) works it out: the signed differences dx = AX - BX and dy = AY - BY, the base angle from... - verified
BattleCE_PresetWinEdges$CE:E885 · 505 B · Battle engineThe first step of BattleCE_DrawHalfPlane: sets the edge the line will not draw, on all 224 lines of this frame's window table (WinTable1 when bit 0 of !Battle_FrameCount is set), for the window... - verified
BattleCE_DrawHalfPlane$CE:EA7E · 1,008 B · Battle engineLayer-effect opcode $97's drawing: one window of this frame's window table (WinTable1 when bit 0 of !Battle_FrameCount is set, else WinTable0; the two halves of the code are the same but for the... - verified
BattleCE_UnkEE6E$CE:EE6E · 163 B · Battle engineLoads HDMA set A (the name is the stub's: matched bank-$CD and bank-$D1 code calls it so): the first !BattleCE_HdmaHeadBytes (30) bytes, ten entries, of each of the nine indirect HDMA tables at...
Bank $CE · $CE:F000–$FFFF
$CE:F000
Verified · 1
- verified
BattleCE_UnkF066$CE:F066 · 128 B · Battle engineParks sprites 4-127 (the name is the stub's: matched bank-$CD code calls it so): their y in BattleOam = !BattleOam_OffscreenY, and the high-table bytes 1-31 (!BattleOam_HighTable+1 on) =...
Bank $CF · $CF:0000–$0FFF
$CF:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:1000–$1FFF
$CF:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:2000–$2FFF
$CF:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:3000–$3FFF
$CF:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:4000–$4FFF
$CF:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:5000–$5FFF
$CF:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:6000–$6FFF
$CF:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:7000–$7FFF
$CF:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:8000–$8FFF
$CF:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:9000–$9FFF
$CF:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:A000–$AFFF
$CF:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:B000–$BFFF
$CF:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:C000–$CFFF
$CF:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:D000–$DFFF
$CF:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:E000–$EFFF
$CF:E000
Verified · 19
- verified
BattleCF_VblankUploads$CF:E300 · 650 B · Battle engineCopies the battle's buffers to the PPU by DMA on channel 7, which needs vertical blank or forced blank: hence "vblank", inferred (the caller, BattleCD_NmiMain at $CD:08B4, is the NMI's work). - verified
BattleCF_FrameUpdate$CF:E58A · 503 B · Battle engineThe battle's once-a-frame work behind the vector $C1:000C. - verified
BattleCF_BounceHitNumbers$CF:E781 · 86 B · Battle engineBounces the hit numbers BattleAct_OpShowHitNumbers built: while !Battle_HitNumActive is set, takes step !Battle_HitNumStep of the bounce table for each battler slot (!BattleRom_HitNumBounceAlt for... - verified
BattleCF_StepFxColourCycle$CF:E7D7 · 99 B · Battle engineThe status colour cycle (Battle_FxColourCycle turns it on): for PC slots 2, 1, 0 whose !Battler_FxCycleOn is set, unless !Battle_UnkA101 is set or the PC uses !Battle_SpecialPalette, copies the... - verified
BattleCF_BuildSprites$CF:E83A · 242 B · Battle engineBuilds the battle's sprites, front to back: 1. - verified
BattleCF_DrawPosHistory$CF:E92C · 112 B · Battle engineDraws the four position-history records BattleCF_RecordPosHistory keeps for the battler at sprite index X: every !Battler_PosHistUnkAB7D frames (!Battler_PosHistUnkAB88 counts them down) it draws... - verified
BattleCF_DrawPosHistRecord$CF:E99C · 238 B · Battle engineDraws one copy of the battler !BattleSpr_Index at the history position in !BattleSpr_HistX/Y (low bytes) and !BattleSpr_HistXHi/YHi (only their sign is used: negative = the high byte is $FF): its... - verified
BattleCF_DrawUnkA5D8Sprite$CF:EA8A · 59 B · Battle engineFor the battler at sprite index X whose !Battler_UnkA5D8 is non-zero (opcodes $D0/$D1 set and clear it) and whose !Battler_Unk9FF7 is 0: puts one sprite, tile !Battle_UnkA5D8Tile, at its screen... - verified
BattleCF_DrawBattler$CF:EAC5 · 207 B · Battle enginePlaces the sprites of the battler !BattleSpr_Index whose tile words BattleCF_CopySprTiles has just put in OAM: its position is !Battler_ScreenX/Y plus the signed display offsets... - verified
BattleCF_CopySprTiles$CF:EB94 · 228 B · Battle engineCopies the tile/attribute words (bytes 2-3 of each 4-byte sprite record) of four sprites per group from the list at X to the OAM entries at Y, !BattleSpr_Groups groups: it returns after a group... - verified
BattleCF_StepPathWalks$CF:EC78 · 74 B · Battle engineSteps the path walks BattleAct_PathToPoint starts: for each battler slot whose !Battler_PathWalking is set and whose step is not done (!Battler_PathStepFrame not negative), adds entry... - verified
BattleCF_FollowObjects$CF:ECC2 · 86 B · Battle engineMoves the action objects that follow something (!Battle_ActObjFollow, set by the action opcodes): for object threads 7 down to 0, a value with bit 7 clear and !Battle_ActFollowObj clear is a... - verified
BattleCF_RecordPosHistory$CF:ED18 · 160 B · Battle engineKeeps the position history of opcodes $A4/$A5: for battler slots 10 down to 0 whose !Battler_PosHistOn is set, every !Battler_PosHistDelay frames (!Battler_PosHistTimer counts them) shifts records... - verified
BattleCF_DrawFrontLayer$CF:EDB8 · 63 B · Battle engineCalled by BattleCF_BuildSprites just before a battler's own sprites, so what it adds shows in front of the battler. - verified
BattleCF_DrawBackObjects$CF:EDF7 · 53 B · Battle engineCalled by BattleCF_BuildSprites just after a battler's own sprites, so these show behind it: while an action runs and !Battle_ActUnkA3D1 is clear, draws every action object linked to this battler... - verified
BattleCF_DrawFxOverlay$CF:EE2C · 115 B · Battle engineThe status overlay (Battle_FxOverlay* turn it on): for the battler !BattleSpr_Index with !Battler_FxOverlayOn set, steps its frame (0-3, every !Battler_FxOverlayPeriod frames... - verified
BattleCF_DrawHitNumbers$CF:EE9F · 76 B · Battle enginePuts the four hit-number sprites (Battle_HitNumSprite) of the battler !BattleSpr_Index into OAM, when !Battler_HitNumShown is set, and stores its !Battle_HitNumHigh byte as the whole OAM... - verified
BattleCF_DrawActObj$CF:EEEB · 196 B · Battle engineDraws one action object: the thread in bits 0-2 of !Battle_ActObjLinks entry X. - verified
BattleCF_RunMovers$CF:EFAF · 111 B · Battle engineWhile an action runs: for battler slots 10 down to 0 with !Battle_ActorMoving set, counts !Battle_ActorMoveTimer down and at 0 reloads it from !Battle_ActorMoveDelay and runs mover...
Bank $CF · $CF:F000–$FFFF
$CF:F000
Verified · 39
- verified
BattleCF_MoverTable$CF:F01E · 16 B · Battle engineThe battlers' movers by !Battle_ActorMoveKind (BattleCF_RunMovers). - verified
BattleCF_ObjMoverTable$CF:F02E · 16 B · Battle engineThe object threads' movers by their !Battle_ActorMoveKind entry. - verified
BattleCF_MoveStraight$CF:F03E · 73 B · Battle engineMover kind 0: unless the battler's !Battler_MoveDone is set, adds !Battle_ActorStepX/Y to !Battle_ActorOfsX/Y (8.8) and puts the battler at !Battle_ActorFromX/Y + the offsets' high bytes; counts... - verified
BattleCF_MoveArc$CF:F087 · 269 B · Battle engineMover kind 1, the arc moves (see the arc notes at !Battle_ActorArcSteps in ram_battle.inc): steps the offset like BattleCF_MoveStraight, then !Battle_ActorMoveSpeed times steps the arc's speed and... - verified
BattleCF_MoveHeading$CF:F194 · 100 B · Battle engineMover kind 2, the heading moves: ends the move (!Battler_MoveDone) when the battler's 16-pixel cell (BattleCF_PixelToCell of its screen y, then x) is in row 0 or !Battle_CellRowBottom or column 0... - verified
BattleCF_MoveCircle$CF:F1F8 · 69 B · Battle engineMover kind 3: unless done, adds !Battle_ActorCircleStep to !Battle_ActorCircleAngle and writes radius * sin(angle) to !Battler_UnkA4AF and radius * cos(angle) to !Battler_UnkA4A4 (the display... - verified
BattleCF_MoveKind4$CF:F23D · 279 B · Battle engineMover kind 4 (opcode $D2's move, a jump that lands on the point, probably; see BattleAct_OpMoveKind4ToCalc). - verified
BattleCF_MoveEllipse$CF:F354 · 75 B · Battle engineMover kind 5: BattleCF_MoveCircle with half the radius for the sine (y) part: !Battler_UnkA4AF = radius / 2 * sin(angle), !Battler_UnkA4A4 = radius * cos(angle). - verified
BattleCF_MoveShake$CF:F39F · 27 B · Battle engineMover kind 6 (opcode $D8): BattleCF_ShakeStep, then, for battler slot !Battle_PartMainSlot (3) with !Battle_UnkA113 set, copies its display offsets !Battler_UnkA4A4/A4AF to slot... - verified
BattleCF_ShakeStep$CF:F3BA · 75 B · Battle engineThe shake: counts !Battler_ShakeFrames down; at 0 zeroes the display offsets and !Battle_ActorMoving (the move ends without the done flag). - verified
BattleCF_MoveCurve$CF:F405 · 173 B · Battle engineMover kind 7, the curving move: when the battler is within 16 pixels of !Battle_ActorToX/Y in both axes (BattleCF_PointsNear) counts !Battler_MoveDone up and returns. - verified
BattleCF_ObjMoveStraight$CF:F4B2 · 81 B · Battle engineObject kind 0: BattleCF_MoveStraight for an object: the offset steps, !Battle_ActObjX/Y = start + the offsets' high bytes (high bytes 0), !Battle_ActObjMoveDone set when the steps run out. - verified
BattleCF_ObjMoveArc$CF:F503 · 284 B · Battle engineObject kind 1: BattleCF_MoveArc for an object. - verified
BattleCF_ObjMoveHeading$CF:F61F · 110 B · Battle engineObject kind 2: BattleCF_MoveHeading for an object (its cell from !Battle_ActObjY/X, the distance in !Battle_ActObjUnkA31C, the angle in !Battle_ActObjMoveAngle copied to !Battle_ActObjUnkA5B5)... - verified
BattleCF_ObjMoveCircle$CF:F68D · 85 B · Battle engineObject kind 3: unlike the battlers' BattleCF_MoveCircle, it moves the object itself: adds the step to its angle and puts !Battle_ActObjX/Y (low bytes only) at the centre (!Battle_ActorCircleX/Y) +... - verified
BattleCF_ObjMoveKind4$CF:F6E2 · 282 B · Battle engineObject kind 4: BattleCF_MoveKind4 for an object, with these differences: the first test once falling uses a 24-pixel margin (!Battle_ObjNearMargin) and no height test (it counts... - verified
BattleCF_ObjMoveOrbit$CF:F7FC · 136 B · Battle engineObject kind 5: the ellipse of BattleCF_MoveEllipse, moving the object itself around the centre (!Battle_ActObjX/Y low bytes = centre + radius * cos, radius / 2 * sin), and first re-linking it to... - verified
BattleCF_ObjMoveCurve$CF:F884 · 211 B · Battle engineObject kind 7: BattleCF_MoveCurve for an object. - verified
BattleCF_PointsNear$CF:F957 · 33 B · Battle engineSets !BattleCF_Near to 1 when the points (!BattleCF_NearX1, NearY1) and (!BattleCF_NearX2, NearY2) are less than !BattleCF_NearMargin apart in x and in y, else to 0. - verified
BattleCF_StepEnemies$CF:F978 · 91 B · Battle engineThe enemy stepper of the enemy movers (run while no action runs): for enemies 7 down to 0 with !Enemy_Stepping set, every !Battler_DefMoveDelay frames (!Enemy_StepTimer counts them) adds the... - verified
BattleCF_PlaceEnemyParts$CF:F9D3 · 36 B · Battle engineKeeps the enemies at fixed offsets from one of them: for each present enemy, !Battler_ScreenX/Y = the screen position of enemy !Battle_PartsAnchor + its !Enemy_PartOfsX/Y (8-bit adds; the anchor... - verified
BankCF_DeadShift3$CF:F9F7 · 4 B · EngineFour bytes between BattleCF_PlaceEnemyParts and Battle_SinLookupCF that decode as LSR A three times and RTS (A / 8). - verified
Battle_SinLookupCF$CF:F9FB · 28 B · Battle engineBank $CF's own scaled sine: returns (sin(A) × !BattleCF_SinScale) >> 8 in A. - verified
Battle_Mul8x16CF$CF:FA17 · 44 B · Battle engine - verified
Battle_CalcAngleCF$CF:FA43 · 154 B · Battle engineBank $CF's copy of Battle_CalcAngle ($C1:0222), working on WRAM instead of the direct page: the angle (256 units per turn) between !BattleCF_GeoOriginX/Y and !BattleCF_GeoPointX/Y, from dx =... - verified
BattleCF_PixelToCell$CF:FADD · 5 B · Battle engineA / 16: a screen coordinate to its 16-pixel cell (the !Battle_CellMap grid); the heading movers test the result for the edge cells. - verified
Battle_MergePendingEntries1580$CF:FAE2 · 131 B · Battle engineFor the highest PC slot (2, 1, 0) whose !Pc_UnkA0B5 is set, merges its Battle_PcItem record into the battle item list (Item_BattleList, 256 records of 5 bytes): a record with the same .Id gets one... - verified
BattleCF_EnterBattle$CF:FB65 · 128 B · Battle engineThe battle's start, reached from EngCall_BattleMain ($C1:0000, JSL from the field's DefaultHandler) through the JML at $C1:001B. - verified
BattleCF_ExitBattle$CF:FBE5 · 273 B · Battle engineThe battle's end, reached through the JML at $C1:001F when BattleSys_Main JMPs to BattleSys_ExitVec. - verified
BattleCF_PixelToTile$CF:FCF6 · 5 B · Battle engineA / 16: a screen coordinate to the field's 16-pixel tile (the Battle_FieldPc / Battle_FieldObj .TileX/.TileY); the same code as BattleCF_PixelToCell. - verified
BattleCF_WaitFrame$CF:FCFB · 7 B · Battle engineWaits one frame: counts !Battle_FramePending up and loops until the frame update (BattleCF_FrameUpdate) clears it. - verified
Battle_QueueVramUpload_0CC0$CF:FD02 · 52 B · Battle engineDescribes the upload of the status-bar map (BattleUI_StatusTile(0, 0), $00:0CC0, $180 bytes) to VRAM word !Battle_PanelMapVram in the queue bytes !Battle_VramQDmap.., and sets !Battle_VramQPending... - verified
Battle_QueueVramUpload_A6E1$CF:FD36 · 52 B · Battle engineThe same for the tech window map (BattleMenu_TechTile(0, 0), $7E:A6E1, $180 bytes) to the same VRAM address. - verified
Battle_QueueVramUpload_0E80$CF:FD6A · 52 B · Battle engineThe same for the item list map (BattleMenu_ItemTile(0, 0), $00:0E80, $180 bytes) to the same VRAM address. - verified
BattleFx_SetPtrA2FromTable$CF:FD9E · 15 B · Battle engineA = battler slot: stores !BattleRom_StatsOffset[slot] (the slot's BattlerStats offset, 2 B per slot) in DP $A2 (!BattleTmp_A2, which its callers read as !Battle_PoseStatsOffset and the like) and... - verified
BattleMsg_FormatNumber4Digits$CF:FDAD · 115 B · Battle text & numbersA four-digit, long-call version of BattleMsg_FormatNumberDigits ($C1:011F): the same subtract-and-count loops with one more for the thousands, and the digits looked up in !BattleRom_DigitTilesB... - verified
BattleCF_RemoveMarkedEnemies$CF:FE20 · 101 B · Battle engineService 6 (BattleSys_Service6): for enemy slots 10 down to 3 marked in !Battle_UnkAEB3 (BattleSys_Main's debug win marks each enemy it removes), by path: - !Battler_Unk9FF7 set: only... - verified
BankCF_EndFill$CF:FE85 · 376 B · Engine$FF fill after the last routine. - verified
BattleCF_ActForceBytes$CF:FFFD · 3 B · Battle engineThe three bytes service 4 reads as !BattleRom_ActForceNone ($FFFD), !BattleRom_ActForceSecond ($FFFE) and !BattleRom_ActForceAlt ($FFFF): non-zero would force !Battle_ActUnkAE9B / !Battle_ActFlags...
Bank $D1 · $D1:0000–$0FFF
$D1:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:1000–$1FFF
$D1:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:2000–$2FFF
$D1:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:3000–$3FFF
$D1:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:4000–$4FFF
$D1:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:5000–$5FFF
$D1:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:6000–$6FFF
$D1:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:7000–$7FFF
$D1:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:8000–$8FFF
$D1:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:9000–$9FFF
$D1:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:A000–$AFFF
$D1:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:B000–$BFFF
$D1:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:C000–$CFFF
$D1:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:D000–$DFFF
$D1:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:E000–$EFFF
$D1:E000
Verified · 27
- verified
BattleFx_SwapObjPalettes$D1:E70A · 114 B · Battle engineSwaps OBJ palette rows 1-3 with rows 5-7, colour for colour, in both the live (!Battle_PaletteLive) and the saved (!Battle_PaletteSaved) palette. - verified
BattleFx_Nmi$D1:E77C · 285 B · Battle engineThe battle's NMI handler while this engine runs: BattleFx_Init writes JML $D1:E77C into !NmiTrampoline. - verified
BattleFx_WhitenRows$D1:E899 · 40 B · Battle engineFills background palette rows 2-7 ($2040-$20FF of !Battle_PaletteSavedLo and $2240-$22FF of !Battle_PaletteLiveLo) and OBJ palette rows 1-3 (saved and live) with !BattleFx_White ($7FFF). - verified
BattleFx_WhitenObjRows5To7$D1:E8C1 · 24 B · Battle engineFills OBJ palette rows 5-7 (saved and live) with !BattleFx_White. - verified
BattleFx_UploadMapBlock$D1:E8D9 · 65 B · Battle engineSends a 16 x 16 block of map words to VRAM by DMA on channel 7: 16 rows of !BattleFx_MapRowBytes (32 bytes) from A:X, one after the other in the source, to VRAM word address DP $45, $45 + $20, $45... - verified
BattleFx_MoveBgRowsUp$D1:E91A · 106 B · Battle engineMoves background palette rows 2-4 to rows 5-7, with the palette animations that work on them: - rows 2-4 of !Battle_PaletteSavedLo are copied to rows 5-7 of both the saved and the live palette... - verified
BattleFx_LoadBgRows2To4$D1:E984 · 107 B · Battle engineCounts up !BattleFx_UnkCDC8 and !Battle_CgramPending, loads background palette rows 2-4 (saved and live) from !BattleRom_BgRows2To4 ($D0:FD00, 48 colours), copies FieldAnimB records 0-2 over... - verified
BattleFx_GradLevelOfs$D1:E9EF · 18 B · Battle engineByte offset into !BattleRom_GradColours of the 14 colours of each gradient level 0-8 (BattleFx_HpGradientTick indexes it with the level * 2). - verified
BattleFx_FindGradStart$D1:EA01 · 32 B · Battle engineLooks for the first colour of !BattleRom_GradColours among colours 1-14 of saved background palette row 5 and stores the colour number less 1 (0-13) to !BattleFx_GradStart; 0 when none matches. - verified
BattleFx_GradRotA$D1:EA21 · 14 B · Battle engineThree rotation tables of BattleFx_HpGradientTick, indexed by !BattleFx_GradStart (0-13): the rotation of background row 5 (A), 6 (B) and 7 (C). - verified
BattleFx_GradRotB$D1:EA2F · 14 B · Battle engineRow 6's start (see BattleFx_GradRotA). - verified
BattleFx_GradRotC$D1:EA3D · 14 B · Battle engineRow 7's start (see BattleFx_GradRotA). - verified
BattleFx_HpGradientTick$D1:EA4B · 389 B · Battle engineOne step of a background colour gradient that follows the HP of battler slot 3 (the first enemy). - verified
BattleFx_GradRotation$D1:EBD0 · 15 B · Battle engineA = DP $45 (a row's rotation from BattleFx_GradRotA/B/C) when !BattleFx_GradRotRaw is non-zero, else !BattleFx_GradCount - DP $45. - verified
BattleFx_GradWriteRow$D1:EBDF · 32 B · Battle engineWrites the 14 colours !BattleFx_GradColours + A * 2 on to colours 1-14 of the background palette row at Y ($20 per row, from row 5), in the saved and the live palette. - verified
BattleFx_SwayQuad$D1:EBFF · 96 B · Battle engineFills quad X (X = the argument byte) of !BattleFx_Quads and draws it: a beam from the top of the screen down to the point in !Battle_ActCalcResult. - verified
BattleFx_FxModels$D1:EC5F · 112 B · Battle engineThe 3D models of the layer-effect objects, read by bank $CD (BattleCD_FxRotateVertex, $CD:1EFE on: bytes 0, 1 and 2 of entry A * 4 + DP $4F into !Battle_FxRotInX/Y/Z, z plus DP $51): seven models... - verified
BattleFx_BgSetPalOfs$D1:ECCF · 12 B · Battle enginePer background set 0-5 (BattleFx_LoadBgSet, index = set * 2): byte offset into !BattleRom_BgSetPalettes of the set's three palette rows ($60 bytes). - verified
BattleFx_BgSetPacks$D1:ECDB · 24 B · Battle enginePer background set 0-5 (BattleFx_LoadBgSet, index = set * 4): the four graphics pack ids (!LocGfx_PackPtrs entries) unpacked to VRAM $2000, $2800, $3000 and $3800 (words); !BattleFx_BgPackNone... - verified
BattleFx_LoadBgSet$D1:ECF3 · 218 B · Battle engineLoads background set A (0-5): with !BattleFx_BgLoading set meanwhile, for each of the set's four entries in BattleFx_BgSetPacks that is not !BattleFx_BgPackNone, unpacks that graphics pack... - verified
BattleFx_GrowBand$D1:EDCD · 204 B · Battle engineDraws a band around the point in !Battle_ActCalcResult into the window table of this frame (!BattleFx_WinTable1 when bit 0 of !Battle_FrameCount is set, else !BattleFx_WinTable0), one step wider... - verified
BattleFx_MsgSfx$D1:EE99 · 12 B · Battle engine1 byte per battle message: the sound BattleCD_ShowMessage plays for it (through BattleCD_ApuCmd18, unless !BattleCD_MsgNoSfx, $FF). - verified
BattleFx_RampWin2$D1:EEA5 · 31 B · Battle engineWith n = !BattleFx_RampBottom ($C0) - !BattleFx_CountA (an 8-bit subtraction, so n is 0-255), stores the words 0, 1, 2, ... - verified
BattleFx_WaveWindowA$D1:EEC4 · 159 B · Battle engineWrites wavy edges into !BattleFx_WinTable0, two lines at a time, for Y = 0 to !BattleFx_WinUsedBytes - 8 in steps of 8 (the pairs at !BattleFx_WinTable0-4 + Y and + Y: the line before line 0 to... - verified
BattleFx_WaveLeftA$D1:EF63 · 109 B · Battle engineBattleFx_WaveWindowA's first pair: A (8-bit, its sign in N) is sign- extended, added to the word at !BattleFx_WaveBaseX + Y and stored to !BattleFx_WinTable0-4 + Y and !BattleFx_WinTable0 + Y. - verified
BattleFx_WaveWindowB$D1:EFD0 · 19 B · Battle engineLike BattleFx_WaveWindowA, but with r1 = r2 = !BattleFx_WaveRadius - !BattleFx_CountA, and the first pair is r1 x the sine plus (!BattleFx_ShakeX + !Battle_FxScrollAddX) instead of the $7E:E500... - verified
BattleFx_WaveWindowB_ByFrame$D1:EFE3 · 155 B · Battle engine
Bank $D1 · $D1:F000–$FFFF
$D1:F000
Verified · 40
- verified
BattleFx_WaveLeftB$D1:F07E · 107 B · Battle engineBattleFx_WaveLeftA with DP $4F (the word BattleFx_WaveWindowB formed) in place of the !BattleFx_WaveBaseX words. - verified
BattleFx_WaveRight$D1:F0E9 · 31 B · Battle engineThe second pair of the wave windows: A (8-bit, its sign in N) sign- extended, plus DP $51, stored to !BattleFx_WinTable0-2 + Y and !BattleFx_WinTable0+2 + Y. - verified
BattleFx_AddLineOffsets$D1:F108 · 168 B · Battle engineAdds per-line bytes from $7E:0A00 (DP=$0A00 meanwhile) to lines 48-111 and 112-175 of this frame's window table (by bit 0 of !Battle_FrameCount): for n = 0-63, line 48 + n and line 112 + n each... - verified
BattleFx_Init$D1:F1B0 · 609 B · Battle engineThis engine's set-up at the start of a battle (bank $CD's vector $CD:0000, which BattleCF_EnterBattle calls as BattleSys_VecCD0000 before it clears the battle RAM $7E:2D01-$ACEC). - verified
BattleFx_SaveAnimKinds$D1:F411 · 21 B · Battle engineCopies .Unk0 (the kind) of FieldAnimB records 0-7 to !BattleFx_SavedKinds+0..7. - verified
BattleFx_HoldAnimsTick$D1:F426 · 78 B · Battle engineHolds and releases the palette animations around bank $CD's PalAnim_TickAll call (its callers run FdVec_FFF7 right after): - !BattleFx_HoldAnims non-zero, !BattleFx_AnimsHeld still 0: sets... - verified
BattleFx_RandomByte$D1:F474 · 8 B · Battle engineA = RandomTable entry A + !Battle_FrameCount (low byte) + C. - verified
BattleFx_RandomShake$D1:F47C · 68 B · Battle enginePicks a random shake from three argument bytes (base x, base y, mask): x = (random byte & mask) + base x, y = (random byte & mask) + base y, and stores -x and -y (16-bit) to !BattleFx_ShakeX and... - verified
BattleFx_NmiAlt$D1:F4C0 · 153 B · Battle engineA second NMI handler of the battle: BattleCD_ExitBattle installs it at the battle's end, after the closing wipe (the STX at $CD:0420 stores its address to !NmiTrampoline+1, the STA at $CD:041A the... - verified
BattleFx_StepBounce$D1:F559 · 116 B · Battle engineOne step of a bounce for record X = !BattleFx_RecOfs (16-bit fields): - !BattleFx_BounceDir non-zero (falling): !BattleFx_BounceSpeed += !BattleFx_BounceAccel, unless that overflows, which zeroes... - verified
BattleFx_SaveCalcPoints$D1:F5CD · 40 B · Battle engineCopies the six bytes of !Battle_ActCalcResult to !BattleFx_CalcCopy + X (X = the argument byte), two bytes apart: bytes 0, 2, 4 (the x of the three points, probably) to +0, +4, +8, bytes 1, 3, 5... - verified
BattleFx_CopyWin1ToWin2$D1:F5F5 · 133 B · Battle engineCopies the first pair of every line (0-223) of one window table into the second pair of the other: table 0 into table 1 when bit 0 of !Battle_FrameCount is set (the table this frame writes), table... - verified
BattleFx_Op80Dispatch$D1:F67A · 12 B · Battle engineRuns the handler of BattleFx_Op80Table picked by the high nibble of !Battle_ActOp80Args (the bytes battle-script opcode $80 copied; its first byte's low nibble is their count). - verified
BattleFx_Op80Table$D1:F686 · 12 B · Battle engineBattleFx_Op80Dispatch's handlers, by the high nibble of !Battle_ActOp80Args (0-5). - verified
BattleFx_Op80Clear$D1:F692 · 10 B · Battle engineOp80 handler 5 (BattleFx_Op80Table), also run first by BattleFx_Op80Kind4: zeroes !Battle_ShakeXOn, !Battle_ShakeYOn and !Battle_ShakeLayers (the screen shake off). - verified
BattleFx_Op80Bits8$D1:F69C · 8 B · Battle engineBattleFx_Op80Kind4: the value for bits 2-4 of an argument byte (0-7): 1, 2, 3, 4, then single bits 8, $10, $20, $40. - verified
BattleFx_Op80BitsHi$D1:F6A4 · 8 B · Battle engineBattleFx_Op80Kind4: the value for bits 5-7 of an argument byte (0-7): the single bits 1 to $80. - verified
BattleFx_Op80OrA$D1:F6AC · 4 B · Battle engineBattleFx_Op80Kind4: by bits 0-1 of the first argument byte, the bits ORed into !Battle_ShakeLayers ($00, $28, $A0, $A8). - verified
BattleFx_Op80OrB$D1:F6B0 · 4 B · Battle engineThe same by bits 0-1 of the third argument byte ($00, $14, $50, $54: BattleFx_Op80OrA's values shifted right once). - verified
BattleFx_Op80Kind4$D1:F6B4 · 153 B · Battle engineOp80 handler 4: BattleFx_Op80Clear, then fills the two 8-byte groups from !Battle_ShakeXOn (x) and !Battle_ShakeYOn (y) from the argument bytes 1-4 (!Battle_ActOp80Args+1 to +4). - verified
BattleFx_Op80Kind0$D1:F74D · 240 B · Battle engineOp80 handlers 0-3: builds the two FieldAnimB records of !Battle_PalAnimRecs89 (record 8 at +0, record 9 at +12; offsets below are within each record). - verified
BattleFx_BuildGradHdma$D1:F83D · 174 B · Battle engineZeroes !BattleFx_GradHdmaBytes from !BattleFx_GradHdmaA-1 and builds four lists of 4-byte entries, two bytes used in each: - !BattleFx_GradHdmaA: 24 entries (1, v) with v the high byte of a 16-bit... - verified
BattleFx_SortQuadByY$D1:F8EB · 50 B · Battle engineSorts the four points of BattleFx_DrawQuad (DP $12-$19, x then y) by y, top first: four passes of three compare-and-swaps of neighbours (equal y also swap), each swap moving a whole point with... - verified
BattleFx_QuadSlopes$D1:F91D · 85 B · Battle engine!BattleFx_QuadTop = y0, and the four edge slopes of the sorted quad (BattleFx_EdgeSlope): !BattleFx_Slope02 (point 0 to 2), !BattleFx_Slope23, !BattleFx_Slope01 and !BattleFx_Slope13. - verified
BattleFx_EdgeSlope$D1:F972 · 61 B · Battle engineY = (!BattleFx_SlopeXTo - !BattleFx_SlopeXFrom) * 256 / !BattleFx_SlopeDy, signed (the hardware divides the size of the difference; a negative difference negates the quotient): the x step per line... - verified
BattleFx_DrawQuad$D1:F9AF · 56 B · Battle engineDraws quad X of !BattleFx_Quads into this frame's window table: !BattleFx_QuadSlot = X, the quad's eight coordinate bytes (two bytes apart from !BattleFx_Quads + X: x0, y0, x1, y1, x2, y2, x3, y3)... - verified
BattleFx_RasterQuad$D1:F9E7 · 385 B · Battle engineRasterises the y-sorted quad in DP $12-$19 into the window table through the WRAM port: BattleFx_QuadSlopes, then JSL BattleCD_AimWinLineL with A = !BattleFx_QuadTop aims WMADD at that line of the... - verified
BattleFx_AddBoxInset$D1:FB68 · 10 B · Battle engineAdds the argument byte to !BattleFx_BoxInset. - verified
BattleFx_GrowBox$D1:FB72 · 92 B · Battle engineAdds the argument byte to !BattleFx_BoxHalfHeight (h), then sets the first pair of lines !BattleFx_BoxCentre ($6A, line 106) - h to $6A + h - 1 of this frame's window table to left =... - verified
BattleFx_FillWindow$D1:FBCE · 4 B · Battle engineRuns BattleFx_FillTable's handler X: 0 all empty, 2 first pairs empty, 4 second pairs empty, 6 first pairs full (in this frame's table). - verified
BattleFx_FillTable$D1:FBD2 · 8 B · Battle engineBattleFx_FillWindow's handlers, by X = 0, 2, 4, 6. - verified
BattleFx_FillWin1Full$D1:FBDA · 94 B · Battle engineSets the first pair of lines 0-223 of this frame's window table to !BattleFx_WinFull (left 0, right 255): eight blocks of 28 lines, X from $70 down to 4. - verified
BattleFx_FillWin1Empty$D1:FC38 · 94 B · Battle engineSets the first pair of lines 0-223 of this frame's window table to !BattleFx_WinEmpty (left 255, right 0). - verified
BattleFx_FillWin2Empty$D1:FC96 · 94 B · Battle engineSets the second pair of lines 0-223 of this frame's window table to !BattleFx_WinEmpty. - verified
BattleFx_FillAllEmpty$D1:FCF4 · 138 B · Battle engineSets both pairs of lines 0-223 of this frame's window table to !BattleFx_WinEmpty: sixteen blocks of 14 lines, X from $38 down to 2 in steps of 2 (every word). - verified
BattleFx_MirrorWin1ToWin2$D1:FD7E · 206 B · Battle engineLike BattleFx_CopyWin1ToWin2 (first pairs of the other table into the second pairs of this frame's table), but mirrored left to right (the word is inverted and its bytes swapped: left = 255... - verified
BattleFx_ReloadCeSet$D1:FE4C · 37 B · Battle engineWhen !BattleFx_CeSetWant differs from !BattleFx_CeSet (which then takes it), or else when !BattleFx_CeSetReload is set: JSL BattleCE_UnkEE6E with A = !BattleFx_CeSetBase + !BattleFx_CeSet +... - verified
BattleFx_RestoreMathRegs$D1:FE71 · 38 B · Battle engineWrites the math unit's operands again from their mirrors: the dividend and divisor (!Battle_DivMirrorLo/Hi/Divisor, which restarts the division) when !Battle_DivBusy is set, else the two factors... - verified
BattleFx_Irq$D1:FE97 · 93 B · Battle engineThe battle's IRQ handler while this engine runs: BattleFx_Init writes JML $D1:FE97 into !IrqTrampoline and sets the V-count IRQ at line !BattleFx_IrqLine (211). - verified
BankD1_EndFill$D1:FEF4 · 268 B · Engine$FF fill after the last routine, to the end of the bank.
Bank $FD · $FD:0000–$0FFF
$FD:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:1000–$1FFF
$FD:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:2000–$2FFF
$FD:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:3000–$3FFF
$FD:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:4000–$4FFF
$FD:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:5000–$5FFF
$FD:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:6000–$6FFF
$FD:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:7000–$7FFF
$FD:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:8000–$8FFF
$FD:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:9000–$9FFF
$FD:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:A000–$AFFF
$FD:A000
Verified · 23
- verified
BattleFD_UnkA8A5$FD:A8A5 · 41 B · Battle engineChecks whether PC A can act on its command: !Battle_UnkB3EA = 1 when its BattlerStats.Status has bit 7 (KO'd), its .Unk4C+2 or .Unk4C+7 has bit 7 (!Battle_AutoEnemyBit, the bit that makes... - verified
BattleFD_DropPcCommand$FD:A8CE · 48 B · Battle engineDrops the command of PC DP $14: BattleSys_RefundItemLong (gives back an item the command had taken), then its BattleCmd .State and .Kind = 0 and .Partners = $FF, and its gauge restarts as in... - verified
BattleFD_DropLatchedPcCommand$FD:A8FE · 62 B · Battle engineAs BattleFD_DropPcCommand, but only when !Battle_UnkB188[pc] (the latched BattleCmd.State) is non-zero, and it ends with !Battle_ArgSlot = the PC and BattleSys_RemoveReadyLong (service 2: the PC... - verified
BattleFD_UnkA93C$FD:A93C · 35 B · Battle engineBattleFD_DropPcCommand for each PC 0, 1, 2 whose !Battle_CmdPcs byte is non-zero (the PCs of the command BattleSys_UnkB967 drops). - verified
BattleFD_UnkA95F$FD:A95F · 35 B · Battle engineBattleFD_DropLatchedPcCommand for each PC 0, 1, 2 whose !Battle_CmdPcs byte is non-zero (the PCs of the groups BattleSys_UnkB575 marked). - verified
BattleFD_UnkA982$FD:A982 · 14 B · Battle engineZeroes $7E:AD89-$B3F4: the battle's working variables from !Battle_UnkAD89 to !Battle_UnkB3F4 (the turn lists, the action block, the reward sums and most of the other !Battle_Unk* bytes this file... - verified
BattleFD_RestoreEnemies$FD:A990 · 264 B · Battle engineProbably a script command that brings removed enemies back: the caller (BattleAi_RunRestoreAndSetStats, run handler $16, at $C1:A3B6) leaves the script read address in !Battle_UnkB1D2 (bank $CC)... - verified
BattleFD_UnkAA98$FD:AA98 · 24 B · Battle engineSets BattlerStats.Status of all 8 enemy slots (3-10) to !Battle_StatusKo ($80, the other status bits cleared). - verified
BattleFD_UnkAAB0$FD:AAB0 · 34 B · Battle engineBuilds !Battle_Unk7F01EE: bit n set for each enemy entry n (0-7) whose !Battle_UnkAE85 byte is non-zero. - verified
BattleFD_LoadUnkB18E$FD:AAD2 · 47 B · Battle engineFills the 4 bytes !Battle_UnkB18E-B191 from the 11-byte record !Battle_UnkB18C of !BattleRom_UnkCC6FCB: B18E = record byte 0, B18F = the record number, B190 = record byte 1, B191 = 0... - verified
BattleFD_LoadUnkB18E2$FD:AB01 · 47 B · Battle engineBattleFD_LoadUnkB18E with the records of !BattleRom_UnkCC88CB. - verified
BattleFD_UnkAB30$FD:AB30 · 114 B · Battle engineRun by BattleSys_Unk8461 for a PC whose turn is due, before the menu: decides whether the PC acts on its own. - verified
BattleFD_AddEnemyRewards$FD:ABA2 · 204 B · Battle engineAdds the rewards of the enemy in slot DP $0E to the battle's sums, unless its !Battle_UnkAF15 bit 6 is set (!Battle_AF15NotCounted) or its !Battler_UnkAF0A entry is empty. - verified
BattleFD_UnkAC6E$FD:AC6E · 128 B · Battle engineRun by BattleSys_Unk8461 after a turn when !Battle_UnkB2C0 is 0 (no enemy reaction scripts): probably the PCs' counter-attacks. - verified
BattleFD_UnkACEE$FD:ACEE · 15 B · Battle engineZeroes !Battle_UnkAD9B and the $B0 bytes from !Battle_ActPcHitAmount ($AD9C-$AE4B: the first four of the $2C-byte record sets the hit opcodes read). - verified
BattleFD_UnkACFD$FD:ACFD · 12 B · Battle engineZeroes the $84 bytes from !Battle_HitAmount ($B328-$B3AB): the three $2C-byte hit sets (!Battle_HitAmount/!Battle_HitFlags per battler slot) that Battle_RecordHit fills and Battle_ApplyHits... - verified
BattleFD_UnkAD09$FD:AD09 · 14 B · Battle engineSets the three PCs' Tech_MenuEntry blocks ($1A80-$1C23, 3 x $8C bytes) to $FF. - verified
BattleFD_UnkAD17$FD:AD17 · 315 B · Battle engineBattleSys_Main's victory path, after the gold: shows the end-of-battle messages, each one a JSL BattleSys_UnkVecCD0021 with A = the message and its arguments in !Battle_MsgArg0.. - verified
BattleFD_UnkAE52$FD:AE52 · 71 B · Battle engineBuilds a PC's stat block from its character record: for PC slot Y with a character id in !Battler_UnkAEFF (not negative), copies the id's $50-byte record at !Menu_CharRecords + id * $50 to the... - verified
BattleFD_UnkAE99$FD:AE99 · 43 B · Battle engineCopies BattlerStats.Unk57 of PCs 0-2 to !Battle_UnkB3BA-B3BC and counts in !Battle_UnkB3BD how many of them are !Battle_Unk57CountId ($A9). - verified
BattleFD_UnkAEC4$FD:AEC4 · 46 B · Battle engineFor each PC 0-2 whose BattlerStats.Unk57 is !Battle_Unk57FlagId ($AB), sets bit 2 of its BattlerStats.Unk4C+4 (+$50). - verified
BattleFD_UnkAEF2$FD:AEF2 · 142 B · Battle engineFills the 5-byte records of !Battle_Unk1C48 (15 bytes, one record per PC 0-2) from the PCs' stat blocks. - verified
BattleFD_AddItemEntry$FD:AF80 · 156 B · Battle engineAdds item A to the battle item list (Item_BattleList) at offset DP $04, with quantity DP $0E, when the item is one the list takes: an id of $BC or more whose byte 0 in !BattleRom_ItemUseFlags (3 B...
Bank $FD · $FD:B000–$BFFF
$FD:B000
Verified · 29
- verified
BattleFD_AddItemEntry_Skip$FD:B01C · 23 B · Battle engine - verified
BattleFD_ItemRecOffset$FD:B033 · 162 B · Battle engineOffset in bank $CC of item A's record, by id range: below $5A: id * 5 + $0262; $5A-$7A: (id - $5A) * 3 + $047E; $7B-$93: (id - $7B) * 3 + $04E1; $94-$BB: (id - $94) * 4 + $052C; $BC-$F1: (id... - verified
BattleFD_UnkB0D5$FD:B0D5 · 76 B · Battle engineTurn-list and panel setup: zeroes the flags of all 13 turn lists (!Battle_ListFlags), sets every !Battle_ListRuns entry to 10 (!Battle_ListRunsReset: this is where the runs are first set), zeroes... - verified
BattleFD_UnkB121$FD:B121 · 32 B · Battle engineCopies bits 0-1 of each enemy's BattlerStats.Unk47 (slots 3-10) to !Battle_UnkA020 (one byte per enemy entry). - verified
BattleFD_ApplyRecBoost$FD:B141 · 12 B · Battle engineApplies the stat boost an item record names: byte 4 of the record at DP $08 (an address in bank $CC; BattleSys_UnkCE3A points it at three equipment records of a PC, probably the weapon, armour and... - verified
BattleFD_UnkB14D$FD:B14D · 179 B · Battle engineApplies stat boost A to the stat block at DP $00: its 2-byte entry in bank $CC at DP $0E + A * 2 has a stat mask (byte 0) and an amount (byte 1); for each mask bit set, the amount is added to one... - verified
BattleFD_UnkB14D_Done$FD:B200 · 1 B · Battle engine - verified
BattleFD_UnkB201$FD:B201 · 34 B · Battle engineBattleSys_Main's victory path, before the gold is paid: when a PC has BattlerStats.Unk57 = $A9 (!Battle_UnkB3BD non-zero, BattleFD_UnkAE99), adds the !Battle_UnkB28C sum to !Battle_RewardGold... - verified
BattleFD_UnkB223$FD:B223 · 11 B · Battle engineSets !Battle_UnkAE6D entry n to n for n = 0-10. - verified
BattleFD_UnkB22E$FD:B22E · 176 B · Battle engineBattle_SetupBattle's second step: the battlers' entries. - verified
BattleFD_UnkB2DE$FD:B2DE · 97 B · Battle engineBattle_SetupBattle's first step. - verified
BattleFD_UnkB33F$FD:B33F · 36 B · Battle engineBattleFD_UnkB2DE's helper: !Battle_UnkAF1D = 0, !Battle_PcCount = 3, copies $230 bytes from !MenuRom_CharRecordInit ($CC:0000, the new-game records Menu_InitNewGameData copies) to... - verified
BattleFD_UnkB363$FD:B363 · 136 B · Battle engineFor PC slot Y with an id in !Battler_UnkAEFF: - BattlerStats.Unk79 bit 7 set: ORs .Unk7B into the byte at BattlerStats.Status + .Unk7A (a status byte picked by .Unk7A); - BattlerStats.Unk57 = $A0... - verified
BattleFD_UnkB3EB$FD:B3EB · 19 B · Battle engineSets BattlerStats.Unk72 of the slot at X to $32 when its .Unk56 is $3D or $42. - verified
BattleFD_UnkB3FE$FD:B3FE · 58 B · Battle engineFor PC X with an id in !Battler_UnkAEFF: sets the 4 bytes of its BattlerStats.Unk6C to 4, then the byte picked by the highest of BattlerStats.Unk2E bits 7-4 (bit 7: +0, 6: +1, 5: +2, 4: +3) to 5... - verified
BattleFD_UnkB438$FD:B438 · 158 B · Battle engineBuilds an enemy's stat record from ROM: for enemy entry X (also in DP $02), with the id in its !Battler_UnkAF0A entry, the 23-byte record at BattleRom_EnemyStats + id * 23 fills BattlerStats[entry... - verified
BattleFD_ZeroStatBlock$FD:B4D6 · 17 B · Battle engineZeroes $80 bytes from BattlerStats[3].Unk2D + Y (an enemy's stat block, running into the next record's first $2D bytes). - verified
BattleFD_UnkB4E7$FD:B4E7 · 110 B · Battle engineSets the starting values of the turn lists for all 11 slots: the reload value (!Battle_ListReload) and the countdown (!Battle_ListTimers) of lists 0-11 get the same number per list: 0: 60, 1: 150... - verified
BattleFD_UnkB555$FD:B555 · 256 B · Battle engineOne of Battle_SetupBattle's last steps: - zeroes !Battle_UnkAEE6 (17 B), !Battle_UnkB19E (32 B) and the 32 bytes from !Enemy_AnimWanted ($5E0D-$5E2C); - BattleFD_UnkB3EB for each PC whose... - verified
BattleFD_UnkB655$FD:B655 · 221 B · Battle enginePuts item DP $06 in the 4-byte record of slot !Battle_UnkB18B in !Battle_PcItem (8 B per slot) when it is an item the battle list takes (as BattleFD_AddItemEntry: id $BC or more with bit 7 of its... - verified
BattleFD_UnkB732$FD:B732 · 185 B · Battle engineClears the battle's per-battle state (Battle_SetupBattle): - DP $16-$21 and !Battle_UnkAF25 (16-bit) = 0; !Battle_UnkB1FC, !Battle_UnkB253, !Battle_UnkAECB, !Battle_UnkB2C0, !Battle_UnkB3B9 = 0... - verified
BattleFD_UnkB7EB$FD:B7EB · 364 B · Battle engineThe battlers' first turn values (Battle_SetupBattle): - each PC with an id in !Battler_UnkAEFF, and each enemy entry below !Battle_EnemyCount with an id in !Battler_UnkAF0A: its stat block's... - verified
BattleFD_FixedCmdPtrs$FD:B957 · 6 B · Battle engine!BattleRom_FixedCmdPtrs: one word per !Battle_Unk29AC value (0-2), the bank-$FD address of the 21 bytes BattleSys_UnkB725 copies over the three BattleCmd records ($93EE-$9402) in the bit-5 battle. - verified
BattleFD_FixedCmds$FD:B95D · 63 B · Battle engineThe three sets, 21 bytes each: a BattleCmd record (.State, .Kind, .Menu, .Target, .Unk4, .Partners, .ActionId) for PCs 0, 1 and 2. - verified
BattleFD_FixedPartyPtrs$FD:B99C · 6 B · Battle engine!BattleRom_UnkFDB99C: one word per !Menu_Config+28 value (0-2), the bank-$FD address BattleFD_UnkB2DE reads its 8 x 4 words from. - verified
BattleFD_FixedParty$FD:B9A2 · 168 B · Battle engineBattleFD_UnkB2DE's four words per character record: Menu_CharRec .Word3, .Word5, .Word7 and .Word9 (probably current HP, maximum HP, MP and maximum MP: 800, 800, 80, 80 in every entry but one). - verified
BattleFD_AiActLength$FD:BA4A · 23 B · Battle engine!BattleRom_AiActLength: one byte per enemy script action code $00-$16, the bytes of its action record; BattleAi_EnemyTurn and BattleAi_ChooseByChance step through an action part by it. - verified
RandomTableFD$FD:BA61 · 256 B · EngineA byte-identical copy of RandomTable ($C0:FE00): the same shuffle of 0-255. - verified
BankFD_RandomTableTail$FD:BB61 · 1,183 B · EngineNothing found reads it: no matched code refers to it and xref finds no call or jump into it.
Bank $FD · $FD:C000–$CFFF
$FD:C000
Verified · 22
- verified
MainInit$FD:C000 · 215 B · BootCalled via: JML from Reset ($00:FF03), which also carries the soft resets, and JML $FDC000 at $C0:418D (Evt_OpFF96_Reset, after JSR InitHW and S=$06FF). - verified
Ppu_SetBgLayout$FD:C0D7 · 77 B · EngineSets a fixed background layout through DP=$2100, the way MainInit writes the PPU: mode 1 with BG3 on top, BG1/BG2 tiles at VRAM word $1000 and BG3 tiles at $5000, 64x32 maps at $6800 (BG1), $7000... - verified
EngFD_UnkC124$FD:C124 · 202 B · EngineFills the HDMA data block in bank $7F (DB = $7F while it runs). - verified
Hdma_InitChannelsFD$FD:C1EE · 211 B · EngineSets up all 8 HDMA channels through DP=$4300 (saved and restored): channel 0: indirect, 4 registers from BG1SC (BG1SC-BG4SC); channels 1-3: indirect, 2 registers written twice, from BG1HOFS... - verified
EngFD_UnkC2C1$FD:C2C1 · 30 B · EngineOnce a frame: runs entry !Field_Unk26 (0-2) of one of two handler tables and flips !Field_Unk53 bit 0. - verified
EngFD_UnkC2C1Table1$FD:C2DF · 6 B · EngineEngFD_UnkC2C1's handlers by !Field_Unk26 when !Field_Unk53 bit 0 is set. - verified
EngFD_UnkC2C1Table0$FD:C2E5 · 6 B · EngineThe same when !Field_Unk53 bit 0 is clear. - verified
FieldHdma_BuildPlainA$FD:C2EB · 334 B · EngineEngFD_UnkC2C1's handler for Field_Unk26 = 0 on the frames Field_Unk53 bit 0 is set; FieldHdma_BuildTopBandA/BottomBandA come here while Field_Unk27 is 0. - verified
FieldHdma_SetWin2A$FD:C439 · 62 B · EngineWrites set A's channel 7 table (WH2 or WH3, one byte a line): repeat runs of 100 and 112 lines from WinFx_TableA + WinFx_Ch7Alt ($E0) when Hdma_Unk7F0351 bit 0 is clear, from WinFx_TableA when it... - verified
FieldHdma_SetWin2B$FD:C477 · 62 B · EngineAs FieldHdma_SetWin2A for set B's channel 7, with the test inverted: WinFx_TableA + WinFx_Ch7Alt when Hdma_Unk7F0351 bit 0 is set, WinFx_TableA when it is clear (both sets read WinFx_TableA's area). - verified
FieldHdma_SetBg2A$FD:C4B5 · 121 B · EngineWrites set A's channel 2 table (BG2 H/V scroll): Map_Unk1DFD = 0: 100 + 112 lines of Hdma_Bg2Scroll; else 13 repeat runs of 16 lines, each from Hdma_WaveA, so BG2 gets BG3's wave data (Map_Unk1D8F... - verified
FieldHdma_SetBg2B$FD:C52E · 121 B · EngineAs FieldHdma_SetBg2A for set B: Hdma_Bg2Scroll+4 or Hdma_WaveB. - verified
FieldHdma_FillDataA$FD:C5A7 · 336 B · EngineFills the data set A's tables point at: - Hdma_Bg1Scroll = Map_Unk1D87, Map_Unk1D89; Hdma_Bg2Scroll = Map_Unk1D8B, Map_Unk1D8D; - with Field_Unk1DF9 and Map_Unk1DFD both 0 (each tested as a word... - verified
FieldHdma_FillDataB$FD:C6F7 · 336 B · EngineAs FieldHdma_FillDataA for set B: Hdma_Bg1Scroll+4, Hdma_Bg2Scroll+4, Hdma_Bg3Scroll+4, Hdma_WaveB (copied to Hdma_WaveBCopy), Hdma_ColorMath+2/+3 and Hdma_Unk7F1530+2; Map_Unk1DFB is stepped here... - verified
FieldHdma_BuildPlainB$FD:C847 · 334 B · EngineAs FieldHdma_BuildPlainA for table set B (Field_Unk26 = 0 on the frames Field_Unk53 bit 0 is clear): Hdma_Bg1Scroll+4, Hdma_Bg3Scroll+4 or Hdma_WaveB, WinFx_TableB for channel 5, Hdma_ColorMath+2... - verified
FieldHdma_BuildTopBandA$FD:C995 · 707 B · EngineEngFD_UnkC2C1's handler for Field_Unk26 = 1 on the frames Field_Unk53 bit 0 is set. - verified
FieldHdma_WaveRunsStart$FD:CC58 · 6 B · EngineStarts a band builder's BG3 wave table: Y = 0 (offset of the first entry) and HdmaWave_Line = 0 (a 16-bit store, so $01EF too). - verified
FieldHdma_AddWaveRunA$FD:CC5E · 84 B · EngineAdds A lines (8-bit) of the BG3 wave to set A's channel 3 table at offset Y: while A >= 16, an entry ($90: repeat, 16 lines) from Hdma_WaveA + 4 x (HdmaWave_Line AND $F) with HdmaWave_Line += 16... - verified
FieldHdma_SkipWaveLines$FD:CCB2 · 6 B · EngineHdmaWave_Line += A: steps the wave line count over the band's lines, which the band builders write themselves (A and B alike). - verified
FieldHdma_AddWaveRunB$FD:CCB8 · 84 B · EngineAs FieldHdma_AddWaveRunA for set B's channel 3 table, from Hdma_WaveB (and Hdma_WaveBCopy). - verified
FieldHdma_BuildTopBandB$FD:CD0C · 707 B · EngineAs FieldHdma_BuildTopBandA for table set B (Field_Unk26 = 1 on the frames Field_Unk53 bit 0 is clear; n = 0 goes to FieldHdma_BuildPlainB): the set B pairs (Hdma_Bg1Scroll+4, Hdma_Bg3Scroll+4... - verified
FieldHdma_BuildBottomBandA$FD:CFCF · 687 B · EngineEngFD_UnkC2C1's handler for Field_Unk26 = 2 on the frames Field_Unk53 bit 0 is set.
Bank $FD · $FD:D000–$DFFF
$FD:D000
Verified · 15
- verified
FieldHdma_BuildBottomBandB$FD:D27E · 687 B · EngineAs FieldHdma_BuildBottomBandA for table set B (Field_Unk26 = 2 on the frames Field_Unk53 bit 0 is clear; n = 0 goes to FieldHdma_BuildPlainB), with the set B data and helpers as in... - verified
EngFD_UnkD52D$FD:D52D · 167 B · EngineEngFD_UnkC124's helper: builds a table of (CGADSUB, COLDATA) byte pairs at $7F:1538 (channel 6's registers in Hdma_InitChannelsFD), then copies $100 bytes from $7F:1538 to $7F:1600 (MVN; the... - verified
FieldHdma_OldBuildLeftovers$FD:D5D4 · 1,068 B · EngineNot code that runs: xref finds no call or jump to $FD:D5D4 or to the segment starts below except the one JSR inside the first segment. - verified
M7Scene_Run80$FD:DA00 · 95 B · EngineEvent $FF $80's scene, 768 frames: M7Scene_Init, then every frame: wait for the NMI, M7Scene_UpdateScroll, then by M7Scene_Frame: below $20 the iris opens (radius M7Scene_IrisRadii[frame], W12SEL... - verified
M7Scene_Run81$FD:DA5F · 95 B · EngineEvent $FF $81's scene: as M7Scene_Run80 with a shorter schedule, 256 frames: the iris opens below $20, stays open below $A0, closes below $C0, then BG1 is masked; it ends on the frame that sees... - verified
M7Scene_Run82$FD:DABE · 95 B · EngineEvent $FF $82's scene: as M7Scene_Run80 with a shorter schedule, 160 frames: the iris opens below $20, stays open below $40, closes below $60, then BG1 is masked; it ends on the frame that sees... - verified
M7Scene_Run83$FD:DB1D · 122 B · EngineEvents $FF $83-$8F's scene: M7Scene_Run80's 768-frame schedule, plus a flicker: each frame, after the NMI (which sets full brightness), M7Scene_FlickerFrac += $98 and M7Scene_FlickerIdx steps by... - verified
M7Scene_Init$FD:DB97 · 294 B · EngineSets the scene up with interrupts off: DP=$0500, DB=$00, DMA and HDMA off, forced blank, NMI off; M7Scene_Zero = 0; M7Scene_SetVectors, M7Scene_InitPpu, M7Scene_SaveWram7F; copies... - verified
M7Scene_UpdateScroll$FD:DCBD · 217 B · EngineEach frame: writes the M7Scene_Scroll records the HDMA channels 3 and 4 send. - verified
M7Scene_IrisRadii$FD:DD96 · 31 B · EngineThe iris radius for frames 0-30 of an opening or closing (indexed by M7Scene_Frame & $1F): it grows from 2 to $7F, faster and faster. - verified
M7Scene_OamInit$FD:DDB5 · 64 B · EngineOAM low-table entries (X, Y, tile, attributes) for sprites 0-15, copied by M7Scene_Init; the attributes use all four flip combinations, so the one bitmap is drawn mirrored. - verified
M7Scene_FlickerLevels$FD:DDF5 · 32 B · EngineINIDISP brightness per flicker step (M7Scene_Run83): 15 down to 1, back up to 15, then 15 for the last nine steps. - verified
M7Scene_Nmi$FD:DE15 · 114 B · EngineThe scene's NMI handler (JML from NmiTrampoline, installed by M7Scene_SetVectors). - verified
M7Scene_Irq$FD:DE87 · 17 B · EngineThe scene's IRQ handler (JML from IrqTrampoline, installed by M7Scene_SetVectors): saves and restores A, X, Y, DB and DP and does nothing else (the SEP #$20 is undone by the REP #$30 after it). - verified
FieldFD_LoadAnimSetA$FD:DE98 · 394 B · EngineFdVec_FFFA's routine.
Bank $FD · $FD:E000–$EFFF
$FD:E000
Verified · 44
- verified
FieldFD_UploadTileAnims$FD:E022 · 595 B · EngineFdVec_FFFD's routine, run from the field's IRQ (IrqHandler, on the frames Field_Unk53 bit 0 is set) to step the FieldAnimA records and send their tiles to VRAM. - verified
PalAnim_StopAll$FD:E275 · 29 B · EngineFdVec_FFEE's routine: sets .Unk0 of all 12 FieldAnimB records to 0 (kind 0: PalAnim_TickAll still steps their .Unk4 counter but runs no kind for them), so every palette animation stops. - verified
FieldFD_LoadAnimSetB$FD:E292 · 266 B · EngineFdVec_FFF4's routine. - verified
PalAnim_TickAll$FD:E39C · 155 B · EngineFdVec_FFF7's routine. - verified
PalAnim_CopyRomFrame$FD:E437 · 78 B · EngineKind 1: copies .Unk2 colours from PalAnimRom + .Unk6 (a word, .Unk6/.Unk7) + .Unk3 x .Unk2 x 2 (frame .Unk3; product by the multiplier) to Pal_CgramBuf from colour .Unk1 (through PalAnim_Dest). - verified
PalAnim_CopyListFrame$FD:E485 · 99 B · EngineKinds 8-15: as PalAnim_CopyRomFrame, but the frame is the byte at .Ptr + .Unk3 (the list FieldFD_LoadAnimSetB points .Ptr at), read through PalAnim_Dest before it is reused for the destination. - verified
PalAnim_RotateUp$FD:E4E8 · 74 B · EngineKind 3: rotates colours .Unk1 to .Unk1 + .Unk2 (.Unk2 + 1 colours, one more than the other kinds touch) up by one in both Pal_Buf and Pal_CgramBuf: each takes the colour below it, the top one... - verified
PalAnim_RotateDown$FD:E532 · 74 B · EngineKind 2: as PalAnim_RotateUp the other way: each of colours .Unk1 to .Unk1 + .Unk2 takes the colour above it, colour .Unk1 wraps to the top. - verified
PalAnim_Pulse$FD:E57C · 40 B · EngineKind 7: the phase .Unk7 += .Unk3 (8-bit, wrapping); h = the high byte of 2|.Unk7| x .Unk8 (|$80| stays $80, and 2 x $80 is 0); the level is -h (8-bit), then PalAnim_ApplyLevel scales the colours... - verified
PalAnim_Fade$FD:E5A4 · 61 B · EngineKind 5: steps the level .Unk7 by .Unk3 toward .Unk8 (down when .Unk7 >= .Unk8). - verified
PalAnim_ApplyLevel$FD:E5E1 · 110 B · Engine - verified
PalAnim_ScaleRGB$FD:E64F · 82 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 0: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red, green and blue scaled by the level in WRMPYA (channel x... - verified
PalAnim_ScaleB$FD:E6A1 · 48 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 3: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with blue scaled by the level in WRMPYA (channel x level / 256, by... - verified
PalAnim_ScaleG$FD:E6D1 · 55 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 5: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with green scaled by the level in WRMPYA (channel x level / 256, by... - verified
PalAnim_ScaleR$FD:E708 · 50 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 6 or more: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red scaled by the level in WRMPYA (channel x level /... - verified
PalAnim_ScaleRB$FD:E73A · 63 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 2: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red and blue scaled by the level in WRMPYA (channel x level /... - verified
PalAnim_ScaleRG$FD:E779 · 71 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 4: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red and green scaled by the level in WRMPYA (channel x level /... - verified
PalAnim_ScaleGB$FD:E7C0 · 71 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 1: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with green and blue scaled by the level in WRMPYA (channel x level... - verified
PalAnim_PulseWhite$FD:E807 · 37 B · EngineKind 6: as PalAnim_Pulse, but toward white: the phase .Unk7 += .Unk3 (8-bit, wrapping); the level is h = the high byte of 2|.Unk7| x .Unk8 (not negated as in kind 7), then PalAnim_ApplyWhiteLevel... - verified
PalAnim_FadeWhite$FD:E82C · 61 B · EngineKind 4: as PalAnim_Fade, but the level lightens the colours toward white (PalAnim_Whiten*: channel + (max - channel) x level / 256) instead of scaling them down, so level 0 leaves them unchanged. - verified
PalAnim_ApplyWhiteLevel$FD:E869 · 110 B · Engine - verified
PalAnim_WhitenRGB$FD:E8D7 · 94 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 0: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red, green and blue each lightened by the level in... - verified
PalAnim_WhitenB$FD:E935 · 45 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 4: for each of the .Unk2 colours from X, blue is lightened as in PalAnim_WhitenRGB and written with Pal_Buf's green bits 3-4 to the high... - verified
PalAnim_WhitenR$FD:E962 · 45 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 1: for each of the .Unk2 colours from X, red is lightened as in PalAnim_WhitenRGB and written with Pal_Buf's green bits 0-2 to the low byte... - verified
PalAnim_WhitenG$FD:E98F · 59 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 2: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with green lightened as in PalAnim_WhitenRGB and red and blue... - verified
PalAnim_WhitenRB$FD:E9CA · 71 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 5: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red and blue lightened as in PalAnim_WhitenRGB and green... - verified
PalAnim_WhitenGB$FD:EA11 · 75 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 6 or more: for each of the .Unk2 colours from X, Pal_CgramBuf gets green and blue lightened as in PalAnim_WhitenRGB. - verified
PalAnim_WhitenRG$FD:EA5C · 74 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 3: for each of the .Unk2 colours from X, Pal_CgramBuf gets red and green lightened as in PalAnim_WhitenRGB. - verified
M7Scene_SaveWram7F$FD:EAA6 · 17 B · EngineMode 7 scene, continued ($FD:EAA6–$FD:F28F): its helpers and tables (see the banner at M7Scene_Run80) - verified
M7Scene_RestoreWram7F$FD:EAB7 · 17 B · EngineCopies M7Scene_Save7F back to the 512 bytes at $7F0000. - verified
M7Scene_ScreenOff$FD:EAC8 · 18 B · EngineDMA and HDMA off, forced blank, NMI and joypad reading off, then SEI. - verified
M7Scene_ScreenOn$FD:EADA · 17 B · EngineWaits for the start of a vertical blank (RDNMI bit 7), then NMI and joypad reading on, INIDISP = 0 (display on at brightness 0; the NMI sets full brightness), CLI. - verified
M7Scene_WaitNmi$FD:EAEB · 9 B · EngineClears M7Scene_NmiFlag, waits until M7Scene_Nmi has incremented it, and clears it again. - verified
M7Scene_SetVectors$FD:EAF4 · 31 B · EnginePoints NmiTrampoline at M7Scene_Nmi and IrqTrampoline at M7Scene_Irq (a JML each). - verified
M7Scene_InitPpu$FD:EB13 · 120 B · EngineDMA and HDMA off; sprites 32x32/64x64 with tiles at VRAM word $4000; OAM address 0; BG mode 7, no mosaic; BG1SC $48 (unused in mode 7), BG tile bases 0; windows: BG1 window 1 on (W12SEL = 3... - verified
M7Scene_BuildIris$FD:EB8B · 245 B · EngineBuilds the iris window (a circle of radius M7Scene_IrisR around M7Scene_IrisX, on line M7Scene_IrisY of the table) as 255 WH0/WH1 pairs in a window buffer: M7Scene_IrisX = M7Scene_IrisY = $80... - verified
M7Scene_IrisEmptyLines$FD:EC80 · 17 B · EngineWrites A (0: none) empty window lines (WH0 = $FF, WH1 = 0) through WMDATA. - verified
M7Scene_UploadSprGfx$FD:EC91 · 47 B · EngineDMA channel 0: the 8 KB sprite bitmap M7Scene_SprGfx to VRAM word $4000 (the sprite tiles), VMAIN incrementing after the high byte. - verified
M7Scene_ClearSprGfx$FD:ECC0 · 21 B · EngineZeroes the 8 KB sprite bitmap M7Scene_SprGfx through WMDATA. - verified
M7Scene_PlotPixel$FD:ECD5 · 164 B · EngineSets pixel (x, y) = (high byte of M7Scene_PosX, high byte of M7Scene_PosY), both 0-127, of the sprite bitmap to colour A (bits 0-3, one per bitplane). - verified
M7Scene_PixelMasks$FD:ED79 · 16 B · EngineA pixel's bit in a plane byte ($80 >> n, n = x & 7), then the same inverted; M7Scene_Init copies them to M7Scene_BitMasks/ClearMasks. - verified
M7Scene_InitHdma$FD:ED89 · 410 B · EngineSets up HDMA channels 1-5 (all indirect; M7Scene_Nmi enables them): 1 M7A/M7B and 2 M7C/M7D from M7Scene_M7AB / M7CD, 3 M7X/M7Y and 4 BG1HOFS/BG1VOFS from the M7Scene_Scroll records (each for two... - verified
M7Scene_WriteScale$FD:EF23 · 76 B · EngineWrites (A x q) / 64 as a word (low byte first) through WMDATA, where q is the quotient waiting in RDDIVL: A x q is built in M7Scene_Acc ($0C-$0F, from the two 8 x 8 products of the multiplier) and... - verified
M7Scene_InitPalette$FD:EF6F · 146 B · EngineZeroes the 512 bytes of Pal_Buf, then (through WMDATA) colours 0-63: red M7Scene_PalRed[n], blue M7Scene_PalBlue[n], green 0; colours 64-127 stay black; colours 128-255 (the sprite palettes): blue...
Bank $FD · $FD:F000–$FFFF
$FD:F000
Verified · 25
- verified
M7Scene_PalRed$FD:F001 · 128 B · EngineRed (0-$16) of BG colours 0-63 (M7Scene_InitPalette): 0 up to colour 16, a ramp up and down over 17-46, then 0. - verified
M7Scene_PalBlue$FD:F081 · 128 B · EngineBlue (0-15) of BG colours 0-63: up from 0 to 15 and back, each value twice. - verified
M7Scene_PalSprBlue$FD:F101 · 34 B · EngineBlue of the sprite colours by n & 15 (M7Scene_InitPalette): 0, 0, then up by 4 to $1F at 9 and back down to 8. - verified
M7Scene_CyclePalette$FD:F123 · 94 B · EngineEach frame, for BG colours 16-47 (n = 0-31 from colour 16): red = the high byte of ((sin f + $80) & $FF) x M7Scene_CycleAmp[n], green = the same with sin(255 - f) (f = the low byte of... - verified
M7Scene_CycleAmp$FD:F181 · 64 B · EngineWords read by their low byte (M7Scene_CyclePalette, X = n x 2): the pulse depth of colour 16 + n, a ramp 0-$16 and back. - verified
M7Scene_UploadTilemap$FD:F1C1 · 44 B · EngineDMA channel 0: the 16 KB M7Scene_Tilemap to the low bytes of VRAM words 0-$3FFF (the Mode 7 tilemap; VMAIN = 0, increment after the low byte). - verified
M7Scene_BuildTilemap$FD:F1ED · 23 B · EngineWrites the 128 x 128 M7Scene_Tilemap through WMDATA (with DP=$2100 for the WRAM port): M7Scene_BuildTilemapHalf twice, so rows 64-127 repeat rows 0-63. - verified
M7Scene_BuildTilemapHalf$FD:F204 · 30 B · Engine64 rows of 128 tiles through WMDATA: row r (0-63) holds tiles (s + c) & $7F for columns c = 0-127, s = ((sin 4r + $80) & $FF) / 2. - verified
M7Scene_UploadOam$FD:F222 · 42 B · EngineDMA channel 0: the OAM shadow (Oam_LowTable and Oam_HighTable, Oam_ShadowBytes) to OAM from address 0 (OAMADDH is not written). - verified
M7Scene_InitOam$FD:F24C · 26 B · EngineHides all 128 sprites in the OAM shadow: each Y byte of Oam_LowTable = $F0, each Oam_HighTable byte = $55 (X bit 8 set, small). - verified
M7Scene_UploadPalette$FD:F266 · 42 B · EngineDMA channel 0: the 512 bytes of Pal_Buf to CGRAM from colour 0. - verified
FieldAnimListAPtrs$FD:F290 · 128 B · Engine!FieldRom_AnimListAPtrs: one word per LocRom.Tileset12 & $3F ($00-$3F), the offset of its list from FieldAnimListA. - verified
FieldAnimListA$FD:F310 · 1,719 B · Engine!FieldRom_AnimListA: FieldFD_LoadAnimSetA's lists. - verified
FieldAnimListBPtrs$FD:F9C7 · 176 B · Engine!FieldRom_AnimListBPtrs: one word per LocRom.Palette ($00-$57), the offset of its list from FieldAnimListB; labels named as for FieldAnimListAPtrs. - verified
FieldAnimListB$FD:FA77 · 1,202 B · Engine!FieldRom_AnimListB: FieldFD_LoadAnimSetB's lists, 6 records each (one per FieldAnimB record 0-5), by the high nibble of the first byte: db $00-$0F: no animation (.Unk0 = 0); db... - verified
FieldAnimListBOldTail$FD:FF29 · 188 B · EngineNothing found reads it (no matched code refers to it, xref finds no call or jump into it), and it lies past the end of every list: the same bytes as FieldAnimListB's $FE6C-$FF27 (from the frame... - verified
FdVec_FFE5$FD:FFE5 · 3 B · EngineThe bank's service vectors: JMPs at fixed addresses near the end of the bank, so code in other banks can reach them by JSL or JML. - verified
FdVec_FFE8$FD:FFE8 · 3 B · EngineJMP to M7Scene_Run82 (event $FF $82; never returns). - verified
FdVec_FFEB$FD:FFEB · 3 B · EngineJMP to M7Scene_Run81 (event $FF $81; never returns). - verified
FdVec_FFEE$FD:FFEE · 3 B · EngineJMP to PalAnim_StopAll. - verified
FdVec_FFF1$FD:FFF1 · 3 B · EngineJMP to M7Scene_Run80 (event $FF $80; never returns). - verified
FdVec_FFF4$FD:FFF4 · 3 B · EngineA service vector (see FdVec_FFE5): JMP to FieldFD_LoadAnimSetB, which ends with RTL. - verified
FdVec_FFF7$FD:FFF7 · 3 B · EngineJMP to PalAnim_TickAll, which runs the 12 FieldAnimB palette animation records at $0520 (Field_EndOfFrame calls it every frame). - verified
FdVec_FFFA$FD:FFFA · 3 B · EngineJMP to FieldFD_LoadAnimSetA. - verified
FdVec_FFFD$FD:FFFD · 3 B · EngineJMP to FieldFD_UploadTileAnims (from the field's IRQ).
Bank $FF · $FF:0000–$0FFF
$FF:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:1000–$1FFF
$FF:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:2000–$2FFF
$FF:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:3000–$3FFF
$FF:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:4000–$4FFF
$FF:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:5000–$5FFF
$FF:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:6000–$6FFF
$FF:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:7000–$7FFF
$FF:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:8000–$8FFF
$FF:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:9000–$9FFF
$FF:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:A000–$AFFF
$FF:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:B000–$BFFF
$FF:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:C000–$CFFF
$FF:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:D000–$DFFF
$FF:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:E000–$EFFF
$FF:E000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:F000–$FFFF
$FF:F000
Verified · 27
- verified
BankFF_BuildTileSets$FF:F548 · 224 B · EngineBuilds tile sets in WRAM from the ten 2bpp tiles of MenuRom_GlyphRows (narrow glyphs, probably the digits 0-9: the code combines their right-hand pixels into tile pairs): - copies the ten tiles... - verified
BankFF_LoadE4Palette$FF:F628 · 79 B · EngineCopies a set of 12 colours from bank $E4 into Menu_PalBuf and marks it for upload (Menu_PalDirty counted up). - verified
BankFF_BuildScreenMap$FF:F677 · 123 B · EngineUnpacks MenuRom_ScreenGfx into Menu_SprUnpackBuf (Decomp_ToWramVec), sets Menu_Unk0D0E to $01FF, and builds a map at Menu_Bg3TileBuf: six pairs of identical 32-byte rows, each row the 16 tile... - verified
BankFF_ScreenMapTiles$FF:F6F2 · 12 B · Engine6 tilemap words, the first entry of each row pair BankFF_BuildScreenMap writes (each next entry is one tile on). - verified
BankFF_ScreenColoursA$FF:F6FE · 8 B · Engine4 words BankFF_BuildScreenMap copies to !Menu_Unk9100 (colours, probably, from the values; the reader is not traced). - verified
BankFF_ScreenColoursB$FF:F706 · 16 B · Engine8 colours BankFF_BuildScreenMap copies to !Menu_PalBuf + $30 (colours $18-$1F of the menu's CGRAM copy). - verified
BankFF_StepWave$FF:F716 · 67 B · EngineSteps a wave and writes it out: Menu_WavePhase and Menu_WaveTick count up; every 4th call Menu_Unk0D0C counts up, Menu_Unk0D0E down and the phase goes back by 2 (a net drift of 1 back per 4 calls). - verified
ScrollWaveFF_A$FF:F759 · 64 B · EngineWave tables ($FF:F759–$FF:F7D8) A byte-identical copy of ScrollWaveA/ScrollWaveB in bank $00 ($C0:FF30–$C0:FFAF): one period of a sine-like wave between -6 and +6 (32 signed 16-bit entries)... - verified
ScrollWaveFF_B$FF:F799 · 64 B · Engine - verified
BankFF_WidenTiles$FF:F7D9 · 58 B · EngineCopies the ten 2bpp tiles of MenuRom_ShadowTiles into Menu_ShadowTiles 32 bytes apart, and sets each tile's plane-2 bytes (offset $10, $12 ... $1E) to plane 0 | plane 1 of the same row, so every... - verified
BankFF_UnkF813$FF:F813 · 318 B · EnginePart of Menu_BuildItemTables' set-up of the tech data (meaning partly inferred). - verified
BankFF_TechStepLimit$FF:F951 · 7 B · Engine1 B per character id 0-6, read by BankFF_UnkF813: a character whose !Menu_Unk7F01E0 bit is clear gets its next single tech marked only while the count it found is below this ($FF: always; 0: never). - verified
BankFF_UnkF958$FF:F958 · 99 B · EngineSets Menu_Unk04A4 entry c (c = 0-4) to 1 when combo c is available, else 0: all the characters in its MenuRom_ComboMembers are in Menu_PartyOrder and the three techs its MenuRom_ComboNeeds names... - verified
BankFF_CharBits$FF:F9BB · 9 B · Engine$80 >> n for n = 0-7, then 0: a character id's bit (as in !Menu_Unk29AF and the tech bytes). - verified
BankFF_UnkF9C4$FF:F9C4 · 55 B · EngineChecks save slot DP $79 (low 2 bits): BankFF_SetSlotOfs, then with DB = $30 (SRAM): A = DP $00 (16-bit) = BankFF_SlotNoSign ($8080) when the slot's Menu_SramSlotSign is not BankFF_SlotSign... - verified
BankFF_SaveSlot$FF:F9FB · 128 B · EngineSaves the game to slot DP $79 (Menu_SlotIdx): Menu_Unk0414 = the slot; Menu_SaveCount counts up (it stays at $FFFF); then each BankFF_SaveRecords block goes to SRAM through Menu_NmiMoveCode... - verified
BankFF_SaveRecords$FF:FA7B · 40 B · EngineThe blocks of a save slot, in order (BankFF_SaveSlot, BankFF_LoadSlot): 8 records of 5 B: address (2 B), bank (1 B), length (2 B). - verified
BankFF_LoadSlot$FF:FAA3 · 74 B · EngineLoads slot Menu_SlotIdx back: the same BankFF_SaveRecords blocks, read from SRAM (Menu_NmiMoveCode as MVN from bank $30, destination bank patched per record), from the slot's offset on. - verified
BankFF_LoadSlotPart$FF:FAED · 212 B · EngineLoads part of slot Menu_SlotIdx: the BankFF_PartRecords blocks (the inventory without $2980-$29AF, and the names), then Menu_Unk7F01E0 = the slot's byte $07E3; then puts each character 6-0 back... - verified
BankFF_PartRecords$FF:FBC1 · 14 B · EngineBankFF_LoadSlotPart's blocks: 2 records of 7 B: offset in the slot (2 B), address (2 B), bank (1 B), length (2 B). - verified
BankFF_EquipOffsets$FF:FBCF · 4 B · EngineOffsets of four equipment bytes in a character record ($27, $28, $2A, $29), read backwards by BankFF_LoadSlotPart (entry 3, the $29 byte, is left out for character 5). - verified
BankFF_SetSlotOfs$FF:FBD3 · 14 B · EngineMenu_SlotSramOfs (DP $7B) = BankFF_SlotSramOfs entry DP $79 & 3. - verified
BankFF_SlotSramOfs$FF:FBE1 · 6 B · EngineSRAM offset of save slots 0-2 ($A00 B apart). - verified
BankFF_SlotChecksum$FF:FBE7 · 29 B · EngineSums the $500 words of the slot at Menu_SlotSramOfs (DP $7B) in SRAM (bank $30, through DP $00 as a pointer), with the carry of each ADC going into the next. - verified
BankFF_BuildGradHdma$FF:FC04 · 83 B · EnginePoints DMA channel 1's table (A1T1L/H) at Menu_GradHdma and builds an HDMA table there: $60 lines with the two bytes $00, $E0, then 16 groups of three 1-line entries with the bytes $02 (groups... - verified
BankFF_GradValues$FF:FC57 · 16 B · EngineThe third byte of each BankFF_BuildGradHdma group: $E8 down to $E0, then $E1 up to $E7 (COLDATA-style values, probably; the register channel 1 feeds is not set here). - verified
BankFF_OldBuildLeftovers$FF:FC67 · 921 B · EngineNot code that runs: tools/xref.py finds no call or jump into $FF:FC67-$FFFF from code.
How much of the game's code is matched, and how far each routine has come. Every figure on this page is generated when the site is built; nothing here is typed by hand.
A routine moves through three levels, each including the one before:
- matched: every byte from its label to the next is emitted by the source and equals the
original ROM (
make diff, andmake verify, which assembles onto blank bases so a routine can't hide behind original bytes); - readable: it also meets the project's readability standard (named RAM, calls and constants,
explicit widths, a header with its CPU state on entry and exit), checked by
tools/lint_readability.py; - verified: an independent reviewer approved its current source. The approval is a row in a
review round file (
symbols/reviews/rNNN.csv) that carries the routine's source hash, so any later edit to the routine sends it back for review.
The share of code is measured against the roughly 240 KB (239,779 bytes) of the 4 MB ROM that is
65816 code; the rest is graphics, music, maps and text. The source also emits data (tables, $FF fill, leftovers of
an older build): each routine in functions.csv has a kind, data when its source is only
db/dw/dl/fill lines, and the share counts code bytes alone, with the data bytes shown beside
it. A bank's code size comes from the code survey (symbols/code_survey.csv in the code repo) until
its source covers the whole bank, then from the source itself (bank $C0). The survey counts the
matched code, the unmatched code a flow trace reaches from it and from the interrupt vectors, and
an allowance for code reached only through indirect jumps (code-like blocks next to traced code);
the SPC700 sound driver (7 KB) and the compressed code in $C3 (26 KB) are listed apart and not
counted. An earlier survey gave about 358 KB: it counted the song data in $CA/$CB and data in
$CC, $DE, $E4, $E5, $F5-$F9, $FC and $FE as code. A bank whose matched code
outgrows its survey is measured against the matched figure and marked "survey low".
The survey's estimate for unmatched code tends to be low, and a low code estimate makes the
share high. Hiding a bank's source and surveying it again (tools/code_survey.py --calibrate)
gave estimates 2.3% low for $C0, 3.7% for $C1, 4.0% for $FD (with 94% of its code found) and
17.6% for $C2, whose code is reached mostly through tables the trace cannot follow. The survey
gives a low and a high total (232,629 and 262,780 bytes): on 2026-10-14 the share was 71.27%, with a
range of about 65-73% (65.0% against the high total, 73.5% against the low), and the true figure is
more likely below the headline than above it. After the $C1, $C2 and $FD batches merged later
that day the share was 76.01% (about 69-78% against the same two totals), and after the $C3
kernel and the $C7 sound interface 78.44%, after the $CF battle code 80.97%, and after the $CC set-up code and the $FF menu routines 83.49%, after the first part of $CD 85.86%, after $D1's battle effects 87.87%, after $CE's code 89.16%, and after the battle effect script's opcodes 91.54%, after the item screen in $C2 93.36%, with the rest of $CD 94.61%, after the tech and settings screens 96.63%, after the shop, name entry and load screen 98.62%, after $C6's scene helpers 99.71%, still 99.71% with the rest of $C2 (the survey had under-counted it), and 100% of reachable 65816 code in ROM once the survey was redone (the SPC700 driver and the compressed $C3 module counted apart).
By level
| Level | Meaning | Functions | Code bytes | Data bytes | Of all code |
|---|---|---|---|---|---|
| matched | assembles to the original bytes | 3,736 | 249,251 | 23,638 | 100.0% |
| readable | matched, and meets the readability standard | 3,736 | 249,251 | 23,638 | 100.0% |
| verified | readable, and passed an independent review | 3,736 | 249,251 | 23,638 | 100.0% |
Each level includes the next one up: verified functions are also readable, and readable functions are also matched. The share counts code bytes only; data bytes are tables and fill the source also emits.
By bank
| Bank | Code bytes | Matched code | Matched data | Matched | Matched fns | Readable | Verified |
|---|---|---|---|---|---|---|---|
$C0 | 60,857 | 60,857 | 4,679 | 100.0% | 747 | 747 | 747 |
$C1 | 62,682 | 62,682 | 2,854 | 100.0% | 764 | 764 | 764 |
$C2 | 60,695 | 60,695 | 4,841 | 100.0% | 1,396 | 1,396 | 1,396 |
$C3 | 4,076 | 4,076 | 223 | 100.0% | 43 | 43 | 43 |
$C6 | 3,619 | 3,619 | 477 | 100.0% | 51 | 51 | 51 |
$C7 | 2,672 | 2,672 | 929 | 100.0% | 36 | 36 | 36 |
$CC | 4,995 | 4,995 | 0 | 100.0% | 14 | 14 | 14 |
$CD | 15,824 | 15,824 | 560 | 100.0% | 365 | 365 | 365 |
$CE | 3,729 | 3,729 | 256 | 100.0% | 10 | 10 | 10 |
$CF | 7,013 | 7,013 | 411 | 100.0% | 58 | 58 | 58 |
$D1 | 5,858 | 5,858 | 532 | 100.0% | 67 | 67 | 67 |
$FD | 15,668 | 15,668 | 6,695 | 100.0% | 158 | 158 | 158 |
$FF | 1,563 | 1,563 | 1,181 | 100.0% | 27 | 27 | 27 |
By day
By address
Each cell is a 4 KB slice of a bank; select one for the routines inside. The address map shows every code bank.
Boot and field engine: game loop, NMI, location loading, map, event scripts, sprites
Battle engine: main loop, turn lists, enemy scripts, actions, menu, targeting, status bar
Scene mode (locations $01F0 and up), menu entry points, text decoder
Kernel of the compressed scene module (its decompressor $C3:0557 is called from many banks); the module itself is packed at $C3:1313
Scene helper routines ($C6:E000-$EE3F) and scene tables
Sound driver interface (the engine calls $C7:0004 for audio commands), the SPC700 sound driver, samples
Item and tech name tables read by the battle menu, plus code
Called every battle frame through $CD:0009
Battle routines called from $CD and $D1 ($CE:E000-$F0DF)
Battle bootstrap at $CF:FB65
Battle window maps (the command window is copied from $D1:5800)
Main init, battle helpers, field HDMA and location animation set-up
Menu helper routines ($FF:F540-$FFFF)
- matched (and readable)
- every routine verified
- ✓3routines verified so far
- not matched yet
- bar: share of the slice matched
Bank $C0 · $C0:0000–$0FFF
$C0:0000
Verified · 43
- verified
ReentryVectors$C0:0000 · 14 B · EngineMid-game re-entry vector table at the start of the bank. - verified
GameLoop$C0:000E · 79 B · Enginefull (cold) init, then the game loop - verified
GameLoop_Main$C0:005D · 21 B · Enginewarm-restart entry. - verified
GameLoop_NotBankC2$C0:0072 · 11 B · Enginereached when bit 15 of Loc_Id - Loc_FirstBankC2 is set. - verified
GameLoop_LoadField$C0:007D · 26 B · Engineloads the field location Loc_Id and falls into the per-frame loop. - verified
GameLoop_FrameBody$C0:0097 · 40 B · Enginethe per-frame field loop. - verified
Field_EndOfFrame$C0:00BF · 31 B · EngineEnd-of-frame work, called once per frame just before Field_WaitFrame waits for the NMI; it is not an interrupt handler and waits for nothing itself. - verified
Field_EndOfFrameShort$C0:00DE · 13 B · Enginethe EngFD_UnkC2C1 + FdVec_FFF7 part of Field_EndOfFrame only, for the fade and idle loops. - verified
Field_IdleFrame$C0:00EB · 9 B · Engineone frame of field upkeep without game logic: Field_FrameUpdate, Field_EndOfFrameShort, Field_WaitFrame (tail jump, whose RTS returns to this routine's caller). - verified
LoadLocation$C0:00F4 · 39 B · EngineOne-time location-load called once per scene entry from GameLoop_LoadField (its only caller, JSR at $C0:0088). - verified
Field_SaveState$C0:011B · 138 B · Engine(was Sub_011B.) Saves the field before handing control to bank $C2 (BankC2_Entry8000), so Field_RestoreState can rebuild it after: - if Field_Unk29 is set, force it to 1 and clear Field_Unk26/27... - verified
Field_RestoreState$C0:01A5 · 167 B · Engine(was Sub_01A5.) Rebuilds the field after a bank-$C2 round trip: 1. - verified
Scene_Unk024C$C0:024C · 55 B · EngineThe check DefaultHandler makes before starting a battle (its SceneFlag_Battle path): C=1 means no battle after all, and DefaultHandler then clears the flag; C=0 goes on to the battle. - verified
Scene_Unk0283$C0:0283 · 200 B · EngineRebuilds the field after a battle; DefaultHandler calls it right after JSL EngCall_BattleMain. - verified
Field_Unk034B$C0:034B · 68 B · EngineScene_Unk024C's no-battle path, and the end of Scene_Unk0283's rebuild (fall-through). - verified
Field_Unk038F$C0:038F · 12 B · EngineFills the field/battle hand-off block before a battle (see the FieldBtl* structs in ram_engine.inc): FieldBtl_SaveTileAttrs, FieldBtl_SavePartyPos, FieldBtl_SaveObjs, then FieldBtl_SavePpu as a... - verified
FieldBtl_SaveTileAttrs$C0:039B · 127 B · EngineCopies the 16 x 16-tile window of Map_TileAttrA at the screen origin (Map_TileOriginX/Y / 2, wrapped with Map_ColMask1 / Map_RowMask1) to FieldBtl_AttrA, the same window of Map_TileAttrB to... - verified
FieldBtl_SavePartyPos$C0:041A · 211 B · EngineFor each party member present (Party_ObjSlot, Party_ObjSlot1, Party_ObjSlot2; bit 7 = none) fills its FieldBtlPc record: tile X/Y relative to FieldBtl_OriginX/Y (Map_TileOriginX/Y / 2, unmasked... - verified
FieldBtl_SaveObjs$C0:04ED · 106 B · EngineMarks all 8 FieldBtlObj records empty (Unk05/Unk06 = FieldBtl_NoObj) and all 8 FieldBtl_ObjSlots $FF, then runs FieldBtl_SaveObj for Field_BattleObjList entries 0-5 until one has bit 7 set. - verified
FieldBtl_SaveObj$C0:0557 · 192 B · EngineSaves one object (A = its slot) in a FieldBtlObj record, unless its Obj_VramTile low byte is FieldBtl_ObjTileLimit or more (then it does nothing). - verified
Field_Unk0617$C0:0617 · 86 B · EngineFills Field_BattleObjList for Scene_Unk024C: walks the object slots from Evt_ObjCount x 2 down to 2 (slot 0 is never looked at) and lists each one that has Obj_Unk1A81 bit 7 set or Obj_Unk0F00... - verified
FieldBtl_SavePpu$C0:066D · 168 B · EngineFills FieldBtlPpu from the field's screen settings: the three tilemap bytes (each a Map_TilemapVram* high byte ORed with a size byte), the main/sub screen and colour-math values, Fade_FixedColor... - verified
FieldBtl_Restore$C0:0715 · 86 B · EngineScene_Unk0283's object rebuild after a battle: FieldBtl_RestOriginX/Y = Map_TileOriginX/Y / 2, FieldBtl_RestoreObjs, FieldBtl_RestoreParty (both with 8-bit X/Y), then Oam_BuildShadow. - verified
FieldBtl_RestoreObjs$C0:076B · 129 B · EngineFor each of the 8 FieldBtl_ObjSlots that holds a slot (bit 7 clear): Obj_DrawUnlink the object (Obj_Cur = slot), then FieldBtl_RestoreObj with X = its record offset (n x FieldBtl_ObjRecSize). - verified
FieldBtl_RestoreObj$C0:07EC · 133 B · EnginePuts one object (A = slot) back from its FieldBtlObj record (X = record offset). - verified
FieldBtl_RestoreParty$C0:0871 · 47 B · EngineObj_DrawUnlink then FieldBtl_RestorePc for each party member from its FieldBtlPc record. - verified
FieldBtl_RestorePc$C0:08A0 · 101 B · EngineFieldBtl_RestoreObj's restore path for a party member (A = slot, X = FieldBtlPc record offset): Obj_TileX/Y, the low bytes of Obj_PosX/Y, Obj_LastFrame, Obj_ScreenX/Y and Obj_AnimTimer = 0 from... - verified
Field_RestoreSaveBlock$C0:0905 · 19 B · Engine(was Sub_0905.) Copies SceneSave_Buffer ($7F:2000) back over Field_SaveBlock ($7E:0920, $14E0 bytes). - verified
Field_StashSaveBlock$C0:0918 · 19 B · Engine(was Sub_0918.) Copies Field_SaveBlock ($7E:0920, $14E0 bytes) to SceneSave_Buffer ($7F:2000). - verified
LocLoad_Unk092B$C0:092B · 53 B · EngineFirst location-load step: Loc_RecOfs = (Loc_Id & $FF) x LocRom_RecSize, plus LocRom_HalfOfs when Loc_Id bit 8 is set, i.e. - verified
LocLoad_Unk0960$C0:0960 · 125 B · EngineLoads the graphics of layers 1 and 2. - verified
LocLoad_Unk09DD$C0:09DD · 55 B · EngineUnpacks the layer 1/2 metatile table: unless LocRom.Tileset12 is LocRom_SetNone, its LocGfx_Meta12Ptrs entry is unpacked with Decomp_ToWramVec to Map_Meta12TL ($7E:B000), over the MapProps that... - verified
LocLoad_Unk0A14$C0:0A14 · 60 B · EngineUnpacks the layer-3 metatile table: unless Field_UnkBB is set (no layer 3, LocLoad_Unk6DCF) or LocRom.Tileset3 is LocRom_SetNone, its LocGfx_Meta3Ptrs entry is unpacked with Decomp_ToWramVec to... - verified
LocLoad_DrawMap$C0:0A50 · 175 B · EngineDraws the freshly loaded map: - Map_LoadTreasureTiles (DP=$1D00), Ppu_SetBgLayout and Ppu_ApplyMapScreens; - with DP=$1D00: Map_InitOrigin, LocLoad_EmptyStep, the tilemap VRAM bases... - verified
Field_RefreshHdmaLong$C0:0AFF · 41 B · Engine(was the stub AudioDrvSync; it touches no sound.) A JSL service for other banks (ReentryVectors [2]): with DP_Field and DB=$00, sets Field_Unk53Bit7, runs EngFD_UnkC2C1 twice (so both of its... - verified
Scene_ResumeNmi$C0:0B28 · 38 B · EngineScene_ReloadStep's last setup: EngFD_UnkC124 (writes HDMA table bytes in bank $7F from the map's tilemap settings; not traced), EngFD_UnkC2C1 (with 8-bit X/Y) and Hdma_InitChannelsFD, then waits... - verified
InitHW$C0:0B4E · 22 B · EngineDisables interrupts, enables forced blank, clears NMI/DMA/HDMA, and sets DB=$00 (PHA/PLB), which GameLoop_Main and other callers rely on. - verified
InstallNMI$C0:0B64 · 17 B · EngineWrites JML NmiHandler ($C0:EA63) into the RAM trampoline at $7E:0500. - verified
InstallIRQ$C0:0B75 · 17 B · EngineWrites JML IrqHandler ($C0:ECCC) into the RAM trampoline at $7E:0504. - verified
Field_InitLoadState$C0:0B86 · 240 B · Engine(was FrameStateInit.) Called once per location load from GameLoop_LoadField, not per frame. - verified
Field_SceneChangeTick$C0:0C76 · 258 B · Engine(was Sub_0C76.) Runs every frame from GameLoop_FrameBody. - verified
ModeE6_Handler$C0:0D78 · 231 B · EngineTile animation for map-tile state $E6: a 1x2 column, the tile at (Field_TileAnimX, Field_TileAnimY) and the one above it. - verified
ModeEC_Handler$C0:0E5F · 437 B · EngineTile animation for map-tile state $EC: a 2x2 block, columns col..col+1, rows row-1..row.
Bank $C0 · $C0:1000–$1FFF
$C0:1000
Verified · 35
- verified
ModeEE_Handler$C0:1014 · 437 B · EngineTile animation for map-tile state $EE: a 2x2 block, columns col-1..col, rows row-1..row (ModeEC_Handler mirrored). - verified
ModeFA_Handler$C0:11C9 · 651 B · EngineTile animation for map-tile state $FA: a 2-wide, 3-tall block, columns col..col+1, rows row-2..row. - verified
ModeFC_Handler$C0:1454 · 648 B · EngineTile animation for map-tile state $FC: a 2-wide, 3-tall block, columns col-1..col, rows row-2..row (ModeFA_Handler mirrored). - verified
DefaultHandler$C0:16DC · 509 B · EngineThe rest of Field_SceneChangeTick's request handling: reached by BRL when Field_SceneFlags bit 4 is clear or the tile mode is not one of the five Mode*_Handlers, by BRL at the end of ModeE6-FA... - verified
Field_PauseAndMenuInput$C0:18D9 · 172 B · Engine(was Sub_18D9.) Per-frame pause and menu input, called from GameLoop_FrameBody before Field_SceneChangeTick. - verified
Field_FadeToBankC2Mode5$C0:1985 · 66 B · Engine(was Sub_1985.) Called from Field_PauseAndMenuInput when Pad_Unk00F6 bit 0 is set. - verified
Field_RunBankC2Mode5$C0:19C7 · 60 B · Engine(was Sub_19C7.) Calls BankC2_Entry8000 with A = 5, X = 0 (meaning of 5 unverified; earlier notes called it "BG mode 5"), then reloads the field: restore state, re-init changed party members, move... - verified
Party_ReinitIfChanged$C0:1A03 · 169 B · Engine(was Sub_1A03.) After a bank-$C2 round trip: if Party_Members no longer matches the copy taken at load (Party_MembersCache), re-run the init function of every character object that exists... - verified
Field_ActionButton$C0:1AAC · 51 B · Engine(was Field_Unk1AAC.) Per-frame check of the action button: does nothing unless Pad_Unk00F6 bit 7 (A, if Pad_Unk00F6 has the Pad_Pressed layout) is set. - verified
Sub_1ADF$C0:1ADF · 87 B · Engine (unnamed)Purpose unknown: every variable it touches (Field_Unk34, Field_Unk62-66, Pad_Unk00F6-F8) is still unidentified, so it keeps its address name. - verified
Bg_TilemapIndex64x32$C0:1B36 · 29 B · Engine(was Sub_1B36.) Word offset of an 8x8 tile in a 64x32 BG tilemap made of two 32x32 screens side by side. - verified
LocLoad_AudioSetup$C0:1B53 · 61 B · EngineLoadLocation's sound step. - verified
Audio_PlayTileSfxA$C0:1B90 · 2 B · Engine(was Sub_1B90.) Plays sound effect Audio_SfxTileAnimA through the sound driver: Audio_CmdId = $19 (play effect), Arg0 = effect id, Arg1 = the low byte of the party leader's Obj_ScreenX (presumably... - verified
Audio_PlaySfxAtLeader$C0:1B92 · 21 B · Engineshared tail; Audio_PlayTileSfxA falls in here and Audio_PlayTileSfxB branches here (BRA at $C0:1BA9). - verified
Audio_PlayTileSfxB$C0:1BA7 · 4 B · Engine(was Sub_1BA7.) Plays sound effect Audio_SfxTileAnimB: same as Audio_PlayTileSfxA with the other effect id, sharing its tail Audio_PlaySfxAtLeader. - verified
MusicCueDispatch$C0:1BAB · 59 B · EngineBefore a battle, probably: with FieldBtl_EvtKeepMusic clear, Audio_Unk1E10 = $FF and command Audio_Cmd14 with Audio_CmdArg0 = Audio_SfxUnkFA ($45 at load: the battle music, probably); with it set... - verified
AudioFadeDispatch$C0:1BE6 · 278 B · EngineAfter a battle, probably, by FieldBtl_Result: - 1 (wait for a button and restart: the party lost, probably) unless FieldBtl_EvtNoReset: Audio_Unk1E10 = 0; Audio_CmdUnk81 (0, 0, $FF); Audio_Cmd14... - verified
Field_FindObjInFront$C0:1CFC · 90 B · EngineLooks for an object the leader can act on in the facing direction. - verified
Field_ObjInReachTable$C0:1D56 · 8 B · EngineField_FindObjInFront's reach test for each facing, indexed by Obj_Facing x 2. - verified
Field_ObjInReachUp$C0:1D5E · 38 B · EngineFacing 0: the object in Field_UnkEB is in reach when it is above the leader (Obj_PosY - Field_FindLeaderY negative) by less than Field_ReachAhead and off the leader's column by less than... - verified
Field_ObjInReachDown$C0:1D84 · 35 B · EngineFacing 1: as Field_ObjInReachUp for an object below the leader (Obj_PosY - Field_FindLeaderY not negative). - verified
Field_ObjInReach_No$C0:1DA7 · 4 B · Engine - verified
Field_ObjInReachLeft$C0:1DAB · 38 B · EngineFacing 2: as Field_ObjInReachUp with X and Y swapped: in reach when the object is left of the leader (Obj_PosX - Field_FindLeaderX negative) by less than Field_ReachAhead and off its row by less... - verified
Field_ObjInReachRight$C0:1DD1 · 35 B · EngineFacing 3: as Field_ObjInReachLeft for an object right of the leader (Obj_PosX - Field_FindLeaderX not negative). - verified
Field_CheckTileInFront$C0:1DF4 · 158 B · EngineThe action button's map check: treasure on the tile in front of the leader. - verified
Field_TileInFrontTable$C0:1E92 · 8 B · EngineField_CheckTileInFront's tile pick for each facing, indexed by Obj_Facing x 2. - verified
Field_TileInFrontUp$C0:1E9A · 45 B · EngineFacing 0: the tile one row above the leader (Obj_TileY - 1). - verified
Field_TileInFrontDown$C0:1EC7 · 23 B · EngineFacing 1: the tile one row below the leader. - verified
Field_TileInFront_No$C0:1EDE · 2 B · Engine - verified
Field_TileInFrontLeft$C0:1EE0 · 23 B · EngineFacing 2: the tile one column left of the leader. - verified
Field_TileInFrontRight$C0:1EF7 · 23 B · EngineFacing 3: the tile one column right of the leader. - verified
Field_CheckTileInFront_Start$C0:1F0E · 22 B · EngineField_CheckTileInFront's tail: A = the TreasureKind_* value. - verified
Fade_StepBrightness$C0:1F24 · 54 B · Engine(was Sub_1F24.) Brightness fade: steps Fade_Brightness one unit toward Fade_BrightnessTarget every Fade_BrightnessDelay+1 frames and clears FadeFlag_Brightness when it gets there (or reaches 0... - verified
Fade_StepFixedColor$C0:1F5A · 45 B · Engine(was Sub_1F5A.) Fixed-colour fade: steps Fade_FixedColor one unit toward Fade_FixedColorTarget every Fade_FixedColorDelay+1 frames and clears FadeFlag_FixedColor when it gets there. - verified
Field_Unk1F87$C0:1F87 · 299 B · EngineBy Field_Unk29 (the message state): - 0: nothing.
Bank $C0 · $C0:2000–$2FFF
$C0:2000
Verified · 49
- verified
Field_MsgClearBuf$C0:20B2 · 64 B · EngineZeroes the 1 KB text buffer Field_Unk7EF000 ($7E:F000-$7E:F3FF) as Map_ClearBufC800 does: two MVNs copy the 32 zero bytes at GfxRom_D2 to its first 64 bytes, then each MVN copies the zeroed part... - verified
Field_MsgStart$C0:20F2 · 52 B · EngineStarts the text window on the message: TextWin_StrIndex = Field_Unk2A; the string table TextWin_StrTable = FieldMsg_TreasureStrs ($DE:FF00) while Field54_WatchBox is set in Field_Unk54 (a treasure... - verified
Field_MsgStep$C0:2126 · 187 B · EngineOne step of the message text. - verified
Field_EventHookDispatch$C0:21E1 · 13 B · EngineRuns the Field_EventHook handler for this frame: entry Field_EventHook - 1 of Field_EventHookTable; nothing when it is 0. - verified
Field_EventHookTable$C0:21EE · 32 B · Engine16 handler addresses, indexed by (Field_EventHook - 1) x 2. - verified
Field_HookWinGrow0$C0:220E · 91 B · EngineHook 1: one frame of a growing window shape. - verified
Field_HookWinShrink0$C0:2269 · 111 B · EngineHook 2: the reverse of hook 1. - verified
Field_HookWinC3E$C0:22D8 · 81 B · EngineHook 3. - verified
Field_HookIdle$C0:2329 · 1 B · Engine - verified
Field_HookWinGrow1$C0:232A · 96 B · EngineHook 4: hook 1 with the colour window instead of BG windows: WOBJSEL enables colour window 1, CGWSEL limits colour math to inside the window (with the sub screen added), and BankC3_Entry0008 runs... - verified
Field_HookWinShrink1$C0:238A · 88 B · EngineHook 5: the reverse of hook 4 (mode 1, colour window). - verified
Field_HookWinShrink1_Off$C0:23E2 · 39 B · Engine - verified
Field_HookWinQuad$C0:2409 · 267 B · EngineHook 6: a colour-window shape from four moving points, for WinFx_QuadTimer frames. - verified
Field_HookWinFixedA$C0:2514 · 117 B · EngineHooks 7 and 8: a fixed shape (centre WinFx_FixedX/Y, size WinFx_FixedSizeA, mode 0) on BG3's window 1, inverted; colour math outside the window only. - verified
Field_HookWinFixedB$C0:2589 · 133 B · EngineHooks 9 and 10: as hooks 7/8 with size WinFx_FixedSizeB, window 1 on BG2 and BG3 (not inverted), and different layer and colour-math bytes: Ppu_Unk0BD7/Hdma_Unk7F1520 = BG3... - verified
Field_HookLeaveToBankC3$C0:260E · 65 B · EngineHook 11: leaves the field for good. - verified
Field_HookWinPulse$C0:264F · 214 B · EngineHook 12, a blocking sequence that runs its own frames (each one Field_EndOfFrameShort + Field_WaitFrame, with no Field_FrameUpdate): redraws the map (Field_BuildC800Mode1, Field_Unk74E8/74F7... - verified
Field_WinPulseDraw$C0:2725 · 40 B · EngineOne frame of Field_HookWinPulse's shape: WinFx_Size to WinFx_ArgSize, table WinFx_TableA or WinFx_TableB by Field_Unk53, then BankC3_Entry0008 in mode $80 (WinFx_ArgX/Y were set by the caller). - verified
Field_ServiceUnk54$C0:274D · 158 B · Engine(was Field_Unk274D.) Per-frame service of the Field_Unk54 requests, first match wins: - bit 4 (Field54_Credits): build the next line of the staff credits. - verified
Field_ServiceUnk54_SendLine$C0:27EB · 57 B · Engine - verified
Field_FadeInAfterReload$C0:2824 · 36 B · Engine(was Sub_2824.) Fade-in after a reload: unless Scene_ReloadStep returns nonzero, raises Fade_Brightness one step per frame (input disabled around Field_FrameUpdate) until it reaches full brightness. - verified
Scene_SettleFrames$C0:2848 · 36 B · EngineThe field-load fade-in: a copy of Field_FadeInAfterReload just before it, differing in one call. - verified
Scene_ReloadStep$C0:286C · 62 B · EngineRebuilds the screen after a location load or a bank-$C2 round trip, before the fade-in: TileAnimList_ApplyAll, LocLoad_DrawMap, the object resets Field_ResetUnk0B88, Field_ResetUnk0B80... - verified
TileAnimList_Clear$C0:28AA · 22 B · EngineFills TileAnimList with TileAnimList_Empty (all 16 entries). - verified
TileAnimList_AddCurrent$C0:28C0 · 33 B · EngineAdds the tile at Field_TileAnimX/Y (the 16-bit word) to TileAnimList: from the first entry on, it stops at an entry equal to it (already listed) or puts it in the first empty one. - verified
TileAnimList_ApplyAll$C0:28E1 · 24 B · EngineRuns TileAnimList_ApplyOne for each TileAnimList entry up to the first empty one (or all 16). - verified
TileAnimList_ApplyOne$C0:28F9 · 254 B · EnginePuts the animated states of one listed tile into Map_TileProps, by the state at the index A holds (only the five start states count; any other leaves the map alone): - $E6: the tile and the one... - verified
Field_Unk29F7$C0:29F7 · 385 B · EngineWrites a 32 x 10 tilemap (Field_UploadUnk1D00Bytes, $280 bytes) to Field_Unk7EF000 through the WRAM data port, DP = DP_PPU; Field_UploadUnk1D00 then sends it to VRAM $1D00. - verified
Field_Unk2B78$C0:2B78 · 201 B · EngineWrites a 32 x 8 tilemap (Field_UploadUnk1C00Bytes, $200 bytes) to Field_Unk7EF000 through the WRAM data port, DP = DP_PPU, over what Field_Unk29F7 left there; Field_UploadUnk1C00 then sends it to... - verified
ScrollStepAccum$C0:2C41 · 391 B · EngineSteps the scroll positions of layers 2 and 3 by signed per-frame speeds in 1/16 pixels, the copies of them that FieldBtlPpu.Scroll2 holds for the battle. - verified
VramDma_Upload$C0:2DC8 · 41 B · EngineCopies a block to VRAM with DMA channel 7: VMADDL = VramDma_Addr, VMAIN = increment after the high byte, DMAP7 = VramDma_Mode, B-bus target VMDATAL, source VramDma_Src/SrcBank, VramDma_Size bytes. - verified
ClearRAMDMA$C0:2DF1 · 45 B · EngineZeros a WRAM region via DMA channel 7, sourcing from MPYL (always 0 since M7A=M7B=0). - verified
Sys_HaltWithColor$C0:2E1E · 73 B · Engine(was the stub LoadSavePath.) Stops the game on a single colour: the first 21 bytes are InitHW's body written inline (interrupts off, forced blank, NMI/DMA/HDMA off, DB=$00), then it also clears... - verified
Evt_OpAA_SetAnimRow$C0:2E67 · 6 B · EngineEvent opcode $AA (2 bytes: $AA, row): Obj_Cur's Obj_AnimRow = row, Obj_AnimMode = Obj_AnimModeNormal (1), and Obj_AnimTimer, ObjX_AnimLoops and Obj_AnimColumn = 0 (the row starts over at once); X... - verified
Evt_SetAnimRow$C0:2E6D · 7 B · Engine - verified
Evt_SetAnimMode$C0:2E74 · 19 B · Engine - verified
Evt_OpB3_AnimRow0$C0:2E87 · 4 B · EngineEvent opcode $B3 (1 byte): Evt_SetAnimRow with row 0 (ObjAnim_RowStand, the row Obj_SetStandAnim uses); X = Y + 1, C=1. - verified
Evt_OpB4_AnimRow1$C0:2E8B · 4 B · EngineEvent opcode $B4 (1 byte): Evt_SetAnimRow with row 1 (ObjAnim_RowWalk, the row Obj_SetMoveAnim walks with); X = Y + 1, C=1. - verified
Evt_OpAE_AnimReset$C0:2E8F · 11 B · EngineEvent opcode $AE (1 byte): Obj_Cur's Obj_AnimRow = 0 (ObjAnim_RowStand) and Obj_AnimMode = 0, then as Evt_SetAnimMode (timer, loops and column 0); X = Y + 1, C=1. - verified
Evt_OpAB_PlayAnimOnce$C0:2E9A · 103 B · EngineEvent opcode $AB (2 bytes: $AB, row): plays animation row once in mode 2 and waits for it. - verified
Evt_OpB7_PlayAnimLoops$C0:2F01 · 112 B · EngineEvent opcode $B7 (3 bytes: $B7, row, count): as Evt_OpAB_PlayAnimOnce with ObjX_AnimLoops = count + 1 at the start (Obj_AnimTickAndQueue takes 2 off per pass of the row and stops at 1); done: X =... - verified
Evt_OpAC_ShowFrame$C0:2F71 · 37 B · EngineEvent opcode $AC (2 bytes: $AC, frame): Obj_Cur shows a fixed frame: Obj_FixedFrame = frame, column and timer 0, Obj_AnimRow = $FF when Obj_AnimMode was 0 (as in Evt_OpAB_PlayAnimOnce)... - verified
Evt_OpAD_WaitRuns$C0:2F96 · 48 B · EngineEvent opcode $AD (2 bytes: $AD, n): waits n of the object's script runs. - verified
Evt_OpB9_Wait4$C0:2FC6 · 4 B · EngineEvent opcode $B9 (1 byte): Evt_WaitRuns with n = 4; X = Y + 1 when done. - verified
Evt_OpBA_Wait8$C0:2FCA · 4 B · EngineEvent opcode $BA (1 byte): Evt_WaitRuns with n = 8; X = Y + 1 when done. - verified
Evt_OpBD_Wait32$C0:2FCE · 4 B · EngineEvent opcode $BD (1 byte): Evt_WaitRuns with n = $20; X = Y + 1 when done. - verified
Evt_OpBC_Wait16$C0:2FD2 · 2 B · EngineEvent opcode $BC (1 byte): Evt_WaitRuns with n = $10. - verified
Evt_WaitRuns$C0:2FD4 · 41 B · Engine - verified
Evt_OpAF_PartyControlOnce$C0:2FFD · 5 B · EngineEvent opcode $AF (1 byte): one run of Evt_OpB0_PartyControl, then the script goes on: X = Y + 1 (the next opcode, for the next run), C=0.
Bank $C0 · $C0:3000–$3FFF
$C0:3000
Verified · 76
- verified
Evt_OpB0_PartyControl$C0:3002 · 91 B · EngineEvent opcode $B0 (1 byte): the script of a party member's object stays here (X = Y, C=0 on every path) and moves it each run. - verified
Obj_Unk305D$C0:305D · 86 B · Sprites & objectsSteps Obj_Cur toward the point $80 / $F0 within its tile (Obj_TileCentreX, Obj_TileFootY: the middle column, the bottom row of the tile), one frame at a time. - verified
Obj_Unk30B3$C0:30B3 · 161 B · Sprites & objectsSteps Obj_Cur onto the position of the object in ObjFront_Other, one frame at a time: compares Obj_PosX and then Obj_PosY of the two with the low four bits masked (Obj_PosCoarseMask). - verified
Evt_StartTargetFunc2$C0:3154 · 93 B · EngineThe touch counterpart of Evt_StartTargetFunc1: starts function 2 of the object in Field_UnkEB. - verified
Evt_PushTarget$C0:31B1 · 187 B · EngineMoves the object in Field_UnkEB one tile on in the leader's facing, probably a push. - verified
Evt_OpD9_PartyWalkToTiles$C0:326C · 494 B · EngineEvent opcode $D9 (7 bytes: $D9, then column, row for the leader, member 2 and member 3): walks the party members to three tiles. - verified
Evt_OpDA_PartyGather$C0:345A · 229 B · EngineEvent opcode $DA (1 byte): party members 2 and 3 walk to the leader. - verified
Evt_OpB1_Yield$C0:353F · 4 B · EngineEvent opcode $B1 (1 byte): ends the object's run here: X = Y + 1 (the next opcode, for the next run), C=0. - verified
Evt_OpB2_Halt$C0:3543 · 3 B · EngineEvent opcode $B2 (1 byte): stops the object on this opcode for good: X = Y (the opcode again), C=0. - verified
Evt_OpB5_FollowObj$C0:3546 · 9 B · EngineEvent opcode $B5 (2 bytes: $B5, slot): runs Evt_Op94_WalkToObj (a step toward the object in slot) and stays on this opcode for good: X = Y, C=0 whatever the walk returned. - verified
Evt_OpB6_FollowPc$C0:354F · 8 B · EngineEvent opcode $B6 (2 bytes: $B6, p): runs Evt_Op95_WalkToPc (a step toward party member p) with X = Y returned: the opcode stays. - verified
Evt_OpB8_SetMsgPtr$C0:3557 · 25 B · EngineEvent opcode $B8 (4 bytes: $B8, ptr (3 bytes)): Field_Unk2B (word) and Field_Unk2D (bank) = ptr, the pointer the message opcodes need (probably to the location's message table); X = Y + 4, C=1. - verified
Evt_OpBB_Msg$C0:3570 · 69 B · EngineEvent opcode $BB (2 bytes: $BB, msg): shows message msg (probably; see the banner) with Field_Unk30 = 0. - verified
Evt_OpC1_MsgUnk30_1$C0:35B5 · 71 B · EngineEvent opcode $C1 (2 bytes: $C1, msg): as Evt_OpBB_Msg with Field_Unk30 = 1. - verified
Evt_OpC2_MsgUnk30_2$C0:35FC · 71 B · EngineEvent opcode $C2 (2 bytes: $C2, msg): as Evt_OpBB_Msg with Field_Unk30 = 2. - verified
Evt_OpC0_MsgChoice$C0:3643 · 49 B · EngineEvent opcode $C0 (3 bytes: $C0, msg, choices): as Evt_OpBB_Msg (Field_Unk30 = 0), with a choice: on starting, Field_Unk65 = choices bits 0-1 and Field_Unk64 = bits 2-3 (Evt_ChoiceMask)... - verified
Evt_MsgChoiceStart$C0:3674 · 54 B · Engine - verified
Evt_OpC3_MsgChoiceUnk30_1$C0:36AA · 51 B · EngineEvent opcode $C3 (3 bytes: $C3, msg, choices): as Evt_OpC0_MsgChoice with Field_Unk30 = 1. - verified
Evt_OpC4_MsgChoiceUnk30_2$C0:36DD · 52 B · EngineEvent opcode $C4 (3 bytes: $C4, msg, choices): as Evt_OpC0_MsgChoice with Field_Unk30 = 2 (it reaches Evt_MsgChoiceStart with a BRL). - verified
Evt_Op33_SetPalette$C0:3711 · 70 B · EngineEvent opcode $33 (2 bytes: $33, slot): Obj_Cur's Obj_OamAttr = slot x 2 & ObjPal_AttrMask (the palette bits; the other attribute bits are cleared), and its 12 colours (Obj_PalSrc in bank $E4) are... - verified
Evt_OpC8_EnterBankC2$C0:3757 · 41 B · EngineEvent opcode $C8 (2 bytes: $C8, arg): hands over to bank $C2 the way Field_SceneChangeTick's SceneFlag_Reload path does, with Field_BankC2Arg = arg, and goes on once the field is back... - verified
Evt_OpC9_IfHasItem$C0:3780 · 49 B · EngineEvent opcode $C9 (3 bytes: $C9, item, n): BankC1_Entry8003 service 0 (BankC1Svc_FindItem) with Y = item. - verified
Evt_OpCA_AddItem$C0:37B1 · 11 B · EngineEvent opcode $CA (2 bytes: $CA, item): BankC1_Entry8003 service 1 (BankC1Svc_AddItem, one more of item Y = item); X = Y + 2, C=1. - verified
Evt_AddItemTail$C0:37BC · 11 B · Engine - verified
Evt_OpC7_AddItemVar$C0:37C7 · 28 B · EngineEvent opcode $C7 (2 bytes: $C7, a): as Evt_OpCA_AddItem with the item taken from the low byte of event word a (Evt_Unk7F0200 + a x 2): BRA to Evt_AddItemTail; X = Y + 2, C=1. - verified
Evt_OpCB_RemoveItem$C0:37E3 · 22 B · EngineEvent opcode $CB (2 bytes: $CB, item): BankC1_Entry8003 service 2 (BankC1Svc_RemoveItem: one fewer of item Y = item, the entry emptied at 0; nothing when it is not held); X = Y + 2, C=1. - verified
Evt_OpD7_GetItemCount$C0:37F9 · 46 B · EngineEvent opcode $D7 (3 bytes: $D7, item, a): BankC2_Entry8004 command $0C (BankC2Cmd_ItemCount) with X = item gives the count held (0 when none); it goes to the low byte of event word a... - verified
Evt_OpCC_IfHasGold$C0:3827 · 52 B · EngineEvent opcode $CC (4 bytes: $CC, amount (word), n): BankC1_Entry8003 service 3 (BankC1Svc_HasGold) with Y = amount. - verified
Evt_OpCD_AddGold$C0:385B · 25 B · EngineEvent opcode $CD (3 bytes: $CD, amount (word)): BankC1_Entry8003 service 4 (BankC1Svc_AddGold) with Y = amount; X = Y + 3, C=1. - verified
Evt_OpCE_RemoveGold$C0:3874 · 25 B · EngineEvent opcode $CE (3 bytes: $CE, amount (word)): BankC1_Entry8003 service 5 (BankC1Svc_RemoveGold: takes amount off the gold when there is that much); X = Y + 3, C=1. - verified
Evt_OpCF_IfCharListed$C0:388D · 49 B · EngineEvent opcode $CF (3 bytes: $CF, char, n): BankC2_Entry8004 command 3 (BankC2Cmd_FindListed) with Y = char. - verified
Evt_OpD0_AddCharToReserve$C0:38BE · 21 B · EngineEvent opcode $D0 (2 bytes: $D0, char): BankC2_Entry8004 command 4 (BankC2Cmd_AddToReserve) with Y = char; X = Y + 2. - verified
Evt_OpD1_UnlistChar$C0:38D3 · 21 B · EngineEvent opcode $D1 (2 bytes: $D1, char): BankC2_Entry8004 command 5 (BankC2Cmd_Unlist: the character's place in Menu_PartyOrder is marked empty); X = Y + 2. - verified
Evt_OpD2_IfCharInParty$C0:38E8 · 49 B · EngineEvent opcode $D2 (3 bytes: $D2, char, n): BankC2_Entry8004 command 0 (BankC2Cmd_FindInParty) with Y = char. - verified
Evt_OpD3_AddCharToParty$C0:3919 · 53 B · EngineEvent opcode $D3 (2 bytes: $D3, char): BankC2_Entry8004 command 1 (BankC2Cmd_AddToParty) with Y = char, then ObjQ_Unk78 = ObjQ_Unk78Set1. - verified
Evt_OpD4_MoveCharToReserve$C0:394E · 185 B · EngineEvent opcode $D4 (2 bytes: $D4, char): takes the character's object out of the party, by the first of Party_ObjSlot / 1 / 2 (present) whose Obj_Unk1101 is char (read as the object's character... - verified
Evt_OpD6_DropCharObj$C0:3A07 · 97 B · EngineEvent opcode $D6 (2 bytes: $D6, char): the first present party member (Party_ObjSlot, then 1, then 2) whose Obj_Unk1101 is char gets Obj_Unk1100 = 3 (Obj_Unk1100Out), and its place in... - verified
Evt_OpD5_BankC2Cmd0A$C0:3A68 · 27 B · EngineEvent opcode $D5 (3 bytes: $D5, a, b): BankC2_Entry8004 command $0A (BankC2Cmd_Unk0A) with Y = a and X = b; X = Y + 3. - verified
Evt_OpD8_StartBattle$C0:3A83 · 52 B · EngineEvent opcode $D8 (3 bytes: $D8, a, b): starts a battle and goes on after it: - SceneFlag_Battle set in Field_SceneFlags (not started yet): X = the opcode, C=0; - else FadeFlag_AfterBattle set in... - verified
Evt_OpE0_Warp$C0:3AB7 · 58 B · EngineEvent opcode $E0 (5 bytes: $E0, location (word), column, row): sets Loc_DestId / Loc_DestX (column, row) / Loc_DestFacing from the operands, SceneFlag_Warp in Field_SceneFlags and Fade_Brightness... - verified
Evt_OpDC_SetPrevLoc$C0:3AF1 · 42 B · EngineEvent opcode $DC (5 bytes: $DC, location (word), column, row): sets Loc_PrevId, Loc_PrevX (column, row) and Loc_PrevFacing from the operands, as Field_InitLoadState would have stored them for that... - verified
Evt_OpDD_SetLoc$C0:3B1B · 42 B · EngineEvent opcode $DD (5 bytes: $DD, location (word), column, row): sets Loc_Id, Loc_EntryX (column, row) and Loc_EntryFacing from the operands without loading anything; X = Y + 5, C=1. - verified
Evt_OpDE_SetLocUnk1E$C0:3B45 · 6 B · EngineEvent opcode $DE (5 bytes, as $DD): Field_Unk1E = 1 (Field_Unk1EOn; Field_FadeInAfterReload clears it), then BRA to Evt_OpDD_SetLoc. - verified
Evt_OpE1_WarpNow$C0:3B4B · 77 B · EngineEvent opcode $E1 (5 bytes: $E1, location (word), column, row): warps at once, without the fade-out: Loc_Dest* from the operands (as Evt_OpE0_Warp), then it waits for vblank (RDNMI bit 7), runs... - verified
Evt_OpDF_WarpNowUnk1E$C0:3B98 · 6 B · EngineEvent opcode $DF (5 bytes, as $E1): Field_Unk1E = 1 (Field_Unk1EOn), then BRA to Evt_OpE1_WarpNow (never returns). - verified
Evt_OpE2_WarpVars$C0:3B9E · 103 B · EngineEvent opcode $E2 (5 bytes: $E2, a, b, c, d): as Evt_OpE0_Warp with the destination in event words (Evt_Unk7F0200 + n x 2): Loc_DestId = word a (all 16 bits, not masked), Loc_DestX = word b's low... - verified
Evt_OpE3_SetControl$C0:3C05 · 12 B · EngineEvent opcode $E3 (2 bytes: $E3, value): Field_ControlEnabled = value (0 stops the pause/menu paths; the Map_Unk7F3700 scripts start with E3 00 and end with E3 01 or E3 00); X = Y + 2, C=1. - verified
Evt_OpE8_SoundCmd18$C0:3C11 · 30 B · EngineEvent opcode $E8 (2 bytes: $E8, a): sends sound-driver command $18 (Audio_Cmd18, the command bank $C2 sends as C2Scene_SoundCmd18; meaning not traced) with Audio_CmdArg0 = a and Audio_CmdArg1 =... - verified
Evt_OpEA_PlayMusic$C0:3C2F · 29 B · EngineEvent opcode $EA (2 bytes: $EA, track): Menu_Config1E = track and Audio_CmdPlayMusic sent with Audio_CmdArg0 = track, as LocLoad_AudioSetup starts a location's music (Audio_CmdArg1/2 left as they... - verified
Evt_OpEB_SoundCmds81To83$C0:3C4C · 76 B · EngineEvent opcode $EB (3 bytes: $EB, a, b): sends three sound-driver commands through Audio_DriverCommand: Audio_CmdUnk81 with arguments a, b, Audio_Cmd81Arg; then Audio_Cmd82 and Audio_Cmd83, each... - verified
Evt_OpEC_SoundCmd$C0:3C98 · 36 B · EngineEvent opcode $EC (4 bytes: $EC, command, a, b): Audio_CmdId = command, Audio_CmdArg0 = a, Audio_CmdArg1 = b (Audio_CmdArg2 left as it was), sent through Audio_DriverCommand; X = Y + 4, C=0. - verified
Evt_OpED_WaitApuio1$C0:3CBC · 9 B · EngineEvent opcode $ED (1 byte): waits while APUIO1 (the sound CPU's port 1) reads nonzero: X = the opcode then, else X = Y + 1; C=0 either way. - verified
Evt_OpEE_WaitApuio3$C0:3CC5 · 11 B · EngineEvent opcode $EE (1 byte): waits while the low nibble of APUIO3 (the sound CPU's port 3) is nonzero: X = the opcode then, else X = Y + 1; C=0 either way. - verified
Evt_OpF0_FadeBrightness$C0:3CD0 · 45 B · EngineEvent opcode $F0 (2 bytes: $F0, b): the high nibble of b is a screen brightness (0-15). - verified
Evt_OpF2_WaitBrightness$C0:3CFD · 10 B · EngineEvent opcode $F2 (1 byte): waits while FadeFlag_Brightness is set (a brightness fade runs): X = the opcode then, else X = Y + 1; C=0 either way. - verified
Evt_OpF1_FadeFixedColor$C0:3D07 · 115 B · EngineEvent opcode $F1 (2 bytes: $F1, 0, or 3 bytes: $F1, colour, s): the fixed colour (Fade_FixedColor, COLDATA-style: bits 5-7 the channels, bits 0-4 the intensity). - verified
Evt_OpF3_WaitFixedColor$C0:3D7A · 10 B · EngineEvent opcode $F3 (1 byte): waits while FadeFlag_FixedColor is set (a fixed-colour fade runs): X = the opcode then, else X = Y + 1; C=0 either way. - verified
Evt_OpF4_SetShake$C0:3D84 · 19 B · EngineEvent opcode $F4 (2 bytes: $F4, value): Field_UnkBC = value (nonzero: Map_Unk91AC sets Map_ShakeX/Y from Eng_Unk0400, a screen shake by that inference); with 0, Map_ShakeX and Map_ShakeY = 0 too. - verified
Evt_OpE4_CopyMapRegion$C0:3D97 · 46 B · EngineEvent opcode $E4 (8 bytes: $E4, source column, row, end column, row, destination column, row, planes): MapCopy_SrcX/Y, MapCopy_EndX/Y, MapCopy_DstX/Y and Field_Unk44 (the MapCopy_* plane bits)... - verified
Evt_OpE5_CopyMapRegionRedraw$C0:3DC5 · 47 B · EngineEvent opcode $E5 (8 bytes, as $E4): the same MapCopy_* and Field_Unk44 setup, then Field_MapRedrawSel = the plane bits 0-2 (MapCopy_L1-L3, the layers) and SceneFlag_MapRedraw set, so... - verified
Evt_OpE6_SetDrift$C0:3DF4 · 60 B · EngineEvent opcode $E6 (5 bytes: $E6, x, y, layers, frames): for each of Map_Layer1/2/3 set in layers, the word Map_Drift1X/2X/3X (with its Y byte) = x, y: the per-frame amounts Map_Unk91AC adds to that... - verified
Evt_OpE7_ScrollTo$C0:3E30 · 44 B · EngineEvent opcode $E7 (3 bytes: $E7, column, row): scrolls the view to a map tile through Map_Unk91AC's scroll-to, by Map_ScrollToMode: - 0 (start): Map_ScrollToX = column x 2, Map_ScrollToY = row x 2... - verified
Evt_OpF8_BankC2Cmd06And07$C0:3E5C · 11 B · EngineEvent opcode $F8 (1 byte): BankC2_Entry8004 commands 6 and 7 (BankC2Cmd_Unk06, BankC2Cmd_Unk07); X = Y + 1. - verified
Evt_BankC2CmdTail$C0:3E67 · 7 B · Engine - verified
Evt_OpF9_BankC2Cmd06$C0:3E6E · 7 B · EngineEvent opcode $F9 (1 byte): BankC2_Entry8004 command 6 alone (see Evt_OpF8_BankC2Cmd06And07) through Evt_BankC2CmdTail; X = Y + 1, C as on entry (0: the run ends). - verified
Evt_OpFA_BankC2Cmd07$C0:3E75 · 7 B · EngineEvent opcode $FA (1 byte): BankC2_Entry8004 command 7 alone (see Evt_OpF8_BankC2Cmd06And07) through Evt_BankC2CmdTail; X = Y + 1, C as on entry (0: the run ends). - verified
Evt_OpFF9F_BankC2Cmd08$C0:3E7C · 8 B · EngineOpcode $FF $9F (2 bytes): BankC2_Entry8004 command 8 (BankC2Cmd_Unk08, Menu_CmdSetSram7FE2, which stores $FF at $30:7FE2) through Evt_BankC2CmdTail; X = Y + 2. - verified
Evt_Op29_StartCredits$C0:3E84 · 82 B · EngineEvent opcode $29 (2 bytes: $29, b): sets layer 3 up for the staff credits, probably (the font load and the Credits_Text position): Map_OwnStep3 set in Map_OwnStepFlags and in Map_LayerEdgeOff... - verified
Evt_Op2A_Field54Bit2$C0:3ED6 · 2 B · EngineEvent opcode $2A (1 byte): sets Field_Unk54 bit 2 (Field54_MapReq's low bit), a request Field_ServiceUnk54 serves (bits 2-3 shifted left once go to the map redraw); X = Y + 1, C=0. - verified
Evt_SetField54Tail$C0:3ED8 · 6 B · Engine - verified
Evt_Op2B_Field54Bit3$C0:3EDE · 4 B · EngineEvent opcode $2B (1 byte): sets Field_Unk54 bit 3 (Field54_Bit3, the other bit of Field54_MapReq) through Evt_SetField54Tail; X = Y + 1, C=0. - verified
Evt_Op32_CreditsLine$C0:3EE2 · 4 B · EngineEvent opcode $32 (1 byte): sets Field54_Credits in Field_Unk54, so Field_ServiceUnk54 writes the next staff-credits line, through Evt_SetField54Tail; X = Y + 1, C=0. - verified
Evt_Op2C_SetLayer3Pos$C0:3EE6 · 44 B · EngineEvent opcode $2C (3 bytes: $2C, x, y): Map_Acc3X/Y = 0, Map_Unk1D8F (layer 3 X) = x x 8 and Map_Unk1D91 (layer 3 Y) = y x 8, both 16-bit (8-pixel units, probably). - verified
Evt_Op2F_SetCreditsPos$C0:3F12 · 20 B · EngineEvent opcode $2F (3 bytes: $2F, column, row): Credits_Column = column, Credits_Row = row (where Field_ServiceUnk54 puts the next credits line); X = Y + 3, C=1. - verified
Evt_OpFE_WinQuad$C0:3F26 · 137 B · EngineEvent opcode $FE (18 bytes: $FE, frames, then eight pairs start, end for X0, Y0, X1, Y1, X2, Y2, X3, Y3): starts hook 6 (Field_HookWinQuad) moving four points from their starts to their ends in... - verified
Evt_OpFF_Misc$C0:3FAF · 95 B · EngineEvent opcode $FF (2 bytes or more: $FF, sub, ...): sub is kept in EvtFF_Sub.
Bank $C0 · $C0:4000–$4FFF
$C0:4000
Verified · 56
- verified
Evt_OpFFTable$C0:400E · 40 B · Engine20 handler addresses for opcode $FF's second byte $90-$A3, indexed by (sub - $90) x 2 (JSR (abs,X) at $C0:4009 in Evt_OpFF_Misc). - verified
Evt_OpFF90_WinGrow0$C0:4036 · 31 B · EngineOpcode $FF $90 (5 bytes: $FF, $90, x, y, limit): WinFx_CenterX/Y = x, y, WinFx_SizeLimit = limit, WinFx_Size = 0, Field_EventHook = EventHook_WinGrow0 (hook 1 grows the window shape to the limit)... - verified
Evt_OpFF91_WinShrink0$C0:4055 · 8 B · EngineOpcode $FF $91 (2 bytes): Field_EventHook = EventHook_WinShrink0 (hook 2 shrinks the shape to 0 and turns the window off); X = Y + 2 (no wait). - verified
Evt_OpFF92_WinC3E1$C0:405D · 86 B · EngineOpcode $FF $92 (2 bytes): runs hook 3 (Field_HookWinC3E, the BankC3_Entry000E effect) with mode 1 and WinFx_Size 0, and waits for it to end: - Field_EventHook 0 (start): while WinFx_C3EMode... - verified
Evt_OpFF94_WinC3E1Dark$C0:40B3 · 60 B · EngineOpcode $FF $94 (2 bytes): as Evt_OpFF92_WinC3E1 (mode 1) with WinFx_Size = 3 (WinFx_SizeBit1 | WinFx_SizeBit0), so hook 3 leaves the window on; when it is done this opcode sets Fade_Brightness = 0... - verified
Evt_OpFF93_WinC3E2$C0:40EF · 86 B · EngineOpcode $FF $93 (2 bytes): as Evt_OpFF92_WinC3E1 with mode 2 (WinFx_C3EMode2) and WinFx_Size = 1 (WinFx_SizeBit0); the window is cleared when done, X = Y + 2. - verified
Evt_OpFF95_WinC3E2Dark$C0:4145 · 60 B · EngineOpcode $FF $95 (2 bytes): as Evt_OpFF94_WinC3E1Dark with mode 2 (WinFx_C3EMode2) and WinFx_Size = 2 (WinFx_SizeBit1): when done Fade_Brightness = 0, Field_EventHook = 0, X = Y + 2. - verified
Evt_OpFF96_Reset$C0:4181 · 16 B · EngineOpcode $FF $96 (2 bytes): waits for vblank (RDNMI bit 7), InitHW, S = StackTop and JML MainInit: the game restarts from its cold init (a reset, probably the end of a game). - verified
Evt_OpFF97_WinGrow1$C0:4191 · 31 B · EngineOpcode $FF $97 (5 bytes: $FF, $97, x, y, limit): as Evt_OpFF90_WinGrow0 with Field_EventHook = EventHook_WinGrow1 (hook 4, the colour-window version); X = Y + 5 (no wait). - verified
Evt_OpFF98_WinShrink1$C0:41B0 · 4 B · EngineOpcode $FF $98 (2 bytes): Field_EventHook = EventHook_WinShrink1 (hook 5) through Evt_OpFF_SetHookTail; X = Y + 2 (no wait). - verified
Evt_OpFF99_WinFixedA$C0:41B4 · 4 B · EngineOpcode $FF $99 (2 bytes): Field_EventHook = EventHook_WinFixedA1 (hooks 7/8) through Evt_OpFF_SetHookTail; X = Y + 2 (no wait). - verified
Evt_OpFF9A_WinFixedB$C0:41B8 · 2 B · EngineOpcode $FF $9A (2 bytes): Field_EventHook = EventHook_WinFixedB1 (hooks 9/10); X = Y + 2 (no wait). - verified
Evt_OpFF_SetHookTail$C0:41BA · 6 B · Engine - verified
Evt_OpFF9B_LeaveToBankC3$C0:41C0 · 4 B · EngineOpcode $FF $9B (2 bytes): Field_EventHook = EventHook_LeaveToBankC3 (hook 11 redraws the map and leaves the field for bank $C3 on its next frame) through Evt_OpFF_SetHookTail; X = Y + 2. - verified
Evt_OpFF9C_WinShrink1Off$C0:41C4 · 4 B · EngineOpcode $FF $9C (2 bytes): Field_EventHook = EventHook_WinShrink1Off (hook 14, hook 5's shutdown: the window off at once) through Evt_OpFF_SetHookTail; X = Y + 2. - verified
Evt_OpFF9E_WinPulse$C0:41C8 · 20 B · EngineOpcode $FF $9E (2 bytes): runs hook 12 (Field_HookWinPulse, which ends by setting EventHook_Idle) and waits for it: Field_EventHook 0: it is set to EventHook_WinPulse, X = the opcode... - verified
Evt_OpFF9D_ClearPush$C0:41DC · 8 B · EngineOpcode $FF $9D (2 bytes): clears Field54_Push in Field_Unk54, which lets Evt_PushTarget start another push; X = Y + 2. - verified
Evt_Op57_InitChar0$C0:41E4 · 8 B · EngineEvent opcode $57 (1 byte): Chr_ObjSlot[0] = Obj_Cur, then Evt_InitCharTail with character 0 (see Evt_Op80_InitCharObj). - verified
Evt_Op5C_InitChar1$C0:41EC · 8 B · EngineEvent opcode $5C (1 byte): as Evt_Op57_InitChar0 for character 1. - verified
Evt_Op62_InitChar2$C0:41F4 · 8 B · EngineEvent opcode $62 (1 byte): as Evt_Op57_InitChar0 for character 2. - verified
Evt_Op68_InitChar4$C0:41FC · 8 B · EngineEvent opcode $68 (1 byte): as Evt_Op57_InitChar0 for character 4. - verified
Evt_Op6A_InitChar3$C0:4204 · 8 B · EngineEvent opcode $6A (1 byte): as Evt_Op57_InitChar0 for character 3. - verified
Evt_Op6C_InitChar5$C0:420C · 8 B · EngineEvent opcode $6C (1 byte): as Evt_Op57_InitChar0 for character 5. - verified
Evt_Op6D_InitChar6$C0:4214 · 6 B · EngineEvent opcode $6D (1 byte): as Evt_Op57_InitChar0 for character 6, then falls into Evt_InitCharTail, which stores A (the character) in EvtChar_Id and BRAs to Evt_InitCharCommon; the other one-byte... - verified
Evt_InitCharTail$C0:421A · 4 B · Engine - verified
Evt_Op80_InitCharObj$C0:421E · 76 B · EngineEvent opcode $80 (2 bytes: $80, char): Chr_ObjSlot[char] = Obj_Cur (char 0-6; a larger one stores nothing), then Evt_InitCharCommon, which the one-byte character opcodes reach too (EvtChar_Id =... - verified
Evt_InitCharCommon$C0:426A · 524 B · Engine - verified
Evt_Op81_InitSprite$C0:4476 · 23 B · EngineEvent opcode $81 (2 bytes: $81, record): Obj_Cur becomes an object with sprite recordrecord: Obj_Unk1100 = Obj_Unk1100Kind3, Obj_Unk1B01 = Obj_Unk1B01Solid, Obj_Unk1101 = record, then... - verified
Evt_LoadSpriteRec$C0:448D · 202 B · Engine - verified
Evt_InitWramSprite$C0:4557 · 57 B · EngineThe common start of Evt_Op82_InitWramSprite and Evt_Op83_InitEnemySprite (A = the Obj_Unk1100 kind, 4 or 5): Obj_Unk1100 = A, Obj_Unk1101 = the operand after the opcode (also left in WRMPYA for... - verified
Evt_Op82_InitWramSprite$C0:4590 · 335 B · EngineEvent opcode $82 (2 bytes: $82, n): Evt_InitWramSprite with kind 4 (Obj_Unk1100Kind4), then Obj_Unk1B01 = Obj_Unk1B01Solid and sprite record SprRec_FirstNpc + n of RomE4_SprRec loaded as... - verified
Evt_Op83_InitEnemySprite$C0:46DF · 392 B · EngineEvent opcode $83 (3 bytes: $83, n, b): Evt_InitWramSprite with kind 5 (Obj_Unk1100Kind5), Obj_Unk1B01 = Obj_Unk1B01Solid, then record n of RomE4_EnemySprRec (EvtSpr_EnemyRecBytes each; its first... - verified
Evt_Op84_SetUnk1B01$C0:4867 · 15 B · EngineEvent opcode $84 (2 bytes: $84, value): Obj_Cur's Obj_Unk1B01 = value (bit 0: the object blocks the leader, Obj_Unk1B01Solid; bit 1: it can be pushed, Obj_Unk1B01Push). - verified
Evt_Op87_SetScriptPeriod$C0:4876 · 28 B · EngineEvent opcode $87 (2 bytes: $87, n): Obj_Cur's Obj_Unk1000 = (n + 1) | its old bit 7 (Obj_Unk1000Bit7 kept): the object's script runs every n + 1 frames (Vblank_Unk59D9 reloads Obj_Unk1001 from... - verified
Evt_Op88_ObjPalAnim$C0:4892 · 444 B · EngineEvent opcode $88 ($88, kind, ...): palette animations on Obj_Cur's own palette (its colour 0 is EvtPal_Base = Obj_OamAttr x 8 + EvtPal_SpriteColor0: Obj_OamAttr holds the palette slot x 2). - verified
Evt_Op2E_PalAnim$C0:4A4E · 222 B · EngineEvent opcode $2E ($2E, kind, ...): as Evt_Op88_ObjPalAnim's kinds $4x/$5x and $8x, with absolute colour numbers instead of the object's palette. - verified
Evt_FindFreeAnimB$C0:4B2C · 29 B · EngineFinds a free FieldAnimB record (.Unk0 = 0) among the first FieldAnimB_Searched (8) of the 12, from record 0 on; records 8-11 are never handed out here. - verified
Evt_Op89_SetSpeed$C0:4B49 · 15 B · EngineEvent opcode $89 (2 bytes: $89, speed): Obj_Cur's Obj_Speed = speed (the step the Obj_SetVelocity* routines scale the direction by). - verified
Evt_Op8A_SetSpeedVar$C0:4B58 · 28 B · EngineEvent opcode $8A (2 bytes: $8A, a): as Evt_Op89_SetSpeed with the low byte of the event word a. - verified
Evt_Op8B_PlaceAtTile$C0:4B74 · 79 B · EngineEvent opcode $8B (3 bytes: $8B, column, row): puts Obj_Cur on the tile: Obj_PosX = column << 8 | EvtChar_SubXCentre, Obj_PosY = row << 8 | EvtChar_SubYLower. - verified
Evt_Op8C_PlaceAtTileVar$C0:4BC3 · 100 B · EngineEvent opcode $8C (3 bytes: $8C, a, b): as Evt_Op8B_PlaceAtTile with the column and row from the low bytes of the event words a and b, except that Obj_PosX's low byte is not set (only Obj_TileX... - verified
Evt_Op8D_SetPos$C0:4C27 · 77 B · EngineEvent opcode $8D (5 bytes: $8D, the words x, y): Obj_Cur's Obj_PosX = x, Obj_PosY = y (16-bit: tile in the high byte); with Obj_OamFlags bit 7 set the priorities follow the new tile (Obj_TileY <<... - verified
Evt_Op8E_SetOamFlags$C0:4C74 · 97 B · EngineEvent opcode $8E (2 bytes: $8E, flags): Obj_Cur's Obj_OamFlags = flags. - verified
Evt_Op90_SetUnk1A81On$C0:4CD5 · 4 B · EngineEvent opcode $90 (1 byte): Obj_Cur's Obj_Unk1A81 = Obj_Unk1A81On (1: its frames are built, so it is probably shown). - verified
Evt_Op90_Store$C0:4CD9 · 7 B · Engine - verified
Evt_Op91_ClearUnk1A81$C0:4CE0 · 6 B · EngineEvent opcode $91 (1 byte): Obj_Cur's Obj_Unk1A81 = 0 (no frame build: hidden, probably); X = Y + 1, C=0 through Evt_Op90_Store. - verified
Evt_Op7E_SetUnk1A81Bit7$C0:4CE6 · 6 B · EngineEvent opcode $7E (1 byte): Obj_Cur's Obj_Unk1A81 = $80 (bit 7 only, FieldBtl_ObjUnk1A81Bit: outside 1..$7F, so no frame build, and the battle hand-off treats the object specially); X = Y + 1, C=0... - verified
Evt_Op7C_SetObjUnk1A81On$C0:4CEC · 13 B · EngineEvent opcode $7C (2 bytes: $7C, slot): as Evt_Op90_SetUnk1A81On for the object in slot: Obj_Unk1A81 = Obj_Unk1A81On. - verified
Evt_Op7D_ClearObjUnk1A81$C0:4CF9 · 13 B · EngineEvent opcode $7D (2 bytes: $7D, slot): as Evt_Op91_ClearUnk1A81 for the object in slot: Obj_Unk1A81 = 0. - verified
Evt_Op7A_ArcToTile$C0:4D06 · 287 B · EngineEvent opcode $7A (4 bytes: $7A, column, row, g): moves Obj_Cur along an arc (Obj_ArcMode, probably a jump) to map tile (column, row). - verified
Evt_Op7B_ArcSteps$C0:4E25 · 78 B · EngineEvent opcode $7B (5 bytes: $7B, vx, vy, g, frames): as Evt_Op7A_ArcToTile with the arc given directly: first run Obj_VelX = vx, Obj_VelY = vy, Obj_ArcGravity = g, Obj_MoveFrames = frames... - verified
Evt_Op92_WalkDir$C0:4E73 · 84 B · EngineEvent opcode $92 (3 bytes: $92, direction, frames): walks Obj_Cur in a direction for a number of frames. - verified
Evt_Op9C_MoveDir$C0:4EC7 · 67 B · EngineEvent opcode $9C (3 bytes: $9C, direction, frames): as Evt_Op92_WalkDir without the facing and the animation: Obj_Direction, ObjX_Unk7F0B00 = ObjX_Unk7F0B00Dir, Obj_MoveFrames, Obj_Unk1A80 + 1 and... - verified
Evt_Op9D_MoveDirVar$C0:4F0A · 87 B · EngineEvent opcode $9D (3 bytes: $9D, a, b): as Evt_Op9C_MoveDir with the direction and the frames taken from the low bytes of the event words Evt_Unk7F0200 + a x 2 and + b x 2. - verified
Evt_Op96_WalkToTile$C0:4F61 · 137 B · EngineEvent opcode $96 (3 bytes: $96, column, row): walks Obj_Cur to a map tile, one step per script run. - verified
Evt_Op9A_WalkTowardTile$C0:4FEA · 154 B · EngineEvent opcode $9A (4 bytes: $9A, column, row, frames): as Evt_Op96_WalkToTile, but a single step of the given frames (Obj_MoveFrames = ObjX_Unk7F0B00 = frames, Obj_Unk1A80 + 1); once Obj_Unk1A80 is...
Bank $C0 · $C0:5000–$5FFF
$C0:5000
Verified · 62
- verified
Evt_Op97_WalkToTileVar$C0:5084 · 165 B · EngineEvent opcode $97 (3 bytes: $97, a, b): as Evt_Op96_WalkToTile with the column and row from the low bytes of the event words Evt_Unk7F0200 + a x 2 and + b x 2. - verified
Evt_OpA0_MoveToTile$C0:5129 · 104 B · EngineEvent opcode $A0 (3 bytes: $A0, column, row): as Evt_Op96_WalkToTile without the facing and the animations (no Obj_Facing write, no Obj_SetMoveAnim / Obj_SetStandAnim): arrived (after any... - verified
Evt_OpA1_MoveToTileVar$C0:5191 · 132 B · EngineEvent opcode $A1 (3 bytes: $A1, a, b): as Evt_OpA0_MoveToTile with the column and row from the low bytes of the event words Evt_Unk7F0200 + a x 2 and + b x 2. - verified
Evt_Op94_WalkToObj$C0:5215 · 19 B · EngineEvent opcode $94 (2 bytes: $94, slot): walks Obj_Cur next to the object in slot (object x 2), one step per script run. - verified
Evt_Op94_Body$C0:5228 · 152 B · Engine - verified
Evt_Op9E_MoveToObj$C0:52C0 · 19 B · EngineEvent opcode $9E (2 bytes: $9E, slot): as Evt_Op94_WalkToObj without the facing and the animations; Evt_Op9E_Body (X = the target's slot) is also entered by Evt_Op9F_MoveToPc. - verified
Evt_Op9E_Body$C0:52D3 · 119 B · Engine - verified
Evt_Op98_WalkTowardObj$C0:534A · 33 B · EngineEvent opcode $98 (3 bytes: $98, slot, frames): as Evt_Op94_WalkToObj but a single step of the given frames (Obj_MoveFrames = ObjX_Unk7F0B00 = frames, Obj_Unk1A80 + 1); with Obj_Unk1A80 set it... - verified
Evt_Op98_Body$C0:536B · 165 B · Engine - verified
Evt_Op95_WalkToPc$C0:5410 · 25 B · EngineEvent opcode $95 (2 bytes: $95, p): Evt_Op94_WalkToObj toward a party member's object (X = Party_ObjSlot + p; p = 0, 2 or 4, the party position x 2) through Evt_Op94_Body; X = the opcode, C=0... - verified
Evt_Op8F_FollowPc$C0:5429 · 204 B · EngineEvent opcode $8F (2 bytes: $8F, p): walks Obj_Cur toward a party member's object (X = Party_ObjSlot + p; p = 0, 2 or 4, the party position x 2), one step per script run, as Evt_Op94_WalkToObj... - verified
Evt_Op9F_MoveToPc$C0:54F5 · 25 B · EngineEvent opcode $9F (2 bytes: $9F, p): Evt_Op9E_MoveToObj toward a party member's object (X = Party_ObjSlot + p; p = 0, 2 or 4, the party position x 2) through Evt_Op9E_Body; X = the opcode, C=0... - verified
Evt_Op99_WalkTowardPc$C0:550E · 39 B · EngineEvent opcode $99 (3 bytes: $99, p, frames): Evt_Op98_WalkTowardObj toward a party member's object (X = Party_ObjSlot + p) through Evt_Op98_Body; with Obj_Unk1A80 set it waits for Obj_MoveFrames =... - verified
Evt_Op0F_FaceUp$C0:5535 · 4 B · EngineEvent opcode $0F (1 byte): Obj_Cur faces up (facing 0) through Evt_SetFacing; X = Y + 1. - verified
Evt_Op17_FaceDown$C0:5539 · 4 B · EngineEvent opcode $17 (1 byte): Obj_Cur faces down (facing 1) through Evt_SetFacing; X = Y + 1. - verified
Evt_Op1B_FaceLeft$C0:553D · 4 B · EngineEvent opcode $1B (1 byte): Obj_Cur faces left (facing 2) through Evt_SetFacing; X = Y + 1. - verified
Evt_Op1D_FaceRight$C0:5541 · 4 B · EngineEvent opcode $1D (1 byte): Obj_Cur faces right (facing 3) through Evt_SetFacing; X = Y + 1. - verified
Evt_OpA6_Face$C0:5545 · 6 B · EngineEvent opcode $A6 (2 bytes: $A6, facing): Obj_Cur's Obj_Facing = the operand. - verified
Evt_SetFacing$C0:554B · 2 B · Engine - verified
Evt_SetFacingOfX$C0:554D · 10 B · Engine - verified
Evt_OpA7_FaceVar$C0:5557 · 21 B · EngineEvent opcode $A7 (2 bytes: $A7, a): Obj_Cur's Obj_Facing = the low byte of the event word Evt_Unk7F0200 + a x 2, through Evt_SetFacing. - verified
Evt_Op1E_ObjFaceUp$C0:556C · 13 B · EngineEvent opcode $1E (2 bytes: $1E, slot): the object in slot (object x 2) faces up (facing 0) through Evt_SetFacingOfX. - verified
Evt_Op1F_ObjFaceDown$C0:5579 · 13 B · EngineEvent opcode $1F (2 bytes: $1F, slot): the object in slot (object x 2) faces down (facing 1) through Evt_SetFacingOfX. - verified
Evt_Op25_ObjFaceLeft$C0:5586 · 13 B · EngineEvent opcode $25 (2 bytes: $25, slot): the object in slot (object x 2) faces left (facing 2) through Evt_SetFacingOfX. - verified
Evt_Op26_ObjFaceRight$C0:5593 · 13 B · EngineEvent opcode $26 (2 bytes: $26, slot): the object in slot (object x 2) faces right (facing 3) through Evt_SetFacingOfX. - verified
Evt_OpA8_FaceObj$C0:55A0 · 9 B · EngineEvent opcode $A8 (2 bytes: $A8, slot): turns Obj_Cur toward the object in slot. - verified
Evt_OpA8_Body$C0:55A9 · 92 B · Engine - verified
Evt_OpA9_FacePc$C0:5605 · 15 B · EngineEvent opcode $A9 (2 bytes: $A9, p): Evt_OpA8_FaceObj toward a party member's object (X = Party_ObjSlot + p, p = 0, 2 or 4) through Evt_OpA8_Body. - verified
Obj_SetMoveAnim$C0:5614 · 119 B · Sprites & objectsPicks Obj_Cur's animation row from its speed. - verified
Obj_SetStandAnim$C0:568B · 27 B · Sprites & objects - verified
Scene_PostLoadInit$C0:56A6 · 46 B · EngineThe object side of a location load, run once by GameLoop_LoadField after LoadLocation: ObjQ_Unk69 = $0048, ObjQ_ScanlineLimit = $0078, VramQ_Valid = 0 (empty VRAM queue); then Field_ResetUnk0B88... - verified
LocLoad_Unk56D4$C0:56D4 · 53 B · EngineThe last location-load step: unpacks the location's event data. - verified
Evt_InitObjects$C0:5709 · 544 B · EngineResets the object tables for the Evt_ObjCount objects of the new location and runs each one's init function: 1. - verified
Evt_ClearUnk0920$C0:5929 · 51 B · EngineSets the 16 bytes Evt_Unk0920 to Evt_Unk0920Free ($FF), one STA each. - verified
Evt_RunObj0Func1$C0:595C · 33 B · Engine(was Sub_595C.) Runs one event-script function of object 0: the offset stored at Evt_Data+2 (object 0's second function pointer), executing opcodes through Evt_OpcodeTable until opcode $00. - verified
Evt_RunObjInit$C0:597D · 92 B · Engine(was Sub_597D.) Runs object Obj_Cur's init function: the first of its 16 function offsets (Evt_Data + Obj_Cur*16, i.e. 32 bytes per object) is executed through Evt_OpcodeTable until opcode $00. - verified
Vblank_Unk59D9$C0:59D9 · 109 B · EngineWith DP=$1000 (the Obj_Unk1000 page), for each object slot below Evt_ObjSlotEnd (= Evt_ObjCount x 2, stored here) whose Obj_Unk1000 has bit 7 clear: Obj_Unk1001 is counted down (when not already... - verified
Vblank_ReadScanlineCounters$C0:5A46 · 77 B · EngineRuns the queued objects' scripts while there is time left in the frame: before each object it reads the V counter (as Field_ProcessAnimQueue does) and stops once it is at ObjQ_Unk69 or more but... - verified
Evt_RunObjScriptSteps$C0:5A93 · 50 B · EngineRuns object X's script from Obj_ScriptPos: Obj_Cur = X, then up to Field_Unk68 opcodes (Evt_StepsLeft counts them; 5 from load) through Evt_OpcodeTable, each with Y = the opcode's Evt_Data offset... - verified
Evt_StartTargetFunc1$C0:5AC5 · 90 B · EngineStarts function 1 of the object in Field_UnkEB (the one the action button found). - verified
Evt_RedirectObjScript$C0:5B1F · 68 B · EngineEvt_StartTargetFunc1's save without its target: for the object in Field_UnkEB, unless Obj_Unk1100 has bit 7 set or Obj_Unk1C00 is 0, saves Obj_ScriptPos in the ObjX_Unk7F0580 table of level... - verified
Map_LeaderPastRowMax$C0:5B63 · 14 B · EngineMap_Unk9175's test for a downward step: C=1 when the leader's Obj_TileY is past Map_Unk1D1D (TileY >= Map_Unk1D1D + 1). - verified
Map_LeaderPastRowMin$C0:5B71 · 8 B · EngineMap_Unk9175's test for an upward step: C=1 when the leader's Obj_TileY <= Map_Unk1D1C + 1. - verified
Map_LeaderPastColMax$C0:5B79 · 13 B · EngineMap_Unk9175's test for a rightward step: C=1 when the leader's Obj_TileX >= Map_Unk1D1B. - verified
Map_LeaderPastColMin$C0:5B86 · 7 B · EngineMap_Unk9175's test for a leftward step: C=1 when the leader's Obj_TileX <= Map_Unk1D1A. - verified
Evt_HasActionTarget$C0:5B8D · 8 B · EngineC=1 when Field_UnkEB holds an object (bit 7 clear), C=0 when it is $80 (none). - verified
Evt_FindSolidObjInFront$C0:5B95 · 93 B · EngineLooks for a solid object within a tile in front of Obj_Cur. - verified
Evt_InFrontTests$C0:5BF2 · 8 B · EngineEvt_FindSolidObjInFront's tests by Obj_Facing x 2 (facings 0-3). - verified
Evt_InFrontUp$C0:5BFA · 38 B · EngineFacing 0: C=1 when ObjFront_Other is above Obj_Cur and within a tile: its Obj_PosY - ObjFront_Y is negative with magnitude under ObjFront_Reach, and its |Obj_PosX - ObjFront_X| is under it too. - verified
Evt_InFrontDown$C0:5C20 · 35 B · EngineFacing 1: C=1 when ObjFront_Other is below Obj_Cur within a tile: Obj_PosY - ObjFront_Y from 0 to under ObjFront_Reach and |Obj_PosX - ObjFront_X| under it, with the same SBC carries as Evt_InFrontUp. - verified
Evt_InFrontNo$C0:5C43 · 4 B · Engine - verified
Evt_InFrontLeft$C0:5C47 · 38 B · EngineFacing 2: as Evt_InFrontUp on the other axis: C=1 when Obj_PosX - ObjFront_X is negative with magnitude under ObjFront_Reach and |Obj_PosY - ObjFront_Y| is under it (same SBC carries). - verified
Evt_InFrontRight$C0:5C6D · 35 B · EngineFacing 3: as Evt_InFrontDown on the other axis: C=1 when Obj_PosX - ObjFront_X is from 0 to under ObjFront_Reach and |Obj_PosY - ObjFront_Y| is under it (same SBC carries). - verified
Evt_FindOrAddUnk0920$C0:5C90 · 55 B · EngineLooks up Evt_Unk0920Key in the Evt_Unk0920Entries (16) bytes of Evt_Unk0920: found at n, A = Evt_Unk0930[n] (the Obj_Cur stored with it) and C=1. - verified
LocLoad_CheckEvtData$C0:5CC7 · 37 B · EngineTwo checks LocLoad_Unk56D4 makes on the event data it has just unpacked; each failure ends in Sys_HaltWithColor: - Evt_ObjCount = Evt_BadObjCount ($0D) with first Evt_Data byte Evt_BadFirstByte... - verified
LocLoad_InitUnk7F3700$C0:5CEC · 75 B · EngineSeeds the 134 bytes at Map_Unk7F3700 from LocLoad_Unk7F3700Init with five MVNs: 32 bytes from the table's start to $7F:3700, then three times 32 bytes from LocLoad_Unk7F3700Init_Rec1 to $7F:3720... - verified
LocLoad_Unk7F3700Init$C0:5D37 · 55 B · EngineLocLoad_InitUnk7F3700's source: 25 bytes for $7F:3700, 24 for the three blocks at $7F:3720-$7F:3760 (Rec1; the copies take 32 and so also read Rec4 and the first two bytes of Evt_OpcodeTable) and... - verified
Evt_OpcodeTable$C0:5D6E · 512 B · EngineThe event-script opcode handlers, one word per opcode $00-$FF (bank $C0 addresses), indexed by opcode x 2: the script runners read the opcode byte at Evt_Data + the script position, set Y = that... - verified
Evt_UnusedOpcode$C0:5F6E · 6 B · EngineThe handler Evt_OpcodeTable gives every unused event opcode ($01, $3A, $3D, $3E, $45, $46, $6E, $70, $74, $78, $79, $85, $86, $93, $9B, $A2-$A5, $BE, $BF, $C5, $C6, $DB, $E9, $EF, $F5-$F7... - verified
Evt_Op00_Return$C0:5F74 · 66 B · EngineEvent opcode $00 (1 byte): ends the function Obj_Cur is running. - verified
Evt_Op02_CallObjFunc$C0:5FB6 · 8 B · EngineEvent opcode $02 (3 bytes: $02, slot, level/function): makes the object in slot run one of its functions, without waiting. - verified
Evt_Op02_Body$C0:5FBE · 192 B · Engine
Bank $C0 · $C0:6000–$6FFF
$C0:6000
Verified · 136
- verified
Evt_Op03_CallObjFuncRetry$C0:607E · 8 B · EngineEvent opcode $03 (3 bytes: $03, slot, level/function): as Evt_Op02_CallObjFunc, but it starts the call or waits: while the target's Obj_Unk1C01 is nonzero or the new level is not below the... - verified
Evt_Op03_Body$C0:6086 · 131 B · Engine - verified
Evt_Op04_CallObjFuncWait$C0:6109 · 25 B · EngineEvent opcode $04 (3 bytes: $04, slot, level/function): as Evt_Op03_CallObjFuncRetry, and then waits for the function to end. - verified
Evt_Op04_Start$C0:6122 · 141 B · Engine - verified
Evt_Op04_WaitSlot$C0:61AF · 58 B · Engine - verified
Evt_Op05_CallPcFunc$C0:61E9 · 21 B · EngineEvent opcode $05 (3 bytes: $05, p, level/function): Evt_Op02_CallObjFunc on party member p's object (Party_ObjSlot + p). - verified
Evt_Op06_CallPcFuncRetry$C0:61FE · 22 B · EngineEvent opcode $06 (3 bytes: $06, p, level/function): Evt_Op03_CallObjFuncRetry on party member p's object. - verified
Evt_Op07_CallPcFuncWait$C0:6214 · 44 B · EngineEvent opcode $07 (3 bytes: $07, p, level/function): Evt_Op04_CallObjFuncWait on party member p's object: with ObjX_CallWait 0 through Evt_Op04_Start (no member, bit 7 set: X = Y + 3, C=1), else... - verified
Evt_Op08_BlockCalls$C0:6240 · 7 B · EngineEvent opcode $08 (1 byte): Obj_Cur's Obj_Unk1C01 = 1. - verified
Evt_Op08_Next$C0:6247 · 4 B · Engine - verified
Evt_Op09_AllowCalls$C0:624B · 9 B · EngineEvent opcode $09 (1 byte): Obj_Cur's Obj_Unk1C01 = 0 (undoes Evt_Op08_BlockCalls); X = Y + 1, C=1 through Evt_Op08_Next. - verified
Evt_Op0A_RemoveObj$C0:6254 · 21 B · EngineEvent opcode $0A (2 bytes: $0A, slot): the object in slot gets Obj_Unk1100 = $80 (bit 7: Vblank_Unk59D9 never queues its script and the call opcodes skip it) and Obj_Unk1A81 = 0 (no frame build)... - verified
Evt_Op0B_StopObjScript$C0:6269 · 25 B · EngineEvent opcode $0B (2 bytes: $0B, slot): sets bit 7 of the object's Obj_Unk1000 (Obj_Unk1000Bit7): Vblank_Unk59D9 stops counting its script timer, so its script no longer runs, and the call opcodes... - verified
Evt_Op0C_StartObjScript$C0:6282 · 19 B · EngineEvent opcode $0C (2 bytes: $0C, slot): clears bit 7 of the object's Obj_Unk1000 (undoes Evt_Op0B_StopObjScript); X = Y + 2, C=1 through Evt_Op0E_Next. - verified
Evt_Op0D_SetUnk1C80$C0:6295 · 15 B · EngineEvent opcode $0D (2 bytes: $0D, value): Obj_Cur's Obj_Unk1C80 = value (bit 0 Obj_Unk1C80Block: tile blocking in Obj_SetVelocityChecked; bit 1 Obj_Unk1C80Front: Evt_FindSolidObjInFront looks for... - verified
Evt_Op0E_SetUnk1C81$C0:62A4 · 13 B · EngineEvent opcode $0E (2 bytes: $0E, value): Obj_Cur's Obj_Unk1C81 = value (bit 0 Obj1C81_CentreOnTile, bit 1 Obj1C81_OntoObj: what the walk opcodes do on arriving). - verified
Evt_Op0E_Next$C0:62B1 · 4 B · Engine - verified
Evt_Op10_JumpFwd$C0:62B5 · 22 B · EngineEvent opcode $10 (2 bytes: $10, n): the script goes on n bytes after the operand byte: X = Y + 1 + n, C=1. - verified
Evt_Op11_JumpBack$C0:62CB · 19 B · EngineEvent opcode $11 (2 bytes: $11, n): the script goes back n bytes from the operand byte: X = Y + 1 - n, C=1 (through Evt_Op10_JumpFwd's .store). - verified
Evt_Op12_IfVarByte$C0:62DE · 53 B · EngineEvent opcode $12 (5 bytes: $12, a, value, cmp, n): EvtIf_Left = the low byte of event word a, EvtIf_Right = value; comparison cmp of Evt_CmpTable8 (0 =, 1 !=, 2 >, 3 <, 4 >=, 5 <=, 6 AND nonzero... - verified
Evt_Op13_IfVarWord$C0:6313 · 54 B · EngineEvent opcode $13 (6 bytes: $13, a, value (word), cmp, n): as Evt_Op12_IfVarByte with the whole event word a and a 16-bit value, through Evt_CmpTable16. - verified
Evt_JumpFromOfsPos$C0:6349 · 24 B · Engine - verified
Evt_Op14_IfVarVarByte$C0:6361 · 67 B · EngineEvent opcode $14 (5 bytes: $14, a, b, cmp, n): as Evt_Op12_IfVarByte with EvtIf_Right = the low byte of event word b. - verified
Evt_Op15_IfVarVarWord$C0:63A4 · 66 B · EngineEvent opcode $15 (5 bytes: $15, a, b, cmp, n): as Evt_Op14_IfVarVarByte with the whole event words, through Evt_CmpTable16. - verified
Evt_Op16_IfMemByte$C0:63E6 · 92 B · EngineEvent opcode $16 (5 bytes: $16, m, value, cmp, n): EvtIf_Left = the byte at Evt_Mem7F + m, or at Evt_Mem7F + $100 + m when bit 7 (EvtIf_Page1Flag) of cmp is set; EvtIf_Right = value; comparison... - verified
Evt_Op18_IfUnk7F0000Below$C0:6442 · 37 B · EngineEvent opcode $18 (3 bytes: $18, value, n): goes on (X = Y + 3) while Eng_Unk7F0000 < value; from value up it jumps n bytes on from the n byte. - verified
Evt_CmpTable8$C0:6467 · 16 B · EngineThe byte comparisons of the condition opcodes $12, $14 and $16, indexed by cmp x 2 (JSR (Evt_CmpTable8,X) with 8-bit X). - verified
Evt_CmpTable16$C0:6477 · 16 B · EngineThe word comparisons of opcodes $13 and $15, in the order of Evt_CmpTable8. - verified
Evt_Cmp8Eq$C0:6487 · 8 B · EngineThe byte comparisons of Evt_CmpTable8: each compares EvtIf_Left with EvtIf_Right (unsigned) and returns C=0 when the relation holds, C=1 when not: Eq =, Ne !=, Gt >, Lt <, Ge >=, Le <=, And (Left... - verified
Evt_Cmp8Ne$C0:648F · 8 B · Engine - verified
Evt_Cmp8Gt$C0:6497 · 10 B · Engine - verified
Evt_Cmp8Lt$C0:64A1 · 8 B · Engine - verified
Evt_Cmp8Ge$C0:64A9 · 10 B · Engine - verified
Evt_Cmp8Holds$C0:64B3 · 2 B · Engine - verified
Evt_Cmp8Le$C0:64B5 · 10 B · Engine - verified
Evt_Cmp8And$C0:64BF · 8 B · Engine - verified
Evt_Cmp8Or$C0:64C7 · 8 B · Engine - verified
Evt_Cmp16Eq$C0:64CF · 12 B · Engine - verified
Evt_Cmp16Ne$C0:64DB · 12 B · Engine - verified
Evt_Cmp16Gt$C0:64E7 · 14 B · Engine - verified
Evt_Cmp16Lt$C0:64F5 · 14 B · Engine - verified
Evt_Cmp16Ge$C0:6503 · 14 B · Engine - verified
Evt_Cmp16Le$C0:6511 · 14 B · Engine - verified
Evt_Cmp16Holds$C0:651F · 4 B · Engine - verified
Evt_Cmp16And$C0:6523 · 12 B · Engine - verified
Evt_Cmp16Or$C0:652F · 12 B · Engine - verified
Evt_Op19_SetUnk7F0A80Var$C0:653B · 19 B · EngineEvent opcode $19 (2 bytes: $19, a): Obj_Cur's ObjX_Unk7F0A80 = event word a; X = Y + 2, C=1, through the store at the end of Evt_Op1C_SetUnk7F0A80Mem (BRA Evt_Op1C_SetUnk7F0A80Mem_store). - verified
Evt_Op1C_SetUnk7F0A80Mem$C0:654E · 26 B · EngineEvent opcode $1C (3 bytes: $1C, m (word)): Obj_Cur's ObjX_Unk7F0A80 = the word at Evt_Mem7F + m; X = Y + 3, C=1. - verified
Evt_Op1A_IfUnk7F0A80$C0:6568 · 39 B · EngineEvent opcode $1A (3 bytes: $1A, value, n): goes on (X = Y + 3) when the low byte of Obj_Cur's ObjX_Unk7F0A80 equals value, else jumps n bytes on from the n byte. - verified
Evt_Op20_GetPartyMember0$C0:658F · 27 B · EngineEvent opcode $20 (2 bytes: $20, a): event word a's low byte = the first byte of Party_Members (the character id of party member 1, probably the leader); X = Y + 2, C=1. - verified
Evt_Op21_GetObjTile$C0:65AA · 8 B · EngineEvent opcode $21 (4 bytes: $21, slot, a, b): event word a's low byte = the object's Obj_TileX, event word b's = its Obj_TileY; X = Y + 4, C=1. - verified
Evt_Op21_Body$C0:65B2 · 57 B · Engine - verified
Evt_Op22_GetPcTile$C0:65EB · 13 B · EngineEvent opcode $22 (4 bytes: $22, p, a, b): Evt_Op21_GetObjTile for party member p's object (Party_ObjSlot + p); X = Y + 4, C=1. - verified
Evt_Op23_GetObjFacing$C0:65F8 · 8 B · EngineEvent opcode $23 (3 bytes: $23, slot, a): event word a's low byte = the object's Obj_Facing; X = Y + 3, C=1. - verified
Evt_Op23_Body$C0:6600 · 31 B · Engine - verified
Evt_Op24_GetPcFacing$C0:661F · 13 B · EngineEvent opcode $24 (3 bytes: $24, p, a): Evt_Op23_GetObjFacing for party member p's object; X = Y + 3, C=1. - verified
Evt_Op27_IfObjUnk0F00$C0:662C · 41 B · EngineEvent opcode $27 (3 bytes: $27, slot, n): goes on (X = Y + 3) when the object's Obj_Unk0F00 is nonzero (it has a frame to build), else jumps n bytes on from the n byte. - verified
Evt_Op28_IfObjInsideScreen$C0:6655 · 80 B · EngineEvent opcode $28 (3 bytes: $28, slot, n): goes on (X = Y + 3) when the object is well inside the screen, by Evt_Op8F_FollowPc's test: its Obj_TileX minus EvtFollow_ScrCol (Map_TileOriginX / 2) is... - verified
Evt_Op2D_IfAnyHeld$C0:66A5 · 13 B · EngineEvent opcode $2D (2 bytes: $2D, n): goes on when Pad_Unk00F8 or Pad_Unk00F9 is nonzero (any button or D-pad direction held, through the button map), else jumps. - verified
Evt_Op30_IfMapHeldBit1$C0:66B2 · 10 B · EngineEvent opcode $30 (2 bytes: $30, n): goes on when Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1, the button the D-pad handlers run with) is held, else jumps. - verified
Evt_Op31_IfMapHeldBit7$C0:66BC · 10 B · EngineEvent opcode $31 (2 bytes: $31, n): goes on when Pad_Unk00F8 bit 7 (Pad_Unk00F8Bit7) is held, else jumps. - verified
Evt_Op34_IfHeldA$C0:66C6 · 10 B · EngineEvent opcode $34 (2 bytes: $34, n): goes on when A (Pad_A) is held in Menu_PadHeld, else jumps. - verified
Evt_PadJump$C0:66D0 · 21 B · Engine - verified
Evt_Op35_IfHeldB$C0:66E5 · 10 B · EngineEvent opcode $35 (2 bytes: $35, n): goes on when B (Pad_B) is held in Menu_PadHeld, else jumps. - verified
Evt_Op36_IfHeldX$C0:66EF · 10 B · EngineEvent opcode $36 (2 bytes: $36, n): goes on when X (Pad_X) is held in Menu_PadHeld, else jumps. - verified
Evt_Op37_IfHeldY$C0:66F9 · 8 B · EngineEvent opcode $37 (2 bytes: $37, n): goes on when Y (Pad_Y) is held in Menu_PadHeld, else jumps. - verified
Evt_PadGoOn$C0:6701 · 4 B · Engine - verified
Evt_Op38_IfHeldL$C0:6705 · 10 B · EngineEvent opcode $38 (2 bytes: $38, n): goes on when L (Pad_L) is held in Menu_PadHeld, else jumps. - verified
Evt_Op39_IfHeldR$C0:670F · 10 B · EngineEvent opcode $39 (2 bytes: $39, n): goes on when R (Pad_R) is held in Menu_PadHeld, else jumps. - verified
Evt_Op3B_IfMapPressedBit1$C0:6719 · 11 B · EngineEvent opcode $3B (2 bytes: $3B, n): when Pad_Unk00F6Latch bit 1 (Pad_Unk00F6Bit1) is set it is cleared and the script goes on, else it jumps. - verified
Evt_Op3C_IfMapPressedBit7$C0:6724 · 14 B · EngineEvent opcode $3C (2 bytes: $3C, n): as Evt_Op3B_IfMapPressedBit1 with bit 7 (Pad_Unk00F6Bit7, the button Field_ActionButton acts on). - verified
Evt_Op3F_IfPressedA$C0:6732 · 14 B · EngineEvent opcode $3F (2 bytes: $3F, n): when A (Pad_A) is set in Pad_PressedLatch it is cleared and the script goes on, else it jumps. - verified
Evt_Op40_IfPressedB$C0:6740 · 14 B · EngineEvent opcode $40 (2 bytes: $40, n): as Evt_Op3F_IfPressedA with B (Pad_B); goes on through Evt_PadGoOn2. - verified
Evt_Op41_IfPressedX$C0:674E · 14 B · EngineEvent opcode $41 (2 bytes: $41, n): as Evt_Op3F_IfPressedA with X (Pad_X); goes on through Evt_PadGoOn2. - verified
Evt_Op42_IfPressedY$C0:675C · 14 B · EngineEvent opcode $42 (2 bytes: $42, n): as Evt_Op3F_IfPressedA with Y (Pad_Y); goes on through Evt_PadGoOn2. - verified
Evt_Op43_IfPressedL$C0:676A · 14 B · EngineEvent opcode $43 (2 bytes: $43, n): as Evt_Op3F_IfPressedA with L (Pad_L); goes on through Evt_PadGoOn2. - verified
Evt_Op44_IfPressedR$C0:6778 · 12 B · EngineEvent opcode $44 (2 bytes: $44, n): as Evt_Op3F_IfPressedA with R (Pad_R). - verified
Evt_PadGoOn2$C0:6784 · 4 B · Engine - verified
Evt_Op47_SetScanlineLimit$C0:6788 · 10 B · EngineEvent opcode $47 (2 bytes: $47, v): the low byte of ObjQ_ScanlineLimit = v (Field_ProcessAnimQueue stops building frames once the V counter reaches it); X = Y + 2, C=1 through Evt_PadGoOn2. - verified
Evt_Op48_GetLongByte$C0:6792 · 16 B · EngineEvent opcode $48 (5 bytes: $48, ptr, a): event word a's low byte = the byte at ptr; X = Y + 5, C=1. - verified
Evt_ReadSrcPtrAndVar$C0:67A2 · 37 B · EngineReads the operands of opcodes $48 / $49: EvtMem_Src = the 3 bytes at Y + 1 (ptr), then X = the event word index (the byte at Y + 4) x 2, with EvtMem_Pos = Y + 4. - verified
Evt_Op49_GetLongWord$C0:67C7 · 16 B · EngineEvent opcode $49 (5 bytes: $49, ptr, a): event word a = the word at ptr; X = Y + 5, C=1. - verified
Evt_Op4A_SetLongByte$C0:67D7 · 12 B · EngineEvent opcode $4A (5 bytes: $4A, ptr, value): the byte at ptr = value; X = Y + 5, C=1. - verified
Evt_ReadDstPtr$C0:67E3 · 24 B · EngineReads the pointer operand of opcodes $4A-$4D: EvtMem_Dst = the 3 bytes at Y + 1; X = Y + 4 (the next operand). - verified
Evt_Op4B_SetLongWord$C0:67FB · 17 B · EngineEvent opcode $4B (6 bytes: $4B, ptr, value (word)): the word at ptr = value; X = Y + 6, C=1. - verified
Evt_Op4C_SetLongVarByte$C0:680C · 29 B · EngineEvent opcode $4C (5 bytes: $4C, ptr, a): the byte at ptr = event word a's low byte; X = Y + 5, C=1. - verified
Evt_Op4D_SetLongVarWord$C0:6829 · 29 B · EngineEvent opcode $4D (5 bytes: $4D, ptr, a): the word at ptr = event word a; X = Y + 5, C=1. - verified
Evt_Op4E_CopyData$C0:6846 · 95 B · EngineEvent opcode $4E (variable: $4E, dst (word), bank, len (word), then len - 2 data bytes): copies the data bytes with MVN to dst in bank $7E when bank is $7E, else in bank $7F (any other bank byte)... - verified
Evt_Op4F_SetVarByte$C0:68A5 · 33 B · EngineEvent opcode $4F (3 bytes: $4F, value, a): event word a's low byte = value; X = Y + 3, C=1. - verified
Evt_Op50_SetVarWord$C0:68C6 · 35 B · EngineEvent opcode $50 (4 bytes: $50, value (word), a): event word a = value; X = Y + 4, C=1. - verified
Evt_Op51_CopyVarByte$C0:68E9 · 42 B · EngineEvent opcode $51 (3 bytes: $51, a, b): event word b's low byte = event word a's low byte (a is read as a word, only its low byte stored); X = Y + 3, C=1. - verified
Evt_Op52_CopyVarWord$C0:6913 · 42 B · EngineEvent opcode $52 (3 bytes: $52, a, b): event word b = event word a; X = Y + 3, C=1. - verified
Evt_Op53_GetMemByte$C0:693D · 39 B · EngineEvent opcode $53 (4 bytes: $53, m (word), a): event word a's low byte = the byte at Evt_Mem7F + m (read as a word, its low byte stored); X = Y + 4, C=1. - verified
Evt_Op54_GetMemWord$C0:6964 · 39 B · EngineEvent opcode $54 (4 bytes: $54, m (word), a): event word a = the word at Evt_Mem7F + m; X = Y + 4, C=1. - verified
Evt_Op55_GetUnk7F0000$C0:698B · 27 B · EngineEvent opcode $55 (2 bytes: $55, a): event word a's low byte = Eng_Unk7F0000; X = Y + 2, C=1. - verified
Evt_Op56_SetMemByte$C0:69A6 · 30 B · EngineEvent opcode $56 (4 bytes: $56, value, m (word)): the byte at Evt_Mem7F + m = value; X = Y + 4, C=1. - verified
Evt_Op58_SetMemVarByte$C0:69C4 · 39 B · EngineEvent opcode $58 (4 bytes: $58, a, m (word)): the byte at Evt_Mem7F + m = event word a's low byte; X = Y + 4, C=1. - verified
Evt_Op59_SetMemVarWord$C0:69EB · 39 B · EngineEvent opcode $59 (4 bytes: $59, a, m (word)): the word at Evt_Mem7F + m = event word a; X = Y + 4, C=1. - verified
Evt_Op5A_SetUnk7F0000$C0:6A12 · 13 B · EngineEvent opcode $5A (2 bytes: $5A, value): Eng_Unk7F0000 = value; X = Y + 2, C=1. - verified
Evt_Op5B_AddVarByte$C0:6A1F · 38 B · EngineEvent opcode $5B (3 bytes: $5B, value, a): event word a's low byte += value; X = Y + 3, C=1. - verified
Evt_Op5D_AddVarVarByte$C0:6A45 · 47 B · EngineEvent opcode $5D (3 bytes: $5D, a, b): event word b's low byte += event word a's low byte; X = Y + 3, C=1. - verified
Evt_Op5E_AddVarVarWord$C0:6A74 · 47 B · EngineEvent opcode $5E (3 bytes: $5E, a, b): event word b += event word a; X = Y + 3, C=1. - verified
Evt_Op5F_SubVarByte$C0:6AA3 · 38 B · EngineEvent opcode $5F (3 bytes: $5F, value, a): event word a's low byte -= value; X = Y + 3, C=1. - verified
Evt_Op60_SubVarWord$C0:6AC9 · 40 B · EngineEvent opcode $60 (4 bytes: $60, value (word), a): event word a -= value; X = Y + 4, C=1. - verified
Evt_Op61_SubVarVarByte$C0:6AF1 · 47 B · EngineEvent opcode $61 (3 bytes: $61, a, b): event word b's low byte -= event word a's low byte; X = Y + 3, C=1. - verified
Evt_Op63_SetVarBit$C0:6B20 · 43 B · EngineEvent opcode $63 (3 bytes: $63, bit, a): sets bit number bit (0-7, through BitSet) in event word a's low byte; X = Y + 3, C=1. - verified
Evt_Op64_ClearVarBit$C0:6B4B · 43 B · EngineEvent opcode $64 (3 bytes: $64, bit, a): clears bit number bit (0-7, through BitClear) in event word a's low byte; X = Y + 3, C=1. - verified
Evt_Op65_SetMemBit$C0:6B76 · 46 B · EngineEvent opcode $65 (3 bytes: $65, bit, m): sets a bit of the byte at Evt_Mem7F + m, or at Evt_Mem7F + $100 + m when bit 7 of the bit operand is set; the bit number is the operand's bits 0-3... - verified
Evt_Op66_ClearMemBit$C0:6BA4 · 46 B · EngineEvent opcode $66 (3 bytes: $66, bit, m): clears a bit of the byte at Evt_Mem7F + m, or at Evt_Mem7F + $100 + m when bit 7 of the bit operand is set; the bit number is the operand's bits 0-3... - verified
Evt_Op67_AndVarByte$C0:6BD2 · 37 B · EngineEvent opcode $67 (3 bytes: $67, mask, a): ANDs event word a's low byte with mask; X = Y + 3, C=1. - verified
Evt_Op69_OrVarByte$C0:6BF7 · 37 B · EngineEvent opcode $69 (3 bytes: $69, mask, a): ORs event word a's low byte with mask; X = Y + 3, C=1. - verified
Evt_Op6B_EorVarByte$C0:6C1C · 37 B · EngineEvent opcode $6B (3 bytes: $6B, mask, a): EORs event word a's low byte with mask; X = Y + 3, C=1. - verified
Evt_Op6F_ShrVarByte$C0:6C41 · 40 B · EngineEvent opcode $6F (3 bytes: $6F, count, a): shifts event word a's low byte right count times; X = Y + 3, C=1. - verified
Evt_Op71_IncVarByte$C0:6C69 · 28 B · EngineEvent opcode $71 (2 bytes: $71, a): adds 1 to event word a's low byte (wrapping in the byte); X = Y + 2, C=1. - verified
Evt_Op72_IncVarWord$C0:6C85 · 28 B · EngineEvent opcode $72 (2 bytes: $72, a): adds 1 to event word a; X = Y + 2, C=1. - verified
Evt_Op73_DecVarByte$C0:6CA1 · 28 B · EngineEvent opcode $73 (2 bytes: $73, a): subtracts 1 from event word a's low byte (wrapping in the byte); X = Y + 2, C=1. - verified
Evt_Op75_SetVarByte1$C0:6CBD · 25 B · EngineEvent opcode $75 (2 bytes: $75, a): event word a's low byte = 1; X = Y + 2, C=1. - verified
Evt_Op76_SetVarWord1$C0:6CD6 · 26 B · EngineEvent opcode $76 (2 bytes: $76, a): event word a = 1; X = Y + 2, C=1. - verified
Evt_Op77_ClearVarByte$C0:6CF0 · 25 B · EngineEvent opcode $77 (2 bytes: $77, a): event word a's low byte = 0; X = Y + 2, C=1. - verified
Evt_Op7F_RandomVarByte$C0:6D09 · 38 B · EngineEvent opcode $7F (2 bytes: $7F, a): event word a's low byte = the next RandomTable byte: Field_Unk0400Copy is incremented and indexes it (as Obj_SetVelocityChecked does); X = Y + 2, C=1. - verified
LocLoad_UploadPack$C0:6D2F · 54 B · EngineOne graphics pack of LocLoad_Unk0960: reads the pack number at [LocGfx_PackListPtr]; unless it is LocRom_SetNone, unpacks its LocGfx_PackPtrs entry with Decomp_ToWramVec to LocGfx_Stage and... - verified
LocLoad_UnpackPacks67$C0:6D65 · 106 B · EngineThe end of LocLoad_Unk0960: with LocGfx_PackListPtr on entry byte 6 of the LocGfx_Lists entry, unpacks pack 6 to LocGfx_Unk7F6000, steps the pointer (16-bit INX this time), and unpacks pack 7 to... - verified
LocLoad_Unk6DCF$C0:6DCF · 88 B · EngineLoads the layer-3 graphics: if LocRom.Tileset3 is LocRom_SetNone it only sets Field_UnkBB = 1 (no layer 3; LocLoad_Unk0A14 and LocLoad_UnkA33B test it). - verified
Credits_LoadGfx$C0:6E27 · 53 B · EngineUnpacks the pack at Credits_GfxPack ($FD:0000) to LocGfx_StageL3 and uploads Credits_GfxBytes of it to VRAM LocGfx_VramL3, as LocLoad_Unk6DCF loads a location's layer-3 graphics. - verified
Field_UploadUnk1F00$C0:6E5C · 68 B · EngineUploads one of eight bank-$FF graphics sets picked, like Pal_LoadUnkRow0's colours, by Menu_Config01 bits 0-2: the set's first Field_UploadUnk1F00Bytes ($200) go to VRAM $1F00 and the next... - verified
Field_UploadUnk1F00Srcs$C0:6EA0 · 16 B · EngineField_UploadUnk1F00's eight source offsets in bank $FF, one per Menu_Config01 setting; each set is $280 bytes ($200 + $80). - verified
Field_UploadUnk1D00$C0:6EB0 · 27 B · EngineUploads Field_UploadUnk1D00Bytes ($280) from Field_Unk7EF000 to VRAM $1D00 (VramDma_Upload, word writes): the 32 x 10 tilemap Field_Unk29F7 writes there (a bordered panel, probably a window... - verified
Field_UploadUnk5800$C0:6ECB · 38 B · EngineUploads Field_UploadUnk5800Bytes ($400) from Field_Unk7EF000 to VRAM word Field_UploadVram5800 + Field_Unk31 x $200 (VramDma_Upload, word writes). - verified
Field_UploadUnk1C00$C0:6EF1 · 27 B · EngineAs Field_UploadUnk1D00 with VRAM $1C00 and Field_UploadUnk1C00Bytes ($200), from the same Field_Unk7EF000: the 32 x 8 tilemap of tiles $00-$FF that Field_Unk2B78 writes there. - verified
Field_UploadUnk0000$C0:6F0C · 82 B · EngineFour uploads of Field_UploadUnk0000Bytes ($40) from bank $FF to the start of VRAM: FieldRom_Unk9CF0 + 0 / $40 / $80 / $C0 to VRAM $0000, $0100, $0030 and $0130 (two 2-tile pieces in each of two... - verified
Field_UploadUnk57E0$C0:6F5E · 27 B · EngineUploads Field_UploadUnk57E0Bytes ($40) from FieldRom_Unk9260 ($FF:9260) to VRAM $57E0, the last $20 words of the area LocLoad_Unk6DCF fills from LocGfx_VramL3 ($5000), so it overwrites the end of... - verified
Field_ResetUnk0B88$C0:6F79 · 33 B · EngineWith DP=$2100, writes Field_Unk0B80Empty ($80) to the Field_Unk0B88Bytes (30) bytes of Field_Unk0B88 through the WRAM port. - verified
Obj_Unk6F9A$C0:6F9A · 13 B · Sprites & objectsRuns Obj_TileSlotHandlers entry Obj_Unk1100 of Obj_Cur, unless bit 7 of it is set. - verified
Obj_TileSlotHandlers$C0:6FA7 · 18 B · Sprites & objectsObj_Unk6F9A's handlers by Obj_Unk1100 (9 words, kinds 0-8). - verified
Obj_TileSlotNone$C0:6FB9 · 1 B · Sprites & objectsObj_TileSlotHandlers' entry for the kinds that take no tile slot: RTS. - verified
Obj_TileSlotAllocKind$C0:6FBA · 156 B · Sprites & objectsGives Obj_Cur tile slots in Obj_TileSlot by its size class (Obj_SprSize & ObjSpr_SizeMask): - class 0: the first free slot from ObjTile_SingleTop ($19) down to 1 (slot 0 is never tried); - classes...
Bank $C0 · $C0:7000–$7FFF
$C0:7000
Verified · 41
- verified
Obj_Unk7056$C0:7056 · 46 B · Sprites & objectsGives back Obj_Cur's tile slot(s): n = Obj_TileRecOfs / $20 (the slot Obj_TileSlotAllocKind took). - verified
LocLoad_Unk7084$C0:7084 · 101 B · EngineCopies the location's palette rows: LocPal_Rom entry LocRom.Palette (LocPal_SetBytes = 7 x 30 bytes, offset by the hardware multiplier) goes with seven MVNs of LocPal_RowBytes each to Pal_LocRows... - verified
Pal_LoadUnkRow0$C0:70E9 · 69 B · EngineSets colours 1-15 of Pal_Buf row 0 and then copies all of Pal_Buf (Pal_BufBytes) to Pal_CgramBuf ($7E:2200): - 30 bytes from FieldRom_PalRow0Sets + 2 + n x 16, n = Menu_Config01 (Menu_Config+1)... - verified
Pal_UploadCgram$C0:712E · 38 B · EngineSends Pal_CgramBuf (Pal_BufBytes from $7E:2200) to CGRAM from colour 0 with DMA channel 7 (mode 0, B-bus CGDATA). - verified
Pal_UploadCgram_Rts$C0:7154 · 1 B · Engine - verified
Field_ResetUnk0B80$C0:7155 · 27 B · EngineWrites Field_Unk0B80Empty ($80) to the 8 bytes of Field_Unk0B80, one STA each (see Field_ResetUnk0B88). - verified
Obj_Unk7170$C0:7170 · 17 B · Sprites & objectsUnless Field_Unk54 bit 7 is set or Obj_Cur's Obj_Unk1100 has bit 7 set, runs Obj_PalSlotHandlers entry Obj_Unk1100 (kinds 0-11) to give the object a palette slot. - verified
Obj_PalSlotHandlers$C0:7181 · 24 B · Sprites & objectsObj_Unk7170's handlers by Obj_Unk1100 (12 words, kinds 0-11). - verified
Obj_PalSlotKind0$C0:7199 · 2 B · Sprites & objectsKind 0: X = ObjPal_SlotKind0 (slot 5), then falls into Obj_PalSlotFixed. - verified
Obj_PalSlotFixed$C0:719B · 119 B · Sprites & objectsGives Obj_Cur the palette slot X (5, 6 or 7 for kinds 0, 1 and 2). - verified
Obj_PalSlotKind1$C0:7212 · 5 B · Sprites & objectsKind 1: Obj_PalSlotFixed with X = ObjPal_SlotKind1 (slot 6). - verified
Obj_PalSlotKind2$C0:7217 · 5 B · Sprites & objectsKind 2: Obj_PalSlotFixed with X = ObjPal_SlotKind2 (slot 7). - verified
Obj_PalSlotAny$C0:721C · 152 B · Sprites & objectsKinds 3, 4 and 7-11: first looks through slots 0 to ObjPal_AnyEnd - 1 (0-4) for a taken one whose owner has Obj_Cur's Obj_PalSrc and, at the first, chains Obj_Cur after the owner (Obj_PalPrev =... - verified
Obj_Unk72B4$C0:72B4 · 152 B · Sprites & objectsAs Obj_PalSlotAny over slots ObjPal_BtlFirst to ObjPal_BtlEnd - 1 (1-3): kinds 5 and 6 through Obj_PalSlotHandlers, and FieldBtl_SaveObj for an object with Obj_Unk1A81 bit 7 set. - verified
Obj_Unk734C$C0:734C · 77 B · Sprites & objectsTakes Obj_Cur out of its palette slot's chain, unless Field_Unk54 bit 7 is set (then nothing, C=1). - verified
Map_InitMasksAndLimits$C0:7399 · 269 B · EngineTurns the six layer sizes LocLoad_UnkA33B just set into the wrap masks the row / column writers use: Map_ColMask1 from Map_Unk0BCB, Map_RowMask1 from Map_Unk0BCD, Map_ColMask2 / RowMask2 from... - verified
Map_InitOrigin$C0:74A6 · 46 B · EngineSets the scroll origin for the leader's entry point: Map_InitOriginX and Map_InitOriginY, then, when Map_Unk0BC9 has bit 7 set (layer 2 at half rate), layer 2's half-rate origin and bounds... - verified
Field_Unk74D4$C0:74D4 · 13 B · EngineResets layer 1's scroll: zeroes Map_BgColBias / Map_BgRowBias and the scroll words Map_Unk1D87 / Map_Unk1D89, then runs Sub_C07F9A for the new edge addresses. - verified
Field_Unk74D4_Tail$C0:74E1 · 7 B · Engine - verified
Field_Unk74E8$C0:74E8 · 15 B · EngineAs Field_Unk74D4 for layer 2: zeroes Map_BgColBias2 / Map_BgRowBias2, Map_Unk1D8B and Map_Unk1D8D, then Field_Unk74D4_Tail. - verified
Field_Unk74F7$C0:74F7 · 15 B · EngineAs Field_Unk74D4 for layer 3: zeroes Map_BgColBias3 / Map_BgRowBias3, Map_Unk1D8F and Map_Unk1D91, then Field_Unk74D4_Tail. - verified
Map_InitOriginX$C0:7506 · 77 B · EnginePuts layer 1's left origin (Map_TileOriginX, in 8x8 tiles: metatile column x 2) so that the entry column Loc_EntryX is Map_OriginLeadX metatiles from the screen's left edge, kept inside the limits... - verified
Map_InitOriginY$C0:7553 · 77 B · EngineAs Map_InitOriginX for rows: Map_TileOriginY from Loc_EntryY and the limits Map_Unk1D1C-1D1D, the leader Map_OriginLeadY metatiles below the top edge; the bottom bound Map_Unk1D10 = origin +... - verified
Map_ClearBufC800$C0:75A0 · 73 B · Engine(was Map_Unk75A0.) Zeroes the 2 KB WRAM buffer Map_BufC800 ($7E:C800–$7E:CFFF) that Field_BuildC800Mode1/2/4 fill: the first MVN copies the 32 zero bytes at GfxRom_D2 to its start, and each later... - verified
Field_BuildC800Mode1$C0:75E9 · 41 B · EngineMap layer redraws, row / column writers and edge VRAM addresses ($C0:75E9–$C0:8242) The map sits in WRAM as metatile numbers. - verified
Map_WriteRow1$C0:7612 · 466 B · EngineWrites one row of layer-1 tilemap words to WMDATA (WRAM at WMADD). - verified
Map_WriteCol1$C0:77E4 · 264 B · EngineWrites one column of layer-1 tilemap words to WMDATA, top to bottom. - verified
Field_BuildC800Mode2$C0:78EC · 227 B · EngineRedraws layer 2 into Map_BufC800 (WMADD = $7E:C800) with Map_WriteRow2, 16 metatiles (Map_RedrawLen) per row, one of three ways: - Map_LayerEdgeOff bit 1 clear, Map_Unk0BC9 bit 7 clear: as... - verified
Map_WriteRow2$C0:79CF · 474 B · EngineAs Map_WriteRow1 for layer 2: masks Map_RowMask2 / Map_ColMask2, the number's low byte from Map_Layer2Tiles and bit 8 from Map_TileHiBits bit 1, Map_Meta12* words. - verified
Map_WriteCol2$C0:7BA9 · 268 B · EngineAs Map_WriteCol1 for layer 2 (Map_RowMask2 / Map_ColMask2, Map_Layer2Tiles, Map_TileHiBits bit 1, Map_Meta12*); an odd first row also gives 2 x Map_BuildLen + 1 words. - verified
Field_BuildC800Mode4$C0:7CB5 · 177 B · EngineAs Field_BuildC800Mode2 for layer 3 with Map_WriteRow3, without the half-rate path: Map_LayerEdgeOff bit 2 clear redraws 32 rows from Map_TileOriginY / Map_TileOriginX; set builds the fixed map... - verified
Map_WriteRow3$C0:7D66 · 250 B · EngineAs Map_WriteRow1 for layer 3: masks Map_RowMask3 / Map_ColMask3, an 8-bit metatile number from Map_Layer3Tiles (zero-extended), words from Map_Meta3*. - verified
Map_WriteCol3$C0:7E60 · 248 B · EngineAs Map_WriteCol1 for layer 3 (Map_RowMask3 / Map_ColMask3, Map_Layer3Tiles zero-extended, Map_Meta3*); an odd first row gives 2 x Map_BuildLen + 1 words. - verified
Map_UploadBufTo7400$C0:7F58 · 5 B · EngineSends Map_BufC800 to VRAM through VramDma_Upload (VramDma_Mode 1, source $7E:C800): Map_UploadBufTo7400 ($7F58) 2 KB to VRAM word $7400; Map_UploadBufTo7000 ($7F5D) 2 KB to VRAM word $7000... - verified
Map_UploadBufTo7000$C0:7F5D · 3 B · Engine - verified
Map_UploadBufToX$C0:7F60 · 2 B · Engine - verified
Map_UploadBuf2K$C0:7F62 · 5 B · Engine - verified
Map_UploadBuf_Tail$C0:7F67 · 16 B · Engine - verified
Map_UploadBuf4K$C0:7F77 · 7 B · Engine - verified
LocLoad_ClearPage1D00$C0:7F7E · 28 B · EngineZeroes the 256 bytes at $00:1D00-$1DFF (the map page !DP_Map, low WRAM) with ClearRAMDMA: DmaFill_Size = $0100, DmaFill_Dest = $1D00, DmaFill_Bank = $00. - verified
Sub_C07F9A$C0:7F9A · 419 B · Engine (unnamed)Purpose not established (no reader of its results traced).
Bank $C0 · $C0:8000–$8FFF
$C0:8000
Verified · 50
- verified
Bg_RowSpan64x32$C0:813D · 100 B · EngineSplits a run of 34 tilemap words (Map_EdgeRowTiles) along row Y from column A of a 64x32 tilemap (two 32x32 screens, the right one Bg_ScreenWords further on) into pieces contiguous in VRAM. - verified
Bg_RowSpan64x32Addr$C0:81A1 · 53 B · EngineThe addresses of Bg_RowSpan64x32 without the sizes, in other registers: X = word offset of (A, Y), A = offset of the start of row Y in the other screen, Y = X - 31 (the third piece's address; the... - verified
Bg_ColSpan64x32$C0:81D6 · 66 B · EngineSplits a 32-word column of the 64x32 tilemap, column A from row Y and wrapping at the screen's bottom, into two pieces: X = word offset of (A, Y), Y = offset of (A, row 0) in the same screen... - verified
Bg_ColSpan64x32Addr$C0:8218 · 43 B · EngineThe addresses of Bg_ColSpan64x32 without the sizes: X = word offset of (A, Y), A = offset of (A, row 0) in the same screen. - verified
Map_BuildRowYInc1$C0:8243 · 32 B · EngineLayer-1 row for a rising Y scroll: WMADD = Map_BufC800, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D10; runs Map_WriteRow1 and sets bit 0 in... - verified
Map_BuildRowYInc2$C0:8263 · 34 B · EngineLayer-2 row for a rising Y scroll: WMADD = Map_BufD000, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D10; runs Map_WriteRow2 and sets bit 1 in... - verified
Map_BuildRowYInc2Half$C0:8285 · 32 B · EngineLayer-2 row for a rising Y scroll: WMADD = Map_BufD000, Map_BuildCol = Map_Unk1D12 - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D18; runs Map_WriteRow2 and sets bit 1 in... - verified
Map_BuildRowYInc3$C0:82A5 · 32 B · EngineLayer-3 row for a rising Y scroll: WMADD = Map_BufD800, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D10; runs Map_WriteRow3 and sets bit 2 in... - verified
Map_BuildRowYDec1$C0:82C5 · 32 B · EngineLayer-1 row for a falling Y scroll: WMADD = Map_BufC800, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_TileOriginY; runs Map_WriteRow1 and sets bit 0 in... - verified
Map_BuildRowYDec2$C0:82E5 · 32 B · EngineLayer-2 row for a falling Y scroll: WMADD = Map_BufD000, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_TileOriginY; runs Map_WriteRow2 and sets bit 1 in... - verified
Map_BuildRowYDec2Half$C0:8305 · 32 B · EngineLayer-2 row for a falling Y scroll: WMADD = Map_BufD000, Map_BuildCol = Map_Unk1D12 - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_Unk1D16; runs Map_WriteRow2 and sets bit 1 in... - verified
Map_BuildRowYDec3$C0:8325 · 32 B · EngineLayer-3 row for a falling Y scroll: WMADD = Map_BufD800, Map_BuildCol = Map_TileOriginX - 1, Map_BuildLen = Map_EdgeRowLen, Map_BuildRow = Map_TileOriginY; runs Map_WriteRow3 and sets bit 2 in... - verified
Map_BuildColXInc1$C0:8345 · 32 B · EngineLayer-1 column for a rising X scroll: WMADD = Map_BufC800 + Map_BufColOfs, Map_BuildCol = Map_Unk1D0C, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol1 and... - verified
Map_BuildColXInc2$C0:8365 · 32 B · EngineLayer-2 column for a rising X scroll: WMADD = Map_BufD000 + Map_BufColOfs, Map_BuildCol = Map_Unk1D0C, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol2 and... - verified
Map_BuildColXInc2Half$C0:8385 · 32 B · EngineLayer-2 column for a rising X scroll: WMADD = Map_BufD000 + Map_BufColOfs, Map_BuildCol = Map_Unk1D14, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_Unk1D16 - 1; runs Map_WriteCol2 and sets... - verified
Map_BuildColXInc3$C0:83A5 · 32 B · EngineLayer-3 column for a rising X scroll: WMADD = Map_BufD800 + Map_BufColOfs, Map_BuildCol = Map_Unk1D0C, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol3 and... - verified
Map_BuildColXDec1$C0:83C5 · 32 B · EngineLayer-1 column for a falling X scroll: WMADD = Map_BufC800 + Map_BufColOfs, Map_BuildCol = Map_TileOriginX, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol1... - verified
Map_BuildColXDec2$C0:83E5 · 32 B · EngineLayer-2 column for a falling X scroll: WMADD = Map_BufD000 + Map_BufColOfs, Map_BuildCol = Map_TileOriginX, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol2... - verified
Map_BuildColXDec2Half$C0:8405 · 32 B · EngineLayer-2 column for a falling X scroll: WMADD = Map_BufD000 + Map_BufColOfs, Map_BuildCol = Map_Unk1D12, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_Unk1D16 - 1; runs Map_WriteCol2 and sets... - verified
Map_BuildColXDec3$C0:8425 · 32 B · EngineLayer-3 column for a falling X scroll: WMADD = Map_BufD800 + Map_BufColOfs, Map_BuildCol = Map_TileOriginX, Map_BuildLen = Map_EdgeColLen, Map_BuildRow = Map_TileOriginY - 1; runs Map_WriteCol3... - verified
Map_UploadRowYInc1$C0:8445 · 98 B · EngineLayer-1 row upload for Map_BuiltRowYInc bit 0: sends the row in Map_BufC800 to VRAM as three pieces, at most, of Map_EdgeSize1 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_EdgeDmaRow$C0:84A7 · 26 B · EngineThe shared end of the row uploads: VMAIN = increment by 1 word after the high byte, DMA channel 7 in word mode (DMAP_TwoRegs) to VMDATAL, source bank $7E, and starts it. - verified
Map_UploadRowYInc2$C0:84C1 · 98 B · EngineLayer-2 row upload for Map_BuiltRowYInc bit 1: sends the row in Map_BufD000 to VRAM as three pieces, at most, of Map_EdgeSize2 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadRowYInc3$C0:8523 · 98 B · EngineLayer-3 row upload for Map_BuiltRowYInc bit 2: sends the row in Map_BufD800 to VRAM as three pieces, at most, of Map_EdgeSize3 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadRowYDec1$C0:8585 · 98 B · EngineLayer-1 row upload for Map_BuiltRowYDec bit 0: sends the row in Map_BufC800 to VRAM as three pieces, at most, of Map_EdgeSize1 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadRowYDec2$C0:85E7 · 98 B · EngineLayer-2 row upload for Map_BuiltRowYDec bit 1: sends the row in Map_BufD000 to VRAM as three pieces, at most, of Map_EdgeSize2 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadRowYDec3$C0:8649 · 98 B · EngineLayer-3 row upload for Map_BuiltRowYDec bit 2: sends the row in Map_BufD800 to VRAM as three pieces, at most, of Map_EdgeSize3 +0/+2/+4 bytes (a piece of size 0 is skipped), each from where the... - verified
Map_UploadColXInc1$C0:86AB · 50 B · EngineLayer-1 column upload for Map_BuiltColXInc bit 0: sends the column at Map_BufC800 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize1 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_EdgeDmaCol$C0:86DD · 26 B · EngineAs Map_EdgeDmaRow with VMAIN = increment by 32 words after the high byte (VRAM_INC_32), so the words go down a tilemap column. - verified
Map_UploadColXInc2$C0:86F7 · 50 B · EngineLayer-2 column upload for Map_BuiltColXInc bit 1: sends the column at Map_BufD000 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize2 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_UploadColXInc3$C0:8729 · 50 B · EngineLayer-3 column upload for Map_BuiltColXInc bit 2: sends the column at Map_BufD800 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize3 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_UploadColXDec1$C0:875B · 50 B · EngineLayer-1 column upload for Map_BuiltColXDec bit 0: sends the column at Map_BufC800 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize1 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_UploadColXDec2$C0:878D · 50 B · EngineLayer-2 column upload for Map_BuiltColXDec bit 1: sends the column at Map_BufD000 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize2 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Map_UploadColXDec3$C0:87BF · 50 B · EngineLayer-3 column upload for Map_BuiltColXDec bit 2: sends the column at Map_BufD800 + Map_BufColOfs to VRAM as two pieces, at most, of Map_EdgeSize3 +6/+8 bytes (a piece of size 0 is skipped), the... - verified
Field_Unk87F1$C0:87F1 · 45 B · EngineBuilds the right-hand edge column of each layer after a full redraw and recomputes the edge addresses: Map_BuildColXInc1; for layer 2, unless Map_LayerEdgeOff has Map_Layer2 set... - verified
Field_FrameUpdate$C0:881E · 60 B · EngineField work done every frame, before input-driven checks such as Field_ActionButton: resets Field_UnkEB (the action-button target) to none, then with DP=$1D00 runs Map_ResetUnk1D2E, clears... - verified
Field_Unk885A$C0:885A · 139 B · EngineA two-step job driven by Field_Unk38, run frame after frame by DefaultHandler's map-redraw path until it clears Field_Unk38: - Field_Unk38 = 1: zero Map_Unk1D2E/1D30/1D32/1D33. - verified
Map_ResetUnk1D2E$C0:88E5 · 9 B · EngineCopies Map_Unk1D2A to Map_Unk1D2E and Map_Unk1D2B to Map_Unk1D30 at the start of every Field_FrameUpdate (so those two hold per-frame values derived from a standing pair; meaning unknown). - verified
Field_DpadDispatch$C0:88EE · 20 B · EngineUnless Field_Unk38 is busy, runs the Field_DpadHandlerTable entry picked by Pad_Unk00F9 bits 0-3 (16 entries; the D-pad bits, if Pad_Unk00F9 is laid out like Pad_Pressed's high byte), with 8-bit X/Y. - verified
Field_DpadHandlerTable$C0:8902 · 34 B · EngineField_DpadDispatch's handler for each value of Pad_Unk00F9 bits 0-3, read as Right (bit 0), Left (1), Down (2) and Up (3) from what the handlers do; impossible pairs (Left+Right, Up+Down) and... - verified
Field_DpadNone$C0:8924 · 1 B · EngineNo direction (or an impossible combination): leaves Map_Unk1D2C/1D2D at the 0 Field_FrameUpdate set and Map_Unk1D2E/1D30 as they are. - verified
Field_DpadRight$C0:8925 · 31 B · EngineRight: Map_Unk1D2C = +$10 and Map_Unk1D2E += $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadLeft$C0:8944 · 31 B · EngineLeft: Map_Unk1D2C = -$10 and Map_Unk1D2E -= $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadUp$C0:8963 · 31 B · EngineUp: Map_Unk1D2D = -$10 and Map_Unk1D30 -= $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadDown$C0:8982 · 31 B · EngineDown: Map_Unk1D2D = +$10 and Map_Unk1D30 += $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadDownRight$C0:89A1 · 49 B · EngineDown+Right: both steps +$10, both sums up by $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadDownLeft$C0:89D2 · 53 B · EngineDown+Left: X step -$10 (sum down), Y step +$10 (sum up); $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadUpRight$C0:8A07 · 53 B · EngineUp+Right: X step +$10 (sum up), Y step -$10 (sum down); $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Field_DpadUpLeft$C0:8A3C · 49 B · EngineUp+Left: both steps -$10, both sums down by $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. - verified
Map_Unk8A6D$C0:8A6D · 1,800 B · EngineProbably the leader's collision with the map and with other objects (inferred: it zeroes the parts of the step whose moved box would have a corner on a blocking tile or touch a blocking object...
Bank $C0 · $C0:9000–$9FFF
$C0:9000
Verified · 50
- verified
Map_Unk9175$C0:9175 · 55 B · EngineField_FrameUpdate's step after the D-pad: zeroes Map_Unk1D32/1D33, then copies Map_Unk1D2E (signed X step) into Map_Unk1D32 unless the leader is already at the limit in that direction... - verified
Map_Unk91AC$C0:91AC · 565 B · EngineAdds up this frame's scroll amounts for three sets of layer scroll words and splits them into whole pixels for Map_Unk93E1, which runs next. - verified
Map_Unk93E1$C0:93E1 · 106 B · EngineApplies the pixels Map_Unk91AC split out this frame to the three sets of scroll words, then has the new tilemap edges built: - zeroes Map_EdgeRowYInc/YDec and Map_EdgeColXInc/XDec; - layer 1... - verified
Map_Scroll1XInc$C0:944B · 50 B · EngineLayer 1, X rising: once per pixel in Map_Move1XPos, Map_Unk1D87 + 1 and the fine counter Map_Unk1D93 + 1 (0-$0F, wrapping). - verified
Map_Scroll1XDec$C0:947D · 48 B · EngineLayer 1, X falling: as Map_Scroll1XInc with Map_Move1XNeg, stepping Map_Unk1D87 and Map_Unk1D93 down; the crossings are 0 to $0F and $08 to $07, and lower the low bytes of Map_Unk1D0C and... - verified
Map_Scroll1YInc$C0:94AD · 50 B · EngineLayer 1, Y rising: as Map_Scroll1XInc with Map_Move1YPos, Map_Unk1D89 and the fine counter Map_Unk1D96; the crossings raise the low bytes of Map_TileOriginY and Map_Unk1D10 and store Map_Layer1 in... - verified
Map_Scroll1YDec$C0:94DF · 48 B · EngineLayer 1, Y falling: as Map_Scroll1XDec with Map_Move1YNeg, Map_Unk1D89 and Map_Unk1D96; the crossings lower the low bytes of Map_TileOriginY and Map_Unk1D10 (in this order, unlike the X version)... - verified
Map_Scroll2XInc$C0:950F · 54 B · EngineLayer 2, X rising: once per pixel in Map_Move2XPos, Map_Unk1D8B + 1 and the fine counter Map_Unk1D94 + 1 (0-$0F, wrapping). - verified
Map_Scroll2XDec$C0:9545 · 52 B · EngineLayer 2, X falling: as Map_Scroll2XInc with Map_Move2XNeg, stepping down (crossings 0 to $0F and $08 to $07; Map_EdgeColXDec). - verified
Map_Scroll2YInc$C0:9579 · 54 B · EngineLayer 2, Y rising: as Map_Scroll2XInc with Map_Move2YPos, Map_Unk1D8D and Map_Unk1D97 (Map_EdgeRowYInc). - verified
Map_Scroll2YDec$C0:95AF · 52 B · EngineLayer 2, Y falling: as Map_Scroll2XDec with Map_Move2YNeg, Map_Unk1D8D and Map_Unk1D97 (Map_EdgeRowYDec). - verified
Map_Scroll2XIncHalf$C0:95E3 · 54 B · EngineLayer 2 at half rate, X rising (Map_Unk0BC9 bit 7): once per step in Map_Move2XPos the fine counter Map_Unk1D94 + 1, here 0-$1F (wrapping), and Map_Unk1D8B + 1 only when the new count is even, so... - verified
Map_Scroll2XDecHalf$C0:9619 · 52 B · EngineLayer 2 at half rate, X falling: as Map_Scroll2XIncHalf with Map_Move2XNeg, counting down (crossings 0 to $1F and $10 to $0F, which lower Map_Unk1D14 and Map_Unk1D12 and set Map_Layer2 in... - verified
Map_Scroll2YIncHalf$C0:964D · 54 B · EngineLayer 2 at half rate, Y rising: as Map_Scroll2XIncHalf with Map_Move2YPos, Map_Unk1D97 and Map_Unk1D8D; the crossings raise Map_Unk1D16 and Map_Unk1D18 (Map_EdgeRowYInc). - verified
Map_Scroll2YDecHalf$C0:9683 · 52 B · EngineLayer 2 at half rate, Y falling: as Map_Scroll2XDecHalf with Map_Move2YNeg, Map_Unk1D97 and Map_Unk1D8D; the crossings lower Map_Unk1D16 and Map_Unk1D18 (Map_EdgeRowYDec). - verified
Map_Scroll3XInc$C0:96B7 · 54 B · EngineLayer 3, X rising: as Map_Scroll2XInc with Map_Move3XPos, Map_Unk1D8F, Map_Unk1D95 and the Map_Layer3 bit. - verified
Map_Scroll3XDec$C0:96ED · 52 B · EngineLayer 3, X falling: as Map_Scroll2XDec with Map_Move3XNeg, Map_Unk1D8F, Map_Unk1D95 and the Map_Layer3 bit. - verified
Map_Scroll3YInc$C0:9721 · 62 B · EngineLayer 3, Y rising: as Map_Scroll2YInc with Map_Move3YPos, Map_Unk1D91, Map_Unk1D98 and the Map_Layer3 bit; also adds 4 to Map_Unk1DFB per pixel (four INCs; what reads it is not traced). - verified
Map_Scroll3YDec$C0:975F · 60 B · EngineLayer 3, Y falling: as Map_Scroll2YDec with Map_Move3YNeg, Map_Unk1D91, Map_Unk1D98 and the Map_Layer3 bit; also subtracts 4 from Map_Unk1DFB per pixel. - verified
Map_EdgeColsXInc$C0:979B · 49 B · EngineFor each layer bit set in Map_EdgeColXInc (1, 2, 3 in that order) runs that layer's column builder (Map_BuildColXInc1/2/3) and then adds 1 to the layer's column bias (Map_BgColBias... - verified
Map_EdgeColsXIncHalf$C0:97CC · 49 B · EngineAs Map_EdgeColsXInc, with Map_BuildColXInc2Half as layer 2's builder (used while Map_Unk0BC9 bit 7 is set). - verified
Map_EdgeColsXDec$C0:97FD · 49 B · EngineAs Map_EdgeColsXInc for Map_EdgeColXDec: builders Map_BuildColXDec1/ 2/3, and the column biases go down by 1 (wrapping at 64). - verified
Map_EdgeColsXDecHalf$C0:982E · 49 B · EngineAs Map_EdgeColsXDec, with Map_BuildColXDec2Half for layer 2. - verified
Map_EdgeRowsYInc$C0:985F · 49 B · EngineAs Map_EdgeColsXInc for rows: for each layer bit in Map_EdgeRowYInc runs Map_BuildRowYInc1/2/3 and adds 1 to the layer's row bias (Map_BgRowBias, Map_BgRowBias2, Map_BgRowBias3), wrapping at 32. - verified
Map_EdgeRowsYIncHalf$C0:9890 · 49 B · EngineAs Map_EdgeRowsYInc, with Map_BuildRowYInc2Half for layer 2. - verified
Map_EdgeRowsYDec$C0:98C1 · 49 B · EngineAs Map_EdgeRowsYInc for Map_EdgeRowYDec: builders Map_BuildRowYDec1/ 2/3, and the row biases go down by 1 (wrapping at 32). - verified
Map_EdgeRowsYDecHalf$C0:98F2 · 49 B · EngineAs Map_EdgeRowsYDec, with Map_BuildRowYDec2Half for layer 2. - verified
Map_ProbeHitsObj$C0:9923 · 187 B · EngineMap_Unk8A6D's object test of the point Map_ProbeX/Y. - verified
Map_Unk99DE$C0:99DE · 65 B · EngineField_FrameUpdate's step after Map_Unk9175: may drop the frame's steps in Map_Unk1D2E (X) and Map_Unk1D30 (Y). - verified
Map_StepStopDown$C0:9A1F · 30 B · EngineMap_Unk99DE's test for a downward step, A = n (step / 16). - verified
Map_StepStopUp$C0:9A3D · 35 B · EngineMap_Unk99DE's test for an upward step, A = n. - verified
Map_StepStopRight$C0:9A60 · 30 B · EngineAs Map_StepStopDown for a rightward step: L = Map_Unk1D0C / 2 against Map_Unk1D1B, the leader's Obj_ScreenX against Screen_HalfX (C=1 when it is in the left half or at $80), Map_Unk1D93 + n... - verified
Map_StepStopLeft$C0:9A7E · 35 B · EngineAs Map_StepStopUp for a leftward step: Map_Unk1D1A against T = Map_TileOriginX / 2, the leader's Obj_ScreenX against Screen_HalfX (C=1 when it is in the right half), Map_Unk1D93 - n. - verified
Map_ProbeTileAttrs$C0:9AA1 · 17 B · EngineReads the map bytes of one tile for the collision probes. - verified
Map_ProbeTileAttrs_Load$C0:9AB2 · 22 B · Engine - verified
Map_ProbeTileAttrsAny$C0:9AC8 · 11 B · EngineAs Map_ProbeTileAttrs without the treasure test: always reads the three bytes (branches into Map_ProbeTileAttrs_Load) and returns C=0. - verified
Map_ProbeTileLevel$C0:9AD3 · 290 B · EngineDecides which half of the probed tile the point Map_ProbeX/Y is in and loads that half's level. - verified
Map_SlopeShift$C0:9BF5 · 22 B · Engine/ Map_SlopeBase / Map_SlopeSide: Map_ProbeTileLevel's line for shapes 2-$17, indexed by Map_ProbeShape (shape - 2). - verified
Map_SlopeBase$C0:9C0B · 22 B · Engine - verified
Map_SlopeSide$C0:9C21 · 22 B · Engine - verified
Map_ProbeLevelBlocked$C0:9C37 · 37 B · EngineWhether the half tile Map_ProbeTileLevel picked blocks the leader, against Field_Unk55 (looks like the level the leader stands on): - Map_ProbeNoLevel set: blocks only when Field_Unk55 is... - verified
Map_StepTileEffects$C0:9C5C · 359 B · EngineMap_Unk8A6D's commit of a step it has kept. - verified
Map_InitEntryTile$C0:9DC3 · 102 B · EngineThe sibling of Map_StepTileEffects for a location load: it reads the entry tile (Loc_EntryX/Y) with Map_ProbeTileAttrsAny and Map_ProbeTileLevel at the bottom middle of the tile (Map_ProbeX low... - verified
Party_Unk9E29$C0:9E29 · 91 B · EngineThe leader's step (kind-0 object of Evt_OpB0_PartyControl): picks its animation (Party_LeaderAnim), then, when Map_Unk1D32 or Map_Unk1D33 (its X / Y step this frame) is nonzero, steps Field_UnkAB... - verified
Party_LeaderAnim$C0:9E84 · 77 B · EngineThe leader's facing and animation row from this frame's D-pad step (Map_Unk1D2C/1D2D) and tile flags (Map_Unk1D34): - flags with Map_ProbeShape1E (bit 2): with no Y step the animation stops... - verified
Party_Member2Anim$C0:9ED1 · 79 B · EngineAs Party_LeaderAnim from a log entry: the facing and row from PartyLog_PadX/Y and PartyLog_Flags at X (the D-pad step the leader had there). - verified
Party_Member3Anim$C0:9F20 · 79 B · EngineParty_Member2Anim again, byte for byte, for member 3. - verified
Party_FollowerHoldAnim$C0:9F6F · 131 B · EngineA follower's animation while it holds its place (Party_UnkA26B / A2CE when it is close enough behind), from the log entry X it is at: with PartyLog_Flags 0, Party_AnimNoStep (stand / idle). - verified
Party_AnimNoStep$C0:9FF2 · 5 B · EngineParty_AnimTable's handler for no step (entry 0 and every code that is not a D-pad direction): X = Obj_Cur, then Party_AnimIdle. - verified
Party_AnimTable$C0:9FF7 · 130 B · EngineThe facing / animation handler for each step code (JSR (Party_AnimTable,X) in Party_LeaderAnim, Party_Member2Anim, Party_Member3Anim and Party_FollowerHoldAnim; X = code & $7E, so entries 0-63).
Bank $C0 · $C0:A000–$AFFF
$C0:A000
Verified · 46
- verified
Party_AnimLeftWalk$C0:A079 · 10 B · EngineParty_AnimTable handlers for the four straight directions: Obj_Cur's Obj_Facing = the direction, then Party_AnimWalk (walk row) or Party_AnimRun (run row). - verified
Party_AnimRightWalk$C0:A083 · 10 B · Engine - verified
Party_AnimUpWalk$C0:A08D · 10 B · Engine - verified
Party_AnimDownWalk$C0:A097 · 10 B · Engine - verified
Party_AnimLeftRun$C0:A0A1 · 10 B · Engine - verified
Party_AnimRightRun$C0:A0AB · 10 B · Engine - verified
Party_AnimUpRun$C0:A0B5 · 10 B · Engine - verified
Party_AnimDownRun$C0:A0BF · 10 B · Engine - verified
Party_AnimDownLeftWalk$C0:A0C9 · 21 B · EngineParty_AnimTable handlers for the diagonals: Obj_Cur keeps its facing when it is one of the two directions, else faces the horizontal one; then Party_AnimWalk or Party_AnimRun. - verified
Party_AnimDownRightWalk$C0:A0DE · 21 B · Engine - verified
Party_AnimUpLeftWalk$C0:A0F3 · 21 B · Engine - verified
Party_AnimUpRightWalk$C0:A108 · 21 B · Engine - verified
Party_AnimDownLeftRun$C0:A11D · 21 B · Engine - verified
Party_AnimDownRightRun$C0:A132 · 21 B · Engine - verified
Party_AnimUpLeftRun$C0:A147 · 21 B · Engine - verified
Party_AnimUpRightRun$C0:A15C · 21 B · Engine - verified
Party_AnimWalk$C0:A171 · 27 B · EngineField_Unk58 = 0 (the frames-standing count, probably: Field_WaitFrame counts it up and Party_AnimIdle tests it), then the object at Y gets Obj_AnimRow = ObjAnim_RowWalk, column 0 and Obj_AnimTimer... - verified
Party_AnimRun$C0:A18C · 70 B · EngineField_Unk58 = 0, then the object at Y gets Obj_AnimRow = ObjAnim_RowRun (column and timer 0, unless already set); but when the leader has no step this frame (Map_Unk1D32 and 1D33 both 0), Y is the... - verified
Party_AnimRowUnk19$C0:A1D2 · 23 B · EngineThe object at Y gets Obj_AnimRow = ObjAnim_RowUnk19 (column and timer 0, unless already set). - verified
Party_AnimIdle$C0:A1E9 · 107 B · EngineNo step: the animation row while standing, for the object at Y. - verified
Party_AnimRowUnk1B$C0:A254 · 23 B · EngineThe object at Y gets Obj_AnimRow = ObjAnim_RowUnk1B (column and timer 0, unless already set): the row on a shape-$1E tile (Map_ProbeShape1E) with a Y step. - verified
Party_UnkA26B$C0:A26B · 99 B · EngineMember 2's step (kind-1 object of Evt_OpB0_PartyControl), on Party_ObjSlot1's object: Obj_VelX = Obj_VelY = 0; then the lag is Field_UnkAB - Field_UnkAC (& $7F). - verified
Party_UnkA2CE$C0:A2CE · 109 B · EngineMember 3's step (kind 2), as Party_UnkA26B on Party_ObjSlot2's object, following member 2: the lag is Field_UnkAC - Field_UnkAD, it replays from Field_UnkAD and ends in Party_Member3Anim. - verified
LocLoad_UnkA33B$C0:A33B · 461 B · EngineThe map-properties step of a location load (name kept: LoadLocation and Field_RestoreState call it by it). - verified
LocLoad_EmptyStep$C0:A508 · 1 B · EngineA lone RTS: does nothing. - verified
Ppu_ApplyMapScreens$C0:A509 · 24 B · EngineWrites the screen settings LocLoad_UnkA33B took from MapProps to the PPU: Ppu_Unk0BD7 to TM, Ppu_Unk0BD8 to TS, Ppu_Unk0BDF to CGADSUB, and 0 to MOSAIC (mosaic off). - verified
Map_UnpackTilePlanes$C0:A521 · 330 B · EngineReads the rest of the unpacked MapProps (from MapProps.Planes, through the WRAM data port) into the map's per-tile planes. - verified
Map_LoadExitTiles$C0:A66B · 167 B · EngineBuilds Map_TileExitIdx for the location: first every tile of all 64 rows gets Map_ExitNone (row 0 filled, then copied to rows 63 down to 1 with MVN, one Map_PlaneBytes row at a time), then... - verified
Map_LoadTreasureTiles$C0:A712 · 170 B · EngineAs Map_LoadExitTiles for treasure: Map_TreasureIdx gets Map_TreasureNone on every tile (row 0, then MVN copies), then Map_TreasureRec0 = the first word of TreasureRom_LocOfs and the location's... - verified
Map_TreasureTaken$C0:A7BC · 45 B · EngineTests the Treasure_Flags bit of the record at Map_RecOfs: its number is (Map_RecOfs - Map_TreasureRec0) / 4, as in Field_CheckTileInFront. - verified
Obj_ResetFrameState$C0:A7E9 · 39 B · Sprites & objectsFor each location object (Evt_ObjCount of them) writes 0 to its Obj_Unk0F00 (no frame to build) and Obj_LastFrameNone to its Obj_LastFrame (so the next frame is always rebuilt), through the WRAM... - verified
Vblank_UnkA810$C0:A810 · 125 B · EngineThe per-frame object pass. - verified
Obj_UpdateInView$C0:A88D · 186 B · Sprites & objectsTests object Obj_Cur against the view window and sets it up or drops it as it enters or leaves. - verified
Obj_FlagInView$C0:A947 · 67 B · Sprites & objectsThe view test for objects whose Obj_Unk1100 is Obj_Unk1100Seven: only sets Obj_Unk0F00 = Obj_Unk0F00Active in the window and 0 out of it, with no set-up, linking or release. - verified
Obj_DrawUnlink$C0:A98A · 67 B · Sprites & objectsTakes object Obj_Cur out of its draw bucket, if it is in one (Obj_DrawOut bit 7 clear). - verified
Obj_DrawLink$C0:A9CD · 58 B · Sprites & objectsPuts object Obj_Cur at the head of the draw bucket for its Obj_ScreenY, unless it is already in one (Obj_DrawOut bit 7 clear). - verified
Obj_MoveStep$C0:AA07 · 192 B · Sprites & objectsOne frame of movement for object Obj_Cur (Obj_Unk1100 3 and up), while Obj_MoveFrames is nonzero (it is decremented first). - verified
Obj_MoveStep_Arc$C0:AAC7 · 54 B · Sprites & objects - verified
Obj_MoveStepFree$C0:AAFD · 72 B · Sprites & objectsMovement for objects with Obj_Unk1100 below Obj_Unk1100FreeMove: with Obj_ArcMode set, the arc step (BRA Obj_MoveStep_Arc); otherwise, while Obj_MoveFrames is nonzero (decremented first), the low... - verified
Obj_CalcScreenPos$C0:AB45 · 93 B · Sprites & objectsScreen position of object Obj_Cur from its map position and the layer-1 view: ObjScr_ViewX = Map_TileOriginX (low byte) x 8 + (Map_Unk1D87 & 7), ObjScr_ViewY likewise from Map_TileOriginY and... - verified
Obj_CalcDirection$C0:ABA2 · 199 B · Sprites & objectsDirection from point (ObjDir_FromX, ObjDir_FromY) to (ObjDir_ToX, ObjDir_ToY), map tiles, as an angle in Obj_Direction: 256 per turn, $00 = +X (right), $40 = +Y (down), $80 = -X, $C0 = -Y. - verified
Obj_SetVelocity$C0:AC69 · 148 B · Sprites & objectsSets object X's steps from Obj_Direction and Obj_Speed with the hardware multiplier: Obj_VelY = speed x sin / 256 and Obj_VelX = speed x cos / 256 (Rom_SineTable256 at the direction and at the... - verified
Obj_SetVelocityChecked$C0:ACFD · 410 B · Sprites & objectsAs Obj_SetVelocity (steps from Obj_Direction and Obj_Speed, the sine into ObjVel_Y and the cosine into ObjVel_X, sign-extended into ObjVel_YHi / ObjVel_XHi), but it looks at the map tile the... - verified
Obj_SetVelocityChecked_Probe$C0:AE97 · 153 B · Sprites & objects - verified
Obj_SetVelocityAxis$C0:AF30 · 30 B · Sprites & objectsZeroes one of the two steps in ObjVel_X / ObjVel_Y, then probes and stores them through Obj_SetVelocityChecked_Probe: when |Y step| >= |X step| the Y step goes, else the X step. - verified
Field_UnkAF4E$C0:AF4E · 328 B · EngineCopies the rectangle MapCopy_SrcX..MapCopy_EndX x MapCopy_SrcY..
Bank $C0 · $C0:B000–$BFFF
$C0:B000
Verified · 24
- verified
Map_CopyRegionPlane$C0:B096 · 80 B · EngineCopies the MapCopy_* rectangle within one map plane, the one at $7E:MapCopy_Plane: one MVN per row of MapCopy_Width + 1 bytes, from MapCopy_SrcX/Y + MapCopy_Plane to MapCopy_DstX/Y +... - verified
Field_UnkB0E6$C0:B0E6 · 65 B · EngineThe location-load counterpart of Vblank_UnkA810: for every object slot below Evt_ObjCount x 2 (Evt_ObjSlotEnd) whose Obj_Unk1100 has bit 7 clear and is not Obj_Unk1100Seven, Obj_ActivateIfInView... - verified
Obj_ActivateIfInView$C0:B127 · 107 B · Sprites & objectsObj_UpdateInView's set-up half for a location load: when Obj_Unk1A81 is 1..$7F and the object lies in the view window, sets it up exactly as Obj_UpdateInView does (Obj_DrawPrev / Obj_DrawNext /... - verified
Obj_ResetStates$C0:B192 · 32 B · Sprites & objects(was Sub_B192.) Clears Obj_State for every object the location defines (count in Evt_ObjCount), pointing DP at the Obj_State table so each clear is a 2-byte dp store, then tail-jumps to... - verified
VramQ_Flush$C0:B1B2 · 82 B · EngineUploads every pending entry of the VRAM upload queue (VramQ_*, filled by Obj_BuildFrame4, Obj_BuildFrame8, Obj_BuildFrame8Pass1, Obj_BuildFrame12Pass2 and Obj_BuildFrame12Pass2Alt) with DMA... - verified
Obj_ResetDrawLists$C0:B204 · 94 B · Sprites & objectsEmpties the draw buckets: with DP=$2100 it writes ObjQ_Empty ($80) to the first 32 bytes at Obj_DrawBucket through the WRAM port, then MVNs spread them over the rest of the page ($0E20-$0EFF: 32... - verified
Oam_HideFirst4$C0:B262 · 15 B · EngineParks OAM shadow sprites 0-3 below the screen: their Y bytes in Oam_LowTable = Oam_HiddenY. - verified
Oam_BuildShadow$C0:B271 · 55 B · Engine(was PostVBlank.) Rebuilds the OAM shadow ($0700 low table, $0900 high table) for the next frame; it runs before Field_WaitFrame's wait for the NMI, not after a VBlank. - verified
Oam_BucketLoop$C0:B2A8 · 10 B · Engine - verified
Oam_CheckChain$C0:B2B2 · 14 B · Engine - verified
Oam_NextBucket$C0:B2C0 · 8 B · Engine - verified
Oam_HideRange1$C0:B2C8 · 16 B · Engine - verified
Oam_EndRange1$C0:B2D8 · 6 B · Engine - verified
Oam_HideRange2$C0:B2DE · 16 B · Engine - verified
Oam_EndRange2$C0:B2EE · 6 B · Engine - verified
Oam_HideRange3$C0:B2F4 · 16 B · Engine - verified
Oam_EndRange3$C0:B304 · 5 B · Engine - verified
Spr_AppendToOam$C0:B309 · 1,016 B · Engine(was Sub_B309.) Appends object Obj_Cur's sprite to the OAM shadow. - verified
Spr_PrepareTiles$C0:B701 · 135 B · Engine(was Sub_B701.) Brings object Obj_Cur's SprTile records up to date before Spr_AppendToOam copies them. - verified
Spr_Place4$C0:B788 · 322 B · Engine(was Sub_B788.) Re-places a 4-tile (size 0) object: with DB=$7F, each SprTile record's X = Spr_BaseX + OfsX (bit 8 packed into Obj_OamHiA with the large-size bits) and Y = Spr_BaseY + OfsY... - verified
Spr_Load4$C0:B8CA · 411 B · Engine(was Sub_B8CA.) Builds a 4-tile (size 0) object's SprTile records from SprTileSrc (OfsX, OfsY, Tile/Attr), placing them at the object's position as Spr_Place4 does (same three Y clamps). - verified
Spr_Place8$C0:BA65 · 631 B · Engine(was Sub_BA65.) Re-places an 8-tile (size 1) object from its existing SprTile records: two groups of 4 records give X and the two high-table bytes (Obj_OamHiA, Obj_OamHiA+1), then all 8 Y... - verified
Spr_Load8$C0:BCDC · 790 B · Engine(was Sub_BCDC.) Builds an 8-tile (size 1) object's SprTile records from SprTileSrc and places them: OfsX, OfsY and Tile/Attr are copied from SprTileSrc, then X, the two high-table bytes and Y are set. - verified
Spr_Place12$C0:BFF2 · 717 B · Engine(was Sub_BFF2.) Re-places a 12-tile (size 2) object from its existing SprTile records: three groups of 4 records give X and the high-table bytes (Obj_OamHiA, Obj_OamHiA+1, Obj_OamHiB), then the 12...
Bank $C0 · $C0:C000–$CFFF
$C0:C000
Verified · 11
- verified
Spr_Load12$C0:C2BF · 1,064 B · Engine(was Sub_C2BF.) Builds a 12-tile (size 2) object's SprTile records from SprTileSrc and places them: OfsX, OfsY and Tile/Attr are copied from SprTileSrc, then X, the three high-table bytes and Y... - verified
Spr_PackHiBits4$C0:C6E7 · 83 B · Engine(was Sub_C6E7.) For the 4 SprTile records starting at X: X = Spr_BaseX + OfsX, and returns in A the OAM high-table byte for them (X bit 8 of each, large-size bits set). - verified
Spr_Place24$C0:C73A · 592 B · Engine(was Sub_C73A.) Re-places a 24-tile (size 3) object: six Spr_PackHiBits4 groups fill Obj_OamHiA/B/C, then all 24 Y positions are rebuilt from Spr_BaseY + OfsY with the clamp variant chosen by... - verified
Obj_AnimTickAndQueue$C0:C98A · 236 B · Sprites & objectsPer-object animation tick, called for object Obj_Cur from the object loop ($C0:A832, $C0:A878). - verified
Field_ProcessAnimQueue$C0:CA76 · 99 B · EngineBuilds queued object frames while there is time left in the frame, called from Field_EndOfFrame ($C0:00D6). - verified
Obj_BuildSpriteFrameStep$C0:CAD9 · 49 B · Sprites & objectsOne step of building object Obj_Cur's current frame, graphics included: skips (C=0) unless Obj_Unk1100 bit 7 is clear, Obj_Unk1A81 is 1..$7F and Obj_Unk0F00 is nonzero; then by size class... - verified
Obj_BuildFrameLayout$C0:CB0A · 48 B · Sprites & objects(was Sub_CB0A.) Like Obj_BuildSpriteFrameStep, but for objects whose tiles are already in VRAM: tail-calls Obj_FrameLayout4 / 8 / 12, which only rewrite the SprTile records for Obj_LastFrame. - verified
Obj_AnimFrameLookup$C0:CB3A · 162 B · Sprites & objects(was Sub_CB3A.) Returns in A the frame number object X should show: Anim_FramePtr = Obj_AnimFrameTbl + (Obj_Facing × Obj_AnimFacingStride) + row*4 + Obj_AnimColumn, row = Obj_AnimRow (or... - verified
Obj_BuildFrame4$C0:CBDC · 492 B · Sprites & objects(was Sub_CBDC.) Builds frame A (Obj_FixedFrame in mode 3, else Obj_AnimFrameLookup) of a 4-tile object, in one pass. - verified
Obj_FrameLayout4$C0:CDC8 · 301 B · Sprites & objects(was Sub_CDC8.) Rewrites the 4 SprTile records of a 4-tile object for Obj_LastFrame directly (tiles already in VRAM): offsets from the frame record, Tile = Obj_VramTile + 2n, attributes as in... - verified
Obj_BuildFrame8$C0:CEF5 · 559 B · Sprites & objects(was Sub_CEF5.) Builds the current frame of an 8-tile object.
Bank $C0 · $C0:D000–$DFFF
$C0:D000
Verified · 11
- verified
Obj_FrameLayout8$C0:D124 · 358 B · Sprites & objects(was Sub_D124.) As Obj_FrameLayout4 for an 8-tile object (frame record 80 bytes, positions after 32 tile words); the first four tiles take Obj_PrioLow, the last four Obj_PrioHigh (by index, not by... - verified
Obj_BuildFrame8Pass0$C0:D28A · 131 B · Sprites & objects(was Sub_D28A.) First pass of an 8-tile frame: look the frame up, SprBuf_Alloc2 (2 adjacent SprBuf chunks), copy tiles 0-15 into the first chunk, INC Obj_State, return C=1 (more to do). - verified
Obj_BuildFrame8Pass1$C0:D30D · 490 B · Sprites & objects(was Sub_D30D.) Second pass: tiles 16-31 into the second chunk (Obj_TileBuf + $200), queue the VRAM upload ($200 bytes to Obj_VramTile*16, $200 more to the next tile row), write the 8 SprTileSrc... - verified
Obj_BuildFrame12$C0:D4F7 · 79 B · Sprites & objects(was Sub_D4F7.) Builds the current frame of a 12-tile object over three passes chosen by the Obj_State count (0 / 1 / 2+), each with an "Alt" variant when Obj_VramTile is ObjTile_AltLayout ($68... - verified
Obj_BuildFrame12Pass0$C0:D546 · 194 B · Sprites & objects(was Sub_D546.) Pass 0: frame lookup, SprBuf_Alloc3 (3 adjacent SprBuf chunks), tiles 0-7 to the buffer start and tiles 8-15 to +$200, INC Obj_State; C=1. - verified
Obj_BuildFrame12Pass0Alt$C0:D608 · 131 B · Sprites & objects(was Sub_D608.) Pass 0 for the ObjTile_AltLayout ($68) layout: frame lookup, SprBuf_Alloc3, tiles 0-15 in one run to the buffer start, INC Obj_State; C=1 (C=0 when nothing changed or no chunks are... - verified
Obj_BuildFrame12Pass1$C0:D68B · 173 B · Sprites & objects(was Sub_D68B.) Pass 1: tiles 16-23 to +$100, tiles 24-31 to +$300; INC Obj_State; C=1. - verified
Obj_BuildFrame12Pass1Alt$C0:D738 · 173 B · Sprites & objects(was Sub_D738.) Pass 1 for the ObjTile_AltLayout ($68) layout: tiles 16-23 to +$200, tiles 24-31 to +$400; INC Obj_State; C=1. - verified
Obj_BuildFrame12Pass2$C0:D7E5 · 644 B · Sprites & objects(was Sub_D7E5.) Pass 2: tiles 32-47 to +$400, queue the VRAM upload ($500 bytes from Obj_TileBuf to Obj_VramTile*16, then $100 bytes from +$500 to 3 tile rows further on, +$300 words), write the... - verified
Obj_BuildFrame12Pass2Alt$C0:DA69 · 703 B · Sprites & objects(was Sub_DA69.) Pass 2 for the ObjTile_AltLayout ($68) layout: tiles 32-39 to +$300 and 40-47 to +$500, queue the upload ($100 bytes to Obj_VramTile*16, then $500 bytes from +$100 to the next tile... - verified
Obj_FrameLayout12$C0:DD28 · 1,026 B · Sprites & objects(was Sub_DD28.) Rewrites the 12 SprTile records of a 12-tile object for Obj_LastFrame (tiles already in VRAM): offsets from the frame record (120 bytes, positions after 48 tile words), tile...
Bank $C0 · $C0:E000–$EFFF
$C0:E000
Verified · 21
- verified
Spr_LoadLargeObj$C0:E12A · 1,034 B · Engine(was Sub_E12A.) Loads a 24-tile ("large") object in one go. - verified
Spr_CopyTileFlipped$C0:E534 · 339 B · Engine(was Sub_E534.) Copies one 32-byte 4bpp tile, mirrored left-right, from Spr_GfxPtr + (tile number × 32) to the WRAM tile buffer through WMDATA: each byte goes through BitReverseTable ($C0:FD00)... - verified
Spr_CopyTile$C0:E687 · 178 B · Engine(was Sub_E687.) Copies one 32-byte 4bpp tile from Spr_GfxPtr + (tile number × 32) to Spr_WramPtr in bank $7F, then moves WMADD past it so a following Spr_CopyTileFlipped writes the next tile. - verified
Spr_CopyTileD4$C0:E739 · 131 B · EngineCopies a 32-byte tile from GfxRom_D4+X to $7F:Y (BRL from Spr_CopyTile when the graphics are in bank $D4). - verified
Spr_CopyTileD2$C0:E7BC · 131 B · EngineCopies a 32-byte tile from GfxRom_D2+X to $7F:Y (BRL from Spr_CopyTile when the graphics are in bank $D2). - verified
Spr_CopyTileD3$C0:E83F · 131 B · EngineCopies a 32-byte tile from GfxRom_D3+X to $7F:Y (BRL from Spr_CopyTile when the graphics are in bank $D3). - verified
Spr_CopyTile7F$C0:E8C2 · 115 B · EngineCopies a 32-byte tile from $7F:X to $7F:Y (BRL from Spr_CopyTile when the graphics are already in WRAM); abs,X reads since DB = $7F. - verified
SprBuf_FreeAll$C0:E935 · 29 B · Engine(was Sub_E935.) Marks all eight SprBuf_Owner entries free ($80), with DP pointed at $0B00 so each store is a 2-byte dp store. - verified
SprBuf_Alloc1$C0:E952 · 40 B · Engine(was Sub_E952.) Gives object Obj_Cur one $200-byte chunk of the WRAM tile buffer: the first free entry n (0-3) of SprBuf_Owner gets Obj_Cur, and Obj_TileBuf = SprBuf_Base + n*$200. - verified
SprBuf_Alloc2$C0:E97A · 48 B · Engine(was Sub_E97A.) As SprBuf_Alloc1 for two adjacent free chunks (start entries 0-2). - verified
SprBuf_Alloc3$C0:E9AA · 56 B · Engine(was Sub_E9AA.) As SprBuf_Alloc1 for three adjacent free chunks (start entries 0-1). - verified
SprBuf_Free1$C0:E9E2 · 29 B · Engine(was Sub_E9E2.) Releases the SprBuf chunk owned by Obj_Cur: finds it among the first 4 SprBuf_Owner entries and marks it free. - verified
SprBuf_Free2$C0:E9FF · 32 B · Engine(was Sub_E9FF.) As SprBuf_Free1 for a 2-chunk object: the first of the 3 possible start entries owned by Obj_Cur and the one after it are freed. - verified
SprBuf_Free3$C0:EA1F · 35 B · Engine(was Sub_EA1F.) As SprBuf_Free1 for a 3-chunk object (2 possible start entries). - verified
SprBuf_FreeObj$C0:EA42 · 33 B · EngineReleases the SprBuf chunks owned by Obj_Cur whatever its size: finds the first of the SprBuf_UsedEntries SprBuf_Owner entries that holds Obj_Cur, frees it ($80 = Obj_None) and goes on freeing the... - verified
NmiHandler$C0:EA63 · 509 B · EngineThe field's vertical-blank interrupt, entered through the RAM trampoline InstallNMI writes (JML NmiHandler at $7E:0500). - verified
Field_WaitFrame$C0:EC60 · 23 B · EngineThe field's frame wait: counts Field_Unk58 up (16-bit INC, ANDed with Field_Unk58Mask), INCs Nmi_FramePending and spins until NmiHandler has done the frame's uploads and zeroed it. - verified
Credits_UploadLine$C0:EC77 · 44 B · EngineSends the staff-credits line Field_ServiceUnk54 built in Credits_LineBuf to VRAM: Credits_DmaSize bytes to VRAM word Credits_VramAddr with DMA channel 7 (word writes, VMAIN increment after the... - verified
Oam_UploadShadow$C0:ECA3 · 41 B · EngineCopies the OAM shadow (Oam_LowTable and Oam_HighTable, $00:0700, Oam_ShadowBytes = $220) to OAM from address 0 with DMA channel 7 (mode 0, B-bus target OAMDATA). - verified
IrqHandler$C0:ECCC · 73 B · EngineReached through the RAM trampoline InstallIRQ writes (JML IrqHandler at IrqTrampoline). - verified
Irq_UploadTileAnim$C0:ED15 · 841 B · EngineWith DP = DP_Field (set here and left set; IrqHandler restores D): Irq_DrawChoiceCursor when Field_Unk63 is not negative; then one queued tilemap job, by Field_VramQueueFlags: - VramQueue_TileAnim...
Bank $C0 · $C0:F000–$FFFF
$C0:F000
Verified · 36
- verified
Irq_DrawChoiceCursor$C0:F05E · 178 B · EngineDraws a 2x2-tile picture (tiles $0FC/$0FD over $0FE/$0FF, palette 2, priority: ChoiceCursor_TileTop / TileBottom) at choice row Field_Unk63 of the tilemap Field_UploadUnk1C00 sends to VRAM $1C00... - verified
Irq_ChoiceCursorClearRow3$C0:F110 · 21 B · EnginePuts Field_Unk2B78's grid entries back where choice row 3's cursor goes: VRAM ChoiceCursor_VramRow0 + 3 x VramRowStep ($1CC2) gets ChoiceCursor_GridRow0 + 3 x GridRowStep and + 1 ($29C2, $29C3... - verified
Irq_ChoiceCursorClearTail$C0:F125 · 6 B · Engine - verified
Irq_ChoiceCursorClearRow2$C0:F12B · 23 B · EngineAs Irq_ChoiceCursorClearRow3 for choice row 2: VRAM $1C82 gets $2982, $2983 (tiles $182/$183), $1CA2 gets $2992, $2993 (through Irq_ChoiceCursorClearTail). - verified
Irq_ChoiceCursorClearRow1$C0:F142 · 23 B · EngineAs Irq_ChoiceCursorClearRow3 for choice row 1: VRAM $1C42 gets $2942, $2943 (tiles $142/$143), $1C62 gets $2952, $2953 (through Irq_ChoiceCursorClearTail). - verified
Irq_ChoiceCursorClearRow0$C0:F159 · 23 B · EngineAs Irq_ChoiceCursorClearRow3 for choice row 0: VRAM $1C02 gets $2902, $2903 (tiles $102/$103), $1C22 gets $2912, $2913 (through Irq_ChoiceCursorClearTail). - verified
BankC0_OldBuildLeftovers$C0:F170 · 400 B · EngineNot code and, as far as found, never read. - verified
Rom_AngleTable$C0:F300 · 1,024 B · ROM headerThe direction (256 per turn, $40 = a quarter) of the vector (run, rise) for run and rise 0-31, at rise x 32 + run: within about 1 of atan2(rise, run) x 256 / 2 pi (checked against the ROM for all... - verified
Rom_DirToFacing$C0:F700 · 256 B · ROM headerThe facing (0 up, 1 down, 2 left, 3 right, the Obj_Facing values) for each direction 0-255 (Rom_AngleTable's units): $00-$1F 3, $20-$5F 1, $60-$9F 2, $A0-$DF 0, $E0-$FF 3 (checked against the... - verified
Rom_SineTable256$C0:F800 · 256 B · ROM headerSigned sine, 256 steps per turn: entry N = 127 x sin(N x 2 pi / 256) rounded to nearest ($00, $7F at $40, $00 at $80, $81 at $C0; checked against the ROM for all 256 entries). - verified
Rom_SineTable$C0:F900 · 1,024 B · ROM header|sin| for 1024 steps per turn, scaled to $FF: entry N is within 1 of 255 x |sin(N x 2 pi / 1024)| ($00 at $000 and $200, $FF around $100 and $300); checked against the ROM. - verified
BitReverseTable$C0:FD00 · 256 B · EngineByte N is N with its 8 bits in reverse order (bit 0 ↔ bit 7, 1 ↔ 6, ...): $01 → $80, $02 → $40, $03 → $C0. - verified
RandomTable$C0:FE00 · 256 B · EngineThe game's pseudo-random bytes, probably: a shuffle of 0-255 (every value appears exactly once; checked against the ROM). - verified
Reset$C0:FF00 · 16 B · Boottarget of the emulation-mode RESET vector ($FFFC) - verified
NMI_Stub$C0:FF10 · 4 B · BootNative-mode interrupt stubs ($FF10–$FF17) - verified
IRQ_Stub$C0:FF14 · 4 B · Boot - verified
BRK_Handler$C0:FF18 · 8 B · Bootnative BRK and emulation-mode COP both land here - verified
BitSet$C0:FF20 · 8 B · EngineBitmask lookup tables ($FF20–$FF2F) BitSet[N] = (1 << N), BitClear[N] = ~(1 << N), for N = 0..7. - verified
BitClear$C0:FF28 · 8 B · Engine - verified
ScrollWaveA$C0:FF30 · 64 B · EngineWave tables ($FF30–$FFAF) One period of a sine-like wave between -6 and +6 (32 signed 16-bit entries), stored twice. - verified
ScrollWaveB$C0:FF70 · 64 B · Engine - verified
RomExtHeader$C0:FFB0 · 13 B · ROM headerSNES cartridge header ($FFB0–$FFDF), standard layout - verified
RomExpansionRam$C0:FFBD · 1 B · ROM header - verified
RomSpecialVersion$C0:FFBE · 1 B · ROM header - verified
RomCartridgeSubtype$C0:FFBF · 1 B · ROM header - verified
ROMTitle$C0:FFC0 · 21 B · ROM header - verified
RomMapMode$C0:FFD5 · 1 B · ROM header - verified
RomType$C0:FFD6 · 1 B · ROM header - verified
RomSize$C0:FFD7 · 1 B · ROM header - verified
RomSramSize$C0:FFD8 · 1 B · ROM header - verified
RomRegion$C0:FFD9 · 1 B · ROM header - verified
RomDeveloperId$C0:FFDA · 1 B · ROM header - verified
RomVersion$C0:FFDB · 1 B · ROM header - verified
RomChecksumComplement$C0:FFDC · 2 B · ROM header - verified
RomChecksum$C0:FFDE · 2 B · ROM header - verified
RomVectors$C0:FFE0 · 32 B · ROM headerInterrupt vector table ($FFE0–$FFFF) Native mode: $FFE4–$FFEF.
Bank $C1 · $C1:0000–$0FFF
$C1:0000
Verified · 66
- verified
EngCall_BattleMain$C1:0000 · 3 B · EngineThe bank's entry block: nine 3-byte JMPs, most of them reached from other banks by JSL (those targets return with RTL or never return; $0003, $0006 and $0015 are not, see the list), then the two... - verified
BattleSys_RunServiceVec$C1:0003 · 3 B · Battle system - verified
BattleSys_ExitVec$C1:0006 · 3 B · Battle system - verified
BankC1_VecCFE300$C1:0009 · 3 B · Engine - verified
BankC1_VecCFE58A$C1:000C · 3 B · Engine - verified
BankC1_VecCCE000$C1:000F · 3 B · Engine - verified
BankC1_VecRefreshMenu$C1:0012 · 3 B · Engine - verified
BankC1_VecRts$C1:0015 · 3 B · Engine - verified
BankC1_VecLongDispatch$C1:0018 · 3 B · Engine - verified
BankC1_EnterBattleJml$C1:001B · 4 B · Engine - verified
BankC1_ExitBattleJml$C1:001F · 4 B · Engine - verified
BattleSys_SceneSetup$C1:0023 · 34 B · Battle systemService 0 (!BattleSys_ServiceUnk0), the first service BattleSys_Main requests: the battle's display set-up, probably. - verified
BattleSys_RunService$C1:0045 · 11 B · Battle systemThe service dispatcher: runs BattleSys_ServiceTable entry A (JSR (T,X) with X = A * 2) and puts A, X and Y back as they were. - verified
BattleSys_RunService_Rts$C1:0050 · 1 B · Battle system - verified
BattleSys_ServiceTable$C1:0051 · 20 B · Battle systemThe services of BattleSys_RunService, by number * 2. - verified
BankC1_LongDispatch$C1:0065 · 6 B · EngineA long-callable dispatcher (through BankC1_VecLongDispatch): runs BankC1_LongDispatchTable entry A, then RTL. - verified
BankC1_LongDispatchTable$C1:006B · 2 B · EngineBankC1_LongDispatch's table: entry 0 only (see there). - verified
BattleSys_Service6$C1:006D · 5 B · Battle systemService 6 (!BattleSys_ServiceUnk6): JSL BattleCF_RemoveMarkedEnemies (the enemies marked in !Battle_UnkAEB3 leave, !Battler_Present cleared, except one with !Battler_Unk9FF7 0, !Battler_ActAttr... - verified
BankC1_JmlCCE000$C1:0072 · 4 B · EngineThe JMLs behind three of the entry vectors (see EngCall_BattleMain): $0072 to Battle_InitUploadStep ($CC:E000, BankC1_VecCCE000), BankC1_JmlCFE300 ($0076) to BattleCF_VblankUploads ($CF:E300... - verified
BankC1_JmlCFE300$C1:0076 · 4 B · Engine - verified
BankC1_JmlCFE58A$C1:007A · 4 B · Engine - verified
BattleSys_PumpFrames$C1:007E · 11 B · Battle systemWaits for the next frame: sets !Battle_FramePending, then calls BattleSys_IdleVecCD0036 again and again until something else clears the flag. - verified
Battle_Mul8$C1:0089 · 30 B · Battle engine8×8→16 HW multiply via WRMPYA/WRMPYB/RDMPYL. - verified
Battle_Mul8x16$C1:00A7 · 48 B · Battle engine8×16→24 multiply in two hardware passes (the top byte of the product is zeroed first, so nothing from the caller is accumulated): pass 1: Factor8 × low byte of Factor16 -> Product+0/+1 pass 2... - verified
Battle_Divide$C1:00D7 · 54 B · Battle engine16÷8 HW divide via WRDIVL/WRDIVH/WRDIVB, quotient from RDDIVL and remainder from RDMPYL. - verified
Battle_ShiftLeft8$C1:010D · 4 B · Battle engine$C1:010D–$C1:011E — Shift helpers (18 bytes, $010D–$011E) Overlapping fall-through stubs for power-of-2 left/right shifts on A. - verified
Battle_ShiftLeft4$C1:0111 · 1 B · Battle engine - verified
Battle_ShiftLeft3$C1:0112 · 4 B · Battle engine - verified
Battle_ShiftRight8$C1:0116 · 2 B · Battle engine - verified
Battle_ShiftRight6$C1:0118 · 1 B · Battle engine - verified
Battle_ShiftRight5$C1:0119 · 1 B · Battle engine - verified
Battle_ShiftRight4$C1:011A · 1 B · Battle engine - verified
Battle_ShiftRight3$C1:011B · 4 B · Battle engine - verified
BattleMsg_FormatNumberDigits$C1:011F · 85 B · Battle text & numbersFormat the 16-bit value in !BattleMsg_NumValue (0-999) into digit tiles: !BattleMsg_Digit1000 = blank, Digit100 / Digit10 / Digit1 = digits, tiles looked up in !BattleRom_DigitTiles. - verified
BattleMsg_FormatTwoDigits$C1:0174 · 53 B · Battle text & numbersTwo-digit variant of BattleMsg_FormatNumberDigits: formats !BattleMsg_NumValue as tens+ones only. - verified
BattleMsg_ReencodeTextBuffer$C1:01A9 · 80 B · Battle text & numbersBack up the 16 raw text bytes the caller left in !BattleMsg_TextTiles to !BattleMsg_TextSource, blank both tile rows (TextTiles/TextTopTiles), then re-encode each text byte into a lower-row tile... - verified
Battle_SinLookup$C1:01F9 · 41 B · Battle engineScaled sine: returns (sin(A) × !Battle_SinScale) >> 8 in A. - verified
Battle_CalcAngle$C1:0222 · 119 B · Battle engineDirection angle between two screen points (256 units per turn). - verified
BattleUI_BuildStatusBarFrame$C1:0299 · 108 B · Battle status barRebuilds the battle status-bar map (BattleUI_StatusTile, $0CC0): 1. - verified
BattleUI_DrawPcNamePanel$C1:0305 · 448 B · Battle status bar - verified
BattleUI_NextNamePanel$C1:04C5 · 226 B · Battle status bar - verified
BattleUI_UpdateNextPcPanel$C1:05A7 · 308 B · Battle status barPer-frame peer of BattleUI_BuildStatusBarFrame: refreshes one PC's HP/MP digits per call (round robin through !BattleUI_NextPanelSlot), then redraws every present PC's ATB gauge (layouts 1/2). - verified
BattleUI_DrawAtbGauges$C1:06DB · 20 B · Battle status bar - verified
BattleUI_UpdateNextPcPanel_Exit$C1:06EF · 1 B · Battle status bar - verified
BattleUI_DrawSlotGaugeBar$C1:06F0 · 149 B · Battle status barDraw the 4-tile ATB gauge of PC slot !BattleUI_Slot into the status map at BattleRom_HpCellL1[slot] + !BattleUI_GaugeCellOffset. - verified
BattleMenu_DrawCommandList$C1:0785 · 153 B · Battle menuDraw the command list of PC slot A (6 rows × 7 columns) into the status map at offset slot × 12, from one of two ROM tile tables: !BattleRom_CmdListTech — "Attack", "Tech", "Item" on rows 1/3/5... - verified
BattleMenu_DrawCommandWindowFrames$C1:081E · 84 B · Battle menuDraw the 7×6 command-window frame of every PC in the roster into !BattleMenu_WindowMap, then highlight the shown PC's name and fall into BattleUI_ClearActivePanelColumn. - verified
BattleUI_ClearActivePanelColumn$C1:0872 · 118 B · Battle status barZero the two tile columns of the shown PC's command column (6 rows, offset !BattleMenu_ActivePc × 12) in the status map, then, if !BattleUI_PanelRedraw is set and no target selection is running... - verified
BattleUI_HighlightPcName$C1:08E8 · 65 B · Battle status barHighlight PC slot A's name in the status bar: look up the slot's offset in !BattleRom_NameAttrL1 (layout 1) or !BattleRom_NameAttrL02 (layouts 0 and 2) and set the attribute of a 5-wide × 2-high... - verified
BattleMenu_DrawCommandWindowFrame$C1:0929 · 52 B · Battle menuCopy one 7-column × 6-row command-window frame (corners, borders and fill) from !BattleRom_CommandWindowFrame into !BattleMenu_WindowMap at !BattleUI_MapOffset. - verified
BattleMenu_RenderItemListRows$C1:095D · 83 B · Battle menuRenders the 3 visible item-list lines: 1. - verified
BattleMenu_RenderItemRow$C1:09B0 · 215 B · Battle menu, then its RTS BattleMenu_RenderItemRow_Exit (1 byte, $0A87) Renders one item-list line for the Item_BattleList record at !BattleMenu_ItemRecOffset into the item map at !BattleMenu_RowMapOffset. - verified
BattleMenu_RenderItemRow_Exit$C1:0A87 · 1 B · Battle menu - verified
BattleMenu_RenderTechListRows$C1:0A88 · 75 B · Battle menuRenders 4 tech-list lines (2 per outer loop pass) for the active PC into the tech text buffer (BattleMenu_TechTextTile). - verified
BattleMenu_BuildTechAvailFlags$C1:0AD3 · 56 B · Battle menuBuilds !Tech_ListAvail (20 entries, one per list line) for the active PC's tech list: line code $FB-$FF (blank, header or skip line) → 0, anything else → 1. - verified
BattleMenu_RenderTechRow$C1:0B0B · 171 B · Battle menuRenders one tech-list line: blanks the text rows (!BattleMsg_TextTiles / TextTopTiles), fills them by the line code !Tech_ListCode[TechCodeIdx], and copies them into the tech text buffer at... - verified
BattleMenu_DrawTechLowerRow$C1:0BB6 · 29 B · Battle menuBlank-line / header exit path of BattleMenu_RenderTechRow: advances !BattleMenu_TechRowNum, blanks the lead cells, then copies 18 lower-row tiles from !BattleMsg_TextTiles into the line from col 3... - verified
BattleMenu_BlankNameLeadCells$C1:0BD3 · 45 B · Battle menuBlanks cols 3-5, the lead cells left of the name (which starts at col 6), on both rows of the tech-list line at !BattleMenu_RowMapOffset (blank tile, palette 3). - verified
BattleMenu_BlankNameTailCells$C1:0C00 · 45 B · Battle menuTech-name exit path of BattleMenu_RenderTechRow (reached by its tail JMP): blanks cols 17-20 (right of the 11-tile name) on both rows of the line (blank tile, palette 3); the mirror of... - verified
BattleMenu_UpdateWindows$C1:0C2D · 25 B · Battle menuPer-frame window upkeep dispatcher. - verified
BattleMenu_UpdateWindows_Exit$C1:0C46 · 3 B · Battle menu - verified
BattleMenu_UpdateMainWindow$C1:0C49 · 58 B · Battle menuMain command-window upkeep (submenu 0): - If !BattleMenu_RosterIdx differs from !BattleMenu_RosterIdxDrawn: reload the command window map and rebuild the status bar. - verified
BattleMenu_UpdateTechWindow$C1:0C83 · 471 B · Battle menuTech-window refresh (submenu 1, after UpdateTechMpAvail): 1. - verified
BattleMenu_DrawTechCursorRow$C1:0E5A · 96 B · Battle menuClears the cursor columns, then (unless a target is being selected) draws the 2×2 row cursor ($60-$63) at the shown PC's !Pc_TechRow, placed through !BattleRom_TechCursorCell. - verified
BattleMenu_ClearTechCursorTiles$C1:0EBA · 39 B · Battle menuBlanks cols 1-2 (the row-cursor columns) of all 6 tech-window rows. - verified
BattleMenu_UpdateTechMpAvail$C1:0EE1 · 348 B · Battle menuGrades the 3 visible tech-list lines (submenu 1) and colours each line in the window map: palette 2 = usable, palette 3 = greyed.
Bank $C1 · $C1:1000–$1FFF
$C1:1000
Verified · 54
- verified
BattleMenu_Return$C1:103D · 1 B · Battle menuShared RTS, also the JMP target of BattleMenu_UpdateMainWindow, BattleMenu_DrawTechCursorRow and BattleMenu_UpdateWindows_Exit. - verified
BattleSys_SlotMenuReadyPredicate$C1:103E · 16 B · Battle systemReturns A=0 if PC slot !BattleMenu_ReadySlotArg is menu-ready: in the roster (!BattleMenu_Roster entry not negative) and !Pc_LockStatus clear; nonzero otherwise. - verified
BattleMsg_BlankLeadingZeros$C1:104E · 32 B · Battle text & numbersLeading-zero suppression for the number formatter's digits. - verified
BattleSys_UpkeepTwoFrames$C1:106E · 117 B · Battle systemService 3 of the same-bank $C10045 service dispatcher (reached only by JSR $0003/$0045 inside bank $C1; returns RTS; dispatch table at $C10051, entry 3 = $106E; searched: no JSR, JMP or JSL... - verified
BattleMenu_RefreshIfDirtyL$C1:10E3 · 23 B · Battle menuJSL-entry twin of BattleMenu_RefreshIfDirtyAndTick, reached via the bank's cross-bank entry-vector table: JSL $C10012 -> JMP $C110E3. - verified
BattleMenu_RefreshIfDirtyAndTick$C1:10FA · 27 B · Battle menuSame-bank JSR twin of BattleMenu_RefreshIfDirtyL — identical dirty- flag gate and menu rebuild chain, but always follows up with a cross-bank per-frame service tick (BattleSys_FrameTickVec) before... - verified
BattleMenu_DrawCursorSprites$C1:1115 · 62 B · Battle menuBuilds OAM sprites 0-3 (BattleOam) for the command cursor over the shown PC: each of the 4 template sprites in BattleRom_CursorSprite is offset by the PC's !Battler_ScreenX/Y, and its palette bits... - verified
BattleMenu_ProcessInput$C1:1153 · 142 B · Battle menuBattle command-window input handler. - verified
BattleMenu_CycleActivePcPrev$C1:11E1 · 55 B · Battle menuLeft D-pad: step !BattleMenu_RosterIdx back (wrap 0..2), skipping roster entries that are negative. - verified
BattleMenu_CycleActivePcNext$C1:1218 · 56 B · Battle menuRight D-pad: mirror of CycleActivePcPrev — steps !BattleMenu_RosterIdx forward (wrap at 3 back to 0) instead; the same sound 0 and the same cursor-memory handling. - verified
BattleMenu_CursorUp$C1:1250 · 20 B · Battle menuUp D-pad: step the shown PC's !Pc_MenuRow back (wrap 0..2) and flag the cursor redraw (!BattleUI_PanelRedraw). - verified
BattleMenu_CursorDown$C1:1264 · 23 B · Battle menuDown D-pad: step the shown PC's !Pc_MenuRow forward (wrap at 3 back to 0) and flag the cursor redraw (!BattleUI_PanelRedraw). - verified
BattleMenu_ConfirmCommand$C1:127B · 33 B · Battle menuConfirm-button dispatch: sets !BattleUI_UnkA0D7 to $FF (compared by BattleUI_BuildStatusBarFrame with the first selected target), calls BattleFx_SetPtrA2FromTable for the shown PC, then tail-jumps... - verified
BattleMenu_ChooseAttack$C1:129C · 32 B · Battle menuRow 0 (Attack) confirm: message call with "none", flags the cursor redraw, sets !BattleTgt_Mode = attack, !BattleMenu_CmdMenu = 0, builds the target list, sets !BattleMenu_TargetMoved (so... - verified
BattleMenu_OpenTechList$C1:12BC · 49 B · Battle menuRow 1 (Tech) confirm: unless !BattleMenu_Lock bit 0 is set, renders the tech list lines, builds !Tech_ListAvail, switches to the tech list (!BattleMenu_Submenu = !BattleMenu_CmdMenu = 1) and... - verified
BattleMenu_OpenItemList$C1:12ED · 51 B · Battle menuRow 2 (Item) confirm: unless !BattleMenu_Lock is non-zero, renders the item list at !BattleMenu_ItemScroll, queues the item map upload, copies the item box frame (!BattleRom_ItemBoxMap) into... - verified
BattleMenu_TechListInput$C1:1320 · 73 B · Battle menuPer-frame input handler while the tech list is open (submenu 1). - verified
BattleMenu_TechConfirm$C1:1369 · 38 B · Battle menuConfirms the highlighted tech: aborts unless the rows have been graded (!BattleMenu_TechAvailDone) and Tech_CursorEntry.Flags bit 7 is clear. - verified
BattleMenu_TechListCancel$C1:138F · 30 B · Battle menuCloses the tech list: reload the command window, back to the main menu, force a window rebuild, and restore this PC's saved tech-list cursor (!Pc_SavedTechRow / SavedTechScroll -> !Pc_TechRow /... - verified
BattleMenu_TechListPrev$C1:13AD · 71 B · Battle menuUp/Left in the tech list: walks backward from !BattleMenu_TechListIdx to the previous line whose !Tech_ListAvail is non-zero. - verified
BattleMenu_TechListNext$C1:13F4 · 73 B · Battle menuDown/Right in the tech list: mirror of TechListPrev — walks forward instead of backward, bounded by the list length (!Pc_TechCount) instead of the start of the list, and scrolls down instead of up... - verified
BattleMenu_ItemListInput$C1:143D · 91 B · Battle menuPer-frame input handler while the item list is open (submenu 2). - verified
BattleMenu_ItemConfirm$C1:1498 · 67 B · Battle menuConfirms the highlighted item: record offset = (!BattleMenu_ItemScroll + !BattleMenu_ItemRow) * 5 into Item_BattleList (id, target mode, flags, quantity, PC mask). - verified
BattleMenu_ItemListCancel$C1:14DB · 17 B · Battle menuCloses the item list: reload the command window, back to the main menu, force a window rebuild, and invalidate the scroll-arrow cache. - verified
BattleMenu_ItemCursorUp$C1:14EC · 22 B · Battle menuUp/Left in the item list: decrement !BattleMenu_ItemRow, scrolling the list up via ItemListScrollUp when already at the top row. - verified
BattleMenu_ItemCursorDown$C1:1502 · 26 B · Battle menuDown/Right in the item list: increment !BattleMenu_ItemRow (max 2), scrolling the list down via ItemListScrollDown when already at the bottom row. - verified
BattleMenu_ItemListPageDown$C1:151C · 27 B · Battle menuPage-down button: page the item list down 3 rows at once, clamped at scroll position $FA. - verified
BattleMenu_ItemListPageUp$C1:1537 · 20 B · Battle menuPage-up button: page the item list up 3 rows at once, clamped at 0. - verified
BattleMenu_ItemListRefresh$C1:154B · 22 B · Battle menuRe-renders the item list rows, invalidates both draw caches and clears !BattleMenu_ItemRefresh. - verified
BattleMenu_TargetSelectInput$C1:1561 · 185 B · Battle menuPer-frame input handler while target selection runs (entered from BattleMenu_ProcessInput when !BattleMenu_TargetSelect != 0). - verified
BattleMenu_CommitAction$C1:161A · 308 B · Battle menuConfirms the currently-selected target and builds the command record for the shown PC's chosen action (attack/tech/item), then queues it and hands the menu to the next ready PC. - verified
BattleMenu_ConsumePartnerSlot$C1:174E · 30 B · Battle menuRemoves PC slot !BattleMenu_PartnerArg from the ready state as part of committing a double/triple tech: if it's in the roster, decrements !BattleMenu_ReadyCount; either way marks its roster entry... - verified
BattleMenu_TargetNext$C1:176C · 26 B · Battle menuRight/Down while cycling targets: advance !BattleTgt_Cursor (wrap at 11), skipping empty candidate entries, and select the battler it lands on (!BattleTgt_Selected). - verified
BattleMenu_TargetPrev$C1:1786 · 22 B · Battle menuLeft/Up while cycling targets: mirror of TargetNext — steps !BattleTgt_Cursor back (wrap to 10) instead. - verified
Battle_ClearPadEdges$C1:179C · 5 B · Battle engineClears both pad-edge bytes and returns. - verified
BattleMenu_ItemListScrollUp$C1:17A1 · 16 B · Battle menuScrolls the item list up one row: decrements !BattleMenu_ItemScroll (min 0), then re-renders and invalidates both draw caches (row cursor, arrows). - verified
BattleMenu_ItemListScrollUp_SetScroll$C1:17B1 · 2 B · Battle menu - verified
BattleMenu_ItemListScrollUp_RenderTail$C1:17B3 · 3 B · Battle menu - verified
BattleMenu_ItemListScrollUp_SkipRender$C1:17B6 · 9 B · Battle menu - verified
BattleMenu_ItemListScrollDown$C1:17BF · 18 B · Battle menuScrolls the item list down one row: increments !BattleMenu_ItemScroll (clamped at $FA), then re-renders and invalidates both draw caches. - verified
BattleMenu_ItemListScrollDown_RenderTail$C1:17D1 · 3 B · Battle menu - verified
BattleMenu_ItemListScrollDown_SkipRender$C1:17D4 · 9 B · Battle menu - verified
BattleMenu_UpdateCursorOverlay$C1:17DD · 828 B · Battle menuCursor/overlay refresh at the end of the menu rebuild chain (after ProcessInput), so like it only on frames with !BattleMenu_Dirty set: JSR from BattleMenu_RefreshIfDirtyL... - verified
BattleMenu_EnqueueReadyBattler$C1:1B19 · 60 B · Battle menuService 1 of the $C10045 service dispatcher (dispatch table at $C10051: service 0 -> $0023, 1 -> here, 2 -> RemoveBattlerFromReady). - verified
Battle_PlaySfx0$C1:1B55 · 18 B · Battle engineAPU command !Sfx_CmdPlay with sound id 0: fills !Sfx_Command / !Sfx_Param1 / !Sfx_Param2 (the same command block bank $C0's Audio_PlayTileSfxA fills) and calls the audio driver entry. - verified
BattleMenu_DequeueReadyBattler$C1:1B67 · 67 B · Battle menuPops the head of !BattleMenu_ReadyQueue (up to 3 deep, count in !BattleMenu_ReadyQueueLen) into the roster: clears its !Battle_Unk9F38, restores its tech-list cursor (!Pc_SavedTechRow /... - verified
BattleMenu_RemoveBattlerFromReady$C1:1BAA · 144 B · Battle menuService 2 of the $C10045 service dispatcher (dispatch table at $C10051; reached only by same-bank JSR from bank $C1, see BattleMenu_EnqueueReadyBattler). - verified
BattleMenu_LoadCommandWindowMap$C1:1C3A · 16 B · Battle menuCopies the $180-byte command window map (!BattleRom_CommandWindowMap, bank $D1) into !BattleMenu_WindowMap. - verified
Battle_DrawBattlerFrame$C1:1C4A · 11 B · Battle engineDecodes frame !Battle_FrameId of battler !Battle_FrameSlot into the battler's tile buffer in bank $7E, unless the battler uses frame layout 3 (!Battle_FrameLayoutStrip), which this entry leaves alone. - verified
Battle_DrawBattlerFrameAnyLayout$C1:1C55 · 804 B · Battle engineDecodes one animation frame of a battler into bank $7E tiles: 1. - verified
BattleMenu_BuildTargetList$C1:1F79 · 100 B · Battle menuRecords the requesting PC (!BattleTgt_Caster), resets the selection state (!BattleTgt_Result/CanCycle/TargetAll, two Unk bytes) and blanks !BattleTgt_Candidates and !BattleTgt_Selected (indices... - verified
BattleTgt_RunAreaQuery$C1:1FDD · 13 B · Battle targetingService 7 of the $C10045 service dispatcher (dispatch table at $C10051; reached only by same-bank JSR from bank $C1, see BattleMenu_EnqueueReadyBattler). - verified
BattleTgt_AreaTable$C1:1FEA · 14 B · Battle targeting - verified
BattleTgt_ModeTable$C1:1FF8 · 66 B · Battle targetingTarget-mode handler table, indexed by (!BattleTgt_Mode & $7F) clamped to $20, called from BattleMenu_BuildTargetList.
Bank $C1 · $C1:2000–$2FFF
$C1:2000
Verified · 64
- verified
BattleTgt_SingleAlly$C1:203A · 11 B · Battle targetingDefault mode: one PC (slots 0-2), cursor may cycle. - verified
BattleTgt_CollectValidTargets$C1:2045 · 85 B · Battle targeting - verified
BattleTgt_AllAllies$C1:209A · 15 B · Battle targetingevery PC - verified
BattleTgt_SingleEnemy$C1:20A9 · 13 B · Battle targetingone enemy (3-10), cursor may cycle. - verified
BattleTgt_AllEnemies$C1:20B6 · 16 B · Battle targeting - verified
BattleTgt_Everyone$C1:20C6 · 16 B · Battle targetingall battlers 0-10 - verified
BattleTgt_Self$C1:20D6 · 10 B · Battle targetingthe shown PC only - verified
BattleTgt_SingleKoAlly$C1:20E0 · 86 B · Battle targetingLists the PCs whose BattlerStats.Status has bit 7 set — by context, KO'd allies, i.e. - verified
BattleTgt_PcByCharId5$C1:2136 · 4 B · Battle targetingTargets the one party member whose !Pc_CharId equals !BattleTgt_WantedChar (5 for this entry, 4 via BattleTgt_PcByCharId4). - verified
BattleTgt_FindPcByCharId$C1:213A · 41 B · Battle targeting - verified
BattleTgt_PcByCharId4$C1:2163 · 6 B · Battle targeting; state as PcByCharId5 - verified
BattleTgt_EnemyLineFromCaster$C1:2169 · 70 B · Battle targeting - verified
BattleTgt_EnemyLineFromChar3$C1:21AF · 84 B · Battle targetingas above, but the source is the party member with character id 3 (!Pc_CharRobo, inferred: Robo; the name keeps the numeric id). - verified
BattleTgt_EnemyLineFromCaster2$C1:2203 · 72 B · Battle targetingsame as EnemyLineFromCaster with !BattleTgt_AreaVariant = 1 - verified
BattleTgt_CasterRadius$C1:224B · 20 B · Battle targetingarea $10 around the caster - verified
BattleTgt_EnemyRadius$C1:225F · 69 B · Battle targetingarea around a chosen enemy; size $19 for mode $1A, else $09 - verified
BattleTgt_Char3Radius$C1:22A4 · 47 B · Battle targetingarea around party member id 3; size $19 for mode $14, else $10. - verified
BattleTgt_Char6Radius$C1:22D3 · 34 B · Battle targetingarea $19 around party member id 6. - verified
BattleTgt_EnemyRow$C1:22F5 · 52 B · Battle targetingchosen enemy as anchor for BattleTgt_AreaRow (a +/-$20 band around the anchor's !Battler_ScreenY) - verified
BattleTgt_PartyTriangle$C1:2329 · 9 B · Battle targetingenemies inside the triangle formed by the three PCs (BattleTgt_AreaPartyTriangle) - verified
BattleTgt_AreaRow$C1:2332 · 114 B · Battle targeting"Row" area: every eligible battler on the scanned side whose screen y (!Battler_ScreenY) lies within +/-$20 of the centre battler's y. - verified
BattleTgt_AreaPartyTriangle$C1:23A4 · 511 B · Battle targetingEnemies inside the triangle whose corners are the screen positions of party slots 0, 1 and 2 (!Battler_ScreenX/Y for slots 0-2). - verified
BattleTgt_AreaLine$C1:25A3 · 350 B · Battle targeting"Line" area from the source battler (!BattleTgt_AreaCentre) towards the aimed-at battler (!BattleTgt_AreaAim), half-width r = AreaSize * 8 (passed to Battle_SinLookup as !Battle_SinScale; AreaSize... - verified
BattleTgt_AreaCircle$C1:2701 · 172 B · Battle targeting"Circle" area around the centre battler (!BattleTgt_AreaCentre). - verified
BattleTgt_AreaAddAnchor$C1:27AD · 24 B · Battle targetingShared tail of the area scans: puts !BattleTgt_Anchor at the front of !BattleTgt_Candidates if it belongs to the scanned side (see the AreaCircle header), then falls into BattleTgt_CompactCandidates. - verified
BattleTgt_CompactCandidates$C1:27C5 · 20 B · Battle targetingif the front slot is empty, shift the list left by one. - verified
BattleTgt_ClearLists$C1:27D9 · 15 B · Battle targetingblank candidate and selection lists (12 entries each, one more than they use) - verified
BattleTgt_SelectAllCandidates$C1:27E8 · 18 B · Battle targetingset target-all and copy the 11 candidates into the selection list - verified
BattleTgt_CycleNext$C1:27FA · 26 B · Battle targetingadvance !BattleTgt_Cursor to the next non-empty candidate (wrap at 11); no-op on an empty list. - verified
BattleTgt_CyclePrev$C1:2814 · 25 B · Battle targetingmirror of CycleNext - verified
BattleTgt_AnyCandidate$C1:282D · 16 B · Battle targetingZ=1 if all 11 candidate slots are $FF, Z=0 as soon as one isn't - verified
Battle_CacheBattlerCoordsAll$C1:283D · 29 B · Battle engineCopies every present battler's screen position into its probe position and rebuilds its box. - verified
Battle_CalcBattlerBox$C1:285A · 86 B · Battle engineBuilds battler X's box from its probe position: left = ProbeX - HalfWidth, clamped at 0 right = ProbeX + HalfWidth, clamped at $FF top = ProbeY - Height, clamped at 0 bottom = ProbeY + 8, or... - verified
Battle_BoxOverlapsOthers$C1:28B0 · 118 B · Battle engineTests the box of battler !Battle_BoxTestSlot against the box of every other present battler, skipping those with !Battler_Unk9FF7 or !Battler_UnkA5CD bit 7 set. - verified
Battle_BoxHitsBlockedCell$C1:2926 · 96 B · Battle engineTests whether the box of battler !Battle_BoxTestSlot covers a blocked cell of !Battle_CellMap (16x16-pixel cells, 16 per row). - verified
BattlePos_Query$C1:2986 · 44 B · Battle engineService 5 of the same-bank $C10045 service dispatcher (reached only by JSR $0003/$0045 inside bank $C1; returns RTS; dispatch table at $C10051, entry 5 = $2986; searched: no JSR, JMP or JSL... - verified
BattlePos_NearestPc$C1:29B2 · 73 B · Battle engine/ BattlePos_FarthestPc / BattlePos_NearestEnemy / BattlePos_FarthestEnemy ($C129B2–$C12AE2, 305 bytes; queries 0-3) - verified
BattlePos_FarthestPc$C1:29FB · 72 B · Battle engine - verified
BattlePos_NearestEnemy$C1:2A43 · 85 B · Battle engine - verified
BattlePos_FarthestEnemy$C1:2A98 · 75 B · Battle engine - verified
BattlePos_WithinDist40XY$C1:2AE3 · 12 B · Battle engineBattlePos_WithinDist* ($C12AE3–$C12BBB, 217 bytes; queries 4 and 14) - verified
BattlePos_WithinDist32XY$C1:2AEF · 12 B · Battle engine - verified
BattlePos_WithinDist64XY$C1:2AFB · 12 B · Battle engine - verified
BattlePos_WithinDist4XY$C1:2B07 · 12 B · Battle engine - verified
BattlePos_WithinDist4XYTwin$C1:2B13 · 12 B · Battle engine - verified
BattlePos_WithinDist16XY$C1:2B1F · 12 B · Battle engine - verified
BattlePos_WithinDist48$C1:2B2B · 12 B · Battle engine - verified
BattlePos_WithinDist32$C1:2B37 · 10 B · Battle engine - verified
BattlePos_CheckPairDist$C1:2B41 · 8 B · Battle engine - verified
BattlePos_CheckDist$C1:2B49 · 115 B · Battle engine - verified
BattlePos_SameRowBand$C1:2BBC · 30 B · Battle engine/ BattlePos_SubjectAbove / BattlePos_SubjectLeft ($C12BBC–$C12C01, 70 bytes; queries 5-7) - verified
BattlePos_SubjectAbove$C1:2BDA · 20 B · Battle engine - verified
BattlePos_SubjectLeft$C1:2BEE · 20 B · Battle engine - verified
BattlePos_PathClear$C1:2C02 · 165 B · Battle enginePlaces the subject's probe position out from its screen position in the direction Battle_CalcAngle gives from the subject to the other battler, at a radius of !Battle_SinScale (see the quirk... - verified
BattlePos_SubjectLowerHalf$C1:2CA7 · 19 B · Battle engine/ BattlePos_SubjectUpperHalf / BattlePos_SubjectRightPart / BattlePos_SubjectLeftPart ($C12CA7–$C12CF2, 76 bytes; queries 9-12) - verified
BattlePos_SubjectUpperHalf$C1:2CBA · 19 B · Battle engine - verified
BattlePos_SubjectRightPart$C1:2CCD · 19 B · Battle engine - verified
BattlePos_SubjectLeftPart$C1:2CE0 · 19 B · Battle engine - verified
BattlePos_DistDifference$C1:2CF3 · 142 B · Battle engineMeasures, from the other battler's screen position, the squared distance to the subject (d1) and to the battler in !BattlePos_Arg (d2), and stores |d2 - d1| / 256 (low byte) in !BattlePos_Found. - verified
BattlePos_ModeTable$C1:2D81 · 30 B · Battle enginequery handlers by !BattlePos_Mode, called from BattlePos_Query. - verified
Battle_TickPcSlots$C1:2D9F · 384 B · Battle enginePer-frame animation step for the three PCs. - verified
Battle_UnkThunk2F1F$C1:2F1F · 3 B · Battle enginea lone JMP to the RTS that ends Battle_TickEnemyGroup ($C1:34A6). - verified
Battle_UpdatePcFacing$C1:2F22 · 117 B · Battle engineTurns PC !Battle_TickSlot toward its nearest enemy, one PC at a time: !Battle_FacingTurn holds the PC whose turn it is (bit 7 = the turn was handed on and has not been taken yet). - verified
Battle_PickStatusAnim$C1:2F97 · 197 B · Battle enginePicks the animation and the status effect for battler !Battle_TickSlot from its status bytes: - default animation 3 (!Battle_AnimDefault), or 0 for an untargetable battler; effect !Battle_FxNone...
Bank $C1 · $C1:3000–$3FFF
$C1:3000
Verified · 31
- verified
Battle_PickNextStatusAnim$C1:305C · 48 B · Battle engineRuns Battle_PickStatusAnim for one battler per call, the slot in !Battle_StatusAnimNext (if present), and moves it on; past slot 10 it counts a wrap in !Battle_StatusAnimWraps and goes back to... - verified
Battle_ApplyPendingEffect$C1:308C · 42 B · Battle engineFor battler !Battle_TickSlot, if present: when the effect picked (!Battler_FxWanted) differs from the one running (!Battler_FxApplied), records it, stops the overlay and the colour cycle, clears... - verified
Battle_FxReset$C1:30B6 · 43 B · Battle engineEffect 0 (none): clears the battler's effect flags; for a PC also copies the saved palette (!Battle_PaletteSaved, 26 bytes from !Battler_Palette * 16) back over the live one, undoing a tint or... - verified
Battle_FxOverlay2Tint$C1:30E1 · 96 B · Battle engineEffect 3: resets, starts overlay 2 and marks the battler tinted (!Battler_FxTinted); for a PC also restores the saved palette from byte 2 on (24 bytes) and then writes the 4 bytes at... - verified
Battle_FxOverlay7$C1:3141 · 34 B · Battle engineEffect $0E: resets and starts overlay 7. - verified
Battle_FxOverlay6$C1:3163 · 34 B · Battle engineEffect 9: resets and starts overlay 6. - verified
Battle_FxColourCycle$C1:3185 · 12 B · Battle engineEffects 6, 7, $0B, $0C and $0D: resets and starts the colour cycle from step 0. - verified
Battle_FxOverlay1$C1:3191 · 31 B · Battle engineEffects 1, 2 and $0A: starts overlay 1. - verified
Battle_FxOverlay3$C1:31B0 · 34 B · Battle engineEffect 4: resets and starts overlay 3. - verified
Battle_FxOverlay4$C1:31D2 · 34 B · Battle engineEffect 5: resets and starts overlay 4. - verified
Battle_FxOverlay5$C1:31F4 · 34 B · Battle engineEffect 8: resets and starts overlay 5. - verified
Battle_FxHandlerTable$C1:3216 · 30 B · Battle engineOne handler per status effect id 0-$0E, called from Battle_ApplyPendingEffect. - verified
Battle_TickEnemyGroup$C1:3234 · 627 B · Battle engineThe enemy counterpart of Battle_TickPcSlots, which jumps here instead of ticking the PCs while !Battle_UnkA4 is 1-3 (A = that value). - verified
Battle_DrawAllBattlerFrames$C1:34A7 · 52 B · Battle engineDraws the starting frame (!Battler_StartFrame) of every present battler, any frame layout (Battle_DrawBattlerFrameAnyLayout), then sets the three PC animation timers to 1, 2 and 3 so the PCs take... - verified
Battle_StartPose$C1:34DB · 52 B · Battle engineThe last step of the battle set-up (service 0, which JMPs here): turns every PC toward its nearest enemy, then plays animation $0C on the targetable PCs (animation 0 on the others) through... - verified
Battle_FaceAllPcsNearestEnemy$C1:350F · 62 B · Battle engineSets !Battler_Facing of PCs 2, 1, 0 from the angle to each one's nearest enemy (position query 2 through service 5, as in Battle_UpdatePcFacing, but for every PC at once and without the presence... - verified
BattleSys_DefeatPose$C1:354D · 32 B · Battle systemService 9 of the same-bank $C10045 service dispatcher (reached only by JSR $0003/$0045 inside bank $C1; returns RTS; dispatch table at $C10051, entry 9 = $354D; no JSR, JMP or JSL reaches $354D... - verified
BattleSys_VictoryPose$C1:356D · 112 B · Battle systemService 8 of the same-bank $C10045 service dispatcher (reached only by JSR $0003/$0045 inside bank $C1; returns RTS; dispatch table at $C10051, entry 8 = $356D; no JSR, JMP or JSL reaches $356D... - verified
Battle_RunPcPose$C1:35DD · 189 B · Battle engineCopies, for each present PC, the first 8 entries of its pose list into !Pc_PoseTicks (durations, halved) and !Pc_PoseFrames (frame ids, for its current facing): the lists come from bank $E4 at... - verified
Battle_PoseStep$C1:369A · 122 B · Battle engineOne pose step, run on every second call: !Battle_UnkE5 flips between 0 (set it, return) and 1 (clear it, step). - verified
Battle_TickEnemyMovers$C1:3714 · 39 B · Battle enginePer-frame enemy movement. - verified
Battle_RunEnemyMover$C1:373B · 37 B · Battle engineRuns the mover of enemy !Battle_MoverEnemy, if that enemy is present: copies !Enemy_TargetWanted into !Enemy_MoveTarget, then, unless !Enemy_Anim is negative, stores the id in !Battle_MoverAnim... - verified
Battle_EnemyMoverTable$C1:3760 · 18 B · Battle engineOne mover per !BattleRom_EnemyMover entry, called from Battle_RunEnemyMover. - verified
Battle_MoverIdle$C1:3772 · 40 B · Battle engineMover 0 (move 4): stays put. - verified
Battle_MoverApproach$C1:379A · 293 B · Battle engineMover 1: walks towards the target until within reach. - verified
Battle_MoverCharge$C1:38BF · 154 B · Battle engineMover 2 (move 7): heads straight for the target from the enemy's position every time and starts the step, until a step is blocked by a blocking cell or another battler (the target included): then... - verified
Battle_MoverAxis$C1:3959 · 228 B · Battle engineMover 3: lines the enemy up with the target along one axis. - verified
Battle_MoverKeepRange$C1:3A3D · 389 B · Battle engineMover 4 (moves 6 and $10): makes for the point on a ring around the target, radius $40 (move $10: $80), on the enemy's side of it. - verified
Battle_MoverOrbit$C1:3BC2 · 625 B · Battle engineMover 5 (moves $0D-$0F): circles the target on a ring of radius !Battle_OrbitRadius ($20; move $0E: $40). - verified
Battle_MoverLoop$C1:3E33 · 295 B · Battle engineMover 6 (moves $0A-$0C): flies round a loop near where it started. - verified
Battle_MoverFixedDir$C1:3F5A · 199 B · Battle engineMover 7 (moves $11-$18): steps in a fixed direction from the enemy's position: $11 up, $12 down, $13 right, $14 left, $15 down-right, $16 down-left, $17 up-left, any other (move $18) up-right.
Bank $C1 · $C1:4000–$4FFF
$C1:4000
Verified · 29
- verified
Battle_MoverToCentre$C1:4021 · 55 B · Battle engineMover 8 (move $19): heads from the enemy's position for the middle of the screen (!Battle_ScreenCentreX/Y), faces that way and starts the step, with no probe and no collision test. - verified
BattleSys_RunAction$C1:4058 · 358 B · Battle systemService 4 of the $C10045 service API (dispatch table at $C10051, entry 4 = $4058; no JSR, JMP or JSL reaches $4058 directly; the one request found is LDA #4 / JSR $C1:0003 at $C1:BFA4, called from... - verified
BattleAct_FlagLethalPcHits$C1:41BE · 84 B · Battle engineFor each PC 0-2, sets its !Battler_UnkA119 to 1 when its pending hit record (!Battle_ActPcHitAmount/Kind, 4 bytes per PC) has kind 3, the PC's HP is not 0, the amount is not 0 and the amount is at... - verified
BattleAct_TickCalcs$C1:4212 · 40 B · Battle engineFor each of the 6 entries of !Battle_ActCalcSel that is non-zero, runs handler (value - 1) of the unmatched table behind BattleAct_RunCalc and stores the two bytes it leaves in... - verified
BattleAct_StepBattlerAnims$C1:423A · 214 B · Battle enginePlays the battlers' action animations, decoding at most one frame per call. - verified
BattleAct_LoadScript$C1:4310 · 28 B · Battle engineClears the 16-byte action parameter block (!Battle_ActScriptId .. $9886), sets !Battle_ActUnkArg987C to $FF (none) and calls the loader for !Battle_ActKind through BattleAct_LoaderTable (kinds 4... - verified
BattleAct_LoadAttack$C1:432C · 628 B · Battle engineKind 1. - verified
BattleAct_LoadTech$C1:45A0 · 442 B · Battle engineKind 2: reads the 7-byte record !Battle_ActId of BattleRom_PcTechAct (PC caster) or BattleRom_EnemyTechAct (enemy caster), including !Battle_ActUnkArg987C, then: frames !BattleRom_ActFrames for... - verified
BattleAct_LoadNone$C1:475A · 1 B · Battle engineKind 0 (and any kind of 4 and up): loads nothing, so no thread starts. - verified
BattleAct_LoadKind3$C1:475B · 216 B · Battle engineKind 3: like the PC branch of BattleAct_LoadTech, for any caster, with record !Battle_ActId - $BC of BattleRom_Kind3Act; frames !BattleRom_ActFrames, palettes !BattleRom_Kind3Pals, objects... - verified
BattleAct_LoadCommon$C1:4833 · 185 B · Battle engineThe end of every loader: - loads graphics set !Battle_ActGfxSetA (BattleAnim_LoadGfx4Vec) and !Battle_ActGfxSetB (BattleAnim_LoadGfx2Vec) and waits a frame; - calls BattleAnim_UnkVecCD0018 with... - verified
BattleAct_IndexObjLists$C1:48EC · 87 B · Battle engineSplits the 4-byte records at bank $CE + !Battle_ActObjPtr into the lists of the 16 action objects, by the top three bits of each record's first byte: 000 an ordinary record; 1xx ends the... - verified
BattleAct_UnpackFrames$C1:4943 · 188 B · Battle engineWaits a frame (BattleSys_PumpFrames, BattleMenu_RefreshIfDirtyAndTick) and builds up to 4 sprite frames from the unpacked data in !Battle_ActFrameBuf, going on from !Battle_ActFrameNum and... - verified
BattleAct_CheckReach$C1:49FF · 114 B · Battle engineFor a PC caster: sets !Battle_ActNear to 1, then to 0 when the main target (entry 3 of !Battle_ActBattlers) is not within 40 pixels (BattlePos_WithinDist40XY), and turns the caster towards the... - verified
BattleAct_FindPath$C1:4A71 · 333 B · Battle engineBreadth-first search on !Battle_PathMap from the cell of the start point ($80, $81) to the cell of the goal point ($82, $83); the cell of a point is (y & $F0) | (x >> 4). - verified
BattleAct_RunThreads$C1:4BBE · 224 B · Battle engineRuns one step of each live thread, in the order 0-4 then 8-15: thread n runs when its !Battle_ActThreadOn byte is non-zero, thread 4 only when !Battle_ActTargetMask is non-zero too, and threads... - verified
BattleAct_RunThread$C1:4C9E · 82 B · Battle engineRuns one thread for this frame. - verified
BattleAct_OpEndThread$C1:4CF0 · 7 B · Battle engineOpcode $00: switches the thread off (!Battle_ActThreadOn = 0). - verified
BattleAct_OpEndScript$C1:4CF7 · 13 B · Battle engineOpcode $01, and the handler of every unused opcode in the table: counts !Battle_ActScriptDone up, which ends the action (service 4 waits for it). - verified
BattleAct_OpLoopAnim$C1:4D04 · 4 B · Battle engineOpcode $02 <n>: starts animation n of the thread's actor in mode 2 (loop) and goes on with the next opcode in the same frame; advances 2. - verified
BattleAct_StartAnim$C1:4D08 · 282 B · Battle engine - verified
BattleAct_OpPlayAnim$C1:4E22 · 128 B · Battle engineOpcode $03 <n>: plays animation n once and waits for it to end, then advances 2. - verified
BattleAct_OpShowAnimFrame$C1:4EA2 · 120 B · Battle engineOpcodes $04-$06 <n> (one handler; the opcode is not looked at): starts animation n with the actor's stop byte set to 1, so that BattleAct_StepBattlerAnims shows its entry 0 and switches it off... - verified
BattleAct_OpResetSpeed$C1:4F1A · 58 B · Battle engineOpcode $07: sets the actor's move delay and speed (!Battle_ActorMoveDelay / !Battle_ActorMoveSpeed) back to the battler's defaults (!Battler_DefMoveDelay / !Battler_DefMoveSpeed, set at battle... - verified
BattleAct_OpSetSpeed$C1:4F54 · 107 B · Battle engineOpcodes $08-$0F (one handler): sets the actor's move delay and speed (!Battle_ActorMoveDelay / !Battle_ActorMoveSpeed) from entry (opcode - 8) of !BattleRom_ActMoveDelay / !BattleRom_ActMoveSpeed... - verified
BattleAct_OpMoveTo$C1:4FBF · 18 B · Battle engineThe move opcodes: move the thread's actor in a straight line to a point, at its !Battle_ActorMoveSpeed pixels per step and !Battle_ActorMoveDelay frames per step, then go on. - verified
BattleAct_OpMoveToUnkPoint$C1:4FD1 · 18 B · Battle engine - verified
BattleAct_OpMoveToCalc$C1:4FE3 · 10 B · Battle engine - verified
BattleAct_MoveToPoint$C1:4FED · 328 B · Battle engine
Bank $C1 · $C1:5000–$5FFF
$C1:5000
Verified · 78
- verified
BattleAct_StartBattlerMove$C1:5135 · 185 B · Battle engineStarts a straight move of battler X to the point in !Battle_ActCalcOutA/B (x, y): keeps its position (!Battler_ScreenX/Y) in !Battle_ActorFromX/Y and the point in !Battle_ActorToX/Y, turns it... - verified
BattleAct_OpCurveTo$C1:51EE · 23 B · Battle engineThe curving move opcodes: like the move opcodes $10-$12 (BattleAct_OpMoveTo) they move the thread's actor to a point and wait for it, but with mover kind !Battle_MoveKindCurve: the mover... - verified
BattleAct_OpCurveToUnkPoint$C1:5205 · 23 B · Battle engine - verified
BattleAct_OpCurveToCalc$C1:521C · 15 B · Battle engine - verified
BattleAct_CurveToPoint$C1:522B · 389 B · Battle engine - verified
BattleAct_CurveTurnDir$C1:53B0 · 89 B · Battle engineWhich way a curving move turns from heading DP $82 to the angle !Battle_GeoAngle (Battle_CalcAngle's, to the point): A = 0 (increase the angle) or 1 (decrease it), the shorter way. - verified
BattleAct_OpPathTo$C1:5409 · 18 B · Battle engineThe path-walk opcodes: a battler of threads 0-3 walks to a point cell by cell round what stands in the way, then the thread goes on. - verified
BattleAct_OpPathToUnkPoint$C1:541B · 18 B · Battle engine - verified
BattleAct_OpPathToCalc$C1:542D · 10 B · Battle engine - verified
BattleAct_PathToPoint$C1:5437 · 474 B · Battle engine - verified
BattleAct_OpSetPos$C1:5611 · 14 B · Battle engineThe place opcodes: put the thread's actor at a point at once (no move). - verified
BattleAct_SetPosToPoint$C1:561F · 77 B · Battle engine - verified
BattleAct_OpSetPosUnkPoint$C1:566C · 17 B · Battle engine - verified
BattleAct_OpSetPosCalc$C1:567D · 23 B · Battle engine - verified
BattleAct_OpFollow$C1:5694 · 39 B · Battle engineOpcode $1C <n>: on an object thread, makes the object follow something: !Battle_ActObjFollow of the object = entry n of !Battle_ActBattlers (a battler slot) for n below !Battle_ActFollowFirstObj... - verified
BattleAct_OpUnfollow$C1:56BB · 17 B · Battle engineOpcode $1D <j>: object thread j follows nothing any more (!Battle_ActObjFollow = !Battle_ActFollowNone), whatever thread runs it. - verified
BattleAct_OpCall$C1:56CC · 47 B · Battle engineOpcode $1E <n>: calls subscript n: keeps the address after the opcode (pointer + 2, the carry going into the bank) in the thread's !Battle_ActThreadReturn / !Battle_ActThreadReturnBank and goes to... - verified
BattleAct_OpReturn$C1:56FB · 25 B · Battle engineOpcode $1F: returns from a subscript (BattleAct_OpCall): the script pointer = the thread's !Battle_ActThreadReturn / ReturnBank, and the next opcode runs in the same frame. - verified
BattleAct_OpPause$C1:5714 · 14 B · Battle engineOpcode $20 <n>: ends the thread's turn for this frame and has BattleAct_RunThread only count !Battle_ActThreadWait = n down on the next n frames before running the next opcode; advances 2. - verified
BattleAct_OpReturnIfVar1F0$C1:5722 · 10 B · Battle engineOpcode $21: when variable $1F (!Battle_ActUnkPointY) is 0, returns from the subscript like opcode $1F; otherwise advances 1 (and the thread waits for the next frame). - verified
BattleAct_OpWaitVar$C1:572C · 23 B · Battle engineOpcode $22 <n> <v>: waits until variable n (!Battle_ActVars + n) is v: while it is not, stays on the opcode (advance 0); then goes on with the next opcode in the same frame, advancing 3. - verified
BattleAct_OpWaitVar1C$C1:5743 · 19 B · Battle engineOpcode $23 <v>: as opcode $22 for variable $1C (!Battle_ActVar1C); advances 2 when it is v. - verified
BattleAct_OpWaitVar1D$C1:5756 · 19 B · Battle engineOpcode $24 <v>: as opcode $23 for variable $1D (!Battle_ActVar1D). - verified
BattleAct_OpEndIfNoTarget$C1:5769 · 20 B · Battle engineOpcode $25 <i>: when entry i of !Battle_ActTargetSet is the end marker (bit 7 set: the set has fewer than i + 1 slots), switches the thread off (BattleAct_OpEndThread); otherwise goes on with the... - verified
BattleAct_OpShowAnimEntry$C1:577D · 137 B · Battle engineOpcode $26 <n> <f>: like opcodes $04-$06 (BattleAct_OpShowAnimFrame) with the stop byte f from the operand: starts animation n with the actor's stop byte = f, so that BattleAct_StepBattlerAnims... - verified
BattleAct_OpSetUnkA5CD$C1:5806 · 4 B · Battle engineOpcodes $27 (BattleAct_OpSetUnkA5CD, value 1) and $28 (BattleAct_OpClearUnkA5CD, value 0): set !Battler_UnkA5CD of the thread's battler (threads 0-3) or of every slot of the target set (thread 4)... - verified
BattleAct_StoreUnkA5CD$C1:580A · 54 B · Battle engine - verified
BattleAct_OpClearUnkA5CD$C1:5840 · 4 B · Battle engine - verified
BattleAct_OpSetUnk9FF7$C1:5844 · 4 B · Battle engineOpcodes $29 (BattleAct_OpSetUnk9FF7, value 1) and $2A (BattleAct_OpClearUnk9FF7, value 0): as opcodes $27/$28 for !Battler_Unk9FF7 (bit 7: skipped by the target scans). - verified
BattleAct_StoreUnk9FF7$C1:5848 · 49 B · Battle engine - verified
BattleAct_OpClearUnk9FF7$C1:5879 · 4 B · Battle engine - verified
BattleAct_OpClearUnkA4A4$C1:587D · 46 B · Battle engineOpcode $2B: zeroes !Battler_UnkA4A4 and !Battler_UnkA4AF of the thread's battler (threads 0-3) or of every slot of the target set (thread 4); object threads change nothing. - verified
BattleAct_OpUnkRevive$C1:58AB · 49 B · Battle engineOpcode $2C: for the thread's battler (threads 0-3) or every slot of the target set (thread 4): counts !Battler_Present up and zeroes !Battler_KoFlag; object threads change nothing. - verified
BattleAct_OpSetUnkCFFF$C1:58DC · 8 B · Battle engineOpcode $2D: !BattleFx_HoldAnims = 1 (BattleFx_HoldAnimsTick holds the palette animations); advances 1. - verified
BattleAct_OpClearUnkCFFF$C1:58E4 · 8 B · Battle engineOpcode $2E: !BattleFx_HoldAnims = 0 (BattleFx_HoldAnimsTick lets the held palette animations run again); advances 1. - verified
BattleAct_OpSetVar$C1:58EC · 18 B · Battle engineThe script variable opcodes ($C158EC–$C159B8): set, count and add to the bytes of !Battle_ActVars; variables $1C and $1D have opcodes of their own. - verified
BattleAct_OpSetVar1C$C1:58FE · 14 B · Battle engineOpcode $31 <v>: !Battle_ActVar1C = v; advances 2. - verified
BattleAct_OpSetVar1D$C1:590C · 14 B · Battle engineOpcode $32 <v>: !Battle_ActVar1D = v; advances 2. - verified
BattleAct_OpCalcToUnkPoint$C1:591A · 23 B · Battle engineOpcode $33 <n>: runs BattleAct_RunCalc handler n and keeps its point in !Battle_ActUnkPointX/Y (variables $1E/$1F), for the "UnkPoint" move opcodes; advances 2, and the thread waits for the next... - verified
BattleAct_OpIncVar$C1:5931 · 15 B · Battle engineOpcode $34 <n>: variable n + 1; advances 2. - verified
BattleAct_OpIncVar1C$C1:5940 · 11 B · Battle engineOpcode $35: !Battle_ActVar1C + 1; advances 1. - verified
BattleAct_OpIncVar1D$C1:594B · 11 B · Battle engineOpcode $36: !Battle_ActVar1D + 1; advances 1. - verified
BattleAct_OpDecVar$C1:5956 · 15 B · Battle engineOpcode $37 <n>: variable n - 1; advances 2. - verified
BattleAct_OpDecVar1C$C1:5965 · 11 B · Battle engineOpcode $38: !Battle_ActVar1C - 1; advances 1. - verified
BattleAct_OpDecVar1D$C1:5970 · 11 B · Battle engineOpcode $39: !Battle_ActVar1D - 1; advances 1. - verified
BattleAct_OpAddVar$C1:597B · 22 B · Battle engineOpcode $3A <n> <v>: variable n + v (8-bit, wraps); advances 3. - verified
BattleAct_OpAddVar1C$C1:5991 · 18 B · Battle engineOpcode $3B <v>: !Battle_ActVar1C + v; advances 2. - verified
BattleAct_OpAddVarTo1C$C1:59A3 · 22 B · Battle engineOpcode $3C <n>: !Battle_ActVar1C + variable n; advances 2. - verified
BattleAct_OpCalcToResult$C1:59B9 · 43 B · Battle engineOpcodes $3D-$40 and $45-$46 <n> (one handler): runs BattleAct_RunCalc handler n once and stores its two results in entry k of !Battle_ActCalcResult: k = opcode - $3D for $3D-$40 (0-3), opcode... - verified
BattleAct_OpCopyVar$C1:59E4 · 22 B · Battle engineOpcode $41 <a> <b>: variable b = variable a; advances 3. - verified
BattleAct_OpCopyVar1C$C1:59FA · 18 B · Battle engineOpcode $42 <n>: variable n = !Battle_ActVar1C; advances 2. - verified
BattleAct_OpOffsetToUnkPoint$C1:5A0C · 50 B · Battle engineOpcode $43 <n> <x> <y>: !Battle_ActUnkPointX/Y = (x, y) plus the point of BattleAct_RunCalc handler n (each 8-bit, wrapping); advances 4. - verified
BattleAct_OpActorPosToUnkPoint$C1:5A3E · 50 B · Battle engineOpcode $44: !Battle_ActUnkPointX/Y = the position of the thread's actor: !Battler_ScreenX/Y of its !Battle_ActBattlers entry, or the object's !Battle_ActObjX/Y on threads 8-15. - verified
BattleAct_OpAddVarClamped$C1:5A70 · 41 B · Battle engineOpcode $49 <n> <d>: variable n + d, with d signed and the result clamped to 0-$FF (a carry out of a positive add gives $FF, a negative add with no carry gives 0); advances 3. - verified
BattleAct_OpSwapVar1C1D$C1:5A99 · 22 B · Battle engineOpcodes $4A and $4D: swaps !Battle_ActVar1C and !Battle_ActVar1D; advances 1. - verified
BattleAct_OpSwapVar1C1E$C1:5AAF · 22 B · Battle engineOpcode $4E: swaps !Battle_ActVar1C and variable $1E (!Battle_ActUnkPointX); advances 1. - verified
BattleAct_OpSwapVar1C1F$C1:5AC5 · 22 B · Battle engineOpcode $4F: swaps !Battle_ActVar1C and variable $1F (!Battle_ActUnkPointY); advances 1. - verified
BattleAct_OpShowHitNumbers$C1:5ADB · 534 B · Battle engineOpcodes $50-$55: shows the hit numbers of record set (opcode & 7) as digit sprites over the battlers and waits until they have bounced. - verified
BattleAct_OpClearUnk9FF7Bit7$C1:5CF1 · 2 B · Battle engineOpcodes $5D (BattleAct_OpClearUnk9FF7Bit7, DP $8E = 0) and $5E (BattleAct_OpSetUnk9FF7Bit7, DP $8E = $80): sets bit 7 of the thread's battler's !Battler_Unk9FF7 (the target scans' skip bit) to... - verified
BattleAct_StoreUnk9FF7Bit7$C1:5CF3 · 31 B · Battle engine - verified
BattleAct_OpSetUnk9FF7Bit7$C1:5D12 · 6 B · Battle engine - verified
BattleAct_OpNop2$C1:5D18 · 5 B · Battle engineOpcode $5F <x>: does nothing; advances 2 (over its operand). - verified
BattleAct_OpLoadPalEntry$C1:5D1D · 118 B · Battle engineThe palette opcodes ($C15D1D–$C15FA4): colour sets from the action's palette list (!Battle_ActPalPtr) and its four palette sequences, opcode $69's special palette and its blink, and the colour... - verified
BattleAct_OpStartPalSeq$C1:5D93 · 46 B · Battle engineOpcodes $61-$64 <delay> <first> <last>: starts palette sequence opcode - $61 (0-3) for BattleAct_StepPalettes ($CC:F1E7): it loads the palette-list entries first..last in turn, one every delay... - verified
BattleAct_OpStopPalSeq$C1:5DC1 · 18 B · Battle engineOpcodes $65-$68: stops palette sequence opcode - $65 (0-3); the colours it last loaded stay. - verified
BattleAct_OpSetSpecialPalette$C1:5DD3 · 9 B · Battle engineOpcode $69 <n>: gives the thread's battler (threads 0-3) or every slot of the target set (threads 4-15, the object threads included) !Battler_Palette = !Battle_SpecialPalette, and fills that... - verified
BattleAct_SpecialPaletteBody$C1:5DDC · 171 B · Battle engine - verified
BattleAct_OpRestorePalette$C1:5E87 · 4 B · Battle engineOpcode $6A: undoes opcode $69: gives the thread's battler (threads 0-3) or every slot of the target set (threads 4-15) its !Battler_BasePalette back. - verified
BattleAct_RestorePaletteBody$C1:5E8B · 84 B · Battle engine - verified
BattleAct_OpStartPalCycle$C1:5EDF · 52 B · Battle engineOpcode $6B <delay>: starts the colour rotation of BattleCF_FrameUpdate ($CF:E600 on): every delay frames it turns the colours of !Battle_PaletteLive+$82-$99 (the special palette's 12 colours) on... - verified
BattleAct_OpBlinkPalette$C1:5F13 · 135 B · Battle engineOpcode $6C <n> <frames>: blinks between opcode $69's special palette n and the battler's own palette. - verified
BattleAct_OpStopPalCycle$C1:5F9A · 11 B · Battle engineOpcode $6D: stops opcode $6B's colour rotation (!Battle_UnkAB4E and !Battle_PalCycleLo = 0); the colours stay as they were turned. - verified
BattleAct_OpIncAllObjUnkA1D8$C1:5FA5 · 14 B · Battle engineThe object counter opcodes ($C15FA5–$C15FDD): count !Battle_ActObjUnkA1D8 up or clear it, for all eight object threads or for the running one. - verified
BattleAct_OpClearAllObjUnkA1D8$C1:5FB3 · 14 B · Battle engineOpcode $6F: zeroes !Battle_ActObjUnkA1D8 of object threads 0-7; advances 1. - verified
BattleAct_OpIncObjUnkA1D8$C1:5FC1 · 2 B · Battle engineOpcode $70: counts !Battle_ActObjUnkA1D8 of the running object thread (!Battle_ActObjThread) up; advances 1. - verified
BattleAct_Op70Body$C1:5FC3 · 16 B · Battle engine - verified
BattleAct_OpClearObjUnkA1D8$C1:5FD3 · 11 B · Battle engineOpcode $71: zeroes !Battle_ActObjUnkA1D8 of the running object thread; advances 1. - verified
BattleAct_OpSetFacing$C1:5FDE · 123 B · Battle engineOpcode $72 <mode>: sets the facing of the thread's actor from BattleAct_CalcFacing with A = mode: !Battler_Facing of the thread's battler (threads 0-3) or of every slot of the target set (thread...
Bank $C1 · $C1:6000–$6FFF
$C1:6000
Verified · 40
- verified
BattleAct_OpLinkObjBit7$C1:6059 · 6 B · Battle engineOpcodes $73 (BattleAct_OpLinkObjBit7, DP $8E = $80) and $74 (BattleAct_OpLinkObjBit6, DP $8E = $40) <n>: links the running object thread j (!Battle_ActObjThread) to the battler s in entry n of... - verified
BattleAct_OpLinkObjBit6$C1:605F · 4 B · Battle engine - verified
BattleAct_LinkObjBody$C1:6063 · 48 B · Battle engine - verified
BattleAct_OpCopyHeading$C1:6093 · 83 B · Battle engineThe heading opcodes ($C16093–$C1619D and $C16258): set !Battle_ActorUnkA5AA (the battlers) or !Battle_ActObjUnkA5B5 (the object threads), the heading a curving move with operand $FF starts from. - verified
BattleAct_OpHeadingFromCalc$C1:60E6 · 110 B · Battle engineOpcode $76 <a> <b>: runs BattleAct_RunCalc handler b and then a, takes each one's two results as a point's x/y, and stores the angle Battle_CalcAngle gives from point a (origin) to point b as the... - verified
BattleAct_OpAddHeading$C1:6154 · 74 B · Battle engineOpcode $77 <d>: adds d (mod 256, so a turn either way) to the heading of the same actors as opcode $75. - verified
BattleAct_OpSound$C1:619E · 35 B · Battle engineThe sound opcodes ($C1619E–$C1621A): fill the APU command block (!Sfx_Command, !Sfx_Param1/2) and run Audio_ProcessEntry. - verified
BattleAct_OpSoundCalc$C1:61C1 · 42 B · Battle engineOpcodes $7A/$7B <id> <calc>: APU command $18 (opcode $7A) or $19 (opcode $7B) with !Sfx_Param1 = id and !Sfx_Param2 = the first result of BattleAct_RunCalc handler calc (probably an x, as opcodes... - verified
BattleAct_OpPcAttackSfxA$C1:61EB · 10 B · Battle engineOpcodes $7C (BattleAct_OpPcAttackSfxA) and $7D (BattleAct_OpPcAttackSfxB): APU command $18 with !Sfx_Param1 = the sound of the PC attack record (!Battle_ActPcAttackRec) in !BattleRom_PcAttackSfxA... - verified
BattleAct_OpPcAttackSfxB$C1:61F5 · 8 B · Battle engine - verified
BattleAct_PlayPcAttackSfx$C1:61FD · 30 B · Battle engine - verified
BattleAct_OpRunVecCD001B$C1:621B · 33 B · Battle engineOpcode $80 <len> ...: copies len & $0F bytes of the script, from the length byte on, to !Battle_ActOp80Args (DP $53 on), runs BattleAct_UnkVecCD001B and advances by that count + 1 (the opcode and... - verified
BattleAct_OpSetCalcSel$C1:623C · 28 B · Battle engineOpcodes $81-$84 (entries 0-3) and $47/$48 (entries 4 and 5) <n>: !Battle_ActCalcSel[entry] = n + 1, so BattleAct_TickCalcs runs BattleAct_RunCalc handler n for that entry every frame; advances 2. - verified
BattleAct_OpSetHeading$C1:6258 · 65 B · Battle engineOpcode $85 <h>: sets the heading (see the heading opcodes above) of the thread's battler (threads 0-3 and 5-7), of every slot of the target set (thread 4; the target set here, unlike opcodes... - verified
BattleAct_OpArcToCalc$C1:6299 · 2 B · Battle engineThe arc opcodes: like the move opcodes $10-$12 (BattleAct_OpMoveTo) they move the thread's actor in a straight line to a point and wait for it, but with mover kind !Battle_MoveKindArc... - verified
BattleAct_ArcToCalcDir$C1:629B · 15 B · Battle engine - verified
BattleAct_ArcToPoint$C1:62AA · 671 B · Battle engine - verified
BattleAct_ArcQuarterPoint$C1:6549 · 113 B · Battle engineOpcodes $9C/$9D: moves !Battle_GeoPointX/Y to a quarter of the way from !Battle_GeoOriginX/Y: Origin + (|Point - Origin| / 4, rounded down) with the delta's sign, per axis (8-bit, no carry out). - verified
BattleAct_CalcMoveStep$C1:65BA · 183 B · Battle engineUnit step of a straight move from !Battle_GeoOriginX/Y to !Battle_GeoPointX/Y, as signed 8.8 pixels: the axis with the larger distance (x on a tie) moves 1.0 ($0100) per step, the other (smaller *... - verified
BattleAct_CalcMidpointSteps$C1:6671 · 189 B · Battle engineFrom !Battle_GeoOriginX/Y and !Battle_GeoPointX/Y: sets !Battle_ActMoveUnitX/Y to the delta * 4 with the delta's sign (as signed 8.8, 1/64 of the delta: probably a move of 64 steps)... - verified
BattleAct_OpArcToUnkPoint$C1:672E · 2 B · Battle engineOpcodes $99/$9D <m>: the arc move (BattleAct_OpArcToCalc) to the point in !Battle_ActUnkPointX/Y, height subtracted; length 2. - verified
BattleAct_ArcToUnkPointDir$C1:6730 · 19 B · Battle engine - verified
BattleAct_OpArcDownToCalc$C1:6743 · 7 B · Battle engineOpcode $9A <mode> <n>: opcode $98 (BattleAct_OpArcToCalc) with the height added instead of subtracted (DP $8F = 1). - verified
BattleAct_OpArcDownToUnkPoint$C1:674A · 7 B · Battle engineOpcode $9B <m>: opcode $99 (BattleAct_OpArcToUnkPoint) with the height added instead of subtracted (DP $8F = 1). - verified
BattleAct_OpMoveAlongHeading$C1:6751 · 458 B · Battle engineOpcode $A2: moves the thread's actor along its heading (!Battle_ActorUnkA5AA; for the objects !Battle_ActObjUnkA5B5) with mover kind !Battle_MoveKindHeading (BattleCF_MoveHeading; up to $FF steps... - verified
BattleAct_OpStartPosHistory$C1:691B · 16 B · Battle engineOpcode $A4 <delay> <b>: starts the position history of the thread's battler (threads 0-3) or of every slot of !Battle_ActTargetSet (threads 4-7; unlike most opcodes, threads 5-7 take the set too)... - verified
BattleAct_SetPosHistory$C1:692B · 143 B · Battle engine - verified
BattleAct_OpStopPosHistory$C1:69BA · 9 B · Battle engineOpcode $A5: !Battler_PosHistOn = 0 for the same battlers as opcode $A4 (BattleAct_OpStartPosHistory); advances 1. - verified
BattleAct_OpMoveHeadingSteps$C1:69C3 · 301 B · Battle engineOpcode $A8 <n>: moves the thread's actor along its heading (!Battle_ActorUnkA5AA; objects !Battle_ActObjUnkA5B5) with mover kind !Battle_MoveKindHeading for n steps (!Battle_ActorHeadSteps = n... - verified
BattleAct_OpMoveHeadingChecked$C1:6AF0 · 515 B · Battle engineOpcode $A9 <n>: opcode $A8 (BattleAct_OpMoveHeadingSteps) with opcode $A2's test of the cell ahead (BattleAct_OpMoveAlongHeading), and for the battlers also the box test: BattleAct_ProbeBoxOverlap... - verified
BattleAct_OpCircleToCalc$C1:6CF3 · 29 B · Battle engineOpcode $C0 <n> <r> <a> <q>: moves the thread's actor round a circle whose centre is the point left by BattleAct_RunCalc handler n, with mover kind !Battle_MoveKindCircle (BattleCF_MoveCircle; see... - verified
BattleAct_CircleMove$C1:6D10 · 4 B · Battle engine - verified
BattleAct_CircleMoveKind$C1:6D14 · 541 B · Battle engine - verified
BattleAct_OpCircleToUnkPoint$C1:6F31 · 34 B · Battle engineOpcode $C1 <r> <a> <q>: opcode $C0 (BattleAct_OpCircleToCalc) round the point in !Battle_ActUnkPointX/Y; length 4. - verified
BattleAct_OpEllipseToCalc$C1:6F53 · 34 B · Battle engineOpcode $C2 <n> <r> <a> <q>: opcode $C0 (BattleAct_OpCircleToCalc) with mover kind !Battle_MoveKindEllipse (BattleCF_MoveEllipse), which differs from the circle mover only in using half the radius... - verified
BattleAct_OpEllipseToUnkPoint$C1:6F75 · 37 B · Battle engineOpcode $C3 <r> <a> <q>: opcode $C2 (BattleAct_OpEllipseToCalc) round the point in !Battle_ActUnkPointX/Y; length 4. - verified
BattleAct_OpStepUnkA4AF$C1:6F9A · 14 B · Battle engineOpcode $C4 <t> <d>: each frame adds d to the thread's battler's !Battler_UnkA4AF (the y offset the movers and the position history use) and waits (advance 0), until the value equals t, then... - verified
BattleAct_StepUnkA4AF$C1:6FA8 · 71 B · Battle engine - verified
BattleAct_OpStepUnkA4AFTo0$C1:6FEF · 13 B · Battle engineOpcode $C5 <d>: opcode $C4 (BattleAct_OpStepUnkA4AF) with t = 0: steps !Battler_UnkA4AF back to 0 by d per frame; length 2. - verified
BattleAct_OpIncUnkA5D8$C1:6FFC · 47 B · Battle engineOpcode $D0: counts the thread's battler's !Battler_UnkA5D8 up by 1 (no reader of it found); length 1.
Bank $C1 · $C1:7000–$7FFF
$C1:7000
Verified · 42
- verified
BattleAct_OpClearUnkA5D8$C1:702B · 47 B · Battle engineOpcode $D1: zeroes !Battler_UnkA5D8, for the same battlers as opcode $D0 (BattleAct_OpIncUnkA5D8); length 1. - verified
BattleAct_OpMoveKind4ToCalc$C1:705A · 436 B · Battle engineOpcode $D2 <n>: sets up, without starting it, a move of the thread's actor to the point left by BattleAct_RunCalc handler n with mover kind !Battle_MoveKindUnk4 (BattleCF_MoveKind4); length 2; it... - verified
BattleAct_OpMoveToMidpoint$C1:720E · 315 B · Battle engineOpcode $D3: sets up, without starting it, a straight move of the thread's actor to the raised midpoint opcode $D2 left (!Battle_ActUnkMidX/Y, copied to !Battle_ActCalcOutA/B); length 1; it... - verified
BattleAct_OpRunMoveAfterUnkAAFC$C1:7349 · 27 B · Battle engineOpcode $D4: waits (advance 0) while the 16-bit !Battle_ActUnkAAFC (with !Battle_ActUnkAAFD) is not 0, counting it down by 1 a frame; at 0 it goes on as opcode $D6. - verified
BattleAct_OpRunMove$C1:7364 · 63 B · Battle engine - verified
BattleAct_OpRunMove_Wait$C1:73A3 · 5 B · Battle engine - verified
BattleAct_OpRunMove_Done$C1:73A8 · 5 B · Battle engine - verified
BattleAct_OpRunMoveAfterMajorDist$C1:73AD · 94 B · Battle engineOpcode $D5: opcode $D4 (BattleAct_OpRunMoveAfterUnkAAFC) with the other delay opcode $D3 leaves: waits while the 16-bit !Battle_MoveMajorDist is not 0, counting it down by 1 a frame; then sets the... - verified
BattleAct_OpPointTowardCalc$C1:740B · 169 B · Battle engineOpcode $D7 <d> <n>: sets !Battle_ActUnkPointX/Y to the point d pixels (along the major axis) from the thread's actor towards the point left by BattleAct_RunCalc handler n: .along adds the unit... - verified
BattleAct_OpShake$C1:74B4 · 134 B · Battle engineOpcode $D8 <a> <p> <f>: starts mover kind !Battle_MoveKindShake (BattleCF_MoveShake) for the thread's battler and advances at once (length 4): !Battler_ShakeAmp = a, !Battler_ShakePeriod = p... - verified
BattleAct_OpSetActAttr$C1:753A · 63 B · Battle engineOpcode $D9 <v>: sets the thread's actor's attribute value to v (!Battler_ActAttr for a battler, every slot of !Battle_ActTargetSet for thread 4, !Battle_ActObjAttr for object j; probably sprite... - verified
BattleAct_OpResetActAttr$C1:7579 · 66 B · Battle engineOpcode $DA: puts the thread's actor's attribute value back to its initial one (!Battler_ActAttrInit into !Battler_ActAttr, for thread 4 every slot of !Battle_ActTargetSet, !Battle_ActObjAttrInit... - verified
BattleAct_AdvanceScript$C1:75BB · 17 B · Battle engineMoves the thread's script pointer !Battle_ActScriptPtr on by A bytes: a 16-bit add to the offset, with the carry going into the bank byte (added 16-bit, so DP $E9 takes part too). - verified
BattleAct_CalcFacing$C1:75CC · 11 B · Battle engineRuns the BattleAct_FacingModeTable handler for mode A (0-$18), which leaves the facing in !Battle_ActFacingOut: modes 0-9 copy the facing of !Battle_ActBattlers entry A, $0A-$13 face entry A... - verified
BattleAct_FaceLikeEntry$C1:75D7 · 12 B · Battle engineFacing modes 0-9: the !Battler_Facing of !Battle_ActBattlers entry Y. - verified
BattleAct_FaceTowardEntry$C1:75E3 · 39 B · Battle engineFacing modes $0A-$13: the facing from the actor's point (DP $80/$81) toward the screen position of !Battle_ActBattlers entry Y - $0A, from Battle_CalcAngle and !BattleRom_FacingByAngle. - verified
BattleAct_FaceFixed$C1:760A · 8 B · Battle engineFacing modes $14-$17: facing Y - $14 (!Battle_FacingUp, Down, Left, Right). - verified
BattleAct_FaceTowardCentre$C1:7612 · 28 B · Battle engineFacing mode $18: the facing from the actor's point (DP $80/$81) toward the middle of the screen (!Battle_ScreenCentreX/Y). - verified
BattleAct_RunCalc$C1:762E · 11 B · Battle engineRuns the BattleAct_CalcTable handler for number A (0-$47), which leaves a point in !Battle_ActCalcOutA (x) and !Battle_ActCalcOutB (y) (two script variables for handlers $2A-$31; nothing for $12). - verified
BattleAct_CalcEntryPos$C1:7639 · 17 B · Battle engineHandlers 0-8: the screen position (!Battler_ScreenX/Y) of !Battle_ActBattlers entry Y. - verified
BattleAct_CalcEntryOffsetPos$C1:764A · 51 B · Battle engineHandlers 9-$11: the screen position of !Battle_ActBattlers entry Y - 9 plus its !Battler_ScreenOffsetX/Y. - verified
BattleAct_CalcNone$C1:767D · 1 B · Battle engineHandler $12: does nothing; !Battle_ActCalcOutA/B keep what the last handler left. - verified
BattleAct_CalcMid03$C1:767E · 8 B · Battle engineHandler $13: the midpoint of !Battle_ActBattlers entries 0 and 3 (the caster and the main target), through BattleAct_CalcMid02's BattleAct_CalcMidWithEntry0. - verified
BattleAct_CalcMid01$C1:7686 · 8 B · Battle engineHandler $14: the midpoint of !Battle_ActBattlers entries 0 and 1, through BattleAct_CalcMid02's BattleAct_CalcMidWithEntry0. - verified
BattleAct_CalcMid02$C1:768E · 5 B · Battle engineHandler $15: the midpoint of the screen positions of two battler slots, (x1 + x2) / 2 and (y1 + y2) / 2 worked out 16-bit. - verified
BattleAct_CalcMidWithEntry0$C1:7693 · 4 B · Battle engine - verified
BattleAct_CalcMidFromSlot$C1:7697 · 65 B · Battle engine - verified
BattleAct_CalcCentroid$C1:76D8 · 118 B · Battle engineHandler $16: meant as the centre of !Battle_ActBattlers entries 0-2 (the caster and its two partners): sums the three screen x and the three screen y 16-bit and divides by 3 with Battle_Divide. - verified
BattleAct_CalcAheadOfActor$C1:774E · 131 B · Battle engineHandler $17: the point $18 pixels from the thread's actor along its move angle: y + the sine of the angle and x + the sine of the angle + $40, each from Battle_SinLookup with scale $18 (a signed... - verified
BattleAct_CalcFixedPoint$C1:77D1 · 9 B · Battle engineHandler $18: the point ($80, $80). - verified
BattleAct_CalcSavedPos$C1:77DA · 18 B · Battle engineHandlers $19-$1B: the position saved for !Battle_ActBattlers entry Y - $19 (0-2) in !Battle_ActSavedX/Y. - verified
BattleAct_CalcObjOffset$C1:77EC · 31 B · Battle engineHandlers $1C-$23: the position of object Y - $1C (0-7) plus its !Battle_ActObjOfsX/Y, 16-bit, stored 16-bit. - verified
BattleAct_CalcLerpToTarget$C1:780B · 246 B · Battle engineHandlers $24-$29 and $32-$3F: a point on the line from one battler to the main target (!Battle_ActMainTarget): (w1 * P + w2 * T) >> 3 per coordinate, with the weight pair (w1, w2) k of... - verified
BattleAct_CalcVarPair$C1:7901 · 19 B · Battle engineHandlers $2A-$31: script variables 2k and 2k + 1 of !Battle_ActVars, k = n - $2A (0-7), as the pair (not necessarily a point). - verified
BattleAct_CalcMid12$C1:7914 · 12 B · Battle engineHandler $40: the midpoint of !Battle_ActBattlers entries 1 and 2 (the two partners), through BattleAct_CalcMid02's BattleAct_CalcMidFromSlot. - verified
BattleAct_CalcLerpToObj0$C1:7920 · 129 B · Battle engineHandlers $41-$47: a point on the line from !Battle_ActBattlers entry 0 (the caster) to object 0 (the low bytes of !Battle_ActObjX/Y), (w1 * P + w2 * O) >> 3 with weight pair n - $41 of... - verified
BattleAct_FacingModeTable$C1:79A1 · 50 B · Battle engineBattleAct_CalcFacing's handler per facing mode 0-$18, called through JSR (BattleAct_FacingModeTable,X) with X = mode * 2. - verified
BattleAct_CalcTable$C1:79D3 · 144 B · Battle engineBattleAct_RunCalc's handler per number 0-$47, called through JSR (BattleAct_CalcTable,X) with X = number * 2. - verified
BattleAct_LoaderTable$C1:7A63 · 8 B · Battle engineAction loader per !Battle_ActKind 0-3, called by BattleAct_LoadScript through JSR (BattleAct_LoaderTable,X) with X = kind * 2 (kinds 4 and up are taken as 0). - verified
BattleAct_OpcodeTable$C1:7A6B · 448 B · Battle engineHandler per action-script opcode, called by BattleAct_RunThread through JSR (BattleAct_OpcodeTable,X) with X = opcode * 2. - verified
BattleAct_ProbeBoxOverlap$C1:7C2B · 18 B · Battle enginePuts battler X's probe (!Battler_ProbeX/Y) at its screen position, builds its box (Battle_CalcBattlerBox) and tests it against the other battlers' boxes (Battle_BoxOverlapsOthers, tail JMP). - verified
BankC1_OldBuildLeftovers$C1:7C3D · 963 B · EngineNot code and, as far as found, never read: xref finds no call or jump to $C1:7C3D or to any of the segment starts below, and the absolute $7C3D-$7FFF operands in bank $C1 code are WRAM reads (DB =...
Bank $C1 · $C1:8000–$8FFF
$C1:8000
Verified · 27
- verified
BankC1_BattleStartVec$C1:8000 · 3 B · EngineVector into BattleSys_Main. - verified
BankC1_Entry8003$C1:8003 · 3 B · EngineLong vector into BankC1_RunService ($C1:CFC2), which pushes P, X, DP and DB itself (PHP, REP #$30, PHX, PHD, PHB), sets DB=$7E and DP=0, runs entry A (low byte) of BankC1_ServiceTable with... - verified
BattleSys_Main$C1:8006 · 1,115 B · Battle systemThe battle from its setup to its end; it never returns, leaving through BattleSys_ExitVec ($C1:0006 -> $001F -> JML $CF:FBE5). - verified
BattleSys_Unk8461$C1:8461 · 988 B · Battle systemHandler of turn list 12, the battlers' turns (inferred: a ready PC is queued for the command menu by service 1, BattleMenu_EnqueueReadyBattler; a ready enemy's !Battler_UnkAFAB, probably its ATB... - verified
BattleSys_Unk883D$C1:883D · 37 B · Battle systemFor each PC slot 0-2 whose !Battler_UnkAF0A entry is not $FF: DP $14 (16-bit) = the slot, BattleSys_UnkB575, then BattleSys_UnkB3F9 with X = the slot. - verified
BattleSys_ClearUnkB192$C1:8862 · 20 B · Battle systemZeroes the 4-byte !Battle_UnkB192 record of battler slot !Battle_UnkB18B. - verified
BattleSys_ListHandler0$C1:8876 · 79 B · Battle systemTurn list 0 (BattleSys_ListHandlerTable entry 0): the usual handler (see the banner); at the end of its runs it clears BattlerStats.Status2 bit 7 of the slot. - verified
BattleSys_ListHandler1$C1:88C5 · 150 B · Battle systemTurn list 1: a repeating hit on the slot (inferred from the amount going to !Battle_ActPcHitAmount with kind 3, which BattleAct_FlagLethalPcHits checks as damage; probably poison). - verified
BattleSys_Unk895B$C1:895B · 26 B · Battle systemSets up the action block for a kind-2 action (BattleAct_LoaderTable's loader 2; the tech loader, inferred in !Battle_ActId's note) with record A, caster slot 0, no flags and the main-target mask... - verified
BattleSys_ListHandler2$C1:8975 · 68 B · Battle systemTurn list 2: the usual handler, but after its last run it only stops the entry: no status bit is cleared. - verified
BattleSys_ListHandler3$C1:89B9 · 76 B · Battle systemTurn list 3: the usual handler; at the end of its runs it clears bit 7 of the slot's BattlerStats.Unk4C+1 (+$4D). - verified
BattleSys_ListHandler4$C1:8A05 · 76 B · Battle systemTurn list 4: the usual handler; at the end of its runs it clears bit 6 of the slot's BattlerStats.Unk4C+1 (+$4D). - verified
BattleSys_ListHandler5$C1:8A51 · 76 B · Battle systemTurn list 5: the usual handler; at the end of its runs it clears bit 6 of the slot's BattlerStats.Unk4C+2 (+$4E). - verified
BattleSys_ListHandler6$C1:8A9D · 1 B · Battle systemTurn list 6: does nothing (RTS). - verified
BattleSys_ListHandler7$C1:8A9E · 1 B · Battle systemTurn list 7: does nothing (RTS), like list 6. - verified
BattleSys_ListHandler8$C1:8A9F · 113 B · Battle systemTurn list 8: re-arms the entry (flags = 1) with the timer = reload, halved when bit 7 of the slot's BattlerStats.Unk4C+1 or Unk4C+6 (+$4D, +$52) is set, doubled (from the reload, so this wins)... - verified
BattleSys_ListHandler9$C1:8B10 · 169 B · Battle systemTurn list 9: re-arms the entry with the timer halved / doubled as list 8 does, clears the list's !Battle_ListDue bit and counts !Battle_ListRuns down; at 0 (set back to 10), unless the slot is... - verified
BattleSys_ListHandler10$C1:8BB9 · 79 B · Battle systemTurn list 10: the usual handler; at the end of its runs it clears bit 2 of the slot's BattlerStats.Unk4C+2 (+$4E). - verified
BattleSys_ListHandler11$C1:8C08 · 1 B · Battle systemTurn list 11: does nothing (RTS), like lists 6 and 7. - verified
BattleSys_Unk8C09$C1:8C09 · 53 B · Battle systemRuns BattleAi_RunMainPart (probably an enemy's behaviour script: it reads a pointer from the $CC:8B08 table by the id in A) for each enemy entry 0-7 with !Battle_UnkB2B6 0 whose !Battle_UnkAF15... - verified
BattleAi_TestPassed$C1:8C3E · 187 B · Battle engineCalled by a test handler whose test holds (42 JSR sites from $C1:8EA7 to $C1:9803, all in the test handlers): records the test code and runs the block's next action through BattleAi_ChooseTable. - verified
BattleAi_EnemyTurn$C1:8CF9 · 430 B · Battle engineRuns the action an enemy's script chose, on its turn (BattleSys_Unk8461) or as a reaction (!Battle_UnkB2C0 set). - verified
BattleAi_Test00$C1:8EA7 · 4 B · Battle engineTest code $00: always holds (BattleAi_TestPassed at once). - verified
BattleAi_TestHpHalfOrLess$C1:8EAB · 102 B · Battle engineBattleAi_TestTable entry $01. - verified
BattleAi_TestStatusBits$C1:8F11 · 118 B · Battle engineBattleAi_TestTable entry $02. - verified
BattleAi_TestTargetId$C1:8F87 · 83 B · Battle engineBattleAi_TestTable entry $03. - verified
BattleAi_TestEnemyIdPresent$C1:8FDA · 57 B · Battle engineBattleAi_TestTable entry $04.
Bank $C1 · $C1:9000–$9FFF
$C1:9000
Verified · 66
- verified
BattleAi_TestEnemyCountAtMost$C1:9013 · 50 B · Battle engineBattleAi_TestTable entry $05. - verified
BattleAi_TestTimeAtLeast$C1:9045 · 61 B · Battle engineBattleAi_TestTable entry $06. - verified
BattleAi_TestUnkB320$C1:9082 · 60 B · Battle engineBattleAi_TestTable entry $07. - verified
BattleAi_TestHpAtMost$C1:90BE · 114 B · Battle engineBattleAi_TestTable entry $08. - verified
BattleAi_TestStatByteAtLeast$C1:9130 · 94 B · Battle engineBattleAi_TestTable entry $09. - verified
BattleAi_TestStatByteBits$C1:918E · 107 B · Battle engineBattleAi_TestTable entry $0A. - verified
BattleAi_TestStatByteAtMost$C1:91F9 · 100 B · Battle engineBattleAi_TestTable entry $0B. - verified
BattleAi_TestTargetWithin32$C1:925D · 70 B · Battle engineBattleAi_TestTable entry $0C. - verified
BattleAi_TestAnySameRow$C1:92A3 · 113 B · Battle engineBattleAi_TestTable entry $0D. - verified
BattleAi_TestAnyAboveOrLeft$C1:9314 · 121 B · Battle engineBattleAi_TestTable entry $0E. - verified
BattleAi_TestPathClear$C1:938D · 89 B · Battle engineBattleAi_TestTable entry $0F. - verified
BattleAi_TestScreenArea$C1:93E6 · 68 B · Battle engineBattleAi_TestTable entry $10. - verified
BattleAi_TestB19EKind$C1:942A · 74 B · Battle engineBattleAi_TestTable entry $11. - verified
BattleAi_TestB19EKindAndId$C1:9474 · 94 B · Battle engineBattleAi_TestTable entry $12. - verified
BattleAi_TestB19EBit4$C1:94D2 · 66 B · Battle engineBattleAi_TestTable entry $13. - verified
BattleAi_TestB19ESlot$C1:9514 · 134 B · Battle engineBattleAi_TestTable entry $14. - verified
BattleAi_TestB19EByte2Bits$C1:959A · 60 B · Battle engineBattleAi_TestTable entry $15. - verified
BattleAi_TestAlways16$C1:95D6 · 4 B · Battle engineBattleAi_TestTable entry $16: always holds (BattleAi_TestPassed at once), as test $00. - verified
BattleAi_TestChance$C1:95DA · 32 B · Battle engineBattleAi_TestTable entry $17. - verified
BattleAi_TestStatByteEquals$C1:95FA · 88 B · Battle engineBattleAi_TestTable entries $18 and $23-$28. - verified
BattleAi_TestAlways19$C1:9652 · 4 B · Battle engineBattleAi_TestTable entry $19: always holds (BattleAi_TestPassed at once), as test $00. - verified
BattleAi_TestOtherEnemy$C1:9656 · 79 B · Battle engineBattleAi_TestTable entry $1A. - verified
BattleAi_TestPcCountAtMost$C1:96A5 · 47 B · Battle engineBattleAi_TestTable entry $1B. - verified
BattleAi_TestUnkAF0AMatch$C1:96D4 · 84 B · Battle engineBattleAi_TestTable entry $1C. - verified
BattleAi_TestTargetGone$C1:9728 · 52 B · Battle engineBattleAi_TestTable entry $1D. - verified
BattleAi_TestChooseAndGoOn$C1:975C · 9 B · Battle engineBattleAi_TestTable entry $1E: BattleAi_TestPassed (the action is chosen), then !Battle_UnkAF24 = !BattleAi_TestFailed, so the caller still goes on to the next block. - verified
BattleAi_TestTargetWithin48$C1:9765 · 70 B · Battle engineBattleAi_TestTable entry $1F. - verified
BattleAi_TestUnkAEB3Set$C1:97AB · 21 B · Battle engineBattleAi_TestTable entry $20. - verified
BattleAi_TestUnkAF15Set$C1:97C0 · 21 B · Battle engineBattleAi_TestTable entry $21. - verified
BattleAi_TestUnkB158$C1:97D5 · 59 B · Battle engineBattleAi_TestTable entry $22. - verified
BattleAi_ChooseAnimTarget$C1:9810 · 42 B · Battle engineBattleAi_ChooseTable entry $00. - verified
BattleAi_ChooseTarget$C1:983A · 138 B · Battle engineBattleAi_ChooseTable entries $01 and $02. - verified
BattleAi_ChooseNop03$C1:98C4 · 1 B · Battle engineBattleAi_ChooseTable entry $03: does nothing (RTS). - verified
BattleAi_ChooseByChance$C1:98C5 · 155 B · Battle engineBattleAi_ChooseTable entry $04 (!BattleAi_ActRestart). - verified
BattleAi_ChooseNop05$C1:9960 · 1 B · Battle engineBattleAi_ChooseTable entry $05: does nothing (RTS). - verified
BattleAi_ChooseNop06$C1:9961 · 1 B · Battle engineBattleAi_ChooseTable entry $06: does nothing (RTS). - verified
BattleAi_ChooseClear07$C1:9962 · 4 B · Battle engineBattleAi_ChooseTable entry $07: !Battle_UnkAF24 = 0. - verified
BattleAi_ChooseNop08$C1:9966 · 1 B · Battle engineBattleAi_ChooseTable entry $08: does nothing (RTS). - verified
BattleAi_ChooseActId$C1:9967 · 17 B · Battle engineBattleAi_ChooseTable entry $09: !BattleAi_ActId = record byte 1. - verified
BattleAi_ChooseNop0A$C1:9978 · 1 B · Battle engineBattleAi_ChooseTable entry $0A: does nothing (RTS). - verified
BattleAi_ChooseClear0B$C1:9979 · 4 B · Battle engineBattleAi_ChooseTable entry $0B: !Battle_UnkAF24 = 0. - verified
BattleAi_ChooseNop0C$C1:997D · 1 B · Battle engineBattleAi_ChooseTable entry $0C: does nothing (RTS). - verified
BattleAi_ChooseNop0D$C1:997E · 1 B · Battle engineBattleAi_ChooseTable entry $0D: does nothing (RTS). - verified
BattleAi_ChooseNop0E$C1:997F · 1 B · Battle engineBattleAi_ChooseTable entry $0E: does nothing (RTS). - verified
BattleAi_ChooseNop0F$C1:9980 · 1 B · Battle engineBattleAi_ChooseTable entry $0F: does nothing (RTS). - verified
BattleAi_ChooseIfGoneEnemy$C1:9981 · 51 B · Battle engineBattleAi_ChooseTable entries $10 and $16. - verified
BattleAi_ChooseClear11$C1:99B4 · 4 B · Battle engineBattleAi_ChooseTable entries $11-$15: !Battle_UnkAF24 = 0. - verified
BattleAi_RunNothing$C1:99B8 · 6 B · Battle engineBattleAi_RunTable entry $00: !BattleAi_RunMode = !BattleAi_RunNone (the enemy does nothing this turn; choose handler $00 has only set its animation and target). - verified
BattleAi_RunAttack$C1:99BE · 123 B · Battle engineBattleAi_RunTable entry $01. - verified
BattleAi_RunTech$C1:9A39 · 269 B · Battle engineBattleAi_RunTable entry $02. - verified
BattleAi_RunNop03$C1:9B46 · 1 B · Battle engineBattleAi_RunTable entry $03: RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunNop04$C1:9B47 · 1 B · Battle engineBattleAi_RunTable entry $04 (!BattleAi_ActRestart): RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunChooseRepeat$C1:9B48 · 68 B · Battle engineBattleAi_RunTable entry $05. - verified
BattleAi_RunNop06$C1:9B8C · 1 B · Battle engineBattleAi_RunTable entry $06: RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunSwapInEnemy$C1:9B8D · 225 B · Battle engineBattleAi_RunTable entry $07. - verified
BattleAi_RunNop08$C1:9C6E · 1 B · Battle engineBattleAi_RunTable entry $08: RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunLeave$C1:9C6F · 68 B · Battle engineBattleAi_RunTable entry $09. - verified
BattleAi_RunKoSelf$C1:9CB3 · 104 B · Battle engineBattleAi_RunTable entry $0A. - verified
BattleAi_RunSetStatByte$C1:9D1B · 87 B · Battle engineBattleAi_RunTable entry $0B. - verified
BattleAi_RunAddStatByte$C1:9D72 · 92 B · Battle engineBattleAi_RunTable entry $0C. - verified
BattleAi_RunSetFlags$C1:9DCE · 148 B · Battle engineBattleAi_RunTable entry $0D. - verified
BattleAi_RunNop0E$C1:9E62 · 1 B · Battle engineBattleAi_RunTable entry $0E: RTS; !BattleAi_RunMode is left as it was. - verified
BattleAi_RunMessage$C1:9E63 · 21 B · Battle engineBattleAi_RunTable entry $0F. - verified
BattleAi_RunRestoreEnemies$C1:9E78 · 226 B · Battle engineBattleAi_RunTable entry $10. - verified
BattleAi_RunSetStatBytes$C1:9F5A · 120 B · Battle engineBattleAi_RunTable entry $11. - verified
BattleAi_RunSetStatsTech$C1:9FD2 · 380 B · Battle engineBattleAi_RunTable entry $12.
Bank $C1 · $C1:A000–$AFFF
$C1:A000
Verified · 83
- verified
BattleAi_RunAddUnkB158$C1:A14E · 58 B · Battle engineBattleAi_RunTable entry $13. - verified
BattleAi_RunAddStatBytes$C1:A188 · 131 B · Battle engineBattleAi_RunTable entry $14. - verified
BattleAi_RunAddStatsTech$C1:A20B · 395 B · Battle engineBattleAi_RunTable entry $15. - verified
BattleAi_RunRestoreAndSetStats$C1:A396 · 59 B · Battle engineBattleAi_RunTable entry $16. - verified
BattleAi_AddStatByteAtY$C1:A3D1 · 37 B · Battle engineAdds DP $10 to the byte at (DP $0E),Y (a stat-block byte: DP $0E/$0F = the offset, Y = the block address): bit 7 (!BattleAi_StatDeltaSub) set subtracts the low 7 bits, with 0 as the floor; else... - verified
BattleAi_TargetNone$C1:A3F6 · 1 B · Battle engineBattleAi_TargetTable entry $00: returns at once, so the list stays as it was (all $FF) and !BattleAi_TargetCount is not written. - verified
BattleAi_TargetPcs$C1:A3F7 · 26 B · Battle engineBattleAi_TargetTable entry $01: lists PC slots 0-2 whose !Battler_UnkAEFF is not $FF (present), in slot order, from entry 0; !BattleAi_TargetCount = how many (0-3). - verified
BattleAi_TargetAll$C1:A411 · 29 B · Battle engineBattleAi_TargetTable entry $02: the present PCs (BattleAi_TargetPcs), then each enemy slot 3-10 whose !Battler_UnkAEFF is not $FF, appended in slot order; !BattleAi_TargetCount = the total. - verified
BattleAi_TargetSelf$C1:A42E · 15 B · Battle engineBattleAi_TargetTable entry $03: the acting enemy itself, !BattleAi_Targets[0] = !Battle_UnkB252 + 3 (its slot), present or not; !BattleAi_TargetCount = 1. - verified
BattleAi_TargetFromUnkB19E$C1:A43D · 21 B · Battle engineBattleAi_TargetTable entry $04: !BattleAi_Targets[0] = the low nibble of the first byte of the acting enemy's 4-byte !Battle_UnkB19E record (offset !Battle_UnkB252 * 4), taken as a slot without... - verified
BattleAi_TargetRandomPc$C1:A452 · 93 B · Battle engineBattleAi_TargetTable entry $05: one random present PC. - verified
BattleAi_TargetNearestPc$C1:A4AF · 49 B · Battle engineBattleAi_TargetTable entry $06: !BattleAi_TargetCount = 0, then position query !BattlePos_QueryNearestPc (service 5) from the acting enemy (!BattlePos_Subject = !Battle_UnkB252 + 3). - verified
BattleAi_TargetFarthestPc$C1:A4E0 · 40 B · Battle engineBattleAi_TargetTable entry $07: as BattleAi_TargetNearestPc with position query !BattlePos_QueryFarthestPc, but only !BattlePos_Found not negative is checked (no !Battler_UnkAEFF test). - verified
BattleAi_TargetLowestHpPc$C1:A508 · 57 B · Battle engineBattleAi_TargetTable entry $08: the PC with the lowest non-zero BattlerStats.CurHp, meant over PC slots 0-2; presence is not checked. - verified
BattleAi_TargetPcStatus$C1:A541 · 10 B · Battle engineBattleAi_TargetTable entry $09: BattleAi_TargetsByPcByte with DP $0A = PcStatBlk.Status: the present PCs whose Status byte is non-zero (any status), not KO'd, cut to one by BattleAi_PickPcTarget. - verified
BattleAi_TargetPcStatus2$C1:A54B · 10 B · Battle engineBattleAi_TargetTable entry $0A: as BattleAi_TargetPcStatus with PcStatBlk.Status2 (any bit set). - verified
BattleAi_TargetPcUnk1F$C1:A555 · 10 B · Battle engineBattleAi_TargetTable entry $0B: as BattleAi_TargetPcStatus with PcStatBlk.Unk1F (= BattlerStats.Unk4C; any bit set). - verified
BattleAi_TargetPcUnk20$C1:A55F · 10 B · Battle engineBattleAi_TargetTable entry $0C: as BattleAi_TargetPcStatus with PcStatBlk.Unk20 (= BattlerStats.Unk4C+1; any bit set). - verified
BattleAi_TargetPcUnk21$C1:A569 · 10 B · Battle engineBattleAi_TargetTable entry $0D: as BattleAi_TargetPcStatus with PcStatBlk.Unk21 (= BattlerStats.Unk4C+2; any bit set). - verified
BattleAi_TargetPcStatus2Bit1$C1:A573 · 48 B · Battle engineBattleAi_TargetTable entry $0E: the PCs (slots 0-2) whose PcStatBlk.Status2 has bit 1 (!BattleAi_PcByteMask = $02), through BattleAi_AddPcByByte (present, not KO'd, marked by .Unk20), cut to one... - verified
BattleAi_TargetPcStatus2Bit7$C1:A5A3 · 48 B · Battle engineBattleAi_TargetTable entry $0F: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Status2 bit 7 (mask $80). - verified
BattleAi_TargetPcStatus2Bit2$C1:A5D3 · 48 B · Battle engineBattleAi_TargetTable entry $10: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Status2 bit 2 (mask $04). - verified
BattleAi_TargetPcUnk21Bit2$C1:A603 · 48 B · Battle engineBattleAi_TargetTable entry $11: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Unk21 (= BattlerStats.Unk4C+2) bit 2 (mask $04). - verified
BattleAi_TargetPcUnk21Bit6$C1:A633 · 48 B · Battle engineBattleAi_TargetTable entry $12: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Unk21 (= BattlerStats.Unk4C+2) bit 6 (mask $40). - verified
BattleAi_TargetPcUnk20Bit4$C1:A663 · 48 B · Battle engineBattleAi_TargetTable entry $13: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Unk20 (= BattlerStats.Unk4C+1) bit 4 (mask $10). - verified
BattleAi_TargetPcUnk01Bit3$C1:A693 · 48 B · Battle engineBattleAi_TargetTable entry $14: as BattleAi_TargetPcStatus2Bit1 with PcStatBlk.Unk01 (= BattlerStats.Unk2E) bit 3 (mask $08). - verified
BattleAi_TargetOtherEnemies$C1:A6C3 · 42 B · Battle engineBattleAi_TargetTable entry $15: the enemy slots 3-10 whose !Battler_UnkAEFF is not $FF (present), in slot order, leaving out the acting enemy (slot !Battle_UnkB252 + 3, kept in DP $0A/$0B)... - verified
BattleAi_TargetEnemies$C1:A6ED · 28 B · Battle engineBattleAi_TargetTable entry $16: the enemy slots 3-10 whose !Battler_UnkAEFF is not $FF (present), in slot order, the acting enemy included; !BattleAi_TargetCount = how many. - verified
BattleAi_TargetNearestEnemy$C1:A709 · 46 B · Battle engineBattleAi_TargetTable entry $17: position query !BattlePos_QueryNearestEnemy (service 5) from the acting enemy (!BattlePos_Subject = !Battle_UnkB252 + 3). - verified
BattleAi_TargetFarthestEnemy$C1:A737 · 46 B · Battle engineBattleAi_TargetTable entry $18: as BattleAi_TargetNearestEnemy with position query !BattlePos_QueryFarthestEnemy. - verified
BattleAi_TargetLowestHpEnemy$C1:A765 · 68 B · Battle engineBattleAi_TargetTable entry $19: the present enemy (slots 3-10, !Battler_UnkAEFF not $FF) with the lowest non-zero HP (PcStatBlk.CurHp through !BattleRom_PcStatBlock), the acting enemy included... - verified
BattleAi_TargetOtherEnemyStatus$C1:A7A9 · 60 B · Battle engineBattleAi_TargetTable entry $1A: the enemies (slots 3-10, through BattleAi_AddPcByByte: present, not KO'd, marked by .Unk20) whose PcStatBlk.Status byte is non-zero (!BattleAi_PcByteMask =... - verified
BattleAi_TargetEnemyStatus$C1:A7E5 · 52 B · Battle engineBattleAi_TargetTable entry $1B: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status non-zero, self (slot !Battle_UnkB18B) included. - verified
BattleAi_TargetOtherEnemyStatus2$C1:A819 · 60 B · Battle engineBattleAi_TargetTable entry $1C: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 non-zero, leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetEnemyStatus2$C1:A855 · 52 B · Battle engineBattleAi_TargetTable entry $1D: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 non-zero, self (slot !Battle_UnkB18B) included. - verified
BattleAi_TargetOtherEnemyUnk1F$C1:A889 · 60 B · Battle engineBattleAi_TargetTable entry $1E: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Unk1F (= BattlerStats.Unk4C) non-zero, leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetEnemyUnk1F$C1:A8C5 · 52 B · Battle engineBattleAi_TargetTable entry $1F: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Unk1F (= BattlerStats.Unk4C) non-zero, self (slot !Battle_UnkB18B) included. - verified
BattleAi_TargetOtherEnemyStatus2Bit1$C1:A8F9 · 60 B · Battle engineBattleAi_TargetTable entry $20: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 bit 1 (mask $02), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyStatus2Bit7$C1:A935 · 60 B · Battle engineBattleAi_TargetTable entry $21: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 bit 7 (mask $80), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyStatus2Bit2$C1:A971 · 60 B · Battle engineBattleAi_TargetTable entry $22: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status2 bit 2 (mask $04), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyUnk21Bit6$C1:A9AD · 60 B · Battle engineBattleAi_TargetTable entry $23: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Unk21 (= BattlerStats.Unk4C+2) bit 6 (mask $40), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyStatusBit1$C1:A9E9 · 60 B · Battle engineBattleAi_TargetTable entry $24: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Status bit 1 (mask $02), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetOtherEnemyUnk19Bit0$C1:AA25 · 60 B · Battle engineBattleAi_TargetTable entry $25: as BattleAi_TargetOtherEnemyStatus with PcStatBlk.Unk19 (= BattlerStats.Unk46) bit 0 (mask $01), leaving out slot !Battle_UnkB18B. - verified
BattleAi_TargetLowestHpOtherEnemy$C1:AA61 · 74 B · Battle engineBattleAi_TargetTable entry $26: as BattleAi_TargetLowestHpEnemy, but slot !Battle_UnkB18B ("self"; see the BattleAi_TargetTable banner for whose slot it holds in each pass) is left out. - verified
BattleAi_TargetEnemy0$C1:AAAB · 11 B · Battle engineBattleAi_TargetTable entry $27: !BattleAi_Targets[0] = slot 3 (enemy entry 0), present or not; !BattleAi_TargetCount = 1. - verified
BattleAi_TargetEnemy1$C1:AAB6 · 11 B · Battle engineBattleAi_TargetTable entry $28: as BattleAi_TargetEnemy0 with slot 4 (entry 1). - verified
BattleAi_TargetEnemy2$C1:AAC1 · 11 B · Battle engineBattleAi_TargetTable entry $29: as BattleAi_TargetEnemy0 with slot 5 (entry 2). - verified
BattleAi_TargetEnemy3$C1:AACC · 11 B · Battle engineBattleAi_TargetTable entry $2A: as BattleAi_TargetEnemy0 with slot 6 (entry 3). - verified
BattleAi_TargetEnemy4$C1:AAD7 · 11 B · Battle engineBattleAi_TargetTable entry $2B: as BattleAi_TargetEnemy0 with slot 7 (entry 4). - verified
BattleAi_TargetEnemy5$C1:AAE2 · 11 B · Battle engineBattleAi_TargetTable entry $2C: as BattleAi_TargetEnemy0 with slot 8 (entry 5). - verified
BattleAi_TargetEnemy6$C1:AAED · 11 B · Battle engineBattleAi_TargetTable entry $2D: as BattleAi_TargetEnemy0 with slot 9 (entry 6). - verified
BattleAi_TargetEnemy7$C1:AAF8 · 11 B · Battle engineBattleAi_TargetTable entry $2E: as BattleAi_TargetEnemy0 with slot 10 (entry 7). - verified
BattleAi_TargetRandomUnkAF15$C1:AB03 · 75 B · Battle engineBattleAi_TargetTable entry $2F: lists the enemy entries n (0-7) whose !Battle_UnkAF15 byte has bit 7 (!Battle_AF15Bit7; such an enemy is out of the fight, probably: BattleSys_UpdateKo treats it as... - verified
BattleAi_TargetSlot0$C1:AB4E · 11 B · Battle engineBattleAi_TargetTable entry $30: as BattleAi_TargetEnemy0 with slot 0. - verified
BattleAi_TargetSlot1$C1:AB59 · 11 B · Battle engineBattleAi_TargetTable entry $31: as BattleAi_TargetEnemy0 with slot 1. - verified
BattleAi_TargetSlot2$C1:AB64 · 11 B · Battle engineBattleAi_TargetTable entry $32: as BattleAi_TargetEnemy0 with slot 2. - verified
BattleAi_TargetSlot3$C1:AB6F · 11 B · Battle engineBattleAi_TargetTable entry $33: as BattleAi_TargetEnemy0 with slot 3. - verified
BattleAi_TargetSlot4$C1:AB7A · 11 B · Battle engineBattleAi_TargetTable entry $34: as BattleAi_TargetEnemy0 with slot 4. - verified
BattleAi_TargetSlot5$C1:AB85 · 11 B · Battle engineBattleAi_TargetTable entry $35: as BattleAi_TargetEnemy0 with slot 5. - verified
BattleAi_TargetSlot6$C1:AB90 · 11 B · Battle engineBattleAi_TargetTable entry $36: as BattleAi_TargetEnemy0 with slot 6. - verified
BattleAi_TargetHighestHpPc$C1:AB9B · 46 B · Battle engineBattleAi_TargetTable entry $37: the PC (slots 0-2) with the highest BattlerStats.CurHp; presence and KO are not checked. - verified
BattleAi_TargetRandomOtherEnemy$C1:ABC9 · 75 B · Battle engineBattleAi_TargetTable entry $38: lists the present enemy slots 3-10 other than the acting enemy (as BattleAi_TargetOtherEnemies), then, with two or more, Battle_RandRange (0 to count - 1) picks one... - verified
BattleAi_ReadTargets$C1:AC14 · 24 B · Battle engineReads the target code of a script record and fills !BattleAi_Targets: BattleAi_ClearTargets first, then !Battle_UnkB1D2 + 1 and the code at that address. - verified
BattleAi_ReadTargets_Code$C1:AC2C · 19 B · Battle engine - verified
BattleAi_ReadTargets_Done$C1:AC3F · 7 B · Battle engine - verified
BattleAi_ClearTargets$C1:AC46 · 17 B · Battle engineSets the 11 bytes of !BattleAi_Targets and of !Battle_UnkAD8E to $FF (empty). - verified
BattleSys_UnkAC57$C1:AC57 · 7 B · Battle systemBattleSys_UnkBFA4 (it requests service 4, BattleSys_RunAction, which plays the action block), then BattleSys_UnkAC85. - verified
BattleSys_UnkAC5E$C1:AC5E · 39 B · Battle systemIf !Battle_UnkAEB2 is set: !Battle_UnkAE85[n] = 1 for each enemy n (0-7) whose !Battle_UnkAEB3 entry is non-zero, then, unless !Battle_Unk2989 has bit 5, service !BattleSys_ServiceUnk6... - verified
BattleSys_UnkAC85$C1:AC85 · 4 B · Battle systemCalls Battle_ApplyHits. - verified
BattleAi_SetCmdBits$C1:AC89 · 69 B · Battle engineORs the slot A + 3 (an enemy entry + 3) into !Battle_UnkB18E and zeroes !Battle_UnkB191, then by !BattleAi_ActCode: 0: !Battle_UnkB18F = 0; 1: !Battle_UnkB18E |= $80, !Battle_UnkB18F = 0... - verified
BattleAi_ArgToDp0E$C1:ACCE · 36 B · Battle engineDP $0E = !BattleAi_ActArg mapped: 1 and 2 give 4, 3 and 4 give $0D, any other value stays as it is. - verified
BattleAi_FillActBlock$C1:ACF2 · 23 B · Battle engineStarts the action block for the acting battler: !Battle_UnkAE90 = 0, !Battle_ActCaster = !Battle_UnkB18B, !Battle_ActKind = !BattleAi_ActCode, !Battle_ActId = !BattleAi_ActId. - verified
BattleAi_SetMainMask$C1:AD09 · 44 B · Battle engine!Battle_ActMainMask = 0, then, if !BattleAi_TargetCount is non-zero and !BattleAi_Targets[0] is a slot (not $FF), the bit of that slot (!BattleAi_MaskSlot0 >> slot, bit 15 = slot 0) is ORed in. - verified
BattleAi_SetTargetMask$C1:AD35 · 51 B · Battle engine!Battle_ActTargetMask = the bits of !BattleAi_Targets entries 1 to !BattleAi_TargetCount - 1 (entry 0 is the main target, see BattleAi_SetMainMask; !BattleAi_MaskSlot0 >> slot, bit 15 = slot 0). - verified
BattleAi_TargetsByPcByte$C1:AD68 · 57 B · Battle engineLists each present, not KO'd PC whose stat-block byte at offset DP $0A (from !BattleRom_PcStatBlock) is non-zero, through BattleAi_AddPcByByte for PCs 0, 1, 2 with !BattleAi_PcByteMask = $FF, then... - verified
BattleAi_PickPcTarget$C1:ADA1 · 128 B · Battle engineCuts a list built by BattleAi_AddPcByByte down to one target: - !BattleAi_TargetCount 0: nothing. - verified
BattleAi_PickMarkedTarget$C1:AE21 · 79 B · Battle engineAfter a test has marked the entries of !BattleAi_Targets it accepts (!BattleAi_TargetMarked), cuts the list down to one target: - !BattleAi_TargetCount 0: the test fails (!Battle_UnkAF24 + 1). - verified
BattleAi_AddPcByByte$C1:AE70 · 99 B · Battle engineAdds PC slot !BattleAi_PcSlot to !BattleAi_Targets when it is present (!Battler_UnkAEFF not $FF), the byte at offset DP $0A in its stat block (address from !BattleRom_PcStatBlock[X]) has any of... - verified
BattleAi_UnkAED3$C1:AED3 · 42 B · Battle engineNo caller found (no JSR, JSL or pointer to $AED3 in the ROM; maybe dead). - verified
BattleAi_NoteFirstTest$C1:AEFD · 37 B · Battle engineRun by a test handler that holds, just before BattleAi_TestPassed: - !Battle_UnkB1CF has !BattleAi_SecondTest (this is the first of a block's two tests): !BattleAi_FirstTarget = the slot (low... - verified
Battle_RandRange$C1:AF22 · 87 B · Battle engineA random number from the low bound X (low byte) up to, but not including, the high bound A: low + (RandomTableFD[!Battle_RandIdx] mod (high - low)), then !Battle_RandIdx + 1. - verified
Battle_RandRangeAlt$C1:AF79 · 89 B · Battle engineBattle_RandRange with its own index: the same code, but the entry of RandomTableFD is taken at !Battle_UnkB3E6 (not !Battle_RandIdx), and !Battle_UnkB3E6 is the counter stepped. - verified
BattleAi_RunMainPart$C1:AFD2 · 193 B · Battle engineRuns the main part of an enemy's script: block after block until one holds or the part ends.
Bank $C1 · $C1:B000–$BFFF
$C1:B000
Verified · 36
- verified
BattleSys_UnkB093$C1:B093 · 35 B · Battle systemBattlerStats.Unk2F bit 0 = (.CurHp <= .MaxHp / 8): set when the HP is down to an eighth or less, cleared otherwise (the bit Battle_PickStatusAnim tests, so probably the low-HP pose). - verified
BattleSys_UnkB0B6$C1:B0B6 · 365 B · Battle systemSets which turn lists battler Y takes part in from its status bits: bit 0 (!Battle_ListPartBit) of its !Battle_ListFlags byte in list n = Status2 bit 7 (list 0), bit 6 (1), bit 5 (2), bit 4 (8)... - verified
BattleSys_UnkB223$C1:B223 · 86 B · Battle systemBattleSys_UpdateKo for each slot 0-10 (counter !Battle_UnkB2D3); after it, an enemy slot whose entry is empty ($FF) and whose !Enemy_TargetWanted slot is empty too gets !Battle_UnkB242 = $FF and... - verified
BattleSys_UpdateKo$C1:B279 · 322 B · Battle systemThe KO check of battler Y. - verified
BattleSys_UnkB3BB$C1:B3BB · 23 B · Battle systemKeeps only bit 6 (!FieldBtl_ObjKind6Flag) of the 8 FieldBtlObj.Flags bytes, so after the battle FieldBtl_RestoreObj removes every saved field object (Flags 0) except those with that bit. - verified
BattleSys_UnkB3D2$C1:B3D2 · 39 B · Battle systemFor each enemy entry n (0-7) still present (!Battler_UnkAF0A not $FF) without !Battle_UnkAF15 bit 7: FieldBtlObj[n].Flags = $40 (only !FieldBtl_ObjKind6Flag), so FieldBtl_RestoreObj puts that... - verified
BattleSys_UnkB3F9$C1:B3F9 · 73 B · Battle systemDrops the latched command of PC X when the PC cannot act: KO'd (Status bit 7), BattlerStats.Unk4C+2 | +7 bit 7, or Status2 bits 7, 2 or 1 (!Battle_NoActMask2). - verified
BattleSys_UnkB442$C1:B442 · 70 B · Battle systemCopies each PC's 80-byte block from its BattlerStats record (.Unk2D on, the !BattleRom_PcStatBlock bytes) back to its character's record in !Menu_CharRecords ($50 bytes per !Pc_CharId); slots... - verified
BattleAi_FindReactPart$C1:B488 · 34 B · Battle engineFinds the reaction part of an enemy's script: the script is !BattleRom_AiScriptPtrs[id], BattleAi_PickScript may swap in a fixed one, and from there it skips to the byte after the first $FF (the... - verified
BattleAi_PickScript$C1:B4AA · 63 B · Battle engine!Battle_UnkB1D2 = X, the enemy's own script address, unless the BattlerStats record of the enemy (slot !Battle_UnkB252 + 3) says otherwise: - .Unk4C+2 or .Unk4C+7 has bit 7 (!BattleAi_Unk4CBit7)... - verified
BattleSys_UnkB4E9$C1:B4E9 · 140 B · Battle systemPuts the battle's item list back into the inventory (probably what !Battle_InvIds / InvCounts are): first BattleSys_RefundItem for PCs 0, 1, 2; then for each of the 256 Item_BattleList records... - verified
BattleSys_UnkB575$C1:B575 · 348 B · Battle systemBuilds !Battle_CmdGroups from the three BattleCmd.Partners bytes (row p holds p and each other PC named in p's nibbles, $FF elsewhere; a nibble naming p itself, $F or any other value adds... - verified
BattleSys_RefundItem$C1:B6D1 · 61 B · Battle systemIf the BattleCmd.Kind of PC DP $14 has bit 6 (an item command still pending), clears the bit and gives the item back: the first Item_BattleList record (of 256) whose .Id is the command's .ActionId... - verified
BattleSys_UnkB70E$C1:B70E · 23 B · Battle systemFor the !Battle_Unk2989 bit-5 battle: all three PCs latched and queued at once: !Battle_UnkB188-B18A = $81 (bit 7 | 1), each BattleCmd.State = $41 (bit 6, "queued", | 1). - verified
BattleSys_UnkB725$C1:B725 · 61 B · Battle systemFor the !Battle_Unk2989 bit-5 battle: !Battle_CmdQueue[0] = PC 0, !Battle_CmdQueueLen = 1, each !Pc_AtbCur = 0 and !Pc_AtbMax = $30, and the three BattleCmd records (21 bytes) are copied from bank... - verified
BattleSys_UnkB762$C1:B762 · 144 B · Battle systemKeeps the 8 !Battle_UnkAEB3 bytes in !Battle_UnkAE65 and zeroes them and !Battle_UnkAEB2, then for each of the 8 entries of !Battle_UnkB3AC (the slots of the last action, per BattleSys_Unk8461)... - verified
BattleSys_UnkB7F2$C1:B7F2 · 27 B · Battle systemService !BattleSys_ServiceRemoveReady (BattleMenu_RemoveBattlerFromReady) for PC slots 0, 1 and 2 in turn: takes every PC out of the menu's ready state. - verified
BattleAi_TestTable$C1:B80D · 82 B · Battle engineHandlers of the script's test codes $00-$28, by code * 2: JSR (T,X) in BattleAi_RunMainPart ($C1:B006, $C1:B021) and BattleSys_Unk8461 ($C1:874E, $C1:8769). - verified
BattleAi_ChooseTable$C1:B85F · 46 B · Battle engineHandlers of the action codes $00-$16 as a block is chosen, by code * 2: JSR (T,X) in BattleAi_TestPassed ($C1:8CE7). - verified
BattleAi_RunTable$C1:B88D · 46 B · Battle engineHandlers of the same action codes $00-$16 on the enemy's turn, by code * 2: JSR (T,X) in BattleAi_EnemyTurn ($C1:8D88). - verified
BattleAi_TargetTable$C1:B8BB · 114 B · Battle engineHandlers of the script's target codes $00-$38, by code * 2: JSR (T,X) in BattleAi_ReadTargets ($C1:AC2E). - verified
BattleSys_ListHandlerTable$C1:B92D · 26 B · Battle systemHandler of each turn list, indexed by list number * 2: BattleSys_Main runs entry n (JSR (T,X) at $C1:8333) for each list whose !Battle_ListDue bit is set. - verified
BattleSys_ListOffsetTable$C1:B947 · 26 B · Battle systemAddress of each turn list's !Battle_ListFlags bytes (list * 11 past the start), indexed by list number * 2; BattleSys_Main's scan reads it with LDA.l at $C1:82C5. - verified
BattleSys_RemoveReadyLong$C1:B961 · 6 B · Battle systemService !BattleSys_ServiceRemoveReady (BattleMenu_RemoveBattlerFromReady) for bank-$FD code: a long-callable wrapper. - verified
BattleSys_UnkB967$C1:B967 · 761 B · Battle systemRuns a PC's committed command. - verified
BattleSys_UnkBC60$C1:BC60 · 129 B · Battle systemDoes nothing: its first instruction branches to its RTS, so the rest ($C1:BC62-$BCDF) is dead. - verified
BattleSys_UnkBCE1$C1:BCE1 · 23 B · Battle systemEnds a PC's turn: reloads the gauge of the PC !Battle_UnkB18B (!Battler_UnkAFAB = !Battle_UnkB158, then BattleSys_UnkBD6F), sets its turn-list-12 byte to 1 if it was non-zero (re-armed, not due). - verified
BattleSys_UnkBCE1_ClearRecords$C1:BCF8 · 115 B · Battle system - verified
BattleSys_UnkBCE1_Done$C1:BD6B · 4 B · Battle system - verified
BattleSys_UnkBD6F$C1:BD6F · 68 B · Battle systemApplies the battler's speed bits to its !Battler_UnkAFAB (the gauge reload): halved when BattlerStats.Unk4C+1 or +6 has bit 7 (!Battle_ListHalveBit), then doubled, at most $FF, when .Status2 has... - verified
BattleSys_ResetTechUsers$C1:BDB3 · 403 B · Battle systemAfter a tech (BattleSys_UnkB967's tech path, played or skipped): clears the BattleCmd record of the first user's slot (.State, .Kind, .Menu, .Target, .ActionId = 0; slot = !Battle_UnkB1BE of... - verified
BattleSys_UnkBF46$C1:BF46 · 51 B · Battle systemBy byte 0 of record !Battle_UnkB18C of !BattleRom_UnkCC05CC (4 B each): bit 7 -> BattleSys_Effect29, else bit 2 -> BattleSys_Effect2A, else bit 6 -> BattleSys_Effect2B, else nothing. - verified
BattleSys_UnkBF79$C1:BF79 · 8 B · Battle system!Battle_UnkAF23 = 0, then BattleSys_RunTechParts (which adds 1 to it when a PC's attack-kind part finds no enemy). - verified
BattleSys_UnkBF81$C1:BF81 · 35 B · Battle systemCopies the 17 bytes of record !Battle_UnkB18C of !BattleRom_UnkCC213F to !Battle_UnkAEE6. - verified
BattleSys_UnkBFA4$C1:BFA4 · 6 B · Battle systemService !BattleSys_ServiceRunAction (BattleSys_RunAction), which plays the action block. - verified
BattleSys_RunPcAttack$C1:BFAA · 128 B · Battle systemPlays the attack of battler !Battle_UnkB18B on the slot in !Battle_UnkAD8E: !Battle_UnkB1FC bit 1 is set over it; the action block is cleared (id, flags, both masks, !Battle_ActUnkAE9B = 0...
Bank $C1 · $C1:C000–$CFFF
$C1:C000
Verified · 34
- verified
Battle_ScaleByte20$C1:C02A · 57 B · Battle engineDP $30/$31 = about x / 5: x * 64 - x * 8 - x * 4 - x / 2 - x / 4 (= x * 51.25), / 256. - verified
Battle_ScaleByte30$C1:C063 · 55 B · Battle engineDP $30/$31 = about x * 3 / 10: x * 128 - x * 32 - x * 16 - x * 2 - x (= x * 77), / 256. - verified
Battle_ScaleByte60$C1:C09A · 66 B · Battle engineDP $30/$31 = about x * 3 / 5: x * 256 - x * 64 - x * 32 - x * 4 - x * 2 - x / 4 (= x * 153.75), / 256. - verified
Battle_ScaleWord60$C1:C0DC · 61 B · Battle engineDP $30/$31 = about x * 3 / 5: x - x / 4 - x / 8 - x / 64 - x / 128 - x / 1024, all 16 bits. - verified
Battle_ScaleByte80$C1:C119 · 55 B · Battle engineDP $30/$31 = about x * 4 / 5: x * 256 - x * 32 - x * 16 - x * 2 - x (= x * 205), / 256. - verified
Battle_ScaleWord80$C1:C150 · 50 B · Battle engineDP $30/$31 = about x * 4 / 5: x - x / 8 - x / 16 - x / 128 - x / 256, all 16 bits. - verified
Battle_ScaleByte10$C1:C182 · 48 B · Battle engineDP $30/$31 = about x / 10: x * 32 - x * 4 - x * 2 - x / 4 (= x * 25.75), / 256. - verified
Battle_ScaleWord10$C1:C1B2 · 43 B · Battle engineDP $30/$31 = about x / 10: x / 8 - x / 64 - x / 128 - x / 1024, all 16 bits. - verified
BattleSys_UnkC1DD$C1:C1DD · 1,818 B · Battle systemChecks that the users of the action !Battle_UnkB18C (a tech, an item, or an enemy's action) can act and resolves its targets into !Battle_UnkAD8E (slots, $FF-ended) and !Battle_UnkAD8D (their count). - verified
BattleSys_MapEmptyTarget$C1:C8F7 · 20 B · Battle systemA battler slot for a target: $FF stays $FF; a slot whose !Battler_UnkAEFF entry is present comes back as it is; an empty one comes back as its !Battle_UnkAE6D entry (BattleFD_UnkB223 fills that... - verified
Battle_Mul16$C1:C90B · 31 B · Battle engine16 x 16 -> 32-bit unsigned shift-and-add multiply: !Battle_MathHi:MathLo = !Battle_MathA * !Battle_MathB. - verified
Battle_Div32$C1:C92A · 50 B · Battle engine32 / 16-bit unsigned restoring divide of !Battle_MathHi:MathA by !Battle_MathB: !Battle_MathRem = the remainder, !Battle_MathLo = the quotient's low word. - verified
BattleSys_AreaParamTable$C1:C95C · 14 B · Battle systemThe area parameter routines of BattleSys_UnkC1DD, by bits 6-0 of an area record entry's byte 1 (JSR (BattleSys_AreaParamTable,X) at $C1:C732). - verified
BattleSys_UnkC96A$C1:C96A · 176 B · Battle systemSingle techs of PC DP $06: for each tech id from !BattleRom_CharFirstTech[character] up to the next character's first (8 techs), whose bit in !Battle_TechBits1[character] is set (bit 7 first)... - verified
BattleSys_UnkCA1A$C1:CA1A · 302 B · Battle systemDouble techs of PC DP $06: for each tech $39-$65 whose bit in !Battle_TechBits2 is set (3 techs per byte, bit 7 first), whose two users are both in the party (!Battle_UnkB1BE not negative) and one... - verified
BattleSys_TechMpCost1$C1:CB48 · 25 B · Battle systemA = the MP cost of the first user's part of tech A: !BattleRom_TechMpCost[BattleRom_TechRec[A].Part1 & $7F]. - verified
BattleSys_TechMpCost2$C1:CB61 · 25 B · Battle systemAs BattleSys_TechMpCost1, for the second user (.Part2). - verified
BattleSys_TechMpCost3$C1:CB7A · 25 B · Battle systemAs BattleSys_TechMpCost1, for the third user (.Part3). - verified
BattleSys_LoadTechUsers$C1:CB93 · 48 B · Battle system!Battle_TechUsers = the three character ids of the user set of tech A (BattleRom_TechRec[A].UserSet & $7F, 3 bytes each in !BattleRom_TechUserSets; $FF = no user). - verified
BattleSys_StoreMpCost$C1:CBC3 · 51 B · Battle systemY = the cost Y as BattleSys_AdjustMpCost cuts it for the PC of character id A (slot !Battle_UnkB1BE[A], its !Pc_UnkB3BA), stored to the tech menu entry at the address in DP $04: .MpCost0 for slot... - verified
BattleSys_AdjustMpCost$C1:CBF6 · 21 B · Battle systemCuts the MP cost in Y's low byte by A, the PC's !Pc_UnkB3BA: $A2 halves it, $A3 quarters it (each halving rounds up); any other value leaves it. - verified
BattleSys_StoreMpCost10$C1:CC0B · 51 B · Battle systemAs BattleSys_StoreMpCost, into the entry 10 records past the address in DP $04 (TechMenuRec[10]). - verified
BattleSys_StoreMpCost18$C1:CC3E · 51 B · Battle systemAs BattleSys_StoreMpCost, into the entry 18 records past the address in DP $04 (TechMenuRec[18]). - verified
BattleSys_PayTechMp$C1:CC71 · 90 B · Battle systemTakes cost Y, cut by BattleSys_AdjustMpCost, off BattlerStats.CurMp of the PC with character id A (slot !Battle_UnkB1BE[A]: 0, 1, any other value as 2). - verified
BattleSys_UnkCCCB$C1:CCCB · 308 B · Battle systemTriple tech of PC DP $06: the first tech $66-$74 whose bit in !Battle_TechBits3 is set (one tech per byte, bit 7) and whose three users are all in the party gets entry 18 (TechMenuRec[18]): tech... - verified
BattleSys_UnkCDFF$C1:CDFF · 55 B · Battle systemBuilds the battle's item list: zeroes the 256 Item_BattleList records ($500 bytes), then walks the inventory from entry DP $00 = 0: an empty entry (!Battle_InvIds 0) goes to... - verified
BattleSys_UnkCE36$C1:CE36 · 4 B · Battle systemBattleFD_UnkAEF2, then falls into BattleSys_UnkCE3A. - verified
BattleSys_UnkCE3A$C1:CE3A · 219 B · Battle systemSets up the stat block (!BattleRom_PcStatBlock) of PC DP $02, if the slot has an entry: .Unk0B-.Unk11 are copied to .Unk36-.Unk3C, then for each of three records in bank $CC, 6 bytes each, DP $08... - verified
BattleSys_UnkCF15$C1:CF15 · 61 B · Battle systemFor each PC slot 0-2 (present or not), with Y = its stat block address (!BattleRom_PcStatBlock): BattleFD_ItemRecOffset with A = the block's byte at offset DP $06 (LDA (DP $06),Y), then DP $0A... - verified
BattleSys_UnkCF52$C1:CF52 · 23 B · Battle systemX = (B : DP $06) * 4 (16-bit), A = 0: it loads DP $06 into A (the incoming A is not used), tests it for $29, but both branches do the same (REP, ASL, ASL, CLC), so the test has no effect. - verified
BattleSys_UnkCF69$C1:CF69 · 85 B · Battle systemAdds a record's bonus to the stat block at DP $00: byte 5 of the bank-$CC record at offset DP $08 (!BattleRom_EquipBonus); if it is not 0, its low nibble is added to PcStatBlk.Unk3F, .Unk40... - verified
BattleAi_EnemyTurnJsr$C1:CFBE · 4 B · Battle engineBattleAi_EnemyTurn through a JSR of its own. - verified
BankC1_RunService$C1:CFC2 · 39 B · EngineSaves P, X (16-bit), DP and DB, sets DB=$7E and DP=0, and runs entry A (low byte) of BankC1_ServiceTable with M=1, X=0, A = 0 (B too) and Y as it came; then pulls DB, DP, X and P back and returns... - verified
BankC1_FindItem$C1:CFE9 · 28 B · EngineService 0 (!BankC1Svc_FindItem): A = the item id Y when an !Battle_InvIds entry holds it (X = its index), else 0.
Bank $C1 · $C1:D000–$DFFF
$C1:D000
Verified · 47
- verified
BankC1_AddItem$C1:D005 · 81 B · EngineService 1 (!BankC1Svc_AddItem): one more of item Y. - verified
BankC1_RemoveItem$C1:D056 · 48 B · EngineService 2 (!BankC1Svc_RemoveItem): one fewer of item Y. - verified
BankC1_HasGold$C1:D086 · 28 B · EngineService 3 (!BankC1Svc_HasGold): A = $FF when the gold is at least Y (its low word not below Y, or its high byte not 0) or Y = 0, else 0. - verified
BankC1_AddGold$C1:D0A2 · 75 B · EngineService 4 (!BankC1Svc_AddGold): adds Y to the 24-bit gold. - verified
BankC1_RemoveGold$C1:D0ED · 57 B · EngineService 5 (!BankC1Svc_RemoveGold): takes Y off the 24-bit gold. - verified
BankC1_ServiceTable$C1:D126 · 12 B · EngineBankC1_RunService's services, by its A (JSR (BankC1_ServiceTable,X) at $C1:CFE1). - verified
BattleSys_EffRecArgsUnk66$C1:D132 · 29 B · Battle systemDP $16 = the caster's BattlerStats.Unk66 (!Battle_UnkB1F4), DP $18 = effect byte 1 & $1F, DP $1A = effect byte 2 (DP $17/$19/$1B = 0). - verified
BattleSys_EffRecArgs12$C1:D14F · 17 B · Battle systemDP $16 = effect byte 1, DP $18 = effect byte 2 (DP $17/$19 = 0). - verified
BattleSys_EffRecArg10Unk46$C1:D160 · 20 B · Battle systemDP $16 = effect byte 10, DP $18 = the target's BattlerStats.Unk46 (!Battle_UnkB1F6) (DP $17/$19 = 0). - verified
BattleSys_EffRecStatPair$C1:D174 · 44 B · Battle systemTwo stat bytes picked by the effect record: DP $16 = the caster's BattlerStats byte at .Unk2D + effect byte 3, DP $18 = the target's at .Unk2D + effect byte 4 (DP $17/$19 = 0). - verified
BattleSys_EffRecArgs12B$C1:D1A0 · 4 B · Battle systemBattleSys_EffRecArgs12 through a JSR of its own. - verified
BattleSys_EffRecArgs56$C1:D1A4 · 17 B · Battle systemDP $16 = effect byte 5 (!Battle_UnkAEEB), DP $18 = effect byte 6 (DP $17/$19 = 0). - verified
BattleSys_EffRecArg11$C1:D1B5 · 6 B · Battle systemDP $1A = effect byte 11 (8-bit; DP $1B left alone): the bits BattleSys_RecordMiss reads. - verified
BattleSys_CasterUnk73$C1:D1BB · 20 B · Battle systemDP $20 = the caster's BattlerStats.Unk73, DP $1E = its .Unk74 (DP $1F/$21 = 0). - verified
BattleSys_EffRecArgs12C$C1:D1CF · 4 B · Battle systemBattleSys_EffRecArgs12 through a JSR of its own, as BattleSys_EffRecArgs12B (two identical unreferenced copies). - verified
BattleSys_LoadEffectArgs$C1:D1D3 · 38 B · Battle systemFrom the !BattleRom_UnkCC05CC record of !Battle_UnkB18C: DP $16 = byte 3 & $3F, DP $18 = byte 2 & $0F, DP $1A = byte 1 (each 16-bit, high byte 0): BattleSys_RestoreHpMp's amount base, factor and bits. - verified
BattleSys_LoadEffectArg3$C1:D1F9 · 17 B · Battle systemDP $16 = byte 3 of the !BattleRom_UnkCC05CC record of !Battle_UnkB18C, all of it (16-bit, high byte 0). - verified
BattleSys_LoadEffectArgs12$C1:D20A · 23 B · Battle systemDP $16 = byte 1 and DP $18 = byte 2 of the !BattleRom_UnkCC05CC record of !Battle_UnkB18C, whole. - verified
BattleSys_Effect00$C1:D221 · 29 B · Battle systemEffect type 0: BattleSys_LoadCasterStats, then per target BattleSys_LoadTargetStats, BattleSys_EffRecArgsUnk66, BattleSys_RestoreHpMp, BattleSys_StoreTargetCmd; then !Battle_UnkB200 = 0. - verified
BattleSys_Effect01$C1:D23E · 41 B · Battle systemEffect type 1: as BattleSys_Effect00, but per target BattleSys_EffRecArgs12 and BattleSys_CureStatus, and when bit 6 of effect byte 1 (DP $16) is set also BattleSys_EffRecArgsUnk66 and... - verified
BattleSys_Effect02$C1:D267 · 119 B · Battle systemEffect type 2, per target: unless !Battle_UnkAE4D has !Battle_AE4DBit5, a percentage roll: the chance is effect byte 5 + the caster's BattlerStats.Unk66 / effect byte 6 (Battle_Div32, 8-bit sum)... - verified
BattleSys_Effect03$C1:D2DE · 146 B · Battle systemEffect type 3, per target: - unless !Battle_UnkAE4D has !Battle_AE4DBit4: BattleSys_EffRecArg10Unk46 and BattleSys_TestEnemyUnk46; DP $16 non-zero = a miss (BattleSys_EffRecArg11, DP $1C = 1... - verified
BattleSys_Effect04$C1:D370 · 1 B · Battle systemEffect type 4: does nothing. - verified
BattleSys_Effect05$C1:D371 · 78 B · Battle systemEffect type 5: DP $20 = effect byte 1 (not read here nor by BattleSys_DrainHpMp), BattleSys_LoadCasterStats; per target: BattleSys_LoadTargetStats, DP $1E = effect byte 1, !Battle_UnkAD9B = 0... - verified
BattleSys_Effect06$C1:D3BF · 53 B · Battle systemEffect type 6, for the last target only: BattleSys_LoadCasterStats, BattleSys_LoadTargetStats, BattleSys_EffRecArgs12, BattleSys_StealItem; DP $16 = $FE after it = a miss (BattleSys_EffRecArg11... - verified
BattleSys_Effect07$C1:D3F4 · 61 B · Battle systemEffect type 7: BattleSys_Effect00, then the caster's BattlerStats.CurHp goes into !Battle_UnkAD89 and is recorded as a hit on the caster (Battle_RecordHit, Y = !Battle_UnkB18B, !Battle_UnkB202 =... - verified
BattleSys_Effect08$C1:D431 · 94 B · Battle systemEffect type 8: BattleSys_Effect03 run effect byte 1 times (!Battle_UnkB2D0 counts down; 0 would mean 256), each time with !Battle_UnkAD8D put back to the count it came with (!Battle_UnkB2ED) and... - verified
BattleSys_EffectNone$C1:D48F · 1 B · Battle systemEffect types $09-$28 of BattleSys_EffectTable: does nothing. - verified
BattleSys_Effect29$C1:D490 · 29 B · Battle systemEffect type $29; also an item whose !BattleRom_UnkCC05CC byte 0 has bit 7 (BattleSys_UnkBF46). - verified
BattleSys_Effect2A$C1:D4AD · 41 B · Battle systemEffect type $2A; also an item whose !BattleRom_UnkCC05CC byte 0 has bit 2 (and not bit 7). - verified
BattleSys_Effect2B$C1:D4D6 · 29 B · Battle systemEffect type $2B; also an item whose !BattleRom_UnkCC05CC byte 0 has bit 6 (and not bits 7 or 2). - verified
BattleSys_Effect2C$C1:D4F3 · 21 B · Battle systemEffect type $2C: clears bit 6 (!Battle_StatusBit6) of the BattlerStats.Status of the last target only (BattleSys_LoadTargetStats), and !Battle_UnkB200 = 0. - verified
BattleSys_StoreTargetCmd$C1:D508 · 27 B · Battle systemCopies the four bytes !Battle_UnkB18E-!Battle_UnkB191 (the action's command bytes, see !Battle_UnkB18E) into the !Battle_UnkB192 record of the current target, !Battle_UnkAD8E[!Battle_UnkAD8D - 1]. - verified
BattleSys_RunTechParts$C1:D523 · 556 B · Battle systemRuns the parts of tech !Battle_UnkB18C (on the attack path the !BattleRom_PcAttackNum number) for its users. - verified
BattleSys_CheckTechMp$C1:D74F · 117 B · Battle systemWhether every user of tech !Battle_UnkB18C (!Battle_TechUsers, as loaded) can take part: for each of users 0-2 (!Battle_UnkB2D0 the index; a $FF id is skipped and the loop goes on), the user's... - verified
BattleSys_UnkD7C4$C1:D7C4 · 269 B · Battle systemAn enemy's action for action code 2 (BattleAi_EnemyTurn): the enemy counterpart of BattleSys_RunTechParts with one part. - verified
BattleSys_UnkD8D1$C1:D8D1 · 262 B · Battle systemAn enemy's action for the action codes other than 2: BattleSys_UnkD7C4 with the records at !BattleRom_UnkCC88CB (the ones BattleFD_LoadUnkB18E2 reads) and the effect records at... - verified
BattleSys_EffectTable$C1:D9D7 · 90 B · Battle systemThe effect routines by effect type (byte 0 of the effect record in !Battle_UnkAEE6), called with JSR (BattleSys_EffectTable,X) by BattleSys_RunTechParts ($C1:D704), BattleSys_UnkD7C4 ($C1:D893)... - verified
BattleSys_TechMpCostTable$C1:DA31 · 6 B · Battle systemThe MP cost routine of each user (0-2) of a tech, called by BattleSys_CheckTechMp with JSR (BattleSys_TechMpCostTable,X) at $C1:D783. - verified
BattleSys_RestoreHpMp$C1:DA37 · 295 B · Battle systemRestores the current target's HP and/or MP, by the bits of DP $1A: - bit 7 (!Battle_RestoreHpBit), HP: the amount is DP $16 * DP $18 (Battle_Mul16), plus a random 0 .. - verified
BattleSys_CureStatus$C1:DB5E · 76 B · Battle systemClears the current target's statuses: .Status keeps only bits 7-6 (bit 7, KO, is cleared first when DP $16 has bit 7, !Battle_CureKoBit), .Status2 is cleared (with an AND #0), and .Unk4C keeps... - verified
BattleSys_SetStatus$C1:DBAA · 186 B · Battle systemSets the status bits DP $18 in status byte DP $16 of the current target (BattlerStats.Status + DP $16): - DP $16 = $FF (!Battle_StatusIdxNone): nothing; DP $16 stays $FF. - verified
BattleSys_RollHit$C1:DC64 · 73 B · Battle systemThe hit roll of BattleSys_Effect03: with DP $16 = the caster's stat and DP $18 = the target's (BattleSys_EffRecStatPair, then BattleSys_AdjustHit and BattleSys_AdjustEvade), the chance is DP $16 *... - verified
BattleSys_ApplyDamage$C1:DCAD · 474 B · Battle systemApplies BattleSys_Effect03's damage to the current target: - the target's .Status2 bits 1-2 (!Battle_Status2Bits12) are cleared; - !Battle_UnkAD89 = (256 - DP $18) * DP $16 / 256 (DP $16 the... - verified
BattleSys_TestEnemyUnk46$C1:DE87 · 23 B · Battle systemBattleSys_Effect03's first test: DP $16 = 1 when the target is an enemy (slot 3 or more) and DP $16 (effect byte 10) has a bit in common with DP $18 (its BattlerStats.Unk46... - verified
BattleSys_AdjustHit$C1:DE9E · 82 B · Battle systemLowers the caster's value for BattleSys_RollHit (DP $16, from BattleSys_EffRecStatPair) by the caster's .Status2: bits 0 or 2 (!Battle_Status2Bits02) make it DP $16 * 5 / 20 + 1, else bit 6... - verified
BattleSys_AdjustEvade$C1:DEF0 · 278 B · Battle systemChanges the target's value for BattleSys_RollHit (DP $18, from BattleSys_EffRecStatPair) by its statuses, the first that applies: - .Unk4C+1 | .Unk4C+6 bit 6 (!Battle_List4StatusBit): DP $18 * 5 /...
Bank $C1 · $C1:E000–$EFFF
$C1:E000
Verified · 37
- verified
BattleSys_ArmStatusList$C1:E006 · 239 B · Battle systemStarts the turn list that times a status bit BattleSys_SetStatus has just set in byte DP $16 of the target !Battle_UnkB1FD: for the first of these bits in DP $18 the list's !Battle_ListTimers... - verified
BattleSys_CalcDamage$C1:E0F5 · 1,350 B · Battle systemBattleSys_Effect03's damage, by the formula kind DP $16 (effect byte 5, BattleSys_EffRecArgs56). - verified
BattleSys_WakeTarget$C1:E63B · 36 B · Battle systemWhen the current target's .Status2 has bit 1 or 2 (!Battle_Status2Bits12), clears them and restarts its turn: its turn-list-12 flags = !Battle_ListPartBit, !Battler_UnkAFAB (the gauge reload) =... - verified
BattleSys_AdjustDefence$C1:E65F · 271 B · Battle systemThe defence BattleSys_ApplyDamage takes off the damage (DP $18, 0-255, out of 256), from DP $18 = effect byte 6 (BattleSys_EffRecArgs56): $3E (!Battle_DefUnk6B) means the target's... - verified
BattleSys_RollUpTo1A$C1:E76E · 13 B · Battle systemDP $1A = a random number from 0 to DP $1A (Battle_RandRange with the high bound DP $1A + 1); X is kept. - verified
BattleSys_DrainHpMp$C1:E77B · 292 B · Battle systemBattleSys_Effect05's drain, probably: DP $1A = 3 (!Battle_Eff05Bit7Arg) works on HP, 7 (!Battle_Eff05Bit6Arg) on MP. - verified
Battle_HitEntryOffset$C1:E89F · 33 B · Battle engineDP $0E = !Battle_UnkAD9B * !Battle_HitSetSize + !Battle_UnkB1FD * 4: the offset of slot !Battle_UnkB1FD's entry in set !Battle_UnkAD9B of the !Battle_ActPcHitAmount records (the callers index... - verified
BattleSys_CasterHitOffset$C1:E8C0 · 34 B · Battle systemDP $10 = !Battle_UnkAD9B * !Battle_HitSetSize + !Battle_UnkB18B * 4: the offset of the caster's entry in set !Battle_UnkAD9B of the !Battle_ActPcHitAmount records (Battle_HitEntryOffset's... - verified
BattleSys_RecordMiss$C1:E8E2 · 148 B · Battle systemRecords a miss on the current target !Battle_UnkB1FD, probably: its !Battle_ActPcHitAmount entry in set !Battle_UnkAD9B gets amount 0 and kind 5 (!Battle_ActHitKind5, drawn as tiles, not a... - verified
BattleSys_UnkE976$C1:E976 · 45 B · Battle systemA percentage roll (0-99, kept in DP $0E) against DP $16 (effect byte 1 as BattleSys_Effect03 passes it): when DP $16 is at least the roll, DP $16 = 1 and BattleSys_SetStatus runs (status byte 1... - verified
BattleSys_LoadCasterStats$C1:E9A3 · 21 B · Battle system!Battle_UnkB1F4 = the BattlerStats offset of the acting battler !Battle_UnkB18B (slot * $80). - verified
BattleSys_LoadTargetStats$C1:E9B8 · 29 B · Battle systemThe current target, !Battle_UnkAD8E[!Battle_UnkAD8D - 1]: its slot goes to !Battle_UnkB1FD and its BattlerStats offset (slot * $80) to !Battle_UnkB1F6. - verified
BattleSys_StealItem$C1:E9D5 · 154 B · Battle systemAn item taken from the target enemy, probably (BattleSys_Effect06; BattleSys_Effect03 with !Battle_AE4DBit1). - verified
BattleSys_RunUnkB2CCHandlers$C1:EA6F · 46 B · Battle systemRuns BattleSys_RunUnkB2CCHandler for the part's !Battle_UnkB2CC when it is not 0, then, when !Battle_UnkAE4E (effect byte 8) has bit 7 (!Battle_AE4EBit7), loads the caster's .Unk73 / .Unk74... - verified
BattleSys_ClearPcStatuses$C1:EA9D · 75 B · Battle systemFor PC slots 0-2 (!Battle_UnkB18B = the slot, BattleSys_LoadCasterStats): .Status2 and .Unk4C-.Unk4C+7 = 0, .Status keeps only bit 7 (!Battle_StatusKo), .Unk2F bit 0 (!Battle_StatsUnk2FBit) is... - verified
BattleSys_ClearPcKo$C1:EAE8 · 38 B · Battle systemFor PC slots 0-2 (!Battle_UnkB18B = the slot): BattleSys_UnkBC60 (which does nothing), BattleSys_LoadCasterStats, then .Status = 0, so the KO bit BattleSys_ClearPcStatuses kept goes too. - verified
BattleSys_CopyEffectBytes78$C1:EB0E · 14 B · Battle system!Battle_UnkAE4D = byte 7 and !Battle_UnkAE4E = byte 8 of the effect record in !Battle_UnkAEE6 (meaning unknown). - verified
BattleSys_RunUnkB2CCHandler$C1:EB1C · 45 B · Battle systemReads record !Battle_UnkB2CC of !BattleRom_UnkCC2A05 (3 bytes): DP $1C = byte 1, DP $1E = byte 2, DP $20 = byte 0, and runs entry byte 0 of BattleSys_HitModTable (JSR (table,X), X = byte 0 * 2, 8... - verified
BattleSys_ReviveHeal$C1:EB49 · 31 B · Battle systemNot called (xref finds no call; no table entry is known). - verified
Battle_SumHitSets$C1:EB68 · 144 B · Battle engineFolds the enemy entries (slots 3-10) of the !Battle_ActPcHitAmount sets 1 to DP $1A into set 0: for set n from DP $1A down to 1, each entry's amount is added to set n - 1's (16-bit, carry... - verified
Battle_RecordHit$C1:EBF8 · 65 B · Battle engineStores !Battle_UnkAD89 as slot Y's amount in !Battle_HitAmount set !Battle_UnkB2C7, and !Battle_UnkB202 as the high byte of its !Battle_HitFlags (the low byte is left alone). - verified
Battle_ClearCancelledHits$C1:EC39 · 70 B · Battle engineFor each battler slot whose entry has !Battle_HitCancelBitHi in any of the 3 !Battle_HitAmount sets, zeroes its amount in all three; for an enemy slot also !Battle_UnkAEB2, its !Battle_UnkAEB3... - verified
Battle_ApplyHits$C1:EC7F · 266 B · Battle engineBattle_ClearCancelledHits, then for each battler slot (X = its BattlerStats offset, Y = its entry): - HP, skipped when the entry of set 0 has the MP bit in its flags (the HP amounts of sets 1 and... - verified
BattleSys_HitModChanceMul$C1:ED89 · 48 B · Battle systemModifier $00. - verified
BattleSys_HitModNone$C1:EDB9 · 1 B · Battle systemModifier $01: does nothing. - verified
BattleSys_HitModScale$C1:EDBA · 32 B · Battle systemModifier $02: !Battle_UnkAD89 = !Battle_UnkAD89 x DP $1C / DP $1E (Battle_Mul16, then Battle_Div32 of the 32-bit product; the low 16 bits of the quotient are kept). - verified
BattleSys_HitModUnk47Scale$C1:EDDA · 35 B · Battle systemModifier $03: when the target's BattlerStats.Unk47 has any of the bits DP $1C, !Battle_UnkAD89 = !Battle_UnkAD89 x DP $1E / 2 (16-bit product, halved). - verified
BattleSys_HitModPerEmptyPc$C1:EDFD · 42 B · Battle systemModifier $04: !Battle_UnkAD89 x (1 + the number of PC slots 0-2 whose !Battler_UnkAEFF is $FF, no PC there). - verified
BattleSys_HitModPlayTime$C1:EE27 · 120 B · Battle systemModifier $05: a factor picked by the play-time clock. - verified
BattleSys_HitModRandomStatus$C1:EE9F · 49 B · Battle systemModifier $06: sets one of four .Status2 bits on the target, picked by a roll from 0 to 100 (BattleSys_RollUpTo1A with 100): below 40 bit 2 ($04), 40-64 bit 7 ($80), 65-89 bit 1 ($02), 90-99 bit 6... - verified
BattleSys_HitModUnk47Status$C1:EED0 · 39 B · Battle systemModifier $07: on a roll <= 80, and when the target's BattlerStats.Unk47 has any of the bits DP $1C, sets the .Status2 bits DP $1E (BattleSys_SetStatus, DP $16 = 1). - verified
BattleSys_HitModChanceStatus$C1:EEF7 · 29 B · Battle systemModifier $08: on a roll <= DP $1C, sets the .Status2 bits DP $1E on the target (BattleSys_SetStatus, DP $16 = 1). - verified
BattleSys_HitModLeaveOneHp$C1:EF14 · 37 B · Battle systemModifier $09: on a roll <= DP $1C, !Battle_UnkAD89 = the target's .CurHp - 1 (so the hit leaves it 1 HP) and !Battle_UnkB1FC bit 0 (!Battle_B1FCBit0) is set, so BattleSys_ApplyDamage skips its x 7... - verified
BattleSys_HitModUnk6CScale$C1:EF39 · 131 B · Battle systemModifier $0A: the first of bits 7, 6, 5, 4 set in !Battle_UnkB190 (byte 1 of the action's !Battle_UnkB18C record) picks n = 0-3 (!Battle_Unk6CIndex); with none of them, nothing happens. - verified
BattleSys_HitModScaleThenUnk6C$C1:EFBC · 7 B · Battle systemModifier $0B: BattleSys_HitModScale (x DP $1C / DP $1E), then BattleSys_HitModUnk6CScale. - verified
BattleSys_HitModRollDp1A$C1:EFC3 · 16 B · Battle systemModifier $0C: DP $1A = 1 when a roll is below DP $1C (strictly, unlike the others), else 0. - verified
BattleSys_AddBattleItem$C1:EFD3 · 99 B · Battle systemAdds one of item DP $06 to the battle's item list (Item_BattleList): when an entry holds the id, its .Quantity + 1 (capped at 99).
Bank $C1 · $C1:F000–$FFFF
$C1:F000
Verified · 30
- verified
BattleSys_HitModRestore$C1:F036 · 95 B · Battle systemModifier $0D, by the bits of DP $1C: - bit 7: a full HP restore of the target, probably: !Battle_UnkAD89 = its .MaxHp, recorded by Battle_RecordHit for slot !Battle_UnkB1FD with !Battle_UnkB202 =... - verified
BattleSys_HitModHalveHp$C1:F095 · 40 B · Battle systemModifier $0E: unless the target's BattlerStats.Unk46 has bit 7 (!Battle_Unk46Bit7: probably a resistance to this kind of attack), on a roll <= DP $1C !Battle_UnkAD89 = the target's .CurHp / 2. - verified
BattleSys_HitModClearBits$C1:F0BD · 28 B · Battle systemModifier $0F: clears the bits DP $1E in the target's byte at BattlerStats.Unk2D + DP $1C. - verified
BattleSys_HitModHpDigit$C1:F0D9 · 52 B · Battle systemModifier $10: !Battle_UnkAD89 = !Battle_UnkAD89 x (the caster's .CurHp mod 10, its last decimal digit) / DP $1E. - verified
BattleSys_HitModZeroHp$C1:F10D · 37 B · Battle systemModifier $11: sets an HP to 0. - verified
BattleSys_HitModKoOrDrop$C1:F132 · 149 B · Battle systemModifier $12: unless the target's BattlerStats.Unk46 has bit 7 (!Battle_Unk46Bit7), on a roll <= DP $1C its .CurHp = 0. - verified
BattleSys_HitModAltBoost$C1:F1C7 · 40 B · Battle systemModifier $13: only when !Battle_ActUnkAE9B bit 7 (!Battle_ActAltFlag, set by BattleSys_HitModChanceMul) is set: DP $1E = 1 makes !Battle_UnkAD89 9999 (!Battle_HitAmountMax), anything else doubles... - verified
BattleSys_HitModSetBits$C1:F1EF · 22 B · Battle systemModifier $14: sets the bits DP $1E in the target's byte at BattlerStats.Unk2D + DP $1C (the counterpart of BattleSys_HitModClearBits). - verified
BattleSys_AwardTechPoints$C1:F205 · 214 B · Battle systemThe tech points and the techs they teach. - verified
BattleSys_BuildComboMasks$C1:F2DB · 191 B · Battle system!Battle_ComboPcBit+n = $80 >> the character id of PC slot n (0 for an empty slot, !Battler_UnkAEFF $FF), the three sorted from low to high (three compare-and-swap steps); then !Battle_ComboMasks =... - verified
BattleSys_SpendTechPoints$C1:F39A · 197 B · Battle systemPays the battle's tech points into character !Battle_TpCharId's single techs (the PC whose BattlerStats offset is DP $00): the award !Battle_UnkB2DB is kept in DP $30, then BattleSys_TryNextTech... - verified
BattleSys_TryNextTech$C1:F45F · 128 B · Battle systemDP $3B = the character's first single tech id (!BattleRom_CharTechs); the next tech is DP $3B + its !Battle_TechCount. - verified
BattleSys_LearnSingleTech$C1:F4DF · 84 B · Battle systemThe character learns its next single tech: bit ($80 >> its !Battle_TechCount) is set in its !Battle_TechBits1 byte, the PC's !Battle_UnkB2B3 entry (!Battle_UnkB1F4) gets bit 3 (message 5), the... - verified
BattleSys_LearnComboTechs$C1:F533 · 240 B · Battle systemThe double or triple techs of one !BattleRom_ComboTechs record. - verified
BattleSys_LevelUpStep$C1:F623 · 406 B · Battle systemOne level step for the block at !Battle_ExpRec: BattleSys_ApplyExpStep; when it raised the level (!Battle_NoLevelUp = 0), BattleSys_GrowHpMp, then the stats from the character's 7-byte... - verified
BattleSys_ApplyExpStep$C1:F7B9 · 184 B · Battle system!Battle_NoLevelUp = $FF; then, unless the block's .Status has bit 7 (KO'd; BattleSys_AwardExpAndTp never gets there, as a KO'd PC's !Battler_UnkAEFF is $FF): - level 99 or more: !Battle_UnkB28C =... - verified
BattleSys_GrowHpMp$C1:F871 · 151 B · Battle system.MaxHp of the block at !Battle_ExpRec + the HP gain of the first pair in the character's !BattleRom_HpGrowth row (8 bytes: (top level, gain) pairs) whose top level is at least .Level, capped at... - verified
BattleSys_AddExp$C1:F908 · 54 B · Battle systemAdds !Battle_UnkB28C to the 24-bit .Exp of the block at X (carry into the high byte); when the high byte is then $98 or more it is set to $98, and a low word of $9680 or more to $967F (so at most... - verified
BattleSys_AwardExpAndTp$C1:F93E · 173 B · Battle systemThe experience and tech points of a won battle. - verified
BattleSys_AwardReserveExp$C1:F9EB · 118 B · Battle systemExperience for the characters not in the battle: !Battle_UnkB1F4 = 3, !Battle_RosterBits = the low byte of !Menu_Unk29AF (bit 7 = character 0, shifted left per id); for each character id 0-6 whose... - verified
BattleSys_HitModTable$C1:FA61 · 42 B · Battle systemThe hit modifiers BattleSys_RunUnkB2CCHandler runs, by byte 0 of a !BattleRom_UnkCC2A05 record (JSR (BattleSys_HitModTable,X) at $C1:EB45); see the banner before BattleSys_HitModChanceMul. - verified
Battle_SetupBattle$C1:FA8B · 803 B · Battle engineBattleSys_Main's first step: builds the battle state before the shuffles. - verified
Battle_CalcUnk56$C1:FDAE · 17 B · Battle engineA / 24 + $44: Battle_SetupBattle's BattlerStats.Unk56 from .Unk3F for a PC whose .Unk2D is 5. - verified
Battle_Mul16Long$C1:FDBF · 4 B · Battle engineJSL form of Battle_Mul16. - verified
BankC1_AddItemLong$C1:FDC3 · 4 B · EngineJSL form of BankC1_AddItem (add one of item Y). - verified
BattleSys_RunPcAttackLong$C1:FDC7 · 4 B · Battle systemJSL form of BattleSys_RunPcAttack. - verified
Battle_RandRangeLong$C1:FDCB · 4 B · Battle engineJSL form of Battle_RandRange. - verified
BattleSys_RefundItemLong$C1:FDCF · 4 B · Battle systemJSL form of BattleSys_RefundItem. - verified
BankC1_OldBuildTail$C1:FDD3 · 556 B · Engineand BankC1_DebugFlag ($C1:FFFF) - verified
BankC1_DebugFlag$C1:FFFF · 1 B · EngineThe last byte of the bank, read as !BattleRom_DebugFlag (LDA.l) by BattleSys_Main: non-zero enables its pad-2 Select win.
Bank $C2 · $C2:0000–$0FFF
$C2:0000
Verified · 61
- verified
BankC2_Entry0000$C2:0000 · 3 B · Enginethe bank's entry vectors, five JMPs reached from other banks by JML/JSL: $0000 BankC2_Entry0000 → BankC2_SceneBoot (JML from GameLoop_Main for Loc_Id $01F0-$81EF; it never returns) $0003... - verified
BankC2_Entry0003$C2:0003 · 3 B · Engine - verified
BankC2_Entry0006$C2:0006 · 3 B · Engine - verified
BankC2_Entry0009$C2:0009 · 3 B · Engine - verified
BankC2_Entry000C$C2:000C · 3 B · Engine - verified
BankC2_SceneBoot$C2:000F · 52 B · EngineStarts the bank's scene mode (inferred name: GameLoop_Main sends Loc_Id $01F0-$81EF here; what those locations show is not traced). - verified
BankC2_InitHwRegs$C2:0043 · 205 B · EngineWrites the PPU registers from OBSEL to SETINI (all but INIDISP and the data ports OAMDATA, VMDATAL/H and CGDATA) and the CPU registers WRIO-VTIMEH with fixed values, through DP=$2100 and then... - verified
C2Scene_InstallInterrupts$C2:0110 · 31 B · EngineWrites JML C2Scene_NmiHandler and JML C2Scene_IrqHandler into the WRAM trampolines that the native NMI and IRQ stubs in bank $00 jump through, as InstallNMI/InstallIRQ ($C0:0B64/$0B75) do for the... - verified
C2Scene_ClearDp$C2:012F · 47 B · EngineZeroes the direct page $00-$EF (an STZ of the first word, then an overlapping MVN), then sets the PPU shadows that C2Scene_NmiHandler copies out to their starting values: forced blank, mode 1 with... - verified
C2Scene_NmiHandler$C2:015E · 487 B · EngineThe scene mode's NMI (reached through !NmiTrampoline, installed by C2Scene_InstallInterrupts). - verified
C2Scene_IrqHandler$C2:0345 · 1 B · Enginethe scene mode's IRQ, an RTI (installed by C2Scene_InstallInterrupts; nothing here enables IRQs). - verified
C2Scene_WaitFrame$C2:0346 · 7 B · EngineWaits until the next NMI: spins until C2Scene_FrameCounter changes. - verified
C2Scene_HideAllSprites$C2:034D · 162 B · EngineParks all 128 sprites of the OAM shadow below the screen: Y = Oam_HiddenY in every low-table entry, and the high table zeroed (small size, X bit 8 clear). - verified
C2Scene_VramQInit$C2:03EF · 22 B · EngineEmpties and unlocks the VRAM upload queue: clears C2Scene_VramQLock and C2Scene_VramQEnd, points C2Scene_VramQBufPtr at C2Scene_VramQBuf ($7E:F000) and zeroes all 16 C2Scene_VramQ entries (dp... - verified
C2Scene_VramQFlush$C2:0405 · 79 B · EngineRuns the queued VRAM uploads: for each 8-byte C2Scene_VramQ entry up to C2Scene_VramQEnd, one DMA on channel 0 (word writes to VMDATAL/H) from .Bank:.Src, .Size bytes, to VRAM word .Dest with... - verified
C2Scene_WaitFrames$C2:0454 · 26 B · EngineWaits X frames (C2Scene_WaitFrame each time). - verified
C2Scene_WaitOneFrame$C2:046E · 3 B · EngineA JMP to C2Scene_WaitFrame: waits for the next NMI without sending a pending sound command. - verified
C2Scene_TaskClearAll$C2:0471 · 25 B · EngineFrees all 64 task records (zeroes each .Handler) and points C2Scene_TaskCur at the first record, so that tasks spawned before any task runs copy their parameters from record 0. - verified
C2Scene_TaskSpawn$C2:048A · 10 B · EngineStarts a task with handler X in the first free record from record 4 on (records 0-3 are left to C2Scene_TaskSpawnLow, which enters at C2Scene_TaskSpawn_Search with its own range). - verified
C2Scene_TaskSpawn_Search$C2:0494 · 57 B · Engine - verified
C2Scene_TaskSpawnLow$C2:04CD · 12 B · EngineC2Scene_TaskSpawn over records 0-3 only: the same search and setup (it branches into C2Scene_TaskSpawn_Search). - verified
C2Scene_TaskSpawnScript$C2:04D9 · 34 B · EngineSpawns a C2Scene_TaskRunScript task (C2Scene_TaskSpawn, records 4-63) and gives it a script: .ScriptPtr = X, .ScriptBank = A, .Unk0A = 0. - verified
C2Scene_TaskSpawnScriptLow$C2:04FB · 34 B · EngineC2Scene_TaskSpawnScript in records 0-3 (C2Scene_TaskSpawnLow). - verified
C2Scene_TaskRunAll$C2:051D · 54 B · EngineRuns every live task once (from the NMI, each frame): for each record of C2Scene_TaskRecords with a non-zero .Handler, sets C2Scene_TaskCur to it and calls the handler (C2Scene_TaskCallHandler)... - verified
C2Scene_TaskCallHandler$C2:0553 · 3 B · EngineJMP (C2Scene_TaskHandler): a JSR here calls the task's handler, which returns to C2Scene_TaskRunAll. - verified
C2Scene_LayerMetatiles$C2:0556 · 6 B · EnginePer BG layer 1-3 (index (layer - 1) * 2): where its metatile definitions are in bank $7E. - verified
C2Scene_LayerMaps$C2:055C · 6 B · EnginePer layer: where its map (96 x 64 metatile numbers, C2Scene_MapBytes) is in bank $7E. - verified
C2Scene_LayerVramMaps$C2:0562 · 6 B · EnginePer layer: the VRAM word address of its tilemap. - verified
C2Scene_Unk0568$C2:0568 · 260 B · EngineScrolls BG layer C2Scene_ScrollLayer horizontally by C2Scene_ScrollPx pixels (signed: negative moves the view left), one pixel per pass. - verified
C2Scene_Unk066C$C2:066C · 263 B · EngineC2Scene_Unk0568 for the vertical: scrolls the layer's C2Scene_Bg1VScroll + slot by C2Scene_ScrollPx pixels (negative: up), wrapping in 0-$3FF, with its tile Y (C2Scene_BgTileY + slot) in 0-127. - verified
C2Scene_EdgeColLeft$C2:0773 · 79 B · EngineBuilds one tile column of a layer edge into the buffer at C2Scene_VramQBufPtr: C2Scene_EdgeColTiles (30) tiles from the left half of metatile column C2Scene_EdgeCol, starting at metatile row... - verified
C2Scene_EdgeColRight$C2:07C2 · 79 B · EngineC2Scene_EdgeColLeft for the right half of the metatiles: .TopRight and .BottomRight. - verified
C2Scene_EdgeColSetup$C2:0811 · 50 B · EngineSets up a column build: C2Scene_EdgeMapOfs = C2Scene_EdgeRow * 96 (the row's offset in the map), C2Scene_EdgeMapPtr = the layer's map + C2Scene_EdgeCol, C2Scene_EdgeBuf = C2Scene_VramQBufPtr's... - verified
C2Scene_EdgeRowTop$C2:0843 · 76 B · EngineBuilds one tile row of a layer edge into the buffer at C2Scene_VramQBufPtr: C2Scene_EdgeRowTiles (34) tiles from the top half of metatile row C2Scene_EdgeRow, starting at metatile column... - verified
C2Scene_EdgeRowBottom$C2:088F · 76 B · EngineC2Scene_EdgeRowTop for the bottom half of the metatiles: .BottomLeft and .BottomRight. - verified
C2Scene_EdgeRowSetup$C2:08DB · 50 B · EngineSets up a row build: C2Scene_EdgeMapOfs = C2Scene_EdgeCol (the column), C2Scene_EdgeMapPtr = the layer's map + C2Scene_EdgeRow * 96, C2Scene_EdgeBuf = C2Scene_VramQBufPtr's address... - verified
C2Scene_QueueEdgeCol$C2:090D · 84 B · EngineQueues the column built at C2Scene_VramQBufPtr for VRAM: one C2Scene_VramQ entry of C2Scene_ColBufHalf bytes from bank $7E, VMAIN stepping 32 words, to tile column (C2Scene_EdgeCol / 8) AND 63 of... - verified
C2Scene_QueueEdgeRow$C2:0961 · 100 B · EngineQueues the row built at C2Scene_VramQBufPtr for VRAM as two C2Scene_VramQ entries of C2Scene_RowBufHalf bytes from bank $7E, VMAIN stepping one word: the buffer's first half to tile row... - verified
C2Scene_DrawBgLayer$C2:09C5 · 167 B · EngineRedraws the visible part of BG layer C2Scene_DrawLayer (1 or 2; the value is taken AND C2Scene_LayerMask) from the layer's tile position C2Scene_BgTileX/Y (word (layer - 1)): - the layer's scroll... - verified
C2Scene_BuildBgColumn$C2:0A6C · 66 B · EngineBuilds one tilemap column pair (two tile columns of 32 words) in the buffer at C2Scene_VramQBufPtr: C2Scene_DrawRows metatiles of map column C2Scene_DrawMapCol from row C2Scene_DrawMapRow down... - verified
C2Scene_DrawMetatile$C2:0AAE · 46 B · EnginePuts one metatile into the column buffer: the map byte at C2Scene_DrawMapColPtr + C2Scene_DrawMapRowOfs selects an 8-byte C2Scene_Metatile record; its .TopLeft and .BottomLeft go to the left tile... - verified
C2Scene_UploadBgColumn$C2:0ADC · 119 B · EngineDMAs the two tile columns built by C2Scene_BuildBgColumn to VRAM on channel 7, with VMAIN stepping 32 words (one tilemap row) per word: the left column to tile column C2Scene_DrawColX / 8 of the... - verified
C2Scene_SprAdd$C2:0B53 · 163 B · EngineTakes the first node off the free list and fills it from the running task (C2Scene_TaskCur): .X = .SprX, .Y = .SprY, .Tile = .SprTile, .Attr = .SprAttr, .Frame = C2Scene_SprFramePtr. - verified
C2Scene_SprInitLinks$C2:0BF6 · 87 B · EngineBuilds C2Scene_SprLinkInit, the .Prev/.Next pair of each node on a free list in address order: node 0's .Prev is C2Scene_SprFreeHead, node n's .Prev is node n-1 and its .Next node n+1, and node... - verified
C2Scene_SprResetLists$C2:0C4D · 157 B · EngineEmpties the sprite list for the new frame (from the NMI): the active head points at itself, the free head at node 0 (.Next) and node 63 (.Prev), and every node gets its .Prev/.Next back from... - verified
C2Scene_SprDrawList$C2:0CEA · 30 B · EngineDraws the active sprite list (from the NMI, after the tasks): calls C2Scene_SprDrawNode for each node from C2Scene_SprActiveHead's .Next until the walk comes back to the head. - verified
C2Scene_SprDrawNode$C2:0D08 · 261 B · EngineWrites the OAM entries of one sprite-list node X. - verified
C2Scene_OamHiBitsTable$C2:0E0D · 16 B · EngineThe OAM high-table bits of one sprite, indexed by (slot AND 3) * 4 + size * 2 + X bit 8: the 2-bit value size:Xbit8 shifted to the slot's place in its byte (C2Scene_SprDrawNode). - verified
C2Anim_Run$C2:0E1D · 45 B · EngineRuns the running task's animation script (.AnimPtr, .AnimBank) from where it stopped: calls the handler of each op from C2Anim_OpTable with C2Anim_Ptr on the opcode. - verified
C2Anim_OpTable$C2:0E4A · 16 B · EngineThe handler of each animation opcode 0-7 (C2Anim_Run: JSR (T,X) with X = the opcode * 2). - verified
C2Anim_OpClearByte$C2:0E5A · 17 B · EngineAnimation op 0, 2 bytes: zeroes the task's byte at offset arg 1 (any of the 64 record bytes, through C2Scene_TaskCur). - verified
C2Anim_OpIncByte$C2:0E6B · 19 B · EngineAnimation op 1, 2 bytes: adds 1 to the task's byte at offset arg 1. - verified
C2Anim_OpDecByte$C2:0E7E · 19 B · EngineAnimation op 2, 2 bytes: subtracts 1 from the task's byte at offset arg 1. - verified
C2Anim_OpJumpBack$C2:0E91 · 18 B · EngineAnimation op 3, 2 bytes: moves the script by the signed byte arg 1, counted from the opcode: A = the offset sign-extended. - verified
C2Anim_OpShowFrame$C2:0EA3 · 57 B · EngineAnimation op 4, 4 bytes: shows the sprite frame at arg 1-2 (an address in the script's bank) for arg 3 frames. - verified
C2Anim_OpWait$C2:0EDC · 36 B · EngineAnimation op 5, 2 bytes: waits arg 1 calls without drawing, counting in .AnimTimer as C2Anim_OpShowFrame does (0 loads it, then -1 per call; at 0 it advances 2 at once). - verified
C2Anim_OpQueueVram$C2:0F00 · 53 B · EngineAnimation op 6, 8 bytes: adds a VRAM DMA to the queue the NMI flushes (C2Scene_VramQ at C2Scene_VramQEnd): .Bank = arg 1, .Src = arg 2-3, .Dest = arg 4-5, .Size = arg 6-7, .Vmain =... - verified
C2Anim_OpEnd$C2:0F35 · 3 B · EngineAnimation op 7: stops (A = 0, Z=1) with C=1 and does not advance, so every later call stops here again. - verified
C2Scene_TaskMove$C2:0F38 · 43 B · EngineMoves the running task by its velocity, in 16.16 fixed point: .XFrac/.SprX += .XVelFrac/.XVel and .YFrac/.SprY += .YVelFrac/.YVel (inferred from the carry chain: the fraction words are added first... - verified
C2Scene_TaskRunScript$C2:0F63 · 46 B · EngineTask handler of the script tasks (C2Scene_TaskSpawnScript and C2Scene_TaskSpawnScriptLow install it); also called by other handlers (the party leader's and members' script states). - verified
C2Script_OpTable$C2:0F91 · 166 B · EngineThe handler of each script opcode $00-$52 (C2Scene_TaskRunScript: JSR (T,X) with X = the opcode * 2); a larger opcode is not checked for and would jump through the code after the table.
Bank $C2 · $C2:1000–$1FFF
$C2:1000
Verified · 111
- verified
C2Script_ResetTask$C2:1037 · 90 B · EngineOp $00, 1 byte: zeroes the task's record from +$05 on, except the script fields +$07-$0A: .ScriptReturn, the animation, the sprite fields, position and velocity and all words up to +$3F (16-bit... - verified
C2Script_SetSprPalette$C2:1091 · 23 B · EngineOp $01, 2 bytes: .SprAttr = .SprAttr AND $F1 OR arg 1: replaces bits 1-3, which C2Scene_SprDrawNode puts in the OAM palette bits. - verified
C2Script_SetSprPriority$C2:10A8 · 23 B · EngineOp $02, 2 bytes: .SprAttr = .SprAttr AND $4F OR arg 1: replaces bits 4 and 5 (the OAM priority bits) and bit 7 (C2Scene_SprAttrScroll). - verified
C2Script_SpawnUnk1CF5$C2:10BF · 14 B · EngineOp $03, 10 bytes: starts a C2Scene_TaskUnk1CF5 task (C2Scene_TaskSpawn, records 4-63), which copies this task's record, and advances 10. - verified
C2Script_SpawnUnk1DD4$C2:10CD · 51 B · EngineOp $04, 6 bytes: puts its arguments in this task's record, .Unk35 = arg 1-2, .Unk37 = arg 3, .OpState = arg 4 (high byte 0), .OpTarget = arg 5, and starts a C2Scene_TaskUnk1DD4 task, which copies... - verified
C2Script_GoToLocation$C2:1100 · 105 B · EngineOp $05, 5 bytes: sets up a location change in the field's location block (DP_Field) and selects scene mode C2Scene_ModeUnk2: - Loc_ReturnId = the current Loc_Id; Loc_ReturnX = BG2's tile X... - verified
C2Script_Halt$C2:1169 · 2 B · EngineOp $06: stops (A = 0, Z=1) without advancing, every frame: the script ends there but its task stays (C as C2Scene_TaskRunScript left it, 0 from its ASL). - verified
C2Script_SetMapCell$C2:116B · 71 B · EngineOp $07, 5 bytes: writes metatile number arg 4 into BG layer arg 1's map (C2Scene_LayerMaps, bank $7E) at column arg 2, row arg 3 (row * 96 + column, with the hardware multiplier). - verified
C2Script_SetMemberWord$C2:11B2 · 68 B · EngineOp $08, 4 bytes: stores the word arg 1-2 for character arg 3: at C2Scene_Unk1B41 for character 7, else at the C2Scene_MemberWords word of the party position (Party_Members) that holds that... - verified
C2Script_SpawnScript$C2:11F6 · 22 B · EngineOp $09, 4 bytes: starts another script task (C2Scene_TaskSpawnScript, records 4-63) on the script at arg 1-2 in bank arg 3. - verified
C2Script_ClearTaskByte$C2:120C · 17 B · EngineOp $0A, 2 bytes: task byte arg 1 = 0. - verified
C2Script_IncTaskByte$C2:121D · 19 B · EngineOp $0B, 2 bytes: task byte arg 1 + 1. - verified
C2Script_DecTaskByte$C2:1230 · 19 B · EngineOp $0C, 2 bytes: task byte arg 1 - 1. - verified
C2Script_SetTaskByte$C2:1243 · 20 B · EngineOp $0D, 3 bytes: task byte arg 1 = arg 2. - verified
C2Script_OrTaskByte$C2:1257 · 22 B · EngineOp $0E, 3 bytes: task byte arg 1 OR= arg 2 (sets those bits). - verified
C2Script_ClearTaskBits$C2:126D · 24 B · EngineOp $0F, 3 bytes: task byte arg 1 AND= NOT arg 2 (clears those bits). - verified
C2Script_ClearRamByte$C2:1285 · 17 B · EngineOp $10, 3 bytes: RAM byte at arg 1-2 = 0. - verified
C2Script_IncRamByte$C2:1296 · 17 B · EngineOp $11, 3 bytes: RAM byte at arg 1-2 + 1. - verified
C2Script_DecRamByte$C2:12A7 · 17 B · EngineOp $12, 3 bytes: RAM byte at arg 1-2 - 1. - verified
C2Script_SetRamByte$C2:12B8 · 22 B · EngineOp $13, 4 bytes: RAM byte at arg 1-2 = arg 3. - verified
C2Script_OrRamByte$C2:12CE · 25 B · EngineOp $14, 4 bytes: RAM byte at arg 1-2 OR= arg 3. - verified
C2Script_ClearRamBits$C2:12E7 · 27 B · EngineOp $15, 4 bytes: RAM byte at arg 1-2 AND= NOT arg 3. - verified
C2Script_TaskByteToRam$C2:1302 · 26 B · EngineOp $16, 4 bytes: RAM byte at arg 2-3 = task byte arg 1. - verified
C2Script_RamByteToTask$C2:131C · 26 B · EngineOp $17, 4 bytes: task byte arg 1 = RAM byte at arg 2-3. - verified
C2Script_CopyTaskByte$C2:1336 · 26 B · EngineOp $18, 3 bytes: task byte arg 1 = task byte arg 2. - verified
C2Script_CopyRamByte$C2:1350 · 26 B · EngineOp $19, 5 bytes: RAM byte at arg 1-2 = RAM byte at arg 3-4. - verified
C2Script_Jump$C2:136A · 11 B · EngineOp $1A, 3 bytes: C2Script_Ptr = arg 1-2 (an address in the script's bank), then advance 1, so the script goes on at arg 1-2 + 1. - verified
C2Script_LoopTaskByte$C2:1375 · 35 B · EngineOp $1B, 3 bytes: task byte arg 1 - 1; while it is not 0, branch by arg 2; at 0, advance 3 (a counted loop). - verified
C2Script_IfTaskByteZero$C2:1398 · 32 B · EngineOp $1C, 3 bytes: if task byte arg 1 is 0, branch by arg 2; else advance 3. - verified
C2Script_IfTaskByteNonZero$C2:13B8 · 32 B · EngineOp $1D, 3 bytes: if task byte arg 1 is not 0, branch by arg 2; else advance 3. - verified
C2Script_IfTaskByteNe$C2:13D8 · 36 B · EngineOp $1E, 4 bytes: if task byte arg 1 is not arg 2, branch by arg 3; else advance 4. - verified
C2Script_IfTaskByteEq$C2:13FC · 36 B · EngineOp $1F, 4 bytes: if task byte arg 1 is arg 2, branch by arg 3; else advance 4. - verified
C2Script_IfTaskBitsSet$C2:1420 · 36 B · EngineOp $20, 4 bytes: if task byte arg 1 AND arg 2 is not 0, branch by arg 3; else advance 4. - verified
C2Script_IfTaskBitsClear$C2:1444 · 37 B · EngineOp $21, 4 bytes: if task byte arg 1 AND arg 2 is 0, branch by arg 3; else advance 4. - verified
C2Script_IfRamByteZero$C2:1469 · 34 B · EngineOp $22, 4 bytes: if the RAM byte at arg 1-2 is 0, branch by arg 3; else advance 4. - verified
C2Script_IfRamByteNonZero$C2:148B · 34 B · EngineOp $23, 4 bytes: if the RAM byte at arg 1-2 is not 0, branch by arg 3; else advance 4. - verified
C2Script_IfRamByteNe$C2:14AD · 37 B · EngineOp $24, 5 bytes: if the RAM byte at arg 1-2 is not arg 3, branch by arg 4; else advance 5. - verified
C2Script_IfRamByteEq$C2:14D2 · 37 B · EngineOp $25, 5 bytes: if the RAM byte at arg 1-2 is arg 3, branch by arg 4; else advance 5. - verified
C2Script_IfRamBitsSet$C2:14F7 · 37 B · EngineOp $26, 5 bytes: if the RAM byte at arg 1-2 AND arg 3 is not 0, branch by arg 4; else advance 5. - verified
C2Script_IfRamBitsClear$C2:151C · 37 B · EngineOp $27, 5 bytes: if the RAM byte at arg 1-2 AND arg 3 is 0, branch by arg 4; else advance 5. - verified
C2Script_IfRamByteLess$C2:1541 · 37 B · EngineOp $4C, 5 bytes: if the RAM byte at arg 1-2 is below arg 3 (unsigned), branch by arg 4; else advance 5. - verified
C2Script_IfRamByteGe$C2:1566 · 37 B · EngineOp $4D, 5 bytes: if the RAM byte at arg 1-2 is arg 3 or more (unsigned), branch by arg 4; else advance 5. - verified
C2Script_SpawnUnk20A2$C2:158B · 14 B · EngineOp $28, 2 bytes: starts a C2Scene_TaskUnk20A2 task (C2Scene_TaskSpawn), which copies this record (and so this op's .ScriptPtr: probably it reads arg 1 from there; not traced). - verified
C2Script_SpawnUnk2105$C2:1599 · 14 B · EngineOp $29, 2 bytes: as C2Script_SpawnUnk20A2 with C2Scene_TaskUnk2105. - verified
C2Script_SpawnUnk21F8$C2:15A7 · 14 B · EngineOp $2A, 3 bytes: as C2Script_SpawnUnk20A2 with C2Scene_TaskUnk21F8. - verified
C2Script_SpawnUnk2194$C2:15B5 · 14 B · EngineOp $2B, 3 bytes: as C2Script_SpawnUnk20A2 with C2Scene_TaskUnk2194. - verified
C2Script_SetPosition$C2:15C3 · 28 B · EngineOp $2C, 5 bytes: .SprX = arg 1-2 and .SprY = arg 3-4, both fractions 0. - verified
C2Script_Skip1$C2:15DF · 4 B · EngineOp $2D, 2 bytes: does nothing and advances 2 (the byte after the opcode is skipped). - verified
C2Script_SetXVelocity$C2:15E3 · 22 B · EngineOp $2E, 5 bytes: .XVelFrac = arg 1-2, .XVel = arg 3-4. - verified
C2Script_SetYVelocity$C2:15F9 · 22 B · EngineOp $2F, 5 bytes: .YVelFrac = arg 1-2, .YVel = arg 3-4. - verified
C2Script_SetAnim$C2:160F · 14 B · EngineOp $30, 2 bytes: starts animation script arg 1 (C2Scene_SetAnim). - verified
C2Script_MoveFrames$C2:161D · 46 B · EngineOp $31, 2 bytes: for arg 1 frames, each frame moves the task by its velocity (C2Scene_TaskMove), wraps the position into the map (C2Scene_WrapTaskPos), runs its animation (C2Anim_Run) and stops... - verified
C2Script_ScrollFrames$C2:164B · 175 B · EngineOp $32, 2 bytes: scrolls BG layers 1 and 2 (and BG3) by the task's velocity for arg 1 frames, counted in .ScriptWait as C2Script_MoveFrames does. - verified
C2Script_ScrollLayerFrames$C2:16FA · 95 B · EngineOp $51, 3 bytes: C2Script_ScrollFrames for one layer, arg 1 (passed to C2Scene_Unk0568/066C as is), for arg 2 frames, and without BG3. - verified
C2Script_PanKeepFraction$C2:1759 · 43 B · EngineDrops the whole pixels from the task's position, keeping the fraction as a value in -1..+1: .SprX = -1 if it was negative with a non-zero .XFrac, else 0; the same for .SprY with .YFrac. - verified
C2Script_PanTakeX$C2:1784 · 39 B · EngineTells whether the X accumulator (.XFrac/.SprX) holds at least one whole pixel either way: C=1 with C2Tmp_01 = the low byte of .SprX (signed pixels), else C=0. - verified
C2Script_PanTakeY$C2:17AB · 39 B · EngineC2Script_PanTakeX for .YFrac/.SprY. - verified
C2Script_QueueVram$C2:17D2 · 53 B · EngineOp $33, 8 bytes: C2Anim_OpQueueVram's code on the script pointer: adds a VRAM DMA to the queue the NMI flushes (C2Scene_VramQ at C2Scene_VramQEnd): .Bank = arg 1, .Src = arg 2-3, .Dest = arg 4-5... - verified
C2Script_CallNear$C2:1807 · 21 B · EngineOp $34, 3 bytes: calls the routine at arg 1-2 in bank $C2 (JSR to .call, a JMP (C2Script_CallVec)) with M=1, then advances 3. - verified
C2Script_CallLong$C2:181C · 29 B · EngineOp $4E, 4 bytes: calls the routine at the long address arg 1-3 (JSL to .call, a JML [C2Script_CallVec]) with M=1; it returns with RTL. - verified
C2Script_SpawnTask$C2:1839 · 15 B · EngineOp $35, 3 bytes: starts a task with handler arg 1-2 (an address in bank $C2) in records 4-63 (C2Scene_TaskSpawn), which copies this task's record from +$05 on. - verified
C2Script_Call$C2:1848 · 23 B · EngineOp $36, 3 bytes: a subroutine call in the script: .ScriptReturn = the address of the next op, and the script continues at arg 1-2 (same bank): C2Script_Ptr = arg - 1 and A = 1, which... - verified
C2Script_Return$C2:185F · 12 B · EngineOp $37, 1 byte: returns from C2Script_Call: the script continues at .ScriptReturn (C2Script_Ptr = it - 1, A = 1). - verified
C2Script_Wait$C2:186B · 35 B · EngineOp $38, 2 bytes: waits arg 1 frames, counted in .ScriptWait as C2Script_MoveFrames counts: 0 loads it with arg 1 and stops, then -1 per frame; at 0 it advances 2. - verified
C2Script_WaitAnimating$C2:188E · 38 B · EngineOp $39, 2 bytes: C2Script_Wait, running the task's animation (C2Anim_Run) on each frame it waits. - verified
C2Script_StopIfOlder$C2:18B4 · 19 B · EngineOp $3A, 3 bytes: compares arg 1-2 with the task's age (.Frames, +1 per frame it has run). - verified
C2Script_SoundCmd18$C2:18C7 · 9 B · EngineOp $3B, 3 bytes: C2Script_PlaySfx with sound command C2Scene_SoundCmd18 instead of Audio_CmdPlaySfx: it sets the command byte and branches to C2Script_PlaySfx_SetArgs. - verified
C2Script_PlaySfx$C2:18D0 · 7 B · EngineOp $3C, 3 bytes: queues sound command Audio_CmdPlaySfx with arg 1 and arg 2 as its first two argument bytes (the third is left as it was) at rank 0 (C2Scene_QueueSoundCmd: it replaces any queued... - verified
C2Script_PlaySfx_SetArgs$C2:18D7 · 26 B · Engine - verified
C2Script_SoundCmd10IfClear$C2:18F1 · 8 B · EngineOp $3D, 2 bytes: C2Script_SoundCmd10 unless C2Scene_Unk7F01ED is non-zero: then it branches to C2Script_SoundCmd10_Done, which only advances 2. - verified
C2Script_SoundCmd10$C2:18F9 · 32 B · EngineOp $4A, 2 bytes: queues sound command C2Scene_SoundCmd10 with arg 1 and C2Scene_SoundArgUnused ($FF) as its other two argument bytes, at rank 0 (C2Scene_QueueSoundCmd), and also stores arg 1 in... - verified
C2Script_SoundCmd10_Done$C2:1919 · 6 B · Engine - verified
C2Script_SoundCmd$C2:191F · 40 B · EngineOp $4B, 5 bytes: queues the sound command arg 1 with argument bytes arg 2-4, at rank 0 (C2Scene_QueueSoundCmd). - verified
C2Script_DrawLayer$C2:1947 · 18 B · EngineOp $3E, 2 bytes: redraws BG layer arg 1 from its map (C2Scene_DrawBgLayer), e.g. - verified
C2Script_MoveToX$C2:1959 · 105 B · EngineOp $3F, 5 bytes: moves the task along X until .SprX = arg 1-2, at the speed of its X velocity. - verified
C2Script_MoveToY$C2:19C2 · 105 B · EngineOp $40, 5 bytes: C2Script_MoveToX along Y: target .SprY = arg 1-2, C2Scene_NegateYVel, animation arg 3 when going up (target above .SprY) and arg 4 when going down; .YFrac/.SprY += the Y velocity. - verified
C2Script_Halt2$C2:1A2B · 2 B · EngineOp $41, 1 byte: the same code as C2Script_Halt (op $06): stops (A = 0, Z=1) without advancing, every frame; the task stays. - verified
C2Script_SpawnScriptLow$C2:1A2D · 22 B · EngineOp $43, 4 bytes: C2Script_SpawnScript in records 0-3: starts a script task (C2Scene_TaskSpawnScriptLow) on the script at arg 1-2 in bank arg 3. - verified
C2Script_SpawnTaskLow$C2:1A43 · 15 B · EngineOp $42, 3 bytes: C2Script_SpawnTask in records 0-3 (C2Scene_TaskSpawnLow): handler arg 1-2. - verified
C2Script_SetListBit7$C2:1A52 · 30 B · EngineOp $44, 3 bytes: sets C2Scene_ListEntryBit7 in the first byte of entry arg 2 of list arg 1 (0 = C2Scene_ListA, 1 = ListB, 2 = ListC: the helper in C2Script_ListEntryTable leaves the entry's... - verified
C2Script_ListEntryTable$C2:1A70 · 6 B · EngineThe helper per list number (C2Script_SetListBit7 and C2Script_ClearListBit7: JSR (T,X) with X = the list * 2). - verified
C2Script_ListAEntry$C2:1A76 · 20 B · EngineC2Tmp_10/$11 = the 16-bit address of entry arg 2 of C2Scene_ListA (entry * 7, as entry * 8 - entry, + the list). - verified
C2Script_ListBEntry$C2:1A8A · 17 B · EngineC2Tmp_10/$11 = the address of entry arg 2 of C2Scene_ListB (entry * 3 + the list). - verified
C2Script_ListCEntry$C2:1A9B · 17 B · EngineC2Tmp_10/$11 = the address of entry arg 2 of C2Scene_ListC (entry * 3 + the list). - verified
C2Script_ClearListBit7$C2:1AAC · 30 B · EngineOp $45, 3 bytes: C2Script_SetListBit7, clearing the bit instead. - verified
C2Script_AddTaskByte$C2:1ACA · 23 B · EngineOp $46, 3 bytes: task byte arg 1 += arg 2 (8-bit, wrapping). - verified
C2Script_SubTaskByte$C2:1AE1 · 26 B · EngineOp $47, 3 bytes: task byte arg 1 -= arg 2 (8-bit, wrapping). - verified
C2Script_AddRamByte$C2:1AFB · 26 B · EngineOp $48, 4 bytes: RAM byte at arg 1-2 (through DB) += arg 3. - verified
C2Script_SubRamByte$C2:1B15 · 26 B · EngineOp $49, 4 bytes: RAM byte at arg 1-2 (through DB) -= arg 3. - verified
C2Script_CopyMapBlock$C2:1B2F · 177 B · EngineOp $4F, 9 bytes: copies a block of metatile numbers from one BG layer map to another place (C2Scene_BgMaps, bank $7E; 96 bytes per row): source layer arg 1 at column arg 2, row arg 3; destination... - verified
C2Script_DrawMetatile$C2:1BE0 · 161 B · EngineOp $50, 5 bytes: draws metatile arg 4 at cell (column arg 2, row arg 3) of BG layer arg 1's tilemap in VRAM, by queuing two VRAM DMAs of C2Scene_MetatileRowBytes each (C2Scene_VramQ): the... - verified
C2Script_End$C2:1C81 · 3 B · EngineOp $52, 1 byte: stops (A = 0, Z=1) with C=1, which ends the task when C2Scene_TaskRunScript is its handler (C2Scene_TaskRunAll frees it). - verified
C2Scene_NegateXVel$C2:1C84 · 26 B · EngineNegates the task's X velocity as one 32-bit value (.XVelFrac/.XVel: invert both words and add 1 with the carry), turning it around. - verified
C2Scene_NegateYVel$C2:1C9E · 26 B · EngineC2Scene_NegateXVel for .YVelFrac/.YVel. - verified
C2Scene_WrapTaskPos$C2:1CB8 · 34 B · EngineWraps the task's position into the scene map: .SprX gets C2Scene_MapWidthPx (1536, the 96 metatile columns) added when it is negative or taken off when it is that or more (once, so it assumes the... - verified
C2Scene_SetAnim$C2:1CDA · 27 B · EngineStarts animation script A (low byte) on the running task: .AnimPtr = entry A of C2SceneRom_AnimTable, .AnimBank = C2SceneRom_AnimBank (the table's own bank), .AnimTimer = 0. - verified
C2Scene_TaskUnk1CF5$C2:1CF5 · 13 B · EngineTask handler: runs the state in .State (C2Scene_UploadTask; the record's .Unk02, 0 from C2Scene_TaskSpawn) through C2Scene_UploadTileStates: 0 C2Scene_UploadTilesStart, 1 C2Scene_UploadTilesStep. - verified
C2Scene_UploadTileStates$C2:1D02 · 4 B · EngineThe state handlers of C2Scene_TaskUnk1CF5 (JMP (T,X) with X = .State * 2). - verified
C2Scene_UploadTilesStart$C2:1D06 · 70 B · EngineState 0: sets .State to 1 (a 16-bit INC, so +$03 would take a carry; it never does), then copies op $03's arguments from the spawning op (.OpPtr): .Src = arg 1-2, .SrcBank = arg 3, .Dest = arg 4-5... - verified
C2Scene_UploadTilesStep$C2:1D4C · 105 B · EngineState 1, each frame: queues the next part, min(.PerFrame, .Left) units of 32 bytes, as one VRAM DMA (C2Scene_VramQ: .Bank = .SrcBank, .Src = .Src, .Dest = .Dest, .Size = units * 32... - verified
C2Scene_ClearPalette$C2:1DB5 · 31 B · EngineZeroes C2Scene_PaletteBuf (512 B, $0920-$0B1F: every color black) and the 16 bytes after it, C2Scene_Unk0B20 ($0B20-$0B2F), a word at a time. - verified
C2Scene_TaskUnk1DD4$C2:1DD4 · 100 B · EngineTask handler (palette load). - verified
C2Scene_TaskPalFade$C2:1E38 · 9 B · EngineTask handler (palette fade, started by C2Scene_TaskUnk1DD4): runs .State through C2Scene_PalFadeStates: 0 C2Scene_PalFadeStart, 1 C2Scene_PalFadeStep, 2 C2Scene_PalFadeEnd. - verified
C2Scene_PalFadeStates$C2:1E41 · 6 B · EngineThe state handlers of C2Scene_TaskPalFade (X = .State * 2). - verified
C2Scene_PalFadeStart$C2:1E47 · 63 B · EngineState 0: .State = 1; counts itself in C2Scene_Unk0B20 for .ArgPalette; copies the arguments to .Palette, .Rate, .Src and .SrcBank (the step arrays will overwrite them); .Timer = 0, .Steps = 0... - verified
C2Scene_PalFadeStep$C2:1E86 · 47 B · EngineState 1, each frame: if C2Scene_Unk0B20 for the palette is not 1 (another palette task has started on it) it goes to C2Scene_PalFadeEnd (BNE into it) and the fade stops where it is. - verified
C2Scene_PalFadeEnd$C2:1EB5 · 11 B · EngineState 2 (and C2Scene_PalFadeStep's give-up): takes the task out of C2Scene_Unk0B20 for its palette and ends it (C=1). - verified
C2Scene_PalFadePlan$C2:1EC0 · 81 B · EnginePlans a fade: for each of the 16 colors, from the palette's current color (.Colors, through DB) to the new one (.Src/.SrcBank, long), sets the color's red, green and blue count bytes in .RedStep... - verified
C2Scene_PalFadePlanColor$C2:1F11 · 116 B · EngineFor one color: per channel (red: bits 0-4, green: bits 5-9, blue: bits 10-14), d = new - current (-31..31) gives the count byte: 0 when equal, d when rising, or C2Scene_FadeDownFlag OR (-d +... - verified
C2Scene_PalFadeApply$C2:1F85 · 71 B · EngineTakes one fade step on all 16 colors of the palette at .Colors: each color is read, stepped (C2Scene_PalFadeStepColor) and written back (through DB). - verified
C2Scene_PalFadeStepColor$C2:1FCC · 150 B · EngineOne fade step of one color (C2Scene_FadeCur): for each channel's count byte c (red, green, blue): 0 leaves the channel; a rising count moves the channel up one when C2Scene_PalFadeStepTable[c] is...
Bank $C2 · $C2:2000–$2FFF
$C2:2000
Verified · 82
- verified
C2Scene_PalFadeStepTable$C2:2062 · 64 B · EngineIndexed by a fade count 0-63 (C2Scene_PalFadeStepColor): 1 = move the channel this step (counts 32-63), 0 = not yet (0-31). - verified
C2Scene_TaskUnk20A2$C2:20A2 · 9 B · EngineTask handler (fade out, op $28): runs .State through C2Scene_FadeOutStates: 0 C2Scene_FadeOutStart, 1 C2Scene_FadeOutStep. - verified
C2Scene_FadeOutStates$C2:20AB · 4 B · EngineThe state handlers of C2Scene_TaskUnk20A2 (X = .State * 2). - verified
C2Scene_FadeOutStart$C2:20AF · 48 B · EngineState 0: if a fade-out already runs (C2Scene_FadeOutBusy) the task just ends. - verified
C2Scene_FadeOutStep$C2:20DF · 38 B · EngineState 1, each frame: once .Timer reaches .Rate it zeroes .Timer's low byte and takes C2Scene_Brightness down one. - verified
C2Scene_TaskUnk2105$C2:2105 · 9 B · EngineTask handler (fade in, op $29): runs .State through C2Scene_FadeInStates: 0 C2Scene_FadeInStart, 1 C2Scene_FadeInUnblank, 2 C2Scene_FadeInStep, 3 C2Scene_FadeInEnd. - verified
C2Scene_FadeInStates$C2:210E · 8 B · EngineThe state handlers of C2Scene_TaskUnk2105 (X = .State * 2). - verified
C2Scene_FadeInStart$C2:2116 · 60 B · EngineState 0: if any fade runs (C2Scene_Unk1BF6 non-zero) it ends through C2Scene_FadeInEnd. - verified
C2Scene_FadeInUnblank$C2:2152 · 29 B · EngineState 1: ends (C2Scene_FadeInEnd) if a fade-out has started. - verified
C2Scene_FadeInStep$C2:216F · 30 B · EngineState 2: ends (C2Scene_FadeInEnd) if a fade-out has started. - verified
C2Scene_FadeInEnd$C2:218D · 7 B · EngineState 3, and where the other fade-in states end: clears C2Scene_FadeInBusy and ends the task (C=1). - verified
C2Scene_TaskUnk2194$C2:2194 · 15 B · EngineTask handler (mosaic shrink, op $2B): runs .State through C2Scene_MosaicOutStates: 0 C2Scene_MosaicOutStart, 1 C2Scene_MosaicOutStep. - verified
C2Scene_MosaicOutStates$C2:21A3 · 4 B · EngineThe state handlers of C2Scene_TaskUnk2194 (X = .State * 2). - verified
C2Scene_MosaicOutStart$C2:21A7 · 47 B · EngineState 0: .State = 1; ORs op $2B's arg 1 into C2Scene_MosaicShadow (the BGs to apply it to, bits 0-3); arg 2 is the frames per step: 0 sets the size to 0 at once (keeping the BG bits) and ends. - verified
C2Scene_MosaicOutStep$C2:21D6 · 34 B · EngineState 1: once .Timer reaches .Rate, .Timer's low byte = 0 and the mosaic size (C2Scene_MosaicShadow bits 4-7) goes down one; when it is already 0 the task ends (C=1) instead. - verified
C2Scene_TaskUnk21F8$C2:21F8 · 13 B · EngineTask handler (mosaic grow, op $2A): runs .State through C2Scene_MosaicInStates: 0 C2Scene_MosaicInStart, 1 C2Scene_MosaicInStep. - verified
C2Scene_MosaicInStates$C2:2205 · 4 B · EngineThe state handlers of C2Scene_TaskUnk21F8 (X = .State * 2). - verified
C2Scene_MosaicInStart$C2:2209 · 47 B · EngineState 0: as C2Scene_MosaicOutStart (op $2A's arg 1 ORed into C2Scene_MosaicShadow, arg 2 the frames per step), but rate 0 sets the size to the largest (C2Scene_MosaicSizeMask: 16x16 blocks) at once. - verified
C2Scene_MosaicInStep$C2:2238 · 34 B · EngineState 1: once .Timer reaches .Rate, .Timer's low byte = 0 and the mosaic size goes up one; when that makes it the largest ($F0) the task ends (C=1). - verified
Trig_Cos1024$C2:225A · 4 B · EngineSigned sine or cosine of a 16-bit angle with 1024 steps per turn, read from !Rom_SineTable: A = sin(angle) × 255 (−255..+255; the table holds |sin| as one byte per step, negated for the second... - verified
Trig_Sin1024$C2:225E · 21 B · Engine - verified
C2Scene_Unk2273$C2:2273 · 4 B · EngineThe cosine of direction A (adds a quarter turn and falls into the sub-entry C2Scene_Unk2277, $C2:2277, the sine). - verified
C2Scene_Unk2277$C2:2277 · 38 B · Engine - verified
C2Scene_Unk229D$C2:229D · 144 B · EngineThe direction (0-255) from the point (C2Tmp_08, C2Tmp_0A) to the point (C2Tmp_0C, C2Tmp_0E) on the scene's wrapping map: each difference that is half the map or more (Y 512 of 1024, X 768 of 1536... - verified
C2Scene_ClearUnk1B30$C2:232D · 9 B · EngineZeroes the two bytes right after the task records, C2Scene_Unk1B30 and C2Scene_Unk1B31 (their use is not traced). - verified
C2Scene_Random$C2:2336 · 15 B · EngineReturns the next byte of RandomTable ($C0:FE00): the one at index C2Scene_Unk1B30, which then goes up by one (wrapping at 256). - verified
C2Scene_BoxesOverlap$C2:2345 · 99 B · EngineTests whether two boxes overlap. - verified
C2Scene_Main$C2:23A8 · 39 B · EngineThe scene mode's main program, entered once from BankC2_SceneBoot. - verified
C2Scene_MainLoop$C2:23CF · 12 B · Engine - verified
C2Scene_ModeTable$C2:23DB · 20 B · EngineC2Scene_MainLoop's handler for each C2Scene_Mode value 0-9. - verified
C2Scene_ModeIdle$C2:23EF · 19 B · EngineC2Scene_Mode 0, 1 and 7: if a sound command is pending (C2Scene_SoundCmdState), sends it with Audio_DriverCommand as C2Scene_WaitFrames does; then back to C2Scene_MainLoop. - verified
C2Scene_Mode3$C2:2402 · 211 B · EngineMode 3: acts on the C2Scene_ListA entry at byte offset C2Scene_Unk1B32 (probably an exit the player has reached): - its .Loc is C2Scene_ListANoLoc: starts the script whose address is word .EntryX... - verified
C2Scene_Mode2$C2:24D5 · 52 B · EngineMode 2 (set by script op $05) and the end of C2Scene_Mode3: leaves the scene. - verified
C2Scene_TurnAround$C2:2509 · 4 B · EngineFacing 0-3 -> the opposite facing (the facing EOR 1). - verified
C2Scene_Mode4$C2:250D · 17 B · EngineMode 4: interrupts, NMI, DMA and HDMA off, the flag tail copied back (C2Scene_RestoreFlagTail), and again, for good: it never leaves (probably waits for a reset; C2Scene_TrigListC sets mode 4). - verified
C2Scene_Mode5$C2:251E · 111 B · EngineModes 5 (C2Scene_ModeMenu) and 9: run the menu over the scene. - verified
C2Scene_Mode6$C2:258D · 144 B · EngineMode 6: runs C2Scene_MapView (it sets BG mode 7 and runs its own tasks until the mode changes from 6: probably a mode-7 view) between a mosaic fade out and in. - verified
C2Scene_Mode8$C2:261D · 139 B · EngineMode 8: runs C2Scene_Dial (it clears VRAM and the tasks itself) over a saved scene. - verified
C2Scene_ClearVram$C2:26A8 · 44 B · EngineZeroes all of VRAM with one DMA on channel 7: word writes to VMDATAL/H from the fixed source C2Scene_ZeroWord, VRAM address 0, a byte count of 0 (= 65536 bytes). - verified
C2Scene_ZeroWord$C2:26D4 · 2 B · EngineThe fixed DMA source of C2Scene_ClearVram. - verified
C2Scene_SaveFlagTail$C2:26D6 · 26 B · EngineCopies the last 16 bytes of Menu_FlagBlock7F ($7F:01F0-$01FF) to C2Scene_FlagTailCopy and its first byte (Eng_Unk7F0000) to C2Scene_Flag0Copy. - verified
C2Scene_RestoreFlagTail$C2:26F0 · 19 B · EngineCopies C2Scene_FlagTailCopy (16 bytes) back to $7F:01F0-$01FF, the end of Menu_FlagBlock7F (C2Scene_Flag0Copy is not written back). - verified
C2Scene_SetStartPos$C2:2703 · 29 B · EngineC2Scene_StartX/Y = the field's entry tile (Loc_EntryX/Y, in the field's direct page at $0100) times 8: probably the start position in pixels (inferred only from the scaling). - verified
C2Scene_SetStartScroll$C2:2720 · 45 B · EnginePuts the entry tile (Loc_EntryX/Y) in the middle of the screen: C2Scene_BgTileX (both words) = Loc_EntryX - 16, plus 192 if that is negative; C2Scene_BgTileY (both words) = Loc_EntryY - 14, plus... - verified
C2Scene_GetHeaderPtr$C2:274D · 27 B · EngineC2Scene_HeaderPtr = $C6:(the word of C2SceneRom_HeaderTable for scene (Loc_Id AND C2Scene_LocIdMask) - Loc_FirstBankC2). - verified
C2Scene_LoadObjGfx$C2:2768 · 84 B · EngineUnpacks the scene's C2Scene_ObjPackCount sprite graphics packs (header bytes C2Scene_HdrObjGfx..+3, C2SceneRom_ObjPacks) into C2Scene_DecompBuf, C2Scene_PackSlotSize bytes apart (C2Scene_LoadVram... - verified
C2Scene_LoadUnkC800$C2:27BC · 34 B · EngineUnpacks entry C2Scene_UnkC800Pack of C2SceneRom_ObjPacks (the same for every scene) to C2Scene_UnkC800 ($7E:C800); what it holds is not traced. - verified
C2Scene_LoadBgGfx$C2:27DE · 72 B · EngineUnpacks the scene's C2Scene_BgPackCount BG graphics packs (header bytes C2Scene_HdrBgGfx..+6, C2SceneRom_BgPacks) into C2Scene_DecompBuf, C2Scene_PackSlotSize bytes apart ($7F:9000-$FFFF... - verified
C2Scene_LoadBg3Gfx$C2:2826 · 46 B · EngineUnpacks header byte C2Scene_HdrBg3Gfx's C2SceneRom_BgPacks entry into C2Scene_DecompBuf (C2Scene_LoadVram DMAs it to the BG3 tiles at VRAM $7000). - verified
C2Scene_LoadBg3Map$C2:2854 · 46 B · EngineUnpacks header byte C2Scene_HdrBg3Map's C2SceneRom_Bg3MapPacks entry into C2Scene_DecompBuf (C2Scene_LoadVram DMAs it to the BG3 tilemap at VRAM $7800). - verified
C2Scene_LoadPalettes$C2:2882 · 107 B · EngineUnpacks the scene's palettes (header byte C2Scene_HdrPalettes, C2SceneRom_PalettePacks) into C2Scene_PaletteStage, then the party palettes (entry C2Scene_PartyPalPack) into C2Scene_PartyPalSrc... - verified
C2Scene_CopyPartyPalette$C2:28ED · 21 B · EngineCopies C2Scene_PartyPalSize bytes of character A's palette (C2Scene_PartyPalSrc + 32 * A) to Y in bank $7F. - verified
C2Scene_LoadUnkB800$C2:2902 · 46 B · EngineUnpacks header byte C2Scene_HdrUnkB800's C2SceneRom_BgPacks entry into C2Scene_UnkB800 ($7E:B800); what it holds is not traced. - verified
C2Scene_LoadUnkC000$C2:2930 · 46 B · EngineUnpacks header byte C2Scene_HdrUnkC000's C2SceneRom_PalettePacks entry into C2Scene_UnkC000 ($7E:C000); what it holds is not traced (probably more palettes, from the table it uses). - verified
C2Scene_LoadMetatiles$C2:295E · 46 B · EngineUnpacks header byte C2Scene_HdrMetatiles's C2SceneRom_MetatilePacks entry into C2Scene_Metatiles ($7E:3000), the metatile set of layer 1 (and probably of layer 2 at $7E:3800; see... - verified
C2Scene_LoadBgMaps$C2:298C · 46 B · EngineUnpacks header byte C2Scene_HdrMaps's C2SceneRom_MapPacks entry into C2Scene_BgMaps ($7E:4000), layer 1's metatile map (and probably layer 2's at $7E:5800; see C2Scene_LayerMaps). - verified
C2Scene_LoadUnk7000$C2:29BA · 46 B · EngineUnpacks header byte C2Scene_HdrUnk7000's C2SceneRom_Unk7000Packs entry into C2Scene_Unk7000 ($7E:7000), which is where C2Scene_LayerMaps puts layer 3's map; what it holds is not traced. - verified
C2Scene_LoadUnk7200$C2:29E8 · 46 B · EngineUnpacks header byte C2Scene_HdrUnk7200's C2SceneRom_Unk7200Packs entry into C2Scene_Unk7200 ($7E:7200); what it holds is not traced. - verified
C2Scene_LoadScript$C2:2A16 · 46 B · EngineUnpacks header byte C2Scene_HdrScript's C2SceneRom_ScriptPacks entry into C2Scene_ScriptBuf ($7F:0400), over the list data C2Scene_LoadLists has already split up. - verified
C2Scene_LoadLists$C2:2A44 · 285 B · EngineUnpacks header byte C2Scene_HdrLists's C2SceneRom_ListPacks entry into C2Scene_ListPack ($7F:0400), then splits it into four lists through WMADD/WMDATA (bank $7E): a count byte, then that many... - verified
C2Scene_LoadPartyGfx$C2:2B61 · 91 B · EngineUnpacks the party graphics (C2SceneRom_ObjPacks entry C2Scene_PartyObjPack, the same for every scene) into C2Scene_DecompBuf, then builds C2Scene_PartyGfx from it: for each party member... - verified
C2Scene_CopyPartyGfx$C2:2BBC · 19 B · EngineCopies C2Scene_PartyGfxSize bytes of character A's graphics (C2Scene_DecompBuf + $400 * A) to Y in bank $7F. - verified
C2Scene_CopyPartyGfxB$C2:2BCF · 44 B · EngineCopies character A's two C2Scene_PartyGfxBSize-byte blocks (C2Scene_PartyGfxSrcB + $40 * A, and C2Scene_PartyGfxBGap bytes further) to Y and Y + C2Scene_PartyGfxBGap in bank $7F. - verified
C2Scene_ClearHdmaArea$C2:2BFB · 34 B · EngineZeroes C2Scene_HdmaArea ($7E:8621-$8E20, 2048 bytes) through WMADD/WMDATA, with DP = $2100 for the register stores. - verified
C2Scene_LoadScene$C2:2C1D · 118 B · EngineThe last setup step of C2Scene_Main: loads the scene and starts its script. - verified
C2Scene_ReloadScene$C2:2C93 · 46 B · EngineLoads the scene's graphics again (scene modes 5 and 8 call it after C2Scene_RestoreState and C2Scene_VramQInit; mode 8 skips it when $7F:01F4 AND $0A or $7F:01F5 AND $02 is non-zero ($C2:265E)... - verified
C2Scene_LoadVram$C2:2CC1 · 175 B · EngineFills VRAM and CGRAM for the scene, each pack staged at C2Scene_DecompBuf and DMAed with C2Scene_DmaToVram: - the four sprite packs (C2Scene_LoadObjGfx) to VRAM $0000 ($4000 B); - the party... - verified
C2Scene_DmaToVram$C2:2D70 · 33 B · EngineDMAs A bytes from X in bank $7F to VRAM word address Y on channel 7 (word writes to VMDATAL/H, VMAIN stepping after the high byte). - verified
C2Scene_LoadLocExtraGfx$C2:2D91 · 146 B · EngineOnce Eng_Unk7F0000 has reached C2Scene_ExtraGfxFlagMin, four scenes get extra graphics: C2Scene_LoadExtraObjPack, then C2Scene_ExtraObjBytes of it DMAed to VRAM $0C00 (Loc_Id $01F0-$01F2) or $0000... - verified
C2Scene_SaveState$C2:2E23 · 79 B · EngineCopies the scene's state to bank $7F with MVN: dp $00-$EF to C2Scene_SaveDp; $0700-$1DFF (with C2Scene_PaletteBuf and the task records) to C2Scene_SaveLowRam; the sprite nodes, link table and list... - verified
C2Scene_RestoreState$C2:2E72 · 79 B · EngineThe reverse of C2Scene_SaveState: copies the six saved blocks from bank $7F back where they came from (the direct page $00-$EF included). - verified
C2Scene_ScrFadeOut$C2:2EC1 · 3 B · EngineFade out at 1 frame per step (op $28, C2Scene_TaskUnk20A2), then end. - verified
C2Scene_ScrFadeIn$C2:2EC4 · 3 B · EngineFade in at 1 frame per step (op $29, C2Scene_TaskUnk2105), then end. - verified
C2Scene_ScrMosaicFadeOut$C2:2EC7 · 9 B · EngineStarted by C2Scene_Mode6: clears the task's fields (op $00), starts a mosaic grow (op $2A) on BG1-3 (arg 1 = 7) at 2 frames per step, waits 16 frames, fades out at 1 frame per step, ends. - verified
C2Scene_ScrMosaicFadeIn$C2:2ED0 · 9 B · EngineStarted by C2Scene_Mode6 on the way back: clears the task's fields, fades in at 1 frame per step, waits 8 frames, starts a mosaic shrink (op $2B) on BG1-3 at 2 frames per step, ends. - verified
C2Scene_QueueSoundCmd$C2:2ED9 · 54 B · EngineQueues the sound command in C2Scene_SoundCmdBuf (command byte and three argument bytes) for the frame loop to send: copies it to the driver block Audio_CmdId-Audio_CmdArg2, keeps its rank... - verified
C2Scene_ZoneSoundAtEntry$C2:2F0F · 63 B · EngineSends C2Scene_SoundCmd10 straight to the driver (Audio_DriverCommand) with the zone sound of the field's entry tile: metatile column Loc_EntryX / 2, row Loc_EntryY / 2 (C2Scene_GetSoundZone... - verified
C2Scene_ZoneSoundAtView$C2:2F4E · 70 B · EngineQueues (C2Scene_QueueSoundCmd) C2Scene_SoundCmd10 with the zone sound of the metatile at the middle of BG1's view: column BgTileX / 2 + 8, row (BgTileY / 2 + 7) AND 63; or with Menu_Config1E's... - verified
C2Scene_TaskZoneSound$C2:2F94 · 9 B · EngineTask handler: runs .State through C2Scene_ZoneSoundStates. - verified
C2Scene_ZoneSoundStates$C2:2F9D · 8 B · EngineC2Scene_TaskZoneSound's handler for each .State. - verified
C2Scene_ZoneSoundInit$C2:2FA5 · 9 B · EngineState 0: .State = 1, C2Scene_SoundZone = C2Scene_ZoneNone; falls into C2Scene_ZoneSoundWatch. - verified
C2Scene_ZoneSoundWatch$C2:2FAE · 142 B · EngineState 1, every frame: - while C2Scene_Unk7F01ED is set: queues C2Scene_SoundCmd10 with Menu_Config1E's byte at rank 0 (again each frame; C2Scene_Unk02AE takes it when queued); - else, only in an...
Bank $C2 · $C2:3000–$3FFF
$C2:3000
Verified · 112
- verified
C2Scene_ZoneSoundWait$C2:303C · 19 B · EngineState 2: once .Timer's low byte (zeroed by C2Scene_ZoneSoundWatch, then one more each frame from C2Scene_TaskRunAll) reaches C2Scene_ZoneFadeFrames: .State = 3 and the new zone's sound is queued... - verified
C2Scene_ZoneSoundResume$C2:304F · 39 B · EngineState 3: unless a command is being sent (C2Scene_SoundCmdState negative), queues C2Scene_SoundCmd81 with 0, C2Scene_SoundArgUnused, C2Scene_SoundArgUnused at rank 0 and sets .State back to 1... - verified
C2Scene_ZoneSoundQueue$C2:3076 · 40 B · EngineQueues C2Scene_SoundCmd10 with the sound of zone C2Scene_SoundZone (C2Scene_ZoneSounds), argument bytes 2-3 C2Scene_SoundArgUnused and C2Scene_SoundArg80, at rank 0; when queued, the sound goes to... - verified
C2Scene_ObjWatch$C2:309E · 35 B · EngineWhile C2Scene_Mode is 0 or 1 and C2Scene_TrigWatch is in its check state (C2Scene_Unk0280 = 0): copies C2Scene_Unk027E to C2Scene_Unk027F and runs its state through C2Scene_ObjWatchStates. - verified
C2Scene_ObjWatchStates$C2:30C1 · 12 B · EngineC2Scene_ObjWatch's handler for each C2Scene_Unk027E state 0-5. - verified
C2Scene_ObjWatchIdle$C2:30CD · 219 B · EngineState 0. - verified
C2Scene_ScrGoToLoc1D8$C2:31A8 · 10 B · EngineScene script (C2Scene_TaskRunScript) started by C2Scene_ObjWatchIdle: fade out, wait, then leave for location $1D8 (op $05 argument word $03D8: Loc_Id $1D8, entry facing 1) at tile (7, 8). - verified
C2Scene_ObjWatchNone$C2:31B2 · 2 B · EngineState 1, and C2Scene_ObjSel 0 and 1 in C2Scene_ObjFullTable and C2Scene_ObjEmptyTable (shared label): nothing; C=0. - verified
C2Scene_ObjWatchBusyA$C2:31B4 · 14 B · EngineStates 2 and 3: wait until object A's (C2Scene_Unk0294) or object B's (C2Scene_ObjBFlags) C2Scene_ObjBusy bit is clear, then state C2Scene_ObjWatchStEmpty. - verified
C2Scene_ObjWatchBusyB$C2:31C2 · 14 B · Engine - verified
C2Scene_ObjWatchFull$C2:31D0 · 34 B · EngineState 4: counts the party members in C2Scene_PartyCount (each Party_Members byte with bit 7 clear; bit 7 is taken to mean an empty slot) and runs C2Scene_ObjSel through C2Scene_ObjFullTable: for... - verified
C2Scene_ObjFullTable$C2:31F2 · 8 B · EngineC2Scene_ObjWatchFull's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_ObjFullNone$C2:31FA · 2 B · EngineNo object selected: nothing; C=0. - verified
C2Scene_ObjFullA$C2:31FC · 16 B · EngineObject A's (C2Scene_Unk0294) or B's (C2Scene_ObjBFlags) count equal to C2Scene_PartyCount: state C2Scene_ObjWatchStBusyA or C2Scene_ObjWatchStBusyB. - verified
C2Scene_ObjFullB$C2:320C · 16 B · Engine - verified
C2Scene_ObjWatchEmpty$C2:321C · 8 B · EngineState 5: runs C2Scene_ObjSel through C2Scene_ObjEmptyTable: when the selected object's count is 0, back to state C2Scene_ObjWatchStIdle with no object selected. - verified
C2Scene_ObjEmptyTable$C2:3224 · 8 B · EngineC2Scene_ObjWatchEmpty's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_ObjEmptyNone$C2:322C · 2 B · EngineNo object selected: nothing; C=0. - verified
C2Scene_ObjEmptyA$C2:322E · 15 B · EngineObject A's (C2Scene_Unk0294) or B's (C2Scene_ObjBFlags) count at 0: C2Scene_Unk027E = C2Scene_ObjWatchStIdle and C2Scene_ObjSel = 0. - verified
C2Scene_ObjEmptyB$C2:323D · 15 B · Engine - verified
C2Scene_PartyBox$C2:324C · 8 B · EngineC2Scene_BoxesOverlap extents (left, right, up, down) of the party in C2Scene_ObjWatchIdle: 8 each way. - verified
C2Scene_ObjABox$C2:3254 · 8 B · EngineExtents of object A: only 8 down from its position. - verified
C2Scene_ObjBBox$C2:325C · 8 B · EngineExtents of object B: the same as object A's. - verified
C2Scene_TrigWatch$C2:3264 · 17 B · EngineCopies its state C2Scene_Unk0280 to C2Scene_Unk0281 and runs it through C2Scene_TrigWatchStates (0: C2Scene_TrigWatchCheck, C2Scene_TrigStWait: C2Scene_TrigWatchWait). - verified
C2Scene_TrigWatchStates$C2:3275 · 4 B · EngineC2Scene_TrigWatch's handler for each C2Scene_Unk0280 state. - verified
C2Scene_TrigWatchCheck$C2:3279 · 62 B · EngineState 0. - verified
C2Scene_TrigWatchWait$C2:32B7 · 22 B · EngineState C2Scene_TrigStWait (set when a ListB script starts): once C2Scene_Unk1B43 is non-zero, back to state 0 with the three C2Scene_Unk1B32 words at C2Scene_Unk1B32Init. - verified
C2Scene_FindTrigEntries$C2:32CD · 124 B · EngineFor C2Scene_ListA, ListB and ListC in turn: the byte offset of the first entry that has C2Scene_ListEntryBit7 set and whose first word AND C2Scene_ListTileMask equals C2Scene_TrigTile, or... - verified
C2Scene_TrigDispatch$C2:3349 · 53 B · EngineZeroes C2Scene_Unk1B58, builds C2Scene_TrigFound from which of the three C2Scene_Unk1B32 words is not C2Scene_NoEntry (bit 7 of the high byte clear): C2Scene_TrigFoundA (ListA), C2Scene_TrigFoundC... - verified
C2Scene_TrigActions$C2:337E · 16 B · EngineC2Scene_TrigDispatch's action for each C2Scene_TrigFound mask: ListB wins over ListA's task byte, ListA over ListC's mode. - verified
C2Scene_TrigNone$C2:338E · 1 B · EngineNo entry at the tile: nothing. - verified
C2Scene_TrigListA$C2:338F · 11 B · EngineA ListA entry (and no ListB one): the current task's .Unk02 (C2Scene_TaskCur) = C2Scene_TrigTaskState1, and the entry's .Unk02 to C2Scene_Unk1B58 (C2Scene_GetListAUnk02). - verified
C2Scene_TrigListC$C2:339A · 16 B · EngineA ListC entry only: the current task's .Unk02 = C2Scene_TrigTaskState1, a ListC byte to C2Scene_Unk1B47 (C2Scene_GetListCUnk03), and scene mode C2Scene_ModeHalt (C2Scene_Mode4, which never leaves). - verified
C2Scene_TrigListB$C2:33AA · 42 B · EngineA ListB entry (and no ListA one): starts its C2Scene_ListD script (C2Scene_GetListBScript; bank $7F, as C2Scene_Mode3 does), zeroes C2Scene_MemberWords, clears the entry's C2Scene_ListEntryBit7... - verified
C2Scene_TrigListAB$C2:33D4 · 48 B · EngineA ListA and a ListB entry: the ListA entry's .Unk02 to C2Scene_Unk1B58 (C2Scene_GetListAUnk02), then as C2Scene_TrigListB, and C2Scene_Unk1B43 = 0. - verified
C2Scene_LeaderTask$C2:3404 · 41 B · EngineTask handler. - verified
C2Scene_LeaderStates$C2:342D · 12 B · EngineC2Scene_LeaderTask's handler for each C2Scene_Unk027E state 0-5. - verified
C2Scene_LeaderWalk$C2:3439 · 36 B · EngineObjWatch state 0. - verified
C2Scene_LeaderWalkSteps$C2:345D · 16 B · EngineC2Scene_LeaderWalk's handler per C2Scene_Unk0280 state (4 words each) and .State. - verified
C2Scene_LeaderOnObjA$C2:346D · 12 B · EngineObjWatch state 2 (C2Scene_ObjWatchStBusyA): the party's position C2Scene_StartX/Y = object A's (C2Scene_ObjAX/Y), every frame; then falls into C2Scene_LeaderNone. - verified
C2Scene_LeaderNone$C2:3479 · 2 B · EngineObjWatch state 1, and the end of C2Scene_LeaderOnObjA: nothing; C=0. - verified
C2Scene_LeaderOnObjB$C2:347B · 14 B · EngineObjWatch state 3 (C2Scene_ObjWatchStBusyB): as C2Scene_LeaderOnObjA with object B (C2Scene_ObjBX/Y). - verified
C2Scene_LeaderBoard$C2:3489 · 10 B · EngineObjWatch state 4 (C2Scene_ObjWatchStFull): runs entry .State of C2Scene_LeaderBoardSteps (walk to the selected object, then count in). - verified
C2Scene_LeaderBoardSteps$C2:3493 · 8 B · EngineC2Scene_LeaderBoard's handler for .State 0-3. - verified
C2Scene_LeaderLeave$C2:349B · 8 B · EngineObjWatch state 5 (C2Scene_ObjWatchStEmpty): runs entry C2Scene_ObjSel of C2Scene_LeaderLeaveTable. - verified
C2Scene_LeaderLeaveTable$C2:34A3 · 8 B · EngineC2Scene_LeaderLeave's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_LeaderLeaveNone$C2:34AB · 2 B · EngineNo object selected: nothing; C=0. - verified
C2Scene_LeaderLeaveA$C2:34AD · 32 B · EngineLeaving object A (B): .State = 0, the sprite and C2Scene_StartX/Y at the object's position (C2Scene_ObjAX/Y, C2Scene_ObjBX/Y), one off the object's flags byte (C2Scene_Unk0294, C2Scene_ObjBFlags... - verified
C2Scene_LeaderLeaveB$C2:34CD · 43 B · Engine - verified
C2Scene_LeaderInit$C2:34F8 · 111 B · EngineStep 0 of TrigWatch state 0: sets the sprite up and falls into C2Scene_LeaderInput. - verified
C2Scene_LeaderInput$C2:3567 · 390 B · EngineStep 1 of TrigWatch state 0: reads the held buttons (Pad_Unk00F8 and the D-pad in Pad_Unk00F9) in scene mode C2Scene_ModeIdle1 only (in mode 0 it only animates). - verified
C2Scene_LeaderStep$C2:36ED · 133 B · EngineStep 2 of TrigWatch state 0, one frame of a step: moves the sprite (C2Scene_TaskMove, C2Scene_WrapTaskPos); scrolls BG layers 1 and 2 by .XVel pixels across (C2Scene_Unk0568) and by .YVel pixels... - verified
C2Scene_LeaderScriptStart$C2:3772 · 47 B · EngineStep 0 of TrigWatch state C2Scene_TrigStWait: while the first C2Scene_MemberWords word is 0, nothing. - verified
C2Scene_LeaderScriptRun$C2:37A1 · 26 B · EngineStep 1 of TrigWatch state C2Scene_TrigStWait: runs the script (C2Scene_TaskRunScript); when it ends (C=1) .State = 2 instead of the task ending. - verified
C2Scene_LeaderScriptDone$C2:37BB · 2 B · EngineStep 2 of TrigWatch state C2Scene_TrigStWait (the script has ended): nothing until a watcher's state changes; C=0. - verified
C2Scene_LeaderBoardStart$C2:37BD · 13 B · EngineStep 0 of ObjWatch state 4: the target (.TargetX/Y) = the selected object's position (C2Scene_ObjAX/Y or C2Scene_ObjBX/Y, by C2Scene_ObjSel through C2Scene_LeaderBoardTargets); the four velocity... - verified
C2Scene_LeaderBoardTargets$C2:37CA · 8 B · EngineC2Scene_LeaderBoardStart's code for C2Scene_ObjSel 0-3. - verified
C2Scene_LeaderBoardSel0$C2:37D2 · 4 B · Engine - verified
C2Scene_LeaderBoardSel1$C2:37D6 · 2 B · Engine - verified
C2Scene_LeaderBoardObjA$C2:37D8 · 16 B · Engine - verified
C2Scene_LeaderBoardObjB$C2:37E8 · 79 B · Engine - verified
C2Scene_LeaderBoardY$C2:3837 · 142 B · EngineStep 1 of ObjWatch state 4: moves the sprite (C2Scene_TaskMove, C2Scene_WrapTaskPos); C2Scene_StartX/Y and Loc_EntryX/Y from the position (C2Scene_SetEntryTile); BG layers 1 and 2 scrolled by... - verified
C2Scene_LeaderBoardX$C2:38C5 · 85 B · EngineStep 2 of ObjWatch state 4: moves the sprite (C2Scene_TaskMove, C2Scene_WrapTaskPos); at the target's X, .State = 3 and the object's count goes up by one (C2Scene_ObjCountUp). - verified
C2Scene_LeaderBoardDone$C2:391A · 2 B · EngineStep 3 of ObjWatch state 4 (counted in): nothing; C=0. - verified
C2Scene_TrailFill$C2:391C · 24 B · EngineFills all C2Scene_TrailLen entries of C2Scene_TrailX/Y with C2Scene_StartX/Y. - verified
C2Scene_TrailPush$C2:3934 · 31 B · EngineStores the task's .SprX/.SprY at C2Scene_TrailPos in C2Scene_TrailX/Y and moves C2Scene_TrailPos one word on (wrapping after 16). - verified
C2Scene_SetWalkAnim$C2:3953 · 44 B · EngineStarts the walk animation of the task's facing: entry .Facing * 2 (bit 7 shifted out) + .Unk26 bit 0 of C2Scene_WalkAnims, C2Scene_AltAnimOfs further on when C2Scene_AnimChar is... - verified
C2Scene_WalkAnims$C2:397F · 8 B · EngineWalk animation numbers (C2Scene_SetAnim), two per facing: up, down, left, right. - verified
C2Scene_SetStandAnim$C2:3987 · 35 B · EngineStarts the stand animation of the task's facing: entry .Facing AND C2Scene_FacingMask of C2Scene_StandAnims, C2Scene_AltAnimOfs further on for C2Scene_AltAnimChar, as C2Scene_SetWalkAnim. - verified
C2Scene_StandAnims$C2:39AA · 4 B · EngineStand animation numbers per facing: up, down, left, right. - verified
C2Scene_OnTrigTiles$C2:39AE · 21 B · EngineC=1 when both upper property nibbles (.PropUL, .PropUR) have bit 2 set (C2Scene_TilePropTrig); the leader's callers then set C2Scene_TrigRecheck and C2Scene_TrigKeep, and C2Scene_ObjBFly does not... - verified
C2Scene_TileBlocked$C2:39C3 · 18 B · EngineC=1 when either upper property nibble (.PropUL, .PropUR) has bit 0 or 1 set (C2Scene_TilePropWall): the step is not taken. - verified
C2Scene_GetTileProps$C2:39D5 · 129 B · EngineReads the property nibbles of the four 8x8 tiles around the pixel point (C2Scene_PropX, C2Scene_PropY) into the task's .PropUL-.PropDR (C2Scene_GetTileProp, with BG2's metatile map at $7E:5800 and... - verified
C2Scene_SetStepTarget$C2:3A56 · 57 B · Engine.TargetX/Y = the task's position, moved C2Scene_TilePx (8) pixels in the direction of each non-zero whole-pixel velocity (.XVel, .YVel; minus for a negative one). - verified
C2Scene_WrapStepTarget$C2:3A8F · 34 B · EngineWraps .TargetX/Y into the scene map as C2Scene_WrapTaskPos does the position: X + or - C2Scene_MapWidthPx (once), Y AND C2Scene_MapHeightMask. - verified
C2Scene_ObjCountUp$C2:3AB1 · 9 B · EngineAdds one to the selected object's flags byte (its count, C2Scene_ObjCountMask): C2Scene_Unk0294 for C2Scene_ObjSelA, C2Scene_ObjBFlags for C2Scene_ObjSelB, nothing for 0 and 1. - verified
C2Scene_ObjCountUpTable$C2:3ABA · 8 B · EngineC2Scene_ObjCountUp's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_ObjCountUpNone$C2:3AC2 · 1 B · Engine - verified
C2Scene_ObjCountUpA$C2:3AC3 · 4 B · Engine - verified
C2Scene_ObjCountUpB$C2:3AC7 · 4 B · Engine - verified
C2Scene_SetEntryTile$C2:3ACB · 23 B · EngineLoc_EntryX/Y = C2Scene_StartX/Y / 8 (the party's 8x8 tile; the inverse of C2Scene_SetStartPos). - verified
C2Scene_MemberTask$C2:3AE2 · 45 B · EngineTask handler. - verified
C2Scene_MemberStates$C2:3B0F · 12 B · EngineC2Scene_MemberTask's handler for each C2Scene_Unk027E state 0-5. - verified
C2Scene_MemberWalk$C2:3B1B · 61 B · EngineObjWatch state 0. - verified
C2Scene_MemberWalkSteps$C2:3B58 · 16 B · EngineC2Scene_MemberWalk's handler per C2Scene_Unk0280 state (4 words each) and .State. - verified
C2Scene_MemberNone$C2:3B68 · 2 B · EngineObjWatch states 1-3: nothing (the member stays where it is while the object is busy); C=0. - verified
C2Scene_MemberBoard$C2:3B6A · 10 B · EngineObjWatch state 4 (C2Scene_ObjWatchStFull): runs entry .State of C2Scene_MemberBoardSteps. - verified
C2Scene_MemberBoardSteps$C2:3B74 · 8 B · EngineC2Scene_MemberBoard's handler for .State 0-3. - verified
C2Scene_MemberLeave$C2:3B7C · 8 B · EngineObjWatch state 5 (C2Scene_ObjWatchStEmpty): runs entry C2Scene_ObjSel of C2Scene_MemberLeaveTable. - verified
C2Scene_MemberLeaveTable$C2:3B84 · 8 B · EngineC2Scene_MemberLeave's handler for C2Scene_ObjSel 0-3. - verified
C2Scene_MemberLeaveNone$C2:3B8C · 2 B · EngineNo object selected: nothing; C=0. - verified
C2Scene_MemberLeaveA$C2:3B8E · 26 B · EngineLeaving object A: .State = 0, the sprite at C2Scene_ObjAX/Y, one off C2Scene_Unk0294 (the object's count), every frame of the state, as C2Scene_LeaderLeaveA but without C2Scene_StartX/Y, .Unk26... - verified
C2Scene_MemberLeaveB$C2:3BA8 · 26 B · EngineC2Scene_MemberLeaveA for object B (C2Scene_ObjBX/Y, C2Scene_ObjBFlags). - verified
C2Scene_MemberInit$C2:3BC2 · 119 B · EngineStep 0 of TrigWatch state 0: sets the sprite up and falls into C2Scene_MemberFollow. - verified
C2Scene_MemberFollow$C2:3C39 · 161 B · EngineStep 1 of TrigWatch state 0: decides the next move. - verified
C2Scene_MemberMoveX$C2:3CDA · 97 B · EngineStep 2 of TrigWatch state 0, a leg in X. - verified
C2Scene_MemberMoveY$C2:3D3B · 97 B · EngineStep 3 of TrigWatch state 0: C2Scene_MemberMoveX with the axes swapped (.SprY, .TargetY; the next leg is in X: .State 2, C2Scene_MemberXLeg). - verified
C2Scene_MemberScriptStart$C2:3D9C · 37 B · EngineStep 0 of TrigWatch state C2Scene_TrigStWait: as C2Scene_LeaderScriptStart with the member's own word, C2Scene_MemberWords + .Slot * 2 (no tile property read here). - verified
C2Scene_MemberScriptRun$C2:3DC1 · 34 B · EngineStep 1 of TrigWatch state C2Scene_TrigStWait: runs the script; when it ends, .State = 2. - verified
C2Scene_MemberScriptDone$C2:3DE3 · 2 B · EngineStep 2 of TrigWatch state C2Scene_TrigStWait: nothing; C=0. - verified
C2Scene_MemberBoardStart$C2:3DE5 · 50 B · EngineStep 0 of ObjWatch state 4: the target is the party's position on its 8x8 tile (C2Scene_MemberLeaderTarget); route, first leg, facing and walk animation as C2Scene_MemberFollow plans them; .Frames... - verified
C2Scene_MemberBoardX$C2:3E17 · 100 B · EngineStep 1 of ObjWatch state 4, a leg in X: moves until .SprX = .TargetX. - verified
C2Scene_MemberBoardY$C2:3E7B · 100 B · EngineStep 2 of ObjWatch state 4: C2Scene_MemberBoardX with the axes swapped (.SprY, .TargetY; the next leg is in X: .State 1, C2Scene_MemberXLeg). - verified
C2Scene_MemberBoardDone$C2:3EDF · 2 B · EngineStep 3 of ObjWatch state 4 (counted in): nothing; C=0. - verified
C2Scene_LeaderNear16$C2:3EE1 · 70 B · EngineC=1 when the party's position (C2Scene_StartX/Y) is within C2Scene_NearLo16 pixels before and C2Scene_NearHi16 - 1 after the member's .SprX/.SprY on both axes (unsigned compares, so the box does... - verified
C2Scene_LeaderNear32$C2:3F27 · 70 B · EngineC2Scene_LeaderNear16 with C2Scene_NearLo32 / C2Scene_NearHi32 (32 pixels). - verified
C2Scene_MemberTrailTarget$C2:3F6D · 39 B · Engine.TargetX/Y = a trail entry: the last one C2Scene_TrailPush wrote (C2Scene_TrailPos - 2) for slot 1 (.Slot bit 0), the one before it (- 4) otherwise. - verified
C2Scene_MemberLeaderTarget$C2:3F94 · 19 B · Engine.TargetX/Y = C2Scene_StartX/Y AND C2Scene_TileSnapMask (the start of the party's 8x8 tile). - verified
C2Scene_MemberDelta$C2:3FA7 · 21 B · Engine.DeltaX/Y = .TargetX/Y - .SprX/Y. - verified
C2Scene_MemberRoute$C2:3FBC · 44 B · EnginePlans .Route from the member's position to its target. - verified
C2Scene_MemberRouteTable$C2:3FE8 · 8 B · EngineC2Scene_MemberRoute's handler for each C2Scene_PathBlocked result 0-3. - verified
C2Scene_MemberRouteOpen$C2:3FF0 · 92 B · Engine
Bank $C2 · $C2:4000–$4FFF
$C2:4000
Verified · 57
- verified
C2Scene_MemberRouteYFirst$C2:404C · 10 B · Engine - verified
C2Scene_MemberRouteXFirst$C2:4056 · 10 B · Engine - verified
C2Scene_MemberRouteTrail$C2:4060 · 132 B · Engine - verified
C2Scene_FaceVelocity$C2:40E4 · 65 B · Engine.PrevFacing = .Facing's direction; .Facing keeps only C2Scene_WalkMoving and gets the direction of the whole-pixel velocity: left / right for a negative / positive .XVel, else up / down for .YVel. - verified
C2Scene_MemberFirstLeg$C2:4125 · 19 B · EngineSets the velocity of the route's first leg: C2Scene_MemberYLeg for a C2Scene_RouteYFirst route, else C2Scene_MemberXLeg. - verified
C2Scene_MemberXLeg$C2:4138 · 26 B · EngineA leg in X: .XVel = -1 for a negative .DeltaX, else +1; .XVelFrac, .YVel and .YVelFrac 0. - verified
C2Scene_MemberYLeg$C2:4152 · 26 B · EngineC2Scene_MemberXLeg for Y: .YVel = -1 / +1 by .DeltaY, the other three velocity words 0. - verified
C2Scene_MemberStand$C2:416C · 24 B · EngineNot moving (.Facing loses C2Scene_WalkMoving) and the stand animation of the member's character (the Party_Members byte of .Slot; C2Scene_SetStandAnim, tail call). - verified
C2Scene_MemberWalkAnim$C2:4184 · 49 B · EngineZeroes the member's idle count (C2Scene_IdleFrames + .Slot) and starts the walk animation (C2Scene_SetWalkAnim) unless it already runs for an unchanged direction (.Facing = .PrevFacing with... - verified
C2Scene_PathBlocked$C2:41B5 · 80 B · EngineTests the two one-turn paths between 8x8 tiles (C2Scene_RouteFromX, C2Scene_RouteFromY) and (C2Scene_RouteToX, C2Scene_RouteToY) for wall tiles: C2Scene_PathXYBlocked when the path along the row... - verified
C2Scene_ScanRow$C2:4205 · 85 B · EngineWalks C2Scene_ScanX one column at a time to C2Scene_ScanEnd along tile row C2Scene_ScanY - 1 (the row above the point, as the leader's .PropUL/UR), testing each new column's property nibble... - verified
C2Scene_ScanCol$C2:425A · 131 B · EngineC2Scene_ScanRow down or up a column: C2Scene_ScanY (and C2Scene_ScanEnd) are taken one row up, then C2Scene_ScanY walks to C2Scene_ScanEnd testing the two tiles of each new row at columns... - verified
C2Scene_ObjATask$C2:42DD · 9 B · EngineTask handler: runs the C2Scene_ObjAStates handler of .State. - verified
C2Scene_ObjAStates$C2:42E6 · 18 B · EngineC2Scene_ObjATask's handler for each .State 0-8. - verified
C2Scene_ObjAInit$C2:42F8 · 211 B · EngineState 0: puts the sprite at C2Scene_ObjAX/Y (fractions and .SprTile 0), then by C2Scene_Unk0294: - C2Scene_ObjBusy clear: .State C2Scene_ObjAStWait, .SprAttr C2Scene_ObjAttrPrio2, facing down... - verified
C2Scene_ObjAWait$C2:43CB · 113 B · EngineState 1: runs the animation until C2Scene_ObjWatch reaches state C2Scene_ObjWatchStBusyA (the whole party is in), then sets C2Scene_ObjBusy and: - without C2Scene_ObjAFlag5: sets... - verified
C2Scene_ObjARise$C2:443C · 123 B · EngineState 2: moves by the velocity (C2Scene_TaskMove, C2Scene_WrapTaskPos) until .Frames reaches .Duration; on frame C2Scene_RiseAttrAt the sprite gets .SprAttr C2Scene_ObjAttrPrio3. - verified
C2Scene_ObjAFly$C2:44B7 · 446 B · EngineState 3 (C2Scene_ObjAStFly): in scene mode C2Scene_ModeIdle1, with any bit of Pad_Unk00F8 (read as a word) set, the first that applies: - Pad_Unk00F8Bit7 with C2Scene_ObjAOnSpot: unless... - verified
C2Scene_ObjAMove$C2:4675 · 109 B · EngineState 4: moves by the velocity (C2Scene_TaskMove, C2Scene_WrapTaskPos) and scrolls BG layers 1 and 2 with it (C2Scene_Unk0568 by .XVel, C2Scene_Unk066C by .YVel, the low bytes), as the leader's... - verified
C2Scene_ObjALand$C2:46E2 · 70 B · EngineState 5 (C2Scene_ObjAStLand): moves by the velocity until .Frames reaches .Duration (low byte), with .SprAttr C2Scene_ObjAttrPrio2 from frame C2Scene_LandAttrAt; C2Anim_Run. - verified
C2Scene_ObjAAfterMode8$C2:4728 · 251 B · EngineState 6 (C2Scene_ObjAStMode8): waits for C2Scene_ObjANextLoc, which C2Scene_ObjAWait and C2Scene_ObjAFly zero before scene mode C2Scene_ModeUnk8 (mode 8's sub-program C2Scene_Dial sets it). - verified
C2Scene_ObjAScript$C2:4823 · 101 B · EngineState 7 (C2Scene_ObjAStScript): runs the task's own script (C2Scene_TaskRunScript on .ScriptPtr: C2Scene_ObjAScrArrive or C2Scene_ObjAScrLeave). - verified
C2Scene_ObjAWaitEmpty$C2:4888 · 17 B · EngineState 8 (C2Scene_ObjAStWaitEmpty): when C2Scene_ObjWatch reaches C2Scene_ObjWatchStEmpty (the party is getting out), .State 0; C2Anim_Run every frame. - verified
C2Scene_ObjAStepVel$C2:4899 · 16 B · EngineC2Scene_ObjAFly's step velocity per facing: .XVel then .YVel (whole pixels a frame, signed). - verified
C2Scene_ObjAFaceAnim$C2:48A9 · 28 B · EngineStarts the animation of the task's .Facing: entry .Facing of C2Scene_ObjAFaceAnims, or of C2Scene_ObjAFaceAnims5 with C2Scene_ObjAFlag5 (C2Scene_SetAnim, by JMP). - verified
C2Scene_ObjAFaceAnims$C2:48C5 · 4 B · EngineAnimation numbers per facing (up, down, left, right) of C2Scene_ObjAFaceAnim. - verified
C2Scene_ObjAFaceAnims5$C2:48C9 · 4 B · EngineThe same with C2Scene_ObjAFlag5. - verified
C2Scene_ObjAJump$C2:48CD · 27 B · EngineMoves the task C2Scene_ObjAJumpPx (512) pixels in X the way .XVel points (back when it is negative) and wraps the position (C2Scene_WrapTaskPos, by JMP). - verified
C2Scene_ObjAOverlap$C2:48E8 · 47 B · EngineC=1 when object A is active (C2Scene_ObjActive in C2Scene_Unk0294), at the current location (Loc_Id equal to C2Scene_ObjALoc, unmasked) and its box (C2Scene_ObjAFlyBox at C2Scene_ObjAX/Y) overlaps... - verified
C2Scene_ObjBOverlap$C2:4917 · 47 B · EngineC2Scene_ObjAOverlap for object B: active (C2Scene_ObjBFlags), Loc_Id C2Scene_ObjBLocId (unmasked) and C2Scene_ObjBLandBox at C2Scene_ObjBX/Y against box A. - verified
C2Scene_ObjAFlyBox$C2:4946 · 8 B · EngineC2Scene_BoxesOverlap extents (left, right, up, down) of object A in C2Scene_ObjAFly and C2Scene_ObjASpotWatch: 8 each way. - verified
C2Scene_ObjBLandBox$C2:494E · 8 B · EngineObject B's extents for C2Scene_ObjBOverlap: 8 each way. - verified
C2Scene_SpotBox$C2:4956 · 8 B · EngineThe extents of the spot at C2Scene_SpotX/Y (C2Scene_ObjASpotWatch): 8 each way. - verified
C2Scene_ObjAMarkTask$C2:495E · 9 B · EngineTask handler of a second sprite that goes with object A (no reference in the bank's code, as C2Scene_ObjATask): runs the C2Scene_ObjAMarkStates handler of .State. - verified
C2Scene_ObjAMarkStates$C2:4967 · 4 B · EngineC2Scene_ObjAMarkTask's handler for .State 0 and 1. - verified
C2Scene_ObjAMarkInit$C2:496B · 33 B · EngineState 0: ends the task (C=1) unless object A is at this location (Loc_Id AND C2Scene_LocIdMask equal to C2Scene_ObjALoc). - verified
C2Scene_ObjAMarkShow$C2:498C · 67 B · EngineState 1, every frame: with C2Scene_ObjAFlag5 and C2Scene_ObjAAloft set, animation C2Scene_AnimMarkBelow at C2Scene_ObjAX, C2Scene_ObjAY + C2Scene_Lift (24 pixels below object A: probably its... - verified
C2Scene_ObjASpotWatch$C2:49CF · 91 B · EngineTask handler (no reference in the bank's code): while C2Scene_ObjWatch is in C2Scene_ObjWatchStBusyA (the party in object A) and C2Scene_ObjAInMode8 is clear, tests object A's box... - verified
C2Scene_ObjASound$C2:4A2A · 46 B · EngineQueues C2Scene_SoundCmd10 with C2Scene_ObjASongArg (arguments C2Scene_SoundArgUnused, C2Scene_SoundArg80, rank 0), as C2Scene_ZoneSoundQueue does with a zone's sound; when it is queued (C=0) the... - verified
C2Scene_ObjAGetProps$C2:4A58 · 67 B · EngineAfter C2Scene_GetTileProps (C2Scene_PropX/Y = the point's 8x8 column and row): .PropBL = the property nibble of the tile below-left (column - 1, wrapping to C2Scene_MapTilesX - 1, row + 1 AND 127)... - verified
C2Scene_ObjAScrGo1DD$C2:4A9B · 18 B · EngineScript of a task C2Scene_ObjARise starts with C2Scene_Flag0ObjAGo1DD: the new task (a copy of object A's record) puts its sprite at .SprY $198 with animation $1B, fades out and leaves for location... - verified
C2Scene_ObjAScrLeave$C2:4AAD · 223 B · EngineObject A's own script for state C2Scene_ObjAStScript after mode 8 chose a location (C2Scene_ObjAAfterMode8). - verified
C2Scene_ObjAScrArrive$C2:4B8C · 108 B · EngineObject A's own script when the scene loads with the party in it after mode 8 (C2Scene_ObjAInit). - verified
C2Scene_ObjAScrSlowVel$C2:4BF8 · 35 B · EngineScript subroutine (C2Script_Call): the velocity half a pixel a frame in the .Facing direction (the other axis left as it is). - verified
C2Scene_ObjAScrFastVel$C2:4C1B · 35 B · EngineC2Scene_ObjAScrSlowVel at 8 pixels a frame. - verified
C2Scene_ObjAScrDash$C2:4C3E · 10 B · EngineScript subroutine: task byte +$22 rounds of 2 frames' movement (C2Script_MoveFrames), each starting a C2Scene_ObjAScrTrail task. - verified
C2Scene_ObjAScrTrail$C2:4C48 · 39 B · EngineScript of the tasks C2Scene_ObjAScrDash starts (each a copy of object A's record, so at its position): the animation for the copied .Facing ($33 up, $32 down, $34 left, $35 right), shown for 8... - verified
C2Scene_ObjAScrUnk4C6F$C2:4C6F · 32 B · EngineA script with no reference found (no pointer to it in the bank): fade out, swap the low bytes of Loc_Id and Loc_ReturnId (through task byte +$22), C2Scene_ObjALoc = Loc_Id, scene mode... - verified
C2Scene_ObjAScrSpot$C2:4C8F · 54 B · EngineScript of the task C2Scene_ObjAFly starts on the spot (C2Scene_ObjAOnSpot): fade out, Loc_Id, Loc_EntryX/Y and Loc_EntryFacing copied to Loc_ReturnId-Loc_ReturnFacing, then location $1C1 at tile... - verified
C2Scene_ObjBTask$C2:4CC5 · 9 B · EngineTask handler: runs the C2Scene_ObjBStates handler of .State. - verified
C2Scene_ObjBStates$C2:4CCE · 12 B · EngineC2Scene_ObjBTask's handler for each .State 0-5. - verified
C2Scene_ObjBInit$C2:4CDA · 93 B · EngineState 0: the sprite at C2Scene_ObjBX/Y (fractions and .SprTile 0), facing down (.Facing, .PrevFacing). - verified
C2Scene_ObjBWait$C2:4D37 · 66 B · EngineState 1: runs the animation until C2Scene_ObjWatch reaches C2Scene_ObjWatchStBusyB (the party is in B); then sets C2Scene_ObjBusy in C2Scene_ObjBFlags, .State 2, the property nibbles at the... - verified
C2Scene_ObjBRise$C2:4D79 · 86 B · EngineState 2: as C2Scene_ObjARise with fixed counts: moves for C2Scene_RiseFrames frames (.SprAttr C2Scene_ObjBAttrPrio3 from frame C2Scene_RiseAttrAt); then .State C2Scene_ObjBStFly, C2Scene_ObjBAloft... - verified
C2Scene_ObjBFly$C2:4DCF · 431 B · EngineState 3 (C2Scene_ObjBStFly): in scene mode C2Scene_ModeIdle1, with any bit of Pad_Unk00F8 (a word) set: - Pad_Unk00F8Bit7 comes down when none of .PropUL-DR and .PropBL/B has a bit of... - verified
C2Scene_ObjBMove$C2:4F7E · 109 B · EngineState 4: C2Scene_ObjAMove for object B: moves, scrolls BG layers 1 and 2, C2Scene_Unk1BF1/1BF3 = the velocity, C2Anim_Run, C2Scene_ObjBX/Y = the position, and at the target .State =... - verified
C2Scene_ObjBLand$C2:4FEB · 76 B · EngineState 5 (C2Scene_ObjBStLand): moves for C2Scene_LandFrames frames (.SprAttr C2Scene_ObjBAttrPrio2 from frame C2Scene_LandAttrAt); then C2Scene_ObjBusy and C2Scene_ObjBLanding cleared, .State...
Bank $C2 · $C2:5000–$5FFF
$C2:5000
Verified · 127
- verified
C2Scene_ObjBStepVel$C2:5037 · 16 B · EngineC2Scene_ObjBFly's step velocity per facing (.XVel, .YVel), as C2Scene_ObjAStepVel. - verified
C2Scene_ObjBFaceAnims$C2:5047 · 4 B · EngineObject B's animation per facing (up, down, left, right). - verified
C2Scene_ObjBMarkTask$C2:504B · 9 B · EngineTask handler of object B's second sprite (no reference in the bank's code): runs the C2Scene_ObjBMarkStates handler of .State. - verified
C2Scene_ObjBMarkStates$C2:5054 · 4 B · EngineC2Scene_ObjBMarkTask's handler for .State 0 and 1. - verified
C2Scene_ObjBMarkInit$C2:5058 · 16 B · EngineState 0: .State 1, .SprAttr C2Scene_ObjAttrPrio3, .SprTile 0; falls into C2Scene_ObjBMarkShow. - verified
C2Scene_ObjBMarkShow$C2:5068 · 39 B · EngineState 1, every frame: the C2Scene_ObjBMarkOfs entry of C2Scene_ObjBAloft (0: above B, C2Scene_AnimMarkAbove; 1: below, C2Scene_AnimMarkBelow): the sprite at C2Scene_ObjBX, C2Scene_ObjBY + the... - verified
C2Scene_ObjBMarkOfs$C2:508F · 8 B · EnginePer C2Scene_ObjBAloft: the Y offset from object B and the animation. - verified
C2Scene_ObjBMateTask$C2:5097 · 9 B · EngineTask handler of one of object B's mates (see the banner): runs the C2Scene_ObjBMateStates handler of .State. - verified
C2Scene_ObjBMateStates$C2:50A0 · 12 B · EngineC2Scene_ObjBMateTask's handler for each .State 0-5. - verified
C2Scene_ObjBMateInit$C2:50AC · 100 B · EngineState 0: the sprite at C2Scene_ObjBX/Y (fractions and .SprTile 0), facing down, .SprAttr C2Scene_MemberAttr with the slot's palette (C2Scene_Member1Pal for .Slot C2Scene_Slot1, else... - verified
C2Scene_ObjBMateWait$C2:5110 · 60 B · EngineState 1: nothing (C=0) until C2Scene_ObjWatch reaches C2Scene_ObjWatchStBusyB. - verified
C2Scene_ObjBMateRise$C2:514C · 89 B · EngineState 2: moves for C2Scene_RiseFrames frames (OAM priority 3 from frame C2Scene_RiseAttrAt), saving the position (C2Scene_ObjBMateSavePos) and running the animation each frame. - verified
C2Scene_ObjBMateFollow$C2:51A5 · 130 B · EngineState 3, also re-entered from C2Scene_ObjBMateMove every C2Scene_MateAimFrames frames: - with C2Scene_ObjBLanding (object B is coming down): .State C2Scene_MateStLand, .Frames 0, +$22 = 0, .SprY... - verified
C2Scene_ObjBMateMove$C2:5227 · 34 B · EngineState 4: for C2Scene_MateAimFrames frames moves without overshooting the target (C2Scene_ObjBMateClampVel, C2Scene_TaskMove, C2Scene_WrapTaskPos), saves the position and runs the animation; then... - verified
C2Scene_ObjBMateLand$C2:5249 · 65 B · EngineState 5 (C2Scene_MateStLand): moves until .Frames passes C2Scene_LandFrames, which is $30 frames (C2Scene_TaskRunAll has already counted .Frames to 1 on the frame Follow ended), saving the... - verified
C2Scene_ObjBMateClampVel$C2:528A · 147 B · EngineKeeps a step from going past the target: per axis, when the distance to .TargetX (.TargetY) is less than the whole pixels of the speed (|.XVel| with the fraction's borrow), the velocity becomes... - verified
C2Scene_ObjBMateSpot$C2:531D · 68 B · Engine.TargetX/Y = the mate's spot beside object B: C2Scene_ObjBX/Y plus the C2Scene_ObjBMateSpots entry of (Loc_EntryFacing's facing * 2 + .Slot - 1), snapped to the 8x8 tile (C2Scene_TileSnapMask) and... - verified
C2Scene_ObjBMateToObjB$C2:5361 · 19 B · Engine.TargetX/Y = C2Scene_ObjBX/Y. - verified
C2Scene_ObjBMateAim$C2:5374 · 95 B · EngineVelocity 0, then the direction from the position to .TargetX/Y (C2Scene_Unk229D). - verified
C2Scene_ObjBMateGlideVel$C2:53D3 · 105 B · EngineThe velocity that reaches .TargetX/Y in C2Scene_MateGlideFrames frames: per axis the distance with its bytes swapped (XBA) divided by C2Scene_MateGlideFrames with the hardware divider, the... - verified
C2Scene_ObjBMateSpots$C2:543C · 32 B · EngineC2Scene_ObjBMateSpot's X and Y offsets from object B per party facing (up, down, left, right) and slot (1, 2): 24 pixels across and 24 along. - verified
C2Scene_ObjBMateFaceDir$C2:545C · 20 B · Engine.PrevFacing = .Facing; .Facing = Rom_DirToFacing's entry for the direction in C2Scene_AimDir (C2Scene_ObjBMateAim's). - verified
C2Scene_ObjBMateFaceAnim$C2:5470 · 28 B · EngineWhen .Facing differs from .PrevFacing: starts entry (.Slot - 1) * 4 + .Facing of C2Scene_ObjBMateFaceAnims (C2Scene_SetAnim, by JMP). - verified
C2Scene_ObjBMateFaceAnims$C2:548C · 8 B · EngineThe mates' animation per slot (1, then 2) and facing (up, down, left, right). - verified
C2Scene_ObjBMateMarkTask$C2:5494 · 9 B · EngineTask handler of a mate's second sprite (.Slot as the mate's; no reference in the bank's code): runs the C2Scene_ObjBMateMarkStates handler of .State. - verified
C2Scene_ObjBMateMarkStates$C2:549D · 10 B · EngineC2Scene_ObjBMateMarkTask's handler for each .State 0-4. - verified
C2Scene_ObjBMateMarkInit$C2:54A7 · 103 B · EngineState 0: .SprAttr C2Scene_ObjAttrPrio3. - verified
C2Scene_ObjBMateMarkWait$C2:550E · 52 B · EngineState 1: nothing (C=0) until C2Scene_ObjWatch reaches C2Scene_ObjWatchStBusyB; then .State 2, .Frames 0, velocity half a pixel up and half a pixel sideways (right for slot 1, left for slot 2), and... - verified
C2Scene_ObjBMateMarkRise$C2:5542 · 43 B · EngineState 2: moves for C2Scene_RiseFrames frames with C2Anim_Run; then .State C2Scene_MateStFollow, .SprY + C2Scene_MateMarkDrop, animation C2Scene_AnimMarkBelow, and falls into... - verified
C2Scene_ObjBMateMarkFollow$C2:556D · 100 B · EngineState 3: with C2Scene_ObjBLanding: .State C2Scene_MateMarkStLand, .Frames 0, the target C2Scene_ObjBX, C2Scene_ObjBY - C2Scene_Lift, .SprY - C2Scene_MateMarkDrop, the glide velocity to the target... - verified
C2Scene_ObjBMateMarkLand$C2:55D1 · 52 B · EngineState 4 (C2Scene_MateMarkStLand): moves until .Frames passes C2Scene_LandFrames, $30 frames (.Frames is already 1 when it starts); then .State C2Scene_MateStWait, fractions and velocity 0. - verified
C2Scene_ObjBMateSavePos$C2:5605 · 35 B · EngineCopies the task's position to C2Scene_ObjBMate1X/Y (.Slot bit 0 set: slot 1) or C2Scene_ObjBMate2X/Y, where the mark tasks read it. - verified
C2Scene_LabelTask$C2:5628 · 15 B · EngineTask handler (no reference in the bank's code, as the object tasks): draws string C2Scene_Unk1B58 of C2SceneRom_LabelStrings with the text window code into a buffer, uploads it to VRAM and shows... - verified
C2Scene_LabelStates$C2:5637 · 8 B · EngineC2Scene_LabelTask's handler for each .State 0-3. - verified
C2Scene_LabelInit$C2:563F · 36 B · EngineState 0: .State 1, .SprAttr C2Scene_ObjAttrPrio3, .SprTile 0, the animation and frame templates copied to C2Scene_Unk8600/8604 (C2Scene_Unk5775), and the animation pointer on C2Scene_Unk8600 (its... - verified
C2Scene_LabelWait$C2:5663 · 54 B · EngineState 1: nothing (C=0) while C2Scene_Unk1B58 is 0. - verified
C2Scene_LabelDraw$C2:5699 · 96 B · EngineState 2: one TextWin_Step of one character (TextWin_StepCount 1) per frame while TextWin_Status comes back TextWin_StatusStepDone (C=0). - verified
C2Scene_LabelShow$C2:56F9 · 124 B · EngineState 3: with C2Scene_Unk1B58 0, .State C2Scene_LabelStWait and the buffer cleared (C2Scene_ClearUnk8621), and the sprite still drawn this frame; with C2Scene_Unk1B59 set (probably "the label... - verified
C2Scene_Unk5775$C2:5775 · 35 B · EngineCopies C2Scene_Unk8600Init (4 bytes) to C2Scene_Unk8600 and C2Scene_Unk8604Init (C2Scene_Unk8604Size bytes, MVN) to C2Scene_Unk8604: an animation script for C2Scene_LabelTask's sprite... - verified
C2Scene_ClearUnk8621$C2:5798 · 24 B · EngineZeroes the first C2Scene_Unk8621Bytes bytes of C2Scene_HdmaArea ($7E:8621-$8A20, up to C2Scene_HdmaValues): a zero word at the start, then an overlapping MVN. - verified
C2Scene_Unk57B0$C2:57B0 · 18 B · EngineData with no reference found in the bank (no pointer to any of its bytes): 0, 1, 2, 3, 3, 4, 5, 6, 6, two zeros, then $F4 down to $D0 in steps of 6. - verified
C2Scene_Unk8600Init$C2:57C2 · 4 B · EngineC2Scene_Unk5775's source for C2Scene_Unk8600. - verified
C2Scene_Unk8604Init$C2:57C6 · 25 B · EngineC2Scene_Unk5775's source for C2Scene_Unk8604: a 0 word, $D0, then five groups $E0+2n,$01,$10+16n,$D0 (n = 0-4), and $EA,$01. - verified
TextWin_Init$C2:57DF · 68 B · EngineStarts string TextWin_StrIndex: TextWin_TextPtr = the 16-bit entry TextWin_StrIndex of the table at TextWin_StrTable, in the table's bank; state 0 (TextWin_State), status TextWin_StatusStart... - verified
TextWin_Step$C2:5823 · 31 B · EngineOne step of the text box: TextWin_CheckStatus decides from TextWin_Status whether to go on (C=0); if so, the handler of TextWin_State in TextWin_StateTable runs. - verified
TextWin_StateTable$C2:5842 · 8 B · EngineTextWin_Step's handler for each TextWin_State (TextWin_State0-3). - verified
TextWin_CheckStatus$C2:584A · 7 B · EngineJumps to TextWin_Status's handler in TextWin_StatusTable, which returns C=1 to skip this step's state handler (status 0, TextWin_StatusIdle) or C=0 to run it. - verified
TextWin_StatusTable$C2:5851 · 66 B · EngineTextWin_CheckStatus's handler for each TextWin_Status value $00-$20. - verified
TextWin_StatusIdle$C2:5893 · 2 B · EngineStatus 0: nothing to do; C=1 so TextWin_Step skips the state handler. - verified
TextWin_StatusRun$C2:5895 · 2 B · EngineTextWin_StatusRun: C=0, run the state handler. - verified
TextWin_StatusPenLeft$C2:5897 · 4 B · Engine - verified
TextWin_StatusPenIndent$C2:589B · 23 B · Engine - verified
TextWin_State0$C2:58B2 · 12 B · EngineState 0: reads the next string byte (TextWin_TextPtr + 1): - a glyph (TextWin_FirstGlyph or more): TextWin_State0_Draw puts it in TextWin_Glyph (16-bit, with B as the high byte: 0, or the prefix... - verified
TextWin_State0_Draw$C2:58BE · 69 B · Engine - verified
TextWin_CodeTable$C2:5903 · 66 B · EngineTextWin_State0's handler for each control code $00-$20 (Y = the code). - verified
TextWin_CodeStatusArg$C2:5945 · 10 B · EngineCode $03: the next string byte to TextWin_Code3Arg, then as TextWin_CodeSetStatus. - verified
TextWin_CodeSetStatus$C2:594F · 4 B · Engine - verified
TextWin_CodeNum8$C2:5953 · 50 B · EngineCode $0D: prints the byte at TextWin_Unk3D (which steps on by 1). - verified
TextWin_CodeNum16$C2:5985 · 67 B · EngineCode $0E: as TextWin_CodeNum8 for the 16-bit value at TextWin_Unk3D (steps on by 2): five decimal digits (TextWin_Dec16, TextWin_TrimZeros5), or four hex digits, high byte first. - verified
TextWin_CodeNum24$C2:59C8 · 52 B · EngineCode $0F: the 24-bit value at TextWin_Unk3D (steps on by 3) as eight decimal digits (TextWin_Dec24, TextWin_TrimZeros8); unlike codes $0D and $0E it ignores TextWin_NumHex. - verified
TextWin_StartDec$C2:59FC · 21 B · Engine - verified
TextWin_StartHex$C2:5A11 · 21 B · Engine - verified
TextWin_CodeArgName$C2:5A26 · 38 B · EngineCode $11: the name whose TextWin_CharNamePtrs index is the byte at TextWin_Unk3D (which steps on by 1): TextWin_SubPtr at it in bank $7E, TextWin_SubLeft = its length (TextWin_CharNameLen), state... - verified
TextWin_CodeExt$C2:5A4C · 62 B · EngineCode $12 and the next string byte b: b from TextWin_Code12Dict up is dictionary entry TextWin_Code12DictBase + (b - 8) (as TextWin_State0's dictionary bytes, also kept in TextWin_DictCode); below... - verified
TextWin_ExtTable$C2:5A8A · 4 B · EngineTextWin_CodeExt's handler for b = 0 and 1. - verified
TextWin_ExtTechName$C2:5A8E · 66 B · EngineCode $12 $00: name number (the byte at TextWin_Unk3D, which steps on) of TextWinRom_TechNames (TextWin_RomNameSize bytes each, by the multiplier): TextWin_SubLeft = its length up to the first... - verified
TextWin_ExtEnemyName$C2:5AD0 · 44 B · EngineCode $12 $01: name number (the byte at TextWin_Unk3D) of TextWinRom_EnemyNames, all TextWin_RomNameSize bytes of it (the padding is drawn too). - verified
TextWin_StartSubName$C2:5AFC · 10 B · Engine - verified
TextWin_CodeWide$C2:5B06 · 14 B · EngineCodes $01 and $02 (TextWin_Wide1/2): the next string byte with the code as its high byte is a 16-bit glyph ($01xx or $02xx), drawn by TextWin_State0_Draw. - verified
TextWin_CodeNop$C2:5B14 · 1 B · EngineCode $10: nothing; the step ends. - verified
TextWin_CodeCharName$C2:5B15 · 38 B · EngineCodes TextWin_FirstCharName-$19: the name at TextWin_CharNamePtrs entry (code - $13), in bank $7E, its length by TextWin_CharNameLen, drawn in state TextWin_StateDict. - verified
TextWin_CodeName0$C2:5B3B · 27 B · EngineCode $1A: the first name at TextWin_CharNames (the one TextWin_CharNamePtrs entry 0 also points at), as TextWin_CodeCharName. - verified
TextWin_CodeNadia$C2:5B56 · 26 B · EngineCode $1E: the TextWin_StrNadiaLen glyphs at TextWin_StrNadia ($C2:6146, which spell "Nadia" with $A0 = "A", $BA = "a"), in state TextWin_StateDict. - verified
TextWin_CodeMemberName$C2:5B70 · 43 B · EngineCodes TextWin_FirstMemberName-$1D: the name of the character in party position (code - $1B): Party_Members gives the TextWin_CharNamePtrs index; then as TextWin_CodeCharName. - verified
TextWin_CodeItemName$C2:5B9B · 59 B · EngineCode $1F: the name of item Treasure_ItemId (its low byte) in TextWinRom_ItemNames, from its second byte (the first is an icon), up to the first TextWin_NamePad (TextWin_NameLen10). - verified
TextWin_CodeName7$C2:5BD6 · 31 B · EngineCode $20: the eighth name at TextWin_CharNames ($7E:2C4D, after the seven TextWin_CharNamePtrs points at), as TextWin_CodeCharName. - verified
TextWin_State1$C2:5BF5 · 51 B · EngineState TextWin_StateDict: draws the next glyph of the sub-string at TextWin_SubPtr (a TextWin_Wide1/2 byte makes the next byte the low byte of a 16-bit glyph). - verified
TextWin_State1Next$C2:5C28 · 8 B · EngineTextWin_State1's exit by (sub-string left) + 2 * (steps left). - verified
TextWin_State1End$C2:5C30 · 2 B · Engine - verified
TextWin_State1Pause$C2:5C32 · 5 B · Engine - verified
TextWin_State1Resume$C2:5C37 · 5 B · Engine - verified
TextWin_State1Loop$C2:5C3C · 2 B · Engine - verified
TextWin_State2$C2:5C3E · 35 B · EngineState TextWin_StateDec: draws the next decimal digit at TextWin_SubPtr as glyph TextWin_DigitGlyph0 + the digit, then exits as TextWin_State1 does (TextWin_State2Next). - verified
TextWin_State2Next$C2:5C61 · 8 B · EngineTextWin_State2's exit, as TextWin_State1Next. - verified
TextWin_State2End$C2:5C69 · 2 B · Engine - verified
TextWin_State2Pause$C2:5C6B · 5 B · Engine - verified
TextWin_State2Resume$C2:5C70 · 5 B · Engine - verified
TextWin_State2Loop$C2:5C75 · 2 B · Engine - verified
TextWin_State3$C2:5C77 · 51 B · EngineState TextWin_StateHex: the same code as TextWin_State1 (glyph bytes, with the two-byte prefixes) with its own exits (TextWin_State3Next); the hex digits TextWin_HexByte stored are drawn this way. - verified
TextWin_State3Next$C2:5CAA · 8 B · EngineTextWin_State3's exit, as TextWin_State1Next. - verified
TextWin_State3End$C2:5CB2 · 2 B · Engine - verified
TextWin_State3Pause$C2:5CB4 · 5 B · Engine - verified
TextWin_State3Resume$C2:5CB9 · 5 B · Engine - verified
TextWin_State3Loop$C2:5CBE · 2 B · Engine - verified
TextWin_HexByte$C2:5CC0 · 67 B · EngineAppends the two hex digit glyphs of TextWin_HexIn (high digit first, from TextWin_HexGlyphs) to TextWin_Digits at TextWin_HexPos, which goes up by one per glyph (by two for a TextWin_WideGlyphMin... - verified
TextWin_HexGlyphs$C2:5D03 · 32 B · EngineThe glyph of each hex digit 0-F (TextWin_HexByte): "0"-"9" are $D4-$DD, "A"-"F" $A0-$A5. - verified
TextWin_NameLen10$C2:5D23 · 17 B · EngineA = the number of bytes at TextWin_SubPtr before the first TextWin_NamePad, at most 10. - verified
TextWin_NameLen11$C2:5D34 · 17 B · EngineAs TextWin_NameLen10, at most 11 (a whole TextWinRom name). - verified
TextWin_CharNameLen$C2:5D45 · 17 B · EngineA = the number of bytes at TextWin_SubPtr before the first 0, at most TextWin_CharNameMax. - verified
TextWin_TrimZeros8$C2:5D56 · 59 B · EngineDrops the leading zero digits of the 8 (5, 3) digits at TextWin_Digits, keeping at least one: while the first is 0, shifts the rest down one byte. - verified
TextWin_TrimZeros5$C2:5D91 · 28 B · Engine - verified
TextWin_TrimZeros3$C2:5DAD · 23 B · Engine - verified
TextWin_DrawGlyph$C2:5DC4 · 114 B · EngineDraws glyph TextWin_Glyph at TextWin_PenX into TextWin_GfxBuf and moves the pen on by the glyph's width: - TextWin_FontPtr = TextWinRom_Font + glyph * 24, TextWin_FontNibPtr = TextWinRom_FontRight... - verified
TextWin_Blit2bpp$C2:5E36 · 83 B · EngineDraws the glyph's 24 bytes with TextWin_Blit2bppRow, one per TextWin_GlyphRow: the first 8 (TextWin_GlyphTopPairs pairs) at TextWin_OutPtr on, then TextWin_OutPtr + TextWin_NextRow2bpp and the... - verified
TextWin_Blit2bppRow$C2:5E89 · 38 B · EngineOne glyph byte: A = byte TextWin_GlyphRow of TextWin_FontPtr in the high byte and of TextWin_FontNibPtr in the low (its high nibble for an even TextWin_GlyphLow, its low nibble moved up for an odd... - verified
TextWin_Blit2bppShifts$C2:5EAF · 16 B · EngineTextWin_Blit2bppRow's entry for each pen shift 0-7. - verified
TextWin_Blit2bppShr0$C2:5EBF · 16 B · Engine - verified
TextWin_Blit2bppShr4$C2:5ECF · 1 B · Engine - verified
TextWin_Blit2bppShr3$C2:5ED0 · 1 B · Engine - verified
TextWin_Blit2bppShr2$C2:5ED1 · 1 B · Engine - verified
TextWin_Blit2bppShr1$C2:5ED2 · 19 B · Engine - verified
TextWin_Blit2bppShl3$C2:5EE5 · 3 B · Engine - verified
TextWin_Blit2bppShl2$C2:5EE8 · 3 B · Engine - verified
TextWin_Blit2bppShl1$C2:5EEB · 28 B · Engine - verified
TextWin_Blit4bpp$C2:5F07 · 83 B · EngineAs TextWin_Blit2bpp with TextWin_Blit4bppRow and TextWin_NextRow4bpp: the second part goes $200 bytes on, and the tiles are TextWin_TileOfs4bpp's, $20 bytes apart (probably 4bpp tiles, the glyph... - verified
TextWin_Blit4bppRow$C2:5F5A · 38 B · EngineTextWin_Blit2bppRow with the tile offsets of TextWin_TileOfs4bpp. - verified
TextWin_Blit4bppShifts$C2:5F80 · 16 B · EngineTextWin_Blit4bppRow's entry for each pen shift 0-7. - verified
TextWin_Blit4bppShr0$C2:5F90 · 16 B · Engine - verified
TextWin_Blit4bppShr4$C2:5FA0 · 1 B · Engine - verified
TextWin_Blit4bppShr3$C2:5FA1 · 1 B · Engine - verified
TextWin_Blit4bppShr2$C2:5FA2 · 1 B · Engine - verified
TextWin_Blit4bppShr1$C2:5FA3 · 19 B · Engine - verified
TextWin_Blit4bppShl3$C2:5FB6 · 3 B · Engine - verified
TextWin_Blit4bppShl2$C2:5FB9 · 3 B · Engine - verified
TextWin_Blit4bppShl1$C2:5FBC · 28 B · Engine - verified
TextWin_CharNamePtrs$C2:5FD8 · 14 B · EngineThe 16-bit addresses (bank $7E) of the first 7 names at TextWin_CharNames, TextWin_CharNameSize bytes apart (codes $11 and $13-$19). - verified
TextWin_TileOfs2bpp$C2:5FE6 · 128 B · EngineTextWin_Blit2bppRow: the TextWin_GfxBuf offset of each 8-pixel tile column of the pen (index pen / 8; the glyph spans up to three, + 1 and + 2).
Bank $C2 · $C2:6000–$6FFF
$C2:6000
Verified · 60
- verified
TextWin_TileOfs4bpp$C2:6066 · 128 B · EngineAs TextWin_TileOfs2bpp for TextWin_Blit4bppRow, $20 bytes per tile: columns 0-15 from $000, 16-31 from $400, then $200 and $600. - verified
TextWin_GlyphWidths$C2:60E6 · 96 B · EngineThe pen advance in pixels of each glyph $A0-$FF (TextWin_DrawGlyph; index glyph - TextWin_FirstGlyph). - verified
TextWin_StrNadia$C2:6146 · 5 B · EngineGlyphs "Nadia" (TextWin_CodeNadia, code $1E). - verified
TextWin_DivBits$C2:614B · 19 B · EngineOne decimal digit by shift and subtract: TextWin_DivQuot = A / divisor, A = the remainder, for a divisor that the caller put in TextWin_DivSub shifted left by Y - 1 (Y = the quotient bits). - verified
TextWin_Dec8$C2:615E · 34 B · EngineTextWin_NumValue's first byte as 3 decimal digits (0-9 each) at TextWin_DecDigits, most significant first (TextWin_DivBits by 100 and 10; the remainder is the last digit). - verified
TextWin_Dec16$C2:6180 · 61 B · EngineTextWin_NumValue's first word as 5 decimal digits at TextWin_DecDigits (TextWin_DivBits in 16 bits by 10000, 1000, 100 and 10; the remainder is the last digit, stored as a word... - verified
TextWin_Dec24$C2:61BD · 116 B · EngineTextWin_NumValue's 24 bits as 8 decimal digits at TextWin_DecDigits (TextWin_Div24Bits by 10000000 ... 10; the last digit is what is left of TextWin_NumValue's first byte). - verified
TextWin_Div24Bits$C2:6231 · 50 B · EngineTextWin_DivBits for 24 bits, in place: TextWin_NumValue (3 bytes) is the value and becomes the remainder; TextWin_Div24Sub (3 bytes, shifted left by Y - 1) the divisor; TextWin_Div24Quot gets Y... - verified
C2Scene_GetListAUnk02$C2:6263 · 11 B · EngineC2Scene_Unk1B58 = .Unk02 of the ListA entry at offset C2Scene_Unk1B32. - verified
C2Scene_GetListBScript$C2:626E · 24 B · EngineC2Scene_Unk1B45 = the C2Scene_ListD word (a script address in bank $7F) picked by .Script of the ListB entry at offset C2Scene_Unk1B32+2. - verified
C2Scene_GetListCUnk03$C2:6286 · 11 B · EngineC2Scene_Unk1B47 = the byte 3 past the start of the ListC entry at offset C2Scene_Unk1B32+4. - verified
C2Scene_GetMapCell$C2:6291 · 29 B · EngineA = the metatile number at column C2Scene_PropCol (0-95), row C2Scene_PropRow of the map at C2Scene_PropMap (byte row * 96 + column). - verified
C2Scene_GetTileProp$C2:62AE · 63 B · EngineA = the property nibble of 8x8 tile C2Scene_PropCol (0-191), C2Scene_PropRow (0-127): the metatile at column / 2, row / 2 of the map at C2Scene_PropMap; its byte row bit 0 (byte metatile * 2 + row... - verified
C2Scene_GetSoundZone$C2:62ED · 50 B · EngineReturns the 4-bit zone of metatile C2Scene_ZoneCol, C2Scene_ZoneRow from the zone map at the start of C2Scene_Unk7200 (bank $7E): byte row * 48 + column / 2 (the row product with the hardware... - verified
C2Scene_MapView$C2:631F · 192 B · EngineMode 6's sub-program (inferred from what it builds; see the banner): BG mode 7, sprite tiles at VRAM $6000 (OBSEL), colour math adding the fixed colour on the backdrop only; clears VRAM, the VRAM... - verified
C2Scene_MapViewBuild$C2:63DF · 33 B · EngineBuilds the mode-7 picture: unpacks the scene's BG graphics (C2Scene_LoadBgGfx) and takes one colour per tile from them (C2Scene_MapTileColors); then draws the pixels from layer 2's map... - verified
C2Scene_MapTileColors$C2:6400 · 83 B · EngineFor each of the C2Scene_MapTileCount 4bpp tiles in C2Scene_DecompBuf (32 bytes each: the seven BG packs), writes one byte to C2Scene_TileColors through WMDATA: the colour number (0-15) of the... - verified
C2Scene_MapTilePixelBit$C2:6453 · 9 B · EngineShifts bit 4 of the tile byte at C2Scene_TilePtr + Y (bank DB) into C2Scene_TileColor from the right: four ROLs bring bit 4 into the carry. - verified
C2Scene_MapDrawPixels$C2:645C · 226 B · EngineDraws the mode-7 picture's tiles, a band of 8 pixel rows (4 metatile rows) at a time, in C2Scene_VramQBuf (C2Scene_VramQBufPtr, bank $7E): mode-7 tiles are 8 x 8 bytes, one byte per pixel, and the... - verified
C2Scene_MapCellPixels$C2:653E · 80 B · EngineDraws one metatile cell as two pixels, at C2Scene_MapOut and 8 bytes (one pixel row) below: the colours (C2Scene_TileColors) of the metatile's top-right and bottom-right tiles, each ORed with that... - verified
C2Scene_MapFilterColor$C2:658E · 36 B · EngineTurns some pixel colours (palette * 16 + colour) into 0, the transparent colour that shows the gradient: at Loc_Id C2Scene_MapLoc1F3 the colours $40-$4E; at any other location $0F, $2F and $24-$2B. - verified
C2Scene_MapBuildTilemap$C2:65B2 · 186 B · EngineWrites the mode-7 tilemap: a 32 x 32 tile block of bytes at C2Scene_VramQBuf, zeroed (tile 0: blank), with the picture's tiles 1-192 in 16 rows of 12 from column C2Scene_MapTileCol0, row... - verified
C2Scene_TaskMapZoom$C2:666C · 9 B · EngineTask handler started by C2Scene_MapView: runs .State through C2Scene_MapZoomStates. - verified
C2Scene_MapZoomStates$C2:6675 · 8 B · EngineC2Scene_TaskMapZoom's handler for each .State. - verified
C2Scene_MapZoomInit$C2:667D · 46 B · EngineState 0: .State = 1; the mode-7 centre at the leader's place in the picture: C2Scene_M7X = C2Scene_StartX / 16 + 16 (one pixel per 16-pixel metatile, the picture 2 tiles in) and C2Scene_M7Y =... - verified
C2Scene_MapZoomOut$C2:66AB · 62 B · EngineState 1, once per frame: .DivA and .DivB = entry .Step of C2SceneRom_ZoomDivA/B ($FF/$7F down to $10/$08: the picture shrinks), .Step + 2; when it reaches $40 (all 32 entries used) .Step = $3E... - verified
C2Scene_MapZoomWait$C2:66E9 · 27 B · EngineState 2: when Pad_Unk00F6 has C2Scene_MapViewExitBtn (bit 3), .State = 3 and the script C2Scene_ScrMapViewExit starts. - verified
C2Scene_MapZoomIn$C2:6704 · 50 B · EngineState 3, once per frame: .DivA/.DivB = entry .Step of the tables, then .Step - 2, and the matrix: the zoom of C2Scene_MapZoomOut backwards (entries 31 down to 1). - verified
C2Scene_MapZoomMatrix$C2:6736 · 125 B · EngineSets the mode-7 matrix shadows from the task's .Angle, .DivA and .DivB: C2Scene_M7A = 8 cos / DivA, C2Scene_M7B = 8 sin / DivA, C2Scene_M7C = -8 sin / DivB, C2Scene_M7D = 8 cos / DivB (sine and... - verified
C2Scene_MapZoomDivide$C2:67B3 · 71 B · EngineThe four divisions of C2Scene_MapZoomMatrix on the hardware divider, each next dividend and divisor written while the previous division runs (NOPs pad the waits): C2Scene_ZoomA = Cos8 / DivA... - verified
C2Scene_TaskLeaderMarker$C2:67FA · 65 B · EngineTask handler (started by C2Scene_ScrMapViewMarkers): a marker sprite at the leader's place on the zoomed-out picture. - verified
C2Scene_TaskObjAMarker$C2:683B · 79 B · EngineTask handler (started by C2Scene_ScrMapViewMarkers): as C2Scene_TaskLeaderMarker for object A (C2Scene_ObjAX/Y), with C2Scene_AnimObjAMarker; but on the first call, unless Loc_Id AND... - verified
C2Scene_MapMarkerPos$C2:688A · 25 B · EngineTurns the task's .SprX/.SprY (scene pixels) into the screen position on the zoomed-out picture: .SprX = .SprX / 8 + 32, .SprY = .SprY / 8 + 48 (the full zoom shows the picture's 1 x 2 pixels per... - verified
C2Scene_TaskLocMarker$C2:68A3 · 65 B · EngineTask handler (started by C2Scene_ScrMapViewMarkers): first call: .State = 1, .SprAttr = C2Scene_MapMarkerAttr, .SprX = the C2Scene_LocMarkerX word of this location (Loc_Id AND C2Scene_LocIdMask... - verified
C2Scene_LocMarkerX$C2:68E4 · 16 B · EngineC2Scene_TaskLocMarker's screen X for Loc_Id $1F0-$1F7 (index (location - Loc_FirstBankC2) * 2). - verified
C2Scene_MapViewGradient$C2:68F4 · 113 B · EngineSets up a blue gradient behind the picture: HDMA channel 1 in indirect mode writes COLDATA every line from C2Scene_HdmaTable record 0, two runs of 112 lines (C2Scene_MapGradRun: repeat flag and... - verified
C2Scene_MapViewLabel$C2:6965 · 139 B · EngineDraws a string into sprite tiles $20-$3F (VRAM C2Scene_MapLabelVram) with the text window code: clears the first $400 bytes of C2Scene_HdmaArea (C2Scene_ClearUnk8621) and uses them as the glyph... - verified
C2Scene_MapLabelStr$C2:69F0 · 8 B · EngineC2Scene_MapViewLabel's string number for Loc_Id $1F0-$1F7 (read as a word; only the low byte is kept). - verified
C2Scene_ScrMapViewStart$C2:69F8 · 7 B · EngineStarted by C2Scene_MapView: clears the task's fields, starts a mosaic shrink on BG1 and BG2 (op $2B, arg 1 = 3) at 2 frames per step and a fade in at 2 frames per step, ends. - verified
C2Scene_ScrMapViewExit$C2:69FF · 11 B · EngineStarted by C2Scene_MapZoomWait: raises C2Scene_MapMarkersOff (the markers end), starts a mosaic grow on BG1 and BG2 at 2 frames per step, waits 8 frames, fades out at 2 frames per step, ends... - verified
C2Scene_ScrMapViewMarkers$C2:6A0A · 14 B · EngineStarted by C2Scene_MapZoomOut when fully zoomed out: clears the task's fields, C2Scene_MapMarkersOff = 0, and starts the three marker tasks. - verified
C2Scene_AnimLeaderMarker$C2:6A18 · 8 B · EngineAnimation (C2Anim_Run) of C2Scene_TaskLeaderMarker: frame C2Scene_FrameMapMarkerA for 16 frames, nothing for 16, again: a blink. - verified
C2Scene_AnimObjAMarker$C2:6A20 · 10 B · EngineAnimation of C2Scene_TaskObjAMarker: 8 frames of nothing, frame C2Scene_FrameMapMarkerB for 16, 8 of nothing, again. - verified
C2Scene_FrameMapMarkerA$C2:6A2A · 5 B · EngineSprite frame (C2Scene_SprDrawNode): one piece at (-4, -4), tile 0 (the first tile C2Scene_MapView loaded from C2SceneRom_MapMarkerTiles). - verified
C2Scene_FrameMapMarkerB$C2:6A2F · 5 B · EngineThe same with tile 2 (the second marker tile). - verified
C2Scene_Dial$C2:6A34 · 148 B · EngineMode 8's sub-program: clears VRAM, the VRAM queue and the tasks; BG mode 7, OBSEL OBSEL_Size8And16_Base6000; BG1 scroll (C2Scene_DialBg1X, C2Scene_DialBg1Y), the BG2/BG3 scrolls, C2Scene_M7B, M7C... - verified
C2Scene_TaskDial$C2:6AC8 · 9 B · EngineTask handler started by C2Scene_DialLoad: runs .State through C2Scene_DialStates. - verified
C2Scene_DialStates$C2:6AD1 · 6 B · EngineC2Scene_TaskDial's handler for each .State. - verified
C2Scene_DialInit$C2:6AD7 · 135 B · EngineState 0: .State = 1; .Sel = the current location's entry (C2Scene_DialFindLoc). - verified
C2Scene_DialInput$C2:6B5E · 182 B · EngineState 1: reads Pad_Unk00F8 as a word and tests, in this order (first match wins, so e.g. C2Scene_DialBtnFwd beats C2Scene_PadRight and C2Scene_PadUp): C2Scene_DialBtnBack (back)... - verified
C2Scene_DialTurn$C2:6C14 · 131 B · EngineState 2, once per frame. - verified
C2Scene_DialLocs$C2:6C97 · 14 B · EngineThe Loc_Id of each marker 0-6 (C2Scene_DialSelLoc, C2Scene_DialFindLoc). - verified
C2Scene_DialLocsLate$C2:6CA5 · 14 B · EngineThe list used once C2Scene_Flag0Copy is C2Scene_DialLateFlag or more: marker 5 is $01F6 instead of $01F4. - verified
C2Scene_DialAngles$C2:6CB3 · 14 B · EngineThe hand's angle (Trig_Sin1024 units, 1024 per turn) for marker 0-6. - verified
C2Scene_DialDrawHand$C2:6CC1 · 620 B · Engine - verified
C2Scene_DialHandShape$C2:6F2D · 6 B · EngineThe hand's three points (dx, dy, signed bytes) about the centre at angle 0: the tip 40 pixels up, the base 4 pixels left and right. - verified
C2Scene_DialMul$C2:6F33 · 82 B · EngineSigned multiply: C2Scene_MulProduct (24-bit, $19-$1B) = the signed byte C2Scene_MulByte times the signed word C2Scene_MulWord, from the magnitudes on the hardware multiplier (low byte, then high... - verified
C2Scene_TaskSwirl$C2:6F85 · 9 B · EngineTask handler started by C2Scene_DialLoad: runs .State through C2Scene_SwirlStates (0: set up, 1: every frame after). - verified
C2Scene_SwirlStates$C2:6F8E · 4 B · EngineC2Scene_TaskSwirl's handler for each .State. - verified
C2Scene_SwirlInit$C2:6F92 · 245 B · EngineState 0: .State = 1, .Angle = 0.
Bank $C2 · $C2:7000–$7FFF
$C2:7000
Verified · 71
- verified
C2Scene_SwirlStep$C2:7087 · 188 B · EngineState 1, every frame: toggles C2Scene_DialSwirlBuf and points C2Scene_HdmaValues 2-5 at the other pair of buffers (C2Scene_SwirlCosB/ SinB, or back to A); copies the shown pair one line up into it... - verified
C2Scene_TaskDialMark$C2:7143 · 9 B · EngineTask handler of the seven markers (C2Scene_DialLoad starts one per .Sel 0-6): runs .State through C2Scene_DialMarkStates. - verified
C2Scene_DialMarkStates$C2:714C · 10 B · EngineC2Scene_TaskDialMark's handler for each .State. - verified
C2Scene_DialMarkInit$C2:7156 · 43 B · EngineState 0: .State = 1, .SprAttr = C2Scene_ObjAttrPrio3, .SprTile = 0, .SprX/.SprY = the bytes of C2Scene_DialMarkPos for .Sel (high bytes 0). - verified
C2Scene_DialMarkHidden$C2:7181 · 30 B · EngineState 1: nothing drawn until C2Scene_DialSel = .Sel; then .State = 2, the marker's select animation (C2Scene_DialMarkAnims, first byte) is started and run. - verified
C2Scene_DialMarkSelect$C2:719F · 15 B · EngineState 2: runs the animation; once .AnimTimer is 0 at the start of a frame, .State = 3. - verified
C2Scene_DialMarkShown$C2:71AE · 30 B · EngineState 3: runs the animation; when C2Scene_DialSel is no longer .Sel, .State = 4 and the deselect animation (C2Scene_DialMarkAnims, second byte) starts first. - verified
C2Scene_DialMarkDeselect$C2:71CC · 17 B · EngineState 4: runs the animation; once .AnimTimer is 0 at the start of a frame, .State = 1 (hidden again). - verified
C2Scene_DialMarkPos$C2:71DD · 14 B · EngineScreen X and Y (one byte each) of markers 0-6: around (C2Scene_DialCentreX, C2Scene_DialCentreY), marker 1 at the hand's tip for angle 0. - verified
C2Scene_DialMarkAnims$C2:71EB · 14 B · EngineC2SceneRom_AnimTable numbers of markers 0-6: select, then deselect. - verified
C2Scene_DialUnpack$C2:71F9 · 39 B · EngineUnpacks entry C2Tmp_08 of C2Scene_DialPacks, its source in bank A, to bank $7F (Decomp_ToWramVec). - verified
C2Scene_DialPacks$C2:7220 · 12 B · EngineSource and destination (bank $7F) address of the three packs C2Scene_DialLoad unpacks (the source banks are its arguments). - verified
C2Scene_DialUploadPixels$C2:722C · 40 B · EngineDMAs C2Scene_DialPixelBytes bytes of C2Scene_DecompBuf to VMDATAH from VRAM word 0: the pixels of mode-7 tiles 0-31. - verified
C2Scene_DialUploadMap$C2:7254 · 100 B · EngineDMAs the 32 rows of 32 words at C2Scene_DecompBuf (pack 2: tilemap low bytes, pixel high bytes) to VRAM 16 times, once at each C2Scene_DialMapBlocks address: a 4 x 4 grid of 32 x 32 blocks over... - verified
C2Scene_DialMapBlocks$C2:72B8 · 32 B · EngineVRAM word address of each 32 x 32 block of C2Scene_DialUploadMap. - verified
C2Scene_DialUploadObjTiles$C2:72D8 · 73 B · EngineFor each of C2Scene_DialObjLeft bytes of the list at C2Scene_DialList (24-bit, stepped on): DMAs 4bpp tile (byte) of the source at C2Scene_DialObjSrc (24-bit; tile * 32 added) to VRAM... - verified
C2Scene_DialObjTileList$C2:7321 · 64 B · EngineThe tiles of pack 0 that become sprite tiles 0-$3F (C2Scene_DialUploadObjTiles). - verified
C2Scene_DialUnpackNibbles$C2:7361 · 40 B · EngineSplits the C2Scene_DialNibbleBytes bytes at C2SceneRom_DialNibbles into two bytes each, high nibble first, written through WMDATA to C2Scene_DecompBuf: one byte per pixel, as mode-7 tiles take them. - verified
C2Scene_DialLoad$C2:7389 · 209 B · EngineLoads the dial and starts its tasks: - pack 0 (bank C2Scene_DialPack0Bank) into C2Scene_DecompBuf; its $800 bytes from C2Scene_DialObjSrcB to sprite tiles $40 on (VRAM C2Scene_DialObjVramB), and... - verified
C2Scene_DialSelLoc$C2:745A · 32 B · EngineA = the Loc_Id word of marker .Sel (task X) in C2Scene_DialLocs, or in C2Scene_DialLocsLate once C2Scene_Flag0Copy is C2Scene_DialLateFlag or more. - verified
C2Scene_DialFindLoc$C2:747A · 52 B · EngineA = the marker (0-6) whose location in the list C2Scene_DialSelLoc would use is Loc_Id AND C2Scene_LocIdMask; 6 when none is. - verified
C2Scene_ScrDialFadeIn$C2:74AE · 5 B · EngineStarted last by C2Scene_DialLoad: fade in at 1 frame per step, wait 16 frames, end. - verified
C2Scene_ScrDialFadeOut$C2:74B3 · 5 B · EngineStarted by C2Scene_Dial when the mode changes: fade out at 1 frame per step, wait 16 frames, end. - verified
C2Scene_ScrDialCentre$C2:74B8 · 76 B · EngineStarted by C2Scene_DialLoad: a large sprite (.SprTile bit 14: C2Scene_SprTileLarge in the high byte) at (C2Scene_DialCentreX + 4, $60) with priority bits $30 and palette bits 8, animation $36... - verified
C2Scene_ScrDialPalCycle$C2:7504 · 73 B · EngineStarted by C2Scene_DialLoad: for good, palette 0 faded (12 frames per step) to the next of seven 32-byte rows of C2Scene_UnkC000 ($7E:C020 to $7E:C0C0, then $7E:C000), 384 frames apart. - verified
C2Scene_PlaceBelowView$C2:754D · 40 B · EngineScript routine: puts the task at a random X 64-191 pixels into BG2's view (C2Scene_BgTileX+2 x 8 + a random 0-127 + 64) and 256 pixels below the view's top (C2Scene_BgTileY+2 + 32 tile rows, x 8)... - verified
C2Scene_PlaceBelowViewAt178$C2:7575 · 35 B · EngineScript routine: as C2Scene_PlaceBelowView, but X is pixel $178 (tile column C2Scene_PlaceFixedCol) + a random 0-255, not relative to the view; Y is again 256 pixels below the top of BG2's view. - verified
C2Scene_RandomVelocity$C2:7598 · 43 B · EngineScript routine: gives the task one of 16 velocities at random: the four words of entry (random AND 15) of C2SceneRom_RandVelocities go to .XVelFrac, .XVel, .YVelFrac and .YVel. - verified
C2Scene_TaskBg3Drift$C2:75C3 · 58 B · EngineTask handler (started by op $35 at $C3:8BBD): while object A is not in mode 8, counts frames in .Var22 and moves BG3 one pixel left every 4th frame and one pixel down every 8th; then adds the... - verified
C2Scene_TaskBg3DriftWave$C2:75FD · 85 B · EngineTask handler (op $35 at $C3:980D, next to C2Scene_TaskBg3Wave's at $C3:9811): as C2Scene_TaskBg3Drift, but BG3 moves one pixel left and one down together every 4th frame, and the leader's Y move... - verified
C2Scene_TaskBg3Wave$C2:7652 · 176 B · EngineTask handler (op $35 at $C3:9811): a horizontal wave on BG3. - verified
C2Scene_TaskBg3Slide$C2:7702 · 87 B · EngineTask handler (op $35 at $C3:9F92): while object A is not in mode 8, moves BG3 by a fixed velocity, X about -3.46 and Y +2 pixels a frame (set into .XVelFrac-.YVel on the first frame, .State 0 ->... - verified
C2Scene_TaskBg3LineWave$C2:7759 · 153 B · EngineTask handler (no reference found; laid out as C2Scene_TaskBg3Wave): in forced blank only turns HDMA channel 1 off; waits while object A is in mode 8. - verified
C2Scene_TaskBg3SlideFast$C2:77F2 · 87 B · EngineTask handler (op $35 at $C3:AC92): C2Scene_TaskBg3Slide with the velocity X about -17.32 and Y -10 pixels a frame. - verified
C2Scene_TaskBg1Pan$C2:7849 · 23 B · EngineTask handler (no op $35 reference found): counts frames in .Var22 (8-bit) and every 4th frame scrolls layer 1 one pixel (C2Scene_Unk0568 with C2Scene_ScrollLayer = C2Scene_ScrollPx = 1), which... - verified
C2Scene_ClearParty$C2:7860 · 15 B · EngineScript routine: marks all three Party_Members slots empty (C2Scene_PartySlotEmpty). - verified
C2Scene_SaveParty$C2:786F · 25 B · EngineScript routine: copies the three Party_Members bytes to C2Scene_PartySave (C2Scene_RestoreParty puts them back). - verified
C2Scene_RestoreParty$C2:7888 · 25 B · EngineScript routine: copies C2Scene_PartySave back to Party_Members. - verified
C2Scene_TaskInView$C2:78A1 · 66 B · EngineScript routine (op $34 at $C3:8E82, followed by an op $23 test of $0000): C2Tmp_00 = 1 when the task is in BG2's view with a margin, else 0. - verified
C2Scene_Win1Init$C2:78E3 · 46 B · EngineScript routine: sets up C2Scene_HdmaTable[0] (two runs of 112 lines) as HDMA channel 1 to WH0/WH1 (indirect, two registers), turns the channel on, zeroes the buffer toggle .Var24 and falls into... - verified
C2Scene_Win1Step$C2:7911 · 70 B · Engine - verified
C2Scene_Win2Init$C2:7957 · 42 B · EngineScript routine (op $34 at $C3:A937): sets up C2Scene_HdmaTable[1] (two runs of 112 lines) as HDMA channel 2 to WH2/WH3 (indirect, two registers) and turns the channel on. - verified
C2Scene_Win2Step$C2:7981 · 71 B · EngineScript routine (op $34 at $C3:A93E, right after C2Scene_Win2Init's): adds one to .Var24 and picks C2Scene_SwirlCosB (now odd) or C2Scene_SwirlCosA (even) as WinFx_TablePtr (bank $7E), has... - verified
C2Scene_AddGravity$C2:79C8 · 24 B · EngineScript routine: adds 1/8 pixel a frame (C2Scene_GravityFrac) to the task's Y velocity (.YVelFrac, carrying into .YVel). - verified
C2Scene_NudgeXRandom$C2:79E0 · 44 B · EngineScript routine (op $34 at $C3:B792 and $C3:CB7E): moves the task right by a random 0-48 pixels: a random byte x C2Scene_NudgeRange / 256 (WRMPYA/B), rounded up when the low byte of the product has... - verified
C2Scene_RandPosA$C2:7A0C · 19 B · EngineScript routine: .SprX = $220 + a random 0-255, then falls into the sub-entry C2Scene_RandYA ($C2:7A1F): .SprY = $38 + a random 0-255. - verified
C2Scene_RandYA$C2:7A1F · 18 B · Engine - verified
C2Scene_RandPosB$C2:7A31 · 19 B · EngineScript routine: as C2Scene_RandPosA with .SprX = $E0 + a random 0-255, falling into the sub-entry C2Scene_RandYB ($C2:7A44): .SprY = -$48 + a random 0-255. - verified
C2Scene_RandYB$C2:7A44 · 18 B · Engine - verified
C2Scene_NoiseInit$C2:7A56 · 89 B · EngineScript routine (op $34 at $C3:C953): sets up C2Scene_HdmaTable[0] (two runs of 112 lines) as both HDMA channel 1 to BG1HOFS and channel 2 to BG2HOFS (indirect, one register twice: both layers get... - verified
C2Scene_NoiseStep$C2:7AAF · 43 B · EngineScript routine: moves both C2Scene_HdmaValues words 0-1 on by 32 lines (C2Scene_NoiseStep bytes), back to C2Scene_HandBufA when they reach its end ($8D16), so the screen shows the next part of the... - verified
C2Scene_NoiseShow$C2:7ADA · 17 B · EngineScript routine (op $34 at $C3:CA30): points C2Scene_HdmaValues words 0-1 at C2Scene_HandBufA and its second half (the noise). - verified
C2Scene_NoiseHide$C2:7AEB · 17 B · EngineScript routine (no reference found): points C2Scene_HdmaValues words 0-1 at C2Scene_HandBufB and its second half (every line the plain C2Scene_Bg1HScroll that C2Scene_NoiseInit stored). - verified
C2Scene_UnpackBgPack$C2:7AFC · 36 B · EngineScript routine (op $34 at $C3:A130 and $C3:C16E): unpacks the C2SceneRom_BgPacks entry at byte offset C2Tmp_08 (entry x 3, a word set by the script) into C2Scene_DecompBuf. - verified
C2Scene_UnpackBg3MapPack$C2:7B20 · 36 B · EngineScript routine (op $34 in the unpacked C2SceneRom_ScriptPacks 2, $C3:9F41, at +$0286 and 6, $C3:BF7B, at +$027E, each a few ops after that pack's op $34 to C2Scene_UnpackBgPack; the bytes are... - verified
C2Scene_SetUnk7F00AABit0$C2:7B44 · 11 B · EngineScript routine (op $34 at $C3:CCA3): sets bit 0 of C2Scene_Unk7F00AA (a byte of Menu_FlagBlock7F; what it means is not traced). - verified
C2Scene_SetUnk7F019ABit3$C2:7B4F · 11 B · EngineScript routine (op $34 at $C3:9238): sets bit 3 of C2Scene_Unk7F019A (Menu_FlagBlock7F; meaning not traced). - verified
C2Scene_LoadExtraObjPack$C2:7B5A · 37 B · EngineUnpacks entry C2Scene_ExtraObjPack of C2SceneRom_ObjPacks into C2Scene_DecompBuf. - verified
C2Scene_LoadExtraPalette$C2:7B7F · 32 B · EngineUnpacks entry C2Scene_ExtraPalPack of C2SceneRom_PalettePacks to A:X (C2Scene_LoadLocExtraGfx passes bank $00 and an address inside C2Scene_PaletteBuf). - verified
C2Scene_LoadUnkC600$C2:7B9F · 37 B · EngineUnpacks entry C2Scene_UnkC600Pack of C2SceneRom_PalettePacks into C2Scene_UnkC600 ($7E:C600); what it holds is not traced. - verified
C2Scene_TestUnk7F00F7Bit1$C2:7BC4 · 13 B · EngineScript routine (op $34 at $C3:98F4): C2Tmp_00 = 1 when bit 1 of C2Scene_Unk7F00F7 is set, else 0. - verified
C2Scene_SetConfig1E$C2:7BD1 · 7 B · EngineScript routine (op $34 at $C3:B665 and $C3:C669): Menu_Config1E (the byte LocLoad_AudioSetup keeps the music track in) = C2Tmp_00. - verified
C2Scene_BuildPatternTiles$C2:7BD8 · 80 B · EngineScript routine (no op $34 reference found): builds ten 4bpp tiles at C2Scene_PatternTiles ($7F:9000, the unpack buffer): zeroes the first eight ($100 bytes) and sets the two after them... - verified
C2Scene_PatternRows$C2:7C28 · 32 B · EngineBit plane 0 rows of the four tile pairs C2Scene_BuildPatternTiles builds, 8 rows per pair, sparse to full. - verified
C2Scene_SetUnk7F00CE$C2:7C48 · 7 B · EngineScript routine (no op $34 reference found): C2Scene_Unk7F00CE = C2Tmp_00. - verified
C2Scene_SetUnk7F00DA$C2:7C4F · 7 B · EngineScript routine (op $34 at $C3:C448): C2Scene_Unk7F00DA = C2Tmp_00. - verified
C2Scene_Bg2HWaveInit$C2:7C56 · 65 B · EngineScript routine (op $34 at $C3:C18F): sets up C2Scene_HdmaTable[0] (two runs of 112 lines) as HDMA channel 1 to BG2HOFS (indirect, one register twice) and turns it on, zeroes the buffer toggle... - verified
C2Scene_Bg2VWaveInit$C2:7C97 · 65 B · EngineScript routine (no op $34 reference found): as C2Scene_Bg2HWaveInit for BG2VOFS: C2Scene_HdmaTable[1] as HDMA channel 2, zeroes .Var26 and $7E:9176-$7E:95D5 (C2Scene_SwirlCosA to the end of... - verified
C2Scene_Bg2HWaveStep$C2:7CD8 · 134 B · EngineScript routine (op $34 at $C3:C1A1, probably once a frame): one step of a wave that runs up BG2: adds one to .Var26 and, by its parity, shows C2Scene_HandBufA (now even) or C2Scene_HandBufB (odd)... - verified
C2Scene_Bg2VWaveStep$C2:7D5E · 134 B · EngineScript routine (no op $34 reference found): C2Scene_Bg2HWaveStep for BG2VOFS: C2Scene_SwirlCosA (even) or C2Scene_SwirlCosB (odd) through C2Scene_HdmaValues words 2-3 (C2Scene_HdmaTable[1]). - verified
BankC2_FreeSpace7DE4$C2:7DE4 · 540 B · Engine$FF fill up to $C2:8000, where the menu part of the bank starts (BankC2_Entry8000).
Bank $C2 · $C2:8000–$8FFF
$C2:8000
Verified · 112
- verified
BankC2_Entry8000$C2:8000 · 2 B · EngineThree BRAs, the bank's second set of fixed entry points, each reached by JSL from other banks: $8000 BankC2_Entry8000 → BankC2_MenuEntry (A = an argument chosen by the caller, 0-6: the menu) $8002... - verified
BankC2_Entry8002$C2:8002 · 2 B · Engine - verified
BankC2_Entry8004$C2:8004 · 2 B · Engine - verified
BankC2_ReadPadLong$C2:8006 · 4 B · EngineMenu_ReadPad as a long call (the BankC2_Entry8002 vector). - verified
BankC2_CommandLong$C2:800A · 4 B · EngineMenu_RunCommand as a long call (the BankC2_Entry8004 vector). - verified
BankC2_MenuEntry$C2:800E · 129 B · EngineThe menu (reached by BRA from BankC2_Entry8000). - verified
Menu_EntryModes$C2:808F · 7 B · EngineMenu_Mode for each BankC2_MenuEntry argument 0-6 (an index into Menu_ModeLists). - verified
Menu_InitSystems$C2:8096 · 166 B · EngineThe menu's setup: DP=$0000; copies Menu_InterruptVectors (JML Menu_Nmi, JML Menu_Irq) over NmiTrampoline/IrqTrampoline ($0500-$0507; the MVN leaves DB=$7E); sends five sound-driver commands... - verified
Menu_CalcUnk0D38$C2:813C · 46 B · Engine - verified
Menu_BuildPartyLists$C2:816A · 38 B · EngineLists the characters of Menu_PartyOrder that are present (bit 7 clear) in Menu_PartyList, with their positions in Menu_PartyListPos, and counts them: Menu_PartyActive (positions 0-2) and... - verified
Menu_RunThreads$C2:8190 · 74 B · EngineThe menu's scheduler; never returns. - verified
Menu_RunThreadsNext$C2:81DA · 60 B · Engine - verified
Menu_ThreadEnd$C2:8216 · 8 B · Engine - verified
Menu_Yield$C2:821E · 13 B · Engine - verified
Menu_YieldFrames$C2:822B · 11 B · Engine - verified
Menu_YieldSave$C2:8236 · 19 B · Engine - verified
Menu_StartThread$C2:8249 · 12 B · EnginePuts a new thread in the slot at byte offset X: .Entry = A, .State = new and .Wait = 1 (it starts on the scheduler's next pass). - verified
Menu_KillThreads$C2:8255 · 23 B · EngineFrees the slots whose bit is set in A's low byte (bit n: slot n). - verified
Menu_MainThread$C2:826C · 3 B · EngineThread 1 (Menu_RunThreads starts it at the sub-entry Menu_MainThreadStart, $C2:826F): each frame calls handler Menu_ThreadVar of Menu_Mode's list in Menu_ModeLists (a list of 16-bit addresses in... - verified
Menu_MainThreadStart$C2:826F · 34 B · Engine - verified
Menu_ModeNone$C2:8291 · 1 B · EngineAn RTS that Menu_ModeLists entries 8-10 point at as their list: read as a list it gives handler $CA60 for index 0, so modes 8-10 are probably not used. - verified
Menu_ModeLists$C2:8292 · 32 B · EngineOne 16-bit address (bank $C2) per Menu_Mode $00-$0F: the list of handler addresses Menu_MainThread indexes by Menu_ThreadVar. - verified
Menu_Exit$C2:82B2 · 47 B · EngineLeaves the menu back to the caller of BankC2_Entry8000: frees every thread (Menu_KillThreads), Menu_Unk834D, fades out (Menu_FadeOut), forced blank, NMI off (auto-joypad on), DMA and HDMA off, S =... - verified
Menu_Unk82E1$C2:82E1 · 63 B · EngineZeroes Menu_Unk2857 (5 bytes), then for each of the 7 Menu_CharRecords whose Menu_CharRec.Unk2A is $AE-$B2: when the Menu_Unk04A4 byte of that value (- $AE) is non-zero, sets the Menu_Unk2857 byte... - verified
Menu_ExitToGame$C2:8320 · 15 B · EngineLeaves the menu for the game loop: frees every thread, Menu_Unk834D, fades out, then the sub-entry Menu_ExitRestart ($C2:832F; also BankC2_MenuEntry's new-game path): forced blank, NMI off... - verified
Menu_ExitRestart$C2:832F · 30 B · Engine - verified
Menu_Unk834D$C2:834D · 56 B · EngineFor each active party member (Menu_PartyOrder positions 0-2 not empty) copies the 6-byte bank-$D1 record of its weapon (Menu_WeaponRecSrc returns the MVN's source and the count - 1) into... - verified
Menu_QueueVramRom$C2:8385 · 9 B · EngineAppends the 8-byte VRAM upload (Menu_VramRec) at $C2:X to Menu_VramQueue (at Menu_VramQueueEnd, which then goes up by 8; Menu_FlushVramQueue sends them); the sub-entry Menu_QueueVramWram... - verified
Menu_QueueVramWram$C2:838E · 7 B · Engine - verified
Menu_QueueVramTail$C2:8395 · 13 B · Engine - verified
Menu_VramQueueSlot$C2:83A2 · 16 B · EngineY = Menu_VramQueue + Menu_VramQueueEnd (the next record's address) and A = 7 (the MVN count of 8 bytes). - verified
Menu_StartFadeIn$C2:83B2 · 11 B · EngineStarts Menu_FadeInThread in slot 0. - verified
Menu_FadeInThread$C2:83BD · 13 B · EngineThread: waits a frame, fades the brightness up by 2 a frame (Menu_Fade) and ends. - verified
Menu_FadeOut$C2:83CA · 6 B · EngineMenu_Fade with a step of -2 (to black). - verified
Menu_Fade$C2:83D0 · 54 B · EngineFades the screen: Menu_FadeStep = A (signed), Menu_FadeFrames = 1; then repeatedly adds the step to Menu_InidispShadow's brightness (bits 0-3): past 0 or down to it the brightness is left at 0 and... - verified
Menu_InterruptVectors$C2:8406 · 8 B · EngineCopied over NmiTrampoline / IrqTrampoline ($0500-$0507) by Menu_InitSystems: JML Menu_Nmi and JML Menu_Irq, the menu's interrupt handlers. - verified
Menu_Nmi$C2:840E · 100 B · EngineThe menu's NMI handler: saves DB, X, Y, P, then on its own stack (Menu_NmiStackTop; the old S kept in Menu_NmiSavedSp) A, D and P; DB = $00, DP = Menu_NmiDp. - verified
Menu_Irq$C2:8472 · 1 B · EngineThe menu's IRQ handler (through the JML at $C2:840A): returns at once. - verified
Menu_NmiPad$C2:8473 · 93 B · EngineThe menu NMI's pad step. - verified
Menu_RepeatDelays$C2:84D0 · 2 B · EngineMenu_PadRepeatDelay for Menu_RepeatStage 0 and 1. - verified
Menu_ReadPad$C2:84D2 · 26 B · EngineThe pad reader behind BankC2_Entry8002, run once a frame by the scene NMI and by other banks: reads joypad 1 (Menu_PollPad), maps it through the button configuration (Menu_MapButtons) and advances... - verified
Menu_PollPad$C2:84EC · 89 B · EngineWaits for the auto-joypad read to finish and rebuilds the pad words from JOY1 (layout as Pad_Pressed: low byte A X L R B Y Select Start, high byte Up Down Left Right in bits 3-0)... - verified
Menu_MapButtons$C2:8545 · 16 B · EngineTurns the three pad words into the game's button bytes through the configured button map (Menu_ButtonMap, 8 masks in the Pad_Pressed layout Menu_PollPad builds, not JOY1's): bit n of the result is... - verified
Menu_MapButtonsOne$C2:8555 · 89 B · Engine - verified
Menu_TickPlayTime$C2:85AE · 34 B · EngineAdds one frame to the play-time clock unless Menu_PlayTimePaused is set: Menu_PlayTime byte 0 counts up, and each byte that reaches its limit in Menu_PlayTimeLimits goes back to 0 and carries into... - verified
Menu_PlayTimeLimits$C2:85D0 · 6 B · EngineThe count at which each Menu_PlayTime byte wraps, lowest first: frames (60), seconds (60), minutes in two digits (10, then 6) and hours in two digits (10, 10). - verified
Menu_NmiUpload$C2:85D6 · 141 B · EngineThe menu NMI's frame upload (Menu_Nmi runs it with HDMA off when the menu loop has a frame ready): - BG1HOFS-BG3VOFS from the 12 bytes at Menu_ScrollShadow, each register written twice (low... - verified
Menu_FlushVramQueue$C2:8663 · 70 B · EngineSends Menu_VramQueue to VRAM, newest record first, each by DMA channel 7 to VMDATAL/H (two registers): VMADD = .Dest, from .SrcBank:.Src, .Size bytes (the direct page walks the records), then... - verified
Menu_UploadPalette$C2:86A9 · 52 B · EngineWhen Menu_PalDirty is non-zero: zeroes it and sends the 512 bytes of Menu_PalBuf ($7E:9480) to CGRAM from colour 0 by DMA channel 7. - verified
Menu_BuildGradient$C2:86DD · 148 B · EngineBuilds an HDMA table of colour math lines for channel 0 (direct, two registers: CGADSUB then COLDATA, set here; the table address is set by the menu NMI from Menu_GradBufSel): copies... - verified
Menu_GradientSteps$C2:8771 · 32 B · Engine16 CGADSUB / COLDATA pairs for Menu_BuildGradient: add (CGADSUB $02: BG2) the fixed colour of intensity 8 down to 0 (COLDATA $E8-$E0, all three channels), then subtract ($82) intensity 1 up to 7. - verified
Menu_AddItem$C2:8791 · 60 B · EngineAdds Menu_ItemCount of item Menu_ItemId to the inventory: to its slot (Menu_FindItem) or else to the first empty one (id stored, count 0), the count capped at 99. - verified
Menu_ItemSetCount$C2:87CD · 8 B · Engine - verified
Menu_RemoveItem$C2:87D5 · 37 B · EngineTakes Menu_ItemCount of item Menu_ItemId from its slot: A = Menu_ItemShort when it has fewer (nothing changed), Menu_InvFull when it is not there; else the new count is stored (Menu_ItemSetCount)... - verified
Menu_FindItem$C2:87FA · 28 B · EngineFinds the slot of item A with a non-zero count: C=0 with X = the slot and Menu_ItemSlot = X (a word), or C=1 with X = 0 (all 256 slots looked at). - verified
Menu_LoadCharRec$C2:8816 · 10 B · EngineMenu_LoadCharRecA for character A, keeping P and X. - verified
Menu_LoadPartyCharRec$C2:8820 · 25 B · EngineLoads the character at Menu_PartyList[Menu_CurMember] (Menu_LoadCharRecA); Menu_CurIsReserve = $FF when that index is past the active members (Menu_PartyActive), else 0. - verified
Menu_LoadCharRecA$C2:8839 · 72 B · EngineCopies the Menu_CharRecords record of character A (A x $50) to Menu_CurCharRec (its address kept in Menu_CurCharRecPtr), then the 6-byte Menu_Unk2C23 entry of the record's first byte AND 7 to... - verified
Menu_ItemCategory$C2:8881 · 38 B · EngineThe category of item A by Menu_ItemCategoryBounds (0: below $5A, 1: $5A-$7A, 2: $7B-$93, 3: $94-$BB, 4: from $BC) into Menu_ItemCategory, and its index within the category (A - the category's... - verified
Menu_ItemCategoryBounds$C2:88A7 · 6 B · EngineThe first item id of categories 0-4, then the end of the ids ($F2, the slot count Menu_ListEquipItems scans; not read by Menu_ItemCategory). - verified
Menu_ItemDataPtrA$C2:88AD · 43 B · EngineMenu_ItemCategory for item A, then X = Menu_ItemDataPtr = the address (bank $CC: the callers read the record with LDA $CC0000,X; only the pointer and size tables are in bank $FF) of the item's... - verified
Menu_ItemDataPtrB$C2:88D8 · 40 B · EngineAs Menu_ItemDataPtrA for the second set of per-category tables (MenuRom_ItemTablesB, MenuRom_ItemRecSizesB), using the Menu_ItemCategory / Menu_ItemIndex left by an earlier call; result in... - verified
Menu_CountEquippedBy$C2:8900 · 79 B · EngineFor each character of Menu_EquipChars (up to 7, stopping at the first with bit 7 set): Menu_EquipFlags[n] = 1 when the byte of its Menu_CharRecords record at the category's Menu_EquipSlotOffsets... - verified
Menu_EquipSlotOffsets$C2:894F · 4 B · EngineThe Menu_CharRec offset of the equipped item of categories 0-3 ($29, $28, $27, $2A), as Menu_CountEquippedBy reads it (inferred from that use only). - verified
Menu_ListEquipItems$C2:8953 · 137 B · EngineLists the inventory items of Menu_ListKind's id range (Menu_EquipListRanges: 0 $00-$59, 1 $7B-$93, 2 $5A-$7A, 3 $94-$BB) that the current character can equip (Menu_CanEquip: A non-zero), from... - verified
Menu_EquipListRanges$C2:89DC · 8 B · EngineFirst id and end id of each Menu_ListKind (Menu_ListEquipItems). - verified
Menu_StartCursorA$C2:89E4 · 14 B · EngineMenu_CursorYOfs = 0 and starts Menu_CursorThreadA in slot 6. - verified
Menu_CursorThreadA$C2:89F2 · 8 B · EngineThread: Menu_CursorStepA, wait a frame, for ever. - verified
Menu_CursorStepA$C2:89FA · 55 B · EngineOne frame of cursor A: blinks (Menu_CursorBlink) and, in the shown phase, when row Menu_Unk0D9D - Menu_Unk0416 + Menu_CursorIndex is below 10 (probably the row on screen of a scrolled list), puts... - verified
Menu_StartCursorB$C2:8A31 · 20 B · EngineMenu_CursorTileAttr = Menu_Unk0772 and starts Menu_CursorThreadB in slot 6. - verified
Menu_CursorThreadB$C2:8A45 · 83 B · EngineThread: each frame blinks (Menu_CursorBlink) and, in its phase with bit 0 clear, puts sprite 0 at Menu_CursorIndex's Menu_CursorPos (X + 2; Y - 1) with Menu_CursorTileAttr. - verified
Menu_StartCursorC$C2:8A98 · 26 B · EngineMenu_BlinkMask = $FC, Menu_CursorTileAttr = Menu_Unk0772, and starts Menu_CursorThreadC in slot 6. - verified
Menu_CursorThreadC$C2:8AB2 · 8 B · EngineThread: Menu_CursorStepC, wait a frame, for ever. - verified
Menu_CursorStepC$C2:8ABA · 27 B · EngineOne frame of cursor C: blinks with Menu_BlinkMask (Menu_CursorBlinkMasked) and, in its phase with bit 0 clear, puts sprite 0 at Menu_CursorIndex's Menu_CursorPos (X + 2, Y - 1) with... - verified
Menu_StartCursorD$C2:8AD5 · 32 B · EngineStarts Menu_CursorThreadD in slot 6 with the three blink timers at 3, 1 and 2 and Menu_CursorBlink = 2 (sprite 1 starts hidden). - verified
Menu_CursorThreadD$C2:8AF5 · 8 B · EngineThread: Menu_CursorStepD, wait a frame, for ever. - verified
Menu_CursorStepD$C2:8AFD · 108 B · EngineOne frame of cursor D, one blinking cursor per active party member (Menu_PartyActive of them): tiles and attributes $3020 into all three sprites (and $20 into Menu_Unk0D9B); each of the three... - verified
Menu_CursorBlinkMasked$C2:8B69 · 5 B · EngineBlink timer 0: clears the bits of Menu_BlinkTimers[0] that A has set (Menu_CursorBlinkMasked passes Menu_BlinkMask; the sub-entry Menu_CursorBlink, $C2:8B6E, $FC, leaving a count 0-3), counts it... - verified
Menu_CursorBlink$C2:8B6E · 23 B · Engine - verified
Menu_CursorPosAB$C2:8B85 · 14 B · EngineThe sprite position for cursor index A: with M=1, A = X + 2 and B = Y - 1 of its Menu_CursorPos record (X = the record offset, Menu_CursorRecOffset). - verified
Menu_StartListArrows$C2:8B93 · 19 B · EngineMenu_ArrowsOff = 0 and starts Menu_ListArrowsThread in slot 4. - verified
Menu_Times4$C2:8BA6 · 18 B · EngineA = the low byte of A x 4, through the hardware multiplier (two XBAs and a NOP as the wait). - verified
Menu_ListArrowsThread$C2:8BB8 · 126 B · EngineThread (slot 4): each frame counts Menu_ArrowTimer (7..0) and toggles bit 0 of Menu_ArrowBlink when it wraps. - verified
Menu_RunCommand$C2:8C36 · 36 B · EngineRuns command A (Menu_CommandTable) with Menu_CmdChar = Y and Menu_ItemId = X (low bytes), stores its result A in Menu_CmdResult, runs Menu_Unk834D (for every command) and returns the result. - verified
Menu_RunCommand_Return$C2:8C5A · 1 B · Engine - verified
Menu_CommandTable$C2:8C5B · 26 B · EngineMenu_RunCommand's handlers by command number (BankC2Cmd_* in constants_engine.inc). - verified
Menu_CmdFindInParty$C2:8C75 · 4 B · EngineCommand 0: Menu_CmdFindListed over the 3 active positions only. - verified
Menu_CmdAddToParty$C2:8C79 · 26 B · EngineCommand 1: puts character Menu_CmdChar in the active party. - verified
Menu_CmdJoin$C2:8C93 · 15 B · Engineposition Y = Menu_CmdChar, and its bit in Menu_Unk29AF (BankFF_CharBits: $80 for character 0 ... $01 for 7) set; A = the character. - verified
Menu_CmdPartyToReserve$C2:8CA2 · 28 B · EngineCommand 2: when character Menu_CmdChar is in the active party, the members after it move up one, the third position is emptied (bit 7 set on the byte now there), and the character goes to the... - verified
Menu_CmdPushReserve$C2:8CBE · 17 B · Engine - verified
Menu_CmdFindListed$C2:8CCF · 2 B · EngineCommand 3: looks for character Menu_CmdChar in Menu_PartyOrder positions 0 to Menu_CmdLimit - 1 (all 9 here; 3 from the sub-entry Menu_CmdFindListed_Limit, A = the count, used by Menu_CmdFindInParty). - verified
Menu_CmdFindListed_Limit$C2:8CD1 · 20 B · Engine - verified
Menu_CmdAddToReserve$C2:8CE5 · 18 B · EngineCommand 4: unless character Menu_CmdChar is listed already, puts it in the first empty reserve position (Menu_CmdJoin, which also sets its Menu_Unk29AF bit); nothing when the reserve is full. - verified
Menu_CmdUnlist$C2:8CF7 · 14 B · EngineCommand 5: empties the Menu_PartyOrder position of character Menu_CmdChar (bit 7 set; nothing moves up). - verified
Menu_CmdRefillWord3$C2:8D05 · 23 B · EngineCommand 6: Menu_RecRefillWord3 for each of the 7 Menu_CharRecords. - verified
Menu_RecRefillWord3$C2:8D1C · 41 B · EngineFor the Menu_CharRecords record at Y: word .Word3 = word .Word5 plus a bonus by .Unk2A ($A1: half of .Word5, $A0: a quarter, else none), capped at 999. - verified
Menu_CmdRefillByte7$C2:8D45 · 30 B · EngineCommand 7: for each of the 7 Menu_CharRecords, byte .Word7 = byte .Word9 (low bytes only). - verified
Menu_CmdSetSram7FE2$C2:8D63 · 7 B · EngineCommand 8: Menu_SramUnk7FE2 = $FF (BankC2_MenuEntry's new-game path zeroes it; meaning not traced). - verified
Menu_CmdBootCheckSaves$C2:8D6A · 37 B · EngineCommand 9 (BankC2_BootArg, from GameLoop at boot): runs BankFF_UnkF9C4 for Menu_SaveSlot = 0, 1, 2 until one returns A = 0: the save-slot check (the slot's signature word and checksum in SRAM... - verified
Menu_CmdEquip$C2:8D8F · 80 B · EngineCommand $0A: equipment of character record Menu_CmdChar (the Menu_CharRecords index), item Menu_ItemId: - id 0: the four equipment bytes (Menu_EquipSlotOffsets) get the "no item" ids of... - verified
Menu_EquipNoneIds$C2:8DDF · 4 B · Enginethe "no item" id of categories 0-3. - verified
Menu_CmdEquipItem$C2:8DE3 · 59 B · Enginethe item path (Menu_ItemId non-zero). - verified
Menu_CmdItemCount$C2:8E1E · 15 B · EngineCommand $0C: A = the count of item Menu_ItemId held (Menu_FindItem), 0 when there is none. - verified
Menu_ApplyHeal$C2:8E2D · 85 B · EngineMenu_HealShown's six words = $FFFF (nothing to show); the amounts (Menu_CalcHealAmounts); then for member Menu_UseTarget, or with Menu_UseKind bit 3 every active member (Menu_PartyActive of them... - verified
Menu_HealHp$C2:8E82 · 41 B · EngineMember X / 2's HP amount (Menu_HealAmounts), or the record's .Unk3F (max HP) when Menu_UseAmountB bit 6 is set (the 16-bit BIT of Menu_UseAmountA: V = bit 14); at most 999; that goes to... - verified
Menu_HealMp$C2:8EAB · 33 B · EngineAs Menu_HealHp for MP: amount Menu_HealAmounts[3 + X / 2], or .Word9 (max MP) when full, to Menu_HealShown[3 + X / 2] (no cap), added to .Word7, at most .Word9. - verified
Menu_CalcHealAmounts$C2:8ECC · 137 B · EngineThe six Menu_HealAmounts words (HP for members 0-2, then MP), with DB=$00 for the multiplier. - verified
Menu_UseHealOn$C2:8F55 · 23 B · EngineMenu_UseHealItem's confirm: Menu_ApplyHeal, colours $84-$87 = MenuRom_HealNumberPal, Menu_ShowHealNumbers. - verified
Menu_ShowHealNumbers$C2:8F6C · 95 B · EngineShows the Menu_HealShown amounts over the members' sprites and waits for them: the digit tiles (BankFF_WidenTiles) queued (Menu_VramRecDigits); the palette flagged; Menu_HealCount and... - verified
Menu_HealNumberHp$C2:8FCB · 36 B · EngineMember Menu_CurMember's HP amount (Menu_HealShown[member]), unless negative (none): its BCD (Menu_BinToBcd, 2 bytes) word to Menu_HealShown at Menu_Tmp00 (the packed index), Menu_HealParts = 1... - verified
Menu_HealNumberMp$C2:8FEF · 39 B · EngineAs Menu_HealNumberHp for the MP amount (Menu_HealShown + 6, one byte to BCD), into Menu_HealShown + 6 at Menu_Tmp00, Menu_HealParts bit 1.
Bank $C2 · $C2:9000–$9FFF
$C2:9000
Verified · 63
- verified
Menu_HealNumbersThread$C2:9016 · 49 B · EngineThe thread of Menu_ShowHealNumbers (slot 7): with Menu_HealParts bit 0, the HP numbers (Menu_HealBounce from entry 0, 4 digits, values at Menu_HealShown) with sound 6 (Menu_PlaySfxNow); then with... - verified
Menu_HealBounce$C2:9047 · 76 B · EngineSound A (Menu_PlaySfxNow), then a frame at a time (a yield between): OAM high-table bytes $0908-$090A (entries 32-43) zeroed; the next byte of MenuRom_HealBounce (Menu_HealStep + 1) is the lift; a... - verified
Menu_HealNumberSprites$C2:9093 · 101 B · EnginePuts the BCD value Menu_NumBcd as digit sprites from OAM entry 32 + Y / 4 on, digit Menu_Tmp00 (the highest) down to 0: leading zeros (but not the ones digit) take an entry without writing it; at... - verified
Menu_HealNumberXOfs$C2:90F8 · 4 B · EngineBy the highest digit drawn (0-3): the first sprite's X offset, -4, -8, -12, -16 (the number centred on .ScreenX). - verified
Menu_StashInventory$C2:90FC · 37 B · EngineWith Menu_Unk0D7E set: the inventory ($200 bytes, Menu_InvIds and Menu_InvCounts) is copied to Menu_InvStash and the ids are zeroed (the counts stay), so the item and equipment screens show none. - verified
Menu_UnstashInventory$C2:9121 · 22 B · EngineWith Menu_Unk0D7E set: Menu_InvStash is copied back over the inventory ($200 bytes). - verified
Menu_CharRecalc$C2:9137 · 55 B · EngineMenu_CharCalcStats; with accessory Menu_DoubleStat5Item, stat 5 is doubled (ASL); then the record's .Word3 = Menu_CurCharRec's (as capped by Menu_EquipStatCat3), and the 11 derived bytes... - verified
Menu_CharCalcStats$C2:916E · 109 B · EngineMenu_StatBoosts, Menu_WeaponPower and Menu_ArmorSum ($0DAE-$0DB6) = 0; Menu_EquipSlotStats for slots 3, 2, 1, 0 (Menu_EquipSlotIdx); then for i = 6 down to 0, stat s = MenuRom_StatOrder[i]... - verified
Menu_AttackFormulas$C2:91DB · 16 B · EngineThe attack formula by character (record byte 0 AND 7): A for 0, 3, 4, 6 and 7, B for 1 and 2, C for 5. - verified
Menu_AttackFormulaA$C2:91EB · 56 B · EngineWRDIV = 5 x Menu_WeaponPower + 12 x stat 0; A = 9 (the divisor). - verified
Menu_AttackFormulaB$C2:9223 · 25 B · EngineWRDIV = 2 x (stat 4 + Menu_WeaponPower); A = 3. - verified
Menu_AttackFormulaC$C2:923C · 37 B · EngineWRDIV = 16 x stat 0 + MenuRom_Char5Attack[record byte $12] (a word table; the doubled index is taken 8-bit); A = 9. - verified
Menu_EquipSlotStats$C2:9261 · 13 B · EngineAdds equipment slot Menu_EquipSlotIdx (0-3) to the sums through Menu_EquipStatTable. - verified
Menu_EquipStatTable$C2:926E · 8 B · EngineMenu_EquipSlotStats' routine per slot: 0 the weapon byte (.Unk29), 1 .Unk28, 2 .Unk27, 3 the accessory (.Unk2A), the category order of Menu_EquipSlotOffsets. - verified
Menu_EquipStatWeapon$C2:9276 · 11 B · EngineMenu_WeaponPower = Menu_ItemSortKeys[weapon], then its boosts (Menu_AddItemBoosts, a branch). - verified
Menu_EquipStatCat1$C2:9281 · 5 B · EngineX = the .Unk28 item, then Menu_EquipStatCat2's .add. - verified
Menu_EquipStatCat2$C2:9286 · 15 B · EngineMenu_ArmorSum += Menu_ItemSortKeys[.Unk27 item] (from .add: the item in X), then its boosts (Menu_AddItemBoosts). - verified
Menu_EquipStatCat3$C2:9295 · 44 B · EngineThe accessory: Menu_CurMaxHp = .Word5 + .Word5 / 2 (Menu_BonusHalfId) or / 4 (Menu_BonusQuarterId) or + 0, at most 999; .Word3 lowered to it when above; then the accessory's boosts (falls into... - verified
Menu_AddItemBoosts$C2:92C1 · 51 B · EngineFor item X: v = Menu_ItemInfo4[X]; when non-zero, the word MenuRom_ItemBoosts[v] gives in its low byte (bit 0 dropped) one bit per stat order entry from bit 7 down (MenuRom_StatOrder[i] for the... - verified
Menu_UnpackConfig$C2:92F4 · 91 B · EngineZeroes $0D86-$0D91, then splits the first three Menu_Config bytes into one variable per field: byte 0 bits 3-7 into Menu_CfgA3-A7 (0 or 1 each) and bits 0-2 into Menu_CfgALow; byte 1 bits 0-2 into... - verified
Menu_PackConfig$C2:934F · 89 B · EngineThe reverse of Menu_UnpackConfig: Menu_Config byte 0 = Menu_CfgA7, A6, A5, A4, A3 (bit 0 of each) in bits 7-3 and Menu_CfgALow AND 7; byte 1 = Menu_CfgB7, B6 in bits 7-6, (Menu_CfgBMid AND 7) x 8... - verified
Menu_CanEquip$C2:93A8 · 23 B · EngineWhether the current character can equip item Menu_ItemId: A = Menu_ItemEquipChars[id] AND the character's BankFF_CharBits bit (the character id is the first byte of Menu_CurCharRec); non-zero = yes. - verified
Menu_PageScroll$C2:93BF · 78 B · EnginePages a list on Menu_PadAction bits 1 (back) and 0 (on; bit 1 wins): the new top is Menu_PageTop - Menu_PageStep (no borrow test: a wrap is caught by the compare with Menu_PageMax, and the top... - verified
Menu_InitPpuAndRam$C2:940D · 259 B · EnginePuts the PPU and CPU registers into the menu's starting state, then clears all of VRAM and most of bank $7E with DMA. - verified
Menu_DmaZeroWord$C2:9510 · 2 B · Enginethe fixed DMA source of Menu_InitPpuAndRam's VRAM clear and of Menu_DmaClearWram. - verified
Menu_DmaClearWram$C2:9512 · 48 B · EngineZeroes Y bytes of bank $7E from address X with DMA channel 0 (fixed source Menu_DmaZeroWord, one register: WMDATA). - verified
Menu_DmaCopyFFToWram$C2:9542 · 44 B · EngineCopies Y bytes from bank $FF (MenuRom_DmaCopyBank), address A, to bank $7E at address X with DMA channel 0 (stepping source, one register: WMDATA). - verified
Menu_InitNewGameData$C2:956E · 77 B · EngineSets up the data of a new game (inferred from what it fills). - verified
Menu_ClearConfigAndFlags$C2:95BB · 80 B · EngineZeroes Menu_FlagBlock7F ($7F:0000-$01FF), the page $7E:0400-$04FF (Menu_PlayTime and what follows) and Menu_Config ($2990-$29AF), then copies MenuRom_DefaultConfig (12 B) to Menu_Config and the 9... - verified
Menu_Expand3bppTiles$C2:960B · 35 B · EngineExpands A 3bpp tiles (24 bytes: planes 0-1, then plane 2) from bank $FF at X to 4bpp tiles in bank $7E at Y: the 16 bytes of planes 0-1 are copied (MVN), then each plane-2 byte is stored with... - verified
Menu_TilesOrPlane3$C2:962E · 37 B · EngineFor Y 4bpp tiles from X: each row's plane 3 = planes 0 OR 1 OR 2, so every non-zero pixel gets colour + 8 (colours 1-7 become 9-15). - verified
Menu_TilesOrPlanes23$C2:9653 · 37 B · EngineFor Y 4bpp tiles from X: each row's planes 2 and 3 = planes 0 OR 1, so colours 1-3 become 13-15. - verified
Menu_TileOrPlane2$C2:9678 · 21 B · EngineFor the 4bpp tile at X: each row's plane 2 = planes 0 OR 1 and plane 3 = 0 (one word store), so colours 1-3 become 5-7. - verified
Menu_LoadGraphics$C2:968D · 445 B · EngineBuilds the menu's tiles in Menu_TileBuf / Menu_Bg3TileBuf and sends them to VRAM through Menu_VramQueue (forced blank: Menu_InitSystems runs it after Menu_InitPpuAndRam), then loads part of the... - verified
Menu_ClearOam$C2:984A · 43 B · EngineHides every sprite of the OAM copy: all 128 low-table entries = X 0, Y $E0, tile 0, attributes $E0 (the word Menu_OamHidden, $E000, repeated) and the 32 high-table bytes = Menu_OamHighInit ($AA... - verified
Menu_BuildItemTables$C2:9875 · 275 B · EnginePrepares the menu's item and character data: - Menu_CleanInventory; - Menu_Unk0D7C/0D7E: 0, or $FFFF when Menu_Flag7F00BA has bit 0 set (0D7C) and also bit 1 clear (0D7E); Menu_Unk0D32/0D34 = 0... - verified
Menu_CleanInventory$C2:9988 · 42 B · EngineEmpties every inventory slot (id and count = 0) whose count is 0, or whose id is 0, a category's "no item" id ($5A, $7B, $94) or Menu_ItemIdEnd and above. - verified
Menu_RefreshAllChars$C2:99B2 · 24 B · EngineFor characters 0-6: Menu_LoadCharRec, then Menu_CharRecalc (the derived stats, written back to the record). - verified
Menu_Mode00List$C2:99CA · 4 B · EngineMenu_ModeLists entry 0: the handlers Menu_MainThread runs by Menu_ThreadVar. - verified
Menu_MainMenuInit$C2:99CE · 77 B · EngineHandler 0 of mode 0. - verified
Menu_MainMenuLoop$C2:9A1B · 125 B · EngineHandler 1 of mode 0, every frame: Menu_CursorSel = Menu_MainSel, Menu_PadInput (the pad: it moves Menu_CursorSel and sets Menu_PadAction). - verified
Menu_ReturnToMainMenu$C2:9A98 · 21 B · EngineBack from a submenu to mode 0: Menu_Mode = 0, Menu_ThreadVar = 1 (Menu_MainMenuLoop), the threads of Menu_SubThreads killed, Menu_MainMenuRedraw, and a tail jump to Menu_PlaySound0. - verified
Menu_MainMenuMaps$C2:9AAD · 167 B · EngineBuilds two tilemaps in WRAM: a 16 x 6 window frame at Menu_MainFrame (tiles $3FA4-$3FAC: corners, edges and fill; row 1 copied to rows 2-4) and the background pattern of BG2 at Menu_Bg2Map (the 2... - verified
Menu_MainMenuPreview$C2:9B54 · 17 B · EngineThe preview of icon Menu_MainSel: its Menu_MainPreviewTable routine, then Menu_MainMenuIcons. - verified
Menu_MainPreviewTable$C2:9B65 · 12 B · EngineMenu_MainMenuPreview's routine per icon 0-5 (Menu_Icon0Preview to Menu_Icon3Preview for icons 0-3; Menu_UnkC9E5, the party order of mode 5, for icon 4 and Menu_UnkD065, the save slots of mode 6... - verified
Menu_MainMenuRedraw$C2:9B71 · 18 B · EngineRedraws mode 0 after a submenu: icon Menu_MainSel's Menu_MainRedrawTable routine, Menu_MainMenuIcons, then a tail jump to Menu_QueueVramRom with Menu_VramRecBg2B (VRAM $6040 = $7E:3E80, $680 bytes). - verified
Menu_MainRedrawTable$C2:9B83 · 12 B · EngineMenu_MainMenuRedraw's routine per icon 0-5 (Menu_Icon0Redraw to Menu_Icon3Redraw for icons 0-3; Menu_UnkCAE6 for icon 4 and Menu_UnkD0DB for icon 5). - verified
Menu_MainMenuIcons$C2:9B8F · 79 B · EngineMenu_RunDrawList with MenuRom_MainIconList; Menu_HdmaenShadow |= Menu_MainHdmaBits (HDMA channels 0 and 1 and Menu_NmiMoveReq: the NMI copies Menu_NmiMoveSize = $1E bytes from $7E:9750 to... - verified
Menu_MainIconSprites$C2:9BDE · 75 B · EngineOAM entries 0-5 = MenuRom_MainIconOam (the six icons), the selected icon's tile + $20; entries 6 and 7 = arrows (tile $22, Menu_ArrowAttr, the second flipped vertically) at the selected icon's X +... - verified
Menu_Mode01List$C2:9C29 · 8 B · EngineMenu_ModeLists entry $01: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below). - verified
Menu_Mode01H0$C2:9C31 · 8 B · EngineHandler 0: Menu_PlaySound0, Menu_ThreadVar + 1 (to handler 1) and a tail jump to Menu_Mode01Init. - verified
Menu_Mode01H1$C2:9C39 · 55 B · EngineHandler 1, every frame: Menu_PadInput. - verified
Menu_Mode01H2$C2:9C70 · 53 B · EngineHandler 2, every frame: Menu_PadInput. - verified
Menu_Mode01H3$C2:9CA5 · 87 B · EngineHandler 3, every frame: Menu_PadInput. - verified
Menu_EquipClearCharFlag$C2:9CFC · 27 B · EngineWith Menu_ListKind 0: the character id at Menu_PartyList[Menu_Unk0412] (the cursor row alone, not Menu_CurMember = row + Menu_Unk0413: with the list scrolled this is another member's id) gets its... - verified
Menu_MemberCursor$C2:9D17 · 68 B · EngineHandler 1's cursor: when the member list scrolls (Menu_MemberMaxTop non-zero), an edge move (Menu_CursorDpad bit 7) scrolls it a row (Menu_MemberListScroll). - verified
Menu_MemberListScroll$C2:9D5B · 84 B · EngineScrolls the member list one row: without Down (an Up edge), Menu_Unk0413 - 1 unless it is 0, the new row drawn at $7E:3580, the rows copied to row $26, Menu_ScrollStep = -4, Menu_RowScrollWord =... - verified
Menu_MemberScrollAnim$C2:9DAF · 199 B · EngineThe member list's row scroll: Menu_CurMember = Menu_CursorSel + Menu_Unk0413 is loaded and drawn at Menu_MapPtr (Menu_DrawMemberRow), its 6 x 12 tiles in both maps get attribute bit 4... - verified
Menu_HighlightMemberRow$C2:9E76 · 58 B · EngineFor the 3 member rows (6 x 12 tiles each from $7E:2E84, $180 bytes apart, and the same in the BG2 map): attribute bit 4 set (palette + 4, where Menu_Icon0Preview puts the dimmed colours) except on... - verified
Menu_SetMemberRowAttr$C2:9EB0 · 29 B · EngineMenu_SetRowsAttr on 6 rows of Y's low byte tiles from Menu_Tmp04, OR Y's high byte (attribute bits 4-7 cleared, then set), in the BG1 map and $1000 bytes on (the BG2 map); a tail jump for the second. - verified
Menu_EquipSlotIdle$C2:9ECD · 56 B · EngineHandler 2's frame without confirm or cancel: Menu_DrawSlotName, Menu_MemberPageSwitch, Menu_PlaySound0 when Menu_CursorSel differs from Menu_Unk0FC5 (which takes it), Menu_HighlightSlot... - verified
Menu_EquipItemIdle$C2:9F05 · 217 B · EngineHandler 3's frame without confirm or cancel, on the item list (Menu_EquipList, top row Menu_EquipListTop). - verified
Menu_ShiftItemListMap$C2:9FDE · 45 B · EngineMoves the item list's tilemap rows ($7E:4F80-$537F) by one item (two tile rows, $80 bytes) after a scroll: with Menu_ScrollStep positive (read as the high byte of the word at Menu_ScrollStep - 1)...
Bank $C2 · $C2:A000–$AFFF
$C2:A000
Verified · 70
- verified
Menu_MemberPageSwitch$C2:A00B · 70 B · EngineOn Menu_PadAction's page bits: bit 1 the next member (Menu_Unk85 wraps to 0), bit 0 the one before (0 wraps to Menu_Unk85 - 1). - verified
Menu_Icon0Preview$C2:A051 · 150 B · EngineMenu_MainPreviewTable entry 0. - verified
Menu_DimPalette$C2:A0E7 · 26 B · EngineCopies colours 0-23 of Menu_PalBuf to Y at half brightness: each colour shifted right one bit with the bits that came down from the next channel masked off (AND $3DEF). - verified
Menu_Icon0Redraw$C2:A101 · 25 B · EngineMenu_MainRedrawTable entry 0: colours $70-$77 = MenuRom_Icon0RedrawPal, Menu_UnstashInventory, Menu_HdmaenShadow = Menu_Icon0HdmaBits. - verified
Menu_Mode01Init$C2:A11A · 86 B · EngineMode 1's set-up (Menu_Mode01H0 jumps here): Menu_StashInventory; the tilemap $7E:3600-$3DFF zeroed; colours $70-$73 and $74-$77 both = the 4 colours at MenuRom_Mode01Pal; the draw list... - verified
Menu_MemberArrows$C2:A170 · 66 B · EngineThe list arrows of the member list, with DB=$00 for the multiplier and divider: nothing when Menu_MemberMaxTop is 0. - verified
Menu_DrawMemberRows$C2:A1B2 · 55 B · EngineDraws the member rows from Menu_Unk0413 on into the tilemap from $7E:2E00, 6 rows ($180 bytes) apart, until Menu_Unk85 members or 3 rows (the map address reaching $3280): Menu_DrawMemberRow for a... - verified
Menu_DrawEmptyRow$C2:A1E9 · 6 B · EngineRuns the draw list MenuRom_EmptyRowList (a tail jump). - verified
Menu_MemberRowFlags$C2:A1EF · 39 B · EngineFor the loaded character (Menu_CurCharRec): Menu_Unk0D4D = its id (record byte 0 AND 7) OR $20; Menu_Unk0D5D = 4 when its Menu_Unk0D38 quotient is at least the record's word +3, else 0 (probably... - verified
Menu_DrawMemberRow$C2:A216 · 9 B · EngineMenu_MemberRowFlags, then the draw list MenuRom_MemberRowList (a tail jump). - verified
Menu_RedrawMember$C2:A21F · 16 B · EngineMenu_DrawMemberStatus, then the member's row again at the top of the list map ($7E:2E00, Menu_DrawMemberRow). - verified
Menu_DrawMemberStatus$C2:A22F · 68 B · EngineThe selected member: the clock (Menu_DrawClock at Menu_MainClockTile), Menu_CurMember = Menu_Unk0412 + Menu_Unk0413, Menu_LoadPartyCharRec and Menu_CharRecalc, the draw list MenuRom_StatusList... - verified
Menu_DrawCharIcon$C2:A273 · 83 B · EngineDraws a 6 x 2 tile block at $7E:2EEC / $7E:2F2C: the 12 tile words from MenuRom_CharIconTiles[e] on, e = Menu_CharIconIndex[the loaded character's id], and copies 16 colours from... - verified
Menu_CharIconIndex$C2:A2C6 · 7 B · EnginePer character id 0-6: the byte offset into MenuRom_CharIconTiles and MenuRom_CharIconPals (Menu_DrawCharIcon). - verified
Menu_EquipSlotsClose$C2:A2CD · 84 B · EngineBack from handler 2 to handler 1: Menu_ScrollStep's low byte = 0, Menu_CursorSel = Menu_Unk0412, Menu_CurMember = it + Menu_Unk0413 and loaded (Menu_LoadPartyCharRec), Menu_DrawEquipNames (X =... - verified
Menu_EquipSlotsOpen$C2:A321 · 106 B · EngineFrom handler 1 to handler 2: the draw list MenuRom_SlotsOpenList, Menu_CurMember = Menu_Unk0412 + Menu_Unk0413 loaded and its row drawn at the top of the BG1 map ($7E:2E00, Menu_DrawMemberRow)... - verified
Menu_DrawSlotName$C2:A38B · 47 B · EngineMenu_ListKind = Menu_CursorSel (the slot) and its name, Menu_EquipSlotNames[slot] (10 tiles, bank $C2), drawn at $7E:3086 with Menu_TextWord = 0 (Menu_DrawString); then the two tile rows at... - verified
Menu_EquipSlotNames$C2:A3BA · 40 B · EngineThe four slot names, 10 bytes each in the menu's text encoding ($FF blank, $A0 'A', $BA 'a'): " Weapon ", " Helmet ", " Armor ", and "Accessory" followed by a 0 byte, which ends the string. - verified
Menu_HighlightSlot$C2:A3E2 · 11 B · EngineMenu_SetSlotRowsAttr from $7E:3062. - verified
Menu_SetSlotRowsAttr$C2:A3ED · 45 B · EngineFor the 4 slot rows (two tile rows each, $80 bytes apart) from X: the attribute byte of 11 tiles in both tile rows (Menu_SetAttr2Rows) = $1C (palette 7) except on row Menu_ListKind (the selected... - verified
Menu_EquipItemsOpen$C2:A41A · 67 B · EngineFrom handler 2 to handler 3: Menu_EquipItemsSlideIn, the draw list MenuRom_ItemsOpenList, Menu_VramRecBg2B queued, Menu_ArrowX/Y = $68 / $42, Menu_EquipListSetup, the NMI move Menu_ScrollBuild ->... - verified
Menu_EquipListRefresh$C2:A45D · 6 B · EngineMenu_ArrowX/Y = $68 / $62, then falls into Menu_EquipListSetup. - verified
Menu_EquipListSetup$C2:A463 · 72 B · EngineThe item list of slot Menu_ListKind: Menu_ListEquipItems, WRDIVL/H = $1500 (the dividend of Menu_ListPageSetup's arrow factors), Menu_VramRecBg3 queued; Menu_EquipListTop = 0, Menu_Unk0D26 =... - verified
Menu_EquipSlotRecOfs$C2:A4AB · 4 B · EnginePer slot (Menu_ListKind 0-3): the character record's byte that holds it (Menu_Unk0D26; Menu_Mode01H3 swaps that byte with the inventory). - verified
Menu_EquipItemsSlideIn$C2:A4AF · 105 B · EngineHandler 2 to 3 (Menu_EquipItemsOpen): the draw list MenuRom_ItemsSlideInList; the 12 words at Menu_Unk5CC2 = Menu_ItemsSlideInWordA; the NMI move Menu_ScrollBuild -> Menu_Mode01HdmaTable... - verified
Menu_EquipItemsSlideStep$C2:A518 · 81 B · EngineOne frame of the item slides: Menu_SlideWordA += Menu_SlideStep and the 12 words at Menu_Unk5CC2 = it; Menu_SlideWordB += Menu_SlideStep and the 28 words from Menu_Unk5D42 = it... - verified
Menu_DrawEquipList$C2:A569 · 49 B · EngineDraws Menu_EquipPageRows (8) rows of the item list from entry Menu_EquipListTop of Menu_EquipList on, each with Menu_DrawEquipItem at Menu_EquipListMap ($7E:4FC6) + $80 per row (two tile rows). - verified
Menu_DrawEquipItem$C2:A59A · 41 B · EngineDraws item Menu_ItemId at $7E:X with Menu_TextWord = Menu_ItemNameAttr (attribute byte $20) for the string: its name from Menu_ItemNamePtr, without the name's first byte (Y + 1, count 10 of the... - verified
Menu_EquipPreviewItem$C2:A5C3 · 36 B · EngineHandler 3's frame: the item under the cursor, Menu_EquipList[ Menu_EquipListTop + Menu_CursorSel - 4] (the list's first row is cursor record 4), goes to Menu_ItemId and into the slot's byte of... - verified
Menu_EquipCompareStats$C2:A5E7 · 91 B · EngineRecomputes the stats with the item tried on (Menu_CharCalcStats; stat 5 doubled with accessory Menu_DoubleStat5Item, as Menu_CharRecalc does), then compares each value with the one the record copy... - verified
Menu_EquipCompareOfs$C2:A642 · 11 B · EngineMenu_EquipCompareStats' order: Menu_CharRec offsets of attack, defence and stats 0, 2, 5, 3, 1, 4, 6 (.Derived + 7, + 8, + 0 ...); its loop reads the first 9. - verified
Menu_EquipItemsClose$C2:A64D · 74 B · EngineBack from handler 3 to handler 2 (Menu_Mode01H3, after a confirm or a cancel): the selected member again (Menu_DrawMemberStatus, which reloads the record copy), Menu_CalcUnk0D38, the member's row... - verified
Menu_EquipItemsSlideOut$C2:A697 · 89 B · EngineThe reverse of Menu_EquipItemsSlideIn: the draw list MenuRom_ItemsSlideOutList; Menu_VramRecClock and Menu_VramRecBg2B queued; the NMI move Menu_ScrollBuild -> Menu_Mode01HdmaTable... - verified
Menu_DrawEquipNames$C2:A6F0 · 46 B · EngineThe names of the four equipped items of the record copy, in slot order (weapon .Unk29, .Unk27, .Unk28, accessory .Unk2A), one under the other from $7E:X, $80 bytes (two tile rows) apart... - verified
Menu_EquipSlotsSlideIn$C2:A71E · 153 B · EngineHandler 1 to 2 (Menu_Mode01H1, before Menu_EquipSlotsOpen): the draw list MenuRom_SlotsSlideInList; the NMI move Menu_ScrollBuild -> Menu_EquipHdmaTable, Menu_Mode01HdmaBytesA bytes... - verified
Menu_EquipSlotsSlideStep$C2:A7B7 · 165 B · EngineOne frame of Menu_EquipSlotsSlideIn: the 12 words at Menu_Unk5CC2 = (word + 6) AND $1FF OR $6000, the 12 at Menu_Unk5D42 = (word + Menu_ScrollOfs) AND $1FF OR $6000. - verified
Menu_EquipSlotsSlideOut$C2:A85C · 276 B · EngineHandler 2 back to 1 (Menu_Mode01H2, before Menu_EquipSlotsClose): a frame's wait; the draw list MenuRom_SlotsSlideOutList; the 12 words at $7E:3044 and at $7E:3084 (Menu_SlotsClearA/B, the slot... - verified
Menu_EquipSlotsBackStep$C2:A970 · 150 B · EngineOne frame of Menu_EquipSlotsSlideOut: the 12 words at Menu_Unk5CC2 = (word - 6) AND $1FF OR $6000, the 12 at Menu_Unk5D42 = (word - Menu_ScrollOfs) AND $1FF OR $6000; Menu_BandA + 6, and 6 off... - verified
Menu_MemberListHdma$C2:AA06 · 19 B · EngineMenu_EquipSlotsSlideOut's start table (copied to Menu_ScrollBuild): $10 lines of $FFFF, $30 lines of $01E0, three times $30 lines of $01D0 (the three member rows, 48 lines each), $10 lines of... - verified
Menu_PutHdmaEntry$C2:AA19 · 27 B · EngineWrites HDMA entries of A lines with the value Menu_Tmp00/01 through WMDATA (the caller has set WMADDL/H): one entry for A below $80; for A = $80-$FE two, A - $7F lines then $7F lines (a count byte... - verified
Menu_Mode02List$C2:AA34 · 12 B · EngineMenu_ModeLists entry $02: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the item screen). - verified
Menu_Mode02H0$C2:AA40 · 10 B · EngineHandler 0: Menu_PlaySound0, Menu_ThreadVar = 2 (handler 2, the list) and a tail jump to Menu_Mode02Init. - verified
Menu_Mode02H1$C2:AA4A · 60 B · EngineHandler 1, every frame, the row above the list: Menu_PadInput. - verified
Menu_Mode02H2$C2:AA86 · 66 B · EngineHandler 2, every frame, the list: Menu_ItemsPicked = $FFFF (no slot picked), Menu_PadInput. - verified
Menu_Mode02H3$C2:AAC8 · 130 B · EngineHandler 3, every frame, with a slot picked (Menu_ItemsPicked): Menu_PadInput. - verified
Menu_Mode02H4$C2:AB4A · 24 B · EngineHandler 4, sort: Menu_SortInventory, a frame's wait, the list redrawn (Menu_DrawItemList), Menu_VramRecClock queued, Menu_CursorSel = $0A and Menu_ThreadVar = 1 (back to the row above the list). - verified
Menu_SortInventory$C2:AB62 · 135 B · EngineRebuilds the inventory sorted: Menu_SortHave (256 bytes) and Menu_SortCounts (256) zeroed, and $20 bytes from $7E:0F02 (after Menu_ItemsPicked; why is not traced); every slot's id is marked in... - verified
Menu_SortGroup$C2:ABE9 · 41 B · EngineAppends sort group X to the inventory at slot Y: the ids from Menu_SortGroupFirst[X] on, Menu_SortGroupCount[X] of them, that are marked in Menu_SortHave and lack Menu_ItemInfo0 bit 3, each with... - verified
Menu_SortGroupFirst$C2:AC12 · 5 B · EnginePer sort group 0-4: the first id. - verified
Menu_SortGroupCount$C2:AC17 · 6 B · EnginePer sort group 0-4: the number of ids. - verified
Menu_Mode02H5$C2:AC1D · 29 B · EngineHandler 5, the equipment info of Menu_ShowEquipInfo: Menu_CursorHold + 1 (the cursor does not move), Menu_PadInput; on confirm or cancel Menu_PlaySound0, Menu_HdmaenShadow bit 2 cleared (the... - verified
Menu_ItemListCursor$C2:AC3A · 199 B · EngineHandlers 2 and 3 without confirm or cancel. - verified
Menu_ShiftInvListMap$C2:AD01 · 45 B · EngineMoves the item list's tilemap rows by one entry ($80 bytes, two tile rows) after a scroll: with Menu_ScrollStep positive (read as the high byte of the word at Menu_ScrollStep - 1), $7E:2F80-$347F... - verified
Menu_ItemListSelect$C2:AD2E · 34 B · EngineThe slot under the list cursor: Menu_Unk0D26 = (Menu_ItemsTop + Menu_CursorSel) AND $FF (a word), Menu_Unk04CA = its count, Menu_ItemId = its id, and its description (Menu_DrawDescText). - verified
Menu_Icon1Preview$C2:AD50 · 115 B · EngineMenu_MainPreviewTable entry 1: the draw list MenuRom_Icon1List; Menu_TextWord = 0; Menu_Unk0D77 = $FF and Menu_Unk0D78 = $FF (the next Menu_DrawDescText draws); colours $50-$57 = MenuRom_Icon1PalA... - verified
Menu_Icon1Redraw$C2:ADC3 · 13 B · EngineMenu_MainRedrawTable entry 1: Menu_UnstashInventory, Menu_HdmaenShadow = Menu_Icon1HdmaBits. - verified
Menu_Mode02Init$C2:ADD0 · 80 B · EngineMode 2's set-up (Menu_Mode02H0 jumps here): Menu_StashInventory; the draw list MenuRom_Mode02List; Menu_ArrowX/Y = $E8 / $50, WRDIVL/H = Menu_ItemsArrowSpan; Menu_TextAttr = 0; the paging of the... - verified
Menu_RedrawCursorRow$C2:AE20 · 35 B · EngineRedraws the list row of Menu_ItemsCursor (Menu_DrawItemRow at Menu_InvListFirst + $80 x (Menu_ItemsCursor AND $0F)), with Menu_CursorSel = Menu_ItemsCursor for the call (the caller's word at... - verified
Menu_DrawItemList$C2:AE43 · 34 B · EngineDraws the ten list rows: Menu_DrawItemRow for Menu_CursorSel = 0 to 9 at Menu_InvListFirst + $80 x row; the caller's word at Menu_CursorSel is put back. - verified
Menu_DrawItemRow$C2:AE65 · 16 B · EngineMenu_DrawInvSlot for slot Menu_ItemsTop + Menu_CursorSel (an 8-bit sum) at $7E:X. - verified
Menu_DrawInvSlot$C2:AE75 · 28 B · EngineSlot Y: Menu_RowItemCount = its count and Menu_RowItemId = its id; an id with Menu_ItemInfo0 bit 1 (usable from the menu) gets Menu_TextAttr bit 3 set (palette + 2; Menu_DrawString clears the bit... - verified
Menu_ShowEquipInfo$C2:AE91 · 37 B · EngineThe equipment info of handler 5: Menu_ClearInfoRows, the characters who can equip Menu_ItemId (Menu_ListEquipChars), its value and label (Menu_EquipValueLabel), the draw list MenuRom_EquipInfoList... - verified
Menu_ListEquipChars$C2:AEB6 · 85 B · EngineMenu_EquipCharNames (42 bytes, seven 6-byte entries) zeroed, then for each character bit of Menu_ItemEquipChars[Menu_ItemId] AND Menu_Unk29AF (probably the recruited characters), from bit 7... - verified
Menu_EquipValueLabel$C2:AF0B · 47 B · EngineMenu_InfoValue = Menu_ItemSortKeys[Menu_ItemId] (the weapon's power or the armour value); Menu_ItemCategory of the id (A is the word at Menu_ItemId: its low byte is used); the 11 bytes at bank $FF... - verified
Menu_EquipLabelPtrs$C2:AF3A · 8 B · EnginePer item category 0-3: the bank-$FF address of the 11-byte label Menu_EquipValueLabel copies (categories 1 and 2 share one). - verified
Menu_UseTargetsOpen$C2:AF42 · 67 B · EngineOpens the member window of an item use: the draw list MenuRom_UseTargetsList; object 7 off (its .Id = $FF); Menu_SprResetChars; Menu_ClearInfoRows; Menu_VramRecBg3Rows62 queued; a frame's wait... - verified
Menu_HideCharSprites$C2:AF85 · 24 B · EngineSets bit 0 of .Flags18 of objects 0-6 (non-zero: Menu_SprThread does not place them). - verified
Menu_ShowCharSprites$C2:AF9D · 24 B · EngineClears bit 0 of .Flags18 of objects 0-6 again. - verified
Menu_ClearInfoRows$C2:AFB5 · 56 B · EngineBG3 map rows 0-1 at Menu_Bg3TileBuf ($80 bytes) zeroed, then 14 words from column 15 of row 0 = Menu_InfoRowWordA and 14 from column 15 of row 1 = Menu_InfoRowWordB. - verified
Menu_PlaceMemberSprites$C2:AFED · 88 B · EngineThe member rows of the use window: Menu_TextWord = 0; for each active member (Menu_CurMember 0 up to Menu_PartyActive, stopping at one Menu_LoadPartyCharRec does not load, or when the word at...
Bank $C2 · $C2:B000–$BFFF
$C2:B000
Verified · 82
- verified
Menu_MemberSprYX$C2:B045 · 6 B · EnginePer member row 0-2: the word Menu_PlaceMemberSprites stores at .ScreenY: Y = $78, $A0, $C8 (40 lines apart), X low byte $E4. - verified
Menu_DrawInvEntry$C2:B04B · 96 B · EngineOne inventory row at $7E:X: for id Menu_RowItemId 0, 24 blank bytes (Menu_Unk9B76's $FF) with Menu_DrawString after a PLP (a tail jump). - verified
Menu_UseItem$C2:B0AB · 66 B · EngineUses item Menu_ItemId (category 4, Menu_ItemInfo0 bit 1): Menu_ItemCategory; Menu_UseKind = ((BattleRom_ItemTargetMode[index] + 1) AND 3) x 4 (bits 2-3; bit 3 = all members, as... - verified
Menu_UseItemDone$C2:B0ED · 1 B · Engine - verified
Menu_UseKindTable$C2:B0EE · 12 B · EngineMenu_UseItem's routine by Menu_FirstSetBit (bit 7, 6, 5, 4, 3, none). - verified
Menu_FirstSetBit$C2:B0FA · 13 B · EngineX = 2 x the number of clear bits above the first set bit of A, testing bits 7 down to 3; X = $0A when none of them is set. - verified
Menu_UseRandomItem$C2:B107 · 6 B · EngineMenu_UseKindTable entry 3: Menu_RollRandomItem, then a tail jump to Menu_UseHealItem. - verified
Menu_RollRandomItem$C2:B10D · 48 B · EnginePicks the random item's effect: r = RandomTable[Menu_NmiFrames] x 100 / 256 (0-99, the multiplier's high byte); the first Menu_RandomItemOdds entry above r gives the setter (Menu_RandomItemSets)... - verified
Menu_RandomItemOdds$C2:B13D · 4 B · EngineMenu_RollRandomItem's bounds out of 100: 5, 20, 50 (and 100, not read). - verified
Menu_RandomItemSets$C2:B141 · 8 B · EngineMenu_RollRandomItem's setters: 5%, 15%, 30% and 50%. - verified
Menu_RandomItemSetA$C2:B149 · 11 B · EngineMenu_UseKind = $C2 (HP and MP), Menu_UseAmountB = $40 (full). - verified
Menu_RandomItemSetB$C2:B154 · 11 B · EngineMenu_UseKind = $82 (HP), Menu_UseAmountB = $40 (full). - verified
Menu_RandomItemSetC$C2:B15F · 16 B · EngineMenu_UseKind = $41 (MP), Menu_UseAmountB = 3, Menu_UseAmountA = $8A (a fixed 10 x 3 = 30). - verified
Menu_RandomItemSetD$C2:B16F · 16 B · EngineMenu_UseKind = $80 (HP), Menu_UseAmountB = 1, Menu_UseAmountA = $B2 (a fixed 50 x 1 = 50). - verified
Menu_UseHealItem$C2:B17F · 12 B · EngineMenu_UseKindTable entry 0 (an HP / MP item): Menu_UseAmountA = $B2 (fixed, 50 per Menu_UseAmountB) with Menu_UseKind bit 7 (HP), else $8A (fixed, 10 per unit: MP). - verified
Menu_UseTargets$C2:B18B · 60 B · Engine - verified
Menu_UseLeave$C2:B1C7 · 49 B · Engine - verified
Menu_UseFullItem$C2:B1F8 · 8 B · EngineMenu_UseKindTable entry 4: Menu_UseKind = $CA (HP, MP, all members) and a jump into Menu_UseHealItem's member loop (Menu_UseTargets); Menu_UseAmountA is not set here (Menu_CalcHealAmounts always... - verified
Menu_UseStatItem$C2:B200 · 74 B · EngineMenu_UseKindTable entry 5 (no effect bit): a stat item. - verified
Menu_StatTargetCursor$C2:B24A · 43 B · EngineThe stat item's member cursor: a Menu_CursorSel off the member rows (Menu_CursorSel - Menu_UseRowFirst at least Menu_PartyActive) wraps: to the last row on Up (Menu_CursorDpad bit 3), else to the... - verified
Menu_StatTargetCheck$C2:B275 · 50 B · EngineMenu_Unk0DBC = 0; Menu_CurMember = Menu_CursorSel - Menu_UseRowFirst, Menu_PlaySound0 when it is not Menu_UseTarget (which takes it); the member loaded (Menu_LoadPartyCharRec); with Menu_UseKind... - verified
Menu_ApplyStatItem$C2:B2A7 · 111 B · EngineUses a stat item on member Menu_UseTarget: colours $84-$87 = MenuRom_Icon0Pal (the same 4 colours as icon 0's $24-$27); the six words at Menu_HealShown = $FFFF and the target's (Menu_UseTarget AND... - verified
Menu_StatCountOfs$C2:B316 · 6 B · EnginePer stat entry 1-6 (Menu_UseKind; read as Menu_StatCountOfs - 1 + X, so entry 0 would be the RTS before): the offset from record byte $2F (.StatCounts) of the count Menu_ApplyStatItem raises. - verified
Menu_AfterItemUse$C2:B31C · 55 B · EngineAfter a use: one of the picked slot's item taken (Menu_ItemCount = 1, Menu_ItemId = Menu_InvIds[Menu_ItemsPicked]; for Menu_ItemRandom a new effect rolled first, Menu_RollRandomItem... - verified
Menu_Mode03List$C2:B353 · 10 B · EngineMenu_ModeLists entry $03: the handlers Menu_MainThread runs by Menu_ThreadVar (the tech screen, Menu_Mode03H0-H4). - verified
Menu_Mode03H0$C2:B35D · 8 B · EngineHandler 0: Menu_PlaySound0, Menu_ThreadVar + 1 (handler 1) and a tail jump to Menu_Mode03Init. - verified
Menu_Mode03H1$C2:B365 · 8 B · EngineHandler 1: the draw list MenuRom_TechMembersList, Menu_ThreadVar + 1, and on into handler 2 (sub-entry Menu_Mode03H2, $C2:B36D), every frame, the member window: Menu_LastMember = Menu_Unk84 (the... - verified
Menu_Mode03H2$C2:B36D · 65 B · Engine - verified
Menu_Mode03H3$C2:B3AE · 224 B · EngineHandler 3, every frame, the tech list: Menu_HdmaenShadow = Menu_TechHdmaBits, Menu_PadInput. - verified
Menu_Mode03H4$C2:B48E · 139 B · EngineHandler 4, every frame, the target window: Menu_PadInput, Menu_TechTargetCursor. - verified
Menu_TechCastLoops$C2:B519 · 7 B · EnginePer character id 0-6 (object 7's .Id): the .LoopFrame Menu_Mode03H4 gives the caster's copy with .Anim Menu_TechCastAnim (the frame the looping animation goes back to, probably the end of the... - verified
Menu_TechMemberCursor$C2:B520 · 72 B · EngineHandler 2's frame without confirm or cancel: Left / Right (Menu_CursorDpad bits 1 / 0) step Menu_TechPage down / up, wrapping in 0-2; Menu_ListCursorEdge, then Menu_RepeatFast = 0 (STZ: the N of... - verified
Menu_TechMemberScroll$C2:B568 · 96 B · EngineScrolls the member window one row, as Menu_MemberListScroll does in mode 1: without Down (an Up edge) Menu_TechMemberTop - 1 unless it is 0, the incoming member's sprite row 3 (above the window... - verified
Menu_TechMemberScrollAnim$C2:B5C8 · 230 B · EngineThe member window's row scroll (mode 1's Menu_MemberScrollAnim, BG1 only): Menu_HdmaenShadow = Menu_TechScrollHdmaBits; the incoming member (Menu_TechMemberRow + Menu_TechMemberTop) loaded, its... - verified
Menu_TechPageMark$C2:B6AE · 37 B · EngineThe page names' tiles: the 10 x 2 tiles at $7E:2EE4 get attribute byte $15, then the 2 x 2 at $7E:2EE4 + Menu_TechPage x 8 get $11 (Menu_SetAttr2Rows; probably the chosen page lit, the others dimmed). - verified
Menu_TechListIdle$C2:B6D3 · 92 B · EngineHandler 3's frame without confirm or cancel: the caster loaded. - verified
Menu_TechListScroll$C2:B72F · 157 B · EngineScrolls the tech list a row (as Menu_EquipItemIdle does mode 1's item list) unless it is at that end: on row 0 with Menu_TechListTop 0, or on another row (the bottom one) with the top at... - verified
Menu_TechShiftListMap$C2:B7CC · 87 B · EngineMoves the tech list's tilemap rows by one tech (two tile rows, $80 bytes) after a scroll, 11 tiles wide from column 18: with Menu_ScrollStep positive (read as the high byte of the word at... - verified
Menu_TechTargetCursor$C2:B823 · 27 B · EngineHandler 4's cursor: Menu_UseTargetCursor (as an item's), then the caster loaded again and Menu_Unk0DBC = 0 (nothing to do) when the caster's MP (record .Word7, low byte) is below Menu_TechUseCost. - verified
Menu_UseTargetCursor$C2:B83E · 50 B · EngineThe member cursor of an HP / MP restore (an item's or a tech's): for a single target (Menu_UseKind bit 3 clear) a Menu_CursorSel off the member rows (Menu_CursorSel - Menu_UseRowFirst at least... - verified
Menu_UseTargetCheck$C2:B870 · 106 B · EngineMenu_Unk0DBC = 0; Menu_CurMember = Menu_CursorSel - Menu_UseRowFirst, Menu_PlaySound0 when it is not Menu_UseTarget (which takes it) and the target is single (Menu_UseKind bit 3 clear). - verified
Menu_Icon2Preview$C2:B8DA · 134 B · EngineMenu_MainPreviewTable entry 2: the draw list MenuRom_Icon2List; Menu_TechMemberRow = 0 when it is not below Menu_PartyActive; Menu_LoadCharPalettes, a frame's wait, Menu_StartSprThread; the member... - verified
Menu_Icon2Redraw$C2:B960 · 25 B · EngineMenu_MainRedrawTable entry 2: Menu_HdmaenShadow = 1, Menu_StartSprThread, the draw list MenuRom_Icon2RedrawList, Menu_VramRecClock queued. - verified
Menu_Mode03Init$C2:B979 · 104 B · EngineMode 3's set-up (Menu_Mode03H0 jumps here): the draw list MenuRom_Mode03List; Menu_CursorSel = Menu_TechMemberRow + $0B (the member's row record); the palette flagged; Menu_Unk84 = $FF (so... - verified
Menu_TechCasterSprite$C2:B9E1 · 40 B · EngineObject 7 as the caster's copy in the list window: Menu_SprUploadMax = 2; the member (Menu_TechMemberRow + Menu_TechMemberTop) loaded; .Anim, .Kind and .Flags18 = 0, .ScreenY / .ScreenX low byte =... - verified
Menu_TechLoadCaster$C2:BA09 · 38 B · EngineObject 7's .TileAttr high byte (the palette) = that of the loaded character's own object (page Menu_Times64 of its id; the offset is read back from Menu_Unk0D2C); then, with DP = object 7's page... - verified
Menu_TechDrawMemberRow$C2:BA2F · 32 B · EngineOne member row of the tech screen at Menu_MapPtr: Menu_MemberRowFlags; Menu_Unk0D5E = 4 when the loaded character's MP (record .Word7, low byte) is below Menu_TechCost's low byte, else 0 (probably... - verified
Menu_TechDrawMembers$C2:BA4F · 173 B · EngineThe member window: Menu_SprResetChars, object 7's .Flags18 = $FF; rows = Menu_Unk85 (the members), at most 3, kept in Menu_TechRowsLeft; from member Menu_TechMemberTop, row by row (Menu_TechSprRow... - verified
Menu_TechRowSprite$C2:BAFC · 30 B · EnginePuts the sprite object of character A (page Menu_Times64 of it) in member row Menu_TechSprRow: .Id = A, .Flags18 = 0, .ScreenX low byte = $1C, .ScreenY = Menu_TechRowSprY[Menu_TechSprRow]. - verified
Menu_TechRowSprY$C2:BB1A · 5 B · EnginePer Menu_TechSprRow: the .ScreenY of rows 0-2 ($38, $68, $98: 48 lines apart), 3 (above the window, $08) and 4 (below, $C8), the rows a member scrolls in from. - verified
Menu_TechShowCost$C2:BB1F · 49 B · EngineThe list cursor's tech: Menu_TechPartners (Menu_TechId, the members it needs); its MP cost (Menu_TechMpCost, in Menu_TechCost) and the cost table index into Menu_TechCostIdx[0]; Menu_TextAttr = 4... - verified
Menu_TechListOpen$C2:BB50 · 60 B · EngineThe list window: WRDIVL/H = $1500; Menu_ListTop = Menu_TechListTop x 4; the paging of Menu_TechCount techs eight rows a page from cursor record 0 (Menu_ListPageSetup with Y = the word at... - verified
Menu_TechDrawRows$C2:BB8C · 74 B · Engine - verified
Menu_TechPartners$C2:BBD6 · 76 B · EngineMenu_TechMembers[1-2] = $FF; Menu_SprResetChars; Menu_TechId = Menu_TechList[Menu_TechListRow + Menu_TechListTop] (the cursor's tech); the characters its Menu_TechShown byte needs... - verified
Menu_TechMpCost$C2:BC22 · 55 B · EngineThe MP cost of tech Menu_TechId for the loaded character: on page 0 (Menu_TechPage) X = the id; else (REP #$30) X = the byte at Menu_TechCostIdxs + 64 x (record byte 0 AND $0F, the character) +... - verified
Menu_TechCostCut$C2:BC59 · 22 B · EngineA = the MP cost in A's low byte as the loaded character's accessory (record .Unk2A) cuts it: $A2 halves it, $A3 halves it twice, each time rounded up (LSR, ADC #0); other accessories leave it... - verified
Menu_TechPageCheck$C2:BC6F · 63 B · EngineA key of the member and page, (Menu_TechMemberRow + Menu_TechMemberTop) x 16 OR Menu_TechPage, compared with Menu_Unk84 (which takes it); nothing more when equal. - verified
Menu_TechBuildList$C2:BCAE · 31 B · EngineMenu_TechList's first 24 bytes = $FF, then Menu_TechListBytes and Menu_TechListIds. - verified
Menu_TechListBytes$C2:BCCD · 51 B · EngineLists in Menu_TechBytesList the tech bytes (Menu_TechShown indexes) of page Menu_TechPage (Menu_TechPages: the first byte and the count) whose MenuRom_TechByteMembers has the loaded character's... - verified
Menu_TechListIds$C2:BD00 · 64 B · EngineFor each byte n of Menu_TechBytesList (to the $FF): every set bit of Menu_TechShown[n], from bit 7, is one tech, numbered from Menu_TechFirstIds[n] up (the loop ends at Menu_TechFirstIds[n + 1])... - verified
Menu_TechFirstIds$C2:BD40 · 37 B · EnginePer tech byte 0-36 (Menu_TechShown): the id of the tech of its bit 7. - verified
Menu_TechPages$C2:BD65 · 6 B · EnginePer Menu_TechPage 0-2: the first tech byte and the count (bytes 0-6, 7-21 and 22-36: probably the single, double and triple techs). - verified
Menu_TechDrawList$C2:BD6B · 46 B · EngineThe eight list rows from entry Menu_Tmp00 of Menu_TechList: each id goes to Menu_TechId and is drawn (Menu_TechDrawRow) at $7E:3024 on, $80 bytes a row. - verified
Menu_TechDrawRow$C2:BD99 · 25 B · EngineDraws list row Menu_TechId at $7E:X: its name (Menu_TechDrawName), or for $80 and up (the $FF after the list) 11 blank tiles: the string at Menu_Unk9B76 ($FF bytes) through Menu_DrawString, a tail... - verified
Menu_TechDrawName$C2:BDB2 · 57 B · EngineDraws the name of tech A (11 tiles at MenuRom_TechNames + 11 x A, by the hardware multiplier) at $7E:Menu_MapPtr, with Menu_TextAttr = $0C for a tech with Menu_TechInfo bit 6 (BankFF_UnkF813's... - verified
Menu_TechNextMark$C2:BDEB · 22 B · EngineOn page 0, for a tech with Menu_TechInfo bit 6 (the one being learnt, probably), the draw list MenuRom_TechNextList. - verified
Menu_TechDescIfNew$C2:BE01 · 21 B · EngineMenu_TechDescText when Menu_TechId is not the string drawn last (Menu_Unk0D77) or Menu_Unk0D78 bit 7 is set (the same test is made again there). - verified
Menu_TechPageTitle$C2:BE16 · 29 B · EngineThe page's title string: Menu_HdmaenShadow = Menu_TechHdmaBits, Menu_TextDest = $5356, Menu_Unk0DC9 = $0A, string Menu_TechPage + $76 of the tech text table, through Menu_TechDescText's set-up... - verified
Menu_TechDescText$C2:BE33 · 17 B · EngineMenu_DrawDescText for the tech screen: Menu_TextDest = $5344, Menu_Unk0DC9 = 1, A = Menu_TechId; then (sub-entry Menu_TechTextSetup, $C2:BE44, also the tail of Menu_TechPageTitle) unless A is the... - verified
Menu_TechTextSetup$C2:BE44 · 53 B · Engine - verified
Menu_TechTargetsOpen$C2:BE79 · 85 B · EngineOpens (or, after a use, redraws) the target window of handler 4: the caster (Menu_TechMemberRow + Menu_TechMemberTop, a 16-bit store: the byte after Menu_CurMember = 0) loaded, its cost... - verified
Menu_VramRecTechRows$C2:BECE · 7 B · EngineA Menu_VramRec: VRAM $5840 = $7E:2E80 (BG1 map rows 2-9), $200 bytes; its unused last byte is the first of Menu_VramRecTechLow. - verified
Menu_VramRecTechLow$C2:BED5 · 7 B · EngineA Menu_VramRec: VRAM $5C00 = $7E:3600 (the first half of what Menu_VramRecBg1Low sends), $400 bytes; its unused last byte is the PHP opcode of Menu_TechTargetRows. - verified
Menu_TechTargetRows$C2:BEDC · 83 B · EngineThe target window's rows: for each active member from 0 (Menu_CurMember, stopping at one Menu_LoadPartyCharRec does not load, or when the word at Menu_Unk51, ORed into its result, is non-zero... - verified
Menu_TechTargetSprYX$C2:BF2F · 6 B · EnginePer target row 0-2: the word Menu_TechTargetRows stores at .ScreenY: Y = $58, $78, $98 (32 lines apart), X low byte $E4. - verified
Menu_Mode04List$C2:BF35 · 8 B · EngineMenu_ModeLists entry $04: the handlers Menu_MainThread runs by Menu_ThreadVar (the settings screen, Menu_Mode04H0-H3). - verified
Menu_Mode04H0$C2:BF3D · 8 B · EngineHandler 0: Menu_PlaySound0, Menu_ThreadVar + 1 (handler 1) and a tail jump to Menu_Mode04Init. - verified
Menu_Mode04H1$C2:BF45 · 40 B · EngineHandler 1, every frame, the entry list: Menu_HdmaenShadow = Menu_CfgHdmaBits, Menu_PadInput. - verified
Menu_Mode04H2$C2:BF6D · 50 B · EngineHandler 2, every frame, the button map: Menu_PadInput. - verified
Menu_Mode04H3$C2:BF9F · 53 B · EngineHandler 3, every frame, entry 7's choice of Menu_CfgCLow (cursor records $0C-$0F): Menu_PadInput. - verified
Menu_CfgEntryRun$C2:BFD4 · 43 B · EngineMenu_CfgCursor = Menu_CursorSel and that entry's Menu_CfgEntryTable routine (JSR (abs,X), with P saved around it); Menu_CfgPrevCursor = Menu_CfgCursor (which the routine may have changed); the... - verified
Menu_CfgEntryTable$C2:BFFF · 24 B · EnginePer entry (cursor record) 0-11: the routine Menu_CfgEntryRun calls each frame the cursor is on it (with M=1, X=0).
Bank $C2 · $C2:C000–$CFFF
$C2:C000
Verified · 108
- verified
Menu_CfgEntry0$C2:C017 · 33 B · EngineCursor entry 0: on a confirm Menu_CfgA3 = (it + 1) AND 1, also in Menu_CfgShown, and sound command $F3 with it as the argument (Audio_CmdId / Audio_CmdArg0, Audio_DriverCommand; probably the... - verified
Menu_CfgEntry2$C2:C038 · 18 B · EngineCursor entry 2: on a confirm Menu_CfgA5 = (it + 1) AND 1, also in Menu_CfgShown+2. - verified
Menu_CfgEntry3$C2:C04A · 18 B · EngineCursor entry 3: on a confirm Menu_CfgB6 = (it + 1) AND 1, also in Menu_CfgShown+7. - verified
Menu_CfgEntry4$C2:C05C · 18 B · EngineCursor entry 4: on a confirm Menu_CfgB7 = (it + 1) AND 1, also in Menu_CfgShown+8. - verified
Menu_CfgEntry1$C2:C06E · 18 B · EngineCursor entry 1: on a confirm Menu_CfgA6 = (it + 1) AND 1, also in Menu_CfgShown+3. - verified
Menu_CfgEntry7$C2:C080 · 21 B · EngineCursor entry 7: on a confirm Menu_CursorSel = Menu_CfgCLow + $0C (its record among $0C-$0F), Menu_CfgCLowOpen + 1 and Menu_ThreadVar = 3 (handler 3 picks the value). - verified
Menu_CfgEntry9$C2:C095 · 18 B · EngineCursor entry 9: on a confirm Menu_CfgA7 = (it + 1) AND 1, also in Menu_CfgShown+9. - verified
Menu_CfgEntry5$C2:C0A7 · 18 B · EngineCursor entry 5: on a confirm Menu_CursorSel and Menu_CfgCursor = $0A (entry 10) and Menu_CfgSubOpen = 1 (entries 10 and 11 lead back here). - verified
Menu_CfgEntry10$C2:C0B9 · 24 B · EngineCursor entry 10: Left / Right step Menu_CfgALow in 0-7 (Menu_CfgStepValue); confirm or cancel: Menu_CursorSel and Menu_CfgCursor = 5 (back to entry 5), Menu_CfgSubOpen = 0. - verified
Menu_CfgEntry11$C2:C0D1 · 24 B · EngineCursor entry 11: as entry 10 for Menu_CfgBMid. - verified
Menu_CfgEntry8$C2:C0E9 · 67 B · EngineCursor entry 8, the button map switch: on a confirm Menu_CfgA4 = (it + 1) AND 1, also in Menu_CfgShown+1; when it becomes 1 the map opens. - verified
Menu_CfgEntry6$C2:C12C · 56 B · EngineCursor entry 6, the window style: while Menu_CfgStyleEdit is set, Left / Right step Menu_WinStyle in 0-7 (Menu_CfgStepValue), Menu_Unk0D47 = $0010 and the style's tiles and colours loaded... - verified
Menu_CfgStepValue$C2:C164 · 31 B · EngineWith Left or Right (Menu_CursorDpad bits 1 / 0) the byte at $7E:X goes down / up by 1, wrapping in 0-7; then the three selectors are redrawn (Menu_CfgDrawSelectors) and Menu_PlaySound0. - verified
Menu_CfgMapCursor$C2:C183 · 132 B · EngineHandler 2's frame without Left or cancel. - verified
Menu_CfgMapButtons$C2:C207 · 8 B · EngineThe buttons a map row cycles through, as Pad_Pressed bits: A, B, X, Y, R, L, Select, then $FF (the end). - verified
Menu_CfgMapAssign$C2:C20F · 43 B · EngineGives map row Menu_CursorSel - $0F the button Menu_Tmp00: Menu_CfgMapEdit = Menu_CfgButtonMap again (9 bytes), Menu_Tmp04 = 0, Menu_CfgMapSet for the row; then Menu_CfgMapSet again for the entry... - verified
Menu_CfgMapSet$C2:C23A · 50 B · EngineSets map entry Menu_CfgMapEntry[X] (X itself: the table is 0-7) of Menu_CfgMapEdit to Menu_Tmp00, with Menu_Tmp01 = that entry's old button in Menu_ButtonMap; then copies the entry's clash list (a... - verified
Menu_CfgMapSwap$C2:C26C · 26 B · EngineFor the Menu_Tmp02 + 1 entries copied to Menu_ScrollBuild (from the last): an entry whose Menu_CfgMapEdit byte is Menu_Tmp00 (the new button) gets Menu_Tmp01 (the old one) and is kept in... - verified
Menu_CfgMapFixPages$C2:C286 · 55 B · EngineKeeps the page buttons R and L on map entries 6 and 7 unless rows 0-1 (Menu_CfgMapEdit entries 0 and 1, ORed) use them: entry 7 holding R becomes entry 6's button; without R in entries 0-1, entry... - verified
Menu_CfgMapEntry$C2:C2BD · 8 B · EnginePer row 0-7: its Menu_CfgMapEdit / Menu_ButtonMap entry (the same number). - verified
Menu_CfgMapClashPtrs$C2:C2C5 · 14 B · EnginePer entry 0-6: the address of its clash list (see Menu_CfgMapSet). - verified
Menu_CfgMapClash0$C2:C2D3 · 8 B · EngineThe clash lists: a count, then the map entries whose button the entry may take over (and so must give its old one): entry 0 all the others. - verified
Menu_CfgMapClash1$C2:C2DB · 7 B · Engine - verified
Menu_CfgMapClash2$C2:C2E2 · 6 B · Engine - verified
Menu_CfgMapClash3$C2:C2E8 · 4 B · Engine - verified
Menu_CfgMapClash4$C2:C2EC · 5 B · Engine - verified
Menu_CfgMapClash5$C2:C2F1 · 6 B · Engine - verified
Menu_CfgMapClash6$C2:C2F7 · 4 B · Engine - verified
Menu_CfgMapClash7$C2:C2FB · 4 B · Engine - verified
Menu_Icon3Preview$C2:C2FF · 152 B · EngineMenu_MainPreviewTable entry 3: thread 3's .Wait + 1; the draw list MenuRom_Icon3List; the 14 words from Menu_Bg3TileBuf+$44 (row 1, tile 2 of a 32-tile map) = $21FF, then its tiles 14-15 = $21FB... - verified
Menu_Icon3Redraw$C2:C397 · 30 B · EngineMenu_MainRedrawTable entry 3: Menu_HdmaenShadow = Menu_Icon3HdmaBits, the entry icon's four tile words (Menu_CfgIconMap) zeroed, Menu_VramRecClock queued. - verified
Menu_Mode04Init$C2:C3B5 · 47 B · EngineMode 4's set-up (Menu_Mode04H0 jumps here): Menu_CursorSel and Menu_CursorMovedFrom = Menu_CfgCursor; the draw list MenuRom_Mode04List; Menu_Unk0D0E = $0189; Menu_Unk0D77 and Menu_Unk0D78 = $FF... - verified
Menu_CfgDrawToggles$C2:C3E4 · 55 B · EngineThe on / off marks: for n = 9 down to 0, a 2 x 2 block at the BG map address Menu_CfgToggleMaps[n] (tile words $1530-$1533 for 0, $1534-$1537 for 1) by bit 0 of Menu_CfgShown[n] EOR... - verified
Menu_CfgToggleMaps$C2:C41B · 20 B · EnginePer Menu_CfgShown byte 0-9: the tilemap address of its mark. - verified
Menu_CfgToggleInvert$C2:C42F · 11 B · EnginePer Menu_CfgShown byte 0-9: 1 shows that byte's 0 as the "1" mark (only Menu_CfgA3's); the last byte is only read as the high byte of entry 9's word. - verified
Menu_CfgCopyShown$C2:C43A · 28 B · EngineMenu_CfgShown = the ten bytes Menu_CfgA3 ... - verified
Menu_CfgDrawSelectors$C2:C456 · 36 B · EngineThe three 0-7 selectors: Menu_CfgALow at $7E:2EA6, Menu_CfgBMid at $2F66, Menu_WinStyle at $2FE6, each through Menu_CfgDrawSelector (falling into it for the last): sub-entry Menu_CfgDrawSelector... - verified
Menu_CfgDrawSelector$C2:C47A · 27 B · Engine - verified
Menu_CfgDrawCLow$C2:C495 · 39 B · EngineMenu_CfgCLow's row: the 9 x 2 tiles at $7E:3064 get attribute byte $0C, then the 3 x 2 at $3064 + 6 x (Menu_CfgCLow AND 3) get 0 (Menu_SetAttr2Rows; probably the chosen one lit). - verified
Menu_CfgEntryIcon$C2:C4BC · 61 B · EngineThe cursor entry's icon and text: the 2 x 2 tile words at Menu_CfgIconMap from MenuRom_CfgIcons[Menu_CfgCursor] (the word, then + 1, + 2, + 3); Menu_Unk0DCE = Menu_CfgCursor and Menu_Unk0DCF =... - verified
Menu_CfgEntryByte$C2:C4F9 · 12 B · EnginePer entry 0-11: the offset from Menu_CfgA3 of its byte (entry 5's, $0B, is $0D91, and entry 11's, $0A, is $0D90 (Menu_CfgBMid): both past the ten). - verified
Menu_CfgEntryStrBase$C2:C505 · 12 B · EnginePer entry 0-11: the number added to its byte for Menu_Unk0DCF. - verified
Menu_LoadWindowGfx$C2:C511 · 55 B · EngineLoads the tiles of window style Menu_WinStyle (Menu_Config01 bits 0-2, copied by Menu_LoadGraphics): Menu_SprScratch = $3DC0 (use not traced; Menu_SprLoad uses the bytes as scratch)... - verified
Menu_WindowVramRec$C2:C548 · 7 B · EngineThe Menu_VramRec of Menu_LoadWindowGfx: VRAM $3DC0 = $7E:8800 (Menu_WinTileBuf), $280 bytes. - verified
Menu_UnkC54F$C2:C54F · 43 B · EngineApplies and draws the button map: the local subroutine .select copies MenuRom_DefaultButtonMap (9 bytes, MVN count 8) to Menu_ButtonMap, then, when Menu_CfgA4 is non-zero, Menu_CfgButtonMap over... - verified
Menu_UnkC57A$C2:C57A · 45 B · EngineDraws the button map's six rows from Menu_ButtonMap: for row n = 0-5 (Menu_Tmp00, 16-bit) the tile word of Menu_ButtonMap entry n's button (Menu_ButtonLetter) at Menu_CfgMapRowMap +... - verified
Menu_CfgMapRowOfs$C2:C5A7 · 12 B · EnginePer map row 0-5: the offset in Menu_CfgMapRowMap of its letter, two tile rows ($80 bytes) apart from tile row 13, column 26 on. - verified
Menu_ButtonLetter$C2:C5B3 · 20 B · EngineA = the tile word of the button in A's low byte: the highest set bit picks the entry of MenuRom_ButtonLetters (bit 7 entry 0, ... bit 1 entry 6: the font letters A, X, L, R, B, Y, S). - verified
Menu_UnkC5C7$C2:C5C7 · 90 B · EngineMarks the map rows the edit changes: Menu_CfgMapOld = Menu_CfgButtonMap (8 bytes, MVN count 7), then the entry of the row under the cursor (Menu_CursorSel - Menu_CfgMapRecFirst) set to $FF there... - verified
Menu_Mode05List$C2:C621 · 6 B · EngineMenu_ModeLists entry $05: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the party order; handler 2 is shared with mode 7). - verified
Menu_Mode05H0$C2:C627 · 33 B · EngineHandler 0: with fewer than two rows to pick (Menu_XchgPartyCount + Menu_XchgReserveCount, as icon 4's preview left them) Menu_Mode = 0, Menu_ThreadVar + 1 (back to Menu_MainMenuLoop) and a tail... - verified
Menu_XchgNextFree$C2:C648 · 1 B · EngineMenu_CursorSel = the first row from X + 1 on (from X on for the sub-entry Menu_XchgFirstFree, $C2:C649, which the callers use) whose Menu_XchgRows entry has neither bit 7 (empty) nor bit 6... - verified
Menu_XchgFirstFree$C2:C649 · 20 B · Engine - verified
Menu_Mode05H1$C2:C65D · 23 B · EngineHandler 1, every frame, nothing picked yet: Menu_PadInput. - verified
Menu_XchgPickFirst$C2:C674 · 69 B · Engine - verified
Menu_Mode05H2$C2:C6B9 · 46 B · EngineHandler 2 of modes 5 and 7, every frame, one row picked: Menu_PadInput; neither button as in handler 1. - verified
Menu_XchgClearPicks$C2:C6E7 · 37 B · Engine - verified
Menu_XchgSwap$C2:C70C · 120 B · EngineSwaps the characters at positions Menu_XchgPick and Menu_XchgPick2 of Menu_PartyOrder (Menu_Tmp00 the go-between), Menu_BuildPartyLists, then swaps their 10 x 5 tile blocks (Menu_DrawCmdSwapBlocks... - verified
Menu_XchgBlockPos$C2:C784 · 34 B · EngineThe map position of row A's block: Menu_Tmp00 = the column (Menu_XchgPartyX for rows 0-2; Menu_XchgReserveX for rows 3 on, which count from 0 again; Menu_XchgAloneX when Menu_Unk0D36 is non-zero)... - verified
Menu_Mode07List$C2:C7A6 · 6 B · EngineMenu_ModeLists entry $07: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the party order from BankC2_MenuEntry; handler 2 is mode 5's). - verified
Menu_Mode07H0$C2:C7AC · 52 B · EngineHandler 0: Menu_Unk0D36 (both bytes) = Menu_CurMember (the entry's X: non-zero shows only the party); Menu_XchgMusic; icon 4's preview (Menu_UnkC9E5); the cursor on the first row that can be... - verified
Menu_Mode07H1$C2:C7E0 · 37 B · EngineHandler 1 of mode 7, every frame: Menu_PadInput; neither button as mode 5's handler 1. - verified
Menu_XchgCursor$C2:C805 · 86 B · EngineThe cursor step after Menu_PadInput: Menu_CursorYOfs = 0 (8-bit); with five reserve members or more and a move that hit an edge (Menu_CursorDpad bit 7) Menu_XchgEdge (the list scrolls). - verified
Menu_XchgEdge$C2:C85B · 95 B · EngineA move off the shown reserve rows: after an Up move Menu_CursorSel = 3 (the top row) and, when Menu_Unk80 is non-zero, Menu_Unk80 - 1, Menu_CursorYOfs = Menu_XchgUpYOfs (-48), Menu_XchgScrollPos =... - verified
Menu_XchgScroll$C2:C8BA · 143 B · EngineScrolls the reserve list by one member: Menu_CurMember = Menu_PartyActive + the reserve row coming in (Menu_CursorSel - 3 + Menu_Unk80; also in Menu_Tmp00), its record (Menu_LoadPartyCharRec) and... - verified
Menu_XchgShiftSprites$C2:C949 · 42 B · EngineFor each reserve row (Menu_XchgReserveCount down to 1): the object of its character (Menu_Times64 of the Menu_PartyOrder byte) gets .ScreenY - Menu_ScrollStep (8-bit) and .Anim = 0. - verified
Menu_XchgPoses$C2:C973 · 59 B · EngineThe sprites' poses: .Anim = Menu_XchgPoseStand for the characters at positions 8 down to 0 (Menu_Tmp00), Menu_XchgPoseCursor for the one at Menu_XchgCurEntry and, while Menu_XchgPick is set (bit 7... - verified
Menu_XchgSkip$C2:C9AE · 55 B · EngineMoves the cursor off a row it cannot take. - verified
Menu_UnkC9E5$C2:C9E5 · 126 B · EngineMenu_MainPreviewTable entry 4 (also run by Menu_Mode07H0): thread 3's .Wait = 3; every object hidden (Menu_SprHideAll); the routine of Menu_XchgPreviewTable by Menu_Unk0D36 bit 1... - verified
Menu_XchgPreviewTable$C2:CA63 · 4 B · EngineMenu_UnkC9E5's routine by Menu_Unk0D36 bit 1: Menu_XchgPreviewA (clear), Menu_XchgPreviewB (set). - verified
Menu_XchgPreviewA$C2:CA67 · 114 B · EngineThe draw list MenuRom_XchgListA; Menu_MapPtr = Menu_XchgMap; string 4 of MenuRom_NameStrings (5 with Menu_Unk0D7C set) drawn 4bpp into Menu_TextGfxA (Menu_DrawText4bpp; TextWin_StrIndex, StrTable... - verified
Menu_XchgTextVramRec$C2:CAD9 · 7 B · EngineThe Menu_VramRec of Menu_XchgPreviewA: VRAM $1000 = Menu_TextGfxA ($7E:5E00), $1000 bytes. - verified
Menu_XchgPreviewB$C2:CAE0 · 6 B · EngineA tail jump to Menu_RunDrawList with MenuRom_XchgListB. - verified
Menu_UnkCAE6$C2:CAE6 · 13 B · EngineMenu_MainRedrawTable entry 4: Menu_HdmaenShadow = Menu_XchgHdmaBits and Menu_StartSprThread. - verified
Menu_XchgInit$C2:CAF3 · 152 B · EngineThe screen of modes 5 and 7: the draw list MenuRom_XchgList; Menu_ClearOam; Menu_HdmaenShadow = Menu_XchgHdmaBits; Menu_Unk0D0E = Menu_XchgUnk0D0E; Menu_LoadCharPalettes; Menu_XchgDimLocked; the... - verified
Menu_XchgMusic$C2:CB8B · 52 B · EngineMode 7's music: Menu_XchgMusicOn = 0; nothing more with Menu_Unk7F01CF bit 6 set. - verified
Menu_XchgMusicThread$C2:CBBF · 44 B · EngineThread in slot 2 (Menu_XchgMusic starts it): yields until APUIO1 reads 0; then command Audio_Cmd14 with song Menu_XchgSongId and arguments $80, $80, then Audio_CmdUnk81 with $01, $FF, $FF... - verified
Menu_XchgSendSound$C2:CBEB · 12 B · EngineSends the command already in Audio_CmdId / Audio_CmdArg0 with Audio_CmdArg1 = Audio_CmdArg2 = $80 (Audio_DriverCommand), then falls into the sub-entry Menu_XchgSound81 ($C2:CBF7): command... - verified
Menu_XchgSound81$C2:CBF7 · 23 B · Engine - verified
Menu_XchgLeave$C2:CC0E · 65 B · EngineMode 7's exit: with Menu_XchgMusicOn set, Audio_CmdUnk81 with $08, $01, $01 (Menu_XchgSound81, as Menu_XchgMusic); Menu_FadeOut; then, with Menu_XchgMusicOn set, it yields until APUIO1 reads 0 and... - verified
Menu_XchgDimLocked$C2:CC4F · 100 B · EngineDims the party rows 0-2 whose Menu_XchgRows entry has bit 7 or 6 set: sprite colours (Menu_XchgDimChar, see the quirk) and 6 map rows of its block, on Menu_XchgMap and on Menu_Bg2Map ($1000 on)... - verified
Menu_XchgDimChar$C2:CCB3 · 40 B · EngineHalves colours 1-15 of the sprite palette of the character at position A (A AND $BF: without the locked bit; nothing when bit 7 is set, which never happens from its caller): the 16-bit read at... - verified
Menu_XchgPlaceSprites$C2:CCDB · 80 B · EngineDraws the rows and sprites of the members shown: the reserve rows first (Menu_XchgSprIdx from entry 3, Menu_XchgRowIdx from 0, Menu_CurMember = Menu_PartyActive + Menu_Unk80), each with... - verified
Menu_XchgBuildRows$C2:CD2B · 112 B · EngineBuilds Menu_XchgRows: all nine bytes = Menu_XchgEmpty; Menu_XchgPartyCount = 0; for positions 0-2 of Menu_PartyOrder with a character, in order: + 1 to the count, and the entry = the position... - verified
Menu_XchgAddSprite$C2:CD9B · 48 B · EngineOne member's row and sprite: Menu_LoadPartyCharRec (the character at Menu_PartyList[Menu_CurMember]); unless that had no character (its non-zero A, ORed with the Menu_Unk51 word, expected 0)... - verified
Menu_XchgRowMaps$C2:CDCB · 24 B · EnginePer table entry 0-11 (Menu_XchgSprIdx / 2): the Menu_MapPtr of Menu_DrawMemberRow. - verified
Menu_XchgPlaceAll$C2:CDE3 · 71 B · EnginePlaces the shown members' sprites again (rows not drawn): Menu_XchgHideSprites; Menu_Tmp02 (the table entry x 2) from entry 0 (9 with only the party shown), Menu_Tmp00 (the row) from 0... - verified
Menu_XchgHideSprites$C2:CE2A · 31 B · EngineObjects 6 down to 0: .Id = Menu_SprOff, .Anim = 0, .Flags18 = 0 (as Menu_SprHideAll, which also does object 7). - verified
Menu_XchgPlaceOne$C2:CE49 · 37 B · EnginePlaces the sprite of row Menu_Tmp00 (Menu_XchgRows entry; nothing for an empty one, bit 7): the character at the entry's position (AND Menu_XchgPosMask) gets .Id = the character and .ScreenY /... - verified
Menu_XchgSprPos$C2:CE6E · 24 B · EnginePer table entry 0-11 (as Menu_XchgRowMaps): a sprite's .ScreenY (low byte) and .ScreenX's low byte (high byte). - verified
Menu_XchgScreenMap$C2:CE86 · 16 B · EngineBankFF_BuildScreenMap, Menu_XchgScreenVramRec queued, then a tail jump to Menu_QueueVramRom with Menu_VramRecBg3Full. - verified
Menu_XchgScreenVramRec$C2:CE96 · 7 B · EngineThe Menu_VramRec of Menu_XchgScreenMap: VRAM $7000 = $7E:B000 (BankFF_ScreenGfxDest), $600 bytes. - verified
Menu_XchgStartWave$C2:CE9D · 37 B · EngineBG3SC = Menu_XchgBg3sc (written to the register, long); the Menu_WavePhase / Menu_WaveTick word = 0; Menu_XchgWaveThread started at Menu_XchgWaveStart in slot 2; the 12 bytes of... - verified
Menu_XchgWaveThread$C2:CEC2 · 12 B · EngineThread in slot 2, started at the sub-entry Menu_XchgWaveStart ($C2:CECE): BankFF_StepWave, then for ever: Menu_XchgWaveHdmaBit set in Menu_HdmaenShadow, two frames' wait (Menu_YieldFrames)... - verified
Menu_XchgWaveStart$C2:CECE · 6 B · Engine - verified
Menu_Mode06List$C2:CED4 · 8 B · EngineMenu_ModeLists entry $06: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the save screen; mode $0B shares handlers 2 and 3). - verified
Menu_Mode06H0$C2:CEDC · 33 B · EngineHandler 0: when bit 6 is set in the low byte of Menu_Unk0D34 ($FF when the menu was opened from a field location with bit 7 of Menu_Unk7F01CF clear) or in C2Scene_Unk0294, C2Scene_Unk0299 or... - verified
Menu_Mode06H1$C2:CEFD · 13 B · EngineHandler 1, every frame: Menu_PadInput. - verified
Menu_Mode06H1Confirm$C2:CF0A · 23 B · Engine - verified
Menu_SaveRedraw$C2:CF21 · 15 B · Engine - verified
Menu_SaveSlotVramRec$C2:CF30 · 7 B · EngineThe Menu_VramRec of Menu_SaveRedraw: VRAM Menu_SlotTextVram ($7900) = Menu_SlotTextBufs ($7E:7000), $600 bytes (the three slots' text). - verified
Menu_SaveToSlot$C2:CF37 · 39 B · EngineSaves to slot Menu_SlotIdx: sound effect Menu_SaveSfx (Audio_CmdPlaySfx, Audio_CmdArg1 = Menu_SaveSfxArg; Audio_DriverCommand), Menu_SlotValid of the slot = $FF, BankFF_SaveSlot, a frame's wait... - verified
Menu_Mode06Leave$C2:CF5E · 3 B · EngineHandler 1's cancel: a jump to Menu_ReturnToMainMenu. - verified
Menu_Mode06H2$C2:CF61 · 39 B · EngineHandler 2 of modes 6 and $0B, every frame, the question over a slot that holds a save: Menu_PadInput; neither button: Menu_PlaySound0 when Menu_CursorSel is not Menu_Unk81. - verified
Menu_SaveAskBack$C2:CF88 · 10 B · Engine - verified
Menu_Mode06H3$C2:CF92 · 16 B · EngineHandler 3 of modes 6 and $0B, every frame: Menu_Unk0D9B - 1 (the main cursor not drawn this frame), Menu_PadInput; either button: a branch to Menu_SaveAskBack. - verified
Menu_UnkCFA2$C2:CFA2 · 89 B · EngineThe save screen's cursor step: Menu_SlotIdx = Menu_LoadHiliteRow = Menu_CursorSel (the slot; Menu_PlaySound0 when it differs from the previous one, the old Menu_LoadHiliteRow), the row's highlight... - verified
Menu_UnkCFFB$C2:CFFB · 73 B · EngineThe highlight of row Menu_LoadHiliteRow, probably: Menu_SlotHiliteBuf = Menu_SlotHiliteData (33 bytes), Menu_ScrollBuild = Menu_ScrollSaved (16 bytes: the 3-byte entries of a line count and a...
Bank $C2 · $C2:D000–$DFFF
$C2:D000
Verified · 70
- verified
Menu_SlotHiliteData$C2:D044 · 33 B · EngineCopied to Menu_SlotHiliteBuf by Menu_UnkCFFB: 16 bytes $47, 16 bytes $C7, then $02 (the byte the highlighted entry points at). - verified
Menu_UnkD065$C2:D065 · 118 B · EngineMenu_MainPreviewTable entry 5 (also run by Menu_Mode0BH0): the load screen's draw list MenuRom_LoadList; the slot windows (Menu_DrawSlotWindows); Menu_VramRecUnkFC53 queued; the palette not... - verified
Menu_UnkD0DB$C2:D0DB · 10 B · EngineMenu_MainRedrawTable entry 5: Menu_HdmaenShadow = Menu_SaveHdmaBits. - verified
Menu_UnkD0E5$C2:D0E5 · 40 B · EngineThe save screen over icon 5's preview: Menu_CursorSel = Menu_LoadHiliteRow (the slot shown); the draw list MenuRom_SaveList; the palette flagged; Menu_HdmaenShadow = Menu_SaveHdmaBits; the row's... - verified
Menu_DrawSlotWindows$C2:D10D · 36 B · EngineFor slots 0-2 (Menu_SlotIdx): Menu_DrawSlotWindow at Menu_MapPtr (from Menu_SlotWinMap, + $100: 4 rows, each time; the INC of its high byte is absolute, $0062, with DP $0000 and DB $7E the same... - verified
Menu_DrawSlotWindow$C2:D131 · 37 B · EngineSlot Menu_SlotIdx's window at Menu_MapPtr: its label, 2 tile words (and the row below) from attribute Menu_SlotLabelAttr and tile 2 x slot + 1 (Menu_PutTextTilesAttr); 7 tiles on (X + 10 after the... - verified
Menu_LoadSlotSummaries$C2:D156 · 66 B · EngineMenu_SlotWinStyle (3 bytes) = 0, Menu_Unk0D4C = $FF, then for slots 0-2 (Menu_SlotIdx): Menu_SlotValid[slot] = 0; BankFF_UnkF9C4; when it leaves Menu_Tmp00 = 0 the slot is valid (Menu_SlotValid =... - verified
Menu_SlotLabelVramRec$C2:D198 · 7 B · EngineMenu_VramRec: VRAM $7000 = $7E:6E00 ($200 bytes: the slot labels of Menu_DrawSlotLabel). - verified
Menu_ReadSlotSummary$C2:D19F · 199 B · EngineCopies what the slot screen shows of slot Menu_SlotIdx from SRAM into its Menu_SlotSummaries block ($40 bytes at $7E:7600 + slot x $40). - verified
Menu_SlotLocName$C2:D266 · 39 B · EngineMenu_SlotWinStyle[slot] = the SRAM byte at +$0591 AND 7, probably the slot's copy of Menu_Config01 ($7E:2991; inferred: +$0591 is where it falls if the slot copies $7E:2400 on, as the records at... - verified
Menu_DrawEmptySlot$C2:D28D · 9 B · EngineString Menu_StrEmptySlot, then falls into Menu_DrawSlotText. - verified
Menu_DrawSlotText$C2:D296 · 46 B · EngineDraws string TextWin_StrIndex of MenuRom_SlotStrings into slot Menu_SlotIdx's text buffer (Menu_TextDest = $7E:7000 + slot x $200, cleared first: $200 bytes) with Menu_DrawText. - verified
Menu_DrawSlotLabel$C2:D2C4 · 66 B · EngineDraws string Menu_StrSlotLabel0 + slot of MenuRom_SlotLabelStrings at Menu_SlotLabelFirst ($7E:6E10) + slot x $20 (Menu_DrawText), then shifts it right by 2 pixels Menu_SlotLabelShifts[slot] times... - verified
Menu_ShiftLabelRight$C2:D306 · 35 B · EngineShifts the 2bpp text at Menu_TextDest right by 2 pixels: two tiles side by side (+0 and +$10), and the same for the row of tiles below (+$100 and +$110); bits leave the second tile on the right. - verified
Menu_SlotLabelShifts$C2:D329 · 3 B · EngineTimes Menu_DrawSlotLabel shifts each slot's label right by 2 pixels. - verified
Menu_UnkD32C$C2:D32C · 64 B · EngineSlot Menu_SlotIdx's window: Menu_WinStyle = its Menu_SlotWinStyle; Menu_DrawAddr = Menu_SlotWinMapA + slot x $100; a window of Menu_SlotWinSize (24 x 4 tiles) in that style and its palette row... - verified
Menu_UnkD36C$C2:D36C · 243 B · EngineThe details of slot Menu_SlotIdx: Menu_Unk0D5D's low byte = 0 (8-bit STZ); nothing more for row 3 or a slot without a save (Menu_SlotValid 0). - verified
Menu_SlotEraVramRec$C2:D45F · 7 B · EngineThe Menu_VramRec of Menu_UnkD36C: VRAM $7808 = Menu_TextGfxA ($7E:5E00), $1F0 bytes. - verified
Menu_SlotMemberIcon$C2:D466 · 78 B · EngineA 2 x 2 tile icon for character Menu_Tmp00 (slot member Menu_SlotMemberIdx) at Menu_MapPtr + Menu_SlotIconOfs: the attribute bytes = member x 4 OR Menu_SlotIconAttr (tile bit 8 and palette 4 +... - verified
Menu_SlotIconTiles$C2:D4B4 · 7 B · EnginePer character 0-6: the first of its icon's 4 tiles (with tile bit 8 from the attribute: tiles $1E0-$1FB). - verified
Menu_SaveAskOpen$C2:D4BB · 26 B · EngineThe overwrite question: Menu_CursorSel = Menu_SaveRecYes, the draw list MenuRom_SaveAskList, Menu_HdmaenShadow = Menu_SaveAskHdmaBits, Menu_VramRecBg2B queued. - verified
Menu_SaveAskClose$C2:D4D5 · 27 B · EngineCloses the question: the load screen's close list MenuRom_LoadAskClose, Menu_HdmaenShadow = Menu_SaveHdmaBitsB, Menu_CursorSel = Menu_LoadSavedRow (the slot's row again), Menu_VramRecBg2B queued. - verified
Menu_Mode0BList$C2:D4F0 · 8 B · EngineMenu_ModeLists entry $0B: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below; handlers 2 and 3 are mode 6's, named after it). - verified
Menu_Mode0BH0$C2:D4F8 · 14 B · EngineHandler 0: the main menu's tilemaps (Menu_MainMenuMaps), mode 6's preview (Menu_UnkD065: the slot windows and the last saved slot's details) and the save screen over it (Menu_UnkD0E5), then... - verified
Menu_Mode0BH1$C2:D506 · 19 B · EngineHandler 1, every frame: Menu_PadInput. - verified
Menu_Mode0CList$C2:D519 · 18 B · EngineMenu_ModeLists entry $0C: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the shop). - verified
Menu_Mode0CH0$C2:D52B · 27 B · EngineHandler 0: the shop's set-up (Menu_ShopInit); cursor C (Menu_StartCursorC) on record Menu_ShopRecCursorC with Menu_BlinkMask = Menu_ShopBlinkMask and Menu_CursorTileAttr = Menu_ShopCursorTile (set... - verified
Menu_Mode0CH1$C2:D546 · 69 B · EngineHandler 1, every frame, the top row (buy / sell): Menu_SprUploadMax = 1, Menu_PadInput. - verified
Menu_Mode0CH2$C2:D58B · 82 B · EngineHandler 2, every frame, the buy list: Menu_PadInput. - verified
Menu_ShopListClose$C2:D5DD · 40 B · Engine - verified
Menu_ShopResetPoses$C2:D605 · 19 B · EngineFor sprite objects 6 down to 0: .Anim = 0 (probably the standing pose; Menu_ShopMemberInfo sets Menu_ShopAnimCanEquip on the members who can equip the item). - verified
Menu_Mode0CH5$C2:D618 · 45 B · EngineHandler 5, every frame, the count to buy: Menu_CursorHold = $FF (the cursor does not move), Menu_PadInput. - verified
Menu_Mode0CH3$C2:D645 · 75 B · EngineHandler 3, every frame, the sell list: Menu_PadInput. - verified
Menu_Mode0CH4$C2:D690 · 51 B · EngineHandler 4, every frame, the count to sell: Menu_CursorHold = $FF, Menu_PadInput. - verified
Menu_Mode0CH6$C2:D6C3 · 82 B · EngineHandler 6, every frame, the member sprites: Menu_PadInput. - verified
Menu_Mode0CH7$C2:D715 · 99 B · EngineHandler 7, every frame, the member's equipment slots: Menu_PadInput. - verified
Menu_Mode0CH8$C2:D778 · 87 B · EngineHandler 8, every frame, the slot's item list: Menu_PadInput. - verified
Menu_ShopBuyMove$C2:D7CF · 227 B · EngineHandler 2's frame without confirm or cancel, on the buy list (Menu_ShopIds, top row Menu_ShopBuyTop). - verified
Menu_ShopSellMove$C2:D8B2 · 227 B · EngineMenu_ShopBuyMove for the sell list: the same steps with Menu_ShopSellTop / Menu_ShopSellRow, the list Menu_SellIds / Menu_SellCounts (Menu_Unk04CA = the slot's count), its length Menu_ShopSellLen... - verified
Menu_ShopShiftMap$C2:D995 · 108 B · EngineMoves the list's rows in the tilemap after a one-row scroll; the direction is the sign of Menu_ScrollStep's low byte (3 or -3), read as bit 15 of the word at Menu_ScrollStep - 1. - verified
Menu_ShopQtyStep$C2:DA01 · 52 B · EngineThe D-pad step of the count windows (handlers 4 and 5): Menu_ShopMulArg = Menu_ShopUnitPrice (3 bytes: the word and a 0; the 16-bit STZ also zeroes $0007), Menu_ShopMulLen = 3; Menu_CursorHold =... - verified
Menu_ShopQtyDirs$C2:DA35 · 8 B · EngineMenu_ShopQtyStep's routine by Menu_CursorDir (0 Right, 1 Left, 2 Down, 3 Up). - verified
Menu_ShopQtyRight$C2:DA3D · 19 B · EngineThe count window's D-pad steps; the count is Menu_ItemCount, kept from 1 to Menu_Unk04CA - 1 (the most + 1, set by the handler that opened the window). - verified
Menu_ShopQtyLeft$C2:DA50 · 20 B · Engine - verified
Menu_ShopQtyUp$C2:DA64 · 31 B · Engine - verified
Menu_ShopQtyDown$C2:DA83 · 71 B · Engine - verified
Menu_ShopInit$C2:DACA · 206 B · EngineMode $0C's set-up (Menu_Mode0CH0): Menu_ShopMemberSel = Menu_ShopRecMember0, Menu_CursorSel = Menu_ShopRecBuy; Menu_ClearOam; the draw list MenuRom_ShopList; the members (Menu_ShopListMembers)... - verified
Menu_ShopVramRec$C2:DB98 · 7 B · EngineMenu_VramRec queued by Menu_ShopInit: VRAM $1000 = $7E:B000 (Menu_SprUnpackBuf, where BankFF_BuildTileSets builds its tiles), $1100 bytes. - verified
Menu_ShopCalcPrices$C2:DB9F · 73 B · EngineThe buy price of each shop item, into Menu_ShopBuyPrices[id] (a word per id): Menu_ItemInfo1[id] (probably the item's price) x the word at Menu_PriceFactor through Menu_UnkFD58 (probably... - verified
Menu_ShopListMembers$C2:DBE8 · 54 B · EngineMenu_EquipChars = the ids of Menu_PartyList without the empty ones (bit 7 set), then $FF; Menu_ShopMemberCount = how many. - verified
Menu_ShopMemberSprites$C2:DC1E · 86 B · EngineMenu_SprHideAll, Menu_SprUploadMax = 7; then for each member of Menu_EquipChars (Menu_CurMember counting from 0, the 16-bit LDX also reading $0072; until the $FF): Menu_LoadCharRec; the sprite... - verified
Menu_ShopSprX$C2:DC74 · 7 B · EngineThe member sprites' .ScreenX, one per member 0-6 (indexed by Menu_Tmp02 in Menu_ShopMemberSprites), 32 pixels apart. - verified
Menu_ShopBuyOpen$C2:DC7B · 67 B · EngineOpens the buy list (Menu_Mode0CH1's confirm on Menu_ShopRecBuy): Menu_Unk0D78 = $FF (the next Menu_DrawDescText draws again), Menu_CursorSel = 0, Menu_ArrowX/Y = Menu_ShopArrowXY; the draw list... - verified
Menu_ShopCountIds$C2:DCBE · 28 B · EngineMenu_ShopBuyLen = the number of ids before the first 0 in Menu_ShopIds; the bytes from that 0 to the end of its 32 are zeroed. - verified
Menu_ShopCountHeld$C2:DCDA · 40 B · EngineFor each shop item until the id 0: Menu_ShopHeld = the count of the first inventory slot (Menu_InvIds / Menu_InvCounts) holding that id with a count other than 0, or 0 when there is none. - verified
Menu_ShopBuyDrawRows$C2:DD02 · 30 B · EngineThe 8 rows of the buy list from Menu_ShopBuyTop (Menu_ShopBuyDrawRow for rows 0-7, Menu_MapPtr from Menu_ShopListMap down $80 bytes a row until Menu_ShopMapBelow). - verified
Menu_ShopBuyDrawRow$C2:DD20 · 32 B · EngineRow Menu_ShopRow of the buy list: Menu_ItemId = Menu_ShopIds[top + row], Menu_ShopPrice (its word) = its Menu_ShopBuyPrices entry, and Menu_ShopDrawRow at Menu_MapPtr. - verified
Menu_ShopListPaging$C2:DD40 · 22 B · EngineThe paging of a shop list of Y entries, 8 rows a page from cursor record 0 (Menu_Tmp00 = 8, Menu_PageCursorFirst = 0), with WRDIVL/H = Menu_ShopArrowSpan (the dividend of the list arrows'... - verified
Menu_ShopDrawRow$C2:DD56 · 38 B · EngineOne list row at Menu_MapPtr: for an id (Menu_ItemId) its name (Menu_DrawItemName) and after it Menu_ShopPrice's word in 5 digits (Menu_DrawNumber, flags Menu_ShopPriceDigits: leading zeros blank)... - verified
Menu_ShopMemberInfo$C2:DD7C · 161 B · EngineWhat the members think of item Menu_ItemId (0: nothing). - verified
Menu_ShopSlotOfsTable$C2:DE1D · 4 B · EngineThe Menu_CharRec offset of the slot of item categories 0-3 (as Menu_EquipSlotOffsets: weapon .Unk29, .Unk28, .Unk27, accessory .Unk2A). - verified
Menu_ShopMemberNums$C2:DE21 · 53 B · EngineA member's numbers in the shop: at Menu_ShopInfoMap + Y the tile byte Menu_ShopEquippedTile when it has the item equipped (Menu_EquipFlags[Menu_CurMember]); then the attack pair (the record's... - verified
Menu_ShopNumPair$C2:DE56 · 66 B · EngineDraws a member's value Menu_Tmp00 (0-255) as two tile words: tile bytes at Menu_ShopNumMap + Y and + 2, attribute bytes at + 1 and + 3. - verified
Menu_ShopSellOpen$C2:DE98 · 52 B · EngineOpens the sell list (Menu_Mode0CH1's confirm on Menu_ShopRecSell): Menu_ArrowX/Y = Menu_ShopArrowXY; the draw list MenuRom_ShopSellList; with Menu_CfgA5 clear Menu_ShopSellRow/Top = 0... - verified
Menu_ShopSellBuild$C2:DECC · 101 B · EngineBuilds the sell list from the inventory: the first 8 bytes of Menu_SellIds zeroed; then for each of the 256 slots its count goes to Menu_SellCounts at the next list place, and the id too when it... - verified
Menu_ShopSellDrawRows$C2:DF31 · 32 B · EngineThe 8 rows of the sell list from Menu_ShopSellTop (Menu_ShopSellDrawRow for rows 0-7, Menu_MapPtr from Menu_ShopListMap down $80 bytes a row). - verified
Menu_ShopSellDrawRow$C2:DF51 · 37 B · EngineRow Menu_ShopRow of the sell list: Menu_ItemId = Menu_SellIds[top + row] (a 16-bit store: Menu_Unk04CA = 0), Menu_ShopPrice (its word) = the item's Menu_ItemInfo1 word / 2, rounded up (the LSR's... - verified
Menu_ShopQtyOpen$C2:DF76 · 79 B · EngineOpens the count window (handlers 2 and 3 on a confirm): Menu_InfoValue = Menu_ItemSortKeys[Menu_ItemId] (the weapon power or armour value); Menu_ShopListSel = Menu_CursorSel, Menu_CursorSel =... - verified
Menu_ShopQtyLists$C2:DFC5 · 10 B · EngineMenu_ShopQtyOpen's draw list (bank $FF) by item category 0-4: one for category 0, one for 1 and 2, one for 3 and 4 (what each shows is not traced; Menu_InfoValue is set just before). - verified
Menu_ShopQtyClose$C2:DFCF · 50 B · EngineCloses the count window: Menu_CursorSel = Menu_ShopListSel; the 32 bytes from Menu_ShopQtyRowMap zeroed; Menu_ShopLast (and $0084) = $FF from the A the MVN leaves (the next list frame redraws the...
Bank $C2 · $C2:E000–$EFFF
$C2:E000
Verified · 104
- verified
Menu_ShopQtyDraw$C2:E001 · 17 B · EngineThe count window's numbers: the draw list MenuRom_ShopQtyList (probably Menu_ItemCount and Menu_ShopPrice; not traced) and Menu_VramRecBg1Low queued. - verified
Menu_ShopDescNone$C2:E012 · 5 B · EngineMenu_DrawDescText with A = Menu_Unk51 (expected 0): string 0, probably the line shown with no item (a tail jump). - verified
Menu_ShopToMembers$C2:E017 · 65 B · EngineFrom the top row to the member sprites (Menu_Mode0CH1 on Up / Down): Menu_ShopMenuSel = Menu_CursorSel, Menu_ThreadVar = 6, Menu_CursorSel = Menu_ShopMemberSel; Menu_ShopAttrArg =... - verified
Menu_ShopMemberAttr$C2:E058 · 26 B · EngineMenu_SetRowsAttr on the two tile rows at Menu_ShopMarkMap + 8 x member Menu_Tmp00 (low byte), with A = Menu_ShopAttrArg: its low byte the tiles per row, its high byte the attribute bits 4-7 to set. - verified
Menu_ShopDimMembers$C2:E072 · 51 B · EngineFor the members 0 to Menu_Unk85 - 1 (Menu_ShopRow, from Menu_Unk51): Menu_ShopMemberAttr with Menu_ShopAttrArg as given, and its palette (BankFF_LoadE4Palette of its Menu_EquipChars id, halved... - verified
Menu_ShopEquipOpen$C2:E0A5 · 76 B · EngineThe equipment of the member under the cursor (Menu_Mode0CH6's confirm): Menu_CompareAttrs (7 bytes) zeroed; Menu_CurMember = Menu_CursorSel - Menu_ShopRecMember0 and its record loaded... - verified
Menu_ShopSlotRows$C2:E0F1 · 23 B · EngineThe slot rows highlighted (Menu_ShopSlotAttr), Menu_ArrowX/Y = Menu_ShopEquipArrowXY, the slot's item list set up (Menu_EquipListSetup) and Menu_VramRecBg1Rows24 queued. - verified
Menu_ShopEquipNext$C2:E108 · 72 B · EngineChanges the member in the equipment view on Menu_PadAction's page bits: Menu_PadPageBack the next member (to 0 after the last, Menu_Unk85 - 1), Menu_PadPageOn the one before (to the last before 0). - verified
Menu_ShopSlotAttr$C2:E150 · 18 B · EngineMenu_ListKind (written absolute) = Menu_CursorSel (the slot), then Menu_SetSlotRowsAttr from Menu_ShopSlotRowsMap (the selected slot's rows keep palette 0, the others get palette 7). - verified
Menu_ShopTryItem$C2:E162 · 40 B · EngineHandler 8's item under the cursor tried on: the member's record again (Menu_LoadPartyCharRec), Menu_ItemId = Menu_EquipList[Menu_EquipListTop + Menu_CursorSel - Menu_EquipListFirstRec], stored in... - verified
Menu_ShopCompare$C2:E18A · 82 B · EngineThe stats with the record copy as it is (Menu_CharCalcStats; stat 5 doubled with accessory Menu_DoubleStat5Item, as Menu_CharRecalc does); for the 7 stats in Menu_ShopCompareOfs order the new... - verified
Menu_ShopCompareOfs$C2:E1DC · 7 B · EngineMenu_ShopCompare's order: the Menu_CharRec offsets of stats 0, 2, 5, 3, 1, 4, 6 in .Derived (Menu_EquipCompareOfs' entries 2-8). - verified
Menu_Mode0DList$C2:E1E3 · 10 B · EngineMenu_ModeLists entry $0D: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the name entry). - verified
Menu_Mode0DH0$C2:E1ED · 20 B · EngineHandler 0: Menu_NamedOnce |= Menu_CurMember. - verified
Menu_Mode0DH3$C2:E201 · 8 B · EngineHandler 3 (after handler 2's choice and its fade-out), also branched to by handler 0: the name screen (Menu_NameInit), Menu_ThreadVar + 1 (handler 4 from here, handler 1 from handler 0) and a tail... - verified
Menu_Mode0DH4$C2:E209 · 21 B · EngineHandler 4, every frame after handler 3: waits for a button (any bit of Pad_Pressed, read as a word), then Menu_PlaySound0, Menu_HdmaenShadow = Menu_NameHdmaBits, Menu_ArrowsOff = 0 and... - verified
Menu_Mode0DH1$C2:E21E · 24 B · EngineHandler 1, every frame, the grid: Menu_PadInput, Menu_NameGridStep (D-pad, confirm and cancel); with Start newly pressed (Pad_Pressed bit 0) Menu_NameFinish, and when it took the name (A = 0) a... - verified
Menu_Mode0DH2$C2:E236 · 49 B · EngineHandler 2, every frame, the choice before the first name: Menu_PadInput, the line under the cursor (Menu_NameChoiceText). - verified
Menu_NameGridStep$C2:E267 · 49 B · EngineThe grid's frame: Menu_NamePrevPos (a word) = cursor record 0's X and Y; WRMPYA = 16 (the grid's cell size, used by the steps); for a direction (Menu_CursorDir not negative) its step from... - verified
Menu_NameGridDirs$C2:E298 · 8 B · EngineMenu_NameGridStep's routine by Menu_CursorDir (0 Right, 1 Left, 2 Down, 3 Up). - verified
Menu_NameUp$C2:E2A0 · 10 B · EngineThe grid cursor's steps, wrapping: Menu_NameUp row - 1 (7 below 0), Menu_NameDown ($C2:E2AA) row + 1 (0 from 8); then (.row) Menu_NameRow = it, WRMPYB = it, Menu_NameUnk0F0A = 0, and cursor record... - verified
Menu_NameDown$C2:E2AA · 34 B · Engine - verified
Menu_NameLeft$C2:E2CC · 10 B · Engine - verified
Menu_NameRight$C2:E2D6 · 30 B · Engine - verified
Menu_NameEdit$C2:E2F4 · 34 B · EngineConfirm: Menu_NameAddChar, then Menu_PlaySound0. - verified
Menu_NameAddChar$C2:E316 · 52 B · EngineThe character under the grid cursor, MenuRom_NameChars[Menu_NameRow x 10 + Menu_NameCol], goes to Menu_NameBuf[Menu_NameLen] (at most index 4: with 5 characters the last is replaced), and... - verified
Menu_NameCursorX$C2:E34A · 25 B · EngineThe X of the two sprites under the name (OAM entries 96 and 97, Menu_NameCursorOam) = Menu_NameCursorX0 + 8 x Menu_NameLen (at most 4): probably the mark at the next character's place. - verified
Menu_NameFinish$C2:E363 · 45 B · EngineStart on the name entry: the first byte of the character's name (Menu_NameDest, in TextWin_CharNames) = 0, so the old name is not found by the test after; the entry trimmed into Menu_NameTrimmed... - verified
Menu_NameTrim$C2:E390 · 80 B · EngineMenu_NameTrimmed (6 bytes) zeroed; Menu_NameBuf's 6 bytes copied to Menu_NameWork; from the end, the trailing spaces (Menu_NameSpace) are zeroed, zeros skipped, up to the first other byte; then... - verified
Menu_NameTaken$C2:E3E0 · 46 B · EngineCompares Menu_NameTrimmed with each of the 8 names of TextWin_CharNames (6 bytes apart), up to 5 bytes or a 0 in both: on a match Menu_PlaySound1 and A = $FF; else A = 0 (TDC). - verified
Menu_NameInit$C2:E40E · 304 B · EngineThe name screen: Menu_CursorSel = 0; the draw list MenuRom_NameList; the grid's text built at Menu_NameGridText (Menu_NameGridBuild) and put at Menu_NameGridMap with Menu_DrawString (Menu_TextAttr... - verified
Menu_NameVramRec$C2:E53E · 7 B · EngineMenu_VramRec queued by Menu_NameInit: VRAM $7800 = Menu_TextGfxA ($7E:5E00), $800 bytes. - verified
Menu_NameGridBuild$C2:E545 · 49 B · EngineThe grid's text at Menu_NameGridText: 8 rows, each the 10 characters of MenuRom_NameChars in turn with a byte $FF after each, then Menu_NameNewLine; a 0 at the end. - verified
Menu_NameChoiceInit$C2:E576 · 93 B · EngineThe choice screen before the first name: $480 bytes of MenuRom_NameChoiceMap to Menu_Unk3600, then 12 more blocks of 16 bytes from the ROM after it, each to every other 16 bytes of the map... - verified
Menu_NameChoiceText$C2:E5D3 · 56 B · EngineThe line of the choice under the cursor: string Menu_CursorSel + 1 of MenuRom_NameStrings, drawn (as Menu_DrawDescText does, by the text thread Menu_StartDescText starts) into Menu_NameChoiceDest... - verified
Menu_Mode0EList$C2:E60B · 8 B · EngineMenu_ModeLists entry $0E: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the load screen). - verified
Menu_Mode0EH0$C2:E613 · 8 B · EngineHandler 0: the load screen (Menu_LoadInit), Menu_ThreadVar + 1 (handler 1) and a tail jump to Menu_StartFadeIn. - verified
Menu_Mode0EH1$C2:E61B · 104 B · EngineHandler 1, every frame, the slot list. - verified
Menu_Mode0EH1_new$C2:E683 · 17 B · Engine - verified
Menu_Mode0EH1_start$C2:E694 · 26 B · Engine - verified
Menu_Mode0EH2$C2:E6AE · 87 B · EngineHandler 2, every frame, the slot to start from (after Menu_LoadAskSlot): Menu_PadInput. - verified
Menu_Mode0EH3$C2:E705 · 62 B · EngineHandler 3, every frame, the erase question (records 4 yes, 5 no): Menu_PadInput; neither button: Menu_PlaySound0 when the cursor moved. - verified
Menu_LoadCursor$C2:E743 · 128 B · EngineThe load screen's cursor: while the row Menu_CursorSel has Menu_SlotValid 0 (row 3: Menu_Unk0D4C), it moves on, up (- 1) after an Up move (Menu_CursorDpad), else down, wrapping over rows 0-3. - verified
Menu_LoadInit$C2:E7C3 · 126 B · EngineThe load screen: the draw list MenuRom_LoadList; the slot windows (Menu_DrawSlotWindows); Menu_SlotIdx = Menu_SramLastSlot (the slot saved last), or 3 (row 3) when no slot is valid; Menu_CursorSel... - verified
Menu_LoadAskSlot$C2:E841 · 73 B · EngineThe question of handler 2: Menu_LoadMsgShown + 1 (Menu_UnkD36C then skips only $C2:D39E-$D403, after its test at $C2:D399: its draw list ($FF:C15E), Menu_DrawClock, a text line (Menu_DrawText of a... - verified
Menu_LoadMsgVramRec$C2:E88A · 7 B · EngineMenu_VramRec queued by Menu_LoadAskSlot: VRAM $7108 = Menu_TextGfxA ($7E:5E00), $600 bytes. - verified
Menu_LoadEraseOpen$C2:E891 · 38 B · EngineThe erase question (Menu_Mode0EH1 jumps here): Menu_SlotIdx = the row (Menu_CursorSel, with B = 0 from the TDC); Menu_LoadSavedRow = it, Menu_CursorSel = Menu_LoadRecYes, Menu_HdmaenShadow =... - verified
Menu_LoadEraseSlot$C2:E8B7 · 93 B · EngineErases slot Menu_SlotIdx: Menu_SlotValid and Menu_SlotWinStyle of it = 0; the low byte of its Menu_SramSlotSign = slot x 2 (no longer BankFF_SlotSign, so the slot reads as empty). - verified
Menu_VramRecUnkE914$C2:E914 · 7 B · EngineA Menu_VramRec: VRAM $5840 = $7E:2E80, $80 bytes (the first two rows Menu_VramRecClock sends). - verified
Menu_MainCursorThread$C2:E91B · 8 B · EngineThread 3 (Menu_RunThreads starts it): Menu_DrawMainCursor, wait a frame, for ever. - verified
Menu_ResetMainCursor$C2:E923 · 10 B · EngineMenu_ClearOam (every sprite hidden), Menu_Unk56 = 0 (no flip), then the cursor part of Menu_DrawMainCursor (its .cursor, which ends with this routine's PLP). - verified
Menu_DrawMainCursor$C2:E92D · 79 B · EngineHides OAM entries 16-95 of the copy at $0700 (Y $E0, large) and, unless Menu_Unk0D9B was non-zero (it is cleared: one frame skipped), places the main cursor in entry 28 (Menu_OamMainCursor): X/Y... - verified
Menu_PadInputThread$C2:E97C · 8 B · EngineMenu_PadInput, wait a frame, for ever: a thread body like Menu_MainCursorThread's. - verified
Menu_PadInput$C2:E984 · 85 B · EngineMenu_CursorMove first (with the caller's P), then rebuilds Menu_PadAction from 0: bit 7 (confirm) when Pad_Pressed has a bit of Menu_ButtonMap entry 0, bit 6 (cancel) for entry 1 (the entries... - verified
Menu_PadActionButtons$C2:E9D9 · 9 B · EngineMenu_ButtonMap entries Menu_PadInput tests for Menu_PadAction bits 7 and 6: only the first two bytes (0 and 1) are read; the other seven ($00 $00 $00 $08 $06 $07 $FF) are not read by any code... - verified
Menu_CursorMove$C2:E9E2 · 61 B · EngineMenu_Unk81 = Menu_CursorSel (the selection before this call) and Menu_CursorDpad = the D-pad bits of Menu_PadRepeat (its high byte: Up, Down, Left, Right = bits 3-0). - verified
Menu_CursorDirTable$C2:EA1F · 8 B · EngineMenu_CursorMove's routine per Menu_CursorDir 0-3 (Right, Left, Down, Up). - verified
Menu_CursorRecOffset$C2:EA27 · 15 B · EngineX = (A AND $FF) x 6: the byte offset of a 6-byte Menu_CursorPos record. - verified
Menu_CursorToUp$C2:EA36 · 5 B · EngineMenu_CursorDirTable's routines: Menu_CursorSel = the record's .Up (here), .Down (Menu_CursorToDown, $EA3B), .Left (Menu_CursorToLeft, $EA40) or .Right (Menu_CursorToRight, $EA45) byte, each stored... - verified
Menu_CursorToDown$C2:EA3B · 5 B · Engine - verified
Menu_CursorToLeft$C2:EA40 · 5 B · Engine - verified
Menu_CursorToRight$C2:EA45 · 3 B · Engine - verified
Menu_CursorStoreNeighbour$C2:EA48 · 11 B · Engine - verified
Menu_ListCursorEdge$C2:EA53 · 46 B · EngineAfter Menu_PadInput in a paged list. - verified
Menu_ListPageSetup$C2:EA81 · 57 B · EngineSets up the paging of a list of Y entries shown Menu_Tmp00 rows at a time: Menu_PageStep = the rows; the largest top row (Y - rows, or 0 when the list fits) goes to Menu_Tmp01, Menu_ListMaxTop... - verified
Menu_PlaySound$C2:EABA · 8 B · EngineMenu_SendSound with the caller's A: sound command $18, argument A (probably a sound effect id: command $19 is Audio_CmdPlaySfx; what $18 does differently is not traced). - verified
Menu_PlaySound0$C2:EAC2 · 10 B · EngineMenu_SendSound with id 0: the sound of a cursor move (Menu_MainMenuLoop plays it on a new icon, the mode 1 handlers when Menu_CursorSel changed) and of a return to the main menu, probably the... - verified
Menu_PlaySound1$C2:EACC · 10 B · EngineMenu_SendSound with id 1 (the mode 1 handler at $C2:9C83 plays it when Menu_EquipListLen is 0 instead of opening the list: probably the refusal sound). - verified
Menu_PlayPendingSound$C2:EAD6 · 35 B · EngineMenu_NmiTimer = 0 (so the command is sent now), then: Menu_Unk0DBC bit 1 set: it is cleared and sound 6 played; else bit 0 set: it is cleared and sound 7 played; else nothing. - verified
Menu_PlaySfxNow$C2:EAF9 · 10 B · EngineAudio_CmdPlaySfx with argument A, always sent: Menu_NmiTimer is zeroed first, then Menu_SendSoundArg. - verified
Menu_SendSound$C2:EB03 · 5 B · EngineAudio_CmdId = Audio_Cmd18, Audio_CmdArg0 = A; then (also Menu_SendSoundArg, $EB08, with the command already set) the command is sent only while Menu_NmiTimer is 0: Menu_NmiTimer = 3 (the menu NMI... - verified
Menu_SendSoundArg$C2:EB08 · 23 B · Engine - verified
Menu_ListScrollStep$C2:EB1F · 124 B · EngineOne frame of a list's smooth scroll (set up by Menu_ListScrollInit): builds Menu_ScrollRows entries of an HDMA-style table (3 bytes: line count, 16-bit value) in Menu_ScrollBuild from... - verified
Menu_ListScrollInit$C2:EB9B · 157 B · EngineSets up a one-row smooth scroll of the table at Menu_NmiMoveDest (Menu_NmiMoveSize bytes, the caller sets both; n = Menu_ScrollRows entries of 3 bytes: line count, 16-bit value): - Menu_NmiMoveSrc... - verified
Menu_DrawPortrait$C2:EC38 · 91 B · EngineDraws a 6 x 6 tile block at Menu_MapPtr (rows $40 bytes apart): the tiles MenuRom_PortraitTiles[Menu_PortraitChar] + 0 to 35 in order, each with Menu_Tmp01 as its attribute byte; then copies the... - verified
Menu_SetRowsAttr$C2:EC93 · 25 B · EngineFor X rows from Menu_MapPtr down (Menu_MapPtr += $40 each): Menu_SetRowAttr on A's low byte tiles, which keeps each attribute byte's bits 0-3 and ORs in A's high byte. - verified
Menu_SetAttr2Rows$C2:ECAC · 22 B · EngineSets the attribute byte of A's low byte tiles (0: 256) at Menu_MapPtr and of the ones a row ($40 bytes) below to A's high byte. - verified
Menu_SetRowAttr$C2:ECC2 · 25 B · EngineMenu_SetRowsAttr's row: for A's low byte tiles (0: 256) at Menu_MapPtr, attribute byte = (it AND $0F) OR the byte at 7,S: the high byte of the A that Menu_SetRowsAttr pushed (under this routine's... - verified
Menu_LoadSlotWindowStyle$C2:ECDB · 45 B · EngineWith DB=$7E: Menu_Unk0D47 low byte = Menu_WinStyle x 20, high byte = (Menu_SlotIdx + 1) x 4 + 3 (bits 2-4 the palette row, so row slot + 1); then Menu_DrawWindowFrame, Menu_FillWindowInside and... - verified
Menu_LoadWindowPal$C2:ED08 · 41 B · EngineCopies the 8 colours of window style Menu_WinStyle (bits 0-2) from MenuRom_WindowPals (16 bytes per style) into colours 8-15 of palette row n of Menu_PalBuf, n = bits 2-4 of Menu_Unk0D47's high... - verified
Menu_RunDrawList$C2:ED31 · 40 B · EngineRuns the draw list at $FF:X: for each command byte c below $80, the MenuRom_DrawArgLens[c] + 1 bytes after it go to Menu_DrawArg0 on (an MVN, so DB = $7E while the command runs) and... - verified
Menu_DrawCmdTable$C2:ED59 · 22 B · EngineMenu_RunDrawList's command routines by byte offset: commands $00-$14 (even). - verified
Menu_CopyDrawArgsUnused$C2:ED6F · 8 B · EngineINX, then an MVN of A + 1 bytes from $FF:X to Menu_DrawArg0: the argument copy of Menu_RunDrawList as a routine. - verified
Menu_DrawCmdFill$C2:ED77 · 25 B · EngineCommand $00 (4 argument bytes): fills Menu_DrawArg0 bytes (a word, at least 3) from Menu_MapPtr with the word Menu_DrawArg2, which is also kept in Menu_TextWord. - verified
Menu_DrawPosToAddr$C2:ED90 · 26 B · EngineMenu_DrawAddr = Menu_MapPtr + row x $40 + column x 2, from Menu_DrawArg2 (column = bits 0-4, row = the high byte). - verified
Menu_DrawCmdWindow$C2:EDAA · 6 B · EngineCommand $04 (6 argument bytes): Menu_DrawCmdFrame (the frame), then Menu_FillWindowInside (with the inside size the frame left). - verified
Menu_DrawCmdFrame$C2:EDB0 · 6 B · EngineCommand $12 (6 argument bytes: style, attribute byte, position, width, height): Menu_DrawWindowSetup, then Menu_DrawWindowFrame. - verified
Menu_DrawCmdInside$C2:EDB6 · 29 B · EngineCommand $14 (6 argument bytes, as Menu_DrawCmdFrame): the inside of a window only: Menu_DrawWindowSetup, Menu_DrawInnerW = (width AND $1F) - 2, Menu_DrawInnerH = (height AND $3F) - 2... - verified
Menu_DrawWindowSetup$C2:EDD3 · 35 B · EngineThe window's first tile: Menu_Unk0D47 low byte = style x 20 (the style is Menu_DrawArg0 AND $3F when its bit 7 is set, else Menu_WinStyle AND 7; 20 tiles per style), high byte = Menu_DrawArg1 (its... - verified
Menu_DrawWindowFrame$C2:EDF6 · 45 B · EngineDraws the frame of a window at Menu_DrawAddr, Menu_DrawArg4 AND $1F tiles wide (w) and Menu_DrawArg5 AND $3F tall (h), from tile word t = Menu_Unk0D47: the top row (Menu_FrameEdgeRow: t, then t+1... - verified
Menu_FrameEdgeRow$C2:EE23 · 53 B · EngineOne edge row of the frame at Menu_DrawAddr2: tiles t, t+1, t+2 (t = Menu_FrameTile), the pair t+1 / t+2 repeated by an MVN up to column w - 2 (none when Menu_DrawInnerW is below 2), then t OR 3 at... - verified
Menu_FrameSides$C2:EE58 · 39 B · EngineMenu_DrawInnerH side rows from Menu_DrawAddr2: the left edge t (t = Menu_FrameTile) and the right edge t+1 (at + Menu_FrameRightOfs, an indirect store), (t+1) EOR 3 for the next row. - verified
Menu_FillWindowInside$C2:EE7F · 118 B · EngineFills the inside of the window at Menu_DrawAddr (from one row down and one column right: + $42), Menu_DrawInnerW tiles wide and Menu_DrawInnerH tall, with the 4 x 4 pattern Menu_WinFillPattern... - verified
Menu_WinFillPattern$C2:EEF5 · 16 B · EngineTile offsets of the window inside, 4 rows of 4 (Menu_FillWindowInside adds them to the style's first tile). - verified
Menu_DrawCmdCopyBlock$C2:EF05 · 38 B · EngineCommand $02 (6 argument bytes): copies a block of Menu_DrawArg4 tiles by Menu_DrawArg5 rows from position Menu_DrawArg0 to position Menu_DrawArg2 (both through Menu_DrawPosToAddr; Menu_DrawArg2 is... - verified
Menu_CopyMapRows$C2:EF2B · 29 B · EngineMenu_DrawInnerH times: Menu_DrawInnerW + 1 bytes from Menu_DrawAddr to Menu_DrawAddr2 (MVN in bank $7E), both moved one row ($40) down. - verified
Menu_DrawCmdString$C2:EF48 · 29 B · EngineCommand $06 (5 argument bytes): Menu_DrawString of string Menu_DrawArg0 (a word index into MenuRom_StringPtrs, strings in bank $FF) at position Menu_DrawArg2, with Menu_DrawArg4 as the count and... - verified
Menu_DrawString$C2:EF65 · 25 B · EngineDraws the string at B:Y to the tilemap at $7E:X: Menu_TextFlags = A's low byte, Menu_TextLeft = it AND $7F (tiles to put; 0: 256), Menu_DrawAddr2 = X (the line start), DB = B, Menu_DrawStringLoop... - verified
Menu_DrawStringLoop$C2:EF7E · 25 B · EngineThe string loop: a 0 byte ends it; codes $01-$0F run their Menu_TextCtrlTable routine (Menu_TextCtrl) and do not count; other bytes are put (Menu_PutChar) and counted down in Menu_TextLeft, which... - verified
Menu_PutChar$C2:EF97 · 39 B · EnginePuts tile A with attribute Menu_TextAttr at $7E:X (long stores) and X += 2. - verified
Menu_TextCtrl$C2:EFBE · 21 B · EngineRuns control code A's Menu_TextCtrlTable routine: JMP (Menu_TextVec) with the return address pushed by PER so that its RTS lands on Menu_TextCtrlRet, whose RTS returns to Menu_DrawStringLoop. - verified
Menu_TextCtrlRet$C2:EFD3 · 1 B · Engine - verified
Menu_TextCtrlTable$C2:EFD4 · 32 B · EngineMenu_TextCtrl's routine per control code $00-$0F; $00 (never dispatched: 0 ends a string) and $0D-$0F are Menu_TextCtrlRet (no effect). - verified
Menu_TextNewLine$C2:EFF4 · 17 B · EngineCode $01: Menu_DrawAddr2 (the line start) += $80 (two rows), or $40 with Menu_TextFlags bit 7 set; X = it.
Bank $C2 · $C2:F000–$FFFF
$C2:F000
Verified · 106
- verified
Menu_TextSetPos$C2:F005 · 9 B · EngineCode $02 (a word): Menu_DrawAddr2 = X = Menu_MapPtr + the word. - verified
Menu_TextSkip2$C2:F00E · 3 B · Engine - verified
Menu_TextNumber$C2:F011 · 13 B · EngineCode $03 (4 bytes: the value's address, then the Menu_DrawNumber word: flags, bank): Menu_DrawNumber at X. - verified
Menu_TextSkip4$C2:F01E · 4 B · Engine - verified
Menu_TextSubString$C2:F022 · 20 B · EngineCode $04 (a 24-bit pointer): Menu_DrawStringLoop on the string there (DB = its bank byte), sharing Menu_TextLeft. - verified
Menu_TextName$C2:F036 · 50 B · EngineCode $05 (a word): the string at $7E:word as one-row text of at most 5 tiles (Menu_TextLeft/Flags = 5 / $80 meanwhile), padded with tile $FF to 5; then Menu_TextLeft/Flags back and X = the start + 10. - verified
Menu_TextSetAttr$C2:F068 · 9 B · EngineCode $0A (a byte): Menu_TextAttr = it. - verified
Menu_TextCopyTile$C2:F071 · 28 B · EngineCode $07 (a word): the tile word at $7E:word is copied to the map at X (X += 2) and counted in Menu_TextLeft. - verified
Menu_TextBlanks$C2:F08D · 21 B · EngineCode $08 (a byte n): n tiles $FF (Menu_PutChar; 0: 65536), not counted in Menu_TextLeft. - verified
Menu_TextPalFrom$C2:F0A2 · 22 B · EngineCode $06 (a word): Menu_TextAttr's palette bits (2-4) = those of the byte at $7E:word. - verified
Menu_TextSetFlags$C2:F0B8 · 9 B · EngineCode $09 (a byte): Menu_TextFlags = it. - verified
Menu_TextHex$C2:F0C1 · 16 B · EngineCode $0B (4 bytes, as code $03): Menu_DrawHex at X. - verified
Menu_TextNumberOrBar$C2:F0D1 · 67 B · EngineCode $0C (3 bytes: a limit index k, then a word address in bank $7E): the byte there as 2 digits with leading zeros blank (Menu_DrawNumber, flags $11) while it is below MenuRom_NumLimits[k] ($63 =... - verified
Menu_DrawNumber$C2:F114 · 43 B · EngineDraws the 1-3 byte value at B:Y (B = A's high byte) in decimal at $7E:X. - verified
Menu_BinToBcd$C2:F13F · 59 B · EngineMenu_NumBcd (4 bytes, BCD) = the Menu_NumBytes-byte value at Y (lowest byte first): for each set bit, its value in BCD from Menu_BcdBitValues is added in decimal mode. - verified
Menu_BcdBitValues$C2:F17A · 96 B · Engine2^0 to 2^23 as 4-byte BCD numbers (lowest byte first), for Menu_BinToBcd. - verified
Menu_DrawBcdDigits$C2:F1DA · 49 B · EngineWith DB=$7E, draws Menu_NumDigits + 1 digits of Menu_NumBcd at Menu_NumPos (Y), highest first (from byte Menu_NumDigits / 2, its high nibble only when Menu_NumDigits is odd), with Menu_PutBcdDigit. - verified
Menu_PutBcdDigit$C2:F20B · 28 B · EnginePuts digit A AND $0F at Y (tile $D4 + digit, Menu_TextAttr), Y += 2. - verified
Menu_DrawHex$C2:F227 · 37 B · EngineDraws the 4 bytes at B:Y (B = A's high byte) in hex at $7E:X: A's low byte + 1 digits (Menu_DrawHexDigits); Menu_NumDigits/Flags = A (as a word). - verified
Menu_DrawHexDigits$C2:F24C · 29 B · EngineMenu_NumDigits + 1 hex digits of the 4 bytes at Menu_NumBcd at Y, highest first (as Menu_DrawBcdDigits, no zero blanking). - verified
Menu_PutHexDigit$C2:F269 · 20 B · EnginePuts tile Menu_HexDigitTiles[A AND $0F] with Menu_TextAttr at Y, Y += 2. - verified
Menu_HexDigitTiles$C2:F27D · 16 B · EngineThe tiles of hex digits 0-F (Menu_PutHexDigit): $73-$7C for 0-9, then $F1 $F2 $36 $7D $38 $34 for A-F. - verified
Menu_DrawClock$C2:F28D · 63 B · EngineDraws hours:minutes at $7E:X from the play-time digits at Y (minute ones, minute tens, hour ones, hour tens, then a maxed flag: three callers pass Menu_PlayTime+2, Menu_UnkD36C ($C2:D3AA) passes... - verified
Menu_ClockPair$C2:F2CC · 16 B · EngineA = byte Y+1 x 10 + byte Y (tens and ones), Y += 2; Menu_NumBcd's first byte = tens x 2. - verified
Menu_DrawItemName$C2:F2DC · 6 B · EngineMenu_ItemNamePtr for id A, then Menu_DrawString: 11 tiles of bank $CC at $7E:X (two-row text). - verified
Menu_ItemNamePtr$C2:F2E2 · 17 B · EngineY = Menu_ItemNamePtrs[A AND $FF] (a bank-$CC address), A = $CC0B (the bank and Menu_DrawString's count, 11). - verified
Menu_DrawDescText$C2:F2F3 · 63 B · EngineDraws string A of the table at $CC:2EB1 with the text-window decoder (Menu_StartDescText), unless it is the string drawn last (A = Menu_Unk0D77) and Menu_Unk0D78 bit 7 is clear: then nothing. - verified
Menu_DrawCmdSetMap$C2:F332 · 5 B · EngineCommand $08 (2 argument bytes): Menu_MapPtr = Menu_DrawArg0. - verified
Menu_DrawCmdMapRec$C2:F337 · 43 B · EngineCommand $0C (4 argument bytes): with DB=$00, fills the 8-byte record at Menu_DrawArg0 (low WRAM) as a Menu_VramRec: .Dest = Menu_DrawArg2, .Src = $9000 + (Menu_DrawArg0 AND $F0) x 8, .SrcBank and... - verified
Menu_DeadF362$C2:F362 · 2 B · EngineREP #$10 that no code reaches: Menu_DrawCmdMapRec ends with RTS before it, Menu_DrawCmdTable points at $F364, and no JSR/JMP or pointer to $F362 was found. - verified
Menu_DrawCmdCopyRom$C2:F364 · 20 B · EngineCommands $0A and $0E (2 argument bytes): copies the n bytes after the count byte n at $FF:Menu_DrawArg0 to Menu_MapPtr (MVN; n = 0: 256). - verified
Menu_DrawCmdSwapBlocks$C2:F378 · 82 B · EngineCommand $10 (6 argument bytes): swaps the block of Menu_DrawArg4 AND $1F tiles by Menu_DrawArg5 AND $3F rows at position Menu_DrawArg2 with the one at Menu_DrawArg0 (Menu_DrawArg2 is overwritten... - verified
Menu_InitSprites$C2:F3CA · 88 B · EngineSets up objects 0-6: .Id = n, .TileAttr = Menu_SprInitAttrs[n], .Anim = 0, .Dir = 1, Menu_SprLoad and Menu_SprAnimate; then object 7 gets .TileAttr = Menu_SprInitAttrs[7] and objects 7 and 8 .Id =... - verified
Menu_SprLoad$C2:F422 · 294 B · EngineLoads the definition of the object at DP: .Flags18 = 0, .PrevAnim and .LastFrame = $FF (so the next Menu_SprAnimate starts over and uploads), the banks of .FrameListPtr/.TimeListPtr = $E4... - verified
Menu_SprInitAttrs$C2:F548 · 20 B · Engine.TileAttr per object (OAM tile and attribute words: tile bits 0-8, palette bits 9-11); Menu_InitSprites reads entries 0-7, entries 8 and 9 are not read in matched code. - verified
Menu_SprDefTables$C2:F55C · 6 B · EngineBank-$E4 addresses of the definition records of kinds 0, 1 and 2 (Menu_SprLoad; $F000 and $F023 have 5-byte records, $F600 10-byte ones). - verified
Menu_SprTileCounts$C2:F562 · 4 B · Engine.TileCount by definition byte 4 bits 0-1: the frame size in units of 16 tiles (Menu_SprUploadTiles) and of 40 frame bytes (Menu_SprFrameBytes). - verified
Menu_SprResetChars$C2:F566 · 34 B · EngineObjects 6 down to 0: .Id = n, .Anim = 0, .Flags18 = $40 (animated by Menu_SprThread but not handed to Menu_SprPlaceOam). - verified
Menu_SprHideAll$C2:F588 · 31 B · EngineObjects 7 down to 0: .Id = $FF (off), .Anim = 0, .Flags18 = 0. - verified
Menu_LoadCharPalettes$C2:F5A7 · 70 B · EngineColours 1-12 of sprite palettes 1-7 (Menu_PalBuf colours $91 + 16n) from the first 7 entries of MenuRom_E4Palettes, then colours 13-15 of each from the bank-$D1 record of character n's weapon... - verified
Menu_WeaponRecSrc$C2:F5ED · 57 B · EngineFor character A: its weapon (Menu_CharRec.Unk29, the category-0 byte of Menu_EquipSlotOffsets) into Menu_LastWeapon, then X = Menu_Unk21BASrc + 6 x MenuRom_WeaponUnkIdx[weapon], the source of the... - verified
Menu_Times64$C2:F626 · 29 B · EngineY = Menu_Unk0D2C = (A AND $FF) x $40 (by the hardware multiplier), P kept, A kept for a caller with M=0 (with M=1 see Exit). - verified
Menu_StartSprThread$C2:F643 · 20 B · EngineMenu_Unk0D2E = Menu_Unk0D30 = 0 and starts Menu_SprThread in slot 5 (Menu_SprSlot). - verified
Menu_SprThread$C2:F657 · 68 B · EngineThread (slot 5): each frame, Menu_SprUploads = 0, then for objects 0-8 (DP = each page; the tenth page is not visited): skipped when .Id or .Flags18 has bit 7 set; when .Anim differs from... - verified
Menu_SprNextFrame$C2:F69B · 2 B · Engine - verified
Menu_SprAnimate$C2:F69D · 49 B · EngineSteps the animation of the object at DP. - verified
Menu_SprDir0$C2:F6CE · 3 B · Engine - verified
Menu_SprDir1$C2:F6D1 · 1 B · Engine - verified
Menu_SprDir2$C2:F6D2 · 2 B · Engine - verified
Menu_SprDir3$C2:F6D4 · 4 B · Engine - verified
Menu_SprDirTable$C2:F6D8 · 8 B · Engine - verified
Menu_SprAnimEnd$C2:F6E0 · 117 B · Engine - verified
Menu_SprFrameBytes$C2:F755 · 7 B · EngineBytes per frame record by .TileCount (40 per unit: 32 of tile list, 8 of .FrameData); entries 0, 4 and 5 are not used by the Menu_SprTileCounts values. - verified
Menu_SprUploadTiles$C2:F75C · 277 B · EngineBuilds the frame's tiles in WRAM and queues them for VRAM: Y = Menu_SprVramRec.Src = Menu_SprTileBuf ($8000) + (Menu_Unk0D72 word x 2 AND $FF00), plus 1 when bit 7 of $0D73 is set (the ASL's carry... - verified
Menu_SprPlaceOam$C2:F871 · 148 B · EnginePlaces object n's sprites (DP = its page, n = (DP - Menu_SprPages) / $40) in the OAM copy from entry 64 + 4n (Menu_SprOam + 16n): .TileCount x 4 16x16 sprites, each at the object's .ScreenX +... - verified
Menu_DrawText4bpp$C2:F905 · 7 B · EngineMenu_DrawText with TextWin_Mode = Menu_TextWinMode4bpp (low nibble 1: TextWin_Blit4bpp) instead of Menu_TextWinMode: the BRA joins it at its store (.mode). - verified
Menu_DrawText$C2:F90C · 55 B · EngineDraws the string set up in TextWin_StrIndex/StrTable into the buffer at $7E:Menu_TextDest with the text-window decoder: TextWin_Mode = Menu_TextWinMode, TextWin_GfxBuf = $7E:Menu_TextDest... - verified
Menu_CfgEntryText$C2:F943 · 111 B · EngineThe settings screen's text for entry Menu_Unk0DCE with value string Menu_Unk0DCF (strings of MenuRom_CfgTextTable): TextWin_Mode = 0, TextWin_GfxBuf's bank = $7E, TextWin_StrTable =... - verified
Menu_CfgTextThread$C2:F9B2 · 84 B · EngineA thread (slot 2, from Menu_CfgEntryText): Menu_Unk0DD0 = $80, Menu_TextDest = $4E0A, Menu_TextGlyphs and Menu_TextCol = 0, TextWin_GfxBuf and Menu_TextGfxSrc = $5E00, Menu_TextPenStart = 8... - verified
Menu_CfgValueThread$C2:FA06 · 67 B · Engine - verified
Menu_StartDescText$C2:FA49 · 86 B · EngineStarts the text-window decoder on the string the caller set up (TextWin_StrIndex / StrTable) for Menu_DescTextThread: TextWin_Mode = 0, TextWin_GfxBuf's bank = $7E, Menu_TextGlyphs and... - verified
Menu_DescTextThread$C2:FA9F · 6 B · EngineA thread (slot 2, from Menu_StartDescText): the steps (Menu_TextStepLoop), then the thread ends (Menu_ThreadEnd). - verified
Menu_TextStepWait$C2:FAA5 · 3 B · EngineThe step loop of the text threads, entered at Menu_TextStepLoop ($C2:FAA8; Menu_TextStepWait, a frame's wait first, is where it goes on after each step): TextWin_StepCount = Menu_TextSteps... - verified
Menu_TextStepLoop$C2:FAA8 · 65 B · Engine - verified
Menu_TextUpload$C2:FAE9 · 174 B · EngineAfter a decoder step, when TextWin_Unk17 (glyphs drawn) is not Menu_TextGlyphs (which takes it): Menu_TextRec (at Menu_SprScratch) = VRAM Menu_TextTileDest from $7E:Menu_TextGfxSrc, $400 bytes... - verified
Menu_PutTextTiles$C2:FB97 · 29 B · EngineY tile words from $7E:X on, a row pair as Menu_TextUpload writes them: the first word = (A AND $EF) OR $3100 (A's low byte the tile, attribute byte $31), the row below ($40 bytes on) the same with... - verified
Menu_PutTextTilesAttr$C2:FBB4 · 26 B · EngineAs Menu_PutTextTiles with A's whole word: the first word = A AND $33EF (high-byte bits 2-3 and 6-7 cleared: palette bits 0-1 and both flips, and the tile's bit 4; tile bits 8-9, palette bit 2 and... - verified
Menu_VramRecBg1Big$C2:FBCE · 7 B · EngineVRAM $5800 = $7E:2E00, $C00 bytes. - verified
Menu_VramRecBg1High$C2:FBD5 · 7 B · EngineVRAM $5800 = $7E:2E00, $800 bytes (the half before Menu_VramRecBg1Low's). - verified
Menu_VramRecBg1Rows16$C2:FBDC · 7 B · EngineVRAM $5A00 = $7E:3200, $240 bytes. - verified
Menu_VramRecClock$C2:FBE3 · 7 B · EngineVRAM $5840 = $7E:2E80, $640 bytes (queued after the clock is drawn, Menu_MainMenuLoop, and by most menu screens). - verified
Menu_VramRecBg1Low$C2:FBEA · 7 B · EngineVRAM $5C00 = $7E:3600, $800 bytes. - verified
Menu_VramRecBg1Rows24$C2:FBF1 · 7 B · EngineVRAM $5B00 = $7E:3400, $600 bytes. - verified
Menu_VramRecBg2$C2:FBF8 · 7 B · EngineVRAM $6000 = $7E:3E00 (Menu_Bg2Map), $1000 bytes. - verified
Menu_VramRecBg2B$C2:FBFF · 7 B · EngineVRAM $6040 = $7E:3E80, $680 bytes. - verified
Menu_VramRecBg2Low$C2:FC06 · 7 B · EngineVRAM $6400 = $7E:4600, $800 bytes. - verified
Menu_VramRecBg2Rows2$C2:FC0D · 7 B · EngineVRAM $6040 = $7E:3E80, $300 bytes. - verified
Menu_VramRecBg3Full$C2:FC14 · 7 B · EngineVRAM $6800 = $7E:4E00, $1000 bytes. - verified
Menu_VramRecBg3$C2:FC1B · 7 B · EngineVRAM $6800 = $7E:4E00, $680 bytes. - verified
Menu_VramRecBg3Rows4$C2:FC22 · 7 B · EngineVRAM $6880 = $7E:4F00, $480 bytes. - verified
Menu_VramRecBg3Rows3$C2:FC29 · 7 B · EngineVRAM $6860 = $7E:4EC0, $440 bytes. - verified
Menu_VramRecBg3Rows16$C2:FC30 · 7 B · EngineVRAM $6A00 = $7E:5200, $400 bytes. - verified
Menu_VramRecBg3Rows62$C2:FC37 · 7 B · EngineVRAM $6FC0 = $7E:4E00, $80 bytes. - verified
Menu_VramRecBg3Rows60$C2:FC3E · 7 B · EngineVRAM $6F80 = $7E:5D00, $100 bytes. - verified
Menu_VramRecBg3Rows58$C2:FC45 · 7 B · EngineVRAM $6F40 = $7E:5C80, $100 bytes. - verified
Menu_VramRecBg3Rows48$C2:FC4C · 7 B · EngineVRAM $6E00 = $7E:4E00, $400 bytes. - verified
Menu_VramRecUnkFC53$C2:FC53 · 7 B · EngineVRAM $7800 = $7E:6E00 (Menu_SlotLabelArea), $800 bytes: the slot labels and the three Menu_SlotTextBufs after them (queued by Menu_LoadInit and by Menu_UnkD065 at $C2:D071; the text threads send... - verified
Menu_VramRecDigits$C2:FC5A · 7 B · EngineVRAM $5740 = $7E:8E80 (Menu_ShadowTiles), $140 bytes. - verified
Menu_VramRecUnkFC61$C2:FC61 · 7 B · EngineVRAM $1800 = $7E:3600, $600 bytes (queued by Menu_NameChoiceInit, which builds the choice screen's map there from MenuRom_NameChoiceMap). - verified
Menu_VramRecRomTiles$C2:FC68 · 7 B · EngineVRAM $2010 = MenuRom_VramTiles ($FF:EB88), $480 bytes; its last byte ($FC6E) is .Size's high byte, so its .Unk7 (the byte after it, $FC6F) is the first of Menu_VramRecsFont. - verified
Menu_VramRecsFont$C2:FC6F · 16 B · EngineTwo Menu_VramRec records Menu_LoadGraphics copies into Menu_VramQueue: VRAM $0000 = Menu_TileBuf ($2000 B) and VRAM $7000 = Menu_Bg3TileBuf ($1000 B). - verified
Menu_VramRecFontB$C2:FC7F · 8 B · EngineVRAM $1000 = Menu_TileBuf, $1300 bytes (Menu_LoadGraphics step 2). - verified
Menu_VramRecObj$C2:FC87 · 8 B · EngineVRAM $4000 (the sprite tiles) = Menu_TileBuf, $800 bytes (Menu_LoadGraphics step 5). - verified
Menu_VramRecsWin$C2:FC8F · 23 B · EngineThree records Menu_LoadGraphics copies (24 bytes: the third record's unused last byte is the first byte of MenuRom_DefaultConfig, $C2:FCA6): VRAM $2010 = $FF:0000 ($1F80 B), VRAM $3000 =... - verified
MenuRom_DefaultConfig$C2:FCA6 · 3 B · EngineThe first of the 12 bytes Menu_ClearConfigAndFlags copies to Menu_Config for a new game ($84, $A0, $01; MenuRom_DefaultButtonMap follows as bytes 3-11). - verified
MenuRom_DefaultButtonMap$C2:FCA9 · 9 B · EngineBytes 3-11 of the new game's Menu_Config: the default button map as masks in the Pad_Pressed layout that Menu_PollPad builds (low byte A X L R B Y Select Start, not JOY1's: $08 is B and $02 Select... - verified
Menu_ShopBuyQtyInit$C2:FCB2 · 47 B · EngineThe count window's start for a buy: Menu_ItemCount = 1, Menu_ShopPriceHi = 0, Menu_ShopPrice and Menu_ShopUnitPrice = Menu_ShopBuyPrices[Menu_ItemId] (a word; B = 0 from the TDC for the index)... - verified
Menu_ShopSellQtyInit$C2:FCE1 · 60 B · EngineThe same for a sale: the price is the Menu_ItemInfo1 word of Menu_ItemId halved, rounded up (the LSR's carry added with the Menu_Unk51 word, expected 0), and the dividend 9,999,999 - the gold... - verified
Menu_ShopDivide$C2:FD1D · 59 B · EngineMenu_ShopQuot (3 bytes) = the 24-bit Menu_Tmp00-02 / the 16-bit Menu_ShopMulArg, the remainder in Menu_ShopRem: the dividend goes to Menu_ShopQuot+1 to +3 (two word stores; the second also writes... - verified
Menu_UnkFD58$C2:FD58 · 16 B · EngineMenu_ShopProduct = the Menu_Tmp00 word x the Menu_ShopMulLen bytes at Menu_ShopMulArg: Menu_UnkFD68 for the low byte, then the high byte (Menu_Tmp01 into WRMPYA) through the rest of Menu_UnkFD68... - verified
Menu_UnkFD68$C2:FD68 · 47 B · EngineMenu_ShopProduct (4 bytes) = 0, then for each of the Menu_ShopMulLen bytes of Menu_ShopMulArg (X from Menu_Unk51, expected 0; Y from the Menu_Unk51 word) its hardware product with Menu_Tmp00's low... - verified
Menu_ShopGainGold$C2:FD97 · 36 B · EngineThe gold (Menu_Unk2C53, 3 bytes) + Menu_ShopPrice (3 bytes); a carry out of the third byte sets it to Menu_GoldMax's ($98), never in practice (at most 9,999,999 + 99 x 65,535, a 16-bit unit price... - verified
Menu_ShopPayGold$C2:FDBB · 36 B · EngineThe gold - Menu_ShopPrice (3 bytes); a borrow sets the third byte to $98 as Menu_ShopGainGold's carry does, so paying more than the gold would leave $98xxxx (then capped at 9,999,999 or not)... - verified
Menu_ShopCapGold$C2:FDDF · 43 B · EngineCaps the gold (Menu_Unk2C53, 3 bytes) at Menu_GoldMax (9,999,999): when it is at or above it, it becomes Menu_GoldMax and X = Menu_GoldCapped (also for exactly 9,999,999, stored again); else X = 0. - verified
Menu_Mode0FList$C2:FE0A · 2 B · EngineMenu_ModeLists entry $0F: Menu_Exit alone (it never returns, so no second entry is read; the bytes after it are not a list). - verified
BankC2_OldBuildLeftovers$C2:FE0C · 500 B · EngineNot code and, as far as found, never read: tools/xref.py, run on every address of $C2:FE0C-$FFFF, finds no call or jump from matched code.
Bank $C3 · $C3:0000–$0FFF
$C3:0000
Verified · 39
- verified
BankC3_Entry0000$C3:0000 · 2 B · Enginethe bank's entry vectors, reached from other banks by JML/JSL: $0000 BankC3_Entry0000 → C3_BootModule (JML from Field_HookLeaveToBankC3 and Evt_OpFF_Misc; never returns) $0002 Decomp_ToWramVec →... - verified
Decomp_ToWramVec$C3:0002 · 6 B · Engine - verified
BankC3_Entry0008$C3:0008 · 6 B · Engine - verified
BankC3_Entry000E$C3:000E · 3 B · Engine - verified
BankC3_Entry0011$C3:0011 · 3 B · Engine - verified
C3_BootModule$C3:0014 · 99 B · EngineLeaves the field for the program packed at $C3:1313 (the bank $C3 module): points the NMI and IRQ trampolines at C3_BootNmi and C3_BootIrq, keeps the caller's A in C3_EntryArg, unpacks the module... - verified
WinFx_BuildCircle$C3:0077 · 326 B · EngineWrites a window table for a circle: one 2-byte entry per line (left edge, right edge; WinFx_EmptyEntry = nothing on that line) at WinFx_TablePtr, in bank $7F if WinFx_TableBank bit 0 is set, else $7E. - verified
WinFx_Exit$C3:01BD · 9 B · Engine - verified
WinFx_FillEmpty$C3:01C6 · 4 B · EngineFills window-table entries with WinFx_EmptyEntry: stores it at X and copies it forward with an MVN of WinFx_Tmp + 1 bytes into X + 2 on (the bank by WinFx_TableBank bit 0). - verified
WinFx_FillEmptyFrom$C3:01CA · 26 B · Engine - verified
WinFx_StepWipe$C3:01E4 · 249 B · EngineOne frame of a per-line wipe, run while WinFx_C3EMode is nonzero (Field_HookWinC3E calls it once a frame through BankC3_Entry000E and uses the result as HDMA data for window 2, probably one window... - verified
C3_RandomByte$C3:02DD · 42 B · EngineReturns a new pseudo-random byte in A and keeps it in C3_RandSeed: A (with C rotated in) plus C3_RandSeed, stored; then X's low byte, the seed, C3_FrameCount, the H counter (OPHCT; the counters... - verified
C3_ScaleBitmap$C3:0307 · 546 B · EngineDraws a scaled copy of a bitmap (one byte per pixel, bits 0-3 used, 64-byte source rows from C3Scale_SrcBase) into rows of 4-bitplane bytes, 32 bytes per output row from C3Scale_Dest. - verified
C3_BootIrq$C3:0529 · 31 B · EngineIRQ handler of the bank $C3 module, during its unpacking and after: C3_BootModule points the IRQ trampoline here, and no write to the trampolines ($0500-$0507) was found in the unpacked module... - verified
C3_BootNmi$C3:0548 · 15 B · EngineNMI handler while the module is unpacked: acknowledges the NMI (RDNMI) and sets INIDISP to full brightness, display on, ending the forced blank C3_BootIrq set at line 211 of the frame before. - verified
Decomp_ToWram$C3:0557 · 860 B · EngineUnpacks the data at Decomp_SrcBank:Decomp_Src into WRAM from Decomp_Dest, writing through WMDATA, and stores the number of bytes written in Decomp_OutLen. - verified
C3_ModuleNmi$C3:08B3 · 22 B · EngineThe module's NMI handler (C3_ModuleFrame points the NMI trampoline here when it ends): saves A, X, Y, DP and DB, runs one frame (C3_ModuleFrame), sends a pending song request (C3_SongCheck), and... - verified
C3_NmiBusy$C3:08C9 · 7 B · EngineNMI handler while C3_ModuleFrame runs (it points the NMI trampoline here first): acknowledges the NMI (RDNMI) and returns, so a frame that overruns is not re-entered. - verified
C3_ModuleFrame$C3:08D0 · 117 B · EngineOne frame of the module, from its NMI: DP = DB = 0, acknowledges the NMI, HDMA off, the NMI trampoline to C3_NmiBusy, interrupts on again if C3_EntryArg has C3_BootIrqOn, forced blank; then... - verified
C3_IrqAck$C3:0945 · 7 B · EngineAn IRQ handler that only acknowledges the IRQ (TIMEUP) and returns. - verified
C3_MulSigned$C3:094C · 80 B · EngineSigned multiply with the CPU multiplier: C3_MulA (16-bit) x C3_MulB (8-bit) into C3_MulProduct, signed. - verified
C3_CopyFEto7E$C3:099C · 4 B · EngineMVN from ROM bank $FE (C3Rom_PackPtrs' bank) to WRAM bank $7E, then RTL: copies A + 1 bytes from $FE:X to $7E:Y. - verified
C3_CopyFEto7F$C3:09A0 · 4 B · EngineAs C3_CopyFEto7E, to WRAM bank $7F. - verified
C3_SongCheck$C3:09A4 · 53 B · EngineSends a song change to the sound driver: unless C3_SongBusy is set or C3_EntryArg has bit 5 (C3_EntryNoSong), and if C3_SongReq differs from C3_SongCur, it copies the request to C3_SongCur and... - verified
C3_CopyCodeOrder$C3:09D9 · 16 B · EngineEight source offsets for C3_BuildCopyCode's outer passes: $000, $200, $100, $300, $400, $600, $500, $700 (16-bit, indexed by the pass x 2). - verified
C3_BuildCopyCode$C3:09E9 · 165 B · EngineWrites a routine through WMDATA (WMADD set by the caller): 1,024 pairs LDA abs / STA dp (each a 16-bit word, so the routine runs with M=0), with LDA #page / TCD before every 128 pairs, and a final... - verified
C3_ReadPad$C3:0A8E · 113 B · EngineThe module's pad handling, once a frame: waits for the auto-joypad read, keeps JOY1 in C3_Pad; L+R+Select+Start alone (C3_PadSoftReset) resets the game (forced blank, NMI and HDMA off, JML Reset)... - verified
C3_RunScript$C3:0AFF · 441 B · EngineRuns a script of the module from C3Script_Ptr until an opcode yields. - verified
C3_TaskListRemove$C3:0CB8 · 21 B · EngineClears the first word of C3_TaskList equal to X. - verified
C3_NmiListRemove$C3:0CCD · 21 B · EngineAs C3_TaskListRemove, for C3_NmiTaskList. - verified
C3_TaskListAdd$C3:0CE2 · 22 B · EngineStores X in the first zero word of C3_TaskList (no bound: a full list is searched past its end). - verified
C3_NmiListAdd$C3:0CF8 · 22 B · EngineAs C3_TaskListAdd, for C3_NmiTaskList (run by C3Mod_RunNmiTasks). - verified
C3_SprListSmall$C3:0D0E · 80 B · EngineAdds a list of small sprites to the OAM shadow: the list (in bank $7E at A, read through WMDATA) is a byte n + 1, then n records of tile, attribute, X, Y. - verified
C3_SprListLarge$C3:0D5E · 94 B · EngineAs C3_SprListSmall for large sprites with a 9-bit X: X = byte + C3_SprBaseX (16-bit); from $100 up it is replaced by $101 (off screen, through the word C3_OffscreenX: low byte $01, bit 15 set); a... - verified
C3_SprOneSmall$C3:0DBC · 55 B · EngineAdds one small sprite from a 4-byte record in bank $7E at X (tile, attribute, X, Y; X and Y + C3_SprBaseX / C3_SprBaseY, 8-bit) at C3_OamPos; its high-table byte (through C3_OamHiPtr) is shifted... - verified
C3_SprOneLarge$C3:0DF3 · 54 B · EngineAs C3_SprOneSmall for a large sprite: the high-table byte is always shifted right by 2 with size = 1 and X bit 8 = 0. - verified
C3_FindDivisor$C3:0E29 · 13 B · EngineCounts the divisor up until the quotient falls below C3_ScratchF4: each pass waits two NOPs, adds 1 to X, reads the quotient of the division running (RDDIVL) and starts the next one with WRDIVB =... - verified
BankC3_StaffText$C3:0E36 · 196 B · EngineASCII, lines ended by $0A (the text starts with a $0A, so its first line is empty): the staff of the jet-bike race (the module), as in the ROM ("JONNY" spelt so). - verified
WinFx_BuildQuad$C3:0EFA · 263 B · EngineWrites a window table (2 bytes per line: left edge, right edge) for the four-sided shape through WinFx_QuadPoints (X, Y bytes of points 0-3, in order) at WinFx_QuadTablePtr in bank...
Bank $C3 · $C3:1000–$1FFF
$C3:1000
Verified · 4
- verified
WinFx_QuadEdgeFlat$C3:1001 · 36 B · Engine - verified
WinFx_QuadEdge$C3:1025 · 149 B · EngineDraws one edge of WinFx_BuildQuad's shape into the table byte column WinFx_QuadTablePtr points at (left bytes, or right bytes once it was moved up by one): from (WinFx_QuadX0, WinFx_QuadY0) to... - verified
WinFx_QuadExit$C3:10BA · 6 B · Engine - verified
BankC3_EndMarker$C3:10C0 · 11 B · EngineASCII "CODE END C3" right after the kernel's last RTL ($C3:10BF, WinFx_QuadExit's, where WinFx_QuadEdge and WinFx_BuildQuad end), probably left by the build to mark the end of the code.
Bank $C3 · $C3:2000–$2FFF
$C3:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:3000–$3FFF
$C3:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:4000–$4FFF
$C3:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:5000–$5FFF
$C3:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:6000–$6FFF
$C3:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:7000–$7FFF
$C3:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:8000–$8FFF
$C3:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:9000–$9FFF
$C3:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:A000–$AFFF
$C3:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:B000–$BFFF
$C3:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:C000–$CFFF
$C3:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:D000–$DFFF
$C3:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:E000–$EFFF
$C3:E000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C3 · $C3:F000–$FFFF
$C3:F000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:0000–$0FFF
$C6:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:1000–$1FFF
$C6:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:2000–$2FFF
$C6:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:3000–$3FFF
$C6:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:4000–$4FFF
$C6:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:5000–$5FFF
$C6:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:6000–$6FFF
$C6:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:7000–$7FFF
$C6:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:8000–$8FFF
$C6:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:9000–$9FFF
$C6:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:A000–$AFFF
$C6:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:B000–$BFFF
$C6:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:C000–$CFFF
$C6:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:D000–$DFFF
$C6:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C6 · $C6:E000–$EFFF
$C6:E000
Verified · 51
- verified
C6Scene_Win1HdmaOn$C6:E000 · 40 B · EngineScript routine (pack 1 +$05C3): sets up C2Scene_HdmaTable[0] (two runs of 112 lines) as HDMA channel 1 to WH0/WH1 (indirect, two registers) and turns the channel on: the set-up part of... - verified
C6Scene_UnpackObjPackA$C6:E028 · 37 B · EngineScript routine (pack 0 +$11FD, pack 2 +$0295 and +$08A0, pack 3 +$02F8, pack 4 +$0D1D and +$112C, pack 5 +$020F and +$02BA, pack 6 +$0A15): unpacks entry C6Scene_ObjPackA of C2SceneRom_ObjPacks... - verified
C6Scene_UnpackPalPackA$C6:E04D · 37 B · EngineScript routine (pack 0 +$120D, pack 2 +$02A5 and +$08B0, pack 3 +$0308, pack 4 +$0D3D and +$113C, pack 5 +$021F and +$02CA, pack 6 +$0A25; each two script ops after an object unpack, an op $03 on... - verified
C6Scene_FadeGradInit$C6:E072 · 143 B · EngineScript routine (pack 3 +$031E): a fade from white. - verified
C6Scene_PlaceOnEdgeRandom$C6:E101 · 111 B · EngineScript routine (pack 3 +$05CB): puts the task on the edge of a shape drawn as a table of 2-byte line entries (left edge, right edge, by the use; pack 3 sets C2Tmp_10-$12 to $7E:9176 with op $13... - verified
C6Scene_Grad2Init$C6:E170 · 143 B · EngineScript routine (pack 4 +$02CE): sets up C2Scene_HdmaTable[1] (two runs of 112 lines) as HDMA channel 2 to COLDATA (indirect, one register), turns it on, points C2Scene_HdmaValues words 2-3 at... - verified
C6Scene_Grad2Ramp$C6:E1FF · 56 B · EngineScript routine (pack 4 +$039A): writes C6Scene_Grad2Init's 48-line ramp (16 down to 9, two lines each; 8 down to 1, four each) into C6Scene_Grad2 at the byte offset .Var22 (through WMDATA, bank $7E). - verified
C6Scene_GetFlagF2Bits$C6:E237 · 10 B · EngineScript routine (pack 1 +$0184): C2Tmp_00 = bits 2-5 of the copy of $7F:01F2 (C2Scene_FlagTailCopy+2) as a number 0-15, probably for the script's next test of $0000. - verified
C6Scene_WipeWinInit$C6:E241 · 61 B · EngineScript routine (pack 0 +$0FB0, pack 2 +$0442, pack 5 +$0162, pack 7 +$094E, each followed by C6Scene_WipeWinStep): sets up C2Scene_HdmaTable[1] (two runs of 112 lines) as HDMA channel 2 to WH1... - verified
C6Scene_WipeWinStep$C6:E27E · 49 B · Engine - verified
C6Scene_ClearUnk7F0062$C6:E2AF · 6 B · EngineScript routine (pack 0 +$0FE3, pack 2 +$0475, pack 3 +$0670, pack 5 +$01B2, pack 7 +$0981, each soon after a C6Scene_WipeWinStep): zeroes C6Scene_Unk7F0062 (what reads it is not traced). - verified
C6Scene_Bg3Accel$C6:E2B5 · 99 B · EngineScript routine (pack 4 +$0947 and +$0953): moves BG3 by the task's velocity, the fractions kept in .XFrac/.YFrac and the whole pixels added to C2Scene_Bg3HScroll/VScroll (as C2Scene_TaskMove does... - verified
C6Scene_Win1HdmaOnB$C6:E318 · 40 B · EngineScript routine (pack 6 +$08A1 and +$0937, each followed by C6Scene_Win1EllipseStep): a byte-identical copy of C6Scene_Win1HdmaOn (HDMA channel 1 to WH0/WH1 from C2Scene_HdmaTable[0], turned on). - verified
C6Scene_Win2HdmaOn$C6:E340 · 40 B · EngineScript routine (pack 6 +$071A and +$08DF, each followed by C6Scene_Win2EllipseStep): sets up C2Scene_HdmaTable[1] (two runs of 112 lines) as HDMA channel 2 to WH2/WH3 (indirect, two registers) and... - verified
C6Scene_Win1EllipseStep$C6:E368 · 41 B · EngineScript routine (pack 6 +$08A5, +$08B0, +$08C7, +$093B, +$0944): adds one to .Var24 (a word) and takes C2Scene_HandBufB (now odd) or C2Scene_HandBufA (even) as the table: C2Scene_HdmaValues words... - verified
C6Scene_Win2EllipseStep$C6:E391 · 39 B · Engine - verified
C6Scene_EllipseBuild$C6:E3B8 · 144 B · Engine - verified
C6Scene_Win1HdmaOnC$C6:E448 · 40 B · EngineScript routine (pack 4 +$02A3, +$1570 and +$1769, pack 5 +$0494 and +$04DE, pack 6 +$06CE, each followed by C6Scene_Win1CapsuleStep): a byte-identical copy of C6Scene_Win1HdmaOn (HDMA channel 1 to... - verified
C6Scene_Win2HdmaOnB$C6:E470 · 40 B · EngineScript routine (pack 1 +$06FA, pack 4 +$1574 and +$176D, pack 5 +$0528, each followed by C6Scene_Win2CapsuleStep): a byte-identical copy of C6Scene_Win2HdmaOn (HDMA channel 2 to WH2/WH3 from... - verified
C6Scene_Win1CapsuleStep$C6:E498 · 38 B · EngineScript routine (pack 4 +$02C2 and 14 more sites to +$17FD, pack 5 +$0498 to +$04FC (6 sites), pack 6 +$06D5 to +$06FE (4 sites)): takes C2Scene_HandBufB (.Var26 odd) or C2Scene_HandBufA (even) as... - verified
C6Scene_Win2CapsuleStep$C6:E4BE · 36 B · Engine - verified
C6Scene_CapsuleBuild$C6:E4E2 · 134 B · Engine - verified
C6Scene_FadeGradStep$C6:E568 · 27 B · EngineScript routine (pack 3 +$0339, in a loop the script runs 58 times, op $1B, with an op $32 in each pass): moves C2Scene_HdmaValues words 0 and 1 on by C6Scene_GradStepBytes (8 lines of... - verified
C6Scene_Bg2VNudge$C6:E583 · 18 B · EngineScript routine (no op $4E site found in the unpacked scripts): moves BG2 two pixels down (.Var22 bit 0 clear) or up (set): two INC or DEC of C2Scene_Bg2VScroll, 8-bit with M=1, so only its low... - verified
C6Scene_Bg1WaveInit$C6:E595 · 48 B · EngineScript routine (pack 5 +$03A1, followed by C6Scene_Bg1WaveStep): sets up C2Scene_HdmaTable[2] (two runs of 112 lines) as HDMA channel 3 to BG1VOFS (indirect, one register written twice), turns it... - verified
C6Scene_Bg1WaveStep$C6:E5C5 · 120 B · EngineScript routine (pack 5 +$03A5 and +$03AB): writes one frame of a vertical wave on BG1: picks C2Scene_SwirlSinA (.Var24 odd) or C2Scene_SwirlSinB (even), points C2Scene_HdmaValues words 4-5... - verified
C6Scene_SetUnk7F01ED$C6:E63D · 7 B · EngineScript routine (pack 4 +$115D): C2Scene_Unk7F01ED = 1 (script op $3D then skips its sound command). - verified
C6Scene_ClearUnk7F01ED$C6:E644 · 6 B · EngineScript routine (pack 4 +$06E9 and +$083A): C2Scene_Unk7F01ED = 0. - verified
C6Scene_UnpackObjPackB$C6:E64A · 37 B · EngineScript routine (pack 4 +$0D2D, between C6Scene_UnpackObjPackA and C6Scene_UnpackPalPackA): as C6Scene_UnpackObjPackA with entry C6Scene_ObjPackB of C2SceneRom_ObjPacks. - verified
C6Scene_UnpackPalPackB$C6:E66F · 37 B · EngineScript routine (pack 4 +$0D55, after C6Scene_UnpackPalPackA): as C6Scene_UnpackPalPackA with entry C6Scene_PalPackB of C2SceneRom_PalettePacks (into C2Scene_PaletteStage). - verified
C6Scene_PlaceInViewRandom$C6:E694 · 60 B · EngineScript routine (pack 4 +$0FD3 to +$1015, 7 sites): puts the task at a random point: .SprX = BG2's tile X x 8 (C2Scene_BgTileX+2) + a random 0-127 + 64, as C2Scene_PlaceBelowView; .SprY = $60 + a... - verified
C6Scene_NudgeRandomDir$C6:E6D0 · 126 B · EngineScript routine (pack 4 +$0FAA): moves the task by a random distance d (0-63) in a random direction a (0-255, C2Scene_Unk2273/Unk2277's units): .SprX + cos(a) x d / 256 and .SprY + sin(a) x d /... - verified
BankC6_UnkE74E$C6:E74E · 49 B · EngineTests the 8x8 tile (C2Tmp_00, C2Tmp_01) against a rectangle of columns C2Tmp_04 to C2Tmp_05 - 1 and rows C2Tmp_02 to C2Tmp_03 - 1 (unsigned bytes): C2Tmp_06 = 0 when the tile is inside, else bit 0... - verified
C6Scene_AddYAccel$C6:E77F · 24 B · EngineScript routine (pack 4 +$0ED9 and 10 more sites to +$10DF): adds the 16.16 value .Var22 (fraction) / .Var24 (whole) to the task's Y velocity (.YVelFrac, carrying into .YVel): C2Scene_AddGravity... - verified
BankC6_UnkE797$C6:E797 · 99 B · EngineObject A's landing check (the name is the stub's: verified C2Scene_ObjAFly calls it so; better: C6Scene_ObjANoLandHere). - verified
C6Scene_MapPicture$C6:E7FA · 205 B · EngineScript routine (pack 0 +$11F0): draws the Mode 7 picture of the two maps as C2Scene_MapDrawPixels does, but whole: zeroes C2Scene_DecompBuf ($7F:9000-$BFFF, C6Scene_PicBytes), then for each of the... - verified
C6Scene_MapCellPixels$C6:E8C7 · 72 B · EngineDraws one metatile cell as two pixels, at [C6Scene_PicOut] and 8 bytes (one pixel row) below: the colours (C2Scene_TileColors) of the metatile's top-right and bottom-right tiles, each ORed with... - verified
C6Scene_PerspInit$C6:E90F · 230 B · EngineScript routine (pack 0 +$11F7): sets up HDMA channels 2-5 to M7A, M7B, M7C and M7D (indirect, one register written twice: a word a line) from C2Scene_HdmaTable[1]-[4] (two runs of 112 lines each... - verified
C6Scene_PerspStep$C6:E9F5 · 294 B · Engine - verified
C6Scene_PerspQuadrants$C6:EB1B · 8 B · EngineC6Scene_PerspStep's fill for each sign pair (index = C2Tmp_10 bits 0-1: cos < 0, sin < 0). - verified
C6Scene_PerspTiltSteps$C6:EB23 · 24 B · EngineThe depth step t per line pair (8.8, so 0 to just under 1), read by C6Scene_PerspStep at .Tilt (a byte offset; pack 0 steps it up with op $0B and down with op $0C, e.g. +$1369, +$139B, +$1481... - verified
C6Scene_PerspQuad0$C6:EB3B · 91 B · EngineThe fills of C6Scene_PerspStep, one per quadrant (C6Scene_PerspQuad0 and the sub-entries C6Scene_PerspQuad1 ($C6:EB96), C6Scene_PerspQuad2 ($C6:EC09) and C6Scene_PerspQuad3 ($C6:EC7C), reached... - verified
C6Scene_PerspQuad1$C6:EB96 · 115 B · Engine - verified
C6Scene_PerspQuad2$C6:EC09 · 115 B · Engine - verified
C6Scene_PerspQuad3$C6:EC7C · 136 B · Engine - verified
C6Scene_PerspTail$C6:ED04 · 221 B · Engine - verified
C6Scene_PerspDivide$C6:EDE1 · 66 B · EngineThe four quotients of a line pair (WRDIV/RDDIV): C2Tmp_00 = |c| / dA, C2Tmp_02 = |s| / dA, C2Tmp_04 = -(|s| / dB), C2Tmp_06 = |c| / dB, with |c|, |s| = C2Tmp_08, C2Tmp_0A and the 8-bit divisors dA... - verified
C6Scene_AddAngle$C6:EE23 · 14 B · EngineScript routine (pack 0 +$1248 and 14 more sites to +$146F, each before C6Scene_PerspStep): .Angle (+$22) + C2Tmp_08. - verified
C6Scene_SetUnk7F00CD$C6:EE31 · 7 B · EngineScript routine (pack 2 +$09A3 and +$09AE, pack 7 +$0779, +$0A27, +$0A32, +$0A5F, +$0A6A): C2Scene_Unk7F00CD = C2Tmp_00 (8-bit; set by the script before). - verified
C6Scene_ClearUnk7F01F5Bit0$C6:EE38 · 11 B · EngineScript routine (pack 2 +$08CF): clears bit 0 of C2Scene_Unk7F01F5. - verified
BankC6_CodeEndFill$C6:EE43 · 445 B · Engine$00 fill after the last routine, up to the data from $C6:F000 on.
Bank $C6 · $C6:F000–$FFFF
$C6:F000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:0000–$0FFF
$C7:0000
Verified · 36
- verified
Audio_DriverInit$C7:0000 · 4 B · EngineThe bank's entry block: four 3-byte JMPs, each followed by a NOP. - verified
Audio_DriverCommand$C7:0004 · 4 B · Engine - verified
Audio_VecLoadNewSamples$C7:0008 · 4 B · Engine - verified
Audio_VecSendSampleDir$C7:000C · 4 B · Engine - verified
Audio_BootBlockPtrs$C7:0010 · 12 B · EngineThe six blocks Audio_Boot sends through the IPL ROM, in this order, as bank $C7 addresses. - verified
Audio_BootBlockAram$C7:001C · 12 B · EngineThe ARAM destination of each Audio_BootBlockPtrs block (sent in APUIO2/3 with the IPL ROM's transfer command). - verified
Audio_TableDirectory$C7:0028 · 16 B · EngineEight bank $C7 addresses: the tables the code below reads. - verified
Audio_Boot$C7:0038 · 264 B · EngineStarts the sound driver from nothing, through the APU's IPL ROM: 1. - verified
Audio_RunCommand$C7:0140 · 21 B · EngineRuns the command in Audio_CmdId (arguments Audio_CmdArg0-2), then clears Audio_CmdId. - verified
Audio_RunCommand_Dispatch$C7:0155 · 61 B · Engine - verified
Audio_CommandDone$C7:0192 · 15 B · Engine - verified
Audio_CmdLoadSong$C7:01A1 · 389 B · EngineCommands $10, $11, $14 and $15 (Audio_SongCmdTable): load song Audio_CmdArg0. - verified
Audio_LoadNewSamples$C7:0326 · 85 B · EngineSong load, part 2: puts each sample of Audio_NewSamples in the next free slot with Audio_UploadSample, in list order. - verified
Audio_SendSampleDir$C7:037B · 325 B · EngineSong load, part 3: sends the song's samples' directory entries and parameter words. - verified
Audio_SendSongData$C7:04C0 · 348 B · EngineSong load, part 4, and its end: 1. - verified
Audio_CmdSend$C7:061C · 57 B · EngineCommands $18-$2F and $80-$FF: sends the block to the APU as it is: APUIO3 = Audio_CmdArg2, APUIO2 = Arg1, APUIO1 = Arg0, then APUIO0 = Audio_CmdId, and reads APUIO0 up to !Audio_Timeout times for... - verified
Audio_UploadSample$C7:0655 · 200 B · EngineSends the sample in slot Audio_SaveX (Audio_SlotSample entry, 1-62) to ARAM at the slot's Audio_SlotAram address: a triples transfer (!Audio_XferTriples), retried after Audio_AbortXfer until... - verified
Audio_CmdSongAlias$C7:071D · 23 B · EngineCommands $30-$3F: replaces the whole command block with entry (command & $0F) of Audio_SongAliasTable (command $10, song = the low nibble, Arg1 = Arg2 = $FF) and sorts it again from... - verified
Audio_AdjustSongCmd$C7:0734 · 33 B · EngineSets bit 2 (!Audio_CmdListedBit) of Audio_CmdId when the command is $14 or above, or when Audio_CmdArg0 is on Audio_SongBit2List (bytes up to the first one with bit 7 set). - verified
Audio_CmdSwapSample$C7:0755 · 398 B · EngineCommand $71: puts sample Audio_CmdArg0 (1-62; not range-checked) in the slot of the current song's first sample (Audio_FirstSlot), so directory entry $20 plays it. - verified
Audio_CmdBlockVariant$C7:08E3 · 63 B · EngineCommand $70: picks the $2F00 block by Audio_CmdArg0 (0 = AudioRom_Block2F00, nonzero = AudioRom_Block2F00Alt; the battle music cues send 1 before a battle and 0 after it). - verified
Audio_UploadBlock2F00$C7:0922 · 184 B · EngineSends the $1800-byte block for ARAM !AudioAram_Block2F00: AudioRom_Block2F00 while Audio_Unk1E10 is 0, AudioRom_Block2F00Alt otherwise. - verified
Audio_SendSeq$C7:09DA · 16 B · EngineOne step of a transfer: writes A to APUIO0 and waits (no limit) until APUIO0 reads back the same value, then returns the next sequence value, (A + 1) & !Audio_SeqMask. - verified
Audio_AbortXfer$C7:09EA · 19 B · EngineCalled when the APU did not echo a header's mode in APUIO1: sends one more step with APUIO0 = Audio_Seq (waits for the echo, no limit; APUIO1-3 as the header left them) and resets Audio_Seq to... - verified
Audio_SetEchoDelay$C7:09FD · 21 B · EngineAudio_EchoDelay = A, Audio_EchoPage = !Audio_EchoTopPage - 8 x A, then Audio_DropEchoSlots. - verified
Audio_DropEchoSlots$C7:0A12 · 39 B · EngineFinds the first slot whose end (the next Audio_SlotAram entry; its high byte, the page) is on or above Audio_EchoPage and empties it and every slot after it: from there, byte by byte up to slot... - verified
Audio_StartSong$C7:0A39 · 95 B · EngineThe first part of a song load: sends the song command to the APU. - verified
Audio_SongAliasTable$C7:0A98 · 64 B · EngineAudio_CmdSongAlias: for command $30 + n, the command block it becomes (command, Arg0, Arg1, Arg2): $10, n, $FF, $FF. - verified
Audio_SongBit2List$C7:0AD8 · 1 B · EngineAudio_AdjustSongCmd's song list, ended by a byte with bit 7 set. - verified
Audio_SongCmdTable$C7:0AD9 · 16 B · EngineAudio_RunCommand_Dispatch's jump table for commands $10-$17 (JMP (T,X) with X = (command & $0F) x 2). - verified
Audio_SongCount$C7:0AE9 · 1 B · EngineThe number of songs (Audio_SongTable entries); Audio_CmdLoadSong ignores a song number not below it. - verified
Audio_SampleTable$C7:0AEA · 186 B · Engine62 long pointers, one per sample (sample n at entry n - 1; 62 is the largest number in AudioRom_SongSamples): BRR data, probably (every length is a multiple of 9, the BRR block size), a 16-bit... - verified
Audio_SampleLoop$C7:0BA4 · 124 B · EngineOne word per sample: the loop start as an offset from the sample's ARAM start (Audio_SendSampleDir and Audio_CmdSwapSample add it to get the directory entry's second word). - verified
Audio_SampleParamA$C7:0C20 · 124 B · EngineOne word per sample, sent to !AudioAram_SongParamA for the song's samples (meaning not traced on the SPC700 side). - verified
Audio_SampleParamB$C7:0C9C · 124 B · EngineOne word per sample, sent to !AudioAram_SongParamB: first byte $FF or $FE; second byte $E0 for most, otherwise $EA-$F4; the ADSR pair, probably (from the values only). - verified
Audio_SongTable$C7:0D18 · 249 B · EngineAudio_SongCount ($53) long pointers, one per song: its data, a 16-bit length first (Audio_SendSongData sends it to !AudioAram_Song).
Bank $C7 · $C7:1000–$1FFF
$C7:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:2000–$2FFF
$C7:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:3000–$3FFF
$C7:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:4000–$4FFF
$C7:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:5000–$5FFF
$C7:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:6000–$6FFF
$C7:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:7000–$7FFF
$C7:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:8000–$8FFF
$C7:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:9000–$9FFF
$C7:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:A000–$AFFF
$C7:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:B000–$BFFF
$C7:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:C000–$CFFF
$C7:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:D000–$DFFF
$C7:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:E000–$EFFF
$C7:E000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $C7 · $C7:F000–$FFFF
$C7:F000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:0000–$0FFF
$CC:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:1000–$1FFF
$CC:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:2000–$2FFF
$CC:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:3000–$3FFF
$CC:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:4000–$4FFF
$CC:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:5000–$5FFF
$CC:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:6000–$6FFF
$CC:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:7000–$7FFF
$CC:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:8000–$8FFF
$CC:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:9000–$9FFF
$CC:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:A000–$AFFF
$CC:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:B000–$BFFF
$CC:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:C000–$CFFF
$CC:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:D000–$DFFF
$CC:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CC · $CC:E000–$EFFF
$CC:E000
Verified · 5
- verified
Battle_InitUploadStep$CC:E000 · 558 B · Battle engineOne stage of the battle's opening VRAM uploads, run once per call while !Battle_InitUploadStage is 1-3 (each stage counts it up; 0 and 4 on do nothing). - verified
Battle_InitUploadObjTiles$CC:E22E · 98 B · Battle engineSends the first two 64-byte pieces of !BattleRom_ObjTilePieces (the four pieces bank $C0's Field_UploadUnk0000 sends) to VRAM $0000 and $0100 over DMA channel 7, which it first sets itself to mode... - verified
Battle_InitUploadObjTilesDead$CC:E290 · 84 B · Battle engineNever reached (no call or jump to it was found; Battle_InitUploadObjTiles returns just before it): the uploads of pieces 3 and 4 of !BattleRom_ObjTilePieces to VRAM $0060 and $0160 (bank $C0 sends... - verified
Battle_InitScene$CC:E2E4 · 2,723 B · Battle engineBattle set-up: the scene ($CC:E2E4–$CC:F06A) - verified
Battle_InitSceneGfx$CC:ED87 · 732 B · Battle engineThe fourth step of BattleSys_SceneSetup: sprite and tile set-up, then the VRAM uploads.
Bank $CC · $CC:F000–$FFFF
$CC:F000
Verified · 9
- verified
Battle_ReencodeText$CC:F063 · 8 B · Battle engineRe-encodes the text in !BattleMsg_TextTiles into its two tile rows: BankC1_LongDispatch entry 0 (BattleMsg_ReencodeTextBuffer) through the bank-$C1 vector, with A = 0. - verified
BattleAct_ResetState$CC:F06B · 151 B · Battle engineAction helpers ($CC:F06B–$CC:F364) - verified
BattleAct_ResetFxApplied$CC:F102 · 14 B · Battle engineSets !Battler_FxApplied of all 11 battler slots to !Battle_FxAppliedStale ($55, a value no effect has), so the next effect picked is applied again. - verified
Battle_BuildOccupiedCellMap$CC:F110 · 70 B · Battle engineCopies !Battle_CellMap to !Battle_PathMap (MVN, 256 B) and marks with !Battle_CellBlocked ($40) the cell under each present battler ((y & $F0) | x / 16). - verified
BattleAct_BuildBattlerList$CC:F156 · 145 B · Battle engineBuilds the action's battler lists from the action block: !Battle_ActBattlers = caster, !Battle_ActUnkAE97, !Battle_ActUnkAE98 (for a PC caster a negative one becomes one of the other two PCs... - verified
BattleAct_StepPalettes$CC:F1E7 · 145 B · Battle engineSteps the four palette sequences: for each one on, counts its timer down; at 0 reloads it from the delay, moves the step on (back to the first entry past the last) and copies the entry's colour... - verified
BattleAct_TickUnkA1A8$CC:F278 · 49 B · Battle engineFor the 8 object threads: counts down !Battle_ActObjAnimTimer of each whose !Battle_ActUnkA1A8 is set; then runs BattleAct_StepObjAnim for each set one whose timer is 0. - verified
BattleAct_StepObjAnim$CC:F2A9 · 188 B · Battle engineMoves object thread DP $80 to the next record of its object list: the record (4 B in bank $CE, BattleRom_ActObjRec) is entry !Battle_ActObjAnimEntry + 1 of the facing's block (facing *... - verified
Battle_Mul8CC$CC:F365 · 30 B · Battle engineA byte-identical copy of Battle_Mul8 ($C1:0089): 8×8→16 hardware multiply through WRMPYA/WRMPYB/RDMPYL.
Bank $CD · $CD:0000–$0FFF
$CD:0000
Verified · 89
- verified
BattleSys_VecCD0000$CD:0000 · 3 B · Battle systemThe bank's entry block: 19 three-byte JMPs, all but two ($000F and $001E, see the Callers note) reached by JSL from other banks (their targets end in RTL). - verified
BattleSys_VecCD0003$CD:0003 · 3 B · Battle system - verified
BattleSys_VecCD0006$CD:0006 · 3 B · Battle system - verified
BattleSys_FrameTickVec$CD:0009 · 3 B · Battle system - verified
BattleSys_VecCD000C$CD:000C · 3 B · Battle system - verified
BattleSys_VecCD000F$CD:000F · 3 B · Battle system - verified
BattleSys_VecCD0012$CD:0012 · 3 B · Battle system - verified
BattleAnim_LoadGfx4Vec$CD:0015 · 3 B · Battle engine - verified
BattleAnim_UnkVecCD0018$CD:0018 · 3 B · Battle engine - verified
BattleAct_UnkVecCD001B$CD:001B · 3 B · Battle engine - verified
BattleSys_VecCD001E$CD:001E · 3 B · Battle system - verified
BattleSys_UnkVecCD0021$CD:0021 · 3 B · Battle system - verified
BattleSys_VecCD0024$CD:0024 · 3 B · Battle system - verified
BattleMsg_ShowFromTableCC3A09Vec$CD:0027 · 3 B · Battle text & numbers - verified
BattleAnim_LoadGfx2Vec$CD:002A · 3 B · Battle engine - verified
BattleMsg_ShowMsg0BIfKeyChangedVec$CD:002D · 3 B · Battle text & numbers - verified
BattleMsg_UnkVecCD0030$CD:0030 · 3 B · Battle text & numbers - verified
BattleMsg_UnkVecCD0033$CD:0033 · 3 B · Battle text & numbers - verified
BattleSys_IdleVecCD0036$CD:0036 · 3 B · Battle system - verified
BattleCD_EnterBattle$CD:0039 · 5 B · Battle engineThe bank-$CD step of the battle's start: JSL BattleFx_Init ($D1:F1B0: it sets DB=$7E and DP=0, installs JML $D1:E77C / JML $D1:FE97 (BattleFx_Nmi / BattleFx_Irq) as the NMI and IRQ trampolines at... - verified
BattleCD_ActOp80$CD:003E · 5 B · Battle engineAction opcode $80's long call (BattleAct_OpRunVecCD001B, after it copied its operand bytes to !Battle_ActOp80Args): JSL BattleFx_Op80Dispatch ($D1:F67A), then RTL. - verified
BattleCD_EnemyDissolve$CD:0043 · 93 B · Battle engineTakes an enemy off the screen, for BattleCF_RemoveMarkedEnemies (A = its battler slot, after that moved it to the special palette). - verified
BattleCD_EnemyDissolveFx$CD:00A0 · 106 B · Battle engine - verified
BattleCD_DissolveStep$CD:010A · 147 B · Battle engineOne step of BattleCD_EnemyDissolve: advances !Battle_DissolvePhase by the !BattleRom_DissolvePhaseStep entry !Battle_DissolvePattern & 7 ($17 for the pattern 7 the dissolve uses: odd, so 64 steps... - verified
BattleCD_MsgTimeTable$CD:019D · 8 B · Battle engineFrames a battle message stays up, by the message-speed setting (BattleCD_GetMsgTime: bits 3-5 of config byte $2991): $20, $40, ..., $E0, then $FF. - verified
BattleCD_GetMsgTime$CD:01A5 · 14 B · Battle engineA = BattleCD_MsgTimeTable entry by bits 3-5 of !Menu_Config+1: the frames a message stays up at the configured speed (inferred from the uses: BattleCD_ShowMessage waits that long, the others load... - verified
BattleCD_ShowMessage$CD:01B3 · 87 B · Battle engineShows battle message A (string A of !BattleRom_MsgStrings, its arguments at $0200, BattleMsg_InfoArgs / !Battle_MsgArg0) and waits for it: plays the message's sound (BattleFx_MsgSfx entry A... - verified
BattleCD_Wait16Frames$CD:020A · 11 B · Battle engineWaits 16 frames (BattleCD_WaitFrameRefresh 16 times). - verified
BattleCD_ShowMessageTimed$CD:0215 · 32 B · Battle engineAs BattleCD_ShowMessage without the sound and without waiting: starts message A of !BattleRom_MsgStrings (BattleCD_StartText, BattleCD_ShowText), loads !Battle_MsgTimer with BattleCD_GetMsgTime... - verified
BattleCD_ClearTextGfxL$CD:0235 · 4 B · Battle engineBattleCD_ClearTextGfx as a long call (JSL from BattleFx_Init at $D1:F3FE). - verified
BattleCD_ClearTextGfx$CD:0239 · 37 B · Battle engineZeroes the message graphics buffer !Battle_TextGfxBuf ($7E:B400-$B7FF, $400 bytes) by words: eight stores per pass, each covering one $80-byte eighth of it, for X = $80 down to 2. - verified
BattleCD_StartText$CD:025E · 33 B · Battle engineStarts string A of the table the caller put in TextWin_StrTable: TextWin_StrIndex = A, !Battle_MsgTiming = 0, !Battle_TextUnkA1 = 0, TextWin_GfxBuf = !Battle_TextGfxBuf (bank $7E), TextWin_Mode =... - verified
BattleCD_ShowText$CD:027F · 22 B · Battle engineDraws the started string: TextWin_StepCount = A (the callers pass !BattleCD_TextStepCount from BattleCD_StartText), one TextWin_Step (through BankC2_Entry0009), two BattleCD_WaitFrame, then... - verified
BattleCD_ShowScriptMessage$CD:0295 · 54 B · Battle engineAn enemy script's message (the run handlers pass a script byte in A: most pass !Battle_UnkB3C7; BattleAi_RunTech, BattleAi_RunSetFlags and BattleAi_RunMessage pass one read straight from the... - verified
BattleCD_ShowEnemyInfo$CD:02CB · 13 B · Battle engineThe battle menu's info panel for the highlighted enemy target (BattleMenu_UpdateCursorOverlay; BattleMenu_ChooseAttack also calls BattleCD_ShowTargetInfo): A = a key, the target slot... - verified
BattleCD_ShowTargetInfo$CD:02D8 · 56 B · Battle engine - verified
BattleCD_ShowTechInfo$CD:0310 · 48 B · Battle engineThe info panel for the tech (or item) under the menu cursor: A = the key, string A of !BattleRom_TechInfoStrings. - verified
BattleCD_PadRepeat$CD:0340 · 89 B · Battle engineTurns the held buttons into presses with auto-repeat, once a frame (BattleCD_NmiMain runs it on both its paths, after BankC2_Entry8002 read the pad), all 16-bit: !Battle_PadPrev = the last frame's... - verified
BattleCD_SetNmiMode1$CD:0399 · 5 B · Battle engine!Battle_NmiMode = 1: from the next NMI, BattleCD_NmiDispatch runs BattleCD_NmiMain instead of BattleCD_NmiSetup (service 0's first bank-$CD step). - verified
BattleCD_ApuCmd81$CD:039E · 22 B · Battle engineSends APU command !Audio_CmdUnk81 with arguments !BattleCD_Cmd81Arg1 and 0 (Audio_ProcessEntry; the field's AudioFadeDispatch sends the same command with other arguments around its music changes... - verified
BattleCD_ExitBattle$CD:03B4 · 150 B · Battle engineThe bank-$CD part of the battle's end (BattleCF_ExitBattle runs it just before it returns to the field). - verified
BattleCD_WaitNmiAck$CD:044A · 9 B · Battle engineDP $47 = 1, then waits until something else sets it back to 0 (at both call sites the NMI handler is BattleFx_NmiAlt, which BattleCD_ExitBattle installs just before and which zeroes DP $47). - verified
BattleCD_EndLayerFx$CD:0453 · 83 B · Battle engineEnds a layer effect (BattleCD_FrameTick runs it when the effect is done, !Battle_BgFxEnded set, and no action runs; BattleCD_ExitBattle when one is still loaded): puts layer 3's tiles back (the... - verified
BattleCD_IdleTick$CD:04A6 · 4 B · Battle engineBattleSys_PumpFrames' long call while it waits for the frame: BattleCD_PauseWait, RTL. - verified
BattleCD_FrameTick$CD:04AA · 53 B · Battle engineThe bank's per-frame work outside the NMI (BattleSys_FrameTickVec, and JSL from this bank's own waits): unless !Battle_Paused, the pending sound (BattleCD_PlayPendingSfx); BattleCD_PauseWait... - verified
BattleCD_StepText$CD:04DF · 30 B · Battle engineWhen !Battle_TextStepping is set: one TextWin_Step (through BankC2_Entry0009) with TextWin_StepCount = 1; !Battle_TextStepping = TextWin_Status after it (0 once the string is done, so the stepping... - verified
BattleCD_StartOpenWipe$CD:04FD · 25 B · Battle engineService 0's start of the opening wipe: sound !BattleCD_SfxWipe (BattleCD_ApuCmd18, X = !BattleCD_SfxArgCentre), a frame, !Battle_WipeSteps = !BattleCD_WipeSteps and !Battle_WipeMode =... - verified
BattleCD_StartCloseWipe$CD:0516 · 30 B · Battle engineThe battle end's closing wipe: !Battle_UnkCE16 = 1, a frame, !BattleFx_CeSetBase = !BattleCD_CA25Unk0C and !BattleFx_CeSetReload + 1, a frame, !Battle_WipeSteps = !BattleCD_WipeSteps... - verified
BattleCD_WipeRunning$CD:0534 · 8 B · Battle engineA = 1 while a wipe has steps left (!Battle_WipeSteps non-zero), else 0; Z set iff 0 (BattleSys_SceneSetup and BattleCD_ExitBattle loop on it). - verified
BattleCD_WipeStepOpen$CD:053C · 59 B · Battle engineOne step of the opening wipe in all nine tables: entry 1's line count - 1, entry 2's + 2, entry 3's - 1; then the entry-2 data addresses of tables 5 and 3 (!Battle_HdmaTables+$E8 and +$8E) - 4. - verified
BattleCD_WipeStepClose$CD:0577 · 59 B · Battle engineThe opposite step: entry 1's line count + 1, entry 2's - 2, entry 3's + 1 in all nine tables; tables 3 and 5's entry-2 data addresses + 4. - verified
BattleCD_StepWipe$CD:05B2 · 77 B · Battle engineOne step of the wipe in progress (BattleCD_NmiMain runs it twice a frame), by !Battle_WipeMode: - 0: nothing; - !BattleCD_WipeOpen ($FF, set by BattleCD_StartOpenWipe): first !BattleFx_CeSetBase =... - verified
BattleCD_TileUploadVram$CD:05FF · 8 B · Battle engineVRAM word addresses for BattleCD_NmiUploadText's tilemap-page upload, by !Battle_TilePageSlot * 2: $7C00, $7C10, $7E00, $7E10. - verified
BattleCD_NmiUploadText$CD:0607 · 171 B · Battle engineBattleCD_NmiMain's uploads while no wipe runs: - a tilemap page requested by the layer-effect script (!Battle_TilePageReq, set by BattleCD_RunFxScript): unless it is the same slot... - verified
BattleCD_ZeroWord$CD:06B2 · 2 B · Battle engineThe fixed DMA source BattleCD_NmiUploadText clears VRAM from. - verified
BattleCD_NmiLayerScroll$CD:06B4 · 8 B · Battle engineRuns the BattleCD_ScrollModeTable entry !Battle_LayerFxMode (0-3; set to 0 or 1 by BattleCD_StepFxChannels and 0 by BattleCD_EndLayerFx; who sets 2 and 3 is not traced): the HDMA scroll data for... - verified
BattleCD_ScrollModeTable$CD:06BC · 8 B · Battle engineBattleCD_NmiLayerScroll's handlers by !Battle_LayerFxMode. - verified
BattleCD_ScrollPlain$CD:06C4 · 66 B · Battle engineFills the HDMA scroll data of layers 1-3 (!Battle_HdmaScroll1-3, 32 entries of 4 bytes, an x and a y word, each) with one x/y pair per layer: FieldBtlPpu.Scroll2's words (the battle's layer... - verified
BattleCD_ScrollFill$CD:0706 · 102 B · Battle engine - verified
BattleCD_ScrollFxBg3$CD:076C · 77 B · Battle engineAs BattleCD_ScrollPlain, but layer 3's pair is the effect's scroll: !BattleFx_ShakeX + !Battle_FxScrollAddX + !Battle_ShakeOfs3X and !BattleFx_ShakeY + !BattleFx_BounceOut + !Battle_ShakeOfs3Y... - verified
BattleCD_ScrollWavesBg3$CD:07B9 · 41 B · Battle engineBattleCD_ScrollWaves, then a second run of 32 entries for layer 3 only (X from $80 up to the 8-bit wrap): x = layer 3's x pair, plus the per-line offset in !Battle_WaveOffsets (the same X) when... - verified
BattleCD_ScrollWaves$CD:07E2 · 171 B · Battle engineThe pairs as BattleCD_ScrollFxBg3 computes them (in DP $45-$4F); then for each of the 32 entries the x of a layer gets the entry's per-line offset from !Battle_WaveOffsets (bank $7E, by the... - verified
BattleCD_NmiMain$CD:088D · 321 B · Battle engineThe NMI's work in modes 1 and 2 (BattleCD_NmiDispatch), entered with DB=$00: - with !Battle_CgramPending ($7E:CE0F) set: the palette (BattleCD_UploadCgram), DB=$7E, the queued VRAM upload... - verified
BattleCD_UploadCgram$CD:09CE · 35 B · Battle engineCopies the whole palette, !Battle_CgramBytes bytes of !Battle_PaletteLiveLo (bank $7E), to CGRAM from colour 0 by DMA on channel 7 (one register written twice: CGDATA). - verified
BattleCD_NmiSetup$CD:09F1 · 237 B · Battle engineThe NMI's work in mode 0 (the first frames, until BattleCD_SetNmiMode1): the palette (BattleCD_UploadCgram); HDMA channels 0-6 set up as indirect channels on the first seven tables of... - verified
BattleCD_TickCDC9$CD:0ADE · 16 B · Battle engineWhile FieldAnimB[0].Unk4 (palette animation record 0's frame counter) is 0: !BattleFx_GradStart counts down and wraps from below 0 to !BattleCD_CDC9Period (a 14-frame cycle, 13 down to 0... - verified
BattleCD_SetWh0Table$CD:0AEE · 40 B · Battle enginePoints HDMA channel 7 at one of the last two tables of !Battle_HdmaTables (indirect, 4 registers from WH0, line data in bank $7E): table 8 on odd frames of !Battle_FrameCount, table 7 on even ones... - verified
BattleCD_RandByte$CD:0B16 · 8 B · Battle engineA = RandomTable entry (A + !Battle_FrameCount + C) & $FF: a byte of the field's random table picked by the frame count. - verified
BattleCD_ClampPalAnims$CD:0B1E · 51 B · Battle engineWith !Battle_Unk99D2 positive and non-zero: for each of the palette animation records 8-11 (FieldAnimB, 12 bytes each, the ones the battle fills) with a kind (.Unk0 non-zero) and a first colour... - verified
BattleCD_StepShake$CD:0B51 · 306 B · Battle engineThe screen shake, once a frame, for two axes: - x (!Battle_ShakeXOn): every !Battle_ShakeXRandPeriod frames a new random byte (BattleCD_RandByte) in !Battle_ShakeXRand; every... - verified
BattleCD_NmiTable$CD:0C83 · 6 B · Battle engineBattleCD_NmiDispatch's handler by !Battle_NmiMode. - verified
BattleCD_ScrollStepL$CD:0C89 · 12 B · Battle engineThe field's ScrollStepAccum (through ReentryVectors vector [1]: the drift of layers 2 and 3 in FieldBtlPpu.Scroll2) between PHB/PHD/PHP and PLP/PLD/PLB, then A = D (TDC) and RTL. - verified
BattleCD_NmiDispatch$CD:0C95 · 8 B · Battle engineThe NMI's bank-$CD work: runs BattleCD_NmiTable entry !Battle_NmiMode (0 BattleCD_NmiSetup, 1 and 2 BattleCD_NmiMain), then RTL. - verified
BattleCD_InitHdmaDataL$CD:0C9D · 4 B · Battle engineBattleCD_InitHdmaData as a long call (JSL from BattleFx_Init at $D1:F1DB). - verified
BattleCD_InitHdmaData$CD:0CA1 · 85 B · Battle engineSets the HDMA line data from the screen the field left (FieldBtlPpu): the tilemap bytes of channel 0 (!Battle_HdmaTilemaps: BG1SC, BG2SC, BG4SC from .Tilemap1, .Tilemap2, .Unk59; BG2SC's bit 0... - verified
BattleCD_RestoreScreen$CD:0CF6 · 50 B · Battle engine - verified
BattleCD_StartLayerFx$CD:0D28 · 11 B · Battle engineAction set-up's call (BattleAct_LoadCommon, A = !Battle_ActUnkArg987C): !Battle_Unk5D9B = 0, loads layer effect A (BattleCD_LoadLayerFx) and starts its channels (BattleCD_StartFxChannels); RTL. - verified
BattleCD_StartFxChannels$CD:0D33 · 47 B · Battle engineClears the three 32-byte channel blocks from !Battle_FxChannels ($CA32-$CA91, by words), then starts channel 0 (X = 0) with script !Battle_FxScriptIds+0 and channel 1 (X = $10) with +1, each... - verified
BattleCD_RunEndFx$CD:0D62 · 49 B · Battle engineThe battle end's effect X (BattleCD_LayerFx84 / BattleCD_LayerFx87): APU command !BattleCD_ApuCmd80 (arguments 0, $FF), a frame, then !Audio_CmdPlayMusic with !BattleCD_EndSong (bank $C7 loads... - verified
BattleCD_LayerFx87$CD:0D93 · 30 B · Battle engineOne of the battle end's effects (BattleCD_ExitBattle): !Battle_Unk99D2 = 0, BattleCD_ApuCmd81, frames until APUIO1 reads 0, effect !BattleCD_FxEnd87 (BattleCD_RunEndFx), then frames until... - verified
BattleCD_LayerFx84$CD:0DB1 · 73 B · Battle engineThe other end effect: BattleCD_ApuCmd81, frames until APUIO1 reads 0, !BattleFx_GradTickMask = 3, !BattleFx_GradForce = $80; the wait below once; 128 more frames; effect !BattleCD_FxEnd84... - verified
BattleCD_WaitLayerFxIdle$CD:0DFA · 11 B · Battle engineWaits (BattleCD_WaitFrameRefresh) while !Battle_Unk5D9B is set. - verified
BattleCD_RunLayerFx$CD:0E05 · 30 B · Battle engineRuns layer effect A to its end: waits for the one before (BattleCD_WaitLayerFxIdle), loads A (BattleCD_LoadLayerFx), starts its channels, !Battle_Unk5D9B + 1, then frames... - verified
BattleCD_RestorePalRows$CD:0E23 · 18 B · Battle engineCopies the 16 bytes at !Battle_PalRowSave (colours 24-31, saved by BattleFx_Init) back to bytes $30-$3F of both !Battle_PaletteSavedLo and !Battle_PaletteLiveLo. - verified
BattleCD_FxRecSetup$CD:0E35 · 44 B · Battle engineShared start of BattleCD_LoadFxPalA/B: the palette rows back (BattleCD_RestorePalRows); DP $55 = 1 when FieldBtlPpu.ColorMath bit 6 (!BattleCD_CgadsubHalf, half colour math, if it is a CGADSUB... - verified
BattleCD_LoadFxPalA$CD:0E61 · 24 B · Battle engineUnless the half-colour-math flag of BattleCD_FxRecSetup (DP $55) is set: copies 8 bytes of !BattleRom_FxRecA (from the setup's offset X) to !Battle_PalAnimRec10+1, !Battle_PalAnimRec10 = DP $53... - verified
BattleCD_LoadFxPalB$CD:0E79 · 36 B · Battle engine - verified
BattleCD_LayerFxSetsScreen$CD:0E9D · 32 B · Battle engineC=0 and A = 0 when the current layer effect (!Battle_LayerFxId) is !BattleCD_FxPlain86 or !BattleCD_FxPlainFirst-!BattleCD_FxPlainLast ($7B-$7F); else C=1 with A = the id. - verified
BattleCD_LoadLayerFx$CD:0EBD · 327 B · Battle engineLoads layer effect X (0-$FF; X = !BattleCD_FxByBattle stays when !Battle_UnkA018 is 7, else becomes +1 when !Battle_UnkA017 is 7, else +2: a variant by the battle, probably): - !Battle_LayerFxId =...
Bank $CD · $CD:1000–$1FFF
$CD:1000
Verified · 116
- verified
BattleCD_LoadLayerFx_colours$CD:1004 · 78 B · Battle engine - verified
BattleCD_FillFxTilemaps$CD:1052 · 43 B · Battle engineFills the effect's tilemap pages !Battle_FxTilemaps ($7E:D000-$FFFF) with the entry !BattleCD_FxBlankEntry (tile $EE, attribute 0), by words: .fill (JSR'd with X = 0 and $1000, run with X = $2000)... - verified
BattleCD_BuildFxTilemap$CD:107D · 315 B · Battle engineBuilds the effect's tilemap pages into !Battle_FxTilemaps, one page of $200 bytes per block, !Battle_FxRecord's low 6 bits of blocks (the count byte is cut to them), from map !Battle_FxRecMap on... - verified
BattleCD_LoadFxRecord$CD:11B8 · 44 B · Battle engineCopies the 6-byte !BattleRom_FxRecords entry X & $7FFF to !Battle_FxRecord ($C9FC-$CA01: the block count byte, the tile set, the first map word, !Battle_FxRecUnkCA00 and the rows per block), using... - verified
BattleCD_LoadFxTiles$CD:11E4 · 53 B · Battle engineBuilds one set of 64 2bpp tiles (16 bytes each, $400 bytes) in !Battle_ActFrameBuf ($7E:2D00, from Y = 0): the set's 64 entry words are at $CF:8000 + X * 64 (DP $53-$55); each names a source tile... - verified
BattleCD_TileHandlers2$CD:1219 · 8 B · Battle engineBattleCD_LoadFxTiles' tile copiers by the entry's flip bits (bit 14 = 2, bit 15 = 4). - verified
BattleCD_TileVHFlip2$CD:1221 · 8 B · Battle engineA 2bpp tile flipped both ways: BattleCD_TileVFlip2 at Y, then the horizontal flip of BattleCD_TileHFlip2 (JMP BattleCD_TileReverse2) at the same Y. - verified
BattleCD_TileVFlip2$CD:1229 · 76 B · Battle engineA 2bpp tile flipped vertically: BattleCD_TileCopy2, then the eight row words swapped end for end (row 0 with 7, 1 with 6, ...), using DP $69. - verified
BattleCD_TileHFlip2$CD:1275 · 5 B · Battle engineA 2bpp tile flipped horizontally: BattleCD_TileCopy2, then its 16 bytes at Y through BitReverseTable (each byte's bits reversed: the row mirrored), 4 a pass with the count in DP $61. - verified
BattleCD_TileReverse2$CD:127A · 62 B · Battle engine - verified
BattleCD_TileCopy2$CD:12B8 · 72 B · Battle engineCopies the entry's 2bpp tile: 16 bytes from $CF:0000 + (entry AND $1FFF) * 8 (!BattleRom_FxTileGfx) to !Battle_ActFrameBuf + Y, a word at a time (in the order 0, 8, 2, $A, ...), then Y + 16. - verified
BattleCD_PlaneMasks$CD:1300 · 8 B · Battle engineMasks for the upper two bit planes of a 4bpp tile built from a 2bpp one (BattleCD_Tile4Planes): by a 2-bit value, none, plane 2, plane 3, both (the pixels' colour + 0, 4, 8 or 12). - verified
BattleCD_FxGfxVram$CD:1308 · 12 B · Battle engineVRAM word addresses of the six graphics parts BattleCD_LoadFxGfx2/4 upload, $400 bytes each: $0C00, $0E00, ..., $1600. - verified
BattleCD_LoadFxGfx2$CD:1314 · 15 B · Battle engineLoads the action's graphics sets (BattleAct_LoadCommon, A = !Battle_ActGfxSetB): sets A and A+1 as parts 4 and 5. - verified
BattleCD_LoadFxGfx4$CD:1323 · 69 B · Battle engine - verified
BattleCD_ConvertFxGfx$CD:1368 · 98 B · Battle engineBuilds DP $67 (the callers pass 32) 4bpp tiles of graphics set X in !Battle_ActFrameBuf from Y = 0: the set's entry words are at !BattleRom_FxGfxLists + X * 64 (DP $53-$55, bank $CF); the set's... - verified
BattleCD_PickPlaneBits$CD:13CA · 10 B · Battle engineA = 2 * the 2-bit field (DP $5B AND 6) / 2 of the colour byte in DP $5D, through BattleCD_FieldShifts (a JMP into the shift chain BattleCD_ShiftField6, whose RTS returns for it). - verified
BattleCD_FieldShifts$CD:13D4 · 8 B · Battle engineBattleCD_PickPlaneBits' entry points into the shift chain: field 0 (bits 0-1, no shift), 1 (bits 2-3), 2 (bits 4-5), 3 (bits 6-7). - verified
BattleCD_ShiftField6$CD:13DC · 2 B · Battle engineA = (A >> 6 AND 3) * 2; the entries BattleCD_ShiftField4 ($13DE), BattleCD_ShiftField2 ($13E0) and BattleCD_ShiftField0 ($13E2) shift 4, 2 and 0 bits before the same AND and ASL. - verified
BattleCD_ShiftField4$CD:13DE · 2 B · Battle engine - verified
BattleCD_ShiftField2$CD:13E0 · 2 B · Battle engine - verified
BattleCD_ShiftField0$CD:13E2 · 4 B · Battle engine - verified
BattleCD_TileHandlers4$CD:13E6 · 8 B · Battle engineBattleCD_ConvertFxGfx's tile builders by the entry's flip bits (bit 14 = 2, bit 15 = 4). - verified
BattleCD_Tile4VHFlip$CD:13EE · 8 B · Battle engineA 4bpp tile flipped both ways: BattleCD_Tile4VFlip at Y, then the horizontal flip (JMP BattleCD_TileReverse4) at the same Y. - verified
BattleCD_Tile4VFlip$CD:13F6 · 79 B · Battle engineA 4bpp tile flipped vertically: BattleCD_Tile4Copy, then the eight row words of planes 0-1 swapped end for end (.rows, JSR'd), and those of planes 2-3 (.rows again, falling in, at Y + 16), using... - verified
BattleCD_Tile4HFlip$CD:1445 · 5 B · Battle engineA 4bpp tile flipped horizontally: BattleCD_Tile4Copy, then its 32 bytes through BitReverseTable, 4 a pass (DP $61 counts 8 passes). - verified
BattleCD_TileReverse4$CD:144A · 62 B · Battle engine - verified
BattleCD_Tile4Planes$CD:1488 · 129 B · Battle engineOne 4bpp tile from a 2bpp one: for each of the 8 row words w at !BattleRom_FxGfxSrc + X (bank $D0): planes 0-1 = w, and planes 2-3 (16 bytes on) = (w with its bytes swapped OR w) AND the plane... - verified
BattleCD_Tile4Copy$CD:1509 · 204 B · Battle engineBuilds the entry's 4bpp tile at Y from !BattleRom_FxGfxSrc + (entry AND $1FFF) * 8 (the entry word is kept in DP $65): - entry bit 13 set: BattleCD_Tile4Planes (a 2bpp source); - clear... - verified
BattleCD_StartFxChannel$CD:15D5 · 52 B · Battle engineStarts channel X (0 or $10) on script A: the pointer from !BattleRom_FxScriptPtrs entry A (bank $D1, through DP $53-$55), the period = its first byte AND $0F, the countdown + 1 (from 0: the first... - verified
BattleCD_StepFxChannels$CD:1609 · 75 B · Battle engineThe channels' tick (BattleCD_NmiMain, once a frame): nothing while !Battle_BgFxEnded is set or !Battle_Unk5D9B is 0. - verified
BattleCD_RunFxScript$CD:1654 · 82 B · Battle engineOne step of channel X's script (see the banner), with the pointer in DP $40-$42: opcodes ($80-$FE) run (BattleCD_RunFxOp) and the pointer moves past their operand byte, until a page byte, $7F or... - verified
BattleCD_RunFxOp$CD:16A6 · 15 B · Battle engineRuns script opcode A ($80-$FE): DP $43 = X (the channel), the pointer in DP $40 past the opcode, then BattleCD_FxOpTable entry A - $80 (the 8-bit ASL drops bit 7; the handlers start at $CD:17A9... - verified
BattleCD_FxOpTable$CD:16B5 · 244 B · Battle engineThe handler of each script opcode $80-$F9, by (opcode - $80) * 2 (JSR (T,X) in BattleCD_RunFxOp). - verified
BattleCD_FxOpPokeByte$CD:17A9 · 21 B · Battle engineOpcode $F9 (value, address word): stores the value at that address in bank $7E. - verified
BattleCD_FxOpCopyColour$CD:17BE · 33 B · Battle engineOpcode $F8 (source, destination): copies colour source to colour destination (0-255) in both !Battle_PaletteSavedLo and !Battle_PaletteLiveLo. - verified
BattleCD_FxOpSetCE0E$CD:17DF · 6 B · Battle engineOpcode $F7 (value): !BattleFx_GradForce = the value. - verified
BattleCD_FxOpWaitCE10$CD:17E5 · 26 B · Battle engineOpcode $F6 (n): while !BattleFx_GradRotRaw is 0, branches back n (see the banner); then (and always) !BattleFx_GradRotRaw = 0. - verified
BattleCD_FxOpSetCD46$CD:17FF · 6 B · Battle engineOpcode $F5 (value): !BattleFx_UnkCD46 = the value. - verified
BattleCD_FxOpSwayQuad$CD:1805 · 5 B · Battle engineOpcode $F4 (quad): JSL BattleFx_SwayQuad, which reads the operand through DP $40: fills that quad of !BattleFx_Quads with a beam from the top of the screen, swaying with the frame count, down to... - verified
BattleCD_FxOpRequestBgSet$CD:180A · 9 B · Battle engineOpcode $F2 (value): asks BattleCD_FrameTick for one JSL BattleFx_LoadBgSet with A = the value (!Battle_UnkCD45 = the value, !BattleFx_BgRequest + 1). - verified
BattleCD_FxOpWaitBgSet$CD:1813 · 23 B · Battle engineOpcode $F1 (n): while !BattleFx_BgRequest is set (the call opcode $F2 asked for has not run yet), branches back n (see the banner). - verified
BattleCD_FxOpValueFromVar0F$CD:182A · 10 B · Battle engineOpcode $F0 (n): !Battle_FxValues entry n = variable $0F (!Battle_ActVars). - verified
BattleCD_FxOpCountCD3C$CD:1834 · 23 B · Battle engineOpcode $EF (no operand): !Battle_UnkCD3C + 1; when it wraps to 0, the palette animation records 8-11 are stopped (FieldAnimB .Unk0 = 0). - verified
BattleCD_FxOpWaveWindowB$CD:184B · 5 B · Battle engineOpcode $F3 (step): JSL BattleFx_WaveWindowB, which reads the operand through DP $40: !BattleFx_CountA grows by it and window table 0 gets wavy edges (angles from !BattleFx_CountB, which counts up). - verified
BattleCD_FxOpGrowBand$CD:1850 · 5 B · Battle engineOpcode $EE (kind): JSL BattleFx_GrowBand, which reads the operand through DP $40: a band around the point in !Battle_ActCalcResult, one step wider per run, into this frame's window table (0 a... - verified
BattleCD_FxOpWaveWindowA$CD:1855 · 5 B · Battle engineOpcode $ED (step): JSL BattleFx_WaveWindowA, which reads the operand through DP $40: !BattleFx_CountA grows by it and window table 0 gets wavy edges (angles from the frame count). - verified
BattleCD_FxOpRampWin2$CD:185A · 5 B · Battle engineOpcode $EC (one operand byte, which nothing reads): JSL BattleFx_RampWin2 (a ramp of left edges into the second pairs of window table 0, up from line !BattleFx_RampBottom - !BattleFx_CountA... - verified
BattleCD_FxOpWaveWindowBByFrame$CD:185F · 5 B · Battle engineOpcode $EB (step): JSL BattleFx_WaveWindowB_ByFrame (BattleFx_WaveWindowB with the angles from the frame count), which reads the operand through DP $40. - verified
BattleCD_FxOpSetBackdrop$CD:1864 · 16 B · Battle engineOpcode $EA (colour word): colour 0 (the backdrop) of both !Battle_PaletteSavedLo and !Battle_PaletteLiveLo = the word. - verified
BattleCD_FxOpGrowBox$CD:1874 · 5 B · Battle engineOpcode $E8 (step): JSL BattleFx_GrowBox, which reads the operand through DP $40: !BattleFx_BoxHalfHeight grows by it and this frame's window table gets a box centred on line 106. - verified
BattleCD_FxOpAddBoxInset$CD:1879 · 5 B · Battle engineOpcode $E9 (step): JSL BattleFx_AddBoxInset, which adds the operand (read through DP $40) to !BattleFx_BoxInset. - verified
BattleCD_FxOpWaveBg3$CD:187E · 68 B · Battle engineOpcode $E7 (n): layer 3's wave scroll. - verified
BattleCD_FxOpSetHoldAnims$CD:18C2 · 6 B · Battle engineOpcode $E6 (value): !BattleFx_HoldAnims = the value (non-zero holds the palette animations, BattleFx_HoldAnimsTick; action opcodes $2D/$2E set it too). - verified
BattleCD_FxOpIncVar$CD:18C8 · 7 B · Battle engineOpcode $E5 (n): variable n (!Battle_ActVars) + 1. - verified
BattleCD_FxOpSoundAtCalc$CD:18CF · 16 B · Battle engineOpcode $E4 (sound): leaves the sound pending for BattleCD_PlayPendingSfx (BattleCD_FrameTick) with X = the first byte of !Battle_ActCalcResult (an x, probably: the pan). - verified
BattleCD_FxOpCalcToTriangle$CD:18DF · 40 B · Battle engineOpcode $E3 (object 0/1): the object's three screen points (!Battle_FxTriX0-Y2) = the six bytes of !Battle_ActCalcResult entries 0-2 (x, y of each). - verified
BattleCD_FxOpSetCD2E$CD:1907 · 6 B · Battle engineOpcode $E2 (value): !Battle_UnkCD2E = the value (non-zero: the NMI skips its BattleCD_WaitScanline). - verified
BattleCD_FxOpSetCD2D$CD:190D · 6 B · Battle engineOpcode $E0 (value): !Battle_UnkCD2D = the value (non-zero: the NMI skips BattleCE_UnkF066). - verified
BattleCD_FxOpRandomShake$CD:1913 · 5 B · Battle engineOpcode $DF (base x, base y, mask): JSL BattleFx_RandomShake, which reads the three operand bytes through DP $40 (and moves DP $40 on by 2): the channel's !BattleFx_ShakeX/Y = -(random & mask + base). - verified
BattleCD_FxOpSetCD29$CD:1918 · 6 B · Battle engineOpcode $DE (value): !Battle_UnkCD29 = the value (the NMI copies it to !Battle_UnkA028 every frame). - verified
BattleCD_FxOpSaveCalcPoints$CD:191E · 5 B · Battle engineOpcode $DD (object): JSL BattleFx_SaveCalcPoints, which reads the operand through DP $40: the object's triangle (!Battle_FxTriX0-Y2) = the six bytes of !Battle_ActCalcResult. - verified
BattleCD_FxOpSound$CD:1923 · 15 B · Battle engineOpcode $DC (sound): leaves the sound pending for BattleCD_PlayPendingSfx with X = !BattleCD_SfxArgCentre. - verified
BattleCD_FxOpCopyWin1ToWin2$CD:1932 · 5 B · Battle engineOpcode $DB (one operand byte, which nothing reads): JSL BattleFx_CopyWin1ToWin2 (the other window table's first pairs into this frame's table's second pairs). - verified
BattleCD_FxOpWedge$CD:1937 · 122 B · Battle engineOpcode $DA (unused byte, pair n): fills a triangle (BattleCD_FillTriangle, object 0, DP $20 = 0) from the point P = !Battle_ActCalcResult entry 2n to the two points Q +/- w at right angles to... - verified
BattleCD_FxOpBeamFromPair$CD:19B1 · 17 B · Battle engineOpcode $D9 (object, pair n): as opcode $AC (BattleCD_FxOpBeam), but the angle is taken from the points of pair n itself: entries 2n and 2n+1 of !Battle_ActCalcResult clamped to the screen... - verified
BattleCD_FxOpAddVar$CD:19C2 · 35 B · Battle engineOpcode $D8 (n, value): variable n (!Battle_ActVars) + value; with n's bit 7 set, variable n AND $7F = 0 instead (the value is skipped). - verified
BattleCD_FxOpDrift$CD:19E5 · 108 B · Battle engineOpcode $D7 (b), on the channel's !Battle_FxChanWork bytes: - b bit 7 set: six random values 0-31 (BattleCD_RandByte, each seeded with the one before, the first with b) into work bytes 0-5; - else... - verified
BattleCD_FxBranchBack2$CD:1A51 · 21 B · Battle engineThe taken branch of the two-operand tests (opcodes $D6 and $D5): branches back by the second operand n (DP $40 - n with DP $40 at the first operand; see the banner). - verified
BattleCD_FxOpWaitValueIsVar0E$CD:1A66 · 20 B · Battle engineOpcode $D6 (index, n): while !Battle_FxValues entry index differs from variable $0E, branches back n (BattleCD_FxBranchBack2); else skips both operands. - verified
BattleCD_FxOpWaitValueZero$CD:1A7A · 17 B · Battle engineOpcode $D5 (index, n): while !Battle_FxValues entry index is not 0, branches back n (BattleCD_FxBranchBack2); else skips both operands. - verified
BattleCD_FxOpValueSubVar09$CD:1A8B · 17 B · Battle engineOpcode $D4 (index): !Battle_FxValues entry index - variable $09, not below 0. - verified
BattleCD_FxOpValueAddVar0C$CD:1A9C · 22 B · Battle engineOpcode $D3 (index): !Battle_FxValues entry index + variable $0C, at most variable $0E (the 8-bit sum is compared: a sum past $FF wraps first). - verified
BattleCD_FxOpColoursFromVar0A$CD:1AB2 · 12 B · Battle engineOpcode $D2 (one operand byte, not read): both colour sets (!Battle_FxScriptIds+2/+3) = variable $0A, then the colour copy of BattleCD_LoadLayerFx (BattleCD_LoadLayerFx_colours, tail jump): colours... - verified
BattleCD_FxOpSwitchHigh$CD:1ABE · 13 B · Battle engineOpcode $D1 (n, then a list of script addresses): jumps to the address in word (variable n's high nibble) of the list after the operand (DP $40 = that word - 1; see the banner). - verified
BattleCD_FxOpSwitchLow$CD:1ACB · 22 B · Battle engine - verified
BattleCD_FxOpMirrorWin1ToWin2$CD:1AE1 · 5 B · Battle engineOpcode $CF (offset): JSL BattleFx_MirrorWin1ToWin2, which reads the operand through DP $40: as opcode $DB, mirrored left to right, for 28 lines of each 28-line block, starting at byte offset the... - verified
BattleCD_FxOpStepBounce$CD:1AE6 · 5 B · Battle engineOpcode $CE (one operand byte, which nothing reads): JSL BattleFx_StepBounce, one step of the channel's bounce (set up by opcode $CD): !BattleFx_BounceOut moves. - verified
BattleCD_FxOpSetupBounce$CD:1AEB · 52 B · Battle engineOpcode $CD (d): sets up the channel's bounce for BattleFx_StepBounce (opcode $CE): !BattleFx_BounceDir = 0 (rising), !BattleFx_BounceBase = the channel's !BattleFx_BounceOut, !BattleFx_BounceSpeed... - verified
BattleCD_ClampCalcAngle$CD:1B1F · 3 B · Battle engineClamps the points of !Battle_ActCalcResult entries 0 and 1 to the screen (BattleCD_ClampCalcPair), then falls into BattleCD_CalcAngle ($1B22): DP $23-$26 = the two points at... - verified
BattleCD_CalcAngle$CD:1B22 · 32 B · Battle engine - verified
BattleCD_ClampX$CD:1B42 · 14 B · Battle engineA clamped to !BattleCD_ScreenXMin-!BattleCD_ScreenXMax (8-$F8). - verified
BattleCD_ClampY$CD:1B50 · 14 B · Battle engineA clamped to !BattleCD_ScreenYMin-!BattleCD_ScreenYMax (8-$D4). - verified
BattleCD_FxOpJumpIf99D2Is1$CD:1B5E · 15 B · Battle engineOpcode $CB (address word): with !Battle_Unk99D2 AND $7F = 1, jumps to the address (BattleCD_FxOpJump); else skips it. - verified
BattleCD_FxOpJump$CD:1B6D · 11 B · Battle engineOpcode $CA (address word): jumps to the script address (in the script's bank; DP $40 = the address - 1, see the banner). - verified
BattleCD_FxOpSwapPalettes$CD:1B78 · 34 B · Battle engineOpcode $C9 (no operand): !Battle_UnkA101 + 1, and bit 3 of the eleven battlers' !Battler_Palette and of !BattleMenu_CursorPalette flipped (palette number +/- 8). - verified
BattleCD_FxOpSwapObjPalettes$CD:1B9A · 5 B · Battle engineOpcode $E1 (no operand: BattleFx_SwapObjPalettes moves DP $40 back by one): JSL BattleFx_SwapObjPalettes, which swaps OBJ palette rows 1-3 with rows 5-7 (live and saved). - verified
BattleCD_FxOpScrollYToEnemy$CD:1B9F · 12 B · Battle engineOpcode $C8 (one operand byte, not read): the channel's !BattleFx_BounceOut + (!BattleCD_FxEnemyLine - slot 3's !Battler_ScreenY) (DP $45, 16-bit), through BattleCD_FxAddScrollY (tail jump). - verified
BattleCD_FxOpObjYToEnemy$CD:1BAB · 21 B · Battle engineOpcode $C7 (object): the object's !Battle_FxObjCentreY - (!BattleCD_FxEnemyLine - slot 3's !Battler_ScreenY). - verified
BattleCD_SinMul45$CD:1BC0 · 14 B · Battle engineA = DP $45 * sin(A) / 256 (BattleCD_SinMul with Y = DP $45) for 16-bit-index callers: X and Y are saved at 16 bits around the SEP #$10. - verified
BattleCD_FxOpWobble$CD:1BCE · 100 B · Battle engineOpcode $C6 (object, three phase steps, three angle bases): the object's phases !Battle_FxObjPhaseA/B/C + the steps; then its angles !Battle_FxObjAngleX = base 1 + $20 * sin(phase A) / 256... - verified
BattleCD_FxOpScrollToCalc$CD:1C32 · 2 B · Battle engineOpcode $AA (n): layer 3 scrolled so that the point of !Battle_ActCalcResult entry n is its origin: the channel's !BattleFx_ShakeX/Y = -x, -y (16-bit). - verified
BattleCD_ScrollToCalc$CD:1C34 · 39 B · Battle engine - verified
BattleCD_FxCircleRadii$CD:1C5B · 8 B · Battle engineRadius sets of BattleCD_FxCircleFromTable, 4 bytes each: the first circle's x and y radius, the second's x and y radius. - verified
BattleCD_FxOpCircleAtCalc$CD:1C63 · 24 B · Battle engineOpcode $C5 (radius set): layer 3 circles around the point of !Battle_ActCalcResult entry 0: the point (BattleCD_ScrollToCalc, A = 0) as the centre (DP $4D/$4E, the scroll negated back), then... - verified
BattleCD_FxOpCircleGrow$CD:1C7B · 68 B · Battle engineOpcode $C4 (k): layer 3 circles around !BattleCD_FxCircleX/Y. - verified
BattleCD_FxCircleFromTable$CD:1CBF · 22 B · Battle engineDP $49-$4C = BattleCD_FxCircleRadii set k (the script's operand), then falls into BattleCD_FxCircleStep ($1CD5): the channel's angles (!Battle_FxChanWork bytes 5, 6, 7) + 2, + 5, + 6; the point x... - verified
BattleCD_FxCircleStep$CD:1CD5 · 120 B · Battle engine - verified
BattleCD_FxOpIncVar0F$CD:1D4D · 9 B · Battle engineOpcode $C3 (no operand): variable $0F + 1. - verified
BattleCD_FxOpObjStepCapped$CD:1D56 · 61 B · Battle engineOpcode $C2 (object, limit, three steps): the object's !Battle_FxObjUnkDA/DC/DE each + its step, stored only while the 8-bit sum stays below the limit. - verified
BattleCD_FxOpWaitLine$CD:1D93 · 5 B · Battle engineOpcode $C1 (line): busy-waits for that scanline (BattleCD_WaitScanline, tail jump). - verified
BattleCD_FxOpShake$CD:1D98 · 111 B · Battle engineOpcode $C0 (flag, then seven bytes): the screen shake (BattleCD_StepShake). - verified
BattleCD_FxOpWaitPalAnims$CD:1E07 · 32 B · Battle engineOpcode $BF (n): while any of the palette animation records 8-11 runs (FieldAnimB .Unk0 non-zero), branches back n (see the banner). - verified
BattleCD_FxOpDrawModel2$CD:1E27 · 15 B · Battle engineOpcode $BE (object): draws model 2 (DP $4F = $20) for the object with its !Battle_FxObjDepth (BattleCD_FxDrawModel, tail jump). - verified
BattleCD_FxOpSetObjD1$CD:1E36 · 15 B · Battle engineOpcode $BD (b): !Battle_FxObjUnkD1 of object (b AND 1) = b >> 4: the kind of shape slot b AND 1 (BattleCD_FxDrawShape; opcode $8A sets it too). - verified
BattleCD_FxOpTurnObj$CD:1E45 · 55 B · Battle engineOpcode $BC (object, four steps): the object's !Battle_FxObjAngleX, !Battle_FxObjAngleY, !Battle_FxObjAngleZ and !Battle_FxObjDepth each + its step. - verified
BattleCD_FxOpDrawModel$CD:1E7C · 21 B · Battle engineOpcode $BB (b): draws model (b AND $0F) (DP $4F = b << 4, 8-bit) for object (b AND 1) with its !Battle_FxObjDepth (BattleCD_FxDrawModel, tail jump). - verified
BattleCD_FxOpSpinModel$CD:1E91 · 25 B · Battle engineOpcode $BA (b): turns object b (the whole byte as the index; the scripts presumably pass 0 or 1) a step (!Battle_FxObjAngleY + 1, !Battle_FxObjAngleX + 2, !Battle_FxObjAngleZ + 1) and draws model... - verified
BattleCD_FxDrawModel$CD:1EAA · 77 B · Battle engine - verified
BattleCD_FxRotateVertex$CD:1EF7 · 69 B · Battle engineRotates vertex A (0-2) of a model of BattleFx_FxModels (16 bytes per model, DP $4F = its offset; 4 bytes per vertex: x, y, z, unused) by object X's angles: !Battle_FxRotInX/Y = the vertex's x and... - verified
BattleCD_FxOpColours$CD:1F3C · 11 B · Battle engineOpcode $B9 (set): both colour sets (!Battle_FxScriptIds+2/+3) = the operand, then the colour copy of BattleCD_LoadLayerFx (BattleCD_LoadLayerFx_colours, tail jump): colours 25-27 and 29-31 of both... - verified
BattleCD_FxOpFillHangingTriangle$CD:1F47 · 6 B · Battle engineOpcode $B8 (object): BattleCD_FillHangingTriangle with A = the object (0 or 1): its right triangle hanging from the top of the screen. - verified
BattleCD_FxOpTilePageSlot$CD:1F4D · 6 B · Battle engineOpcode $B7 (slot): !Battle_TilePageSlot = the slot (which BattleCD_TileUploadVram address the script's tilemap pages go to). - verified
BattleCD_FxOpWindowBand$CD:1F53 · 77 B · Battle engineOpcodes $B5 and $B6 (index): a band of !Battle_FxWinLines around the middle line. - verified
BattleCD_FxOpCentreAndScroll$CD:1FA0 · 40 B · Battle engineOpcode $B4 (object): the object's centre from its triangle (BattleCD_FxOpTriCentre, same operand), then layer 3 scrolled so that the centre is its origin: the channel's !BattleFx_ShakeX/Y =... - verified
BattleCD_FxOpWaveTable$CD:1FC8 · 131 B · Battle engineOpcode $B3 (an operand byte, stored to DP $45 and overwritten: not used): fills the 106 entries of !Battle_FxWaveTable (8 bytes each: an x word and a y word, twice) for this frame.
Bank $CD · $CD:2000–$2FFF
$CD:2000
Verified · 102
- verified
BattleCD_FxWaveStoreX$CD:204B · 102 B · Battle engineBattleCD_FxOpWaveTable's x: stores A (signed, widened to 16 bits) as entry Y's two x words, then starts |sin(DP $45)| * !BattleCD_FxWaveAmpY on the multiplier for the y and returns C=1 when that... - verified
BattleCD_FxWaveStoreY$CD:20B1 · 34 B · Battle engineBattleCD_FxOpWaveTable's y: A + $20, widened to 16 bits as signed, plus DP $49, stored as entry Y's two y words. - verified
BattleCD_FxOpCopyWindowEdges$CD:20D3 · 5 B · Battle engineOpcode $B2 (one operand byte, not read here; BattleCE_CopyWindowEdges reads it): JSL BattleCE_CopyWindowEdges, which copies one window's edge pair of lines s/4 to s/4 + 215, with s = the operand x... - verified
BattleCD_FxOpScaleObj$CD:20D8 · 21 B · Battle engineOpcode $B1 (object, step): the object's !Battle_FxObjScale + step. - verified
BattleCD_FxOpBgMode$CD:20ED · 6 B · Battle engineOpcode $B0 (value): !Battle_HdmaMode (the BGMODE line data) = the value. - verified
BattleCD_FxOpTriangleOfPcs$CD:20F3 · 40 B · Battle engineOpcode $AF (object): the object's triangle (!Battle_FxTriX0-Y2) = the screen positions of PC slots 0, 1 and 2 (!Battler_ScreenX/Y). - verified
BattleCD_ScaleToCentre$CD:211B · 88 B · Battle engineA = c + (A - c) * DP $21 / 256, with c = DP $47 (the centre): moves a coordinate towards the centre by the scale (BattleCD_FxOpFillTriangle). - verified
BattleCD_FxOpFillTriangle$CD:2173 · 77 B · Battle engineOpcode $AE (b): fills the triangle of object (b AND 1) (!BattleFx_QuadSlot = it): its three points, each moved towards !Battle_FxObjCentreX/Y by !Battle_FxObjScale (BattleCD_ScaleToCentre), into... - verified
BattleCD_FxOpTriCentre$CD:21C0 · 461 B · Battle engineOpcode $AD (object): the object's !Battle_FxObjScale = $FF and its centre !Battle_FxObjCentreX/Y = where two medians of its triangle meet (the centroid): the line from the midpoint of points 0-1... - verified
BattleCD_NormaliseDiv$CD:238D · 166 B · Battle enginePrepares BattleCD_Div16 for a quotient scaled by 256: shifts the dividend DP $23 left by n, its leading zero bits (at most 8), and the divisor DP $25 right by 8 - n. - verified
BattleCD_ClampCalcPair$CD:2433 · 3 B · Battle engineClamps the two points at !Battle_ActCalcResult+X (x, y, x, y) to the screen: the x bytes with BattleCD_ClampX (8-$F8), the y bytes with BattleCD_ClampY (8-$D4). - verified
BattleCD_ClampCalcPair01$CD:2436 · 42 B · Battle engine - verified
BattleCD_FxOpBeam$CD:2460 · 6 B · Battle engineOpcode $AC (object, pair n): a beam of half-width w (variable $0E, signed) between P = !Battle_ActCalcResult entry 2n and Q = entry 2n+1, at right angles to !Battle_FxAngle (from entries 2 and 3... - verified
BattleCD_FxOpBeamQuad$CD:2466 · 141 B · Battle engine - verified
BattleCD_FxOpCalcToValues$CD:24F3 · 37 B · Battle engineOpcode $AB (b): the point of !Battle_ActCalcResult entry (b AND $7F) (entries 0 and 1 clamped to the screen first, BattleCD_ClampCalcPair01) into !Battle_FxValues: x to entry 2 and y to entry 4... - verified
BattleCD_FxOpWaitVarSet$CD:2518 · 35 B · Battle engineOpcode $A9 (n, back): while variable n (!Battle_ActVars) is 0, branches back by the second operand (see the banner); else skips both operands. - verified
BattleCD_FxOpWaves$CD:253B · 293 B · Battle engineOpcode $8F (layers, amplitude, speed): the per-line wave offsets (!Battle_WaveOffsets) of the wave scroll. - verified
BattleCD_FxOpSetObjAngles$CD:2660 · 39 B · Battle engineOpcode $A7 (object, three angles): the object's !Battle_FxObjAngleX/Y/Z = the angles, !Battle_FxObjDepth = 0, !Battle_FxObjScale = $FF. - verified
BattleCD_FxOpReloadCeSet$CD:2687 · 9 B · Battle engineOpcode $87 (value): !BattleFx_CeSetBase = the value and !BattleFx_CeSetReload + 1 (as the message and wipe code bump them), so BattleFx_ReloadCeSet reloads the set. - verified
BattleCD_FxOpSaveObjs$CD:2690 · 32 B · Battle engineOpcode $A5 (slot 0-7): copies the two objects' fields (!Battle_FxObjCentreX on, !BattleCD_FxObjBytes bytes) to save slot slot of !Battle_FxObjSaves (offset from BattleCD_FxObjSaveOfs). - verified
BattleCD_FxObjSaveOfs$CD:26B0 · 16 B · Battle engineOffset of each save slot in !Battle_FxObjSaves (slot * !BattleCD_FxObjBytes). - verified
BattleCD_FxOpLoadObjs$CD:26C0 · 32 B · Battle engineOpcode $A6 (slot 0-7): the two objects' fields back from save slot slot (the reverse of BattleCD_FxOpSaveObjs). - verified
BattleCD_FxOpSetObjPhases$CD:26E0 · 55 B · Battle engineOpcode $A4 (object, six values): the object's !Battle_FxObjPhaseA/B/C and !Battle_FxObjUnkDA/DC/DE (the radii of the ring opcodes) = the values. - verified
BattleCD_FxOpStepEllipse$CD:2717 · 119 B · Battle engineOpcode $A3 (object, then dx, dy, dr, dsx, dsy, dphase): steps the object's flat ring: !Battle_FxObjCentreX/Y + dx/dy, the three radii !Battle_FxObjUnkDA/DC/DE each + dr, !Battle_FxObjSquashX/Y +... - verified
BattleCD_FxOpSetEllipse$CD:278E · 60 B · Battle engineOpcode $A2 (object, x, y, radius): the object's flat ring: !Battle_FxObjCentreX/Y = x, y; the three radii !Battle_FxObjUnkDA/DC/DE = radius; phases !Battle_FxObjPhaseA/B/C = !BattleCD_FxPhaseA/B/C... - verified
BattleCD_FxOpStepRing3d$CD:27CA · 121 B · Battle engineOpcode $A8 (object, then dx, dy, dz, dr, dax, day, daz, dscale): steps the object's turning ring: !Battle_FxObjCentreX/Y and !Battle_FxObjDepth + dx/dy/dz, the three radii !Battle_FxObjUnkDA/DC/DE... - verified
BattleCD_FxRing3dTriangle$CD:2843 · 94 B · Battle engineThe object's triangle from its turning ring: for each of the three vertices, radius !Battle_FxObjUnkDA/DC/DE and phase !Battle_FxObjPhaseA/B/C, the point BattleCD_FxRingVertex rotates, plus... - verified
BattleCD_FxRingVertex$CD:28A1 · 49 B · Battle engineOne ring vertex of object X at phase A, radius DP $47: !Battle_FxRotInX = sin(phase) / 2 * radius / 256 and !Battle_FxRotInY = the same with cos (BattleCD_HalfSinMul), !Battle_FxRotInZ = the... - verified
BattleCD_FxEllipseTriangle$CD:28D2 · 128 B · Battle engineThe object's triangle from its flat ring: for each vertex k (radius !Battle_FxObjUnkDA/DC/DE, phase !Battle_FxObjPhaseA/B/C), y = !Battle_FxObjCentreY + cos(phase) / 2 * radius / 256 * |sin(squash... - verified
BattleCD_FxOpFillObjTriangle$CD:2952 · 6 B · Battle engineOpcode $A1 (object): BattleCD_FillObjTriangle with A = the object (0 or 1): its triangle filled as it is, without the scaling of opcode $AE. - verified
BattleCD_FxOpRegToWork$CD:2958 · 9 B · Battle engineOpcode $8C (n, 0-3): the channel's !Battle_FxChanReg word to its work word n (!Battle_FxChanWork + 2n), through BattleCD_FxRegToWorkTable (JMP (T,X); a larger n would read the handler code as... - verified
BattleCD_FxRegToWorkTable$CD:2961 · 8 B · Battle engineBattleCD_FxOpRegToWork's handler per work word. - verified
BattleCD_FxRegToWork0$CD:2969 · 12 B · Battle engineWork word 0 (!Battle_FxChanWork) of channel Y = its !Battle_FxChanReg. - verified
BattleCD_FxRegToWork1$CD:2975 · 12 B · Battle engineWork word 1 (!Battle_FxChanWork+2) of channel Y = its !Battle_FxChanReg. - verified
BattleCD_FxRegToWork2$CD:2981 · 12 B · Battle engineWork word 2 (!Battle_FxChanWork+4) of channel Y = its !Battle_FxChanReg. - verified
BattleCD_FxRegToWork3$CD:298D · 12 B · Battle engineWork word 3 (!Battle_FxChanWork+6) of channel Y = its !Battle_FxChanReg. - verified
BattleCD_FxOpWorkToReg$CD:2999 · 9 B · Battle engineOpcode $8D (n, 0-3): the channel's work word n to its !Battle_FxChanReg, through BattleCD_FxWorkToRegTable (JMP (T,X)). - verified
BattleCD_FxWorkToRegTable$CD:29A2 · 8 B · Battle engineBattleCD_FxOpWorkToReg's handler per work word. - verified
BattleCD_FxWork0ToReg$CD:29AA · 12 B · Battle engine!Battle_FxChanReg of channel Y = its work word 0 (!Battle_FxChanWork). - verified
BattleCD_FxWork1ToReg$CD:29B6 · 12 B · Battle engine!Battle_FxChanReg of channel Y = its work word 1 (!Battle_FxChanWork+2). - verified
BattleCD_FxWork2ToReg$CD:29C2 · 12 B · Battle engine!Battle_FxChanReg of channel Y = its work word 2 (!Battle_FxChanWork+4). - verified
BattleCD_FxWork3ToReg$CD:29CE · 12 B · Battle engine!Battle_FxChanReg of channel Y = its work word 3 (!Battle_FxChanWork+6). - verified
BattleCD_FxOpFillWindow$CD:29DA · 9 B · Battle engineOpcode $88 (n): JSL BattleFx_FillWindow with A and X = n * 2: this frame's window table all empty (0), first pairs empty (1), second pairs empty (2) or first pairs full (3). - verified
BattleCD_FxOpPalAnim$CD:29E3 · 95 B · Battle engineOpcode $8E (seven bytes b0-b6): fills a palette animation record (FieldAnimB, 4-11, picked by b5 AND 7 through BattleCD_FxPalAnimRecs: 0 is record 11, 7 is record 4): .Unk0 = b0 AND $F0 (the... - verified
BattleCD_FxPalAnimRecs$CD:2A42 · 8 B · Battle engineOffset from palette animation record 4 (FieldAnimB[4]) of the record BattleCD_FxOpPalAnim fills, by b5 AND 7: records 11 down to 4. - verified
BattleCD_FxOpMisc$CD:2A4A · 7 B · Battle engineOpcode $80 (sub-op): jumps to BattleCD_FxMiscTable entry sub-op. - verified
BattleCD_FxMiscTable$CD:2A51 · 58 B · Battle engineThe sub-handlers of script opcode $80, by sub-op * 2. - verified
BattleCD_FxMiscIncEnemy9FF7$CD:2A8B · 12 B · Battle engineSub-op $1B: !Battler_Unk9FF7 + 1 for battler slots 3-10 (the eight enemies). - verified
BattleCD_FxMiscWhitenObjRows$CD:2A97 · 5 B · Battle engineSub-op $1C: JSL BattleFx_WhitenObjRows5To7 (OBJ palette rows 5-7, saved and live, white). - verified
BattleCD_FxMiscWhitenRows$CD:2A9C · 5 B · Battle engineSub-op $1A: JSL BattleFx_WhitenRows (background palette rows 2-7 and OBJ rows 1-3, saved and live, white). - verified
BattleCD_FxMiscIncGradRot$CD:2AA1 · 4 B · Battle engineSub-op $19: !BattleFx_GradRotRaw + 1 (what script opcode $F6 waits for). - verified
BattleCD_FxMiscMoveBgRows$CD:2AA5 · 5 B · Battle engineSub-op $18: JSL BattleFx_MoveBgRowsUp (background palette rows 2-4 and their animations moved to rows 5-7). - verified
BattleCD_FxMiscLoadBgRows$CD:2AAA · 5 B · Battle engineSub-op $17: JSL BattleFx_LoadBgRows2To4 (background palette rows 2-4 loaded again, their animations moved back). - verified
BattleCD_FxMarkRandomDrop$CD:2AAF · 23 B · Battle engineMarks a random entry of !BattleFx_WaveMoving: the RandomTable byte at !BattleFx_CountB (which counts up) picks the word, which gets + 1. - verified
BattleCD_FxMiscDropWaveBase$CD:2AC6 · 41 B · Battle engineSub-op $16: three random entries marked (BattleCD_FxMarkRandomDrop), then every one of the 212 !BattleFx_WaveBaseX words (4 bytes apart: the words BattleFx_WaveWindowA adds its wave to) whose... - verified
BattleCD_FxMiscClearWaveBase$CD:2AEF · 22 B · Battle engineSub-op $15: zeroes !BattleFx_WaveBaseX and the !BattleFx_WaveMoving marks after it ($7E:E500-$EB9F, !BattleCD_FxWaveClearBytes). - verified
BattleCD_FxMiscResetWave$CD:2B05 · 13 B · Battle engineSub-op $14: !BattleFx_CountA = !BattleFx_WaveRadius and !BattleFx_CountB = 0 (one word: the wave windows' radius r1 = !BattleFx_WaveRadius - !BattleFx_CountA is then 0), and !Battle_FrameCount =... - verified
BattleCD_FxMiscClampCalcY$CD:2B12 · 21 B · Battle engineSub-op $12: the y of !Battle_ActCalcResult entry 0 clamped to !BattleCD_FxCalcYMin-!BattleCD_ScreenYMax. - verified
BattleCD_FxMiscAnimFrom99D3$CD:2B27 · 30 B · Battle engineSub-op $11: !Battle_Unk99D2 bit 7 set, and palette animation records 10 and 11 (FieldAnimB) set to work on colours !Battle_Unk99D3 up to 127 (.Unk1 = !Battle_Unk99D3, .Unk2 = !BattleCD_BgColours... - verified
BattleCD_FxMiscBlackBands$CD:2B45 · 23 B · Battle engineSub-op $10: the value byte of each of the 32 entries of !Battle_FxBandsBlue, !Battle_FxBandsGreen and !Battle_FxBandsRed = !BattleCD_ColDataBlack (all three channels, intensity 0); the line counts... - verified
BattleCD_FxMiscClearExitAttr$CD:2B5C · 8 B · Battle engineSub-op $0F: !Battler_ActAttr of the battler in !Battle_ExitFxSlot (the enemy BattleCD_EnemyDissolve takes off) = 0. - verified
BattleCD_FxMiscAddLineOffsets$CD:2B64 · 5 B · Battle engineSub-op $0D: JSL BattleFx_AddLineOffsets (the bytes at $7E:0A00, from sub-op $0C for one, added to lines 48-175 of this frame's window table), with C = 0 for its first ADC (the dispatcher's ASL). - verified
BattleCD_FxMiscSineOffsets$CD:2B69 · 63 B · Battle engineSub-op $0C: fills the 256 bytes of !Battle_WaveOffsets ($7E:0A00) with a sine of amplitude !BattleCD_FxSineAmp: byte n = !BattleRom_AbsSine entry (4n AND $FF) x 12 / 256, negated for entries... - verified
BattleCD_FxMiscBobSub$CD:2BA8 · 42 B · Battle engineSub-op $0B: the channel's !BattleFx_BounceOut - the signed byte !BattleRom_FxBobSteps entry !Battle_FxBobStep (the channel's), which then counts up (wrapping after 256 runs). - verified
BattleCD_FxMiscBobAdd$CD:2BD2 · 42 B · Battle engineSub-op $0A: as sub-op $0B (BattleCD_FxMiscBobSub), but the step is added to the channel's !BattleFx_BounceOut. - verified
BattleCD_FxMiscSprites$CD:2BFC · 131 B · Battle engineSub-op $09: puts 16 sprites from !Battle_FxSprTemplate into OAM entries 4-19 of the shadow (!Oam_LowTable), after moving entries 4-111 down to 20-127 (MVP, low table and high-table bytes; the... - verified
BattleCD_FxMiscClearPhases$CD:2C7F · 12 B · Battle engineSub-op $08: !Battle_FxObjPhaseA, PhaseB and PhaseC of both objects = 0 (one word each). - verified
BattleCD_FxMiscNarrowTri$CD:2C8B · 13 B · Battle engineSub-op $07: object 0's triangle: first point's y + 2, second point's y - 2 (the side between them shrinks by 4). - verified
BattleCD_FxMiscSetTri$CD:2C98 · 27 B · Battle engineSub-op $06: object 0's triangle = (0, 1), (0, !BattleCD_FxTriLowY), (!BattleCD_FxTriTipX, !BattleCD_FxTriTipY): a wedge from the left edge of the screen. - verified
BattleCD_FxMiscRotateTri$CD:2CB3 · 41 B · Battle engineSub-op $05: object 0's points move round one place: the first point to the second, the second to the third, the third to the first. - verified
BattleCD_FxMiscClearWaveTable$CD:2CDC · 25 B · Battle engineSub-op $04: zeroes !BattleFx_WinTableBytes bytes from !Battle_FxWaveTable ($7E:C15D-$C4DC, which window table 0 overlaps from $C161) and !Battle_WavePhase. - verified
BattleCD_FxMiscCentreLine$CD:2CF5 · 23 B · Battle engineSub-op $02: object 0's triangle = (!BattleCD_FxScreenMidX, 0) and twice (!BattleCD_FxScreenMidX, !BattleCD_ScreenYMax): a vertical line down the middle (sub-op $03 then widens its base). - verified
BattleCD_FxMiscWidenTri$CD:2D0C · 19 B · Battle engineSub-op $03: object 0's triangle: second point's x + 2, third point's x - 2 (no carry or limit). - verified
BattleCD_FxMiscRotateBands$CD:2D1F · 26 B · Battle engineSub-op $01: the value bytes of the 96 band entries (!Battle_FxBandsBlue, Green and Red one after the other, 4 bytes apart) move one entry back, the first going to the last. - verified
BattleCD_FxMiscTallBands$CD:2D39 · 11 B · Battle engineSub-op $13: !Battle_Unk5D9A = 1 and the colour bands built with !BattleCD_FxBandLinesTall lines each. - verified
BattleCD_FxMiscBandsStep$CD:2D44 · 6 B · Battle engine - verified
BattleCD_FxMiscBands$CD:2D4A · 129 B · Battle engine - verified
BattleCD_FxOpSetPeriod$CD:2DCB · 11 B · Battle engineOpcode $81 (n): the channel's period and countdown (its block's bytes +6 and +7, see BattleCD_StartFxChannel) = n: the script then steps every n frames, the next step n frames on. - verified
BattleCD_FxOpScrollStep$CD:2DD6 · 20 B · Battle engineOpcode $82 (b): moves the channel's layer-3 scroll additions by d = (b AND $1F) + 1 in the direction b / 32 (0-7), through BattleCD_FxScrollDirTable (JMP (T,X)); "X" is the channel's... - verified
BattleCD_FxScrollDirTable$CD:2DEA · 16 B · Battle engineBattleCD_FxOpScrollStep's helpers, by direction (b / 32) * 2. - verified
BattleCD_FxScrollAddYSubX$CD:2DFA · 25 B · Battle engineThe channel's !BattleFx_BounceOut + the word at DP $45 and its !Battle_FxScrollAddX - it (direction 7 of script opcode $82). - verified
BattleCD_FxAddScrollY$CD:2E13 · 16 B · Battle engineThe channel's !BattleFx_BounceOut + the word at DP $45 (direction 6 of script opcode $82; also called by script opcodes $C8 and $D7). - verified
BattleCD_FxScrollAddYAddX$CD:2E23 · 25 B · Battle engineThe channel's !BattleFx_BounceOut and its !Battle_FxScrollAddX + the word at DP $45 (direction 5 of script opcode $82). - verified
BattleCD_FxSubScrollX$CD:2E3C · 17 B · Battle engineThe channel's !Battle_FxScrollAddX - the word at DP $45 (direction 4 of script opcode $82; also script opcode $D7's tail jump). - verified
BattleCD_FxAddScrollX$CD:2E4D · 17 B · Battle engineThe channel's !Battle_FxScrollAddX + the word at DP $45 (direction 3 of script opcode $82; also script opcode $D7's tail jump). - verified
BattleCD_FxScrollSubYSubX$CD:2E5E · 26 B · Battle engineThe channel's !BattleFx_BounceOut and its !Battle_FxScrollAddX - the word at DP $45 (direction 2 of script opcode $82). - verified
BattleCD_FxSubScrollY$CD:2E78 · 17 B · Battle engineThe channel's !BattleFx_BounceOut - the word at DP $45 (direction 1 of script opcode $82; also called by script opcode $D7). - verified
BattleCD_FxScrollSubYAddX$CD:2E89 · 25 B · Battle engineThe channel's !Battle_FxScrollAddX + the word at DP $45 and its !BattleFx_BounceOut - it (direction 0 of script opcode $82). - verified
BattleCD_FxOpLoopStart$CD:2EA2 · 19 B · Battle engineOpcode $83 (n): starts a loop of the channel: its !Battle_FxLoopCount = n + 1 and !Battle_FxLoopPtr = DP $40 (this operand), so that opcode $84 runs the bytes after the operand n + 1 times (n =... - verified
BattleCD_FxOpLoopEnd$CD:2EB5 · 19 B · Battle engineOpcode $84 (no operand): the channel's !Battle_FxLoopCount - 1; while it is not 0, DP $40 = !Battle_FxLoopPtr (the next byte read is the loop's first); at 0 the script goes on (DP $40 - 1). - verified
BattleCD_FxOpPageLoopStart$CD:2EC8 · 22 B · Battle engineOpcode $85 (n): as opcode $83 (BattleCD_FxOpLoopStart), and the channel's tile page base (its block's byte +8, added to the script's page bytes) = 0. - verified
BattleCD_FxOpPageLoopEnd$CD:2EDE · 25 B · Battle engineOpcode $86 (no operand): as opcode $84 (BattleCD_FxOpLoopEnd), and the channel's tile page base + 1 each time round, 0 when the loop ends: the loop's page bytes show the next pages each time. - verified
BattleCD_FxOpMosaic$CD:2EF7 · 87 B · Battle engineOpcode $90 (b): the MOSAIC byte of channel 6's line data (!Battle_HdmaMode+1, MOSAIC probably): its layer bits (0-3) = b's high nibble, its size (bits 4-7) the old size + (b AND $0F), at most... - verified
BattleCD_FxOpCall$CD:2F4E · 19 B · Battle engineOpcode $91 (address word): a call in the script's bank: the channel's !Battle_FxReturnPtr = DP $40 + 1 (the operand's last byte), DP $40 = the address - 1 (the next byte read is at the address). - verified
BattleCD_FxOpReturn$CD:2F61 · 13 B · Battle engineOpcode $92 (no operand): DP $40 = the channel's !Battle_FxReturnPtr: the script goes on after the last opcode $91. - verified
BattleCD_FxOpColourMath$CD:2F6E · 29 B · Battle engineOpcode $93 (TS, CGWSEL, CGADSUB): the line data's TS byte (!Battle_HdmaScreens+1) = the first operand, CGWSEL (!Battle_HdmaColour) the second, CGADSUB (!Battle_HdmaColour+1) the third AND... - verified
BattleCD_FxOpW12Sel$CD:2F8B · 32 B · Battle engineOpcode $94 (b): W12SEL (!Battle_WinRegs) = b, and !Battle_UnkC155 and !Battle_UnkC157 both = !BattleCD_FxEdgesNone ($00FF) when b bit 3 is set, else !BattleCD_FxEdgesAll ($FF00). - verified
BattleCD_FxOpW34Sel$CD:2FAB · 6 B · Battle engineOpcode $95 (b): W34SEL (!Battle_WinRegs+1) = b. - verified
BattleCD_FxOpWObjSel$CD:2FB1 · 6 B · Battle engineOpcode $96 (b): WOBJSEL (!Battle_WinRegs+2) = b. - verified
BattleCD_FxOpDrawShape$CD:2FB7 · 5 B · Battle engineOpcode $8B (slot): BattleCD_FxDrawShape with A = the slot (tail jump). - verified
BattleCD_FxOpStepShape$CD:2FBC · 49 B · Battle engineOpcode $89 (slot, dx, dy, dsize): steps shape slot's values in !Battle_FxValues (see BattleCD_FxDrawShape): the centre x (entry slot + 2) + dx, the centre y (slot + 4) + dy, at most... - verified
BattleCD_FxOpSetShape$CD:2FED · 42 B · Battle engineOpcode $8A (b, x, y, size): shape slot b AND 1: its kind (!Battle_FxObjUnkD1 entry slot, 0-5 for BattleCD_FxShapeTable) = b / 16, and its centre x, centre y and size in !Battle_FxValues (entries...
Bank $CD · $CD:3000–$3FFF
$CD:3000
Verified · 58
- verified
BattleCD_FxOpSubWinScreens$CD:3017 · 9 B · Battle engineOpcode $A0 (b): the line data's TSW byte (!Battle_HdmaScreens+3) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpMainWinScreens$CD:3020 · 9 B · Battle engineOpcode $9F (b): the line data's TMW byte (!Battle_HdmaScreens+2) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpSubScreens$CD:3029 · 9 B · Battle engineOpcode $9E (b): the line data's TS byte (!Battle_HdmaScreens+1) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpMainScreens$CD:3032 · 9 B · Battle engineOpcode $9D (b): the line data's TM byte (!Battle_HdmaScreens) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpColData$CD:303B · 72 B · Battle engineOpcode $9C (value, step): the COLDATA value !Battle_WinRegs+5. - verified
BattleCD_FxOpCgAddSub$CD:3083 · 9 B · Battle engineOpcode $9B (b): the line data's CGADSUB byte (!Battle_HdmaColour+1) = b AND !BattleFx_UnkCD46. - verified
BattleCD_FxOpCgWSel$CD:308C · 6 B · Battle engineOpcode $9A (b): the line data's CGWSEL byte (!Battle_HdmaColour) = b. - verified
BattleCD_FxOpWBgLog$CD:3092 · 38 B · Battle engineOpcode $98 (b): WBGLOG (!Battle_WinRegs+3) = b AND $3F; before it, with b bit 7 set !Battle_UnkC157 = !BattleCD_FxEdgesFF and !Battle_UnkC155 = !BattleCD_FxEdgesAll; else with bits 4-5 both set... - verified
BattleCD_FxOpWObjLog$CD:30B8 · 6 B · Battle engineOpcode $99 (b): WOBJLOG (!Battle_WinRegs+4) = b. - verified
BattleCD_FxOpHalfPlane$CD:30BE · 118 B · Battle engineOpcode $97 (angle, step, flags): one window of this frame's window table becomes the half of the screen on one side of a line through the centre (BattleCE_DrawHalfPlane). - verified
BattleCD_FxLineDeltas$CD:3134 · 85 B · Battle engineThe deltas of the line from !BattleCE_LineP1 to !BattleCE_LineP2 for BattleCE_DrawHalfPlane: !BattleCE_LineDirX = $FF (P2 left of P1), 0 or 1 (right), !BattleCE_LineAbsDX = |x2 - x1|, and the same... - verified
BattleCD_FxDrawShape$CD:3189 · 21 B · Battle engineDraws shape slot A: !Battle_FxShapeSlot = A, the half widths of a circle of its size (BattleCD_FxCircleHalfWidths); with size AND $7F = 0 nothing more. - verified
BattleCD_FxShapeTable$CD:319E · 12 B · Battle engineBattleCD_FxDrawShape's handler of each shape kind, by kind * 2. - verified
BattleCD_FxCircleHalfWidths$CD:31AA · 84 B · Battle engineWith r = the size of shape slot !Battle_FxShapeSlot AND $7F: r = 0 returns C=0. - verified
BattleCD_FxBuildCircle$CD:31FE · 117 B · Battle engineBuilds a circle centred on x = the slot's centre x (!Battle_FxValues entry slot + 2) into !Battle_FxWinLines from the half widths (BattleCD_FxCircleHalfWidths, which aimed WMADD at the middle... - verified
BattleCD_FxBuildDome$CD:3273 · 196 B · Battle engineAs BattleCD_FxBuildCircle, but only every other line (the first, the third, ...: DP $4F counts them) is also written through WMDATA: the upper half is a half circle, the lower half one half as tall. - verified
BattleCD_FxBuildWide$CD:3337 · 126 B · Battle engineAs BattleCD_FxBuildCircle with every half width doubled (DP $51): an ellipse twice as wide as it is tall. - verified
BattleCD_FxShapeCircle$CD:33B5 · 6 B · Battle engineShape kind 0: a circle (BattleCD_FxBuildCircle, BattleCD_FxCopyShape). - verified
BattleCD_FxShapeDome$CD:33BB · 6 B · Battle engineShape kind 1: a circle with its lower half squashed to half height (BattleCD_FxBuildDome, BattleCD_FxCopyShapeDome). - verified
BattleCD_FxShapeHanging$CD:33C1 · 6 B · Battle engineShape kind 2: kind 1's shape hanging from the top of the screen (BattleCD_FxBuildDome, BattleCD_FxCopyShapeHanging). - verified
BattleCD_FxShapeTall$CD:33C7 · 6 B · Battle engineShape kind 3: an ellipse twice as tall as wide (BattleCD_FxBuildCircle, BattleCD_FxCopyShapeTall). - verified
BattleCD_FxShapeWide$CD:33CD · 6 B · Battle engineShape kind 4: an ellipse twice as wide as tall (BattleCD_FxBuildWide, BattleCD_FxCopyShape). - verified
BattleCD_FxShapeBig$CD:33D3 · 6 B · Battle engineShape kind 5: a circle of twice the size (BattleCD_FxBuildWide, then each line twice: BattleCD_FxCopyShapeTall). - verified
BattleCD_FxCopyShapeTall$CD:33D9 · 164 B · Battle engineCopies the 2r words of !Battle_FxWinLines from word $80 - r (r = the slot's size byte, bit 7 included) into the slot's window of this frame's table, each word to two lines, from line y - 2r (y =... - verified
BattleCD_FxCopyShapeHanging$CD:347D · 176 B · Battle engineAs BattleCD_FxCopyShapeDome, then lines 0 to y - 1 of the slot's window (y = its centre y) all get the middle line's pair (!Battle_FxWinLinesMid): a column from the top of the screen down to the... - verified
BattleCD_FxCopyShapeDome$CD:352D · 120 B · Battle engineCopies the words of !Battle_FxWinLines from word $80 - r to $80 + r / 2 (r = the slot's size byte, bit 7 included; the full upper half and the squashed lower half BattleCD_FxBuildDome wrote) into... - verified
BattleCD_FxCopyShape$CD:35A5 · 113 B · Battle engineCopies the 2r words of !Battle_FxWinLines from word $80 - r (r = the size byte of shape slot !Battle_FxShapeSlot, bit 7 included) into the slot's window of this frame's table from line y - r (y =... - verified
BattleCD_FxCopyLines$CD:3616 · 65 B · Battle engineCopies n = (DP $4B - Y) / 2 words of !Battle_FxWinLines from offset Y on into this frame's window table (!BattleFx_WinTable1 when bit 0 of !Battle_FrameCount is set, else !BattleFx_WinTable0) from... - verified
BattleCD_FillObjTriangle$CD:3657 · 37 B · Battle engineFills the triangle of object A (0 or 1) as it is in !Battle_FxTriX0 on (no scaling): !BattleFx_QuadSlot = A, DP $20 = 0, the three points into DP $12-$17, then falls into BattleCD_FillTriangle. - verified
BattleCD_FillTriangle$CD:367C · 558 B · Battle engineFills the triangle of the points in DP $12-$17 (x, y each) into the edge pair !BattleFx_QuadSlot picks of this frame's window table, with DB=$00 (PHB, TDC / PHA / PLB, then PLB). - verified
BattleCD_WinLineBases$CD:38AA · 8 B · Battle engineBattleCD_AimWinLine's and BattleCD_AimWinTopFill's base addresses, by (frame bit 0 * 2 + !BattleFx_QuadSlot bit 0) * 2: window table 0's first and second pair, then table 1's. - verified
BattleCD_AimWinLineL$CD:38B2 · 4 B · Battle engineJSL entry of BattleCD_AimWinLine (BattleFx_RasterQuad's). - verified
BattleCD_AimWinLine$CD:38B6 · 47 B · Battle engineAims the WRAM port at line A of this frame's window table, at the edge pair !BattleFx_QuadSlot bit 0 picks: WMADD = $7E:(BattleCD_WinLineBases entry + 4A). - verified
BattleCD_EdgeSlope$CD:38E5 · 63 B · Battle engineY = (DP $0B - DP $0C) * 256 / DP $0D, signed (the hardware divides the size of the difference; a negative one negates the quotient): with x's and a line count, an edge's x step per line in 8.8... - verified
BattleCD_FillHangingTriangle$CD:3924 · 492 B · Battle engineFills a right triangle of object A (0 or 1) hanging from the top of the screen: !BattleFx_QuadSlot = A, DP $20 = 0, the object's first two points into DP $12-$15 and its third point replaced by... - verified
BattleCD_AimWinTopFill$CD:3B10 · 79 B · Battle engineAims the WRAM port at line 0 of this frame's window table, at the pair !BattleFx_QuadSlot bit 0 picks (BattleCD_WinLineBases), then writes the pair (X's high byte, Y's high byte) on A lines... - verified
BattleCD_PlayPendingSfx$CD:3B5F · 18 B · Battle enginePlays the sound a script opcode left pending: when !Battle_SfxPending is set, clears it and sends !Battle_SfxPendingId with X = !Battle_SfxPendingArg through BattleCD_ApuCmd18 (tail jump). - verified
BattleCD_ApuCmd18$CD:3B71 · 17 B · Battle engineSends APU command !Sfx_CmdUnk18 (Audio_ProcessEntry) with !Sfx_Param1 = A and !Sfx_Param2 = X's low byte: a sound, probably (the callers pass the dissolve's and the wipe's sounds and the script... - verified
BattleCD_WaitScanline$CD:3B82 · 41 B · Battle engineBusy-waits for scanline A: past the vertical blank (HVBJOY bit 7), then into an H-blank and out of it; then, skipping H-blanks, latches the counters (SLHV, STAT78 resets the read order) and reads... - verified
BattleCD_Div16$CD:3BAB · 41 B · Battle engine16-bit unsigned division by shift and subtract: !BattleCD_MathOut = !BattleCD_MathA / !BattleCD_MathB, !BattleCD_MathOutHi the remainder. - verified
BattleCD_Mul8x16$CD:3BD4 · 41 B · Battle engine8 x 16-bit unsigned multiplication on the CPU's multiplier: the 24-bit DP $27-$29 = DP $23 (a byte) * the word at DP $25, as $23 * $25 plus $23 * $26 shifted left 8. - verified
BattleCD_CosMul$CD:3BFD · 3 B · Battle engineA = Y * cos(A) / 256: adds a quarter turn ($40) and falls into BattleCD_SinMul ($3C00), which gives A = Y * sin(A) / 256 with the sine from !BattleRom_AbsSine (255 for 1; table index bit 7 = the... - verified
BattleCD_SinMul$CD:3C00 · 85 B · Battle engine - verified
BattleCD_CosMulStart$CD:3C55 · 3 B · Battle engineThe first half of BattleCD_CosMul / BattleCD_SinMul for BattleCD_Rotate3d: adds a quarter turn and falls into BattleCD_SinMulStart ($3C58), which starts |sin(A)| * |Y| on the multiplier and... - verified
BattleCD_SinMulStart$CD:3C58 · 55 B · Battle engine - verified
BattleCD_Rotate3d$CD:3C8F · 257 B · Battle engineRotates the point !Battle_FxRotInX/Y/Z (signed bytes) into !Battle_FxRotOutX/Y/Z: first by the angle in DP $4B about the y axis (x' = cos*x + sin*z, z' = cos*z - sin*x), then by DP $49 about the x... - verified
BattleCD_HalfSinMul$CD:3D90 · 51 B · Battle engineA = sin(A) / 2 * DP $47 / 256: the |sin| entry halved (LSR) times the unsigned byte at DP $47 on the multiplier, the high byte, negated for angles $80-$FF. - verified
BattleCD_HalfSinMul2$CD:3DC3 · 94 B · Battle engineAs BattleCD_HalfSinMul, then the result's magnitude times |sin(DP $45)| (DP $49) / 256: A = sin(A) / 2 * DP $47 / 256 * |sin(DP $45)| / 256, negated for angles A of $80-$FF (the sign of sin(DP... - verified
BattleCD_Mul8Unused$CD:3E21 · 26 B · Battle engineDP $49 = DP $45 * DP $47 (8 x 8-bit, on the multiplier). - verified
BattleCD_WaitFrames$CD:3E3B · 9 B · Battle engineWaits A frames: BattleCD_WaitFrameRefresh A times (A = 0 waits 256). - verified
BattleCD_PauseWait$CD:3E44 · 49 B · Battle engineHolds the battle while !Battle_Paused is set: APU command !BattleCD_ApuCmdPause with argument !BattleCD_ApuCmdPause (and !Field_FadeBusy set to the same value), then frame by frame... - verified
BattleCD_WaitFrameRefresh$CD:3E75 · 8 B · Battle engineOne frame (BattleCD_WaitFrame), then the battle menu's refresh (BankC1_VecRefreshMenu: BattleMenu_RefreshIfDirtyL). - verified
BattleCD_WaitFrame$CD:3E7D · 17 B · Battle engineWaits for the next frame: !BattleFx_FrameWait + 1, then BattleCD_PauseWait until it is back to 0 (BattleFx_Nmi, $D1:E77C, clears it at the end of its work: TDC, STA.l $7E:CA20; BattleFx_Init also... - verified
BattleCD_DmaToVram$CD:3E8E · 38 B · Battle engineDMA channel 7 from A:X to VRAM word address Y, DP $45 bytes (mode 1: VMDATAL/VMDATAH), with DB = $00 inside and put back. - verified
BattleCD_RunQueuedDma$CD:3EB4 · 26 B · Battle engineThe NMI's half of BattleCD_QueueVramDma: when !Battle_DmaQueueReq is set, sends the queued piece (!Battle_DmaQueueSrc / Bank to !Battle_DmaQueueVram, !Battle_DmaQueuePiece bytes) through... - verified
BattleCD_QueueVramDmaL$CD:3ECE · 4 B · Battle engineBattleCD_QueueVramDma for long callers (bank $D1), RTL. - verified
BattleCD_QueueVramDma$CD:3ED2 · 204 B · Battle engineUploads A:X to VRAM word address Y, DP $53 bytes, through the NMI (BattleCD_RunQueuedDma), in pieces of at most $1000 bytes while !Battle_CgramPending is set and $400 bytes else (re-checked before... - verified
BattleCD_OldBuildLeftovers$CD:3F9E · 98 B · Battle engineNo code reaches these bytes.
Bank $CD · $CD:4000–$4FFF
$CD:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:5000–$5FFF
$CD:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:6000–$6FFF
$CD:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:7000–$7FFF
$CD:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:8000–$8FFF
$CD:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:9000–$9FFF
$CD:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:A000–$AFFF
$CD:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:B000–$BFFF
$CD:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:C000–$CFFF
$CD:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:D000–$DFFF
$CD:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:E000–$EFFF
$CD:E000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CD · $CD:F000–$FFFF
$CD:F000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:0000–$0FFF
$CE:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:1000–$1FFF
$CE:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:2000–$2FFF
$CE:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:3000–$3FFF
$CE:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:4000–$4FFF
$CE:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:5000–$5FFF
$CE:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:6000–$6FFF
$CE:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:7000–$7FFF
$CE:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:8000–$8FFF
$CE:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:9000–$9FFF
$CE:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:A000–$AFFF
$CE:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:B000–$BFFF
$CE:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:C000–$CFFF
$CE:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:D000–$DFFF
$CE:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CE · $CE:E000–$EFFF
$CE:E000
Verified · 9
- verified
BattleCE_CopyWindowEdges$CE:E000 · 142 B · Battle engineCopies one window's edge pair of 216 lines from the window table not written this frame into the one that is: from !BattleFx_WinTable0 into !BattleFx_WinTable1 when bit 0 of !Battle_FrameCount is... - verified
BattleCE_WaveTable$CE:E08E · 256 B · Battle engine128 signed words: a coarse wave of amplitude 2 (0, 1, 2, 1, 0, -1, -2, -1, each held for several words) with a period of 64 words, written twice so that any 64-word window of the first half reads... - verified
BattleCE_UnkE18E$CE:E18E · 57 B · Battle engineThe layer-2 wave, a frame's step (the name is the stub's: matched bank-$CD code calls it so). - verified
BattleCE_CopyWordsToLines$CE:E1C7 · 1,537 B · Battle engine256 unrolled pairs LDA (2k),Y / STA (4k),X for k = 255 down to 0, then RTS. - verified
BattleCE_RunCopyWords$CE:E7C8 · 7 B · Battle engineJSL entry for BattleCE_CopyWordsToLines: JSR to a JMP (!BattleCE_CopyEntry), so that the copy's RTS comes back here for the RTL. - verified
BattleCE_CalcAngle$CE:E7CF · 182 B · Battle engineThe direction from the second point to the first, 256 per turn, as Battle_CalcAngle (bank $C1) works it out: the signed differences dx = AX - BX and dy = AY - BY, the base angle from... - verified
BattleCE_PresetWinEdges$CE:E885 · 505 B · Battle engineThe first step of BattleCE_DrawHalfPlane: sets the edge the line will not draw, on all 224 lines of this frame's window table (WinTable1 when bit 0 of !Battle_FrameCount is set), for the window... - verified
BattleCE_DrawHalfPlane$CE:EA7E · 1,008 B · Battle engineLayer-effect opcode $97's drawing: one window of this frame's window table (WinTable1 when bit 0 of !Battle_FrameCount is set, else WinTable0; the two halves of the code are the same but for the... - verified
BattleCE_UnkEE6E$CE:EE6E · 163 B · Battle engineLoads HDMA set A (the name is the stub's: matched bank-$CD and bank-$D1 code calls it so): the first !BattleCE_HdmaHeadBytes (30) bytes, ten entries, of each of the nine indirect HDMA tables at...
Bank $CE · $CE:F000–$FFFF
$CE:F000
Verified · 1
- verified
BattleCE_UnkF066$CE:F066 · 128 B · Battle engineParks sprites 4-127 (the name is the stub's: matched bank-$CD code calls it so): their y in BattleOam = !BattleOam_OffscreenY, and the high-table bytes 1-31 (!BattleOam_HighTable+1 on) =...
Bank $CF · $CF:0000–$0FFF
$CF:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:1000–$1FFF
$CF:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:2000–$2FFF
$CF:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:3000–$3FFF
$CF:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:4000–$4FFF
$CF:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:5000–$5FFF
$CF:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:6000–$6FFF
$CF:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:7000–$7FFF
$CF:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:8000–$8FFF
$CF:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:9000–$9FFF
$CF:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:A000–$AFFF
$CF:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:B000–$BFFF
$CF:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:C000–$CFFF
$CF:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:D000–$DFFF
$CF:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $CF · $CF:E000–$EFFF
$CF:E000
Verified · 19
- verified
BattleCF_VblankUploads$CF:E300 · 650 B · Battle engineCopies the battle's buffers to the PPU by DMA on channel 7, which needs vertical blank or forced blank: hence "vblank", inferred (the caller, BattleCD_NmiMain at $CD:08B4, is the NMI's work). - verified
BattleCF_FrameUpdate$CF:E58A · 503 B · Battle engineThe battle's once-a-frame work behind the vector $C1:000C. - verified
BattleCF_BounceHitNumbers$CF:E781 · 86 B · Battle engineBounces the hit numbers BattleAct_OpShowHitNumbers built: while !Battle_HitNumActive is set, takes step !Battle_HitNumStep of the bounce table for each battler slot (!BattleRom_HitNumBounceAlt for... - verified
BattleCF_StepFxColourCycle$CF:E7D7 · 99 B · Battle engineThe status colour cycle (Battle_FxColourCycle turns it on): for PC slots 2, 1, 0 whose !Battler_FxCycleOn is set, unless !Battle_UnkA101 is set or the PC uses !Battle_SpecialPalette, copies the... - verified
BattleCF_BuildSprites$CF:E83A · 242 B · Battle engineBuilds the battle's sprites, front to back: 1. - verified
BattleCF_DrawPosHistory$CF:E92C · 112 B · Battle engineDraws the four position-history records BattleCF_RecordPosHistory keeps for the battler at sprite index X: every !Battler_PosHistUnkAB7D frames (!Battler_PosHistUnkAB88 counts them down) it draws... - verified
BattleCF_DrawPosHistRecord$CF:E99C · 238 B · Battle engineDraws one copy of the battler !BattleSpr_Index at the history position in !BattleSpr_HistX/Y (low bytes) and !BattleSpr_HistXHi/YHi (only their sign is used: negative = the high byte is $FF): its... - verified
BattleCF_DrawUnkA5D8Sprite$CF:EA8A · 59 B · Battle engineFor the battler at sprite index X whose !Battler_UnkA5D8 is non-zero (opcodes $D0/$D1 set and clear it) and whose !Battler_Unk9FF7 is 0: puts one sprite, tile !Battle_UnkA5D8Tile, at its screen... - verified
BattleCF_DrawBattler$CF:EAC5 · 207 B · Battle enginePlaces the sprites of the battler !BattleSpr_Index whose tile words BattleCF_CopySprTiles has just put in OAM: its position is !Battler_ScreenX/Y plus the signed display offsets... - verified
BattleCF_CopySprTiles$CF:EB94 · 228 B · Battle engineCopies the tile/attribute words (bytes 2-3 of each 4-byte sprite record) of four sprites per group from the list at X to the OAM entries at Y, !BattleSpr_Groups groups: it returns after a group... - verified
BattleCF_StepPathWalks$CF:EC78 · 74 B · Battle engineSteps the path walks BattleAct_PathToPoint starts: for each battler slot whose !Battler_PathWalking is set and whose step is not done (!Battler_PathStepFrame not negative), adds entry... - verified
BattleCF_FollowObjects$CF:ECC2 · 86 B · Battle engineMoves the action objects that follow something (!Battle_ActObjFollow, set by the action opcodes): for object threads 7 down to 0, a value with bit 7 clear and !Battle_ActFollowObj clear is a... - verified
BattleCF_RecordPosHistory$CF:ED18 · 160 B · Battle engineKeeps the position history of opcodes $A4/$A5: for battler slots 10 down to 0 whose !Battler_PosHistOn is set, every !Battler_PosHistDelay frames (!Battler_PosHistTimer counts them) shifts records... - verified
BattleCF_DrawFrontLayer$CF:EDB8 · 63 B · Battle engineCalled by BattleCF_BuildSprites just before a battler's own sprites, so what it adds shows in front of the battler. - verified
BattleCF_DrawBackObjects$CF:EDF7 · 53 B · Battle engineCalled by BattleCF_BuildSprites just after a battler's own sprites, so these show behind it: while an action runs and !Battle_ActUnkA3D1 is clear, draws every action object linked to this battler... - verified
BattleCF_DrawFxOverlay$CF:EE2C · 115 B · Battle engineThe status overlay (Battle_FxOverlay* turn it on): for the battler !BattleSpr_Index with !Battler_FxOverlayOn set, steps its frame (0-3, every !Battler_FxOverlayPeriod frames... - verified
BattleCF_DrawHitNumbers$CF:EE9F · 76 B · Battle enginePuts the four hit-number sprites (Battle_HitNumSprite) of the battler !BattleSpr_Index into OAM, when !Battler_HitNumShown is set, and stores its !Battle_HitNumHigh byte as the whole OAM... - verified
BattleCF_DrawActObj$CF:EEEB · 196 B · Battle engineDraws one action object: the thread in bits 0-2 of !Battle_ActObjLinks entry X. - verified
BattleCF_RunMovers$CF:EFAF · 111 B · Battle engineWhile an action runs: for battler slots 10 down to 0 with !Battle_ActorMoving set, counts !Battle_ActorMoveTimer down and at 0 reloads it from !Battle_ActorMoveDelay and runs mover...
Bank $CF · $CF:F000–$FFFF
$CF:F000
Verified · 39
- verified
BattleCF_MoverTable$CF:F01E · 16 B · Battle engineThe battlers' movers by !Battle_ActorMoveKind (BattleCF_RunMovers). - verified
BattleCF_ObjMoverTable$CF:F02E · 16 B · Battle engineThe object threads' movers by their !Battle_ActorMoveKind entry. - verified
BattleCF_MoveStraight$CF:F03E · 73 B · Battle engineMover kind 0: unless the battler's !Battler_MoveDone is set, adds !Battle_ActorStepX/Y to !Battle_ActorOfsX/Y (8.8) and puts the battler at !Battle_ActorFromX/Y + the offsets' high bytes; counts... - verified
BattleCF_MoveArc$CF:F087 · 269 B · Battle engineMover kind 1, the arc moves (see the arc notes at !Battle_ActorArcSteps in ram_battle.inc): steps the offset like BattleCF_MoveStraight, then !Battle_ActorMoveSpeed times steps the arc's speed and... - verified
BattleCF_MoveHeading$CF:F194 · 100 B · Battle engineMover kind 2, the heading moves: ends the move (!Battler_MoveDone) when the battler's 16-pixel cell (BattleCF_PixelToCell of its screen y, then x) is in row 0 or !Battle_CellRowBottom or column 0... - verified
BattleCF_MoveCircle$CF:F1F8 · 69 B · Battle engineMover kind 3: unless done, adds !Battle_ActorCircleStep to !Battle_ActorCircleAngle and writes radius * sin(angle) to !Battler_UnkA4AF and radius * cos(angle) to !Battler_UnkA4A4 (the display... - verified
BattleCF_MoveKind4$CF:F23D · 279 B · Battle engineMover kind 4 (opcode $D2's move, a jump that lands on the point, probably; see BattleAct_OpMoveKind4ToCalc). - verified
BattleCF_MoveEllipse$CF:F354 · 75 B · Battle engineMover kind 5: BattleCF_MoveCircle with half the radius for the sine (y) part: !Battler_UnkA4AF = radius / 2 * sin(angle), !Battler_UnkA4A4 = radius * cos(angle). - verified
BattleCF_MoveShake$CF:F39F · 27 B · Battle engineMover kind 6 (opcode $D8): BattleCF_ShakeStep, then, for battler slot !Battle_PartMainSlot (3) with !Battle_UnkA113 set, copies its display offsets !Battler_UnkA4A4/A4AF to slot... - verified
BattleCF_ShakeStep$CF:F3BA · 75 B · Battle engineThe shake: counts !Battler_ShakeFrames down; at 0 zeroes the display offsets and !Battle_ActorMoving (the move ends without the done flag). - verified
BattleCF_MoveCurve$CF:F405 · 173 B · Battle engineMover kind 7, the curving move: when the battler is within 16 pixels of !Battle_ActorToX/Y in both axes (BattleCF_PointsNear) counts !Battler_MoveDone up and returns. - verified
BattleCF_ObjMoveStraight$CF:F4B2 · 81 B · Battle engineObject kind 0: BattleCF_MoveStraight for an object: the offset steps, !Battle_ActObjX/Y = start + the offsets' high bytes (high bytes 0), !Battle_ActObjMoveDone set when the steps run out. - verified
BattleCF_ObjMoveArc$CF:F503 · 284 B · Battle engineObject kind 1: BattleCF_MoveArc for an object. - verified
BattleCF_ObjMoveHeading$CF:F61F · 110 B · Battle engineObject kind 2: BattleCF_MoveHeading for an object (its cell from !Battle_ActObjY/X, the distance in !Battle_ActObjUnkA31C, the angle in !Battle_ActObjMoveAngle copied to !Battle_ActObjUnkA5B5)... - verified
BattleCF_ObjMoveCircle$CF:F68D · 85 B · Battle engineObject kind 3: unlike the battlers' BattleCF_MoveCircle, it moves the object itself: adds the step to its angle and puts !Battle_ActObjX/Y (low bytes only) at the centre (!Battle_ActorCircleX/Y) +... - verified
BattleCF_ObjMoveKind4$CF:F6E2 · 282 B · Battle engineObject kind 4: BattleCF_MoveKind4 for an object, with these differences: the first test once falling uses a 24-pixel margin (!Battle_ObjNearMargin) and no height test (it counts... - verified
BattleCF_ObjMoveOrbit$CF:F7FC · 136 B · Battle engineObject kind 5: the ellipse of BattleCF_MoveEllipse, moving the object itself around the centre (!Battle_ActObjX/Y low bytes = centre + radius * cos, radius / 2 * sin), and first re-linking it to... - verified
BattleCF_ObjMoveCurve$CF:F884 · 211 B · Battle engineObject kind 7: BattleCF_MoveCurve for an object. - verified
BattleCF_PointsNear$CF:F957 · 33 B · Battle engineSets !BattleCF_Near to 1 when the points (!BattleCF_NearX1, NearY1) and (!BattleCF_NearX2, NearY2) are less than !BattleCF_NearMargin apart in x and in y, else to 0. - verified
BattleCF_StepEnemies$CF:F978 · 91 B · Battle engineThe enemy stepper of the enemy movers (run while no action runs): for enemies 7 down to 0 with !Enemy_Stepping set, every !Battler_DefMoveDelay frames (!Enemy_StepTimer counts them) adds the... - verified
BattleCF_PlaceEnemyParts$CF:F9D3 · 36 B · Battle engineKeeps the enemies at fixed offsets from one of them: for each present enemy, !Battler_ScreenX/Y = the screen position of enemy !Battle_PartsAnchor + its !Enemy_PartOfsX/Y (8-bit adds; the anchor... - verified
BankCF_DeadShift3$CF:F9F7 · 4 B · EngineFour bytes between BattleCF_PlaceEnemyParts and Battle_SinLookupCF that decode as LSR A three times and RTS (A / 8). - verified
Battle_SinLookupCF$CF:F9FB · 28 B · Battle engineBank $CF's own scaled sine: returns (sin(A) × !BattleCF_SinScale) >> 8 in A. - verified
Battle_Mul8x16CF$CF:FA17 · 44 B · Battle engine - verified
Battle_CalcAngleCF$CF:FA43 · 154 B · Battle engineBank $CF's copy of Battle_CalcAngle ($C1:0222), working on WRAM instead of the direct page: the angle (256 units per turn) between !BattleCF_GeoOriginX/Y and !BattleCF_GeoPointX/Y, from dx =... - verified
BattleCF_PixelToCell$CF:FADD · 5 B · Battle engineA / 16: a screen coordinate to its 16-pixel cell (the !Battle_CellMap grid); the heading movers test the result for the edge cells. - verified
Battle_MergePendingEntries1580$CF:FAE2 · 131 B · Battle engineFor the highest PC slot (2, 1, 0) whose !Pc_UnkA0B5 is set, merges its Battle_PcItem record into the battle item list (Item_BattleList, 256 records of 5 bytes): a record with the same .Id gets one... - verified
BattleCF_EnterBattle$CF:FB65 · 128 B · Battle engineThe battle's start, reached from EngCall_BattleMain ($C1:0000, JSL from the field's DefaultHandler) through the JML at $C1:001B. - verified
BattleCF_ExitBattle$CF:FBE5 · 273 B · Battle engineThe battle's end, reached through the JML at $C1:001F when BattleSys_Main JMPs to BattleSys_ExitVec. - verified
BattleCF_PixelToTile$CF:FCF6 · 5 B · Battle engineA / 16: a screen coordinate to the field's 16-pixel tile (the Battle_FieldPc / Battle_FieldObj .TileX/.TileY); the same code as BattleCF_PixelToCell. - verified
BattleCF_WaitFrame$CF:FCFB · 7 B · Battle engineWaits one frame: counts !Battle_FramePending up and loops until the frame update (BattleCF_FrameUpdate) clears it. - verified
Battle_QueueVramUpload_0CC0$CF:FD02 · 52 B · Battle engineDescribes the upload of the status-bar map (BattleUI_StatusTile(0, 0), $00:0CC0, $180 bytes) to VRAM word !Battle_PanelMapVram in the queue bytes !Battle_VramQDmap.., and sets !Battle_VramQPending... - verified
Battle_QueueVramUpload_A6E1$CF:FD36 · 52 B · Battle engineThe same for the tech window map (BattleMenu_TechTile(0, 0), $7E:A6E1, $180 bytes) to the same VRAM address. - verified
Battle_QueueVramUpload_0E80$CF:FD6A · 52 B · Battle engineThe same for the item list map (BattleMenu_ItemTile(0, 0), $00:0E80, $180 bytes) to the same VRAM address. - verified
BattleFx_SetPtrA2FromTable$CF:FD9E · 15 B · Battle engineA = battler slot: stores !BattleRom_StatsOffset[slot] (the slot's BattlerStats offset, 2 B per slot) in DP $A2 (!BattleTmp_A2, which its callers read as !Battle_PoseStatsOffset and the like) and... - verified
BattleMsg_FormatNumber4Digits$CF:FDAD · 115 B · Battle text & numbersA four-digit, long-call version of BattleMsg_FormatNumberDigits ($C1:011F): the same subtract-and-count loops with one more for the thousands, and the digits looked up in !BattleRom_DigitTilesB... - verified
BattleCF_RemoveMarkedEnemies$CF:FE20 · 101 B · Battle engineService 6 (BattleSys_Service6): for enemy slots 10 down to 3 marked in !Battle_UnkAEB3 (BattleSys_Main's debug win marks each enemy it removes), by path: - !Battler_Unk9FF7 set: only... - verified
BankCF_EndFill$CF:FE85 · 376 B · Engine$FF fill after the last routine. - verified
BattleCF_ActForceBytes$CF:FFFD · 3 B · Battle engineThe three bytes service 4 reads as !BattleRom_ActForceNone ($FFFD), !BattleRom_ActForceSecond ($FFFE) and !BattleRom_ActForceAlt ($FFFF): non-zero would force !Battle_ActUnkAE9B / !Battle_ActFlags...
Bank $D1 · $D1:0000–$0FFF
$D1:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:1000–$1FFF
$D1:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:2000–$2FFF
$D1:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:3000–$3FFF
$D1:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:4000–$4FFF
$D1:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:5000–$5FFF
$D1:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:6000–$6FFF
$D1:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:7000–$7FFF
$D1:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:8000–$8FFF
$D1:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:9000–$9FFF
$D1:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:A000–$AFFF
$D1:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:B000–$BFFF
$D1:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:C000–$CFFF
$D1:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:D000–$DFFF
$D1:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $D1 · $D1:E000–$EFFF
$D1:E000
Verified · 27
- verified
BattleFx_SwapObjPalettes$D1:E70A · 114 B · Battle engineSwaps OBJ palette rows 1-3 with rows 5-7, colour for colour, in both the live (!Battle_PaletteLive) and the saved (!Battle_PaletteSaved) palette. - verified
BattleFx_Nmi$D1:E77C · 285 B · Battle engineThe battle's NMI handler while this engine runs: BattleFx_Init writes JML $D1:E77C into !NmiTrampoline. - verified
BattleFx_WhitenRows$D1:E899 · 40 B · Battle engineFills background palette rows 2-7 ($2040-$20FF of !Battle_PaletteSavedLo and $2240-$22FF of !Battle_PaletteLiveLo) and OBJ palette rows 1-3 (saved and live) with !BattleFx_White ($7FFF). - verified
BattleFx_WhitenObjRows5To7$D1:E8C1 · 24 B · Battle engineFills OBJ palette rows 5-7 (saved and live) with !BattleFx_White. - verified
BattleFx_UploadMapBlock$D1:E8D9 · 65 B · Battle engineSends a 16 x 16 block of map words to VRAM by DMA on channel 7: 16 rows of !BattleFx_MapRowBytes (32 bytes) from A:X, one after the other in the source, to VRAM word address DP $45, $45 + $20, $45... - verified
BattleFx_MoveBgRowsUp$D1:E91A · 106 B · Battle engineMoves background palette rows 2-4 to rows 5-7, with the palette animations that work on them: - rows 2-4 of !Battle_PaletteSavedLo are copied to rows 5-7 of both the saved and the live palette... - verified
BattleFx_LoadBgRows2To4$D1:E984 · 107 B · Battle engineCounts up !BattleFx_UnkCDC8 and !Battle_CgramPending, loads background palette rows 2-4 (saved and live) from !BattleRom_BgRows2To4 ($D0:FD00, 48 colours), copies FieldAnimB records 0-2 over... - verified
BattleFx_GradLevelOfs$D1:E9EF · 18 B · Battle engineByte offset into !BattleRom_GradColours of the 14 colours of each gradient level 0-8 (BattleFx_HpGradientTick indexes it with the level * 2). - verified
BattleFx_FindGradStart$D1:EA01 · 32 B · Battle engineLooks for the first colour of !BattleRom_GradColours among colours 1-14 of saved background palette row 5 and stores the colour number less 1 (0-13) to !BattleFx_GradStart; 0 when none matches. - verified
BattleFx_GradRotA$D1:EA21 · 14 B · Battle engineThree rotation tables of BattleFx_HpGradientTick, indexed by !BattleFx_GradStart (0-13): the rotation of background row 5 (A), 6 (B) and 7 (C). - verified
BattleFx_GradRotB$D1:EA2F · 14 B · Battle engineRow 6's start (see BattleFx_GradRotA). - verified
BattleFx_GradRotC$D1:EA3D · 14 B · Battle engineRow 7's start (see BattleFx_GradRotA). - verified
BattleFx_HpGradientTick$D1:EA4B · 389 B · Battle engineOne step of a background colour gradient that follows the HP of battler slot 3 (the first enemy). - verified
BattleFx_GradRotation$D1:EBD0 · 15 B · Battle engineA = DP $45 (a row's rotation from BattleFx_GradRotA/B/C) when !BattleFx_GradRotRaw is non-zero, else !BattleFx_GradCount - DP $45. - verified
BattleFx_GradWriteRow$D1:EBDF · 32 B · Battle engineWrites the 14 colours !BattleFx_GradColours + A * 2 on to colours 1-14 of the background palette row at Y ($20 per row, from row 5), in the saved and the live palette. - verified
BattleFx_SwayQuad$D1:EBFF · 96 B · Battle engineFills quad X (X = the argument byte) of !BattleFx_Quads and draws it: a beam from the top of the screen down to the point in !Battle_ActCalcResult. - verified
BattleFx_FxModels$D1:EC5F · 112 B · Battle engineThe 3D models of the layer-effect objects, read by bank $CD (BattleCD_FxRotateVertex, $CD:1EFE on: bytes 0, 1 and 2 of entry A * 4 + DP $4F into !Battle_FxRotInX/Y/Z, z plus DP $51): seven models... - verified
BattleFx_BgSetPalOfs$D1:ECCF · 12 B · Battle enginePer background set 0-5 (BattleFx_LoadBgSet, index = set * 2): byte offset into !BattleRom_BgSetPalettes of the set's three palette rows ($60 bytes). - verified
BattleFx_BgSetPacks$D1:ECDB · 24 B · Battle enginePer background set 0-5 (BattleFx_LoadBgSet, index = set * 4): the four graphics pack ids (!LocGfx_PackPtrs entries) unpacked to VRAM $2000, $2800, $3000 and $3800 (words); !BattleFx_BgPackNone... - verified
BattleFx_LoadBgSet$D1:ECF3 · 218 B · Battle engineLoads background set A (0-5): with !BattleFx_BgLoading set meanwhile, for each of the set's four entries in BattleFx_BgSetPacks that is not !BattleFx_BgPackNone, unpacks that graphics pack... - verified
BattleFx_GrowBand$D1:EDCD · 204 B · Battle engineDraws a band around the point in !Battle_ActCalcResult into the window table of this frame (!BattleFx_WinTable1 when bit 0 of !Battle_FrameCount is set, else !BattleFx_WinTable0), one step wider... - verified
BattleFx_MsgSfx$D1:EE99 · 12 B · Battle engine1 byte per battle message: the sound BattleCD_ShowMessage plays for it (through BattleCD_ApuCmd18, unless !BattleCD_MsgNoSfx, $FF). - verified
BattleFx_RampWin2$D1:EEA5 · 31 B · Battle engineWith n = !BattleFx_RampBottom ($C0) - !BattleFx_CountA (an 8-bit subtraction, so n is 0-255), stores the words 0, 1, 2, ... - verified
BattleFx_WaveWindowA$D1:EEC4 · 159 B · Battle engineWrites wavy edges into !BattleFx_WinTable0, two lines at a time, for Y = 0 to !BattleFx_WinUsedBytes - 8 in steps of 8 (the pairs at !BattleFx_WinTable0-4 + Y and + Y: the line before line 0 to... - verified
BattleFx_WaveLeftA$D1:EF63 · 109 B · Battle engineBattleFx_WaveWindowA's first pair: A (8-bit, its sign in N) is sign- extended, added to the word at !BattleFx_WaveBaseX + Y and stored to !BattleFx_WinTable0-4 + Y and !BattleFx_WinTable0 + Y. - verified
BattleFx_WaveWindowB$D1:EFD0 · 19 B · Battle engineLike BattleFx_WaveWindowA, but with r1 = r2 = !BattleFx_WaveRadius - !BattleFx_CountA, and the first pair is r1 x the sine plus (!BattleFx_ShakeX + !Battle_FxScrollAddX) instead of the $7E:E500... - verified
BattleFx_WaveWindowB_ByFrame$D1:EFE3 · 155 B · Battle engine
Bank $D1 · $D1:F000–$FFFF
$D1:F000
Verified · 40
- verified
BattleFx_WaveLeftB$D1:F07E · 107 B · Battle engineBattleFx_WaveLeftA with DP $4F (the word BattleFx_WaveWindowB formed) in place of the !BattleFx_WaveBaseX words. - verified
BattleFx_WaveRight$D1:F0E9 · 31 B · Battle engineThe second pair of the wave windows: A (8-bit, its sign in N) sign- extended, plus DP $51, stored to !BattleFx_WinTable0-2 + Y and !BattleFx_WinTable0+2 + Y. - verified
BattleFx_AddLineOffsets$D1:F108 · 168 B · Battle engineAdds per-line bytes from $7E:0A00 (DP=$0A00 meanwhile) to lines 48-111 and 112-175 of this frame's window table (by bit 0 of !Battle_FrameCount): for n = 0-63, line 48 + n and line 112 + n each... - verified
BattleFx_Init$D1:F1B0 · 609 B · Battle engineThis engine's set-up at the start of a battle (bank $CD's vector $CD:0000, which BattleCF_EnterBattle calls as BattleSys_VecCD0000 before it clears the battle RAM $7E:2D01-$ACEC). - verified
BattleFx_SaveAnimKinds$D1:F411 · 21 B · Battle engineCopies .Unk0 (the kind) of FieldAnimB records 0-7 to !BattleFx_SavedKinds+0..7. - verified
BattleFx_HoldAnimsTick$D1:F426 · 78 B · Battle engineHolds and releases the palette animations around bank $CD's PalAnim_TickAll call (its callers run FdVec_FFF7 right after): - !BattleFx_HoldAnims non-zero, !BattleFx_AnimsHeld still 0: sets... - verified
BattleFx_RandomByte$D1:F474 · 8 B · Battle engineA = RandomTable entry A + !Battle_FrameCount (low byte) + C. - verified
BattleFx_RandomShake$D1:F47C · 68 B · Battle enginePicks a random shake from three argument bytes (base x, base y, mask): x = (random byte & mask) + base x, y = (random byte & mask) + base y, and stores -x and -y (16-bit) to !BattleFx_ShakeX and... - verified
BattleFx_NmiAlt$D1:F4C0 · 153 B · Battle engineA second NMI handler of the battle: BattleCD_ExitBattle installs it at the battle's end, after the closing wipe (the STX at $CD:0420 stores its address to !NmiTrampoline+1, the STA at $CD:041A the... - verified
BattleFx_StepBounce$D1:F559 · 116 B · Battle engineOne step of a bounce for record X = !BattleFx_RecOfs (16-bit fields): - !BattleFx_BounceDir non-zero (falling): !BattleFx_BounceSpeed += !BattleFx_BounceAccel, unless that overflows, which zeroes... - verified
BattleFx_SaveCalcPoints$D1:F5CD · 40 B · Battle engineCopies the six bytes of !Battle_ActCalcResult to !BattleFx_CalcCopy + X (X = the argument byte), two bytes apart: bytes 0, 2, 4 (the x of the three points, probably) to +0, +4, +8, bytes 1, 3, 5... - verified
BattleFx_CopyWin1ToWin2$D1:F5F5 · 133 B · Battle engineCopies the first pair of every line (0-223) of one window table into the second pair of the other: table 0 into table 1 when bit 0 of !Battle_FrameCount is set (the table this frame writes), table... - verified
BattleFx_Op80Dispatch$D1:F67A · 12 B · Battle engineRuns the handler of BattleFx_Op80Table picked by the high nibble of !Battle_ActOp80Args (the bytes battle-script opcode $80 copied; its first byte's low nibble is their count). - verified
BattleFx_Op80Table$D1:F686 · 12 B · Battle engineBattleFx_Op80Dispatch's handlers, by the high nibble of !Battle_ActOp80Args (0-5). - verified
BattleFx_Op80Clear$D1:F692 · 10 B · Battle engineOp80 handler 5 (BattleFx_Op80Table), also run first by BattleFx_Op80Kind4: zeroes !Battle_ShakeXOn, !Battle_ShakeYOn and !Battle_ShakeLayers (the screen shake off). - verified
BattleFx_Op80Bits8$D1:F69C · 8 B · Battle engineBattleFx_Op80Kind4: the value for bits 2-4 of an argument byte (0-7): 1, 2, 3, 4, then single bits 8, $10, $20, $40. - verified
BattleFx_Op80BitsHi$D1:F6A4 · 8 B · Battle engineBattleFx_Op80Kind4: the value for bits 5-7 of an argument byte (0-7): the single bits 1 to $80. - verified
BattleFx_Op80OrA$D1:F6AC · 4 B · Battle engineBattleFx_Op80Kind4: by bits 0-1 of the first argument byte, the bits ORed into !Battle_ShakeLayers ($00, $28, $A0, $A8). - verified
BattleFx_Op80OrB$D1:F6B0 · 4 B · Battle engineThe same by bits 0-1 of the third argument byte ($00, $14, $50, $54: BattleFx_Op80OrA's values shifted right once). - verified
BattleFx_Op80Kind4$D1:F6B4 · 153 B · Battle engineOp80 handler 4: BattleFx_Op80Clear, then fills the two 8-byte groups from !Battle_ShakeXOn (x) and !Battle_ShakeYOn (y) from the argument bytes 1-4 (!Battle_ActOp80Args+1 to +4). - verified
BattleFx_Op80Kind0$D1:F74D · 240 B · Battle engineOp80 handlers 0-3: builds the two FieldAnimB records of !Battle_PalAnimRecs89 (record 8 at +0, record 9 at +12; offsets below are within each record). - verified
BattleFx_BuildGradHdma$D1:F83D · 174 B · Battle engineZeroes !BattleFx_GradHdmaBytes from !BattleFx_GradHdmaA-1 and builds four lists of 4-byte entries, two bytes used in each: - !BattleFx_GradHdmaA: 24 entries (1, v) with v the high byte of a 16-bit... - verified
BattleFx_SortQuadByY$D1:F8EB · 50 B · Battle engineSorts the four points of BattleFx_DrawQuad (DP $12-$19, x then y) by y, top first: four passes of three compare-and-swaps of neighbours (equal y also swap), each swap moving a whole point with... - verified
BattleFx_QuadSlopes$D1:F91D · 85 B · Battle engine!BattleFx_QuadTop = y0, and the four edge slopes of the sorted quad (BattleFx_EdgeSlope): !BattleFx_Slope02 (point 0 to 2), !BattleFx_Slope23, !BattleFx_Slope01 and !BattleFx_Slope13. - verified
BattleFx_EdgeSlope$D1:F972 · 61 B · Battle engineY = (!BattleFx_SlopeXTo - !BattleFx_SlopeXFrom) * 256 / !BattleFx_SlopeDy, signed (the hardware divides the size of the difference; a negative difference negates the quotient): the x step per line... - verified
BattleFx_DrawQuad$D1:F9AF · 56 B · Battle engineDraws quad X of !BattleFx_Quads into this frame's window table: !BattleFx_QuadSlot = X, the quad's eight coordinate bytes (two bytes apart from !BattleFx_Quads + X: x0, y0, x1, y1, x2, y2, x3, y3)... - verified
BattleFx_RasterQuad$D1:F9E7 · 385 B · Battle engineRasterises the y-sorted quad in DP $12-$19 into the window table through the WRAM port: BattleFx_QuadSlopes, then JSL BattleCD_AimWinLineL with A = !BattleFx_QuadTop aims WMADD at that line of the... - verified
BattleFx_AddBoxInset$D1:FB68 · 10 B · Battle engineAdds the argument byte to !BattleFx_BoxInset. - verified
BattleFx_GrowBox$D1:FB72 · 92 B · Battle engineAdds the argument byte to !BattleFx_BoxHalfHeight (h), then sets the first pair of lines !BattleFx_BoxCentre ($6A, line 106) - h to $6A + h - 1 of this frame's window table to left =... - verified
BattleFx_FillWindow$D1:FBCE · 4 B · Battle engineRuns BattleFx_FillTable's handler X: 0 all empty, 2 first pairs empty, 4 second pairs empty, 6 first pairs full (in this frame's table). - verified
BattleFx_FillTable$D1:FBD2 · 8 B · Battle engineBattleFx_FillWindow's handlers, by X = 0, 2, 4, 6. - verified
BattleFx_FillWin1Full$D1:FBDA · 94 B · Battle engineSets the first pair of lines 0-223 of this frame's window table to !BattleFx_WinFull (left 0, right 255): eight blocks of 28 lines, X from $70 down to 4. - verified
BattleFx_FillWin1Empty$D1:FC38 · 94 B · Battle engineSets the first pair of lines 0-223 of this frame's window table to !BattleFx_WinEmpty (left 255, right 0). - verified
BattleFx_FillWin2Empty$D1:FC96 · 94 B · Battle engineSets the second pair of lines 0-223 of this frame's window table to !BattleFx_WinEmpty. - verified
BattleFx_FillAllEmpty$D1:FCF4 · 138 B · Battle engineSets both pairs of lines 0-223 of this frame's window table to !BattleFx_WinEmpty: sixteen blocks of 14 lines, X from $38 down to 2 in steps of 2 (every word). - verified
BattleFx_MirrorWin1ToWin2$D1:FD7E · 206 B · Battle engineLike BattleFx_CopyWin1ToWin2 (first pairs of the other table into the second pairs of this frame's table), but mirrored left to right (the word is inverted and its bytes swapped: left = 255... - verified
BattleFx_ReloadCeSet$D1:FE4C · 37 B · Battle engineWhen !BattleFx_CeSetWant differs from !BattleFx_CeSet (which then takes it), or else when !BattleFx_CeSetReload is set: JSL BattleCE_UnkEE6E with A = !BattleFx_CeSetBase + !BattleFx_CeSet +... - verified
BattleFx_RestoreMathRegs$D1:FE71 · 38 B · Battle engineWrites the math unit's operands again from their mirrors: the dividend and divisor (!Battle_DivMirrorLo/Hi/Divisor, which restarts the division) when !Battle_DivBusy is set, else the two factors... - verified
BattleFx_Irq$D1:FE97 · 93 B · Battle engineThe battle's IRQ handler while this engine runs: BattleFx_Init writes JML $D1:FE97 into !IrqTrampoline and sets the V-count IRQ at line !BattleFx_IrqLine (211). - verified
BankD1_EndFill$D1:FEF4 · 268 B · Engine$FF fill after the last routine, to the end of the bank.
Bank $FD · $FD:0000–$0FFF
$FD:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:1000–$1FFF
$FD:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:2000–$2FFF
$FD:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:3000–$3FFF
$FD:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:4000–$4FFF
$FD:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:5000–$5FFF
$FD:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:6000–$6FFF
$FD:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:7000–$7FFF
$FD:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:8000–$8FFF
$FD:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:9000–$9FFF
$FD:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FD · $FD:A000–$AFFF
$FD:A000
Verified · 23
- verified
BattleFD_UnkA8A5$FD:A8A5 · 41 B · Battle engineChecks whether PC A can act on its command: !Battle_UnkB3EA = 1 when its BattlerStats.Status has bit 7 (KO'd), its .Unk4C+2 or .Unk4C+7 has bit 7 (!Battle_AutoEnemyBit, the bit that makes... - verified
BattleFD_DropPcCommand$FD:A8CE · 48 B · Battle engineDrops the command of PC DP $14: BattleSys_RefundItemLong (gives back an item the command had taken), then its BattleCmd .State and .Kind = 0 and .Partners = $FF, and its gauge restarts as in... - verified
BattleFD_DropLatchedPcCommand$FD:A8FE · 62 B · Battle engineAs BattleFD_DropPcCommand, but only when !Battle_UnkB188[pc] (the latched BattleCmd.State) is non-zero, and it ends with !Battle_ArgSlot = the PC and BattleSys_RemoveReadyLong (service 2: the PC... - verified
BattleFD_UnkA93C$FD:A93C · 35 B · Battle engineBattleFD_DropPcCommand for each PC 0, 1, 2 whose !Battle_CmdPcs byte is non-zero (the PCs of the command BattleSys_UnkB967 drops). - verified
BattleFD_UnkA95F$FD:A95F · 35 B · Battle engineBattleFD_DropLatchedPcCommand for each PC 0, 1, 2 whose !Battle_CmdPcs byte is non-zero (the PCs of the groups BattleSys_UnkB575 marked). - verified
BattleFD_UnkA982$FD:A982 · 14 B · Battle engineZeroes $7E:AD89-$B3F4: the battle's working variables from !Battle_UnkAD89 to !Battle_UnkB3F4 (the turn lists, the action block, the reward sums and most of the other !Battle_Unk* bytes this file... - verified
BattleFD_RestoreEnemies$FD:A990 · 264 B · Battle engineProbably a script command that brings removed enemies back: the caller (BattleAi_RunRestoreAndSetStats, run handler $16, at $C1:A3B6) leaves the script read address in !Battle_UnkB1D2 (bank $CC)... - verified
BattleFD_UnkAA98$FD:AA98 · 24 B · Battle engineSets BattlerStats.Status of all 8 enemy slots (3-10) to !Battle_StatusKo ($80, the other status bits cleared). - verified
BattleFD_UnkAAB0$FD:AAB0 · 34 B · Battle engineBuilds !Battle_Unk7F01EE: bit n set for each enemy entry n (0-7) whose !Battle_UnkAE85 byte is non-zero. - verified
BattleFD_LoadUnkB18E$FD:AAD2 · 47 B · Battle engineFills the 4 bytes !Battle_UnkB18E-B191 from the 11-byte record !Battle_UnkB18C of !BattleRom_UnkCC6FCB: B18E = record byte 0, B18F = the record number, B190 = record byte 1, B191 = 0... - verified
BattleFD_LoadUnkB18E2$FD:AB01 · 47 B · Battle engineBattleFD_LoadUnkB18E with the records of !BattleRom_UnkCC88CB. - verified
BattleFD_UnkAB30$FD:AB30 · 114 B · Battle engineRun by BattleSys_Unk8461 for a PC whose turn is due, before the menu: decides whether the PC acts on its own. - verified
BattleFD_AddEnemyRewards$FD:ABA2 · 204 B · Battle engineAdds the rewards of the enemy in slot DP $0E to the battle's sums, unless its !Battle_UnkAF15 bit 6 is set (!Battle_AF15NotCounted) or its !Battler_UnkAF0A entry is empty. - verified
BattleFD_UnkAC6E$FD:AC6E · 128 B · Battle engineRun by BattleSys_Unk8461 after a turn when !Battle_UnkB2C0 is 0 (no enemy reaction scripts): probably the PCs' counter-attacks. - verified
BattleFD_UnkACEE$FD:ACEE · 15 B · Battle engineZeroes !Battle_UnkAD9B and the $B0 bytes from !Battle_ActPcHitAmount ($AD9C-$AE4B: the first four of the $2C-byte record sets the hit opcodes read). - verified
BattleFD_UnkACFD$FD:ACFD · 12 B · Battle engineZeroes the $84 bytes from !Battle_HitAmount ($B328-$B3AB): the three $2C-byte hit sets (!Battle_HitAmount/!Battle_HitFlags per battler slot) that Battle_RecordHit fills and Battle_ApplyHits... - verified
BattleFD_UnkAD09$FD:AD09 · 14 B · Battle engineSets the three PCs' Tech_MenuEntry blocks ($1A80-$1C23, 3 x $8C bytes) to $FF. - verified
BattleFD_UnkAD17$FD:AD17 · 315 B · Battle engineBattleSys_Main's victory path, after the gold: shows the end-of-battle messages, each one a JSL BattleSys_UnkVecCD0021 with A = the message and its arguments in !Battle_MsgArg0.. - verified
BattleFD_UnkAE52$FD:AE52 · 71 B · Battle engineBuilds a PC's stat block from its character record: for PC slot Y with a character id in !Battler_UnkAEFF (not negative), copies the id's $50-byte record at !Menu_CharRecords + id * $50 to the... - verified
BattleFD_UnkAE99$FD:AE99 · 43 B · Battle engineCopies BattlerStats.Unk57 of PCs 0-2 to !Battle_UnkB3BA-B3BC and counts in !Battle_UnkB3BD how many of them are !Battle_Unk57CountId ($A9). - verified
BattleFD_UnkAEC4$FD:AEC4 · 46 B · Battle engineFor each PC 0-2 whose BattlerStats.Unk57 is !Battle_Unk57FlagId ($AB), sets bit 2 of its BattlerStats.Unk4C+4 (+$50). - verified
BattleFD_UnkAEF2$FD:AEF2 · 142 B · Battle engineFills the 5-byte records of !Battle_Unk1C48 (15 bytes, one record per PC 0-2) from the PCs' stat blocks. - verified
BattleFD_AddItemEntry$FD:AF80 · 156 B · Battle engineAdds item A to the battle item list (Item_BattleList) at offset DP $04, with quantity DP $0E, when the item is one the list takes: an id of $BC or more whose byte 0 in !BattleRom_ItemUseFlags (3 B...
Bank $FD · $FD:B000–$BFFF
$FD:B000
Verified · 29
- verified
BattleFD_AddItemEntry_Skip$FD:B01C · 23 B · Battle engine - verified
BattleFD_ItemRecOffset$FD:B033 · 162 B · Battle engineOffset in bank $CC of item A's record, by id range: below $5A: id * 5 + $0262; $5A-$7A: (id - $5A) * 3 + $047E; $7B-$93: (id - $7B) * 3 + $04E1; $94-$BB: (id - $94) * 4 + $052C; $BC-$F1: (id... - verified
BattleFD_UnkB0D5$FD:B0D5 · 76 B · Battle engineTurn-list and panel setup: zeroes the flags of all 13 turn lists (!Battle_ListFlags), sets every !Battle_ListRuns entry to 10 (!Battle_ListRunsReset: this is where the runs are first set), zeroes... - verified
BattleFD_UnkB121$FD:B121 · 32 B · Battle engineCopies bits 0-1 of each enemy's BattlerStats.Unk47 (slots 3-10) to !Battle_UnkA020 (one byte per enemy entry). - verified
BattleFD_ApplyRecBoost$FD:B141 · 12 B · Battle engineApplies the stat boost an item record names: byte 4 of the record at DP $08 (an address in bank $CC; BattleSys_UnkCE3A points it at three equipment records of a PC, probably the weapon, armour and... - verified
BattleFD_UnkB14D$FD:B14D · 179 B · Battle engineApplies stat boost A to the stat block at DP $00: its 2-byte entry in bank $CC at DP $0E + A * 2 has a stat mask (byte 0) and an amount (byte 1); for each mask bit set, the amount is added to one... - verified
BattleFD_UnkB14D_Done$FD:B200 · 1 B · Battle engine - verified
BattleFD_UnkB201$FD:B201 · 34 B · Battle engineBattleSys_Main's victory path, before the gold is paid: when a PC has BattlerStats.Unk57 = $A9 (!Battle_UnkB3BD non-zero, BattleFD_UnkAE99), adds the !Battle_UnkB28C sum to !Battle_RewardGold... - verified
BattleFD_UnkB223$FD:B223 · 11 B · Battle engineSets !Battle_UnkAE6D entry n to n for n = 0-10. - verified
BattleFD_UnkB22E$FD:B22E · 176 B · Battle engineBattle_SetupBattle's second step: the battlers' entries. - verified
BattleFD_UnkB2DE$FD:B2DE · 97 B · Battle engineBattle_SetupBattle's first step. - verified
BattleFD_UnkB33F$FD:B33F · 36 B · Battle engineBattleFD_UnkB2DE's helper: !Battle_UnkAF1D = 0, !Battle_PcCount = 3, copies $230 bytes from !MenuRom_CharRecordInit ($CC:0000, the new-game records Menu_InitNewGameData copies) to... - verified
BattleFD_UnkB363$FD:B363 · 136 B · Battle engineFor PC slot Y with an id in !Battler_UnkAEFF: - BattlerStats.Unk79 bit 7 set: ORs .Unk7B into the byte at BattlerStats.Status + .Unk7A (a status byte picked by .Unk7A); - BattlerStats.Unk57 = $A0... - verified
BattleFD_UnkB3EB$FD:B3EB · 19 B · Battle engineSets BattlerStats.Unk72 of the slot at X to $32 when its .Unk56 is $3D or $42. - verified
BattleFD_UnkB3FE$FD:B3FE · 58 B · Battle engineFor PC X with an id in !Battler_UnkAEFF: sets the 4 bytes of its BattlerStats.Unk6C to 4, then the byte picked by the highest of BattlerStats.Unk2E bits 7-4 (bit 7: +0, 6: +1, 5: +2, 4: +3) to 5... - verified
BattleFD_UnkB438$FD:B438 · 158 B · Battle engineBuilds an enemy's stat record from ROM: for enemy entry X (also in DP $02), with the id in its !Battler_UnkAF0A entry, the 23-byte record at BattleRom_EnemyStats + id * 23 fills BattlerStats[entry... - verified
BattleFD_ZeroStatBlock$FD:B4D6 · 17 B · Battle engineZeroes $80 bytes from BattlerStats[3].Unk2D + Y (an enemy's stat block, running into the next record's first $2D bytes). - verified
BattleFD_UnkB4E7$FD:B4E7 · 110 B · Battle engineSets the starting values of the turn lists for all 11 slots: the reload value (!Battle_ListReload) and the countdown (!Battle_ListTimers) of lists 0-11 get the same number per list: 0: 60, 1: 150... - verified
BattleFD_UnkB555$FD:B555 · 256 B · Battle engineOne of Battle_SetupBattle's last steps: - zeroes !Battle_UnkAEE6 (17 B), !Battle_UnkB19E (32 B) and the 32 bytes from !Enemy_AnimWanted ($5E0D-$5E2C); - BattleFD_UnkB3EB for each PC whose... - verified
BattleFD_UnkB655$FD:B655 · 221 B · Battle enginePuts item DP $06 in the 4-byte record of slot !Battle_UnkB18B in !Battle_PcItem (8 B per slot) when it is an item the battle list takes (as BattleFD_AddItemEntry: id $BC or more with bit 7 of its... - verified
BattleFD_UnkB732$FD:B732 · 185 B · Battle engineClears the battle's per-battle state (Battle_SetupBattle): - DP $16-$21 and !Battle_UnkAF25 (16-bit) = 0; !Battle_UnkB1FC, !Battle_UnkB253, !Battle_UnkAECB, !Battle_UnkB2C0, !Battle_UnkB3B9 = 0... - verified
BattleFD_UnkB7EB$FD:B7EB · 364 B · Battle engineThe battlers' first turn values (Battle_SetupBattle): - each PC with an id in !Battler_UnkAEFF, and each enemy entry below !Battle_EnemyCount with an id in !Battler_UnkAF0A: its stat block's... - verified
BattleFD_FixedCmdPtrs$FD:B957 · 6 B · Battle engine!BattleRom_FixedCmdPtrs: one word per !Battle_Unk29AC value (0-2), the bank-$FD address of the 21 bytes BattleSys_UnkB725 copies over the three BattleCmd records ($93EE-$9402) in the bit-5 battle. - verified
BattleFD_FixedCmds$FD:B95D · 63 B · Battle engineThe three sets, 21 bytes each: a BattleCmd record (.State, .Kind, .Menu, .Target, .Unk4, .Partners, .ActionId) for PCs 0, 1 and 2. - verified
BattleFD_FixedPartyPtrs$FD:B99C · 6 B · Battle engine!BattleRom_UnkFDB99C: one word per !Menu_Config+28 value (0-2), the bank-$FD address BattleFD_UnkB2DE reads its 8 x 4 words from. - verified
BattleFD_FixedParty$FD:B9A2 · 168 B · Battle engineBattleFD_UnkB2DE's four words per character record: Menu_CharRec .Word3, .Word5, .Word7 and .Word9 (probably current HP, maximum HP, MP and maximum MP: 800, 800, 80, 80 in every entry but one). - verified
BattleFD_AiActLength$FD:BA4A · 23 B · Battle engine!BattleRom_AiActLength: one byte per enemy script action code $00-$16, the bytes of its action record; BattleAi_EnemyTurn and BattleAi_ChooseByChance step through an action part by it. - verified
RandomTableFD$FD:BA61 · 256 B · EngineA byte-identical copy of RandomTable ($C0:FE00): the same shuffle of 0-255. - verified
BankFD_RandomTableTail$FD:BB61 · 1,183 B · EngineNothing found reads it: no matched code refers to it and xref finds no call or jump into it.
Bank $FD · $FD:C000–$CFFF
$FD:C000
Verified · 22
- verified
MainInit$FD:C000 · 215 B · BootCalled via: JML from Reset ($00:FF03), which also carries the soft resets, and JML $FDC000 at $C0:418D (Evt_OpFF96_Reset, after JSR InitHW and S=$06FF). - verified
Ppu_SetBgLayout$FD:C0D7 · 77 B · EngineSets a fixed background layout through DP=$2100, the way MainInit writes the PPU: mode 1 with BG3 on top, BG1/BG2 tiles at VRAM word $1000 and BG3 tiles at $5000, 64x32 maps at $6800 (BG1), $7000... - verified
EngFD_UnkC124$FD:C124 · 202 B · EngineFills the HDMA data block in bank $7F (DB = $7F while it runs). - verified
Hdma_InitChannelsFD$FD:C1EE · 211 B · EngineSets up all 8 HDMA channels through DP=$4300 (saved and restored): channel 0: indirect, 4 registers from BG1SC (BG1SC-BG4SC); channels 1-3: indirect, 2 registers written twice, from BG1HOFS... - verified
EngFD_UnkC2C1$FD:C2C1 · 30 B · EngineOnce a frame: runs entry !Field_Unk26 (0-2) of one of two handler tables and flips !Field_Unk53 bit 0. - verified
EngFD_UnkC2C1Table1$FD:C2DF · 6 B · EngineEngFD_UnkC2C1's handlers by !Field_Unk26 when !Field_Unk53 bit 0 is set. - verified
EngFD_UnkC2C1Table0$FD:C2E5 · 6 B · EngineThe same when !Field_Unk53 bit 0 is clear. - verified
FieldHdma_BuildPlainA$FD:C2EB · 334 B · EngineEngFD_UnkC2C1's handler for Field_Unk26 = 0 on the frames Field_Unk53 bit 0 is set; FieldHdma_BuildTopBandA/BottomBandA come here while Field_Unk27 is 0. - verified
FieldHdma_SetWin2A$FD:C439 · 62 B · EngineWrites set A's channel 7 table (WH2 or WH3, one byte a line): repeat runs of 100 and 112 lines from WinFx_TableA + WinFx_Ch7Alt ($E0) when Hdma_Unk7F0351 bit 0 is clear, from WinFx_TableA when it... - verified
FieldHdma_SetWin2B$FD:C477 · 62 B · EngineAs FieldHdma_SetWin2A for set B's channel 7, with the test inverted: WinFx_TableA + WinFx_Ch7Alt when Hdma_Unk7F0351 bit 0 is set, WinFx_TableA when it is clear (both sets read WinFx_TableA's area). - verified
FieldHdma_SetBg2A$FD:C4B5 · 121 B · EngineWrites set A's channel 2 table (BG2 H/V scroll): Map_Unk1DFD = 0: 100 + 112 lines of Hdma_Bg2Scroll; else 13 repeat runs of 16 lines, each from Hdma_WaveA, so BG2 gets BG3's wave data (Map_Unk1D8F... - verified
FieldHdma_SetBg2B$FD:C52E · 121 B · EngineAs FieldHdma_SetBg2A for set B: Hdma_Bg2Scroll+4 or Hdma_WaveB. - verified
FieldHdma_FillDataA$FD:C5A7 · 336 B · EngineFills the data set A's tables point at: - Hdma_Bg1Scroll = Map_Unk1D87, Map_Unk1D89; Hdma_Bg2Scroll = Map_Unk1D8B, Map_Unk1D8D; - with Field_Unk1DF9 and Map_Unk1DFD both 0 (each tested as a word... - verified
FieldHdma_FillDataB$FD:C6F7 · 336 B · EngineAs FieldHdma_FillDataA for set B: Hdma_Bg1Scroll+4, Hdma_Bg2Scroll+4, Hdma_Bg3Scroll+4, Hdma_WaveB (copied to Hdma_WaveBCopy), Hdma_ColorMath+2/+3 and Hdma_Unk7F1530+2; Map_Unk1DFB is stepped here... - verified
FieldHdma_BuildPlainB$FD:C847 · 334 B · EngineAs FieldHdma_BuildPlainA for table set B (Field_Unk26 = 0 on the frames Field_Unk53 bit 0 is clear): Hdma_Bg1Scroll+4, Hdma_Bg3Scroll+4 or Hdma_WaveB, WinFx_TableB for channel 5, Hdma_ColorMath+2... - verified
FieldHdma_BuildTopBandA$FD:C995 · 707 B · EngineEngFD_UnkC2C1's handler for Field_Unk26 = 1 on the frames Field_Unk53 bit 0 is set. - verified
FieldHdma_WaveRunsStart$FD:CC58 · 6 B · EngineStarts a band builder's BG3 wave table: Y = 0 (offset of the first entry) and HdmaWave_Line = 0 (a 16-bit store, so $01EF too). - verified
FieldHdma_AddWaveRunA$FD:CC5E · 84 B · EngineAdds A lines (8-bit) of the BG3 wave to set A's channel 3 table at offset Y: while A >= 16, an entry ($90: repeat, 16 lines) from Hdma_WaveA + 4 x (HdmaWave_Line AND $F) with HdmaWave_Line += 16... - verified
FieldHdma_SkipWaveLines$FD:CCB2 · 6 B · EngineHdmaWave_Line += A: steps the wave line count over the band's lines, which the band builders write themselves (A and B alike). - verified
FieldHdma_AddWaveRunB$FD:CCB8 · 84 B · EngineAs FieldHdma_AddWaveRunA for set B's channel 3 table, from Hdma_WaveB (and Hdma_WaveBCopy). - verified
FieldHdma_BuildTopBandB$FD:CD0C · 707 B · EngineAs FieldHdma_BuildTopBandA for table set B (Field_Unk26 = 1 on the frames Field_Unk53 bit 0 is clear; n = 0 goes to FieldHdma_BuildPlainB): the set B pairs (Hdma_Bg1Scroll+4, Hdma_Bg3Scroll+4... - verified
FieldHdma_BuildBottomBandA$FD:CFCF · 687 B · EngineEngFD_UnkC2C1's handler for Field_Unk26 = 2 on the frames Field_Unk53 bit 0 is set.
Bank $FD · $FD:D000–$DFFF
$FD:D000
Verified · 15
- verified
FieldHdma_BuildBottomBandB$FD:D27E · 687 B · EngineAs FieldHdma_BuildBottomBandA for table set B (Field_Unk26 = 2 on the frames Field_Unk53 bit 0 is clear; n = 0 goes to FieldHdma_BuildPlainB), with the set B data and helpers as in... - verified
EngFD_UnkD52D$FD:D52D · 167 B · EngineEngFD_UnkC124's helper: builds a table of (CGADSUB, COLDATA) byte pairs at $7F:1538 (channel 6's registers in Hdma_InitChannelsFD), then copies $100 bytes from $7F:1538 to $7F:1600 (MVN; the... - verified
FieldHdma_OldBuildLeftovers$FD:D5D4 · 1,068 B · EngineNot code that runs: xref finds no call or jump to $FD:D5D4 or to the segment starts below except the one JSR inside the first segment. - verified
M7Scene_Run80$FD:DA00 · 95 B · EngineEvent $FF $80's scene, 768 frames: M7Scene_Init, then every frame: wait for the NMI, M7Scene_UpdateScroll, then by M7Scene_Frame: below $20 the iris opens (radius M7Scene_IrisRadii[frame], W12SEL... - verified
M7Scene_Run81$FD:DA5F · 95 B · EngineEvent $FF $81's scene: as M7Scene_Run80 with a shorter schedule, 256 frames: the iris opens below $20, stays open below $A0, closes below $C0, then BG1 is masked; it ends on the frame that sees... - verified
M7Scene_Run82$FD:DABE · 95 B · EngineEvent $FF $82's scene: as M7Scene_Run80 with a shorter schedule, 160 frames: the iris opens below $20, stays open below $40, closes below $60, then BG1 is masked; it ends on the frame that sees... - verified
M7Scene_Run83$FD:DB1D · 122 B · EngineEvents $FF $83-$8F's scene: M7Scene_Run80's 768-frame schedule, plus a flicker: each frame, after the NMI (which sets full brightness), M7Scene_FlickerFrac += $98 and M7Scene_FlickerIdx steps by... - verified
M7Scene_Init$FD:DB97 · 294 B · EngineSets the scene up with interrupts off: DP=$0500, DB=$00, DMA and HDMA off, forced blank, NMI off; M7Scene_Zero = 0; M7Scene_SetVectors, M7Scene_InitPpu, M7Scene_SaveWram7F; copies... - verified
M7Scene_UpdateScroll$FD:DCBD · 217 B · EngineEach frame: writes the M7Scene_Scroll records the HDMA channels 3 and 4 send. - verified
M7Scene_IrisRadii$FD:DD96 · 31 B · EngineThe iris radius for frames 0-30 of an opening or closing (indexed by M7Scene_Frame & $1F): it grows from 2 to $7F, faster and faster. - verified
M7Scene_OamInit$FD:DDB5 · 64 B · EngineOAM low-table entries (X, Y, tile, attributes) for sprites 0-15, copied by M7Scene_Init; the attributes use all four flip combinations, so the one bitmap is drawn mirrored. - verified
M7Scene_FlickerLevels$FD:DDF5 · 32 B · EngineINIDISP brightness per flicker step (M7Scene_Run83): 15 down to 1, back up to 15, then 15 for the last nine steps. - verified
M7Scene_Nmi$FD:DE15 · 114 B · EngineThe scene's NMI handler (JML from NmiTrampoline, installed by M7Scene_SetVectors). - verified
M7Scene_Irq$FD:DE87 · 17 B · EngineThe scene's IRQ handler (JML from IrqTrampoline, installed by M7Scene_SetVectors): saves and restores A, X, Y, DB and DP and does nothing else (the SEP #$20 is undone by the REP #$30 after it). - verified
FieldFD_LoadAnimSetA$FD:DE98 · 394 B · EngineFdVec_FFFA's routine.
Bank $FD · $FD:E000–$EFFF
$FD:E000
Verified · 44
- verified
FieldFD_UploadTileAnims$FD:E022 · 595 B · EngineFdVec_FFFD's routine, run from the field's IRQ (IrqHandler, on the frames Field_Unk53 bit 0 is set) to step the FieldAnimA records and send their tiles to VRAM. - verified
PalAnim_StopAll$FD:E275 · 29 B · EngineFdVec_FFEE's routine: sets .Unk0 of all 12 FieldAnimB records to 0 (kind 0: PalAnim_TickAll still steps their .Unk4 counter but runs no kind for them), so every palette animation stops. - verified
FieldFD_LoadAnimSetB$FD:E292 · 266 B · EngineFdVec_FFF4's routine. - verified
PalAnim_TickAll$FD:E39C · 155 B · EngineFdVec_FFF7's routine. - verified
PalAnim_CopyRomFrame$FD:E437 · 78 B · EngineKind 1: copies .Unk2 colours from PalAnimRom + .Unk6 (a word, .Unk6/.Unk7) + .Unk3 x .Unk2 x 2 (frame .Unk3; product by the multiplier) to Pal_CgramBuf from colour .Unk1 (through PalAnim_Dest). - verified
PalAnim_CopyListFrame$FD:E485 · 99 B · EngineKinds 8-15: as PalAnim_CopyRomFrame, but the frame is the byte at .Ptr + .Unk3 (the list FieldFD_LoadAnimSetB points .Ptr at), read through PalAnim_Dest before it is reused for the destination. - verified
PalAnim_RotateUp$FD:E4E8 · 74 B · EngineKind 3: rotates colours .Unk1 to .Unk1 + .Unk2 (.Unk2 + 1 colours, one more than the other kinds touch) up by one in both Pal_Buf and Pal_CgramBuf: each takes the colour below it, the top one... - verified
PalAnim_RotateDown$FD:E532 · 74 B · EngineKind 2: as PalAnim_RotateUp the other way: each of colours .Unk1 to .Unk1 + .Unk2 takes the colour above it, colour .Unk1 wraps to the top. - verified
PalAnim_Pulse$FD:E57C · 40 B · EngineKind 7: the phase .Unk7 += .Unk3 (8-bit, wrapping); h = the high byte of 2|.Unk7| x .Unk8 (|$80| stays $80, and 2 x $80 is 0); the level is -h (8-bit), then PalAnim_ApplyLevel scales the colours... - verified
PalAnim_Fade$FD:E5A4 · 61 B · EngineKind 5: steps the level .Unk7 by .Unk3 toward .Unk8 (down when .Unk7 >= .Unk8). - verified
PalAnim_ApplyLevel$FD:E5E1 · 110 B · Engine - verified
PalAnim_ScaleRGB$FD:E64F · 82 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 0: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red, green and blue scaled by the level in WRMPYA (channel x... - verified
PalAnim_ScaleB$FD:E6A1 · 48 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 3: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with blue scaled by the level in WRMPYA (channel x level / 256, by... - verified
PalAnim_ScaleG$FD:E6D1 · 55 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 5: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with green scaled by the level in WRMPYA (channel x level / 256, by... - verified
PalAnim_ScaleR$FD:E708 · 50 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 6 or more: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red scaled by the level in WRMPYA (channel x level /... - verified
PalAnim_ScaleRB$FD:E73A · 63 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 2: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red and blue scaled by the level in WRMPYA (channel x level /... - verified
PalAnim_ScaleRG$FD:E779 · 71 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 4: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red and green scaled by the level in WRMPYA (channel x level /... - verified
PalAnim_ScaleGB$FD:E7C0 · 71 B · EnginePalAnim_ApplyLevel's routine for FieldAnimB.Unk6 = 1: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with green and blue scaled by the level in WRMPYA (channel x level... - verified
PalAnim_PulseWhite$FD:E807 · 37 B · EngineKind 6: as PalAnim_Pulse, but toward white: the phase .Unk7 += .Unk3 (8-bit, wrapping); the level is h = the high byte of 2|.Unk7| x .Unk8 (not negated as in kind 7), then PalAnim_ApplyWhiteLevel... - verified
PalAnim_FadeWhite$FD:E82C · 61 B · EngineKind 4: as PalAnim_Fade, but the level lightens the colours toward white (PalAnim_Whiten*: channel + (max - channel) x level / 256) instead of scaling them down, so level 0 leaves them unchanged. - verified
PalAnim_ApplyWhiteLevel$FD:E869 · 110 B · Engine - verified
PalAnim_WhitenRGB$FD:E8D7 · 94 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 0: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red, green and blue each lightened by the level in... - verified
PalAnim_WhitenB$FD:E935 · 45 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 4: for each of the .Unk2 colours from X, blue is lightened as in PalAnim_WhitenRGB and written with Pal_Buf's green bits 3-4 to the high... - verified
PalAnim_WhitenR$FD:E962 · 45 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 1: for each of the .Unk2 colours from X, red is lightened as in PalAnim_WhitenRGB and written with Pal_Buf's green bits 0-2 to the low byte... - verified
PalAnim_WhitenG$FD:E98F · 59 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 2: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with green lightened as in PalAnim_WhitenRGB and red and blue... - verified
PalAnim_WhitenRB$FD:E9CA · 71 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 5: for each of the .Unk2 colours from X, Pal_CgramBuf gets the Pal_Buf colour with red and blue lightened as in PalAnim_WhitenRGB and green... - verified
PalAnim_WhitenGB$FD:EA11 · 75 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 6 or more: for each of the .Unk2 colours from X, Pal_CgramBuf gets green and blue lightened as in PalAnim_WhitenRGB. - verified
PalAnim_WhitenRG$FD:EA5C · 74 B · EnginePalAnim_ApplyWhiteLevel's routine for FieldAnimB.Unk6 = 3: for each of the .Unk2 colours from X, Pal_CgramBuf gets red and green lightened as in PalAnim_WhitenRGB. - verified
M7Scene_SaveWram7F$FD:EAA6 · 17 B · EngineMode 7 scene, continued ($FD:EAA6–$FD:F28F): its helpers and tables (see the banner at M7Scene_Run80) - verified
M7Scene_RestoreWram7F$FD:EAB7 · 17 B · EngineCopies M7Scene_Save7F back to the 512 bytes at $7F0000. - verified
M7Scene_ScreenOff$FD:EAC8 · 18 B · EngineDMA and HDMA off, forced blank, NMI and joypad reading off, then SEI. - verified
M7Scene_ScreenOn$FD:EADA · 17 B · EngineWaits for the start of a vertical blank (RDNMI bit 7), then NMI and joypad reading on, INIDISP = 0 (display on at brightness 0; the NMI sets full brightness), CLI. - verified
M7Scene_WaitNmi$FD:EAEB · 9 B · EngineClears M7Scene_NmiFlag, waits until M7Scene_Nmi has incremented it, and clears it again. - verified
M7Scene_SetVectors$FD:EAF4 · 31 B · EnginePoints NmiTrampoline at M7Scene_Nmi and IrqTrampoline at M7Scene_Irq (a JML each). - verified
M7Scene_InitPpu$FD:EB13 · 120 B · EngineDMA and HDMA off; sprites 32x32/64x64 with tiles at VRAM word $4000; OAM address 0; BG mode 7, no mosaic; BG1SC $48 (unused in mode 7), BG tile bases 0; windows: BG1 window 1 on (W12SEL = 3... - verified
M7Scene_BuildIris$FD:EB8B · 245 B · EngineBuilds the iris window (a circle of radius M7Scene_IrisR around M7Scene_IrisX, on line M7Scene_IrisY of the table) as 255 WH0/WH1 pairs in a window buffer: M7Scene_IrisX = M7Scene_IrisY = $80... - verified
M7Scene_IrisEmptyLines$FD:EC80 · 17 B · EngineWrites A (0: none) empty window lines (WH0 = $FF, WH1 = 0) through WMDATA. - verified
M7Scene_UploadSprGfx$FD:EC91 · 47 B · EngineDMA channel 0: the 8 KB sprite bitmap M7Scene_SprGfx to VRAM word $4000 (the sprite tiles), VMAIN incrementing after the high byte. - verified
M7Scene_ClearSprGfx$FD:ECC0 · 21 B · EngineZeroes the 8 KB sprite bitmap M7Scene_SprGfx through WMDATA. - verified
M7Scene_PlotPixel$FD:ECD5 · 164 B · EngineSets pixel (x, y) = (high byte of M7Scene_PosX, high byte of M7Scene_PosY), both 0-127, of the sprite bitmap to colour A (bits 0-3, one per bitplane). - verified
M7Scene_PixelMasks$FD:ED79 · 16 B · EngineA pixel's bit in a plane byte ($80 >> n, n = x & 7), then the same inverted; M7Scene_Init copies them to M7Scene_BitMasks/ClearMasks. - verified
M7Scene_InitHdma$FD:ED89 · 410 B · EngineSets up HDMA channels 1-5 (all indirect; M7Scene_Nmi enables them): 1 M7A/M7B and 2 M7C/M7D from M7Scene_M7AB / M7CD, 3 M7X/M7Y and 4 BG1HOFS/BG1VOFS from the M7Scene_Scroll records (each for two... - verified
M7Scene_WriteScale$FD:EF23 · 76 B · EngineWrites (A x q) / 64 as a word (low byte first) through WMDATA, where q is the quotient waiting in RDDIVL: A x q is built in M7Scene_Acc ($0C-$0F, from the two 8 x 8 products of the multiplier) and... - verified
M7Scene_InitPalette$FD:EF6F · 146 B · EngineZeroes the 512 bytes of Pal_Buf, then (through WMDATA) colours 0-63: red M7Scene_PalRed[n], blue M7Scene_PalBlue[n], green 0; colours 64-127 stay black; colours 128-255 (the sprite palettes): blue...
Bank $FD · $FD:F000–$FFFF
$FD:F000
Verified · 25
- verified
M7Scene_PalRed$FD:F001 · 128 B · EngineRed (0-$16) of BG colours 0-63 (M7Scene_InitPalette): 0 up to colour 16, a ramp up and down over 17-46, then 0. - verified
M7Scene_PalBlue$FD:F081 · 128 B · EngineBlue (0-15) of BG colours 0-63: up from 0 to 15 and back, each value twice. - verified
M7Scene_PalSprBlue$FD:F101 · 34 B · EngineBlue of the sprite colours by n & 15 (M7Scene_InitPalette): 0, 0, then up by 4 to $1F at 9 and back down to 8. - verified
M7Scene_CyclePalette$FD:F123 · 94 B · EngineEach frame, for BG colours 16-47 (n = 0-31 from colour 16): red = the high byte of ((sin f + $80) & $FF) x M7Scene_CycleAmp[n], green = the same with sin(255 - f) (f = the low byte of... - verified
M7Scene_CycleAmp$FD:F181 · 64 B · EngineWords read by their low byte (M7Scene_CyclePalette, X = n x 2): the pulse depth of colour 16 + n, a ramp 0-$16 and back. - verified
M7Scene_UploadTilemap$FD:F1C1 · 44 B · EngineDMA channel 0: the 16 KB M7Scene_Tilemap to the low bytes of VRAM words 0-$3FFF (the Mode 7 tilemap; VMAIN = 0, increment after the low byte). - verified
M7Scene_BuildTilemap$FD:F1ED · 23 B · EngineWrites the 128 x 128 M7Scene_Tilemap through WMDATA (with DP=$2100 for the WRAM port): M7Scene_BuildTilemapHalf twice, so rows 64-127 repeat rows 0-63. - verified
M7Scene_BuildTilemapHalf$FD:F204 · 30 B · Engine64 rows of 128 tiles through WMDATA: row r (0-63) holds tiles (s + c) & $7F for columns c = 0-127, s = ((sin 4r + $80) & $FF) / 2. - verified
M7Scene_UploadOam$FD:F222 · 42 B · EngineDMA channel 0: the OAM shadow (Oam_LowTable and Oam_HighTable, Oam_ShadowBytes) to OAM from address 0 (OAMADDH is not written). - verified
M7Scene_InitOam$FD:F24C · 26 B · EngineHides all 128 sprites in the OAM shadow: each Y byte of Oam_LowTable = $F0, each Oam_HighTable byte = $55 (X bit 8 set, small). - verified
M7Scene_UploadPalette$FD:F266 · 42 B · EngineDMA channel 0: the 512 bytes of Pal_Buf to CGRAM from colour 0. - verified
FieldAnimListAPtrs$FD:F290 · 128 B · Engine!FieldRom_AnimListAPtrs: one word per LocRom.Tileset12 & $3F ($00-$3F), the offset of its list from FieldAnimListA. - verified
FieldAnimListA$FD:F310 · 1,719 B · Engine!FieldRom_AnimListA: FieldFD_LoadAnimSetA's lists. - verified
FieldAnimListBPtrs$FD:F9C7 · 176 B · Engine!FieldRom_AnimListBPtrs: one word per LocRom.Palette ($00-$57), the offset of its list from FieldAnimListB; labels named as for FieldAnimListAPtrs. - verified
FieldAnimListB$FD:FA77 · 1,202 B · Engine!FieldRom_AnimListB: FieldFD_LoadAnimSetB's lists, 6 records each (one per FieldAnimB record 0-5), by the high nibble of the first byte: db $00-$0F: no animation (.Unk0 = 0); db... - verified
FieldAnimListBOldTail$FD:FF29 · 188 B · EngineNothing found reads it (no matched code refers to it, xref finds no call or jump into it), and it lies past the end of every list: the same bytes as FieldAnimListB's $FE6C-$FF27 (from the frame... - verified
FdVec_FFE5$FD:FFE5 · 3 B · EngineThe bank's service vectors: JMPs at fixed addresses near the end of the bank, so code in other banks can reach them by JSL or JML. - verified
FdVec_FFE8$FD:FFE8 · 3 B · EngineJMP to M7Scene_Run82 (event $FF $82; never returns). - verified
FdVec_FFEB$FD:FFEB · 3 B · EngineJMP to M7Scene_Run81 (event $FF $81; never returns). - verified
FdVec_FFEE$FD:FFEE · 3 B · EngineJMP to PalAnim_StopAll. - verified
FdVec_FFF1$FD:FFF1 · 3 B · EngineJMP to M7Scene_Run80 (event $FF $80; never returns). - verified
FdVec_FFF4$FD:FFF4 · 3 B · EngineA service vector (see FdVec_FFE5): JMP to FieldFD_LoadAnimSetB, which ends with RTL. - verified
FdVec_FFF7$FD:FFF7 · 3 B · EngineJMP to PalAnim_TickAll, which runs the 12 FieldAnimB palette animation records at $0520 (Field_EndOfFrame calls it every frame). - verified
FdVec_FFFA$FD:FFFA · 3 B · EngineJMP to FieldFD_LoadAnimSetA. - verified
FdVec_FFFD$FD:FFFD · 3 B · EngineJMP to FieldFD_UploadTileAnims (from the field's IRQ).
Bank $FF · $FF:0000–$0FFF
$FF:0000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:1000–$1FFF
$FF:1000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:2000–$2FFF
$FF:2000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:3000–$3FFF
$FF:3000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:4000–$4FFF
$FF:4000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:5000–$5FFF
$FF:5000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:6000–$6FFF
$FF:6000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:7000–$7FFF
$FF:7000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:8000–$8FFF
$FF:8000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:9000–$9FFF
$FF:9000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:A000–$AFFF
$FF:A000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:B000–$BFFF
$FF:B000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:C000–$CFFF
$FF:C000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:D000–$DFFF
$FF:D000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:E000–$EFFF
$FF:E000
Nothing in this slice is charted yet: no routine here has been matched.
Bank $FF · $FF:F000–$FFFF
$FF:F000
Verified · 27
- verified
BankFF_BuildTileSets$FF:F548 · 224 B · EngineBuilds tile sets in WRAM from the ten 2bpp tiles of MenuRom_GlyphRows (narrow glyphs, probably the digits 0-9: the code combines their right-hand pixels into tile pairs): - copies the ten tiles... - verified
BankFF_LoadE4Palette$FF:F628 · 79 B · EngineCopies a set of 12 colours from bank $E4 into Menu_PalBuf and marks it for upload (Menu_PalDirty counted up). - verified
BankFF_BuildScreenMap$FF:F677 · 123 B · EngineUnpacks MenuRom_ScreenGfx into Menu_SprUnpackBuf (Decomp_ToWramVec), sets Menu_Unk0D0E to $01FF, and builds a map at Menu_Bg3TileBuf: six pairs of identical 32-byte rows, each row the 16 tile... - verified
BankFF_ScreenMapTiles$FF:F6F2 · 12 B · Engine6 tilemap words, the first entry of each row pair BankFF_BuildScreenMap writes (each next entry is one tile on). - verified
BankFF_ScreenColoursA$FF:F6FE · 8 B · Engine4 words BankFF_BuildScreenMap copies to !Menu_Unk9100 (colours, probably, from the values; the reader is not traced). - verified
BankFF_ScreenColoursB$FF:F706 · 16 B · Engine8 colours BankFF_BuildScreenMap copies to !Menu_PalBuf + $30 (colours $18-$1F of the menu's CGRAM copy). - verified
BankFF_StepWave$FF:F716 · 67 B · EngineSteps a wave and writes it out: Menu_WavePhase and Menu_WaveTick count up; every 4th call Menu_Unk0D0C counts up, Menu_Unk0D0E down and the phase goes back by 2 (a net drift of 1 back per 4 calls). - verified
ScrollWaveFF_A$FF:F759 · 64 B · EngineWave tables ($FF:F759–$FF:F7D8) A byte-identical copy of ScrollWaveA/ScrollWaveB in bank $00 ($C0:FF30–$C0:FFAF): one period of a sine-like wave between -6 and +6 (32 signed 16-bit entries)... - verified
ScrollWaveFF_B$FF:F799 · 64 B · Engine - verified
BankFF_WidenTiles$FF:F7D9 · 58 B · EngineCopies the ten 2bpp tiles of MenuRom_ShadowTiles into Menu_ShadowTiles 32 bytes apart, and sets each tile's plane-2 bytes (offset $10, $12 ... $1E) to plane 0 | plane 1 of the same row, so every... - verified
BankFF_UnkF813$FF:F813 · 318 B · EnginePart of Menu_BuildItemTables' set-up of the tech data (meaning partly inferred). - verified
BankFF_TechStepLimit$FF:F951 · 7 B · Engine1 B per character id 0-6, read by BankFF_UnkF813: a character whose !Menu_Unk7F01E0 bit is clear gets its next single tech marked only while the count it found is below this ($FF: always; 0: never). - verified
BankFF_UnkF958$FF:F958 · 99 B · EngineSets Menu_Unk04A4 entry c (c = 0-4) to 1 when combo c is available, else 0: all the characters in its MenuRom_ComboMembers are in Menu_PartyOrder and the three techs its MenuRom_ComboNeeds names... - verified
BankFF_CharBits$FF:F9BB · 9 B · Engine$80 >> n for n = 0-7, then 0: a character id's bit (as in !Menu_Unk29AF and the tech bytes). - verified
BankFF_UnkF9C4$FF:F9C4 · 55 B · EngineChecks save slot DP $79 (low 2 bits): BankFF_SetSlotOfs, then with DB = $30 (SRAM): A = DP $00 (16-bit) = BankFF_SlotNoSign ($8080) when the slot's Menu_SramSlotSign is not BankFF_SlotSign... - verified
BankFF_SaveSlot$FF:F9FB · 128 B · EngineSaves the game to slot DP $79 (Menu_SlotIdx): Menu_Unk0414 = the slot; Menu_SaveCount counts up (it stays at $FFFF); then each BankFF_SaveRecords block goes to SRAM through Menu_NmiMoveCode... - verified
BankFF_SaveRecords$FF:FA7B · 40 B · EngineThe blocks of a save slot, in order (BankFF_SaveSlot, BankFF_LoadSlot): 8 records of 5 B: address (2 B), bank (1 B), length (2 B). - verified
BankFF_LoadSlot$FF:FAA3 · 74 B · EngineLoads slot Menu_SlotIdx back: the same BankFF_SaveRecords blocks, read from SRAM (Menu_NmiMoveCode as MVN from bank $30, destination bank patched per record), from the slot's offset on. - verified
BankFF_LoadSlotPart$FF:FAED · 212 B · EngineLoads part of slot Menu_SlotIdx: the BankFF_PartRecords blocks (the inventory without $2980-$29AF, and the names), then Menu_Unk7F01E0 = the slot's byte $07E3; then puts each character 6-0 back... - verified
BankFF_PartRecords$FF:FBC1 · 14 B · EngineBankFF_LoadSlotPart's blocks: 2 records of 7 B: offset in the slot (2 B), address (2 B), bank (1 B), length (2 B). - verified
BankFF_EquipOffsets$FF:FBCF · 4 B · EngineOffsets of four equipment bytes in a character record ($27, $28, $2A, $29), read backwards by BankFF_LoadSlotPart (entry 3, the $29 byte, is left out for character 5). - verified
BankFF_SetSlotOfs$FF:FBD3 · 14 B · EngineMenu_SlotSramOfs (DP $7B) = BankFF_SlotSramOfs entry DP $79 & 3. - verified
BankFF_SlotSramOfs$FF:FBE1 · 6 B · EngineSRAM offset of save slots 0-2 ($A00 B apart). - verified
BankFF_SlotChecksum$FF:FBE7 · 29 B · EngineSums the $500 words of the slot at Menu_SlotSramOfs (DP $7B) in SRAM (bank $30, through DP $00 as a pointer), with the carry of each ADC going into the next. - verified
BankFF_BuildGradHdma$FF:FC04 · 83 B · EnginePoints DMA channel 1's table (A1T1L/H) at Menu_GradHdma and builds an HDMA table there: $60 lines with the two bytes $00, $E0, then 16 groups of three 1-line entries with the bytes $02 (groups... - verified
BankFF_GradValues$FF:FC57 · 16 B · EngineThe third byte of each BankFF_BuildGradHdma group: $E8 down to $E0, then $E1 up to $E7 (COLDATA-style values, probably; the register channel 1 feeds is not set here). - verified
BankFF_OldBuildLeftovers$FF:FC67 · 921 B · EngineNot code that runs: tools/xref.py finds no call or jump into $FF:FC67-$FFFF from code.
Where the numbers come from
The code repository's tools/progress.py builds the source, proves which bytes it emits, applies
the readability lint and the review log, and writes symbols/functions.csv and
symbols/progress.json (generated, never committed there). The wiki's tools/sync_progress.py
copies them, with the day-by-day history, into docs/data/, and the site renders them.
The routines themselves are listed on each system page and in the slice pop-ups of the ROM Map.