Commit Graph

1483 Commits

Author SHA1 Message Date
Stephen Miller
5f52e2ee1d More clang 2026-06-27 23:05:19 -05:00
Stephen Miller
8b02d7083b Clang 2026-06-27 23:00:31 -05:00
Stephen Miller
2aaf8b60cb sceNpWebApi2CreateUserContext 2026-06-27 23:00:25 -05:00
Stephen Miller
83956518e3 sceNpGetSdkVersion 2026-06-27 22:23:12 -05:00
Stephen Miller
1e25d73f48 sceNpWebApi2Initialize, sceNpWebApi2InitializeForPresence, sceNpWebApi2IntInitialize, sceNpWebApi2IntInitialize2
Defines classes for various existing objects in the library, and adds support for creating library context objects.
2026-06-27 20:25:02 -05:00
Stephen Miller
8b12fc2fc6 Fix error definitions 2026-06-27 20:01:24 -05:00
Ultra
9c0310909e
ShadNET hotfix (#4635)
* We try stuff till something works, God bless the new config backend 🙏

* Hopefully we did it?

* whoops

* what

* schizophrenia and clang fix

* once a schizo, always a schizo

* all in my head?

* I DIDN'T EVEN TOUCH THIS LINE BTW 🙏

* fixing an oopsie

* that should cover it?

* silly clusmy ultra

* that should be all hopefully(i hate gh mobile)

* clang
2026-06-27 09:53:06 -05:00
kalaposfos13
a6025d3131
sceMouseClose, send correct events when no mouse is connected and better state.connected handling (#4599) 2026-06-27 09:11:10 -05:00
georgemoralis
bf98eaa982
username changes to onlineid once connected (#4633) 2026-06-27 09:03:55 -05:00
kalaposfos13
bd741ec57f
Don't attempt to LLE the full contents of sys_modules when param.sfo is missing (#4632) 2026-06-27 08:57:54 -05:00
metr1k-91
59d7c92e45
Matching2 part 2: more types, structs, enums, context backend, init, term, createcontext / createcontextA. added ctxid to all shadnet notifications for matching2 and added matching2 events. (#4631) 2026-06-27 08:48:55 +03:00
Stephen Miller
38444639a5
Lib.Sysmodule: LLE libSceWkFontConfig.sprx (#4629)
* Add libSceWkFontConfig as an LLE

* Add module to README
2026-06-27 08:34:53 +03:00
kalaposfos13
a622b64e85
libraries: add three missing semicolons (#4628) 2026-06-27 00:18:42 -05:00
NotAnEnergyDrinkAddict
9fb948cbe6
Reapply #4619 and handle patch value hex exceptions (#4627)
* Reapply "Memory Patch Fixes (#4619)" (#4620)

This reverts commit 221efa40c7.

* try catch converting value to hex
2026-06-26 13:59:36 +02:00
metr1k-91
b564846b3c
Matching2 Part1: general additions, corrections, and sorting. (#4625) 2026-06-26 08:39:09 +03:00
Stephen Miller
6f568eaec9
Replace IsValidMapping asserts with accurate errors during MapMemory and Unmap (#4623)
Some titles need this properly handled to run.
2026-06-25 16:57:24 -07:00
Ploo
55bc0be82d
fix: FBSD 15 libc++ quirks with includes (#4617)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-06-25 16:55:47 -07:00
georgemoralis
583e6851fd
Faking Np commerce (#4618)
* moved np_commerce to dedicated folder

* Implemented fake np commerce

* we have a store now

* shadnet icon

* stephen reviews

* more stephen reviews
2026-06-25 17:35:07 +03:00
kalaposfos13
221efa40c7
Revert "Memory Patch Fixes (#4619)" (#4620)
This reverts commit a52b4c0dae.
2026-06-25 16:52:51 +03:00
NotAnEnergyDrinkAddict
a52b4c0dae
Memory Patch Fixes (#4619)
* Fix bytesN types to format hex

```
Possible prefixes == (s == `0x` || s == `#` || s == `$`)
```

* use PatchInfo struct for PatchMemory
2026-06-25 12:18:53 +03:00
georgemoralis
aff387e8a9
First ShadNet integration (#4607)
* initial shadnet client (based on my previous prs)

* some np_handler work mostly based on our previous pr

* improved login/logout event of shadnet

* added np_score support from previous pr

* friends and notifications ui

* clang is not my friend

* clang fix again

* added webapi support for shadnet

* applied metrik's fix

* clang

* fixed some wrong LOG_ERRORS

* updated emulator settings

* trying to fix npcommid bugs

* fixed npcommid

* improved NPcommid detection so it won't write null values to database

* metrik's suggestion

* removed one line

* more command types

* fixed duplicated log print

* fixed compile

* improved reconnection retries

* simplify error code

* stephen suggestion

* made friends hotkey

* fixup

* more proper handling of reconnecting

* fixed return code
2026-06-24 23:57:43 +03:00
Stephen Miller
7bb1f9df7b
Lib.Mouse: Fix sceMouseOpen checks (#4605)
* Fix checks for param flag

* Refactor merge check

Makes the check it's own variable to improve readability.

* Explicitly set default to normal

Addresses other review comment.
2026-06-22 21:18:38 +02:00
Stephen Miller
5ddd87d742
Properly handle search_end restrictions in sceKernelAllocateDirectMemory (#4600) 2026-06-20 09:20:32 +03:00
squidbus
dcd036d261
build: Get compiling on ARM64 again (#4598) 2026-06-19 18:21:38 +03:00
kalaposfos13
ad95aac357
Mouse hotfixes (#4596)
* add missing setting check in sceMouseInit

* Send guest event on mouse removed host event
2026-06-19 10:30:04 +03:00
kalaposfos13
d9f68b53c9
Do not auto-stub unresolved objects (#4562)
* Patch unresolved object stubs with unresolve indicator

* Don't autostub unresolved objects in the first place
2026-06-18 12:03:30 -05:00
kalaposfos13
d54e6b07f5
sceMouse HLE (#4568)
* libSceMouse HLE v1

* fix getting event device id, init lib, logging

* rest of the mouse events

* lol how did it take me this long to notice this

* stop the hidden mouse from clicking on random shit

* yet another mouse state bug

* Implement merged mode

* Move RingBufferQueue to common/

* sir clang offnir, the all-formatting

* config option for this

* review comments
2026-06-18 11:55:28 -05:00
squidbus
1785b98fbf
emulator: Clean up resource files (#4590) 2026-06-18 18:52:06 +03:00
kalaposfos13
c7956d066e
camera: fix incorrect parameter and SDK check and add some more error logging (#4588)
* camera: fix incorrect SDK check and add some more error logging

* Fix the actual underlying issue
2026-06-17 11:12:46 -05:00
kalaposfos13
032746cade
Silence compiler warning (#4587) 2026-06-17 16:59:33 +02:00
kalaposfos13
bc74c604eb
We’ve made some security fixes to the system software. (#4585) 2026-06-16 13:47:07 -05:00
Niram7777
11edaeabb8
Fix log level (#4577)
* fix shadps4.log level

* shadps4 log everything

* Fix trace log Unix
2026-06-16 20:56:15 +03:00
georgemoralis
f1b457f116
np manager improvements and settings (#4579)
* added np settings and some preparations for shadnet

* fixup

* ..

* add some user checks
2026-06-16 18:28:48 +03:00
Niram7777
6a20ebacde
Save shader list, memory map and module list widgets (#4578)
* Save shader list, memory map and module list widgets

* Test discovery fix timeout...
2026-06-14 20:17:18 +03:00
Valdis Bogdāns
843bec6f4f
Fontlib implemment stubs for knack2 (#4564)
* Improve spec-correct V_CMP_U64 semantics

* Clang-format

* - implement libSceFont text-source, string, and writing object support
- add OrbisFontTextSource, OrbisFontCreateStringDetail, OrbisFontString, and writing-related ABI structures and function declarations
- implement font string lifecycle and parsing flow, including default-font handling, terminate state, and character storage management
- implement writing-step and writing-metrics APIs, including render-step accessors and invisible-character masking
- implement additional glyph and character query APIs for text/font code, glyph form, metrics form, scale, and metric references
- implement library font open mode setter and string metadata getters
- consolidate duplicated font helper math and system-font alias resolution into shared internal utilities
- update font rendering metric snapping logic to use consistent ceil/floor handling for bearings, advance, and stride computation
- clean up font internals by removing duplicate local helpers and redundant declarations
- apply clang-format and line-ending cleanup to modified font sources

---------

Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
2026-06-12 23:02:22 +03:00
metr1k-91
5303084054
UPNP Support (#4556)
* UPNP

Adds UPNP (currently not wired to anything) for NAT support utilizing the miniupnpc library.

* clang fix

* Changed override for enable_upnp
2026-06-12 10:43:39 +03:00
Niram7777
ea1d241704
Windows pass MS_VC_EXCEPTION to handler (#4554)
* Windows pass MS_VC_EXCEPTION to handler

I noticed in
https://github.com/shadps4-emu/shadPS4/issues/4525#issuecomment-4646462574
that OpenAL was throwing MS_VC_EXCEPTION
83ea7236c6/common/althrd_setname.cpp (L31)

* define MS_VC_EXCEPTION, thanks MS....
2026-06-12 09:46:59 +03:00
Niram7777
4bef2658f6
Add shadps4 log + refactor (#4535)
* Log to shadps4.log before game starts

* Log update doc

* Log critical like before

* Log in main file as much as possible
2026-06-12 09:03:48 +03:00
metr1k-91
041ba9975e
NP Part 1: NpSignaling (#4549)
* NP Part 1: NPSignaling

PR Split 1 of X, adds the NPSignaling Library and some of the dependencies.  Any stubs are highlighted by the stubs files and will be resolved upon other PRs.  (Dependencies are to shadnet and further PR's to Matching2)

* PR Corrections

* PR Corrections 2

* PR Corrections 3

* clang fix

* Move to folder per request
2026-06-11 16:52:09 +03:00
Valdis Bogdāns
c5a809e50e
Fontlib (#3772)
* dummy fontlib libs

* register font libs

* typo fix

* added font error file

* added sceFontCharacterGetBidiLevel (from RE)

* fixup

* sceFontCharacterGetTextOrder , sceFontCharacterLooksFormatCharacters , sceFontCharacterLooksWhiteSpace RE

* sceFontCharacterRefersTextBack,sceFontCharacterRefersTextNext,sceFontRenderSurfaceInit,sceFontRenderSurfaceSetScissor  RE

* sceFontRenderSurfaceSetStyleFrame ,sceFontStyleFrameGetEffectSlant RE added

* clang fix

* sceFontStyleFrameGetEffectWeight

* added sceFontStyleFrameGetScalePixel

* Update types.h

* fixup merge

* Enhance font rendering and management system

- Integrated `stb_truetype` for advanced font rendering.
- Added support for external and system fonts with logging.
- Introduced new structures for glyphs, metrics, and kerning.
- Implemented functions for font state management and scaling.
- Improved glyph rendering, including subpixel and caching.
- Enhanced render surface initialization and scissor handling.
- Refactored stubbed functions with proper implementations.
- Added ABI compatibility checks for key structures.
- Improved logging, error handling, and code organization.
- Updated documentation and comments for better clarity.

* Fix for DC: font scale still inaccurate, cause unknown.

Refactor font library: streamline file handling, enhance layout caching, and improve scale computation.

* Remove unnecessary blank line in OrbisFontStyleFrame struct

* Loading font files from app0, some other fixes.

* restored accidentally deleted stubbs.

* Add system font path configuration and loading functionality

Config example:

[General]
...
sysFontPath = "/.../NotoSansJP-Regular.ttf"
...

* Handle missing system font by clearing font bytes and logging an error

* Remove unused <system_error> include from font.cpp

possible MacOS build crash reason.

* fontlib: refactor style frame API; config-driven system fonts

-Update style frame getters to take the frame explicitly:
--sceFontStyleFrameGetResolutionDpi(OrbisFontStyleFrame*, u32* h_dpi, u32* v_dpi)
--sceFontStyleFrameGetScalePixel(OrbisFontStyleFrame*, float* w, float* h)
--sceFontStyleFrameGetScalePoint(OrbisFontStyleFrame*, float* w, float* h)
-Ensure setters operate directly on the passed style frame (signatures unified):
--sceFontStyleFrameSetEffectSlant(OrbisFontStyleFrame*, float slantRatio)
--sceFontStyleFrameSetEffectWeight(OrbisFontStyleFrame*, float weightXScale, float weightYScale, u32 mode)
--sceFontStyleFrameSetResolutionDpi(OrbisFontStyleFrame*, u32 h_dpi, u32 v_dpi)
--sceFontStyleFrameSetScalePixel(OrbisFontStyleFrame*, float w, float h)
--sceFontStyleFrameSetScalePoint(OrbisFontStyleFrame*, float w, float h)
-Remove/streamline unused declarations from font.h to tighten the interface
-Call sites using style frame getters must pass an OrbisFontStyleFrame* now

Config: define system fonts path and default filename overrides

-Add [General].sysFontPath to set the base directory for system fonts
-Add [SystemFonts]:
--fallback = "SST-Roman.otf" (lowercase key) for the default face when no set is requested
--Per-font overrides using lowerCamelCase keys (start with fontSet...), e.g.:
---fontSetSstStdJapaneseJpArBold = "SSTJpPro-Bold.otf"
--Override values are filenames resolved under sysFontPath (paths are rejected and logged)
-Back-compat: still accept legacy SysFontPath and Fallback if present
-Logging: emit errors when sysFontPath is missing/invalid, fallback missing, or an override includes a path
-Configs should switch to sysFontPath and [SystemFonts].fallback with override keys

* font.cpp

Added full glyph tracking/outline plumbing plus mutex-protected generated-glyph tracking and helpers (BuildTrueOutline, true-outline extraction, glyf detection, system-font cache/fallback logic, etc.).
Swapped OTF defaults for several JP/JP_AR sets (and CJK sets used by Death Stranding / Anywhere VR) to SSTAribStdB24-Regular.ttf or other TTFs so we load glyf faces.
Wrapped every LOG_* call in INFO/DEBUG pairs: INFO just announces the call, DEBUG lists each parameter on its own line with an extra trailing newline; warnings/errors remain for validation/fallback.
Implemented TTF detection for cache loading and fallback with logging.
Renamed glyph param struct/members, moved glyph handle struct into the header, and renamed the glyph API parameters/fields accordingly.
font.h

Added the new glyph outline/glyph handle definitions and renamed OrbisFontGenerateGlyphParams members (id, res0, form_options, mem, res1/2).
Updated function prototypes to use the renamed types and pointers (e.g., sceFontGenerateCharGlyph signature now matches the new names).
fontft.cpp

Reworked sceFontSelectLibraryFt/sceFontSelectRendererFt logging to follow the same INFO/DEBUG pattern (INFO announces that selection is requested, DEBUG dumps all params).

* clang

* Scaling and font state

Removed env‑driven debug scaling (ScaleMode, GetScaleMode, GetScaleBias, SHADPS4_FONT_SCALE_*).
Added FontState::is_otf_cff and storing of external vmetrics (ext_ascent, ext_descent, ext_lineGap).
Introduced ComputeScaleExtPoint, ComputeScaleExtPixel, IsEmProfileExternalFont and ComputeScaleExtForState to choose ascender‑ vs EM‑based scaling per font (system fonts + CFF → ascender; selected TTF profiles → EM).
Updated callers (sceFontGetCharGlyphMetrics, glyph cache, layout, renderer, clones, scale setters) to use ComputeScaleExtForState instead of ComputeScale / ComputeScaleExt.
System font handling

Added ReportSystemFaceRequest helper to centralize “attach system font or log why not” and avoid repeating the logic at each call site.
Slightly adjusted when system_requested is set and how fallback/system attach errors are reported.
Horizontal layout

sceFontGetHorizontalLayout now logs invalid parameter/handle and, when an external face is present, uses that face’s vmetrics and the per‑state scale to compute baselineOffset and lineAdvance.
(Fallback still uses the simple scale_h‑based approximation.)
Glyph rendering (horizontal)

Reworked sceFontRenderCharGlyphImageHorizontal:
Resolves effective pixel scale from the attached style frame + point/pixel API via ResolveStyleFrameScale.
Uses ComputeScaleExtForState to compute scale_y (and derived scale_x), rather than a single global scale.
Always computes metrics from stbtt_GetCodepointHMetrics + GetCodepointBitmapBoxSubpixel, with metrics->h_bearing_* and h_adv in sync with those scales.
Introduces a clearer origin/gravity model:
System fonts: (x,y) treated as raw top‑left.
Certain external TTFs (EM‑profile) : (x,y) treated as baseline.
Other external fonts (CFF/point etc.): (x,y) treated as line‑top with baseline offset.
Validates surfaces more strictly and returns NO_SUPPORT_SURFACE when buffer/size/bpp are invalid; supports only 1‑bpp and 4‑bpp.
Uses a local glyph_bitmap and a straightforward blit with scissor/clipping, instead of the older mix of cached bitmaps/PUA logging.
Removed PUA/placeholder glyph debug tracing and the more ad‑hoc baseline “adjusted_y” heuristic.
Logging clean‑up

Standardized LOG_INFO/LOG_DEBUG in sceFont* functions:
Info: usually just "called" or a short description (“scale pixel set requested”, etc.).
Debug: "parameters:\n"/"result:\n"/"template state:\n" followed by values on separate lines.
LOG_ERROR messages no longer repeat the function name (logger already prints it); they now say "invalid parameter", "invalid font handle", "no support glyph (face/scale)", "no support surface (buffer)", etc.
Added missing error logs before some early returns (allocation failures, page_count == 0, invalid parameters), and upgraded a few previous LOG_DEBUG “invalid params” to LOG_ERROR where they correspond to an error return.

* Add internal font handling structures and layout computation functions

This commit introduces a new header file `fontft_internal.h` containing
various structures and functions for managing font handles, layout metrics,
and rendering operations. Key additions include:

- Definitions for `FontHandleOpenInfo`, `FontHandleStyleStateTail`,
  and `FontHandleOpaqueNative` to encapsulate font state and properties.
- Layout-related structures such as `HorizontalLayoutBlocks`,
  `VerticalLayoutBlocks`, and their respective I/O structures for
  managing layout metrics and effects.
- Functions for computing horizontal and vertical layout blocks,
  along with utility functions for handling layout words in byte format.
- Stubs for library functions related to font management and rendering.

These changes aim to enhance the font rendering capabilities of the
shadPS4 Emulator Project, providing a robust foundation for future
font-related features.

* Add FreeType submodule for GitHub CI workflows

* Refactor font rendering and path resolution logic to fix Metaphor: ReFantazio glyphs cropping and anywhereVR  "thin" glyphs.

- Updated RenderCodepointToSurface and RenderCodepointToSurfaceWithScale functions to set result->transImage to nullptr instead of result->stage.
- Modified font definitions to use updated font file names for various language sets.
- Introduced ResolveSystemFontPathCandidate function to streamline font path resolution, allowing for better handling of font directories.
- Enhanced LoadFontFile function to check for font files in "font" and "font2" directories based on the parent directory name.
- Improved error logging for font path overrides in ResolveSystemFontPath function.

* clang

* Update fontft_internal.cpp

typo fix

* Fix: fypo

* create sys_fonts in users folder and instructions.txt of what to put inside

* cut version of emulator settings to support custom sysfonts folder

* load settings

* cmakelist

* using new saving system but i can't understand the fallback mechanism

* removed lle versions

* Enhance error logging in font metrics functions and update comments for clarity

* Refactor font library functions and improve thread safety

- Updated function signatures in font.h to include the OrbisFontLib parameter for cache clearing and outline buffer management.
- Introduced a mutex in font_internal.cpp to ensure thread safety by protecting access to global font state and library state.
- Added a RemoveState function to safely remove font states.
- Enhanced memory allocation functions in fontft_internal.cpp to use Core::ExecuteGuest for better integration with the guest environment.
- Simplified font loading logic in LibraryOpenFontMemoryStub to improve readability and maintainability.
- Removed redundant code related to file opening and memory allocation, streamlining the font loading process.
This potentially fixes emulator crashes in games that use parallel font initialization, such as Dragon’s Crown.

* Add system font path and override config support

Introduce new config options for system font directory, fallback font name, and per-font overrides. Update config load/save logic to handle a [SystemFonts] TOML section, supporting both fallback and individual font overrides. Improve user instructions for custom font setup and clarify related code comments. These changes enhance flexibility and user experience for system font configuration.

* clang

* Add system font path management functions and refactor font directory retrieval

* Restored support for loading the libSceAudiodec system module

* Refactor font path handling and remove unused functions

* Fix include order for emulator settings and key manager (Clang)

* Remove unused emulator settings files and clean up includes in main and config files

* Remove unused instructions file creation from user paths initialization

* Consolidate internal font/ft internals

Move internal font structs, aliases, and helpers out of font.cpp into shared internal headers/sources.
Promote shared ABI-facing types (including FontHandleOpaqueNative and layout/system-use structs) into font internal headers and remove function-local duplicates.
Move FreeType driver/renderer table construction into fontft_internal.cpp and wire fontft.cpp to internal getters.
Ensure internal.cpp implementations are declared in headers; deduplicate declarations and clean includes.

* Refactor memory allocation and deallocation calls to remove Core::ExecuteGuest wrapper

* clang

* Add conditional linking for freetype library in shadps4 target

* Add new fixed-point arithmetic functions for font rendering

This commit introduces several new functions to handle fixed-point arithmetic operations, specifically for converting and scaling values related to font rendering. The added functions include:
- FixedMulUnitsToF26Dot6
- Cvttss2siCompat
- RoundMul16x16ToS32
- TruncFixed16x16ToInt
- RoundFixedMulValueScaleToS32
- TruncMulUnitsToS64
- RoundFixedMul16x16ToS64

These functions will enhance the precision and performance of font rendering calculations.

* Refactor: Replace Config usage with EmulatorSettings for font directory retrieval

* Sysmodule: Stop forcing HLE for font modules

* Add support for built-in font handling and fallback mechanisms

- Introduced a new structure `BuiltinFontBlob` to manage built-in font data.
- Implemented decompression functions for loading built-in fonts from compressed data.
- Added functions to resolve and load built-in fonts, including `LoadBuiltinFontBytesShared` and `IsBuiltinFontPath`.
- Enhanced `AttachSystemFont` to utilize built-in fonts as fallbacks when system fonts are unavailable.
- Implemented `AddBuiltinFallbackFaces` to add necessary fallback fonts based on font set types.
- Updated font selection logic to include Thai and symbol fonts in `ResolveSysFontCodepoint`.
- Modified `LibraryOpenFontMemoryStub` to handle loading built-in fonts directly from shared data.
- Added notifications for users when system fonts are not found, indicating fallback usage.
- Updated header files to declare new structures and functions related to built-in font handling.

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
2026-06-10 15:57:11 +03:00
kalaposfos13
101c6fedbc
Set default user colour to 1 (#4548)
Co-authored-by: Ultra <113462733+UltraDaCat@users.noreply.github.com>
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2026-06-10 10:41:45 +02:00
kalaposfos13
852539829a
Reset controller colours on emulator shutdown (#4537)
* Reset controller colours on emulator shutdown

* bruh moment

* Don't use the destructor for this

* clang, formatter of night

* forgot to stage this file

* ffs

* fix tests

* fixed tests?

* gcn tests fixed?

* now?

* possible fixed

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2026-06-08 00:39:50 +03:00
Hog
c151eeea87
Add error logging for unsupported file descriptors (#4506)
* Add error logging for unsupported file descriptors

Log an error when an unsupported file descriptor is encountered.

* Log error with correct variable in file_system.cpp

* fix clang being a whiny bitch

* use {}

* changed from error to warning, and added it to windows version of function

meow
2026-06-08 00:29:02 +03:00
Stephen Miller
855406d273
Lib.NpTrophy: Move NP-related checks to sceNpTrophyRegisterContext (#4504)
* Fix some new bugs caused by lack of trophy key after #4498

By not adding to the trophy map, games would hit the error return in sceNpTrophyCreateContext instead of the stub for trophy-key-less individuals.

* Revert "Workaround for bad npbind.dat"

This reverts commit 7bd27054f3.

* Move NPCommID checks to sceNpTrophyRegisterContext

CreateContext doesn't seem to check anything, I can run it successfully on a homebrew with none of the NP files. The first errors start in sceNpTrophyRegisterContext.

* Update np_error.h

* Update np_trophy.cpp

* Workaround for bad npbind.dat

Games that check trophy returns still complain, and at this point, it's entirely the user's fault.
However, people don't like that answer, so workaround the issue.

Introduces a check for valid context paths, and a stub OK return that triggers if RegisterContext would've failed on real hardware.

* Better log messages
2026-06-07 21:44:31 +03:00
georgemoralis
a2c4e68d24
Http part7 (#4462)
* sceHttpAddRequestHeader

* added sceHttpRemoveRequestHeader

* implemented a few more functions

* added sceHttpSetProxy

* cleanup

* more cleanup

* fix tests?

* fix tests part2

* Added debug in SendRequest

* improved debug

* forgot

* added real http connection path

* fixes for wipeout

* add custom redirect as it doesn't match the httplib one

* more debug messages

* clang is not my friend

* argg

* make kernelstub configurable

* added url override

* fixup

* ..

* stephen's reviews

* more stephen reviews

* http tests

* fixed tests

* fixed a single tests isssue

* one more fix

* argg
2026-06-07 19:14:42 +03:00
kalaposfos13
6af6ab12d8
Do not log out user on pad disconnect (#4532)
* Do not log out user on pad disconnect

* refactor connection reporting

* update hotkeys
2026-06-07 10:41:00 +03:00
Stephen Miller
057454fe7f
Lib.Zlib: Use miniz instead of zlib-ng (#4531)
* Uze miniz instead of zlib for libSceZlib

Might fix ROTTR?

* Claaaaang

* Explicitly use miniz's uncompress

* Clang2

* Swap types

In theory, these types are all the same size. Best we use the right ones for the library though.

* Remove "stub" logs
2026-06-06 16:41:05 -07:00
Stephen Miller
a3e9390be6
Kernel.Pthreads: Restructure PthreadMutex struct (#4528)
* Restructed PthreadMutex struct

When libc creates mspaces, they modify the data of a PthreadMutex to set the mutex's private flag. Previously, on Linux, this would modify internal data of our TimedMutex, and on Windows this would modify the m_yieldloops variable.

This makes it so our m_flags is at the same offset as the real pthread_mutex struct, so no data corruption occurs.

* Further struct changes

To address review comments
2026-06-06 07:38:38 -07:00
Stephen Miller
deb9908452
Swap NpWebApi global mutex to recursive (#4529)
It's recursive in the actual library, and since our implementation in thoroughly based on the actual library, this is needed for our code to function appropriately.
2026-06-06 09:07:22 +03:00
Arthur Cuesta
35255bccef
core/memory: handle Fixed mapping with zero addr in callers (#4507)
Add check in sceKernelReserveVirtualRange, sceKernelMapNamedDirectMemory, and
sceKernelMapNamedFlexibleMemory per StevenMiller123 review:
- FW >= 1.70 returns EINVAL for Fixed + addr == 0
- Older FW clears Fixed flag to fall through to managed allocation

Co-authored-by: opencode <dev@shadps4.local>
2026-06-05 22:11:57 +03:00