Commit Graph
149 Commits
Author SHA1 Message Date
Henrik RydgårdandClaude Opus 5.5 531a75f045 Add AccurateSplines compat flag, enable for Coded Arms
- Fixes #21391

Makes the hardware backends tessellate Bezier patches and splines with the
GE-exact evaluation the software renderer uses. Fixes the z-fighting glow
under the floor grates in Coded Arms.

AGENTS.md: Put "- Fixes #N" first in commit messages

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 14:04:38 +02:00
Henrik Rydgård 38528d4790 Remove obsolete JitInvalidationHack
See #22494
2026-10-11 22:06:06 +02:00
Henrik Rydgård e312af9b04 Merge pull request #22483 from hrydgard/reinterpret-subpixel
Further improve the Tantalus games
2026-10-10 15:27:21 +02:00
Henrik RydgårdandClaude Opus 5.5 3cd6bf9d27 Tantalus depth fog: read depth at each render pixel's own sub-position
The Tantalus games (Cars Race-O-Rama, MX vs ATV Reflex and Untamed, SpongeBob)
turn depth into fog with a CLUT16 read of the swizzled depth mirror, stretched
2x into a 565 view of an 8888 buffer. A following 8888 copy writes the scene's
RGB and keeps the alpha, so each pixel's fog factor is the upper 565 half.

At a higher render scale, the depth X swizzle snapped every render pixel to its
PSP pixel's left edge, so the fog came out in PSP-pixel blocks. It now keeps the
position within the PSP pixel. That leaves the upper half sampling the right
half of the depth texel, half a pixel off the scene, which drew magenta halos on
the right of objects in Cars. With the new DepthCLUTIntoHalves compat flag, the
depal pass outputs twice as wide so each render pixel reads its own 8888 pixel's
depth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:48:05 +02:00
Henrik RydgårdandClaude Opus 5.5 b9b1a29c42 Read CLUT8 from 16-bit framebuffers in the shader, replacing the SOCOM hack
The shader depal CLUT8 mode now handles 565, 5551 and 4444 framebuffers
(the format goes in the depal format bits, which this mode didn't fill
before), rebuilding the 16-bit pixel and taking its low or high byte.
This replaces SOCOMClut8Replacement, which assumed the high byte.

- The GE samples a pixel at its corner, the GPU at its center. With u
  stepping two bytes per pixel (SOCOM and Bend's games use u = 1 + 2x)
  that's a whole byte, so the shader steps back to the corner.
- The CLUT index shift, mask and start are applied, as in the other
  depal modes.
- The self-render copy region counted CLUT8's U in pixels, not bytes.

SOCOM, Star Wars: The Force Unleashed and the NPJG90068 dumps improve a
lot. Syphon Filter and Resistance: Retribution now read the right bytes,
which exposes a 16-bit precision difference in their bright pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:04:23 +02:00
Henrik RydgårdandClaude Opus 5.5 a9b18a9192 Compat: Read back Cars Race-O-Rama's luminance reduction for its brightness adaptation
The game reduces the scene to 8x8 on the GPU, block transfers that into RAM,
and the CPU sets its brightness adaptation from it. With BlockTransferAllowCreateFB
the copy went into a GPU-side buffer instead, the CPU read stale RAM, and the
game kept getting darker on the hardware backends (#15914).

New compat flag BlockTransferReadbackSmall: transfers of up to 64 pixels into
RAM are still read back, a frame late, so it doesn't stall. Brightness from
the issue's savestate now follows the software renderer's (72 vs 84 at 6 s,
84 vs 95 at 20 s, from 25 and falling), at the same speed as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:01:37 +02:00
Henrik RydgårdandClaude Opus 5.5 8b4d9c3b74 Headless: Don't apply compat flags to frame dumps
Headless replays frame dumps to compare them with references and with the PSP, which a game's
workarounds skew: DarkStalkers' present hack (16510) replaces the game's final upscale, so the
replay didn't match the PSP's. The app still applies them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-09 02:03:31 +02:00
Henrik RydgårdandClaude Opus 5.5 feaa41fadb Always emulate partial color write masks in the shader, drop ShaderColorBitmask
Partial red, green and blue write masks now always go through the shader with
a framebuffer read. Across the frame dump set this only improves games outside
the old list (Split/Second, Ultimate Ghosts 'n Goblins, older DiRT 2 and OutRun
dumps without a game ID). Partial alpha masks keep the old heuristic: alpha is
the stencil, with its own write mask, and taking the shader path for them made
Pro Yakyu Spirits and Gangs of London worse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:18:05 +02:00
Henrik RydgårdandClaude Opus 5.5 8f70003cce Remove the PaceVideocodecDecode workaround for Ys I & II
The blit cost model now paces its movies at 30 fps without it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 16:44:28 -06:00
sum2012 f5b6b45b5b Remove IgnoreEnqueue hack 2026-09-22 20:19:57 +08:00
sum2012 14fd9d1752 Remove Fontltn12Hack 2026-09-22 20:10:33 +08:00
Henrik RydgårdandClaude Opus 5 282647803c Add PaceVideocodecDecode compat.ini option
There are a few games that seem to rely on performance problems or
timing quirks to hold the correct pace when playing sceMpeg - have not
been able to nail down any other timing mechanism.

This adds a timing enforcement function.

Coded by Claude.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-21 09:00:48 -06:00
Henrik Rydgård 9339d455ef Return of "Disable range culling" but now only as a compat.ini setting to enhance games 2026-06-27 13:02:47 +02:00
Henrik Rydgård d6e0dd1478 Always enable the secondary texture cache 2026-06-13 13:34:41 +02:00
Henrik Rydgård f3e590b059 Experiment with a compat flag that forces shader depal 2026-06-12 12:19:17 +02:00
Henrik Rydgård 45f41be8f0 Add a debug window to check active compat flags 2026-06-05 17:55:28 +02:00
Henrik Rydgård d59cdcad61 GTA sprite fix: Detect sprites, clip them slightly to avoid filtering artifacts 2026-06-05 11:48:46 +02:00
Henrik Rydgård 1867f0775e Avoid soft-transform-and-clip if the near plane matches the final clip plane, and a new compat flag isn't set
Fixes #21776

Since only two games are known to need the cull-after-clip behavior
(previously known as inversion), we flag those and avoid unnecessary
soft clipping.

I had hoped to find a dynamic check that would work, but haven't managed
to figure out a good one yet.

This will improve performance a little bit in some other games since we
can avoid clipping in software at all in many cases.
2026-06-04 14:49:22 +02:00
Henrik Rydgård 7e265fd1c4 Remove some obsolete compat.ini settings 2026-06-04 12:45:17 +02:00
Henrik Rydgård 0b21731e7b Remove obsolete compat.ini flag DisableAccurateDepth 2026-05-30 19:07:59 +02:00
Henrik Rydgård bae1a7c7f9 Add "FastEmulatedGPU" compat flag. For games like Outrun that have intermittent slowdowns on hardware, it's unnecessary under emulation. 2026-02-26 10:44:16 +01:00
Henrik Rydgård 3dc7aa4a65 Add workaround for the Silent Hill: Shattered Memories. Thanks fcrwr!
Fixes #13781
2026-02-23 15:19:03 +01:00
Henrik Rydgård 202259eb09 Add a quick workaround for Mahjongg Artifacts framebuffer expiration.
Fixes #15828, well at least except for savestate support.
2026-02-22 23:42:13 +01:00
Henrik Rydgård 475390a968 Add workaround for Tales of Phantasia X.
Fixes #21162
2026-01-29 23:16:51 +01:00
Henrik Rydgård 60a065b242 Make the Brave Story hack safer, hide it behind a compat flag. 2026-01-23 23:39:11 +01:00
Henrik Rydgård 34473fc621 Add a compat flag to map some extra memory at address 0.
Can be used to work around certain types of crashes without having to
disable fast memory.
2026-01-23 15:14:15 +01:00
Henrik Rydgård f14c4dfb90 Add a compatibility flag to apply sum2012's workaround for Ghost Recon: Predator
I'm not confident in the behavior here, so let's change it only for this
game for now.

Replaces #20892

Fixes #20856
2025-10-21 15:23:12 +02:00
Henrik Rydgård e745ab16e4 Merge branch 'master' into IgnoreEnqueue 2025-08-15 11:30:10 +02:00
Henrik Rydgård e29ba8f471 Add a warning in games that are affected badly by savestate timewarps 2025-08-05 17:17:20 +02:00
Henrik Rydgård 266a6a33be Add workaround for scePsmf LLE not working with Dragon's Lair 2025-06-07 15:05:33 +02:00
Henrik Rydgård e961c1ed96 Add support for compat flags that control DisableHLE 2025-04-03 20:04:04 +02:00
Henrik Rydgård 8d6593b92b Remove compat flag AllowDelayedReadback 2025-01-05 09:18:13 +01:00
Henrik Rydgård c5ad81e3d5 Add DepthRaster.cpp/h. Rasterize depth rectangles, some triangles 2024-12-21 14:27:53 +01:00
Henrik Rydgård 419c329b06 Show active compat flags on crash screen 2024-12-10 01:43:44 +01:00
LunaMooandHenrik Rydgård 864a4b38aa Work around Brothers in Arms speed issue via compat hack (#18513)
Co-authored-by: Henrik Rydgård <hrydgard@gmail.com>
2024-09-18 09:51:07 +00:00
Henrik Rydgård 16a56aa18b Port over LunaMoo's compat flag for The Warriors video playback
This reverts to the old behavior before we started parsing mpeg headers,
that is, in 558b462 which is part of #8867.

LunaMoo has this under "HackFixVideo" in his build.

See #8991. This doesn't really "fix" that, but works around it.
2024-09-11 14:32:53 +02:00
Henrik Rydgård c7546dfe8d Add compat.ini setting for Sakura-Sou no Pet na Kanojo
See issue #15224
2024-09-10 19:28:49 +02:00
Henrik Rydgård ef95e24169 Implement compat flag proposed in #18423, forcing readbacks in Juiced 2
In-game, there's no slowdown, and this fixes the decal editor. So it's
no use allowing readbacks to be turned off in this game.

See issue #18423
2024-07-20 11:24:24 +02:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
LunaMoo 1f21ebdff3 Change GOWFramerateHack30 to FramerateHack30 and workaround problems in:
- Blitz: Overtime,
- Brian Lara 2007: Pressure Play.
2024-06-08 18:02:44 +02:00
Lubos e76a5b1d3d OpenXR - Gran Turismo projection hack 2024-05-10 19:40:13 +02:00
Henrik Rydgård 2cd7b5cceb Hacky compat workaround for Resistance's ad-hoc mode
Slicing the slow memcpy calls messes up some timing so it crashes. Too
hard to fix for 1.17.1, so we do this :(
2024-02-04 00:43:48 +01:00
Henrik Rydgård a6f041568b Allow merging framebuffers vertically like the old Juiced 2 fix.
Fixes Tokimeki Memorial 4 rendering.

Fixes #6379, see comments.
2023-12-30 22:40:07 +01:00
Henrik Rydgård 437b292b7d Tactics Ogre: Remove a redundant readback operation it performs a lot. 2023-12-21 12:37:34 +01:00
Henrik Rydgård 4ef54169af Add a compat.ini setting to allow delayed GPU readbacks, for experimentation. 2023-12-02 11:34:59 +01:00
sum2012 92c1eb4efa Add it to option
Also fix Sengoku Musou 3Z Special DLC
2023-10-23 19:38:09 +08:00
sum2012 60ddac0048 Add UMDReadSpeed in compat.ini
Fix #11062
2023-10-19 06:21:05 +08:00
Henrik Rydgård 16d073c4ad Add compat flag to not load CLUTs from old framebuffers 2023-08-24 10:30:37 +02:00
Henrik Rydgård 731d9b6d59 Merge branch 'master' into Font-ltn12-hack 2023-08-17 14:47:46 +02:00
Lubos 6e10f20f8b OpenXR - Tony Hawk mirroring hack better 2023-07-02 20:29:59 +02:00