Skip to content

feat(games): add Let’s Go Pikachu Mac profile and offline BLE startup - #573

Closed
dmuiX wants to merge 2 commits into
seedds:mainfrom
dmuiX:feat/lets-go-pikachu-mac-profile
Closed

dmuiX wants to merge 2 commits into
seedds:mainfrom
dmuiX:feat/lets-go-pikachu-mac-profile

Conversation

@dmuiX

@dmuiX dmuiX commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Add Pokémon: Let's Go, Pikachu! 1.0.2 (010003F003A34000, SDK 5.4.151), tested on Mac only.

dm/games/010003F003A34000/  profile, tables, notes, smoke/benchmark routes, validation record
dm/host/hle_offline.c       offline BLE initialization, idle events, empty discovery
dm/host/tests/t_ble.c       actual SDK-hook registration and idle-discovery checks

Startup aborts while initializing BLE through the unimplemented Horizon service bt (main+0x1139d4 -> sdk+0x250230 -> svcBreak). The hooks allow initialization with no peripherals; they do not implement Bluetooth pairing, GO transfers or broad IPC-success stubs. Handheld mode is required with the current host controller implementation and is confined to this profile. The tested setup works in handheld mode; docked play with a single Joy-Con is not implemented in nxnative. No controller mapping or shader-chain changes.

Credits: @futurist-raghav's #36 supplied the same-build profile and BLE approach; @s7ymwkptc4-a11y's #224 supplied additional iPhone findings. The audio/movie/time fixes from #36 are already upstream in e61b142 and are not duplicated. Related to #224, not a claim to resolve it. No runtime shader binaries, alternate-key fallback or global handheld override is imported.

Game notes record the requirements, routes, prior work and open items. The BLE mechanism is documented in docs/reference/services.md with an updated symptom index.

Checked

  • After removing the optional no-input menu benchmark (the upstream route test requires nonempty inputs), all five CI jobs were rerun locally and passed: host/CPU gfx, sanitizers (ASan/UBSan/TSan), tool tests (82 files), build checks (three Mac hosts, every gfx target, iOS source compilation), and the synthetic unsigned iOS app build. Commands follow .github/workflows/tests.yml; local Python is 3.15.2 versus CI's 3.14, with Xcode 27.1 on both. Upstream tests are unchanged. This is local evidence; GitHub CI must rerun on this push.

  • Apple M1 Pro, macOS 27.2, Xcode 27.1. User gameplay, audio and paired Joy-Con input tested before the rebase. Automated startup and a saved-game idle scene tested after the rebase onto upstream beea17cfdbd8.

  • python3 -m unittest discover -s dm/tools/tests: 572 tests, OK (16 skipped, 2 expected failures).

  • make -C dm/host/tests GAME=010003F003A34000 run: passed, including the new BLE hook test. It checks ten unique real SDK registrations, five event bindings and empty lists that leave caller buffers untouched. It does not emulate the complete BLE IPC protocol.

  • make -C dm/gfx/tests GAME=010003F003A34000 run: passed on Metal. The first invocation timed out during compilation; a subsequent complete run exited 0.

  • python3 dm/tools/tests/test_docs.py: 11 tests passed after the final documentation changes.

  • Shader/interface check: 11,160/11,160 shaders on both revisions, no newly failing shaders, no changed MSL and no new/known interface errors. The translation chain is unchanged.

  • A separate full regress.py baseline --rev worktree --record validates the repository profile, not a derived profile: two 90-second runs, both frame 2685, 30 fps, 1334 MB peak footprint, no red lines; validated.tsv is generated by the harness.

  • git diff --check passed. The first 4.8 GB Mac app was packaged before the rebase. It has since been rebuilt locally from upstream beea17c plus this profile/BLE change and the separate cursor change in fix(mac): hide cursor during keyboard and controller gameplay #584, with matching shader chain fda42ce035db; its signature was verified and the app save checksum was unchanged. This combined app run is additional evidence, not an isolated test of this PR alone.

  • Follow-up windowed Mac app log on the rebuilt app: 15,600 frames reached, no [RED], CRASH or Break# lines. Latest two 300-frame windows: frame p50 33.55/33.58 ms, p95 38.09/36.75 ms, GPU p50 4.71/6.21 ms. These are live-log samples, not another fixed-route benchmark. The game explicitly sets present interval 1 → 2 on a 60 Hz tick (native 30 fps); this profile adds no FPS cap and no 60-fps mod.

  • The five CI-equivalent jobs were also rerun locally on the independent cursor-only branch for fix(mac): hide cursor during keyboard and controller gameplay #584: all passed after rerunning the unchanged host audio test with the game closed; tool tests include its new cursor test (83 files). Those cursor-branch results do not replace the 82-file/profile-branch results above or establish iOS gameplay.

Full regression report

regress.py check --baseline origin/main --games 010003F003A34000 --runs 2 on upstream beea17cfdbd8 versus the candidate worktree, with pipeline prebuild:

game status shaders (base → candidate) newly failing changed MSL interface (new / known) boot fps frame p99 ms peak MB new RED
Pokémon: Let's Go, Pikachu! 1.0.2 CHANGED 11160/11160 → 11160/11160 0 0 0 / 0 ok none → 30.0 none → 42.71 none → 1335 0
  • CHANGED explained: one [RED] line kind removed. Both upstream runs exit 42 before the first frame on the unsupported Bluetooth service; both candidate runs succeed (frames 2683/2685, first frame 0.5 s). This demonstrates the startup fix, not a performance improvement over a running baseline.
  • Prebuild: 4,442 pipelines, zero failures. Baseline 69.6/71.4 s; candidate 66.8/66.7 s. No NEW-FAIL or REGRESSION status.
  • The same external profile was supplied to both revisions because upstream does not contain this title's profile. The separate repository-profile validation above addresses the harness rule that derived profiles cannot produce repository validation records.
  • Scope: this game is the locally available game known to import the new BLE symbols. regress.py impact origin/main..HEAD reports four existing manifest-covered games unaffected, none positively affected, and 95 profiles unknown due to absent usage manifests. Other games are unvalidated; this is not a cross-game compatibility claim.

Benchmarks

scripts/bench.py, two runs each, 30 fps target, fixed warmup/measurement windows and save copies:

route window fps frame p50 frame p99 range GPU p50 range RED
saved-game-idle, local save on outdoor path 65–90 s 30 33.33 ms 35.83–35.99 ms 5.58–5.73 ms 0

The gameplay window has two frames over 50 ms per run (maximum 66.2/73.63 ms). The player's save is not included: the second route is documented as dependent on a local scene, not a universally reproducible fixture.

Execution detail: runs were serialized, windowless and silent. Both harnesses force DM_WINDOW=1 and have no option to unset it, so local shell launchers outside the repository invoke the generated, unmodified hosts via /usr/bin/env -u DM_WINDOW; bench.py uses its supported host= variant. This intentionally differs from the default windowed run: these are offscreen frame measurements, not display/input-latency measurements. Raw benchmark screenshots and logs remain local. The gallery image is a separate user-supplied screenshot from the Mac app showing the trainer and Pikachu, resized without cropping. An initial benchmark used a stale c1 table; its results were discarded and both reported runs were repeated with the matching generated profile tables.

Still unverified / open

  • iOS is untested locally. The iPhone success in Pokémon: Let's Go, Pikachu! boots and plays on iPhone: patches and findings #224 is its author's build, not this change. No full-game completion claim.
  • GO settings still abort on another unsupported BLE path. Pairing/transfers are unsupported; graceful menu failure remains open.
  • Intermittent right Joy-Con input latency improved after reconnecting; cause remains unproven.
  • Windowless screenshots have unused blue canvas around the 1280×720 game region; presentation sizing is not validated by these measurements.

Docs

  • Game findings in the profile README; general BLE mechanism in docs/reference/services.md; docs_symptoms.py run.
  • Screenshot and gallery row added; docs_gallery.py run. IPA-size note left empty because no IPA was measured.
  • docs_patches.py regenerated the profile index.
  • No game files, save files, keys, shader binaries or dumps in the change or attachments. Shader tables contain metadata only; c1/extent tables stay ignored.
  • Shader-chain tools did not change; no chain-header regeneration is needed.

Most of the diff is generated shader metadata; no additional platform or front end is added. Please review the narrow offline-BLE scope and remaining peripheral limitations.

@dmuiX
dmuiX marked this pull request as draft October 28, 2026 19:10
@dmuiX
dmuiX marked this pull request as ready for review October 28, 2026 20:16
@dmuiX
dmuiX force-pushed the feat/lets-go-pikachu-mac-profile branch 2 times, most recently from 6cdc7a2 to 8dff446 Compare October 28, 2026 21:42
@dmuiX
dmuiX force-pushed the feat/lets-go-pikachu-mac-profile branch 2 times, most recently from bcc4ab8 to b260355 Compare October 29, 2026 00:11
Allow 1.0.2 to start without Horizon Bluetooth services using offline BLE hooks. Add the game profile, shader metadata, focused hook tests, Mac routes, validation record and documented limitations.

Validated with all five CI jobs locally, Metal graphics tests, shader/interface checks, full startup comparisons and saved-game benchmarks. iOS gameplay remains unverified; GO pairing is unsupported.
@dmuiX
dmuiX force-pushed the feat/lets-go-pikachu-mac-profile branch from b260355 to cbba764 Compare October 29, 2026 00:14
@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) docs Documentation game: 010003F003A34000 A game profile new game Adds a game profile that main does not have yet labels Nov 3, 2026
@seedds

seedds commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Thanks, @dmuiX, for tracing the BLE startup crash and testing the Mac port. Main now has the same Let’s Go, Pikachu! 1.0.2 build and handles offline BLE initialization. I checked the registered build and host hooks. The main game note records reaching the playable bedroom and writing a save on Mac, plus building the unsigned IPA. Save reload, iPhone gameplay and Pokémon GO connectivity are still open. I’m closing this duplicate profile in favor of the main profile.

@seedds seedds closed this Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 010003F003A34000 A game profile host The Horizon host: SVCs, services, threads, memory (dm/host) new game Adds a game profile that main does not have yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants