Stephen Miller
801687da3f
Update file_system.cpp
2025-02-17 18:10:16 -06:00
Stephen Miller
475c42bc38
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.
2025-02-17 18:09:36 -06:00
Stephen Miller
ba1c5bdc8f
Remaining placeholder exports
2025-02-17 18:01:53 -06:00
Stephen Miller
534f50ba09
Missing exports
...
Commented out while I gradually work through them all
2025-02-17 15:50:48 -06:00
Stephen Miller
55790e37e8
Readd hack in posix_close
...
It's either this, or removing LLE DiscMap.
Or shadow implements posix sockets.
2025-02-17 15:22:16 -06:00
Stephen Miller
671cbfbbd0
posix_open fixups
2025-02-17 15:21:35 -06:00
Stephen Miller
4a4589a1e9
Fix log on close
2025-02-17 15:11:28 -06:00
Stephen Miller
fb8883dcea
Improve close
...
Removes the EPERM return, as it makes no sense, and swaps sceKernelClose with posix_close to properly emulate errno behavior.
2025-02-17 15:05:45 -06:00
Stephen Miller
281a07e911
Reorganize open calls, add error log
2025-02-17 15:04:27 -06:00
Stephen Miller
84c3bdb140
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.
2025-02-17 14:54:29 -06:00
Stephen Miller
9db2f6eccb
Fix exports
...
Fixes function exports to align with what they should be, based on what I've seen from decompilation and our module generator.
2025-02-14 18:58:25 -06:00
Stephen Miller
3a6834113e
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.
2025-02-14 18:57:01 -06:00
Stephen Miller
8b2ec07154
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.
2025-02-14 18:54:57 -06:00
Stephen Miller
e29e3f1985
sceKernelOpen: Clean up flag handling
2025-02-14 18:53:35 -06:00
squidbus
7624e9482c
memory: Log for sceKernelMapNamedDirectMemory in more cases. ( #2404 )
2025-02-12 19:04:58 +02:00
Stephen Miller
b51c767296
Better bounds checks for sceKernelDlsym ( #2394 )
...
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Unity, being the awful game engine it is, checks for a return value of zero to determine if sceKernelLoadStartModule failed. This results in it throwing an error code into sceKernelDlsym's handle parameter when the module it's searching for doesn't exist.
2025-02-09 19:31:07 -08:00
Stephen Miller
22357f70c2
Improve parameter checks for posix_pthread_rename_np ( #2391 )
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2025-02-09 13:50:59 -08:00
Stephen Miller
e757063d31
Improved error handling in sceKernelAllocateDirectMemory ( #2037 )
...
* Handle errors in sceKernelAllocateDirectMemory
* Improve accuracy of error cases
Some of our existing cases are normally EAGAIN returns.
* Improve logging on errors
* Clang
* TEMPORARY HACK FOR NBA TESTS
This will be removed before this PR is marked as ready, and is only here to make sure the other NBA games (and perhaps DOA3) work if some missing init behavior is handled.
* Revert "TEMPORARY HACK FOR NBA TESTS"
This reverts commit a0e27b0229 .
* Change error message
2025-02-05 17:21:05 +02:00
Stephen Miller
8ad650582a
Fix VideoOut events ( #2330 )
...
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* Fix event data for VideoOut events
Fix is based on some decompilation work shared by red_prig.
* Cleanup
* Oops
* Style fixes
* Clang
* Fix libSceVideoOut event idents
Based on some decompilation work, events coming from libSceVideoOut use a separate set of values for identifiers. These values are only converted to OrbisVideoOutEventId values during calls to sceVideoOutGetEventId.
For convenience, I've placed all relevant identifiers into a enum called OrbisVideoOutInternalEventId.
Thanks to @red_prig for the tips.
* Fix?
Seems like `static_cast<u32>(hint) & 0xFF == event.ident` here, and doing those right shifts on the event.ident winds up breaking stuff.
Without this change, the if always fails because event_id was getting set to 0 instead.
* Clang
2025-02-03 17:37:28 +02:00
hspir404
c5cd4bc5cf
Remove log line that was consuming as much as 0.6ms frame time ( #2335 )
2025-02-03 02:37:11 -08:00
georgemoralis
8aea0fc7ee
Revert "libkernel: handle special case in path for load module ( #2269 )" ( #2298 )
...
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
This reverts commit ec0cf25097 .
2025-01-31 12:54:16 +02:00
panzone91
ec0cf25097
libkernel: handle special case in path for load module ( #2269 )
...
* libkernel: handle special case for load module
* fix linting
2025-01-31 10:51:03 +02:00
polyproxy
5c62a00134
clang-format (again)
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2025-01-21 21:14:05 +01:00
polyproxy
3563b88d8c
hotfix: use logger device on stdin
2025-01-21 19:28:39 +01:00
georgemoralis
a7d45231b7
Filesystem devices ( #2184 )
...
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
* added dummy devices
* More WIP
* added urandom,srandom,random,console,deci_tty6 devices
* small fix
* macOS fix
2025-01-19 10:44:57 -03:00
Ian Maclachlan
a5440e0e43
Update kernel.cpp ( #2125 )
...
In kernel.cpp boost io_context.reset() deprecated/discontinued in latest versions. Changed to io_context.restart() as recommended.
2025-01-17 22:16:07 -08:00
Stephen Miller
440a693fae
Crash on sceKernelDebugRaiseExceptionOnReleaseMode ( #2163 )
2025-01-16 18:22:39 +01:00
georgemoralis
4695aaa830
sceKernelAio* implementation ( #2160 )
...
* draft Aio from https://github.com/GoldHEN/GoldHEN_Plugins_Repository
* cleanup and fixes to Aio
2025-01-16 18:27:52 +02:00
Stephen Miller
5a7d45fdfa
Missing pthread exports ( #2144 )
2025-01-15 18:37:20 +03:00
Stephen Miller
8a309c30a9
Check thread param on posix_pthread_rename_np ( #2133 )
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2025-01-12 11:24:49 +02:00
squidbus
8f5bcb0f1c
file_sys: Consolidate separate update directory handling. ( #2041 )
2025-01-08 13:23:40 +02:00
squidbus
af8c748e9c
elf_info: Fix GCC build. ( #2089 )
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2025-01-07 17:37:08 +02:00
psucien
ddc658f8c8
clang-format
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2025-01-04 00:32:17 +01:00
squidbus
7153bc8d8f
kernel: Check PSF for neo mode support. ( #2028 )
2025-01-04 00:29:09 +01:00
polyproxy
55ccec4a38
fix typos
2025-01-02 18:40:10 +01:00
polyproxy
1926900945
hotfix: reset stop source on thread stop
2025-01-02 12:30:05 +01:00
psucien
40211642ca
kernel: memory: PRT mapped area setter/getter
2025-01-01 21:04:59 +01:00
psucien
174b5c0f95
kernel: equeue: added missing sceKernelDeleteHRTimerEvent
2024-12-31 17:24:56 +01:00
squidbus
f41829707d
equeue: Fix regression from Filter type. ( #1992 )
2024-12-31 12:16:26 +02:00
Stephen Miller
9091223396
Fix sceKernelGetEventFilter ( #1987 )
2024-12-31 05:59:14 +02:00
squidbus
248220fef3
pthread: Change minimum stack for HLE to additional stack. ( #1960 )
2024-12-29 12:37:37 +02:00
polybiusproxy
817a62468e
core: better memory configuration ( #1896 )
2024-12-28 12:03:00 +01:00
squidbus
333f35ef25
audio: Implement cubeb audio out backend. ( #1895 )
...
* audio: Implement cubeb audio out backend.
* cubeb_audio: Add some additional safety checks.
* cubeb_audio: Add debug logging callback.
* audioout: Refactor backend ports into class.
* pthread: Bump minimum stack size to fix cubeb crash.
* cubeb_audio: Replace output yield loop with condvar.
* common: Rename ring_buffer_base to RingBuffer.
2024-12-27 21:04:49 +02:00
Nenkai
f95803664b
equeue: sceGnmGetEqEventType/sceKernelGetEventData impl ( #1839 )
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-12-27 20:33:45 +02:00
squidbus
95638d5ca5
exception: Fix raising exceptions on POSIX systems ( #1868 )
2024-12-25 00:21:32 +02:00
IndecisiveTurtle
8f7eb2d0e9
semaphore: Attempt to acquire before checking timeout
...
* The posix specification says that if the object can be acquired immediately, timeout doesnt matter
2024-12-24 15:39:17 +02:00
Daniel R.
c284cf72e1
Switch remaining CRLF terminated files to LF
2024-12-24 13:56:31 +01:00
Daniel R.
2c0f986c52
core/libraries: HLE fiber reimplementation ( #1836 )
2024-12-24 13:33:00 +01:00
psucien
43fd8fa44a
hot-fix: macos release build
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 / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
2024-12-22 23:11:16 +01:00
georgemoralis
b0b74243af
clang-fix
2024-12-19 10:25:03 +02:00