Commit Graph
14017 Commits
Author SHA1 Message Date
Digote 24c163b5de feat(shader): support S_CLAUSE scheduling hints 2026-09-28 17:27:11 -03:00
boykopovar 49a78191e6 Merge pull request #99 from boykopovar/fix/libcohtml-cmake-rule
fix(libcohtml): fix build libcohtml with target libs on linux
2026-09-28 23:25:45 +03:00
boykopovar 46382612cb fix(libcohtml): fix build libcohtml with target libs o linux 2026-09-28 23:15:22 +03:00
boykopovar 00261033fa refactor(docs): separated user and dev in docs + compatibility file 2026-09-28 22:58:17 +03:00
SamG-Coder d70d7ca268 feat(kernel): deliver plain-text notification requests to host output 2026-09-29 05:14:56 +10:00
SamG-Coder 86401fe5ab feat(shader): support scalar 64-bit reverse and arithmetic shift 2026-09-29 05:09:29 +10:00
boykopovar dee7ecb3d8 Merge pull request #27 from QDarkRex/refactor/kernel-error-header
refactor(kernel): share SCE kernel error codes through KernelErrors.hpp
2026-09-28 22:07:32 +03:00
boykopovar 14a6d28cce Merge pull request #90 from adriadam10/ci-conflict-label
ci: label pull requests that conflict with main
2026-09-28 21:53:51 +03:00
boykopovar 4e418f1c98 Merge pull request #91 from adriadam10/ci-area-labels
ci: label pull requests by area
2026-09-28 21:53:10 +03:00
boykopovar fac193057c Merge pull request #41 from adriadam10/ci-build
ci: build and test on Linux and Windows
2026-09-28 21:50:51 +03:00
boykopovar 4c6a929657 Merge pull request #89 from adriadam10/pr-template
docs: add pull request template with the review checklist
2026-09-28 21:45:35 +03:00
boykopovar 8ccfbb9fe6 Merge pull request #95 from boykopovar/fix/tests-agc-main
Fix/tests agc main
For tests:
- `agc_driver`
- `agc_driver_flip`
- `agc_driver_pm4`

Fixed dispatch error propagation and updated checks for asynchronous suspend points and memory synchronization. All 54 tests pass with these changes, restoring a passing test suite on `main` after merge.
2026-09-28 19:39:59 +03:00
boykopovar 829e8c14ae fix(tests): align agc flip waits and memory synchronization checks 2026-09-28 19:32:43 +03:00
boykopovar 1f595d883a fix(agc): propagate dispatch worker failures to waiting threads 2026-09-28 19:29:49 +03:00
boykopovar 53bda68c2b Merge pull request #11 from adriadam10/main
feat(tools): progress map and pull request progress reports
2026-09-28 18:50:00 +03:00
boykopovar 5b4c9c6f73 Merge branch 'main' into main 2026-09-28 18:45:15 +03:00
boykopovar 87633fc4e8 chore(tools): move progress.py description from repo to pr 2026-09-28 18:42:44 +03:00
boykopovar 417b66323f chore(readme): remove dup progress map info from readme 2026-09-28 18:39:17 +03:00
boykopovar f105cb9bdf Merge pull request #94 from boykopovar/fix/black-frame-blick
fix(agc): preserve  inputs for deferred  buffer copies
Closing the display window now requests a normal exit instead of calling std::terminate(). Shutdown cancels queued work, wakes blocked waits, joins GPU workers and background helpers, and releases GPU resources before destroying the window on its owning thread. Shutdown cancellation is handled separately from runtime errors.
2026-09-28 18:35:41 +03:00
boykopovar 39fd90b050 fix(kernel): orderly shutdown when closing the display window 2026-09-28 18:30:34 +03:00
boykopovar 143aec54c2 fix(agc): preserve inputs for deferred buffer copies 2026-09-28 18:08:09 +03:00
Adrià Franch 682fb3d73c ci: time out hung tests 2026-09-28 16:40:34 +02:00
adriadam10andClaude Opus 5.5 5ad7c5793a ci: build and test on Linux and Windows
Builds with tests enabled and runs ctest on every push to main and every
pull request: GCC on Linux, and on Windows the MinGW-w64 winlibs GCC
15.2.0 toolchain required by the README. ccache and the toolchain are
cached, and only pushes to main save the ccache, so pull requests reuse
it without evicting it.

Windows build steps run in cmd because Git Bash puts its own mingw64 DLLs
first in PATH, which breaks build tools such as nid_patcher that link
libstdc++ dynamically.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-28 16:40:34 +02:00
Adrià FranchandClaude d074f6e36f docs: link the pull request template to the contributing guide
Co-Authored-By: Claude <[email protected]>
2026-09-28 16:06:33 +02:00
Adrià FranchandClaude d8db8192b4 ci: label pull requests that conflict with main
Co-Authored-By: Claude <[email protected]>
2026-09-28 15:50:48 +02:00
Adrià FranchandClaude a8e48f48aa ci: label pull requests by area
Co-Authored-By: Claude <[email protected]>
2026-09-28 15:50:48 +02:00
Adrià FranchandClaude Opus 5.5 b4c1887752 docs: add pull request template with the review checklist
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-28 15:42:29 +02:00
boykopovar c6a3e25573 Merge pull request #88 from boykopovar/fix/static-link-nid-patcher
fix(nid): always static linking for nid patcher
Using static linking of the standard library for nid patcher.
2026-09-28 16:38:06 +03:00
boykopovar 8e78ea0c28 fix(nid): always static linking for nid patcher 2026-09-28 16:28:11 +03:00
boykopovar 7b81a4de3d Merge pull request #87 from boykopovar/fix/build-test-json2fiber
fix(build): link json and fiber tests with libc
Fix test linking by adding `libc` to the `guest_json_tests` and `fiber_tests` link dependencies, resolving the missing `__gxx_personality_v0` symbol.

Ran all 54 CTest tests in. The build was successful.
Currently **50 passed, 4 failed**.
`guest_json` and `fiber` passed.

The following tests failed with code `0xc0000139`:

- `agc_driver`
- `agc_shader_memory`
- `agc_driver_flip`
- `agc_driver_pm4`
2026-09-28 14:25:12 +03:00
boykopovar 64732a64b6 fix(build): link json and fiber tests with libc 2026-09-28 14:18:35 +03:00
boykopovar d65a8ee633 Merge pull request #74 from SamG-Coder/main
fix(shader): support byte permutation and fix compiler lifetime bugs
Adds `V_PERM_B32` byte selection and fixes two existing bugs exposed while testing it: IR equality could merge buffer reads with different metadata, and concurrent shader compilation could crash during Windows thread-local destruction.

- Include instruction flags when comparing IR values so selections between different buffer offsets survive constant folding.
- Decode RDNA2 opcode `0x344` and translate all byte selectors through existing integer IR and the SPIR-V backend, including sign replication, zero/ones fill, and overlapping destinations.
- Reuse the existing `HostThreadLocal` helper for six destructible compiler scratch objects. Add async worker/destructor checks to the existing lifetime test. Scratch storage remains reusable.
2026-09-28 13:51:18 +03:00
boykopovar 0fe554943a Merge pull request #73 from julienlgy/feat/lib-sce-mouse
feat(libSceMouse): implement stateful mouse API exports
Replace the libSceMouse stubs with an implementation that follows AnyPS5’s existing NID-based library integration. Mouse input comes from the host SDL event loop; this change does not add memory hooks or direct access to console HID devices.

Manage the mouse handle, button state, timestamps, and a thread-safe, 64-event history in src/mouse_impl.cpp. Reads are non-blocking.

Forward relative motion, supported buttons, vertical scrolling, and horizontal scrolling from libSceVideoOut’s SDL event loop.

Release pressed buttons when the window loses focus without reporting a hardware disconnection.
2026-09-28 13:45:13 +03:00
OverkillLabsandClaude Sonnet 5 9673bce423 types: widen Ngs2WaveformBlock offset/size fields to 64-bit
PS5 grew Ngs2WaveformBlock's data_offset/data_size pair from 32-bit to
64-bit fields (40-byte record vs. the 32-byte PS4 layout). Standalone
correctness fix, unrelated to and non-conflicting with the pad work in
the preceding commits.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-28 13:43:40 +03:00
OverkillLabsandClaude Sonnet 5 1d245cbeb2 videoout: bridge SDL sensor/haptics to pad output alongside existing input-mapping flow
Reconcile our SDL gamepad motion/haptics work with upstream's
configurable keyboard/mouse binding feature (PadInput now built around
Pad::LoadInputMapping() and a std::vector<Pad::InputBinding>). Upstream's
openFirstAvailableController()/openController(deviceIndex) flow and
HandleEvent/Update/publish logic for keyboard, mouse, and wheel
bindings are kept as-is (including APS5_NO_PAD_INPUT handling); the
sensor-enabling and host-haptics steps are grafted on as additional
work done once a controller is open:

- openController(deviceIndex) now also calls enableSensors() and
  marks a re-apply of the current guest output request pending.
- New sampleController()/applyOutput()/enableSensors() bring in real
  gamepad sampling, motion sensor reads, DualSense touchpad finger
  tracking, and pushing rumble/light bar/adaptive trigger state out via
  SDL_GameControllerRumble/SetLED/SendEffect. sampleController()'s
  button list and trigger/stick scaling are an exact copy of the
  button/trigger/stick reading that used to be inlined in publish()
  under the SDL_GameControllerGetAttached check (no deadzone added,
  no extra button remapped) -- only the motion, touchpad, and
  device-kind sampling on top of it are new.
- Update() now also samples the controller and applies pending output
  every tick, in addition to upstream's SDL_GameControllerUpdate() call
  and its keyboard/mouse/wheel timing logic.
- publish() seeds PadInputState from the sampled gamepad state first
  (buttons/sticks/analog triggers/motion/touch/device kind), then
  layers upstream's keyboard/mouse binding loop on top exactly as
  upstream had it, so a bound key still overrides the gamepad the same
  way it did before this merge. Upstream's L2/R2 button-flag derivation
  is preserved, just computed once at the end from whichever value
  (gamepad or a keyboard/mouse override) ends up in analogButtonsL2/R2.
- The background-events SDL hint is now set unconditionally (previously
  only inside the "not yet initialized" branch), since upstream's own
  VideoOutDriver already brings up SDL_INIT_GAMECONTROLLER before
  PadInput is constructed, which meant the hint would never run.

No changes were needed in VideoOutDriver.cpp: PadInput lazily
initializes SDL_INIT_GAMECONTROLLER itself in
openFirstAvailableController() (already a no-op if the subsystem is up),
and the class's public interface (default-constructible, HandleEvent/
Update) is unchanged, so upstream's existing `PadInput padInput;` /
HandleEvent / Update call sites keep working without modification.
VideoOutDriver.cpp's own independent flip-queue/vblank-telemetry rework
was left untouched as out of scope.

Confidence: high for the keyboard/mouse binding path (untouched) and
for the gamepad button/stick/trigger path (byte-for-byte copy of the
pre-existing mapping); the new motion/haptics/touchpad code is novel
and builds/links cleanly but has not been run against real hardware.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-28 13:43:27 +03:00
OverkillLabsandClaude Sonnet 5 855176796b pad: real implementations for extended pad info/lightbar/trigger NIDs
Replace NotImplemented stubs with real implementations for
scePadGetInfo, scePadDeviceClassGetExtendedInformation/ParseData,
scePadGetExtControllerInformation, scePadSetLightBar,
scePadResetLightBar, scePadResetOrientation,
scePadSetMotionSensorState, scePadGetTriggerEffectState,
scePadSetProcessPrivilege, and scePadSetParticularMode, wiring them to
the new Pad:: output/orientation API. None of these NIDs are touched
by upstream's existing keyboard/mouse binding work, so this is a
clean additive change.

scePadSetVibration, scePadSetVibrationMode, and scePadSetTriggerEffect
are also given real implementations here, even though they were not
named in the audit's NID list: they are the only guest entry points
for the Pad::SetVibration/SetVibrationMode/SetTriggerCommand plumbing
added in the previous commit, so leaving them NotImplemented would
make the rumble/adaptive-trigger machinery unreachable from any title.

Every other previously-NotImplemented NID in this file (scePadGetHandle,
scePadSetAngularVelocityDeadbandState, scePadSetTiltCorrectionState,
scePadSetVibrationTriggerEffectWeakWhileEmbeddedMicInUse) is left
exactly as upstream had it; scePadOpen_nid_postfix, scePadRead_nid_postfix,
and scePadReadState are untouched (upstream's APS5_INVALID_ARG_EX
throw-based error handling is kept as-is, not replaced with plain
error-code returns).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-28 13:43:07 +03:00
OverkillLabsandClaude Sonnet 5 4c349efe4f pad: motion sensor and haptics state/output plumbing
Add PadTouchPoint, motion-sensor fields, and a Mahony gyro/accel
orientation filter to PadInputState/PadState; add PadOutputState and
PadTriggerRequest plus Pad::SetVibration/SetVibrationMode/SetLightBar/
SetTriggerCommand/ResetOrientation/SetMotionEnabled and
PadFetchOutput_nid_postfix for pushing rumble, light bar, and adaptive
trigger requests out to the host pad. PadInfo/device-type constants
needed by the extended pad info NIDs are added to Pad.hpp.

Upstream's own PadInputState addition (analogButtonsL2/R2) is kept and
the new motion/touch fields are layered on top rather than replacing
it. Reported acceleration is converted from the internal m/s^2 fusion
scale back to g (rest = 1.0 on the "up" axis), matching upstream's
existing acceleration_y = 1.0f convention for a pad without sensors.

PadPublishInput_nid_postfix keeps upstream's change-detection (skip
the update, and the reported timestamp, when nothing changed), extended
to cover the new motion/touch/deviceKind fields so a pad with live
sensors still republishes continuously. Pad::ReadState still throws
when called before scePadInit, as upstream did.

The pad_dump.txt debug logger and an unreferenced mouse-emulated
touchpad helper are intentionally not ported: both were dead code,
never invoked, in the source they came from.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-28 13:42:51 +03:00
boykopovar 0bbc29ee14 Merge pull request #76 from boykopovar/fix/frame-flicking
Fix/frame flicking
## Summary

Fixed corrupted frames caused by guest input buffers being overwritten before GPU execution.

## Cause

Draws referenced mutable guest memory. The CPU could overwrite an input buffer after the draw was recorded but before the GPU consumed it.

## Detection

Instrumentation compared input-buffer contents at draw recording and GPU execution. Corrupted frames contained mismatches in buffers used by affected draws; adjacent correct frames did not.

## Changes

The recorder now creates per-draw copies of read-only CPU input buffers and keeps them alive until GPU completion. Each draw uses descriptors referencing its preserved data.

Buffers with pending GPU writes remain on the existing path and are not copied from CPU memory.
2026-09-28 13:41:13 +03:00
boykopovar 9f1c680b38 fix(agc): preserve per-draw input buffer contents until gpu completion 2026-09-28 13:35:53 +03:00
OverkillLabs e629f37481 feat(libSceAvPlayer): implement full AvPlayer state machine
Replace the stub AvPlayer export set with a general-purpose player state
machine covering the full API surface: sceAvPlayerInit/InitEx/PostInit,
AddSource/AddSourceEx, Start/StartEx, Pause/Resume/Stop/Close, IsActive,
CurrentTime, JumpToTime, SetLooping, SetAvSyncMode, SetTrickSpeed,
SetAvailableBandwidth, StreamCount/EnableStream/DisableStream/ChangeStream/
GetStreamInfo(Ex), and GetVideoData(Ex)/GetAudioData.

No real decoder is wired up: the player tracks lifecycle and timing state
and serves a fixed-length blank clip on a wall-clock media clock, firing
the READY/PLAY/PAUSE/STOP event callbacks a title expects from a real
playback session. This is enough for titles that gate progression on
AvPlayer's polling/event surface rather than on decoded frame content.

The non-native libSceAvPlayer/Export.cpp now forwards to the native
implementation via #include rather than carrying its own duplicate stub
definitions, consistent with how other libSceX/libSceX.native pairs in
this tree share one implementation.
2026-09-28 13:29:23 +03:00
OverkillLabs 2e8c1096fd feat(libSceMsgDialog): real dialog state machine, auto-answer without UI
Replace the unimplemented stubs with a working NONE -> INITIALIZED ->
RUNNING -> FINISHED state machine for the message dialog PRX. Open()
best-effort parses the SceMsgDialogParam layout to pick a sensible
default button (auto-focus-no variants answer No, everything else
answers Yes/OK), then auto-finishes the dialog after a couple of status
polls so a title that waits on a dialog for user input never blocks
forever. Progress-bar mode is instead closed by the title itself via
sceMsgDialogClose, with a time cap as a safety net. GetResult now fills
in a real SceMsgDialogResult (mode/result/buttonId) instead of leaving
the caller's buffer untouched.
2026-09-28 13:28:49 +03:00
boykopovar 76f1d48e60 debug(agc): detect gpu input buffer changes between recording and execution 2026-09-28 13:27:14 +03:00
OverkillLabs cf202b352d Shader recompiler: SRT handle-invariance guard, BVH ray-query stub, rect-list interpolant truncation
- Optimization/SrtWalker/SrtPlanBuilder.cpp: PlanBuilder::Collect now requires
  RuntimeValidator(...).Run(inst) before folding an offset built from a Phi merging a
  constant on one path with a per-invocation value on another. Confirmed upstream's
  Collect is unchanged since the fork (still just offset->HasImmediate()), so a Phi
  that reports HasImmediate() on its constant edge alone could still be folded into
  the wrong, divergent SRT slot.
- RdnaDecoder + Translation: adds an IMAGE_BVH_INTERSECT_RAY (opcode 0xE6) decode path
  and a TranslationContext::imageBvhIntersectRay stub that reports a clean hardware
  miss (all result dwords 0xFFFFFFFF) instead of faulting on an undefined MIMG opcode.
  No BVH/ray-tracing support exists upstream at all, so this is an honest "not
  supported yet" stub, not a silent wrong answer.
- SpirvBackend/RectListShaders.cpp: raises the accepted spirvVersion ceiling to
  0x10500 and truncates excess fragment interpolants to the tightest per-vertex
  tessellation component limit instead of hard-refusing the whole rect-list draw.
  A rect-list draw is a tile clear, so a pixel shader's result comes from its
  constants and render target; truncated interpolants are simply left unwritten,
  which upstream's own "missing" (unexported) parameter handling already tolerates.

Dropped after checking against current upstream (both would be redundant or
out of scope):
- ResourcePlanKnownToFail / SpirvWords (Recompiler.cpp/hpp): upstream already has an
  equivalent mechanism for both. SourceEntry::planFailure (std::exception_ptr) already
  memoizes and rethrows a failed IrResourcePlan build, and RecompileResult::spirv is
  already the refcounted/hashed SharedSpirv class (see Recompiler.hpp), not a plain
  vector. Porting either would have added a second, competing mechanism.
- ScalarInstructions.cpp SAVEEXEC changes: skipped. The audit could only confirm 3 of
  6 64-bit SAVEEXEC cases were converted in the prior patch, which is a half-finished
  edit rather than a complete correctness fix; not safe to port without re-deriving
  sSaveexec()'s full semantics from scratch.
- ControlFlowInstructions.cpp vMovrelsB32/vMovreldB32 hardening (offset & 0xFF mask +
  kMaxM0RelativeWindow cap): skipped as optional per review; upstream's core fix for
  this file is otherwise already in place.
- All diagnostic-only stderr tracing (IrBuilderCore.cpp, ResourceTracker.cpp,
  ShaderInfoCollector.cpp, SrtDescriptorEvaluation.cpp, SrtEvaluator.cpp,
  SpirvMemoryInstructions.cpp) and the superseded Optimization/ResourceProgram.hpp
  API (replaced upstream by CaptureResources/SourceHandle/ResourceCapture): not
  ported, no functional change or already gone upstream.
2026-09-28 13:25:47 +03:00
OverkillLabs 0c41dc99d5 Agc: implement missing PM4 command-buffer opcodes (Jump/Rewind/Predication/MemSemaphore/CopyData/AtomicMem/DrawIndexMultiInstanced)
Fills in guest-facing sceAgc* entry points across Acb/Cb/DcbDraw/DcbFlow/DcbState/Misc
that were still stubbed with NotImplemented_nid_no_patch on current upstream, one layer
below upstream's Recorder rearchitecture:

- Command/Control.{hpp,cpp} (new): WriteJump, WriteRewind, WritePredication,
  WriteMemSemaphore helpers shared by the Acb/Dcb entry points below.
- Command/Memory.{hpp,cpp}: WriteCopyData, WriteAtomicMem helpers.
- Acb/Control.cpp: Jump/JumpGetSize, Rewind/RewindGetSize.
- Acb/Dispatch.cpp: DispatchIndirectGetSize.
- Acb/Memory.cpp: AcquireMemGetSize, CopyData(+Size), AtomicMem(+Size),
  AtomicGdsGetSize, PrimeUtcl2(+Size).
- Acb/Sync.cpp: CondExec(+Size), WaitOnAddressGetSize, EventWriteGetSize,
  QueueEndOfShaderActionGetSize, MemSemaphore.
- Cb/Dispatch.cpp: DispatchGetSize only (sceAgcCbDispatch itself left untouched --
  upstream's modifier mask 0xa038u|0x41u there is correct as-is).
- DcbDraw/DrawIndexed.cpp: DrawIndexMultiInstanced(+GetSize), still unimplemented
  even after upstream's own indexed-draw work.
- DcbFlow/Control.cpp: Jump, Rewind(+Size), and a real WaitUntilSafeForRendering that
  emits AgcDriver::RenderingWaitPacketHeader (recognized by the executor's fence wait
  in Driver.cpp) instead of upstream's plain-NOP stub, which the executor does not
  special-case.
- DcbFlow/Memory.cpp: AcquireMemGetSize, CopyData(+Size), DmaDataGetSize,
  AtomicMem(+Size), AtomicGdsGetSize, WriteDataGetSize.
- DcbFlow/Sync.cpp: CondExec(+Size), WaitOnAddressGetSize,
  StallCommandBufferParserGetSize, MemSemaphore.
- DcbState/Predication.cpp: SetPredication only (the file's 3 GetSize functions are
  left as upstream's diagnostic stubs, not real fixes).
- Misc/PacketInfo.cpp: sceAgcDcbGetSystemSoftwareVersion.

ABI correction: Command::WriteMemSemaphore takes the corrected 4-argument form
(address, waitForMailbox, signalType, operation). The Acb/DcbFlow sceAgc*MemSemaphore
entry points still expose the older (action, clientCode, address) guest signature;
their bodies now decode `action` into the signal/wait operation and the low two bits
of `clientCode` into signalType/waitForMailbox before calling the corrected helper.

Not ported (already superseded or out of scope per review): WriteMarker/WriteCustomNop/
WriteEventWrite/WriteCondExec/WriteDispatchIndirectAddress (duplicate upstream's
existing Marker/EventWrite/DispatchIndirect logic), Acb DmaData/DmaDataGetSize/
WriteData/EventWrite (already implemented upstream), DcbFlow EventWrite(+Size)
(upstream's version handles the 8-byte occlusion-address case more completely),
DcbDraw's other DrawIndex* entry points (already implemented upstream),
Misc/Trinity.cpp, Patch/WriteData.cpp, DcbState/Marker.cpp (all superseded by
upstream equivalents).
2026-09-28 13:25:15 +03:00
OverkillLabs cfe9a458cc kernel: direct-memory pool querying and module loader wiring
- DirectMemory: track each allocated block's type and extent in the
  physical pool (DirectMemoryBlock), splitting the record on a partial
  free, and expose DirectMemoryQueryBlock/DirectMemoryFreeRun. Wires
  sceKernelDirectMemoryQuery to answer with the real allocated range
  and type instead of a hardcoded one-page/type-3 guess, and
  sceKernelAvailableDirectMemorySize to report the actual free run
  instead of the whole remaining aperture. DirectMemory.cpp's mapping
  path already tolerates MAP_FIXED overlap into a registered range and
  already has honor-then-fallback address-hint handling and an
  ignored-flags mask, so it is unchanged here.
- MemoryPoolExport: implement sceKernelMemoryPoolBatch/Commit/Decommit/
  Expand/GetBlockStats/Reserve (previously all dead stubs) using the
  existing DoMprotect/DirectMemoryAlloc/DoReserveVirtual primitives and
  a small pool-state block counter.
- Module: wire sceKernelDlsym/sceKernelLoadStartModule/
  sceKernelStopUnloadModule to the existing host-module loader
  (dlopen_nid_postfix/dlsym_nid_postfix/dlclose_nid_postfix), replacing
  dead stubs. sceKernelGetModuleInfoForUnwind/FromAddr are unrelated
  and left as-is.
2026-09-28 13:18:25 +03:00
OverkillLabs 940f28d102 libc: wide-char formatting and precise sub-tick waits
- Add FormattingWide.cpp implementing vswprintf_nid_postfix and
  wprintf_nid_postfix, the only wide-char printf-family functions
  upstream had left as unimplemented stubs (Formatting.cpp's checked
  and unchecked narrow printf/scanf families are unaffected). Removes
  the dead vswprintf_nid_postfix stub from Export.cpp.
- Add PreciseWait.hpp: std::condition_variable::wait_for cannot return
  in under about one system tick on this MinGW toolchain regardless of
  the requested budget, even with NtSetTimerResolution; PreciseSleepUs
  uses a high-resolution waitable timer instead (~0.5ms vs ~15.6ms).
  Header-only for now: its guest-side callers (Equeue/EventFlag/
  Semaphore/AgcDriver wait loops) are out of scope for this change, so
  it is not wired into them here.
2026-09-28 13:18:07 +03:00
boykopovar 73e031a4dd perf(agc): downsample frame captures on GPU and queue disk writes 2026-09-28 13:06:15 +03:00
SamG-Coder 8cef034172 fix(shader): safely destroy compiler thread-local storage on Windows 2026-09-28 19:54:01 +10:00
OverkillLabs 77ed5e6d0c feat(savedata): mount aliasing, wildcard search, memory slots, async events
Rework the local SaveData implementation into a general-purpose, title-agnostic
backend used by both the native library and the standard libSceSaveData path:

- Directory aliasing: long save directory names are hashed into short mount
  point aliases (persisted to disk) so they fit the SDK's fixed-size mount
  point buffer, with the aliases reversed on directory search.
- Wildcard directory-name search (%/_ patterns) with sorting and optional
  reverse order, matching the DirNameSearch contract.
- Save-data "memory" slots: small per-user, per-slot blobs the title can
  set up, read and write without mounting a directory, backed by files under
  the save root with a companion parameter blob, size and range validation
  on every access, and a dirty flag consulted on commit.
- Async-flavored operations (backup, commit, memory sync) that queue
  SaveDataEvent records consumed through GetEventResult and can be bound to
  kernel event flags, plus transaction-resource and cancel/abort bookkeeping.
- Atomic file writes (temp file + rename) so a mid-write crash never leaves a
  torn save on disk, and corrected/duplicated SDK error code constants.
- Local storage app-status get/set/delete and transferring-mount support for
  PS4-to-PS5 style save transfers.

The native library keeps its own lighter-weight mount/memory implementation
(short "/_sm/<slot>" mount point aliases via the path-alias table) while
gaining the same per-user memory-slot separation, atomic writes and bounds
checking; the two implementations were merged by hand where upstream had
independently touched the native Export.cpp in the same area (backup/event
queue, short mount points) to keep both sets of improvements.

None of this is game-specific: it is a general local save-data backend that
works for any title and tolerates any user id.
2026-09-28 12:48:09 +03:00
OverkillLabs 3230352202 feat(net): offline socket/epoll/resolver stack with FreeBSD errno mapping
libSceNet: replace the always-fail stubs with a real offline network
stack. Sockets, epoll instances, memory pools and resolvers are tracked
in proper registries with create/destroy lifecycles; bind/listen/accept/
connect/send/recv/getsockopt/setsockopt/getsockname behave the way they
would on a console with no link up (bind and listen succeed locally,
connect/send fail with the errno a routeless host would give, blocking
calls such as accept/recv/epoll_wait return on close, abort or their
timeout). Infinite ("wait forever") timeouts are serviced in bounded
slices so a caller can never deadlock the process. Errno values match
the FreeBSD numbering the guest expects through sceNetErrnoLoc. Restored
sceNetGetsockopt and sceNetResolverStartAton (present upstream) using
the same registry-backed conventions as the rest of the rewrite.

libSceRudp: companion change giving the reliable-UDP library a genuine
context registry (init/create/bind/set-option/get-status) with
consistent error codes; connection attempts consistently fail since no
peer can ever be reached offline.
2026-09-28 12:45:34 +03:00