Commit Graph

13923 Commits

Author SHA1 Message Date
Eladash f66256cc13 rsx: PS3 Native frame limiter improvements, add Infinite frame limiter
* Do not wait on DEVICE 0x30 semaphore, it seems like it is something to do with queue command synchronization.
 - This also fixes cellGcmSetFlipWithWaitLabel which is built specifically to enable accurate RSX flipping time, its waiting command is confirmed to be placed **AFTER** DEVICE 0x30 waiting.
* Fix default vsync state to be enabled. (and set it to enabled in cellGcmSetVBlankFrequency as well)
* Add experimental "Infinite" frame limiter mode.
* Fix spurious enabling of second vblank.
2022-06-25 15:30:41 +02:00
Megamouse 9cf7a63c77 Emu: Implement BlockingCallFromMainThread
Reduces some copy-paste clutter throughout the project
2022-06-25 14:01:40 +03:00
Megamouse 7842812e24 Qt: fix music handler destructor 2022-06-24 19:50:22 +02:00
Nekotekina ec59d7d26b Fixup for Emu.EjectDisc() 2022-06-24 19:55:44 +03:00
Nekotekina ea23525f66 sys_fs: Add mountpoint for /dev_ps2disc 2022-06-24 19:55:44 +03:00
Megamouse 87762a9b17 cellGame: implement disc change callbacks 2022-06-24 17:34:21 +02:00
Elad Ashkenazi bc3a899acf
Debugger: Simplify and optimize #12269 (#12275) 2022-06-24 11:26:44 +02:00
Eladash 5e01ffdfd8 Debugger: Optimize cpu_thread::dump_regs()
Reuse string buffer. Copies and reallocations are expensive with such large strings.
2022-06-23 22:41:32 +02:00
Eladash 794cbd8708 Debugger: Refresh at 100hz during debugger interaction (was 20hz) 2022-06-23 22:41:32 +02:00
Megamouse 661b485b58 HLE: more error checks 2022-06-22 21:47:06 +02:00
Eladash 64399d45c1 vm: Make falloc return value bool
Allow to check properly for the success of 0 address allocation.
2022-06-22 21:01:37 +03:00
Nekotekina 653a9e6e7f Debugger: always print cpu_thread::dump_misc()
Was removed for some reason.
2022-06-22 18:53:29 +03:00
Eladash 71e07dc6c7 IdManager.h: Improvements
* Ensure ::PtrSame<T, Derived> is true.
* Allow id_base, id_step and id_count to be of enumeration type.
* Fix potential deadlock in kernel explorer.

idm::select:
* Allow to select multiple inherited object types for idm::select.
* Allow function reference types. (they don't allow access to operator() directly, use deducing std::function constructor instead)
* Ensure ::is_same_ptr<T, object_type> is true.
2022-06-22 17:24:47 +03:00
Elad Ashkenazi 69ceebeb05
Debugger: Hide breakpoint and callstack list if unused (#12266) 2022-06-21 23:42:42 +02:00
Eladash ccb2724fc4 Debugger: Implement SPU breakpoints 2022-06-21 16:59:45 +03:00
Eladash ec6d6adebc RSX Memory Viewer: Fix local memory displaying 2022-06-21 16:59:45 +03:00
Eladash 3899248305 RSX Debugger: Stable NOP skipping
Allow addresses of NOP blocks to remain consistent in between debugger position changes except for the first which can shrink or grow.
2022-06-21 16:59:45 +03:00
Megamouse 4557992334 Qt: add optional states to toolbar icons 2022-06-20 21:15:14 +02:00
Eladash d0e9108800 SPU: Implement "double" SNR storage 2022-06-20 20:50:11 +03:00
Eladash dc80d000aa SPU Disasm: Detect sys_event_flag_set_bit syscall 2022-06-20 20:50:11 +03:00
sguo35 775caabeeb [ppu] Fix function trampoline for arm64
- Refactor function manager trampoline to be cleaner
- Add trampoline impl for arm64
- Force all JIT entrypoints on Apple to toggle W^X
2022-06-20 15:08:27 +03:00
sguo35 e8b6e95f8e [3rdparty] Disable warnings for soundtouch dependency
Disabling warnings for soundtouch allows Clang to compile in debug mode.
2022-06-20 15:08:27 +03:00
sguo35 d2614d01fd [ppu] fix a macOS arm64 regression
Always override the LLVM triple to prevent linking errors.
2022-06-20 15:08:27 +03:00
isJuhn 4262794668 Implement PINE IPC Server 2022-06-19 17:56:50 +02:00
capriots a6237e5473
cellAudio(Out): properly implement all downmixing modes (#12252) 2022-06-19 17:08:03 +02:00
Megamouse 0b14d785ca stub cellHttp 2022-06-19 07:07:31 +02:00
capriots 6bdf415adb Fix audio renderer not resetting after cellAudioOutConfigure() was called 2022-06-19 06:09:29 +02:00
Megamouse ebabdd37b4 cellAudioOut: fix sound_mode exception
Turns out some games don't configure proper channel counts after all,
which triggers an ensure in cellAudioOutGetState.
Let's select the current sound_mode in cellAudioOutConfigure.
Keep the old one if no match was found.

Also moves some code from AudioBackend to cellAudioOut for thread safety (see mutex).
2022-06-18 18:17:43 +02:00
Megamouse 11c5230628 stub cellSysutilRegisterCallbackDispatcher 2022-06-15 20:46:24 +02:00
Megamouse bfe029bb0c cellSysutil: implement some bgm fxo stuff 2022-06-15 20:46:24 +02:00
Megamouse cbf12bb54b cellSysutil: stub cellSysutilGameDataExit functions 2022-06-15 20:46:24 +02:00
Megamouse b01d8e01e3 cellSysutilRegisterCallback: fix potential read out of bounds 2022-06-15 20:46:24 +02:00
Megamouse 985b222123 Update SPIR-V to v2022.2 2022-06-14 18:25:32 +02:00
Megamouse b4b8929ab1 Update curl to v7.83.1 2022-06-14 18:25:32 +02:00
Megamouse 48a217648c Update glslang to v11.10.0 2022-06-14 18:25:32 +02:00
Megamouse 12ae714c70 Update wolfssl to v5.3.0-stable 2022-06-14 18:25:32 +02:00
Megamouse 2c51887668 Update hidapi to v0.12.0 2022-06-14 18:25:32 +02:00
Megamouse 69e11136e8 Update FAudio to v22.06 2022-06-14 18:25:32 +02:00
Ivan c2190f71ca
SPU/PPU LLVM: fix triple setup (regression fix) (#12228) 2022-06-14 18:13:43 +03:00
Elad Ashkenazi 5378fee1c3
SPUAnalyzer.h: Add missing category check functions (#12222)
Some instructions were moved into integer category.
2022-06-14 16:04:24 +03:00
Jeff Guo cefc37a553
PPU LLVM arm64+macOS port (#12115)
* BufferUtils: use naive function pointer on Apple arm64

Use naive function pointer on Apple arm64 because ASLR breaks asmjit.
See BufferUtils.cpp comment for explanation on why this happens and how
to fix if you want to use asmjit.

* build-macos: fix source maps for Mac

Tell Qt not to strip debug symbols when we're in debug or relwithdebinfo
modes.

* LLVM PPU: fix aarch64 on macOS

Force MachO on macOS to fix LLVM being unable to patch relocations
during codegen. Adds Aarch64 NEON intrinsics for x86 intrinsics used by
PPUTranslator/Recompiler.

* virtual memory: use 16k pages on aarch64 macOS

Temporary hack to get things working by using 16k pages instead of 4k
pages in VM emulation.

* PPU/SPU: fix NEON intrinsics and compilation for arm64 macOS

Fixes some intrinsics usage and patches usages of asmjit to properly
emit absolute jmps so ASLR doesn't cause out of bounds rel jumps. Also
patches the SPU recompiler to properly work on arm64 by telling LLVM to
target arm64.

* virtual memory: fix W^X toggles on macOS aarch64

Fixes W^X on macOS aarch64 by setting all JIT mmap'd regions to default
to RW mode. For both SPU and PPU execution threads, when initialization
finishes we toggle to RX mode. This exploits Apple's per-thread setting
for RW/RX to let us be technically compliant with the OS's W^X
    enforcement while not needing to actually separate the memory
    allocated for code/data.

* PPU: implement aarch64 specific functions

Implements ppu_gateway for arm64 and patches LLVM initialization to use
the correct triple. Adds some fixes for macOS W^X JIT restrictions when
entering/exiting JITed code.

* PPU: Mark rpcs3 calls as non-tail

Strictly speaking, rpcs3 JIT -> C++ calls are not tail calls. If you
call a function inside e.g. an L2 syscall, it will clobber LR on arm64
and subtly break returns in emulated code. Only JIT -> JIT "calls"
should be tail.

* macOS/arm64: compatibility fixes

* vm: patch virtual memory for arm64 macOS

Tag mmap calls with MAP_JIT to allow W^X on macOS. Fix mmap calls to
existing mmap'd addresses that were tagged with MAP_JIT on macOS. Fix
memory unmapping on 16K page machines with a hack to mark "unmapped"
pages as RW.

* PPU: remove wrong comment

* PPU: fix a merge regression

* vm: remove 16k page hacks

* PPU: formatting fixes

* PPU: fix arm64 null function assembly

* ppu: clean up arch-specific instructions
2022-06-14 15:28:38 +03:00
Eladash 264253757c rsx: Improve Null Renderer 2022-06-12 20:54:42 +03:00
Ani 2512e958fa
glsl: Avoid implicit int->uint conversions (#12220) 2022-06-12 18:05:43 +01:00
Nekotekina cb2c0733e2 SPU LLVM: fix vrangeps usage in clamp_smax 2022-06-12 16:40:04 +02:00
Elad Ashkenazi 280aa6da91
rsx: Fix NV406E semaphore_acquire timeout detection (#12205) 2022-06-12 12:34:29 +03:00
Megamouse 9554adda28 Qt: remove "Send Exit CMD" menu option
This is pointless now, since we always exit games with this command.
2022-06-12 11:17:30 +02:00
Megamouse f3fa7119ac Qt: Also parse changelog with "Background" update 2022-06-12 09:19:18 +02:00
Malcolm Jestadt 0d022d420b RSX: Add more wide paths for upload_untouched
- Adds AVX512 path for upload_untouched u16 with primitive restart, and
  AVX2 and AVX512 paths for upload_untouched without restart
- The AVX512 paths handle the remainder in simd code with masking, which
  provided a large speedup
- On my i5-1135G7 in demons souls benchmarking a scene in boletaria with
  a lot of geometry on screen via perf:
SSE4_1                      0.64%
AVX2                        0.59%
AVX512                      0.56%
AVX512 w/ remainder masking 0.51%
2022-06-12 06:23:55 +03:00
Elad Ashkenazi ec530a2c91
rsx: Suggest to try setting RSX FIFO Accuracy to a higher mode of accuracy on crash (#12204) 2022-06-11 23:26:12 +02:00
Malcolm Jestadt ebeeafc94f SPU LLVM: Use vrangeps in clamp_smax
- This instruction can clamp a value between a range of values, something which previously needed 2 instructions.
- With the immediate byte set to 0x2 it will compute the minimum between the absolute value of the first input and the second input, and then copy the sign from the first input to the result.
2022-06-11 18:25:31 +03:00