Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

D64 Inspector

D64 Inspector 2.0 is a Linux application written in C with a GTK 4 graphical interface for inspecting and editing standard 35-track Commodore D64 disk images.

It combines a Commodore-style directory and file view with a raw sector editor, Block Availability Map (BAM) display, disk statistics, file-management operations, and tools for examining the underlying D64 structure.

Contents

Features

D64 Inspector can:

  • Open, inspect, edit, and save standard Commodore D64 disk images.
  • Create a new D64 disk image and set its disk name.
  • Display the disk directory and follow the track/sector chains belonging to files.
  • Examine and edit individual 256-byte sectors in hexadecimal and PETSCII form.
  • Display the BAM graphically and show free/allocated sectors.
  • Validate a disk and rebuild its BAM in a manner similar to the Commodore COLLECT command.
  • Display disk and file statistics.
  • Extract files from a D64 image.
  • Add files to a D64 image.
  • Rename files and change directory-entry file types.
  • Rename the disk.
  • Scratch files or wipe their allocated sectors.
  • Import binary data into selected disk sectors and export selected disk data to a binary file.
  • Fill or copy ranges of disk data.
  • Toggle upper/lower-case PETSCII display.
  • Display PETSCII and UTF-8 character-set/codepoint reference windows.
  • Convert between hexadecimal and decimal values.
  • Open the bundled HTML user guide in the desktop's default browser.

Screenshots

Click a thumbnail to view the full-size image. A dedicated screenshot gallery is also available.

D64 Inspector directory view
Directory
D64 Inspector sector editor
Sector editor
D64 Inspector Block Availability Map view
Block Availability Map
D64 Inspector disk statistics view
Disk statistics

Supported D64 format

D64 Inspector currently targets standard 35-track D64 images containing 174,848 bytes. The disk geometry is:

Tracks Sectors per track Total sectors
1-17 21 357
18-24 19 133
25-30 18 108
31-35 17 85
Total 683

Track numbers begin at 1 and sector numbers begin at 0.

Extended 40/42-track D64 images and D64 images containing appended error-information bytes are not presently supported.

D64 Inspector can read and manipulate existing REL directory entries, but adding a new REL file is not currently implemented.

Requirements

D64 Inspector was developed for Linux. Building the current version requires:

  • GTK 4.10 or newer
  • A C compiler such as GCC or Clang
  • pkg-config
  • GNU Make

GTK 4.10 is required because the program uses GtkFileDialog, GtkAlertDialog, and GtkFileLauncher.

On Ubuntu or Debian, install the normal development packages with:

sudo apt install build-essential pkg-config libgtk-4-dev

PETSCII font

For the intended PETSCII display, install the C64 Pro Mono font. It is available from the Style64 C64 TrueType Fonts page.

The expected font filename is:

C64_Pro_Mono-STYLE.ttf

Building

Clone the repository and build from the src directory:

git clone https://github.com/pdbuchan/d64-inspector.git
cd d64-inspector/src
make

The resulting executable is named inspector.

Useful Makefile targets are:

Command Purpose
make Build D64 Inspector.
make check-deps Verify that GTK 4.10 or newer and pkg-config are available.
make flags Display the compiler, warning, include, and linker settings.
make clean Remove the executable, object files, and dependency files.

Running

Run D64 Inspector from the src directory:

./inspector

The program currently opens several support files by relative pathname, including its GTK Builder .ui files, stylesheets, newdisc_template, and the HTML user guide. Running it from another working directory may therefore prevent some parts of the interface from loading correctly.

No elevated privileges are required.

User guide

The complete user guide is supplied as src/guide.html, with presentation rules in src/guide.css.

From D64 Inspector, select Help → User Guide. GTK hands the local HTML file to the desktop's default browser; D64 Inspector does not embed a web browser engine.

The guide includes information about:

  • Building and running the program
  • Installing the PETSCII font
  • Using the sector editor
  • Changing file types
  • D64 track and sector geometry
  • Available-block calculations and the BAM
  • Commodore file-type codes

Repository layout

d64-inspector/
├── README.md
├── images/
│   ├── README.md
│   ├── *_thumb.jpg
│   └── *.jpg
└── src/
    ├── README.md
    ├── COPYING
    ├── Makefile
    ├── *.c / main.h
    ├── *.ui
    ├── *.css
    ├── guide.html
    └── newdisc_template

The src/README.md file gives a source-oriented overview of the main implementation areas.

License

Copyright © 2024-2026 P. David Buchan.

The D64 Inspector source code is free software licensed under the GNU General Public License, version 3 or any later version. A copy of the GPL is provided in src/COPYING.

The bundled user guide is distributed under the GNU Free Documentation License, version 1.3 or any later version, with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. The license text is included in guide.html.

About

A C language program that can be used to examine and edit a Commodore D64 file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages