Skip to content

Launcher: console filter and quick console navigation - #134

Open
finger563 wants to merge 3 commits into
mainfrom
feat/console-filter
Open

finger563 wants to merge 3 commits into
mainfrom
feat/console-filter

Conversation

@finger563

@finger563 finger563 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #133: the console banner in the launcher's header is now interactive.

  • Jump between consoles: Left / Right on the game list go to the previous / next console's first game.
  • Filter to one console: tapping the console in the header, or pressing X, opens a console picker. It lists "All consoles" plus every console on the card with its number of games. Up / Down choose, A picks, and B or a tap beside the list closes it.
  • While filtered: the list shows only that console's games, the console in the header is outlined, and Left / Right move the filter to the next console. Launching a game the filter hides (for example with emulink launch) shows all consoles again. The filter stays across games but not across a reboot.
  • USB link (protocol 3):
    • CONSOLE_FILTER (emulink filter <console|all>), with the current filter in status;
    • emulink screenshot with no game running now returns the launcher's screen, drawn with lv_snapshot into a copy. CONFIG_LV_USE_SNAPSHOT is now enabled.

Graphics: I checked the launcher with every console filtered (screenshots below) and fixed what I found:

  • A short filtered list wrapped round and showed its games twice, so the roller no longer wraps while filtered.
  • The Game Gear badge was nearly invisible on the dark header; its color is lighter now.

No console has SD card art (boxart/consoles/<key>.jpg) on this card, so these are all the firmware's badges.

Tested on the box: picker by X / Down / A, Left / Right stepping, filters for all 9 consoles, a launch that lifts the filter, and the filter kept across a game.

Screenshots (emulink screenshot of the launcher)

All consoles Console picker (X) Picked: Game Boy only Right: on to the next console

The last one was taken with all consoles showing: Right jumped from a Game Boy game to the first Game Boy Color game.

Each console filtered (emulink filter <key>; the badges are the firmware's own, since no console art is on the card):

NES Game Boy Game Boy Color
Master System Game Gear Genesis
MSX PC PICO-8

🤖 Generated with Claude Code

https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY

- Left / right on the game list jump to the previous / next console.
- The console in the header opens a console picker (tap it, or X): all
  consoles, or only one console's games. The console is outlined while
  the list is filtered, and left / right then move the filter. Launching
  a game the filter hides lifts it.
- USB link (protocol 3): CONSOLE_FILTER (emulink filter <console|all>),
  the filter in STATUS, and SCREENSHOT of the launcher's screen when no
  game runs (lv_snapshot, now enabled).
- Graphics: a filtered roller does not wrap (a short list showed twice),
  and the Game Gear badge is lighter (it vanished on the dark header).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
Copilot AI balanced review requested due to automatic review settings November 13, 2026 05:42
@github-actions

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Programmatic launches can leave keypad input controlling games behind the visible console picker, and filtered game lists still wrap upward but not downward.

2 open issues
What changed in this PR

Extends the grouped launcher introduced in #133 with console filtering and quick navigation, plus USB controls for filtering and launcher screenshots.

Changes:

  • Adds a console picker, Left/Right console navigation, and filter indicators.
  • Updates USB protocol 3 and emulink to support console filters and launcher screenshots.
  • Uses non-wrapping filtered lists and brightens the Game Gear badge.
File Description
tools/​emulink/​emulink/​control.py Adds the console-filter API and documents launcher captures.
tools/​emulink/​emulink/​cli.py Adds the filter command and updates screenshot help.
sdkconfig.defaults Enables LVGL snapshots for launcher captures.
README.md Documents console navigation and filtering.
main/​remote_control.hpp Adds protocol 3 filtering, filter status, and launcher captures.
components/​rom_info/​src/​rom_info.cpp Lightens the Game Gear badge color.
components/​gui/​src/​gui.cpp Implements filtering, picker controls, console navigation, and snapshots.
components/​gui/​include/​gui.hpp Declares filter and snapshot APIs, picker state, and X-button handling.

Review effort: Balanced

lv_roller_set_options(ui_roms, options.c_str(), LV_ROLLER_MODE_INFINITE);
// (one console's games can be too few to fill an infinite roller, which
// then shows them twice)
lv_roller_set_options(ui_roms, options.c_str(), filter_ >= 0 ? LV_ROLLER_MODE_NORMAL : LV_ROLLER_MODE_INFINITE);
roller_row_ = row;
lv_roller_set_selected(ui_roms, row, LV_ANIM_OFF);
on_rom_focused(i);
return true;
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

ESP-IDF Size Report for 'Esp Box Emu'

Metric Base PR Delta
FLASH 4,215,556 bytes (67.00%) 4,220,756 bytes (67.09%) 🔺 +5,200 bytes (+0.09%)
DRAM 170,565 bytes (49.91%) 170,565 bytes (49.91%) 0 bytes (0.00%)
IRAM 0 bytes 0 bytes 0 bytes
RAM (DRAM+IRAM) 170,565 bytes 170,565 bytes 0 bytes (0.00%)

FLASH uses app .bin size or json2 flash sum. RAM sums DRAM+IRAM via idf_size. Percentages shown when totals are available.
DRAM/IRAM usage does not include memory used by the heap allocator at runtime.
This report was generated by esp-idf-size-delta.

finger563 and others added 2 commits November 13, 2026 09:00
esp_tinyusb 3.0.1 (TinyUSB 0.21.0~6, the DWC2 SETUP-DMA erratum
workaround) corrupts the PSRAM heap on esp-box-emu while a Genesis game
runs: the link task's next allocation hits a tlsf assert or an MMU entry
fault. With 3.0.0 the same firmware is fine (checked on the box with the
same commit built both ways). A fresh build resolves '>=3.0.0' to 3.0.1,
so CI would have shipped it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
The heap corruption seen with Sonic 2 on the box turned out to be
intermittent: the same builds that failed also pass repeated trials, so
the runs that blamed esp_tinyusb 3.0.1 were not evidence of a cause. The
corruption is tracked separately; no pin until it is understood.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
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.

2 participants