RetroArch reads a save state whole, and loading Resident Evil 4's 260 MB
entry state while Dolphin booted left the JIT 45 MB of the 56 MB of
flexible memory it maps; the core then wrote its code through a null
pointer. Large frontend allocations now take direct memory first and
anonymous (flexible) mappings only when it refuses, which keeps flexible
memory for executable code and thread stacks. The Dolphin allocator
reports the flexible memory free when an executable mapping fails.
tooling/dolphin-profiles holds the acceptance profiles as core-option
files. PHASE_LOG records Profile 0 on the three games.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
libretro/dolphin c6630001e0 (Dolphin 2609) cross-builds with
tools/build-dolphin.sh and patches/dolphin/ps5-port.patch and ships in the
title. Platform work in the core patch: guest RAM in direct memory mapped at
every mirror, the fastmem arena as a kernel range reservation away from the
GPU window, JIT code mapped RW then RWX at 0x3_0000_0000, the console's
shifted mcontext and SIGBUS in the fault handler, a 32 MiB code cache,
test-only /app0/dolphin-options.txt overrides, and no false "Failed to load
Vulkan library" alert. tooling/dolphin/ps5-libc-shims.cpp supplies the libc
entry points the console lacks.
Title: openat/fdopendir/unlinkat/fchmodat and libc's opendir family
implemented or rerouted for the title's libc++ (openat resolved to 0 in
std::filesystem::remove_all); utimensat over utimes; small allocations go to
direct memory first and a refused libc realloc moves the block there (the
driver's compiler and a strdup at exit both failed on an exhausted libc heap).
Frontend patches: 0089 enables VK_KHR_get_physical_device_properties2 on the
instance (Dolphin's VMA); 0090 keeps the synchronous readback inside the
caller's viewport (save-state thumbnail overran ~1 MB and crashed).
Evidence: evidence/dolphin-wind-waker-boot (dol12: 1800 frames, zero driver
refusals, zero failed Vulkan calls, audio errors=0, clean exit; the title
screen's mountain is missing and open) and evidence/dolphin-save-states
(dolss3 save and dolld2 --entryslot=0 load, clean exits; dolss1/dolld1 were
the crashes). tools/verify.sh: PASS (format unit build integration evidence;
patch count 199), 39 captures replay.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build pinned mGBA with this PS5 SDK, official metadata and both GB/GBA engines.
Support validated C initializer arrays, native directory/time imports and an
explicit config path. Map large title/core allocations so GBA archives load.
Correct mGBA callback colours and cached frame ownership, crop padded core
textures during presentation, and use the native shell exit after cleanup.
Verified: bash tools/verify.sh (format, unit, build, integration, evidence;
58 tests), then bash tools/run-title.sh --no-build --core-test=mgba --watch 180.
Owner confirms GB/GBC/GBA loading, correct colours/native Quit, and clean menu
and next game. Final capture has zero Vulkan refusals, GPU failure records or
kernel fatal-signal reports; normal frontend exit occurred before window end.
Evidence: evidence/mgba-native/{capture,expectation,iterations,build,abi}.json,
loader/recovery reports and exact linked-driver hashes. Replay with
bash tools/verify.sh evidence. Final build identity:
82024b89e74bbad4ad2ce2e2916d1a49baf26ac325fef20fc71a2c168b862337.
Patch count is deliberately 139: archive diagnostics, menu/cache ownership and
padded-source sampling edits. PS5_Vulkan was not modified. Saves/states,
long-run timing and a fresh FCEUmm/XMB transition matrix remain unverified.