Skip to content

Play your Steam library's Windows games on a jailbroken PS5.

C++

Pin prospero-win with the memory-budget patch for kit H r8

Leonardo Lobato57c2ab72eb4c
diff --git a/dependencies.lock.json b/dependencies.lock.json
index 77922a5..62fb073 100644
--- a/dependencies.lock.json
+++ b/dependencies.lock.json
@@ -162,7 +162,7 @@
}
},
"prospero_win": {
- "revision": "03b64951bae3c385cb1232a6f17af781646064a1",
+ "revision": "ea6e6eed9091ed1a4ff9febd732f684d2d487962",
"url": "https://github.com/leolobato/prospero-win.git",
"default_source": "third_party/prospero-win",
"published": false,
@@ -170,7 +170,7 @@
"retained_runtime_artifact_revision": "bceed2d-kit-h-r1",
"upstream_url": "https://github.com/mpereiraesaa/prospero-win.git",
"branch": "feat/playden-ps5",
- "note": "Rebased onto upstream b510eb3 on 2026-10-08. Any-title shell on fixed kit B (25a967d). Firmware 13.60 uses the authorized no-drop fallback; games retain root recovery. Runtime remains bea2be5. Same tree as kit C's shell revision 850e62c (history squashed; the old commits are on backup/playden-ps5-850e62c). 33130a9 adds publication metadata schema 3 (game_root.unowned) for game folders on exFAT drives. a9ce0d0 pins the packager to the kit D runtime built from 8ff88bf (rebased forks, direct-memory heap). Test branch feat/upstream-2026-10-10 (2026-10-10): rebased onto upstream ce890c0 (Mesa WGL/Zink OpenGL, PS5 OpenGL SDK path removed); patch 0663 dropped, ours renumbered 0950-0955; 3f8f559 pins the packager to the kit G runtime f29127a. Rebased again onto upstream 644e32e (kit H): our 0602 and the translator fallback 063f851 dropped for upstream #678/#677, patch 0956 keeps a window's pixel format with Mesa's WGL; 77231eb pins the packager to the kit H runtime bceed2d. 03b6495 (feat/playden-ps5) adds only test, documentation and allowlist fixes on top of ab3b29e; the runtime is unchanged."
+ "note": "Rebased onto upstream b510eb3 on 2026-10-08. Any-title shell on fixed kit B (25a967d). Firmware 13.60 uses the authorized no-drop fallback; games retain root recovery. Runtime remains bea2be5. Same tree as kit C's shell revision 850e62c (history squashed; the old commits are on backup/playden-ps5-850e62c). 33130a9 adds publication metadata schema 3 (game_root.unowned) for game folders on exFAT drives. a9ce0d0 pins the packager to the kit D runtime built from 8ff88bf (rebased forks, direct-memory heap). Test branch feat/upstream-2026-10-10 (2026-10-10): rebased onto upstream ce890c0 (Mesa WGL/Zink OpenGL, PS5 OpenGL SDK path removed); patch 0663 dropped, ours renumbered 0950-0955; 3f8f559 pins the packager to the kit G runtime f29127a. Rebased again onto upstream 644e32e (kit H): our 0602 and the translator fallback 063f851 dropped for upstream #678/#677, patch 0956 keeps a window's pixel format with Mesa's WGL; 77231eb pins the packager to the kit H runtime bceed2d. 03b6495 (feat/playden-ps5) adds only test, documentation and allowlist fixes on top of ab3b29e. 13fa077 adds Wine patch 0603 (upstream PR #688: Windows memory queries report the title's direct-memory budget) and ea6e6ee pins the packager to the kit H r8 runtime built from 13fa077."
},
"prospero_bottle_preparation": {
"hl2-fresh-v16": {
diff --git a/third_party/prospero-win b/third_party/prospero-win
index 03b6495..ea6e6ee 160000
--- a/third_party/prospero-win
+++ b/third_party/prospero-win
@@ -1 +1 @@
-Subproject commit 03b64951bae3c385cb1232a6f17af781646064a1
+Subproject commit ea6e6eed9091ed1a4ff9febd732f684d2d487962
diff --git a/tools/kit-h/README.md b/tools/kit-h/README.md
index 6780370..7ce4ab7 100644
--- a/tools/kit-h/README.md
+++ b/tools/kit-h/README.md
@@ -23,9 +23,10 @@ The scripts read these environment variables. The defaults fit a plain checkout.
| `PROSPERO_WIN_SOURCE` | `setup_vm.sh`: the prospero-win repository to clone | `https://github.com/leolobato/prospero-win.git` |
| `PROSPERO_FREETYPE_TARBALL` | `build_cross.sh`: the FreeType 2.13.3 source tarball | none, required |
| `PLAYDEN_KIT_DIR` | `make_shell.sh`, `make_spec.py`, `stage_kit_h.py`: where kit H is staged | `build/kit-h` |
-| `PLAYDEN_KIT_FROM` | `update_r4.py`, `update_r5.py`, `update_r6.py`: the kit whose inputs were copied (its paths in the spec are rewritten) | `build/kit-h-r3`, `build/kit-h-r4`, `build/kit-h-r5` |
+| `PLAYDEN_KIT_FROM` | `update_r4.py`, `update_r5.py`, `update_r6.py`, `update_r8.py`: the kit whose inputs were copied (its paths in the spec are rewritten) | `build/kit-h-r3`, `build/kit-h-r4`, `build/kit-h-r5`, `build/kit-h-r6` |
| `PLAYDEN_DOTNET_DIR` | `update_r6.py`: the prefixes before and after Wine Mono's support MSI install, and the MSI's tables | `$PLAYDEN_KIT_DIR/dotnet` |
-| `PLAYDEN_RUNTIME_REVISION` | `update_r5.py`: the prospero-win commit the runtime and its pin come from | none, required |
+| `PLAYDEN_RUNTIME_REVISION` | `update_r5.py`, `update_r8.py`: the prospero-win commit the runtime and its pin come from | none, required |
+| `PLAYDEN_CROSS_PRX` | `update_r8.py`: the cross build's `prx/sce_module` folder | `$PLAYDEN_KIT_WORK/wine-ps5/prx/sce_module` |
| `PLAYDEN_WINE_MONO_ARCHIVE` | `update_r4.py`: the Wine Mono 11.3.0 archive (its SHA-256 is checked) | none, required |
| `PLAYDEN_BUILD` | `stage_kit_h.py`: the build folder that holds kits A and F | `build/` |
| `PLAYDEN_KIT_F` | `make_spec.py`: kit F's build, whose spec kit H starts from | `build/kit-f` |
@@ -62,13 +63,17 @@ earlier template does not have that value: use Recreate bottle. Kit H r5 (runtim
CPU cores settings reach the game (capability `settings-profile-environment`). Copy r4's inputs (without `titles/`) and
spec, run `make_shell.sh` with `PLAYDEN_KIT_DIR` on the prospero-win commit that pins the runtime (the new title shell),
`build_cross.sh` on 70bfc92, then `update_r5.py` in the VM. Only the shell's `eboot.bin` and `ntdll.prx` change; the
-template is r4's, so bottles need no Recreate. Kit H r6 (the kit this release uses; r5's runtime and shell) gives the
+template is r4's, so bottles need no Recreate. Kit H r6 (r5's runtime and shell) gives the
template bottle what Wine Mono's support MSI writes when Wine installs it, which kit H bottles never run: the .NET Framework
`InstallRoot` (both registry views) and the other keys of the MSI's Registry table, and `C:\windows\Microsoft.NET`. Without
them mscoree's `LoadLibraryShim` fails (Antichamber). Install the MSI once with kit H's host Wine on an x86_64 Linux host
(the commands are in `update_r6.py`; Rosetta can't run wow64 Wine), then run `update_r6.py` on the Mac on a copy of r5's
inputs and spec. It takes only what the MSI accounts for and checks each file against the MSI's hashes or the runtime's
-builtins. Bottles made from an earlier template need Recreate bottle. RADV (`libvulkan.prx`) comes
+builtins. Bottles made from an earlier template need Recreate bottle. Kit H r8 (the kit this release uses; runtime
+`13fa077-kit-h-r8`; r7 was a development kit and was not released) is r6 with Wine patch 0603: Windows memory queries
+report the title's direct-memory budget instead of about zero, so Fallout: New Vegas starts. Build the cross PRXs with
+`build_wine_ps5.sh` on 13fa077 into a fresh work folder, then run `update_r8.py` on a copy of r6's inputs and spec with
+`PLAYDEN_CROSS_PRX` at that build's `prx/sce_module`. Only `ntdll.prx` changes, so bottles need no Recreate. RADV (`libvulkan.prx`) comes
from [PS5_Vulkan](https://github.com/mpereiraesaa/PS5_Vulkan) 8aee3af / [PS5_Mesa](https://github.com/mpereiraesaa/PS5_Mesa)
01d7057, the same as kit G r2. OpenGL games under Zink need at least PS5_Mesa f2ee389.
diff --git a/tools/kit-h/update_r8.py b/tools/kit-h/update_r8.py
new file mode 100644
index 0000000..116a58e
--- /dev/null
+++ b/tools/kit-h/update_r8.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+# Kit H r8: kit H r6 with ntdll.prx rebuilt from the prospero-win commit that adds Wine patch 0603 (upstream PR #688): Windows
+# memory queries report the PS5 title's direct-memory budget and its largest free block instead of the sandbox's empty BSD
+# readings, so a game that checks free memory before it starts (Fallout: New Vegas) sees about 12 GiB and an equal page file.
+# Only ntdll.prx changes; the shell, the template and Mono are r6's, so bottles need no Recreate. (r7 was a development kit.)
+# Copy kit H r6's inputs and kit-spec.json to PLAYDEN_KIT_DIR first (cp -c works). Build the cross PRXs with
+# tools/build_wine_ps5.sh on the runtime's prospero-win commit (as build_cross.sh does) into a fresh work folder, then run this
+# script with PLAYDEN_CROSS_PRX at its prx/sce_module (copied to the Mac or read in the VM) and PLAYDEN_RUNTIME_REVISION set to
+# that commit. Every other cross PRX must still match r6's.
+import hashlib, json, os, shutil
+from pathlib import Path
+
+work = Path(os.environ.get('PLAYDEN_KIT_WORK', Path.home() / 'playden-kit'))
+cross = Path(os.environ.get('PLAYDEN_CROSS_PRX', work / 'wine-ps5/prx/sce_module')).resolve()
+here = Path(os.environ.get('PLAYDEN_KIT_DIR', 'build/kit-h-r8')).resolve()
+previous = Path(os.environ.get('PLAYDEN_KIT_FROM', 'build/kit-h-r6')).resolve()
+runtime = here / 'inputs/runtime/wine'
+def sha(p): return hashlib.sha256(p.read_bytes()).hexdigest()
+
+spec_path = here / 'kit-spec.json'
+spec = json.loads(spec_path.read_text().replace(str(previous) + '/', str(here) + '/'))
+assert spec['runtime']['artifact_revision'].endswith('-kit-h-r5'), 'r8 starts from r6, which kept r5\'s runtime'
+
+# ntdll.prx: the only cross PRX that changes.
+drifted = [p.name for p in sorted(cross.glob('*.prx')) if sha(p) != sha(runtime / 'lib/wine/x86_64-unix' / p.name)]
+assert drifted == ['ntdll.prx'], f'cross PRXs that differ from r6: {drifted}'
+target = runtime / 'lib/wine/x86_64-unix/ntdll.prx'
+mode = target.stat().st_mode & 0o7777
+target.unlink() # the inputs may be a copy-on-write clone of r6's
+shutil.copyfile(cross / 'ntdll.prx', target); target.chmod(mode)
+inventory = {f'wine/{p.relative_to(runtime)}': sha(p) for p in sorted(runtime.rglob('*')) if p.is_file()}
+(here / 'inputs/runtime-inventory.json').write_text(json.dumps(inventory, indent=1, sort_keys=True) + '\n')
+
+revision = os.environ['PLAYDEN_RUNTIME_REVISION']
+assert len(revision) == 40, revision
+artifact = f'{revision[:7]}-kit-h-r8'
+spec['runtime'].update(wine_revision=revision, artifact_revision=artifact)
+spec['sources']['wine']['revision'] = revision
+spec_path.write_text(json.dumps(spec, indent=1, sort_keys=True) + '\n')
+
+substitutions = json.loads((here / 'inputs/template-substitutions.json').read_text())
+substitutions['runtime_artifact_revision'] = artifact
+(here / 'inputs/template-substitutions.json').write_text(json.dumps(substitutions, indent=1) + '\n')
+record = json.loads((here / 'inputs/stage-record.json').read_text())
+record['r8'] = {'wine_patch': '0603-ntdll-report-the-ps5-title-s-memory', 'changed': ['lib/wine/x86_64-unix/ntdll.prx']}
+record['prospero_win'] = revision
+record['artifact_revision'] = artifact
+(here / 'inputs/stage-record.json').write_text(json.dumps(record, indent=1) + '\n')
+print('ntdll.prx', sha(target), 'files', len(inventory), artifact)