-
Notifications
You must be signed in to change notification settings - Fork 0
Startup and Init
Vairn edited this page Jun 2, 2026
·
5 revisions
Navigation: Home - Runtime & engine - Startup and Init
flowchart TD
dos["DOS/Exec hunk load"] --> load["Load .dat + .32 assets"]
load --> a4["A4 workspace<br/>data_base + 0x7FFE"]
a4 --> loop["Main loop LAB_1280"]
loop --> vp["Viewport refresh 0x5382"]
vp --> v3d["3D view 0x2ECE"]
- Real executable path starts at
0x08(BRA.W) and lands at0x18. - Primary jump at
0x20:JMP $248AE. -
0x26+contains embedded strings (Version 1.01,MM2Boot:,MM2Play:), not code.
- Early output helpers print characters/newlines via the
24E1Cchain. -
0x24920:LEA $7FFE, A4sets the global runtime base. - Clears MANX arena around
A4-$5E62. - Loads Exec base from
$4.WintoA6. - Opens
dos.libraryviaJSR -$198(A6)(OpenLibrary). - Runs allocation/setup routine (
0x24928):- Calls
LAB_2567C(AllocMemwrapper) - Writes
MANXsignature - Builds process/runtime structures
- Calls
- Final engine binds:
-
JSR -$7FF8(A4)(engine thunk/table bind) -
JSR -$7B48(A4)(game boot)
-
-
0x24914:dos.library - Early static data includes world/class/race labels used by UI.
- This init is hybrid: DOS/Exec setup plus custom engine bootstrap.
- It does not map cleanly to a single
main()call/return flow.
| Page | Why |
|---|---|
| Runtime Memory Map | A4 workspace |
| Main Loop and Map | Scheduler |
- 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
- 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