Because the config is now parsed earlier than controller connection, we can no longer update the lightbar directly from the input config loading code, at least on startup. It's still used for mid-game input config reload though
* added method to retrieve all socket handles
* fixed some error codes
* copyright or kalaposfos will hunt me
* sceNetGetSockInfo added
* small fixups
* fixup
The ssa rewrite pass is based on the spirv-opt pass of the same name:
https://github.com/KhronosGroup/SPIRV-Tools/blob/main/source/opt/ssa_rewrite_pass.cpp
This commit brings the pass closer to that reference implementation.
Notably this fixes applying the pass to unstructured graphs which seems to be broken otherwise
Additionally the manual stack iteration of ReadVariable has been replaced with recusion
which is much easier to reason about
Undef handling has also been changed, before each block would define its own Undef instruction,
now the pass will keep track and reuse compatible instructions add insert them to the first block
Boot to black screen.
Fully booting.
Move runtime-deps to top scope.
Fully booting with reduced inputs.
Concat runtimeDeps to sdlConfigureDeps.
Removed duplicate packages in sdlConfigureDeps
Removed vulkan-loader and libX11 from runtimeDeps as not shared with
sdlConfigureDeps, moved directly into makeLibraryPath
Flatten lists before passing to makeLibraryPath
Formating.
* spirv: emulate GCN MSAA sample index wrapping in ImageRead
GCN hardware silently wraps out-of-range MSAA sample indices
(e.g. index 2→0, 3→1 on a 2x render target). Vulkan requires
valid sample indices and returns undefined values otherwise,
which corrupts neighbourhood min/max in the TAA resolve pass
and produces severe motion ghosting.
Fix by emitting OpImageQuerySamples + OpUMod to compute
ms %= actual_sample_count when the image is Color2DMsaa.
(Claude Code / deepseek-v4-pro)
* buffer_cache: add memory barrier before download copyBuffer
DownloadBufferMemory copies a GPU buffer into the download staging buffer
without any barrier between the compute dispatch that wrote the buffer
(SHADER_WRITE) and the vkCmdCopyBuffer that reads it (TRANSFER_READ).
The copy can therefore read stale L2 contents written before the
dispatch. This surfaced as all-zero readbacks of the cascade shadow
AABB ring buffer, which produced wrong split distances and flickering /
missing shadows.
Insert a pipelineBarrier2 before the copy, synchronising the whole buffer
from eMemoryRead|eMemoryWrite to eTransfer|eTransferRead.
(Claude Code · deepseek-v4-pro)
* buffer_cache: Stub HTILE zmask bits to uncompressed state on reads
* vk_rasterizer: Replace assert with warning
The assertion isnt actually useful at all but still keeping it as a log since its a rare case
* vk_rasterizer: Log invalid T# rejection
* vk_rasterizer: Reject T# with pitch smaller than width
* clang format
---------
Co-authored-by: Tdlife Peng <tdlief.peng@gmail.com>
* vk_rasterizer: Check T# validity before binding
* image_view: Clamp base layer to last layer
* memory: Lower clamp log to debug
* vk_rasterizer: Reject invalid data and number format enums
* Updated flake lock and removed abseilCPPSource input.
Removed abseilCppSource references.
Removed abseilCPPSource input from flake.lock, updated lockfile.
* Fixed Documentation which should be "releaseWithDebInfo" not "releaseWithDebugInfo"
The existing code was written before M0 was added to SSA rewrite pass
Avoid hardcoding the offset then and use the value directly
Co-authored-by: Tdlife Peng <tdlief.peng@gmail.com>
* Assert on attempting to load existing but invalid/corrupt executables
* Assert if guest apps actually use libc and libSceFio2 but they're absent
* Update wording if the main executable doesn't exist
* Rewrite signal emulation again
This time, use only one host signal as a communication primitive, instead of trying to map host -> guest signals to each other. This allows us to ignore host limits and emulate an arbitrary amount of signals at the cost of more manual bookkeeping. Hardware signals like SIGSEGV or SIGILL have their own logic, but ultimately also slot into the same backend.
i read way more man pages for this than one might think
* fix macOS
* well I guess we start fixing windows compile errors one by one
* more ifndef
* more ifndef
* this time for sure
* +
* let's see how much of this compiles
* -
* Propagate info and context in the non-hardware-signal path as well (might be subject to race conditions)
* small refactor
* Update SigDflHandler to preserve original access violation logging
* Populate _si_addr in guest siginfo and add basic Windows hardware signals
Also check if g_curthread is valid because host threads can also technically get a signal I guess
* Support modifying context on POSIX
* this isn't const anymore
* missed cast to void*
* Apparently this is valid for windows too, not sure if it works for anything other than the emulated hardware signals though
* fix windows build
* this is the last time I'll ever develop anything on a platform I can't (be assed to) compile for
* Make CallbackWrapper PS4_SYSV_ABI
* Initialize mc_rip in Ucontext's Windows constructor as well
* more Windows hardware signals
* openorbis defines strike again
* I'm never trusting OO with fucking anything ever again
* Fix non-signal-related asserts and unreachables just hanging the emulator by removing the handlers before executing the breakpoint
* factor out signal related defines into a header and add si_code-s
* NativeSiCodeToGuest
* Some reasonable default codes for Windows exceptions
* copyright 2026
* fix macos
* Check unlocked trophy count in the file the unlock state is actually saved to
* Ignore DLC trophies when checking for platinum unlock
* Delay the platinum popup to after the previous one has finished
* Update np_trophy.cpp
* Core: Load guest modules below 4 GiB
At the moment, modules are mapped starting from 0x800000000. This address
lies beyond the SYSTEM_MANAGED_MAX limit (0x7FFFFBFFF), so the modules end
up outside the system-managed area to which they belong, and no pointer to
them fits within 32 bits.
A title ported from PS3 may contain code that truncates an address to 32
bits, which is harmless on a real console because modules are mapped low,
but causes addressing issues here.
Let's map them starting from 0x80000000 as recommended by @raphaelthegreat.
* Core: Give executables and system modules their own load base
The previous commit moved everything to 0x80000000, system modules
included, which have no reason to be there. Split the base in three: an
executable asks for the bottom of the address space, a title's own modules
start at 0x80000000, and system modules stay at 0x800000000, where they
were.
Executables are told apart by their ELF type rather than by file name, so
that ET_SCE_EXEC and ET_SCE_DYNEXEC both land low.
Suggested by @StevenMiller123 and @red-prig.
* Core: Load executables at the game module base for now
Giving executables the bottom of the address space crashed some titles, so
put them back with a title's own modules at 0x80000000 until that is
understood. System modules keep their own base. With executables and game
modules sharing one, there is nothing left for the ELF type to tell apart,
so that test goes away too.
Reported by @StevenMiller123.
* Revert "Core: Load executables at the game module base for now"
This reverts commit c310dbc5bb.
The crashes behind it turned out to come from another PR, so executables go
back to the bottom of the address space, which is where Final Fantasy XII
needs them.
* started tus rewriting
* namespace fix
* initial implementation
* changed copyright until kalapsofos figure out
* more initial work
* synced proto file with shadnet tus changes
* stuctures update
* sceNpTusGetMultiSlotVariableAsync
* fixed structure
* clang always
* fixed structures
* sceNpTusSetMultiSlotVariableAsync
* fixed tus replies
* cleanups
* some more accurate ownerid handling
* ahh comon clang
* sceNpTusGetMultiSlotVariableAVUserAsync,sceNpTusSetMultiSlotVariableVUserAsync
* np_handler fixes
* clang chronicles part2
* added a few sync functions
* small cleanup
* improve abort requests
* FakeAsyncComplete
* fixed OrbisNpTusVariable and added some logging
* added sceNpTssCreateNpTitleCtxA
* sceNpTusSetMultiSlotVariableAAsync,sceNpTusGetMultiSlotVariableAAsync
* sceNpTusGetDataAAsync,sceNpTusSetDataAAsync
* sceNpTusGetDataAVUserAsync,sceNpTusSetDataAVUserAsync
* sceNpTusSetDataAVUserAsync
* improved debugging logging
* a lot more nptus commands (needs server side updated pr as well)
* ;/
* even more tus
* completed tus calls (still TSS partial but later)
* added crosssave tus
* clang
Apparently the C++ container classes generally aren't considered thread safe. As a result, PopPendingOperations could race with calls to DeferOperation, causing undefined behavior.
Also, missed this in my prior fix, but PopPendingOperations cannot race with the priority op runners, as they're using two separate queues. The reason my prior PR targetting this issue seemed like it helped was probably just because it prevented the GPU thread from running pending ops whenever priority runners were dealing with their priority ops.
* Allow libScePsmKitSystem LLE
Loaded and used by psmkit software (basically just Media Player). All this library does is return hardcoded paths to fonts, it's basically just libSceWkFontConfig, but for psmkit instead of webkit.
* Also add libSceBeisobmf and libSceBemp2sys to the list
Not too sure what these do, but they're not using any special libs, just basic libSceLibcInternal operations.
* Document libSceAvPlayer and libSceAvPlayerStreaming
These were added, but not mentioned in the readme. Though honestly, I think the list is large enough that we should probably just get rid of it and replace it with a blanket "put all libraries in sys_modules" statement.
* avplayer: allow LLE
* got rid of global picture info storage
* fixed vdec1 videos stuttering or not working
* vdec: pass opaque data correctly, use mem calc from vdec in vdec2
* uhh
* fixed half speed videos (don't ask why it works)
* final touchups