Skip to content

Fit USA/EUR themes to every region and keep the language binds - #18

Merged
DefKorns merged 9 commits into
standalone-enginefrom
feat/cl-rebind
Oct 21, 2026
Merged

DefKorns merged 9 commits into
standalone-enginefrom
feat/cl-rebind

Conversation

@DefKorns

Copy link
Copy Markdown
Owner

Theme fixes found while testing Console Language and USA/EUR themes on the Super Famicom.

  • Console Language: themeSelector rebinds the language with clRebind when Console Language provides it, so copyleft stays on the strings (older releases keep the old unmount/mount).
  • USA/EUR themes on other regions:
    • themeDepsFix: when dependencies.json lists /fonts/{s,m,l}.font and the firmware has .fnt (or the reverse), a corrected copy is bound over it. The UI exited (C8) on the Super Famicom otherwise.
    • themeColorsFix: a theme can ship its palette as resources/scripts/env/colors_<region>.lua. On a firmware of another region the table name is renamed in the bytecode (same length, patched with od/dd) and the copy is bound over that region's palette, so one palette applies on every region and per-region palettes still win.
    • The copies live in /var/theme_fixes (already a tmpfs at boot) and are unbound before the theme is.
  • Fonts: fontBindFix copies every theme font that changed, not only when the title font differs, and reads them from the theme actually chosen (random, default or per-folder) instead of the one baked into b8024.
  • Install placeholder: themeSelector leaves the UI and the saved theme alone while the name is still CHANGEME.
  • chmenu hook: the install puts it back after the previous version's uninstall strips it, and injectFile writes it through /bin/chmenu so it applies without a reboot.
  • DIY: the preview reloads the current folder instead of hopping 001 → 000, and cleaning a previewed DIY remounts the active theme.
  • Uses the Options Menu omSplash, omUnpack and omReloadMenuLater helpers (needs Options Menu v2.0.1).

Tested on the console (Super Famicom and SNES EUR): Chrono Trigger applies without C8 and with its palette; kanji captions show with the extended theme fonts; language/theme/folder changes keep the language binds and copyleft; DIY preview and clean; the CHANGEME guard leaves state and mounts untouched.

@DefKorns
DefKorns merged commit c30fbd3 into standalone-engine Oct 21, 2026
6 checks passed
@DefKorns
DefKorns deleted the feat/cl-rebind branch October 22, 2026 09:52
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