Eladash
858e493b52
Savestates/vm: Improve saving performance
2024-01-01 11:58:00 +02:00
Eladash
9455bfe6c2
Savestates: Fix g_fxo->init for types which use a pointer
2024-01-01 11:58:00 +02:00
Eladash
ce5f7bd4ff
Savestates: Rename DeferDeserialization, add some asserts
2024-01-01 11:58:00 +02:00
Eladash
847b721558
Compression: Fix infinite loop
...
Always keep expanding the buffer even if avail_in is 0
2024-01-01 11:58:00 +02:00
Eladash
b00fe1d12f
Compression: Improve async compression performance
2024-01-01 11:58:00 +02:00
Elad Ashkenazi
dfb163546b
HOTFIX for atomic wait
2023-12-30 22:33:57 +01:00
Megamouse
f45cbdd0f7
fixes
2023-12-30 21:14:26 +01:00
Megamouse
7a02787bee
fix some more warnings
2023-12-30 21:14:26 +01:00
Megamouse
59c58aa3cf
fix some warnings
2023-12-30 19:07:35 +01:00
Eladash
e209dc1229
Savestates: Save build version and creation time
2023-12-29 11:11:53 +02:00
Eladash
d78bbbf69a
Savestates: Fix audio_out_configuration initialization
2023-12-29 11:11:53 +02:00
Eladash
f696107c90
Add savestate data validity asserts
2023-12-29 11:11:53 +02:00
Megamouse
3f5a80d692
Typemap: Set init to false after each individual destructor
2023-12-25 11:14:11 +02:00
Eladash
90b6f5613e
Fix some warnings
2023-12-19 15:34:07 +02:00
Eladash
657af10361
Savestates: Fix pair serialization
2023-12-19 15:34:07 +02:00
Elad Ashkenazi
14c92efd38
Util/fixed_typemap.hpp: Fix thread-safety issue with init
...
Now safe as long as no- object is created
2023-12-19 15:34:07 +02:00
Eladash
2190419b83
Util/fixed_typemap.hpp: set unitialiazed data to trap values
2023-12-19 15:34:07 +02:00
Eladash
0c410f8a14
Postpone thread launching on g_fxo->init
2023-12-19 15:34:07 +02:00
Eladash
60baa49007
sceNp/vm: Fix strings read, implement safe string reader
2023-12-12 21:23:33 +02:00
oltolm
cb4a688e02
asm.hpp: fix usage of _mm_prefetch
2023-12-11 06:26:40 +02:00
Elad Ashkenazi
fbeaa1c487
Savestates: Fix compressed serialization handler deadlock
2023-12-05 12:34:52 +02:00
Megamouse
4520f7646f
recording: use scoped_lock
2023-11-30 00:34:32 +01:00
Megamouse
9e76e14a79
recording: optimize access to video recorder
...
Use separate locks for audio and video
Fix audio mutex usage in cellRec.
Removes can_consume_sample, since we don't do any processing
between can_consume_sample and present_samples.
Use get_system_time for consistency.
Move pts reset to set_video_sink.
Make start time atomic.
Remove frame and sample counts.
Use m_active to early out to reduce mutex locks.
Do not try to present samples if the recording mode is stopped anyway.
2023-11-30 00:34:32 +01:00
oltolm
fdcb481f07
fix Clang warnings
2023-11-29 19:02:34 +01:00
Eladash
b774ba9888
serialization.hpp: Fix some warning
2023-11-28 21:18:18 +02:00
Eladash
9abf0b7176
Savestates: Asynchronous compression
2023-11-28 16:46:44 +02:00
Eladash
f8ca5cdf56
vm: Minor optimization for memory serialization
2023-11-28 16:46:44 +02:00
Eladash
ac19a50f5f
Rewrite global zipping buffer function
...
Take advantage of the new method, remove a method that is not recommended for use.
2023-11-28 16:46:44 +02:00
Eladash
f60bdbaece
Savestates: Compressed state files
2023-11-27 12:36:17 +02:00
Megamouse
23316d4e1e
cellRec: fix pausing and resuming
2023-11-23 21:19:31 +01:00
Megamouse
0899723510
recording: add h264/aac, better logging of output formats
2023-11-23 21:19:31 +01:00
Megamouse
434a63a98a
recording: rename audio_sample to audio_frame
2023-11-23 21:19:31 +01:00
Megamouse
d27d021913
recording: fix subsequent recordings, reset sample counter to 0
2023-11-23 21:19:31 +01:00
Megamouse
ff434f9d38
recording: cleanup audio config members
...
and fix some annyoing msvc warnings
2023-11-23 21:19:31 +01:00
Megamouse
49f910a56b
recording: improve pts accuracy and consistency
...
Also clean up some logging
2023-11-23 21:19:31 +01:00
Megamouse
b2d9da0b4b
recording: Fix flush. We want to clear the whole queue...
2023-11-23 21:19:31 +01:00
Megamouse
6ba204a259
recording: decrease log spam
2023-11-23 21:19:31 +01:00
Megamouse
51d0df97d3
cellRec: implement audio encoding (no mixing yet)
2023-11-23 21:19:31 +01:00
Megamouse
4c14290694
cellRec: Don't present frames/samples if external audio/video is used
2023-11-23 21:19:31 +01:00
Megamouse
5fa77b04ea
recording: remove unused duration member variable
2023-11-23 21:19:31 +01:00
Megamouse
dbbf318e1c
recording: fix warning
2023-11-23 21:19:31 +01:00
Megamouse
9e3763e6e5
recording: use av_interleaved_write_frame
2023-11-23 21:19:31 +01:00
Megamouse
42cd7df813
recording: fix default sample rate
2023-11-23 21:19:31 +01:00
Megamouse
70c35642a4
recording: initial audio recording
2023-11-23 21:19:31 +01:00
Megamouse
06bdaf1fb1
rsx: fix reading zipped captures
2023-11-10 12:58:38 +02:00
Eladash
66d01b688c
Savestates: Implement initial RAM ventilation system
2023-11-10 08:45:49 +02:00
Eladash
d335d356ca
IdManager.h: Savestate fix part 2
2023-10-05 05:07:46 +03:00
Eladash
dd518fcafb
Savestates/sys_fs: Fix file saving
2023-10-02 15:38:58 +03:00
Eladash
6beb421a35
asm.hpp: Compilation fixup
2023-09-05 22:53:44 +02:00
Eladash
44c08c3a73
PPU/Progress Dialog: Improve remaining time calculation
2023-09-05 22:02:47 +03:00
Eladash
e851c044b5
SPU: Function discovery fix
...
Do not detect branch to next.
2023-09-02 12:31:11 +03:00
oltolm
373e502501
Workaround for Clang: move bless to its own header file
2023-08-19 13:30:46 +03:00
Eladash
dacb0bd87f
utils/endian.hpp: Use std::byteswap
2023-08-17 13:02:57 +03:00
Eladash
6adc7f9ee6
SPU: Use usermode waiting for busy GETLLAR loop
2023-08-17 09:02:28 +03:00
Ivan Chikish
384c807d6a
Fixup atomic wait (Linux)
2023-08-16 23:29:09 +03:00
oltolm
d25d5327e5
remove unnecessary defines
2023-08-15 20:56:39 +02:00
Megamouse
39bbf17caf
cellRec: fix width of encoder frames
...
Turns out the pitch was accidentally used as width, leading to an out of bounds read/write.
I kept the pitch in the struct for completeness' sake. It may be needed later, if only for error checks.
2023-08-13 00:37:19 +02:00
Ivan Chikish
c6dcf3f1d3
(Linux) Fixup futex_waitv
2023-08-11 11:54:41 +03:00
Eladash
df24305698
PPU/Debugger: Fix op_branch_targets
2023-08-08 10:22:05 +03:00
Whatcookie
d4cf12bc17
LV2: Improve sys_timer_usleep by using CPU usermode waiting
...
* Linux: set timerslack to minimum value
- Linux delays the wakeup of threads to save power, this feature isn't needed for this application
* Utils: Add detection for waitpkg and monitorx extensions
- These instructions are used for user mode wait instructions
* lv2: Use user mode wait instructions instead of yielding when appropriate
2023-08-05 11:49:30 +03:00
Ivan Chikish
d34287b2cc
Linux: use futex_waitv syscall for atomic waiting
...
In order to make this possible, some unnecessary features were removed.
2023-08-02 21:46:06 +03:00
Megamouse
bb2d7063c4
Update ffmpeg
2023-08-02 08:21:47 +02:00
Whatcookie
375bc4cc69
Utils: Add initial AVX10 support
...
- Adds detection for AVX10 features
- Also adds new bools for 256-wide AVX-512 instructions, indicated by either AVX-512 support, or AVX10
2023-07-28 06:55:20 +03:00
oltolm
7cb2d3f143
opengl: fix Qt warnings ( #14249 )
2023-07-24 07:30:21 +03:00
Darkhost1999
a0297933ce
Create Missing Paths for Dev_USB/HDD0 and mms
...
In addiytion, fix 2 warnings.
2023-07-19 12:01:44 +03:00
Elad Ashkenazi
ba988f1d3f
Qt: Exit And Save Log - toolbar action ( #14212 )
...
Fixup main_window::IsValidFile
2023-07-18 05:11:53 +03:00
Megamouse
482722af0a
Patches: fix logging for locations of node iterators
2023-07-13 08:40:19 +02:00
oltolm
0c94606fcf
Make compile with msvc, clang and gcc on Windows
2023-07-11 21:40:30 +03:00
Eladash
e76ce05e29
logs: Add manual set log level with RegEx
2023-07-09 13:33:03 +03:00
Ivan Chikish
b3b680f073
[simd.hpp] Fix gv_fmafs
2023-07-07 11:09:55 +03:00
Elad Ashkenazi
f7e9622084
vm_native.cpp: Workaround for rpcs3_vm_sparse.tmp crashes
2023-07-04 20:44:41 +02:00
Eladash
5f2f084091
Savestate/IDM: Do not save unsavable containers
2023-06-28 18:34:33 +03:00
Eladash
307e1351df
asm.hpp: Fix mul_saturate
2023-06-21 22:28:52 +03:00
Megamouse
a6d8c4343f
Windows: silence uncritical performance counter error
2023-06-16 19:36:44 +02:00
Eladash
f57c8c1c35
LV2: Unconditional Timer Synchronization Fix
2023-06-02 08:54:46 +03:00
Eladash
f031cd9b42
Take advantage of WIN10 Thread Name API
2023-05-24 20:39:51 +02:00
Megamouse
6794ae35a1
mac arm: try to fix compilation
2023-05-18 18:52:25 +02:00
Megamouse
54e6cf95d7
Fix some warnings
2023-05-18 12:41:22 +02:00
Megamouse
4fd21f7764
Windows Use vector for performance counter data allocation
2023-05-18 09:15:49 +02:00
Megamouse
911cd678ff
cli: add ability to log ffmpeg codecs
2023-05-17 00:23:47 +02:00
Megamouse
58140e1d3a
Fix some warnings
2023-05-09 07:55:46 +02:00
Megamouse
b86ecf7441
Keep preceding 0 in firmware strings
2023-04-19 08:06:30 +02:00
Megamouse
5107d1b69b
Keep second 0 in firmware strings
2023-04-19 08:06:30 +02:00
Ivan Chikish
fb88e1c1c9
Update to LLVM 16.0.0, switch to upstream LLVM
2023-04-06 10:19:31 +03:00
Megamouse
92ae57c9ee
Windows: log more descriptive errors
2023-03-04 18:34:56 +01:00
Megamouse
3ff464641a
Fix Visual Studio 17.5.0 compilation
...
For some reason there's an internal compiler error related to atomic wait.
I could work around this issue when I commented "mask = default_mask<X>;".
So after playing around a bit I had the suspicion that the VS parser can't handle some of the templatization.
Giving the decltype its own alias seems to fix this issue (and makes the code a bit more readable anyway in my opinion).
2023-02-25 19:20:55 +03:00
Megamouse
ccb7528a59
fix some warnings
2023-02-22 23:57:20 +01:00
Ivan Chikish
01ed8a07af
fixed_typemap.hpp: static allocation for m_init
...
This allows to safely call is_init<T>() at any time.
2023-02-23 00:54:35 +03:00
Megamouse
38d612e5ba
fix some warnings
2023-02-22 00:15:11 +01:00
Margen67
5bb89328d0
Remove whitespace
2023-02-15 08:58:02 +01:00
Megamouse
24445123fc
Recording: Fix possible encoder segfault
2023-01-18 00:24:00 +01:00
Megamouse
6bcb5ae66b
Fix some includes and warnings
2023-01-10 20:57:32 +01:00
Megamouse
064ab58f3c
cellRec: move data instead of memcpy
2022-12-10 03:24:40 +01:00
Megamouse
85c0a2e602
cellRec: add more logging
2022-12-10 03:24:40 +01:00
shinra-electric
bf37087a10
Fix build errors by changing AVCodec* to a const
...
...rather than a variable.
Allows RPCS3 to build on macOS again (Xcode 14.1)
2022-12-09 14:21:37 +03:00
Megamouse
88269636d3
utils: implement video encoder and image sink
2022-12-08 21:08:37 +01:00
Elad Ashkenazi
630edde10f
logs.cpp: fix regression ( #12995 )
...
Fixes #12994
2022-11-29 22:56:18 +03:00
Eladash
e9e139c364
logs improvements
...
* Do not use unsafe pointer arithmetics exceeding existing memory. (exceeding m_fptr)
* Properly use the enire 32MB of the buffer, previously only 16MB were used for cuncurrent access.
* Fix a bug occurring after attempting to push 1TB (40 bits).
* Flush the log before hitting a debugging breakpoint.
2022-11-28 18:52:11 +03:00
Nekotekina
1123e25136
Implement ref_ptr (see read_from_ptr)
...
Type `aref`: reference wrapper
2022-11-26 09:30:11 +03:00
Nekotekina
7c15001042
Implement read_from_ptr<>() util
...
Doing std::bit_cast on a "span".
Should be usable in constexpr.
2022-11-26 09:30:11 +03:00
Nekotekina
ae809ad320
Unexpected bugfixes
...
Mostly unaligned memory access.
Also includes workarounds for ubsan execution.
2022-10-31 14:20:02 +03:00
Malcolm Jestadt
d8897c585d
PPU/SPU LLVM: Allow Zen4 cpus to use VPERMI2B/VPERMT2B instead of the vperm2b256to128 path
...
- Zen4 based cpus can process VPERM2B in a single uop, unlike intel where it is 3 uops.
2022-10-01 15:38:29 +03:00
Nekotekina
6ff6a4989a
Implement at32() util
...
Works like .at() but uses source location for "exception".
2022-09-26 18:04:15 +03:00
Nekotekina
b49a1f27eb
Warning fixes
2022-09-17 16:35:02 +03:00
Eladash
2807be7080
SPU: Regression fix after #12648
2022-09-13 20:11:30 +03:00
kd-11
0d9b1654ec
asm: Avoid ALU instructions on busy wait cycles
2022-09-09 23:17:27 +03:00
Eladash
28bec8e1bf
SPU: Implement custom reservation condition in atomic wait
2022-08-21 15:02:01 +03:00
Nekotekina
b6608ad31d
vm_native: rewrite win7 workaround
2022-08-15 12:26:17 +03:00
Nekotekina
7bb2d94e53
vm: use sparse files to emulate overcommit memory
...
Fix shm::map_critical page flags.
2022-08-12 13:59:03 +03:00
Eladash
34bae90820
LV2: Move nearly all notifications out of all mutex scopes including IDM
2022-08-07 20:23:54 +03:00
Megamouse
3d73915358
cellSearch: improve populate_photo_info, read image headers
2022-07-26 17:27:35 +02:00
Megamouse
c40439ae6b
cellMusic/Decode: implement playlist shuffle and repeat
2022-07-22 08:42:43 +02:00
sguo35
9e57efe82c
spu: implement assembly functions for arm64
2022-07-15 12:37:33 +03:00
sguo35
086e12c6ca
mac: mmap calls should initialize with r/w page perms
...
Mac/Arm64 pages should be R/W by default due to 16k page
incompatibility. Without this there will be segfaults due to invalid
permissions.
2022-07-15 12:37:33 +03:00
sguo35
9b19f16698
arm64: add optimized 16byte ld/st for armv8.4a+
...
16B ldp/stp are atomic on v8.4a+. See Arm Architecture Reference Manual,
"Changes to single-copy atomicity in Armv8.4". Add load/release atomic
impls for this instruction and add detection for 8.4a+ capability.
2022-07-15 12:37:33 +03:00
Eladash
ab27ee4cf4
Savestates/RSX: Save NV406E semaphore waiting
2022-07-12 15:15:42 +03:00
Eladash
6211295155
atomic.hpp: Truncation warning fix
2022-07-12 15:15:42 +03:00
Eladash
219e3d61f8
Minor fix in shm::map_critical
2022-07-10 14:19:59 +03:00
Nekotekina
786510a937
Use gettid() on Linux, don't use std: 🧵 :id
...
pthread_self() returns a large opaque pointer which is harder to use.
2022-07-10 12:22:28 +03:00
Nekotekina
4b787b22c8
Implement FN (lambda shortener)
...
Useful for some higher order functions.
Allows to make short lambdas even shorter.
2022-07-08 14:47:41 +03:00
Nekotekina
5c6f5a1610
Cleanse LOG_CONSTINIT macro
...
Should be unnecessary.
2022-07-08 14:47:41 +03:00
Eladash
4ac88fa8d3
Savestates/RSX: Save drawing context
2022-07-08 12:57:43 +03:00
Eladash
5f8f9e33f1
RSX/Savestates: Replace GCM hack with a proper fix
2022-07-08 12:57:43 +03:00
Eladash
b692108f1e
Savestates: HLE state saving POC in sys_lwmutex
2022-07-06 19:43:25 +03:00
Elad Ashkenazi
fcd297ffb2
Savestates Support For PS3 Emulation ( #10478 )
2022-07-04 16:02:17 +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
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
Elad Ashkenazi
1738b38536
vm_native.cpp: Use Windows 10 memory mapping API (the correct API)
2022-06-10 14:27:02 +03:00
Nekotekina
b0ccd2a8a0
Implement utils::c_page_size (unused)
...
Query platform memory page size.
2022-06-02 12:56:49 +03:00
Megamouse
88ee62be26
cellAdec: fix uninitialized default size of AVPacketHolder ( #12077 )
2022-05-25 11:40:51 +02:00
Nekotekina
0a5ea859ea
atomic.cpp: fix race in cond_id_lock()
2022-05-07 21:25:38 +03:00
Nekotekina
cd6aa0774f
Reduce stack usage in atomic_wait_engine::notify_all
2022-04-24 13:26:28 +03:00
Nekotekina
6d3052c5dd
Optimization: disable atomic_wait_engine notify callback for SPU
...
Disable placebo callback calls in notify_all.
Don't use callback at all if TSX.
Based on kd-11 findings.
2022-04-24 13:15:54 +03:00
Megamouse
f42e647430
cellVdec: use av_error_to_string
2022-04-21 22:22:33 +02:00
Megamouse
d8bbec9594
libav: log more error codes as string
2022-04-21 08:10:01 +02:00
sguo35
e761b3235c
macos: fix build for arm64
...
Adds arm64 branches to some x86 specific code and modifies some casting
logic to make Clang happy
2022-04-18 17:53:54 +03:00
Timo654
afae58b231
Interpret negative values in game patches
2022-04-18 17:01:19 +03:00
Megamouse
499fe3e218
Patch manager: add node location to patch errors
2022-04-09 21:26:06 +02:00
RipleyTom
a4d715e25d
Warning Fixes
2022-03-23 19:35:10 +01:00
Megamouse
539ac32806
Decrease log spam in case that per core cpu usage cannot be queried
2022-03-18 01:47:23 +01:00
Megamouse
e58906cb4d
cpu_stats: fmt::win_error_to_string
2022-03-16 22:20:23 +01:00
Megamouse
04df392866
Log cpu usage periodically
2022-03-16 19:42:06 +01:00
nastys
ce7b1576e0
Low Power Mode detection
...
Change low to reduced
Low Power Mode detection
Fix namespace space
Low Power Mode detection
Fix namespace space
Low Power Mode detection
2022-03-14 08:28:02 +01:00
Megamouse
aafd74f9ea
cellMusicDecode: initial implementation
...
Implements the basic functionality of cellMusicDecode.
Works with Space Invaders (if you add the list selection from the other PR).
Probably fixes SSX custom music.
2022-03-05 18:34:27 +01:00
Megamouse
15e74357cf
cellMusic: implement qt music handler
2022-03-03 08:25:46 +01:00
Megamouse
b1a9e87ecf
cellSearch: fix cellSearchStartListSearch
...
Fixes listing BGM in Gundam.
The returned content was always empty.
Playback of the tracks will still require a MusicSelectionContext and cellMusic playback, which isn't implemented yet.
2022-02-20 21:06:46 +01: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
12c83b340d
Remove built_function
...
With today's branch prediction techniques, it's hardly useful.
2022-01-24 22:21:41 +03:00
Nekotekina
a4d94a83b9
PPU/simd.hpp: minor changes in DP instructions
2022-01-21 13:57:46 +03:00
Nekotekina
628354ba92
Use global variable in gv_zeroupper
2022-01-20 21:16:00 +03:00