Engine core
Bank $C0's field engine: the game loop and its per-frame calls, location loading, the map
(collision, tile effects, scrolling and redraws), the field's scene changes and its hand-off to
the battle and to bank $C2, window effects, the staff credits, and the object motion code. Three
parts have pages of their own: Frame cycle and NMI,
Field event scripts and Sprites & objects.
The field code runs with DP=$0100 (the field page, names in asm/include/ram_engine.inc) and
DB=$00; the map code switches to DP=$1D00 (!DP_Map). The function table at the bottom of this
page lists every routine in the "Engine" group, which also takes in the matched code of banks
$C2 and $FD that has no group of its own; "Engine (unnamed)" holds the two routines still
labelled Sub_: Sub_1ADF (purpose unknown) and Sub_C07F9A (no reader of its results traced).
See also: Architecture, Boot, Sprite Init Explainer, ROM Map.
The game loop
GameLoop_LoadField ($C0:007D) loads a location and falls into GameLoop_FrameBody
($C0:0097), which runs, every frame: Field_PauseAndMenuInput, Field_SceneChangeTick,
Field_FrameUpdate, Field_ActionButton, Field_Unk1F87 (the message window's step; see
Field event scripts),
Field_EventHookDispatch, Field_ServiceUnk54, Field_EndOfFrame and Field_WaitFrame. See
Architecture for the order and
Frame cycle and NMI for the end of the frame.
Field_PauseAndMenuInput($C0:18D9): Start pauses (the brightness halves until Start is pressed again); the menu button fades out, saves the field and calls bank$C2's menu entry ("very likely the main menu", per its header).Field_FrameUpdate($C0:881E): with DP=$1D00, the D-pad (Field_DpadDispatchand its 16-entry table), the leader's collision (Map_Unk8A6D, probably), the step limits and the layer scroll (Map_Unk91AC,Map_Unk93E1).Field_ActionButton($C0:1AAC): on the action button, looks for an object in front of the leader (Field_FindObjInFront) and starts its function 1, then checks the tile in front for treasure (Field_CheckTileInFront).
Loading a location
LoadLocation ($C0:00F4) runs ten steps and two bank-$FD vectors:
| Step | Does |
|---|---|
LocLoad_Unk092B |
Find the location's record (LocRom) from Loc_Id |
LocLoad_AudioSetup |
The sound step |
LocLoad_Unk0960 |
Layers 1 and 2 graphics |
LocLoad_Unk6DCF |
Layer 3 graphics (or none) |
LocLoad_Unk7084 |
The location's palette rows |
LocLoad_ClearPage1D00 |
Zero the map page |
LocLoad_UnkA33B |
Map properties: layer sizes and screen settings, then the wrap masks and limits, the tile planes and the exit tiles |
LocLoad_Unk09DD, LocLoad_Unk0A14 |
The layer 1/2 and layer 3 metatile tables |
LocLoad_Unk56D4 |
Unpack and check the event data |
FdVec_FFFA, FdVec_FFF4 |
Location animation set-up (FieldFD_LoadAnimSetA/B): records at $05B0 and $0520, probably the tile and palette animations |
Then Scene_PostLoadInit ($C0:56A6) resets the object tables and runs every object's init
script, and Scene_SettleFrames runs Scene_ReloadStep ($C0:286C: draw the map with
LocLoad_DrawMap, reset the objects, the uploads and palettes, NMI back on) and fades in. Most steps keep
Unk names because verified callers use them; NEXT.md lists the better names waiting for those
callers' next review.
The map
The map is kept in WRAM as metatiles; the map code runs with DP=$1D00.
- Collision and tile effects (
$C0:8A6D–$C0:9174,$C0:9923–$C0:9DC2):Map_Unk8A6Dtests the frame's step against the leader's box with probes for other objects (Map_ProbeHitsObj) and for the map tile under a point (Map_ProbeTileAttrs,Map_ProbeTileLevel,Map_ProbeLevelBlocked), and slides along walls.Map_StepTileEffectscommits a kept step: an exit tile requests a warp (from theExitRomrecords in bank$E5, "inferred: an exit tile"), a tile with attribute bit 4 requests a tile animation, and the tile's level and push are applied.Map_InitEntryTileis its sibling at load time. - Scrolling (
$C0:91AC–$C0:9922):Map_Unk91ACadds up the frame's scroll amounts for three sets of layer scroll words in 1/16 pixel (with a scroll-to target and a screen shake) and splits out whole pixels;Map_Unk93E1steps the words a pixel at a time and notes each 8-pixel boundary crossed. The 16 edge buildersMap_BuildRow*/Map_BuildCol*($C0:8243–$C0:8444) build the new row or column, and the NMI uploads it (Map_UploadRowYInc1…). - Redraws (
$C0:75E9–$C0:8242): whole-layer redraws into the$7E:C800buffer (Field_BuildC800Mode1/2/4), the row and column writers, and the VRAM uploads (Map_UploadBuf*), driven byDefaultHandler's redraw request andField_Unk885A. - Tile animations: the five handlers
ModeE6_Handler…ModeFC_Handler($C0:0D78–$C0:16DB) advance a map tile's state byte and queue the VRAM addresses of its 8×8 tiles for doors and switches that open over a few frames (see Architecture). The field IRQ writes the new tilemap words (see Frame cycle and NMI).TileAnimList(16 words at$7F:1CC8,$C0:28AA–$C0:29F6) remembers the tiles whose animation ran at this location, so that a reload (Scene_ReloadStep) puts their final states back intoMap_TilePropsbefore the map is drawn.
Scene changes, fades and hand-offs
Field_SceneChangeTick ($C0:0C76) and DefaultHandler ($C0:16DC) act on the scene request
bits: warp, bank-$C2 call, tile animation, single tile step, map redraw and battle (see
Architecture). The fades are Fade_StepBrightness and
Fade_StepFixedColor ($C0:1F24, $C0:1F5A).
- Bank $C2 round trips:
Field_SaveState/Field_RestoreState($C0:011B,$C0:01A5) save and rebuild the field around a call toBankC2_Entry8000, withField_StashSaveBlock/Field_RestoreSaveBlockcopying the$14E0-byte save block to$7F:2000and back. - Battle hand-off (
$C0:0283–$C0:0904): before a battleField_Unk038Ffills the hand-off block (FieldBtlPc,FieldBtlObj,FieldBtlPpuat$7E:29B0–$2C7B) with the party's positions, the objects and the PPU state; afterwardsScene_Unk0283readsFieldBtl_Resultand rebuilds in place (FieldBtl_Restore), reloads the location, or restarts the game (probably the game-over path).
Services for other banks
ReentryVectors entries 1–4 ($C0:0002–$C0:000B) are JSL targets for code in other banks
(the calling sites are in banks $CD and $D1, not matched):
ScrollStepAccum($C0:2C41): steps the scroll positions of layers 2 and 3 by signed per-frame speeds in 1/16 pixel and stores them into the battle hand-off'sFieldBtlPpu.Scroll2words; its header suggests the nameLayerDrift_Step, "probably the battle backgrounds' drift".DefaultHandlercalls it too.Field_RefreshHdmaLong($C0:0AFF, formerly the stubAudioDrvSync; it touches no sound): runsEngFD_UnkC2C1twice, so both of its handler tables run once, sets up the HDMA channels and returns the HDMA channel mask.MusicCueDispatch($C0:1BAB): "before a battle, probably". WithFieldBtl_EvtKeepMusicclear it sends sound command$14with a track ($45at load, "the battle music, probably"); with it set, command$70.AudioFadeDispatch($C0:1BE6): "after a battle, probably", byFieldBtl_Result. Result 1 ("the party lost, probably") sends command$14with song$26; otherwise, unlessFieldBtl_EvtKeepMusicis set, it sends command$11withMenu_Config1E(whereEvt_OpEA_PlayMusickeeps the track it starts). It restores DB and D in the wrong order, which is harmless only when the caller has D = 0 and DB = 0; kept as found.
Window effects and credits
Field_EventHookDispatch($C0:21E1) runs one of 16 hooks fromField_EventHookTable: growing and shrinking window shapes on the BG or colour windows, a shape from four moving points, fixed shapes, a pulsing shape that runs its own frames, and a hook that leaves the field for good (Field_HookLeaveToBankC3).Field_ServiceUnk54($C0:274D) builds the staff credits a line at a time from the text at$FD:A000(the NMI sends each line withCredits_UploadLine), and passes map redraw requests on to the NMI.
Objects
The per-frame object pass Vblank_UnkA810 ($C0:A810) moves every object (Obj_MoveStep,
Obj_MoveStepFree), tests it against a window a little larger than the view
(Obj_UpdateInView), ticks its animation and puts it in the draw bucket for its screen position.
Obj_CalcDirection, Obj_SetVelocity and Obj_SetVelocityChecked ($C0:ABA2–$C0:AF2F) set up
moves for the event opcodes. The party members' objects step through Evt_OpB0_PartyControl's
callees ($C0:9E29–$C0:A33A): the leader's step (Party_Unk9E29) logs each frame it moves in a
128-entry ring in bank $7F, and members 2 and 3 (Party_UnkA26B, Party_UnkA2CE) replay it
$18 entries behind the one ahead ($10 when the leader stands), so they walk the leader's path. Each picks its facing and
animation row (walk, run, stand or idle) from the step through Party_AnimTable ($C0:9FF7, 65
words). Positions are in 1/16 pixel; the high byte is the 16-pixel map
tile. The tile-slot and palette-slot allocators (Obj_TileSlot*, Obj_PalSlot*,
$C0:6F9A–$C0:7083, $C0:7170–$C0:7398) give objects VRAM and palette space by kind. See
Sprites & objects for drawing.
Bank $FD field code
The field HDMA set-up (EngFD_UnkC124, Hdma_InitChannelsFD, EngFD_UnkC2C1 with its two
handler tables, $FD:C124–$FD:C2EA, and EngFD_UnkD52D), and the location animation set-up
(FieldFD_LoadAnimSetA / B and the vectors FdVec_FFF4 / FFF7 / FFFA).
What is not matched yet
Bank $C0 is fully matched. Its last code is the message choice cursor that the field IRQ draws
(Irq_DrawChoiceCursor, $C0:F05E; see Frame cycle and NMI), and
after that the bank holds only data (see the ROM Map).
From NEXT.md, what is left of the field code is in bank $FD: the IRQ's other phase
FdVec_FFFD, the HDMA builders behind EngFD_UnkC2C1's tables, and EngFD_UnkE39C
(FdVec_FFF7's target).
Functions
| Address | Function | Size | Status | Notes |
|---|---|---|---|---|
$C0:0000 | ReentryVectors | 14 | verified | Mid-game re-entry vector table at the start of the bank. |
$C0:000E | GameLoop | 79 | verified | full (cold) init, then the game loop |
$C0:005D | GameLoop_ | 21 | verified | warm-restart entry. |
$C0:0072 | GameLoop_ | 11 | verified | reached when bit 15 of Loc_Id - Loc_FirstBankC2 is set. |
$C0:007D | GameLoop_ | 26 | verified | loads the field location Loc_Id and falls into the per-frame loop. |
$C0:0097 | GameLoop_ | 40 | verified | the per-frame field loop. |
$C0:00BF | Field_ | 31 | verified | End-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. |
$C0:00DE | Field_ | 13 | verified | the EngFD_UnkC2C1 + FdVec_FFF7 part of Field_EndOfFrame only, for the fade and idle loops. |
$C0:00EB | Field_ | 9 | verified | one frame of field upkeep without game logic: Field_FrameUpdate, Field_EndOfFrameShort, Field_WaitFrame (tail jump, whose RTS returns to this routine's caller). |
$C0:00F4 | LoadLocation | 39 | verified | One-time location-load called once per scene entry from GameLoop_LoadField (its only caller, JSR at $C0:0088). |
$C0:011B | Field_ | 138 | verified | (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... |
$C0:01A5 | Field_ | 167 | verified | (was Sub_01A5.) Rebuilds the field after a bank-$C2 round trip: 1. |
$C0:024C | Scene_ | 55 | verified | The 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. |
$C0:0283 | Scene_ | 200 | verified | Rebuilds the field after a battle; DefaultHandler calls it right after JSL EngCall_BattleMain. |
$C0:034B | Field_ | 68 | verified | Scene_Unk024C's no-battle path, and the end of Scene_Unk0283's rebuild (fall-through). |
$C0:038F | Field_ | 12 | verified | Fills 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... |
$C0:039B | FieldBtl_ | 127 | verified | Copies 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... |
$C0:041A | FieldBtl_ | 211 | verified | For 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... |
$C0:04ED | FieldBtl_ | 106 | verified | Marks 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. |
$C0:0557 | FieldBtl_ | 192 | verified | Saves one object (A = its slot) in a FieldBtlObj record, unless its Obj_VramTile low byte is FieldBtl_ObjTileLimit or more (then it does nothing). |
$C0:0617 | Field_ | 86 | verified | Fills 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... |
$C0:066D | FieldBtl_ | 168 | verified | Fills 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... |
$C0:0715 | FieldBtl_ | 86 | verified | Scene_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. |
$C0:076B | FieldBtl_ | 129 | verified | For 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). |
$C0:07EC | FieldBtl_ | 133 | verified | Puts one object (A = slot) back from its FieldBtlObj record (X = record offset). |
$C0:0871 | FieldBtl_ | 47 | verified | Obj_DrawUnlink then FieldBtl_RestorePc for each party member from its FieldBtlPc record. |
$C0:08A0 | FieldBtl_ | 101 | verified | FieldBtl_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... |
$C0:0905 | Field_ | 19 | verified | (was Sub_0905.) Copies SceneSave_Buffer ($7F:2000) back over Field_SaveBlock ($7E:0920, $14E0 bytes). |
$C0:0918 | Field_ | 19 | verified | (was Sub_0918.) Copies Field_SaveBlock ($7E:0920, $14E0 bytes) to SceneSave_Buffer ($7F:2000). |
$C0:092B | LocLoad_ | 53 | verified | First location-load step: Loc_RecOfs = (Loc_Id & $FF) x LocRom_RecSize, plus LocRom_HalfOfs when Loc_Id bit 8 is set, i.e. |
$C0:0960 | LocLoad_ | 125 | verified | Loads the graphics of layers 1 and 2. |
$C0:09DD | LocLoad_ | 55 | verified | Unpacks 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... |
$C0:0A14 | LocLoad_ | 60 | verified | Unpacks 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... |
$C0:0A50 | LocLoad_ | 175 | verified | Draws the freshly loaded map: - Map_LoadTreasureTiles (DP=$1D00), Ppu_SetBgLayout and Ppu_ApplyMapScreens; - with DP=$1D00: Map_InitOrigin, LocLoad_EmptyStep, the tilemap VRAM bases... |
$C0:0AFF | Field_ | 41 | verified | (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... |
$C0:0B28 | Scene_ | 38 | verified | Scene_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... |
$C0:0B4E | InitHW | 22 | verified | Disables interrupts, enables forced blank, clears NMI/DMA/HDMA, and sets DB=$00 (PHA/PLB), which GameLoop_Main and other callers rely on. |
$C0:0B64 | InstallNMI | 17 | verified | Writes JML NmiHandler ($C0:EA63) into the RAM trampoline at $7E:0500. |
$C0:0B75 | InstallIRQ | 17 | verified | Writes JML IrqHandler ($C0:ECCC) into the RAM trampoline at $7E:0504. |
$C0:0B86 | Field_ | 240 | verified | (was FrameStateInit.) Called once per location load from GameLoop_LoadField, not per frame. |
$C0:0C76 | Field_ | 258 | verified | (was Sub_0C76.) Runs every frame from GameLoop_FrameBody. |
$C0:0D78 | ModeE6_ | 231 | verified | Tile animation for map-tile state $E6: a 1x2 column, the tile at (Field_TileAnimX, Field_TileAnimY) and the one above it. |
$C0:0E5F | ModeEC_ | 437 | verified | Tile animation for map-tile state $EC: a 2x2 block, columns col..col+1, rows row-1..row. |
$C0:1014 | ModeEE_ | 437 | verified | Tile animation for map-tile state $EE: a 2x2 block, columns col-1..col, rows row-1..row (ModeEC_Handler mirrored). |
$C0:11C9 | ModeFA_ | 651 | verified | Tile animation for map-tile state $FA: a 2-wide, 3-tall block, columns col..col+1, rows row-2..row. |
$C0:1454 | ModeFC_ | 648 | verified | Tile animation for map-tile state $FC: a 2-wide, 3-tall block, columns col-1..col, rows row-2..row (ModeFA_Handler mirrored). |
$C0:16DC | DefaultHandler | 509 | verified | The 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... |
$C0:18D9 | Field_ | 172 | verified | (was Sub_18D9.) Per-frame pause and menu input, called from GameLoop_FrameBody before Field_SceneChangeTick. |
$C0:1985 | Field_ | 66 | verified | (was Sub_1985.) Called from Field_PauseAndMenuInput when Pad_Unk00F6 bit 0 is set. |
$C0:19C7 | Field_ | 60 | verified | (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... |
$C0:1A03 | Party_ | 169 | verified | (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... |
$C0:1AAC | Field_ | 51 | verified | (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. |
$C0:1ADF | Sub_ | 87 | verified | Purpose unknown: every variable it touches (Field_Unk34, Field_Unk62-66, Pad_Unk00F6-F8) is still unidentified, so it keeps its address name. |
$C0:1B36 | Bg_ | 29 | verified | (was Sub_1B36.) Word offset of an 8x8 tile in a 64x32 BG tilemap made of two 32x32 screens side by side. |
$C0:1B53 | LocLoad_ | 61 | verified | LoadLocation's sound step. |
$C0:1B90 | Audio_ | 2 | verified | (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... |
$C0:1B92 | Audio_ | 21 | verified | shared tail; Audio_PlayTileSfxA falls in here and Audio_PlayTileSfxB branches here (BRA at $C0:1BA9). |
$C0:1BA7 | Audio_ | 4 | verified | (was Sub_1BA7.) Plays sound effect Audio_SfxTileAnimB: same as Audio_PlayTileSfxA with the other effect id, sharing its tail Audio_PlaySfxAtLeader. |
$C0:1BAB | MusicCueDispatch | 59 | verified | Before 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... |
$C0:1BE6 | AudioFadeDispatch | 278 | verified | After 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... |
$C0:1CFC | Field_ | 90 | verified | Looks for an object the leader can act on in the facing direction. |
$C0:1D56 | Field_ | 8 | verified | Field_FindObjInFront's reach test for each facing, indexed by Obj_Facing x 2. |
$C0:1D5E | Field_ | 38 | verified | Facing 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... |
$C0:1D84 | Field_ | 35 | verified | Facing 1: as Field_ObjInReachUp for an object below the leader (Obj_PosY - Field_FindLeaderY not negative). |
$C0:1DA7 | Field_ | 4 | verified | |
$C0:1DAB | Field_ | 38 | verified | Facing 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... |
$C0:1DD1 | Field_ | 35 | verified | Facing 3: as Field_ObjInReachLeft for an object right of the leader (Obj_PosX - Field_FindLeaderX not negative). |
$C0:1DF4 | Field_ | 158 | verified | The action button's map check: treasure on the tile in front of the leader. |
$C0:1E92 | Field_ | 8 | verified | Field_CheckTileInFront's tile pick for each facing, indexed by Obj_Facing x 2. |
$C0:1E9A | Field_ | 45 | verified | Facing 0: the tile one row above the leader (Obj_TileY - 1). |
$C0:1EC7 | Field_ | 23 | verified | Facing 1: the tile one row below the leader. |
$C0:1EDE | Field_ | 2 | verified | |
$C0:1EE0 | Field_ | 23 | verified | Facing 2: the tile one column left of the leader. |
$C0:1EF7 | Field_ | 23 | verified | Facing 3: the tile one column right of the leader. |
$C0:1F0E | Field_ | 22 | verified | Field_CheckTileInFront's tail: A = the TreasureKind_* value. |
$C0:1F24 | Fade_ | 54 | verified | (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... |
$C0:1F5A | Fade_ | 45 | verified | (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. |
$C0:1F87 | Field_ | 299 | verified | By Field_Unk29 (the message state): - 0: nothing. |
$C0:20B2 | Field_ | 64 | verified | Zeroes 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... |
$C0:20F2 | Field_ | 52 | verified | Starts 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... |
$C0:2126 | Field_ | 187 | verified | One step of the message text. |
$C0:21E1 | Field_ | 13 | verified | Runs the Field_EventHook handler for this frame: entry Field_EventHook - 1 of Field_EventHookTable; nothing when it is 0. |
$C0:21EE | Field_ | 32 | verified | 16 handler addresses, indexed by (Field_EventHook - 1) x 2. |
$C0:220E | Field_ | 91 | verified | Hook 1: one frame of a growing window shape. |
$C0:2269 | Field_ | 111 | verified | Hook 2: the reverse of hook 1. |
$C0:22D8 | Field_ | 81 | verified | Hook 3. |
$C0:2329 | Field_ | 1 | verified | |
$C0:232A | Field_ | 96 | verified | Hook 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... |
$C0:238A | Field_ | 88 | verified | Hook 5: the reverse of hook 4 (mode 1, colour window). |
$C0:23E2 | Field_ | 39 | verified | |
$C0:2409 | Field_ | 267 | verified | Hook 6: a colour-window shape from four moving points, for WinFx_QuadTimer frames. |
$C0:2514 | Field_ | 117 | verified | Hooks 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. |
$C0:2589 | Field_ | 133 | verified | Hooks 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... |
$C0:260E | Field_ | 65 | verified | Hook 11: leaves the field for good. |
$C0:264F | Field_ | 214 | verified | Hook 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... |
$C0:2725 | Field_ | 40 | verified | One 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). |
$C0:274D | Field_ | 158 | verified | (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. |
$C0:27EB | Field_ | 57 | verified | |
$C0:2824 | Field_ | 36 | verified | (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. |
$C0:2848 | Scene_ | 36 | verified | The field-load fade-in: a copy of Field_FadeInAfterReload just before it, differing in one call. |
$C0:286C | Scene_ | 62 | verified | Rebuilds 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... |
$C0:28AA | TileAnimList_ | 22 | verified | Fills TileAnimList with TileAnimList_Empty (all 16 entries). |
$C0:28C0 | TileAnimList_ | 33 | verified | Adds 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. |
$C0:28E1 | TileAnimList_ | 24 | verified | Runs TileAnimList_ApplyOne for each TileAnimList entry up to the first empty one (or all 16). |
$C0:28F9 | TileAnimList_ | 254 | verified | Puts 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... |
$C0:29F7 | Field_ | 385 | verified | Writes 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. |
$C0:2B78 | Field_ | 201 | verified | Writes 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... |
$C0:2C41 | ScrollStepAccum | 391 | verified | Steps 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. |
$C0:2DC8 | VramDma_ | 41 | verified | Copies 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. |
$C0:2DF1 | ClearRAMDMA | 45 | verified | Zeros a WRAM region via DMA channel 7, sourcing from MPYL (always 0 since M7A=M7B=0). |
$C0:2E1E | Sys_ | 73 | verified | (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... |
$C0:2E67 | Evt_ | 6 | verified | Event 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... |
$C0:2E6D | Evt_ | 7 | verified | |
$C0:2E74 | Evt_ | 19 | verified | |
$C0:2E87 | Evt_ | 4 | verified | Event opcode $B3 (1 byte): Evt_SetAnimRow with row 0 (ObjAnim_RowStand, the row Obj_SetStandAnim uses); X = Y + 1, C=1. |
$C0:2E8B | Evt_ | 4 | verified | Event opcode $B4 (1 byte): Evt_SetAnimRow with row 1 (ObjAnim_RowWalk, the row Obj_SetMoveAnim walks with); X = Y + 1, C=1. |
$C0:2E8F | Evt_ | 11 | verified | Event 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. |
$C0:2E9A | Evt_ | 103 | verified | Event opcode $AB (2 bytes: $AB, row): plays animation row once in mode 2 and waits for it. |
$C0:2F01 | Evt_ | 112 | verified | Event 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 =... |
$C0:2F71 | Evt_ | 37 | verified | Event 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)... |
$C0:2F96 | Evt_ | 48 | verified | Event opcode $AD (2 bytes: $AD, n): waits n of the object's script runs. |
$C0:2FC6 | Evt_ | 4 | verified | Event opcode $B9 (1 byte): Evt_WaitRuns with n = 4; X = Y + 1 when done. |
$C0:2FCA | Evt_ | 4 | verified | Event opcode $BA (1 byte): Evt_WaitRuns with n = 8; X = Y + 1 when done. |
$C0:2FCE | Evt_ | 4 | verified | Event opcode $BD (1 byte): Evt_WaitRuns with n = $20; X = Y + 1 when done. |
$C0:2FD2 | Evt_ | 2 | verified | Event opcode $BC (1 byte): Evt_WaitRuns with n = $10. |
$C0:2FD4 | Evt_ | 41 | verified | |
$C0:2FFD | Evt_ | 5 | verified | Event 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. |
$C0:3002 | Evt_ | 91 | verified | Event 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. |
$C0:3154 | Evt_ | 93 | verified | The touch counterpart of Evt_StartTargetFunc1: starts function 2 of the object in Field_UnkEB. |
$C0:31B1 | Evt_ | 187 | verified | Moves the object in Field_UnkEB one tile on in the leader's facing, probably a push. |
$C0:326C | Evt_ | 494 | verified | Event opcode $D9 (7 bytes: $D9, then column, row for the leader, member 2 and member 3): walks the party members to three tiles. |
$C0:345A | Evt_ | 229 | verified | Event opcode $DA (1 byte): party members 2 and 3 walk to the leader. |
$C0:353F | Evt_ | 4 | verified | Event opcode $B1 (1 byte): ends the object's run here: X = Y + 1 (the next opcode, for the next run), C=0. |
$C0:3543 | Evt_ | 3 | verified | Event opcode $B2 (1 byte): stops the object on this opcode for good: X = Y (the opcode again), C=0. |
$C0:3546 | Evt_ | 9 | verified | Event 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. |
$C0:354F | Evt_ | 8 | verified | Event opcode $B6 (2 bytes: $B6, p): runs Evt_Op95_WalkToPc (a step toward party member p) with X = Y returned: the opcode stays. |
$C0:3557 | Evt_ | 25 | verified | Event 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. |
$C0:3570 | Evt_ | 69 | verified | Event opcode $BB (2 bytes: $BB, msg): shows message msg (probably; see the banner) with Field_Unk30 = 0. |
$C0:35B5 | Evt_ | 71 | verified | Event opcode $C1 (2 bytes: $C1, msg): as Evt_OpBB_Msg with Field_Unk30 = 1. |
$C0:35FC | Evt_ | 71 | verified | Event opcode $C2 (2 bytes: $C2, msg): as Evt_OpBB_Msg with Field_Unk30 = 2. |
$C0:3643 | Evt_ | 49 | verified | Event 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)... |
$C0:3674 | Evt_ | 54 | verified | |
$C0:36AA | Evt_ | 51 | verified | Event opcode $C3 (3 bytes: $C3, msg, choices): as Evt_OpC0_MsgChoice with Field_Unk30 = 1. |
$C0:36DD | Evt_ | 52 | verified | Event opcode $C4 (3 bytes: $C4, msg, choices): as Evt_OpC0_MsgChoice with Field_Unk30 = 2 (it reaches Evt_MsgChoiceStart with a BRL). |
$C0:3711 | Evt_ | 70 | verified | Event 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... |
$C0:3757 | Evt_ | 41 | verified | Event 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... |
$C0:3780 | Evt_ | 49 | verified | Event opcode $C9 (3 bytes: $C9, item, n): BankC1_Entry8003 service 0 (BankC1Svc_FindItem) with Y = item. |
$C0:37B1 | Evt_ | 11 | verified | Event opcode $CA (2 bytes: $CA, item): BankC1_Entry8003 service 1 (BankC1Svc_AddItem, one more of item Y = item); X = Y + 2, C=1. |
$C0:37BC | Evt_ | 11 | verified | |
$C0:37C7 | Evt_ | 28 | verified | Event 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. |
$C0:37E3 | Evt_ | 22 | verified | Event 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. |
$C0:37F9 | Evt_ | 46 | verified | Event 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... |
$C0:3827 | Evt_ | 52 | verified | Event opcode $CC (4 bytes: $CC, amount (word), n): BankC1_Entry8003 service 3 (BankC1Svc_HasGold) with Y = amount. |
$C0:385B | Evt_ | 25 | verified | Event opcode $CD (3 bytes: $CD, amount (word)): BankC1_Entry8003 service 4 (BankC1Svc_AddGold) with Y = amount; X = Y + 3, C=1. |
$C0:3874 | Evt_ | 25 | verified | Event 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. |
$C0:388D | Evt_ | 49 | verified | Event opcode $CF (3 bytes: $CF, char, n): BankC2_Entry8004 command 3 (BankC2Cmd_FindListed) with Y = char. |
$C0:38BE | Evt_ | 21 | verified | Event opcode $D0 (2 bytes: $D0, char): BankC2_Entry8004 command 4 (BankC2Cmd_AddToReserve) with Y = char; X = Y + 2. |
$C0:38D3 | Evt_ | 21 | verified | Event 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. |
$C0:38E8 | Evt_ | 49 | verified | Event opcode $D2 (3 bytes: $D2, char, n): BankC2_Entry8004 command 0 (BankC2Cmd_FindInParty) with Y = char. |
$C0:3919 | Evt_ | 53 | verified | Event opcode $D3 (2 bytes: $D3, char): BankC2_Entry8004 command 1 (BankC2Cmd_AddToParty) with Y = char, then ObjQ_Unk78 = ObjQ_Unk78Set1. |
$C0:394E | Evt_ | 185 | verified | Event 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... |
$C0:3A07 | Evt_ | 97 | verified | Event 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... |
$C0:3A68 | Evt_ | 27 | verified | Event opcode $D5 (3 bytes: $D5, a, b): BankC2_Entry8004 command $0A (BankC2Cmd_Unk0A) with Y = a and X = b; X = Y + 3. |
$C0:3A83 | Evt_ | 52 | verified | Event 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... |
$C0:3AB7 | Evt_ | 58 | verified | Event 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... |
$C0:3AF1 | Evt_ | 42 | verified | Event 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... |
$C0:3B1B | Evt_ | 42 | verified | Event 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. |
$C0:3B45 | Evt_ | 6 | verified | Event opcode $DE (5 bytes, as $DD): Field_Unk1E = 1 (Field_Unk1EOn; Field_FadeInAfterReload clears it), then BRA to Evt_OpDD_SetLoc. |
$C0:3B4B | Evt_ | 77 | verified | Event 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... |
$C0:3B98 | Evt_ | 6 | verified | Event opcode $DF (5 bytes, as $E1): Field_Unk1E = 1 (Field_Unk1EOn), then BRA to Evt_OpE1_WarpNow (never returns). |
$C0:3B9E | Evt_ | 103 | verified | Event 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... |
$C0:3C05 | Evt_ | 12 | verified | Event 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. |
$C0:3C11 | Evt_ | 30 | verified | Event 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 =... |
$C0:3C2F | Evt_ | 29 | verified | Event 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... |
$C0:3C4C | Evt_ | 76 | verified | Event 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... |
$C0:3C98 | Evt_ | 36 | verified | Event 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. |
$C0:3CBC | Evt_ | 9 | verified | Event 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. |
$C0:3CC5 | Evt_ | 11 | verified | Event 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. |
$C0:3CD0 | Evt_ | 45 | verified | Event opcode $F0 (2 bytes: $F0, b): the high nibble of b is a screen brightness (0-15). |
$C0:3CFD | Evt_ | 10 | verified | Event 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. |
$C0:3D07 | Evt_ | 115 | verified | Event 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). |
$C0:3D7A | Evt_ | 10 | verified | Event 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. |
$C0:3D84 | Evt_ | 19 | verified | Event 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. |
$C0:3D97 | Evt_ | 46 | verified | Event 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)... |
$C0:3DC5 | Evt_ | 47 | verified | Event 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... |
$C0:3DF4 | Evt_ | 60 | verified | Event 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... |
$C0:3E30 | Evt_ | 44 | verified | Event 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... |
$C0:3E5C | Evt_ | 11 | verified | Event opcode $F8 (1 byte): BankC2_Entry8004 commands 6 and 7 (BankC2Cmd_Unk06, BankC2Cmd_Unk07); X = Y + 1. |
$C0:3E67 | Evt_ | 7 | verified | |
$C0:3E6E | Evt_ | 7 | verified | Event 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). |
$C0:3E75 | Evt_ | 7 | verified | Event 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). |
$C0:3E7C | Evt_ | 8 | verified | Opcode $FF $9F (2 bytes): BankC2_Entry8004 command 8 (BankC2Cmd_Unk08, Menu_CmdSetSram7FE2, which stores $FF at $30:7FE2) through Evt_BankC2CmdTail; X = Y + 2. |
$C0:3E84 | Evt_ | 82 | verified | Event 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... |
$C0:3ED6 | Evt_ | 2 | verified | Event 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. |
$C0:3ED8 | Evt_ | 6 | verified | |
$C0:3EDE | Evt_ | 4 | verified | Event 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. |
$C0:3EE2 | Evt_ | 4 | verified | Event 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. |
$C0:3EE6 | Evt_ | 44 | verified | Event 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). |
$C0:3F12 | Evt_ | 20 | verified | Event 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. |
$C0:3F26 | Evt_ | 137 | verified | Event 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... |
$C0:3FAF | Evt_ | 95 | verified | Event opcode $FF (2 bytes or more: $FF, sub, ...): sub is kept in EvtFF_Sub. |
$C0:400E | Evt_ | 40 | verified | 20 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). |
$C0:4036 | Evt_ | 31 | verified | Opcode $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)... |
$C0:4055 | Evt_ | 8 | verified | Opcode $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). |
$C0:405D | Evt_ | 86 | verified | Opcode $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... |
$C0:40B3 | Evt_ | 60 | verified | Opcode $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... |
$C0:40EF | Evt_ | 86 | verified | Opcode $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. |
$C0:4145 | Evt_ | 60 | verified | Opcode $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. |
$C0:4181 | Evt_ | 16 | verified | Opcode $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). |
$C0:4191 | Evt_ | 31 | verified | Opcode $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). |
$C0:41B0 | Evt_ | 4 | verified | Opcode $FF $98 (2 bytes): Field_EventHook = EventHook_WinShrink1 (hook 5) through Evt_OpFF_SetHookTail; X = Y + 2 (no wait). |
$C0:41B4 | Evt_ | 4 | verified | Opcode $FF $99 (2 bytes): Field_EventHook = EventHook_WinFixedA1 (hooks 7/8) through Evt_OpFF_SetHookTail; X = Y + 2 (no wait). |
$C0:41B8 | Evt_ | 2 | verified | Opcode $FF $9A (2 bytes): Field_EventHook = EventHook_WinFixedB1 (hooks 9/10); X = Y + 2 (no wait). |
$C0:41BA | Evt_ | 6 | verified | |
$C0:41C0 | Evt_ | 4 | verified | Opcode $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. |
$C0:41C4 | Evt_ | 4 | verified | Opcode $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. |
$C0:41C8 | Evt_ | 20 | verified | Opcode $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... |
$C0:41DC | Evt_ | 8 | verified | Opcode $FF $9D (2 bytes): clears Field54_Push in Field_Unk54, which lets Evt_PushTarget start another push; X = Y + 2. |
$C0:41E4 | Evt_ | 8 | verified | Event opcode $57 (1 byte): Chr_ObjSlot[0] = Obj_Cur, then Evt_InitCharTail with character 0 (see Evt_Op80_InitCharObj). |
$C0:41EC | Evt_ | 8 | verified | Event opcode $5C (1 byte): as Evt_Op57_InitChar0 for character 1. |
$C0:41F4 | Evt_ | 8 | verified | Event opcode $62 (1 byte): as Evt_Op57_InitChar0 for character 2. |
$C0:41FC | Evt_ | 8 | verified | Event opcode $68 (1 byte): as Evt_Op57_InitChar0 for character 4. |
$C0:4204 | Evt_ | 8 | verified | Event opcode $6A (1 byte): as Evt_Op57_InitChar0 for character 3. |
$C0:420C | Evt_ | 8 | verified | Event opcode $6C (1 byte): as Evt_Op57_InitChar0 for character 5. |
$C0:4214 | Evt_ | 6 | verified | Event 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... |
$C0:421A | Evt_ | 4 | verified | |
$C0:421E | Evt_ | 76 | verified | Event 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 =... |
$C0:426A | Evt_ | 524 | verified | |
$C0:4476 | Evt_ | 23 | verified | Event opcode $81 (2 bytes: $81, record): Obj_Cur becomes an object with sprite record record: Obj_Unk1100 = Obj_Unk1100Kind3, Obj_Unk1B01 = Obj_Unk1B01Solid, Obj_Unk1101 = record, then... |
$C0:448D | Evt_ | 202 | verified | |
$C0:4557 | Evt_ | 57 | verified | The 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... |
$C0:4590 | Evt_ | 335 | verified | Event 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... |
$C0:46DF | Evt_ | 392 | verified | Event 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... |
$C0:4867 | Evt_ | 15 | verified | Event 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). |
$C0:4876 | Evt_ | 28 | verified | Event 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... |
$C0:4892 | Evt_ | 444 | verified | Event 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). |
$C0:4A4E | Evt_ | 222 | verified | Event opcode $2E ($2E, kind, ...): as Evt_Op88_ObjPalAnim's kinds $4x/$5x and $8x, with absolute colour numbers instead of the object's palette. |
$C0:4B2C | Evt_ | 29 | verified | Finds 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. |
$C0:4B49 | Evt_ | 15 | verified | Event opcode $89 (2 bytes: $89, speed): Obj_Cur's Obj_Speed = speed (the step the Obj_SetVelocity* routines scale the direction by). |
$C0:4B58 | Evt_ | 28 | verified | Event opcode $8A (2 bytes: $8A, a): as Evt_Op89_SetSpeed with the low byte of the event word a. |
$C0:4B74 | Evt_ | 79 | verified | Event 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. |
$C0:4BC3 | Evt_ | 100 | verified | Event 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... |
$C0:4C27 | Evt_ | 77 | verified | Event 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 <<... |
$C0:4C74 | Evt_ | 97 | verified | Event opcode $8E (2 bytes: $8E, flags): Obj_Cur's Obj_OamFlags = flags. |
$C0:4CD5 | Evt_ | 4 | verified | Event opcode $90 (1 byte): Obj_Cur's Obj_Unk1A81 = Obj_Unk1A81On (1: its frames are built, so it is probably shown). |
$C0:4CD9 | Evt_ | 7 | verified | |
$C0:4CE0 | Evt_ | 6 | verified | Event opcode $91 (1 byte): Obj_Cur's Obj_Unk1A81 = 0 (no frame build: hidden, probably); X = Y + 1, C=0 through Evt_Op90_Store. |
$C0:4CE6 | Evt_ | 6 | verified | Event 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... |
$C0:4CEC | Evt_ | 13 | verified | Event opcode $7C (2 bytes: $7C, slot): as Evt_Op90_SetUnk1A81On for the object in slot: Obj_Unk1A81 = Obj_Unk1A81On. |
$C0:4CF9 | Evt_ | 13 | verified | Event opcode $7D (2 bytes: $7D, slot): as Evt_Op91_ClearUnk1A81 for the object in slot: Obj_Unk1A81 = 0. |
$C0:4D06 | Evt_ | 287 | verified | Event opcode $7A (4 bytes: $7A, column, row, g): moves Obj_Cur along an arc (Obj_ArcMode, probably a jump) to map tile (column, row). |
$C0:4E25 | Evt_ | 78 | verified | Event 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... |
$C0:4E73 | Evt_ | 84 | verified | Event opcode $92 (3 bytes: $92, direction, frames): walks Obj_Cur in a direction for a number of frames. |
$C0:4EC7 | Evt_ | 67 | verified | Event 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... |
$C0:4F0A | Evt_ | 87 | verified | Event 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. |
$C0:4F61 | Evt_ | 137 | verified | Event opcode $96 (3 bytes: $96, column, row): walks Obj_Cur to a map tile, one step per script run. |
$C0:4FEA | Evt_ | 154 | verified | Event 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... |
$C0:5084 | Evt_ | 165 | verified | Event 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. |
$C0:5129 | Evt_ | 104 | verified | Event 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... |
$C0:5191 | Evt_ | 132 | verified | Event 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. |
$C0:5215 | Evt_ | 19 | verified | Event opcode $94 (2 bytes: $94, slot): walks Obj_Cur next to the object in slot (object x 2), one step per script run. |
$C0:5228 | Evt_ | 152 | verified | |
$C0:52C0 | Evt_ | 19 | verified | Event 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. |
$C0:52D3 | Evt_ | 119 | verified | |
$C0:534A | Evt_ | 33 | verified | Event 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... |
$C0:536B | Evt_ | 165 | verified | |
$C0:5410 | Evt_ | 25 | verified | Event 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... |
$C0:5429 | Evt_ | 204 | verified | Event 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... |
$C0:54F5 | Evt_ | 25 | verified | Event 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... |
$C0:550E | Evt_ | 39 | verified | Event 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 =... |
$C0:5535 | Evt_ | 4 | verified | Event opcode $0F (1 byte): Obj_Cur faces up (facing 0) through Evt_SetFacing; X = Y + 1. |
$C0:5539 | Evt_ | 4 | verified | Event opcode $17 (1 byte): Obj_Cur faces down (facing 1) through Evt_SetFacing; X = Y + 1. |
$C0:553D | Evt_ | 4 | verified | Event opcode $1B (1 byte): Obj_Cur faces left (facing 2) through Evt_SetFacing; X = Y + 1. |
$C0:5541 | Evt_ | 4 | verified | Event opcode $1D (1 byte): Obj_Cur faces right (facing 3) through Evt_SetFacing; X = Y + 1. |
$C0:5545 | Evt_ | 6 | verified | Event opcode $A6 (2 bytes: $A6, facing): Obj_Cur's Obj_Facing = the operand. |
$C0:554B | Evt_ | 2 | verified | |
$C0:554D | Evt_ | 10 | verified | |
$C0:5557 | Evt_ | 21 | verified | Event 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. |
$C0:556C | Evt_ | 13 | verified | Event opcode $1E (2 bytes: $1E, slot): the object in slot (object x 2) faces up (facing 0) through Evt_SetFacingOfX. |
$C0:5579 | Evt_ | 13 | verified | Event opcode $1F (2 bytes: $1F, slot): the object in slot (object x 2) faces down (facing 1) through Evt_SetFacingOfX. |
$C0:5586 | Evt_ | 13 | verified | Event opcode $25 (2 bytes: $25, slot): the object in slot (object x 2) faces left (facing 2) through Evt_SetFacingOfX. |
$C0:5593 | Evt_ | 13 | verified | Event opcode $26 (2 bytes: $26, slot): the object in slot (object x 2) faces right (facing 3) through Evt_SetFacingOfX. |
$C0:55A0 | Evt_ | 9 | verified | Event opcode $A8 (2 bytes: $A8, slot): turns Obj_Cur toward the object in slot. |
$C0:55A9 | Evt_ | 92 | verified | |
$C0:5605 | Evt_ | 15 | verified | Event 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. |
$C0:56A6 | Scene_ | 46 | verified | The 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... |
$C0:56D4 | LocLoad_ | 53 | verified | The last location-load step: unpacks the location's event data. |
$C0:5709 | Evt_ | 544 | verified | Resets the object tables for the Evt_ObjCount objects of the new location and runs each one's init function: 1. |
$C0:5929 | Evt_ | 51 | verified | Sets the 16 bytes Evt_Unk0920 to Evt_Unk0920Free ($FF), one STA each. |
$C0:595C | Evt_ | 33 | verified | (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. |
$C0:597D | Evt_ | 92 | verified | (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. |
$C0:59D9 | Vblank_ | 109 | verified | With 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... |
$C0:5A46 | Vblank_ | 77 | verified | Runs 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... |
$C0:5A93 | Evt_ | 50 | verified | Runs 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... |
$C0:5AC5 | Evt_ | 90 | verified | Starts function 1 of the object in Field_UnkEB (the one the action button found). |
$C0:5B1F | Evt_ | 68 | verified | Evt_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... |
$C0:5B63 | Map_ | 14 | verified | Map_Unk9175's test for a downward step: C=1 when the leader's Obj_TileY is past Map_Unk1D1D (TileY >= Map_Unk1D1D + 1). |
$C0:5B71 | Map_ | 8 | verified | Map_Unk9175's test for an upward step: C=1 when the leader's Obj_TileY <= Map_Unk1D1C + 1. |
$C0:5B79 | Map_ | 13 | verified | Map_Unk9175's test for a rightward step: C=1 when the leader's Obj_TileX >= Map_Unk1D1B. |
$C0:5B86 | Map_ | 7 | verified | Map_Unk9175's test for a leftward step: C=1 when the leader's Obj_TileX <= Map_Unk1D1A. |
$C0:5B8D | Evt_ | 8 | verified | C=1 when Field_UnkEB holds an object (bit 7 clear), C=0 when it is $80 (none). |
$C0:5B95 | Evt_ | 93 | verified | Looks for a solid object within a tile in front of Obj_Cur. |
$C0:5BF2 | Evt_ | 8 | verified | Evt_FindSolidObjInFront's tests by Obj_Facing x 2 (facings 0-3). |
$C0:5BFA | Evt_ | 38 | verified | Facing 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. |
$C0:5C20 | Evt_ | 35 | verified | Facing 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. |
$C0:5C43 | Evt_ | 4 | verified | |
$C0:5C47 | Evt_ | 38 | verified | Facing 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). |
$C0:5C6D | Evt_ | 35 | verified | Facing 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). |
$C0:5C90 | Evt_ | 55 | verified | Looks 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. |
$C0:5CC7 | LocLoad_ | 37 | verified | Two 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... |
$C0:5CEC | LocLoad_ | 75 | verified | Seeds 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... |
$C0:5D37 | LocLoad_ | 55 | verified | LocLoad_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... |
$C0:5D6E | Evt_ | 512 | verified | The 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... |
$C0:5F6E | Evt_ | 6 | verified | The 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... |
$C0:5F74 | Evt_ | 66 | verified | Event opcode $00 (1 byte): ends the function Obj_Cur is running. |
$C0:5FB6 | Evt_ | 8 | verified | Event opcode $02 (3 bytes: $02, slot, level/function): makes the object in slot run one of its functions, without waiting. |
$C0:5FBE | Evt_ | 192 | verified | |
$C0:607E | Evt_ | 8 | verified | Event 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... |
$C0:6086 | Evt_ | 131 | verified | |
$C0:6109 | Evt_ | 25 | verified | Event opcode $04 (3 bytes: $04, slot, level/function): as Evt_Op03_CallObjFuncRetry, and then waits for the function to end. |
$C0:6122 | Evt_ | 141 | verified | |
$C0:61AF | Evt_ | 58 | verified | |
$C0:61E9 | Evt_ | 21 | verified | Event opcode $05 (3 bytes: $05, p, level/function): Evt_Op02_CallObjFunc on party member p's object (Party_ObjSlot + p). |
$C0:61FE | Evt_ | 22 | verified | Event opcode $06 (3 bytes: $06, p, level/function): Evt_Op03_CallObjFuncRetry on party member p's object. |
$C0:6214 | Evt_ | 44 | verified | Event 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... |
$C0:6240 | Evt_ | 7 | verified | Event opcode $08 (1 byte): Obj_Cur's Obj_Unk1C01 = 1. |
$C0:6247 | Evt_ | 4 | verified | |
$C0:624B | Evt_ | 9 | verified | Event opcode $09 (1 byte): Obj_Cur's Obj_Unk1C01 = 0 (undoes Evt_Op08_BlockCalls); X = Y + 1, C=1 through Evt_Op08_Next. |
$C0:6254 | Evt_ | 21 | verified | Event 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)... |
$C0:6269 | Evt_ | 25 | verified | Event 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... |
$C0:6282 | Evt_ | 19 | verified | Event 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. |
$C0:6295 | Evt_ | 15 | verified | Event 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... |
$C0:62A4 | Evt_ | 13 | verified | Event 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). |
$C0:62B1 | Evt_ | 4 | verified | |
$C0:62B5 | Evt_ | 22 | verified | Event opcode $10 (2 bytes: $10, n): the script goes on n bytes after the operand byte: X = Y + 1 + n, C=1. |
$C0:62CB | Evt_ | 19 | verified | Event 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). |
$C0:62DE | Evt_ | 53 | verified | Event 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... |
$C0:6313 | Evt_ | 54 | verified | Event 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. |
$C0:6349 | Evt_ | 24 | verified | |
$C0:6361 | Evt_ | 67 | verified | Event opcode $14 (5 bytes: $14, a, b, cmp, n): as Evt_Op12_IfVarByte with EvtIf_Right = the low byte of event word b. |
$C0:63A4 | Evt_ | 66 | verified | Event opcode $15 (5 bytes: $15, a, b, cmp, n): as Evt_Op14_IfVarVarByte with the whole event words, through Evt_CmpTable16. |
$C0:63E6 | Evt_ | 92 | verified | Event 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... |
$C0:6442 | Evt_ | 37 | verified | Event 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. |
$C0:6467 | Evt_ | 16 | verified | The byte comparisons of the condition opcodes $12, $14 and $16, indexed by cmp x 2 (JSR (Evt_CmpTable8,X) with 8-bit X). |
$C0:6477 | Evt_ | 16 | verified | The word comparisons of opcodes $13 and $15, in the order of Evt_CmpTable8. |
$C0:6487 | Evt_ | 8 | verified | The 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... |
$C0:648F | Evt_ | 8 | verified | |
$C0:6497 | Evt_ | 10 | verified | |
$C0:64A1 | Evt_ | 8 | verified | |
$C0:64A9 | Evt_ | 10 | verified | |
$C0:64B3 | Evt_ | 2 | verified | |
$C0:64B5 | Evt_ | 10 | verified | |
$C0:64BF | Evt_ | 8 | verified | |
$C0:64C7 | Evt_ | 8 | verified | |
$C0:64CF | Evt_ | 12 | verified | |
$C0:64DB | Evt_ | 12 | verified | |
$C0:64E7 | Evt_ | 14 | verified | |
$C0:64F5 | Evt_ | 14 | verified | |
$C0:6503 | Evt_ | 14 | verified | |
$C0:6511 | Evt_ | 14 | verified | |
$C0:651F | Evt_ | 4 | verified | |
$C0:6523 | Evt_ | 12 | verified | |
$C0:652F | Evt_ | 12 | verified | |
$C0:653B | Evt_ | 19 | verified | Event 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). |
$C0:654E | Evt_ | 26 | verified | Event opcode $1C (3 bytes: $1C, m (word)): Obj_Cur's ObjX_Unk7F0A80 = the word at Evt_Mem7F + m; X = Y + 3, C=1. |
$C0:6568 | Evt_ | 39 | verified | Event 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. |
$C0:658F | Evt_ | 27 | verified | Event 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. |
$C0:65AA | Evt_ | 8 | verified | Event 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. |
$C0:65B2 | Evt_ | 57 | verified | |
$C0:65EB | Evt_ | 13 | verified | Event 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. |
$C0:65F8 | Evt_ | 8 | verified | Event opcode $23 (3 bytes: $23, slot, a): event word a's low byte = the object's Obj_Facing; X = Y + 3, C=1. |
$C0:6600 | Evt_ | 31 | verified | |
$C0:661F | Evt_ | 13 | verified | Event opcode $24 (3 bytes: $24, p, a): Evt_Op23_GetObjFacing for party member p's object; X = Y + 3, C=1. |
$C0:662C | Evt_ | 41 | verified | Event 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. |
$C0:6655 | Evt_ | 80 | verified | Event 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... |
$C0:66A5 | Evt_ | 13 | verified | Event 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. |
$C0:66B2 | Evt_ | 10 | verified | Event 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. |
$C0:66BC | Evt_ | 10 | verified | Event opcode $31 (2 bytes: $31, n): goes on when Pad_Unk00F8 bit 7 (Pad_Unk00F8Bit7) is held, else jumps. |
$C0:66C6 | Evt_ | 10 | verified | Event opcode $34 (2 bytes: $34, n): goes on when A (Pad_A) is held in Menu_PadHeld, else jumps. |
$C0:66D0 | Evt_ | 21 | verified | |
$C0:66E5 | Evt_ | 10 | verified | Event opcode $35 (2 bytes: $35, n): goes on when B (Pad_B) is held in Menu_PadHeld, else jumps. |
$C0:66EF | Evt_ | 10 | verified | Event opcode $36 (2 bytes: $36, n): goes on when X (Pad_X) is held in Menu_PadHeld, else jumps. |
$C0:66F9 | Evt_ | 8 | verified | Event opcode $37 (2 bytes: $37, n): goes on when Y (Pad_Y) is held in Menu_PadHeld, else jumps. |
$C0:6701 | Evt_ | 4 | verified | |
$C0:6705 | Evt_ | 10 | verified | Event opcode $38 (2 bytes: $38, n): goes on when L (Pad_L) is held in Menu_PadHeld, else jumps. |
$C0:670F | Evt_ | 10 | verified | Event opcode $39 (2 bytes: $39, n): goes on when R (Pad_R) is held in Menu_PadHeld, else jumps. |
$C0:6719 | Evt_ | 11 | verified | Event 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. |
$C0:6724 | Evt_ | 14 | verified | Event opcode $3C (2 bytes: $3C, n): as Evt_Op3B_IfMapPressedBit1 with bit 7 (Pad_Unk00F6Bit7, the button Field_ActionButton acts on). |
$C0:6732 | Evt_ | 14 | verified | Event 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. |
$C0:6740 | Evt_ | 14 | verified | Event opcode $40 (2 bytes: $40, n): as Evt_Op3F_IfPressedA with B (Pad_B); goes on through Evt_PadGoOn2. |
$C0:674E | Evt_ | 14 | verified | Event opcode $41 (2 bytes: $41, n): as Evt_Op3F_IfPressedA with X (Pad_X); goes on through Evt_PadGoOn2. |
$C0:675C | Evt_ | 14 | verified | Event opcode $42 (2 bytes: $42, n): as Evt_Op3F_IfPressedA with Y (Pad_Y); goes on through Evt_PadGoOn2. |
$C0:676A | Evt_ | 14 | verified | Event opcode $43 (2 bytes: $43, n): as Evt_Op3F_IfPressedA with L (Pad_L); goes on through Evt_PadGoOn2. |
$C0:6778 | Evt_ | 12 | verified | Event opcode $44 (2 bytes: $44, n): as Evt_Op3F_IfPressedA with R (Pad_R). |
$C0:6784 | Evt_ | 4 | verified | |
$C0:6788 | Evt_ | 10 | verified | Event 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. |
$C0:6792 | Evt_ | 16 | verified | Event opcode $48 (5 bytes: $48, ptr, a): event word a's low byte = the byte at ptr; X = Y + 5, C=1. |
$C0:67A2 | Evt_ | 37 | verified | Reads 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. |
$C0:67C7 | Evt_ | 16 | verified | Event opcode $49 (5 bytes: $49, ptr, a): event word a = the word at ptr; X = Y + 5, C=1. |
$C0:67D7 | Evt_ | 12 | verified | Event opcode $4A (5 bytes: $4A, ptr, value): the byte at ptr = value; X = Y + 5, C=1. |
$C0:67E3 | Evt_ | 24 | verified | Reads the pointer operand of opcodes $4A-$4D: EvtMem_Dst = the 3 bytes at Y + 1; X = Y + 4 (the next operand). |
$C0:67FB | Evt_ | 17 | verified | Event opcode $4B (6 bytes: $4B, ptr, value (word)): the word at ptr = value; X = Y + 6, C=1. |
$C0:680C | Evt_ | 29 | verified | Event opcode $4C (5 bytes: $4C, ptr, a): the byte at ptr = event word a's low byte; X = Y + 5, C=1. |
$C0:6829 | Evt_ | 29 | verified | Event opcode $4D (5 bytes: $4D, ptr, a): the word at ptr = event word a; X = Y + 5, C=1. |
$C0:6846 | Evt_ | 95 | verified | Event 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)... |
$C0:68A5 | Evt_ | 33 | verified | Event opcode $4F (3 bytes: $4F, value, a): event word a's low byte = value; X = Y + 3, C=1. |
$C0:68C6 | Evt_ | 35 | verified | Event opcode $50 (4 bytes: $50, value (word), a): event word a = value; X = Y + 4, C=1. |
$C0:68E9 | Evt_ | 42 | verified | Event 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. |
$C0:6913 | Evt_ | 42 | verified | Event opcode $52 (3 bytes: $52, a, b): event word b = event word a; X = Y + 3, C=1. |
$C0:693D | Evt_ | 39 | verified | Event 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. |
$C0:6964 | Evt_ | 39 | verified | Event opcode $54 (4 bytes: $54, m (word), a): event word a = the word at Evt_Mem7F + m; X = Y + 4, C=1. |
$C0:698B | Evt_ | 27 | verified | Event opcode $55 (2 bytes: $55, a): event word a's low byte = Eng_Unk7F0000; X = Y + 2, C=1. |
$C0:69A6 | Evt_ | 30 | verified | Event opcode $56 (4 bytes: $56, value, m (word)): the byte at Evt_Mem7F + m = value; X = Y + 4, C=1. |
$C0:69C4 | Evt_ | 39 | verified | Event 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. |
$C0:69EB | Evt_ | 39 | verified | Event opcode $59 (4 bytes: $59, a, m (word)): the word at Evt_Mem7F + m = event word a; X = Y + 4, C=1. |
$C0:6A12 | Evt_ | 13 | verified | Event opcode $5A (2 bytes: $5A, value): Eng_Unk7F0000 = value; X = Y + 2, C=1. |
$C0:6A1F | Evt_ | 38 | verified | Event opcode $5B (3 bytes: $5B, value, a): event word a's low byte += value; X = Y + 3, C=1. |
$C0:6A45 | Evt_ | 47 | verified | Event opcode $5D (3 bytes: $5D, a, b): event word b's low byte += event word a's low byte; X = Y + 3, C=1. |
$C0:6A74 | Evt_ | 47 | verified | Event opcode $5E (3 bytes: $5E, a, b): event word b += event word a; X = Y + 3, C=1. |
$C0:6AA3 | Evt_ | 38 | verified | Event opcode $5F (3 bytes: $5F, value, a): event word a's low byte -= value; X = Y + 3, C=1. |
$C0:6AC9 | Evt_ | 40 | verified | Event opcode $60 (4 bytes: $60, value (word), a): event word a -= value; X = Y + 4, C=1. |
$C0:6AF1 | Evt_ | 47 | verified | Event opcode $61 (3 bytes: $61, a, b): event word b's low byte -= event word a's low byte; X = Y + 3, C=1. |
$C0:6B20 | Evt_ | 43 | verified | Event 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. |
$C0:6B4B | Evt_ | 43 | verified | Event 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. |
$C0:6B76 | Evt_ | 46 | verified | Event 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... |
$C0:6BA4 | Evt_ | 46 | verified | Event 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... |
$C0:6BD2 | Evt_ | 37 | verified | Event opcode $67 (3 bytes: $67, mask, a): ANDs event word a's low byte with mask; X = Y + 3, C=1. |
$C0:6BF7 | Evt_ | 37 | verified | Event opcode $69 (3 bytes: $69, mask, a): ORs event word a's low byte with mask; X = Y + 3, C=1. |
$C0:6C1C | Evt_ | 37 | verified | Event opcode $6B (3 bytes: $6B, mask, a): EORs event word a's low byte with mask; X = Y + 3, C=1. |
$C0:6C41 | Evt_ | 40 | verified | Event opcode $6F (3 bytes: $6F, count, a): shifts event word a's low byte right count times; X = Y + 3, C=1. |
$C0:6C69 | Evt_ | 28 | verified | Event opcode $71 (2 bytes: $71, a): adds 1 to event word a's low byte (wrapping in the byte); X = Y + 2, C=1. |
$C0:6C85 | Evt_ | 28 | verified | Event opcode $72 (2 bytes: $72, a): adds 1 to event word a; X = Y + 2, C=1. |
$C0:6CA1 | Evt_ | 28 | verified | Event opcode $73 (2 bytes: $73, a): subtracts 1 from event word a's low byte (wrapping in the byte); X = Y + 2, C=1. |
$C0:6CBD | Evt_ | 25 | verified | Event opcode $75 (2 bytes: $75, a): event word a's low byte = 1; X = Y + 2, C=1. |
$C0:6CD6 | Evt_ | 26 | verified | Event opcode $76 (2 bytes: $76, a): event word a = 1; X = Y + 2, C=1. |
$C0:6CF0 | Evt_ | 25 | verified | Event opcode $77 (2 bytes: $77, a): event word a's low byte = 0; X = Y + 2, C=1. |
$C0:6D09 | Evt_ | 38 | verified | Event 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. |
$C0:6D2F | LocLoad_ | 54 | verified | One 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... |
$C0:6D65 | LocLoad_ | 106 | verified | The 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... |
$C0:6DCF | LocLoad_ | 88 | verified | Loads 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). |
$C0:6E27 | Credits_ | 53 | verified | Unpacks 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. |
$C0:6E5C | Field_ | 68 | verified | Uploads 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... |
$C0:6EA0 | Field_ | 16 | verified | Field_UploadUnk1F00's eight source offsets in bank $FF, one per Menu_Config01 setting; each set is $280 bytes ($200 + $80). |
$C0:6EB0 | Field_ | 27 | verified | Uploads 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... |
$C0:6ECB | Field_ | 38 | verified | Uploads Field_UploadUnk5800Bytes ($400) from Field_Unk7EF000 to VRAM word Field_UploadVram5800 + Field_Unk31 x $200 (VramDma_Upload, word writes). |
$C0:6EF1 | Field_ | 27 | verified | As 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. |
$C0:6F0C | Field_ | 82 | verified | Four 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... |
$C0:6F5E | Field_ | 27 | verified | Uploads 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... |
$C0:6F79 | Field_ | 33 | verified | With DP=$2100, writes Field_Unk0B80Empty ($80) to the Field_Unk0B88Bytes (30) bytes of Field_Unk0B88 through the WRAM port. |
$C0:7084 | LocLoad_ | 101 | verified | Copies 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... |
$C0:70E9 | Pal_ | 69 | verified | Sets 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)... |
$C0:712E | Pal_ | 38 | verified | Sends Pal_CgramBuf (Pal_BufBytes from $7E:2200) to CGRAM from colour 0 with DMA channel 7 (mode 0, B-bus CGDATA). |
$C0:7154 | Pal_ | 1 | verified | |
$C0:7155 | Field_ | 27 | verified | Writes Field_Unk0B80Empty ($80) to the 8 bytes of Field_Unk0B80, one STA each (see Field_ResetUnk0B88). |
$C0:7399 | Map_ | 269 | verified | Turns 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... |
$C0:74A6 | Map_ | 46 | verified | Sets 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... |
$C0:74D4 | Field_ | 13 | verified | Resets 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. |
$C0:74E1 | Field_ | 7 | verified | |
$C0:74E8 | Field_ | 15 | verified | As Field_Unk74D4 for layer 2: zeroes Map_BgColBias2 / Map_BgRowBias2, Map_Unk1D8B and Map_Unk1D8D, then Field_Unk74D4_Tail. |
$C0:74F7 | Field_ | 15 | verified | As Field_Unk74D4 for layer 3: zeroes Map_BgColBias3 / Map_BgRowBias3, Map_Unk1D8F and Map_Unk1D91, then Field_Unk74D4_Tail. |
$C0:7506 | Map_ | 77 | verified | Puts 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... |
$C0:7553 | Map_ | 77 | verified | As 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 +... |
$C0:75A0 | Map_ | 73 | verified | (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... |
$C0:75E9 | Field_ | 41 | verified | Map layer redraws, row / column writers and edge VRAM addresses ($C0:75E9–$C0:8242) The map sits in WRAM as metatile numbers. |
$C0:7612 | Map_ | 466 | verified | Writes one row of layer-1 tilemap words to WMDATA (WRAM at WMADD). |
$C0:77E4 | Map_ | 264 | verified | Writes one column of layer-1 tilemap words to WMDATA, top to bottom. |
$C0:78EC | Field_ | 227 | verified | Redraws 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... |
$C0:79CF | Map_ | 474 | verified | As 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. |
$C0:7BA9 | Map_ | 268 | verified | As 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. |
$C0:7CB5 | Field_ | 177 | verified | As 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... |
$C0:7D66 | Map_ | 250 | verified | As Map_WriteRow1 for layer 3: masks Map_RowMask3 / Map_ColMask3, an 8-bit metatile number from Map_Layer3Tiles (zero-extended), words from Map_Meta3*. |
$C0:7E60 | Map_ | 248 | verified | As 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. |
$C0:7F58 | Map_ | 5 | verified | Sends 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... |
$C0:7F5D | Map_ | 3 | verified | |
$C0:7F60 | Map_ | 2 | verified | |
$C0:7F62 | Map_ | 5 | verified | |
$C0:7F67 | Map_ | 16 | verified | |
$C0:7F77 | Map_ | 7 | verified | |
$C0:7F7E | LocLoad_ | 28 | verified | Zeroes 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. |
$C0:7F9A | Sub_ | 419 | verified | Purpose not established (no reader of its results traced). |
$C0:813D | Bg_ | 100 | verified | Splits 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. |
$C0:81A1 | Bg_ | 53 | verified | The 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... |
$C0:81D6 | Bg_ | 66 | verified | Splits 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... |
$C0:8218 | Bg_ | 43 | verified | The addresses of Bg_ColSpan64x32 without the sizes: X = word offset of (A, Y), A = offset of (A, row 0) in the same screen. |
$C0:8243 | Map_ | 32 | verified | Layer-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... |
$C0:8263 | Map_ | 34 | verified | Layer-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... |
$C0:8285 | Map_ | 32 | verified | Layer-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... |
$C0:82A5 | Map_ | 32 | verified | Layer-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... |
$C0:82C5 | Map_ | 32 | verified | Layer-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... |
$C0:82E5 | Map_ | 32 | verified | Layer-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... |
$C0:8305 | Map_ | 32 | verified | Layer-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... |
$C0:8325 | Map_ | 32 | verified | Layer-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... |
$C0:8345 | Map_ | 32 | verified | Layer-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... |
$C0:8365 | Map_ | 32 | verified | Layer-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... |
$C0:8385 | Map_ | 32 | verified | Layer-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... |
$C0:83A5 | Map_ | 32 | verified | Layer-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... |
$C0:83C5 | Map_ | 32 | verified | Layer-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... |
$C0:83E5 | Map_ | 32 | verified | Layer-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... |
$C0:8405 | Map_ | 32 | verified | Layer-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... |
$C0:8425 | Map_ | 32 | verified | Layer-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... |
$C0:8445 | Map_ | 98 | verified | Layer-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... |
$C0:84A7 | Map_ | 26 | verified | The 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. |
$C0:84C1 | Map_ | 98 | verified | Layer-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... |
$C0:8523 | Map_ | 98 | verified | Layer-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... |
$C0:8585 | Map_ | 98 | verified | Layer-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... |
$C0:85E7 | Map_ | 98 | verified | Layer-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... |
$C0:8649 | Map_ | 98 | verified | Layer-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... |
$C0:86AB | Map_ | 50 | verified | Layer-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... |
$C0:86DD | Map_ | 26 | verified | As Map_EdgeDmaRow with VMAIN = increment by 32 words after the high byte (VRAM_INC_32), so the words go down a tilemap column. |
$C0:86F7 | Map_ | 50 | verified | Layer-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... |
$C0:8729 | Map_ | 50 | verified | Layer-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... |
$C0:875B | Map_ | 50 | verified | Layer-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... |
$C0:878D | Map_ | 50 | verified | Layer-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... |
$C0:87BF | Map_ | 50 | verified | Layer-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... |
$C0:87F1 | Field_ | 45 | verified | Builds 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... |
$C0:881E | Field_ | 60 | verified | Field 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... |
$C0:885A | Field_ | 139 | verified | A 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. |
$C0:88E5 | Map_ | 9 | verified | Copies 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). |
$C0:88EE | Field_ | 20 | verified | Unless 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. |
$C0:8902 | Field_ | 34 | verified | Field_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... |
$C0:8924 | Field_ | 1 | verified | No direction (or an impossible combination): leaves Map_Unk1D2C/1D2D at the 0 Field_FrameUpdate set and Map_Unk1D2E/1D30 as they are. |
$C0:8925 | Field_ | 31 | verified | Right: Map_Unk1D2C = +$10 and Map_Unk1D2E += $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. |
$C0:8944 | Field_ | 31 | verified | Left: Map_Unk1D2C = -$10 and Map_Unk1D2E -= $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. |
$C0:8963 | Field_ | 31 | verified | Up: Map_Unk1D2D = -$10 and Map_Unk1D30 -= $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. |
$C0:8982 | Field_ | 31 | verified | Down: Map_Unk1D2D = +$10 and Map_Unk1D30 += $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. |
$C0:89A1 | Field_ | 49 | verified | Down+Right: both steps +$10, both sums up by $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. |
$C0:89D2 | Field_ | 53 | verified | Down+Left: X step -$10 (sum down), Y step +$10 (sum up); $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. |
$C0:8A07 | Field_ | 53 | verified | Up+Right: X step +$10 (sum up), Y step -$10 (sum down); $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. |
$C0:8A3C | Field_ | 49 | verified | Up+Left: both steps -$10, both sums down by $10; $20 each instead while Pad_Unk00F8 bit 1 (Pad_Unk00F8Bit1) is set. |
$C0:8A6D | Map_ | 1,800 | verified | Probably 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... |
$C0:9175 | Map_ | 55 | verified | Field_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... |
$C0:91AC | Map_ | 565 | verified | Adds 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. |
$C0:93E1 | Map_ | 106 | verified | Applies 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... |
$C0:944B | Map_ | 50 | verified | Layer 1, X rising: once per pixel in Map_Move1XPos, Map_Unk1D87 + 1 and the fine counter Map_Unk1D93 + 1 (0-$0F, wrapping). |
$C0:947D | Map_ | 48 | verified | Layer 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... |
$C0:94AD | Map_ | 50 | verified | Layer 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... |
$C0:94DF | Map_ | 48 | verified | Layer 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)... |
$C0:950F | Map_ | 54 | verified | Layer 2, X rising: once per pixel in Map_Move2XPos, Map_Unk1D8B + 1 and the fine counter Map_Unk1D94 + 1 (0-$0F, wrapping). |
$C0:9545 | Map_ | 52 | verified | Layer 2, X falling: as Map_Scroll2XInc with Map_Move2XNeg, stepping down (crossings 0 to $0F and $08 to $07; Map_EdgeColXDec). |
$C0:9579 | Map_ | 54 | verified | Layer 2, Y rising: as Map_Scroll2XInc with Map_Move2YPos, Map_Unk1D8D and Map_Unk1D97 (Map_EdgeRowYInc). |
$C0:95AF | Map_ | 52 | verified | Layer 2, Y falling: as Map_Scroll2XDec with Map_Move2YNeg, Map_Unk1D8D and Map_Unk1D97 (Map_EdgeRowYDec). |
$C0:95E3 | Map_ | 54 | verified | Layer 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... |
$C0:9619 | Map_ | 52 | verified | Layer 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... |
$C0:964D | Map_ | 54 | verified | Layer 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). |
$C0:9683 | Map_ | 52 | verified | Layer 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). |
$C0:96B7 | Map_ | 54 | verified | Layer 3, X rising: as Map_Scroll2XInc with Map_Move3XPos, Map_Unk1D8F, Map_Unk1D95 and the Map_Layer3 bit. |
$C0:96ED | Map_ | 52 | verified | Layer 3, X falling: as Map_Scroll2XDec with Map_Move3XNeg, Map_Unk1D8F, Map_Unk1D95 and the Map_Layer3 bit. |
$C0:9721 | Map_ | 62 | verified | Layer 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). |
$C0:975F | Map_ | 60 | verified | Layer 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. |
$C0:979B | Map_ | 49 | verified | For 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... |
$C0:97CC | Map_ | 49 | verified | As Map_EdgeColsXInc, with Map_BuildColXInc2Half as layer 2's builder (used while Map_Unk0BC9 bit 7 is set). |
$C0:97FD | Map_ | 49 | verified | As Map_EdgeColsXInc for Map_EdgeColXDec: builders Map_BuildColXDec1/ 2/3, and the column biases go down by 1 (wrapping at 64). |
$C0:982E | Map_ | 49 | verified | As Map_EdgeColsXDec, with Map_BuildColXDec2Half for layer 2. |
$C0:985F | Map_ | 49 | verified | As 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. |
$C0:9890 | Map_ | 49 | verified | As Map_EdgeRowsYInc, with Map_BuildRowYInc2Half for layer 2. |
$C0:98C1 | Map_ | 49 | verified | As Map_EdgeRowsYInc for Map_EdgeRowYDec: builders Map_BuildRowYDec1/ 2/3, and the row biases go down by 1 (wrapping at 32). |
$C0:98F2 | Map_ | 49 | verified | As Map_EdgeRowsYDec, with Map_BuildRowYDec2Half for layer 2. |
$C0:9923 | Map_ | 187 | verified | Map_Unk8A6D's object test of the point Map_ProbeX/Y. |
$C0:99DE | Map_ | 65 | verified | Field_FrameUpdate's step after Map_Unk9175: may drop the frame's steps in Map_Unk1D2E (X) and Map_Unk1D30 (Y). |
$C0:9A1F | Map_ | 30 | verified | Map_Unk99DE's test for a downward step, A = n (step / 16). |
$C0:9A3D | Map_ | 35 | verified | Map_Unk99DE's test for an upward step, A = n. |
$C0:9A60 | Map_ | 30 | verified | As 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... |
$C0:9A7E | Map_ | 35 | verified | As 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. |
$C0:9AA1 | Map_ | 17 | verified | Reads the map bytes of one tile for the collision probes. |
$C0:9AB2 | Map_ | 22 | verified | |
$C0:9AC8 | Map_ | 11 | verified | As Map_ProbeTileAttrs without the treasure test: always reads the three bytes (branches into Map_ProbeTileAttrs_Load) and returns C=0. |
$C0:9AD3 | Map_ | 290 | verified | Decides which half of the probed tile the point Map_ProbeX/Y is in and loads that half's level. |
$C0:9BF5 | Map_ | 22 | verified | / Map_SlopeBase / Map_SlopeSide: Map_ProbeTileLevel's line for shapes 2-$17, indexed by Map_ProbeShape (shape - 2). |
$C0:9C0B | Map_ | 22 | verified | |
$C0:9C21 | Map_ | 22 | verified | |
$C0:9C37 | Map_ | 37 | verified | Whether 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... |
$C0:9C5C | Map_ | 359 | verified | Map_Unk8A6D's commit of a step it has kept. |
$C0:9DC3 | Map_ | 102 | verified | The 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... |
$C0:9E29 | Party_ | 91 | verified | The 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... |
$C0:9E84 | Party_ | 77 | verified | The 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... |
$C0:9ED1 | Party_ | 79 | verified | As 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). |
$C0:9F20 | Party_ | 79 | verified | Party_Member2Anim again, byte for byte, for member 3. |
$C0:9F6F | Party_ | 131 | verified | A 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). |
$C0:9FF2 | Party_ | 5 | verified | Party_AnimTable's handler for no step (entry 0 and every code that is not a D-pad direction): X = Obj_Cur, then Party_AnimIdle. |
$C0:9FF7 | Party_ | 130 | verified | The 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). |
$C0:A079 | Party_ | 10 | verified | Party_AnimTable handlers for the four straight directions: Obj_Cur's Obj_Facing = the direction, then Party_AnimWalk (walk row) or Party_AnimRun (run row). |
$C0:A083 | Party_ | 10 | verified | |
$C0:A08D | Party_ | 10 | verified | |
$C0:A097 | Party_ | 10 | verified | |
$C0:A0A1 | Party_ | 10 | verified | |
$C0:A0AB | Party_ | 10 | verified | |
$C0:A0B5 | Party_ | 10 | verified | |
$C0:A0BF | Party_ | 10 | verified | |
$C0:A0C9 | Party_ | 21 | verified | Party_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. |
$C0:A0DE | Party_ | 21 | verified | |
$C0:A0F3 | Party_ | 21 | verified | |
$C0:A108 | Party_ | 21 | verified | |
$C0:A11D | Party_ | 21 | verified | |
$C0:A132 | Party_ | 21 | verified | |
$C0:A147 | Party_ | 21 | verified | |
$C0:A15C | Party_ | 21 | verified | |
$C0:A171 | Party_ | 27 | verified | Field_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... |
$C0:A18C | Party_ | 70 | verified | Field_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... |
$C0:A1D2 | Party_ | 23 | verified | The object at Y gets Obj_AnimRow = ObjAnim_RowUnk19 (column and timer 0, unless already set). |
$C0:A1E9 | Party_ | 107 | verified | No step: the animation row while standing, for the object at Y. |
$C0:A254 | Party_ | 23 | verified | The 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. |
$C0:A26B | Party_ | 99 | verified | Member 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). |
$C0:A2CE | Party_ | 109 | verified | Member 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. |
$C0:A33B | LocLoad_ | 461 | verified | The map-properties step of a location load (name kept: LoadLocation and Field_RestoreState call it by it). |
$C0:A508 | LocLoad_ | 1 | verified | A lone RTS: does nothing. |
$C0:A509 | Ppu_ | 24 | verified | Writes 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). |
$C0:A521 | Map_ | 330 | verified | Reads the rest of the unpacked MapProps (from MapProps.Planes, through the WRAM data port) into the map's per-tile planes. |
$C0:A66B | Map_ | 167 | verified | Builds 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... |
$C0:A712 | Map_ | 170 | verified | As 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... |
$C0:A7BC | Map_ | 45 | verified | Tests the Treasure_Flags bit of the record at Map_RecOfs: its number is (Map_RecOfs - Map_TreasureRec0) / 4, as in Field_CheckTileInFront. |
$C0:A810 | Vblank_ | 125 | verified | The per-frame object pass. |
$C0:AF4E | Field_ | 328 | verified | Copies the rectangle MapCopy_SrcX..MapCopy_EndX x MapCopy_SrcY.. |
$C0:B096 | Map_ | 80 | verified | Copies 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 +... |
$C0:B0E6 | Field_ | 65 | verified | The 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... |
$C0:B1B2 | VramQ_ | 82 | verified | Uploads every pending entry of the VRAM upload queue (VramQ_*, filled by Obj_BuildFrame4, Obj_BuildFrame8, Obj_BuildFrame8Pass1, Obj_BuildFrame12Pass2 and Obj_BuildFrame12Pass2Alt) with DMA... |
$C0:B262 | Oam_ | 15 | verified | Parks OAM shadow sprites 0-3 below the screen: their Y bytes in Oam_LowTable = Oam_HiddenY. |
$C0:B271 | Oam_ | 55 | verified | (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. |
$C0:B2A8 | Oam_ | 10 | verified | |
$C0:B2B2 | Oam_ | 14 | verified | |
$C0:B2C0 | Oam_ | 8 | verified | |
$C0:B2C8 | Oam_ | 16 | verified | |
$C0:B2D8 | Oam_ | 6 | verified | |
$C0:B2DE | Oam_ | 16 | verified | |
$C0:B2EE | Oam_ | 6 | verified | |
$C0:B2F4 | Oam_ | 16 | verified | |
$C0:B304 | Oam_ | 5 | verified | |
$C0:B309 | Spr_ | 1,016 | verified | (was Sub_B309.) Appends object Obj_Cur's sprite to the OAM shadow. |
$C0:B701 | Spr_ | 135 | verified | (was Sub_B701.) Brings object Obj_Cur's SprTile records up to date before Spr_AppendToOam copies them. |
$C0:B788 | Spr_ | 322 | verified | (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... |
$C0:B8CA | Spr_ | 411 | verified | (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). |
$C0:BA65 | Spr_ | 631 | verified | (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... |
$C0:BCDC | Spr_ | 790 | verified | (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. |
$C0:BFF2 | Spr_ | 717 | verified | (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... |
$C0:C2BF | Spr_ | 1,064 | verified | (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... |
$C0:C6E7 | Spr_ | 83 | verified | (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). |
$C0:C73A | Spr_ | 592 | verified | (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... |
$C0:CA76 | Field_ | 99 | verified | Builds queued object frames while there is time left in the frame, called from Field_EndOfFrame ($C0:00D6). |
$C0:E12A | Spr_ | 1,034 | verified | (was Sub_E12A.) Loads a 24-tile ("large") object in one go. |
$C0:E534 | Spr_ | 339 | verified | (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)... |
$C0:E687 | Spr_ | 178 | verified | (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. |
$C0:E739 | Spr_ | 131 | verified | Copies a 32-byte tile from GfxRom_D4+X to $7F:Y (BRL from Spr_CopyTile when the graphics are in bank $D4). |
$C0:E7BC | Spr_ | 131 | verified | Copies a 32-byte tile from GfxRom_D2+X to $7F:Y (BRL from Spr_CopyTile when the graphics are in bank $D2). |
$C0:E83F | Spr_ | 131 | verified | Copies a 32-byte tile from GfxRom_D3+X to $7F:Y (BRL from Spr_CopyTile when the graphics are in bank $D3). |
$C0:E8C2 | Spr_ | 115 | verified | Copies 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. |
$C0:E935 | SprBuf_ | 29 | verified | (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. |
$C0:E952 | SprBuf_ | 40 | verified | (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. |
$C0:E97A | SprBuf_ | 48 | verified | (was Sub_E97A.) As SprBuf_Alloc1 for two adjacent free chunks (start entries 0-2). |
$C0:E9AA | SprBuf_ | 56 | verified | (was Sub_E9AA.) As SprBuf_Alloc1 for three adjacent free chunks (start entries 0-1). |
$C0:E9E2 | SprBuf_ | 29 | verified | (was Sub_E9E2.) Releases the SprBuf chunk owned by Obj_Cur: finds it among the first 4 SprBuf_Owner entries and marks it free. |
$C0:E9FF | SprBuf_ | 32 | verified | (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. |
$C0:EA1F | SprBuf_ | 35 | verified | (was Sub_EA1F.) As SprBuf_Free1 for a 3-chunk object (2 possible start entries). |
$C0:EA42 | SprBuf_ | 33 | verified | Releases 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... |
$C0:EA63 | NmiHandler | 509 | verified | The field's vertical-blank interrupt, entered through the RAM trampoline InstallNMI writes (JML NmiHandler at $7E:0500). |
$C0:EC60 | Field_ | 23 | verified | The 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. |
$C0:EC77 | Credits_ | 44 | verified | Sends 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... |
$C0:ECA3 | Oam_ | 41 | verified | Copies 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). |
$C0:ECCC | IrqHandler | 73 | verified | Reached through the RAM trampoline InstallIRQ writes (JML IrqHandler at IrqTrampoline). |
$C0:ED15 | Irq_ | 841 | verified | With 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... |
$C0:F05E | Irq_ | 178 | verified | Draws 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... |
$C0:F110 | Irq_ | 21 | verified | Puts 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... |
$C0:F125 | Irq_ | 6 | verified | |
$C0:F12B | Irq_ | 23 | verified | As Irq_ChoiceCursorClearRow3 for choice row 2: VRAM $1C82 gets $2982, $2983 (tiles $182/$183), $1CA2 gets $2992, $2993 (through Irq_ChoiceCursorClearTail). |
$C0:F142 | Irq_ | 23 | verified | As Irq_ChoiceCursorClearRow3 for choice row 1: VRAM $1C42 gets $2942, $2943 (tiles $142/$143), $1C62 gets $2952, $2953 (through Irq_ChoiceCursorClearTail). |
$C0:F159 | Irq_ | 23 | verified | As Irq_ChoiceCursorClearRow3 for choice row 0: VRAM $1C02 gets $2902, $2903 (tiles $102/$103), $1C22 gets $2912, $2913 (through Irq_ChoiceCursorClearTail). |
$C0:F170 | BankC0_ | 400 | verified | Not code and, as far as found, never read. |
$C0:FD00 | BitReverseTable | 256 | verified | Byte N is N with its 8 bits in reverse order (bit 0 ↔ bit 7, 1 ↔ 6, ...): $01 → $80, $02 → $40, $03 → $C0. |
$C0:FE00 | RandomTable | 256 | verified | The game's pseudo-random bytes, probably: a shuffle of 0-255 (every value appears exactly once; checked against the ROM). |
$C0:FF20 | BitSet | 8 | verified | Bitmask lookup tables ($FF20–$FF2F) BitSet[N] = (1 << N), BitClear[N] = ~(1 << N), for N = 0..7. |
$C0:FF28 | BitClear | 8 | verified | |
$C0:FF30 | ScrollWaveA | 64 | verified | Wave tables ($FF30–$FFAF) One period of a sine-like wave between -6 and +6 (32 signed 16-bit entries), stored twice. |
$C0:FF70 | ScrollWaveB | 64 | verified | |
$C1:0000 | EngCall_ | 3 | verified | The 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... |
$C1:0009 | BankC1_ | 3 | verified | |
$C1:000C | BankC1_ | 3 | verified | |
$C1:000F | BankC1_ | 3 | verified | |
$C1:0012 | BankC1_ | 3 | verified | |
$C1:0015 | BankC1_ | 3 | verified | |
$C1:0018 | BankC1_ | 3 | verified | |
$C1:001B | BankC1_ | 4 | verified | |
$C1:001F | BankC1_ | 4 | verified | |
$C1:0065 | BankC1_ | 6 | verified | A long-callable dispatcher (through BankC1_VecLongDispatch): runs BankC1_LongDispatchTable entry A, then RTL. |
$C1:006B | BankC1_ | 2 | verified | BankC1_LongDispatch's table: entry 0 only (see there). |
$C1:0072 | BankC1_ | 4 | verified | The 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... |
$C1:0076 | BankC1_ | 4 | verified | |
$C1:007A | BankC1_ | 4 | verified | |
$C1:7C3D | BankC1_ | 963 | verified | Not 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 =... |
$C1:8000 | BankC1_ | 3 | verified | Vector into BattleSys_Main. |
$C1:8003 | BankC1_ | 3 | verified | Long 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... |
$C1:CFC2 | BankC1_ | 39 | verified | Saves 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... |
$C1:CFE9 | BankC1_ | 28 | verified | Service 0 (!BankC1Svc_FindItem): A = the item id Y when an !Battle_InvIds entry holds it (X = its index), else 0. |
$C1:D005 | BankC1_ | 81 | verified | Service 1 (!BankC1Svc_AddItem): one more of item Y. |
$C1:D056 | BankC1_ | 48 | verified | Service 2 (!BankC1Svc_RemoveItem): one fewer of item Y. |
$C1:D086 | BankC1_ | 28 | verified | Service 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. |
$C1:D0A2 | BankC1_ | 75 | verified | Service 4 (!BankC1Svc_AddGold): adds Y to the 24-bit gold. |
$C1:D0ED | BankC1_ | 57 | verified | Service 5 (!BankC1Svc_RemoveGold): takes Y off the 24-bit gold. |
$C1:D126 | BankC1_ | 12 | verified | BankC1_RunService's services, by its A (JSR (BankC1_ServiceTable,X) at $C1:CFE1). |
$C1:FDC3 | BankC1_ | 4 | verified | JSL form of BankC1_AddItem (add one of item Y). |
$C1:FDD3 | BankC1_ | 556 | verified | and BankC1_DebugFlag ($C1:FFFF) |
$C1:FFFF | BankC1_ | 1 | verified | The last byte of the bank, read as !BattleRom_DebugFlag (LDA.l) by BattleSys_Main: non-zero enables its pad-2 Select win. |
$C2:0000 | BankC2_ | 3 | verified | the 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... |
$C2:0003 | BankC2_ | 3 | verified | |
$C2:0006 | BankC2_ | 3 | verified | |
$C2:0009 | BankC2_ | 3 | verified | |
$C2:000C | BankC2_ | 3 | verified | |
$C2:000F | BankC2_ | 52 | verified | Starts the bank's scene mode (inferred name: GameLoop_Main sends Loc_Id $01F0-$81EF here; what those locations show is not traced). |
$C2:0043 | BankC2_ | 205 | verified | Writes 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... |
$C2:0110 | C2Scene_ | 31 | verified | Writes 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... |
$C2:012F | C2Scene_ | 47 | verified | Zeroes 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... |
$C2:015E | C2Scene_ | 487 | verified | The scene mode's NMI (reached through !NmiTrampoline, installed by C2Scene_InstallInterrupts). |
$C2:0345 | C2Scene_ | 1 | verified | the scene mode's IRQ, an RTI (installed by C2Scene_InstallInterrupts; nothing here enables IRQs). |
$C2:0346 | C2Scene_ | 7 | verified | Waits until the next NMI: spins until C2Scene_FrameCounter changes. |
$C2:034D | C2Scene_ | 162 | verified | Parks 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). |
$C2:03EF | C2Scene_ | 22 | verified | Empties 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... |
$C2:0405 | C2Scene_ | 79 | verified | Runs 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... |
$C2:0454 | C2Scene_ | 26 | verified | Waits X frames (C2Scene_WaitFrame each time). |
$C2:046E | C2Scene_ | 3 | verified | A JMP to C2Scene_WaitFrame: waits for the next NMI without sending a pending sound command. |
$C2:0471 | C2Scene_ | 25 | verified | Frees 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. |
$C2:048A | C2Scene_ | 10 | verified | Starts 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). |
$C2:0494 | C2Scene_ | 57 | verified | |
$C2:04CD | C2Scene_ | 12 | verified | C2Scene_TaskSpawn over records 0-3 only: the same search and setup (it branches into C2Scene_TaskSpawn_Search). |
$C2:04D9 | C2Scene_ | 34 | verified | Spawns a C2Scene_TaskRunScript task (C2Scene_TaskSpawn, records 4-63) and gives it a script: .ScriptPtr = X, .ScriptBank = A, .Unk0A = 0. |
$C2:04FB | C2Scene_ | 34 | verified | C2Scene_TaskSpawnScript in records 0-3 (C2Scene_TaskSpawnLow). |
$C2:051D | C2Scene_ | 54 | verified | Runs 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)... |
$C2:0553 | C2Scene_ | 3 | verified | JMP (C2Scene_TaskHandler): a JSR here calls the task's handler, which returns to C2Scene_TaskRunAll. |
$C2:0556 | C2Scene_ | 6 | verified | Per BG layer 1-3 (index (layer - 1) * 2): where its metatile definitions are in bank $7E. |
$C2:055C | C2Scene_ | 6 | verified | Per layer: where its map (96 x 64 metatile numbers, C2Scene_MapBytes) is in bank $7E. |
$C2:0562 | C2Scene_ | 6 | verified | Per layer: the VRAM word address of its tilemap. |
$C2:0568 | C2Scene_ | 260 | verified | Scrolls BG layer C2Scene_ScrollLayer horizontally by C2Scene_ScrollPx pixels (signed: negative moves the view left), one pixel per pass. |
$C2:066C | C2Scene_ | 263 | verified | C2Scene_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. |
$C2:0773 | C2Scene_ | 79 | verified | Builds 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... |
$C2:07C2 | C2Scene_ | 79 | verified | C2Scene_EdgeColLeft for the right half of the metatiles: .TopRight and .BottomRight. |
$C2:0811 | C2Scene_ | 50 | verified | Sets 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... |
$C2:0843 | C2Scene_ | 76 | verified | Builds 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... |
$C2:088F | C2Scene_ | 76 | verified | C2Scene_EdgeRowTop for the bottom half of the metatiles: .BottomLeft and .BottomRight. |
$C2:08DB | C2Scene_ | 50 | verified | Sets 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... |
$C2:090D | C2Scene_ | 84 | verified | Queues 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... |
$C2:0961 | C2Scene_ | 100 | verified | Queues 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... |
$C2:09C5 | C2Scene_ | 167 | verified | Redraws 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... |
$C2:0A6C | C2Scene_ | 66 | verified | Builds 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... |
$C2:0AAE | C2Scene_ | 46 | verified | Puts 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... |
$C2:0ADC | C2Scene_ | 119 | verified | DMAs 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... |
$C2:0B53 | C2Scene_ | 163 | verified | Takes 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. |
$C2:0BF6 | C2Scene_ | 87 | verified | Builds 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... |
$C2:0C4D | C2Scene_ | 157 | verified | Empties 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... |
$C2:0CEA | C2Scene_ | 30 | verified | Draws 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. |
$C2:0D08 | C2Scene_ | 261 | verified | Writes the OAM entries of one sprite-list node X. |
$C2:0E0D | C2Scene_ | 16 | verified | The 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). |
$C2:0E1D | C2Anim_ | 45 | verified | Runs 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. |
$C2:0E4A | C2Anim_ | 16 | verified | The handler of each animation opcode 0-7 (C2Anim_Run: JSR (T,X) with X = the opcode * 2). |
$C2:0E5A | C2Anim_ | 17 | verified | Animation op 0, 2 bytes: zeroes the task's byte at offset arg 1 (any of the 64 record bytes, through C2Scene_TaskCur). |
$C2:0E6B | C2Anim_ | 19 | verified | Animation op 1, 2 bytes: adds 1 to the task's byte at offset arg 1. |
$C2:0E7E | C2Anim_ | 19 | verified | Animation op 2, 2 bytes: subtracts 1 from the task's byte at offset arg 1. |
$C2:0E91 | C2Anim_ | 18 | verified | Animation op 3, 2 bytes: moves the script by the signed byte arg 1, counted from the opcode: A = the offset sign-extended. |
$C2:0EA3 | C2Anim_ | 57 | verified | Animation op 4, 4 bytes: shows the sprite frame at arg 1-2 (an address in the script's bank) for arg 3 frames. |
$C2:0EDC | C2Anim_ | 36 | verified | Animation 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). |
$C2:0F00 | C2Anim_ | 53 | verified | Animation 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 =... |
$C2:0F35 | C2Anim_ | 3 | verified | Animation op 7: stops (A = 0, Z=1) with C=1 and does not advance, so every later call stops here again. |
$C2:0F38 | C2Scene_ | 43 | verified | Moves 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... |
$C2:0F63 | C2Scene_ | 46 | verified | Task 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). |
$C2:0F91 | C2Script_ | 166 | verified | The 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. |
$C2:1037 | C2Script_ | 90 | verified | Op $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... |
$C2:1091 | C2Script_ | 23 | verified | Op $01, 2 bytes: .SprAttr = .SprAttr AND $F1 OR arg 1: replaces bits 1-3, which C2Scene_SprDrawNode puts in the OAM palette bits. |
$C2:10A8 | C2Script_ | 23 | verified | Op $02, 2 bytes: .SprAttr = .SprAttr AND $4F OR arg 1: replaces bits 4 and 5 (the OAM priority bits) and bit 7 (C2Scene_SprAttrScroll). |
$C2:10BF | C2Script_ | 14 | verified | Op $03, 10 bytes: starts a C2Scene_TaskUnk1CF5 task (C2Scene_TaskSpawn, records 4-63), which copies this task's record, and advances 10. |
$C2:10CD | C2Script_ | 51 | verified | Op $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... |
$C2:1100 | C2Script_ | 105 | verified | Op $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... |
$C2:1169 | C2Script_ | 2 | verified | Op $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). |
$C2:116B | C2Script_ | 71 | verified | Op $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). |
$C2:11B2 | C2Script_ | 68 | verified | Op $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... |
$C2:11F6 | C2Script_ | 22 | verified | Op $09, 4 bytes: starts another script task (C2Scene_TaskSpawnScript, records 4-63) on the script at arg 1-2 in bank arg 3. |
$C2:120C | C2Script_ | 17 | verified | Op $0A, 2 bytes: task byte arg 1 = 0. |
$C2:121D | C2Script_ | 19 | verified | Op $0B, 2 bytes: task byte arg 1 + 1. |
$C2:1230 | C2Script_ | 19 | verified | Op $0C, 2 bytes: task byte arg 1 - 1. |
$C2:1243 | C2Script_ | 20 | verified | Op $0D, 3 bytes: task byte arg 1 = arg 2. |
$C2:1257 | C2Script_ | 22 | verified | Op $0E, 3 bytes: task byte arg 1 OR= arg 2 (sets those bits). |
$C2:126D | C2Script_ | 24 | verified | Op $0F, 3 bytes: task byte arg 1 AND= NOT arg 2 (clears those bits). |
$C2:1285 | C2Script_ | 17 | verified | Op $10, 3 bytes: RAM byte at arg 1-2 = 0. |
$C2:1296 | C2Script_ | 17 | verified | Op $11, 3 bytes: RAM byte at arg 1-2 + 1. |
$C2:12A7 | C2Script_ | 17 | verified | Op $12, 3 bytes: RAM byte at arg 1-2 - 1. |
$C2:12B8 | C2Script_ | 22 | verified | Op $13, 4 bytes: RAM byte at arg 1-2 = arg 3. |
$C2:12CE | C2Script_ | 25 | verified | Op $14, 4 bytes: RAM byte at arg 1-2 OR= arg 3. |
$C2:12E7 | C2Script_ | 27 | verified | Op $15, 4 bytes: RAM byte at arg 1-2 AND= NOT arg 3. |
$C2:1302 | C2Script_ | 26 | verified | Op $16, 4 bytes: RAM byte at arg 2-3 = task byte arg 1. |
$C2:131C | C2Script_ | 26 | verified | Op $17, 4 bytes: task byte arg 1 = RAM byte at arg 2-3. |
$C2:1336 | C2Script_ | 26 | verified | Op $18, 3 bytes: task byte arg 1 = task byte arg 2. |
$C2:1350 | C2Script_ | 26 | verified | Op $19, 5 bytes: RAM byte at arg 1-2 = RAM byte at arg 3-4. |
$C2:136A | C2Script_ | 11 | verified | Op $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. |
$C2:1375 | C2Script_ | 35 | verified | Op $1B, 3 bytes: task byte arg 1 - 1; while it is not 0, branch by arg 2; at 0, advance 3 (a counted loop). |
$C2:1398 | C2Script_ | 32 | verified | Op $1C, 3 bytes: if task byte arg 1 is 0, branch by arg 2; else advance 3. |
$C2:13B8 | C2Script_ | 32 | verified | Op $1D, 3 bytes: if task byte arg 1 is not 0, branch by arg 2; else advance 3. |
$C2:13D8 | C2Script_ | 36 | verified | Op $1E, 4 bytes: if task byte arg 1 is not arg 2, branch by arg 3; else advance 4. |
$C2:13FC | C2Script_ | 36 | verified | Op $1F, 4 bytes: if task byte arg 1 is arg 2, branch by arg 3; else advance 4. |
$C2:1420 | C2Script_ | 36 | verified | Op $20, 4 bytes: if task byte arg 1 AND arg 2 is not 0, branch by arg 3; else advance 4. |
$C2:1444 | C2Script_ | 37 | verified | Op $21, 4 bytes: if task byte arg 1 AND arg 2 is 0, branch by arg 3; else advance 4. |
$C2:1469 | C2Script_ | 34 | verified | Op $22, 4 bytes: if the RAM byte at arg 1-2 is 0, branch by arg 3; else advance 4. |
$C2:148B | C2Script_ | 34 | verified | Op $23, 4 bytes: if the RAM byte at arg 1-2 is not 0, branch by arg 3; else advance 4. |
$C2:14AD | C2Script_ | 37 | verified | Op $24, 5 bytes: if the RAM byte at arg 1-2 is not arg 3, branch by arg 4; else advance 5. |
$C2:14D2 | C2Script_ | 37 | verified | Op $25, 5 bytes: if the RAM byte at arg 1-2 is arg 3, branch by arg 4; else advance 5. |
$C2:14F7 | C2Script_ | 37 | verified | Op $26, 5 bytes: if the RAM byte at arg 1-2 AND arg 3 is not 0, branch by arg 4; else advance 5. |
$C2:151C | C2Script_ | 37 | verified | Op $27, 5 bytes: if the RAM byte at arg 1-2 AND arg 3 is 0, branch by arg 4; else advance 5. |
$C2:1541 | C2Script_ | 37 | verified | Op $4C, 5 bytes: if the RAM byte at arg 1-2 is below arg 3 (unsigned), branch by arg 4; else advance 5. |
$C2:1566 | C2Script_ | 37 | verified | Op $4D, 5 bytes: if the RAM byte at arg 1-2 is arg 3 or more (unsigned), branch by arg 4; else advance 5. |
$C2:158B | C2Script_ | 14 | verified | Op $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). |
$C2:1599 | C2Script_ | 14 | verified | Op $29, 2 bytes: as C2Script_SpawnUnk20A2 with C2Scene_TaskUnk2105. |
$C2:15A7 | C2Script_ | 14 | verified | Op $2A, 3 bytes: as C2Script_SpawnUnk20A2 with C2Scene_TaskUnk21F8. |
$C2:15B5 | C2Script_ | 14 | verified | Op $2B, 3 bytes: as C2Script_SpawnUnk20A2 with C2Scene_TaskUnk2194. |
$C2:15C3 | C2Script_ | 28 | verified | Op $2C, 5 bytes: .SprX = arg 1-2 and .SprY = arg 3-4, both fractions 0. |
$C2:15DF | C2Script_ | 4 | verified | Op $2D, 2 bytes: does nothing and advances 2 (the byte after the opcode is skipped). |
$C2:15E3 | C2Script_ | 22 | verified | Op $2E, 5 bytes: .XVelFrac = arg 1-2, .XVel = arg 3-4. |
$C2:15F9 | C2Script_ | 22 | verified | Op $2F, 5 bytes: .YVelFrac = arg 1-2, .YVel = arg 3-4. |
$C2:160F | C2Script_ | 14 | verified | Op $30, 2 bytes: starts animation script arg 1 (C2Scene_SetAnim). |
$C2:161D | C2Script_ | 46 | verified | Op $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... |
$C2:164B | C2Script_ | 175 | verified | Op $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. |
$C2:16FA | C2Script_ | 95 | verified | Op $51, 3 bytes: C2Script_ScrollFrames for one layer, arg 1 (passed to C2Scene_Unk0568/066C as is), for arg 2 frames, and without BG3. |
$C2:1759 | C2Script_ | 43 | verified | Drops 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. |
$C2:1784 | C2Script_ | 39 | verified | Tells 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. |
$C2:17AB | C2Script_ | 39 | verified | C2Script_PanTakeX for .YFrac/.SprY. |
$C2:17D2 | C2Script_ | 53 | verified | Op $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... |
$C2:1807 | C2Script_ | 21 | verified | Op $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. |
$C2:181C | C2Script_ | 29 | verified | Op $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. |
$C2:1839 | C2Script_ | 15 | verified | Op $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. |
$C2:1848 | C2Script_ | 23 | verified | Op $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... |
$C2:185F | C2Script_ | 12 | verified | Op $37, 1 byte: returns from C2Script_Call: the script continues at .ScriptReturn (C2Script_Ptr = it - 1, A = 1). |
$C2:186B | C2Script_ | 35 | verified | Op $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. |
$C2:188E | C2Script_ | 38 | verified | Op $39, 2 bytes: C2Script_Wait, running the task's animation (C2Anim_Run) on each frame it waits. |
$C2:18B4 | C2Script_ | 19 | verified | Op $3A, 3 bytes: compares arg 1-2 with the task's age (.Frames, +1 per frame it has run). |
$C2:18C7 | C2Script_ | 9 | verified | Op $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. |
$C2:18D0 | C2Script_ | 7 | verified | Op $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... |
$C2:18D7 | C2Script_ | 26 | verified | |
$C2:18F1 | C2Script_ | 8 | verified | Op $3D, 2 bytes: C2Script_SoundCmd10 unless C2Scene_Unk7F01ED is non-zero: then it branches to C2Script_SoundCmd10_Done, which only advances 2. |
$C2:18F9 | C2Script_ | 32 | verified | Op $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... |
$C2:1919 | C2Script_ | 6 | verified | |
$C2:191F | C2Script_ | 40 | verified | Op $4B, 5 bytes: queues the sound command arg 1 with argument bytes arg 2-4, at rank 0 (C2Scene_QueueSoundCmd). |
$C2:1947 | C2Script_ | 18 | verified | Op $3E, 2 bytes: redraws BG layer arg 1 from its map (C2Scene_DrawBgLayer), e.g. |
$C2:1959 | C2Script_ | 105 | verified | Op $3F, 5 bytes: moves the task along X until .SprX = arg 1-2, at the speed of its X velocity. |
$C2:19C2 | C2Script_ | 105 | verified | Op $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. |
$C2:1A2B | C2Script_ | 2 | verified | Op $41, 1 byte: the same code as C2Script_Halt (op $06): stops (A = 0, Z=1) without advancing, every frame; the task stays. |
$C2:1A2D | C2Script_ | 22 | verified | Op $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. |
$C2:1A43 | C2Script_ | 15 | verified | Op $42, 3 bytes: C2Script_SpawnTask in records 0-3 (C2Scene_TaskSpawnLow): handler arg 1-2. |
$C2:1A52 | C2Script_ | 30 | verified | Op $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... |
$C2:1A70 | C2Script_ | 6 | verified | The helper per list number (C2Script_SetListBit7 and C2Script_ClearListBit7: JSR (T,X) with X = the list * 2). |
$C2:1A76 | C2Script_ | 20 | verified | C2Tmp_10/$11 = the 16-bit address of entry arg 2 of C2Scene_ListA (entry * 7, as entry * 8 - entry, + the list). |
$C2:1A8A | C2Script_ | 17 | verified | C2Tmp_10/$11 = the address of entry arg 2 of C2Scene_ListB (entry * 3 + the list). |
$C2:1A9B | C2Script_ | 17 | verified | C2Tmp_10/$11 = the address of entry arg 2 of C2Scene_ListC (entry * 3 + the list). |
$C2:1AAC | C2Script_ | 30 | verified | Op $45, 3 bytes: C2Script_SetListBit7, clearing the bit instead. |
$C2:1ACA | C2Script_ | 23 | verified | Op $46, 3 bytes: task byte arg 1 += arg 2 (8-bit, wrapping). |
$C2:1AE1 | C2Script_ | 26 | verified | Op $47, 3 bytes: task byte arg 1 -= arg 2 (8-bit, wrapping). |
$C2:1AFB | C2Script_ | 26 | verified | Op $48, 4 bytes: RAM byte at arg 1-2 (through DB) += arg 3. |
$C2:1B15 | C2Script_ | 26 | verified | Op $49, 4 bytes: RAM byte at arg 1-2 (through DB) -= arg 3. |
$C2:1B2F | C2Script_ | 177 | verified | Op $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... |
$C2:1BE0 | C2Script_ | 161 | verified | Op $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... |
$C2:1C81 | C2Script_ | 3 | verified | Op $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). |
$C2:1C84 | C2Scene_ | 26 | verified | Negates the task's X velocity as one 32-bit value (.XVelFrac/.XVel: invert both words and add 1 with the carry), turning it around. |
$C2:1C9E | C2Scene_ | 26 | verified | C2Scene_NegateXVel for .YVelFrac/.YVel. |
$C2:1CB8 | C2Scene_ | 34 | verified | Wraps 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... |
$C2:1CDA | C2Scene_ | 27 | verified | Starts 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. |
$C2:1CF5 | C2Scene_ | 13 | verified | Task 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. |
$C2:1D02 | C2Scene_ | 4 | verified | The state handlers of C2Scene_TaskUnk1CF5 (JMP (T,X) with X = .State * 2). |
$C2:1D06 | C2Scene_ | 70 | verified | State 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... |
$C2:1D4C | C2Scene_ | 105 | verified | State 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... |
$C2:1DB5 | C2Scene_ | 31 | verified | Zeroes C2Scene_PaletteBuf (512 B, $0920-$0B1F: every color black) and the 16 bytes after it, C2Scene_Unk0B20 ($0B20-$0B2F), a word at a time. |
$C2:1DD4 | C2Scene_ | 100 | verified | Task handler (palette load). |
$C2:1E38 | C2Scene_ | 9 | verified | Task handler (palette fade, started by C2Scene_TaskUnk1DD4): runs .State through C2Scene_PalFadeStates: 0 C2Scene_PalFadeStart, 1 C2Scene_PalFadeStep, 2 C2Scene_PalFadeEnd. |
$C2:1E41 | C2Scene_ | 6 | verified | The state handlers of C2Scene_TaskPalFade (X = .State * 2). |
$C2:1E47 | C2Scene_ | 63 | verified | State 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... |
$C2:1E86 | C2Scene_ | 47 | verified | State 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. |
$C2:1EB5 | C2Scene_ | 11 | verified | State 2 (and C2Scene_PalFadeStep's give-up): takes the task out of C2Scene_Unk0B20 for its palette and ends it (C=1). |
$C2:1EC0 | C2Scene_ | 81 | verified | Plans 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... |
$C2:1F11 | C2Scene_ | 116 | verified | For 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 +... |
$C2:1F85 | C2Scene_ | 71 | verified | Takes one fade step on all 16 colors of the palette at .Colors: each color is read, stepped (C2Scene_PalFadeStepColor) and written back (through DB). |
$C2:1FCC | C2Scene_ | 150 | verified | One 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... |
$C2:2062 | C2Scene_ | 64 | verified | Indexed by a fade count 0-63 (C2Scene_PalFadeStepColor): 1 = move the channel this step (counts 32-63), 0 = not yet (0-31). |
$C2:20A2 | C2Scene_ | 9 | verified | Task handler (fade out, op $28): runs .State through C2Scene_FadeOutStates: 0 C2Scene_FadeOutStart, 1 C2Scene_FadeOutStep. |
$C2:20AB | C2Scene_ | 4 | verified | The state handlers of C2Scene_TaskUnk20A2 (X = .State * 2). |
$C2:20AF | C2Scene_ | 48 | verified | State 0: if a fade-out already runs (C2Scene_FadeOutBusy) the task just ends. |
$C2:20DF | C2Scene_ | 38 | verified | State 1, each frame: once .Timer reaches .Rate it zeroes .Timer's low byte and takes C2Scene_Brightness down one. |
$C2:2105 | C2Scene_ | 9 | verified | Task handler (fade in, op $29): runs .State through C2Scene_FadeInStates: 0 C2Scene_FadeInStart, 1 C2Scene_FadeInUnblank, 2 C2Scene_FadeInStep, 3 C2Scene_FadeInEnd. |
$C2:210E | C2Scene_ | 8 | verified | The state handlers of C2Scene_TaskUnk2105 (X = .State * 2). |
$C2:2116 | C2Scene_ | 60 | verified | State 0: if any fade runs (C2Scene_Unk1BF6 non-zero) it ends through C2Scene_FadeInEnd. |
$C2:2152 | C2Scene_ | 29 | verified | State 1: ends (C2Scene_FadeInEnd) if a fade-out has started. |
$C2:216F | C2Scene_ | 30 | verified | State 2: ends (C2Scene_FadeInEnd) if a fade-out has started. |
$C2:218D | C2Scene_ | 7 | verified | State 3, and where the other fade-in states end: clears C2Scene_FadeInBusy and ends the task (C=1). |
$C2:2194 | C2Scene_ | 15 | verified | Task handler (mosaic shrink, op $2B): runs .State through C2Scene_MosaicOutStates: 0 C2Scene_MosaicOutStart, 1 C2Scene_MosaicOutStep. |
$C2:21A3 | C2Scene_ | 4 | verified | The state handlers of C2Scene_TaskUnk2194 (X = .State * 2). |
$C2:21A7 | C2Scene_ | 47 | verified | State 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. |
$C2:21D6 | C2Scene_ | 34 | verified | State 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. |
$C2:21F8 | C2Scene_ | 13 | verified | Task handler (mosaic grow, op $2A): runs .State through C2Scene_MosaicInStates: 0 C2Scene_MosaicInStart, 1 C2Scene_MosaicInStep. |
$C2:2205 | C2Scene_ | 4 | verified | The state handlers of C2Scene_TaskUnk21F8 (X = .State * 2). |
$C2:2209 | C2Scene_ | 47 | verified | State 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. |
$C2:2238 | C2Scene_ | 34 | verified | State 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). |
$C2:225A | Trig_ | 4 | verified | Signed 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... |
$C2:225E | Trig_ | 21 | verified | |
$C2:2273 | C2Scene_ | 4 | verified | The cosine of direction A (adds a quarter turn and falls into the sub-entry C2Scene_Unk2277, $C2:2277, the sine). |
$C2:2277 | C2Scene_ | 38 | verified | |
$C2:229D | C2Scene_ | 144 | verified | The 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... |
$C2:232D | C2Scene_ | 9 | verified | Zeroes the two bytes right after the task records, C2Scene_Unk1B30 and C2Scene_Unk1B31 (their use is not traced). |
$C2:2336 | C2Scene_ | 15 | verified | Returns the next byte of RandomTable ($C0:FE00): the one at index C2Scene_Unk1B30, which then goes up by one (wrapping at 256). |
$C2:2345 | C2Scene_ | 99 | verified | Tests whether two boxes overlap. |
$C2:23A8 | C2Scene_ | 39 | verified | The scene mode's main program, entered once from BankC2_SceneBoot. |
$C2:23CF | C2Scene_ | 12 | verified | |
$C2:23DB | C2Scene_ | 20 | verified | C2Scene_MainLoop's handler for each C2Scene_Mode value 0-9. |
$C2:23EF | C2Scene_ | 19 | verified | C2Scene_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. |
$C2:2402 | C2Scene_ | 211 | verified | Mode 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... |
$C2:24D5 | C2Scene_ | 52 | verified | Mode 2 (set by script op $05) and the end of C2Scene_Mode3: leaves the scene. |
$C2:2509 | C2Scene_ | 4 | verified | Facing 0-3 -> the opposite facing (the facing EOR 1). |
$C2:250D | C2Scene_ | 17 | verified | Mode 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). |
$C2:251E | C2Scene_ | 111 | verified | Modes 5 (C2Scene_ModeMenu) and 9: run the menu over the scene. |
$C2:258D | C2Scene_ | 144 | verified | Mode 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. |
$C2:261D | C2Scene_ | 139 | verified | Mode 8: runs C2Scene_Dial (it clears VRAM and the tasks itself) over a saved scene. |
$C2:26A8 | C2Scene_ | 44 | verified | Zeroes 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). |
$C2:26D4 | C2Scene_ | 2 | verified | The fixed DMA source of C2Scene_ClearVram. |
$C2:26D6 | C2Scene_ | 26 | verified | Copies the last 16 bytes of Menu_FlagBlock7F ($7F:01F0-$01FF) to C2Scene_FlagTailCopy and its first byte (Eng_Unk7F0000) to C2Scene_Flag0Copy. |
$C2:26F0 | C2Scene_ | 19 | verified | Copies C2Scene_FlagTailCopy (16 bytes) back to $7F:01F0-$01FF, the end of Menu_FlagBlock7F (C2Scene_Flag0Copy is not written back). |
$C2:2703 | C2Scene_ | 29 | verified | C2Scene_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). |
$C2:2720 | C2Scene_ | 45 | verified | Puts 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... |
$C2:274D | C2Scene_ | 27 | verified | C2Scene_HeaderPtr = $C6:(the word of C2SceneRom_HeaderTable for scene (Loc_Id AND C2Scene_LocIdMask) - Loc_FirstBankC2). |
$C2:2768 | C2Scene_ | 84 | verified | Unpacks the scene's C2Scene_ObjPackCount sprite graphics packs (header bytes C2Scene_HdrObjGfx..+3, C2SceneRom_ObjPacks) into C2Scene_DecompBuf, C2Scene_PackSlotSize bytes apart (C2Scene_LoadVram... |
$C2:27BC | C2Scene_ | 34 | verified | Unpacks entry C2Scene_UnkC800Pack of C2SceneRom_ObjPacks (the same for every scene) to C2Scene_UnkC800 ($7E:C800); what it holds is not traced. |
$C2:27DE | C2Scene_ | 72 | verified | Unpacks 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... |
$C2:2826 | C2Scene_ | 46 | verified | Unpacks header byte C2Scene_HdrBg3Gfx's C2SceneRom_BgPacks entry into C2Scene_DecompBuf (C2Scene_LoadVram DMAs it to the BG3 tiles at VRAM $7000). |
$C2:2854 | C2Scene_ | 46 | verified | Unpacks header byte C2Scene_HdrBg3Map's C2SceneRom_Bg3MapPacks entry into C2Scene_DecompBuf (C2Scene_LoadVram DMAs it to the BG3 tilemap at VRAM $7800). |
$C2:2882 | C2Scene_ | 107 | verified | Unpacks the scene's palettes (header byte C2Scene_HdrPalettes, C2SceneRom_PalettePacks) into C2Scene_PaletteStage, then the party palettes (entry C2Scene_PartyPalPack) into C2Scene_PartyPalSrc... |
$C2:28ED | C2Scene_ | 21 | verified | Copies C2Scene_PartyPalSize bytes of character A's palette (C2Scene_PartyPalSrc + 32 * A) to Y in bank $7F. |
$C2:2902 | C2Scene_ | 46 | verified | Unpacks header byte C2Scene_HdrUnkB800's C2SceneRom_BgPacks entry into C2Scene_UnkB800 ($7E:B800); what it holds is not traced. |
$C2:2930 | C2Scene_ | 46 | verified | Unpacks 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). |
$C2:295E | C2Scene_ | 46 | verified | Unpacks 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... |
$C2:298C | C2Scene_ | 46 | verified | Unpacks 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). |
$C2:29BA | C2Scene_ | 46 | verified | Unpacks 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. |
$C2:29E8 | C2Scene_ | 46 | verified | Unpacks header byte C2Scene_HdrUnk7200's C2SceneRom_Unk7200Packs entry into C2Scene_Unk7200 ($7E:7200); what it holds is not traced. |
$C2:2A16 | C2Scene_ | 46 | verified | Unpacks header byte C2Scene_HdrScript's C2SceneRom_ScriptPacks entry into C2Scene_ScriptBuf ($7F:0400), over the list data C2Scene_LoadLists has already split up. |
$C2:2A44 | C2Scene_ | 285 | verified | Unpacks 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... |
$C2:2B61 | C2Scene_ | 91 | verified | Unpacks 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... |
$C2:2BBC | C2Scene_ | 19 | verified | Copies C2Scene_PartyGfxSize bytes of character A's graphics (C2Scene_DecompBuf + $400 * A) to Y in bank $7F. |
$C2:2BCF | C2Scene_ | 44 | verified | Copies 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. |
$C2:2BFB | C2Scene_ | 34 | verified | Zeroes C2Scene_HdmaArea ($7E:8621-$8E20, 2048 bytes) through WMADD/WMDATA, with DP = $2100 for the register stores. |
$C2:2C1D | C2Scene_ | 118 | verified | The last setup step of C2Scene_Main: loads the scene and starts its script. |
$C2:2C93 | C2Scene_ | 46 | verified | Loads 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)... |
$C2:2CC1 | C2Scene_ | 175 | verified | Fills 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... |
$C2:2D70 | C2Scene_ | 33 | verified | DMAs 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). |
$C2:2D91 | C2Scene_ | 146 | verified | Once 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... |
$C2:2E23 | C2Scene_ | 79 | verified | Copies 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... |
$C2:2E72 | C2Scene_ | 79 | verified | The reverse of C2Scene_SaveState: copies the six saved blocks from bank $7F back where they came from (the direct page $00-$EF included). |
$C2:2EC1 | C2Scene_ | 3 | verified | Fade out at 1 frame per step (op $28, C2Scene_TaskUnk20A2), then end. |
$C2:2EC4 | C2Scene_ | 3 | verified | Fade in at 1 frame per step (op $29, C2Scene_TaskUnk2105), then end. |
$C2:2EC7 | C2Scene_ | 9 | verified | Started 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. |
$C2:2ED0 | C2Scene_ | 9 | verified | Started 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. |
$C2:2ED9 | C2Scene_ | 54 | verified | Queues 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... |
$C2:2F0F | C2Scene_ | 63 | verified | Sends 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... |
$C2:2F4E | C2Scene_ | 70 | verified | Queues (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... |
$C2:2F94 | C2Scene_ | 9 | verified | Task handler: runs .State through C2Scene_ZoneSoundStates. |
$C2:2F9D | C2Scene_ | 8 | verified | C2Scene_TaskZoneSound's handler for each .State. |
$C2:2FA5 | C2Scene_ | 9 | verified | State 0: .State = 1, C2Scene_SoundZone = C2Scene_ZoneNone; falls into C2Scene_ZoneSoundWatch. |
$C2:2FAE | C2Scene_ | 142 | verified | State 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... |
$C2:303C | C2Scene_ | 19 | verified | State 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... |
$C2:304F | C2Scene_ | 39 | verified | State 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... |
$C2:3076 | C2Scene_ | 40 | verified | Queues 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... |
$C2:309E | C2Scene_ | 35 | verified | While 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. |
$C2:30C1 | C2Scene_ | 12 | verified | C2Scene_ObjWatch's handler for each C2Scene_Unk027E state 0-5. |
$C2:30CD | C2Scene_ | 219 | verified | State 0. |
$C2:31A8 | C2Scene_ | 10 | verified | Scene 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). |
$C2:31B2 | C2Scene_ | 2 | verified | State 1, and C2Scene_ObjSel 0 and 1 in C2Scene_ObjFullTable and C2Scene_ObjEmptyTable (shared label): nothing; C=0. |
$C2:31B4 | C2Scene_ | 14 | verified | States 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. |
$C2:31C2 | C2Scene_ | 14 | verified | |
$C2:31D0 | C2Scene_ | 34 | verified | State 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... |
$C2:31F2 | C2Scene_ | 8 | verified | C2Scene_ObjWatchFull's handler for C2Scene_ObjSel 0-3. |
$C2:31FA | C2Scene_ | 2 | verified | No object selected: nothing; C=0. |
$C2:31FC | C2Scene_ | 16 | verified | Object A's (C2Scene_Unk0294) or B's (C2Scene_ObjBFlags) count equal to C2Scene_PartyCount: state C2Scene_ObjWatchStBusyA or C2Scene_ObjWatchStBusyB. |
$C2:320C | C2Scene_ | 16 | verified | |
$C2:321C | C2Scene_ | 8 | verified | State 5: runs C2Scene_ObjSel through C2Scene_ObjEmptyTable: when the selected object's count is 0, back to state C2Scene_ObjWatchStIdle with no object selected. |
$C2:3224 | C2Scene_ | 8 | verified | C2Scene_ObjWatchEmpty's handler for C2Scene_ObjSel 0-3. |
$C2:322C | C2Scene_ | 2 | verified | No object selected: nothing; C=0. |
$C2:322E | C2Scene_ | 15 | verified | Object A's (C2Scene_Unk0294) or B's (C2Scene_ObjBFlags) count at 0: C2Scene_Unk027E = C2Scene_ObjWatchStIdle and C2Scene_ObjSel = 0. |
$C2:323D | C2Scene_ | 15 | verified | |
$C2:324C | C2Scene_ | 8 | verified | C2Scene_BoxesOverlap extents (left, right, up, down) of the party in C2Scene_ObjWatchIdle: 8 each way. |
$C2:3254 | C2Scene_ | 8 | verified | Extents of object A: only 8 down from its position. |
$C2:325C | C2Scene_ | 8 | verified | Extents of object B: the same as object A's. |
$C2:3264 | C2Scene_ | 17 | verified | Copies its state C2Scene_Unk0280 to C2Scene_Unk0281 and runs it through C2Scene_TrigWatchStates (0: C2Scene_TrigWatchCheck, C2Scene_TrigStWait: C2Scene_TrigWatchWait). |
$C2:3275 | C2Scene_ | 4 | verified | C2Scene_TrigWatch's handler for each C2Scene_Unk0280 state. |
$C2:3279 | C2Scene_ | 62 | verified | State 0. |
$C2:32B7 | C2Scene_ | 22 | verified | State 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. |
$C2:32CD | C2Scene_ | 124 | verified | For 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... |
$C2:3349 | C2Scene_ | 53 | verified | Zeroes 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... |
$C2:337E | C2Scene_ | 16 | verified | C2Scene_TrigDispatch's action for each C2Scene_TrigFound mask: ListB wins over ListA's task byte, ListA over ListC's mode. |
$C2:338E | C2Scene_ | 1 | verified | No entry at the tile: nothing. |
$C2:338F | C2Scene_ | 11 | verified | A 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). |
$C2:339A | C2Scene_ | 16 | verified | A 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). |
$C2:33AA | C2Scene_ | 42 | verified | A 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... |
$C2:33D4 | C2Scene_ | 48 | verified | A ListA and a ListB entry: the ListA entry's .Unk02 to C2Scene_Unk1B58 (C2Scene_GetListAUnk02), then as C2Scene_TrigListB, and C2Scene_Unk1B43 = 0. |
$C2:3404 | C2Scene_ | 41 | verified | Task handler. |
$C2:342D | C2Scene_ | 12 | verified | C2Scene_LeaderTask's handler for each C2Scene_Unk027E state 0-5. |
$C2:3439 | C2Scene_ | 36 | verified | ObjWatch state 0. |
$C2:345D | C2Scene_ | 16 | verified | C2Scene_LeaderWalk's handler per C2Scene_Unk0280 state (4 words each) and .State. |
$C2:346D | C2Scene_ | 12 | verified | ObjWatch state 2 (C2Scene_ObjWatchStBusyA): the party's position C2Scene_StartX/Y = object A's (C2Scene_ObjAX/Y), every frame; then falls into C2Scene_LeaderNone. |
$C2:3479 | C2Scene_ | 2 | verified | ObjWatch state 1, and the end of C2Scene_LeaderOnObjA: nothing; C=0. |
$C2:347B | C2Scene_ | 14 | verified | ObjWatch state 3 (C2Scene_ObjWatchStBusyB): as C2Scene_LeaderOnObjA with object B (C2Scene_ObjBX/Y). |
$C2:3489 | C2Scene_ | 10 | verified | ObjWatch state 4 (C2Scene_ObjWatchStFull): runs entry .State of C2Scene_LeaderBoardSteps (walk to the selected object, then count in). |
$C2:3493 | C2Scene_ | 8 | verified | C2Scene_LeaderBoard's handler for .State 0-3. |
$C2:349B | C2Scene_ | 8 | verified | ObjWatch state 5 (C2Scene_ObjWatchStEmpty): runs entry C2Scene_ObjSel of C2Scene_LeaderLeaveTable. |
$C2:34A3 | C2Scene_ | 8 | verified | C2Scene_LeaderLeave's handler for C2Scene_ObjSel 0-3. |
$C2:34AB | C2Scene_ | 2 | verified | No object selected: nothing; C=0. |
$C2:34AD | C2Scene_ | 32 | verified | Leaving 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... |
$C2:34CD | C2Scene_ | 43 | verified | |
$C2:34F8 | C2Scene_ | 111 | verified | Step 0 of TrigWatch state 0: sets the sprite up and falls into C2Scene_LeaderInput. |
$C2:3567 | C2Scene_ | 390 | verified | Step 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). |
$C2:36ED | C2Scene_ | 133 | verified | Step 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... |
$C2:3772 | C2Scene_ | 47 | verified | Step 0 of TrigWatch state C2Scene_TrigStWait: while the first C2Scene_MemberWords word is 0, nothing. |
$C2:37A1 | C2Scene_ | 26 | verified | Step 1 of TrigWatch state C2Scene_TrigStWait: runs the script (C2Scene_TaskRunScript); when it ends (C=1) .State = 2 instead of the task ending. |
$C2:37BB | C2Scene_ | 2 | verified | Step 2 of TrigWatch state C2Scene_TrigStWait (the script has ended): nothing until a watcher's state changes; C=0. |
$C2:37BD | C2Scene_ | 13 | verified | Step 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... |
$C2:37CA | C2Scene_ | 8 | verified | C2Scene_LeaderBoardStart's code for C2Scene_ObjSel 0-3. |
$C2:37D2 | C2Scene_ | 4 | verified | |
$C2:37D6 | C2Scene_ | 2 | verified | |
$C2:37D8 | C2Scene_ | 16 | verified | |
$C2:37E8 | C2Scene_ | 79 | verified | |
$C2:3837 | C2Scene_ | 142 | verified | Step 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... |
$C2:38C5 | C2Scene_ | 85 | verified | Step 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). |
$C2:391A | C2Scene_ | 2 | verified | Step 3 of ObjWatch state 4 (counted in): nothing; C=0. |
$C2:391C | C2Scene_ | 24 | verified | Fills all C2Scene_TrailLen entries of C2Scene_TrailX/Y with C2Scene_StartX/Y. |
$C2:3934 | C2Scene_ | 31 | verified | Stores the task's .SprX/.SprY at C2Scene_TrailPos in C2Scene_TrailX/Y and moves C2Scene_TrailPos one word on (wrapping after 16). |
$C2:3953 | C2Scene_ | 44 | verified | Starts 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... |
$C2:397F | C2Scene_ | 8 | verified | Walk animation numbers (C2Scene_SetAnim), two per facing: up, down, left, right. |
$C2:3987 | C2Scene_ | 35 | verified | Starts 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. |
$C2:39AA | C2Scene_ | 4 | verified | Stand animation numbers per facing: up, down, left, right. |
$C2:39AE | C2Scene_ | 21 | verified | C=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... |
$C2:39C3 | C2Scene_ | 18 | verified | C=1 when either upper property nibble (.PropUL, .PropUR) has bit 0 or 1 set (C2Scene_TilePropWall): the step is not taken. |
$C2:39D5 | C2Scene_ | 129 | verified | Reads 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... |
$C2:3A56 | C2Scene_ | 57 | verified | .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). |
$C2:3A8F | C2Scene_ | 34 | verified | Wraps .TargetX/Y into the scene map as C2Scene_WrapTaskPos does the position: X + or - C2Scene_MapWidthPx (once), Y AND C2Scene_MapHeightMask. |
$C2:3AB1 | C2Scene_ | 9 | verified | Adds 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. |
$C2:3ABA | C2Scene_ | 8 | verified | C2Scene_ObjCountUp's handler for C2Scene_ObjSel 0-3. |
$C2:3AC2 | C2Scene_ | 1 | verified | |
$C2:3AC3 | C2Scene_ | 4 | verified | |
$C2:3AC7 | C2Scene_ | 4 | verified | |
$C2:3ACB | C2Scene_ | 23 | verified | Loc_EntryX/Y = C2Scene_StartX/Y / 8 (the party's 8x8 tile; the inverse of C2Scene_SetStartPos). |
$C2:3AE2 | C2Scene_ | 45 | verified | Task handler. |
$C2:3B0F | C2Scene_ | 12 | verified | C2Scene_MemberTask's handler for each C2Scene_Unk027E state 0-5. |
$C2:3B1B | C2Scene_ | 61 | verified | ObjWatch state 0. |
$C2:3B58 | C2Scene_ | 16 | verified | C2Scene_MemberWalk's handler per C2Scene_Unk0280 state (4 words each) and .State. |
$C2:3B68 | C2Scene_ | 2 | verified | ObjWatch states 1-3: nothing (the member stays where it is while the object is busy); C=0. |
$C2:3B6A | C2Scene_ | 10 | verified | ObjWatch state 4 (C2Scene_ObjWatchStFull): runs entry .State of C2Scene_MemberBoardSteps. |
$C2:3B74 | C2Scene_ | 8 | verified | C2Scene_MemberBoard's handler for .State 0-3. |
$C2:3B7C | C2Scene_ | 8 | verified | ObjWatch state 5 (C2Scene_ObjWatchStEmpty): runs entry C2Scene_ObjSel of C2Scene_MemberLeaveTable. |
$C2:3B84 | C2Scene_ | 8 | verified | C2Scene_MemberLeave's handler for C2Scene_ObjSel 0-3. |
$C2:3B8C | C2Scene_ | 2 | verified | No object selected: nothing; C=0. |
$C2:3B8E | C2Scene_ | 26 | verified | Leaving 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... |
$C2:3BA8 | C2Scene_ | 26 | verified | C2Scene_MemberLeaveA for object B (C2Scene_ObjBX/Y, C2Scene_ObjBFlags). |
$C2:3BC2 | C2Scene_ | 119 | verified | Step 0 of TrigWatch state 0: sets the sprite up and falls into C2Scene_MemberFollow. |
$C2:3C39 | C2Scene_ | 161 | verified | Step 1 of TrigWatch state 0: decides the next move. |
$C2:3CDA | C2Scene_ | 97 | verified | Step 2 of TrigWatch state 0, a leg in X. |
$C2:3D3B | C2Scene_ | 97 | verified | Step 3 of TrigWatch state 0: C2Scene_MemberMoveX with the axes swapped (.SprY, .TargetY; the next leg is in X: .State 2, C2Scene_MemberXLeg). |
$C2:3D9C | C2Scene_ | 37 | verified | Step 0 of TrigWatch state C2Scene_TrigStWait: as C2Scene_LeaderScriptStart with the member's own word, C2Scene_MemberWords + .Slot * 2 (no tile property read here). |
$C2:3DC1 | C2Scene_ | 34 | verified | Step 1 of TrigWatch state C2Scene_TrigStWait: runs the script; when it ends, .State = 2. |
$C2:3DE3 | C2Scene_ | 2 | verified | Step 2 of TrigWatch state C2Scene_TrigStWait: nothing; C=0. |
$C2:3DE5 | C2Scene_ | 50 | verified | Step 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... |
$C2:3E17 | C2Scene_ | 100 | verified | Step 1 of ObjWatch state 4, a leg in X: moves until .SprX = .TargetX. |
$C2:3E7B | C2Scene_ | 100 | verified | Step 2 of ObjWatch state 4: C2Scene_MemberBoardX with the axes swapped (.SprY, .TargetY; the next leg is in X: .State 1, C2Scene_MemberXLeg). |
$C2:3EDF | C2Scene_ | 2 | verified | Step 3 of ObjWatch state 4 (counted in): nothing; C=0. |
$C2:3EE1 | C2Scene_ | 70 | verified | C=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... |
$C2:3F27 | C2Scene_ | 70 | verified | C2Scene_LeaderNear16 with C2Scene_NearLo32 / C2Scene_NearHi32 (32 pixels). |
$C2:3F6D | C2Scene_ | 39 | verified | .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. |
$C2:3F94 | C2Scene_ | 19 | verified | .TargetX/Y = C2Scene_StartX/Y AND C2Scene_TileSnapMask (the start of the party's 8x8 tile). |
$C2:3FA7 | C2Scene_ | 21 | verified | .DeltaX/Y = .TargetX/Y - .SprX/Y. |
$C2:3FBC | C2Scene_ | 44 | verified | Plans .Route from the member's position to its target. |
$C2:3FE8 | C2Scene_ | 8 | verified | C2Scene_MemberRoute's handler for each C2Scene_PathBlocked result 0-3. |
$C2:3FF0 | C2Scene_ | 92 | verified | |
$C2:404C | C2Scene_ | 10 | verified | |
$C2:4056 | C2Scene_ | 10 | verified | |
$C2:4060 | C2Scene_ | 132 | verified | |
$C2:40E4 | C2Scene_ | 65 | verified | .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. |
$C2:4125 | C2Scene_ | 19 | verified | Sets the velocity of the route's first leg: C2Scene_MemberYLeg for a C2Scene_RouteYFirst route, else C2Scene_MemberXLeg. |
$C2:4138 | C2Scene_ | 26 | verified | A leg in X: .XVel = -1 for a negative .DeltaX, else +1; .XVelFrac, .YVel and .YVelFrac 0. |
$C2:4152 | C2Scene_ | 26 | verified | C2Scene_MemberXLeg for Y: .YVel = -1 / +1 by .DeltaY, the other three velocity words 0. |
$C2:416C | C2Scene_ | 24 | verified | Not moving (.Facing loses C2Scene_WalkMoving) and the stand animation of the member's character (the Party_Members byte of .Slot; C2Scene_SetStandAnim, tail call). |
$C2:4184 | C2Scene_ | 49 | verified | Zeroes 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... |
$C2:41B5 | C2Scene_ | 80 | verified | Tests 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... |
$C2:4205 | C2Scene_ | 85 | verified | Walks 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... |
$C2:425A | C2Scene_ | 131 | verified | C2Scene_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... |
$C2:42DD | C2Scene_ | 9 | verified | Task handler: runs the C2Scene_ObjAStates handler of .State. |
$C2:42E6 | C2Scene_ | 18 | verified | C2Scene_ObjATask's handler for each .State 0-8. |
$C2:42F8 | C2Scene_ | 211 | verified | State 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... |
$C2:43CB | C2Scene_ | 113 | verified | State 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... |
$C2:443C | C2Scene_ | 123 | verified | State 2: moves by the velocity (C2Scene_TaskMove, C2Scene_WrapTaskPos) until .Frames reaches .Duration; on frame C2Scene_RiseAttrAt the sprite gets .SprAttr C2Scene_ObjAttrPrio3. |
$C2:44B7 | C2Scene_ | 446 | verified | State 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... |
$C2:4675 | C2Scene_ | 109 | verified | State 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... |
$C2:46E2 | C2Scene_ | 70 | verified | State 5 (C2Scene_ObjAStLand): moves by the velocity until .Frames reaches .Duration (low byte), with .SprAttr C2Scene_ObjAttrPrio2 from frame C2Scene_LandAttrAt; C2Anim_Run. |
$C2:4728 | C2Scene_ | 251 | verified | State 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). |
$C2:4823 | C2Scene_ | 101 | verified | State 7 (C2Scene_ObjAStScript): runs the task's own script (C2Scene_TaskRunScript on .ScriptPtr: C2Scene_ObjAScrArrive or C2Scene_ObjAScrLeave). |
$C2:4888 | C2Scene_ | 17 | verified | State 8 (C2Scene_ObjAStWaitEmpty): when C2Scene_ObjWatch reaches C2Scene_ObjWatchStEmpty (the party is getting out), .State 0; C2Anim_Run every frame. |
$C2:4899 | C2Scene_ | 16 | verified | C2Scene_ObjAFly's step velocity per facing: .XVel then .YVel (whole pixels a frame, signed). |
$C2:48A9 | C2Scene_ | 28 | verified | Starts the animation of the task's .Facing: entry .Facing of C2Scene_ObjAFaceAnims, or of C2Scene_ObjAFaceAnims5 with C2Scene_ObjAFlag5 (C2Scene_SetAnim, by JMP). |
$C2:48C5 | C2Scene_ | 4 | verified | Animation numbers per facing (up, down, left, right) of C2Scene_ObjAFaceAnim. |
$C2:48C9 | C2Scene_ | 4 | verified | The same with C2Scene_ObjAFlag5. |
$C2:48CD | C2Scene_ | 27 | verified | Moves 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). |
$C2:48E8 | C2Scene_ | 47 | verified | C=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... |
$C2:4917 | C2Scene_ | 47 | verified | C2Scene_ObjAOverlap for object B: active (C2Scene_ObjBFlags), Loc_Id C2Scene_ObjBLocId (unmasked) and C2Scene_ObjBLandBox at C2Scene_ObjBX/Y against box A. |
$C2:4946 | C2Scene_ | 8 | verified | C2Scene_BoxesOverlap extents (left, right, up, down) of object A in C2Scene_ObjAFly and C2Scene_ObjASpotWatch: 8 each way. |
$C2:494E | C2Scene_ | 8 | verified | Object B's extents for C2Scene_ObjBOverlap: 8 each way. |
$C2:4956 | C2Scene_ | 8 | verified | The extents of the spot at C2Scene_SpotX/Y (C2Scene_ObjASpotWatch): 8 each way. |
$C2:495E | C2Scene_ | 9 | verified | Task 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. |
$C2:4967 | C2Scene_ | 4 | verified | C2Scene_ObjAMarkTask's handler for .State 0 and 1. |
$C2:496B | C2Scene_ | 33 | verified | State 0: ends the task (C=1) unless object A is at this location (Loc_Id AND C2Scene_LocIdMask equal to C2Scene_ObjALoc). |
$C2:498C | C2Scene_ | 67 | verified | State 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... |
$C2:49CF | C2Scene_ | 91 | verified | Task 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... |
$C2:4A2A | C2Scene_ | 46 | verified | Queues 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... |
$C2:4A58 | C2Scene_ | 67 | verified | After 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)... |
$C2:4A9B | C2Scene_ | 18 | verified | Script 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... |
$C2:4AAD | C2Scene_ | 223 | verified | Object A's own script for state C2Scene_ObjAStScript after mode 8 chose a location (C2Scene_ObjAAfterMode8). |
$C2:4B8C | C2Scene_ | 108 | verified | Object A's own script when the scene loads with the party in it after mode 8 (C2Scene_ObjAInit). |
$C2:4BF8 | C2Scene_ | 35 | verified | Script subroutine (C2Script_Call): the velocity half a pixel a frame in the .Facing direction (the other axis left as it is). |
$C2:4C1B | C2Scene_ | 35 | verified | C2Scene_ObjAScrSlowVel at 8 pixels a frame. |
$C2:4C3E | C2Scene_ | 10 | verified | Script subroutine: task byte +$22 rounds of 2 frames' movement (C2Script_MoveFrames), each starting a C2Scene_ObjAScrTrail task. |
$C2:4C48 | C2Scene_ | 39 | verified | Script 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... |
$C2:4C6F | C2Scene_ | 32 | verified | A 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... |
$C2:4C8F | C2Scene_ | 54 | verified | Script 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... |
$C2:4CC5 | C2Scene_ | 9 | verified | Task handler: runs the C2Scene_ObjBStates handler of .State. |
$C2:4CCE | C2Scene_ | 12 | verified | C2Scene_ObjBTask's handler for each .State 0-5. |
$C2:4CDA | C2Scene_ | 93 | verified | State 0: the sprite at C2Scene_ObjBX/Y (fractions and .SprTile 0), facing down (.Facing, .PrevFacing). |
$C2:4D37 | C2Scene_ | 66 | verified | State 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... |
$C2:4D79 | C2Scene_ | 86 | verified | State 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... |
$C2:4DCF | C2Scene_ | 431 | verified | State 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... |
$C2:4F7E | C2Scene_ | 109 | verified | State 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 =... |
$C2:4FEB | C2Scene_ | 76 | verified | State 5 (C2Scene_ObjBStLand): moves for C2Scene_LandFrames frames (.SprAttr C2Scene_ObjBAttrPrio2 from frame C2Scene_LandAttrAt); then C2Scene_ObjBusy and C2Scene_ObjBLanding cleared, .State... |
$C2:5037 | C2Scene_ | 16 | verified | C2Scene_ObjBFly's step velocity per facing (.XVel, .YVel), as C2Scene_ObjAStepVel. |
$C2:5047 | C2Scene_ | 4 | verified | Object B's animation per facing (up, down, left, right). |
$C2:504B | C2Scene_ | 9 | verified | Task handler of object B's second sprite (no reference in the bank's code): runs the C2Scene_ObjBMarkStates handler of .State. |
$C2:5054 | C2Scene_ | 4 | verified | C2Scene_ObjBMarkTask's handler for .State 0 and 1. |
$C2:5058 | C2Scene_ | 16 | verified | State 0: .State 1, .SprAttr C2Scene_ObjAttrPrio3, .SprTile 0; falls into C2Scene_ObjBMarkShow. |
$C2:5068 | C2Scene_ | 39 | verified | State 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... |
$C2:508F | C2Scene_ | 8 | verified | Per C2Scene_ObjBAloft: the Y offset from object B and the animation. |
$C2:5097 | C2Scene_ | 9 | verified | Task handler of one of object B's mates (see the banner): runs the C2Scene_ObjBMateStates handler of .State. |
$C2:50A0 | C2Scene_ | 12 | verified | C2Scene_ObjBMateTask's handler for each .State 0-5. |
$C2:50AC | C2Scene_ | 100 | verified | State 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... |
$C2:5110 | C2Scene_ | 60 | verified | State 1: nothing (C=0) until C2Scene_ObjWatch reaches C2Scene_ObjWatchStBusyB. |
$C2:514C | C2Scene_ | 89 | verified | State 2: moves for C2Scene_RiseFrames frames (OAM priority 3 from frame C2Scene_RiseAttrAt), saving the position (C2Scene_ObjBMateSavePos) and running the animation each frame. |
$C2:51A5 | C2Scene_ | 130 | verified | State 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... |
$C2:5227 | C2Scene_ | 34 | verified | State 4: for C2Scene_MateAimFrames frames moves without overshooting the target (C2Scene_ObjBMateClampVel, C2Scene_TaskMove, C2Scene_WrapTaskPos), saves the position and runs the animation; then... |
$C2:5249 | C2Scene_ | 65 | verified | State 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... |
$C2:528A | C2Scene_ | 147 | verified | Keeps 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... |
$C2:531D | C2Scene_ | 68 | verified | .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... |
$C2:5361 | C2Scene_ | 19 | verified | .TargetX/Y = C2Scene_ObjBX/Y. |
$C2:5374 | C2Scene_ | 95 | verified | Velocity 0, then the direction from the position to .TargetX/Y (C2Scene_Unk229D). |
$C2:53D3 | C2Scene_ | 105 | verified | The 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... |
$C2:543C | C2Scene_ | 32 | verified | C2Scene_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. |
$C2:545C | C2Scene_ | 20 | verified | .PrevFacing = .Facing; .Facing = Rom_DirToFacing's entry for the direction in C2Scene_AimDir (C2Scene_ObjBMateAim's). |
$C2:5470 | C2Scene_ | 28 | verified | When .Facing differs from .PrevFacing: starts entry (.Slot - 1) * 4 + .Facing of C2Scene_ObjBMateFaceAnims (C2Scene_SetAnim, by JMP). |
$C2:548C | C2Scene_ | 8 | verified | The mates' animation per slot (1, then 2) and facing (up, down, left, right). |
$C2:5494 | C2Scene_ | 9 | verified | Task 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. |
$C2:549D | C2Scene_ | 10 | verified | C2Scene_ObjBMateMarkTask's handler for each .State 0-4. |
$C2:54A7 | C2Scene_ | 103 | verified | State 0: .SprAttr C2Scene_ObjAttrPrio3. |
$C2:550E | C2Scene_ | 52 | verified | State 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... |
$C2:5542 | C2Scene_ | 43 | verified | State 2: moves for C2Scene_RiseFrames frames with C2Anim_Run; then .State C2Scene_MateStFollow, .SprY + C2Scene_MateMarkDrop, animation C2Scene_AnimMarkBelow, and falls into... |
$C2:556D | C2Scene_ | 100 | verified | State 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... |
$C2:55D1 | C2Scene_ | 52 | verified | State 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. |
$C2:5605 | C2Scene_ | 35 | verified | Copies the task's position to C2Scene_ObjBMate1X/Y (.Slot bit 0 set: slot 1) or C2Scene_ObjBMate2X/Y, where the mark tasks read it. |
$C2:5628 | C2Scene_ | 15 | verified | Task 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... |
$C2:5637 | C2Scene_ | 8 | verified | C2Scene_LabelTask's handler for each .State 0-3. |
$C2:563F | C2Scene_ | 36 | verified | State 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... |
$C2:5663 | C2Scene_ | 54 | verified | State 1: nothing (C=0) while C2Scene_Unk1B58 is 0. |
$C2:5699 | C2Scene_ | 96 | verified | State 2: one TextWin_Step of one character (TextWin_StepCount 1) per frame while TextWin_Status comes back TextWin_StatusStepDone (C=0). |
$C2:56F9 | C2Scene_ | 124 | verified | State 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... |
$C2:5775 | C2Scene_ | 35 | verified | Copies 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... |
$C2:5798 | C2Scene_ | 24 | verified | Zeroes 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. |
$C2:57B0 | C2Scene_ | 18 | verified | Data 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. |
$C2:57C2 | C2Scene_ | 4 | verified | C2Scene_Unk5775's source for C2Scene_Unk8600. |
$C2:57C6 | C2Scene_ | 25 | verified | C2Scene_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. |
$C2:57DF | TextWin_ | 68 | verified | Starts 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... |
$C2:5823 | TextWin_ | 31 | verified | One 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. |
$C2:5842 | TextWin_ | 8 | verified | TextWin_Step's handler for each TextWin_State (TextWin_State0-3). |
$C2:584A | TextWin_ | 7 | verified | Jumps 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. |
$C2:5851 | TextWin_ | 66 | verified | TextWin_CheckStatus's handler for each TextWin_Status value $00-$20. |
$C2:5893 | TextWin_ | 2 | verified | Status 0: nothing to do; C=1 so TextWin_Step skips the state handler. |
$C2:5895 | TextWin_ | 2 | verified | TextWin_StatusRun: C=0, run the state handler. |
$C2:5897 | TextWin_ | 4 | verified | |
$C2:589B | TextWin_ | 23 | verified | |
$C2:58B2 | TextWin_ | 12 | verified | State 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... |
$C2:58BE | TextWin_ | 69 | verified | |
$C2:5903 | TextWin_ | 66 | verified | TextWin_State0's handler for each control code $00-$20 (Y = the code). |
$C2:5945 | TextWin_ | 10 | verified | Code $03: the next string byte to TextWin_Code3Arg, then as TextWin_CodeSetStatus. |
$C2:594F | TextWin_ | 4 | verified | |
$C2:5953 | TextWin_ | 50 | verified | Code $0D: prints the byte at TextWin_Unk3D (which steps on by 1). |
$C2:5985 | TextWin_ | 67 | verified | Code $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. |
$C2:59C8 | TextWin_ | 52 | verified | Code $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. |
$C2:59FC | TextWin_ | 21 | verified | |
$C2:5A11 | TextWin_ | 21 | verified | |
$C2:5A26 | TextWin_ | 38 | verified | Code $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... |
$C2:5A4C | TextWin_ | 62 | verified | Code $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... |
$C2:5A8A | TextWin_ | 4 | verified | TextWin_CodeExt's handler for b = 0 and 1. |
$C2:5A8E | TextWin_ | 66 | verified | Code $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... |
$C2:5AD0 | TextWin_ | 44 | verified | Code $12 $01: name number (the byte at TextWin_Unk3D) of TextWinRom_EnemyNames, all TextWin_RomNameSize bytes of it (the padding is drawn too). |
$C2:5AFC | TextWin_ | 10 | verified | |
$C2:5B06 | TextWin_ | 14 | verified | Codes $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. |
$C2:5B14 | TextWin_ | 1 | verified | Code $10: nothing; the step ends. |
$C2:5B15 | TextWin_ | 38 | verified | Codes TextWin_FirstCharName-$19: the name at TextWin_CharNamePtrs entry (code - $13), in bank $7E, its length by TextWin_CharNameLen, drawn in state TextWin_StateDict. |
$C2:5B3B | TextWin_ | 27 | verified | Code $1A: the first name at TextWin_CharNames (the one TextWin_CharNamePtrs entry 0 also points at), as TextWin_CodeCharName. |
$C2:5B56 | TextWin_ | 26 | verified | Code $1E: the TextWin_StrNadiaLen glyphs at TextWin_StrNadia ($C2:6146, which spell "Nadia" with $A0 = "A", $BA = "a"), in state TextWin_StateDict. |
$C2:5B70 | TextWin_ | 43 | verified | Codes TextWin_FirstMemberName-$1D: the name of the character in party position (code - $1B): Party_Members gives the TextWin_CharNamePtrs index; then as TextWin_CodeCharName. |
$C2:5B9B | TextWin_ | 59 | verified | Code $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). |
$C2:5BD6 | TextWin_ | 31 | verified | Code $20: the eighth name at TextWin_CharNames ($7E:2C4D, after the seven TextWin_CharNamePtrs points at), as TextWin_CodeCharName. |
$C2:5BF5 | TextWin_ | 51 | verified | State 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). |
$C2:5C28 | TextWin_ | 8 | verified | TextWin_State1's exit by (sub-string left) + 2 * (steps left). |
$C2:5C30 | TextWin_ | 2 | verified | |
$C2:5C32 | TextWin_ | 5 | verified | |
$C2:5C37 | TextWin_ | 5 | verified | |
$C2:5C3C | TextWin_ | 2 | verified | |
$C2:5C3E | TextWin_ | 35 | verified | State TextWin_StateDec: draws the next decimal digit at TextWin_SubPtr as glyph TextWin_DigitGlyph0 + the digit, then exits as TextWin_State1 does (TextWin_State2Next). |
$C2:5C61 | TextWin_ | 8 | verified | TextWin_State2's exit, as TextWin_State1Next. |
$C2:5C69 | TextWin_ | 2 | verified | |
$C2:5C6B | TextWin_ | 5 | verified | |
$C2:5C70 | TextWin_ | 5 | verified | |
$C2:5C75 | TextWin_ | 2 | verified | |
$C2:5C77 | TextWin_ | 51 | verified | State 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. |
$C2:5CAA | TextWin_ | 8 | verified | TextWin_State3's exit, as TextWin_State1Next. |
$C2:5CB2 | TextWin_ | 2 | verified | |
$C2:5CB4 | TextWin_ | 5 | verified | |
$C2:5CB9 | TextWin_ | 5 | verified | |
$C2:5CBE | TextWin_ | 2 | verified | |
$C2:5CC0 | TextWin_ | 67 | verified | Appends 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... |
$C2:5D03 | TextWin_ | 32 | verified | The glyph of each hex digit 0-F (TextWin_HexByte): "0"-"9" are $D4-$DD, "A"-"F" $A0-$A5. |
$C2:5D23 | TextWin_ | 17 | verified | A = the number of bytes at TextWin_SubPtr before the first TextWin_NamePad, at most 10. |
$C2:5D34 | TextWin_ | 17 | verified | As TextWin_NameLen10, at most 11 (a whole TextWinRom name). |
$C2:5D45 | TextWin_ | 17 | verified | A = the number of bytes at TextWin_SubPtr before the first 0, at most TextWin_CharNameMax. |
$C2:5D56 | TextWin_ | 59 | verified | Drops 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. |
$C2:5D91 | TextWin_ | 28 | verified | |
$C2:5DAD | TextWin_ | 23 | verified | |
$C2:5DC4 | TextWin_ | 114 | verified | Draws 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... |
$C2:5E36 | TextWin_ | 83 | verified | Draws 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... |
$C2:5E89 | TextWin_ | 38 | verified | One 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... |
$C2:5EAF | TextWin_ | 16 | verified | TextWin_Blit2bppRow's entry for each pen shift 0-7. |
$C2:5EBF | TextWin_ | 16 | verified | |
$C2:5ECF | TextWin_ | 1 | verified | |
$C2:5ED0 | TextWin_ | 1 | verified | |
$C2:5ED1 | TextWin_ | 1 | verified | |
$C2:5ED2 | TextWin_ | 19 | verified | |
$C2:5EE5 | TextWin_ | 3 | verified | |
$C2:5EE8 | TextWin_ | 3 | verified | |
$C2:5EEB | TextWin_ | 28 | verified | |
$C2:5F07 | TextWin_ | 83 | verified | As 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... |
$C2:5F5A | TextWin_ | 38 | verified | TextWin_Blit2bppRow with the tile offsets of TextWin_TileOfs4bpp. |
$C2:5F80 | TextWin_ | 16 | verified | TextWin_Blit4bppRow's entry for each pen shift 0-7. |
$C2:5F90 | TextWin_ | 16 | verified | |
$C2:5FA0 | TextWin_ | 1 | verified | |
$C2:5FA1 | TextWin_ | 1 | verified | |
$C2:5FA2 | TextWin_ | 1 | verified | |
$C2:5FA3 | TextWin_ | 19 | verified | |
$C2:5FB6 | TextWin_ | 3 | verified | |
$C2:5FB9 | TextWin_ | 3 | verified | |
$C2:5FBC | TextWin_ | 28 | verified | |
$C2:5FD8 | TextWin_ | 14 | verified | The 16-bit addresses (bank $7E) of the first 7 names at TextWin_CharNames, TextWin_CharNameSize bytes apart (codes $11 and $13-$19). |
$C2:5FE6 | TextWin_ | 128 | verified | TextWin_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). |
$C2:6066 | TextWin_ | 128 | verified | As TextWin_TileOfs2bpp for TextWin_Blit4bppRow, $20 bytes per tile: columns 0-15 from $000, 16-31 from $400, then $200 and $600. |
$C2:60E6 | TextWin_ | 96 | verified | The pen advance in pixels of each glyph $A0-$FF (TextWin_DrawGlyph; index glyph - TextWin_FirstGlyph). |
$C2:6146 | TextWin_ | 5 | verified | Glyphs "Nadia" (TextWin_CodeNadia, code $1E). |
$C2:614B | TextWin_ | 19 | verified | One 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). |
$C2:615E | TextWin_ | 34 | verified | TextWin_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). |
$C2:6180 | TextWin_ | 61 | verified | TextWin_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... |
$C2:61BD | TextWin_ | 116 | verified | TextWin_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). |
$C2:6231 | TextWin_ | 50 | verified | TextWin_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... |
$C2:6263 | C2Scene_ | 11 | verified | C2Scene_Unk1B58 = .Unk02 of the ListA entry at offset C2Scene_Unk1B32. |
$C2:626E | C2Scene_ | 24 | verified | C2Scene_Unk1B45 = the C2Scene_ListD word (a script address in bank $7F) picked by .Script of the ListB entry at offset C2Scene_Unk1B32+2. |
$C2:6286 | C2Scene_ | 11 | verified | C2Scene_Unk1B47 = the byte 3 past the start of the ListC entry at offset C2Scene_Unk1B32+4. |
$C2:6291 | C2Scene_ | 29 | verified | A = the metatile number at column C2Scene_PropCol (0-95), row C2Scene_PropRow of the map at C2Scene_PropMap (byte row * 96 + column). |
$C2:62AE | C2Scene_ | 63 | verified | A = 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... |
$C2:62ED | C2Scene_ | 50 | verified | Returns 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... |
$C2:631F | C2Scene_ | 192 | verified | Mode 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... |
$C2:63DF | C2Scene_ | 33 | verified | Builds 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... |
$C2:6400 | C2Scene_ | 83 | verified | For 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... |
$C2:6453 | C2Scene_ | 9 | verified | Shifts 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. |
$C2:645C | C2Scene_ | 226 | verified | Draws 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... |
$C2:653E | C2Scene_ | 80 | verified | Draws 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... |
$C2:658E | C2Scene_ | 36 | verified | Turns 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. |
$C2:65B2 | C2Scene_ | 186 | verified | Writes 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... |
$C2:666C | C2Scene_ | 9 | verified | Task handler started by C2Scene_MapView: runs .State through C2Scene_MapZoomStates. |
$C2:6675 | C2Scene_ | 8 | verified | C2Scene_TaskMapZoom's handler for each .State. |
$C2:667D | C2Scene_ | 46 | verified | State 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 =... |
$C2:66AB | C2Scene_ | 62 | verified | State 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... |
$C2:66E9 | C2Scene_ | 27 | verified | State 2: when Pad_Unk00F6 has C2Scene_MapViewExitBtn (bit 3), .State = 3 and the script C2Scene_ScrMapViewExit starts. |
$C2:6704 | C2Scene_ | 50 | verified | State 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). |
$C2:6736 | C2Scene_ | 125 | verified | Sets 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... |
$C2:67B3 | C2Scene_ | 71 | verified | The 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... |
$C2:67FA | C2Scene_ | 65 | verified | Task handler (started by C2Scene_ScrMapViewMarkers): a marker sprite at the leader's place on the zoomed-out picture. |
$C2:683B | C2Scene_ | 79 | verified | Task 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... |
$C2:688A | C2Scene_ | 25 | verified | Turns 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... |
$C2:68A3 | C2Scene_ | 65 | verified | Task 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... |
$C2:68E4 | C2Scene_ | 16 | verified | C2Scene_TaskLocMarker's screen X for Loc_Id $1F0-$1F7 (index (location - Loc_FirstBankC2) * 2). |
$C2:68F4 | C2Scene_ | 113 | verified | Sets 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... |
$C2:6965 | C2Scene_ | 139 | verified | Draws 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... |
$C2:69F0 | C2Scene_ | 8 | verified | C2Scene_MapViewLabel's string number for Loc_Id $1F0-$1F7 (read as a word; only the low byte is kept). |
$C2:69F8 | C2Scene_ | 7 | verified | Started 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. |
$C2:69FF | C2Scene_ | 11 | verified | Started 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... |
$C2:6A0A | C2Scene_ | 14 | verified | Started by C2Scene_MapZoomOut when fully zoomed out: clears the task's fields, C2Scene_MapMarkersOff = 0, and starts the three marker tasks. |
$C2:6A18 | C2Scene_ | 8 | verified | Animation (C2Anim_Run) of C2Scene_TaskLeaderMarker: frame C2Scene_FrameMapMarkerA for 16 frames, nothing for 16, again: a blink. |
$C2:6A20 | C2Scene_ | 10 | verified | Animation of C2Scene_TaskObjAMarker: 8 frames of nothing, frame C2Scene_FrameMapMarkerB for 16, 8 of nothing, again. |
$C2:6A2A | C2Scene_ | 5 | verified | Sprite frame (C2Scene_SprDrawNode): one piece at (-4, -4), tile 0 (the first tile C2Scene_MapView loaded from C2SceneRom_MapMarkerTiles). |
$C2:6A2F | C2Scene_ | 5 | verified | The same with tile 2 (the second marker tile). |
$C2:6A34 | C2Scene_ | 148 | verified | Mode 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... |
$C2:6AC8 | C2Scene_ | 9 | verified | Task handler started by C2Scene_DialLoad: runs .State through C2Scene_DialStates. |
$C2:6AD1 | C2Scene_ | 6 | verified | C2Scene_TaskDial's handler for each .State. |
$C2:6AD7 | C2Scene_ | 135 | verified | State 0: .State = 1; .Sel = the current location's entry (C2Scene_DialFindLoc). |
$C2:6B5E | C2Scene_ | 182 | verified | State 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)... |
$C2:6C14 | C2Scene_ | 131 | verified | State 2, once per frame. |
$C2:6C97 | C2Scene_ | 14 | verified | The Loc_Id of each marker 0-6 (C2Scene_DialSelLoc, C2Scene_DialFindLoc). |
$C2:6CA5 | C2Scene_ | 14 | verified | The list used once C2Scene_Flag0Copy is C2Scene_DialLateFlag or more: marker 5 is $01F6 instead of $01F4. |
$C2:6CB3 | C2Scene_ | 14 | verified | The hand's angle (Trig_Sin1024 units, 1024 per turn) for marker 0-6. |
$C2:6CC1 | C2Scene_ | 620 | verified | |
$C2:6F2D | C2Scene_ | 6 | verified | The 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. |
$C2:6F33 | C2Scene_ | 82 | verified | Signed 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... |
$C2:6F85 | C2Scene_ | 9 | verified | Task handler started by C2Scene_DialLoad: runs .State through C2Scene_SwirlStates (0: set up, 1: every frame after). |
$C2:6F8E | C2Scene_ | 4 | verified | C2Scene_TaskSwirl's handler for each .State. |
$C2:6F92 | C2Scene_ | 245 | verified | State 0: .State = 1, .Angle = 0. |
$C2:7087 | C2Scene_ | 188 | verified | State 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... |
$C2:7143 | C2Scene_ | 9 | verified | Task handler of the seven markers (C2Scene_DialLoad starts one per .Sel 0-6): runs .State through C2Scene_DialMarkStates. |
$C2:714C | C2Scene_ | 10 | verified | C2Scene_TaskDialMark's handler for each .State. |
$C2:7156 | C2Scene_ | 43 | verified | State 0: .State = 1, .SprAttr = C2Scene_ObjAttrPrio3, .SprTile = 0, .SprX/.SprY = the bytes of C2Scene_DialMarkPos for .Sel (high bytes 0). |
$C2:7181 | C2Scene_ | 30 | verified | State 1: nothing drawn until C2Scene_DialSel = .Sel; then .State = 2, the marker's select animation (C2Scene_DialMarkAnims, first byte) is started and run. |
$C2:719F | C2Scene_ | 15 | verified | State 2: runs the animation; once .AnimTimer is 0 at the start of a frame, .State = 3. |
$C2:71AE | C2Scene_ | 30 | verified | State 3: runs the animation; when C2Scene_DialSel is no longer .Sel, .State = 4 and the deselect animation (C2Scene_DialMarkAnims, second byte) starts first. |
$C2:71CC | C2Scene_ | 17 | verified | State 4: runs the animation; once .AnimTimer is 0 at the start of a frame, .State = 1 (hidden again). |
$C2:71DD | C2Scene_ | 14 | verified | Screen 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. |
$C2:71EB | C2Scene_ | 14 | verified | C2SceneRom_AnimTable numbers of markers 0-6: select, then deselect. |
$C2:71F9 | C2Scene_ | 39 | verified | Unpacks entry C2Tmp_08 of C2Scene_DialPacks, its source in bank A, to bank $7F (Decomp_ToWramVec). |
$C2:7220 | C2Scene_ | 12 | verified | Source and destination (bank $7F) address of the three packs C2Scene_DialLoad unpacks (the source banks are its arguments). |
$C2:722C | C2Scene_ | 40 | verified | DMAs C2Scene_DialPixelBytes bytes of C2Scene_DecompBuf to VMDATAH from VRAM word 0: the pixels of mode-7 tiles 0-31. |
$C2:7254 | C2Scene_ | 100 | verified | DMAs 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... |
$C2:72B8 | C2Scene_ | 32 | verified | VRAM word address of each 32 x 32 block of C2Scene_DialUploadMap. |
$C2:72D8 | C2Scene_ | 73 | verified | For 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... |
$C2:7321 | C2Scene_ | 64 | verified | The tiles of pack 0 that become sprite tiles 0-$3F (C2Scene_DialUploadObjTiles). |
$C2:7361 | C2Scene_ | 40 | verified | Splits 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. |
$C2:7389 | C2Scene_ | 209 | verified | Loads 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... |
$C2:745A | C2Scene_ | 32 | verified | A = the Loc_Id word of marker .Sel (task X) in C2Scene_DialLocs, or in C2Scene_DialLocsLate once C2Scene_Flag0Copy is C2Scene_DialLateFlag or more. |
$C2:747A | C2Scene_ | 52 | verified | A = the marker (0-6) whose location in the list C2Scene_DialSelLoc would use is Loc_Id AND C2Scene_LocIdMask; 6 when none is. |
$C2:74AE | C2Scene_ | 5 | verified | Started last by C2Scene_DialLoad: fade in at 1 frame per step, wait 16 frames, end. |
$C2:74B3 | C2Scene_ | 5 | verified | Started by C2Scene_Dial when the mode changes: fade out at 1 frame per step, wait 16 frames, end. |
$C2:74B8 | C2Scene_ | 76 | verified | Started 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... |
$C2:7504 | C2Scene_ | 73 | verified | Started 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. |
$C2:754D | C2Scene_ | 40 | verified | Script 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)... |
$C2:7575 | C2Scene_ | 35 | verified | Script 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. |
$C2:7598 | C2Scene_ | 43 | verified | Script 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. |
$C2:75C3 | C2Scene_ | 58 | verified | Task 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... |
$C2:75FD | C2Scene_ | 85 | verified | Task 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... |
$C2:7652 | C2Scene_ | 176 | verified | Task handler (op $35 at $C3:9811): a horizontal wave on BG3. |
$C2:7702 | C2Scene_ | 87 | verified | Task 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 ->... |
$C2:7759 | C2Scene_ | 153 | verified | Task 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. |
$C2:77F2 | C2Scene_ | 87 | verified | Task handler (op $35 at $C3:AC92): C2Scene_TaskBg3Slide with the velocity X about -17.32 and Y -10 pixels a frame. |
$C2:7849 | C2Scene_ | 23 | verified | Task 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... |
$C2:7860 | C2Scene_ | 15 | verified | Script routine: marks all three Party_Members slots empty (C2Scene_PartySlotEmpty). |
$C2:786F | C2Scene_ | 25 | verified | Script routine: copies the three Party_Members bytes to C2Scene_PartySave (C2Scene_RestoreParty puts them back). |
$C2:7888 | C2Scene_ | 25 | verified | Script routine: copies C2Scene_PartySave back to Party_Members. |
$C2:78A1 | C2Scene_ | 66 | verified | Script 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. |
$C2:78E3 | C2Scene_ | 46 | verified | Script 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... |
$C2:7911 | C2Scene_ | 70 | verified | |
$C2:7957 | C2Scene_ | 42 | verified | Script 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. |
$C2:7981 | C2Scene_ | 71 | verified | Script 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... |
$C2:79C8 | C2Scene_ | 24 | verified | Script routine: adds 1/8 pixel a frame (C2Scene_GravityFrac) to the task's Y velocity (.YVelFrac, carrying into .YVel). |
$C2:79E0 | C2Scene_ | 44 | verified | Script 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... |
$C2:7A0C | C2Scene_ | 19 | verified | Script routine: .SprX = $220 + a random 0-255, then falls into the sub-entry C2Scene_RandYA ($C2:7A1F): .SprY = $38 + a random 0-255. |
$C2:7A1F | C2Scene_ | 18 | verified | |
$C2:7A31 | C2Scene_ | 19 | verified | Script 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. |
$C2:7A44 | C2Scene_ | 18 | verified | |
$C2:7A56 | C2Scene_ | 89 | verified | Script 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... |
$C2:7AAF | C2Scene_ | 43 | verified | Script 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... |
$C2:7ADA | C2Scene_ | 17 | verified | Script routine (op $34 at $C3:CA30): points C2Scene_HdmaValues words 0-1 at C2Scene_HandBufA and its second half (the noise). |
$C2:7AEB | C2Scene_ | 17 | verified | Script 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). |
$C2:7AFC | C2Scene_ | 36 | verified | Script 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. |
$C2:7B20 | C2Scene_ | 36 | verified | Script 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... |
$C2:7B44 | C2Scene_ | 11 | verified | Script routine (op $34 at $C3:CCA3): sets bit 0 of C2Scene_Unk7F00AA (a byte of Menu_FlagBlock7F; what it means is not traced). |
$C2:7B4F | C2Scene_ | 11 | verified | Script routine (op $34 at $C3:9238): sets bit 3 of C2Scene_Unk7F019A (Menu_FlagBlock7F; meaning not traced). |
$C2:7B5A | C2Scene_ | 37 | verified | Unpacks entry C2Scene_ExtraObjPack of C2SceneRom_ObjPacks into C2Scene_DecompBuf. |
$C2:7B7F | C2Scene_ | 32 | verified | Unpacks entry C2Scene_ExtraPalPack of C2SceneRom_PalettePacks to A:X (C2Scene_LoadLocExtraGfx passes bank $00 and an address inside C2Scene_PaletteBuf). |
$C2:7B9F | C2Scene_ | 37 | verified | Unpacks entry C2Scene_UnkC600Pack of C2SceneRom_PalettePacks into C2Scene_UnkC600 ($7E:C600); what it holds is not traced. |
$C2:7BC4 | C2Scene_ | 13 | verified | Script routine (op $34 at $C3:98F4): C2Tmp_00 = 1 when bit 1 of C2Scene_Unk7F00F7 is set, else 0. |
$C2:7BD1 | C2Scene_ | 7 | verified | Script routine (op $34 at $C3:B665 and $C3:C669): Menu_Config1E (the byte LocLoad_AudioSetup keeps the music track in) = C2Tmp_00. |
$C2:7BD8 | C2Scene_ | 80 | verified | Script 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... |
$C2:7C28 | C2Scene_ | 32 | verified | Bit plane 0 rows of the four tile pairs C2Scene_BuildPatternTiles builds, 8 rows per pair, sparse to full. |
$C2:7C48 | C2Scene_ | 7 | verified | Script routine (no op $34 reference found): C2Scene_Unk7F00CE = C2Tmp_00. |
$C2:7C4F | C2Scene_ | 7 | verified | Script routine (op $34 at $C3:C448): C2Scene_Unk7F00DA = C2Tmp_00. |
$C2:7C56 | C2Scene_ | 65 | verified | Script 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... |
$C2:7C97 | C2Scene_ | 65 | verified | Script 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... |
$C2:7CD8 | C2Scene_ | 134 | verified | Script 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)... |
$C2:7D5E | C2Scene_ | 134 | verified | Script 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]). |
$C2:7DE4 | BankC2_ | 540 | verified | $FF fill up to $C2:8000, where the menu part of the bank starts (BankC2_Entry8000). |
$C2:8000 | BankC2_ | 2 | verified | Three 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... |
$C2:8002 | BankC2_ | 2 | verified | |
$C2:8004 | BankC2_ | 2 | verified | |
$C2:8006 | BankC2_ | 4 | verified | Menu_ReadPad as a long call (the BankC2_Entry8002 vector). |
$C2:800A | BankC2_ | 4 | verified | Menu_RunCommand as a long call (the BankC2_Entry8004 vector). |
$C2:800E | BankC2_ | 129 | verified | The menu (reached by BRA from BankC2_Entry8000). |
$C2:808F | Menu_ | 7 | verified | Menu_Mode for each BankC2_MenuEntry argument 0-6 (an index into Menu_ModeLists). |
$C2:8096 | Menu_ | 166 | verified | The 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... |
$C2:813C | Menu_ | 46 | verified | |
$C2:816A | Menu_ | 38 | verified | Lists 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... |
$C2:8190 | Menu_ | 74 | verified | The menu's scheduler; never returns. |
$C2:81DA | Menu_ | 60 | verified | |
$C2:8216 | Menu_ | 8 | verified | |
$C2:821E | Menu_ | 13 | verified | |
$C2:822B | Menu_ | 11 | verified | |
$C2:8236 | Menu_ | 19 | verified | |
$C2:8249 | Menu_ | 12 | verified | Puts 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). |
$C2:8255 | Menu_ | 23 | verified | Frees the slots whose bit is set in A's low byte (bit n: slot n). |
$C2:826C | Menu_ | 3 | verified | Thread 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... |
$C2:826F | Menu_ | 34 | verified | |
$C2:8291 | Menu_ | 1 | verified | An 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. |
$C2:8292 | Menu_ | 32 | verified | One 16-bit address (bank $C2) per Menu_Mode $00-$0F: the list of handler addresses Menu_MainThread indexes by Menu_ThreadVar. |
$C2:82B2 | Menu_ | 47 | verified | Leaves 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 =... |
$C2:82E1 | Menu_ | 63 | verified | Zeroes 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... |
$C2:8320 | Menu_ | 15 | verified | Leaves 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... |
$C2:832F | Menu_ | 30 | verified | |
$C2:834D | Menu_ | 56 | verified | For 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... |
$C2:8385 | Menu_ | 9 | verified | Appends 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... |
$C2:838E | Menu_ | 7 | verified | |
$C2:8395 | Menu_ | 13 | verified | |
$C2:83A2 | Menu_ | 16 | verified | Y = Menu_VramQueue + Menu_VramQueueEnd (the next record's address) and A = 7 (the MVN count of 8 bytes). |
$C2:83B2 | Menu_ | 11 | verified | Starts Menu_FadeInThread in slot 0. |
$C2:83BD | Menu_ | 13 | verified | Thread: waits a frame, fades the brightness up by 2 a frame (Menu_Fade) and ends. |
$C2:83CA | Menu_ | 6 | verified | Menu_Fade with a step of -2 (to black). |
$C2:83D0 | Menu_ | 54 | verified | Fades 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... |
$C2:8406 | Menu_ | 8 | verified | Copied over NmiTrampoline / IrqTrampoline ($0500-$0507) by Menu_InitSystems: JML Menu_Nmi and JML Menu_Irq, the menu's interrupt handlers. |
$C2:840E | Menu_ | 100 | verified | The 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. |
$C2:8472 | Menu_ | 1 | verified | The menu's IRQ handler (through the JML at $C2:840A): returns at once. |
$C2:8473 | Menu_ | 93 | verified | The menu NMI's pad step. |
$C2:84D0 | Menu_ | 2 | verified | Menu_PadRepeatDelay for Menu_RepeatStage 0 and 1. |
$C2:84D2 | Menu_ | 26 | verified | The 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... |
$C2:84EC | Menu_ | 89 | verified | Waits 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)... |
$C2:8545 | Menu_ | 16 | verified | Turns 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... |
$C2:8555 | Menu_ | 89 | verified | |
$C2:85AE | Menu_ | 34 | verified | Adds 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... |
$C2:85D0 | Menu_ | 6 | verified | The 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). |
$C2:85D6 | Menu_ | 141 | verified | The 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... |
$C2:8663 | Menu_ | 70 | verified | Sends 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... |
$C2:86A9 | Menu_ | 52 | verified | When 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. |
$C2:86DD | Menu_ | 148 | verified | Builds 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... |
$C2:8771 | Menu_ | 32 | verified | 16 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. |
$C2:8791 | Menu_ | 60 | verified | Adds 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. |
$C2:87CD | Menu_ | 8 | verified | |
$C2:87D5 | Menu_ | 37 | verified | Takes 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)... |
$C2:87FA | Menu_ | 28 | verified | Finds 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). |
$C2:8816 | Menu_ | 10 | verified | Menu_LoadCharRecA for character A, keeping P and X. |
$C2:8820 | Menu_ | 25 | verified | Loads the character at Menu_PartyList[Menu_CurMember] (Menu_LoadCharRecA); Menu_CurIsReserve = $FF when that index is past the active members (Menu_PartyActive), else 0. |
$C2:8839 | Menu_ | 72 | verified | Copies 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... |
$C2:8881 | Menu_ | 38 | verified | The 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... |
$C2:88A7 | Menu_ | 6 | verified | The 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). |
$C2:88AD | Menu_ | 43 | verified | Menu_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... |
$C2:88D8 | Menu_ | 40 | verified | As 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... |
$C2:8900 | Menu_ | 79 | verified | For 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... |
$C2:894F | Menu_ | 4 | verified | The 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). |
$C2:8953 | Menu_ | 137 | verified | Lists 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... |
$C2:89DC | Menu_ | 8 | verified | First id and end id of each Menu_ListKind (Menu_ListEquipItems). |
$C2:89E4 | Menu_ | 14 | verified | Menu_CursorYOfs = 0 and starts Menu_CursorThreadA in slot 6. |
$C2:89F2 | Menu_ | 8 | verified | Thread: Menu_CursorStepA, wait a frame, for ever. |
$C2:89FA | Menu_ | 55 | verified | One 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... |
$C2:8A31 | Menu_ | 20 | verified | Menu_CursorTileAttr = Menu_Unk0772 and starts Menu_CursorThreadB in slot 6. |
$C2:8A45 | Menu_ | 83 | verified | Thread: 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. |
$C2:8A98 | Menu_ | 26 | verified | Menu_BlinkMask = $FC, Menu_CursorTileAttr = Menu_Unk0772, and starts Menu_CursorThreadC in slot 6. |
$C2:8AB2 | Menu_ | 8 | verified | Thread: Menu_CursorStepC, wait a frame, for ever. |
$C2:8ABA | Menu_ | 27 | verified | One 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... |
$C2:8AD5 | Menu_ | 32 | verified | Starts Menu_CursorThreadD in slot 6 with the three blink timers at 3, 1 and 2 and Menu_CursorBlink = 2 (sprite 1 starts hidden). |
$C2:8AF5 | Menu_ | 8 | verified | Thread: Menu_CursorStepD, wait a frame, for ever. |
$C2:8AFD | Menu_ | 108 | verified | One 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... |
$C2:8B69 | Menu_ | 5 | verified | Blink 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... |
$C2:8B6E | Menu_ | 23 | verified | |
$C2:8B85 | Menu_ | 14 | verified | The 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). |
$C2:8B93 | Menu_ | 19 | verified | Menu_ArrowsOff = 0 and starts Menu_ListArrowsThread in slot 4. |
$C2:8BA6 | Menu_ | 18 | verified | A = the low byte of A x 4, through the hardware multiplier (two XBAs and a NOP as the wait). |
$C2:8BB8 | Menu_ | 126 | verified | Thread (slot 4): each frame counts Menu_ArrowTimer (7..0) and toggles bit 0 of Menu_ArrowBlink when it wraps. |
$C2:8C36 | Menu_ | 36 | verified | Runs 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. |
$C2:8C5A | Menu_ | 1 | verified | |
$C2:8C5B | Menu_ | 26 | verified | Menu_RunCommand's handlers by command number (BankC2Cmd_* in constants_engine.inc). |
$C2:8C75 | Menu_ | 4 | verified | Command 0: Menu_CmdFindListed over the 3 active positions only. |
$C2:8C79 | Menu_ | 26 | verified | Command 1: puts character Menu_CmdChar in the active party. |
$C2:8C93 | Menu_ | 15 | verified | position Y = Menu_CmdChar, and its bit in Menu_Unk29AF (BankFF_CharBits: $80 for character 0 ... $01 for 7) set; A = the character. |
$C2:8CA2 | Menu_ | 28 | verified | Command 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... |
$C2:8CBE | Menu_ | 17 | verified | |
$C2:8CCF | Menu_ | 2 | verified | Command 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). |
$C2:8CD1 | Menu_ | 20 | verified | |
$C2:8CE5 | Menu_ | 18 | verified | Command 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. |
$C2:8CF7 | Menu_ | 14 | verified | Command 5: empties the Menu_PartyOrder position of character Menu_CmdChar (bit 7 set; nothing moves up). |
$C2:8D05 | Menu_ | 23 | verified | Command 6: Menu_RecRefillWord3 for each of the 7 Menu_CharRecords. |
$C2:8D1C | Menu_ | 41 | verified | For 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. |
$C2:8D45 | Menu_ | 30 | verified | Command 7: for each of the 7 Menu_CharRecords, byte .Word7 = byte .Word9 (low bytes only). |
$C2:8D63 | Menu_ | 7 | verified | Command 8: Menu_SramUnk7FE2 = $FF (BankC2_MenuEntry's new-game path zeroes it; meaning not traced). |
$C2:8D6A | Menu_ | 37 | verified | Command 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... |
$C2:8D8F | Menu_ | 80 | verified | Command $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... |
$C2:8DDF | Menu_ | 4 | verified | the "no item" id of categories 0-3. |
$C2:8DE3 | Menu_ | 59 | verified | the item path (Menu_ItemId non-zero). |
$C2:8E1E | Menu_ | 15 | verified | Command $0C: A = the count of item Menu_ItemId held (Menu_FindItem), 0 when there is none. |
$C2:8E2D | Menu_ | 85 | verified | Menu_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... |
$C2:8E82 | Menu_ | 41 | verified | Member 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... |
$C2:8EAB | Menu_ | 33 | verified | As 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. |
$C2:8ECC | Menu_ | 137 | verified | The six Menu_HealAmounts words (HP for members 0-2, then MP), with DB=$00 for the multiplier. |
$C2:8F55 | Menu_ | 23 | verified | Menu_UseHealItem's confirm: Menu_ApplyHeal, colours $84-$87 = MenuRom_HealNumberPal, Menu_ShowHealNumbers. |
$C2:8F6C | Menu_ | 95 | verified | Shows 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... |
$C2:8FCB | Menu_ | 36 | verified | Member 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... |
$C2:8FEF | Menu_ | 39 | verified | As Menu_HealNumberHp for the MP amount (Menu_HealShown + 6, one byte to BCD), into Menu_HealShown + 6 at Menu_Tmp00, Menu_HealParts bit 1. |
$C2:9016 | Menu_ | 49 | verified | The 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... |
$C2:9047 | Menu_ | 76 | verified | Sound 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... |
$C2:9093 | Menu_ | 101 | verified | Puts 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... |
$C2:90F8 | Menu_ | 4 | verified | By the highest digit drawn (0-3): the first sprite's X offset, -4, -8, -12, -16 (the number centred on .ScreenX). |
$C2:90FC | Menu_ | 37 | verified | With 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. |
$C2:9121 | Menu_ | 22 | verified | With Menu_Unk0D7E set: Menu_InvStash is copied back over the inventory ($200 bytes). |
$C2:9137 | Menu_ | 55 | verified | Menu_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... |
$C2:916E | Menu_ | 109 | verified | Menu_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]... |
$C2:91DB | Menu_ | 16 | verified | The 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. |
$C2:91EB | Menu_ | 56 | verified | WRDIV = 5 x Menu_WeaponPower + 12 x stat 0; A = 9 (the divisor). |
$C2:9223 | Menu_ | 25 | verified | WRDIV = 2 x (stat 4 + Menu_WeaponPower); A = 3. |
$C2:923C | Menu_ | 37 | verified | WRDIV = 16 x stat 0 + MenuRom_Char5Attack[record byte $12] (a word table; the doubled index is taken 8-bit); A = 9. |
$C2:9261 | Menu_ | 13 | verified | Adds equipment slot Menu_EquipSlotIdx (0-3) to the sums through Menu_EquipStatTable. |
$C2:926E | Menu_ | 8 | verified | Menu_EquipSlotStats' routine per slot: 0 the weapon byte (.Unk29), 1 .Unk28, 2 .Unk27, 3 the accessory (.Unk2A), the category order of Menu_EquipSlotOffsets. |
$C2:9276 | Menu_ | 11 | verified | Menu_WeaponPower = Menu_ItemSortKeys[weapon], then its boosts (Menu_AddItemBoosts, a branch). |
$C2:9281 | Menu_ | 5 | verified | X = the .Unk28 item, then Menu_EquipStatCat2's .add. |
$C2:9286 | Menu_ | 15 | verified | Menu_ArmorSum += Menu_ItemSortKeys[.Unk27 item] (from .add: the item in X), then its boosts (Menu_AddItemBoosts). |
$C2:9295 | Menu_ | 44 | verified | The 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... |
$C2:92C1 | Menu_ | 51 | verified | For 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... |
$C2:92F4 | Menu_ | 91 | verified | Zeroes $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... |
$C2:934F | Menu_ | 89 | verified | The 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... |
$C2:93A8 | Menu_ | 23 | verified | Whether 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. |
$C2:93BF | Menu_ | 78 | verified | Pages 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... |
$C2:940D | Menu_ | 259 | verified | Puts the PPU and CPU registers into the menu's starting state, then clears all of VRAM and most of bank $7E with DMA. |
$C2:9510 | Menu_ | 2 | verified | the fixed DMA source of Menu_InitPpuAndRam's VRAM clear and of Menu_DmaClearWram. |
$C2:9512 | Menu_ | 48 | verified | Zeroes Y bytes of bank $7E from address X with DMA channel 0 (fixed source Menu_DmaZeroWord, one register: WMDATA). |
$C2:9542 | Menu_ | 44 | verified | Copies Y bytes from bank $FF (MenuRom_DmaCopyBank), address A, to bank $7E at address X with DMA channel 0 (stepping source, one register: WMDATA). |
$C2:956E | Menu_ | 77 | verified | Sets up the data of a new game (inferred from what it fills). |
$C2:95BB | Menu_ | 80 | verified | Zeroes 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... |
$C2:960B | Menu_ | 35 | verified | Expands 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... |
$C2:962E | Menu_ | 37 | verified | For 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). |
$C2:9653 | Menu_ | 37 | verified | For Y 4bpp tiles from X: each row's planes 2 and 3 = planes 0 OR 1, so colours 1-3 become 13-15. |
$C2:9678 | Menu_ | 21 | verified | For 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. |
$C2:968D | Menu_ | 445 | verified | Builds 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... |
$C2:984A | Menu_ | 43 | verified | Hides 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... |
$C2:9875 | Menu_ | 275 | verified | Prepares 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... |
$C2:9988 | Menu_ | 42 | verified | Empties 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. |
$C2:99B2 | Menu_ | 24 | verified | For characters 0-6: Menu_LoadCharRec, then Menu_CharRecalc (the derived stats, written back to the record). |
$C2:99CA | Menu_ | 4 | verified | Menu_ModeLists entry 0: the handlers Menu_MainThread runs by Menu_ThreadVar. |
$C2:99CE | Menu_ | 77 | verified | Handler 0 of mode 0. |
$C2:9A1B | Menu_ | 125 | verified | Handler 1 of mode 0, every frame: Menu_CursorSel = Menu_MainSel, Menu_PadInput (the pad: it moves Menu_CursorSel and sets Menu_PadAction). |
$C2:9A98 | Menu_ | 21 | verified | Back 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. |
$C2:9AAD | Menu_ | 167 | verified | Builds 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... |
$C2:9B54 | Menu_ | 17 | verified | The preview of icon Menu_MainSel: its Menu_MainPreviewTable routine, then Menu_MainMenuIcons. |
$C2:9B65 | Menu_ | 12 | verified | Menu_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... |
$C2:9B71 | Menu_ | 18 | verified | Redraws 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). |
$C2:9B83 | Menu_ | 12 | verified | Menu_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). |
$C2:9B8F | Menu_ | 79 | verified | Menu_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... |
$C2:9BDE | Menu_ | 75 | verified | OAM 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 +... |
$C2:9C29 | Menu_ | 8 | verified | Menu_ModeLists entry $01: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below). |
$C2:9C31 | Menu_ | 8 | verified | Handler 0: Menu_PlaySound0, Menu_ThreadVar + 1 (to handler 1) and a tail jump to Menu_Mode01Init. |
$C2:9C39 | Menu_ | 55 | verified | Handler 1, every frame: Menu_PadInput. |
$C2:9C70 | Menu_ | 53 | verified | Handler 2, every frame: Menu_PadInput. |
$C2:9CA5 | Menu_ | 87 | verified | Handler 3, every frame: Menu_PadInput. |
$C2:9CFC | Menu_ | 27 | verified | With 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... |
$C2:9D17 | Menu_ | 68 | verified | Handler 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). |
$C2:9D5B | Menu_ | 84 | verified | Scrolls 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 =... |
$C2:9DAF | Menu_ | 199 | verified | The 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... |
$C2:9E76 | Menu_ | 58 | verified | For 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... |
$C2:9EB0 | Menu_ | 29 | verified | Menu_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. |
$C2:9ECD | Menu_ | 56 | verified | Handler 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... |
$C2:9F05 | Menu_ | 217 | verified | Handler 3's frame without confirm or cancel, on the item list (Menu_EquipList, top row Menu_EquipListTop). |
$C2:9FDE | Menu_ | 45 | verified | Moves 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)... |
$C2:A00B | Menu_ | 70 | verified | On 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). |
$C2:A051 | Menu_ | 150 | verified | Menu_MainPreviewTable entry 0. |
$C2:A0E7 | Menu_ | 26 | verified | Copies 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). |
$C2:A101 | Menu_ | 25 | verified | Menu_MainRedrawTable entry 0: colours $70-$77 = MenuRom_Icon0RedrawPal, Menu_UnstashInventory, Menu_HdmaenShadow = Menu_Icon0HdmaBits. |
$C2:A11A | Menu_ | 86 | verified | Mode 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... |
$C2:A170 | Menu_ | 66 | verified | The list arrows of the member list, with DB=$00 for the multiplier and divider: nothing when Menu_MemberMaxTop is 0. |
$C2:A1B2 | Menu_ | 55 | verified | Draws 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... |
$C2:A1E9 | Menu_ | 6 | verified | Runs the draw list MenuRom_EmptyRowList (a tail jump). |
$C2:A1EF | Menu_ | 39 | verified | For 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... |
$C2:A216 | Menu_ | 9 | verified | Menu_MemberRowFlags, then the draw list MenuRom_MemberRowList (a tail jump). |
$C2:A21F | Menu_ | 16 | verified | Menu_DrawMemberStatus, then the member's row again at the top of the list map ($7E:2E00, Menu_DrawMemberRow). |
$C2:A22F | Menu_ | 68 | verified | The 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... |
$C2:A273 | Menu_ | 83 | verified | Draws 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... |
$C2:A2C6 | Menu_ | 7 | verified | Per character id 0-6: the byte offset into MenuRom_CharIconTiles and MenuRom_CharIconPals (Menu_DrawCharIcon). |
$C2:A2CD | Menu_ | 84 | verified | Back 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 =... |
$C2:A321 | Menu_ | 106 | verified | From 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)... |
$C2:A38B | Menu_ | 47 | verified | Menu_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... |
$C2:A3BA | Menu_ | 40 | verified | The 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. |
$C2:A3E2 | Menu_ | 11 | verified | Menu_SetSlotRowsAttr from $7E:3062. |
$C2:A3ED | Menu_ | 45 | verified | For 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... |
$C2:A41A | Menu_ | 67 | verified | From 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 ->... |
$C2:A45D | Menu_ | 6 | verified | Menu_ArrowX/Y = $68 / $62, then falls into Menu_EquipListSetup. |
$C2:A463 | Menu_ | 72 | verified | The 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 =... |
$C2:A4AB | Menu_ | 4 | verified | Per slot (Menu_ListKind 0-3): the character record's byte that holds it (Menu_Unk0D26; Menu_Mode01H3 swaps that byte with the inventory). |
$C2:A4AF | Menu_ | 105 | verified | Handler 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... |
$C2:A518 | Menu_ | 81 | verified | One 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... |
$C2:A569 | Menu_ | 49 | verified | Draws 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). |
$C2:A59A | Menu_ | 41 | verified | Draws 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... |
$C2:A5C3 | Menu_ | 36 | verified | Handler 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... |
$C2:A5E7 | Menu_ | 91 | verified | Recomputes 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... |
$C2:A642 | Menu_ | 11 | verified | Menu_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. |
$C2:A64D | Menu_ | 74 | verified | Back 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... |
$C2:A697 | Menu_ | 89 | verified | The reverse of Menu_EquipItemsSlideIn: the draw list MenuRom_ItemsSlideOutList; Menu_VramRecClock and Menu_VramRecBg2B queued; the NMI move Menu_ScrollBuild -> Menu_Mode01HdmaTable... |
$C2:A6F0 | Menu_ | 46 | verified | The 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... |
$C2:A71E | Menu_ | 153 | verified | Handler 1 to 2 (Menu_Mode01H1, before Menu_EquipSlotsOpen): the draw list MenuRom_SlotsSlideInList; the NMI move Menu_ScrollBuild -> Menu_EquipHdmaTable, Menu_Mode01HdmaBytesA bytes... |
$C2:A7B7 | Menu_ | 165 | verified | One 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. |
$C2:A85C | Menu_ | 276 | verified | Handler 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... |
$C2:A970 | Menu_ | 150 | verified | One 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... |
$C2:AA06 | Menu_ | 19 | verified | Menu_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... |
$C2:AA19 | Menu_ | 27 | verified | Writes 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... |
$C2:AA34 | Menu_ | 12 | verified | Menu_ModeLists entry $02: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the item screen). |
$C2:AA40 | Menu_ | 10 | verified | Handler 0: Menu_PlaySound0, Menu_ThreadVar = 2 (handler 2, the list) and a tail jump to Menu_Mode02Init. |
$C2:AA4A | Menu_ | 60 | verified | Handler 1, every frame, the row above the list: Menu_PadInput. |
$C2:AA86 | Menu_ | 66 | verified | Handler 2, every frame, the list: Menu_ItemsPicked = $FFFF (no slot picked), Menu_PadInput. |
$C2:AAC8 | Menu_ | 130 | verified | Handler 3, every frame, with a slot picked (Menu_ItemsPicked): Menu_PadInput. |
$C2:AB4A | Menu_ | 24 | verified | Handler 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). |
$C2:AB62 | Menu_ | 135 | verified | Rebuilds 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... |
$C2:ABE9 | Menu_ | 41 | verified | Appends 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... |
$C2:AC12 | Menu_ | 5 | verified | Per sort group 0-4: the first id. |
$C2:AC17 | Menu_ | 6 | verified | Per sort group 0-4: the number of ids. |
$C2:AC1D | Menu_ | 29 | verified | Handler 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... |
$C2:AC3A | Menu_ | 199 | verified | Handlers 2 and 3 without confirm or cancel. |
$C2:AD01 | Menu_ | 45 | verified | Moves 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... |
$C2:AD2E | Menu_ | 34 | verified | The 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). |
$C2:AD50 | Menu_ | 115 | verified | Menu_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... |
$C2:ADC3 | Menu_ | 13 | verified | Menu_MainRedrawTable entry 1: Menu_UnstashInventory, Menu_HdmaenShadow = Menu_Icon1HdmaBits. |
$C2:ADD0 | Menu_ | 80 | verified | Mode 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... |
$C2:AE20 | Menu_ | 35 | verified | Redraws 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... |
$C2:AE43 | Menu_ | 34 | verified | Draws 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. |
$C2:AE65 | Menu_ | 16 | verified | Menu_DrawInvSlot for slot Menu_ItemsTop + Menu_CursorSel (an 8-bit sum) at $7E:X. |
$C2:AE75 | Menu_ | 28 | verified | Slot 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... |
$C2:AE91 | Menu_ | 37 | verified | The 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... |
$C2:AEB6 | Menu_ | 85 | verified | Menu_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... |
$C2:AF0B | Menu_ | 47 | verified | Menu_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... |
$C2:AF3A | Menu_ | 8 | verified | Per item category 0-3: the bank-$FF address of the 11-byte label Menu_EquipValueLabel copies (categories 1 and 2 share one). |
$C2:AF42 | Menu_ | 67 | verified | Opens 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... |
$C2:AF85 | Menu_ | 24 | verified | Sets bit 0 of .Flags18 of objects 0-6 (non-zero: Menu_SprThread does not place them). |
$C2:AF9D | Menu_ | 24 | verified | Clears bit 0 of .Flags18 of objects 0-6 again. |
$C2:AFB5 | Menu_ | 56 | verified | BG3 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. |
$C2:AFED | Menu_ | 88 | verified | The 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... |
$C2:B045 | Menu_ | 6 | verified | Per member row 0-2: the word Menu_PlaceMemberSprites stores at .ScreenY: Y = $78, $A0, $C8 (40 lines apart), X low byte $E4. |
$C2:B04B | Menu_ | 96 | verified | One 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). |
$C2:B0AB | Menu_ | 66 | verified | Uses 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... |
$C2:B0ED | Menu_ | 1 | verified | |
$C2:B0EE | Menu_ | 12 | verified | Menu_UseItem's routine by Menu_FirstSetBit (bit 7, 6, 5, 4, 3, none). |
$C2:B0FA | Menu_ | 13 | verified | X = 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. |
$C2:B107 | Menu_ | 6 | verified | Menu_UseKindTable entry 3: Menu_RollRandomItem, then a tail jump to Menu_UseHealItem. |
$C2:B10D | Menu_ | 48 | verified | Picks 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)... |
$C2:B13D | Menu_ | 4 | verified | Menu_RollRandomItem's bounds out of 100: 5, 20, 50 (and 100, not read). |
$C2:B141 | Menu_ | 8 | verified | Menu_RollRandomItem's setters: 5%, 15%, 30% and 50%. |
$C2:B149 | Menu_ | 11 | verified | Menu_UseKind = $C2 (HP and MP), Menu_UseAmountB = $40 (full). |
$C2:B154 | Menu_ | 11 | verified | Menu_UseKind = $82 (HP), Menu_UseAmountB = $40 (full). |
$C2:B15F | Menu_ | 16 | verified | Menu_UseKind = $41 (MP), Menu_UseAmountB = 3, Menu_UseAmountA = $8A (a fixed 10 x 3 = 30). |
$C2:B16F | Menu_ | 16 | verified | Menu_UseKind = $80 (HP), Menu_UseAmountB = 1, Menu_UseAmountA = $B2 (a fixed 50 x 1 = 50). |
$C2:B17F | Menu_ | 12 | verified | Menu_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). |
$C2:B18B | Menu_ | 60 | verified | |
$C2:B1C7 | Menu_ | 49 | verified | |
$C2:B1F8 | Menu_ | 8 | verified | Menu_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... |
$C2:B200 | Menu_ | 74 | verified | Menu_UseKindTable entry 5 (no effect bit): a stat item. |
$C2:B24A | Menu_ | 43 | verified | The 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... |
$C2:B275 | Menu_ | 50 | verified | Menu_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... |
$C2:B2A7 | Menu_ | 111 | verified | Uses 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... |
$C2:B316 | Menu_ | 6 | verified | Per 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. |
$C2:B31C | Menu_ | 55 | verified | After 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... |
$C2:B353 | Menu_ | 10 | verified | Menu_ModeLists entry $03: the handlers Menu_MainThread runs by Menu_ThreadVar (the tech screen, Menu_Mode03H0-H4). |
$C2:B35D | Menu_ | 8 | verified | Handler 0: Menu_PlaySound0, Menu_ThreadVar + 1 (handler 1) and a tail jump to Menu_Mode03Init. |
$C2:B365 | Menu_ | 8 | verified | Handler 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... |
$C2:B36D | Menu_ | 65 | verified | |
$C2:B3AE | Menu_ | 224 | verified | Handler 3, every frame, the tech list: Menu_HdmaenShadow = Menu_TechHdmaBits, Menu_PadInput. |
$C2:B48E | Menu_ | 139 | verified | Handler 4, every frame, the target window: Menu_PadInput, Menu_TechTargetCursor. |
$C2:B519 | Menu_ | 7 | verified | Per 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... |
$C2:B520 | Menu_ | 72 | verified | Handler 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... |
$C2:B568 | Menu_ | 96 | verified | Scrolls 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... |
$C2:B5C8 | Menu_ | 230 | verified | The 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... |
$C2:B6AE | Menu_ | 37 | verified | The 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). |
$C2:B6D3 | Menu_ | 92 | verified | Handler 3's frame without confirm or cancel: the caster loaded. |
$C2:B72F | Menu_ | 157 | verified | Scrolls 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... |
$C2:B7CC | Menu_ | 87 | verified | Moves 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... |
$C2:B823 | Menu_ | 27 | verified | Handler 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. |
$C2:B83E | Menu_ | 50 | verified | The 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... |
$C2:B870 | Menu_ | 106 | verified | Menu_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). |
$C2:B8DA | Menu_ | 134 | verified | Menu_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... |
$C2:B960 | Menu_ | 25 | verified | Menu_MainRedrawTable entry 2: Menu_HdmaenShadow = 1, Menu_StartSprThread, the draw list MenuRom_Icon2RedrawList, Menu_VramRecClock queued. |
$C2:B979 | Menu_ | 104 | verified | Mode 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... |
$C2:B9E1 | Menu_ | 40 | verified | Object 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 =... |
$C2:BA09 | Menu_ | 38 | verified | Object 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... |
$C2:BA2F | Menu_ | 32 | verified | One 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... |
$C2:BA4F | Menu_ | 173 | verified | The 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... |
$C2:BAFC | Menu_ | 30 | verified | Puts 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]. |
$C2:BB1A | Menu_ | 5 | verified | Per 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. |
$C2:BB1F | Menu_ | 49 | verified | The 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... |
$C2:BB50 | Menu_ | 60 | verified | The 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... |
$C2:BB8C | Menu_ | 74 | verified | |
$C2:BBD6 | Menu_ | 76 | verified | Menu_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... |
$C2:BC22 | Menu_ | 55 | verified | The 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) +... |
$C2:BC59 | Menu_ | 22 | verified | A = 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... |
$C2:BC6F | Menu_ | 63 | verified | A 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. |
$C2:BCAE | Menu_ | 31 | verified | Menu_TechList's first 24 bytes = $FF, then Menu_TechListBytes and Menu_TechListIds. |
$C2:BCCD | Menu_ | 51 | verified | Lists 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... |
$C2:BD00 | Menu_ | 64 | verified | For 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])... |
$C2:BD40 | Menu_ | 37 | verified | Per tech byte 0-36 (Menu_TechShown): the id of the tech of its bit 7. |
$C2:BD65 | Menu_ | 6 | verified | Per 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). |
$C2:BD6B | Menu_ | 46 | verified | The 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. |
$C2:BD99 | Menu_ | 25 | verified | Draws 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... |
$C2:BDB2 | Menu_ | 57 | verified | Draws 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... |
$C2:BDEB | Menu_ | 22 | verified | On page 0, for a tech with Menu_TechInfo bit 6 (the one being learnt, probably), the draw list MenuRom_TechNextList. |
$C2:BE01 | Menu_ | 21 | verified | Menu_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). |
$C2:BE16 | Menu_ | 29 | verified | The 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... |
$C2:BE33 | Menu_ | 17 | verified | Menu_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... |
$C2:BE44 | Menu_ | 53 | verified | |
$C2:BE79 | Menu_ | 85 | verified | Opens (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... |
$C2:BECE | Menu_ | 7 | verified | A Menu_VramRec: VRAM $5840 = $7E:2E80 (BG1 map rows 2-9), $200 bytes; its unused last byte is the first of Menu_VramRecTechLow. |
$C2:BED5 | Menu_ | 7 | verified | A 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. |
$C2:BEDC | Menu_ | 83 | verified | The 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... |
$C2:BF2F | Menu_ | 6 | verified | Per target row 0-2: the word Menu_TechTargetRows stores at .ScreenY: Y = $58, $78, $98 (32 lines apart), X low byte $E4. |
$C2:BF35 | Menu_ | 8 | verified | Menu_ModeLists entry $04: the handlers Menu_MainThread runs by Menu_ThreadVar (the settings screen, Menu_Mode04H0-H3). |
$C2:BF3D | Menu_ | 8 | verified | Handler 0: Menu_PlaySound0, Menu_ThreadVar + 1 (handler 1) and a tail jump to Menu_Mode04Init. |
$C2:BF45 | Menu_ | 40 | verified | Handler 1, every frame, the entry list: Menu_HdmaenShadow = Menu_CfgHdmaBits, Menu_PadInput. |
$C2:BF6D | Menu_ | 50 | verified | Handler 2, every frame, the button map: Menu_PadInput. |
$C2:BF9F | Menu_ | 53 | verified | Handler 3, every frame, entry 7's choice of Menu_CfgCLow (cursor records $0C-$0F): Menu_PadInput. |
$C2:BFD4 | Menu_ | 43 | verified | Menu_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... |
$C2:BFFF | Menu_ | 24 | verified | Per entry (cursor record) 0-11: the routine Menu_CfgEntryRun calls each frame the cursor is on it (with M=1, X=0). |
$C2:C017 | Menu_ | 33 | verified | Cursor 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... |
$C2:C038 | Menu_ | 18 | verified | Cursor entry 2: on a confirm Menu_CfgA5 = (it + 1) AND 1, also in Menu_CfgShown+2. |
$C2:C04A | Menu_ | 18 | verified | Cursor entry 3: on a confirm Menu_CfgB6 = (it + 1) AND 1, also in Menu_CfgShown+7. |
$C2:C05C | Menu_ | 18 | verified | Cursor entry 4: on a confirm Menu_CfgB7 = (it + 1) AND 1, also in Menu_CfgShown+8. |
$C2:C06E | Menu_ | 18 | verified | Cursor entry 1: on a confirm Menu_CfgA6 = (it + 1) AND 1, also in Menu_CfgShown+3. |
$C2:C080 | Menu_ | 21 | verified | Cursor 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). |
$C2:C095 | Menu_ | 18 | verified | Cursor entry 9: on a confirm Menu_CfgA7 = (it + 1) AND 1, also in Menu_CfgShown+9. |
$C2:C0A7 | Menu_ | 18 | verified | Cursor entry 5: on a confirm Menu_CursorSel and Menu_CfgCursor = $0A (entry 10) and Menu_CfgSubOpen = 1 (entries 10 and 11 lead back here). |
$C2:C0B9 | Menu_ | 24 | verified | Cursor 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. |
$C2:C0D1 | Menu_ | 24 | verified | Cursor entry 11: as entry 10 for Menu_CfgBMid. |
$C2:C0E9 | Menu_ | 67 | verified | Cursor 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. |
$C2:C12C | Menu_ | 56 | verified | Cursor 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... |
$C2:C164 | Menu_ | 31 | verified | With 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. |
$C2:C183 | Menu_ | 132 | verified | Handler 2's frame without Left or cancel. |
$C2:C207 | Menu_ | 8 | verified | The buttons a map row cycles through, as Pad_Pressed bits: A, B, X, Y, R, L, Select, then $FF (the end). |
$C2:C20F | Menu_ | 43 | verified | Gives 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... |
$C2:C23A | Menu_ | 50 | verified | Sets 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... |
$C2:C26C | Menu_ | 26 | verified | For 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... |
$C2:C286 | Menu_ | 55 | verified | Keeps 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... |
$C2:C2BD | Menu_ | 8 | verified | Per row 0-7: its Menu_CfgMapEdit / Menu_ButtonMap entry (the same number). |
$C2:C2C5 | Menu_ | 14 | verified | Per entry 0-6: the address of its clash list (see Menu_CfgMapSet). |
$C2:C2D3 | Menu_ | 8 | verified | The 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. |
$C2:C2DB | Menu_ | 7 | verified | |
$C2:C2E2 | Menu_ | 6 | verified | |
$C2:C2E8 | Menu_ | 4 | verified | |
$C2:C2EC | Menu_ | 5 | verified | |
$C2:C2F1 | Menu_ | 6 | verified | |
$C2:C2F7 | Menu_ | 4 | verified | |
$C2:C2FB | Menu_ | 4 | verified | |
$C2:C2FF | Menu_ | 152 | verified | Menu_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... |
$C2:C397 | Menu_ | 30 | verified | Menu_MainRedrawTable entry 3: Menu_HdmaenShadow = Menu_Icon3HdmaBits, the entry icon's four tile words (Menu_CfgIconMap) zeroed, Menu_VramRecClock queued. |
$C2:C3B5 | Menu_ | 47 | verified | Mode 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... |
$C2:C3E4 | Menu_ | 55 | verified | The 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... |
$C2:C41B | Menu_ | 20 | verified | Per Menu_CfgShown byte 0-9: the tilemap address of its mark. |
$C2:C42F | Menu_ | 11 | verified | Per 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. |
$C2:C43A | Menu_ | 28 | verified | Menu_CfgShown = the ten bytes Menu_CfgA3 ... |
$C2:C456 | Menu_ | 36 | verified | The 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... |
$C2:C47A | Menu_ | 27 | verified | |
$C2:C495 | Menu_ | 39 | verified | Menu_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). |
$C2:C4BC | Menu_ | 61 | verified | The 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 =... |
$C2:C4F9 | Menu_ | 12 | verified | Per 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). |
$C2:C505 | Menu_ | 12 | verified | Per entry 0-11: the number added to its byte for Menu_Unk0DCF. |
$C2:C511 | Menu_ | 55 | verified | Loads 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)... |
$C2:C548 | Menu_ | 7 | verified | The Menu_VramRec of Menu_LoadWindowGfx: VRAM $3DC0 = $7E:8800 (Menu_WinTileBuf), $280 bytes. |
$C2:C54F | Menu_ | 43 | verified | Applies 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... |
$C2:C57A | Menu_ | 45 | verified | Draws 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 +... |
$C2:C5A7 | Menu_ | 12 | verified | Per 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. |
$C2:C5B3 | Menu_ | 20 | verified | A = 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). |
$C2:C5C7 | Menu_ | 90 | verified | Marks 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... |
$C2:C621 | Menu_ | 6 | verified | Menu_ModeLists entry $05: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the party order; handler 2 is shared with mode 7). |
$C2:C627 | Menu_ | 33 | verified | Handler 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... |
$C2:C648 | Menu_ | 1 | verified | Menu_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... |
$C2:C649 | Menu_ | 20 | verified | |
$C2:C65D | Menu_ | 23 | verified | Handler 1, every frame, nothing picked yet: Menu_PadInput. |
$C2:C674 | Menu_ | 69 | verified | |
$C2:C6B9 | Menu_ | 46 | verified | Handler 2 of modes 5 and 7, every frame, one row picked: Menu_PadInput; neither button as in handler 1. |
$C2:C6E7 | Menu_ | 37 | verified | |
$C2:C70C | Menu_ | 120 | verified | Swaps 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... |
$C2:C784 | Menu_ | 34 | verified | The 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)... |
$C2:C7A6 | Menu_ | 6 | verified | Menu_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). |
$C2:C7AC | Menu_ | 52 | verified | Handler 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... |
$C2:C7E0 | Menu_ | 37 | verified | Handler 1 of mode 7, every frame: Menu_PadInput; neither button as mode 5's handler 1. |
$C2:C805 | Menu_ | 86 | verified | The 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). |
$C2:C85B | Menu_ | 95 | verified | A 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 =... |
$C2:C8BA | Menu_ | 143 | verified | Scrolls 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... |
$C2:C949 | Menu_ | 42 | verified | For 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. |
$C2:C973 | Menu_ | 59 | verified | The 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... |
$C2:C9AE | Menu_ | 55 | verified | Moves the cursor off a row it cannot take. |
$C2:C9E5 | Menu_ | 126 | verified | Menu_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... |
$C2:CA63 | Menu_ | 4 | verified | Menu_UnkC9E5's routine by Menu_Unk0D36 bit 1: Menu_XchgPreviewA (clear), Menu_XchgPreviewB (set). |
$C2:CA67 | Menu_ | 114 | verified | The 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... |
$C2:CAD9 | Menu_ | 7 | verified | The Menu_VramRec of Menu_XchgPreviewA: VRAM $1000 = Menu_TextGfxA ($7E:5E00), $1000 bytes. |
$C2:CAE0 | Menu_ | 6 | verified | A tail jump to Menu_RunDrawList with MenuRom_XchgListB. |
$C2:CAE6 | Menu_ | 13 | verified | Menu_MainRedrawTable entry 4: Menu_HdmaenShadow = Menu_XchgHdmaBits and Menu_StartSprThread. |
$C2:CAF3 | Menu_ | 152 | verified | The 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... |
$C2:CB8B | Menu_ | 52 | verified | Mode 7's music: Menu_XchgMusicOn = 0; nothing more with Menu_Unk7F01CF bit 6 set. |
$C2:CBBF | Menu_ | 44 | verified | Thread 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... |
$C2:CBEB | Menu_ | 12 | verified | Sends 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... |
$C2:CBF7 | Menu_ | 23 | verified | |
$C2:CC0E | Menu_ | 65 | verified | Mode 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... |
$C2:CC4F | Menu_ | 100 | verified | Dims 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)... |
$C2:CCB3 | Menu_ | 40 | verified | Halves 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... |
$C2:CCDB | Menu_ | 80 | verified | Draws 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... |
$C2:CD2B | Menu_ | 112 | verified | Builds 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... |
$C2:CD9B | Menu_ | 48 | verified | One 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)... |
$C2:CDCB | Menu_ | 24 | verified | Per table entry 0-11 (Menu_XchgSprIdx / 2): the Menu_MapPtr of Menu_DrawMemberRow. |
$C2:CDE3 | Menu_ | 71 | verified | Places 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... |
$C2:CE2A | Menu_ | 31 | verified | Objects 6 down to 0: .Id = Menu_SprOff, .Anim = 0, .Flags18 = 0 (as Menu_SprHideAll, which also does object 7). |
$C2:CE49 | Menu_ | 37 | verified | Places 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 /... |
$C2:CE6E | Menu_ | 24 | verified | Per table entry 0-11 (as Menu_XchgRowMaps): a sprite's .ScreenY (low byte) and .ScreenX's low byte (high byte). |
$C2:CE86 | Menu_ | 16 | verified | BankFF_BuildScreenMap, Menu_XchgScreenVramRec queued, then a tail jump to Menu_QueueVramRom with Menu_VramRecBg3Full. |
$C2:CE96 | Menu_ | 7 | verified | The Menu_VramRec of Menu_XchgScreenMap: VRAM $7000 = $7E:B000 (BankFF_ScreenGfxDest), $600 bytes. |
$C2:CE9D | Menu_ | 37 | verified | BG3SC = 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... |
$C2:CEC2 | Menu_ | 12 | verified | Thread 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)... |
$C2:CECE | Menu_ | 6 | verified | |
$C2:CED4 | Menu_ | 8 | verified | Menu_ModeLists entry $06: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the save screen; mode $0B shares handlers 2 and 3). |
$C2:CEDC | Menu_ | 33 | verified | Handler 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... |
$C2:CEFD | Menu_ | 13 | verified | Handler 1, every frame: Menu_PadInput. |
$C2:CF0A | Menu_ | 23 | verified | |
$C2:CF21 | Menu_ | 15 | verified | |
$C2:CF30 | Menu_ | 7 | verified | The Menu_VramRec of Menu_SaveRedraw: VRAM Menu_SlotTextVram ($7900) = Menu_SlotTextBufs ($7E:7000), $600 bytes (the three slots' text). |
$C2:CF37 | Menu_ | 39 | verified | Saves 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... |
$C2:CF5E | Menu_ | 3 | verified | Handler 1's cancel: a jump to Menu_ReturnToMainMenu. |
$C2:CF61 | Menu_ | 39 | verified | Handler 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. |
$C2:CF88 | Menu_ | 10 | verified | |
$C2:CF92 | Menu_ | 16 | verified | Handler 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. |
$C2:CFA2 | Menu_ | 89 | verified | The 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... |
$C2:CFFB | Menu_ | 73 | verified | The 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... |
$C2:D044 | Menu_ | 33 | verified | Copied to Menu_SlotHiliteBuf by Menu_UnkCFFB: 16 bytes $47, 16 bytes $C7, then $02 (the byte the highlighted entry points at). |
$C2:D065 | Menu_ | 118 | verified | Menu_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... |
$C2:D0DB | Menu_ | 10 | verified | Menu_MainRedrawTable entry 5: Menu_HdmaenShadow = Menu_SaveHdmaBits. |
$C2:D0E5 | Menu_ | 40 | verified | The 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... |
$C2:D10D | Menu_ | 36 | verified | For 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... |
$C2:D131 | Menu_ | 37 | verified | Slot 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... |
$C2:D156 | Menu_ | 66 | verified | Menu_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 =... |
$C2:D198 | Menu_ | 7 | verified | Menu_VramRec: VRAM $7000 = $7E:6E00 ($200 bytes: the slot labels of Menu_DrawSlotLabel). |
$C2:D19F | Menu_ | 199 | verified | Copies what the slot screen shows of slot Menu_SlotIdx from SRAM into its Menu_SlotSummaries block ($40 bytes at $7E:7600 + slot x $40). |
$C2:D266 | Menu_ | 39 | verified | Menu_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... |
$C2:D28D | Menu_ | 9 | verified | String Menu_StrEmptySlot, then falls into Menu_DrawSlotText. |
$C2:D296 | Menu_ | 46 | verified | Draws 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. |
$C2:D2C4 | Menu_ | 66 | verified | Draws 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... |
$C2:D306 | Menu_ | 35 | verified | Shifts 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. |
$C2:D329 | Menu_ | 3 | verified | Times Menu_DrawSlotLabel shifts each slot's label right by 2 pixels. |
$C2:D32C | Menu_ | 64 | verified | Slot 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... |
$C2:D36C | Menu_ | 243 | verified | The 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). |
$C2:D45F | Menu_ | 7 | verified | The Menu_VramRec of Menu_UnkD36C: VRAM $7808 = Menu_TextGfxA ($7E:5E00), $1F0 bytes. |
$C2:D466 | Menu_ | 78 | verified | A 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 +... |
$C2:D4B4 | Menu_ | 7 | verified | Per character 0-6: the first of its icon's 4 tiles (with tile bit 8 from the attribute: tiles $1E0-$1FB). |
$C2:D4BB | Menu_ | 26 | verified | The overwrite question: Menu_CursorSel = Menu_SaveRecYes, the draw list MenuRom_SaveAskList, Menu_HdmaenShadow = Menu_SaveAskHdmaBits, Menu_VramRecBg2B queued. |
$C2:D4D5 | Menu_ | 27 | verified | Closes 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. |
$C2:D4F0 | Menu_ | 8 | verified | Menu_ModeLists entry $0B: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below; handlers 2 and 3 are mode 6's, named after it). |
$C2:D4F8 | Menu_ | 14 | verified | Handler 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... |
$C2:D506 | Menu_ | 19 | verified | Handler 1, every frame: Menu_PadInput. |
$C2:D519 | Menu_ | 18 | verified | Menu_ModeLists entry $0C: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the shop). |
$C2:D52B | Menu_ | 27 | verified | Handler 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... |
$C2:D546 | Menu_ | 69 | verified | Handler 1, every frame, the top row (buy / sell): Menu_SprUploadMax = 1, Menu_PadInput. |
$C2:D58B | Menu_ | 82 | verified | Handler 2, every frame, the buy list: Menu_PadInput. |
$C2:D5DD | Menu_ | 40 | verified | |
$C2:D605 | Menu_ | 19 | verified | For 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). |
$C2:D618 | Menu_ | 45 | verified | Handler 5, every frame, the count to buy: Menu_CursorHold = $FF (the cursor does not move), Menu_PadInput. |
$C2:D645 | Menu_ | 75 | verified | Handler 3, every frame, the sell list: Menu_PadInput. |
$C2:D690 | Menu_ | 51 | verified | Handler 4, every frame, the count to sell: Menu_CursorHold = $FF, Menu_PadInput. |
$C2:D6C3 | Menu_ | 82 | verified | Handler 6, every frame, the member sprites: Menu_PadInput. |
$C2:D715 | Menu_ | 99 | verified | Handler 7, every frame, the member's equipment slots: Menu_PadInput. |
$C2:D778 | Menu_ | 87 | verified | Handler 8, every frame, the slot's item list: Menu_PadInput. |
$C2:D7CF | Menu_ | 227 | verified | Handler 2's frame without confirm or cancel, on the buy list (Menu_ShopIds, top row Menu_ShopBuyTop). |
$C2:D8B2 | Menu_ | 227 | verified | Menu_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... |
$C2:D995 | Menu_ | 108 | verified | Moves 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. |
$C2:DA01 | Menu_ | 52 | verified | The 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 =... |
$C2:DA35 | Menu_ | 8 | verified | Menu_ShopQtyStep's routine by Menu_CursorDir (0 Right, 1 Left, 2 Down, 3 Up). |
$C2:DA3D | Menu_ | 19 | verified | The 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). |
$C2:DA50 | Menu_ | 20 | verified | |
$C2:DA64 | Menu_ | 31 | verified | |
$C2:DA83 | Menu_ | 71 | verified | |
$C2:DACA | Menu_ | 206 | verified | Mode $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)... |
$C2:DB98 | Menu_ | 7 | verified | Menu_VramRec queued by Menu_ShopInit: VRAM $1000 = $7E:B000 (Menu_SprUnpackBuf, where BankFF_BuildTileSets builds its tiles), $1100 bytes. |
$C2:DB9F | Menu_ | 73 | verified | The 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... |
$C2:DBE8 | Menu_ | 54 | verified | Menu_EquipChars = the ids of Menu_PartyList without the empty ones (bit 7 set), then $FF; Menu_ShopMemberCount = how many. |
$C2:DC1E | Menu_ | 86 | verified | Menu_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... |
$C2:DC74 | Menu_ | 7 | verified | The member sprites' .ScreenX, one per member 0-6 (indexed by Menu_Tmp02 in Menu_ShopMemberSprites), 32 pixels apart. |
$C2:DC7B | Menu_ | 67 | verified | Opens 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... |
$C2:DCBE | Menu_ | 28 | verified | Menu_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. |
$C2:DCDA | Menu_ | 40 | verified | For 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. |
$C2:DD02 | Menu_ | 30 | verified | The 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). |
$C2:DD20 | Menu_ | 32 | verified | Row 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. |
$C2:DD40 | Menu_ | 22 | verified | The 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'... |
$C2:DD56 | Menu_ | 38 | verified | One 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)... |
$C2:DD7C | Menu_ | 161 | verified | What the members think of item Menu_ItemId (0: nothing). |
$C2:DE1D | Menu_ | 4 | verified | The Menu_CharRec offset of the slot of item categories 0-3 (as Menu_EquipSlotOffsets: weapon .Unk29, .Unk28, .Unk27, accessory .Unk2A). |
$C2:DE21 | Menu_ | 53 | verified | A 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... |
$C2:DE56 | Menu_ | 66 | verified | Draws 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. |
$C2:DE98 | Menu_ | 52 | verified | Opens 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... |
$C2:DECC | Menu_ | 101 | verified | Builds 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... |
$C2:DF31 | Menu_ | 32 | verified | The 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). |
$C2:DF51 | Menu_ | 37 | verified | Row 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... |
$C2:DF76 | Menu_ | 79 | verified | Opens 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 =... |
$C2:DFC5 | Menu_ | 10 | verified | Menu_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). |
$C2:DFCF | Menu_ | 50 | verified | Closes 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... |
$C2:E001 | Menu_ | 17 | verified | The count window's numbers: the draw list MenuRom_ShopQtyList (probably Menu_ItemCount and Menu_ShopPrice; not traced) and Menu_VramRecBg1Low queued. |
$C2:E012 | Menu_ | 5 | verified | Menu_DrawDescText with A = Menu_Unk51 (expected 0): string 0, probably the line shown with no item (a tail jump). |
$C2:E017 | Menu_ | 65 | verified | From 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 =... |
$C2:E058 | Menu_ | 26 | verified | Menu_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. |
$C2:E072 | Menu_ | 51 | verified | For 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... |
$C2:E0A5 | Menu_ | 76 | verified | The 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... |
$C2:E0F1 | Menu_ | 23 | verified | The slot rows highlighted (Menu_ShopSlotAttr), Menu_ArrowX/Y = Menu_ShopEquipArrowXY, the slot's item list set up (Menu_EquipListSetup) and Menu_VramRecBg1Rows24 queued. |
$C2:E108 | Menu_ | 72 | verified | Changes 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). |
$C2:E150 | Menu_ | 18 | verified | Menu_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). |
$C2:E162 | Menu_ | 40 | verified | Handler 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... |
$C2:E18A | Menu_ | 82 | verified | The 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... |
$C2:E1DC | Menu_ | 7 | verified | Menu_ShopCompare's order: the Menu_CharRec offsets of stats 0, 2, 5, 3, 1, 4, 6 in .Derived (Menu_EquipCompareOfs' entries 2-8). |
$C2:E1E3 | Menu_ | 10 | verified | Menu_ModeLists entry $0D: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the name entry). |
$C2:E1ED | Menu_ | 20 | verified | Handler 0: Menu_NamedOnce |= Menu_CurMember. |
$C2:E201 | Menu_ | 8 | verified | Handler 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... |
$C2:E209 | Menu_ | 21 | verified | Handler 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... |
$C2:E21E | Menu_ | 24 | verified | Handler 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... |
$C2:E236 | Menu_ | 49 | verified | Handler 2, every frame, the choice before the first name: Menu_PadInput, the line under the cursor (Menu_NameChoiceText). |
$C2:E267 | Menu_ | 49 | verified | The 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... |
$C2:E298 | Menu_ | 8 | verified | Menu_NameGridStep's routine by Menu_CursorDir (0 Right, 1 Left, 2 Down, 3 Up). |
$C2:E2A0 | Menu_ | 10 | verified | The 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... |
$C2:E2AA | Menu_ | 34 | verified | |
$C2:E2CC | Menu_ | 10 | verified | |
$C2:E2D6 | Menu_ | 30 | verified | |
$C2:E2F4 | Menu_ | 34 | verified | Confirm: Menu_NameAddChar, then Menu_PlaySound0. |
$C2:E316 | Menu_ | 52 | verified | The 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... |
$C2:E34A | Menu_ | 25 | verified | The 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. |
$C2:E363 | Menu_ | 45 | verified | Start 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... |
$C2:E390 | Menu_ | 80 | verified | Menu_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... |
$C2:E3E0 | Menu_ | 46 | verified | Compares 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). |
$C2:E40E | Menu_ | 304 | verified | The 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... |
$C2:E53E | Menu_ | 7 | verified | Menu_VramRec queued by Menu_NameInit: VRAM $7800 = Menu_TextGfxA ($7E:5E00), $800 bytes. |
$C2:E545 | Menu_ | 49 | verified | The 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. |
$C2:E576 | Menu_ | 93 | verified | The 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... |
$C2:E5D3 | Menu_ | 56 | verified | The 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... |
$C2:E60B | Menu_ | 8 | verified | Menu_ModeLists entry $0E: the handlers Menu_MainThread runs by Menu_ThreadVar (matched below: the load screen). |
$C2:E613 | Menu_ | 8 | verified | Handler 0: the load screen (Menu_LoadInit), Menu_ThreadVar + 1 (handler 1) and a tail jump to Menu_StartFadeIn. |
$C2:E61B | Menu_ | 104 | verified | Handler 1, every frame, the slot list. |
$C2:E683 | Menu_ | 17 | verified | |
$C2:E694 | Menu_ | 26 | verified | |
$C2:E6AE | Menu_ | 87 | verified | Handler 2, every frame, the slot to start from (after Menu_LoadAskSlot): Menu_PadInput. |
$C2:E705 | Menu_ | 62 | verified | Handler 3, every frame, the erase question (records 4 yes, 5 no): Menu_PadInput; neither button: Menu_PlaySound0 when the cursor moved. |
$C2:E743 | Menu_ | 128 | verified | The 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. |
$C2:E7C3 | Menu_ | 126 | verified | The 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... |
$C2:E841 | Menu_ | 73 | verified | The 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... |
$C2:E88A | Menu_ | 7 | verified | Menu_VramRec queued by Menu_LoadAskSlot: VRAM $7108 = Menu_TextGfxA ($7E:5E00), $600 bytes. |
$C2:E891 | Menu_ | 38 | verified | The 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 =... |
$C2:E8B7 | Menu_ | 93 | verified | Erases 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). |
$C2:E914 | Menu_ | 7 | verified | A Menu_VramRec: VRAM $5840 = $7E:2E80, $80 bytes (the first two rows Menu_VramRecClock sends). |
$C2:E91B | Menu_ | 8 | verified | Thread 3 (Menu_RunThreads starts it): Menu_DrawMainCursor, wait a frame, for ever. |
$C2:E923 | Menu_ | 10 | verified | Menu_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). |
$C2:E92D | Menu_ | 79 | verified | Hides 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... |
$C2:E97C | Menu_ | 8 | verified | Menu_PadInput, wait a frame, for ever: a thread body like Menu_MainCursorThread's. |
$C2:E984 | Menu_ | 85 | verified | Menu_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... |
$C2:E9D9 | Menu_ | 9 | verified | Menu_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... |
$C2:E9E2 | Menu_ | 61 | verified | Menu_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). |
$C2:EA1F | Menu_ | 8 | verified | Menu_CursorMove's routine per Menu_CursorDir 0-3 (Right, Left, Down, Up). |
$C2:EA27 | Menu_ | 15 | verified | X = (A AND $FF) x 6: the byte offset of a 6-byte Menu_CursorPos record. |
$C2:EA36 | Menu_ | 5 | verified | Menu_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... |
$C2:EA3B | Menu_ | 5 | verified | |
$C2:EA40 | Menu_ | 5 | verified | |
$C2:EA45 | Menu_ | 3 | verified | |
$C2:EA48 | Menu_ | 11 | verified | |
$C2:EA53 | Menu_ | 46 | verified | After Menu_PadInput in a paged list. |
$C2:EA81 | Menu_ | 57 | verified | Sets 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... |
$C2:EABA | Menu_ | 8 | verified | Menu_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). |
$C2:EAC2 | Menu_ | 10 | verified | Menu_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... |
$C2:EACC | Menu_ | 10 | verified | Menu_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). |
$C2:EAD6 | Menu_ | 35 | verified | Menu_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. |
$C2:EAF9 | Menu_ | 10 | verified | Audio_CmdPlaySfx with argument A, always sent: Menu_NmiTimer is zeroed first, then Menu_SendSoundArg. |
$C2:EB03 | Menu_ | 5 | verified | Audio_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... |
$C2:EB08 | Menu_ | 23 | verified | |
$C2:EB1F | Menu_ | 124 | verified | One 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... |
$C2:EB9B | Menu_ | 157 | verified | Sets 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... |
$C2:EC38 | Menu_ | 91 | verified | Draws 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... |
$C2:EC93 | Menu_ | 25 | verified | For 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. |
$C2:ECAC | Menu_ | 22 | verified | Sets 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. |
$C2:ECC2 | Menu_ | 25 | verified | Menu_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... |
$C2:ECDB | Menu_ | 45 | verified | With 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... |
$C2:ED08 | Menu_ | 41 | verified | Copies 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... |
$C2:ED31 | Menu_ | 40 | verified | Runs 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... |
$C2:ED59 | Menu_ | 22 | verified | Menu_RunDrawList's command routines by byte offset: commands $00-$14 (even). |
$C2:ED6F | Menu_ | 8 | verified | INX, then an MVN of A + 1 bytes from $FF:X to Menu_DrawArg0: the argument copy of Menu_RunDrawList as a routine. |
$C2:ED77 | Menu_ | 25 | verified | Command $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. |
$C2:ED90 | Menu_ | 26 | verified | Menu_DrawAddr = Menu_MapPtr + row x $40 + column x 2, from Menu_DrawArg2 (column = bits 0-4, row = the high byte). |
$C2:EDAA | Menu_ | 6 | verified | Command $04 (6 argument bytes): Menu_DrawCmdFrame (the frame), then Menu_FillWindowInside (with the inside size the frame left). |
$C2:EDB0 | Menu_ | 6 | verified | Command $12 (6 argument bytes: style, attribute byte, position, width, height): Menu_DrawWindowSetup, then Menu_DrawWindowFrame. |
$C2:EDB6 | Menu_ | 29 | verified | Command $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... |
$C2:EDD3 | Menu_ | 35 | verified | The 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... |
$C2:EDF6 | Menu_ | 45 | verified | Draws 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... |
$C2:EE23 | Menu_ | 53 | verified | One 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... |
$C2:EE58 | Menu_ | 39 | verified | Menu_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. |
$C2:EE7F | Menu_ | 118 | verified | Fills 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... |
$C2:EEF5 | Menu_ | 16 | verified | Tile offsets of the window inside, 4 rows of 4 (Menu_FillWindowInside adds them to the style's first tile). |
$C2:EF05 | Menu_ | 38 | verified | Command $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... |
$C2:EF2B | Menu_ | 29 | verified | Menu_DrawInnerH times: Menu_DrawInnerW + 1 bytes from Menu_DrawAddr to Menu_DrawAddr2 (MVN in bank $7E), both moved one row ($40) down. |
$C2:EF48 | Menu_ | 29 | verified | Command $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... |
$C2:EF65 | Menu_ | 25 | verified | Draws 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... |
$C2:EF7E | Menu_ | 25 | verified | The 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... |
$C2:EF97 | Menu_ | 39 | verified | Puts tile A with attribute Menu_TextAttr at $7E:X (long stores) and X += 2. |
$C2:EFBE | Menu_ | 21 | verified | Runs 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. |
$C2:EFD3 | Menu_ | 1 | verified | |
$C2:EFD4 | Menu_ | 32 | verified | Menu_TextCtrl's routine per control code $00-$0F; $00 (never dispatched: 0 ends a string) and $0D-$0F are Menu_TextCtrlRet (no effect). |
$C2:EFF4 | Menu_ | 17 | verified | Code $01: Menu_DrawAddr2 (the line start) += $80 (two rows), or $40 with Menu_TextFlags bit 7 set; X = it. |
$C2:F005 | Menu_ | 9 | verified | Code $02 (a word): Menu_DrawAddr2 = X = Menu_MapPtr + the word. |
$C2:F00E | Menu_ | 3 | verified | |
$C2:F011 | Menu_ | 13 | verified | Code $03 (4 bytes: the value's address, then the Menu_DrawNumber word: flags, bank): Menu_DrawNumber at X. |
$C2:F01E | Menu_ | 4 | verified | |
$C2:F022 | Menu_ | 20 | verified | Code $04 (a 24-bit pointer): Menu_DrawStringLoop on the string there (DB = its bank byte), sharing Menu_TextLeft. |
$C2:F036 | Menu_ | 50 | verified | Code $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. |
$C2:F068 | Menu_ | 9 | verified | Code $0A (a byte): Menu_TextAttr = it. |
$C2:F071 | Menu_ | 28 | verified | Code $07 (a word): the tile word at $7E:word is copied to the map at X (X += 2) and counted in Menu_TextLeft. |
$C2:F08D | Menu_ | 21 | verified | Code $08 (a byte n): n tiles $FF (Menu_PutChar; 0: 65536), not counted in Menu_TextLeft. |
$C2:F0A2 | Menu_ | 22 | verified | Code $06 (a word): Menu_TextAttr's palette bits (2-4) = those of the byte at $7E:word. |
$C2:F0B8 | Menu_ | 9 | verified | Code $09 (a byte): Menu_TextFlags = it. |
$C2:F0C1 | Menu_ | 16 | verified | Code $0B (4 bytes, as code $03): Menu_DrawHex at X. |
$C2:F0D1 | Menu_ | 67 | verified | Code $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 =... |
$C2:F114 | Menu_ | 43 | verified | Draws the 1-3 byte value at B:Y (B = A's high byte) in decimal at $7E:X. |
$C2:F13F | Menu_ | 59 | verified | Menu_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. |
$C2:F17A | Menu_ | 96 | verified | 2^0 to 2^23 as 4-byte BCD numbers (lowest byte first), for Menu_BinToBcd. |
$C2:F1DA | Menu_ | 49 | verified | With 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. |
$C2:F20B | Menu_ | 28 | verified | Puts digit A AND $0F at Y (tile $D4 + digit, Menu_TextAttr), Y += 2. |
$C2:F227 | Menu_ | 37 | verified | Draws 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). |
$C2:F24C | Menu_ | 29 | verified | Menu_NumDigits + 1 hex digits of the 4 bytes at Menu_NumBcd at Y, highest first (as Menu_DrawBcdDigits, no zero blanking). |
$C2:F269 | Menu_ | 20 | verified | Puts tile Menu_HexDigitTiles[A AND $0F] with Menu_TextAttr at Y, Y += 2. |
$C2:F27D | Menu_ | 16 | verified | The tiles of hex digits 0-F (Menu_PutHexDigit): $73-$7C for 0-9, then $F1 $F2 $36 $7D $38 $34 for A-F. |
$C2:F28D | Menu_ | 63 | verified | Draws 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... |
$C2:F2CC | Menu_ | 16 | verified | A = byte Y+1 x 10 + byte Y (tens and ones), Y += 2; Menu_NumBcd's first byte = tens x 2. |
$C2:F2DC | Menu_ | 6 | verified | Menu_ItemNamePtr for id A, then Menu_DrawString: 11 tiles of bank $CC at $7E:X (two-row text). |
$C2:F2E2 | Menu_ | 17 | verified | Y = Menu_ItemNamePtrs[A AND $FF] (a bank-$CC address), A = $CC0B (the bank and Menu_DrawString's count, 11). |
$C2:F2F3 | Menu_ | 63 | verified | Draws 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. |
$C2:F332 | Menu_ | 5 | verified | Command $08 (2 argument bytes): Menu_MapPtr = Menu_DrawArg0. |
$C2:F337 | Menu_ | 43 | verified | Command $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... |
$C2:F362 | Menu_ | 2 | verified | REP #$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. |
$C2:F364 | Menu_ | 20 | verified | Commands $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). |
$C2:F378 | Menu_ | 82 | verified | Command $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... |
$C2:F3CA | Menu_ | 88 | verified | Sets 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 =... |
$C2:F422 | Menu_ | 294 | verified | Loads 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... |
$C2:F548 | Menu_ | 20 | verified | .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. |
$C2:F55C | Menu_ | 6 | verified | Bank-$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). |
$C2:F562 | Menu_ | 4 | verified | .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). |
$C2:F566 | Menu_ | 34 | verified | Objects 6 down to 0: .Id = n, .Anim = 0, .Flags18 = $40 (animated by Menu_SprThread but not handed to Menu_SprPlaceOam). |
$C2:F588 | Menu_ | 31 | verified | Objects 7 down to 0: .Id = $FF (off), .Anim = 0, .Flags18 = 0. |
$C2:F5A7 | Menu_ | 70 | verified | Colours 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... |
$C2:F5ED | Menu_ | 57 | verified | For 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... |
$C2:F626 | Menu_ | 29 | verified | Y = 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). |
$C2:F643 | Menu_ | 20 | verified | Menu_Unk0D2E = Menu_Unk0D30 = 0 and starts Menu_SprThread in slot 5 (Menu_SprSlot). |
$C2:F657 | Menu_ | 68 | verified | Thread (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... |
$C2:F69B | Menu_ | 2 | verified | |
$C2:F69D | Menu_ | 49 | verified | Steps the animation of the object at DP. |
$C2:F6CE | Menu_ | 3 | verified | |
$C2:F6D1 | Menu_ | 1 | verified | |
$C2:F6D2 | Menu_ | 2 | verified | |
$C2:F6D4 | Menu_ | 4 | verified | |
$C2:F6D8 | Menu_ | 8 | verified | |
$C2:F6E0 | Menu_ | 117 | verified | |
$C2:F755 | Menu_ | 7 | verified | Bytes 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. |
$C2:F75C | Menu_ | 277 | verified | Builds 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... |
$C2:F871 | Menu_ | 148 | verified | Places 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 +... |
$C2:F905 | Menu_ | 7 | verified | Menu_DrawText with TextWin_Mode = Menu_TextWinMode4bpp (low nibble 1: TextWin_Blit4bpp) instead of Menu_TextWinMode: the BRA joins it at its store (.mode). |
$C2:F90C | Menu_ | 55 | verified | Draws 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... |
$C2:F943 | Menu_ | 111 | verified | The 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 =... |
$C2:F9B2 | Menu_ | 84 | verified | A 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... |
$C2:FA06 | Menu_ | 67 | verified | |
$C2:FA49 | Menu_ | 86 | verified | Starts 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... |
$C2:FA9F | Menu_ | 6 | verified | A thread (slot 2, from Menu_StartDescText): the steps (Menu_TextStepLoop), then the thread ends (Menu_ThreadEnd). |
$C2:FAA5 | Menu_ | 3 | verified | The 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... |
$C2:FAA8 | Menu_ | 65 | verified | |
$C2:FAE9 | Menu_ | 174 | verified | After 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... |
$C2:FB97 | Menu_ | 29 | verified | Y 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... |
$C2:FBB4 | Menu_ | 26 | verified | As 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... |
$C2:FBCE | Menu_ | 7 | verified | VRAM $5800 = $7E:2E00, $C00 bytes. |
$C2:FBD5 | Menu_ | 7 | verified | VRAM $5800 = $7E:2E00, $800 bytes (the half before Menu_VramRecBg1Low's). |
$C2:FBDC | Menu_ | 7 | verified | VRAM $5A00 = $7E:3200, $240 bytes. |
$C2:FBE3 | Menu_ | 7 | verified | VRAM $5840 = $7E:2E80, $640 bytes (queued after the clock is drawn, Menu_MainMenuLoop, and by most menu screens). |
$C2:FBEA | Menu_ | 7 | verified | VRAM $5C00 = $7E:3600, $800 bytes. |
$C2:FBF1 | Menu_ | 7 | verified | VRAM $5B00 = $7E:3400, $600 bytes. |
$C2:FBF8 | Menu_ | 7 | verified | VRAM $6000 = $7E:3E00 (Menu_Bg2Map), $1000 bytes. |
$C2:FBFF | Menu_ | 7 | verified | VRAM $6040 = $7E:3E80, $680 bytes. |
$C2:FC06 | Menu_ | 7 | verified | VRAM $6400 = $7E:4600, $800 bytes. |
$C2:FC0D | Menu_ | 7 | verified | VRAM $6040 = $7E:3E80, $300 bytes. |
$C2:FC14 | Menu_ | 7 | verified | VRAM $6800 = $7E:4E00, $1000 bytes. |
$C2:FC1B | Menu_ | 7 | verified | VRAM $6800 = $7E:4E00, $680 bytes. |
$C2:FC22 | Menu_ | 7 | verified | VRAM $6880 = $7E:4F00, $480 bytes. |
$C2:FC29 | Menu_ | 7 | verified | VRAM $6860 = $7E:4EC0, $440 bytes. |
$C2:FC30 | Menu_ | 7 | verified | VRAM $6A00 = $7E:5200, $400 bytes. |
$C2:FC37 | Menu_ | 7 | verified | VRAM $6FC0 = $7E:4E00, $80 bytes. |
$C2:FC3E | Menu_ | 7 | verified | VRAM $6F80 = $7E:5D00, $100 bytes. |
$C2:FC45 | Menu_ | 7 | verified | VRAM $6F40 = $7E:5C80, $100 bytes. |
$C2:FC4C | Menu_ | 7 | verified | VRAM $6E00 = $7E:4E00, $400 bytes. |
$C2:FC53 | Menu_ | 7 | verified | VRAM $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... |
$C2:FC5A | Menu_ | 7 | verified | VRAM $5740 = $7E:8E80 (Menu_ShadowTiles), $140 bytes. |
$C2:FC61 | Menu_ | 7 | verified | VRAM $1800 = $7E:3600, $600 bytes (queued by Menu_NameChoiceInit, which builds the choice screen's map there from MenuRom_NameChoiceMap). |
$C2:FC68 | Menu_ | 7 | verified | VRAM $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. |
$C2:FC6F | Menu_ | 16 | verified | Two Menu_VramRec records Menu_LoadGraphics copies into Menu_VramQueue: VRAM $0000 = Menu_TileBuf ($2000 B) and VRAM $7000 = Menu_Bg3TileBuf ($1000 B). |
$C2:FC7F | Menu_ | 8 | verified | VRAM $1000 = Menu_TileBuf, $1300 bytes (Menu_LoadGraphics step 2). |
$C2:FC87 | Menu_ | 8 | verified | VRAM $4000 (the sprite tiles) = Menu_TileBuf, $800 bytes (Menu_LoadGraphics step 5). |
$C2:FC8F | Menu_ | 23 | verified | Three 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 =... |
$C2:FCA6 | MenuRom_ | 3 | verified | The 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). |
$C2:FCA9 | MenuRom_ | 9 | verified | Bytes 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... |
$C2:FCB2 | Menu_ | 47 | verified | The 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)... |
$C2:FCE1 | Menu_ | 60 | verified | The 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... |
$C2:FD1D | Menu_ | 59 | verified | Menu_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... |
$C2:FD58 | Menu_ | 16 | verified | Menu_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... |
$C2:FD68 | Menu_ | 47 | verified | Menu_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... |
$C2:FD97 | Menu_ | 36 | verified | The 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... |
$C2:FDBB | Menu_ | 36 | verified | The 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)... |
$C2:FDDF | Menu_ | 43 | verified | Caps 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. |
$C2:FE0A | Menu_ | 2 | verified | Menu_ModeLists entry $0F: Menu_Exit alone (it never returns, so no second entry is read; the bytes after it are not a list). |
$C2:FE0C | BankC2_ | 500 | verified | Not 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. |
$C3:0000 | BankC3_ | 2 | verified | the 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 →... |
$C3:0002 | Decomp_ | 6 | verified | |
$C3:0008 | BankC3_ | 6 | verified | |
$C3:000E | BankC3_ | 3 | verified | |
$C3:0011 | BankC3_ | 3 | verified | |
$C3:0014 | C3_ | 99 | verified | Leaves 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... |
$C3:0077 | WinFx_ | 326 | verified | Writes 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. |
$C3:01BD | WinFx_ | 9 | verified | |
$C3:01C6 | WinFx_ | 4 | verified | Fills 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). |
$C3:01CA | WinFx_ | 26 | verified | |
$C3:01E4 | WinFx_ | 249 | verified | One 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... |
$C3:02DD | C3_ | 42 | verified | Returns 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... |
$C3:0307 | C3_ | 546 | verified | Draws 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. |
$C3:0529 | C3_ | 31 | verified | IRQ 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... |
$C3:0548 | C3_ | 15 | verified | NMI 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. |
$C3:0557 | Decomp_ | 860 | verified | Unpacks 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. |
$C3:08B3 | C3_ | 22 | verified | The 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... |
$C3:08C9 | C3_ | 7 | verified | NMI 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. |
$C3:08D0 | C3_ | 117 | verified | One 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... |
$C3:0945 | C3_ | 7 | verified | An IRQ handler that only acknowledges the IRQ (TIMEUP) and returns. |
$C3:094C | C3_ | 80 | verified | Signed multiply with the CPU multiplier: C3_MulA (16-bit) x C3_MulB (8-bit) into C3_MulProduct, signed. |
$C3:099C | C3_ | 4 | verified | MVN from ROM bank $FE (C3Rom_PackPtrs' bank) to WRAM bank $7E, then RTL: copies A + 1 bytes from $FE:X to $7E:Y. |
$C3:09A0 | C3_ | 4 | verified | As C3_CopyFEto7E, to WRAM bank $7F. |
$C3:09A4 | C3_ | 53 | verified | Sends 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... |
$C3:09D9 | C3_ | 16 | verified | Eight source offsets for C3_BuildCopyCode's outer passes: $000, $200, $100, $300, $400, $600, $500, $700 (16-bit, indexed by the pass x 2). |
$C3:09E9 | C3_ | 165 | verified | Writes 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... |
$C3:0A8E | C3_ | 113 | verified | The 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)... |
$C3:0AFF | C3_ | 441 | verified | Runs a script of the module from C3Script_Ptr until an opcode yields. |
$C3:0CB8 | C3_ | 21 | verified | Clears the first word of C3_TaskList equal to X. |
$C3:0CCD | C3_ | 21 | verified | As C3_TaskListRemove, for C3_NmiTaskList. |
$C3:0CE2 | C3_ | 22 | verified | Stores X in the first zero word of C3_TaskList (no bound: a full list is searched past its end). |
$C3:0CF8 | C3_ | 22 | verified | As C3_TaskListAdd, for C3_NmiTaskList (run by C3Mod_RunNmiTasks). |
$C3:0D0E | C3_ | 80 | verified | Adds 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. |
$C3:0D5E | C3_ | 94 | verified | As 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... |
$C3:0DBC | C3_ | 55 | verified | Adds 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... |
$C3:0DF3 | C3_ | 54 | verified | As C3_SprOneSmall for a large sprite: the high-table byte is always shifted right by 2 with size = 1 and X bit 8 = 0. |
$C3:0E29 | C3_ | 13 | verified | Counts 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 =... |
$C3:0E36 | BankC3_ | 196 | verified | ASCII, 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). |
$C3:0EFA | WinFx_ | 263 | verified | Writes 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... |
$C3:1001 | WinFx_ | 36 | verified | |
$C3:1025 | WinFx_ | 149 | verified | Draws 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... |
$C3:10BA | WinFx_ | 6 | verified | |
$C3:10C0 | BankC3_ | 11 | verified | ASCII "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. |
$C6:E000 | C6Scene_ | 40 | verified | Script 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... |
$C6:E028 | C6Scene_ | 37 | verified | Script 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... |
$C6:E04D | C6Scene_ | 37 | verified | Script 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... |
$C6:E072 | C6Scene_ | 143 | verified | Script routine (pack 3 +$031E): a fade from white. |
$C6:E101 | C6Scene_ | 111 | verified | Script 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... |
$C6:E170 | C6Scene_ | 143 | verified | Script 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... |
$C6:E1FF | C6Scene_ | 56 | verified | Script 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). |
$C6:E237 | C6Scene_ | 10 | verified | Script 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. |
$C6:E241 | C6Scene_ | 61 | verified | Script 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... |
$C6:E27E | C6Scene_ | 49 | verified | |
$C6:E2AF | C6Scene_ | 6 | verified | Script 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). |
$C6:E2B5 | C6Scene_ | 99 | verified | Script 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... |
$C6:E318 | C6Scene_ | 40 | verified | Script 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). |
$C6:E340 | C6Scene_ | 40 | verified | Script 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... |
$C6:E368 | C6Scene_ | 41 | verified | Script 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... |
$C6:E391 | C6Scene_ | 39 | verified | |
$C6:E3B8 | C6Scene_ | 144 | verified | |
$C6:E448 | C6Scene_ | 40 | verified | Script 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... |
$C6:E470 | C6Scene_ | 40 | verified | Script 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... |
$C6:E498 | C6Scene_ | 38 | verified | Script 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... |
$C6:E4BE | C6Scene_ | 36 | verified | |
$C6:E4E2 | C6Scene_ | 134 | verified | |
$C6:E568 | C6Scene_ | 27 | verified | Script 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... |
$C6:E583 | C6Scene_ | 18 | verified | Script 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... |
$C6:E595 | C6Scene_ | 48 | verified | Script 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... |
$C6:E5C5 | C6Scene_ | 120 | verified | Script 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... |
$C6:E63D | C6Scene_ | 7 | verified | Script routine (pack 4 +$115D): C2Scene_Unk7F01ED = 1 (script op $3D then skips its sound command). |
$C6:E644 | C6Scene_ | 6 | verified | Script routine (pack 4 +$06E9 and +$083A): C2Scene_Unk7F01ED = 0. |
$C6:E64A | C6Scene_ | 37 | verified | Script routine (pack 4 +$0D2D, between C6Scene_UnpackObjPackA and C6Scene_UnpackPalPackA): as C6Scene_UnpackObjPackA with entry C6Scene_ObjPackB of C2SceneRom_ObjPacks. |
$C6:E66F | C6Scene_ | 37 | verified | Script routine (pack 4 +$0D55, after C6Scene_UnpackPalPackA): as C6Scene_UnpackPalPackA with entry C6Scene_PalPackB of C2SceneRom_PalettePacks (into C2Scene_PaletteStage). |
$C6:E694 | C6Scene_ | 60 | verified | Script 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... |
$C6:E6D0 | C6Scene_ | 126 | verified | Script 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 /... |
$C6:E74E | BankC6_ | 49 | verified | Tests 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... |
$C6:E77F | C6Scene_ | 24 | verified | Script 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... |
$C6:E797 | BankC6_ | 99 | verified | Object A's landing check (the name is the stub's: verified C2Scene_ObjAFly calls it so; better: C6Scene_ObjANoLandHere). |
$C6:E7FA | C6Scene_ | 205 | verified | Script 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... |
$C6:E8C7 | C6Scene_ | 72 | verified | Draws 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... |
$C6:E90F | C6Scene_ | 230 | verified | Script 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... |
$C6:E9F5 | C6Scene_ | 294 | verified | |
$C6:EB1B | C6Scene_ | 8 | verified | C6Scene_PerspStep's fill for each sign pair (index = C2Tmp_10 bits 0-1: cos < 0, sin < 0). |
$C6:EB23 | C6Scene_ | 24 | verified | The 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... |
$C6:EB3B | C6Scene_ | 91 | verified | The 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... |
$C6:EB96 | C6Scene_ | 115 | verified | |
$C6:EC09 | C6Scene_ | 115 | verified | |
$C6:EC7C | C6Scene_ | 136 | verified | |
$C6:ED04 | C6Scene_ | 221 | verified | |
$C6:EDE1 | C6Scene_ | 66 | verified | The 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... |
$C6:EE23 | C6Scene_ | 14 | verified | Script routine (pack 0 +$1248 and 14 more sites to +$146F, each before C6Scene_PerspStep): .Angle (+$22) + C2Tmp_08. |
$C6:EE31 | C6Scene_ | 7 | verified | Script routine (pack 2 +$09A3 and +$09AE, pack 7 +$0779, +$0A27, +$0A32, +$0A5F, +$0A6A): C2Scene_Unk7F00CD = C2Tmp_00 (8-bit; set by the script before). |
$C6:EE38 | C6Scene_ | 11 | verified | Script routine (pack 2 +$08CF): clears bit 0 of C2Scene_Unk7F01F5. |
$C6:EE43 | BankC6_ | 445 | verified | $00 fill after the last routine, up to the data from $C6:F000 on. |
$C7:0000 | Audio_ | 4 | verified | The bank's entry block: four 3-byte JMPs, each followed by a NOP. |
$C7:0004 | Audio_ | 4 | verified | |
$C7:0008 | Audio_ | 4 | verified | |
$C7:000C | Audio_ | 4 | verified | |
$C7:0010 | Audio_ | 12 | verified | The six blocks Audio_Boot sends through the IPL ROM, in this order, as bank $C7 addresses. |
$C7:001C | Audio_ | 12 | verified | The ARAM destination of each Audio_BootBlockPtrs block (sent in APUIO2/3 with the IPL ROM's transfer command). |
$C7:0028 | Audio_ | 16 | verified | Eight bank $C7 addresses: the tables the code below reads. |
$C7:0038 | Audio_ | 264 | verified | Starts the sound driver from nothing, through the APU's IPL ROM: 1. |
$C7:0140 | Audio_ | 21 | verified | Runs the command in Audio_CmdId (arguments Audio_CmdArg0-2), then clears Audio_CmdId. |
$C7:0155 | Audio_ | 61 | verified | |
$C7:0192 | Audio_ | 15 | verified | |
$C7:01A1 | Audio_ | 389 | verified | Commands $10, $11, $14 and $15 (Audio_SongCmdTable): load song Audio_CmdArg0. |
$C7:0326 | Audio_ | 85 | verified | Song load, part 2: puts each sample of Audio_NewSamples in the next free slot with Audio_UploadSample, in list order. |
$C7:037B | Audio_ | 325 | verified | Song load, part 3: sends the song's samples' directory entries and parameter words. |
$C7:04C0 | Audio_ | 348 | verified | Song load, part 4, and its end: 1. |
$C7:061C | Audio_ | 57 | verified | Commands $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... |
$C7:0655 | Audio_ | 200 | verified | Sends 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... |
$C7:071D | Audio_ | 23 | verified | Commands $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... |
$C7:0734 | Audio_ | 33 | verified | Sets 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). |
$C7:0755 | Audio_ | 398 | verified | Command $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. |
$C7:08E3 | Audio_ | 63 | verified | Command $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). |
$C7:0922 | Audio_ | 184 | verified | Sends the $1800-byte block for ARAM !AudioAram_Block2F00: AudioRom_Block2F00 while Audio_Unk1E10 is 0, AudioRom_Block2F00Alt otherwise. |
$C7:09DA | Audio_ | 16 | verified | One 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. |
$C7:09EA | Audio_ | 19 | verified | Called 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... |
$C7:09FD | Audio_ | 21 | verified | Audio_EchoDelay = A, Audio_EchoPage = !Audio_EchoTopPage - 8 x A, then Audio_DropEchoSlots. |
$C7:0A12 | Audio_ | 39 | verified | Finds 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... |
$C7:0A39 | Audio_ | 95 | verified | The first part of a song load: sends the song command to the APU. |
$C7:0A98 | Audio_ | 64 | verified | Audio_CmdSongAlias: for command $30 + n, the command block it becomes (command, Arg0, Arg1, Arg2): $10, n, $FF, $FF. |
$C7:0AD8 | Audio_ | 1 | verified | Audio_AdjustSongCmd's song list, ended by a byte with bit 7 set. |
$C7:0AD9 | Audio_ | 16 | verified | Audio_RunCommand_Dispatch's jump table for commands $10-$17 (JMP (T,X) with X = (command & $0F) x 2). |
$C7:0AE9 | Audio_ | 1 | verified | The number of songs (Audio_SongTable entries); Audio_CmdLoadSong ignores a song number not below it. |
$C7:0AEA | Audio_ | 186 | verified | 62 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... |
$C7:0BA4 | Audio_ | 124 | verified | One 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). |
$C7:0C20 | Audio_ | 124 | verified | One word per sample, sent to !AudioAram_SongParamA for the song's samples (meaning not traced on the SPC700 side). |
$C7:0C9C | Audio_ | 124 | verified | One 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). |
$C7:0D18 | Audio_ | 249 | verified | Audio_SongCount ($53) long pointers, one per song: its data, a 16-bit length first (Audio_SendSongData sends it to !AudioAram_Song). |
$CF:F9F7 | BankCF_ | 4 | verified | Four bytes between BattleCF_PlaceEnemyParts and Battle_SinLookupCF that decode as LSR A three times and RTS (A / 8). |
$CF:FE85 | BankCF_ | 376 | verified | $FF fill after the last routine. |
$D1:FEF4 | BankD1_ | 268 | verified | $FF fill after the last routine, to the end of the bank. |
$FD:BA61 | RandomTableFD | 256 | verified | A byte-identical copy of RandomTable ($C0:FE00): the same shuffle of 0-255. |
$FD:BB61 | BankFD_ | 1,183 | verified | Nothing found reads it: no matched code refers to it and xref finds no call or jump into it. |
$FD:C0D7 | Ppu_ | 77 | verified | Sets 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... |
$FD:C124 | EngFD_ | 202 | verified | Fills the HDMA data block in bank $7F (DB = $7F while it runs). |
$FD:C1EE | Hdma_ | 211 | verified | Sets 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... |
$FD:C2C1 | EngFD_ | 30 | verified | Once a frame: runs entry !Field_Unk26 (0-2) of one of two handler tables and flips !Field_Unk53 bit 0. |
$FD:C2DF | EngFD_ | 6 | verified | EngFD_UnkC2C1's handlers by !Field_Unk26 when !Field_Unk53 bit 0 is set. |
$FD:C2E5 | EngFD_ | 6 | verified | The same when !Field_Unk53 bit 0 is clear. |
$FD:C2EB | FieldHdma_ | 334 | verified | EngFD_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. |
$FD:C439 | FieldHdma_ | 62 | verified | Writes 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... |
$FD:C477 | FieldHdma_ | 62 | verified | As 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). |
$FD:C4B5 | FieldHdma_ | 121 | verified | Writes 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... |
$FD:C52E | FieldHdma_ | 121 | verified | As FieldHdma_SetBg2A for set B: Hdma_Bg2Scroll+4 or Hdma_WaveB. |
$FD:C5A7 | FieldHdma_ | 336 | verified | Fills 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... |
$FD:C6F7 | FieldHdma_ | 336 | verified | As 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... |
$FD:C847 | FieldHdma_ | 334 | verified | As 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... |
$FD:C995 | FieldHdma_ | 707 | verified | EngFD_UnkC2C1's handler for Field_Unk26 = 1 on the frames Field_Unk53 bit 0 is set. |
$FD:CC58 | FieldHdma_ | 6 | verified | Starts 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). |
$FD:CC5E | FieldHdma_ | 84 | verified | Adds 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... |
$FD:CCB2 | FieldHdma_ | 6 | verified | HdmaWave_Line += A: steps the wave line count over the band's lines, which the band builders write themselves (A and B alike). |
$FD:CCB8 | FieldHdma_ | 84 | verified | As FieldHdma_AddWaveRunA for set B's channel 3 table, from Hdma_WaveB (and Hdma_WaveBCopy). |
$FD:CD0C | FieldHdma_ | 707 | verified | As 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... |
$FD:CFCF | FieldHdma_ | 687 | verified | EngFD_UnkC2C1's handler for Field_Unk26 = 2 on the frames Field_Unk53 bit 0 is set. |
$FD:D27E | FieldHdma_ | 687 | verified | As 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... |
$FD:D52D | EngFD_ | 167 | verified | EngFD_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... |
$FD:D5D4 | FieldHdma_ | 1,068 | verified | Not 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. |
$FD:DA00 | M7Scene_ | 95 | verified | Event $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... |
$FD:DA5F | M7Scene_ | 95 | verified | Event $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... |
$FD:DABE | M7Scene_ | 95 | verified | Event $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... |
$FD:DB1D | M7Scene_ | 122 | verified | Events $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... |
$FD:DB97 | M7Scene_ | 294 | verified | Sets 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... |
$FD:DCBD | M7Scene_ | 217 | verified | Each frame: writes the M7Scene_Scroll records the HDMA channels 3 and 4 send. |
$FD:DD96 | M7Scene_ | 31 | verified | The 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. |
$FD:DDB5 | M7Scene_ | 64 | verified | OAM 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. |
$FD:DDF5 | M7Scene_ | 32 | verified | INIDISP brightness per flicker step (M7Scene_Run83): 15 down to 1, back up to 15, then 15 for the last nine steps. |
$FD:DE15 | M7Scene_ | 114 | verified | The scene's NMI handler (JML from NmiTrampoline, installed by M7Scene_SetVectors). |
$FD:DE87 | M7Scene_ | 17 | verified | The 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). |
$FD:DE98 | FieldFD_ | 394 | verified | FdVec_FFFA's routine. |
$FD:E022 | FieldFD_ | 595 | verified | FdVec_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. |
$FD:E275 | PalAnim_ | 29 | verified | FdVec_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. |
$FD:E292 | FieldFD_ | 266 | verified | FdVec_FFF4's routine. |
$FD:E39C | PalAnim_ | 155 | verified | FdVec_FFF7's routine. |
$FD:E437 | PalAnim_ | 78 | verified | Kind 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). |
$FD:E485 | PalAnim_ | 99 | verified | Kinds 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. |
$FD:E4E8 | PalAnim_ | 74 | verified | Kind 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... |
$FD:E532 | PalAnim_ | 74 | verified | Kind 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. |
$FD:E57C | PalAnim_ | 40 | verified | Kind 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... |
$FD:E5A4 | PalAnim_ | 61 | verified | Kind 5: steps the level .Unk7 by .Unk3 toward .Unk8 (down when .Unk7 >= .Unk8). |
$FD:E5E1 | PalAnim_ | 110 | verified | |
$FD:E64F | PalAnim_ | 82 | verified | PalAnim_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... |
$FD:E6A1 | PalAnim_ | 48 | verified | PalAnim_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... |
$FD:E6D1 | PalAnim_ | 55 | verified | PalAnim_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... |
$FD:E708 | PalAnim_ | 50 | verified | PalAnim_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 /... |
$FD:E73A | PalAnim_ | 63 | verified | PalAnim_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 /... |
$FD:E779 | PalAnim_ | 71 | verified | PalAnim_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 /... |
$FD:E7C0 | PalAnim_ | 71 | verified | PalAnim_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... |
$FD:E807 | PalAnim_ | 37 | verified | Kind 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... |
$FD:E82C | PalAnim_ | 61 | verified | Kind 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. |
$FD:E869 | PalAnim_ | 110 | verified | |
$FD:E8D7 | PalAnim_ | 94 | verified | PalAnim_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... |
$FD:E935 | PalAnim_ | 45 | verified | PalAnim_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... |
$FD:E962 | PalAnim_ | 45 | verified | PalAnim_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... |
$FD:E98F | PalAnim_ | 59 | verified | PalAnim_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... |
$FD:E9CA | PalAnim_ | 71 | verified | PalAnim_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... |
$FD:EA11 | PalAnim_ | 75 | verified | PalAnim_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. |
$FD:EA5C | PalAnim_ | 74 | verified | PalAnim_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. |
$FD:EAA6 | M7Scene_ | 17 | verified | Mode 7 scene, continued ($FD:EAA6–$FD:F28F): its helpers and tables (see the banner at M7Scene_Run80) |
$FD:EAB7 | M7Scene_ | 17 | verified | Copies M7Scene_Save7F back to the 512 bytes at $7F0000. |
$FD:EAC8 | M7Scene_ | 18 | verified | DMA and HDMA off, forced blank, NMI and joypad reading off, then SEI. |
$FD:EADA | M7Scene_ | 17 | verified | Waits 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. |
$FD:EAEB | M7Scene_ | 9 | verified | Clears M7Scene_NmiFlag, waits until M7Scene_Nmi has incremented it, and clears it again. |
$FD:EAF4 | M7Scene_ | 31 | verified | Points NmiTrampoline at M7Scene_Nmi and IrqTrampoline at M7Scene_Irq (a JML each). |
$FD:EB13 | M7Scene_ | 120 | verified | DMA 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... |
$FD:EB8B | M7Scene_ | 245 | verified | Builds 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... |
$FD:EC80 | M7Scene_ | 17 | verified | Writes A (0: none) empty window lines (WH0 = $FF, WH1 = 0) through WMDATA. |
$FD:EC91 | M7Scene_ | 47 | verified | DMA channel 0: the 8 KB sprite bitmap M7Scene_SprGfx to VRAM word $4000 (the sprite tiles), VMAIN incrementing after the high byte. |
$FD:ECC0 | M7Scene_ | 21 | verified | Zeroes the 8 KB sprite bitmap M7Scene_SprGfx through WMDATA. |
$FD:ECD5 | M7Scene_ | 164 | verified | Sets 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). |
$FD:ED79 | M7Scene_ | 16 | verified | A pixel's bit in a plane byte ($80 >> n, n = x & 7), then the same inverted; M7Scene_Init copies them to M7Scene_BitMasks/ClearMasks. |
$FD:ED89 | M7Scene_ | 410 | verified | Sets 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... |
$FD:EF23 | M7Scene_ | 76 | verified | Writes (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... |
$FD:EF6F | M7Scene_ | 146 | verified | Zeroes 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... |
$FD:F001 | M7Scene_ | 128 | verified | Red (0-$16) of BG colours 0-63 (M7Scene_InitPalette): 0 up to colour 16, a ramp up and down over 17-46, then 0. |
$FD:F081 | M7Scene_ | 128 | verified | Blue (0-15) of BG colours 0-63: up from 0 to 15 and back, each value twice. |
$FD:F101 | M7Scene_ | 34 | verified | Blue of the sprite colours by n & 15 (M7Scene_InitPalette): 0, 0, then up by 4 to $1F at 9 and back down to 8. |
$FD:F123 | M7Scene_ | 94 | verified | Each 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... |
$FD:F181 | M7Scene_ | 64 | verified | Words read by their low byte (M7Scene_CyclePalette, X = n x 2): the pulse depth of colour 16 + n, a ramp 0-$16 and back. |
$FD:F1C1 | M7Scene_ | 44 | verified | DMA 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). |
$FD:F1ED | M7Scene_ | 23 | verified | Writes 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. |
$FD:F204 | M7Scene_ | 30 | verified | 64 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. |
$FD:F222 | M7Scene_ | 42 | verified | DMA channel 0: the OAM shadow (Oam_LowTable and Oam_HighTable, Oam_ShadowBytes) to OAM from address 0 (OAMADDH is not written). |
$FD:F24C | M7Scene_ | 26 | verified | Hides all 128 sprites in the OAM shadow: each Y byte of Oam_LowTable = $F0, each Oam_HighTable byte = $55 (X bit 8 set, small). |
$FD:F266 | M7Scene_ | 42 | verified | DMA channel 0: the 512 bytes of Pal_Buf to CGRAM from colour 0. |
$FD:F290 | FieldAnimListAPtrs | 128 | verified | !FieldRom_AnimListAPtrs: one word per LocRom.Tileset12 & $3F ($00-$3F), the offset of its list from FieldAnimListA. |
$FD:F310 | FieldAnimListA | 1,719 | verified | !FieldRom_AnimListA: FieldFD_LoadAnimSetA's lists. |
$FD:F9C7 | FieldAnimListBPtrs | 176 | verified | !FieldRom_AnimListBPtrs: one word per LocRom.Palette ($00-$57), the offset of its list from FieldAnimListB; labels named as for FieldAnimListAPtrs. |
$FD:FA77 | FieldAnimListB | 1,202 | verified | !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... |
$FD:FF29 | FieldAnimListBOldTail | 188 | verified | Nothing 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... |
$FD:FFE5 | FdVec_ | 3 | verified | The 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. |
$FD:FFE8 | FdVec_ | 3 | verified | JMP to M7Scene_Run82 (event $FF $82; never returns). |
$FD:FFEB | FdVec_ | 3 | verified | JMP to M7Scene_Run81 (event $FF $81; never returns). |
$FD:FFEE | FdVec_ | 3 | verified | JMP to PalAnim_StopAll. |
$FD:FFF1 | FdVec_ | 3 | verified | JMP to M7Scene_Run80 (event $FF $80; never returns). |
$FD:FFF4 | FdVec_ | 3 | verified | A service vector (see FdVec_FFE5): JMP to FieldFD_LoadAnimSetB, which ends with RTL. |
$FD:FFF7 | FdVec_ | 3 | verified | JMP to PalAnim_TickAll, which runs the 12 FieldAnimB palette animation records at $0520 (Field_EndOfFrame calls it every frame). |
$FD:FFFA | FdVec_ | 3 | verified | JMP to FieldFD_LoadAnimSetA. |
$FD:FFFD | FdVec_ | 3 | verified | JMP to FieldFD_UploadTileAnims (from the field's IRQ). |
$FF:F548 | BankFF_ | 224 | verified | Builds 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... |
$FF:F628 | BankFF_ | 79 | verified | Copies a set of 12 colours from bank $E4 into Menu_PalBuf and marks it for upload (Menu_PalDirty counted up). |
$FF:F677 | BankFF_ | 123 | verified | Unpacks 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... |
$FF:F6F2 | BankFF_ | 12 | verified | 6 tilemap words, the first entry of each row pair BankFF_BuildScreenMap writes (each next entry is one tile on). |
$FF:F6FE | BankFF_ | 8 | verified | 4 words BankFF_BuildScreenMap copies to !Menu_Unk9100 (colours, probably, from the values; the reader is not traced). |
$FF:F706 | BankFF_ | 16 | verified | 8 colours BankFF_BuildScreenMap copies to !Menu_PalBuf + $30 (colours $18-$1F of the menu's CGRAM copy). |
$FF:F716 | BankFF_ | 67 | verified | Steps 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). |
$FF:F759 | ScrollWaveFF_ | 64 | verified | Wave 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)... |
$FF:F799 | ScrollWaveFF_ | 64 | verified | |
$FF:F7D9 | BankFF_ | 58 | verified | Copies 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... |
$FF:F813 | BankFF_ | 318 | verified | Part of Menu_BuildItemTables' set-up of the tech data (meaning partly inferred). |
$FF:F951 | BankFF_ | 7 | verified | 1 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). |
$FF:F958 | BankFF_ | 99 | verified | Sets 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... |
$FF:F9BB | BankFF_ | 9 | verified | $80 >> n for n = 0-7, then 0: a character id's bit (as in !Menu_Unk29AF and the tech bytes). |
$FF:F9C4 | BankFF_ | 55 | verified | Checks 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... |
$FF:F9FB | BankFF_ | 128 | verified | Saves 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... |
$FF:FA7B | BankFF_ | 40 | verified | The 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). |
$FF:FAA3 | BankFF_ | 74 | verified | Loads 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. |
$FF:FAED | BankFF_ | 212 | verified | Loads 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... |
$FF:FBC1 | BankFF_ | 14 | verified | BankFF_LoadSlotPart's blocks: 2 records of 7 B: offset in the slot (2 B), address (2 B), bank (1 B), length (2 B). |
$FF:FBCF | BankFF_ | 4 | verified | Offsets 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). |
$FF:FBD3 | BankFF_ | 14 | verified | Menu_SlotSramOfs (DP $7B) = BankFF_SlotSramOfs entry DP $79 & 3. |
$FF:FBE1 | BankFF_ | 6 | verified | SRAM offset of save slots 0-2 ($A00 B apart). |
$FF:FBE7 | BankFF_ | 29 | verified | Sums 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. |
$FF:FC04 | BankFF_ | 83 | verified | Points 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... |
$FF:FC57 | BankFF_ | 16 | verified | The 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). |
$FF:FC67 | BankFF_ | 921 | verified | Not code that runs: tools/xref.py finds no call or jump into $FF:FC67-$FFFF from code. |