Commit graph

3588 commits

Author SHA1 Message Date
Eladash
ddec5d6908 CPUThread: Prevent recursive check_state calls 2021-09-17 14:02:22 +03:00
Eladash
975aae1d13 SPU MFC: Implement MFC commands execution shuffling 2021-09-17 11:38:10 +03:00
Nekotekina
9e62ca562b SPU LLVM: implement SQRT and DIV pattern detection (xf) 2021-09-17 10:23:43 +03:00
Nekotekina
d28b0ba2fa SPU LLVM: implement spu_re, spu_rsqrte
Improve matching with peek_through_bitcasts() helper.
Implement erase_stores() helper.
2021-09-17 10:23:43 +03:00
Nekotekina
aba332d4c4 SPU LLVM: make intrinsics for most xfloat instructions 2021-09-17 10:23:43 +03:00
Nekotekina
543fb7a9cb LLVM DSL / SPU LLVM: implement infinite precision shifts
Remove old make_*** helpers in favor of matcheable expressions.
2021-09-17 10:23:43 +03:00
Nekotekina
67b3fc70f8 LLVM DSL: implement absd and match helpers
Matcheable expression absd(a, b) (absolute difference).
2021-09-17 10:23:43 +03:00
Nekotekina
4b8ee85995 LLVM DSL: reimplement pshufb, add 'calli'
Implement postponed custom intrinsic replacement.
Make bitcast operator static like other ones.
2021-09-17 10:23:43 +03:00
Nekotekina
86ead1b93b SPU LLVM: implement FI instruction
Use approximate reciprocal in FRSQEST.
2021-09-17 10:23:43 +03:00
Nekotekina
1685769bd9 LLVM DSL: reimplement fmuladd, force hw fma if present 2021-09-17 10:23:43 +03:00
Nekotekina
2acb6ed60d SPU LLVM: optimize SHUFB for permutation-only shuffles
Drop constant generation when unused.
2021-09-17 10:23:43 +03:00
Nekotekina
144244e902 SPU LLVM: implement missing constant mask handling in SHUFB 2021-09-17 10:23:43 +03:00
Nekotekina
7cf9d1380b LLVM DSL: add line number in get_const_vector automatically 2021-09-17 10:23:43 +03:00
Nekotekina
f188019244 LLVM DSL: reimpelement fsqrt, fabs 2021-09-17 10:23:43 +03:00
NicknineTheEagle
4fcc1c0f31 Fully implement sceNpDrmVerifyUpgradeLicense 2021-09-16 23:54:53 +02:00
Megamouse
1a2fad4eac
cellSearch: more stubs and implementations (#10578) 2021-09-16 22:05:29 +01:00
Eladash
9c2d94ca1a sys_prx: Improve sys_prx_get_module_info error checking 2021-09-16 19:09:18 +03:00
Eladash
ae4f837f57 sys_prx: Implement sys_prx_get_module_id_by_address 2021-09-16 19:09:18 +03:00
Eladash
8b48fd95fe Fix sys_prx_start/stop_module for older firmware
The old structure is only 32 bytes long, not containing prologue/epilogue functions.
2021-09-15 18:08:58 +03:00
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
677d5f09ce Add debugging info for when sys_tty_write is executed 2021-09-12 19:05:26 +03:00
Eladash
c7f5475b56 Improve sys_fs_close logging 2021-09-12 19:05:26 +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
Eladash
1cbcf7e1ad Reimplement config selection for game startup
* Implement manual selection of config file.
* Implement default config option.
* Fix bug which led to 'force global config' to not work in some games. (any game using process relaunch such most game collections, RDR, MGS4 etc)
* Relax CLI config purpose - instead the emulator forever ignoring any other config except for the one provided in arg, use it only for the CLI-booted game.
2021-09-09 21:56:50 +02:00
Eladash
bd66dfedc9 Do not allow to unpause after fatal error occured in emulation
* Plus fix #10590
2021-09-09 19:30:54 +02:00
Eladash
dfbc49513d Debugger/Disasm: Name SPU Syscalls 2021-09-07 01:13:57 +02:00
Megamouse
0525070898 remove deprecated avcodec_register_all
We already use newer avcodec code anyway.
2021-09-06 10:00:34 +02:00
Eladash
fe0c164de2 sys_net: Anti-log spam enhancement 2021-09-04 11:58:59 +02:00
Eladash
ea2c5294df cellCamera: Anti-Log spam enhancement 2021-09-04 11:58:59 +02:00
Megamouse
0debcfed0a Silence some warnings 2021-09-02 19:39:42 +02: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
Malcolm Jestadt
43cc62d267 SPU LLVM: Add m_use_vnni
- Alderlake and Sapphirerapids will require an update to the llvm fork before they can be detected
2021-08-31 14:02:05 +03:00
Malcolm Jestadt
d304b52391 SPU LLVM: Add VNNI optimized variant of sumb
- Uses vpdpbusd to horrizontally add values, for some reason this is much faster than the normal horizontal add instructions.
2021-08-31 14:02:05 +03:00
Malcolm Jestadt
a86b278115 SPU LLVM: Expand byteswap elimination to more instructions 2021-08-31 14:02:05 +03:00
Eladash
6781373727
Patch cooperate with system SPU group creation (#10791) 2021-08-29 22:03:17 +03:00
Eladash
ddb042148d Patches/LLVM: Implement Complex Patches Support 2021-08-26 23:04:32 +03:00
Megamouse
72f0637efe Windows/Audio: add listener for device change
For some reason XAudio2 doesn't automatically change the device anymore.
So let's just listen for the OnDefaultDeviceChanged event and update the cell audio thread if necessary.
2021-08-25 22:44:16 +02:00
Whatcookie
d0451932bf
Offset get_timebased_time at game boot (#10744)
- Avoids game bugs in the case where games convert the value read from the clock to a float before performing delta time calculations
2021-08-23 13:06:02 +01:00
Whatcookie
c62deeefd4
SPU LLVM: Add approximate FCEQ/FCMEQ (#8729)
- It's 100% accurate, but will sit under approx xfloat anyways
- Attempts to use a single instruction when 1 value is constant
2021-08-22 10:13:34 +03:00
Marco
5c0bf14554
Whitelist Kamen Rider Summonride Portal sys_usbd (#10722)
Co-authored-by: Megamouse <studienricky89@googlemail.com>
2021-08-21 11:08:56 +03:00
Justin Lewis
c13a46b07b
Fix warnings about using deprecated inet_ntoa function (#10698)
* Replaced inet_ntoa with inet_ntop.

The warning in question is: "Warning	C4996	'inet_ntoa': Use
inet_ntop() or InetNtop() instead or define
_WINSOCK_DEPRECATED_NO_WARNINGS"
2021-08-18 07:16:38 +03:00
Megamouse
ac986c7c61 fix some warnings 2021-08-15 21:02:38 +02:00
Megamouse
53bfc6fa59 cellGem: fix floating point warning 2021-08-13 20:45:18 +02:00
Eladash
063df64108 SPU/event queue: Implement protocol for SPU queue 2021-08-13 08:58:09 +03:00
Eladash
f1f93b8f81 SPU: Remove outdated assertation 2021-08-13 08:58:09 +03:00
Eladash
5784ffc972 Fixup PPU breakpoints 2021-08-12 22:24:54 +03:00
Eladash
91737b11fe Fix sys_spu_thread_group_resume
Do not remove suspend flag when SPU group state is not SPU_THREAD_GROUP_STATUS_RUNNING after operation!
2021-08-12 22:24:54 +03:00