Commit graph

17 commits

Author SHA1 Message Date
Santiago
073a8fbf66 Fix MSVC build 2025-05-12 22:37:36 +02:00
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
d17a3f34cb
Integrate the live recompiler for mod loading (#76) 2025-01-02 21:25:20 -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
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
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
b4dbddb555
Remove RT64 dependency (#35)
* `RendererContext` abstract class

* Delete rt64_layer

* Implement renderer creation callback

* Make `GraphicsConfig` an abstract class

* Remove rt64

* Add renderer callback to `ultramodern::set_callbacks`

* Fix rebase

* Change setup_result's visibility to protected

* Declare abstract `is_equal` method instead of operators

* Various fixes

* Fix issues

* trigger_config_action

* Move GraphicsConfig back to ultramodern

* Change `update_config` to return if any changes were applied

* Rename renderer_wrapper to renderer_context

* Remove SDL2 and other libraries

* Allow registering get_graphics_api_name

* Move WindowHandle to renderer namespace

* Comments explaining which callbacks are required

* Fix CI

* Update readme

* `ULTRAMODERN_QUICK_EXIT` macro

* Remove --config from readme

* Add `add_compile_definitions(NOMINMAX)`
2024-06-10 09:43:38 -04:00
David Chavez
53072cb289
Use file backup system for config files (#29) 2024-06-02 20:38:40 +02:00
dcvz
e0769a223b Update librecomp header namespace to librecomp 2024-06-01 21:23:40 +02:00
dcvz
451a8356c7 Namespace librecomp headers under recomp 2024-06-01 19:48:53 +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
Anghelo Carvajal
e3e7024342
Remove librecomp usage from ultramodern (#23)
* Start setting up user callbacks system

* Implement RSP callbacks

* move RSP callbacks (and related RSP stuff) to its own file

* Move destroy_ui to gfx_callbacks_t and change recomp::start  to require rsp_callbacks_t

* error_handling.hpp

* Remove UserCallbacks in favor of threads_callbacks_t

* Add `ultramodern::set_callbacks` and some other cleanups

* Move most RSP stuff to librecomp

* Rename rsp_stuff.hpp to rsp.hpp

* Add rsp.cpp to librecomp cmake file

* review

* Remove `recomp::message_box`

* Fix missing rename
2024-05-30 22:56:45 -04:00
Anghelo Carvajal
6dce8c2fc2
CMake fixes to allow building this repo as a submodule (#25) 2024-05-30 09:16:07 +02:00
dcvz
72bc656c5e Add overlays (#5) 2024-05-24 21:44:11 +02:00
David Chavez
32632ab2ff
Game Registration API (#1) 2024-05-22 04:03:39 +02:00
dcvz
b47b52f540 Add CMakeLists 2024-05-19 22:31:47 +02:00