Skip to content

Pokémon Violet: profile, Bluetooth LE takeover, ConservativeRasterDilate stub - #269

Open
jthrilly wants to merge 1 commit into
seedds:mainfrom
jthrilly:pokemon-violet
Open

jthrilly wants to merge 1 commit into
seedds:mainfrom
jthrilly:pokemon-violet

Conversation

@jthrilly

Copy link
Copy Markdown
Contributor

Brings up Pokémon Violet (01008F6008C5E000, update 4.0.0, SDK 13.3.13, Game Freak's Trinity engine on NVN, the same engine as Pokémon Legends: Z-A) on the Mac: it boots through the language select, character creation, the whole opening and into play, the player's room and the house's ground floor, at a steady 30 fps (the game's own cap) with one red line left (image atomics on a block-linear texture, once per run in the opening, no visible fault so far). It joins the games gallery with a Mac screenshot (the house's ground floor) and the IPA size (10.3 GB); the IPA is built but not yet played on the iPhone, which the note keeps open. The game note is dm/games/01008F6008C5E000/README.md. Started from the provisional profile the NSP script wrote from its survey; the Sword profile does not fit (Sword takes a heap and has no virtual address memory, Violet has a 16 MB system resource and never sets a heap).

Two host changes are general; each has its entry in docs/reference (Symptom, Cause, Fix, Found on) and a line in the symptom index.

  • Bluetooth LE events bound without a Bluetooth service (dm/host/hle_bluetooth.c, docs/reference/services.md): the game initializes BLE for its Pokémon GO link in nnMain (InitializeBle, then the five AcquireBle…Event calls, no result checked) and aborted in InitializeBluetoothUserInterface after [RED] sf: the game connects to service bt itself. The host now answers InitializeBle as a no-op and binds the five events to events that never fire. The GO link's other 30 nn::bluetooth imports (scan, connect, GATT) stay unhooked; they are reached from that menu only.
  • nvnCommandBufferSetConservativeRasterDilate as a quiet stub (dm/gfx/nvn/hle_nvn.c, docs/reference/nvn-objects.md): the game sets the dilation beside SetConservativeRasterEnable, which the host already ignores (Metal has no conservative rasterization); the setter was a red stub.

The profile's cuts and keys (all explained in the note, with the probes that found them):

  • Three cuts for the StandardAllocator::Initialize abort in nninitStartup, as Pokémon Legends: Z-A's on this game's builds: the allocator's 12 GB address space to 4 GB (patches.py, main 709bfd66…), and on the SDK 13.3.13 sdk build (dm/tools/sdk_patches.py, bb560bdf…) the 1 GB node area to 62 MB and, new on this SDK build, its 1 GB alignment of regions of 1 GB and more to 32 MB: at 1 GB alignment, 62 MB then 4 GB did not fit the 4.375 GB alias region (AllocateAddressRegion returned 0x1803; found with DM_PROBE=sdk:37c860,sdk:37c8d8). The three are recorded in memory.md's Found-on lists.
  • The 5 GB guest layout with mem_map_limit on (nninitStartup allocates and frees all it can, as Z-A), depth_mode zero (the game sets the near = 0 depth mode at start, for the pipeline bases made before it runs), pad_layout full.

Checked on this branch, rebased on current main (82ab25b): the Mac app built by the NSP script from it (35,937 shaders under chain 8393d85a4eae) boots to its first frame 76 s after launch (the first launch after a build; later launches about 2 s, the cause of the first one's wait is open in the note) and loads the save from the title into the house at 30 fps (frame time p50 33.4 ms) with only the red line above; the IPA built the same way is 10.3 GB and not sideloaded. All 31 tool test files pass as the CI runs them; make -C dm/gfx/tests GAME=01008F6008C5E000 run passes (295 PASS, 0 FAIL); make -C dm/host/tests GAME=01008F6008C5E000 run passes; the iOS compile check passes (134 files, hle_bluetooth.c among them); dm/tools/tests/test_docs.py passes with the regenerated symptom index (404 symptoms).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NqZFNznnQecNauXKHJxA9k

Copilot AI balanced review requested due to automatic review settings October 26, 2026 07:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Build-specific executable patches and shared Bluetooth takeovers warrant final human review of runtime behavior despite the reported Mac validation.

No open issues 🎉

What changed in this PR

Adds Pokémon Violet 4.0.0 support to the Apple-platform runtime, with reported Mac gameplay at 30 fps through the opening and house interiors. iPhone gameplay remains untested.

Changes:

  • Adds the game profile, shader metadata, and build-gated allocator patches.
  • Adds Bluetooth LE initialization/event takeovers and a quiet conservative-raster dilation stub.
  • Updates the games gallery and documents fixes, testing results, and remaining limitations.
File Description
README.md Adds Violet to the games gallery.
docs/​reference/​services.md Documents Bluetooth LE initialization and event handling.
docs/​reference/​nvn-objects.md Documents the conservative-raster dilation stub.
docs/​reference/​memory.md Records Violet’s allocator cuts and alignment requirements.
docs/​agents/​symptoms.md Indexes the Bluetooth startup abort.
dm/​tools/​sdk_patches.py Adds build-gated SDK node-area and alignment cuts.
dm/​host/​hle_bluetooth.c Supplies BLE initialization and five non-signaling events.
dm/​gfx/​nvn/​hle_nvn.c Adds the quiet dilation setter stub.
dm/​games/​README.md Registers Violet’s version, SDK, and engine.
dm/​games/​01008F6008C5E000/​shader_map.tsv.conflicts.tsv Adds an empty shader-conflict evidence table.
dm/​games/​01008F6008C5E000/​shader_facts.tsv Supplies compute-shader workgroup and shared-memory facts.
dm/​games/​01008F6008C5E000/​README.md Documents configuration, gameplay routes, and open issues.
dm/​games/​01008F6008C5E000/​pso_manifest.tsv Adds an empty pipeline-prewarm seed list.
dm/​games/​01008F6008C5E000/​patches.py Limits the registered main build’s allocator to 4 GB.
dm/​games/​01008F6008C5E000/​game.tsv Defines packaging, memory, controls, and rendering settings.
dm/​games/​01008F6008C5E000/​bf_want.tsv Adds an empty generated shader-input table.
AGENTS.md Updates the playable-game count to 68.

Review effort: Balanced

jthrilly pushed a commit to jthrilly/nxnative that referenced this pull request Oct 26, 2026
Conflict in README.md game grid: kept Yoshi's Crafted World from fork main and Pokémon Violet from the PR, reflowed rows of three.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01GGZkaRy1PpqPQwmeFnGzBR
@jthrilly
jthrilly force-pushed the pokemon-violet branch 11 times, most recently from 29f163d to e95d183 Compare October 27, 2026 19:39
@jthrilly
jthrilly force-pushed the pokemon-violet branch 8 times, most recently from 9490d01 to 4862a88 Compare October 28, 2026 15:18
@jthrilly

Copy link
Copy Markdown
Contributor Author

Related: #415 also adds Pokémon Violet (3.0.1, with a Mac-only 20 GB guest block). There's a comparison there. This PR targets 4.0.0, fits the standard 5 GB layout, and has been played through the opening. The one failing check (test_env_switches, DM_UPSCALE) came from main at the time, and it passes now that the branch is rebased onto current main.


Generated by Claude Code

@jthrilly
jthrilly force-pushed the pokemon-violet branch 2 times, most recently from ce29883 to 76b2a17 Compare October 28, 2026 17:40
@jthrilly
jthrilly force-pushed the pokemon-violet branch 14 times, most recently from c9ceef4 to d94328f Compare October 30, 2026 00:38
…rDilate stub

Profile 01008F6008C5E000 (update 4.0.0, SDK 13.3.13, Game Freak's Trinity
engine on NVN) with its note, its games-table row and its gallery entry
(AGENTS.md's count to sixty-eight): plays on the Mac through the language
select, character creation, the opening and into the player's room and the
house's ground floor at a steady 30 fps; one red line left (image atomics on
a block-linear texture, no visible fault so far). The IPA (10.3 GB) is built
but not yet played on the iPhone, which the note keeps open.

- patches.py / sdk_patches.py: three cuts for the StandardAllocator::Initialize
  abort in nninitStartup: the allocator's 12 GB address space to 4 GB on main,
  and on the SDK 13.3.13 sdk build the 1 GB node area to 62 MB and the 1 GB
  alignment of regions of 1 GB and more to 32 MB; with mem_map_limit on, as
  Pokémon Legends: Z-A.
- hle_bluetooth.c (general): nn::bluetooth::InitializeBle is a no-op and the
  five AcquireBle…Event calls bind events that never fire; the game initializes
  BLE for its Pokémon GO link in nnMain and aborted without the bt / btm
  services.
- hle_nvn.c: nvnCommandBufferSetConservativeRasterDilate is a quiet stub
  (Metal has no conservative rasterization; SetConservativeRasterEnable is
  already ignored).
- game.tsv: depth_mode zero, the near = 0 depth mode the game sets at start,
  for the pipeline bases made before it runs.

Docs: the game note (what it needs, the Mac route into the house, the 70 s
first launch after a build, what is open), the games-table row, the three
cuts in memory.md's Found-on lists, services.md (Bluetooth LE events bound
without a Bluetooth service), nvn-objects.md (the red stubs), the symptom
index, the README gallery cell with a Mac screenshot.
@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) rewriter The NSO rewriter and per-build patches tools Tools and scripts (dm/tools, scripts) docs Documentation game: 01008F6008C5E000 Pokémon Violet labels Nov 3, 2026
jthrilly pushed a commit to jthrilly/nxnative that referenced this pull request Nov 9, 2026
Resolved dm/tools/sdk_patches.py: upstream removed the remaining per-build
SDK rows in favour of the SDK-wide rules; the fork keeps only the Pokemon
Violet 4.0.0 row (bb560bdf, from PR seedds#269), which has not been run with the
rules' 2 MB alignment. docs/agents/game-patches.md regenerated with
docs_patches.py.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01ThnUkJcQeXJALXUB4nYYEK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 01008F6008C5E000 Pokémon Violet host The Horizon host: SVCs, services, threads, memory (dm/host) nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) 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