Commit graph

512 commits

Author SHA1 Message Date
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
Nekotekina 0d7aa5e310 GUI: implement custom title format
New option "Window Title Format" in Misc.
Backward compatible with FPS disabler.
Make rpcs3:::get_branch() return string_view.
2020-02-13 21:24:52 +03:00
Nekotekina 4bc431ec31 Silence deprecation warning (implicit capture of this on [=]) 2020-02-10 14:47:12 +03:00
Megamouse 5dcb91b671 Restart games with the same config instead of global 2020-02-08 11:04:13 +01:00
Megamouse 7abda27b46 Fix Boot inconsistencies for Reloads 2020-02-08 11:04:13 +01:00
Megamouse 901fc87bca Only start the playtime clock if it makes sense 2020-02-08 07:13:29 +01:00
Nekotekina 327bb2d8f0 Modernize PPU logging (ppu_log variable) 2020-02-01 11:52:24 +03:00
Nekotekina 3c0bd821c8 Give log channels fancier names
Improve LOG_CHANNEL macro to accept custom name.
2020-02-01 10:43:43 +03:00
Nekotekina 3eca2d5d6c Remove legacy LOADER log channel 2020-02-01 07:49:38 +03:00
Nekotekina efafda2650 Add config to silence all logs 2020-02-01 07:49:38 +03:00
Nekotekina 1d0f359406 logs: add more log channels instead of GENERAL 2020-01-31 16:44:48 +03:00
Nekotekina 0f87c6c7c3 Make system config thread-safe (almost) 2020-01-20 21:51:28 +03:00
kd-11 ad845861be video: Remove pointless aspect ratio option
- The auto option is used when requesting the system is works like a
"dont care" specifier to tell the system to use what settings have been
passed in by HDMI EDID or the user TV type setting. Since this option
simulates the "TV type setting", auto makes no sense and is also not
something you can select on a PS3.
- Also adds a few missing checks.
2020-01-07 15:56:54 +03:00
Eladash c2eb9a583d Implement ps3 application root flags detection 2019-12-31 22:22:06 +03:00
Nekotekina 185c067d5b C-style cast cleanup V 2019-12-03 17:23:00 +03:00
Megamouse d91f8193b0 settings: enable dynamic reload of some emu values 2019-11-27 10:34:03 +01:00
Nekotekina e0bc276205 cellSysCache: keep mounted /dev_hdd1 after exitspawn 2019-11-09 14:43:19 +03:00
Nekotekina 81c61e230f Use std::from_chars in Emulator::SetUsr 2019-11-08 19:27:11 +03:00
Nekotekina 03b9ee27c5 Virtualize cellSysCache
Allows caches from multiple games to coexist.
Also change the way of handling cache IDs (file-less).
2019-11-06 14:12:43 +03:00
MSuih f3ed26e9db Small warnings cleanup (#6671)
* Ignore more warnings

These are intentional

* Signed/unsigned mismatch when comparing

* Explictly cast values

* Intentionally discard a nodiscard value

* Change ppu_tid to u32

* Do not use POSIX function name on Windows

* Qt: Use horizontalAdvance instead of width

* Change progress variables to u32
2019-10-25 13:32:21 +03:00
Oschowa 06433d614a Implement FAudio backend (#6374) 2019-10-24 22:26:29 +03:00
kd-11 00bc3fe658 Drop d3d12 backend 2019-10-22 21:45:14 +03:00
Nekotekina c69fe0f664 SPU Profiler preview
Add option "SPU Profiler" (disabled by default).
Works only with SPU recompilers.
Results are flushed on pausing.
2019-10-15 17:42:57 +03:00
Nekotekina 8e21f4d5d4 Remove g_thread_count
Unnecessary global which is bad to reason about.
Possibly fix a but in SPRX loader.
2019-10-12 16:45:41 +03:00
Alex James 3ad743ecaa Add option for preventing display sleep (#5783)
Adds support for preventing the display from sleeping while a game is
running. Supports Windows, Linux (with the org.freedesktop.ScreenSaver
D-Bus service), and macOS.
2019-10-12 15:40:47 +03:00
Nekotekina a29d4150df GDB Server: fix and cleanup
Move source files to Emu/GDB.cpp, GDB.h
Remove "WITH_GDB" option, enable GDB Server by default.
Change class name to gdb_thread.
Alias for external access gdb_server.
Change config option name to "GDB Server"
Bind on 127.0.0.1 by default.
2019-10-09 00:11:44 +03:00
Nekotekina 9d4de51cb6 Use g_fxo for network thread
Minor refactoring
2019-10-08 23:12:54 +03:00
msuih 6979b96225 Log game version 2019-09-27 20:01:55 +03:00
Nekotekina 465b16e786 Finally remove fxm from IdManager 2019-09-26 23:26:36 +03:00
Nekotekina 50fc5dfde5 Use g_fxo for rsx::rsx_replay_thread 2019-09-26 23:26:36 +03:00
Nekotekina 5f9c5e8765 Use g_fxo for rsx::thread 2019-09-26 23:26:36 +03:00
Nekotekina b48cdc2260 Use g_fxo for global ppu_module instance
Also fix autonomous PRX/SPU loading sequence.
2019-09-26 23:26:36 +03:00
Nekotekina f841b47b6b cellSaveData: add auto maintenance routine in Emu.Init()
This routine:
1) Removes junk backup directories
2) Fixes interrupted save data process in edge case
This case can happen if emu terminates between two atomic renames.

Also use directory renaming technique for delete op.
Also rewrite recreate operation to be part of atomic process.
2019-09-25 18:47:38 +03:00
Nekotekina aa8a7b3e8a Make errors in Emu::Init verbose and don't crash
Allow TTY.log to be disabled if file access failed
Add fs::error::isdir
2019-09-24 05:01:00 +03:00
Nekotekina 4b19e55fcc Use g_fxo for cellKb, cellMouse
Use init_mutex
2019-09-19 02:16:14 +03:00
Nekotekina 4bba1e3337 Use g_fxo for pad_handler 2019-09-19 02:16:14 +03:00
Nekotekina c900fb0d77 Delete g_idm
Needs to be reimplemented
2019-09-17 15:55:58 +03:00
Megamouse 432364cb04 Qt: add --no-gui mode 2019-08-31 17:08:03 +02:00
kd-11 64aff7f019 emucore: Initialize fxo on loading RSX captures
- Fixes crash on capture replay
2019-08-27 21:59:02 +03:00
Nekotekina ede816387f Fix SPRX loader crash 2019-08-27 13:57:27 +03:00
Nekotekina 232e815f17 Init g_fxo in SPRX Loader mode 2019-08-27 03:50:15 +03:00
Nekotekina 7a00b5f809 Use g_fxo for patch_engine 2019-08-27 03:50:15 +03:00
Nekotekina 2882220cbd Implement cpu_thread::stop_all() 2019-08-22 02:13:39 +03:00
Nekotekina 8517ccfdfa Add new typemap for always existing objects
Not to be confused with singletons or global variables.
2019-08-22 02:13:39 +03:00
Eladash f0c267ecb0 Change default Sleep Timers Accuracy setting's value to "Usleep Only" 2019-08-16 09:45:24 +02:00
Megamouse 8debdfcd09 handle empty callback returns 2019-08-14 23:54:09 +02:00
Megamouse b56b425b19 Emu: set m_title to the actual disc game title 2019-07-25 08:53:07 +02:00
Megamouse 71c56b719c Emu/overlays: fix background picture path 2019-07-25 08:53:07 +02:00
Eladash 85b1152e29 Timers scaling and fixes 2019-07-23 00:09:01 +01:00
Nekotekina 22e4ef147a SPU TSX: fix "Preferred SPU Threads" 2019-07-14 17:33:20 +03:00
Eladash 537d3f2548 Log last function on debug pause or exception, dump cpu_thread state on access violation 2019-07-10 17:35:39 +03:00
JohnHolmesII be521ff0ab Fix warnings related to parentheses 2019-06-25 20:36:32 -07:00
Nekotekina 5d45a3e47d Implement cpu_thread::suspend_all
Remove Accurate PUTLLC option.
Implement fallback path for SPU transactions.
2019-06-19 20:36:12 +03:00
kd-11 bca5f94b3f rsx: Add option to toggle MSAA 2019-06-14 16:19:52 +03:00
Megamouse cafa4521ee Better Support For Game Collections (#4450) 2019-06-01 01:12:30 +03:00
gidan80 9aa08313e3 Qt: Add custom pad configs
Add a custom pad config for every game.
2019-05-16 20:37:41 +02:00
Megamouse c1e245ae73 Emu: msg_dialog_frame fixup: don't reject on Close to prevent Emu.Stop() 2019-05-05 16:29:50 +02:00
Megamouse b639584acc Emu/Qt: Fix Boot Recent when using BootGame(add_only=true) 2019-05-05 16:29:50 +02:00
Megamouse b0a24665e5 Emu: msg_dialog_frame fixes 2019-05-05 16:29:50 +02:00
RipleyTom 63bbe459ea DS3 pad handler 2019-03-18 19:05:02 +03:00
eladash d82362fa1d Use sys_memory_allocate on rsx replayer to fix it 2019-03-05 21:23:24 +03:00
Megamouse 27f6f497a2 use "config/custom_configs/" for custom configs (backwards compatible) 2019-01-31 20:14:52 +00:00
Nekotekina 4292997a01 Added jit_runtime class
Is a memory manager for ASMJIT, replaces asmjit::JitRuntime
Unified memory manager for ASMJIT and LLVM
Unified SPU trampoline generation
Remove previous workarounds
2019-01-29 03:32:16 +03:00
Nekotekina a419e98acb Move PPU and shader cache
New hash-based location (already used for SPU)
Bump PPU cache version, improve naming and decrease size

Remove fs::get_data_dir
Disable boot.elf cache
2019-01-14 01:24:05 +03:00
Nekotekina bd9131ae1c Implement fs::get_cache_dir
Win32: equal to config dir for now
Linux: respect XDG_CACHE_HOME if specified
OSX: possibly incomplete
2019-01-13 14:45:36 +03:00
Megamouse d9d5f45e9e rsx/input: fix rsx replay 2019-01-10 13:05:48 +01:00
MSuih eba364c64c Clear disk cache if it grows too large (dev_hdd1/cache) (#5411)
* Clear disk cache automatically

* Add disk cache to UI
2018-12-24 00:18:47 +03:00
eladash 8cbaa8627c Do not rely on cellPadInit in native ui 2018-12-15 13:51:16 +01:00
Nekotekina 92be67b402 Fix #5370 regression 2018-12-05 00:06:09 +03:00
NicknineTheEagle 32059bfaa2 Properly get PARAM.SFO and icons for C00 games (#5370)
* Added a helper function for fetching game's PARAM.SFO path

This should properly get SFO path for unlocked C00 games

* Normalized line endings

* Refresh game list after installing a RAP file
2018-12-04 01:46:01 +03:00
Nekotekina 06253c8489 Implement "Initialize Directories" options
If disabled, /dev_hdd0, /dev_hdd1, etc, are not created automatically.
2018-11-05 13:14:11 +03:00
eladash 5ee351234c rsx-capture: unbreak 2018-10-23 18:02:03 +03:00
Nekotekina 1b37e775be Migration to named_thread<>
Add atomic_t<>::try_dec instead of fetch_dec_sat
Add atomic_t<>::try_inc
GDBDebugServer is broken (needs rewrite)
Removed old_thread class (former named_thread)
Removed storing/rethrowing exceptions from thread
Emu.Stop doesn't inject an exception anymore
task_stack helper class removed
thread_base simplified (no shared_from_this)
thread_ctrl::spawn simplified (creates detached thread)
Implemented overrideable thread detaching logic
Disabled cellAdec, cellDmux, cellFsAio
SPUThread renamed to spu_thread
RawSPUThread removed, spu_thread used instead
Disabled deriving from ppu_thread
Partial support for thread renaming
lv2_timer... simplified, screw it
idm/fxm: butchered support for on_stop/on_init
vm: improved allocation structure (added size)
2018-10-19 22:22:35 +03:00
Megamouse 4ab777b429 Add title to emulator message dialogs 2018-10-14 23:14:46 +03:00
Megamouse 49e5212a8f RSX/Overlays: Add option for japanese button layout 2018-10-03 23:08:33 +02:00
Nekotekina 19a64e0e94 Add g_typemap and g_idm alias
Future idm/fxm replacement
2018-10-02 02:22:26 +03:00
Nekotekina 306f95a9ae New named_thread template (preview)
Old class named_thread renamed to old_thread
It's too hard to move in a single commit
2018-09-27 14:04:16 +03:00
Nekotekina 680aaf21f0 Fix consistency in Emu::Stop()
Don't clear force_boot on shortcut Load()
2018-09-27 12:16:43 +03:00
Megamouse b7e010bbd0 Fix Emu.Restart() 2018-09-23 01:49:58 +01:00
Nekotekina ed8aa774bb Optimize logging via logs::channel
Use constant-initialized severity subobjects instead of temporaries
2018-09-16 00:36:20 +03:00
Nekotekina c5676e5649 Remove thread_ctrl::atexit
It was only a workaround for poor C++11 thread_local support
2018-09-15 17:09:56 +03:00
Nekotekina e8b5555630 Rewrite vfs::get and vfs::mount
Preprocess . and .. correctly
Don't use recursive locking
Also use std::string_view
Fix format system for std::string and std::string_view
Fix fmt::merge for std::string_view
2018-09-15 17:09:56 +03:00
jmatich b5dbd44087 Compilation fixes for Mingw64 (MSYS2) (#4899)
fix compilation on mingw
2018-08-29 14:27:10 +03:00
Nekotekina aa4040bb7b Implement vm::find_map; improve memory allocation
Add vm::user64k and vm::user1m constants
Remove vm::user_space, unreserve it
2018-08-14 15:14:06 +03:00
eladash 449888b9db Rsx/vm: fix base addresses 2018-08-13 16:16:34 +03:00
eladash f349695a75 Rsx: rewrite address translation 2018-08-13 16:16:34 +03:00
Megamouse 67aff85e8e RSX/Qt: Move rrc captures to captures dir 2018-07-28 23:10:45 +02:00
Megamouse ab84a67511 Loader: handle fs::file is Null fatal after decrypt self 2018-07-28 23:10:45 +02:00
Megamouse e58b7cbe1f user_manager: megamouse fixes 3 2018-07-26 03:16:51 +04:00
mpm11011 948bd3673e user-manager: squash all commits for this feature. 2018-07-26 03:16:51 +04:00
Megamouse a19113025c HLE/Qt: implement sys_tty_read 2018-07-16 00:05:30 +04:00
Nekotekina 6229b3ca8d Fixes for booting PS1 games 2018-06-23 17:30:16 +03:00
clienthax 8b449ce76c PS1 Classics 2018-06-23 16:34:19 +04:00
Nekotekina d62b0c88b0 Restore /dev_flash/ config 2018-06-23 09:26:11 +03:00
Nekotekina 81e5f3b7f2 Remove /dev_flash/ configuration
Simplify code by using root config location for /dev_flash/
Hide Emu.GetEmuDir() function due to the risk of misuse
2018-06-22 14:14:29 +03:00
eladash 3e433ef05c create the shaderlog dir in Emu.Init() 2018-06-21 22:54:08 +04:00
VelocityRa dd0684b58a overlays/perf_overlay: Make pos, font, opacity, margin configurable
- Also some perf overlay refactoring
2018-06-18 22:34:26 +03:00
Megamouse af71cf0922 implement "Enable TSX" combobox 2018-06-17 00:43:00 +04:00
scribam 14dc1fead6 yaml-cpp: update submodule and build integration 2018-06-13 04:25:34 +04:00
Daniel Valentine fb20c27e7b Delay GDB server launch until emulator run (#4658) 2018-06-08 13:34:27 +01:00
Nekotekina 7242387a42 Block GUI after stopping emulation
This is necessary to prevent restarting the emulation until it's finished
Remove "process_events" callback completely
2018-06-04 16:01:17 +03:00
Nekotekina b0ee369135 Rewrite LLVM compilation progress dialog
Use a single dialog
2018-05-30 20:35:35 +03:00
VelocityRa c8d8a81ccd overlays: Performance Overlay 2018-05-30 12:35:41 +03:00
Nekotekina c5d8d50908 Move SPU LLVM log file 2018-05-23 15:36:29 +03:00
scribam bf2f00a163 log: add Vulkan header version 2018-05-19 10:59:10 +03:00
scribam 70e2873e69 Compilation fix for GCC 8 (at least) 2018-05-17 00:53:31 +04:00
Nekotekina 367f039523 Build transactions at runtime
Drop _xbegin family intrinsics due to bad codegen
Implemented `notifier` class, replacing vm::notify
Minor optimization: detach transactions from global mutex on TSX path
Minor optimization: don't acquire vm::passive_lock on PPU on TSX path
2018-05-16 17:31:58 +03:00
Jake 75b40931fc rsx: initial capture/replay functionality (#4510)
* rsx: initial capture/replay functionality
2018-05-13 12:18:05 +03:00
Nekotekina fe4c3c4d84 Implement SPU recompiler cache
Shared between ASMJIT/LLVM recompilers, compiled at startup
2018-05-09 23:35:18 +03:00
Nekotekina f5ee6fb113 Convert newlines in game title 2018-05-09 22:19:55 +03:00
Nekotekina 1ca51a023c SPU LLVM Recompiler (preview) 2018-05-09 22:19:55 +03:00
Nekotekina 16f5167aed SPU Analyser improved
This restores some functionality removed in SPU ASMJIT v2.0
Also implements new experimental features
2018-05-08 13:05:29 +03:00
Nekotekina bd1d4de422 Fix unnecessary cache dir 2018-04-22 00:06:49 +03:00
Nekotekina da6afb11f0 Fix game title if unset 2018-04-22 00:06:49 +03:00
Nekotekina 3ffafb741c SPU ASMJIT: übertrampolines and spu_runtime
Use opt-out shared spu_runtime to save memory (Option: SPU Shared Runtime)
Implement "übertrampolines" for dispatching compiled blocks
Patch fixed branch points to use trampolines after check failure
2018-04-22 00:06:49 +03:00
Nekotekina 898637f830 Remove mfc_thread
Clear mfc_queue on reset
Improve MFC Proxy a bit
2018-03-31 21:13:12 +03:00
Nekotekina c3a5e3f491 [LLVM Cache] Minor workaround 2018-03-31 16:51:19 +03:00
Nekotekina 19944eeed0 Implement SPRX precompilation
Automatically precompile firmware modules
Add "Create LLVM Cache" menu (for games)
Reimplement jit_compiler::cpu as static method
2018-03-22 23:24:58 +03:00
Nekotekina 4b1c052030 Fix crash on exit after access violation 2018-03-11 19:33:02 +03:00