Skip to content

Smart Pro kit fixes and Discord fixes - #486

Draft
tarikbc wants to merge 12 commits into
mainfrom
kit-and-discord-fixes
Draft

tarikbc wants to merge 12 commits into
mainfrom
kit-and-discord-fixes

Conversation

@tarikbc

@tarikbc tarikbc commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Fixes from the Smart Pro kit's first notes and from the Discord, one commit an area.

Smart Pro

  • MENU+VOL is brightness on the Smart Pro (its profile already said so). The chord's state moved out of pixel2.c into src/device/menuvol.h, which pixel2.c and brick.c both use; the Brick keeps MENU and VOL as plain keys. The tutorial's Brightness step works there now.
  • Diatom's Brick port reads the Smart Pro's volume keys, which are on their own node (sppad's pad has none), with MENU held making them brightness, as on the Pixel 2.
  • The tutorial's Music step takes L2 and R2 beside SELECT (as Move takes L1/R1), so every button is asked for. The Controls tab lights and presses the button you press; the row under the cursor lights it otherwise.
  • sppad logs each stick's centre and furthest raw readings when they move on (at most every 5 s), and Download logs packs /tmp/sppad.log.
  • The Hardware Check's Lights walk put GPIO 107 (PD11) low at its end. On the Smart Pro that pin is the controllers' 5 V too (init.d/brick drives it high before sppad), so the buttons died. It now puts the pin back as it found it.
  • Kit notes draft (outside the repo) updated: MENU paths, and L2/R2 in the Music step.

Discord

  • Box Art: thumbnails.libretro.com answers 404 for every file and listing. A refused cover is asked of the GitHub mirror once, and once the mirror serves one, the rest of the run asks only the mirror, so a game still costs one request. The index falls back to the GitHub trees API (master:Named_Boxarts, one request a console). Links are followed for covers and left out of the index; a mirror file never lands over a cover. An index failure now says "refused by the server" or "fetch failed" (no answer), and more than one console passed over is counted.
  • Equalizer: the shelves move to 120 Hz and 7 kHz; Bass is +6, +3, 0, 0, 0 and Treble 0, 0, 0, +3, +6. No dip at 100-120 Hz any more. MP4 logs each curve and its output.
  • MP4 decodes half a second ahead into a ring, written by a thread of its own (src/mp4d/ahead.h); underruns are logged on stderr. The bars and the position count the ring; END waits for it to play out.
  • "What did you plug in?" is asked from MP4's lists and Now Playing too, not only the shelf.
  • Achievement badges: each set's in one pack file with an index (src/rapack.h) instead of one PNG each. Old loose badges migrate set by set at each start and when a set is asked for; a loose file is deleted only after its pack is written, synced, read back and compared, and renamed into place.

Checks
New: check-ahead, check-rapack. Changed: check-tour, check-logpack, check-artrun (libretro down, mirror up, links, refused vs no answer, counted consoles), check-dlq (404 vs no answer), check-eq (Bass and Treble measured on tones), check-badges, check-radl. pcm.c and the Linux device files compile only in CI's devices job; pcm.c was syntax-checked here against stub ALSA headers.

The Smart Pro's profile says DEV_BRIGHT_MENU_VOL and menu_on_release, but
brick.c opened MENU on the press and sent VOL as volume, so the chord and
the tutorial's Brightness step did nothing there. The chord's state and
rules move to src/device/menuvol.h, which pixel2.c and brick.c both use;
on the Brick (F1 and F2) MENU and VOL stay plain keys.
The Brick's port read volume from the gamepad only, where brick-pad puts
the Brick's; the Smart Pro's are on their own node (sppad's pad has none),
so VOL did nothing in a game. The port finds that node and reads it as the
Pixel 2's does, MENU held making the keys brightness.
Music's step takes L2 and R2 beside SELECT, as Move takes L1/R1, so every
button the handheld has is one a step asks for. On the Controls tab a
button pressed presses and lights its key on the drawing while held; the
row under the cursor lights it otherwise.
sppad logs each stick's centre and furthest raw readings when they move
on, at most every 5 s, and Download logs packs /tmp/sppad.log.
On the Smart Pro PD11 is the 5 V of the two controllers as well as the
LEDs; init.d/brick drives it high before sppad. The walk's end drove it
low and the buttons died until a restart. It now restores the state it
found (high stays high, an unexported pin is unexported again).
thumbnails.libretro.com now answers 404 for every cover and listing. A
cover it refuses is asked of raw.githubusercontent.com/libretro-thumbnails
once, until libretro has served one; once the mirror has served one, the
rest of the run asks only the mirror, so a game still costs one request.
A mirror file lands beside the cover and a link's text is followed once,
never kept as a cover. The index falls back to the GitHub trees API for
master:Named_Boxarts, one request a console, links left out.

An index that fails now says whether the server refused it or nothing
answered, and a run that passes over more than one console counts them
instead of naming only the last.
The low shelf moves from 60 Hz to 120 Hz and the high one from 12 kHz to
7 kHz, where a small speaker and earbuds can say them; the 60 Hz shelf
lifted what the speaker cannot play and left a dip at 100-120 Hz under
the 250 Hz peak. Bass is now +6, +3, 0, 0, 0 and Treble 0, 0, 0, +3, +6,
still -6 to +6 a band. check-eq measures both curves on tones. MP4's log
says each curve it is sent, and on which output.
On the Pixel 2 the dmix keeps 43 ms for the card and mp4d wrote 21 ms at
a time, at 408 MHz when idle: a chunk that took longer than what was left
was an underrun, a crackle on a USB DAC. mp4d now decodes into a ring of
half a second (src/mp4d/ahead.h) and a writer thread of its own takes it
to the output a period at a time. Each underrun is said on stderr, at most
once a second with the count. pcm_queued counts the ring, so the position
and the bars follow what is heard; the end of a file waits for the ring to
play out before END; the bars keep 1.37 s. check-ahead runs the ring
against a stand-in output.
Only the shelf asked, so a DAC plugged in while MP4 played stayed
unpowered and unasked. The shelf's two questions move to usb_questions,
which the shelf, MP4's lists and Now Playing call.
One PNG an achievement came to about a hundred thousand files on a card
with every set's, and fsck.exfat took minutes over them after a power cut.
A set's badges now live in Roms/<System>/.cheevos/badges/<set>.pack, a
small file with an index (src/rapack.h). A fetch still lands loose PNGs in
one curl and they go into the pack at once; a card's old loose badges go
in at each start, set by set, and whenever a set's badges are asked for.
A loose file is deleted only after the pack holding it is written, synced,
read back and compared, and renamed into place. Badges are read from the
pack, a notice's out of it into /tmp. check-rapack covers it; check-ahead
and check-rapack get their rows in docs/building.md.
The rule for the walk's end moves into brick_kit_walk.h (kw_power_end), so
check-kitwalk holds it: on the Smart Pro PD11 is the controllers' 5 V and
ends high whatever was read before; elsewhere it goes back as it was.
release.sh refused the Smart Pro's list: its defconfig turns on dav1d,
usbdrive and zyperos-eq and the list had no rows for them. The Brick's and
the Pixel 2's have them. check-third-party-rows finds that gap offline: a
package any board's list names and a board's defconfig turns on must have
a row in that board's list.

This branch has not been deployed

No deployments
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