Commit graph

3456 commits

Author SHA1 Message Date
Eladash 11ab9b7fa9
Fix sys_event_flag_wait result set (#10404)
Set result upon syscall exit, not at the beginning.
2021-06-05 16:41:02 +03:00
Megamouse ac83871214 impressive typo fix 2021-05-31 23:01:13 +03:00
Ani a49446c9e9
Replace gsl::span for std::span (c++20) (#7531)
* Replace gsl::span for std::span (c++20)
* Replace gsl::byte with std::byte

Co-authored-by: Bevan Weiss <bevan.weiss@gmail.com>
2021-05-30 17:10:46 +03:00
Eladash d81a5b1423 SPU LLVM: Add missing WRCH PC updates 2021-05-29 15:26:52 +03:00
Megamouse a2da525064 cellVdec: silence "Unsupported time_base" error log spam 2021-05-29 12:46:21 +02:00
Malcolm Jestadt 7c2b08b9b6 SPU LLVM: Expand branch optimizations for more instructions 2021-05-29 13:07:35 +03:00
Eladash 7d89938624 cellPad: do not use recusrive mutex 2021-05-28 20:25:16 +03:00
Eladash f103004aa0
sys_prx/overlay: Fix disambiguator of module names opened by FD (#10340)
Don't append zero offset.
2021-05-26 23:38:17 +03:00
Eladash 44f0ca08e2 Simplify PPU exit 2021-05-25 22:47:23 +03:00
Eladash 9ba3e6d3f7 sys_mmapper: Fix IPC-enabled instances memory consumption 2021-05-24 23:16:06 +03:00
Nekotekina 2491aad6f2 types.hpp: implement min_v<>, max_v<>, SignedInt, UnsignedInt, FPInt concepts
Restrict smax to only work with signed values for consistency.
Cleanup <climits> includes.
Cleanup <limits> includes.
2021-05-23 19:43:51 +03:00
Eladash 309759b725 kernel-explorer: Save self mem-container ID and use it 2021-05-23 05:37:37 +03:00
Nekotekina 160b131de3 types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.

Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Eladash dcfd29c2d9 kernel-explorer: Implement PPU scheduler state information 2021-05-21 18:12:36 +02:00
Eladash 48870f3e8b TROPUSR: Loader Improvements
* Replace invalid TROPUSR.DAT with empty new ones. (+report an error)
* Fix return code of Load whenever TROPUSR.DAT hadn't existed before.
* Add header magic test.
* sceNpTrophyRegisterContext will abort if TROPUSR.DAT generation failed.
2021-05-21 16:43:34 +03:00
Eladash 0811d2d527 Fix bug of sys_rsx_context_attribute
Mistake of reversing.
2021-05-20 09:25:51 +03:00
Eladash 3abf14beef Update sys_rsx_context_attribute 2021-05-20 09:25:51 +03:00
Eladash 638f20c80f Improve get_current_cpu_thread() 2021-05-20 09:25:51 +03:00
Nekotekina 1d0f6eebdc Improve error_code (new formatting constructor)
Minor cleanup in formatting utilities.
2021-05-19 22:41:16 +03:00
Nekotekina 8217840acc Simplify error_code class
Remove "not an error" detection trait. Use fixed CellNotAnError class.
Use constructor overload to disable reporting it.
2021-05-19 00:48:45 +03:00
Malcolm Jestadt 52780e65e7 SPU LLVM: Optimize branching
- Detect a pattern where vpmovmskb and a check against the sign bit can be used instead of checking against zero
2021-05-17 16:59:20 +03:00
Eladash 57cd4ff3c6
Move HLE table address to FXO (#10284) 2021-05-17 14:22:27 +03:00
Eladash 2e28e2d293 lv2: Fix overflows of periodic timers 2021-05-17 13:17:45 +03:00
Eladash 7a9a46e093 kernel-explorer: Implement SPU ports/interrupt tags information 2021-05-15 09:00:12 +03:00
Eladash 8bd58b1ad4 Remove lv2_event_queue::check(weak_ptr) 2021-05-15 00:31:14 +03:00
Eladash c681395fb2 sys_interrupt: weak_ptr -> shared_ptr 2021-05-15 00:31:14 +03:00
Eladash 33580e0aa1 sys_timer: weak_ptr -> shared_ptr 2021-05-15 00:31:14 +03:00
Eladash 47436bd774 sys_spu: weak_ptr -> shared_ptr 2021-05-15 00:31:14 +03:00
Eladash a992a5fba9 cellAudio: weak_ptr -> shared_ptr 2021-05-15 00:31:14 +03:00
Eladash 56471f4ad4 SPU: Optimize SPU ports/queues 2021-05-15 00:31:14 +03:00
Eladash cacb852a1e Emulation stopping bugfix 2021-05-14 15:35:07 +03:00
Nekotekina 6dca588370 SPU LLVM: improve MPYH instruction
Rewritten to use 16-bit multiplication, as in SPU ASMJIT.
2021-05-13 23:16:53 +03:00
Nekotekina 8ae727ca04 lv2_obj::create: fix pessimizing move
Could have been preventing copy elision.
2021-05-13 10:23:33 +03:00
Eladash acded1e08a
rsx: Move sys_rsx info to rsx::thread (#10258) 2021-05-09 19:16:14 +01:00
Eladash 31b55e0030 event queue: Structure size efficiency 2021-05-09 10:58:14 +03:00
Eladash 1e1880893a sys_interrupt: Save ID of self tag/handler 2021-05-09 10:58:14 +03:00
Eladash 363cc60c82 sys_event: Save ID of self event queue 2021-05-09 10:58:14 +03:00
Eladash 64997662d2 LV2: Fixup for IPC
* Fix typo in lv2_obj::create.
* Always save ipc_key as 0 for non-shared object creations, regardless of thbe value set by creation attribute.
* Show IPC key of shared memory (sys_mmapper) memory objects in kernel explorer.
2021-05-07 14:58:22 +03:00
Eladash 900ebf6583
sys_event: Typo fix (#10246) 2021-05-07 09:34:25 +01:00
Eladash 7b6482c01d
LV2: Improve IPC support (#10206)
* Remove custom event queue's IPC management of favour of universal LV2 approach.
* Move ipc_manager to FXO.
* Fix ipc_manager internal storage memory leak: deallocate entry when IPC object destroyed.
* Rewrite lv2_obj::create to be simpler (remove many duplicated code).
* Always execute lv2_obj::create under both IPC and IDM mutexes at once (not in non-atomic single-steps). Fixing potential case where concurrency can cause IDM to contain 2 or more different objects with the same IPC key with SYS_SYNC_NOT_CARE (instead of the same object).
* Do not rely on smart ptr reference count to tell if the object exists. Use similar approach as event queues as it makes error checkings accurate.
* Optimize lv2_event_port by using std::shared_ptr for queue which wasn't allowed before.
2021-05-07 09:58:30 +03:00
Eladash 0224c7a9eb SPU TG: Simplify state of saved SPU image data
Save only entry points instead of sys_spu_image structure.
2021-05-01 19:43:00 +03:00
Eladash daa53b77cf Simplify named_thread construction 2021-05-01 18:08:03 +03:00
Megamouse 3c37036f7a save-overlays: add entry size info 2021-04-30 00:30:26 +02:00
Megamouse 14b6d6291b save-overlays: add localization 2021-04-30 00:30:26 +02:00
Megamouse 11f57f259c cellSaveData: keep focus after confirmation cancel
It was very annoying to be thrown to beginning of the list after cancelling the confirmation.
2021-04-30 00:30:26 +02:00
Nekotekina f8e05f8e3c Remove redundant operators != 2021-04-29 22:57:40 +03:00
Nekotekina 703ec474f5 Fixup for sys_time_get_timezone (3rd path)
Also simplify Linux path a bit.
2021-04-29 00:07:22 +03:00
Nekotekina a049c6fd6b Implement sys_time_get_timezone syscall
Try to get system timezone automatically.
Attempt to address #10195.
2021-04-27 22:21:58 +03:00
Nekotekina 86a8e0716f Test alterable aggregates via overriding be_t
Checking how it might look like without introducing too many changes.
Alteration of its behaviour as a "template template" argument allows:
 - normal access
 - easier aggregate inspection
 - memory access interception
2021-04-25 19:00:16 +03:00
clienthax 7197dd751a
Fcntl e0000025 (#10172)
Co-authored-by: Eladash <elad3356p@gmail.com>
2021-04-24 21:43:09 +03:00