Skip to content

Add shared ROM-prose registry and native Gen-2/GBA storage readers - #171

Closed
Roxas2712 wants to merge 74 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-rom-text
Closed

Roxas2712 wants to merge 74 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/portable-rom-text

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 24, 2026 •

Copy link
Copy Markdown

Gen1Recomp exposes label-keyed engine prose separately from VM script text. Gen2Recomped lacks that registry, so portable translations either miss native readers or overwrite a script with the same label.

Add mod.content.rom_text for Gen 2 and the registered GBA games, with the shared API-3 source-string contract, rollback, freeze and guarded retirement. Gen-2 imported prose labels project into existing native label readers; battle prose uses the common formatter with named/positional slots and ending metadata. Same-spelling API-3 script records remain separate and are consumed by real native text commands, including empty/removed records and authored-prefix collisions. VM bank/address routing stays intact.

Bind all five GBA Pokemon-storage actions and descriptions explicitly through the native storage-menu constructor. These are detached views: imported constants and GBA script text remain unchanged, and older-cache fallback screens receive the same overrides. Label membership/provenance is generated from pinned public import metadata, with no cartridge prose or copied importer implementation.

Coverage boundary: this adds the shared registry and its first verified native consumers. Other GBA party/item-PC/field-menu/battle-message readers still need explicit bindings. Gen-2 screens that print hardcoded fallbacks rather than reading labels also need reader changes. Registry availability is not a claim of universal cartridge-text, printer or glyph parity. GB/DS honestly report the registry unavailable. Native host API-1/2 uses strings; the reference's native GBA IR is not claimed as a shared native-API-2 format.

Validation

Feature runtime 52541d1b0160de2361a2bffe15fd4fad4eb9a20c; combined runtime 62f8902617255195b4a12b176f171925c49209ec. Later feature changes are documentation only.

  • Registry/native 175/175, ownership/isolation/retirement 510/510, formatting 57/57, provenance 52/52. Existing script-text contracts 3,700/3,700 and 234/234 pass.
  • Same unchanged public consumer through both real SDKs: 24 isolated workers / 94 paired native observations at each runtime snapshot. Gold/Silver/Crystal and FireRed/Emerald, plus Red availability gating. Host API 3 and API 2/unified compare with reference API 3; reference API 2 remains native.
  • Separate real GB/Gen-2 formatter comparison: 8 native engine workers / 96 paired observations. Clean Gen1 pin 535a5ec088c1ae1bf4d91dd3e35a56f64cf46d91.
  • Both engines' actual storage-menu readers compare every action and description. Actual native prose/VM readers cover same-label isolation, private-prefix escaping, empty text, removals, defaults and rollback. Deterministic provenance regeneration verifies exact metadata.
  • Feature 135/145 engine suites, SDK 3/3, B30 pass: exactly the same 26 FAIL lines / ten baseline suites as Unify API-3 script-text sources and native Gen-2 text IDs #170. Independent repairs remain test: repair Gen2 updater asset fixtures #128–134. Combined 190/190, SDK 3/3, B30 pass.
  • Native LÖVE 11.5 / imported Gold, FireRed, Emerald: unchanged installed consumer, actual title/New Game; Gold native battle-prose helper/textbox/ending handling plus independent same-label native script/A-close/resume; GBA real storage-menu labels/descriptions/B-close/reopen; frozen late writes. The Gold smoke does not execute a complete battle/wakeup turn. Isolated identity, in-memory New Game; no normal SAVE, full playthrough, fresh full-ROM reimport or pixel-equivalence claim. Owned temporary example removed with hash guards.
  • Unchanged Unify API-3 script-text sources and native Gen-2 text IDs #170 negative control rejects the registry and leaves actual native Gold prose/GBA storage readers unchanged.
  • Imported Red: battle 468/468, save conversion 95/95, parity J 73/73, K 22/22. No external binary save fixture supplied.
  • New Lua formatting, actionlint, Python compile and diff checks pass. No ROM, imported cache, save or private mod is included.

Stack

Depends on #170 and the earlier portability series. Incremental comparison against #170. The main-based diff includes unmerged prerequisites; the combined testfork also carries the independent baseline repairs.

All 31 hosted PR workflows report action_required pending maintainer approval. The new ROM-prose workflow has zero executed jobs. The passing validation above is local.

# Conflicts:
#	src/mods/Loader.lua
# Conflicts:
#	docs/modding.md
#	src/mods/Loader.lua
#	src/world/WorldAPI.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant