ROM Add Screen - cressie176/Load64 GitHub Wiki

Primary Purpose

Add a new ROM file entry to a game.

Main Screen Design

┌──────────────────────────────────────────────────────────────────────────────┐
│ TOP BAR                                                                      │
│  <Game Title> > ROMs > Add                                                   │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  FORM                                                                        │
│  ┌────────────────────────────────────────────────────────────────────────┐  │
│  │                   ┌───────────────────────────────────────┐            │  │
│  │  File             │ -                                     │  [Browse]  │  │
│  │                   └───────────────────────────────────────┘            │  │
│  │                                                                        │  │
│  │                   ┌─────────────────────────────────────────────────┐  │  │
│  │  Label            │ _                                               │  │  │
│  │                   └─────────────────────────────────────────────────┘  │  │
│  │                                                                        │  │
│  │  [Save]   [Cancel]                                                     │  │
│  └────────────────────────────────────────────────────────────────────────┘  │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR                                                                   │
└──────────────────────────────────────────────────────────────────────────────┘

TOP BAR

Focusable: No
Interactive: No
Purpose: Identify the game these ROMs belong to

FORM

Type: Form
Focusable: Yes (primary focus region)
Interactive: Yes
Purpose: Select a ROM file and set its label

All fields are empty on entry.

File

The path to the ROM file on disk. Can be typed directly or selected via the OS file picker opened by [Browse]. When a file is selected, the Label field is automatically populated with a default derived from the filename (see Label below).

LoadC64 copies the selected file into the game's ROM directory. The ROM entry stores only the filename (not the original path) — the source file is not modified or moved.

Label

The display name shown when selecting or swapping disks (e.g. Disk 1, Side A, Save Disk).

When a file is selected, LoadC64 attempts to derive a default label using the following priority:

  1. Filename pattern — if the filename contains a number (e.g. disk1.d64, Disk_2.d64, game-tape2.tap), the label is derived as Disk <n>, Tape <n>, or Cartridge <n> based on the file extension.
  2. Single ROM — if this is the only ROM of its type, the label defaults to Disk 1, Tape 1, or Cartridge 1.
  3. Filename fallback — the filename without extension is used as the label.

The user can always edit the derived label before saving.

[Save] / [Cancel]

BOTTOM BAR

Focusable: No
Interactive: No
Purpose: Display validation errors

After a validation error:

├──────────────────────────────────────────────────────────────────────────────┤
│ BOTTOM BAR                                                                   │
│  <Error message>                                                             │
└──────────────────────────────────────────────────────────────────────────────┘

Validation Rules

Name Type Required Notes
File String Yes Must not be empty. Must be a supported ROM file. The filename (not the full path) must be unique among this game's ROMs (case-insensitive).
Label String Yes Must not be empty. Must be unique among this game's ROMs (case-insensitive).
⚠️ **GitHub.com Fallback** ⚠️