Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Mod Support PR 1 (Mod framework and mod loading) #60

Merged
merged 32 commits into from
Sep 10, 2024

Conversation

Mr-Wiseguy
Copy link
Member

@Mr-Wiseguy Mr-Wiseguy commented Sep 10, 2024

This PR implements all the base functionality in the modding framework (besides LuaJIT recompilation of mod code). This includes:

  • Setting up a mod game ID when registering a game
  • Scanning for mods
  • Opening .nrm mod files and loose mod folders
  • Parsing the mod manifest
  • Exposing a function to get the details for detected mods
  • Enabling and disabling mods
  • Loading mod data and performing any necessary R_MIPS_32 relocations
  • Loading offline-compiled mod code
  • Loading additional mod dynamic libraries
  • Resolving mod dependencies, including connecting mod imports and exports as well as events and callbacks
  • Patching base recomp functions with hooks to jump to mod code for x86_64
  • Detecting conflicts between mods (when two mods patch the same base recomp function)

The following functionality will come in later PRs:

  • Allowing a project to register additional accepted mod file extensions (so they can use this system for RT64 texture pack support), with an option to generate a default manifest if none is present
  • Implementing jump hook patches on ARM64
  • Detecting conflicts between mod patches and base recomp patches (by scanning the patch overlays to gather a list of patched functions)
  • Recompilation of mod code into LuaJIT
  • Integrating the LuaJIT library into the runtime for running recompiled LuaJIT mods

…alization and minimum recomp versions for mods
@Mr-Wiseguy Mr-Wiseguy merged commit 45e9f7a into main Sep 10, 2024
10 checks passed
@Mr-Wiseguy Mr-Wiseguy deleted the mod-loading branch September 10, 2024 03:16
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