romm: add IGDB credentials, add populate-roms script

This commit is contained in:
2026-03-08 23:56:44 +00:00
parent 9d084f3f19
commit 597ed26f89
2 changed files with 234 additions and 0 deletions
+2
View File
@@ -21,6 +21,8 @@ services:
- RETROACHIEVEMENTS_API_KEY=
- STEAMGRIDDB_API_KEY=
- HASHEOUS_API_ENABLED=true
- IGDB_CLIENT_ID=${IGDB_CLIENT_ID}
- IGDB_CLIENT_SECRET=${IGDB_CLIENT_SECRET}
volumes:
- /mnt/nas_games:/romm/library # NAS: media/games → library root; roms/ subdir inside
- /srv/romm/assets:/romm/assets # Saves, states, screenshots
+232
View File
@@ -0,0 +1,232 @@
#!/usr/bin/env bash
set -euo pipefail
NO_INTRO_BASE="/mnt/nas_games/[No-Intro] PropeR 1G1R Collection (2024)/ROMs"
ROMS_DEST="/mnt/nas_games/roms"
extracted=0
skipped=0
not_found=0
extract_game() {
local platform_zip="$1"
local inner_prefix="$2"
local dest_dir="$3"
local game_name="$4"
if [[ -f "$dest_dir/$game_name" ]]; then
echo " [SKIP] $game_name"
(( skipped++ )) || true
return 0
fi
if ! unzip -Z1 "$platform_zip" "${inner_prefix}${game_name}" &>/dev/null; then
echo " [MISSING] $game_name"
(( not_found++ )) || true
return 0
fi
echo " [EXTRACT] $game_name"
unzip -j -n "$platform_zip" "${inner_prefix}${game_name}" -d "$dest_dir"
(( extracted++ )) || true
}
# ---------------------------------------------------------------------------
# Atari 2600
# ---------------------------------------------------------------------------
ATARI_ZIP="$NO_INTRO_BASE/Atari - 2600.zip"
ATARI_PREFIX="Atari - 2600/"
ATARI_DEST="$ROMS_DEST/atari2600"
if [[ ! -f "$ATARI_ZIP" ]]; then
echo "[WARN] Atari 2600 zip not found: $ATARI_ZIP"
else
echo "==> Atari 2600 -> $ATARI_DEST"
mkdir -p "$ATARI_DEST"
ATARI_GAMES=(
"Adventure (USA).zip"
"Asteroids (Japan, USA) (En).zip"
"Atlantis (USA).zip"
"Berzerk (Japan, USA) (En).zip"
"Boxing (USA).zip"
"Breakout ~ Breakaway IV (Japan, USA) (En).zip"
"Centipede (Japan, USA) (En).zip"
"Chopper Command (USA).zip"
"Combat ~ Tank-Plus (USA).zip"
"Demon Attack (USA) (Rev 1).zip"
"Donkey Kong (USA).zip"
"Enduro (USA).zip"
"Frogger (USA).zip"
"H.E.R.O. (USA).zip"
"Haunted House (USA).zip"
"Kaboom! (USA).zip"
"Missile Command (USA).zip"
"Moon Patrol (USA).zip"
"Pac-Man (USA).zip"
"Phoenix (USA).zip"
"Pitfall! - Pitfall Harry's Jungle Adventure (USA).zip"
"Pitfall II - Lost Caverns (USA).zip"
"River Raid (USA).zip"
"Space Invaders (USA).zip"
"Yars' Revenge (USA).zip"
)
for game in "${ATARI_GAMES[@]}"; do
extract_game "$ATARI_ZIP" "$ATARI_PREFIX" "$ATARI_DEST" "$game"
done
fi
# ---------------------------------------------------------------------------
# NES
# ---------------------------------------------------------------------------
NES_ZIP="$NO_INTRO_BASE/Nintendo - Nintendo Entertainment System (Headerless).zip"
NES_PREFIX="Nintendo - Nintendo Entertainment System (Headerless)/"
NES_DEST="$ROMS_DEST/nes"
if [[ ! -f "$NES_ZIP" ]]; then
echo "[WARN] NES zip not found: $NES_ZIP"
else
echo "==> NES -> $NES_DEST"
mkdir -p "$NES_DEST"
NES_GAMES=(
"Balloon Fight (USA).zip"
"Battletoads (USA).zip"
"Bionic Commando (USA).zip"
"Blaster Master (USA).zip"
"Castlevania (USA) (Rev 1).zip"
"Chip 'n Dale - Rescue Rangers (USA).zip"
"Contra (USA).zip"
"Double Dragon (USA).zip"
"Double Dragon II - The Revenge (USA) (Rev 1).zip"
"Dr. Mario (Japan, USA) (En) (Rev 1).zip"
"Duck Hunt (World).zip"
"DuckTales (USA).zip"
"Excitebike (Japan, USA) (En).zip"
"Final Fantasy (USA).zip"
"Gradius (USA).zip"
"Ice Climber (USA, Europe, Korea) (En).zip"
"Kid Icarus (USA, Europe) (Rev 1).zip"
"Kirby's Adventure (USA) (Rev 1).zip"
"Legend of Zelda, The (USA) (Rev 1).zip"
"Mega Man 2 (USA).zip"
"Mega Man 3 (USA).zip"
"Metroid (USA).zip"
"Mike Tyson's Punch-Out!! (Japan, USA) (En) (Rev 1).zip"
"Ninja Gaiden (USA).zip"
"River City Ransom (USA).zip"
"Super Mario Bros. (World).zip"
"Super Mario Bros. 3 (USA) (Rev 1).zip"
"Teenage Mutant Ninja Turtles II - The Arcade Game (USA).zip"
)
for game in "${NES_GAMES[@]}"; do
extract_game "$NES_ZIP" "$NES_PREFIX" "$NES_DEST" "$game"
done
fi
# ---------------------------------------------------------------------------
# Genesis (Mega Drive)
# ---------------------------------------------------------------------------
GENESIS_ZIP="$NO_INTRO_BASE/Sega - Mega Drive - Genesis.zip"
GENESIS_PREFIX="Sega - Mega Drive - Genesis/"
GENESIS_DEST="$ROMS_DEST/genesis"
if [[ ! -f "$GENESIS_ZIP" ]]; then
echo "[WARN] Genesis zip not found: $GENESIS_ZIP"
else
echo "==> Genesis -> $GENESIS_DEST"
mkdir -p "$GENESIS_DEST"
GENESIS_GAMES=(
"Aladdin (USA).zip"
"Altered Beast (Japan, USA) (En) (Rev A).zip"
"Beyond Oasis (USA).zip"
"Castle of Illusion Starring Mickey Mouse (USA, Europe).zip"
"Castlevania - Bloodlines (USA).zip"
"Comix Zone (USA).zip"
"Contra - Hard Corps (USA, Korea) (En).zip"
"Earthworm Jim (USA).zip"
"Ecco the Dolphin (USA, Europe, Korea) (En).zip"
"Golden Axe (World) (Rev A).zip"
"Golden Axe II (World).zip"
"Gunstar Heroes (USA).zip"
"Lion King, The (World).zip"
"Mortal Kombat (World).zip"
"Mortal Kombat II (World).zip"
"NBA Jam - Tournament Edition (World).zip"
"Phantasy Star II (USA, Europe) (Rev A).zip"
"QuackShot Starring Donald Duck (World) (Rev A).zip"
"Ristar (USA, Europe).zip"
"Road Rash II (USA, Europe) (RR206).zip"
"Rocket Knight Adventures (USA).zip"
"Shining Force (USA).zip"
"Sonic The Hedgehog (Japan, Europe, Korea) (En).zip"
"Sonic The Hedgehog 2 (World) (Rev B).zip"
"Sonic The Hedgehog 3 (USA).zip"
"Streets of Rage (World) (Rev A).zip"
"Streets of Rage 2 (USA).zip"
"ToeJam & Earl (USA, Europe, Korea) (En).zip"
"Vectorman (USA, Europe).zip"
"Virtua Racing (USA).zip"
)
for game in "${GENESIS_GAMES[@]}"; do
extract_game "$GENESIS_ZIP" "$GENESIS_PREFIX" "$GENESIS_DEST" "$game"
done
fi
# ---------------------------------------------------------------------------
# SNES
# ---------------------------------------------------------------------------
SNES_ZIP="$NO_INTRO_BASE/Nintendo - Super Nintendo Entertainment System.zip"
SNES_PREFIX="Nintendo - Super Nintendo Entertainment System/"
SNES_DEST="$ROMS_DEST/snes"
if [[ ! -f "$SNES_ZIP" ]]; then
echo "[WARN] SNES zip not found: $SNES_ZIP"
else
echo "==> SNES -> $SNES_DEST"
mkdir -p "$SNES_DEST"
SNES_GAMES=(
"ActRaiser (USA).zip"
"Breath of Fire II (USA).zip"
"Chrono Trigger (USA).zip"
"Contra III - The Alien Wars (USA).zip"
"Donkey Kong Country (USA) (Rev 2).zip"
"Donkey Kong Country 2 - Diddy's Kong Quest (USA) (En,Fr) (Rev 1).zip"
"EarthBound (USA).zip"
"F-Zero (USA).zip"
"Final Fantasy III (USA) (Rev 1).zip"
"Illusion of Gaia (USA).zip"
"Kirby Super Star (USA).zip"
"Legend of Zelda, The - A Link to the Past (USA).zip"
"Mega Man X (USA) (Rev 1).zip"
"Mega Man X2 (USA).zip"
"Pilotwings (USA).zip"
"Secret of Mana (USA).zip"
"Soul Blazer (USA).zip"
"Star Fox (USA) (Rev 2).zip"
"Street Fighter II Turbo (USA) (Rev 1).zip"
"Super Bomberman 2 (USA).zip"
"Super Castlevania IV (USA).zip"
"Super Mario All-Stars + Super Mario World (USA).zip"
"Super Mario Kart (USA).zip"
"Super Mario RPG - Legend of the Seven Stars (USA).zip"
"Super Mario World 2 - Yoshi's Island (USA) (Rev 1).zip"
"Super Metroid (Japan, USA) (En,Ja).zip"
"Super Punch-Out!! (USA).zip"
)
for game in "${SNES_GAMES[@]}"; do
extract_game "$SNES_ZIP" "$SNES_PREFIX" "$SNES_DEST" "$game"
done
fi
# ---------------------------------------------------------------------------
# Summary
# ---------------------------------------------------------------------------
echo ""
echo "Done. extracted=$extracted skipped=$skipped not_found=$not_found"