Running two PSP emulators on one Switch 2 and sharing one via GameShare

Hacker News by 10 min read 43x views
Running two PSP emulators on one Switch 2 and sharing one via GameShare

Share Post

This branch experiments alongside a distinct PPSSPP visitant operating on the presenter Switch 2 and streamed to a inventory GameShare client. It is not a mirrored controller or a second PSP controller in the presenter emulator. Compilation and presenter tests do not establish console procedure or satisfactory two-game performance.

The operating single-instance checkpoint is switch2-single-instance-working (commit 1c3b38a). Its exact tested NRO, bundle and matching debug ELF remain under dist-switch2/checkpoints/switch2-single-instance-working/.

sh Tools/build-switch2-gameshare.sh python3 Tools/deploy-switch2.py 192.168.1.182 --experimental-gameshare

Open FTPD for the second command. A prosperous transfer is accepted without a validation download. The test installs as PPSSPP GameShare, at sdmc:/switch/ppsspp-switch2-gameshare/ppsspp-switch2-gameshare.nro. It leaves the operating ppsspp-switch2 NRO and its settings/saves in place. The normal Tools/build-switch2.sh selects GameShare OFF. Both builds reuse the build cache, but packaging rejects mismatched native/experimental modes.

Launch through the identical GameShare-capable native heading override used for the Moonlight SDK example. A generic heading override is not known to aid the required GameShare context. If another heading locks overview switching, the SDK uses the Nintendo overview selected for that initiate whenever available. The host log distinguishes a missing initiate overview from a afterward StreamPlay or matchmaking error. Choose GameShare (experimental) in the host's main or intermission menu, afterward associate from the client's scheme GameShare screen. The client should see its own PPSSPP menu, alongside a guest-only startup message, and browse sdmc:/switch/ppsspp-switch2/games. Both browsers can admission SD-card games; no equivalent records are copied into the package.

Choose the identical GameShare act to halt sharing. The visitant pauses between sessions, retaining its autonomous emulator state. Exiting the guest's PPSSPP ends that visitant instance; restart the use before creating another. Exit the presenter normally whenever done. If a genuine cleanup nonaccomplishment reports retained resources, near the complete hosting heading from HOME, fairly than returning to hbmenu. The SDK explicitly requires this for uncertain native ownership.

The build links a second PPSSPP frontend/core into a relocatable entity and renames all defined core-owned earth sign and ELF COMDAT collection signature. Only eight plain-data C admission points are exported. The audit requires distinct Config, memory-base and core-state symbols; the presenter additionally compares their runtime addresses before starting. SDK/OS/C++ runtime admission points remain shared. The two emulators have independent core, UI, filesystem state, JIT registries, Vulkan contexts and settings/memory-stick directories. They portion one OS process, so a fatal error in either copy can motionless power the complete app.

The presenter keeps its 1920x1080 output and 120 Hz request. The visitant uses PPSSPP's existing offscreen Vulkan way at 1280x720 alongside a 60 fps display target. A readback recall transfers completed RGBA frames to a latest-frame mailbox; a dedicated presenter uploads them to a distinct native VI2 visitant layer. This archetypal path adds CPU readback/swizzle cost; zero-copy is not claimed.

The GameShare SDK is vendored from Moonlight-Switch's investigation worktree. Switch/GameShare/sdk-provenance.json records the origin revision and file hashes. Its MIT licence and per-file ISC notices are retained. The SDK's pinned CPU-console uploader is disabled. The visitant renderer borrows the statically linked OunceVK driver's GSV chief and employee sessions and uses its registered VM. It owns the visitant depiction backing, registrations and client. The adapter tracks the driver's occupied slots at the libounce call border and reserves a free slot for visitant range retirement. Each GameShare meeting reuses the reserved slot's completion event, which closes alongside the Vulkan driver's GPU. It does not access OunceVK's inner structs. Retire the visitant images before Vulkan teardown. Coexistence and reuse on hardware motionless necessitate qualification.

The SDK owns matchmaking, native hosting, controller says and the separate VI2 display/layer. Renderer withdrawal runs before native Finalize; layer closure runs afterwards. Uncertain display or release/retirement failure retains assistance and blocks average unload. Guest controls never act the host emulator. Stale/disconnected snapshots rotate into neutral.

Storage, audio and current limits

Host settings/saves use ppsspp-switch2-gameshare/config/ppsspp; guest settings/saves use ppsspp-switch2-gameshare/guest/config/ppsspp. The existing working app's recollection rod is not reused. Guest native text-entry applets are disabled since their routing to the distant display is not implemented.

PPSSPP sends the visitant emulator's PCM to the native per-guest queue and keeps the presenter emulator on normal AudOut. See the recovered audio contract. The console test confirmed audible client playback in the direct-audio build.

Start GameShare and associate from the client. Open the identical equivalent on the two screens, then act its local wireless or Ad Hoc mode. Create a lobby on either console and appearance for it on the other. If the presenter had already initialized multiplayer before pairing, restart that equivalent formerly to choose the local route.

While GameShare is hosting, PPSSPP runs its built-in finding assistance and aemu_postoffice packet relay on IPv4 loopback ports 27314 and 27315. Both cores use the personal path automatically alongside their existing, independently configured PSP MAC addresses. The visitant motionless runs on the presenter Switch 2, so equivalent packets remain on that console. The path does not use a community relay, Wi-Fi IP address, or UPnP mapping, and it does not alter either core's saved network settings. Stopping GameShare closes the listeners. A equivalent already in a lobby may need to leave and re-enter multiplayer following GameShare is restarted.

The person reported a prosperous Tekken meeting in the archetypal loopback build. The consequent build keeps all core's first MAC location and passed the ten paired desktop tests. That save-preserving type is tagged switch2-gameshare-multiplayer-baseline (commit 0699365). Its NRO, ZIP and debug ELF are in dist-switch2-gameshare/checkpoints/multiplayer-baseline/. The before console run used the temporary-MAC build.

Diagnostics and validation

Host boot.log, ppsspp.log, native-exit.bin and native-fault.bin live in the experimental app directory. The visitant writes guest/ppsspp.log. Native fault/exit records alongside valid headers are retained as .previous on the next launch. Preserve diagnostics before relaunching following a failure.

python3 Switch/tests/run.py python3 Switch/tests/run_gameshare.py python3 Switch/GameShare/sdk/tests/native/run.py python3 Switch/GameShare/sdk/tests/guest_input/run.py python3 Switch/GameShare/sdk/tests/guest_display/run.py git diff --check

Actual-source sanitizer tests shield native guest-image field locations, partial creation, prosperous retirement, retained uncertain presents and release/range timeouts. SDK tests shield native lifecycle/cancellation, controller parsing/freshness and display ownership. They do not simulate the GPU, native heading permissions, GameShare broadcast behavior or console performance. CPU, GPU, threading and shutdown regression risks necessitate console testing; serialized PSP province layouts are unchanged.

Initial presenter validation (2026-11-19)

The dual-core AArch64 NRO and ZIP built and validated. The sign audit found 27,173 renamed core-owned symbols and eight visitant ABI exports. All 28 SDK native lifecycle scenarios, the input parser/freshness suite and display lifetime suite passed under ASan/UBSan. Six actual-source image-owner scenarios passed (clean, partial create, uncertain present, publish timeout, range retirement timeout and unregister failure). Existing JIT publish and dedicated-worker tests additionally passed.

Host regression suites: 102 C++ component tests passed; 527 executed single-instance PSP cases and ten paired relay scenarios passed. Eleven paired P2P cases remain unrun for the existing missing 127.0.0.2 presenter loopback alias, causing the aggregate runner's nonaccomplishment status. No executed regression test failed. Console dual-instance rendering, pairing, visitant controls/audio and sustained performance motionless necessitate bodily qualification.

First console initiate inquiry (2026-11-19)

The first experimental build produced a scheme error before the PPSSPP menu. Its footwear log reached display configuration; native fault/exit records remained empty. The distinct operating single-instance facility is unchanged. Pairing and the second emulator have not yet been reached on the console.

The SDK extend is compiled as C++20 separately from the C++17 frontend. Startup checkpoints about Vulkan initialization compose startup-stage.bin directly with native flushes. Its four little-endian 64-bit words are magic 0x3254475350505350, phase number, recorder location and scheme tick. Stages 1–4 shield diagnostics, display configuration, graphics-object building and error-string construction; stages 10 and 11 bracket InitAPI's first string assignment. Stages 20 and 21 bracket NativeInit, and 22 precedes opening setup. The diagnostic footwear marker is comdat-isolation. The native exit recorder also wraps svcBreak (kind 6, logic in the elevated 32 bits and a readable four-byte detail in the low 32 bits).

The final ELF showed that the linker turned a required presenter string-constructor call into a no-op. GCC used a local C5 signature for the constructor group. Renaming lone earth symbols let the visitant collection keep that signature, causing the linker to discard the presenter copy. The build now renames and checks all 7,351 guest COMDAT groups in supplement to the earth sign audit. Disassembly of the corrected ELF confirms that presenter startup calls its own cord constructor and the visitant constructor has a distinct address.

The console opened the corrected build and started a presenter game. On the first GameShare attempt, VI2 reached the renderer hook, anywhere a second GSV GPU open failed alongside 0x200F3. The visitant emulator independently reached offscreen Vulkan initialization. The revised uploader uses the existing controller session. The presenter additionally joins the SDK thread following terminal states before asking if native resources were retained, so a completed thread solitary no longer forces a title restart. Confirm pairing, visitant frames and stop/restart on hardware.

The shared-session build paired alongside the client, and the SDK completed cleanup. The client remained dreary since PPSSPP rejected readback from the guest's offscreen Vulkan display before any example could attain the uploader. Offscreen display now declares its transfer-source capability. The copy waits for the color attachment writes and skips frames without an acquired image. A local MoltenVK run cleared three successive offscreen frames to different colors and verified all returned RGBA byte. Client presentation and autonomous input motionless necessitate a console check.

The console confirmed that the presenter and client can see and authority their own PPSSPP screens. Both emulator audio streams were audible from the host. The console-confirmed NRO, matching ELF and facility receipt are saved under dist-switch2-gameshare/checkpoints/dual-screen-controls/.

The client was silent in separate-display sessions alongside the two AudOut and Audren. The Audren test footwear log confirms the use mix used Audren, the visitant received frames and SDK cleanup completed. The launcher NRO was restored to the console-confirmed dual-screen build using the saved SD-card copy. The renderer test is recorded in commit c5a8716.

At the dual-screen checkpoint, the two games played through the host. The SDK exposed an application-wide mirroring emblem and device-volume configuration.

Direct visitant audio investigation

The shipped SDK exports a distinct PCM author and per-guest queue counters. The reusable Moonlight SDK and its PPSSPP copy now disclose a PCM callback. Tests of the native employee shield the restored command layout, the unwritten tail following a partial write, and a unsuccessful audio command that leaves video and input running.

On November 19, 2026, the console test confirmed audio on the GameShare client. The operating build is tagged switch2-gameshare-guest-audio-working (commit 50cd977). The exact installed NRO, SD-card package, matching ELF, SDK archive and build records are saved under dist-switch2-gameshare/checkpoints/guest-audio-working/. For a console rollback, reinstall that NRO as /switch/ppsspp-switch2-gameshare/ppsspp-switch2-gameshare.nro.

Other Article Hacker News
↑
Close Right Ads
Close Left Ads