Commit Graph
189 Commits
Author SHA1 Message Date
Abdessamad Derraz 153ba479f6 fix: assume no default where detection was refused
The Flatpak RetroArch's folder at 000 hid the retroarch.cfg naming ~/Games/bios, and the run offered 6.6 GB to ~/.config/retroarch/system. A closed folder under HOME or above the default now leaves no default: --dest is asked for. Python 3.14's quiet Path.exists() refusals are told from absence by os.stat, and an assumed folder reads as the one a frontend usually reads.
2026-10-24 02:58:32 +02:00
Abdessamad Derraz d2ba7e18ba fix: search past a folder this user cannot open
One closed folder under HOME (~/.config/EmuDeck at 000) made the whole
detection return nothing: a RetroArch whose retroarch.cfg was readable
was lost and the run fell back to a folder it does not read. Every
detection probe now goes through _exists, _is_dir or _is_file, which
count a refused place as absent, name the closed folder once, and let
the other probes go on. The decorator stays as the last net.

The refusal is an unsearched event before detect. The interface keeps
the line above the list of setups. At HOME or a drive root A goes into
a visible subfolder, never a card or drive row nor .cache, and with
none it stays on Use this folder and says where it is. A default folder
taken because the platform was not found is no longer called detected.
2026-10-24 02:23:57 +02:00
Abdessamad Derraz fd33ad0d96 fix: let A go deeper from home or a drive root
With no usual folder the browser opened at HOME on Use this folder, and A pressed through the screens installed the BIOS files into ~. At HOME or a drive's root A now opens the first folder. Picking the old card to copy from is unchanged.
2026-10-24 01:38:31 +02:00
Abdessamad Derraz bd1c58b6f0 fix: say why detection cannot look, then go on
HOME kept across su without - made every detection probe raise PermissionError, and the run and the interface ended on a traceback. Detection now finds nothing there, says which folder this user cannot open and how to go on, on the first screen too.
2026-10-24 01:28:43 +02:00
Abdessamad Derraz 859f2c8a22 fix: match the idle line and keep the found folder
The handheld launcher compared the idle close's line without install.py's RetroBIOS: prefix, and its test fake printed it the same way, so the device still waited 300 s: a test now ties both to TUI_IDLE_WORDS. The interface offered the built-in default folder when the folder found here could not be opened, a folder RetroArch does not read.
2026-10-24 01:03:36 +02:00
Abdessamad Derraz f51bc069d5 fix: refuse a detected folder under a closed one
A system_directory read from retroarch.cfg under a folder this user cannot open ended the run, and the interface before its first screen, on a traceback. It now gets the refusal --dest gets. On a handheld, an idle close on an error screen shows that error for a few seconds instead of waiting for a button that cannot come.
2026-10-24 00:31:40 +02:00
Abdessamad Derraz 3d71bdceb3 chore: pin the current installer in the bootstraps 2026-10-23 23:47:19 +02:00
Abdessamad Derraz 28d83cbc0f chore: pin the current installer in the bootstraps 2026-10-23 22:45:43 +02:00
Abdessamad Derraz d1414263fa feat: name the pad inside muxterm
gptokeyb2 owns the pad in muxterm on muOS with PortMaster, and muxterm keeps PgUp and PgDn for its scrollback. The launcher now says so with RETROBIOS_PAD=gptokeyb_muxterm, and the hints name the gptokeyb buttons with no paging key.
2026-10-23 21:47:55 +02:00
Abdessamad Derraz 67a6ad3e32 chore: wrap the work folder error line 2026-10-23 21:11:45 +02:00
Abdessamad Derraz d297cc3ff6 fix: bound the wait for a silent list server
A server that took the connection and never answered held line mode
93 s, three waits of 30 s for a first byte. A file list now waits 15 s
per answer and asks a silent server twice. Downloads keep their own
timeout between chunks.
2026-10-23 20:58:19 +02:00
Abdessamad Derraz 812d5d157e fix: tell offline from a lost connection on screen
With --offline and no list, the full screen said No connection and
offered a Try again that could never work. It now names offline mode
and the two ways a run gets its list without the network. With a list,
the plan counted downloads the run forbids: it says what this machine
can supply and what needs the internet, and the printed command keeps
--offline.
2026-10-23 20:56:37 +02:00
Abdessamad Derraz ba4db2ab57 fix: keep system names whole at 40 columns
The size column took half the line and cut every name to eleven
letters: Game Boy, Game Boy Advance and Game Boy Color read alike. A
system row now carries shorter size forms, and the longest one that
leaves the name whole is shown, none when that is what keeps it.
2026-10-23 20:53:07 +02:00
Abdessamad Derraz 36f4b338e1 fix: offer no paging keys on muxterm
muxterm keeps PgUp and PgDn for its scrollback and its L1 and R1 send
nothing: the help named a page key that never reaches the interface.
2026-10-23 20:50:59 +02:00
Abdessamad Derraz a23e9a09b8 feat: close the first screen when no button comes
RETROBIOS_IDLE_EXIT=SECONDS: with no key on the first screen for that
long, before any choice, the interface exits 0 with one line. A mapper
that never opens the pad no longer freezes a handheld there.
2026-10-23 20:50:24 +02:00
Abdessamad Derraz a296bbfdff fix: keep why a data tree or a copy failed
A damaged member of a data tree's archive (zlib.error, EOFError) ended
the run on a traceback, and a failed write left its .part. --offline
refusing a data tree, or the download after a --from copy failed, lost
its kind, so the advice named the network instead of --offline.
2026-10-23 20:49:23 +02:00
Abdessamad Derraz abba99d352 fix: find the save directory for a named folder
A run given --dest detected nothing, so retroarch.cfg was never read:
the full screen, which names every folder, sent Azahar's keys.txt to a
guessed RetroArch/saves or dropped it without a word, where line mode
wrote it to savefile_directory. The configs are now read once when a
save directory is asked for, and the plan and the result say what was
left out.
2026-10-23 20:47:36 +02:00
Abdessamad Derraz ccc8af7a47 fix: compare a card's BIOS folder by folders
--dest NOTMUOS/bios ended with MUOS/bios as text and passed as a muOS
card's folder. A card two systems claim now says so in one line, and
the system named among them decides the folder.
2026-10-23 20:43:38 +02:00
Abdessamad Derraz 246b6c6efc fix: print found paths as the terminal shows them
The line output printed the --from folder, the files found there and
the BIOS folder paths as they are: a name holding ESC drove the
terminal. screen_text moves out of the interface section and cleans
every line of the check, the copy plan and the unreadable list.
2026-10-23 20:42:55 +02:00
Abdessamad Derraz 3523e46595 fix: open each archive of a folder once
Each ZIP member read reopened its archive and parsed its directory
again: 4000 members of one size made 4000 parses. A folder index keeps
the archives it reads open, 16 at most, read under a lock from the copy
threads, and every index is closed at the end of the run. Archives the
list installs are still opened and closed at once.
2026-10-23 20:40:57 +02:00
Abdessamad Derraz 3203c766fc fix: name a folder or unreadable file in place
A folder or a file the user cannot read at a destination ended --check
and the install on a traceback from the hashing pool. --check now gives
the reason per file, and the install fails that file alone, before any
download for a folder.
2026-10-23 20:37:32 +02:00
Abdessamad Derraz 4b8e2f9de2 fix: check system_titles at the boundary
A list or a number among the titles passed validation and raised later,
in --system matching or the interface.
2026-10-23 20:37:03 +02:00
Abdessamad Derraz ea48a54329 fix: judge a declared slot by the platform's copy
--declared-only settled each slot on its first declaration before the
cores narrowed the list, and the declared event judged the core copy
served in its place. Both now read the declaration whose systems
remain, as the platform checks it.
2026-10-23 20:36:53 +02:00
Abdessamad Derraz 5869da409b fix: open the interface whatever owner files hold
An owner file holding a number past a pid raised OverflowError before
the screen opened, and a full temp disk stopped the run on the owner
write. 0 and negative numbers are unknown owners, not process groups.
2026-10-23 20:24:40 +02:00
Abdessamad Derraz cf3b61a17b fix: exit on the window's signal when it closes
A closed window under a changing screen failed the draw (EIO, or a
termios.error from the SIGCONT that comes with SIGHUP) before the
signal was read, and the run ended on 1 with a crash log kept.
2026-10-23 20:22:42 +02:00
Abdessamad Derraz a8fef3fbbd chore: merge pad-aware interface hints 2026-10-23 19:43:54 +02:00
Abdessamad Derraz 68452a0518 feat: name the keys of the input that runs
The hint bar, the help and the install's stop line read RETROBIOS_PAD:
gptokeyb, evmapy, muxterm and miyoo each name their own buttons and
none they lack. A desktop names keys only, SteamOS game mode and any
unknown run keep both names. On a Miyoo, A (Space) chooses, L1 and R1
page, and R2 goes back: B is Left Ctrl, which sends no byte alone.

SIGTERM and SIGHUP are handled from the start of the run, so a stop
during detection ends on the farewell. A closed window now ends with
129: once the last write fails, stdout and stderr point at /dev/null
and the flush at exit no longer turns the code into 120.
2026-10-23 19:32:08 +02:00
Abdessamad Derraz d6782913cf feat: add --offline and bound the connect time
--offline (or RETROBIOS_INSTALL_OFFLINE=1, which the runs the
full-screen interface starts inherit) makes no network request. The
file list stops the run at once with an error event of reason
offline unless --manifest or --from-pack gives it, a file the run
would download fails at once with its own advice, and board detection
is skipped. --target and --list-targets refuse it. RETROBIOS_OFFLINE
is not reused: CI and the test suite set it for every process, and the
installer tests serve their files over loopback.

A connection now has 4 s to open, then the read keeps its 30 or 60 s
timeout: three tries that never connect end in about 15 s instead of
93, and a slow but open transfer is not cut.

A --dry-run prints its totals first. A plan taller than the screen
names the ten largest systems, and --verbose lists every system and
file. Events are unchanged.
2026-10-23 19:24:07 +02:00
Abdessamad Derraz b34a6058f7 chore: merge main into the engine round 2026-10-23 19:07:44 +02:00
Abdessamad Derraz 35e7300465 feat: add --declared-only and the events schema
--declared-only keeps the entries the platform's own list declares
(cores: null), each slot settled to the platform's copy with no core
alternative left behind. Install, --check, --dry-run, --events,
--list-systems, --system, --region, --emulator, --target,
--installed-cores, --manifest and --from-pack apply it. --core,
--list-cores, --list-emulators, --list-platforms, --list-targets,
--standalone-copies, --restore and --tui refuse it, and the interface
does not open by itself with it. On Batocera it gives 353 files of
14531, the list batocera-systems checks.

Event decision: no schema bump. A `declared` key on `file` would add a
key to an existing kind, which schema 1 forbids. A new kind, `declared`,
follows `check` with the same counts over the platform's own files and
their dests in file-event order. Readers already skip a kind they do
not know (rbevents.py and the interface reader were checked), so
EVENT_SCHEMA stays 1.

An unknown --system is answered with the systems the list files its
key file under: --platform retroarch --system snk-neogeo now suggests
arcade, which holds neogeo.zip, instead of snk-neogeo-cd. neogeo, mvs
and aes follow the same route. Never taken, only suggested. A system
title the manifest carries (SNK Neo Geo CD) is taken for its id when
no other system shares it and no platform name reads the same.

schemas/install-events.schema.json is written from EVENT_KEYS by
scripts/generate_event_schema.py. validate_schemas.py reports a stale
file, and tests compare it with EVENT_KEYS and validate a real run.
Bootstrap pins recomputed.
2026-10-23 19:07:18 +02:00
Abdessamad Derraz cffd9eeb02 feat: read the engine's transfer and scan events
The speed is bytes_network over time, the interface's own guess at local
bytes is gone. The plan says when a --from folder was read only in part
or holds another drive, and how many files on the old card could not be
read, with a list of each reason. The --from folders are only checked
before the screen opens, never indexed there.
2026-10-23 18:43:18 +02:00
Abdessamad Derraz f4f95740dd chore: merge main into the interface fixes 2026-10-23 18:32:43 +02:00
Abdessamad Derraz e534f11713 fix: second audit of the full-screen interface
- A handheld card mounted on a computer is found by the files its
  firmware writes there: muOS, Onion, spruceOS, CrossMix, Allium and
  Koriki from their device rules read below the card root, KNULLI and
  ROCKNIX from the share their first boot seeds. It is a setup of its
  own ("muOS SD card (E:\)") with the folder that system reads, and
  --dest <card root> writes there too. --platform muos with a folder
  that is no muOS card is refused with the folder to name.
- Space (X on PortMaster, Y on muxterm) opens the confirm screen from
  Install and never installs, closes or quits by itself.
- Short of space, Choose another folder comes first, and the result
  says the card is full in words, with no log lines and no command
  naming the interface's own copy of the list.
- The plan keeps the BIOS folder second, cut in its middle, a --from
  folder by its name, and the config that named the folder.
- The result says how many files came from the old card, how many
  were downloaded and how many are still missing, as the line mode.
- The "other" row is named and explained, files shared by several
  systems are counted apart, and a file that cannot be supplied is
  named with its system, only where it matters.
- A work folder left by SIGKILL is removed by the next run, a failed
  run's log after a week. A full card keeps no log.
- Smaller: the sudo advice names the folder, removing a --from folder
  says so, the preview counts its files only, a proxy is named, a list
  that is no JSON and the clock error read as plain sentences.
2026-10-23 18:31:33 +02:00
Abdessamad Derraz a5e025b7ee feat: transfer event splits local and network
The engine counts the bytes a copy, the pack or a resumed partial copy
supplied, and those the network brought. A transfer event carries both
after each progress event and once when the downloads end, so a screen
shows a download speed without guessing.
2026-10-23 18:23:22 +02:00
Abdessamad Derraz 28037c8b53 fix: keep the --from search on one drive
The walk no longer enters another drive mounted below the folder (it is
named instead), /proc, /sys, /dev or a Windows junction, and the root of
the system is refused. from_folder_problem() checks a folder without
reading it. A scanned event reports each folder read, cut short or not.
2026-10-23 18:15:19 +02:00
Abdessamad Derraz 2da724879b fix: name --from copies that could not be read
A file, ZIP member or folder below a --from folder that could not be
read was taken as no match. When its size is that of a file the run
still needs, or unknown, --check, --dry-run and an install now name it
with the reason, and an unreadable event carries it.
2026-10-23 18:08:49 +02:00
Abdessamad Derraz 6f541e9b8c fix: tell an unreadable copy from a locked folder
A copy that could not be read when it was copied was reported as a
folder not writable. The source is now opened first and its errors are
its own, and a download failing after it names both reasons. A run
reading a pack falls back to the pack, never to the network.
2026-10-23 18:03:05 +02:00
Abdessamad Derraz c6926e10b8 fix: index archives and sizes once in the check
A missing file walked every archive of the BIOS folder and every file of
its size: 3,000 ZIPs and 3,000 missing files took 186 s, now under 1 s.
--from copies and the owner of a refused file use the same lookups.
2026-10-23 17:59:25 +02:00
Abdessamad Derraz 339ddf2d89 feat: copy from an old card in the interface
The plan offers the folder browser, mounted cards first and ZIPs listed,
to add --from (Options adds a second one, Left takes it back), checks the
folder again and says how many files it holds and how many are left to
download. Misplaced files are counted with a Show list of their reasons,
and a local copy no longer counts in the download speed. The found event
test now holds that the interface reads it after a check and an install.
2026-10-23 16:57:28 +02:00
Abdessamad Derraz 5136c5a53a chore: merge main into the --from branch 2026-10-23 16:35:39 +02:00
Abdessamad Derraz 588a8d3350 fix: settle the interface audit findings
A stop by SIGTERM (Start+Select under gptokeyb) reads the summary like
Ctrl-C and prints the count on disk. The systems filter keeps the ticks
and the focus. The bar names what A does on the focused row. Options
check the folder again, a missing network fails in 15 s with plain words,
an unwritable folder offers another one, a folder inside a card offers
its root, and only a failure keeps its log.

New event kind: checking, with files_done and files_total, while the
files in place are hashed. The exact event lists of the check and
install runs now carry two of them, for the two files in place.
2026-10-23 16:10:09 +02:00
Abdessamad Derraz 44cdf2984b feat: copy BIOS files from a folder with --from
--from FOLDER (repeatable, a ZIP accepted) reads an old SD card, a
backup or a Downloads folder: files indexed by size, hashed only when
a size matches an entry, ZIP members included. Each file is copied,
checked again once written, and the source is never modified. Mac ._
files, system folders and links leading out of the folder are skipped.

An install also puts in place the files it finds misplaced in the BIOS
folder (bios/bios/, a pack extracted one level too deep, a name in
capitals, a ZIP never extracted, one folder up), leaving the user's
copy where it is. --check and --dry-run say what a run would copy.

Events gain one kind, found, sent before the copy, which a downloaded
event then reports. The end of the run says where each file came from.
2026-10-23 15:59:21 +02:00
Abdessamad Derraz 5a8fb2248f fix: harden the full-screen installer
Control characters from names, folders and the installer's own text
are shown as ?, on screen and in the lines left after it. The terminal
mode and the signal handlers come back even when the last write fails
or a second signal arrives. A stop from outside hands the terminal
back, the second Ctrl-C is announced, speed reads the last seconds,
values are glued to their options, and counts read before a change of
options say so.
2026-10-23 15:35:28 +02:00
Abdessamad Derraz 75743fde24 chore: merge main into the interface branch 2026-10-23 15:10:12 +02:00
Abdessamad Derraz c6fc0a3a61 feat: add full-screen installer interface
A bare install at a terminal of 40x12 or more opens a full screen that a
keyboard or a controller mapped to keys drives: setup, plan, install in
three presses, systems, regions, cores, game data, folder browser and a
dry-run preview one press away. The installer runs itself as a child with
--events for every check and install, the file list fetched once and
handed over with --manifest. --tui asks for it, --plain, RETROBIOS_PLAIN
and ACCESSIBLE keep the line questions.
2026-10-23 14:23:35 +02:00
Abdessamad Derraz 778d2d56e6 fix: give the bare platform menu its default
With nothing detected, the menu had no Enter default, while --help and
the --dest menu name RetroArch as the fallback. Its title now also says
why the question is asked.
2026-10-23 14:21:45 +02:00
Abdessamad Derraz 19b4ef5de4 fix: describe only the chosen systems in events
--system nintendo-gba wrote system events for gb, gbc and ds, each made
of the few SkyEmu files the choice kept. With systems chosen, only those
are described.
2026-10-23 14:21:24 +02:00
Abdessamad Derraz 2670b11c2b fix: count files shared by systems apart
The systems step and --list-systems gave 3do 1704 files, 349 MB, of
which 1689 are MAME hash and plugin files six systems carry. Each line
now shows the system's own files, and the shared ones beside them.
2026-10-23 14:19:18 +02:00
Abdessamad Derraz e118fd58ea fix: honour an empty NO_COLOR as unset
An empty NO_COLOR turned colour off, which no-color.org reads as unset.
FORCE_COLOR and CLICOLOR_FORCE now paint a pipe. --check with several
platforms asks which to check rather than "Install for:", and
--list-platforms says when nothing is detected here.
2026-10-23 14:15:59 +02:00
Abdessamad Derraz 75a6356959 feat: say network failures in plain words
Offline, the run printed "[Errno -2] Name or service not known". The
common failures now read as words, the raw text kept under --verbose.
A refused certificate under a clock set before the installer was written
is reported as reason clock, with the date it reads, and no trusted
certificate list on the machine as reason no_ca, naming SSL_CERT_FILE.
Neither is retried, and verification is never turned off.
2026-10-23 14:14:08 +02:00