Skip to content

feat: seven more colour themes and four retro Now Playing faces - #73

Merged
BasilSkyWalk merged 2 commits into
BasilSkyWalk:mainfrom
hva314:feat/more-themes
Nov 11, 2026
Merged

BasilSkyWalk merged 2 commits into
BasilSkyWalk:mainfrom
hva314:feat/more-themes

Conversation

@hva314

@hva314 hva314 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

The player had two colour themes and one Now Playing layout. This adds seven colour themes and four retro Now Playing "faces" in the spirit of the stock Echo Mini screen. All the artwork is original and drawn in code, with no bitmaps. Dark, Light and the Standard Now Playing look exactly as before.

This branch is based on main and is independent of #70 (playback speed). The two branches touch some of the same files, so whichever merges second needs a small rebase (see Settings file below).

Colour themes

Settings → Display → Theme now has nine themes:

The Home screen cycling through the nine themes

Every theme on Home, an album list and the Standard Now Playing screen

  • Dark and Light are unchanged.
  • Fjord: Nordic slate with a frosted ice-blue bar and dark text.
  • Dusk: deep indigo with a magenta-to-violet header and a cyan bar.
  • Neon: black with a hot-pink outline on the selected row and a magenta glow in the header.
  • Phosphor: a green terminal; the selected row is an inverse block.
  • Paper: warm cream and sepia ink, with a kraft header and an oxblood bar.
  • Olive: a mid-tone, reflective handheld-LCD look with a dark block for the selected row.
  • High contrast: black and white with a yellow block and a grey header.

Settings → Display hides the rows that don't apply to the current theme:

  • Accent color shows only on Dark and Light.
  • Highlight shows only on themes with a gradient bar: Dark, Light, Fjord, Dusk and Paper.

Switching themes keeps the stored accent and highlight for when you come back. Cover Flow and the Home cover panel stay dark on every theme.

Both settings are under Settings → Display:

The Theme list and the Now Playing face list in Settings → Display

Now Playing faces

Settings → Display → Now Playing offers four faces besides Standard, which stays the default:

Cassette VU meters
Cassette face playing VU meters face playing
Turntable LCD deck
Turntable face playing LCD deck face playing

These GIFs were rendered by the firmware's own drawing code through the test HAL, one frame per 100 ms of playback.

  • Cassette: a tape shell with turning hubs. The tape packs move from reel to reel as the track plays, and the tape across the head opening is the progress bar. Portrait adds a J-card.
  • VU meters: two lit dials in landscape and one stereo dial in portrait. The needles are decorative: the firmware has no level data.
  • Turntable: the album cover is the record label, or a plain red label without a cover. A glint turns at 33⅓ rpm, and the tonearm moves from the outer groove to the run-out with the track.
  • LCD deck: ghosted 7-segment time digits, a dot-matrix title and a decorative spectrum. The legends (SHUFFLE, ALBUM, REPEAT, 1, ALL, TRACK) stay English in every language, like text printed on LCD glass.

Every face also has a portrait layout:

Cassette face playing in portrait

All four faces in landscape and portrait The four faces in landscape and portrait

Common to every face:

  • Each face has its own fixed palette and ignores Theme, Accent and Highlight.
  • The header and status bar take the face's colours while it shows. They switch at the midpoint of the slide in and out.
  • The seek target, the volume, the skip, play and pause badge and the current timed lyric line all show on the face's feedback line.
  • With nothing playing, Standard's message shows.
  • Faces move only while a track plays, on 100 ms ticks of the position. A paused face doesn't change, so an idle redraw sends no rows and the player keeps sleeping (WFI).

How it works

docs/architecture.md has the full description, under "Now Playing faces" and the High RAM map.

  • Themes (src/app/default_theme.c, src/ui/theme.c, src/ui/list_view.c):
    • ThemeChoice {theme, accent, flat} replaces the light flag, and default_theme_stage keeps Cover Flow dark.
    • ThemeSelection adds an outline style (Neon) to the gradient and flat bars. Phosphor, Olive and High contrast use flat blocks, and theme_selected_text picks the selected row's text colour.
    • PALETTES became a resident table to save code-window space.
    • Tests check every palette against each colour role's contrast floor, the gradient channel steps, and redraws on a theme change; they also check that Dark and Light keep every colour.
  • Faces live in a new library, src/np_faces (echo_np_faces). It depends on core, gfx, ui, playback and settings, never on app, so PlayerStatus moved to playback/player_status.h.
    • Interface: now_playing_screen.c builds a NowPlayingFrame for each strip and calls the face's draw. A face is a NowPlayingFaces {magic, draw, chrome[]} table.
    • Standard's path: Standard keeps its own code. The only change is one branch at the top of draw().
    • Drawing: the shared integer primitives are in face_shapes.c: anti-aliased spans, rings, rounded rectangles, trapezoids, spokes from a 65-entry quarter-sine table, leaning 7-segment digits and a lattice. Text helpers are in face_text.c. There is no float and no .bss.
    • Pacing: marquee_frame_request(wait_ms) asks for the next frame at the next 100 ms boundary of the position, only while the track plays.
  • Device placement: the code window couldn't hold four faces.
    • The faces are a .np_faces section of the main ELF, linked under LTO into the free top of the overlay RAM (0x0308BA00–0x0308EFFF, 13,824 B). The image stores them at offset 0x23CA00, behind an ENPF header.
    • hal_system_load_faces() loads them on the first face frame and re-checks the header on every call. If the load fails, Now Playing draws Standard.
    • A rescan or USB overlay, or the High RAM test, marks the faces stale first.
  • Build guards:
    • make_image.py fails the build if the main code window branches into or loads a pointer from the face range. It decodes Thumb only at $t mapping symbols and checks literal words in $d runs.
    • The linker script asserts the section's addresses, and the link requires NOW_PLAYING_FACES to be defined.
    • tools/check_np_faces_sections.py (ctest np_faces_sections) fails if face code or data is missing its section marker.
    • size_report.py prints np_faces and .high_ram lines.
  • Strings: 11 new strings (the seven theme names, and Cassette, VU meters, Turntable and LCD deck), translated in all 17 languages; the face names are checked to be at most 88 px wide. The packs are rebuilt with tools/lang_pack.py. The Now Playing row reuses the existing "Now Playing" label.

Settings file

  • Theme: stays in OPTION_THEME, with values 0 to 8. Firmware that knows only Dark and Light rejects a file with a value of 2 or more and starts from defaults, so going back after choosing a new theme resets all settings. This is listed in docs/known-issues.md.
  • Face: takes slot 21 (OPTION_NOW_PLAYING_FACE, byte 41). There's no version bump, and an older firmware ignores the slot. OPTION_COUNTS allows 8 values, so a newer face reads as Standard instead of rejecting the file.
  • Overlap with feat: books and podcasts play at 0.75x to 2x #70: feat: books and podcasts play at 0.75x to 2x #70 also adds two options at the end of SettingOption (slots 21 and 22), and both PRs edit the Settings rows, the string catalogue, the packs and the docs. If feat: books and podcasts play at 0.75x to 2x #70 lands first, I'll rebase this PR, and the face moves to slot 23.

Size

Limit main This PR
Code window free, release preset 7,372 B 6,192 B
Code window free, device preset 5,448 B 4,256 B
Loaded total free, release / device 16,760 / 14,748 B 15,532 / 13,508 B
Resident tables free 776 B 460 B
.np_faces (new region) – 12,948 of 13,824 B
.high_ram free (region 86,016 → 72,192 B) 44,964 B 31,140 B
Static RAM (target_audit) – 130,705 of 131,072 B

The face code isn't in the code window; it loads into RAM that was free.

Tests

New tests:

  • tests/np_faces/, covering the primitives (including golden hashes), text, per-face behaviour and the face-wide rules:
    • every content pixel is painted and the header rows are never touched;
    • a 34-row strip render matches a full render;
    • paused frames are byte-identical;
    • each face animates only inside its moving band;
    • the reels and glint turn in the right direction;
    • text contrast is at least 4.5:1, measured from rendered pixels.
  • tests/ui/test_theme.c and tests/device/test_np_faces_gate.c.

Extended tests: test_app, test_settings, test_settings_screens, test_list_view, test_equalizer_screen, test_marquee, test_spoken_word (frame pacing), and the make_image and size_report tool tests.

Standard and the existing themes:

  • the_standard_now_playing_keeps_its_pixels fingerprints Standard in 3 layouts and 7 states.
  • I also captured Home, Albums and Now Playing in Dark and Light from main and from this branch in the headless simulator, with the same keys. The screenshots are byte-identical.

ctest --preset dev: 174 of 176 pass, built with clang 21, clang-format 21, arm-none-eabi-gcc 14.2.1 and Python 3.12. The two failures also fail on main here, as in #70:

  • format: the same 6 warnings in the same 6 files as on main. The changed lines are clean.
  • sort_fold_up_to_date: Python 3.12's unicodedata.

device_image_passes_the_updater_check, target_audit, no_comments, np_faces_sections, language_packs_up_to_date and tools_unit_tests pass. The device and release images build.

Not yet tested on a player

ROADMAP.md marks both features as sim, and docs/known-issues.md lists the limits. To check on hardware:

  • Every theme on the panel: readability in daylight, especially Olive and Paper
  • The faces after boot: the first face frame loads them from internal storage
  • The faces after a rescan and after a USB session; they should come back, never crash
  • Frame time while a face animates (VU is the busiest, at about 40 rows per tick)
  • Battery while a face animates (Diagnostics → Power s%), and that a paused face lets the player sleep

Try it

cmake --preset dev && cmake --build --preset dev && ctest --preset dev
./build/dev/platform/sim/echo_sim --card /path/to/music --system-dir build/system
cmake --preset release && cmake --build --preset release

The release image is build/release/HIFIEC90.IMG. Choose a face in Settings → Display → Now Playing, then play a track.

The version number and release notes are unchanged, left for a release commit.

hva314 and others added 2 commits November 10, 2026 10:23
The player had two colour themes and one Now Playing layout. Settings,
Display, Theme now offers nine themes, and Settings, Display, Now
Playing adds Cassette, VU meters, Turntable and LCD deck faces in the
spirit of the stock Echo Mini screen, with original drawings. Standard
stays the default and draws exactly as before; a test pins its pixels.

Each face has its own fixed palette and dresses the header and status
bar to match. Faces move only while a track plays, on 100 ms ticks of
the position, so a paused face sends no rows and the player keeps
sleeping. The VU needles and LCD spectrum are decorative, since the
firmware has no level data.

The code window has too little room for the faces, so they live in a
.np_faces section loaded from the image into the free top of the
overlay RAM on the first face frame. The loader re-checks the section's
header on every call and draws Standard if it is missing, and a rescan
or USB session marks it stale. The image build fails if main code
reaches into that range, and a source check keeps face code inside its
section. The face choice takes the next free option slot.

Co-Authored-By: Claude <noreply@anthropic.com>
PlayerStatus moved to playback/player_status.h here, so the chapter fields from main move with it. Regenerates the language packs.
@BasilSkyWalk
BasilSkyWalk merged commit a3bae79 into BasilSkyWalk:main Nov 11, 2026
@higormarcello-coder

Copy link
Copy Markdown

For light themes, I suggest that the album art background on the home screen also be light, in keeping with the theme—it looks better that way. Having a light theme with a black album art background on the home screen undermines the theme's overall aesthetic. Still, they all turned out very nicely!

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.

3 participants