Commit graph

59 commits

Author SHA1 Message Date
Mr-Wiseguy
0c6e82515d Edited mod error messages to reflect new manifest filename, updated N64Recomp commit 2025-01-26 22:46:16 -05:00
Wiseguy
5eada509c0
Rename manifest to mod.json, refactor config parsing, add display_name, description, short_description fields (#81) 2025-01-26 22:14:08 -05: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
Ethan Lafrenais
7eb4bc3459
Runtime support for RSP overlays (#77) 2025-01-16 00:32:33 -05:00
Wiseguy
50029c70fd
Update sse2neon.h (#79) 2025-01-13 02:11:36 -05:00
Ethan Lafrenais
9721c8de3b
Add GameEntry.thread_create_callback (#78) 2025-01-12 23:43:53 -05:00
Wiseguy
d17a3f34cb
Integrate the live recompiler for mod loading (#76) 2025-01-02 21:25:20 -05:00
Darío
1361c48f59
Use SDL_Window as the WindowHandle in Linux and Android. (#73) 2024-12-23 21:23:24 -05:00
Wiseguy
576fed6cfc
Fix mods getting duplicated when scanning multiple times, fix incorrect mmap for rdram (#71) 2024-12-04 18:41:35 -05:00
Wiseguy
e3a8355a19
Fix eeprom probe and remove redundant eeprom size checks (#70) 2024-11-24 02:20:24 -05:00
Wiseguy
d5c81d0a6b
Fixed bitpattern pointer for osContInit and removed shader cache functionality (#69) 2024-11-08 21:09:16 -05:00
Wiseguy
ef6e84cb8a
Added save type selection and validation (#68) 2024-10-26 22:38:25 -04:00
Wiseguy
9ee0e7369a
Misc fixes and implement osStopThread (partial), osEepromWrite, and osEepromRead (#67)
* Fix rdram allocation to only allow kseg0 accesses

* Implement osEepromWrite and osEepromRead, fix implicit casting error in save_write

* Partially implement osStopThread

* Fix audio allowing games to queue 0 samples

* Remove commented out line
2024-10-26 20:41:05 -04: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
9e9ae173ee
Fixed incorrect alignment during mod section loading (#65) 2024-10-12 01:10:59 -04:00
Wiseguy
25e8bcc1e1
Added mechanism for recomps to declare custom mod content types and container formats (#64)
Also adds a way to specify whether a given content type can be toggled at runtime. The built-in mod code content type has this setting disabled.
2024-09-28 16:47:00 -04:00
Wiseguy
46797d6cad
Made DLL loading also search the DLL's path for dependency resolution (#63) 2024-09-27 00:50:07 -04:00
David Chavez
b80bb216b2
fix(macos): Add support for macos and ARM64 patching (#62) 2024-09-17 18:15:24 -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
0a53855333
Add RECOMP_FUNC definition to recomp.h for disabling IPO (#59) 2024-08-13 23:30:33 -04:00
Wiseguy
47feaaaa0d
Allow registering multiple patch sections (#57) 2024-07-28 21:19:46 -04:00
Anghelo Carvajal
c7ab41ec05
Fix saving never failing (#53) 2024-06-21 19:31:16 -04:00
David Chavez
ce68e96c17
Remove WIP section in README (#52) 2024-06-20 17:16:43 +02:00
David Chavez
e94dc4055b
Implement osViRepeatLine (#30)
* Implement osViRepeatLine

* Address feedback

* Include helpers header

* Address feedback
2024-06-18 17:00:26 -04:00
Anghelo Carvajal
93fab7ecc4
Provide missing pfs stub functions (#50)
* `osPiRawStartDma_recomp` and `osEPiRawStartDma`

* `osPfsNumFiles` and `osPfsRepairId`

* whoops, wrong name

* Fix missing new line on message box

* Use actual pointers in osPfsNumFiles_recomp
2024-06-18 13:07:08 -04:00
Anghelo Carvajal
27282afa2b
Remove "permanent" and "temporary" threads tagging and add a way to name game threads (#45)
* System to specify thread types by the game

* Register threads callbacks

* Remove temporary and permanent threads

* Fix `pthread_setname_np` not liking names longer than 16 bytes

* Singular

* Rename events_callbacks arg

* Use `prctl` instead of `pthread_setname_np` for naming a thread

* Fix typo
2024-06-18 13:02:18 -04:00
David Chavez
c91627740f
Use non git@ submodule url for xxHash (#48) 2024-06-17 10:04:17 +02:00
David Chavez
0c1811ca6f
Fixes for Windows and size_t (#46) 2024-06-11 20:47:52 +02:00
David Chavez
5f350b858e
Fix segfault on joining saving thread (#44) 2024-06-11 07:05:53 +02:00
David Chavez
835c14b0a8
CI: Add macos workflow (#43) 2024-06-10 16:27:48 +02:00
Anghelo Carvajal
85d6ae9e20
Add multiple controllers support (#41)
* Add controller number to input callbacks

* connected_device_info_t

* Fix index

* Fix osContGetReadData
2024-06-10 09:58: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
b0fa96b613
Fix Windows CI (#42) 2024-06-07 18:53:51 +02:00
Anghelo Carvajal
2caf04e6da
Move controller implementations from librecomp to ultramodern (#38)
* Start moving some cont functions to ultramodern

* Implement osContStartQuery, osContSetCh

* Finish moving cont.cpp functions to ultramodern

* Add constexpr to _return

* Fix rumble not working

* Rename cont.cpp to input.cpp

* Test
2024-06-06 13:45:33 -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
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
Anghelo Carvajal
d6f0f66e71
Merge pull request #27 from N64Recomp/upstreaming_zelda_changes
Upstream latest changes made to the ModernRuntime in the Zelda repo
2024-06-01 12:24:10 -04:00
Angie
a5ff2f4c77 Set NOMINMAX on the CMakeLists file 2024-06-01 09:07:10 -04:00
Mr-Wiseguy
e41c7cce6d Fixed Windows filesystem error crash
From Zelda64Recomp/Zelda64Recomp#271 commit 1ea7d4ebe9dcf522faa13cab513f88c3217ba011
2024-06-01 09:07:10 -04:00
Reonu
eb666c9e01 Automatic save backup system
From Zelda64Recomp/Zelda64Recomp#260 commit 4ebe71bfccbef17268c8941bed8d428d445268ca

Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>
2024-06-01 09:06:33 -04:00
Reonu
6a10d4ed43 Support for high precision framebuffers and dither noise (RT64)
From Zelda64Recomp/Zelda64Recomp#252 commit 23eb6b7eea9fd12f93d31c313faa335245bbfb3c

Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>
2024-06-01 08:59:35 -04:00
angie
288bd11a29 Remove unnecessary headers 2024-06-01 08:55:18 -04: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