ps5-mvfg
Frame generation injected into a PS5 game on a jailbroken PS5 Pro: 40 -> 120 fps with its own motion-vector frame generation (the game's motion vectors and depth, like FSR 3 / DLSS frame generation), and 30 -> 60 with Lossless Scaling's frame generation. Research code.
The 120 builds use the motion-vector generator by default, in SDR and HDR (before v0.5 SDR started on Lossless
Scaling's LSFG unless /data/ps5-fg-mvfg existed). The in-game menu's Generator row, or the folder
/data/ps5-fg-lsfg, switches to LSFG.
License: GPL-3.0-or-later (see LICENSE). The payload links the GPL-3.0 PS5 Vulkan driver in driver/
(Copyright (C) 2026 Mihawk-99), so the whole work is GPL-3.0. Building: see BUILD.md.
BUILD.md- how to build it and the per-console knobs.native/one/- the one-file payload (build.sh:VARIANT=120|60,TESTER=1).native/auto/- the auto-launcher (build.sh,PAYLOAD=<payload>): send it once after jailbreaking; it stays resident and arms frame generation for every game launch (a launch whose last session never ran properly is skipped once, with a notification). It also reads the stats overlay's sensors. Log:/data/ps5-fg-auto.txt.native/m3b3/- the in-game module (frame generation,mvfg.comp) and its loaderm3b3c.c.native/m2r/- the launch-time injector;native/m3b2/- the loader's shared structs and in-game blobs.native/tool/- ps5-native-tool (the module link step);native/tools/- PC-side tools.driver/- the PS5 Vulkan driver source (GPL-3.0, Mihawk-99);driver/prebuilt/- its prebuilt archives (what the module links).third_party/lsfg-vk/- the Lossless Scaling frame-gen backend (GPL-3.0, third-party: lsfg-vk + Eden Emulator Project).tester-package/- the readme and scripts for testers (the payloads themselves are built, not stored).
What is tied to the game
Built and tested against one title so far (PPSA38500). Moving to another game means finding these again:
- The hooks' addresses - the display-buffer registration hook and its code cave (
native/m2r/m2inj.c), the flip hook (native/m3b3/m3b3c.c), the upscaler call the motion vectors and depth are read from (native/m3b3/mvview.inc), the world-wait stub and the code fingerprint (native/one/ps5fg.c,native/one/fingerprint.hfromnative/tools/eboot_fingerprint.py), and the title ID. - The motion-vector frame generation's calibration (
native/m3b3/mvfg.comp): the motion-vector convention and scale, the depth model (reversed-Z, near/far), and the HUD boxes (the minimap panel and compass marker: their places and the pixel tests that tell when they are on screen). - Where motion vectors exist at all: a game without an upscaler that takes them needs another source (or the Lossless Scaling path, which needs only the flip hook).
Not tied to the game: the Vulkan driver (driver/), the Lossless Scaling port, the frame pacing and the presentation loop.
The code fingerprint is a report, not a gate (2026-11-30). A different build or backport logs which regions differ and
then continues: every write site is verified against its own original bytes and skipped when they do not match, and the
code cave must still be empty. Backports (PSSR on/off, patched eboots baked into a PKG) therefore run without
regenerating fingerprint.h; a genuinely different game build writes nothing, because no site matches.
What is tied to the firmware
Nothing that needs a row to run. native/m2r/fw_profiles.h has one row per firmware someone has tried, picked at
startup from kernel_get_fw_version(). Every row has the same memory recipe (4 extra display buffers, memory type 12),
and the one per-firmware value, an allocator fallback address, is optional. A firmware without a row therefore runs
with that generic recipe and the loader log says it is untested. What decides whether a console has room is its free memory
(console model and backport), not the firmware. Short of memory, either our buffers cannot be allocated (then none
are added, the game's own display registration goes through unchanged and frame generation does not start), or they
fit and the game's own large GPU block no longer does, so the game stops at start-up: the base PS5 case, fixed by the
"GPU memory -1 GiB" patch below.
| Firmware | Status |
|---|---|
| 4.50 (base PS5) | runs (one console, 229 s, 29.9 real + 59.4 generated fps at 119.88 Hz). Short session and visual quality unconfirmed, so tested = 0. Needs the base PS5 memory patch and SF_POOL_BYTES=0; see docs/base-ps5-4.50/. |
| 13.00 | tested (the original values) |
| 11.60 | runs (one PS5 Pro, 40 → 120), with "PSSR off" on backports that keep PSSR; flicker and FPS drops not solved yet, so tested = 0 |
| 11.40 (base PS5) | tested (one base PS5, 40 → 120 at 2560x1440, HDR auto-detected: 28.9 real + 28.6 generated fps over 228 s). Needs the "GPU memory -1 GiB (base PS5)" patch and a build with SF_POOL_BYTES=0, see below |
| 13.60 (PS5 Pro) | runs (one PS5 Pro, 30 → 60 on a 60 Hz TV, SDR: LSFG 29.4 + 29.3 fps, mvfg 30.0 + 29.9 fps). Needs the 5.xx+ backport with the bp_helper shim (PSSR already stubbed); without a backport only ~135 MiB stay free. Short sessions only, so tested = 0 |
Base PS5. Its direct memory is ~12.1 GiB and the game reserves one 6236 MiB GPU block, leaving ~76 MiB: too
little for the four extra display buffers, so the game stops at start-up. Apply "GPU memory -1 GiB (base PS5 frame
generation)" from patches/PPSA38500.xml (it makes that block 1 GiB smaller at the ten places the size is written;
the game's accounting stays consistent) and build the payload with SF_POOL_BYTES=0 (no 1.25 GiB device-memory pool
next to the game: the driver maps its own memory). The payload applies that patch by itself on a base PS5 (told apart
by its direct memory: ~12.1 GiB against ~13.3 GiB on a PS5 Pro; the loader log says which it saw), so its switch is
only needed with the PS Patch System. The 11.40 firmware row is in fw_profiles.h. The result and the
remaining artifacts are in docs/base-ps5-11.40/.
HDR (2026-11-30). 10-bit display buffers are detected from the game's own buffer: the resolve unpacks the packed
2:10:10:10 words and packs its output back the same way. Every released 120 build has done exactly this, v0.2
included, and that is the path verified in HDR on a PS5 Pro (an 8-bit write instead gave an acid-washed picture on base
PS5s). mvfg is selected automatically in HDR; LSFG's chain blends the packed words as four bytes. Experimental,
opt-in: with /data/ps5-fg-lsfg-hdr (live) the 120 build's LSFG reads and writes its frame and output views as
2_10_10_10 (native/m3b3/lsfg_hdr.inc), and HDR then no longer selects mvfg by itself - the generator choice
decides, as in SDR (a console where that path cannot work falls back to mvfg). Tested only on a base PS5 at 13.60 with
the unmodified game, one generated frame per real one. The frozen VARIANT=60 payload does not have it: its LSFG
still flashes green in HDR. Set HDR before launching the game: switching it in-game pauses frame generation (the
game's own frames are shown) until it is switched back.
PSSR (PS5 Pro). By default the payload applies "PSSR off" by itself at every launch: the game then uses the
fallback upscaler, and on a Pro the ~1 GiB PSSR takes stays free for frame generation. Copies that keep PSSR (11.60
backports, the game's own files on 13.xx) need this. Without the payload: the PS Patch System entry in
patches/PPSA38500.xml, or native/patch/pssroff.elf (build: bash native/patch/build.sh), sent once before starting
the game. All of them write 31 c0 c3 at eboot+0x8f67550, which is what the 13.00 backport writes.
Experimental, no menu item: the folder /data/ps5-fg-keep-pssr keeps PSSR and frame generation - the motion
vectors then come from PSSR's apply, which reads the same 1440p colour, depth and vectors (holdmysocks' #73, idarius'
#36). At the next launch the payload skips "PSSR off", gives a copy whose check was switched off by a patch its first
3 bytes back (only when the other 13 are the original stub's and its import slot is filled), and switches GPU memory
-1 GiB on by itself on a Pro so PSSR and frame generation both fit. Not yet confirmed on a copy that keeps PSSR: the
13.00 backport build of the game takes PSSR's system call out (its import slot points at a function that always
answers "no PSSR"), and the payload says so and leaves PSSR off. A base PS5 has no PSSR.
Your own XML patches (the Overlay & patches page > Your XML patches): patches in the PS Patch System's XML
format, from its own file /data/user/patches/xml_prospero/PPSA38500.xml and from every *.xml in
/data/ps5-fg-patches/. At each launch the payload lists what it found in /data/ps5-fg-xml-list.txt; the page shows
that list, and an entry switched on (/data/ps5-fg-xml-<id>; the id is a hash of its name and lines, so an edited
entry starts off again) is applied at the next launch, in the same stop as the built-in patches. An XML line carries
no original bytes, so the payload is strict about where it writes:
- only entries for this build (
AppVer01.002.001,AppElfeboot.bin), and only when the game's code is that build's; - line types
bytes,bytes8/16/32/64,float32/64andutf8(an entry with any other type is shown as unavailable); - an entry is applied whole or not at all, and is skipped when a line would change one of frame generation's own sites (hooks, code cave, the upscaler the motion vectors come from, the PSSR check), a built-in patch switched on at that launch, or another of your entries - unless it writes the bytes already there;
- every line is logged in
/data/ps5-fg-loader.txtwith the bytes it replaced; the page says why an entry was skipped. Host test:bash native/one/tests/run_user_patches_test.sh.
Motion blur off (optional, any console): the "Motion blur off (cleaner generated frames)" entry in
patches/PPSA38500.xml turns the game's motion blur off at both places it is read. Blur smears exactly what frame
generation interpolates, so edges around the player and cars come out cleaner. The sites are leomars32012-cyber's,
as applied by LPZ Framegen.
In-game menu (120 build): hold L1 + R1 and click the touchpad. Up / Down select, Left / Right / Cross change,
Circle closes; the game gets no input while it is open. Every item is one of the /data/ps5-fg-* switches, written
at once and kept for the next launch (the LSFG flow scale applies at the next launch). Text: DejaVu Sans
(third_party/dejavu-fonts/LICENSE). To see it on a PC with the console's own drawing code:
python3 native/m3b3/menu_preview.py <frame.png> <out-prefix> (WSL; SDR and HDR).
Stats overlay (the menu's Overlay & patches page): small text in the top-left corner - real and total fps (our own counts: the game's frames shown, and everything shown), CPU temperature and use, GPU temperature and clock, fan duty. The sensors are read by the auto-launcher's process, the way PrefBar (X1NONs/PrefBar, GPL-3.0) reads them: the game process may not call them. No GPU-usage reading is exposed, so the GPU clock is shown.
Game patches without the PS Patch System (the menu's Overlay & patches page): frame rate (OFF / UNLOCKED /
40 LOCK / FULL), 120 Hz output, motion blur, the game's FPS counter, GPU memory -1 GiB, skip intro logos
(ZiZc3's patch) and the close game fix (Eizovoid's patch: no hang / CE-108255-1 closing after a save). The payload applies
the ones switched on (/data/ps5-fg-patch-<id>) the moment the game starts, before its game check, with the same bytes
as patches/PPSA38500.xml (native/one/game_patches.h, written by patches/make_xml.py) and only where the game still
holds the original bytes; a patch the PS Patch System already applied is left alone. They apply at the next launch.
120 Hz output: FORCED makes the call the PS Patch System's "120 Hz forced" makes (sceVideoOutConfigureOutput
with request 15), from the module before it measures the refresh. Tested on a PS5 Pro, 13.00, without the PS Patch
System loaded: frame-rate unlock + 120 Hz forced gave the full 40 -> 120 (2 generated frames per real one at 119.9 Hz).
To add one:
- Build the read-only probe (needs only the public ps5-payload-sdk):
bash native/m2r/build-fwprobe.sh. - On the console, no PC needed: close the game, run
fwprobe.elffrom your payload manager (orpython tester-package/tools/send_payload.py <ip> fwprobe.elf), launch the game when the notification says so, and wait for thefwprobe: donenotification (~2 min). It writes nothing into the game. It reports the firmware, the game check, the allocator slot at the hook's arm moment, and where the memory functions are, in/data/ps5-fwprobe-<date>-<time>.txt(one per run;/data/ps5-fwprobe.txt= the latest). - Run it a second time: it ends with a row for
fw_profiles.h, and sets the allocator fallback only if both runs saw the same address (otherwise0, always safe). - If the game check fails (a different backport), the probe saves the checked bytes to
/data/ps5-fwprobe-regions.txt.native/tools/fp_solve.cfinds the patch that makes them matchFP_HASH, and a match proves everything else is identical (that is how "PSSR off" was found). Apply it, then probe again for PASS and the fallback upscaler. - Paste the row (
tested = 0), run a session, then settested = 1.
Check the table and the hook with the host test (gcc or clang, no console needed):
bash native/m2r/tests/run_hook_fw_test.sh
It runs the original reghook.c (from the repo's first commit) and the current one against a simulated game and
requires the 13.00 behaviour to stay byte-identical.
Not included: Lossless.dll (a paid app - each user needs their own copy), builds, frame captures, working notes.
Contributors
This project is built on its contributors' work. Thank you:
- @bsk193: 11.60 support, the per-firmware profiles, the "PSSR off" patch, the firmware probe, and re-registering our buffers on every registration (#4).
- @dr00tb: mvfg HDR detection (#8), the reproducible local toolchain (#9), launch diagnostics (#10), probe labels (#11), the scrub check (#12), and the PSSR-check research (#7).
- @artjsalina5: the base PS5 11.40 results and docs (#6), and the base-PS5 firmware row, GPU memory -1 GiB patch and built-in FPS counter (ported from #15).
- @thenayr: following the game's display buffers across re-registrations (#25), HUD boxes only while the minimap / compass is on screen (#27), and 13.60 without the backport (#26, in review).
- @holdmysocks: the runtime PSSR + fallback upscaler hooks (#73), behind the experimental keep-PSSR folder.
- @idarius: the 13.60 firmware row for a PS5 Pro with the backport (#21), its 13.60 test sessions, and frame generation with PSSR left on (#36, in review).
- @ljk1291: LSFG with 10-bit (HDR) display buffers (#29, opt-in), and finding that
mvfg_spv.hno longer matchedmvfg.comp- the basis of the HDR packing fix. - @hadobedo: the Lossless.dll-free 40 -> 120 build, base PS5 on 4.51 / 6.02 / 8.00 and VI-Patch support (#19, in review), and showing that packed HDR output is the correct one.
- @newHeath: mvfg disocclusion and shadow tuning, the live near plane and render size, and the Zen 2 copy (#22, being evaluated).
- @XarquiZ: base PS5 and 13.60 MVFG-only work and the early patcher (#24, in review).
- @emrankha97: PS5 Pro 13.60 backport support and the PSSR mode (#33, in review).
- @Dreh42: the base PS5 13.60 backport fingerprint and memory findings (#5).
- @Aznracer: 13.60 Pro tuning of the motion-vector resolve, a live tuning tool, and confirming packed HDR output on 13.60 (#34, in review).
- @Lilpez (LPZ Framegen, GPL-3.0): the motion-blur-off patch as applied there, the launch-time GPU-memory cut approach and its base PS5 13.60 results, and ideas this project is adopting (launcher, crash fallback, in-game menu, Guard).
- @leomars32012-cyber: the game-patch sites for motion blur (from their FPS unlocker; no code included).
- @ZiZc3 (VI-Patch): the "Skip intro logos" patch.
- @Eizovoid: the "Close game fix" patch.
- @X1NONs (PrefBar, GPL-3.0): how the stats overlay reads the temperatures, CPU use, GPU clock and fan (no code included).
- @illusionyy (PS Patch System): the 120 Hz output call that "120 Hz forced" makes, which the payload now makes itself.