Commit graph

8660 commits

Author SHA1 Message Date
Nekotekina 19e20d9c19 Auto-Updater: increase lock file waiting timeout in the case of updating
Normal case: timeout reduced from 3s to 2s.
Updating case: increased timeout to 10s.
2020-03-23 22:52:05 +03:00
Nekotekina 3d78694590 Debug: measure initialization time (before main() function) 2020-03-23 22:18:45 +03:00
Eladash 52360b3f98 liblv2 HLE: Fix sys_lwmutex_lock assertation 2020-03-23 21:37:37 +03:00
Eladash 08e66ab14c Minor warning fixes 2020-03-23 21:37:37 +03:00
Eladash 3de41bfea7 _sys_lwcond_signal: Make mode 3 respect ordering of the sleep queue 2020-03-23 21:37:37 +03:00
Megamouse 1537f505a5 cellGem: fix move_handler::mouse left click 2020-03-23 15:10:01 +03:00
Nekotekina 5ebc538d7e Workaround for VS 16.5
Strange codegen bug didn't promote s32 to u64.
2020-03-23 14:48:49 +03:00
kd-11 4965bf7d7a gl/vk: Refactor draw call handling and stub shader interpreter
- Refactors backend draw call management to make it easier to extend
  functionality.
- Stubs shader interpreter functionality.
2020-03-23 14:47:28 +03:00
Eladash 537f175f52 Another fixup after #7826 2020-03-23 11:54:19 +03:00
Eladash 017ef5a94e Minor fixup after #7826 2020-03-23 10:59:51 +03:00
Eladash cccc32fa9d
sys_lwmutex/lwcond: track lwcond waiters (#7826)
In lwmutex destroy syscall, wait for pending waiters.
2020-03-23 10:30:17 +03:00
sL1pKn07 9de9ec1f01 Fix build with Qt 5.15+ 2020-03-23 07:23:56 +03:00
Megamouse ef10ed4499 Qt: Add basic screenshot manager 2020-03-22 23:40:55 +01:00
Megamouse b447e6f55d Qt: use simple curl wrapper to avoid some pitfalls 2020-03-22 19:16:25 +01:00
Megamouse 3c63db93ed Qt: fix double slash in updater tmp_folder 2020-03-22 19:16:25 +01:00
Megamouse da09badd8d Qt: simplify current_build in update manager 2020-03-22 19:16:25 +01:00
Megamouse 7f8d802bd5 Qt: fix log message in update manager 2020-03-22 19:16:25 +01:00
Megamouse 532215fb81 Qt: show welcome dialog before showing the app
Fixes interference with update manager
2020-03-22 19:16:25 +01:00
Megamouse 13e166084d Qt: use Localized::GetVerboseTimeByMs 2020-03-22 19:16:25 +01:00
Emmanuel Gil Peyrot 425e032a62 SPU: Copy with memcpy() instead of hand-rolled SSE2
In some very unscientific benchmark:
spu_thread::do_dma_transfer() was taking 2.27% of my CPU before, now
0.07%, while __memmove_avx_unaligned_erms() was taking 1.47% and now
2.88%, which added makes about 0.8% saved.
2020-03-22 15:51:03 +03:00
Nekotekina 5261886449 CURL_STATICLIB macro cleanup
Also move includes from headers. CURL is just void.
2020-03-22 14:13:52 +03:00
Nekotekina e606130262 Memoize and print r3-r6 under Current function in the ppu_thread::dump() 2020-03-22 14:13:52 +03:00
Megamouse 7d33ca7059 Qt: use QDateTime in update manager 2020-03-22 14:13:33 +03:00
RipleyTom af4efafae1 Remove Qt5Network Qt5OpenGL and Qt5QML dependencies 2020-03-22 13:48:43 +03:00
Megamouse 09a8974786 Qt: fix curl threads 2020-03-22 13:48:43 +03:00
RipleyTom b1d8bf754e Replace QNetwork operations with libcurl + wolfssl 2020-03-22 13:48:43 +03:00
Eladash 132c3e1c1a kernel explorer: Add information about memory containers 2020-03-22 12:41:02 +03:00
Eladash dc839e1784 lv2: Do not lose r3 data on syscalls
Allows to get the ID of the lv2 sync objects in the debugger by looking at r3's content.
2020-03-22 12:41:02 +03:00
Eladash f1cf62ac57 kernel explorer: Implement ability to view lwmutex owner 2020-03-22 12:41:02 +03:00
kd-11 12044bd8b0 rsx: Properly calculate vertex range when divisor is active
- The upper bound is to be rounded up, not down.
2020-03-22 10:57:47 +03:00
Eladash 01cafc042d cellSaveData: Ensure savedata_context members are 16-byte aligned
I saw stvx v128{0} (aligned 16-bytes store) usage on the first 16-bytes of CellSaveDataCBResult before funcStat in fw.
Also I saw 4 stw of u32{0} on it as well before funcFile, funcFixed and funcList.
So just add the resets for result before all callbacks, and make all
members of savedata_ontext 16 -byte aligned in case there are more
members guaranteed to be aligned.
2020-03-21 19:05:20 +03:00
Eladash ceaee0ec68 cellSaveData: Clear traces of setList setup from setBuf->buf, add missing memset
* Always memset 0 setBuf->buf (to bufSize) before funcStat if the direcory is not new.
* Always memset 0 setBuf->buf (to bufSize) if listGet->dirNum became non-zero (listGet->dirListNum can be zero yet memset still occurs) .
* Clear traces of setList setup before funcStat (after funcFixed/List, only if listGet->dirNum != 0, callback can hack this value and prevent the memset).
2020-03-21 19:05:20 +03:00
Eladash b6a288d383 cellSaveData: Skip directory items in savedata_get_list_item 2020-03-21 19:05:20 +03:00
Eladash ae14eb0747 Minor fix of cellUserInfoGetStat
stat == nullptr is allowed, fix invalid id error code.
2020-03-21 19:05:20 +03:00
Eladash be0e586671 cellSaveData: Add error checks for cellSaveData(User)GetListItem 2020-03-21 19:05:20 +03:00
Eladash 66916df4ae cellSaveData: Set listSet->focusPosition to LISTHEAD by default 2020-03-21 19:05:20 +03:00
Eladash fae46bf194 cellSaveData: Add CELL_SAVEDATA_ERROR_NOUSER 2020-03-21 19:05:20 +03:00
Eladash e1cb827488 PPU Precise: Fix FMADDS, FMSUBS, FNMSUBS, FNMADDS 2020-03-21 16:32:09 +03:00
Eladash 3a36b713ce Dont spam syscalls stats if emu is paused 2020-03-21 16:31:18 +03:00
Eladash 9acf8e283d Fix OSK thread exit condition 2020-03-21 12:37:29 +03:00
Nekotekina c577bd2111 Implement thread_state::errored
State after calling thread emergency_exit() function.
Also default-construct thread result in this case.
2020-03-20 21:31:27 +03:00
Megamouse eb2dcaf602 Qt: fix some translation bubus 2020-03-20 01:43:08 +01:00
Megamouse fd8cda0f2b overlays/osk: fix selection after changing panels
We now try to keep the current x and y selected after panel changes.
Also change some copy to ref
2020-03-19 21:10:08 +01:00
Megamouse c63f77e3b0 overlays/osk: fix full width characters 2020-03-19 21:10:08 +01:00
Megamouse a1f70bf96e overlays/osk: do not change the preview text on empty input
This prevents that the placeholder disappears
2020-03-19 21:10:08 +01:00
Megamouse f1127f1894 overlays: implement osk panels 2020-03-19 21:10:08 +01:00
Eladash 1dbb5422a2 Avoid a segfault when reading ppu stack contents in debuggers
TODO: lock vm mutex.
2020-03-19 14:18:05 +03:00
Eladash a3289e9d40 Fix memory leak in rsx debugger 2020-03-19 14:18:05 +03:00
Eladash f2d6a1ff60 disasm: Improve instructions spacing 2020-03-19 14:18:05 +03:00
Eladash fd45bf5fba debugger: Force aligned memory view
Fixes a corner case viewing unaligned memory at the end of spu memory.
Also unaligned view isn't suitable for the debugger, for these purposes the memory viewer should be used instead.
2020-03-19 14:18:05 +03:00
Eladash e3668cc26c Fix a segfault in memory viewer
Also a memory leak.
2020-03-19 14:18:05 +03:00
Eladash 7139c4fbab Fix bug introduced by #7797 2020-03-19 07:22:05 +03:00
Malcolm Jestadt 0bfdc1f62e PPU LLVM: Improve VMADDFP and VNMSUBFP
- Use native FMA to emulate VMADDFP, with a fallback for processors that don't support FMA
- Use native FMA to emulate VNMSUBFP as well, but note that it differs from the emulated path with regards to negative zero
2020-03-19 06:47:16 +03:00
Eladash b11e8f8b8d Minor fix of sys_ppu_thread_yield return value
Account for a special case where threads were rotated but no context
switch was made.
2020-03-19 06:45:14 +03:00
Eladash 7be35315da Fix lv2 sys_lwcond/sys_lwmutex kernel explorer names 2020-03-19 06:45:14 +03:00
Nekotekina 6a2571d0e1 SPU: print current chunk hash in dump 2020-03-18 18:28:46 +03:00
Nekotekina 20f7544a8a SPU profiler: minor change
Use std::greater to sort
2020-03-18 18:28:46 +03:00
Zion Nimchuk 2678ac6382 Change default audio backend on non-windows
FAudio is preferred, but if we didn't build with FAudio, we default to OpenAL
Also changed it to explicitly use xaudio backend on windows, rather than the static cast we had before.
2020-03-18 09:38:13 +01:00
Eladash 03a6d67c6c Log sys_lwmutex/sys_lwcond names as strings
Use std::string_view instead of creating a temporary NTS string when reading object name.
2020-03-17 18:22:13 +03:00
Eladash a9f492b605 sys_spu: Fix oops in sys_raw_spu_destroy after #7782
'id' is not the idm id, also explicitly join the thread so a situation where the thread is still active and communicating other threads (e.g via MMIO or MFC) yet its ID is removed won't happen. (logic breakage, destroyed thread can't be  active)
2020-03-17 18:22:13 +03:00
Eladash 664d606123 Add return value of sys_ppu_thread_yield 2020-03-17 18:22:13 +03:00
Eladash 00d25a191b lv2: Uncomment sys_ppu_thread_stop/restart 2020-03-17 18:22:13 +03:00
Eladash 3566faabd9 Add missing lv2_obj::sleep when joining interrupt thread 2020-03-16 21:06:33 +03:00
Eladash 7e224c5585 cellVdecClose: Followup fix to #7663
Avoid executing sys_interrupt_thread_disestablish on different ppu thread with the same ID.
2020-03-16 21:06:33 +03:00
Eladash 9e14e835e7 Fix sys_raw_spu_destroy 2020-03-16 21:06:33 +03:00
Megamouse 33d01fd252 log: properly escape all html except newlines 2020-03-15 20:41:24 +03:00
kd-11 d25ba03e82 vk: Lazy evaluate renderpass scope
- Spamming the driver with renderpass open/close cycles is bad for performance.
2020-03-15 18:39:40 +03:00
kd-11 7025985c0d rsx: Improve section scanning when updating surface cache resources in blit engine. 2020-03-15 16:51:23 +03:00
kd-11 a756c0679e rsx: Implement cross-aspect slice gathering
- Fixes a data leak that can happen when a surface is rejected due to aspect mismatch.
- Mismatch can lead to rejection due to area covered excluding the RTT and inevitable upload a texture from CPU at the same location.
- Overlapping fbo/shader_read resources are not allowed.
2020-03-15 16:51:23 +03:00
Eladash 377e06a4a2 rsx: Fix unknown Blend equation 2020-03-15 09:53:15 +03:00
Rose 231e837f9b
[UI] Grey out AA and Aniso settings under strict rendering (#7773)
* Grey out AA and aniso under strict rendering

* Сhange aniso UI string to 'Auto'

Co-authored-by: Ivan <Nekotekina@users.noreply.github.com>
2020-03-14 20:45:41 +03:00
Nekotekina 45389dca51 PPU: minor fix for ppu_join_status::max
Don't treat it as special "invalid" value.
2020-03-14 20:36:56 +03:00
Eladash 4e6934c9dc Minor idm::remove_verify usage optimization in sys_interrupty.cpp
Avoid copying a shared ptr, create a weak ptr instead.
2020-03-14 19:26:37 +02:00
Eladash 74c05ec5ee PPU Disasm: Fix non-link extended BCCTR forms 2020-03-14 19:26:22 +02:00
Eladash cb4192bce9 vm: Log all guest memory bases at startup 2020-03-14 18:30:14 +02:00
Eladash 83a2204f87 PPU Disasm: Fixup BCCTR after #7775 2020-03-14 18:30:14 +02:00
Eladash c16124f0d9 idm: Fix minor race in cellVdecClose, sys_raw_spu_destroy...
Because of racing removal of IDs vs the shared pointer owned object
2020-03-14 18:30:14 +02:00
Eladash efe6e1eb0a sys_ppu_thread: Make PPU id removal after exit atomic with descheduling
* Make PPU id removal after exit atomic with descheduling
* Make joining thread scheduling atomic with thread exit sleep.
* Update sys_ppu_thread_stop/restart.
* Add idm::remove_verify.
2020-03-14 18:30:14 +02:00
Eladash c3d36940c7 cellSaveData: do not allow to read/write/delete system files in funcFile
Return param error 70 as realhw in this case.
2020-03-14 16:12:18 +03:00
Eladash ff341fe597 PPU Disasm: Fix branches spacing
Null terminator was added at the end which prevented proper spacing.
2020-03-14 16:12:18 +03:00
Eladash db71d4852a cellSaveData: Fix adding file entries to PARAM.SFO on error 2020-03-14 16:12:18 +03:00
Eladash 88ee198d78 cellSaveData: return ERROR_FAILURE on funcFile deletion failures 2020-03-14 16:12:18 +03:00
Nekotekina 9176ca084c VFS: clarify escape/unescape cannot work on paths
With recent changes, it can only work with file or directory name.
2020-03-14 16:01:55 +03:00
Nekotekina 70cd8afafa VFS: improve vfs::escape (escape NUL, LPT, COM...)
Windows legacy trash.
2020-03-14 15:07:59 +03:00
Nekotekina 6a8f5e6b38 VFS: fix vfs::get
Escape each path element separately.
2020-03-14 14:25:37 +03:00
Nekotekina 6c234b48ce VFS: Fix possible out of range in vfs::escape 2020-03-14 13:33:25 +03:00
Nekotekina bf957a575c VFS: fix out of range problem in vfs::unescape
Also improve unescape with "!" allowing any character
2020-03-14 13:15:46 +03:00
Nekotekina 0c65a1721d VFS: escape multidot names like ... 2020-03-14 12:34:28 +03:00
Eladash 5d78d81c00 cellSaveData: Filter directory lists to allowed savedata directories
Filters "." and "..", as well as possible wrong directories added by the user.
2020-03-13 22:43:27 +03:00
Eladash b21b4faca8 cellSaveData: Fixed savedata lock after fmt::throw_exception 2020-03-13 22:43:27 +03:00
Eladash d58f52ff31 cellSaveData: Add some listSet error checks
* Check listSet->fixedListNum.
* Check listSet->fixedList for nullptr and its directory items names.
* Check listSet->focusDirName for nullptr and directory name.
* Check listSet->newData->iconPosition.
* Check listSet->newData->dirName for nullptr and directory string.
* Check statSet->setParam->parental_level for old sdk.
* Return an error if listSet->focusPosition is NEWDATA and listSet->newData is nullptr.
* Simplify savedata directory list selection.
2020-03-13 22:43:27 +03:00
Eladash 54af8ec544 cellSaveData: funcFile fixes
* Allow '_' at filenames start and extension.
* Check if reading offset is valid, fix error code to CELL_SAVEDATA_ERROR_FAILURE.
* Don't create empty file on error of write ops.
* Don't allow "." and ".." filenames on funcFile, return CELL_SAVEDATA_ERROR_BROKEN.
2020-03-13 22:43:27 +03:00
Eladash fdf47f43d8 cellSaveData: refactor param error 70 checks
Also extend the check to check empty name.
2020-03-13 22:43:27 +03:00
kd-11 2ae83782e1 vk: Fix potential MTRSX deadlock in case of a race condition 2020-03-13 22:06:04 +03:00
Eladash f3877d11e8 rsx: Fix initial boolean state of m_textures_dirty and m_vertex_textures_dirty 2020-03-12 21:36:43 +01:00
Eladash 28e9cade2c GUI/rsx capture: Disable capturing if no game is running! 2020-03-12 21:36:43 +01:00
Eladash c04abac630 rsx capture: Fix exceptions handler, fix tiny race condition on capture new capture 2020-03-12 21:36:43 +01:00
kd-11 7e9dbeff7b
vk: Fix MTRSX deadlock (#7766) 2020-03-12 22:29:58 +03:00
Megamouse f0edcc16fe evdev: add more buttons to button list 2020-03-12 19:43:52 +01:00
Megamouse e7adef9fe1 evdev: remove unused call to update_device 2020-03-12 19:43:52 +01:00
Megamouse 9c5da55dca evdev: Some random cleanup 2020-03-12 19:43:52 +01:00
Nekotekina d802b3d8b2 Remove -fno-strict-aliasing
It was added due to miscommunication.
2020-03-12 16:04:57 +03:00
Nekotekina 04dedb17eb Disable exception handling.
Use -fno-exceptions in cmake.
On MSVC, enable _HAS_EXCEPTION=0.
Cleanup throw/catch from the source.
Create yaml.cpp enclave because it needs exception to work.
Disable thread_local optimizations in logs.cpp (TODO).
Implement cpu_counter for cpu_threads (moved globals).
2020-03-12 16:03:08 +03:00
kd-11 47bbfdd2aa vk: Change texture cache memory management for disposed textures
- Use global resource manager instead of using the 2-frame hold behavior.
- Fixes high VRAM usage in some games
2020-03-11 16:29:34 +03:00
Nekotekina 92eeec39b7 Improve Stop Watchdog
Make it less possible to interfere with the debugger.
2020-03-10 23:00:23 +03:00
Nekotekina 656db6c668 Fatal errors: concatenate multiple args after --error
It should fix error dialogs on Windows since it decomposes the arg string.
2020-03-10 22:42:33 +03:00
kd-11 7989de9d16 vk: Properly release dma resources. 2020-03-10 22:02:02 +03:00
Megamouse 3ea94c286b input/overlays: fix premature pad interception removal
shader compilation and trophy notifications shouldn't cancel the pad interception during proper dialogs
2020-03-10 19:04:32 +01:00
Bird Egop 4e25daffa6
Explicitly rename has_512 into has_avx512 (#7751) 2020-03-10 19:21:00 +03:00
Nekotekina b4f416cb76 Fix narrow warning in ds4_pad_handler.cpp 2020-03-10 18:45:49 +03:00
Nekotekina 87d4b14ca9 Pause only on fatal messages
Also make some access violation an error since we don't pause on it.
2020-03-10 11:26:42 +03:00
Nekotekina d3eb267ba9 Logs: add 'always' method for debugging 2020-03-10 11:23:56 +03:00
kd-11 12b73c8bdc rsx: Fix copypasta 2020-03-09 17:20:24 +03:00
Eladash 5751b77688 GUI: followup to #7347
Show "Reboot" on current running game when there's no config.
2020-03-09 16:07:14 +03:00
Eladash 636ed4a48b HLE cellGcmSys: Avoid calling sys_rsx syscalls in rsx code 2020-03-09 16:07:14 +03:00
Eladash af7cdcb5c7 Add forgotten error check in sys_spu_thread_group_connect_event 2020-03-09 16:07:14 +03:00
kd-11 2985a39d2e rsx: Rewrite async decompiler 2020-03-09 14:59:25 +03:00
Nekotekina 609c0d46af Implement stop watchdog
Shows fatal error if stopping takes more than 5s.
2020-03-09 13:20:49 +03:00
MSuih a2b6546d37 Fix framelimit/aspect ratio width 2020-03-08 21:56:48 +01:00
Nekotekina 9dca2887d8 Fixup for Emu.Pause()
Remove some reduntant calls.
Don't pause on unknown sys_fs_fcntl operation.
2020-03-08 22:03:16 +03:00
Nekotekina 6268a2d384 Improve report_fatal_error()
Previously it could cause secondary segfault on Linux.
2020-03-08 22:03:15 +03:00
Nekotekina c87beaa694 Use _wexecl on Windows
Allows original path to contain any Unicode character.
2020-03-08 20:45:34 +03:00
Nekotekina 1bbe2e9b15 Simplify report_fatal_error
Those semaphores didn't achieve anything.
Launch separate process if Qt is already initialized.
2020-03-08 20:45:34 +03:00
Nekotekina e40019354c Pause emulation on any fatal log message. 2020-03-08 20:45:34 +03:00
Nekotekina 07e1766a7c Implement thread_ctrl::emergency_exit()
Replace exception throws with this.
2020-03-08 15:11:02 +03:00
illusion0001 814c73407d overlay: set minimum update interval to 1ms 2020-03-08 15:05:42 +03:00
Eladash 5692c3de04 Fix sceNpUtilCmpNpId 2020-03-08 12:49:34 +03:00
kd-11 8214425a3c rsx: Fix framebuffer native layout for X32_FLOAT
- It was not matching the order laid out for normal textures uploaded from CPU.
2020-03-08 11:43:49 +03:00
kd-11 84a542fbce rsx: Blit engine improvements
- Detect writes to the display output memory and handle it specially.
  It already defines a known 2D region.
- Try and detect situations where raw transfers would be of benefit.
2020-03-08 10:30:13 +03:00
Megamouse ab4189998c Qt: don't create stupid default.ini file when resetting gui configs 2020-03-08 00:06:48 +01:00
Megamouse 9b672cb969 Qt: Improve tooltip areas in network tab 2020-03-08 00:06:48 +01:00
Megamouse 5f247cbedc Qt: Backup current gui config before applying another one
Also fixes some strange issues caused by the pointer
2020-03-08 00:06:48 +01:00
Megamouse 53676067fc Qt: remove gui settings default shenanigans 2020-03-08 00:06:48 +01:00
Megamouse 11bc7de0ca Qt: more code cleanup in gui files 2020-03-08 00:06:48 +01:00
Megamouse 091dcc1052 Qt: fix play button state when booting rpcs3 for the first time 2020-03-08 00:06:48 +01:00
Megamouse 934a2eb9fa Qt: some code cleanup in gui files 2020-03-08 00:06:48 +01:00
Megamouse 426643c44d Qt: Prefer currently selected game when pressing the play button
Also rename Start to Play
2020-03-08 00:06:48 +01:00
Megamouse 7dd36ff829 Qt: Fix CurrentSelectionIconPath for game grid
Fixes deselection issue when booting a game in the game grid
2020-03-08 00:06:48 +01:00
Megamouse 0c45457101 Qt: Add title and title id to button tooltips 2020-03-08 00:06:48 +01:00
Megamouse e56b3256b0 Qt: Add missing boot error dialog 2020-03-08 00:06:48 +01:00
Eladash 892f74d762
rsx: Improve frame-limiter (#7723)
* rsx: Improve frame-limiter accuracy

* lv2: Improve lv2_obj::wait_timeout response time for aborting threads

* rsx: Make stretch to display area setting dynamic

* rsx: Redefine 'auto' frame limiter to obey vblank rate

* rsx: Make frame limiter setting dynamic

* rsx: Make frame-limiter compatible with dynamic changes
2020-03-08 01:11:35 +03:00
Eladash deb6bd3e25 Atomic sys_prx_load_module_list error checks 2020-03-07 22:03:38 +03:00
Eladash 5e86ef2371 rsx: Make force cpu blit setting dynamic 2020-03-07 21:17:26 +03:00
kd-11 149d550f7e gl: Restore commented out line
- Byte order step was disabled for debugging and not restored
2020-03-07 17:23:25 +03:00
kd-11 70f2577b9e vk/gl: Use best-fit semantics when scanning texture cache for flippable images
- Allows sourcing flip data from the blit engine resources which avoids expensive flush and re-upload
2020-03-07 16:58:35 +03:00
kd-11 93295f7f50 vk: Fix image properties for flip temporary images to be samplable.
- In case of gamma correction or other effects, they may require shader access.
- BGRA8_UNORM is usually safe to use directly without staging memory.
2020-03-07 16:58:35 +03:00
kd-11 1725f7a34b rsx: Add anaglyph 3D filter 2020-03-07 16:58:35 +03:00
kd-11 6e3406b3f5 video: Allow selection of 3D stereo resolutions 2020-03-07 16:58:35 +03:00
Nekotekina 19107b2de5 logs.cpp: fix log format for backward compatibility
Don't add prefix for first messages.
2020-03-07 15:33:07 +03:00
Nekotekina 7599c66639 logs.cpp: print some errors if failed to create logs 2020-03-07 14:38:19 +03:00
Nekotekina b726aa5a3e logs.hpp: minor optimization for non-formatting logs
Also use single template with CharT to match fmt::format.
2020-03-07 13:52:51 +03:00
Nekotekina 12a3cdf0e8 Move Log.cpp to util/logs.cpp
Minor cleanup
2020-03-07 13:31:10 +03:00
Nekotekina e4a81b1d13 Move Log.h to util/logs.hpp 2020-03-07 12:29:23 +03:00
Nekotekina a166d3680e Don't throw on invalid whence (return fs::error::einval) 2020-03-07 11:52:54 +03:00
Nekotekina 66b0b78055 Logs.cpp: more code moved to main.cpp 2020-03-07 11:15:44 +03:00
Nekotekina 2209be5216 Logs: remove mem-mapped buffer and move instance lock to main.cpp
Part of the work to untangle utilities from RPCS3-specific things.
2020-03-07 10:49:09 +03:00
Eladash 1669e95870 Implement lv2_file::open()
Return accurate error codes in prx_load_module, sys_spu_image_open and overlay_load_module.
2020-03-06 21:16:46 +03:00
Nekotekina acd50eefaf Try to use designated initializers 2020-03-06 09:42:49 +03:00
Nekotekina 7514e53385 Fix SPRX/firmware installation (use a mutex) 2020-03-06 08:39:24 +03:00
Megamouse e1b4cf1557 Qt: Fix led dialog layout and use hidpi painting 2020-03-05 22:37:48 +01:00
Megamouse 9e449db0c2 Qt/Input: piggyback on existing callback for battery_level
removes ds4 timer workaround
2020-03-05 22:37:48 +01:00
Adiost f776910966 Qt/Input: new ds4 LED settings 2020-03-05 22:37:48 +01:00
Eladash f6cf36f6a7 Fix _sys_prx_get_module_info p0pt->filename writing with 0 size 2020-03-05 18:28:56 +03:00
Nekotekina 7a8772dafa Replace std::string::npos with umax 2020-03-05 14:05:23 +03:00
Nekotekina 0a41999818 PPU LLVM: fix regression from warning fixes
Forgot that negative power is used here.
2020-03-05 11:07:40 +03:00
Megamouse f1147f70f4 Fix 7z for Debug and Release 2020-03-04 23:58:16 +01:00
Eladash 39eafc1f3b Fix Crypto/utils.cpp: extract_file_name 2020-03-05 00:31:43 +03:00
Megamouse 21b6495aaa Fix ui and sys_net warnings 2020-03-04 22:28:05 +01:00
Nekotekina Aux1 250736ece5 Fix warnings in emucore 2020-03-04 21:23:34 +03:00
Nekotekina Aux1 f2f3321952 Fix warnings in VKGSRender 2020-03-04 21:23:34 +03:00
Nekotekina Aux1 c3f3451269 Fix warnings in GLGSRender 2020-03-04 21:23:34 +03:00
kd-11 54775d91dc rsx/blit-engine: Account for a rare corner case
- It is possible to have a RTV<->DSV transfer with compatible-sized formats.
  Mark the depth size as typeless in such a situation to avoid crossing the aspect barrier with the API.
2020-03-04 21:21:59 +03:00
RipleyTom f1f5c91386
Fake PSN (#7516) 2020-03-04 13:55:35 +00:00
Nekotekina bdbc7b5f1d PPU: use named_thread_group to compile modules
Improves internal logic by not using too many threads.
2020-03-04 14:10:38 +03:00
Nekotekina 5b0476e772 Update LLVM to new llvm-mirror (LLVM 11)
Use clang-cl to build LLVM on Windows.
2020-03-03 18:33:02 +03:00
Nekotekina 68f50c7035 Fix ppu_syscall_usage thread waiting
Fixed 10s hang on exit
2020-03-03 18:33:02 +03:00
Eladash 5c3d417b35 Fix cellGameDataCheck's game data creation with PARAM.SFO set/get 2020-03-03 18:31:43 +03:00
Nekotekina 01db83bc36 SPU LLVM: Rewrite fma32x4 to match FM and older asmjit stuff 2020-03-03 11:31:20 +03:00
Eladash de1774d8f2
cellSaveData: fix doneGet->sizeKB (#7674)
* cellSaveData: fix doneGet->sizeKB

* [⚠️] Warning: beware of typos [⚠️]
2020-03-03 11:24:49 +03:00
Nekotekina 3105b21909 Print PPU Syscall Usage Stats
* Every 10 seconds
* On normal exit
2020-03-02 20:48:20 +03:00
MSuih d94b875187 Minor cleanup
- Remove log prefix as auto-updater no longer uses general channel for logging
- Swap some C-style nulls for nullpointers
- Other misc changes
2020-03-02 12:31:59 +03:00
MSuih 7129902b25 Add time logging for updater
Might help diagnose issues
2020-03-02 12:31:59 +03:00
Nekotekina bd234a7668 sys_ppu: another fixup 2020-03-02 10:35:54 +03:00
Megamouse 73a9946212 Qt: remove game window title size restriction
- Elide game window title label
- Add tooltip with format and resolved title
- Remove max length (do not wrap text to show how ridiculous it will look if it's too long)
2020-03-01 22:00:57 +01:00
Nekotekina c7fa4e2375 Fixup 2020-03-01 22:40:48 +03:00
Nekotekina 6ee9153329 sys_ppu_thread: fixing detached threads 2020-03-01 22:29:03 +03:00
InvoxiPlayGames 752c4a7b0d Fix duplicate inputs for GHLtar strumming 2020-03-01 20:10:46 +03:00
kd-11 582c98359e videoOut: Resolve 'auto' aspect ratio
- 'Auto' is not an actual aspect ratio, just a dont-care flag to set the
  display to the best fit aspect ratio.
  Decay this option into a proper ratio for cellVideoOutGetState to
return legal values.
2020-03-01 20:10:11 +03:00
Eladash 7dfd50d5cc cellSaveData: followup to #7652 2020-03-01 20:09:46 +03:00
Nekotekina b05b16aedc sys_ppu: Hotfix for detached threads 2020-03-01 18:30:16 +03:00
Eladash ffd5a9e91c cellSaveData: Add some error checks for fixedSet, fileSet params 2020-03-01 10:56:41 +02:00
AniLeo fbe6900b28 rpcs3_version: Bump to 0.0.9 2020-03-01 00:17:15 +03:00
kd-11 7fe9802f87 vk: Properly use declared pitch when loading simple images 2020-03-01 00:16:52 +03:00
kd-11 14aebeac58 video-out: Allow applications to successfully change display resolution
- Avoids a situation where a game configures output correctly but gets back bogus information later when querying.
- Should fix games being broken at some resolutions but not others.
2020-03-01 00:16:52 +03:00
kd-11 76bbbe27f1 vk: Fix dma resource leak
- Fix broken check; a relic of the past where flush method would reset the fence
2020-03-01 00:16:02 +03:00
kd-11 9af52d12a8 vk: Improve events
- Make events properly managed objects.
- Add a workaround for AMD's broken event status query
2020-03-01 00:16:02 +03:00
kd-11 5eb314fbbb vk: Add execution barriers.
- Useful for debugging
2020-03-01 00:16:02 +03:00
Eladash 655f7ce8a2 cellSaveData: Add null funcStat check
it's ordered specially for some functions
2020-03-01 00:14:45 +03:00
Eladash c11074a128 RawSPU: fix race condition in RunCntl stop request 2020-02-29 21:54:54 +03:00
InvoxiPlayGames ef6854ca46
sys_usbd: Guitar Hero Live controller emulation (#7336)
* Initial GHLtar emulation

* Add GHLtar to CMakeLists and VS project, zero the buffer and remove unused header values

* Fix coding style issues and include headers

* Remove redundant if, improve code formatting

* Remove needless includes

Co-authored-by: Ivan <Nekotekina@users.noreply.github.com>
2020-02-29 21:40:44 +03:00
clienthax 7e590eaa2f Change key_vault to use version ranges. 2020-02-29 21:24:15 +03:00
MSuih 94478ad4a0 Add error for missing firmware 2020-02-29 21:19:01 +03:00
Nekotekina e28e51463b Compilation fix
Should fix #7642
2020-02-29 21:16:28 +03:00
Eladash 50f51be06a
Improve sys_timer_get_information (#7638)
* Improve sys_timer_get_information

* sys_timer_disconnect_event_queue sets STATE_STOP regardless of port connection status.
* sys_timer_get_information sets 0 for period and next_expire if the timer is stopped.

* Fix two minor races in lv2_timer thread

* If the timer thread is about to fire an event of queue x, then another thread disconnects the queue, then restarts the timer and connects the event queue, then the timer thread sends an event - event data combination (source, data1, data2, next) may be inaccurate.

* If the timer thread is about to send an event (periodically), then another thread stops the timer and starts it again with sys_timer_start_periodic_absolute, timer.expire in info->timer_state in sys_timer_get_information may be inaccurate.
2020-02-29 17:15:25 +03:00
Nekotekina 8e5a03f171 Use named_thread_group in rsx_cache.h 2020-02-29 16:55:25 +03:00
Nekotekina f72971f19f Implement named_thread_group 2020-02-29 16:55:25 +03:00
kd-11 eb140c52a4 rsx: Reset ZCULL statistics at the end of a frame
- Workaround for games that leak zpass/zstats.
  The information is useless anyway without a clear op so it should be fine.
2020-02-29 14:23:52 +03:00
kd-11 198c84cabf rsx: Fix zcull clear command; do not clear ZPASS when ZSTATS is cleared. 2020-02-29 14:23:52 +03:00
Eladash 5a73943be6 Fix sys_timer_destroy
Also some cleanup.
2020-02-29 13:06:14 +03:00
Eladash 34a0c3f488 cellSaveData: Add error param 72, 73 checks for file write ops 2020-02-29 13:06:14 +03:00
Eladash 8762f2a588 Use more starts_with 2020-02-29 13:06:14 +03:00
Eladash d7dd4897f8 Allow 0x30000000 > addr >= 0x2000000 ppu loader exec allocations (workaround) 2020-02-29 13:06:14 +03:00
Nekotekina a84077f174 sys_ss: use BCryptGenRandom on Win32 2020-02-29 12:15:42 +03:00
kd-11 08f3460365 vk: Fixup for RCB/RDB in special cases
- Images must be in TRANSFER_DST_OPTIMAL or GENERAL layouts to call the image upload routines.
2020-02-29 12:13:11 +03:00
Nekotekina be0e4e9879 Move Progress Dialog Server to named_thread
Make it a global variable, but that can be actually destructed at exit.
2020-02-28 21:59:56 +03:00
Nekotekina 799c3f9708 Remove global thread counter (again)
Seems fine without it now.
2020-02-28 21:50:19 +03:00
Nekotekina 490f58ff3c Try to purge thread_state::detached
It's rarely necessary, but can cause unexpected problems.
2020-02-28 21:11:13 +03:00
kd-11 cb047fcc75
rsx: Disable zstat checks to avoid unnecessary stream splitting (#7624) 2020-02-28 20:27:31 +03:00
Nekotekina ac2581659a RSXOffload: fix dma_manager::sync() freeze on exit
Its logic was completely broken.
2020-02-28 19:55:43 +03:00
Nekotekina f335d034fc Fix RSX Offloader thread exit (MTRSX fix)
Hangs on exit if MTRSX is enabled.
2020-02-28 19:43:42 +03:00
Eladash 05bb6e1545 Improve sceNpDrmVerifyUpgradeLicense(2), sceNpDrmIsAvailable(2)
* sceNpDrmVerifyUpgradeLicense(2): copied string from content_id is 47 chars in length at max, is no null term was found it forces string termiation.
* sceNpDrmIsAvailable(2): Same with drm path just that it's 256 chars at max.
2020-02-28 19:10:39 +03:00
Nekotekina 65eeee0f4c Remove cancerous lf_value<>
Replace thread names (generic, PPU, SPU) with new shared pointers.
Devirtualize cpu_thread::get_name (used in single case).
2020-02-28 18:54:46 +03:00
Eladash 30f7c81cc5 cellSaveData: Implement/Fix param error 22 for funcFile, funcDone, funcFixed and funcList 2020-02-28 16:47:51 +01:00
Nekotekina 08ab9c4b04 fixed_typemap.hpp: reset creation index to avoid confusion 2020-02-28 00:16:04 +03:00
Nekotekina 4474757162 fixed_typemap.hpp: remove <algorithm> dep in header
Create fixed_typemap.cpp
2020-02-28 00:04:37 +03:00
Nekotekina bacd1698fc fixed_typemap.hpp: minor cleanup 2020-02-27 23:04:23 +03:00
Ivan e133c7a7dc
Merge pull request #7506 from elad335/patch-1
PPU exec/ovlm ldr: restrict allocations
2020-02-27 22:55:30 +03:00
Eladash 0eabfdcadd cellSavedata: reset padding of g_savedata_context 2020-02-27 22:31:31 +03:00
Eladash d86241bbcd cellSaveData: reset fileSet and fileGet->reserved everytime 2020-02-27 22:31:31 +03:00
Eladash 42a0512c66 cellSaveData: Avoid passing vm pointer to native API 2020-02-27 22:31:31 +03:00
Eladash 556aba46b5 cellSaveData: do not fail on empty directory 2020-02-27 22:31:31 +03:00
Stephen McKinney 2b853cc8bc Don't improperly resolve symlinks when booting games. 2020-02-27 22:30:11 +03:00
Nekotekina ecd68dfc70 overlays: add "thread bits" to wait on and avoid lockup
Add TLS variable to store its own bit.
2020-02-27 19:14:08 +03:00
Nekotekina d0b2eecc9a fixed_typemap.hpp: polish move constructor a bit
GitHub, plz.
2020-02-27 19:14:08 +03:00
Nekotekina d5c85f308a fixed_typemap.hpp: forgot destructor 2020-02-27 13:04:12 +03:00
Nekotekina f71cdb4eb8 g_fxo: implement logging for object creation/destruction.
Only logged at automated phase for initial/final processing.
2020-02-27 13:04:12 +03:00
Megamouse ee46ad1ca9 move overlays code to headers 2020-02-26 23:43:18 +01:00
gamerforEA 762c106e19 sys_prx_.cpp: Fix RAII locks usage (without local variables they destroyed immediately after construction) 2020-02-27 00:38:55 +03:00
gamerforEA 93552a5958 Apply some Clang-Tidy fixes 2020-02-27 00:38:55 +03:00
gamerforEA c0fbf3091e Remove unnamed namespaces from headers 2020-02-27 00:38:55 +03:00
gamerforEA 49294a3dd2 Add missing include guards 2020-02-27 00:38:55 +03:00
RipleyTom abfa303e07 Auto-updater minifix 2020-02-26 22:06:58 +03:00
Nekotekina 5094ab8283 Fix RSX Offloader thread name 2020-02-26 21:57:01 +03:00
Nekotekina e102dc2a94 Add message on exit if some thread are still waiting 2020-02-26 21:23:30 +03:00
Nekotekina 5e59f18720 fixed_typemap: implement need<> method
It may be used in constructors of other objects to assert a dependency.
It also helps to ensure reverse destruction order of that dependency.
2020-02-26 21:23:30 +03:00
Nekotekina b35a5982e8 Fix one bug with MsgDialog thread (freeze on exit)
Forgot to check thread state
2020-02-26 21:23:30 +03:00
Eladash 4d3cdca7f6 Stub sys_spu_thread_group_set_cooperative_victims and syscall_253 2020-02-26 18:17:13 +00:00
Eladash 0d4f8ca234 fs: Make fs::get_dir_size able to report an error 2020-02-26 18:17:13 +00:00
kd-11 569e1c2df6 rsx: Fix typo. Noted by github user @gamerforEA 2020-02-26 19:40:35 +03:00
kd-11 6e9392fb45 rsx: Restructure ZCULL query triggers
- Both ZCULL stats and ZPASS stats require hardware queries, but
  ZCULL stats should not contribute to ZPASS stats and vice versa!

- Disables hardware queries for ZCULL stats by themselves, we cannot
  generate them correctly anyway and no game so far has been found to
  actually use them. Should lessen the load on the backend for games
  that do not actually require it.
2020-02-26 19:40:35 +03:00