Commit Graph
4533 Commits
Author SHA1 Message Date
Marcin Mitura cc4dbd45bc core: Handle ELF metadata and toolchain comments program headers (#5480)
- Parse PT_INTERP and record interpreter dynamic linker path
- Parse PT_SCE_COMMENT and extract original compiler/toolchain build path
- Parse PT_SCE_LIBVERSION and log SCE SDK version
- Handle non-loadable metadata/flag segments (PT_GNU_STACK, PT_GNU_RELRO, PT_NOTE, PT_PHDR) to avoid false unimplemented type errors
2026-10-24 06:33:36 -07:00
Marcin Mitura 9d3524f53b video_core: Handle PM4 IT_GET_LOD_STATS packet (#5493)
Add PM4CmdGetLodStats packet definition and handle the opcode in graphics and compute queues to prevent crashes on unimplemented packets.
2026-10-24 06:32:17 -07:00
Marcin Mitura e04df2a613 cpu_patches: Workaround Rosetta 2 crash on VMASKMOVPS/PD (#5481)
Rosetta 2 panics with an EmulateForward error when a page fault occurs during AVX masked load or store instructions. This breaks games like God of War that rely on VMASKMOVPS and VMASKMOVPD near page boundaries.

Work around this on macOS by replacing both instructions with scalar branches and basic SSE/AVX operations.
2026-10-24 06:26:32 -07:00
Marcin Mitura de278985a8 shader_recompiler: Support GsOp::EmitCut in S_SENDMSG (#5487)
Handle EmitCut by emitting the vertex, ending the primitive, and adding the missing stream field to SendMsgSimm.
2026-10-24 06:24:25 -07:00
johulk 82eb7cdf64 core: use VMA pointers instead of copies in TryWriteBacking (#5491) 2026-10-24 06:19:39 -07:00
DanielSvoboda 396c2a09a3 audio3d: Fix swapped attribute ids (OpenAL) (#5501) 2026-10-23 22:24:12 -03:00
DanielSvoboda bab374ba8e audio3d: Fix swapped attribute ids (#5499) 2026-10-23 23:56:01 +03:00
Henrique Reis NevesandClaude Opus 5.5 91e6afa69b file_sys: don't abort when a guest path goes through a regular file (#5488)
On Linux and macOS, GetHostPath walks the host path looking for a
case-insensitive match. When a component of the guest path is a regular
file (e.g. stat("/data/file.txt/x") or "/data/file.txt/"), it built a
directory_iterator on that file without an error_code, which threw
std::filesystem::filesystem_error (ENOTDIR). Nothing catches it, so
open, stat, mkdir, rmdir, rename and sceKernelCheckReachability
terminated the emulator.

Use the error_code overload, like HostFsBackend::ResolveCaseInsensitive
already does. The search then finds no match and GetHostPath returns the
plain host path, which is what Windows always does.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 22:20:05 +03:00
Aleksandr Britvin eedf851ade texture_cache: Drop GPU-modified images whose untracked edges the guest overwrote (#5450) 2026-10-22 20:21:52 +02:00
Marcin Mitura 8a48cd0144 kernel: Implement posix_flock and sceKernelFlock (#5476)
- Implement advisory file locking with LOCK_SH, LOCK_EX, and LOCK_UN
- Support LOCK_NB returning POSIX_EWOULDBLOCK
- Synchronize locks per host path across open file handles
- Handle lock upgrade and downgrade on existing handles
- Automatically release held locks on close
- Add sceKernelFlock wrapper and register NID YDg-SQj66AQ
2026-10-22 09:04:23 +03:00
Marcin Mitura c206f35a54 music: Implement sceMusicPlayerServiceSetUsbStorageDeviceInfo (#5483)
- Add OrbisMusicPlayerUsbDeviceInfo matching 0x110 layout
- Validate parameters returning ORBIS_MUSIC_PLAYER_SERVICE_ERROR_INVALID_PARAMETER
- Define ORBIS_MUSIC_PLAYER_SERVICE_ERROR_* constants for module 0x12f
- Map USB serial numbers to /mnt/usb<device_id> for track URIs
2026-10-22 08:30:10 +03:00
Lander Gallastegi 8ad3f49258 chore: some random fixes (#5484)
* chore: some random fixes

* clang-format but 19

* texture cache hashing func is not thread safe
2026-10-22 08:29:57 +03:00
squidbus 617fe9e33f ci: Update clang-format and use ubuntu-latest more (#5485) 2026-10-22 08:28:15 +03:00
Junmin Lee 0918faa025 Gc2 readback regression fix (#5473)
* texture_cache: Hash GC baselines through the backing memory

* buffer_cache: Mark only the faulting range CPU modified on a write fault

* core: Remove the comment on HashBackingMemory

* core: Hash unbacked pages as zeros like CopySparseMemory

* texture_cache: Hash GC baselines through the backing page table
2026-10-21 21:31:28 +02:00
Marcin Mitura 52fa746979 kernel: Fix self-rename deletion and host path tracking in posix_rename (#5475) 2026-10-21 22:31:11 +03:00
Marcin Mitura 615bcba5e2 playgo: Fix language mask UB and default install speed (#5474)
- Fix undefined behavior in scePlayGoConvertLanguage with 64-bit shift
- Default chunk install speed to Full instead of Trickle
2026-10-21 05:58:51 -07:00
Marcin Mitura c2814041e5 app_content: Fix entitlement keys and service labels (#5471) 2026-10-21 04:50:37 -07:00
squidbus b6ea82c942 app_content: Populate add-on entitlement keys (#5472) 2026-10-21 04:19:51 -07:00
squidbus 6ac92e2d5f ci: Only cancel in progress if not a release build (#5470) 2026-10-21 14:13:59 +03:00
sstbrkbtk 60c42b925c app_content: Load additional content from linked services (SERVICE_ID_ADDCONT_ADD_n) (#5460)
* Allow file type identification for '/addcont' path

* Fix indentation and formatting in file_system.cpp

* Fix indentation for clang-format

* Enhance addon handling and entitlement validation

Refactor app_content.cpp to support multiple addon paths and entitlement checks.

* Refactor LoadLicenses to use string_view
2026-10-20 23:06:52 -07:00
artemkaVG f0ea8eb7e3 shader_recompiler: Handle HW_ID.SE_ID reads (#5459)
* shader_recompiler: Handle HW_ID.SE_ID reads

Support SE_ID and its one-bit slices as virtual shader engine zero.
Keep other hardware-register reads unsupported and use the normal
destination writer without modifying SCC.

* shader_recompiler: Extract S_GETREG_B32 handler

Move the instruction handler out of EmitFlowControl to match the other
instructions. Preserve the supported fields and generated IR.
2026-10-20 20:06:57 -07:00
d4gandClaude Opus 5.5 c1b2655835 shader_recompiler: info.has_derivatives.Assign now also checks for MimgModifier::CoarseDerivative (#5468)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 02:16:46 +03:00
nikmparis217-ux 5674bf7e5b core: Fix MemoryManager::Free unmapping past the released range (#5462) 2026-10-20 15:02:13 -07:00
nikmparis217-ux ad5dfc096b cpu_patches: Fix JIT patching at addresses outside any module (#5464) 2026-10-20 15:00:59 -07:00
Aleksandr Britvin b61f6c577e shader_recompiler: Add fast_shader_math setting to relax float rules (#5455) 2026-10-20 23:38:34 +03:00
nikmparis217-ux fec7684d7e gnmdriver: Fix remapped compute queues starting at a stale ring offset (#5463) 2026-10-20 23:23:28 +03:00
Douglas Barrantes Alfaro 8d50471b7d pad: Implement scePadReadExt and scePadReadStateExt (#5347) 2026-10-20 05:23:18 -07:00
Hog 57a56725a7 Add PT_SCE_MODULE_PARAM case (#5417)
* Add PT_SCE_MODULE_PARAM case in module.cpp

Added handling for PT_SCE_MODULE_PARAM in module processing.

* Add GetModuleParam method and module_param_virtual_addr
2026-10-20 05:01:58 -07:00
Henrique Reis Neves 9f1338188e emulator: stop clearing temporary data on boot (#5402)
sceAppContentTemporaryDataMount2 clears the folder when the game mounts
it with FORMAT (#5426). Clearing it on every boot also cleared it when a
game relaunches itself with sceSystemServiceLoadExec, which starts a new
emulator process: Yakuza 0 writes /temp0/es_sd.sdt, LoadExecs into an
arcade game and expects the file when it comes back (#4739).
2026-10-20 05:01:08 -07:00
İbrahim Polat 883c9bd6aa Fix build on Ubuntu 24.04 (#5395) 2026-10-20 04:56:31 -07:00
Henrique Reis Neves ab94de0eb6 kernel: return ENOENT from unlink when the file does not exist (#5393)
posix_unlink never checked that the path exists. For a missing file it
opened the host path, the open failed, IOFile::Unlink returned early
because the file was not open, and the call still returned 0. On the
console unlink(2) fails with ENOENT, so sceKernelUnlink should return
0x80020002. Check the path with MntPoints::Exists first, as
posix_truncate already does.

Also check for a null path before calling strlen on it, and report
EFAULT like the other path functions in this file instead of crashing.
2026-10-20 04:52:06 -07:00
Henrique Reis Neves 36f836f16d kernel: return EINVAL from ftruncate for bad lengths and read-only fds (#5401)
posix_ftruncate returned 0 for a negative length and for a descriptor
opened with O_RDONLY, because the result of SetSize was ignored, and it
returned EROFS for a directory. On the console ftruncate(2) fails with
EINVAL when the length is negative (checked before the descriptor) and
when the descriptor is not open for writing, which includes directories,
so sceKernelFtruncate should return 0x80020016 in those cases.

Check the length first like posix_truncate does, return EINVAL for
directories and read-only handles, and report EIO when SetSize fails.
2026-10-20 04:51:16 -07:00
Henrique Reis Neves 8b5ed6d09d kernel: return EBADF when writing to a file opened read-only (#5400)
write, writev and pwritev on a file opened with O_RDONLY returned -1
from HostFile::Write without setting errno, so callers saw a stale errno
and sceKernelWrite returned 0x80020000 (or whatever was left in errno).
writev and pwritev also added the -1 of every buffer to the total. On
the console write(2) fails with EBADF when the descriptor is not open for
writing, so sceKernelWrite should return 0x80020009.

Add File::IsReadOnly next to IsWriteOnly and check it the same way read,
readv and preadv already check IsWriteOnly.
2026-10-20 04:51:04 -07:00
Henrique Reis Neves d415c71bfe kernel: return ENOENT from mkdir when the parent does not exist (#5399)
posix_mkdir used fs::create_directories, so mkdir("/data/a/b") with no
/data/a returned 0 and created both directories. On the console mkdir(2)
only creates the last component and fails with ENOENT when the parent is
missing, so sceKernelMkdir should return 0x80020002. Use
fs::create_directory and report ENOENT in that case.

Also check for a null path before logging it and calling strlen on it,
and report EFAULT like posix_rmdir does, instead of crashing.
2026-10-20 04:50:46 -07:00
artemkaVG 6752d8b19e shader_recompiler: Handle buffer cache invalidation instructions (#5447)
Correct the operand-free metadata for BUFFER_WBINVL1 and
BUFFER_WBINVL1_SC and lower both to the existing device memory barrier.
2026-10-20 04:46:51 -07:00
Valdis Bogdāns f9d07487dd Fix global CE task scheduling (#5446)
Added:
- Global FIFO for CE tasks across graphics submissions.

Updated:
- CE/DE waits to yield through the scheduler.
- CE counter lifetime and GPU-idle tracking.
- Cleanup of pending and nested tasks during shutdown.

Removed:
- CE task ownership and counter resets tied to individual DCBs.

@raphaelthegreat requested global CE task ownership and a separate
change shared by the Horizon fixes.
2026-10-20 04:28:47 -07:00
BeneausVillach 699009c949 texture_cache: don't copy stale CPU-dirty image contents in ExpandImage (#5444)
* texture_cache: don't copy stale CPU-dirty image contents in ExpandImage

When the source image is CPU-dirty its contents are stale; copying them after RefreshImage overwrites the fresh upload. Only copy (and inherit GpuModified) when the source holds GPU-written data.

* Use HasGpuValidData()
2026-10-20 04:10:22 -07:00
Marcin Mitura e41215e79f kernel: Register missing filesystem symbols and fix /dev/null device (#5404) 2026-10-20 13:13:18 +03:00
sstbrkbtk 7c960eae13 Allow file type identification for '/addcont' path (#5448) 2026-10-20 00:41:51 -07:00
artemkaVG a808e7626e shader_recompiler: Accept S_SLEEP as a scheduling hint (#5445)
* shader_recompiler: Accept S_SLEEP as a scheduling hint

Treat the finite scalar scheduling delay as a no-op during functional
translation instead of rejecting shaders that contain it.

* shader_recompiler: Warn when ignoring S_SLEEP

Keep the scheduling hint visible in the log, matching other unsupported
flow-control hints.
2026-10-19 19:58:22 -07:00
artemkaVG a7fb1e73a3 file_sys: Report stable file identities in stat and fstat (#5309) 2026-10-19 18:24:05 -07:00
Baltazar Menvielle f68923fe80 net: report recv_queue_length in sceNetGetSockInfo (#5437)
FillSockInfo always left recv_queue_length at 0. Knowledge is Power
(CUSA08013) polls sceNetGetSockInfo on its PlayLink UDP sockets and
never calls recv while the queue reads empty, so incoming datagrams
from the companion app were never read. Fill it from FIONREAD for
host sockets.
2026-10-19 20:20:49 +03:00
Gih-pt d5ba5fd06c core/libSceVoice: stub a disconnected microphone to fix BO2 and BO3 hangs (#5421)
* voice: implement port state with no microphone connected

* voice: log errors on failure returns
2026-10-19 19:44:52 +03:00
artemkaVG 524be7c1d4 shader_recompiler: Exclude GetUserData from Phi folding (#5427) 2026-10-19 19:19:14 +03:00
artemkaVG 08225c2b35 shader_recompiler: Account for singleton dimensions in LDS barrier analysis (#5429) 2026-10-19 19:18:57 +03:00
johulk d3ff0e0cc2 texture_cache: keep subresource data when its parent image is first created (#5433) 2026-10-19 19:13:51 +03:00
Marcin Mitura d615b3887b Ajm: Auto-detect and safely parse RIFF headers for ATRAC9 (#5430)
* Ajm: Fix ATRAC9 RIFF header parsing and sample counting

* Ajm: Return fatal codec error on invalid ATRAC9 RIFF header
2026-10-19 13:37:08 +03:00
georgemoralis 7f6b94a107 np_auth rewrite (#5390)
* add proto command for authorizationCode retrieve

* update np_handler to parse auth code

* implementation for authorizationCode
2026-10-19 13:01:28 +03:00
Marcin Mitura 0ebea15c24 app_content: Implement TemporaryData mount and unmount (#5426) 2026-10-18 09:19:22 -07:00
squidbusandMarcin Mitura ba1320f38b app_content: Implement sceAppContentAddcontUnmount (#5423)
* app_content: Implement sceAppContentAddcontUnmount

* app_content: Avoid mount spam looking up add-on content

* Apply review suggestion

Co-authored-by: Marcin Mitura <mitura07@wp.pl>

---------

Co-authored-by: Marcin Mitura <mitura07@wp.pl>
2026-10-18 09:08:27 -07:00