Commit Graph

1433 Commits

Author SHA1 Message Date
Hog
7132795b7a
Refactor memory size handling to better handle vdec titles (#4373)
* Refactor memory size constants and calculations

Updated memory size handling in video decoder functions.

* Refactor video decoder frame size calculations

Updated frame size computation to use worst-case dimensions and adjusted alignment values.

* Refactor alignment logic to use Common::AlignUp
2026-05-08 09:28:44 -05:00
Stephen Miller
d85a5013ec
Kernel.Fs: Stub fstat on random devices (#4368) 2026-05-06 15:40:41 -07:00
Stephen Miller
b10c3c7697
Stub an actual code for sceNpAuthGetAuthorizationCode functions (#4369)
I've had exactly one game specifically complain about the auth code being empty. Provide some code so relevant titles work a little better.
2026-05-06 15:40:14 -07:00
Stephen Miller
6623489d3d
Libs: Proper names for some functions (#4366)
* Add new ulobjmgr names

* libScePad function

* Clang
2026-05-06 23:31:32 +03:00
Stephen Miller
4ee33c6636
Core: Fix trophy extraction for games with separated updates (#4355) 2026-05-05 14:22:26 -07:00
squidbus
8175194bba
misc: Fix initializer order warnings (#4358) 2026-05-05 14:21:21 -07:00
Niram7777
6633d7252c
Log read setting from old toml outside the [Log] section (#4342) 2026-05-05 02:21:28 +03:00
Kravickas
ea8bed1c94
Implement sceGnmInsertDingDongMarker (#4340) 2026-04-30 22:03:28 -07:00
Stephen Miller
1956b791d4
Properly clear handle data on close (#4339) 2026-04-30 16:55:04 -07:00
TheThunderTurner
6d0318a840
Fix assertion condition for request_id limit (#4334) 2026-04-29 10:02:19 -05:00
georgemoralis
cf238acea9
fixed truncate of request_id data (#4330) 2026-04-28 19:06:43 +03:00
Matías Buzzo
f98f1aac5a
file_sys: apply case-insensitive search to mods_path on GNU/Linux and macOS (#4312)
The case-insensitive fallback search() in GetHostPath is only
invoked for patch_path and host_path, so mods whose file or folder
capitalization does not exactly match the guest path are silently
bypassed even when the files are present. Mirror the existing
search(patch_path) pass for mods_path, placed first to preserve
mod > patch > base precedence.
2026-04-27 11:00:31 +03:00
Stephen Miller
2c9eee1eb5
Reduce address space size for FreeBSD (#4318) 2026-04-25 09:14:34 +03:00
georgemoralis
737d23b28b
Save fixes VIIIIX (#4315)
* fix issue with concurrent writes , this fix racing with permission denied

* optimize

* fixup
2026-04-24 15:16:15 -05:00
georgemoralis
f710074500
return proper error if user is invalid (#4317) 2026-04-24 23:06:34 +03:00
Stephen Miller
da7b673704
Fix our workaround for missing trophy key. (#4306) 2026-04-23 15:10:19 +03:00
Lander Gallastegi
c68a8baa94
chroe: fix building on fedora 44 / clang 22 (#4303)
* add includes to fix building

* update documentation
2026-04-22 09:34:53 +03:00
TheTurtle
526c346f90
renderer_vulkan: Renderer microoptimizations (#4290)
* renderer_vulkan: Microoptimizations from profiling

* buffer_cache: Only use streaming path on cpu modified memory

If the pages arent cpu modified, then a gpu buffer with valid data exists that can be used instead

* clang format

* fix max num_layers
2026-04-20 09:20:07 +03:00
squidbus
90b75eadec
address_space: Fix order of operations (#4288) 2026-04-19 14:26:14 -07:00
Stephen Miller
3400bdf4b1
Core: Fix issues with #4273 (#4287)
* Assert on failed mappings, ignore segment prot

* Re-add segment prot conversion

* Disable backing for execute mappings

Macs don't allow this apparently.

* Add assert for file execute permissions
2026-04-19 14:20:42 -07:00
Stephen Miller
9af4aa2e25
Kernel.Vmm: Proper address checking in QueryProtection (#4286) 2026-04-19 14:20:14 -07:00
Stephen Miller
67edac4c9e
Fix compiler directives in stack.S
Was hidden before because the file was .s (lowercase). When turtle fixed that, this issue became noticeable.
2026-04-19 11:24:00 -05:00
TheTurtle
1a234a566d
kernel: Rename stack file for proper preprocessor support 2026-04-19 18:04:35 +03:00
Stephen Miller
92cd61fbf5
Core: Proper module memory mappings (#4273)
* Early memory regions setup

Needed to enable flexible allocations before mapping the eboot

* Improved accuracy of module mappings

To keep our current logic intact, reserve the full memory space, then perform fixed mappings for trampoline and segments. Segment mappings use type flexible, so they properly count toward flexible usage, while trampoline mappings use type code to bypass this.

* Asserts for failed offset finding

Always check before you leap.

* Hex logging for segment sizes

* Only map game modules to flex mem.

* Revert "Asserts for failed offset finding"

This reverts commit 38083f8cbb.

* Revert "Early memory regions setup"

This reverts commit da1552d4ac.

* Initialize memory regions in MemoryManager constructor

Much simpler approach to enabling the necessary flexible mappings on startup.
2026-04-19 12:45:02 +03:00
kalaposfos13
26c5963481
temp fix (#4276) 2026-04-19 12:30:51 +03:00
Vladislav Mikhalin
9ec75c32ad
threads: remove low level threads on windows (#4277) 2026-04-19 12:00:49 +03:00
Vladislav Mikhalin
9141c19302 align stack to 16 2026-04-19 09:37:55 +03:00
Niram7777
854b291c63
Spdlog migration (#4069)
* spdlog migration

* gitmodule instead of cmake
2026-04-19 00:57:05 +03:00
Vladislav Mikhalin
beba435a09
separate thread init and run stacks (#4274)
* separate thread init and run stacks

* copyrights

* remove TEB setting

* revert fibers

* fix linux

* remove unused variables
2026-04-18 16:17:48 +03:00
Stephen Miller
2d559a4f77
Remove scePadOpen errors for special pad (#4265)
This has caused issues since the moment they were added, and other devs have mentioned they're inaccurate before
2026-04-16 23:29:53 +03:00
georgemoralis
95ba5918dd
Shadnet preparations (#4269)
* replace psn_signed_in settings with shad_net_enabled and added shadnet_server setting

* improved user manager to update new fields and add new variables

* clang

* better message :D
2026-04-16 20:55:55 +03:00
Stephen Miller
830c5ba435
Core: Fix Debug Dump (#4266)
* Fix

* Clang
2026-04-16 09:20:33 +03:00
rainmakerv2
be224a4556
Big Picture: add settings configuration (#4255)
* prototype settings look

* put categories on top instead of on the side, plays nicer with input system

* added profiles + saving and loading framework

* add helper functions

* fix autofocusing

* add code for using embedded image files

* put settings in different files

* clang

* remove sdl_image submodule, unify functions when possible

* Always display selected profile in settings content areas

* Fix focusing, logs, highlight profile text

* persist highlight on focused buttons, add all categories placeholders

* All settings added

* navigate tabs with l1/r1
2026-04-15 18:19:22 +03:00
georgemoralis
7759f4eb2e
Revert "avplayer/videodec fixup (#4225)" (#4264)
This reverts commit f242655fbb.
2026-04-15 18:02:53 +03:00
rainmakerv2
72f514f350
Trophy: Replace sdl mixer library with minimp3 header for playing trophy sounds (#4261)
* Replace sdl mixer library with minimp3 header

* clang

* set spec before putting in audiostream

* respect main audio output device setting

* fixup

* replace file with submodule

* cleanup

* capitalize functions like the others

* move buffer to heap

* use vector for pcm buffer instead
2026-04-15 10:48:55 +03:00
Kravickas
f242655fbb
avplayer/videodec fixup (#4225)
* avplayer NV12 frame copy

* videodec NV12 frame copy
2026-04-15 10:28:49 +03:00
georgemoralis
c395897fbe
Fixed scePthreadSemTimedwait absolute timespec (#4238)
* The usec parameter is a relative timeout, but posix_sem_timedwait expects an absolute timespec

* posix_sem_post , concurrent fix
2026-04-15 08:57:02 +03:00
rainmakerv2
b12ca606c8
fix real-time volume adjustment with game-specific configs (#4259) 2026-04-14 15:57:08 +03:00
rainmakerv2
cead66d3c6
Big Picture Mode (#4250)
* imguitest

* button tests

* fix gamepad nav

* placeholder hardcoded eboot path

* set focus correctly, move to own files

* get installed game information

* dynamically adjust rows

* use slider for ui scale

* launch big picture with CLI arg

* Use emulator settings for UI scale and window size

* center scrolling on focused item

* fix item focus on scrolling when navigating with keyboard or pad

* minor fixups and comments

* fix performance degradation

* adjust fonts to show TM symbol and higher overscale

* reuse and clang

* add exists check before iterator

* flatten navigation (gamepad navigation crosses child window container)

* cleanup and comments

* simplify update checker a bit

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2026-04-13 01:40:11 +03:00
georgemoralis
1c8ace6619
fixed trophy extraction (#4254)
* fixed trophy extraction

* opps

* fixing indexing in np_trophy

* fix
2026-04-13 01:23:00 +03:00
georgemoralis
cfa5838a13
used default addcont folder if not set (#4253) 2026-04-12 15:45:28 +03:00
kalaposfos13
3c390f9889
Implement reserved attribute of OrbisPadTouchData for LLE libSceSystemGesture (#4245) 2026-04-09 14:26:47 -05:00
kalaposfos13
daa7b5c04b
Fix scePadResetLightBar for TV remotes (#4244) 2026-04-09 21:43:27 +03:00
georgemoralis
474a910ac4
Dialogs fixups (Np_profile_dialog , np_webbrowser dialog) (#4232)
* better transaction handling

* more fixup

* fixup some logs

* refactor : move np_profile_dialog to it's own folder

* initial np_profile_dialog_ui

* fixes a bit more ui

* more fixups

* forgot cmakelists :D

* improvements in np profile dialog + UI

* improved logging

* few more logging improvals

* dummy npscore

* fixup
2026-04-09 21:03:41 +03:00
georgemoralis
15279c42ac
Races and leak fixes part 2 (#4241)
* fixed Unsynchronized free_threads.size()` Read in ThreadState::Free

* fixed data race in posix_pthread_key_create , allocated and seqno are atomic now

* fixed playtime thread

* argv array size fix

* destroy mutex on object deletion with pthread_mutex_destroy

* fixed object_pool
2026-04-09 20:47:47 +03:00
georgemoralis
5ca2b07f94
The above could trigger wrong writes and read one extra VMA entry (fixed) (#4237) 2026-04-09 18:05:48 +03:00
georgemoralis
2c6d41cdd4
Races and ThreadSafe issues (#4239)
* used atomics for thread safety

* equeue: Save filter/ident before std:move since we access them out of the locked loop

* fixed kqueues memory leak

* clean storage objects effectively

* fixed memory leak

* fix some races

* fixed race condition
2026-04-09 17:46:36 +03:00
kalaposfos13
c11fa6ff81
Update scePadGetInfo (#4234)
* Add OrbisPadInfo struct and return correct controller colours

* oof
2026-04-08 10:08:53 +03:00
Stephen Miller
d3c25281e9
Add proper function names (#4231)
Found these with the help of @red-prig
2026-04-06 21:15:19 -07:00
Kravickas
13da5a82cc
protect (#4212)
Protection change may override page fault tracking set by the GPU buffer cache. Invalidate so the cache re-uploads and re-tracks.
2026-04-05 19:44:09 +03:00
rainmakerv2
eb429be1cc
FS: easy mods folder for games (#4216)
* Implement mods folder

* Add logging when modified files exist

* get mod folder entries in MntPoints::IterateDirectory

* support eboot from mods folder
2026-04-05 15:56:18 +03:00
Stephen Miller
e24f42b03c
Lib.Sysmodule: Allow libSceSystemGesture LLE (#4223)
* Run libSceSystemGesture LLE

It's fully safe.

* Update sysmodule table appropriately.
2026-04-05 00:35:53 +03:00
kalaposfos13
93733a9ae8
Fix edge case for touch states (#4219) 2026-04-04 15:26:41 -05:00
Stephen Miller
deb8c66ffb
Cleaner fix (#4167) 2026-04-01 23:12:04 +03:00
Ploo
5d489ff03d
posix: implement sysconf() and sigalstack() (#4201)
* posix: implement sysconf() and sigalstack()

Signed-off-by: lizzie <lizzie@eden-emu.dev>

* mark as stubbed

* oh clang format

---------

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
2026-04-01 08:58:54 +03:00
Ploo
a87abee8e3
WIP: port: Add x64 FreeBSD (#3927)
* port: Add x64 FreeBSD

* clang formaa

* fix epoll stuffs

* date-tz for fbsd, force submodule zydis

* fix filesystem hang + date-tz

* fix

* fix freebsd SIGBUS

* madvise() ifdef

* signal fix + camera fix

* proper %gs tls for once

* better tls? + clang format

---------

Co-authored-by: lizzie <lizzie@eden-emu.dev>
2026-03-30 13:44:29 +03:00
rainmakerv2
2334981be8
respect emulator settings home directory for trophies (#4188) 2026-03-29 10:21:21 +03:00
georgemoralis
5b60b73e9a
added new trophies and saves dirs (#4177) 2026-03-27 17:58:54 +02:00
kalaposfos13
8a1500d7ad
Local multiplayer support (#4169)
* multiple controllers v2

* the c language formatter tool

* review comments (the easy ones)

* c++ copy semantics

* correct error return for remotes without the system user id

* update pad handle handling logic

* controller override colour
2026-03-27 06:37:25 -05:00
georgemoralis
e0a86dc8f9
added transfer of sysmodules path and fonts path (#4175) 2026-03-26 22:33:31 +02:00
rainmakerv2
650652db42
Vblank frequency setting fix + utf 8 encoding for paths (#4174)
* vblank frequency setting fix

* force utf-8 encoding upon json serialization/deserialization for path strings
2026-03-26 00:13:43 +02:00
Stephen Miller
3cc56bf84c
More verbose errors for file opening failures (#4173)
* Verbose errors for file opening failures

These can be pretty helpful, and games don't usually spam them outside loading screens.

* oops
2026-03-25 23:43:30 +02:00
Stephen Miller
bb9c223d42
Core: Minor code cleanup (#4166)
* Log filters cleanup

* Clearer dialog options for config update

* Smaller button labels

These don't auto-resize, and I don't want to read SDL's docs for something so small.
2026-03-24 08:40:18 +02:00
georgemoralis
f450405f35
General Misses (0.15.1 WIP part 6) (#4165)
* fixes

* fixed a few more config misses

* missed include
2026-03-23 22:38:05 +02:00
georgemoralis
d0a4718fb9
General Misses (0.15.1 WIP part 5) (#4164)
* more from 0.15.1 WIP branch

* fixup
2026-03-23 13:52:33 +02:00
georgemoralis
edd50ab2d0
more files for syncing with 0.15.1 branch (#4161) 2026-03-22 10:26:23 +02:00
georgemoralis
880445c2ce
Initial camera (Part 3 of 0.15.1 branch) (#4156)
* using new emulator_settings

* the default user is now just player one

* transfer install, addon dirs

* fix load custom config issue

* initial openal backend

* linux fix?

* camera module updated

---------

Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
2026-03-22 09:08:44 +02:00
georgemoralis
060703f627
Initial Openal (Part 2 of 0.15.1 branch) (#4155)
* using new emulator_settings

* the default user is now just player one

* transfer install, addon dirs

* fix load custom config issue

* initial openal backend

* linux fix?

---------

Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
2026-03-22 00:27:55 +02:00
georgemoralis
08168dc386
New config mode (part1 of 0.15.1 branch series) (#4145)
* using new emulator_settings

* the default user is now just player one

* transfer install, addon dirs

* fix load custom config issue

---------

Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
2026-03-21 22:26:36 +02:00
Stephen Miller
0a722d69e6
Only iterate to next VMA if we're past the current VMA. (#4158)
It's possible we're merging with a later memory area. If that occurred here, we would end up iterating past where we need to be, which then messes up logic.
2026-03-21 12:02:17 +02:00
kalaposfos13
ec1719e4d3
update current firmware version (#4144) 2026-03-18 19:58:00 +02:00
rosenkolev1
9a3e7b097c
Make thread TidCounter atomic (#4133) 2026-03-18 09:40:37 +02:00
kalaposfos13
e6b743032d
Don't print unresolved libc and libSceFios2 stubs (#4137) 2026-03-17 15:58:31 +02:00
Stephen Miller
844cfe5185
Lib.Ssl2: Stub data for sceSslGetCaCerts (#4127)
* Test

* More robust logic for storing and freeing dummy data

Anything heap allocated is invalidated when the function returns. Use malloc to allocate the string instead, and make sure to free those allocations in sceSslFreeCaCerts.
2026-03-14 17:12:26 +02:00
Санька Четвёртый
f336096b12
PSF file format: close file after encode() (#4122) 2026-03-13 12:38:22 +02:00
Stephen Miller
3ee06a91df
Relocate imports on HLE loads (#4113)
Now that dynamic HLE loads happen after the eboot loads, HLEs for most "preload" modules wouldn't detect if you didn't have libSceRtc dumped. This was because, while we stored all the new symbols from the HLE lib, we weren't relocating loaded modules to use these symbols.
2026-03-10 07:25:45 +02:00
kalaposfos13
0579569f13
Improve signal emulation (#4108)
* improve signal emulation

* make the sce function use the new posix ones

* ifdefing away the issues

* fix me being very tired yesterday night

* let macOS handle SIGRT signals with the native sigaction call instead of an early error return

* windows still has no clue what the fuck is going on

* the loathsome clang-formatter

* fix oact

* return the guest handler, not the host one

* Clear any existing signal mask for game threads.

* don't rely on implementation specific things

* Fix Windows support and sceKernelRaiseException bug

* Review suggestions

@kalaposfos13 suggested I push these.

---------

Co-authored-by: Stephen Miller <56742918+StevenMiller123@users.noreply.github.com>
2026-03-09 14:20:14 +02:00
Stephen Miller
cc6af03adf
Lib.SysModule: Proper HLE implementation (#4102)
* Replace sysmodule enums with table

Dumped this from the 12.52 module, using a script I created.

* Better documentation

* Separate from system libraries

That system folder is going to be getting quite large if I left all the sysmodule stuff in there.

* More arrays from library

* Found another preload list

Ghidra really hates decompiling libSceSysmodule, so I didn't notice this one at first.
Also documented specific versions tied to each preload list.

* Start work on implementation

* Some basic implementations

* Initial stub for module loading

Just enough to see if the logic functions appropriately.

* Clang

* sceSysmoduleLoadModule

Now I need to get sceSysmodulePreloadModuleForLibkernel done so that we don't have bugs from not loading internal LLEs.

* sceSysmoduleLoadModuleInternal

* sceSysmodulePreloadModuleForLibkernel

I have successfully broken quite literally everything.
I shall debug this tomorrow.

* Slight fix

* Maybe fix?

* Change log

Enjoy the log spam 😄

* Increased defined stub count

Now that libc and libSceLibcInternal loads later, all the auto stubs are getting consumed by it.

* sceSysmoduleUnloadModule stub

Also a couple fixes. Sysmodule does pass argc and argv to game modules, but only after loading them once to check  binaries.
Shouldn't matter for the most part.

* Clang

* Less stubs

2 thousand is seemingly enough.

* sceSysmoduleLoadModuleInternalWithArg

Doesn't hurt to have, since Apex Legends calls it.

* Oops

* Oops 2

* Rename isModuleLoaded to getModuleHandle

Review comment

* Remove debug game module loads

These cases only trigger when specific sceRegMgr key values are set, and for our purposes, we can treat that case as false.

* Allow preloading to fail

For kalaposfos

* Clang
2026-03-08 21:48:03 +02:00
Stephen Miller
014b11e9da
Return an empty certificate (#4104)
This is enough to get past initialization checks in Rise of the Tomb Raider.
2026-03-07 09:15:32 +02:00
georgemoralis
50d5ce9a83
fixed an issue in sceKernelRemoveExceptionHandler (#4086)
* fixed an issue in sceKernelRemoveExceptionHandler

* fixed comment
2026-03-07 08:55:17 +02:00
Stephen Miller
1f5430e4c2
More targeted fix (#4096)
Cyberpunk's issue seems to actually come from the incrementing in the loop. It wasn't clear while debugging, but the problem is that the pattern the game supplies causes match to fail when str_wild_it hits the end, and then tries iterating past end due to the loop condition.
Our pattern matching code seems broken for the case Cyberpunk triggers, but since I'm not aware of the intricacies of how real hardware behaves, best to just revert the loop condition change and instead break the loop before the broken iteration.
2026-03-02 20:35:58 +02:00
Stephen Miller
dbf23a66af
fix (#4088) 2026-03-01 07:30:19 +02:00
Stephen Miller
49c2a4999b
Lib.Net: Misc fixes (#4082)
* Fix Windows-specific incorrect error in PosixSocket::Connect

* Hide typical non-blocking errors

* Also hide EWOULDBLOCK from recvfrom

* Fix the resolver fix
2026-02-28 09:09:01 +02:00
Stephen Miller
aae10ecdf7
Lib.GnmDriver: Implement sceGnmDrawIndirectMulti (#4083) 2026-02-27 21:32:32 -08:00
Stephen Miller
8bb29695ed
Lib.Net: Proper resolver errors when isConnectedToNetwork is disabled (#4081)
* Force resolver errors when not connected to network

Error values are based on real hardware testing.
sceNetResolverGetError is based on libSceNet decompilation.

* Update net_resolver.h
2026-02-28 00:50:41 +02:00
georgemoralis
f91b8410fd
SDL Audio3d (#4077)
* implemented dummy audio3d for sdl

* removed sdl::free
2026-02-26 15:31:50 +02:00
Vladislav Mikhalin
e1ecd8e98c
threads: initialize tls on thread creation (take 2) (#4070) 2026-02-24 20:35:05 +03:00
kalaposfos13
af9cbb8e8a
Fix some logic bugs in sceHttpUriParse (#4067) 2026-02-24 09:00:17 +02:00
ElBread3
407d287fb1
tweak LoadFigure and RemoveFigure (#4071) 2026-02-23 21:30:57 +02:00
kalaposfos13
c265a39227 fix typo 2026-02-23 09:08:39 +01:00
Stephen Miller
6cbab87745
Kernel.Event: Implement kqueue and kevent (#4065)
* Remove dead code from EqueueInternal::WaitForEvents

No longer necessary now that we avoid using small timers when falling back on equeue logic.

* Refactor type names

Might as well

* Properly define OrbisKernelEqueue as a handle

Most of the functions using an "OrbisKernelEqueue" call directly into kevent. Therefore, OrbisKernelEqueue should be a equeue handle.

* Clang

* Widen OrbisKernelEqueue type

On real hardware, it's some value that contains the handle, as opposed to just the handle itself.

* kqueue implementation

The easy part

* Hardware-accurate timer data

Needed to make kevent simpler for these uses.

* Move callback scheduling to EqueueInternal::AddEvent

kevent would become excessively bloated if I needed to deal with that in there.

* posix_kevent

kevent is a bit of a pain, for now I've implemented as much as libkernel actually uses for it's wrappers, and left error logs to skip behavior when necessary.

* Log calls

* Apple, why are you calling fstat on an equeue?
2026-02-22 23:41:05 +02:00
kalaposfos13
fb5c36fa11
Implement guest signal handlers (#4064)
* Change thread pausing to use SIGTRMIN on UNIX

* Allow handling of the rest of the signals

* Add orbis-native signal number conversion and fix a few bugs

* ifdefing away the issues

* add check for mac for the signal that's used for thread pausing there

* Add a few more registers

* Don't break HLE memory tracking
Now, if a guest app installs a handler for SIGSEGV/SIGBUS/SIGILL, that'll be handled by keeping the original signal handler, and if we can't handle the signal ourselves (as in it didn't come from HLE memory tracking), we pass it on to the guest

* copyright 2026

* +
2026-02-22 18:56:54 +02:00
kalaposfos13
b37e0a6ea6
Miscallenous function exports and implementations (#4068)
* _nanosleep

* pthread_mutexattr_setpshared

* pthread_attr_setschedpolicy

* getuid

* copyright 2026
2026-02-22 17:08:06 +02:00
Vladislav Mikhalin
9241ebd4dd
Revert "threads: initialize TLS on thread creation (#4048)" (#4062)
This reverts commit f6d71646c0.
2026-02-21 14:10:25 +03:00
Stephen Miller
1eb09ab440
Kernel.Equeue: Various event fixes (#4059)
* Fix vblank event data

* Various logical fixes for timer events

Store timer timeouts in nanoseconds now, properly handle event "replacement", avoid employing small timers when adding events to equeues, fix stored timer data

* Clang
2026-02-21 09:37:59 +02:00
Vladislav Mikhalin
f6d71646c0
threads: initialize TLS on thread creation (#4048)
* initialize TLS on thread creation
* initialize tls in dimensions toypad writer thread
* clear most of the stack on thread init with some black magic
2026-02-19 21:26:33 +03:00
kalaposfos13
3a99051df9
filesystem: fix crashes caused by returning a pointer from an std::vector (#4043)
Co-authored-by: Stephen Miller <56742918+StevenMiller123@users.noreply.github.com>
2026-02-16 22:56:35 +02:00
Stephen Miller
547198af6f
Lib.VideoOut: Fix pending flips limit (#4039)
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
* Hardcoded limit to pending flips

Real hardware has a fixed-size queue, and doesn't depend on the number of registered buffers.
While the kernel supposedly uses an array of 18 elements, my tests suggest the cap is 16 pending flips.

* Assert on trying to flip unregistered buffer

I haven't seen anything do this intentionally yet, but I do have cases where games do this unintentionally (do to unimplemented functions).
2026-02-16 08:31:35 +02:00
Stephen Miller
4a370519a5
Lib.GnmDriver: Fix flip arg for sceGnmSubmitAndFlipCommandBuffers (#4038)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* There is a mountain of evidence suggesting that flip_arg for these functions should be a 64-bit integer.

This fixes "memory" errors in some Unity titles.

* oops

* Fix sceVideoOutGetEventData

This bug went unnoticed for a while because the selection of Unity games I had at the time didn't actually care.
This + the prior fix is needed for Unity titles.
2026-02-15 09:29:33 +02:00
Valdis Bogdāns
0f92285e50
GR2-win-crash-fix (#4033)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* Improve stack clearing logic in ExecuteGuest

Added a check for fiber stacks before clearing the stack in ExecuteGuest.
That fixes Gravity Rush 2 crash on Windows.

* Refactor ExecuteGuest to simplify stack clearing logic

This enough for GR2

* Recover thread initialization in ExecuteGuest function

* Enhance null check for thread control block

* Fix condition to check tcb before clearing stack
2026-02-14 23:30:09 +02:00