* Various GetDents fixes
Fixed return and parameter types, and made the function return all the entries that will fit in nbytes during one call.
* Fstat dir stub changes
Changes the returned statistics to match what my PS4 tests generally show.
* Stat dir stub changes
To match my fstat changes
* cpu info
Update cpu_info.h
Revert "Update cpu_info.h"
This reverts commit 6db3814e7f8162ca546c33479942d7204524b281.
Revert "cpu info"
This reverts commit cfecdf694fd7bee0fdf025c3933ff7b9498a1c3f.
hardware info
* log OS
* Round RAM, add space
* switch temporarily to local fork
* Update CMakeLists.txt
* set shallow = true for submodule
* Log logical cores as well
* point submodule to shadps4 fork
Grand Theft Auto V uses sceKernelGetdents in a loop to search through the contents of /download0, but will always check the first returned directory entry regardless of what value the function returns.
As it turns out, this will never fail on real hardware because all directories have entries for . and .., while the game code throws an exception on shadPS4 because we don't emulate these entries.
From what I can tell, this is valid behavior since a user could choose not to enter a party.
This fixes a potential crash on boot in Grand Theft Auto V.
* Update app_content.cpp
* Use hyphenation to determine entitlement id from folder name
The original approach I took had two limitations: it relied on entitlement ids being 16 characters long, and it relied on the end of the folder name containing the entitlement. If the former wasn't the case, my code would throw an exception, while the latter would cause the DLC to not detect.
To resolve both issues, I've created a more robust algorithm based on observations from the most commonly used PS4 dumpers for modern firmware.
* Use DLC param.sfo to determine entitlement id
While the logic ends up slightly more complex, this makes the code more robust for other dumping methods/weird DLC folder names from people installing DLC manually.
* Update sceAppContentAddcontMount to properly detect additional content folders
Based on what I've done in sceAppContentInitialize, I've added code for detecting the correct folder to mount.
I've also removed the redundant check for addcont_info status, since we're marking all additional content as installed during sceAppContentInitialize
* video_core: Rework detiling
* video_core: Support tiling and macrotile detiling
* clang format
* image_info: Cleanups
* resource: Revert some changes
* texture_cache: Fix small error
* image_info: Set depth flag on depth promote
* buffer_cache: Remove level check
* tile_manager: Handle case of staging buffer causing flush
* image_info: Add 2D thick array mode
* image_info: Add slices to mip size
* tile_manager: Set bank swizzle
* buffer_cache: Support image copies from DmaData
* vk_rasterizer: Accelerate trivial render target copies with compute
Before tiling PR compute image copies were done with the following sequence
vkCmdCopyImageToBuffer (in SynchronizeBufferFromImage) -> vkCmdDispatch (copy) -> vkCmdCopyBufferToImage (in RefreshImage)
With the tiling PR it added extra tiling/detiling steps
vkCmdCopyImageToBuffer -> vkCmdDispatch (tiling) -> vkCmdDispatch (copy) -> vkCmdDispatch (detiling) -> vkCmdCopyBufferToImage
This is quite a bit of overhead for a simple image copy. This commit tries to detect trivial image copies i.e cs shaders that copy the full source image to all of the destination.
So now all this sequence is just a vkCmdCopyImage. How much it triggers depends on the guest
* texture_cache: Fix build
* image: Copy all subresources with buffer too
* select
* select for windows
* fixed windows only function
* windows error converts
* fixed up
* fixed compile
* another implementation for windows
* draft rewrite for windows
* implementation for windows
* added some debugging info
* more debugging
* extensive log
* Windows: Add device files to output fd_sets
Cyberpunk 2077 breaks without this.
Also added some formatting changes, to bring the implementation closer to our typical coding standards.
* Clang
* Formatting + cleanup
Removed some excessive logging used for debugging, and did some cleanup on the non-Windows implementation.
---------
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
Co-authored-by: Stephen Miller <millerste004@gmail.com>
* Changes
-Added support for OrbisImeParamExtended (extended IME parameters) in ImeHandler, ImeState, and ImeUi
-Updated all relevant constructors and logic to propagate and store the extended parameter
- Now fully supports passing extended options from sceImeOpen to the IME UI and backend
* Potential CUSA00434 [Debug] <Critical> assert.cpp:30 assert_fail_debug_msg: Assertion Failed!
buf_len + 1 <= buf_size && "Is your input buffer properly zero-terminated?" at C:/VS/shadPS4-ime-fixes/externals/dear_imgui/imgui_widgets.cpp:4601 fix
* Attempting to resolve an assertion failure in Diablo III:
- Adjusted buffer sizes
- Updated the calculation of text‑length values
* ime-lib another hotfix
Fixed incorrect param->title validation, which caused the IME dialog to fail to appear in Stardew Valley. Need to be checked.
* Clang fix
* FF9 ImeDialog Hotfix
* Removed the validation that disallowed null text and null placeholder, since using null values is valid in `ImeDialog`.
* Added additional debug logs to aid troubleshooting.
* IME Fixes
- Add missing flags to `OrbisImeExtOption`
- Improve debug logging
- Resolve nonstop `sceImeKeyboardOpen` calls in Stardew Valley (MonoGame engine) for `userId = 254`
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* Add stubbed libkernel time functions
* Implement remaining stubbed Rtc functions
* Move Rtc from the optionally HLE loading part to the always loaded part
* Remove Rtc from the README list of LLE modules
* Mfw last second hotfix I noticed while double checking that everything's good before opening the PR
* Changes
-Added support for OrbisImeParamExtended (extended IME parameters) in ImeHandler, ImeState, and ImeUi
-Updated all relevant constructors and logic to propagate and store the extended parameter
- Now fully supports passing extended options from sceImeOpen to the IME UI and backend
* Potential CUSA00434 [Debug] <Critical> assert.cpp:30 assert_fail_debug_msg: Assertion Failed!
buf_len + 1 <= buf_size && "Is your input buffer properly zero-terminated?" at C:/VS/shadPS4-ime-fixes/externals/dear_imgui/imgui_widgets.cpp:4601 fix
* Attempting to resolve an assertion failure in Diablo III:
- Adjusted buffer sizes
- Updated the calculation of text‑length values
* ime-lib another hotfix
Fixed incorrect param->title validation, which caused the IME dialog to fail to appear in Stardew Valley. Need to be checked.
* Clang fix
* FF9 ImeDialog Hotfix
* Removed the validation that disallowed null text and null placeholder, since using null values is valid in `ImeDialog`.
* Added additional debug logs to aid troubleshooting.
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* Use last 16 characters of DLC folder name to determine entitlement label
Code comments and commit name say it all.
* Clang
* Adjust comment
ftpdump appends -ac at the end of the entitlement label, so my comment was partially incorrect.
* Changes
-Added support for OrbisImeParamExtended (extended IME parameters) in ImeHandler, ImeState, and ImeUi
-Updated all relevant constructors and logic to propagate and store the extended parameter
- Now fully supports passing extended options from sceImeOpen to the IME UI and backend
* Potential CUSA00434 [Debug] <Critical> assert.cpp:30 assert_fail_debug_msg: Assertion Failed!
buf_len + 1 <= buf_size && "Is your input buffer properly zero-terminated?" at C:/VS/shadPS4-ime-fixes/externals/dear_imgui/imgui_widgets.cpp:4601 fix
* Attempting to resolve an assertion failure in Diablo III:
- Adjusted buffer sizes
- Updated the calculation of text‑length values
* ime-lib another hotfix
Fixed incorrect param->title validation, which caused the IME dialog to fail to appear in Stardew Valley. Need to be checked.
* Clang fix
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* Changes
-Added support for OrbisImeParamExtended (extended IME parameters) in ImeHandler, ImeState, and ImeUi
-Updated all relevant constructors and logic to propagate and store the extended parameter
- Now fully supports passing extended options from sceImeOpen to the IME UI and backend
* Potential CUSA00434 [Debug] <Critical> assert.cpp:30 assert_fail_debug_msg: Assertion Failed!
buf_len + 1 <= buf_size && "Is your input buffer properly zero-terminated?" at C:/VS/shadPS4-ime-fixes/externals/dear_imgui/imgui_widgets.cpp:4601 fix
* Attempting to resolve an assertion failure in Diablo III:
- Adjusted buffer sizes
- Updated the calculation of text‑length values
---------
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* Store platform-specific level in a separate variable
So the level logged in the getsockopt/setsockopt unreachable is actually useful in cases where the level is unknown.
* Define ORBIS_NET_IPPROTO_IPV6
Not implemented yet, but since it's known we might as well add it.
* Fix error codes
Our libSceNet code expects accurate ORBIS_NET_E* errors, while the sys_net code returns ORBIS_NET_ERROR_* errors.
* Remove duplicate getsockname implementation
* Use separate mutex for ReceivePacket calls
Calls to ReceivePacket shouldn't block other socket functions, and allowing them to block these functions frequently causes deadlocks in games that use multiple threads for socket behaviors.
That said, concurrent receives are still a potential issue, so the function should still have a mutex.
* Add missing error codes
* Clang
* Minor nit
Not sure why these were left separate from the rest of the net errnos
* Set __Error() in ConvertReturnErrorCode
Because the new error values are positive, the logic of "negative return is an error" doesn't work anymore. The easiest fix, while retaining corrected error values, is to just set __Error() in ConvertReturnErrorCode, and have that return -1 instead.
I also added some formatting fixes here too.
* Set errno on stubbed P2P socket error returns.
Otherwise the errno is just whatever was set by a previous failing function, which may cause issues in some games.
I used EAGAIN here since it appears to be valid for all three of these functions, but this can be changed if requested.
* Fix missed error returns
* Fix socket methods in file_system
Missed these
* initial commit - not cleanup yet, not usable with imGUI
* Ugly solution to working with ImGUI
* Populate the default controller labels
* Add remove default button
* missing tr calls
* edit imgui flag after updating
* Refactor
* Update sirit
* shader_recompiler: Remove remnants of old discard
Also constant propagate conditional discard if condition is constant
* resource_tracking_pass: Rework sharp tracking for robustness
* resource_tracking_pass: Add source dominance analysis
When reachability is not enough to prune source list, check if a source dominates all other sources
* resource_tracking_pass: Fix immediate check
How did this work before
* resource_tracking_pass: Remove unused template type
* readlane_elimination_pass: Don't add phi when all args are the same
New sharp tracking exposed some bad sources coming on sampler sharps with aniso disable pattern that also were part of readlane pattern, fix tracking by removing the unnecessary phis inbetween
* resource_tracking_pass: Allow phi in disable aniso pattern
* resource_tracking_pass: Handle not valid buffer sharp and more phi in aniso pattern