Commit graph

62 commits

Author SHA1 Message Date
Garrett Smith
8d997fcb86 cleanup + write pfs files to save directory 2026-01-22 22:09:31 -08:00
Garrett Smith
cb0a22cdaf modified controllerpak code 2026-01-19 22:52:21 -08:00
Garrett Smith
b05625b278 rename to nbytes for consistency 2026-01-18 17:20:58 -08:00
Garrett Smith
6b5fd29593 thunks and declarations 2026-01-18 17:15:08 -08:00
Garrett Smith
552a8cf3ff Merge branch 'save_api' into controller_pak 2026-01-18 14:05:05 -08:00
Garrett Smith
127ac961d2 include <mutex> to fix windows build 2026-01-18 12:01:53 -08:00
Garrett Smith
af3e3aaea0 add missing ultramodern::set_save_type 2026-01-18 02:43:56 -08:00
Garrett Smith
d990ef0bfc fix memory copies 2026-01-18 01:37:18 -08:00
Garrett Smith
8eaa83204a pass gameid to init_saving() 2026-01-17 23:08:44 -08:00
Garrett Smith
496639b8c1 update code to reflect relocation 2026-01-17 22:51:05 -08:00
Garrett Smith
b42d7bd2e4 move save APIs without changes 2026-01-17 22:13:33 -08:00
Garrett Smith
1c798b13d2 move file APIs without changes 2026-01-17 22:10:40 -08:00
Garrett Smith
29cc838971
Merge branch 'N64Recomp:main' into controller_pak 2026-01-16 18:43:52 -08:00
Garrett Smith
4cf46bf7f4
Fix __osContGetInitData mask to detect multiple controllers (#134)
Some checks are pending
validate / ubuntu (arm64, Debug) (push) Waiting to run
validate / ubuntu (arm64, Release) (push) Waiting to run
validate / ubuntu (x64, Debug) (push) Waiting to run
validate / ubuntu (x64, Release) (push) Waiting to run
validate / windows (x64, Debug) (push) Waiting to run
validate / windows (x64, Release) (push) Waiting to run
validate / macos (arm64, Debug) (push) Waiting to run
validate / macos (arm64, Release) (push) Waiting to run
validate / macos (x64, Debug) (push) Waiting to run
validate / macos (x64, Release) (push) Waiting to run
2026-01-16 20:57:47 -05:00
Garrett Smith
9ae9dbbe41
Add check for controller device info in rumble functions (#132)
Some checks are pending
validate / ubuntu (arm64, Release) (push) Waiting to run
validate / ubuntu (x64, Debug) (push) Waiting to run
validate / ubuntu (x64, Release) (push) Waiting to run
validate / ubuntu (arm64, Debug) (push) Waiting to run
validate / windows (x64, Debug) (push) Waiting to run
validate / windows (x64, Release) (push) Waiting to run
validate / macos (arm64, Debug) (push) Waiting to run
validate / macos (arm64, Release) (push) Waiting to run
validate / macos (x64, Debug) (push) Waiting to run
validate / macos (x64, Release) (push) Waiting to run
2026-01-15 23:18:02 -05:00
Garrett Smith
a078e4e8d4 Merge branch 'rumble_pak' into controller_pak 2026-01-15 19:36:11 -08:00
Garrett Smith
f00c6307bb Merge branch 'main' into controller_pak 2026-01-15 19:34:19 -08:00
Garrett Smith
c0a774f725
Merge branch 'N64Recomp:main' into rumble_pak 2026-01-15 19:06:17 -08:00
Garrett Smith
89923edcd6 track state properly 2026-01-15 19:05:41 -08:00
Garrett Smith
575c8f22a0
Add recomp::Configuration and ultramodern::MessageQueueControl + plumbing (#131)
Some checks are pending
validate / ubuntu (arm64, Debug) (push) Waiting to run
validate / ubuntu (arm64, Release) (push) Waiting to run
validate / ubuntu (x64, Debug) (push) Waiting to run
validate / ubuntu (x64, Release) (push) Waiting to run
validate / windows (x64, Debug) (push) Waiting to run
validate / windows (x64, Release) (push) Waiting to run
validate / macos (arm64, Debug) (push) Waiting to run
validate / macos (arm64, Release) (push) Waiting to run
validate / macos (x64, Debug) (push) Waiting to run
validate / macos (x64, Release) (push) Waiting to run
2026-01-15 20:23:39 -05:00
Garrett Smith
0fb6b85828 rumblepak state tracking 2026-01-15 16:07:32 -08:00
Garrett Smith
0a6fcc5f8d merge sonicdcer/controllerpakvifixes branch 2026-01-14 15:24:47 -08:00
Wiseguy
e8d7aec1bb
Implement displaylist event extension functions for easier game scheduling modifications (#128)
Some checks failed
validate / ubuntu (arm64, Debug) (push) Has been cancelled
validate / ubuntu (arm64, Release) (push) Has been cancelled
validate / ubuntu (x64, Debug) (push) Has been cancelled
validate / ubuntu (x64, Release) (push) Has been cancelled
validate / windows (x64, Debug) (push) Has been cancelled
validate / windows (x64, Release) (push) Has been cancelled
validate / macos (arm64, Debug) (push) Has been cancelled
validate / macos (arm64, Release) (push) Has been cancelled
validate / macos (x64, Debug) (push) Has been cancelled
validate / macos (x64, Release) (push) Has been cancelled
* Implement displaylist event extension functions for easier game scheduling modifications

* Fix build on clang 15
2025-12-12 02:11:14 -05:00
Wiseguy
a849ecf511
Requeue some external messages if their queues were full to prevent game lockups (#125) 2025-11-07 23:54:59 -05:00
Sonic Dreamcaster
212c0cd304 fix endianess in the OSPfsState struct 2025-11-01 18:27:15 -03:00
Wiseguy
df7e820d8c
VI accuracy fixes and osSetTime implementation (#123)
Some checks failed
validate / ubuntu (arm64, Debug) (push) Has been cancelled
validate / ubuntu (arm64, Release) (push) Has been cancelled
validate / ubuntu (x64, Debug) (push) Has been cancelled
validate / ubuntu (x64, Release) (push) Has been cancelled
validate / windows (x64, Debug) (push) Has been cancelled
validate / windows (x64, Release) (push) Has been cancelled
validate / macos (arm64, Debug) (push) Has been cancelled
validate / macos (arm64, Release) (push) Has been cancelled
validate / macos (x64, Debug) (push) Has been cancelled
validate / macos (x64, Release) (push) Has been cancelled
* Rewrite VI functionality for higher accuracy

* Implement osSetTime and move update screen to before VI update
2025-08-11 23:52:47 -04:00
Sonic Dreamcaster
826afd1c4f Merge remote-tracking branch 'upstream/vi-fixes' into controllerpakimpl 2025-08-11 23:18:31 -03:00
Mr-Wiseguy
d34934aa7e Implement osSetTime and move update screen to before VI update 2025-08-11 01:28:41 -04:00
Mr-Wiseguy
257b5db9d6 Rewrite VI functionality for higher accuracy 2025-08-10 01:00:36 -04:00
Manuel Alfayate Corchete
cea072b59b
Remove unnecessary x11 header include. (#122)
Some checks failed
validate / ubuntu (arm64, Debug) (push) Has been cancelled
validate / ubuntu (arm64, Release) (push) Has been cancelled
validate / ubuntu (x64, Debug) (push) Has been cancelled
validate / ubuntu (x64, Release) (push) Has been cancelled
validate / windows (x64, Debug) (push) Has been cancelled
validate / windows (x64, Release) (push) Has been cancelled
validate / macos (arm64, Debug) (push) Has been cancelled
validate / macos (arm64, Release) (push) Has been cancelled
validate / macos (x64, Debug) (push) Has been cancelled
validate / macos (x64, Release) (push) Has been cancelled
2025-07-24 15:00:45 -04:00
Sonic Dreamcaster
bf84e072d1 add padding to OSPfsState 2025-07-21 04:14:15 -03:00
Sonic Dreamcaster
da54226f8a Implement controller pak functions 2025-07-18 03:21:54 -03:00
Wiseguy
bb6b3b1645
Add mod API export to get the save file path (#102) 2025-04-09 01:15:10 -04:00
Wiseguy
1f2a5838ab
Added a mechanism to swap save files at runtime and a corresponding mod API export (#101)
Some checks are pending
validate / ubuntu (x64, Release) (push) Waiting to run
validate / ubuntu (arm64, Debug) (push) Waiting to run
validate / ubuntu (arm64, Release) (push) Waiting to run
validate / ubuntu (x64, Debug) (push) Waiting to run
validate / windows (x64, Debug) (push) Waiting to run
validate / windows (x64, Release) (push) Waiting to run
validate / macos (arm64, Debug) (push) Waiting to run
validate / macos (arm64, Release) (push) Waiting to run
validate / macos (x64, Debug) (push) Waiting to run
validate / macos (x64, Release) (push) Waiting to run
2025-04-08 02:21:06 -04:00
Wiseguy
8506c1b588
Fix race condition where update_gfx could be called after renderer shutdown (#98) 2025-04-06 19:42:15 -04:00
Wiseguy
6f8393f691
Allow renderers to pick the graphics API (#96)
Some checks failed
validate / ubuntu (arm64, Debug) (push) Has been cancelled
validate / ubuntu (arm64, Release) (push) Has been cancelled
validate / ubuntu (x64, Debug) (push) Has been cancelled
validate / ubuntu (x64, Release) (push) Has been cancelled
validate / windows (x64, Debug) (push) Has been cancelled
validate / windows (x64, Release) (push) Has been cancelled
validate / macos (arm64, Debug) (push) Has been cancelled
validate / macos (arm64, Release) (push) Has been cancelled
validate / macos (x64, Debug) (push) Has been cancelled
validate / macos (x64, Release) (push) Has been cancelled
2025-03-23 21:39:30 -04:00
David Chavez
ec56fb39b0
Add Metal as a renderer (#94)
Some checks failed
validate / ubuntu (arm64, Release) (push) Has been cancelled
validate / ubuntu (x64, Debug) (push) Has been cancelled
validate / ubuntu (x64, Release) (push) Has been cancelled
validate / windows (x64, Debug) (push) Has been cancelled
validate / ubuntu (arm64, Debug) (push) Has been cancelled
validate / windows (x64, Release) (push) Has been cancelled
validate / macos (arm64, Debug) (push) Has been cancelled
validate / macos (arm64, Release) (push) Has been cancelled
validate / macos (x64, Debug) (push) Has been cancelled
validate / macos (x64, Release) (push) Has been cancelled
2025-03-14 18:08:18 +01:00
Wiseguy
52ee0a675f
Fix missing chrono include on some STL implementations (#92) 2025-03-05 21:22:51 -05:00
Wiseguy
a2f201db84
Add on init callback to GameEntry, fix thread_queue_remove not actually removing the thread (#87) 2025-02-17 21:34:22 -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
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
d5c81d0a6b
Fixed bitpattern pointer for osContInit and removed shader cache functionality (#69) 2024-11-08 21:09:16 -05: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
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
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
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
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