Commit Graph
2640 Commits
Author SHA1 Message Date
jpolo1224 15538d066d GameDB: no readbacks for Guitar Hero II and III
The note-highway render target is never sampled back, so the GPU->CPU download is
pure cost on a tiler. Covers GH2 (SLES-54442, SLUS-21447 — the latter is also the
serial GH2 Deluxe ships under) and GH3 (SLES-54962, SLES-54974, SLKA-25363,
SLKA-25414, SLUS-21672).

gsHWFixes is a clear-then-replace map in this overlay, so each GH3 entry restates
every upstream key. Dropping one would have silently undone the crowd-texture,
bloom and post-processing fixes those entries already carry.
2026-07-30 01:08:39 -04:00
jpolo1224 4d8701a49d GS: driver-bug database and per-driver shader workarounds
Ported from EmuCoreX with sashkinbro's approval. The GPU family alone was
never enough to decide behaviour: the same Mali part behaves differently
under ARM's proprietary driver than under Mesa PanVK, a lesson this tree
learned twice the expensive way - the r44p1 DEVICE_LOST fix had to be
gated on driverID rather than vendorID, and the 8 Elite push-descriptor
disable likewise. Driver identity, version and a bug set are now recorded
in a table, so the next device quirk is an entry rather than another
bespoke branch. Twenty-five rules, with match confidence so a vendor-wide
rule never overrides a driver-version-specific one.

The shaders gain gpu_bitwise_and / gpu_bitwise_not / gpu_boolean_not,
whose bodies the device emits: plain a & b normally, scalarized where the
database says the driver miscompiles vector bitwise ops. A device matching
no rule renders exactly as before.

opengl/tfx_fs.glsl already carried this fix as IAND3/UAND2/UAND4 macros
gated on GPU_PROFILE_MALI. Those are replaced by the shared helpers, but
the GL macro is deliberately (workaround || IsMaliGPUProfile()): Mali
reached through ANGLE or Panfrost resolves a non-ARM driver and matches no
rule, so a database-only gate would have silently removed a fix those
users have today. Widening only.

SHADER_CACHE_VERSION 108 -> 109. Every TFX and convert shader's source
text changed, so a blob cached from 108 no longer matches the source that
produced it; without the bump users would get stale binaries and garbage
rendering after updating.

RewriteConstantLoads is deliberately absent - the database records
BrokenConstantLoad with no workaround bits, so the macro would be
permanently zero and the shader code dead.

Shaders validated offline with glslc across 136 Vulkan and 296 GL/GLES
permutations, every macro on and off; the failure set is byte-identical to
the pre-change baseline.
2026-07-26 14:53:48 -04:00
J1coding d4296f9fd3 iOS: repair the dead guard tests and stop two UI-thread config writes
Three follow-ups from the graphics live-apply work.

The two iOS guard tests had been failing with FileNotFoundError since the core
moved out of platforms/ios -- both still pointed at app/src/main/cpp/pcsx2 and
app/src/main/assets. Dead tests read as coverage, so repoint them.

Repointing the True Crime one turned up a real regression. It guards
"mvuFlag: 0 # Fixes texture flickering caused by the VU Flag Hack" on the six
New York City serials, and that fix is gone: the iOS build used to bundle its own
GameIndex.yaml carrying it, and when we converged on the overlay only the
gameFixes came across. The speedHack has been missing ever since, unnoticed
because the test that would have caught it broke in the same move. Restored in
the overlay, which is where our GameDB changes live now, and the test follows it
there.

The renderer picker stayed live with a game loaded. Returning to the menu only
pauses the VM, so you could switch renderer, change any other graphics setting,
and have the next apply take GSUpdateConfig down the reopen path -- a full Metal
teardown under a loaded game. The picker already said "Requires restart"; now it
means it.

applyOsdPreset and setPerformanceOverlayVisible wrote GSConfig and EmuConfig.GS
from the UI thread. Those flags are bitfield members sharing storage with the GS
device-restart flags, so a read-modify-write off-thread can write back a stale
neighbour and flip RestartOptionsAreEqual -- the same teardown, from a stats
toggle. Both compute their values up front and hand the writes to the CPU thread.
isPerformanceOverlayVisible reads the INI now rather than GSConfig, which the
setter no longer updates synchronously.
2026-07-26 15:47:05 +02:00
jpolo1224 589852a23e GameDB: Dirge of Cerberus no longer needs hardware readbacks disabled
Render-pass coalescing (Brian Degenhardt) carries the cost the readback
workaround was compensating for, so drop hwDownloadMode from all six regional
serials and let them run with readbacks on. coalesceRenderPasses stays.
2026-07-26 02:02:10 -04:00
Brian Degenhardt b9504ac752 GameDB: enable render-pass coalescing for Dirge of Cerberus
Dirge alternates 1:1 between a colour target and a mask target for most of the
frame, which is the exact pattern the scheduler exists for. On a four-frame
capture it takes the frame from 8035 render passes to 523, with every frame hash
identical to the unscheduled path, and on an Adreno 650 handheld the difference
is plainly visible.

All six regional serials get it. This goes in the mobile overlay rather than the
canonical GameIndex, because it is worth nothing on a desktop GPU where a pass
boundary is cheap - the overlay ships on Android, iOS and ARM64 Linux handhelds,
which is exactly the set of targets that pay for tile load and store.
2026-07-25 18:17:24 -07:00
jpolo1224 069f8a44f3 Android 2.6.5.1: Local Link LAN play, async GS readback, pause/rotation/settings fixes
Crash and correctness
- Fix a crash when backgrounding the app mid-game: onPause flushed the Vulkan
  pipeline cache from the UI thread while the GS thread was creating pipelines
  into the same VkPipelineCache. Vulkan requires that handle to be externally
  synchronised, so this was a driver-level data race and crashed on Adreno and
  Xclipse alike. The flush now runs on the GS thread, posted via the CPU thread
  so it does not race the EE-owned MTGS ring.
- Fix an unbounded out-of-bounds vertex read in the GSRendererHW sprite-merge
  paving path: the inner loop advanced i instead of j, so j stayed loop-invariant
  and the scan walked past m_vertex->tail.
- Fix per-game settings being silently ignored: gamesettings/<serial>_<CRC>.ini
  loads into a higher-priority layer than anything the app writes, and saves made
  from the library never regenerated it, so any key already in that file
  overrode the user permanently. Only the category-Reset path rewrote it, which
  is why Reset appeared to be the only thing that worked.
- Fix screen rotation: the BIOS followed the launcher rotation instead of the
  renderer's (it has no GameInfo, and the tier was keyed on that), and the
  launcher stayed locked in a game's orientation after exit because the cleanup
  lived only inside stop()'s vmRunLoopActive-guarded branch, which loses a race
  against the VM thread's own finally. Rotation tier is now an explicit flag and
  the cleanup runs on every terminal path.
- Discard the Vulkan pipeline blob whenever the SPIR-V cache is discarded. It was
  validated only against the device header (vendor/device/pipelineCacheUUID),
  which is identical across an app update, so a SHADER_CACHE_VERSION bump kept
  every pipeline built from the old shaders and nothing pruned it.
- Make eeRecExitRequested atomic: it was a plain bool written from the JNI thread
  and read on the CPU thread.
- OpenGL: restore GL_PACK_ALIGNMENT after readback, add the missing memory
  barrier after the CAS dispatch, and initialise GLState::depth_mask to GL's
  actual default.
- DEV9: log the GetNetAdapter default: bail and the InitNet skip. Both returned
  silently, so a settings mistake surfaced as missing hardware three layers away.

Local Link (new)
- New DEV9 backend bridging emulated PS2 Ethernet between devices over
  authenticated local UDP, so games with a built-in LAN / System Link mode can
  play together. Ported from EmuCoreX (sashkinbro) with the wire format
  unchanged, so peers remain compatible across both forks.
- Network mode picker (Online / Host / Join), host address readout, auto-derived
  peer ids, generated room codes, hostname support alongside numeric IPv4, and a
  link to the supported-games list. Fully controller-navigable.

Performance
- Asynchronous hardware download mode (experimental, opt-in): non-blocking
  GPU->CPU readback so the EE thread no longer waits on the GS thread. Ported
  from EmuCoreX. Appending Asynchronous to GSHardwareDownloadMode makes the enum
  non-ordered, so the relational comparisons on it are replaced with
  IsHardwareDownloadReadbackEnabled / IsHardwareDownloadEEThreadRead.
- Affinity Control Mode (experimental, opt-in): EE/VU/GS priority orders plus a
  Performance Cores mode. Android otherwise leaves these threads unpinned.
- Raise the texture-replacement cache ceiling from 6 to 16 GB; RAM/2 remains the
  real limiter, so this only binds at 12 GB RAM and up.
- Low Latency frame pacing is no longer the default, with a one-time migration
  for installs that took the earlier flip.

Features
- Auto renderer resolves to Vulkan HW on Adreno.
- Auto Progressive Scan (per-game): holds Triangle+Cross through boot.
- OLED black as a modifier over any accent colour, including Custom and RGB.
- Optional system keyboard instead of the built-in on-screen one.

Game compatibility
- Everybody's Golf 4 / Hot Shots Golf Fore! hwDownloadMode across all regions
  (PR #421, XDarkFallenX).
- Delta Force: Black Hawk Down (PR #401, XDarkFallenX).
- Reduced input latency and input handling improvements (PR #403, Splaser).

RetroAchievements
- Inject the client version from a build-time secret kept out of public source,
  with a stock-PCSX2 fallback for secret-less builds, so third parties cannot
  copy the client identity. Covers the iOS token too.
2026-07-25 00:48:56 -04:00
jpolo1224 8e23439b26 Android 2.6.5: Adreno Vulkan default, low-latency default, UI sounds, RA client hardening, GameDB
Rendering
- Auto renderer now resolves to Vulkan HW on Adreno (OpenGL elsewhere).
- Mobile hardware ROV (Phase 0): tile-native depth feedback behind the ROV toggle.

Performance & input
- Low Latency frame pacing is the default on capable devices, with a one-time
  migration for existing installs; low-end devices keep the queued pacing.
- Reduce Android input latency and improve input handling (PR #403, Splaser).
- Experimental CPU clock hint (ADPF) toggle in Performance settings (default off).

Audio & UI
- Pop-up open/close sound cues (info, hardcore confirm, patches & cheats).
- Alternating controller navigation / slider tick sounds.

RetroAchievements
- Inject the RA client version from a build-time secret kept out of public source,
  with a stock-PCSX2 fallback (no hardcore) for secret-less builds. Applies to the
  iOS client token too. Prevents third parties from copying our User-Agent.

Game compatibility
- Delta Force: Black Hawk Down (SLUS-21124 / SLES-53299) GameDB fixes
  (PR #401, XDarkFallenX).
2026-07-24 02:40:17 -04:00
XForYouX 6cdb8fd90c GameDB-Android : Fixes Sun Effect To Rumble Racing 2026-07-24 03:50:47 +07:00
Brian Degenhardt 7bfe6a44a1 gamedb-overlay: let SLPM-74405 inherit InstantDMAHack from bin
The mobile GameDB base predated upstream PCSX2's addition of InstantDMAHack
("Stops hang when entering Sword Select screen") to Samurai: Complete Edition
and never resynced, so the Android/iOS copies carried EETimingHack alone. The
generated overlay faithfully reproduced that stale state, which the override
loader's clear-then-replace on gameFixes would re-inflict on mobile/ARM64-Linux.

The drop was never intentional (no commit in the Android line ever touched this
entry's fixes; the fix is an arch-neutral DMA-timing hang fix). Remove the
overlay entry so the mobile tiers inherit bin's full [EETimingHack,
InstantDMAHack].
2026-07-22 21:16:45 -07:00
Brian Degenhardt 6f3ee20df9 GS shaders: fold the mobile tiler supersets into bin
The Android shader tree carried capability-gated blocks that bin was missing,
even though the shared C++ backends emit every gating macro on all platforms
(GSDeviceOGL.cpp:2006-2010, GSDeviceVK.cpp:4769 — GPU_PROFILE_MALI,
HAS_ARM/EXT_SHADER_FRAMEBUFFER_FETCH, HAS_ARM_DEPTH_FETCH, HAS_CLIP_CONTROL,
DISABLE_DUAL_SOURCE). bin was simply the stale copy; the desktop GL backend is
already wired to consume the mobile shader structure (see the GPU_PROFILE_MALI
reference at GSDeviceOGL.cpp:1067). Collapse the two to one superset so drift
becomes impossible.

- opengl/{convert,interlace,present,tfx_fs,tfx_vgs}.glsl, vulkan/present.glsl:
  adopt the Android version verbatim. Every difference is either macro-gated
  (desktop path preserved in the #else — e.g. the tfx_vgs z-remap lives under
  #else of #if HAS_CLIP_CONTROL, dead on desktop which has ARB_clip_control) or
  a GLES-strict float/cast tweak that is behaviorally identical on desktop.

- vulkan/tfx.glsl: hand-merged. Union in the additive tiler blocks (Mali
  EQUAL_WZ z-nudge on both the direct and VS_EXPAND paths, the
  VS_PROVOKING_VERTEX_LAST and !VS_IIP provoking-vertex handling) and drop
  layout(depth_less) per its float32-rounding correctness rationale, while
  KEEPING bin's newer two-flag ROV implementation (rov_discard_color/depth) —
  that path is dead on mobile since ROV is now off on all tilers. Preprocessor
  structure verified balanced and identical to Android's directive counts.

dx11/tfx.fx is Windows-only (never compiled on mobile) and the two remaining
vulkan files differ only in trailing whitespace, so they stay as-is; the mobile
copies get removed and generated from bin in the build-plumbing step.
2026-07-22 21:16:45 -07:00
Brian Degenhardt 54f0f8ba91 resources: add the canonical mobile GameDB overlay
Introduce bin/resources-overlay/armsx2_overrides.yaml as the single source of
truth for mobile-tier GameDB deltas, replacing the three independently-drifting
copies (Android's committed GameIndex.yaml + its 124-line runtime overrides, and
iOS's GameIndex[override].yaml). It is deliberately kept OUT of bin/resources/
so the desktop GLOB_RECURSE copy never picks it up; it is layered only on the
tiler-GPU tiers.

Generated by diffing the Android GameIndex (field-merged with the former runtime
armsx2_overrides.yaml, the most-exercised mobile config) against the now-canonical
bin/resources/GameIndex.yaml, and carrying only the behavioral fields that
actually change emulation (gsHWFixes, clamp/round modes, gameFixes, speedHacks,
patches, memcardFilters). Game names/region/compat are intentionally NOT carried
so mobile inherits current upstream metadata rather than stale mobile copies.

The GameDatabase override loader already applies this file from EmuFolders::Resources
on every platform (initDatabase, is_override=true) and silently no-ops when it is
absent, so nothing but the build's copy step gates whether a given tier gets it.

Verified: loading bin + this overlay reproduces every one of Android's current
behavioral GameDB fields with zero losses and zero value changes. The only
differences from today's Android behavior are 37 additions across 36 serials
(accurateAlphaTest, Silent Hill / Flushed Away / GT4 fixes, etc.) that Android's
copy was simply stale on and now inherits from the upstream-tracked base — the
overlay mechanism cannot express a field-removal, and inheriting the newer
upstream value is the correct outcome for all of them.
2026-07-22 21:16:45 -07:00
Brian Degenhardt d3ba312868 resources: catch bin GameDB up to upstream tip
bin/resources was stale relative to upstream PCSX2 master in three spots that
had nothing to do with our fork:

- GameIndex SLES-50276 (The Gift): re-add the Ziemas sound-RPC synchronization
  patch. Present upstream and in the Android copy; only bin/iOS had dropped it.
- GameIndex SLES-53869 (Crazy Frog Racer): re-add the AdaptiveBFF deinterlace +
  halfPixelOffset + nativeScaling GS fixes. Same story — upstream and Android
  carry them, bin was behind.
- game_controller_db.txt: re-add the one Xbox Series X Controller mapping bin
  was missing; the file is now byte-identical to upstream.

RedumpDatabase.yaml was already byte-identical. After this, bin/resources is
exactly upstream master plus our deliberate fork edits (the Tekken 5 clamp
bumps and the handful of additive GS/clamp accuracy entries), making it the
unambiguous canonical source for the resources-unification work.
2026-07-22 21:16:45 -07:00
David Isztl 33c3f5a2cb Merge branch 'master' of github.com:ARMSX2/ARMSX2 2026-07-14 09:06:17 +02:00
David Isztl 28b7f992a6 ARMSX2 branding 2026-07-14 09:06:03 +02:00
David Isztl ef70ec633e Merge branch 'pcsx2master' 2026-07-14 08:54:13 +02:00
jpolo1224 9e0dc436f7 Android 2.6.0: ANGLE toggle, gyroscope, cheats/disc-swap, GameDB + fixes
- OpenGL-via-ANGLE renderer toggle for broken native GLES drivers, with a
  driver-keyed GL shader cache so switching drivers recompiles instead of
  feeding foreign program binaries to glProgramBinary (fixes Mali-G77 crash)
- Gyroscope input (aim/steering modes, sensitivity, smoothing, invert) shared
  between the Pad settings tab and the in-game Controls tab
- Re-add disc swap without closing the game, and per-cheat PNACH enable
- Xclipse GPU profile + Mali-G615 freeze gate; MediaTek Tekken 5 override
- GameDB: KH2, Tekken 5, Rumble Racing, MK Shaolin, Avatar
- Folder-reuse settings recovery (reverse-map INI + config mirror)
- In-game pause menu rail icons; make new settings searchable
- Resume/auto-load: wait for the renderer to present before restoring state
  and force a present after load (reduces black screen on resume)
- Boot crash guards (pad state before VM); FXAA + CAS sharpening
2026-07-14 02:34:14 -04:00
TJnotJT 8510ec29ba GS/DX: Fix typo with primid init output. 2026-07-12 21:20:28 +02:00
David Isztl e14f379a7a Merge branch 'pcsx2master' 2026-07-10 11:21:25 +02:00
TJnotJT eb5e3fcd13 GS/HW: Make all vertices the same color in certain flat shading cases.
Fixes issues with AA1 with flat shading.
2026-07-10 10:16:51 +02:00
Silent ac83e93426 GameDB: Update Gran Turismo entries to use anchors and overrides 2026-07-09 15:53:38 -04:00
David Isztl bbbe12a534 Merge branch 'PCSX2Master' 2026-07-05 11:11:18 +02:00
raid273 fd46054fb7 GameDB: Remove cpuSpriteRender from Mana-Khemia 2026-07-04 21:51:16 +02:00
raid273 f618f39bee GameDB: Various fixes 2026-07-04 21:51:16 +02:00
Mrlinkwii 05a2bbbf35 GameDB: remove gamefixes from silent hill 3 2026-07-03 16:09:21 -04:00
TJnotJT 017b4d07da GS/HW: Improve ROV discard behavior.
Try to avoid color/depth write when it's discarded.
2026-07-02 19:46:47 +02:00