Commit graph

13 commits

Author SHA1 Message Date
Wiseguy
2ed84f46c5
Implement mod configuration, mod reordering, and extended exports (#95)
* init recomp config_store

* Use a custom hash class to enable hetereogenous lookup

* Added config registry/option files

* switch to using usings

* dropdown config type

* Added TextField option type

* parse/validate button config type

* wip callback registry

* Add auto enabled.

* Cleanup.

* Add support for config schema.

* Add float arg1 helpers

* Config storage for mods.

* Proper enum parsing.

* Persist mod order and enable.

* Enable new mods by default.

* Mods directory.

* Parse thumbnail when opening mods.

* Auto-enabled mods.

* Implement extended function exports that pass the caller mod's index as an extra argument

* Fix mod configs not saving and default value not getting parsed

* Implement API to allow mods to read their config values

* Fix config value parsing to allow integral values for double fields

* Change construction of ModConfigQueueSaveMod.

* Fix N64Recomp commit after rebase

---------

Co-authored-by: Dario <dariosamo@gmail.com>
Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com>
2025-03-23 21:30:27 -04:00
Wiseguy
cdfe416809
Mod function hooking (#80)
* Prevent mods from replacing functions patched by the base recomp unless they're marked as Force

* Implement function hooking for functions replaced by mods

* Add support for hooking non-relocated functions that aren't replaced by a mod

* Only create the regenerated code handle if any functions need to be regenerated

* Implement relocs for function regeneration in hooking

* Implement hooking of functions patched by the base recomp

* Fix base event index tracking when loading mods

* Update to N64Recomp main branch after merge
2025-01-26 22:03:36 -05:00
Wiseguy
3e39c2ec34
Add modified o1Heap library and set up recomp heap (#66)
* Add modified o1Heap library and set up recomp heap

* Fix missing include on POSIX systems
2024-10-21 22:23:33 -04:00
Wiseguy
356b9f901e
Fix populating reference symbol pointers and add missing runtime function pointers in offline compiled mod loading (#61)
* Fixed reference symbol pointers not being populated in offline compiled mods

* Add populating missing runtime function pointers in offline compiled mods

* Update N64Recomp after merge
2024-09-12 19:00:02 -04:00
Wiseguy
45e9f7a6cb
Runtime Mod Support PR 1 (Mod framework and mod loading) (#60)
* Added miniz and implemented mod manifest loading from zip

* Add more mod loading error enums

* Added ability to load mods from directories instead of zip files

* Added validation for mod contents and mod load error strings

* Add checks for required fields existing in manifest

* Renamed load_mod to open_mod and ModLoadError to ModOpenError

* Made rdram size an argument in recomp::start, reorganized some PI address constants

* Add N64Recomp as submodule and initial mod loading (temporarily using a DLL instead of Lua recompilation)

* Created ModContext and exposed functionality for searching mod folders, activating mods, and loading active mods

* Implemented per-game mod contexts

* Add duplicate mod detection

* Added function conflict detection, recovery from failed mod loading and message box with load errors

* Update N64Recomp for new modding infrastructure, begin adding support for offline compiled mods

* Reorganized mod loading, added mod dependency validation

* Reorganized mod code handle code

* Implement importing functions from other mods

* Implement mod events and callbacks

* Add support for creating events in patches

* Add support for exporting functions from native libraries in mods

* Removed per-game mod subdirectories and added the mod's corresponding game id to the manifest

* Added version parsing with version number as argument to recomp initialization and minimum recomp versions for mods

* Changed mod binary and mod symbol files to use fixed paths, removed them from the manifest

* Expose function for getting the details for currently opened mods

* Add dependencies and authors to manifest and update N64Recomp submodule

* Implement mod loading on posix systems

* Implement mip32 relocs for mod loading and add mod functions to function lookup table

* Add CPU architecture detection and gate current mod function hooking behind x86_64 define

* Fix build on compilers that don't properly support aggregate initialization

* Fix compilation on ARM64 and Apple

* Fix compilation on MacOS x86_64

* Update N64Recomp commit after merge

* Fix whitespace in game.hpp
2024-09-09 23:16:07 -04:00
Wiseguy
47feaaaa0d
Allow registering multiple patch sections (#57) 2024-07-28 21:19:46 -04:00
Anghelo Carvajal
4d756c8df2
Consolidate both patch register functions into a single function (#40)
* Consolidate both patch register functions into one

* register_patches
2024-06-10 09:52:27 -04:00
Anghelo Carvajal
6ceb171571
Misc fixes (#39)
* Fixes

* Fix OoB

* Use calloc instead of malloc for initializing the overlays
2024-06-05 22:28:22 -04:00
David Chavez
ec7e81b45d
Revert sections.hpp to .h (#34) 2024-06-03 21:54:20 +02:00
David Chavez
9f0dd2fcd9
Use hpp suffix for cpp headers (#33) 2024-06-03 20:31:52 +02:00
David Chavez
56cfbb2d31
Make ModernRuntime Integration Ready (#26)
Co-authored-by: angie <angheloalf95@gmail.com>
2024-06-01 08:36:29 +02:00
dcvz
72bc656c5e Add overlays (#5) 2024-05-24 21:44:11 +02:00
Mr-Wiseguy
3504a4c71f Added ultramodern and librecomp from Zelda64Recomp, added rt64 submodule, added README 2024-05-19 15:04:28 -04:00