Audit - cressie176/Load64 GitHub Wiki
The audit process scans the games_directory to synchronise the database with the filesystem. It runs on first launch (after games_directory is configured) and can be triggered manually at any time from the Admin Hub.
The audit does not modify game configuration — it only updates GameState and logs warnings. It never deletes database records.
The audit scans each subdirectory of games_directory whose name matches the <slug>--<id> pattern.
-
New directory, no matching
Gamerow — the user is taken through the import process to register the game, create itsROMSetsignature, and optionally link to third party catalogues. The audit does not auto-create games. -
Existing
Gamerow — the game is audited as described in sections 3–6 below. -
Gamerow with no matching directory —GameState.launch_availableis set tofalse.
For each game, the audit checks every ROM row:
- If
roms/<filename>does not exist —GameState.launch_availableis set tofalse. - If the file exists but its hash differs from the stored value — a warning is logged.
launch_availableremainstrueas the ROM may still be playable.
If all ROM files are present, GameState.launch_available is set to true.
For each game, the audit checks:
-
snapshots/quickstart.vsf— setsGameState.quickstart_availableaccordingly. -
Autosaverows — setsGameState.continue_availabletotrueif at least one exists.
For each game, the audit checks for the presence of each media file and updates the corresponding GameState flag. Files that exist but have incorrect dimensions are logged as warnings — the flag is still set to true since the file exists and LoadC64 will scale it.
| File | GameState field |
|---|---|
| media/cover-thumbnail.png | cover_available |
| media/gameplay-screen.png | gameplay_screen_available |
| media/loading-screen.png | loading_screen_available |
| media/title-screen.png | title_screen_available |
See Media for expected dimensions.
| Field |
true when |
|---|---|
| launch_available | Game directory exists and all ROM files are present |
| quickstart_available |
snapshots/quickstart.vsf exists |
| continue_available | At least one Autosave row exists for the game |
| cover_available |
media/cover-thumbnail.png exists |
| gameplay_screen_available |
media/gameplay-screen.png exists |
| loading_screen_available |
media/loading-screen.png exists |
| title_screen_available |
media/title-screen.png exists |