Audit - cressie176/Load64 GitHub Wiki

1. Overview

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.

2. Game Discovery

The audit scans each subdirectory of games_directory whose name matches the <slug>--<id> pattern.

  • New directory, no matching Game row — the user is taken through the import process to register the game, create its ROMSet signature, and optionally link to third party catalogues. The audit does not auto-create games.
  • Existing Game row — the game is audited as described in sections 3–6 below.
  • Game row with no matching directoryGameState.launch_available is set to false.

3. ROM Audit

For each game, the audit checks every ROM row:

  • If roms/<filename> does not exist — GameState.launch_available is set to false.
  • If the file exists but its hash differs from the stored value — a warning is logged. launch_available remains true as the ROM may still be playable.

If all ROM files are present, GameState.launch_available is set to true.

4. Snapshot Audit

For each game, the audit checks:

  • snapshots/quickstart.vsf — sets GameState.quickstart_available accordingly.
  • Autosave rows — sets GameState.continue_available to true if at least one exists.

5. Media Audit

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.

6. GameState Summary

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
⚠️ **GitHub.com Fallback** ⚠️