* Organize settings and fix defaults
setDefaultValues was missing several rather important config options, and some of the defaults were inaccurate.
* Set alternative settings based on defaults
Reduces how many times we redefine the defaults for each setting.
I avoided changing behavior for installDirs and installDirsEnabled because I don't want to introduce any changes I can't easily test.
* Run save after loading to fill in missing config entries
A fix for the growing complaints about config files not updating when new settings are added.
Thanks to the prior changes, default settings are new properly defined everywhere, so running save here will properly fill in missing values with their expected defaults instead of the weird settings load would sometimes use.
* Clang
* Only update config when necessary
Instead of updating the config on each emulator boot, calculate the number of entries stored in the config and compare to a hardcoded constant.
If the config doesn't have the right number of entries, then regenerate it.
* Clang
* Clang
* buffer_cache: Fix various thread races on data upload and invalidation
* memory_tracker: Improve locking more on invalidation
---------
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
* vector_alu: Improve handling of mbcnt append/consume patterns
The existing implementation was written to handle a single pattern of mbcnt before the DS_APPEND instruction
v_mbcnt_hi_u32_b32 vX, exec_hi, 0
v_mbcnt_lo_u32_b32 vX, exec_lo, vX
ds_append vY offset:4 gds
v_add_i32 vX, vcc, vY, vX
In this case however the DS_APPEND is before the mbcnt pattern
ds_append vX gds
v_mbcnt_hi_u32_b32 vY, exec_hi, vX
v_mbcnt_lo_u32_b32 vZ, exec_lo, vY
The mbcnt instructions are always in pairs of hi/lo and in general are quite flexible. But they assume the subgroup size is 64 so they are not recompiled literally. Together with DS_APPEND they are used to derive a unique per thread index in a buffer (different from using thread_id as order could be random). DS_APPEND instruction works on per subgroup level, by adding number of active threads of subgroup to the GDS counter, essentially giving a multiple-of-64 base index to all threads. Then each thread executes the mbcnt pair which returns the number of active threads with id less than the itself and adds it with the base.
The recompiler translates DS_APPEND into an atomic increment of a storage buffer counter, which already gives the desired unique index, so this pattern is a no-op. On main it was set to zero as per the first pattern to avoid altering the DS_APPEND result. The new handling passes through the initial value of the pattern instead, which has the same effect but works on either case.
* vk_rasterizer: Always sync DMA buffers
* Added V_CMP_EQ_U64 shader opcode support and added 64-bit relational operators (<,>,<=,>=)
* Fixed clang-format crying because I typed xargs clang-format instead of xargs clang-format-19
* Replaced V_CMP_EQ_U64 code to match V_CMP_U32 to test
* Updated V_CMP_U64 for future addons
* Remapping GUI V2 - initial commit
* Unmap button with escape key
* Allow combination inputs
* Use separate class for SDL event signals so that i can work with the SDL window event loop
* Automatically pause game when GUI open to better manage event queue
* Move sd;_gamepad_added event from remap object to GUI object to avoid conflicts with sdl window
* Use signals on button/trigger to release to make GUI more responsive
* pause game while KBM window is open for consistency
* don't check gamepad when game is running to avoid conflicts
* Block all other sdl events instead of pausing game, automatic parse inputs after saving
* Don't block window restored or window exposed cases
* Properly exit event loop thread on exit
* Changed symbol bindings to their names
* Fixed kakposfos' requests on GitHub
* Fine, I'll do it myself.
---------
Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
Older games aren't fond of how our sceVideodec2GetPictureInfo implementation outputs AVC picture info after the struct size increase.
Adding the old struct, and additional code using it for these games works around this problem.
* shader_recompiler: Simplify dma types
Only U32 is needed for S_LOAD_DWORD
* shader_recompiler: Perform address shift on IR level
Buffer instructions now expect address in the data unit they work on. Doing the shift on IR level will allow us to optimize some operations away on common case
* shader_recompiler: Optimize common buffer access pattern
* emit_spirv: Use 32-bit integer ops for fault buffer
Not many GPUs have 8-bit bitwise or operations so that would probably require some overhead to emulate from the driver
* resource_tracking_pass: Fix texel buffer shift
* Favorites in the game list (#2649)
Changed how favorites are saved to match PR #2984. Adjusted the favorite
icon size. Fixed bug where favorites were inconsistent when changing to
list mode. Instantly sort list when adding or removing a favorite.
Co-authored-by: David Antunes <david.f.antunes@tecnico.ulisboa.pt>
* fix formatting
* Favorites in the game list (#2649)
Fixed issue where background change was inconsistent while adding
favorites, unselect row when adding favorites, cleaned code, changed
right click menu options to match the game's favorite status.
* fixed right click bug
* keep row selection when adding favorites
* fixed sorting on game grid after using search bar
* change the way favorites are saved to match #3119
* Validate requested dmem range in MapMemory
Handles a rare edge case that only comes up when modding Driveclub
* Specify type
auto has failed us once again.
* Types cleanup
Just some basic tidying up.
* Clang
* fixed nonload issues with background music (#3094)
* Fixing my pull request branch
* Pull request change part 2
* Continued changes to project and altered kbm_help_dialog.h text to QStringLiterals
* Finalized commit and changed kbm_help_dialog.h
* KBM Input Bug Fixes / Added Binds
Fixed input issues where some inputs would not bind when pressing (side mouse buttons, some symbols, etc). Also, fixed up code formatting in altered files (removed C-style casts and replaced with C++ <static_casts>, added a few macros and one member functions).
This is v2 of my commit, addressing all issues brought up by @kalaposfos
* Updated C-style casts in kbm_gui.cpp
* Fixed formatting from clang-format
* Updated expendable sections location and changed order of appearance
* Merged PR #3098 into kbm_gui.cpp
* Updates from running clang-format
* Potential MacOS error fix
Changes std::string to std::string_view, which prevented MacOS from building
* Undid MacOS commit for new PR
* Revert "Undid MacOS commit for new PR"
This reverts commit fc376c5e1f.
* Updated SDL_INVALID_ID=UINT32_MAX macro to SDL_UNMAPPED=UINT32_MAX-1
* Update from merge conflicts
Updated SDL_INVALID_ID=UINT32_MAX macro to SDL_UNMAPPED=UINT32_MAX-1
* FIxed memory.cpp errors from testing PR #3117 (MacOS fixes)
* Removed "kp;"
* Fixed help dialogue from kalaposfos' changes
Fixed 3 edits made by kalaposfos from a recent commit.
---------
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
* Rework framework to allow for more types of mouse-to-something emulation and hook up gyro to it
* Remove the unnecessary null check now that deltatime is handled differently
* Fix toggle key
* Basic gyro emulation working for two out of the three dimensions
* clang
* Added bindable key to hold for switching from looking to the sides to rolling
* documentation
* Bit array test
* Some corrections
* Fix AVX path on SetRange
* Finish bitArray
* Batched protect progress
* Inclusion fix
* Last logic fixes for BitArray
* Page manager: batch protect, masked ranges
* Page manager bitarray
* clang-format
* Fix out of bounds read
* clang
* clang
* Lock during callbacks
* Rename untracked to writeable
* Construct and mask in one step
* Sync on region mutex for thw whole protection
This is a temporary workarround until a fix is found for the page manager having issues when multiple threads update the same page at the same time.
* Bring back the gpu masking until properly handled
* Sync page manager protections
* clang-format
* Rename and fixups
* I fucked up clang-formatting one more time...
* kek