75 Commits
Author SHA1 Message Date
bmdhacks 9eb45cf590 Fix: the recompiler-test GIF Path 1 sink missed a wrapped XGKICK's head
`mVU_XGKICK_` splits a packet that runs past the top of VU1 memory in two:
the pre-wrap head goes to `Gif_Path::CopyGSPacketData`, and only the
post-wrap tail goes to `Gif_Unit::TransferGSPacketData`. The
PCSX2_RECOMPILER_TESTS sink hooked only the second one, so a wrapped kick
was captured as its tail alone — no GIFtag at all.

Measured while landing the console XGKICK cases: 64 captured bytes from the
recompiler against 112 from the interpreter, which loops through
TransferGSPacketData and never calls CopyGSPacketData. That reads exactly
like a serious microVU miscompile and is entirely our instrumentation; both
engines emit the same correct stream.

CopyGSPacketData now feeds the same sink and skips the ring, since nothing
drains it while the sink is installed. The gif_test_hooks declaration moves
above Gif_Path so the member function can see it.

Consequence, which is larger than the bug: before this, no test could
observe a wrapped XGKICK's GIFtag. Every XGKICK test used packets that fit
inside VU1 memory, so the blind spot never showed.

Test-build only — the whole block is inside #ifdef PCSX2_RECOMPILER_TESTS.

vu1_xgkick_drain_tests.cpp moves with it. That file is ours and postdates
the branch this came from, and its wrap case was written against the blind
spot: it asserted the JIT capture was the 32-byte tail, with a header
comment explaining that the head was unreachable. Both halves now arrive,
so it asserts the whole 48 bytes — head carrying the GIFtag, tail resuming
at offset 0 — which is the stronger property and the one that was never
testable before. The XgKickHack wrap case already asserted that shape and
only loses a stale "unlike the non-hack path" aside.

Idea by pstef.
2026-08-02 17:03:02 -07:00
8fb919e6f7 arm64: in-process recompiler differential-test + diagnostics framework
DiffJitVsInterp harness (EE/IOP/VU synthetic JIT-vs-interpreter tests) plus the
shared capture/divergence-localizer infrastructure (vu_capture, ee_divtrace,
microVU_Divtrace, VU1Trace) and the test hooks they install in interp/GIF/COP2 paths.
All hook sites are guarded by PCSX2_RECOMPILER_TESTS and compile out of release builds.

Co-Authored-By: Ryan Walklin <ryan@testtoast.com>
Co-Authored-By: Brian Degenhardt <bmd@bmdhacks.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 20:27:56 -07:00
TellowKrinkle 2dbae3bec9 Misc: Fix GCC arm linux build 2026-04-17 21:19:28 +02:00
TellowKrinkle 81a20150f2 Core: Use ARCH_ARM64 instead of _M_ARM64
fast_float assumes that _M_ARM64 means compiling for Windows
2026-03-20 11:13:53 -04:00
SternXD d983b2b066 Copyright: Change year from 2002-2025 to 2002-2026 2026-01-15 00:22:32 +01:00
Ty 8630893cb1 GIF: implicit cast to u32 warning fix 2025-11-24 18:07:25 -05:00
Ty 85a62427f9 GS: Properly check for a VU1 recompiler.
Fixes ARM builds where the VU1 recompiler was enabled despite there being no VU1 recompiler.
2025-07-31 14:10:45 -04:00
TheTechnician27 23fd57f641 Copyright: Change year from 2002-2024 to 2002-2025 2025-01-20 05:07:26 +01:00
GovanifY 132431b7c8 headers: relicense to GPL-3.0+
also update to 2024 while i'm at it
2024-07-30 17:17:13 -04:00
Stenzek 71036c95a4 Core: ARM64 compatibility 2024-06-14 17:06:45 +10:00
Stenzek d585712b40 GIF: Comment out packet register assertion
Triggers on "normal" register writes.
2023-12-27 13:55:35 +10:00
Stenzek 4608579c31 GIF: Get rid of assertion with side effects 2023-12-24 23:12:12 +10:00
Stenzek d9abe10308 Misc: Remove explicit PCH include, switch to SPDX 2023-12-24 14:03:14 +10:00
Stenzek dc859ca0a6 Misc: Simplify assertion macros 2023-12-24 14:03:14 +10:00
refractionpcsx2 9203ae20cd GIF: Don't check current path for FINISH 2023-09-17 23:23:04 +01:00
refractionpcsx2 2947e11b9b GIF: Correctly delay FINISH interrupts/flags
[SAVEVERSION+]
2023-09-17 14:52:47 +01:00
Stenzek 55e73bb4b9 MTGS: Convert to namespace 2023-06-25 12:54:14 +10:00
Stenzek 7c9c8e197c Common: Replace MemsetFast routines with C memset
And associated cleanup.

On most compilers these days, it'll either inline the memset with vector
fills or rep stosq, or outline with a call to memset.

I trust the compiler is probably going to make a better decision here,
than manual SSE intrinsics.

Ends up a couple of percent faster in FMV decoding.
2023-06-22 19:11:57 +10:00
refractionpcsx2 8ba768ecec GIF: Fix reset functionality to properly abort the current packet 2022-11-17 11:18:48 +00:00
Connor McLaughlin 756cd1ee47 System: Move old SysThread junk to gui 2022-05-08 05:40:59 +01:00
Connor McLaughlin d0039c2920 Gif_Unit: Vectorize analyzeTag() 2022-03-12 12:10:32 +00:00
refractionpcsx2 e270c46703 GIF: Separate GIF Reset and GIF DMA Reset
The two shouldn't be reset together anyway, the GIF has no control over the DMA.
2022-01-13 09:53:11 +00:00
TellowKrinkle 648a958290 GS: Split GS.h into multiple smaller headers 2021-11-14 13:52:20 -06:00
refractionpcsx2 59dfe52b52 microVU: Replace XGKick hack with synced XGKick option
Fixes Tennis Court Smash and Love Smash games which previously couldn't be fixed.
WRC no longer requires a patch, just the xgkickhack option.

Note: it's not a hack anymore, it just has to be called that :P
2021-09-17 13:04:26 +01:00
refractionpcsx2 7966c27246 GIF: Handle PATH2 ending when VIF not running 2021-09-12 16:12:31 +01:00