Skip to content

host: Pokopia on main: pointer look, Link Play, NVN2 shader keys with the profile's skip range - #2782

Open
SaranSundar wants to merge 2 commits into
seedds:mainfrom
SaranSundar:pokopia-s2-main
Open

SaranSundar wants to merge 2 commits into
seedds:mainfrom
SaranSundar:pokopia-s2-main

Conversation

@SaranSundar

@SaranSundar SaranSundar commented Nov 15, 2026 •

Copy link
Copy Markdown

Brings the pokopia-native tool's Switch 2 patch onto main, keeping only what main lacks:

  • Pointer look: a click captures the mouse and turns the camera (profile keys look_rate, look_dead, look_cam).
  • Link Play: the coop module (hle_coop_*.c). nn::ldn and the game's UDP sockets go to it while DM_COOP is on; its virtual sockets sit beside the host's local UDP emulation.
  • shader_key_skip also masks an NVN2 section's key bytes (Pokopia's driver rewrites control +0x20..+0x27 at run time).
  • DM_NVN_SHDUMP keeps a whole NVN2 control section.
  • Launcher text settings, nn::oe::GetServerEnvironmentType, the Switch 2 streamplay and vibration player calls main did not force yet, and Info.plist Bonjour entries for a profile with bonjour_service.

Tested: Pokopia 2.0.1 built with pokopia-native on this branch, played from the language screen to the starting cave at 60 fps with no red lines. Other games were not rebuilt on this branch; everything new is behind a profile key or DM_COOP.

@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers mac The Mac front end and app (dm/mac, front_mac.m) tools Tools and scripts (dm/tools, scripts) docs Documentation labels Nov 15, 2026
@github-actions github-actions Bot added rewriter The NSO rewriter and per-build patches game: 0400A3A01EE4C000 Pokémon Pokopia labels Nov 16, 2026
seedds and others added 2 commits November 15, 2026 21:51
… the profile's skip range

The pokopia-native tool's Switch 2 patch, re-based on main, keeping only what main lacks:
- pointer look (hle_hid.c, front_mac.m; profile keys look_rate, look_dead, look_cam; launcher Look sensitivity / Invert)
- Link Play, the coop module (hle_coop_*.c): nn::ldn and the game's UDP sockets go to it while DM_COOP is on; its virtual
  sockets sit beside the host's local UDP emulation in hle_net.c (a descriptor the module owns goes to it, every other one to the host's)
- shader_key_skip applies to an NVN2 section's key bytes too (Pokopia's driver rewrites control +0x20..+0x27 at run time: 0x20+0x8)
- DM_NVN_SHDUMP keeps a whole NVN2 control section (the compute thread group lies past the 0x48 key bytes)
- launcher text settings (a room code, an address), nn::oe::GetServerEnvironmentType, the Switch 2 streamplay / vibration player calls main did not force
- pack_app.py: a profile with bonjour_service gets the local network text and the service in Info.plist

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…the patch broke

- dm/games/0400A3A01EE4C000: look_rate / look_dead / look_cam (pointer look), bonjour_service (Link Play's DNS-SD service in Info.plist), patches.py with
  Link Play's observation gates and their BINDING, shader_key_skip 0x20+0x8: the driver rewrites control +0x20..+0x27 of some sections at run time, and 8 of the
  title screen's shaders came back under other keys though their code was in the map. The split's tables re-made with it (99,385 keys: the variants that differed only
  there merge), shader_seen.tsv re-keyed through a split without the skip (8,157 old keys → 6,171; none lost)
- hle_net.c, hle_misc.c: weak stand-ins for the Link Play module's functions, so dm/host/tests, which compile these files alone (t_net_eventfd, t_net_loopback,
  t_system_event), link without it; the module's definitions replace them in the host
- docs_patches.py: the Link Play site tables (k_coop_sites, k_coop_story) classified; docs/agents/game-patches.md regenerated
- docs/env_switches.tsv: the pointer look's DM_LOOK_* rows

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0400A3A01EE4C000 Pokémon Pokopia host The Horizon host: SVCs, services, threads, memory (dm/host) mac The Mac front end and app (dm/mac, front_mac.m) nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers rewriter The NSO rewriter and per-build patches tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants