Skip to content

Freedom: a game module of its own, playable from the launcher - #109

Merged
Mango77x merged 2 commits into
mainfrom
feat/mhf1-module
Nov 14, 2026
Merged

Mango77x merged 2 commits into
mainfrom
feat/mhf1-module

Conversation

@Mango77x

Copy link
Copy Markdown
Owner

Monster Hunter Freedom (PSP, European release ULES00318) as a game module of its own, games/mhf1, playable from the launcher.

The module

  • Independent of the Freedom Unite module: its own region map, game program, prepare script and documentation (docs/16-mhf1-module.md, which also describes the layering planned for every PSP Monster Hunter: PSP platform, engine family, one module per game).
  • The region map holds the entry point, the overlay loader, the static initializers, the draw wait and its flag, and the disc's and executable's identification.
  • Recompiler coverage: 95.0 % of the executable, 82.8 % of the 105 overlays.
  • prepare.py uses the build's mhfu_extract_overlays for now (same DATA.BIN cipher); it moves to a shared engine library later.

The launcher

  • MHF_GAMES defaults to mhfu;mhf1: "Add my copy" / --install verify a Freedom disc and prepare its executable, the library lists it, Play / --play start it.
  • Home, Settings, Play and texture packs work on the chosen copy of any game, not only Freedom Unite's.
  • Freedom's program reads the general options (resolution, fullscreen, smooth textures, volumes, language, controls, texture pack) and skips Freedom Unite's enhancement options with a line in the game's log.
  • The game settings page shows Freedom Unite's enhancements (frame rate above 30, widescreen, HUD scale, the Game section) only for a Freedom Unite copy.
  • package_release.py --game-mhf1 ships the Freedom program.

Tested

  • Headless: language screen, logos, intro, title, menu, character creation at 30 fps.
  • A full quest played at 30 fps.
  • Launcher: install, list and play of the European disc, in a scratch library.
  • One system call not implemented yet: sceUtility 0x1579A159 (answered 0).

Monster Hunter Freedom (PSP, European release ULES00318) as games/mhf1, independent of the Freedom Unite module: its
own region map, game program, prepare script and documentation (docs/16-mhf1-module.md).

The region map holds the entry point, the overlay loader, the static initializers, the draw wait and its flag, found
by matching Freedom Unite's mapped code (Freedom runs an earlier version of the same engine), and the disc's and the
executable's identification. The program installs the recompiled code (95.0 % of the executable's, 82.8 % of the
105 overlays'), activates each overlay as the game loads it, sleeps through the draw wait, and runs in a window or
headless with the test switches (time limit, scripted input, screen dumps).

Measured headless: the language screen, the save space check, the logos, the intro movie, the title, the game menu
and character creation (the name typed in), at 30 fps. Only one system call is not implemented yet
(sceUtility 0x1579A159, answered 0).

For now prepare.py uses the build's mhfu_extract_overlays (the same DATA.BIN cipher); it moves to a shared engine
library once both games run.
The launcher now builds both games (MHF_GAMES defaults to "mhfu;mhf1"), so its catalog knows Freedom's European
disc (ULES00318): "Add my copy" and --install verify it and prepare its executable, the library lists it, and Play
and --play start the Freedom program with the player's settings.

The copy the launcher works on is no longer looked for among Freedom Unite's copies only: Home, Settings, Play and
the texture pack use the chosen copy of any game.

Freedom's program reads the launcher's general options (smooth textures, volumes, language, controls, texture
pack, mipmaps, anisotropy) and skips Freedom Unite's enhancement options with a line in the game's log. The
game settings page shows Freedom Unite's enhancements (frame rate above 30, widescreen, HUD scale, the Game
section) only for a Freedom Unite copy.

package_release.py takes --game-mhf1 to ship the Freedom program.
@Mango77x
Mango77x merged commit e7e2e00 into main Nov 14, 2026
8 checks passed
@Mango77x
Mango77x deleted the feat/mhf1-module branch November 14, 2026 09:13
@Mango77x Mango77x mentioned this pull request Nov 14, 2026
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