A Rust-based command-line utility for manipulating Commodore 64 D64 disk images, offering a Rust library to use in other projects.
- Create and format D64 images (35 or 40 tracks)
- List, extract, and insert files
- Read and write individual sectors
- Manage Block Availability Map (BAM)
- PETSCII/ASCII conversion
Requires Rust 1.54 or later.
cargo build --release
The binary will be in target/release/dtools
.
dtools create -f newdisk.d64 -t 35
dtools format -f mydisk.d64 -n "MY DISK" -i "01"
dtools list -f mydisk.d64
dtools insert -f mydisk.d64 -n "MYFILE" -i /path/to/input/file
dtools extract -f mydisk.d64 -n "MYFILE" -o /path/to/output/file
dtools read -f mydisk.d64 -t 18 -s 0
dtools write -f mydisk.d64 -t 18 -s 0 -d "0123456789ABCDEF"
dtools show-bam -f mydisk.d64
dtools find-free-sector -f mydisk.d64
dtools
can also be used as a library in other Rust projects:
use d64lib::{D64, D64Error};
fn main() -> Result {
let mut d64 = D64::from_file("mydisk.d64")?;
let files = d64.list_files()?;
println!("Files on disk: {:?}", files);
Ok(())
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.