mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
feat: recognise a mister card on a computer
This commit is contained in:
1 parent
66dae2a974
commit
73b82375d9
19 files changed
+72
-34
No files matched your search
+1
-1
@@ -16,7 +16,7 @@
|
||||
# and Invoke-WebRequest throws on a cut transfer before the hash is read:
|
||||
# the site's build rewrites this line there (scripts/sitebootstrap.py).
|
||||
$mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that."
|
||||
$defaultInstallSha256 = "aa9407fbbe2d7a7b2ac78407272b96b1d9befb177eea64a5a084c73a0100dee9"
|
||||
$defaultInstallSha256 = "fdc80bcbe544c34e66af5cb953edd9b2b18c4722d32077f570f8503cc6815ca1"
|
||||
$maximumInstallerBytes = 2MB
|
||||
$installerExit = 0
|
||||
$installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null }
|
||||
|
||||
@@ -13737,6 +13737,12 @@ _SHARE_RULES: tuple[_OsRule, ...] = (
|
||||
_OsRule("rocknix", "ROCKNIX", "file_matches",
|
||||
(".config/system/configs/system.cfg", r"^root\.password=rocknix\s*$"),
|
||||
"roms/bios"),
|
||||
# MiSTer's is its exFAT partition, /media/fat (Main_MiSTer e0a234f9,
|
||||
# file_io.cpp:1177), whose root holds the MiSTer binary and menu.rbf
|
||||
# (Distribution_MiSTer ce602319) and which reads each core's files
|
||||
# below games/ (GAMES_DIR, file_io.h:171). A card prepared on a
|
||||
# computer got RetroArch's list, or MiSTer's at its root.
|
||||
_OsRule("misterfpga", "MiSTer FPGA", "file_exists", ("MiSTer", "menu.rbf"), "games"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins
|
||||
# curl or wget stop on a cut transfer before the hash is read: the site's
|
||||
# build rewrites this line there (scripts/sitebootstrap.py).
|
||||
MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that."
|
||||
DEFAULT_INSTALL_SHA256="aa9407fbbe2d7a7b2ac78407272b96b1d9befb177eea64a5a084c73a0100dee9"
|
||||
DEFAULT_INSTALL_SHA256="fdc80bcbe544c34e66af5cb953edd9b2b18c4722d32077f570f8503cc6815ca1"
|
||||
MAX_INSTALLER_BYTES=2097152
|
||||
|
||||
cleanup() {
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
{
|
||||
"dest": "roms/ports/retrobios/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 1091637,
|
||||
"sha256": "aa9407fbbe2d7a7b2ac78407272b96b1d9befb177eea64a5a084c73a0100dee9",
|
||||
"size": 1092074,
|
||||
"sha256": "fdc80bcbe544c34e66af5cb953edd9b2b18c4722d32077f570f8503cc6815ca1",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
@@ -71,8 +71,8 @@
|
||||
"muos": {
|
||||
"archive": {
|
||||
"dest": "ARCHIVE/RetroBIOS.muxapp",
|
||||
"size": 1145264,
|
||||
"sha256": "3d17d78050a0fe0181712084cb7bfbc258be08853ffcb7da897628e8a9e9f545"
|
||||
"size": 1145701,
|
||||
"sha256": "844b1ee7a71dabae0fa7fb9aedba24ab8255dfab867c2ef4e8189ea286abc6e3"
|
||||
},
|
||||
"members": [
|
||||
{
|
||||
@@ -92,8 +92,8 @@
|
||||
{
|
||||
"name": "RetroBIOS/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 1091637,
|
||||
"sha256": "aa9407fbbe2d7a7b2ac78407272b96b1d9befb177eea64a5a084c73a0100dee9",
|
||||
"size": 1092074,
|
||||
"sha256": "fdc80bcbe544c34e66af5cb953edd9b2b18c4722d32077f570f8503cc6815ca1",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
@@ -166,8 +166,8 @@
|
||||
{
|
||||
"dest": ".config/modules/retrobios/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 1091637,
|
||||
"sha256": "aa9407fbbe2d7a7b2ac78407272b96b1d9befb177eea64a5a084c73a0100dee9",
|
||||
"size": 1092074,
|
||||
"sha256": "fdc80bcbe544c34e66af5cb953edd9b2b18c4722d32077f570f8503cc6815ca1",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
|
||||
@@ -175,6 +175,10 @@ def route_keys() -> str:
|
||||
return _table(heading, rows)
|
||||
|
||||
|
||||
# Card markers that are files with no extension: the MiSTer binary.
|
||||
_BARE_FILES = frozenset({"MiSTer"})
|
||||
|
||||
|
||||
def _marker(rule: _install._OsRule) -> str:
|
||||
"""A card rule's evidence in words: the file or folder, and the line it
|
||||
holds for a rule that reads one."""
|
||||
@@ -182,8 +186,8 @@ def _marker(rule: _install._OsRule) -> str:
|
||||
path, pattern = rule.values
|
||||
line = re.sub(r"\\s\*\$$", "", re.sub(r"^(\^|\\A)", "", pattern)).replace("\\", "")
|
||||
return f"`{path}` holding the line `{line}`"
|
||||
named = ", ".join(f"`{value}`" if PurePosixPath(value).suffix else f"`{value}/`"
|
||||
for value in rule.values)
|
||||
named = ", ".join(f"`{value}`" if PurePosixPath(value).suffix or value in _BARE_FILES
|
||||
else f"`{value}/`" for value in rule.values)
|
||||
if rule.method == "games_part":
|
||||
# Told on the games part beside its bios folder, on a drive the
|
||||
# system does not call fixed (install.games_part).
|
||||
|
||||
Vendored
+1
-1
@@ -54,7 +54,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -69,6 +68,7 @@
|
||||
KOLOS, SD card RG353P, RG353M, RG353V, RG353VS, RG503, +3
|
||||
Koriki, SD card Miyoo Mini
|
||||
MinUI, SD card RG28XX, RG34XX, RG34XX SP, RG35XX, +19
|
||||
MiSTer FPGA, SD card
|
||||
MiyooCFW, SD card BittBoy, Pocket Go, PowKiddy Q90, +4
|
||||
muOS, SD card RG35XX H, RG35XX Plus, RG35XX SP, +8
|
||||
MyMinUI, SD card RG35XX, Miyoo Mini, Miyoo Mini Flip, +18
|
||||
|
||||
Vendored
+1
-1
@@ -27,7 +27,7 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
^[[0;2m 1-10 of 34^[[0m
|
||||
^[[0;1;35mA^[[0m Choose ^[[0;2mB^[[0m Back ^[[0;2m/^[[0m Filter ^[[0;2m?^[[0m Help
|
||||
=== folder
|
||||
|
||||
Vendored
+1
-1
@@ -36,7 +36,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -46,6 +45,7 @@
|
||||
CrossMix-OS, SD card TrimUI Smart Pro
|
||||
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
|
||||
EmuELEC, SD card Odroid Go
|
||||
JELOS, SD card RG351M, RG351V, RG353M, RG353P, +30
|
||||
^[[0;2m 1-19 of 34^[[0m
|
||||
^[[0;1;35mA/Enter^[[0m Choose ^[[0;2mB/Esc^[[0m Back ^[[0;2m/^[[0m Filter ^[[0;2m?^[[0m Help
|
||||
=== folder
|
||||
|
||||
+1
-1
@@ -12,7 +12,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -27,6 +26,7 @@
|
||||
KOLOS, SD card RG353P, RG353M, RG353V, RG353VS, RG503, +3
|
||||
Koriki, SD card Miyoo Mini
|
||||
MinUI, SD card RG28XX, RG34XX, RG34XX SP, RG35XX, +19
|
||||
MiSTer FPGA, SD card
|
||||
MiyooCFW, SD card BittBoy, Pocket Go, PowKiddy Q90, +4
|
||||
muOS, SD card RG35XX H, RG35XX Plus, RG35XX SP, +8
|
||||
MyMinUI, SD card RG35XX, Miyoo Mini, Miyoo Mini Flip, +18
|
||||
|
||||
+1
-1
@@ -10,6 +10,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
1-10 of 34
|
||||
A Choose B Back / Filter ? Help
|
||||
+1
-1
@@ -10,7 +10,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -20,5 +19,6 @@
|
||||
CrossMix-OS, SD card TrimUI Smart Pro
|
||||
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
|
||||
EmuELEC, SD card Odroid Go
|
||||
JELOS, SD card RG351M, RG351V, RG353M, RG353P, +30
|
||||
1-19 of 34
|
||||
A/Enter Choose B/Esc Back / Filter ? Help
|
||||
Vendored
+2
-2
@@ -78,7 +78,7 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
1-10 of 34
|
||||
A Choose B Back
|
||||
=== platforms 80x24
|
||||
@@ -94,7 +94,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -104,6 +103,7 @@
|
||||
CrossMix-OS, SD card TrimUI Smart Pro
|
||||
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
|
||||
EmuELEC, SD card Odroid Go
|
||||
JELOS, SD card RG351M, RG351V, RG353M, RG353P, +30
|
||||
1-19 of 34
|
||||
A Choose B Back
|
||||
=== folder 40x12
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
1-10 of 34
|
||||
A Choose B Back
|
||||
=== platforms 80x24
|
||||
@@ -94,7 +94,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -104,6 +103,7 @@
|
||||
CrossMix-OS, SD card TrimUI Smart Pro
|
||||
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
|
||||
EmuELEC, SD card Odroid Go
|
||||
JELOS, SD card RG351M, RG351V, RG353M, RG353P, +30
|
||||
1-19 of 34
|
||||
A Choose B Back
|
||||
=== folder 40x12
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
1-10 of 34
|
||||
A Choose B Back
|
||||
=== platforms 80x24
|
||||
@@ -94,7 +94,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -104,6 +103,7 @@
|
||||
CrossMix-OS, SD card TrimUI Smart Pro
|
||||
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
|
||||
EmuELEC, SD card Odroid Go
|
||||
JELOS, SD card RG351M, RG351V, RG353M, RG353P, +30
|
||||
1-19 of 34
|
||||
A Choose B Back
|
||||
=== folder 40x12
|
||||
|
||||
Vendored
+2
-2
@@ -78,7 +78,7 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
1-10 of 34
|
||||
Enter Choose Esc Back / Filter
|
||||
=== platforms 80x24
|
||||
@@ -94,7 +94,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -104,6 +103,7 @@
|
||||
CrossMix-OS, SD card TrimUI Smart Pro
|
||||
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
|
||||
EmuELEC, SD card Odroid Go
|
||||
JELOS, SD card RG351M, RG351V, RG353M, RG353P, +30
|
||||
1-19 of 34
|
||||
Enter Choose Esc Back / Filter ? Help
|
||||
=== folder 40x12
|
||||
|
||||
Vendored
+2
-2
@@ -78,7 +78,7 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
1-10 of 34
|
||||
A Choose R2 Back
|
||||
=== platforms 80x24
|
||||
@@ -94,7 +94,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -104,6 +103,7 @@
|
||||
CrossMix-OS, SD card TrimUI Smart Pro
|
||||
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
|
||||
EmuELEC, SD card Odroid Go
|
||||
JELOS, SD card RG351M, RG351V, RG353M, RG353P, +30
|
||||
1-19 of 34
|
||||
A Choose R2 Back
|
||||
=== folder 40x12
|
||||
|
||||
Vendored
+2
-2
@@ -78,7 +78,7 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
1-10 of 34
|
||||
Start Choose B Back
|
||||
=== platforms 80x24
|
||||
@@ -94,7 +94,6 @@
|
||||
RetroDECK
|
||||
RomM
|
||||
BizHawk
|
||||
MiSTer FPGA
|
||||
RetroPie
|
||||
Allium, SD card Miyoo Mini, Miyoo Mini Plus, +1
|
||||
AmberELEC, SD card RG351, RG552
|
||||
@@ -104,6 +103,7 @@
|
||||
CrossMix-OS, SD card TrimUI Smart Pro
|
||||
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
|
||||
EmuELEC, SD card Odroid Go
|
||||
JELOS, SD card RG351M, RG351V, RG353M, RG353P, +30
|
||||
1-19 of 34
|
||||
Start Choose B Back
|
||||
=== folder 40x12
|
||||
|
||||
@@ -6097,6 +6097,26 @@ class EveryCardSetupGoesToItsCard(unittest.TestCase):
|
||||
self.assertEqual(install.card_choice(setup.name, setup.plat, nested).folder,
|
||||
nested)
|
||||
|
||||
def test_a_mister_card_gets_its_files_below_games(self):
|
||||
"""A MiSTer card mounted on a computer got RetroArch's list, and
|
||||
with --platform misterfpga its files at the root, where MiSTer
|
||||
reads none: it reads games/<core>/ below /media/fat."""
|
||||
card = self.root / "MiSTer"
|
||||
(card / "games").mkdir(parents=True)
|
||||
(card / "_Computer").mkdir()
|
||||
for name in ("MiSTer", "menu.rbf", "MiSTer.ini"):
|
||||
(card / name).write_text("", encoding="utf-8")
|
||||
self.assertEqual(install.card_system(card),
|
||||
("misterfpga", card / "games", "MiSTer FPGA"))
|
||||
for named in (card, card / "games"):
|
||||
with self.subTest(named=named.name):
|
||||
choice = install.card_choice("misterfpga", "misterfpga", named)
|
||||
self.assertEqual((choice.refused, choice.folder), ("", card / "games"))
|
||||
# A folder holding a games folder and nothing of MiSTer's is no card.
|
||||
other = self.root / "stick"
|
||||
(other / "games").mkdir(parents=True)
|
||||
self.assertIsNone(install.card_system(other))
|
||||
|
||||
def test_a_blank_drive_is_refused_where_the_card_always_names_its_system(self):
|
||||
blank = self.root / "BLANK"
|
||||
blank.mkdir()
|
||||
@@ -7074,8 +7094,13 @@ class _CardFixtures:
|
||||
def narrowed(self, plat: str, **given) -> tuple[int, str, list]:
|
||||
"""(exit code, what was said, the files kept) of a --dry-run narrowed
|
||||
as given."""
|
||||
dest = self.root / "dest"
|
||||
if not dest.exists():
|
||||
dest = self.root / f"dest-{plat}"
|
||||
if plat == "misterfpga" and not dest.exists():
|
||||
# A MinUI card is another system's card for MiSTer's list.
|
||||
dest.mkdir()
|
||||
for marker in ("MiSTer", "menu.rbf"):
|
||||
(dest / marker).write_text("", encoding="utf-8")
|
||||
elif not dest.exists():
|
||||
make_card(dest, "MinUI")
|
||||
stream = io.StringIO()
|
||||
code = 0
|
||||
|
||||
+5
-2
@@ -1097,6 +1097,7 @@ gives for the device, below the card's root instead of its mount point:
|
||||
| `system/configs/emulationstation/about.info` holding the line `KNULLI` | KNULLI | `bios`, KNULLI's list |
|
||||
| `system/batocera.conf` holding the line `system.hostname=KNULLI` | KNULLI | `bios`, KNULLI's list |
|
||||
| `.config/system/configs/system.cfg` holding the line `root.password=rocknix` | ROCKNIX | `roms/bios`, ROCKNIX's list |
|
||||
| `MiSTer`, `menu.rbf` | MiSTer FPGA | `games`, MiSTer FPGA's list |
|
||||
| `MUOS/` | muOS | `MUOS/bios`, RetroArch's list |
|
||||
| `spruce/` | spruceOS | `BIOS`, RetroArch's list |
|
||||
| `System/usr/trimui/crossmix-version.txt` | CrossMix-OS | `BIOS`, RetroArch's list |
|
||||
@@ -1220,7 +1221,7 @@ beside its executable wherever the archive was extracted, so a forced
|
||||
`--platform bizhawk` that finds no install stops and asks for `--dest`.
|
||||
|
||||
The systems that run from an SD card keep their files there: MinUI, NextUI,
|
||||
MyMinUI, KNULLI, ROCKNIX, AmberELEC and EmuELEC (the card's games part, which
|
||||
MyMinUI, KNULLI, ROCKNIX, MiSTer FPGA, AmberELEC and EmuELEC (the card's games part, which
|
||||
they mount as `/storage/roms`), and each system of the
|
||||
[Linux handhelds](../platforms/linux-handhelds.md) that gets RetroArch's list
|
||||
(Onion, muOS, spruceOS, ArkOS, UnofficialOS and the others). Run on the
|
||||
@@ -1556,7 +1557,9 @@ names each route it tried, and `log.prev.txt` keeps the run before.
|
||||
**From a computer.** Onion, MinUI, NextUI, Allium, GarlicOS and the Switch
|
||||
have no Python 3 to run the installer. Put the card in a computer and run
|
||||
the [one-line command](#one-line) there: it finds a mounted Onion,
|
||||
spruceOS, MinUI, muOS, Knulli or ROCKNIX card by itself. For a card it does
|
||||
spruceOS, MinUI, muOS, Knulli, ROCKNIX or MiSTer card by itself (MiSTer's
|
||||
files go to `games/` below the card's root, which MiSTer reads as
|
||||
`/media/fat/games`). For a card it does
|
||||
not recognise, add `--platform <platform> --dest <BIOS folder on the card>`.
|
||||
This works for every system above too.
|
||||
|
||||
|
||||
Reference in new issue
Block a user