A command-line tool for parsing and extracting Extended CPC DSK (eDSK) disk image files. Magneato provides a clean interface to inspect, unpack and pack DSK files into a structured directory format.
Currently experimental
- Parse DSK files: Read and validate Extended CPC DSK format files
- Inspect disk images: Display detailed information about tracks, sectors, and metadata
- Extract disk images: Unpack DSK files into a structured directory hierarchy with separate data and metadata files
- Go 1.16 or later
git clone <repository-url>
cd Magneato
go build -o magneatoOr run directly:
go run src/. <command> <filename.dsk>Magneato supports three commands:
Display detailed information about a DSK file:
magneato info disk.dskThis will show:
- Disk signature and creator information
- Number of tracks and sides
- Track-by-track breakdown with sector details
- Sector metadata including FDC status registers
Extract a DSK file into a structured directory:
magneato unpack disk.dskYou can also specify a --data-format that allows choices of binary, hex, quoted and asciihex. ASCIIHex is a compact human-readable format that shows ASCII where possible but toggles back and forth to HEX when needed. The final character in the string is the toggle character.
This creates a directory structure:
disk/
├── disk-image.meta # Disk-level metadata (JSON)
├── track-00-side-0/
│ ├── track.meta # Track metadata (JSON)
│ ├── sector-0.bin # Binary sector data
│ ├── sector-0.meta # Sector metadata (JSON)
│ ├── sector-1.bin
│ ├── sector-1.meta
│ └── ...
├── track-00-side-1/
│ └── ...
└── ...
- Root directory: Named after the DSK file (without extension)
- Track directories: Named
track-XX-side-Yfor multi-sided disks, ortrack-XXfor single-sided - Sector files:
sector-N.meta: Sector metadata in JSON formatsector-N.bin: Sector data in raw binary formatsector-N.hex: Sector data in hex formatsector-N.quote: Sector data in quoted-printable format
- Metadata files:
disk-image.meta: Disk header informationtrack.meta: Track header information
The reverse of unpack this combines the various files back into a .DSK file attempting to preserve precision and minimize data and meta loss.
Magneato supports both Standard and Extended CPC DSK formats:
- Disk Header: 256-byte header with signature, creator info, and track size table
- Track Blocks: Variable-length blocks containing track headers and sector data
- Sector Information: 8-byte descriptors with cylinder, head, sector ID, and FDC status
- Sector Data: Raw sector payloads with variable lengths
- Disk Header: 256-byte header with signature, creator info, and fixed track size
- Track Blocks: Fixed-size blocks (all tracks same size) containing track headers and sector data
- Sector Information: 8-byte descriptors (last 2 bytes unused) with cylinder, head, sector ID, and FDC status
- Sector Data: Raw sector payloads with fixed sizes per track
Note: Magneato can read both formats, but only Extended DSK format can be written (via the pack command).
.
├── main.go # Command-line interface and entry point
├── types.go # Type definitions and constants
├── parser.go # DSK file parsing logic
├── dsk.go # DSK methods (info, unpack, etc.)
└── README.md # This file
This project is dual-licensed under:
- Apache License 2.0 - See LICENSE-APACHE file for details
- MIT License - See LICENSE-MIT file for details
You may choose either license at your option.
Contributions are welcome! Please feel free to submit a Pull Request.
This tool with developed using AI tooling from Google (Gemini 3 Pro) and Cursor (default model).