-
Notifications
You must be signed in to change notification settings - Fork 0
Main Loop and Map
Navigation: Home - Runtime & engine - Main Loop and Map
This is the high-frequency control loop once runtime is active.
Flow shape:
- Poll event/timer bytes.
- Wait/pump input (
-$83C2path). - Fetch key (
-$842Epath). - Dispatch key through table (jump from
LAB_14AAfamily). - Handle mode transitions and refresh.
Hotkeys include at least C/M/O/P/Q branches into command handlers.
The dispatcher at $1482 is now fully decoded — see
43-exploration-input-and-ingame-options.md for the complete table. Summary:
Ctrl-Q quit-confirm $12F4; B Bash 0x9B48; C Controls 0x13CCE;
D Dismiss 0x141F4; E Exchange 0x20F58; M auto-map 0x223A;
O/P toggle the right-hand Options/Protect panels ($5D54 / 0x5E28,
state byte A4-$79B2); Q Quick Ref + digits 1-8 View Character (both via
thunk -$7E00 → 0x907A); R Rest 0x19E20; S Search $4800;
U Unlock 0x20CA2; $F0/$F1 turn ($5838), $F2/$F3 step ($5816).
Arrow/keypad keys map to $F0..$F3 in the raw key reader at $2264E.
Triggered when mode/screen id changes:
- Skips reload if mode unchanged.
- Uses
A4-$EEF4as source pointer. - Copies multiple
0x100blocks into working tables (A4-$AB46,A4-$AA46, etc).
This is a major state/materialization step for map/event context.
Nested 16x16 tile draw loops:
- Tile source table at
A4-$AA46. - Draw calls through
-$83E0(A4). - Movement from key mapping in
A4-$864F:N -> 0x20S -> 0x21E -> 0x22W -> 0x23
- ESC (
0x1B) setsA4-$86B0and exits map loop.
After exit it re-enters session refresh (LAB_545E path).
- Docs Wiki Hub ← full doc index
- Getting Started ← read this first
- Overview
- Workspace Notes
- Open Questions
- Full Analysis
- Game Remake
- Startup and Init
- Runtime Memory Map
- Main Loop and Map
- Exploration Input and Options
- Party and Session
- Game State Struct
- Data Hunk mm2 data 00
- Time Era Calendar
- GFX Loading
- ANM TV Format
- PC DOS graphics
- SNES graphics
- 3D View and Game Screen
- Amiga 3D Render Process
- Scripted Scene Graphics
- Event Graphics Opcodes
- Title Screen Assets
- Title Screen Animation
- Format inventory
- items.dat
- monsters.dat
- roster.dat
- attrib.dat
- map.dat
- spells & item use
- event.dat
- Events by location ← 71 maps
- Events hub (numbered)
- Event Script Opcodes
-
Event Script DSL ←
.mm2evtauthoring - Event Text Rendering
- Event Graphics Opcodes
- Combat Overview
- Combat System
- Encounter Tables
- Spell Cast ASM
- monsters.dat abilities
- Spells and item use
- Amiga audio in exe ← Paula / DATA / remake
- Controls: Sounds / Walk Beep
- MM2 music format (superseded)
- Title/death audio paths (superseded)
- Known songs catalog (superseded)
- Town Services
- Spell Sources
- Character Mechanics
- Skills and Hirelings
- Commerce Formulas
- Commerce World Services
- Mount Farview Class Quest
- Class Quest HP Bug
- Event Runtime
- Event to String Path
- Embedded Exe Strings
- Copy Protection
- Time Era Calendar
- Game State Struct
- MM1 Overview ← hub + decode status
- MM1 MAZEDATA format
- MM1 to MM2 outdoor
- MM1 WALLPIX by sector
- MM1 art & graphics
- MM1 items / monsters (status)
- MM1 map walker ↗
- MM1 2D maps gallery
- MM1 WALLPIX gallery