Skip to content

direct: a home page and an n64lle Settings page before Play (direct_mode 3) - #13

Merged
TechnicallyComputers merged 1 commit into
mainfrom
feat/direct-home
Sep 27, 2026
Merged

TechnicallyComputers merged 1 commit into
mainfrom
feat/direct-home

Conversation

@TechnicallyComputers

Copy link
Copy Markdown
Member

What

Direct mode opens a home page instead of booting straight in. The page has Play, n64lle Settings, Mods and Quit, and closing the game returns to it. --boot keeps the old behaviour. direct_mode goes to 3, and docs/RELEASES.md calls out that a revision-2 command line now opens the page. No script or test runs Direct mode unattended, so nothing breaks; the only automated call is the packager's --run-core-without---rom parser check.

The settings page follows the Super Nintendo page's layout and helpers. The library opens it from an N64 platform header's n64lle Config.

  • System tab: the options the core declares, in two cards: player-facing, and developer (behind a toggle).
    • Opened for a title, it can edit "All N64 titles" or "this title only".
    • Values layer platform < title < --opt.
    • Stored options the core no longer declares are listed for removal.
  • Gamepads tab: four seat cards, each Auto, Keyboard, a specific gamepad, or None. Configure opens a controller page over a new N64 pad picture (assets/src/pad_n64.svg, drawn in pad_snes.png's flat style).
    • Every input has a chip labelled with the core's own name (A, B, Z, C-Up…); click one, then press the key or pad input.
    • The page also has a stick deadzone (off by default), Reset this seat, and Copy to all seats.
  • Where the page's contents come from: retro-core-runner --describe (runner: --describe prints a core's options and input labels, no ROM needed Retro-Runtime#1), cached per platform in core_description.txt. A runner without describe 1 still plays; the page says what it is missing.

Input: PlaySession reads seats and maps from src/hub/hub_core_settings instead of a hard-coded table.

  • A gamepad plays exactly as before.
  • The keyboard gains TFGH for the right stick. The old table had none, so a keyboard player had no C buttons.
  • The library's play path reads the same files.

Mods:

  • The hub reads n64lle's layout (mods/<origin>/<id>/manifest.toml, selection in <title dir>/mods.toml, written exactly as n64lle writes it) beside psxrecomp's, and writes whichever layout it found.
  • The home page shows what the core logged about mods in the last session.
  • "Enable all" now skips built-in provider packages, as their checkboxes already did.

Files it writes (all under <data dir>/platform/<platform>/)

  • input.ini: seats, maps and deadzone
  • options.ini: option values for every title
  • options/<stem>.ini: one title's overrides
  • core_description.txt: the last --describe

Tests

  • New retro-hub-settings-test (the repo's first ctest). It covers:
    • --describe parsing on real n64lle records, and escapes;
    • seat and option round-trips, and option layering;
    • seat planning (claiming a pad by GUID, Auto order, keyboard fallback);
    • the n64lle mods reader and writer (bare dotted section ids; duplicate ids refuse both);
    • the description cache.
  • ctest 12/12, including the vendored Retro-Runtime tests.
  • By hand, Direct mode on Pokemon Stadium, screenshots at each step:
    • home → Play → quick menu → Close game returns home;
    • a title-scoped renderer change was saved only to that title's file and reached the core (render=software);
    • key capture wrote only seat 1's map;
    • with n64lle feat/core-mods (RetroPortingToolKit/n64lle#47), mods were applied, and a stale package was refused and the refusal shown on the home page.

Not covered

  • Binding from a physical gamepad (only keyboard capture was driven).
  • The library's n64lle Config button was not clicked live: no N64 titles were in a test library.
  • Named controller profiles, which the SNES page has, are not built.
  • Gameplay feel with a real controller.

Merge order

RetroPortingToolKit/Retro-Runtime#1 and RetroPortingToolKit/n64lle#47 first. This PR degrades cleanly without either: no labels without --describe, and mods written but not applied by an older core. It is only fully useful with both.

🤖 Generated with Claude Code

…ode 3)

Direct mode no longer boots straight into the game. It opens the title's home
page -- Play, <core> Settings, Mods, Quit -- and closing the game returns to
it. `--boot` keeps the old behaviour; `direct_mode` goes to 3 and
docs/RELEASES.md calls out that a revision-2 command line now opens the page.

The settings page ("n64lle Settings") is laid out like the Super Nintendo page
and shared with the library, which opens it from an N64 platform header's
"n64lle Config":
- System tab: the core's declared options, player-facing and developer cards,
  with an "all titles / this title only" scope when opened for a title.
  Options layer platform < title < --opt.
- Gamepads tab: four seat cards (Auto / Keyboard / a gamepad / None), each
  opening a controller page over a new N64 pad picture (assets/src/pad_n64.svg)
  with a chip per input, labelled in the core's own names; click and press to
  bind. Stick deadzone, reset / copy per seat.
Everything is built from `retro-core-runner --describe` (Retro-Runtime
feat/describe), cached per platform; a runner without it still plays and the
page says what it lacks.

PlaySession reads the seats and maps (src/hub/hub_core_settings) instead of a
hard-coded table; the defaults reproduce that table, plus TFGH for the right
stick, which left a keyboard with no C buttons. The library's play path reads
the same files.

Mods: the hub reads n64lle's layout (mods/<origin>/<id>/manifest.toml,
selection in <title dir>/mods.toml, written as n64lle writes it) beside
psxrecomp's, and the page writes whichever layout it found. The home page shows
what the core logged about mods in the last session (core.log). "Enable all"
now skips built-in provider packages, as their checkboxes already did.

Tests: retro-hub-settings-test (describe parsing on real n64lle records,
escapes, seats and option round-trips, seat planning, n64lle mods read/write).
Checked by hand in Direct mode on Pokemon Stadium: settings saved per layer and
reached the core (render=software), key capture, mods applied and refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TechnicallyComputers
TechnicallyComputers merged commit d40b829 into main Sep 27, 2026
TechnicallyComputers added a commit that referenced this pull request Sep 27, 2026
…untime overlay) landed on main

CMakeLists.txt: retro-hub gets both hub_title.cpp and retro_overlay. The
Retro-Runtime pin is main's d5146fa. build-local + ctest 15/15; the Pokemon
Stadium title app rebuilt on it (dev runner d5146fa), every kit gate passed,
and it ran from a clean directory.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant