Void Terrarium: fully playable on the Linux/macOS port (stacked on #47)#1
Void Terrarium: fully playable on the Linux/macOS port (stacked on #47)#1xnetcat wants to merge 2 commits into
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (58)
📝 WalkthroughWalkthroughThis change updates release packaging, runtime execution, TLS and memory handling, AGC shader and GPU processing, audio/media compatibility, kernel exports, and Vulkan presentation synchronization. ChangesRuntime and platform integration
AGC and GPU pipeline
Compatibility services
Estimated code review effort: 5 (Critical) | ~120 minutes Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
In-game FPS: profiled at real gameplay (story/dungeon scenes)Captured a 30 s
Conclusion: in-game fps is bounded by the game's simulation under Rosetta, not emulator overhead. The realistic levers are a native x86-64 host or an ARM64 recompiler — both out of scope here. Also landed while validating: |
3739e39 to
1bfb48a
Compare
9574ffb to
a7bb8cd
Compare
* [CI] Update for cross-platform support * [CI] fix check
Brings up void tRrLM();++ //Void Terrarium++ from frozen-splash to gameplay on the POSIX port, with unattended-run helpers and the GPU work the title needs: - GPU/AGC: RDNA2/Gen5 shader translation coverage (graphics-stage LDS via ds_read/ds_write b96/b128 modeled as private memory, DPP, wave masks, gradient sampling, typed resources), texture format 50 aliasing of A2R10G10B10 render targets, default-on CPU detiling for base swizzle modes 1-12 (GnmTiling), draw degradation instead of silent draw drops on translation failures. - Command processor: per-queue ordered DCB submission with WAIT_REG_MEM suspend/resume, PM4 completion and end-of-pipe writeback, sceAgcDmaDataPatchSetSrcAddressOrOffsetOrImmediate. - Presenter: offscreen draw batching, texture/descriptor caching with SIGSEGV-based guest-image write tracking, flip pacing, MRT support, F1 perf overlay; window close / Ctrl-C request cooperative guest shutdown and force process exit if the guest ignores it. - Kernel/HLE: APR file streaming (sceKernelAprResolveFilepathsToIds, sceKernelAprGetFileStat), SCE fiber context switching, savedata transaction resources, pthread TLS destructor passes on thread exit, AudioOut with CoreAudio backend and 5.1->stereo downmix, Ngs2, AvPlayer, dialogs, trophy/CES/telemetry startup stubs. - Scheduler: background Ready-thread dispatcher so hot-spinning guest threads cannot starve runnable ones. - Input: SHARPEMU_AUTO_CROSS=repeat[:seconds] (+_HOLD_MS, LOG) and SHARPEMU_AUTO_WALK=<start-seconds> for unattended menu traversal and dungeon wandering; pad/audio accept the user id the user service hands out. Verified on macOS (M4, Rosetta 2, MoltenVK): title menu at locked 60 fps, story/gameplay scenes render cleanly; frame times there are bound by guest x86-64 execution under Rosetta (managed emulator code samples at ~0% CPU).
a7bb8cd to
901c72e
Compare
|
Superseded by the upstream PR: sharpemu#208 (same branch, rebased onto upstream main). |
Based on current upstream
main(includes the merged sharpemu#47); the branch is a single commit on top of it. This bringsvoid tRrLM();++ //Void Terrarium++[PPSA03061] from "boots to a frozen splash" to fully playable on the POSIX port: boot → title menu → New Game → intro → gameplay, verified end-to-end unattended (SHARPEMU_AUTO_CROSS=repeat:4) with clean rendering and no crash over multiple 15-minute soaks.What's in here
GPU / AGC. The Gen5 (RDNA2) shader front end learns the instructions this game's shaders actually use:
ds_write/ds_read_b96/b128with graphics-stage LDS modeled as per-invocation private memory (the missing piece that silently dropped the scene geometry draws — the "black screen" was never a game stall), DPP, wave masks, gradient sampling, typed buffer resources, and stricter descriptor validation. Draws that still fail translation degrade (1×1 fallback texture, unresolved-scalar degradation) instead of being dropped. Texture format 50 (sampled A2R10G10B10) aliases the on-GPU render target. CPU-side detiling (GnmTiling) runs by default for the linearly-ordered base swizzle modes 1–12 with a precomputed per-block offset table;_T/_Xvariants stay opt-in behindSHARPEMU_DETILE=1.Command processor. DCB submissions are queued per logical queue and pumped in order: an unsatisfied
WAIT_REG_MEMsuspends the queue and resumes when the label is written, instead of parsing packets out of order (this plus thesceAgcDmaDataPatchSetSrcAddressOrOffsetOrImmediateimplementation fixes the one-frame-then-freeze render loop). PM4 completion and end-of-pipe writeback are modeled precisely enough for the game's fences.Presenter. Offscreen draw batching into shared command-buffer submissions, texture/descriptor/pipeline caching with SIGSEGV-based guest-image write tracking for invalidation, flip pacing to the display cadence, MRT support for all color targets, an F1 perf overlay, and MoltenVK performance defaults (async queue submits, concurrent pipeline compilation, Metal argument buffers). Window close and Ctrl-C request cooperative guest shutdown and force a process exit if a wedged guest ignores it.
Kernel / HLE. APR file streaming (
sceKernelAprResolveFilepathsToIds,sceKernelAprGetFileStat— without these, asset streaming returns NOT_FOUND and the game never leaves its splash), SCE fiber context switching (the game schedules on fibers), savedata transaction resources, pthread TLS destructor passes on thread exit, AudioOut with a CoreAudio backend and proper 5.1→stereo downmix, Ngs2, AvPlayer, message/error dialogs, and the trophy/CES/telemetry startup stubs — zero unresolved imports for this title.Scheduler. A background Ready-thread dispatcher so a hot-spinning guest thread (this game busy-polls
sceAudioOutOutput) cannot starve runnable threads; the old behavior only pumped the ready queue on blocking HLE calls and deadlocked the loader.Input. Building on the host input seam from sharpemu#192:
SHARPEMU_AUTO_CROSS=repeat[:seconds]keeps pressing Cross on an interval (release guaranteed between presses) so a headless run drives itself through the menus into gameplay; a timed-offset list (SHARPEMU_AUTO_CROSS="40,52,64") is also supported, withSHARPEMU_AUTO_CROSS_HOLD_MSandSHARPEMU_LOG_AUTO_CROSS=1to tune/observe it.SHARPEMU_AUTO_WALK=<start-seconds>rotates a held d-pad direction for unattended tutorial/dungeon traversal (start it past the title menu). Pad and AudioOut2 accept the user id the user service hands out — a mismatch there used to strand the game with an error code as its pad handle and no working input.Verified / performance
PPSA03061 v01.000.000 on macOS 27 (Apple M4, Rosetta 2, MoltenVK 1.4.1):
In-game frame times are bound by the guest's own x86-64 code under Rosetta 2: a
dotnet-tracecpu-sampling capture at 13–18 fps gameplay attributes ~100 % of self-time to unmanaged guest execution (managed emulator code ≈ 0 %), and the intro cinematic renders the same ~110 draws/frame at 55–60 fps — heavier scenes simply run 3–4× more guest CPU per frame. Total process CPU in-game is ~1–1.6 cores.dotnet testpasses (26/26); Windows paths are untouched.Known issues
_T/_Xswizzle detile variants remain opt-in (block placement only approximated).Summary by CodeRabbit