Commit graph

2816 commits

Author SHA1 Message Date
squidbus
0c6f2b470f
renderer_vulkan: Use more depth-stencil dynamic state. (#2749) 2025-04-05 23:14:27 +03:00
squidbus
54b4d7fc78
build: Target same CPU architecture level as PS4. (#2745) 2025-04-04 15:13:13 +03:00
squidbus
1ee2016902 doc: Update README macOS details 2025-04-03 12:44:16 -07:00
georgemoralis
7bb49d85d3
New Crowdin updates (#2724)
* New translations en_us.ts (Arabic)

* New translations en_us.ts (Albanian)

* New translations en_us.ts (German)
2025-04-03 22:43:04 +03:00
squidbus
806b2ddc89
cpu_patches: Remove CPU patches for macOS and bump minimum OS version to 15.4 (#2743)
* cpu_patches: Remove CPU patches for macOS and bump minimum OS version to 15.4

* cpu_patches: Remove BMI1 patches

These are now only good for very old Intel CPUs that:
* Still do not currently function due to other CPU instruction issues.
* Will probably be too slow to run shadPS4 well.
2025-04-03 22:39:08 +03:00
squidbus
afd0251dd2
shader_recompiler: Use VK_AMD_shader_trinary_minmax when available. (#2739)
* shader_recompiler: Use VK_AMD_shader_trinary_minmax when available.

* shader_recompiler: Simplify signed/unsigned trinary instruction variants.
2025-04-02 23:36:54 +03:00
Stephen Miller
eb300d0aa7
libraries: Proper ulobjmgr stubs (#2740)
* Better ulobjmgr stubs

Main goal is to stop all the Unknown stub spam in titles using libSceUlt.

* Address review comments

* Update ulobjmgr.cpp
2025-04-02 02:41:40 +02:00
Stephen Miller
f6cc245e40
Only log fd warning if there's a file getting closed (#2737) 2025-04-01 13:36:31 -07:00
georgemoralis
9ee5d066a2 hotfix: issue with cmake 4 2025-04-01 13:22:32 +03:00
Stephen Miller
01243fb8e5
Fix libSceNgs2 HLE regressions (#2732)
* Fix sceNgs2SystemCreateWithAllocator

The cause of the exceptions without libraries.

* Remove error handling for unimplemented functions

Since nothing exists to create any VoiceHandle or RackHandle, we were consistently hitting those error returns.
Also promotes logs for stubbed functions back to LOG_ERROR, with the exception of two functions that get spammed pretty frequently.

* Use Core::ExecuteGuest to execute allocator alloc and free

* Clang

* Fix function definitions in ngs2.h

These should be using the SYSV ABI

* Fix function defs in ngs2_impl.h

This will (hopefully) fix compilation

* Clang

* Clang

again
2025-04-01 08:57:47 +03:00
Alexandre Bouvier
a2a1ecde0a
cmake: fix system libusb discovery (#2731) 2025-03-31 22:29:52 +03:00
Alexandre Bouvier
a5958bf7f0
cmake: remove leftover from #2707 (#2730) 2025-03-31 22:29:24 +03:00
Joshua de Reeper
7533206d89
usbd: Implement libusb passthrough (#2271)
* usbd: Implement libusb passthrough

* clang-format

* only do kernel activities on non-windows

* use variable to represent "fake" windows kernel driver

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2025-03-31 18:55:21 +03:00
Stephen Miller
b0a12c02e1
Add S_SETPRIO to EmitFlowControl (#2727)
By squidbus' suggestion, I've added a warning log for this case.
2025-03-31 12:55:14 +03:00
Stephen Miller
374b66ad8e
Emulate sceKernelInternalMemory mapping (#2726)
* Emulate sceKernelInternalMemory mapping

This fixes the early crash in CUSA07820 (The Last of Us™ Part II).

* Fix name
2025-03-31 00:27:12 +03:00
squidbus
f85d8df71e
vulkan: Lower list primitive restart warning to debug log. (#2725) 2025-03-30 22:02:33 +03:00
georgemoralis
a707d31a4c
New Crowdin updates (#2722)
* New translations en_us.ts (Albanian)

* New translations en_us.ts (Swedish)

* New translations en_us.ts (Polish)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Spanish)

* New translations en_us.ts (Romanian)

* New translations en_us.ts (French)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Danish)

* New translations en_us.ts (German)

* New translations en_us.ts (Greek)

* New translations en_us.ts (Finnish)

* New translations en_us.ts (Hungarian)

* New translations en_us.ts (Italian)

* New translations en_us.ts (Japanese)

* New translations en_us.ts (Korean)

* New translations en_us.ts (Lithuanian)

* New translations en_us.ts (Dutch)

* New translations en_us.ts (Portuguese)

* New translations en_us.ts (Russian)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (Ukrainian)

* New translations en_us.ts (Chinese Simplified)

* New translations en_us.ts (Chinese Traditional)

* New translations en_us.ts (Vietnamese)

* New translations en_us.ts (Indonesian)

* New translations en_us.ts (Persian)

* New translations en_us.ts (Norwegian Bokmal)

* New translations en_us.ts (Arabic)
2025-03-30 15:37:16 +03:00
kalaposfos13
f1e0a096d5
casually testing in production (#2718) 2025-03-30 15:37:00 +03:00
georgemoralis
3f33d218b3
New Crowdin updates (#2715)
* New translations en_us.ts (Italian)

* New translations en_us.ts (Ukrainian)

* New translations en_us.ts (Ukrainian)
2025-03-30 01:28:02 +02:00
Stephen Miller
99b90cbd5c
Minor libkernel changes (#2721)
* sceKernelDebugOutText

Some homebrew use this for logging, and these logs do show up in console klogs.
I wasn't sure where the most suitable place for this function would be, so I made a separate file for these debug functions.

* Implement kernel exit

Some homebrew I have use this exit when an error occurs. Since actually closing the emulator isn't implemented yet, I've used an unreachable message that logs the status code.
I've placed it in process.cpp for now, let me know if I should change that.

* Improved implementations for sceKernelDebugRaiseException functions

These functions take in two parameters, an error code and some other value that I have no idea what is for. If that second parameter is not zero, they return ORBIS_KERNEL_ERROR_EINVAL before any calls to mdbg_service.
These improved implementations add the early error return and a message with the error code to the unreachable.

* Add missing exports

Homebrew apps like to use these kernel exports of posix functions instead.

* Clang
2025-03-30 01:27:33 +02:00
DanielSvoboda
bad82e7204
Fix Translation on Button in MainWindow (#2720) 2025-03-30 00:50:41 +02:00
Missake212
faae1218fa
Getting rid of the "Separate Update Folder" option (#2719)
* real fix this time ?

* should be all of it

* Update en_US.ts
2025-03-30 00:50:22 +02:00
Missake212
064c3161c3
real fix this time ? (#2717) 2025-03-29 17:58:10 +02:00
kalaposfos13
8122f8ecbf
Diplay PR actions as pr-{number}-{branchname} (#2713) 2025-03-29 12:30:59 +02:00
georgemoralis
9dbc79dc96
New Crowdin updates (#2705)
* New translations en_us.ts (Albanian)

* New translations en_us.ts (Swedish)

* New translations en_us.ts (Polish)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Spanish)

* New translations en_us.ts (Romanian)

* New translations en_us.ts (French)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Danish)

* New translations en_us.ts (German)

* New translations en_us.ts (Greek)

* New translations en_us.ts (Finnish)

* New translations en_us.ts (Hungarian)

* New translations en_us.ts (Italian)

* New translations en_us.ts (Japanese)

* New translations en_us.ts (Korean)

* New translations en_us.ts (Lithuanian)

* New translations en_us.ts (Dutch)

* New translations en_us.ts (Portuguese)

* New translations en_us.ts (Russian)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (Ukrainian)

* New translations en_us.ts (Chinese Simplified)

* New translations en_us.ts (Chinese Traditional)

* New translations en_us.ts (Vietnamese)

* New translations en_us.ts (Indonesian)

* New translations en_us.ts (Persian)

* New translations en_us.ts (Norwegian Bokmal)

* New translations en_us.ts (Swedish)

* New translations en_us.ts (French)

* New translations en_us.ts (Indonesian)

* New translations en_us.ts (Spanish)

* New translations en_us.ts (Norwegian Bokmal)
2025-03-29 11:03:40 +02:00
Missake212
df9151481c
Fix the "Open Update Folder" for folders ending with "-patch" (#2712)
* fix open update folder

* Update gui_context_menus.h
2025-03-29 10:32:57 +02:00
squidbus
be7d646e83
externals: Remove need for cryptopp build. (#2707) 2025-03-29 10:32:06 +02:00
Ked
78c8bca2bb
Fix support for unicode paths for game install directories (#2699)
* Slightly changed how allInstallDirsDisabled is determined

* Show a dialog only if no game directories are set

* Changed a comment

* Fixed formatting

* Support for unicode paths for game install directories

* Fixed game picture path conversion
2025-03-28 23:14:52 +02:00
georgemoralis
751a23af0f
[ci skip] Qt GUI: Update Translation. (#2703)
Co-authored-by: georgemoralis <4313123+georgemoralis@users.noreply.github.com>
2025-03-28 19:49:04 +02:00
georgemoralis
501f46e515
New Crowdin updates (#2695)
* New translations en_us.ts (Albanian)

* New translations en_us.ts (Polish)

* New translations en_us.ts (Spanish)

* New translations en_us.ts (Romanian)

* New translations en_us.ts (French)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Danish)

* New translations en_us.ts (German)

* New translations en_us.ts (Greek)

* New translations en_us.ts (Finnish)

* New translations en_us.ts (Hungarian)

* New translations en_us.ts (Italian)

* New translations en_us.ts (Japanese)

* New translations en_us.ts (Korean)

* New translations en_us.ts (Lithuanian)

* New translations en_us.ts (Dutch)

* New translations en_us.ts (Portuguese)

* New translations en_us.ts (Russian)

* New translations en_us.ts (Swedish)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (Ukrainian)

* New translations en_us.ts (Chinese Simplified)

* New translations en_us.ts (Chinese Traditional)

* New translations en_us.ts (Vietnamese)

* New translations en_us.ts (Indonesian)

* New translations en_us.ts (Persian)

* New translations en_us.ts (Norwegian Bokmal)

* New translations en_us.ts (Chinese Simplified)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Russian)

* New translations en_us.ts (Finnish)

* New translations en_us.ts (Finnish)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Arabic)
2025-03-28 19:48:23 +02:00
squidbus
31e1d4f839
misc: Remove dead code. (#2702) 2025-03-28 10:32:17 -07:00
IndecisiveTurtle
be22674f8c code: Remove fpkg code
Signed-off-by: georgemoralis <giorgosmrls@gmail.com>
2025-03-28 16:40:35 +02:00
Missake212
d339b3f7d6
change async to sync (#2698) 2025-03-27 22:40:40 +02:00
kalaposfos13
602de0c370
Fork detection: Fix PR actions only showing HEAD as the branch name (#2697)
* I'd be very surprised if this works 1st try

* More logging and cleanup

* Minor fixes
2025-03-27 22:40:15 +02:00
georgemoralis
c96853816a
[ci skip] Qt GUI: Update Translation. (#2692)
Co-authored-by: georgemoralis <4313123+georgemoralis@users.noreply.github.com>
2025-03-27 12:14:09 +02:00
georgemoralis
437af93201
New translations en_us.ts (Chinese Traditional) (#2691) 2025-03-26 23:51:17 +02:00
Dmugetsu
ae2c9a745e
Gui: Adding Pause button working, full screen button and labels to buttons on main window gui (#2634)
* Adding names to gui buttoms and adjusting spacing.

* moving refresh button to last slot.

* Changing the implementation to tooltips for hover over them - qstring to detect background color.

* Fixing some themes with inverted tooltip base

* Suggestions / Fixes - Pause and FullScreen Buttons

* Update REUSE.toml

* cleaning up

* Icons stuff

* clang

* Buttons toggle - Cleaning code - Fixing Icons

* cleaning boolean

* Toggle pause and play icons and label to "Resume" when paused.

* Simplifying the toggles.

* New icons and final Push to review

* Reuse

* Icon rename, adding f9 press for pause game when no gui is on without needed of debug menu

* clang + reuse

* clang dosent work on this part

* again Clang

* Last fix for review. Light theme white resume icon fix.

* Proper fix for Resume icon

* New Rebase

* Fixed Orientation with docking issues and cleaning boxlayout code

* Adding spacer to separate actions, sizeslider on top of search bar. And adding margins

* Fixed Background not showing on OLED Theme

* Fixing check marks

* Adding all Daniel Suggestions and fixed F9 not working with debug menu open.

* Clang

* reverting all OLED theme changes

* Final suggestions
2025-03-26 23:50:52 +02:00
kalaposfos13
5caab76a45
Implement DmaDataSrc::MemoryUsingL2 and DmaDataDst::MemoryUsingL2 (#2680)
* Implement DmaDataSrc::MemoryUsingL2 and DmaDataDst::MemoryUsingL2

* Add L2 handling to the other place it's used
2025-03-26 23:03:50 +02:00
illusion0001
9c37aa039b
Add isDevKit bool (#2685) 2025-03-26 22:50:21 +02:00
Lizardy
3abe5b0d57
[Libs] Ngs2 (#1604)
* [libSceNgs2] Logging & Structs

* clang

* clang

* stdarg incl

* proper logs

* ngs2 latest

* [libSceNgs2] Logging & Structs

* clang

* latest

* fix includes

* clang

* clang

---------

Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com>
2025-03-26 18:42:49 +02:00
georgemoralis
90b949b8ce
New Crowdin updates (#2679)
* New translations en_us.ts (Albanian)

* New translations en_us.ts (Swedish)

* New translations en_us.ts (Polish)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Spanish)

* New translations en_us.ts (Romanian)

* New translations en_us.ts (French)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Danish)

* New translations en_us.ts (German)

* New translations en_us.ts (Greek)

* New translations en_us.ts (Finnish)

* New translations en_us.ts (Hungarian)

* New translations en_us.ts (Italian)

* New translations en_us.ts (Japanese)

* New translations en_us.ts (Korean)

* New translations en_us.ts (Lithuanian)

* New translations en_us.ts (Dutch)

* New translations en_us.ts (Portuguese)

* New translations en_us.ts (Russian)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (Ukrainian)

* New translations en_us.ts (Chinese Simplified)

* New translations en_us.ts (Chinese Traditional)

* New translations en_us.ts (Vietnamese)

* New translations en_us.ts (Indonesian)

* New translations en_us.ts (Persian)

* New translations en_us.ts (Norwegian Bokmal)

* New translations en_us.ts (Russian)

* New translations en_us.ts (Chinese Simplified)

* New translations en_us.ts (Swedish)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Lithuanian)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Norwegian Bokmal)

* New translations en_us.ts (Portuguese)

* New translations en_us.ts (Portuguese)

* New translations en_us.ts (Portuguese)

* New translations en_us.ts (Albanian)

* New translations en_us.ts (Spanish)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Arabic)

* New translations en_us.ts (Polish)

* New translations en_us.ts (Polish)

* New translations en_us.ts (Arabic)
2025-03-26 18:04:49 +02:00
Ked
69cb4d5787
Show a dialog only if no game directories are set (#2690)
* Slightly changed how allInstallDirsDisabled is determined

* Show a dialog only if no game directories are set

* Changed a comment

* Fixed formatting
2025-03-26 18:04:05 +02:00
Stephen Miller
d8204641fa
libkernel: Filesystem code cleanup (#2554)
* sceKernelOpen: Clean up flag handling

* sceKernelOpen: fix params

Based on decompilation, the second parameter of _open should be flags.
Additionally swaps the return and parameter types to align with our current standards.

* sceKernelOpen: Fix errors

Based on POSIX spec, if part of the path is missing, ENOENT is the correct return.
Additionally, decompilation suggests that open sets errno too.

* Fix exports

Fixes function exports to align with what they should be, based on what I've seen from decompilation and our module generator.

* Proper errno behavior on open

Since sceKernelOpen calls posix_open, errno should be set during this process.
Simplest way to handle that is to move the actual open code to posix_open and adjust error cases accordingly.

* Reorganize open calls, add error log

* Improve close

Removes the EPERM return, as it makes no sense, and swaps sceKernelClose with posix_close to properly emulate errno behavior.

* Fix log on close

* posix_open fixups

* Readd hack in posix_close

It's either this, or removing LLE DiscMap.
Or shadow implements posix sockets.

* Missing exports

Commented out while I gradually work through them all

* Remaining placeholder exports

* Swap some stuff around

I see nothing that suggests "open" only takes two parameters, so this should be completely safe.
It's also more accurate to how these are handled in libkernel, and means I won't need to reorganize anything for readv and writev.

* Update file_system.cpp

* Implement write and posix_write

* Oops

* Implement posix_readv and sceKernelReadv

Also fixes error behavior on readv, as that function shouldn't be returning any kernel error codes.

* Move sceKernelUnlink

Will deal with this one later, was just annoyed by how it's location doesn't align with the export order.

* Cleanup readv

* Implement posix_writev and sceKernelWritev

Also fixes error behavior on writev, since it shouldn't ever return kernel errors (since our device files return those)

* More cleanup on older functions

* Swap around sceKernelLseek and posix_lseek

This ensures that these have the correct error behavior, and makes their behavior align with the updated implementations for earlier functions.

* Update file_system.cpp

* Implement read

Also fixes error behavior

* Swap sceKernelMkdir and posix_mkdir

Fixes errno behavior on kernel calls, also fixed some incorrect error returns.

* Fix errno behavior on sceKernelRmdir

Also reduces function logging to bring it closer to the level of logging seen in other filesystem functions.

* Slight clean up of sceKernelStat

Fixes error behavior and changes some of the old data types.

* Refactor fstat

Fixes errno behavior, implements fstat, and shifts exports around based on file position.
Might reorganize function locations later though.

* Implement posix_ftruncate

Implements posix_ftruncate and fixes errno behavior for sceKernelFtruncate

* Add missing error conversions for more device functions

* Implement posix_rename, fix sceKernelRename errno behavior

* Add posix_preadv and posix_pread

Also fixes some incorrect error returns, fixes errno behavior, and removes an unnecessary hack.

* Fix compile

* Implement posix_getdents, getdirentries, and posix_getdirentries

Also fixes errno behavior for the kernel variants of these functions.

* Fix errno behavior of sceKernelFsync

* Implement posix_pwrite and posix_unlink

Also fixes errno behavior in related functions.

* Update file_system.cpp

* Remove SetPosixErrno

Ideally, we've handled all possible error conditions before calling these functions, so treat errors in platform-specific code as IO errors and return POSIX_EIO instead.

* Update header exports

Not sure where these get used, but might as well keep them consistent with the rest of this.

* Check if file exists before calling platform-specific code

Bloodborne checks if a file doesn't exist using open, checking if it specifically failed with error code ENOENT. To avoid working with platform-specific errnos, add a proper error return for if the file doesn't exist.
Fixes a regression in Bloodborne.

* Clang

Out of all the changes, this is apparently the only thing Clang-Format doesn't like.
I'm honestly surprised.

* Improve error checks on posix_unlink

Just because a file isn't opened doesn't mean the file doesn't exist.
Fixes the error returned if host_path.empty(), and removes the error return for when GetFile fails.

* Fix the Bloodborne fix

* Limit exports to tested functions

* More confirmed working exports

* Remaining stuff my games can test

* FS exports from firmware tests

* Bring back missing exports from main

I don't have any bootable things that call these, but since they were working well enough on main, they should be fine to readd.

* Add export for posix_pread

Spotted in Dreams a while back, might as well add it.

* Revert "Remove SetPosixErrno"

This reverts commit bdfc0c246c.

* Revert SetPosixErrno changes

shadow's using it for posix sockets, so significant modifications would introduce unnecessary merge conflicts.

* Update comment

* Add EACCES errno to SetPosixErrno

Seen in Gravity Rush.
Also reorganizes the switch case based on the posix errno value, since ordering by errno makes no sense on some OSes.

* More export fixups

Missed these during my initial pass through FS stuff because they were in kernel.cpp for some reason.

* Symbols from FS tests

Tested by messing around with firmware elfs, these atleast don't cause any crashes.

* Remove inaccurate error behavior

Seek can have offsets past the end of a file.
Also add logging for two valid whence values that are unsupported on Windows.
I'll need to verify that SEEK_HOLE and SEEK_DATA correspond to 3 and 4 respectively, I've yet to check source to verify.

* Fix error log

Oops

* Clang

Clang

* Remove close hack

Since LLE libSceDiscMap is no longer a concern, this hack shouldn't be needed.
Since sockets are still stubbed, and close can be used on sockets, I've added a warning log just in case this still occurs in some titles.

* Change SetPosixErrno unreachable to warning

I changed it to an unreachable in an earlier commit to make testing easier.
At this point, having an unreachable for this seems unnecessary, so change it to a warning instead.

* Remove Bloodborne hack

Games should be able to unlink files that aren't opened file descriptors. As far as I've tested, this doesn't break Bloodborne.
2025-03-26 18:03:35 +02:00
Ked
7d0631cf26
Slightly changed how allInstallDirsDisabled is determined (#2688) 2025-03-26 14:35:43 +02:00
kalaposfos13
a1ec8b0a88
Handle compute packets that are split between the ends of two command buffers (#2476)
* Squashed initial implementation

* Logging for checking if buffers are memory contiguous

* Add check to see if first instruction is valid in the next buffer to avoid false positives

* Oof

* Replace old code with IndecisiveTurtle's new, better implementation

* Add `unlikely` keyword to the split packet handling branches

Co-authored-by: TheTurtle <47210458+raphaelthegreat@users.noreply.github.com>

---------

Co-authored-by: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com>
2025-03-26 00:01:21 +02:00
georgemoralis
5c72030fb8
HLE discmap (#2686)
* HLE discmap

* improved parameters naming

* fixed typo
2025-03-25 23:54:32 +02:00
mailwl
1908d26093
lseek: let the host OS set lseek errors (#2370)
* Fix lseek(fd, -1, SEEK_SET) for XNA

* be sure, if seek really return error

* refactoring

* let host os set lseek errors
2025-03-24 15:51:36 +02:00
DanielSvoboda
16a68d78eb
Trophy Viewer - Select Game (#2678)
* Trophy Viewer - Select Game

* TR - Button in Utils +icon

TR - Button in Utils +icon
I also made a small correction to the game folder list, where the checkboxes were being filled in incorrectly.
2025-03-24 10:25:51 +02:00
georgemoralis
4f8e5dfd7c
New Crowdin updates (#2671)
* New translations en_us.ts (German)

* New translations en_us.ts (German)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (Turkish)

* New translations en_us.ts (Norwegian Bokmal)
2025-03-24 10:25:37 +02:00
DanielSvoboda
10bf3d383c
QT: Fix PR 2662 (#2676) 2025-03-23 23:25:11 +02:00