3571 Commits

Author SHA1 Message Date
Stephen Miller
65f0b07c34 libkernel: Implement sceKernelEnableDmemAliasing, proper mapping type checks in posix_mmap (#3859)
* Basic handling for MAP_VOID, MAP_STACK, and MAP_ANON in mmap.

* Update memory.cpp

* Update memory.cpp

* Dmem aliasing check

* Oops
Pre-release-shadPS4-2025-12-08-65f0b07c34d0d0fe43bbcb25556741bb629b233e
2025-12-08 13:46:32 +02:00
kalaposfos13
2a5910ed51 New translations en_us.ts (OpenOrbis) (#3858) 2025-12-07 23:56:51 +02:00
Stephen Miller
391d30cbb1 cpu_patches: Patch stack canary accesses (#3857)
* Patch stack checks done using fs:[0x28]

Additionally adds support for multiple patches per instruction, since this makes two separate patches we need to conditionally perform for mov instructions.

* Missing include

* Disable patches for Apple

Mac can use their native FS segment directly, so these patches aren't needed

* Oops
2025-12-06 22:47:39 -08:00
TheTurtle
d3ad728ac0 vector_alu: Handle -1 as src1 in v_cmp_u64 (#3855) 2025-12-06 15:11:29 -08:00
Odukoya Abdullahi Ademola
5183cbe686 sceHttpUriSweepPath (#3854) 2025-12-04 10:50:24 +02:00
Odukoya Abdullahi Ademola
9e80cde60d Implement http uri escape unescape (#3853)
* Implement sceHttpUriEscape and sceHttpUriUnescape

* Implement sceHttpUriEscape and sceHttpUriUnescape

* edge case

---------

Co-authored-by: Pirky10 <odukoyaabdullah@gmail.com>
2025-12-04 10:50:01 +02:00
kalaposfos13
98fd0689ac Revert non-Linux parts of #3819 (#3852)
* Revert non-Linux parts of #3819

* More OpenOrbis stuff that I couldn't be bothered to put in a new PR
2025-12-03 15:05:19 +02:00
Lander Gallastegi
9db4642f66 video_core: Scheduler priority pending operation queue (#3848)
* Priority pending ops

* Use priority operations on image download

* clang-format

* Simplify thread

* I'm tired, it's too late :(
2025-12-02 22:27:01 +01:00
kalaposfos13
b135a056ba Remove debug logging 2025-12-02 09:50:11 +01:00
kalaposfos13
dc6013cf0e Block normal mouse inputs in mouse-to-touchpad mode
shadow sniped my PR. :(
2025-12-02 09:41:06 +01:00
Pirky
e5ea55e425 np: Add dialog state tracking for NpCommerce (#3841) 2025-12-02 10:22:41 +02:00
kalaposfos13
c3f7a4301c Add basic mouse-to-touchpad emulation (#3842) 2025-12-02 10:21:01 +02:00
Stephen Miller
a5f9280841 Return CPU mode based on param.sfo attributes (#3846)
Values are based on hardware observations.
2025-12-01 10:21:19 +02:00
kalaposfos13
cf866ab294 Don't bother trying to restart the emulator if sceSystemServiceLoadExec is called with an invalid path (#3845) 2025-11-30 22:40:58 +02:00
Connor Garey
052f3260f3 Sdl message box when no args provided (#3843)
* Added a message box when no arguments are passed.

* clang-fix

* clang-fix episode 2

* Output message box error to stderr instead of stdout
2025-11-30 19:57:14 +02:00
TheThunderTurner
78e301c3db libSceNpCommerce (#3839)
* libSceNpCommerce

* copyright notice
2025-11-29 23:47:15 +02:00
psucien
a9f8eaf778 video_core: Initial implementation of pipeline cache (#3816)
* Initial implementation

* Fix for crash caused by stale stages data; cosmetics applied

* Someone mentioned the assert

* Async blob writer

* Fix for memory leak

* Remain stuff

* Async changed to `packaged_task`
2025-11-29 11:52:08 +02:00
Quang Ngô
f9ef57f74b Fix metainfo (#3834) 2025-11-28 18:36:11 +02:00
squidbus
1394852791 renderer_vulkan: Remove primitive restart disable support check. (#3827) 2025-11-24 23:51:39 -08:00
Stephen Miller
6295c32e5c Render.Recompiler: Implement V_FLOOR_F64 (#3828)
* VectorFpRound64 decode table

Also fixed definition for V_TRUNC_F64, though I doubt that would change anything important.

* V_FLOOR_F64 implementation

Used by Just Cause 4

* Oops

Never forget your 64s
2025-11-24 23:51:06 -08:00
TheTurtle
14d71a155a video_core: Reimplement inline data as buffer fill (#3825) 2025-11-24 23:25:22 +02:00
kalaposfos13
2577dfde7e Add assert on SFO file being empty (#3815) 2025-11-23 17:30:09 -08:00
Missake
8123c44ad1 Make FSR off by default (#3801)
* Make FSR and RCAS off by default

* Update config.cpp
2025-11-23 17:28:48 -08:00
TheTurtle
f1a8b7d85e vector_alu: Fix V_CMP_U64 (#3823)
* vector_alu: Fix V_CMP_U64

* vector_alu: Also handle vcc in V_CMP_U64
2025-11-23 17:26:34 -08:00
Stephen Miller
f6ae5544fd Kernel.Vmm: Protect Fixes (#3822)
* Some mprotect fixes

The biggest thing here is preventing mprotect on memory that isn't mapped in address space. This would cause exceptions before, but succeeds on real hardware.
I've also included a couple other minor fixes, mostly based around some tests I recently performed.

Note: All changes to memory pools in this PR are assumed. I have not yet tested memory pools with any of this logic, but I do at least want to prevent mprotect on pool reserved memory to avoid crashes.

* Update memory.cpp

* clang
2025-11-22 10:32:53 +02:00
oltolm
4922d526fe msys2: fix build (#3818)
* cmake: fix mingw-w64 build

* time.cpp: fix build with Clang on Windows

* tls.h: include malloc.h for alloca
2025-11-22 10:32:29 +02:00
kalaposfos13
56109a1331 Avoid storing the Tcb pointer on the stack (#3819)
* Avoid storing the Tcb pointer on the stack

* Just return the already stored pointer in GetTcbBase

* Replace uses of GetTcbBase with g_curthread->tcb

* copyright 2025

* sir clang offnir, the all-formatting
2025-11-21 00:42:49 -08:00
Osyotr
544a22a431 emulator: crash faster (#2360)
By disabling Windows Error Reporting.
2025-11-20 22:35:35 +02:00
marecl
6612a32523 Prevent writing to directories (#3820)
* Prevent writing to directories

* Prevent writing to directories
2025-11-20 19:41:01 +02:00
TheTurtle
3f86c2e94a buffer_cache: Split DMA fault handling code from buffer cache (#3809)
Its better not to have that raw code there
2025-11-18 08:46:51 +02:00
Alexandre Bouvier
5b699090e6 cmake: fix sdl3_mixer target name (#3811) 2025-11-17 18:56:01 +02:00
TheTurtle
aa5c045555 logging: Format message after filter check (#3808) 2025-11-16 17:34:23 +02:00
rainmakerv2
ed14359c87 Re-implement custom trophy sounds using sdl3 mixer (#3805)
* re-implement custom trophy sounds using sdl3 mixer

* fix build vars

* Don't change SDL version
2025-11-16 10:36:54 +02:00
Missake
6a9f9abda0 Delete lines about Qt in building doc for Windows (#3800) 2025-11-14 21:48:04 -08:00
TheTurtle
2f55636626 vk_rasterizer: Attempt to optimize compute clears (#3795) 2025-11-15 07:44:25 +02:00
Stephen Miller
94d0f2e7ed Avoid initializing Shader::PsColorBuffer in RefreshGraphicsKey (#3799)
The bitfield in the struct is padded, which produces uninitialized memory on initialization.
To avoid modifying the struct while making our GraphicsPipelineKey struct properly hashable, set values directly instead of re-initializing.

This fixes pipeline compile spam, and the subsequent poor performance, on certain setups.
2025-11-14 19:50:14 -08:00
kalaposfos13
f557c6ac64 Update MoltenVK to the shadPS4 fork (#3797) 2025-11-14 21:47:16 +02:00
Stephen Miller
93c340c6e1 calloc libusb_interface instead of pointer (#3793)
interface->num_altsetting is oob
2025-11-12 17:26:26 +02:00
Joshua de Reeper
25344a3b89 calloc UsbDevice instead of pointer (#3790) 2025-11-12 12:40:39 +02:00
Missake
bbd985fe4b Update building-windows.md (#3792) 2025-11-11 16:56:03 +01:00
Stephen Miller
ee2bc97248 Windows: Limit address space maximum when higher addresses are not needed (#3775)
* Earlier initialization of elf info.

Everything used for elf info initialization comes from the param.sfo, so we can initialize this earlier to have this information accessible during memory init.

* Extract compiled SDK version from pubtoolinfo string

Up until now, we've been using the game's reported "firmware version" as our compiled SDK version. This behavior is inaccurate, and is something that has come up in my hardware tests before.

For the actual compiled SDK version, we should use the SDK version in the PUBTOOLINFO string of the param.sfo, only falling back on the firmware version when that the sdk_ver component isn't present.

* Store compiled SDK version in ElfInfo

* Limit address space for compiled SDK version at or above FW 3

Sony placed a hard cap at 0xfc00000000, with a slight extension for stack mappings. For now, though stack mappings aren't implemented, there's no harm in keeping a slightly extended address space (since this cap is lower than our old user max).

Limiting the max through address space is necessary for Windows due to performance issues, in the future I plan to properly implement checks in memory manager code to properly handle this behavior for all platforms.

* Use compiled SDK version for sceKernelGetCompiledSdkVersion

I think this is pretty self explanatory.

* Log SDK version

Since this value is what most internal firmware version checks are against, logging the value will help with debugging.

* Update address_space.cpp

* Update emulator.cpp

* Backwards compatible logging

Because that's apparently an issue now
2025-11-10 17:07:17 +02:00
Connor Garey
bebfee58d6 Nix shell fixes for uuid (#3784)
* added "with pkgs;" so pkgs does not need to be appended for all the buildInputs.

* Added util linux as missing uuid. Compiles successfully.
2025-11-08 19:08:18 -08:00
georgemoralis
5ddabda2b8 started 0.12.6 WIP 2025-11-07 09:16:58 +02:00
georgemoralis
3ce1ac5e86 tagged 0.12.5 release v.0.12.5 2025-11-07 08:59:26 +02:00
Emma
b4628b80e2 ImGui: keep drawing when there's a pending change_layer (#3782) 2025-11-06 20:58:15 -03:00
Emma
2f022a462d filesystem: return st_mtim in posix_stat (fixes RB4 / CUSA02901 DLC crash) (#3781)
* filesystem: return st_mtim in posix_stat

* filesystem: stat - remove reliance on clock_cast

* filesystem: stat - remove reliance on to_time_t
2025-11-06 22:47:40 +02:00
Joshua de Reeper
f5505daaca usbd: Emulate Dimensions Toypad (#3779)
* Dimensions Toypad

* update comment
2025-11-06 17:46:43 +02:00
Joshua de Reeper
8c1ec863da Add Infinity Base Backend (#3778) 2025-11-06 16:34:52 +02:00
kalaposfos13
604f8d9398 More OpenOrbis stuff (#3776) 2025-11-06 13:22:26 +02:00
Stephen Miller
19e974bf21 Libkernel: Implement/stub some functions (#3774)
* Define latest released firmware version, use that for sceKernelGetSystemSwVersion

I feel this is less hacky and error-prone than just returning the game firmware.

* sceKernelGetAllowedSdkVersionOnSystem

* sceKernelHasNeoMode

* sceKernelGetAppInfo stub

* sceKernelGetCurrentCpu

* fixups

* sceKernelGetMainSocId

Used by libSceAvPlayer to determine if console is a pro or not.

* Update process.cpp

* Set has_param_sfo to true

* Clang
2025-11-05 16:58:15 -08:00