Commit Graph

1460 Commits

Author SHA1 Message Date
Megamouse 499fe3e218 Patch manager: add node location to patch errors 2022-04-09 21:26:06 +02:00
Megamouse ee98f577e2 sceNpTrophyGetTrophyIcon: SCE_NP_TROPHY_ERROR_HIDDEN
And prevent some possible segfaults
2022-03-31 23:02:35 +02:00
Nekotekina 0a617a05d0 PPU: correct behaviour under external debugger
May require setting "Assume External Debugger" to true.
2022-03-26 23:09:20 +03:00
kd-11 9a2d4fe46b rsx: Relocatable transform constants 2022-03-26 16:10:18 +03:00
Megamouse e58906cb4d cpu_stats: fmt::win_error_to_string 2022-03-16 22:20:23 +01:00
Megamouse 7a1a4541c0 StrFmt: print src_loc error as string 2022-03-16 22:20:23 +01:00
Megamouse a4c4548c3a input: add enumeration threads for each hid_pad_handler
There was a roughly 60 ms lag for each hid handler every 2 seconds. (sucks if you use all 3 hid handlers)
2022-02-01 19:28:04 +01:00
Vestral 107107107c SoundTouch resampler integration 2022-01-31 21:20:57 +01:00
Eladash 781b2b4548
Implement fs::isfile (#11447) 2022-01-29 22:10:48 +03:00
Nekotekina dba2baba9c Implement utils::memory_map_fd (partial)
Improve JIT profiling dump format (data + name, mmap)
Improve objdump interception util (better speed, fix bugs)
Rename spu_ubertrampoline to __ub+number
2022-01-26 15:46:16 +03:00
Nekotekina 0db9850a73 Add loop building utilities for ASMJIT
Refactor copy_data_swap_u32 a bit
2022-01-25 03:16:37 +03:00
Nekotekina 11ee1f3eb2 Improve JIT profiling on Linux
Add JIT object dumping functionality.
Add source for objdump interception utility.
2022-01-25 03:16:37 +03:00
Nekotekina 12c83b340d Remove built_function
With today's branch prediction techniques, it's hardly useful.
2022-01-24 22:21:41 +03:00
Nekotekina b42fae0989 PPU: refactor shift and splat instructions
Fix utils::rol32/64 functions.
Fix immediate clamping in splat instructions.
Other fixes.
2022-01-19 23:01:31 +03:00
Nekotekina 4704367382 Remove unnecessary asmjit::imm_ptr 2022-01-18 00:10:32 +03:00
Nekotekina 14cca55b50 PPU: refactor vector rounding instructions
Fix: nearbyint -> roundeven
2022-01-18 00:10:32 +03:00
Nekotekina 580bd2b25e Initial Linux Aarch64 support
* Update asmjit dependency (aarch64 branch)
* Disable USE_DISCORD_RPC by default
* Dump some JIT objects in rpcs3 cache dir
* Add SIGILL handler for all platforms
* Fix resetting zeroing denormals in thread pool
* Refactor most v128:: utils into global gv_** functions
* Refactor PPU interpreter (incomplete), remove "precise"
* - Instruction specializations with multiple accuracy flags
* - Adjust calling convention for speed
* - Removed precise/fast setting, replaced with static
* - Started refactoring interpreters for building at runtime JIT
*   (I got tired of poor compiler optimizations)
* - Expose some accuracy settings (SAT, NJ, VNAN, FPCC)
* - Add exec_bytes PPU thread variable (akin to cycle count)
* PPU LLVM: fix VCTUXS+VCTSXS instruction NaN results
* SPU interpreter: remove "precise" for now (extremely non-portable)
* - As with PPU, settings changed to static/dynamic for interpreters.
* - Precise options will be implemented later
* Fix termination after fatal error dialog
2022-01-15 06:48:04 +03:00
MSuih f526027778
Revert recent file system changes (#11370)
* Revert "FS: use std::filesystem::u8path"

This reverts commit cd016be86e.

* Revert "VFS: fix missing path deliminators"

This reverts commit 84753db574.

* Revert "Bugfix of Emulator::Load disc path searching"

This reverts commit b9179de288.

* Revert "fs: Reimplement path resolving using std::filesystem::weakly_canonical"

This reverts commit 0c4b2ff06b.
2022-01-13 07:24:04 +03:00
Megamouse cd016be86e FS: use std::filesystem::u8path 2022-01-13 00:07:25 +03:00
Eladash 0c4b2ff06b fs: Reimplement path resolving using std::filesystem::weakly_canonical 2022-01-12 03:37:39 +03:00
Silent 8c9090fd03 WolfSSL: Use a custom UTF-8 aware fopen on Windows
Fixes loading cacert.pem from Unicode directories
2022-01-12 03:35:15 +03:00
nastys 0d1c0e72a6 macOS: Increase thread stack size to 8 MiB 2022-01-11 08:05:17 +03:00
nastys 3571e6ef85 macOS: Set correct maxfiles (fixes shader cache and SPU LLVM) 2022-01-11 08:05:17 +03:00
Vestrel 1adc408ad7
More sys_uart packets (#11332)
* Additional sys_uart packets added
2022-01-10 03:43:54 +03:00
Nekotekina cb2748ae08 Update ASMJIT (new upstream API) 2021-12-29 02:45:00 +03:00
Nekotekina 122555fb66 Add an error check in JITAnnouncer event listener
This is a bit strange one.
2021-12-26 22:01:20 +03:00
Nekotekina d836033212 LLVM: enable some JIT events (Intel, Perf)
Made some related adjustments.
Currently incomplete.
2021-12-26 16:41:37 +03:00
Nekotekina d36a715b24 Disable built_function on __APPLE__
Workaround for #11287
2021-12-26 14:40:21 +03:00
Nekotekina 3cd8891ab8 Re-refactor copy_data_swap_u32 again
Drop AVX2 path for now, since it usually operates on small data.
Rely on automatic SSE vectorization on recent compilers.
Side refactoring on JIT.h to workaround weird conflict issue.
2021-12-26 14:40:21 +03:00
Nekotekina e3e6fb5489 Don't use vm::preallocated flag in patch enclave allocs 2021-12-26 14:40:21 +03:00
Nekotekina dcd011048d Implement "built_function" utility (runtime-generated assembly)
Similar to build_function_asm, but links without indirection.
Achieved by emitting code directly into a byte array.
2021-12-22 19:27:20 +03:00
nastys 08333e0876
macOS moltenVK support and SIGBUS handling (#11252) 2021-12-12 21:35:56 +01:00
Nekotekina 6b40d69a8f Introduce coroutine support (util/coro.hpp)
Implement coroutine types `lazy` and `generator` in stx namespace.
Implement fs::list_dir_recursively.
2021-12-07 13:04:10 +03:00
Eladash cb4711203b logging: Tell apart PPU access violation caused by executing unmapped memory 2021-12-05 01:22:32 +03:00
DH cccfb89aa0 [Config] Use std::less<> for std::map<...>
Reduces amount of string copies
[Utilities] fmt::replace_all: avoid creation of temporary strings
2021-12-02 21:36:57 +03:00
DH 813c3298ad [Utilities] Fixed area_base operator* scalar type 2021-12-02 21:36:57 +03:00
Eladash f16949c292
fs::file: always use strict reading mode for large reads (#11206) 2021-12-01 19:09:07 +03:00
Vestrel 37a722cc1d
Audio backend improvements
Callback based audio update.
Upgraded common backend interface.
Added Cubeb backend.
Support multiple audio providers.
Dropped pulse, alsa, openal backends.
2021-11-24 19:41:05 +01:00
Eladash 9afa960979 Fix possible fs::create_path recursion overflow 2021-10-22 15:37:47 +03:00
Eladash 24e76f2960 fs: Add fs::write_new, promotes safe file creation (no overwrite) 2021-10-10 09:34:50 +02:00
Eladash 75e66ab5e0 Make pad and patches config savinng atomic 2021-10-10 09:34:50 +02:00
Megamouse f72d148d37 Fix config mode reset 2021-10-05 20:16:11 +02:00
Eladash 65c9cd99cd Patches/PPU: Implement HLE/LLE/With-TOC function call patches
Example patches:
  [ jumpf, 0x12340, "cellGcmSys:cellGcmSetFlip"] // Places a call to cellGcmSetFlip at 0x12340
  [ jumpf, 0x12340, "cellGcmSys:0xDC09357E"] // Same, using FNID
  [ jumpf, 0x12340, 0x2345678 ] # Function OPD based call eading OPD at 0x2345678
2021-09-26 20:49:57 +03:00
Eladash e10c6cbaf7 SPU: cpu_work() fixup, fix recursion in AV handler 2021-09-18 19:43:55 +03:00
Megamouse 129ade2f73 System: only init fxo objects if a game is started
The progress_dialog and patch system aren't needed unless a game is started.
Before, they were both initialized everytime we added a single game to the game list or even when simply started RPCS3.
This both means that a thread was needlessly idling all the time and even worse: The patch.yml was read countless times when we didn't need it.
2021-09-17 22:45:14 +02:00
Eladash 73bdf7481e Emu: Fix disc game move from hdd0/game 2021-09-17 22:15:48 +02:00
Eladash 50ad7ba1f6 vm: Fix vm::unmap
* Make vm::unmap atomic, squash the memory unmapping process inside this function while still using the same VM mutex ownership.
* Make vm::unmap not fail due to random vm::get calls, shared_ptr reference count is no longer a condition.
* Fix sys_mmapper_free_address spuriously failing with EBUSY due to random vm::get calls.
* Fix sys_vm_unmap race condition due to non-atomic vm::unmap.
* Add an optional verification block ptr arg to vm::unmap, used by patches.
2021-09-13 20:53:34 +03:00
Eladash f98595bee5 Patches/PPU: Add jump_link patch type 2021-09-10 11:46:39 +03:00
Eladash fafefb2cf5 Fixup No.3 after #10779 2021-09-10 11:46:39 +03:00
Eladash bd66dfedc9 Do not allow to unpause after fatal error occured in emulation
* Plus fix #10590
2021-09-09 19:30:54 +02:00