Commit graph

511 commits

Author SHA1 Message Date
Eladash 50ad7ba1f6 vm: Fix vm::unmap
* Make vm::unmap atomic, squash the memory unmapping process inside this function while still using the same VM mutex ownership.
* Make vm::unmap not fail due to random vm::get calls, shared_ptr reference count is no longer a condition.
* Fix sys_mmapper_free_address spuriously failing with EBUSY due to random vm::get calls.
* Fix sys_vm_unmap race condition due to non-atomic vm::unmap.
* Add an optional verification block ptr arg to vm::unmap, used by patches.
2021-09-13 20:53:34 +03:00
Eladash f98595bee5 Patches/PPU: Add jump_link patch type 2021-09-10 11:46:39 +03:00
Eladash fafefb2cf5 Fixup No.3 after #10779 2021-09-10 11:46:39 +03:00
Nekotekina 06f733a7f2 Fixup No.2 for #10779 2021-09-01 16:56:38 +03:00
Nekotekina ad6a72e369 Fixup for #10779 2021-09-01 14:38:20 +03:00
Eladash b40ed5bdb7
Patches/PPU: Extend and improve patching capabilities (code allocations, jumps to any address) (#10779)
* Patches/PPU: Implement dynamic code allocation + Any-Address jump patches

Also fix deallocation path of fixed allocation patches.
2021-09-01 13:38:17 +03:00
Eladash 5784ffc972 Fixup PPU breakpoints 2021-08-12 22:24:54 +03:00
Nekotekina 064fc81697 Fix warnings 2021-08-06 10:41:40 +03:00
Megamouse af89eb5404 ppu compilation: fix facepalm (double increase) 2021-08-03 08:39:57 +02:00
Megamouse 6527eef655 System: add progress update on existing modules
This could cause dialogs to seemingly finish at e.g. 50/100 modules because the existing modules weren't accounted for.
2021-07-31 16:06:18 +02:00
Eladash f39a0a5fbe Debugger: Add some error pop-ups for invalid operations
* Show error window when setting breakpoints on these conditions:
- SPU/RSX are selected. (not supported)
- When using non-interpreters decoders.
- Non-executable memory is specified.
* Do not allow instruction stepping for non-interpreters decoders.
* Clear breakpoints when the game is stopped.
* Fix setting breakpoints on HLE functions.
2021-07-31 15:27:30 +02:00
Eladash e6e0210e73 Extend ppu_thread::call_history_t formatter 2021-07-19 09:28:46 +02:00
Eladash 8e2c34a003 PPU debugger: Implement PPU calling history 2021-07-17 17:28:23 +02:00
Eladash b6fccee6a4 Improve ppu_thread::stack_push
Save actual stack memory allocation size locally. (not in PS3 memory)
2021-06-28 14:09:24 +03:00
Eladash f103004aa0
sys_prx/overlay: Fix disambiguator of module names opened by FD (#10340)
Don't append zero offset.
2021-05-26 23:38:17 +03:00
Nekotekina 160b131de3 types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.

Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Eladash dcfd29c2d9 kernel-explorer: Implement PPU scheduler state information 2021-05-21 18:12:36 +02:00
Eladash 638f20c80f Improve get_current_cpu_thread() 2021-05-20 09:25:51 +03:00
Eladash 57cd4ff3c6
Move HLE table address to FXO (#10284) 2021-05-17 14:22:27 +03:00
Eladash cacb852a1e Emulation stopping bugfix 2021-05-14 15:35:07 +03:00
Eladash daa53b77cf Simplify named_thread construction 2021-05-01 18:08:03 +03:00
Megamouse 1caf81811a Move unspecific Emulator code out of System.cpp 2021-04-24 11:21:22 +03:00
Eladash a0d1cf26d0 Reduce precompilation failure log level (error -> notice) 2021-04-19 23:18:31 +03:00
Eladash 5ca6381624 Implement "PPU LLVM Precompilation" control setting 2021-04-10 18:06:46 +03:00
Megamouse 03b76b4606 Emu: some cleanup 2021-04-09 21:03:49 +02:00
Nekotekina 95725bf7fc Add -Werror=missing-noreturn (GCC, clang)
May be useful to diagnose functions which fail assertions unconditionally.
2021-04-08 10:29:47 +03:00
Megamouse 02febd3f65 Workaround: Skip progress_dialog during gameplay 2021-04-06 21:39:34 +03:00
Eladash 7b57b8f2ca debugger: Implement ability to pause entire emulation on breakpoint 2021-04-01 19:11:55 +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
Nekotekina 2212a131ef Fix some -Weffc++ warnings (part 1) 2021-03-31 11:27:09 +03:00
Megamouse 870224cde0 Emu/overlay: ingame native overlay PPU compilation 2021-03-31 09:38:30 +02:00
Eladash 1e71deb0db rsx: Compile shaders when CELL is not running 2021-03-30 11:13:47 +03:00
Megamouse ba45daff35 Qt: some cleanup in debugger 2021-03-24 20:47:51 +01:00
Nekotekina b3fb6d7d18 Add and fix -Wredundant-decls (GCC) 2021-03-23 22:48:57 +03:00
Nekotekina f801dc6558 Save all 8 syscall_args 2021-03-16 19:33:37 +03:00
Eladash a9b0d25c01
PPU Debugger: Fixup for syscall arguments (#9932) 2021-03-16 16:20:45 +03:00
Nekotekina a4fdbf0a88 Enable -Wstrict-aliasing=1 (GCC)
Fixed partially.
2021-03-09 03:10:15 +03:00
Nekotekina 87af905018 Enable -Wunused-parameter 2021-03-06 18:07:08 +03:00
Nekotekina 52fe86b56c fixed_typemap.hpp: make it a bit fool-proof
Require objects to be non-copyable (move is still allowed).
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
Eladash 68a878264c Minor GUI fix for PPU interpreter at "precompilation" 2021-02-23 17:35:45 +03:00
Eladash 20eb4352fb
debugger: Fix single stepping (#9793) 2021-02-19 14:53:09 +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 cf384795d2 debugger: Improve PPU string constraints 2021-02-13 16:00:26 +03:00
Eladash 423cc1685c PPU LLVM: Reduce PRX/OVL compilation memory usage a little 2021-02-13 13:05:41 +03:00
Eladash e26ae9899c Reimplement/fix PRX patches 2021-02-12 15:27:59 +03:00
Eladash fad89f1c3b
Fix tiny race in PPU breakpoints (#9731)
If the PPU has just being paused by the debugger, before it entered the breakpoint handler, the PPU would continue onto the next instruction skipping the breakpoint but then being paused on it instead.
2021-02-07 00:25:40 +03:00
Nekotekina 7b40859eff Remove unused header 2021-02-01 19:14:01 +03:00
Nekotekina 0c034ad7de PPU LLVM: upgrade to GHC call conv
Get rid of some global variables.
Implement ppu_escape (unused yet).
Bump PPU cache version to v4.
2021-02-01 11:30:50 +03:00