65 6502 SBC FPGA
← Overview
Overview / Component 05
Storage

D64 GoDrive $8824

A virtual disk drive: the FPGA reads .d64 images off an SD card and exposes a simple drive to the 6502 — the whole filesystem lives in logic.

What it is

The D64 GoDrive lets the 6502 load programs from a .d64 disk image. These images live on a second SD card (the sd2_* data disk, FAT32-formatted); the first card with the ROM loader is untouched. The trick: all FAT32 and D64 parsing happens in FPGA logic. The 6502 only ever sees plain 256-byte sectors and never has to parse FAT32.

The D64 format is borrowed from Commodore for convenience, not for C64 compatibility. The loaded programs are this system's own code.
Medium
2nd SD card · FAT32
Register
$8824
Sector size
256 bytes (D64)
Status
HW-verified (2026)

What it does

From EhBASIC, the drive is operated with familiar commands:

CommandEffect
LOAD "!"Interactive arrow-key menu of all .d64 images
LOAD "$"List the directory of the mounted image
LOAD "NAME"Load a program (printing its CALL address)
CALL <addr>Run the loaded program

Structure in logic

Four RTL layers under rtl/core/peripherals/ work together:

Robust against real SD cards

Windows-formatted SD cards are often superfloppy (no MBR, BPB at LBA 0) with large geometry, and contain entries such as System Volume Information, long-filename entries or a deleted .D64 before the wanted file. The reader handles all of these. Verified on a real 32 GB card: mount the image, read the BAM, list the directory and load a program into the correct address range.

Tooling

Under tools/d64/ sit Python tools that use the same sector mapping as the hardware: create images (create_test_d64.py), list them, extract programs and build FAT32 card images for simulation.