ℹ️ Note
A more thorough introduction/analysis is available as RomVault, Retool, fixDat & Digital Preservation.
I’ve mentioned in 更新强迫症#游戏 that rsync server in linked post shut down in April. It took me a while to try out different ideas for sufficient romset update, and while this post is more updated, the theory and analysis in ROM is still valid. Sadly, I’m still not in the mood to talk about digital preservation and this is only a TLDR of ROM update.
This assumes everything is already configured to match No-Intro/Redump romset, only minimal config example is provided in #Config.
TLDR
- Download newer DATs via browser/script
- No-Intro DAT Files, all in one pack / table d’hôte
- Redump DAT Files, pick & download / à la carte
- browser > redump-highlight.user.js
- script >
update-dat.sh
- 模拟游戏中文数据站
- Unpack DATs to
ROMVault\DatRoot
- No-Intro > pwd, aka.
DatRoot
- Redump >
DatRoot\Redump
- No-Intro > pwd, aka.
- Prepare selected DATs via
init-retool-dat.sh
(rsync)- Only include necessary romset to speed up retool
- Order matters, see script comment
- Filter DAT in retool
- Add DAT files recursively from quick import folder
- Remove CHS DATs
- Process DAT Files
- Update database in RomVault
- Update DATs
- Scan ROMs
- Find Fixes (do NOT
fix ROMs
yet)
- Fix romset
- Round One
- Select romset with missing ROMs, right click and choose
Save fix DATs
- Get missing ROMs via
fixDat.sh
(rclone) toROMVault\ToSort
1 - RomVault: Scan Quick -> Find Fixes -> Fix ROMs
- Select romset with missing ROMs, right click and choose
- Round Two
- Repeat 6.1-6.3 with a newer romset2 somewhere else
- Get last few missing ROMs somehow
- Check
ROMVault\ToSort
again and clean up ROMs
- Round One
- Update playlist in RetroArch
- Refresh playlist
- Clean playlist
- Merge/Sync new romset
TLDR²
- Get newer DATs
- No-Intro DAT Files, unpack to
ROMVault\DatRoot
update-dat.sh
- No-Intro DAT Files, unpack to
init-retool-dat.sh
- Retool
- Add DAT files recursively from quick import folder
- Remove CHS DATs
- Process DAT Files
- See point 5-8 in #TLDR
Config
RomVault:
- Set
DatRoot
toDatRoot\Retool
- NOT
DatRoot
! - NOT
DatRoot
! - NOT
DatRoot
!
- NOT
- DirMapping
- Main ROM directory: map
path\to\RetroArch\roms
asRomVault
- Sub collection: map
E:\external\disk\path\roms\No-Intro\Nintendo - Nintendo 3DS (Decrypted)
asRomVault\No-Intro\Nintendo - Nintendo 3DS (Decrypted)
- Main ROM directory: map
- Add
*BIOS*
,*中文游戏合集
toIgnoreFiles
Retool:
- output:
path\to\retool-win-x86-64
- quick import folder:
ROMVault\DatRoot\Retool
RetroArch playlist:
scan_dat_file_path
&scan_filter_dat_content
are not enabled as DAT files have timestamp suffix. While it can be easily renamed, I’ve already dedup ROMs in RomVault so using it here would not have much benefit"scan_overwrite_playlist": false
ensures ROMs are not deleted as soon as I refresh playlist. This is used as sometimes I don’t want/have full copy of a gigantic romset
// /path/to/RetroArch/playlists/Sega - 32X.lpl
{
"version": "1.5",
"default_core_path": "/path/to/RetroArch/cores/picodrive_libretro.so",
"default_core_name": "Sega - MS/GG/MD/CD/32X (PicoDrive)",
"base_content_directory": "/home/redacted/Game",
"label_display_mode": 0,
"right_thumbnail_mode": 0,
"left_thumbnail_mode": 0,
"thumbnail_match_mode": 0,
"sort_mode": 0,
"scan_content_dir": "/path/to/RetroArch/roms/No-Intro/Sega - 32X",
"scan_file_exts": "",
"scan_dat_file_path": "",
"scan_search_recursively": true,
"scan_search_archives": true,
"scan_filter_dat_content": false,
"scan_overwrite_playlist": false,
"items": [
{}
]
}
- Simple Migration/Mirroring to another platform
- Change path
- Refresh playlist
- Clean playlist
Structure
- No-Intro files (unar)
- No-Intro
- Non-Redump
- Source Code
- Unofficial
- index.txt
- Redump & CHS (wget)
dat-*.list
- update-dat.sh
- Retool (rsync)
exclude-*.txt
include-*.txt
- init-retool-dat.sh
$ cd /path/to/ROMVault/DatRoot
$ tree -L 1 ./
./
├── .bak (backup of previous dat)
│ ├── CHS
│ ├── No-Intro
│ └── Redump
├── CHS
├── dat-chs-cm.list (wget)
├── dat-chs-ol.list (wget)
├── dat-chs.list -> dat-chs-cm.list
├── dat-redump.list (wget)
├── exclude-nointro.txt (rsync)
├── exclude-redump.txt (rsync)
├── include-nointro.txt (rsync)
├── include-redump.txt (rsync)
├── index.txt
├── init-retool-dat.sh (rsync)
├── No-Intro
├── Non-Redump
├── Redump
├── Retool (retool processed dat)
│ ├── CHS (simple rsync)
│ ├── No-Intro
│ └── Redump
├── Source Code
├── Unofficial
├── update-dat.sh (wget)
Script
TBA
Download
Many ways to download missing ROMs from remote server:
- HTTP: most obvious one, download via browser
FTP: similar to HTTP, server down with RsyncRsync, fixDat4rsync.sh, see ROM#RsyncWget, fixDat4http.sh, blocked by server, HTTP303 See Other
redirect- #Rclone (recommeded), works just like rsync, but easier
- Bad boy behavior:3 fake UA, headless browser automation
- …
Rclone
Showcase only, figure out how to setup yourself:
# prepare
cd $SIMPATH/RetroArch
ROMSET="Apple-Bandai - Pippin (Floppies)"
# list remote roms
rclone lsf "remote:No-Intro/${ROMSET}"
# dumb way to download
rclone copy "remote:No-Intro/${ROMSET}/Replace With Real ROM Name (Japan) (v1.03).zip" "roms/No-Intro/${ROMSET}"
# sync w/ remote the smart way
rclone --dry-run sync "remote:No-Intro/${ROMSET}/" "roms/No-Intro/${ROMSET}/"
# or more well-rounded, better than `--include-from` & `--exclude-from`
rclone -v --ignore-existing --update --max-size="200m" --no-update-modtime --filter-from="fixDat.list" sync "remote:No-Intro/${ROMSET}/" "roms/No-Intro/${ROMSET}/"
Example fixDat.list
:
+ [BIOS] 32X M68000 (USA).zip
- [BIOS] 32X SH-2 Master (USA).zip
- [BIOS] 32X SH-2 Slave (USA).zip
This is important. If you sync inplace with a newer romset, some ROMs would be moved to
ROMVault\ToSort
. This does NOT necessarily conclude that they are not the right ROM, sometimes fix ROMs can solve interity issue. ↩︎This is usually not an issue if you don’t care about 100% collection or hardly update your romsets (read: once every year). This bothers me because I’m using the lastest DAT files. If you download accompanied DAT file with the same romset, it’s almost guaranteed to be complete. ↩︎
I always try to act nicely and in this case, by syncing on demand, thus saving my time & bandwidth, and server resources & bandwidth. It does not make the server overload, does not leech bandwidth, does not send unnecessary request. Many crawlers can be used this way (which is named innocent crawler by myself), but bad guys just tend to ignore others’ happiness and rob whatever they want (sinful crawler) w/o rate limit, request reuse, what-so-ever. ↩︎