Latest revision |
Your text |
Line 18: |
Line 18: |
| |- | | |- |
| | $1:D401 || W_Battle_4thOrderSubState || Fourth order state index (secondary) | | | $1:D401 || W_Battle_4thOrderSubState || Fourth order state index (secondary) |
| |}
| |
|
| |
| == System State Machine ==
| |
|
| |
| Here's a breakdown of the sixteen first-order states in Telefang.
| |
|
| |
| {| class="wikitable"
| |
| |-
| |
| ! State ID. !! Impl. ROM Addr !! Disassembly Symbol !!
| |
| |-
| |
| | $00 || $02:5300 || || Intro logos.
| |
| |-
| |
| | $01 || $02:493F || || Title screen
| |
| |-
| |
| | $02 || $02:4000 || ||
| |
| |-
| |
| | [[#st_03|$03]] || [[#st_03|$04:4000]] || TitleMenu_GameStateMachine || Title menu (continue/new game/options/link)
| |
| |-
| |
| | $04 || $02:40BF || || Attract screen
| |
| |-
| |
| | $05 || $0B:1EA1 || || Overworld
| |
| |-
| |
| | $06 || $1C:4000 || Encounter_GameStateMachine || Random, T-Fanger, and other plot-important encounters
| |
| |-
| |
| | $07 || $05:441B || || Battle system
| |
| |-
| |
| | $08 || $1D:4000 || Victory_ExternalStateMachine || Victory processing screens at end of battle (level-up, contact loss, game over)
| |
| |-
| |
| | $09 || $02:4B8B || || Status screen (used in a lot of places...)
| |
| |-
| |
| | $0A || $02:4824 || ||
| |
| |-
| |
| | $0B || colspan="3" style="text-align: center" | ''Aliases state $0C''
| |
| |-
| |
| | $0C || $04:45C0 || || Pause menu (contacts/index/save/dial etc)
| |
| |-
| |
| | $0D || $02:44CF || ||
| |
| |-
| |
| | $0E || $02:458E || ||
| |
| |-
| |
| | $0F || $1F:4000 || || Link communications (vs battle/trade/melo-d)
| |
| |}
| |
|
| |
| <span id="st_03"></span>
| |
| === Title Menu ===
| |
|
| |
| {| class="wikitable"
| |
| |-
| |
| ! State ID. !! Impl. ROM Addr !! Disassembly Symbol !!
| |
| |-
| |
| | $03 00 || || || Load CGB Palette 0
| |
| |-
| |
| | $03 01 || || || Initialize phone graphics & sprites
| |
| |-
| |
| | $03 02 || || || Load initial menu tilemaps & initialize menu state
| |
| |-
| |
| | $03 03 || || || Load tilemaps for each individual menu option.
| |
| |-
| |
| | $03 04 || || || Load color palettes for the menu.
| |
| Then, move the window and background layers in place for the upcoming animation.
| |
| |-
| |
| | $03 05 || || || Final commit of palettes. On DMG, this state configures the legacy palette registers instead.
| |
| |-
| |
| | $03 06 || || ||
| |
| |-
| |
| | $03 07 || || || Animate the two halves of the phone scrolling in.
| |
| |-
| |
| | $03 08 || || || Player input handling
| |
| |-
| |
| | $03 09 || || || Start menu-scrolling-up animation.
| |
| |-
| |
| | $03 0A || || || Menu-scrolling-up animation, frame 2.
| |
| |-
| |
| | $03 0B || || || End menu-scrolling animation (either direction).
| |
| |-
| |
| | $03 0C || || || Start menu-scrolling-down animation.
| |
| |-
| |
| | $03 0D || || || Menu-scrolling-down animation, frame 2.
| |
| |-
| |
| | $03 0E || || || Fade out screen, then transfer to overworld ($05 00)
| |
| |-
| |
| | $03 0F || || ||
| |
| |-
| |
| | $03 10 || || ||
| |
| |-
| |
| | $03 11 || || || Time input
| |
| |-
| |
| | $03 12 || || ||
| |
| |-
| |
| | $03 13 || || || Initialize naming input, clear string buffers.
| |
| |-
| |
| | $03 14 || || || Name input
| |
| |-
| |
| | $03 15 || || || Saves the input buffer to the player name buffer.
| |
| |-
| |
| | $03 16 || || ||
| |
| |-
| |
| | $03 17 || || ||
| |
| |-
| |
| | $03 18 || || || (Called when you select "Sound" on the menu. More info required.)
| |
| |-
| |
| | $03 19 || || ||
| |
| |-
| |
| | $03 1A || || ||
| |
| |-
| |
| | $03 1B || || ||
| |
| |-
| |
| | $03 1C || || || Save-file overwrite warning
| |
| |-
| |
| | $03 1D || || ||
| |
| |-
| |
| | $03 1E || || ||
| |
| |-
| |
| | $03 1F || colspan="3" style="text-align: center" | ''Aliases state $03 01''
| |
| |-
| |
| | $03 20 || || || Denjuu nicknaming screen init
| |
| |-
| |
| | $03 21 || || || Denjuu nicknaming palette fade-in
| |
| |-
| |
| | $03 22 || || || Denjuu nicknaming input handler
| |
| |-
| |
| | $03 23 || || || Denjuu nickname save
| |
| |-
| |
| | $03 24 || || ||
| |
| |-
| |
| | $03 25 || || ||
| |
| |} | | |} |