Commit graph

630 commits

Author SHA1 Message Date
clienthax 68fa377d13 Add dev_flash2+3 2021-04-18 14:49:29 +03:00
Megamouse fc9b3c13e6 misc: fix old some style casts and redundancies 2021-04-13 20:57:05 +02:00
Megamouse f5415fb4ac overlays: dynamically change dialog background 2021-04-13 19:13:56 +02:00
Megamouse a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Eladash 56d34e0e80 Enforce backslash at the end of emulated drives paths 2021-04-10 23:51:49 +03:00
Megamouse 03b76b4606 Emu: some cleanup 2021-04-09 21:03:49 +02:00
Megamouse d10584ac6c DRM: Search all user directories for rap files 2021-04-09 08:47:59 +02:00
Eladash d2b761b7de Log error about HG games booted outside of /dev_hdd0 2021-04-08 23:57:00 +03:00
Eladash 49c5ce30cc Emulation: Fix boot path resolving
* Fix /dev_flash executables path arg. (/host_root is wrong for it)
* Fix usage of /host_root for homebrew applications when it is not mounted, use /app_home.
* Fix path source detection. (don't get fooled by path slashes repetitions, symlinks, '.', ".." and ('\' on Windows))
* Unescape tail of /dev_hdd0 paths.
2021-04-08 23:57:00 +03:00
Megamouse 02febd3f65 Workaround: Skip progress_dialog during gameplay 2021-04-06 21:39:34 +03:00
Megamouse 497fbb17a8 progress_dialog fixes 2021-04-06 21:39:34 +03:00
Eladash 4a9be0a8d2 core: Move IDM to FXO 2021-04-04 17:29:32 +03:00
Nekotekina ed8f60431f Fixup for progress dialog closing logic
Co-authored-by: Megamouse <studienricky89@googlemail.com>
2021-04-03 23:25:02 +03:00
Nekotekina 6f1f75bc8f Minor progress dialog refactoring
Add rsx::overlays::progress_dialog class (identical to message_dialog).
Don't use Emu.CallAfter() for native dialogs.
Make g_progr_ptotal waitable.
2021-04-03 22:38:04 +03:00
Megamouse b7eefeac8b hotfix: skip progr dialogs if msg dialogs are open 2021-04-03 20:37:40 +02:00
Megamouse 9c7230e79f cli: set user-id per command line 2021-04-02 11:50:28 +02:00
Eladash 55c98bfaef Fix #9879 and fix firmware confirmation dialog when auto-start is disabled 2021-04-01 14:09:02 +03:00
Nekotekina e9a45a2f45 Implement scoped_progress_dialog
Create Emu/system_progress.hpp
Remove atomic g_progr_show
2021-03-31 23:40:09 +02:00
Megamouse 870224cde0 Emu/overlay: ingame native overlay PPU compilation 2021-03-31 09:38:30 +02:00
Eladash e9bea1c742 Emu: Do not obey auto-exit setting after creating firmware cache 2021-03-30 10:21:54 +03:00
Eladash aad5283786 Fix Emulator::IsPaused() 2021-03-30 10:21:54 +03:00
Eladash cd6ef2958b Add information about unnamed/main threads in logs and fatal dialog
* If thread is unnamed, keep log name empty for main thread, otherwise print thread id. In fatal dialog, main thread can be handled differently (with special remark that it's main thread).
* Always print thread id in fatal dialog, regardless of thread type.

Co-authored-by: Nekotekina <nekotekina@gmail.com>
2021-03-11 22:55:06 +03:00
Nekotekina 53af2dbb3f Add/fix warning -Wignored-qualifiers (GCC/clang)
Fix simple_array::const_iterator as a part of it.
2021-03-09 03:09:50 +03:00
Megamouse 1a3c01154a make from_hdd0_game check lowercase 2021-03-08 22:58:19 +03:00
Megamouse dab53f4e41 Cleanup Emu before the update reboot 2021-03-07 01:56:25 +03:00
Nekotekina 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Eladash a5d74c5e96 GUI: Improve missing firmware handling
* Install PS3UPDAT.PUP at the spot when booting games whenever firmware is missing. The option to boot games without firmware is still supported when all firmware SPRX are HLEd in firmware settings.
* Pop-up a confirmation dialog in firmware installation if firmware is already installed.
2021-03-06 10:34:49 +01:00
Nekotekina c71bc25090 PPU: remove artificial 0x20000000 barrier for debug stats
Change it to 0xE0000000 (SPU demarcation line)
2021-03-02 21:58:49 +03:00
Eladash 004ebfdaee SPU debugger: Implement MFC journal
* Allow to dump up to 1820 commands with up 128 bytes of data each, using key D with the debugger.
2021-03-02 21:57:51 +03:00
Nekotekina ea5e837bd6 fixed_typemap.hpp: return reference 2021-03-02 16:08:14 +03:00
Nekotekina d788b12a8e fixed_typemap.hpp: reduce indirection
Backported some changes from auto_typemap.hpp
Implemented methods init(), reset(), clear()
Disabled recreation support.
2021-03-02 16:08:14 +03:00
Megamouse a7c9827ad4
Improve cellScreenshot (#9851)
* Fix screenshot logging

* Update libpng to 1.6.37

* cellScreenshot: Write text chunks
* cellScreenshot: add overlay image
* screenshot_manager: add /dev_hdd0/photo/

* read_png_file: use deleter instead of manual close

* cellScreenshot: use Qt for overlays
* cellScreenshot: don't apply overlay to regular img
* screenshot_manager: add mount hack for VFS
* cellScreenshot: escape the whole path
2021-02-28 22:05:04 +03:00
Eladash c13039396c
Fix stop count incremention in Emu.Stop (#9843)
Until emulation is completely stopped, further CallAfter callbacks may be issued with incorrect stop count memorized.
2021-02-25 14:37:31 +03:00
Eladash 112b7f6571 Fix Emulation::CallAfter
Most CallAfter usages were extremely wrong when ordered after Emu.Stop(). could result in anywhere from emulation stopping hangs to even segfaults.
track_emu_state = true is now the default, I haven't found cases which need need it disabled.
2021-02-23 17:55:36 +03:00
Eladash 932f31e37b Atomic PARAM.SFO writes 2021-02-23 11:29:23 +03:00
Eladash f43260bd58
Atomic waiting refactoring (#9208)
* Use atomic waitables instead instead of global thread wait as often as possible.
* Add ::is_stopped() and and ::is_paued() which can be used in atomic loops and with atomic wait. (constexpr cpu flags test functions)
* Fix notification bug of sys_spu_thread_group_exit/terminate. (old bug, enhanced by #9117)
* Function time statistics at Emu.Stop() restored. (instead of current "X syscall failed with 0x00000000 : 0")
2021-02-13 17:50:07 +03:00
Eladash 423cc1685c PPU LLVM: Reduce PRX/OVL compilation memory usage a little 2021-02-13 13:05:41 +03:00
Megamouse 89942ed92a optimize add_only boot process
No need for hardcore stuff while adding games to the list
2021-02-02 18:37:18 +01:00
Megamouse 2c32a721fc Allow BootGame with indirect paths 2021-02-02 13:21:26 +01:00
Eladash 82c86ed2f7 Implement standalone OVL (overlay) loading mode
* Allow to load OVL alone.
* Add error checks in ppu_load_exec(), do not crash on error.
* Fix crash on exit from standalone PRX mode, allow kernel explorer to work with it as well for the added OVL mode.
2021-01-31 15:47:05 +03:00
Eladash 9077563dac Add missing destructor of progress dialog 2021-01-31 12:55:20 +01:00
Eladash 8d15f44b33 Fix ppu progress dialog percentage 2021-01-31 12:55:20 +01:00
Eladash b3fbada10e Fix potential crash of progress dialog 2021-01-31 12:55:20 +01:00
Megamouse 31cdd7bdd2 Prevent minor race in Progress Dialog Server 2021-01-31 12:18:32 +03:00
Megamouse 2025f02105 Search for more game data directories.
Also properly remove duplicate paths
2021-01-31 11:42:33 +03:00
Megamouse 1078626eea Fix ppu compilation progress dialog
We could only increase the value because we completely based the dialog on cellMsgDialog.
This led to an issue where the dialog would increase its maximum and thus decrease the current percentage.
It then couldn't decrease and was stuck on the old percentage.
2021-01-30 21:34:16 +01:00
Eladash e3b3b0cda7
PPU LLVM: Precompile all executable (PRX, MSELF, overlay) code at startup (#9680)
* Precompile LLVM cache at startup of games, like the GUI "Create PPU Cache" option.
* Allow OVL (overlay) precompilation as well (used by certain games).

Co-authored-by: Megamouse <studienricky89@googlemail.com>
Co-authored-by: Nekotekina <nekotekina@gmail.com>
2021-01-30 16:08:22 +03:00
Eladash d3bc96a201 Fix minor issue with usage of STL thread::hardware_concurrency() 2021-01-29 18:23:29 +03:00
Nekotekina 11ba6e45ab Add MSELF support to SPRX precompilation.
Add ppu_precompile() function in PPUThread.cpp

Co-authored-by: Eladash <elad3356p@gmail.com>
2021-01-29 13:34:43 +03:00
Nekotekina 6784301376 Check for rsx::thread existence in Emu.Stop/Pause/Resume 2021-01-28 20:23:13 +03:00
Eladash 0652870204 New RSX Debugger 2021-01-28 17:40:26 +03:00
Nekotekina 67dd6754a6 Seal cereal includes in util/cereal.cpp 2021-01-28 10:48:53 +03:00
Nekotekina 34274ec391 Purge unused typeid() invocations 2021-01-28 10:23:29 +03:00
Nekotekina 53267e283b PPU LLVM: implement ppu_finalize
Properly free certain compiled PRX/OVL modules (except dev_flash)
2021-01-27 18:03:49 +03:00
Megamouse fbe91fb245 fix linux compilation 2021-01-12 14:13:15 +01:00
Nekotekina db8e6fe7a7 Enable -Wunused-variable 2021-01-12 14:34:14 +03:00
Nekotekina 673e84920b fixed_typemap.hpp: remove useless reporters 2021-01-05 16:16:01 +03:00
Marin Baron 92e5bb88e8 Remove std typeinfo 2020-12-27 00:30:16 +03:00
Nekotekina bd269bccaf types.hpp: remove intrinsic includes
Replace v128 with u128 in some places.
Removed some unused files.
2020-12-21 21:11:25 +03:00
Eladash ef884642e4 Cleanup disasm classes a bit 2020-12-21 13:46:26 +03:00
Megamouse b655e4aa47 Emu: implement on_exit callback 2020-12-18 16:05:40 +01:00
Nekotekina 1adec3d8e5 Hotfix: Emu.Quit after Emu.Stop 2020-12-18 13:37:14 +03:00
Nekotekina db9b7db531 Cleanup and move sysinfo.h -> util/sysinfo.hpp 2020-12-18 12:55:54 +03:00
Nekotekina fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Eladash 0445ef393f FW SPRX install: Fix IDM ID's leak 2020-12-15 11:16:45 +03:00
Eladash 7eb16e13bb PRX loader: Fix libfs_155.sprx loading
Fix relocations' segments referencing when there are "empty" (memsize=0) LOAD segments.
2020-12-15 11:16:45 +03:00
Eladash e5603fec1e Firmware libraries settings overhaul 2020-12-13 21:52:24 +03:00
kd-11 f83c2f0b6b rsx: Restructure and simplify some header include chains 2020-12-13 15:38:35 +03:00
Nekotekina dff4392c10 Move error_code to ErrorCodes.h 2020-12-12 15:12:01 +03:00
Nekotekina 36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
Eladash 2602be426f
Allow emulation to work without firmware (#9367)
* Allow emulation to work without firmware
* Fix HLE prx path detection.
* Fix manual list loading bugs.
* Fix HLE gcm
* GUI: Fix fonts search
* GUI: Hardcode sprx list
Do not depend on /dev_flash/sys/external/ contents.
2020-12-07 20:10:34 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
kd-11 845a7d9968 Fix RSX replay thread lifecycle 2020-11-29 22:39:52 +03:00
Nekotekina bd90e3e37f atomic.cpp: shrink and simplify main hashtable
Reduce collision detection to 1 or 0 for now.
I think it should be offloaded to notifiers.
2020-11-26 20:11:26 +03:00
Megamouse 9efedbe76a Minor changes related to Emu.Stop() 2020-11-25 00:11:07 +01:00
Megamouse 5076da8f77 Fix auto exit
- Don't quit on stop if force boot was set
- Don't stop the emulator on gs_frame close when it was already stopped. This would remove the force boot flag by mistake.
2020-11-24 11:17:03 +03:00
Nekotekina 6cf50f8f6c Second attempt to fix hanging RPCS3 process
Now fix exit logic a bit.
Remove Init() call from Stop().
Remove Stop() call from Quit().
2020-11-22 12:45:19 +03:00
Nekotekina e89a568765 Attempt to fix Emu.Quit()
There was some kind of "initialization order fiasco" of g_fxo.
Not only should it be used after main, but also destroyed before exit.
2020-11-21 18:27:16 +03:00
Megamouse 5b207c3b95 hotfix for infinite loop when booting game data 2020-11-19 23:53:10 +01:00
Megamouse 3087f15dd8
Update disc boot detection and hope it works 2020-11-19 21:55:06 +01:00
Nekotekina d4d5dc99f3 Fix perf_meter<> after adding thread pool.
Print and reset sorted information after emulation stop/pause.
Print useless average value.
2020-11-19 14:44:58 +03:00
Nekotekina 3888b0429c atomic.cpp: print some stats on stop 2020-11-12 05:52:22 +03:00
Eladash c2c559f8d9 Disasm: do not allow to access previous instructions in non-interpreter mode 2020-10-31 17:15:47 +03:00
Nekotekina 86fc842c89 TSX: new fallback method (time-based)
Basically, using timestamp counter.
Rewritten vm::reservation_op with the same principle.
Rewritten another transaction helper.
Add two new settings for configuring fallbacks.
Two limits are specified in nanoseconds (first and second).
Fix PUTLLC reload logic (prevent reusing garbage).
2020-10-31 15:34:14 +03:00
Megamouse 2cee26c3e7 Cleanup some includes 2020-10-31 11:53:46 +01:00
Nekotekina c4e89f8bb4 Actually start rsx replay thread 2020-10-30 22:25:33 +03:00
Megamouse fe3c7926f7 Qt: add custom game icons
This shouldn't interfere with emulation as replacing actual files would
2020-10-23 23:13:22 +02:00
Nekotekina f2d2a6b605 JIT cleanup for PPU LLVM
Remove MemoryManager3 as unnecessary.
Rewrite MemoryManager1 to use its own 512M reservations.
Disabled unwind info registration on all platforms.
Use 64-bit executable pointers under vm::g_exec_addr area.
Stop relying on deploying PPU LLVM objects in first 2G of address space.
Implement jit_module_manager, protect its data with mutex.
2020-10-11 17:22:28 +03:00
Eladash 73f96f48ee Fix SPU ELF loader 2020-10-08 19:05:14 +03:00
Eladash 983547af7e SPU: Embedded PRX/overlay image patching and dumping 2020-10-06 13:06:25 +03:00
Megamouse 5226076676 Emu: use vulkan as default renderer 2020-10-01 09:19:13 +02:00
Megamouse 511e9920c2 patch_engine: Apply patch when APP_VER is unknown 2020-09-21 11:59:57 +02:00
Eladash 6952be5ce4 Debugger: Replace SPU register perefix '$' with 'r' 2020-08-28 20:44:13 +02:00
Nekotekina bfa4fcf584 Use g_fxo for progress_dialog_server 2020-08-28 01:54:39 +03:00
Eladash 48f70fbf10 Fix UB in Emulator::Load 2020-08-27 23:52:37 +01:00
Eladash 27e3317449 [HOTFIX] Fix UB in Emu/System.cpp 2020-08-22 11:55:08 +02:00
Eladash edc09e22b4
PSF: Avoid redundent string copies in psf::array/string/get_string (#8707) 2020-08-21 23:55:17 +01:00
Megamouse 96428a7555 Log username 2020-08-07 21:57:08 +02:00
Megamouse d633a266c1 Add config override as cli arg: --config <path>
And add some more logging
2020-08-03 21:31:53 +02:00
Megamouse 107129f95a Fix missing GPU in game window title 2020-07-31 01:13:00 +02:00
Megamouse ef3e8d26ce Improve error handling during config loading 2020-07-29 11:28:16 +02:00
Megamouse 171e4fafed Emu: simplify Emu::Stop some more 2020-07-06 21:14:16 +02:00
Megamouse 8d2ce2815c Emu: Make prevent_display_sleep dynamic 2020-07-06 21:14:16 +02:00
Megamouse d91551c277 Emu: always use Emu.Quit() to quit RPCS3
This creates a single possible point of failure for calling quit()
2020-07-06 21:14:16 +02:00
Megamouse 12dded403f patch_manager: implement serials and app_versions 2020-06-29 23:56:27 +02:00
Nekotekina e485c9c79c Atomically overwrite config.yml
Protection against data corruption.
2020-06-12 22:41:50 +03:00
Megamouse 2dca8d84e1 patch manager 2020-06-11 13:15:25 +02:00
Nekotekina bfee541540 Atomically overwrite games.yml
Reduce chances of losing information.
2020-06-07 22:44:07 +03:00
Nekotekina 938ca90a02 Improve Stop Watchdog
Prevent termination if PPU LLVM compilation is in progress.
2020-06-01 02:27:33 +03:00
Nekotekina 2d2ed7efd0 Add game patch support in 'Create PPU Caches'
Try to compile patched version of EBOOT.BIN
2020-05-31 23:06:54 +03:00
Nekotekina 377ad9887c Compile EBOOT.BIN on 'Create PPU Caches' 2020-05-31 02:26:40 +03:00
Megamouse 8e2b2bc179 Don't load custom configs when adding games 2020-05-07 18:10:49 +02:00
Megamouse 773448a8f6 Crypto/Qt: check target app version for packages 2020-04-25 15:17:17 +02:00
Megamouse ebd92a2f2f Qt: Add Firmware Cache options to main window menu 2020-04-22 16:58:20 +02:00
Megamouse cf229a8e9f some more dynamic settings 2020-04-15 18:25:25 +02:00
Megamouse fc3a134e7d Emu: make "Silence All Logs" dynamic 2020-03-31 18:06:37 +02:00
RipleyTom cd4eed0704 Gives ANSI path to curl CURLOPT_CAINFO 2020-03-27 14:23:20 +03:00
Ani e8177906e7
System/Load: Handle PSP Remaster (#7857)
This just makes RPCS3 execute PSP Remaster games through 
psp_emulator.self
pspemu does not work yet, so the boot will fail, but at the least it 
starts loading
2020-03-26 20:03:00 +03:00
Nekotekina 17a9ce6fb9 Fix PS1 game_path
Don't assume local path has '/dev_hdd0' in it.
2020-03-26 18:32:42 +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
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
Nekotekina 92eeec39b7 Improve Stop Watchdog
Make it less possible to interfere with the debugger.
2020-03-10 23:00:23 +03:00
Nekotekina 609c0d46af Implement stop watchdog
Shows fatal error if stopping takes more than 5s.
2020-03-09 13:20:49 +03:00
Nekotekina 7514e53385 Fix SPRX/firmware installation (use a mutex) 2020-03-06 08:39:24 +03:00
Nekotekina 7a8772dafa Replace std::string::npos with umax 2020-03-05 14:05:23 +03:00
MSuih 94478ad4a0 Add error for missing firmware 2020-02-29 21:19:01 +03:00
Nekotekina f72971f19f Implement named_thread_group 2020-02-29 16:55:25 +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 bacd1698fc fixed_typemap.hpp: minor cleanup 2020-02-27 23:04:23 +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
gamerforEA 93552a5958 Apply some Clang-Tidy fixes 2020-02-27 00:38:55 +03:00
Nekotekina e102dc2a94 Add message on exit if some thread are still waiting 2020-02-26 21:23:30 +03:00
Eladash 0d4f8ca234 fs: Make fs::get_dir_size able to report an error 2020-02-26 18:17:13 +00:00
MSuih 33abcf74f2 Add information about boot process 2020-02-25 19:42:20 +03:00
Nekotekina 9c9c2eb2c9 Fix wrong g_fxo->init_crtp name, use just init<> 2020-02-25 14:07:50 +03:00
Nekotekina fa02a04baa Add g_fxo->init_crtp to simplify thread construction 2020-02-25 11:51:41 +03:00
Nekotekina 7eebe06931 Restore thread counter (world may be not ready yet)
Remove dumb 1300ms timeout.
2020-02-25 11:51:19 +03:00
Nekotekina 2bab3afae0 Fix deprecation warning in System.cpp 2020-02-22 19:41:03 +03:00
Megamouse b47a8b9995 Skip some logging in add_only Load 2020-02-21 21:00:46 +01:00
Megamouse c4a1c6f845 Do not reset PS3_GAME when booting disc patches 2020-02-21 21:00:46 +01:00
Nekotekina 987223da3f Minor fixup for /dev_flash creation 2020-02-20 14:38:09 +03:00
Nekotekina 78cc36cdd8 Allow empty /dev_flash cfg (fixup) 2020-02-20 14:07:26 +03:00
Nekotekina da036de3e4 Restore some /dev_flash logic 2020-02-20 12:43:53 +03:00
Nekotekina 92e3eaf3ff Fix signed-unsigned comparisons and mark warning as error (part 2). 2020-02-19 22:54:58 +03:00
Nekotekina f08c778d2c Use more starts_with/ends_with.
Remove ends_with global func.
2020-02-18 14:53:23 +03:00
Megamouse 7a7ac625cd move enum formatters from system to config files 2020-02-17 15:08:17 +03:00
Megamouse fe75311be2 move config structs to own files and clean up some headers 2020-02-17 15:08:17 +03:00
Megamouse ee54ba970a GUI: add custom title format to settings dialog 2020-02-15 20:33:02 +01:00