-
Notifications
You must be signed in to change notification settings - Fork 0
C Decomp Scaffold
Vairn edited this page Jun 29, 2026
·
7 revisions
Navigation: Home - Tools - C Decomp Scaffold
This directory contains a first-pass C lifting scaffold for the Amiga mm2 executable.
-
mm2_types.h
Runtime structs and offset-based field aliases. -
mm2_gamestate.h
A4field constants (MM2_GS_*) shared across lifts and codecs. -
mm2_lift.c
Address-anchored function stubs (sub_248ae_startup,sub_256e_load_screen_state, etc.). -
mm2_roster_codec.h/mm2_roster_codec.c
Struct-backed loader/saver forroster.dat(64 × 130-byte records). -
mm2_monsters_codec.h/mm2_monsters_codec.c
Struct-backed loader/saver formonsters.dat(256 × 26-byte records). -
mm2_event_codec.h/mm2_event_codec.c
Struct-backed loader/saver forevent.dat(71 location records). -
mm2_found_items.h/mm2_found_items.c
Pending loot buffer — OP_2A treasure fill, OP_19 backpack overflow, Search predicate (A4-$3F10..-$794C). Python mirror:tools/mm2_found_items.py. -
mm2_town_tables.h/mm2_town_tables.c
Per-town commerce constants + blacksmith inventories decoded frommm2_data_00.bin. Python mirror:tools/mm2_town_tables.py, dump helper:tools/dump_shop_tables.py. -
mm2_encounter.h/mm2_encounter.c
Encounter table helpers (random step / arena slots). -
mm2_anm_preview.h/mm2_anm_preview.c
.anmplanar frame decode for tooling previews.
- Keep control-flow anchored to known 68k addresses.
- Replace unknowns incrementally without breaking the skeleton.
- Preserve offset-based memory semantics until field meanings are proven.
-
sub_<addr>_<purpose>for recovered routines. - Comments should include original label/address where possible.
- Do not rename offsets to semantic fields unless confidence is high.
- Complete
sub_24928_init_runtime(). - Expand
sub_256e_load_screen_state()to all copied pages. - Implement
sub_24c4_overland_loop()key handling and draw calls. - Model
sub_1280_main_loop()dispatch table. - Trace Search payoff @
0x1B19C(found-item buffer consumption).
- 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