Commit graph

365 commits

Author SHA1 Message Date
Ophidon 7b711214a7
Slang Subframe Shaders Feature (#16209)
Adds support for sub-frame shaders to vulkan/glcore/dx10-11-12.

Builds on the concept already present for frame duplication in use for BFI, to present multiple 'sub' frames per real frame to the shaders, so they can run at a higher framerate than the content framerate. Must be enabled via subframe shaders setting under synchronization settings to be active.

Will allow BFI to be implemented inside of the shaders, among any other use for the higher framerate shader authors can devise.

CurrentSubFrame and TotalSubFrames have been available inside the shaders to track what they want to do on an given subframe. TotalSubFrames will always be 1 when the setting is disabled (and when in menu/ff/pause). Framecount will not increment on sub-frames, as it does not for injected bfi frames now. Should not interfere with any existing shaders that do not check for subframes.
2024-02-09 03:12:55 -08:00
Jesse Talavera-Greenberg cbf49a0b77
XDelta patch support (Take 2) (#15915)
* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* Add some enums that were excluded by the cherry-pick

* Remove stray whitespace

* Adjust SIZE macros in xdelta3.h

- Move them outside the XD3_USE_LARGEFILE64 block
- Add more SIZE declarations
- Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX

* Reintegrate xdelta support

* Enable support for xdelta's secondary compressors

- Necessary for some patches

* Fix some format specifiers

* Remove unnecessary files from xdelta

* Include xdelta3.h with a relative path

* Add xdelta3 headers to HEADERS variable

* Gate Xdelta support behind HAVE_XDELTA

- HAVE_XDELTA is on by default
- HAVE_PATCH is still required for HAVE_XDELTA to be meaningful
- Support is mostly contingent on the availability of LZMA
- Anything modern should be okay
- Legacy platforms (e.g. DOS) may need to have Xdelta support disabled
- At least until some other solution can be found

* Disable HAVE_XDELTA on platforms where the build recently failed

- These come from looking at the failed builds on GitHub
- These are guesses, and may turn out to be wrong

* Fix a potential memory leak

- Whoops, looks like I need to call two cleanup functions
- xd3_close_stream exists separately from xd3_free_stream

* Split the --help printout for --xdelta into its own strlcat call

- GCC was complaining about #ifdefs within macro arguments being non-portable

* Fix some incorrect printf format specifiers

* Modify Xdelta to adhere to C89

- It's mostly using RetroArch's INLINE macro instead of the inline keyword

* Slight cleanups

* Remove a stray comma that was hindering C89 builds

* Add XDelta support to CHANGES.md

* Change how the xdelta patch's name is computed

- To be in line with other recent refactoring

* Fix an incorrect merge

- Whoops, this part was from before I figured out how to get the size of a patched file

* Explain the song-and-dance behind computing a patched file's size

* Define some XDelta3-related constants to 0 on 32-bit platforms

* Adjust some Xdelta-related macro definitions

- Exclude the encoder, since we're not making patches
- Move some #defines to after inclusion of <stdint.h>, to fix undefined behavior
- Remove _WIN32_WINNT overrides, since they were for code that we're not using

* Fix Xdelta support

* Wrap an encoder-only function in `#if XD3_ENCODER`
2023-11-23 20:19:07 -08:00
sonninnos 9b97b40566
Enforce swap interval 1 in menu if vsync is on + Restore menu_throttle_framerate option (#15889)
* Enforce swap interval 1 in menu if vsync is on

* Restore menu_throttle_framerate option
2023-11-10 18:40:02 -08:00
sonninnos 220caa5143
Remove menu_throttle_framerate option (#15850) 2023-10-31 09:58:47 -07:00
Ophidon ce6a00b495
High Hz Synchronization (#15798)
* High Hz Synchronization

Makes adjustment to driver_adjust_system_rates and related functions to handle Hz skew adjustment for high refresh rates better, especially when using effective refresh modifiers like swap interval or BFI.

* Reorder for Build Fix

Reorder declaration for build fix
2023-10-14 06:57:40 -07:00
sonninnos a256a504a8
Fix auto savestate path (#15055) 2023-03-03 23:16:20 +01:00
Joe Osborn 2125770236
Replay UI support (#15048)
* Add bsv replay controls (not yet fully implemented), remove toggle

see notes in task_movie.c, make sure command.c calls the right
functions, check retroarch.c and other todos.

bsv files are also now stored with states, not saves.

* Compilation fixes

* Added command impls for play and record replay, and some code in load state to do the right thing there

* Guard some parts of the new code with HAVE_BSV_MOVIE

* wip, menu fixes

* more menu fixes, osd for movie errors, halt recording properly

* Menu and label fixes

* move bsvs to own file suffix series under savestates, fix recording and playback command validity checks

* Fix replay autoincrement

* fix endif placement, whoops

---------

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-03-03 00:52:22 +01:00
Joe Osborn d0ca2384c5
Add LOAD_STATE_SLOT N command to stdin/network protocol (#15010)
* Add LOAD_STATE_SLOT N command to stdin/network protocol

* Style fixes

---------

Co-authored-by: Joseph C. Osborn <jcoa2018@pomona.edu>
2023-02-24 23:04:39 +01:00
sonninnos f421194974
Pause + hotkey + runloop related changes (#14879) 2023-01-21 01:17:47 +01:00
libretroadmin f0c8008bda Split up runahead into its own file(s) - runahead.c/runahead.h -
by Dwedit's request
2023-01-11 10:19:56 +01:00
neil4 7213aada8d
Add Preemptive Frames to Latency Settings (#14832) 2023-01-10 07:22:14 +01:00
libretroadmin 8a3686df58 Revert "Header cleanups - don't include retroarch.h everywhere"
This reverts commit 0e3b478f8c.
2023-01-08 09:05:46 +01:00
libretroadmin 0e3b478f8c Header cleanups - don't include retroarch.h everywhere 2023-01-08 08:56:57 +01:00
libretroadmin 5ac8cc0b6a * Rename retroarch_path_set_redirect to runloop_path_set_redirect
* move more retroarch path functions to runloop.c - because they
are related to the runloop state instead of retroarch state
2023-01-06 21:21:31 +01:00
libretroadmin 5debb7a622 Rewrite runloop_set_frame_limit 2023-01-06 20:59:15 +01:00
libretroadmin 5bac2b0204 Cleanups 2023-01-05 23:34:46 +01:00
libretroadmin 27611288c0 Rename retroarch_get_current_savestate_path and retroarch_get_entry_state_path
to runloop_{function_name}
2022-12-29 02:13:31 +01:00
LibretroAdmin f5133d8cc4
Revert "Add Xdelta support for softpatching (#14706)" (#14743)
This reverts commit aaad220836.
2022-12-19 03:29:46 +01:00
Jesse Talavera-Greenberg aaad220836
Add Xdelta support for softpatching (#14706)
* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Add xdelta in deps

* Include <assert.h> in xdelta3.h

- Otherwise the static_assert calls can fail

* Build xdelta3 in Makefile.common

* Add xdelta support to the softpatching infrastructure

- The patching itself isn't fully implemented yet

* Adjust how xdelta3.h checks the sizes of some types

- Now checks max values instead of relying on autotools

* First crack at xdelta softpatching support

- There may be undiscovered edge cases or bugs

* Remove trailing commas from the enums I modified

- C89 doesn't allow them

* Remove stray whitespace

* Adjust SIZE macros in xdelta3.h

- Move them outside the XD3_USE_LARGEFILE64 block
- Add more SIZE declarations
- Make SIZEOF_UNSIGNED_LONG_LONG contingent on the presence of ULLONG_MAX

* Add some RARCH_DBG calls for xdelta patching

* Enable support for xdelta's secondary compressors

- Necessary for some patches

* Fix some format specifiers

* Remove unnecessary files from xdelta

* Include xdelta3.h with a relative path

* Add xdelta3 headers to HEADERS variable

* Gate Xdelta support behind HAVE_XDELTA

- HAVE_XDELTA is on by default
- HAVE_PATCH is still required for HAVE_XDELTA to be meaningful
- Support is mostly contingent on the availability of LZMA
- Anything modern should be okay
- Legacy platforms (e.g. DOS) may need to have Xdelta support disabled
- At least until some other solution can be found

* Disable HAVE_XDELTA on platforms where the build recently failed

- These come from looking at the failed builds on GitHub
- These are guesses, and may turn out to be wrong

* Fix a potential memory leak

- Whoops, looks like I need to call two cleanup functions
- xd3_close_stream exists separately from xd3_free_stream

* Split the --help printout for --xdelta into its own strlcat call

- GCC was complaining about #ifdefs within macro arguments being non-portable

* Fix some incorrect printf format specifiers

* Modify Xdelta to adhere to C89

- It's mostly using RetroArch's INLINE macro instead of the inline keyword
2022-12-19 01:10:04 +01:00
libretroadmin cc3169febe (runloop) Cleanups 2022-11-21 19:11:55 +01:00
libretroadmin 6815383113 * Create runloop_state_free (instead of duplicated code lines in
retroarch.c and runloop.c
* Turn a whole bunch of unctions in runloop.c static as a consequence
2022-11-21 17:45:39 +01:00
LibretroAdmin 18ea6fa81e Turn more boolean variables into flags for runloop
- Get rid of RARCH_CTL_IS_INITED, use runloop_get_flags instead
2022-10-24 18:16:00 +02:00
LibretroAdmin e62abac647 Add BSV movie flags 2022-10-15 14:32:26 +02:00
sonninnos bbd6c0ae9a
Add delay to savestate notifications (#14514) 2022-10-15 11:29:07 +02:00
LibretroAdmin cc3a339011 (Runloop) Use more flags 2022-10-10 19:54:54 +02:00
LibretroAdmin 2371e5cbd2 (Runloop) Turn more bools into flags 2022-10-10 18:53:55 +02:00
LibretroAdmin d100e73780 Use more runloop flags 2022-10-10 08:59:27 +02:00
LibretroAdmin 076a1a398c (Runloop) Turn some boolean variables into flags 2022-10-10 04:37:17 +02:00
Cthulhu-throwaway 2d1c238c1d
Special functions for core serialization (#14317) 2022-08-13 02:24:28 +02:00
libretroadmin cd36af1d24 Use NAME_MAX_LENGTH for some char array variables that have a fixed
width of 256
2022-07-03 13:59:23 +02:00
barbudreadmon e9d67f2bbe
savestates: implement an api call for context awareness (#14101) 2022-06-30 10:45:59 +02:00
jdgleaver 801b16885e Enable automatic configuration of 'VSync Swap Interval' 2022-05-12 14:22:46 +01:00
jdgleaver a953b27614
Rework optional fast-forward frame skipping: Drop frames based on frame timing (#13578) 2022-01-31 16:32:17 +01:00
Tony 84f558db0b
Add optional frame skipping when fast-forwarding (#13550) 2022-01-26 18:30:33 +01:00
Tilman M. Jaeschke 682bbab233
[New Feature] Load save states from command-line or playlist (#13354)
* load save states from command-line or playlist

* load save states from command-line or playlist

* removed some brackets
2021-12-14 14:08:06 +01:00
Autechre 5bb4df3a42
Move translation task code to tasks/task_translation.c (#13274) 2021-11-22 15:19:20 +01:00
twinaphex 9982452c18 Move code from retroarch.c to runloop.c 2021-11-22 03:33:58 +01:00
Autechre 2b87cd9313
Create runloop.c and split up runloop code to this new file; (#13269)
* Create runloop.c and split up runloop code to this new file;
retroarch.c now 207Kb and runloop.c 301Kb

* Define empty runloop_secondary_core_destroy
2021-11-22 03:27:23 +01:00
twinaphex b3a1a769b9 Move location state and camera state out of retroarch.c 2021-11-11 07:43:49 +01:00
twinaphex 0b768d0460 Split up recording code 2021-11-10 02:34:04 +01:00
twinaphex 174ab373e4 Move runloop prototypes to runloop.h 2021-11-10 01:22:32 +01:00
twinaphex f671ce4f8c Move global->name to runloop_st 2021-11-09 06:03:00 +01:00
twinaphex fe2c3a5310 Move state from retroarch_data.h over to retroarch.c 2021-11-09 05:16:51 +01:00
twinaphex c912619653 * Move port_map to runloop_state
* Get rid of p_rarch dependencies in functions
2021-11-05 22:03:13 +01:00
twinaphex c17bcb8d91 Move code from retroarch.c to video_driver.c 2021-11-05 02:53:58 +01:00
twinaphex e4ccc2508e Move code over from retroarch.c to video_driver.c 2021-11-05 02:33:22 +01:00
twinaphex f59b420fde * Move more code to command.c
* Buildfix for CTR/3DS
2021-11-03 21:59:58 +01:00
twinaphex aaad65538c Move rarch_patch_blocked to runloop_state, and get rid of
RARCH_CTL_IS_PATCH_BLOCKED
2021-10-30 11:15:45 +02:00
twinaphex c5688729c2 Move has_set_libretro_device to runloop_state 2021-10-29 18:24:19 +02:00
twinaphex 5477e34815 Move stray globals subsystem_data and subsystem_current_count to
runloop_state
2021-10-29 17:41:31 +02:00