Skip to content

Launcher and pause menu on emu-ui (shared with tab5-emu), replacing the SquareLine UI - #141

Merged
finger563 merged 7 commits into
mainfrom
feat/emu-ui
Nov 20, 2026
Merged

finger563 merged 7 commits into
mainfrom
feat/emu-ui

Conversation

@finger563

@finger563 finger563 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The launcher and pause menu now come from emu-ui, an LVGL component shared with tab5-emu (added as the components/emu-ui submodule). This replaces the SquareLine Studio generated UI: the squareline and generated directories under components/gui and components/menu are deleted (about 33k lines). gui and menu are now thin adapters that supply the games, boxart, settings and save slots, and they keep the haptic API.

Launcher (320x240)

  • The console is a chip in the status bar, with each console's colors and background.
  • The selected game's boxart and title beside the list.
  • A save badge on each game with its save count (emu_ui::count_saves over Cart::save_dir()), recounted when a game exits.
  • X opens a console picker grid (the box's X is polled and forwarded to the launcher).
  • B opens settings: volume, mute, brightness, video, resume last save, haptic, test haptic, Genesis CPU and USB drive.
  • The dpad moves the selection; the list scrolls only once the selection reaches the top or bottom.

Pause menu

  • The paused frame and the slot's screenshot.
  • Resume / save / load / slot / reset / quit, plus the settings.
  • The FPS now shows: the box's LVGL printf has no float support, so emu-ui formats it with snprintf.
  • A long game title scrolls.

Other

  • rom_info: the console color / shape fields are gone.
  • sdkconfig.defaults enables Montserrat 12 / 14 / 16.
  • The README's Squareline lines are replaced.

The matching tab5-emu PR: esp-cpp/tab5-emu#26

From soak testing: emu-ui's pattern tiles are a fixed table rather than a std::map (no heap node per console). The other bugs found are not about the UI and are in a separate PR.

Testing

  • Built and flashed to an ESP32-S3-BOX-3 over emulink (v1.1.0-25-g594f647).
  • Launcher: navigation, console switching, picker, settings and save counts checked on the device.
  • Pause menu: open, resume, quit, and the FPS display checked on the device.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY

finger563 and others added 4 commits November 18, 2026 22:59
The launcher and the pause menu are now emu-ui's (components/emu-ui, a
new submodule shared with tab5-emu) instead of SquareLine exports; gui/
and menu/ keep their APIs and supply the games, the images and the
settings:

- a 24 px status bar (the console chip, the battery), the cover with its
  title, an eight-row list with the console's name over each group, over
  the console's background (an accent, colors and a pattern per console)
- settings on B as one list (with the haptic and Genesis CPU rows), the
  console picker as a grid of tiles (X), button hints along the bottom
- the pause menu: the paused frame, the slot with its screenshot, the
  actions and the settings in one list, over the game's console
- rom_info's ConsoleInfo keeps name, short name and key; the colors and
  the icon are emu-ui's (console_style)
- Montserrat 12 and 16 next to 14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
The Gui counts the save states in Cart::save_dir() (emu_ui::count_saves)
on each reload and each return from a game, rebuilding the list when
the counts changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
@github-actions

Copy link
Copy Markdown

✅Static analysis result - no issues found! ✅

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

ESP-IDF Size Report for 'Esp Box Emu'

Metric Base PR Delta
FLASH 4,220,820 bytes (67.09%) 4,231,728 bytes (67.26%) 🔺 +10,908 bytes (+0.17%)
DRAM 170,421 bytes (49.87%) 170,069 bytes (49.76%) ⬇️ -352 bytes (-0.11%)
IRAM 0 bytes 0 bytes 0 bytes
RAM (DRAM+IRAM) 170,421 bytes 170,069 bytes ⬇️ -352 bytes (-0.11%)

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 3 commits November 19, 2026 17:40
…i tile table, emulink fps

- nofrendo registered its pads again at every NES start and wrote past its
  32-entry input table on the 17th game since boot (a crash on the Tab5)
- Dark Forces' fallback allocations asked for MALLOC_CAP_DEFAULT (internal
  RAM first), not the PSRAM heap its comments describe
- emu-ui: a fixed pattern tile table instead of a std::map
- emulink: the game's frame rate in the status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
…keys

fmsx feat/start-key:
- Start was fMSX's own menu, which halts emulation. It is now the MSX's F1
  (pause in Konami's games), and Y opens fMSX's menu. Start + select (the
  pause-menu chord) no longer also toggles the on-screen keyboard.
- A frame is an emulated frame, not a drawn one (every other with -skip
  50): muted, MSX games ran at twice their speed, and the fps was per pair
  of frames.
- The on-screen keyboard's F1-F8, Insert, Delete and Stop indexed past
  fMSX's key table; they press the right keys now.

The README describes the MSX controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
The fixes the Tab5's soak tests found that are not about the launcher and
pause menu (nofrendo's input table, Dark Forces' allocator fallback,
emulink's fps status, the MSX controls) go to a separate PR. emu-ui's tile
table stays here: it is part of the new UI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
@finger563
finger563 merged commit 8c0d7cf into main Nov 20, 2026
3 checks passed
@finger563
finger563 deleted the feat/emu-ui branch November 20, 2026 18:54
finger563 added a commit that referenced this pull request Nov 20, 2026
README conflicts: the UI feature bullet and the launcher checklist line
keep this branch's wording, which already covers #141's.

Co-Authored-By: Claude Opus 5.5 <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.

1 participant