dtools

Crates.iodtools
lib.rsdtools
version0.1.1
sourcesrc
created_at2024-08-01 03:25:45.214018
updated_at2024-08-11 16:12:31.285826
descriptionA collection of tools for working with Commodore disk images
homepagehttps://github.com/vschwaberow/dtools
repositoryhttps://github.com/vschwaberow/dtools
max_upload_size
id1321540
size37,525
Volker Schwaberow (vschwaberow)

documentation

README

dtools

A Rust-based command-line utility for manipulating Commodore 64 D64 disk images, offering a Rust library to use in other projects.

Features

  • 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

Building

Requires Rust 1.54 or later.

cargo build --release

The binary will be in target/release/dtools.

Usage

Create a new D64 image

dtools create -f newdisk.d64 -t 35

Format a D64 image

dtools format -f mydisk.d64 -n "MY DISK" -i "01"

List files on a D64 image

dtools list -f mydisk.d64

Insert a file

dtools insert -f mydisk.d64 -n "MYFILE" -i /path/to/input/file

Extract a file

dtools extract -f mydisk.d64 -n "MYFILE" -o /path/to/output/file

Read a sector

dtools read -f mydisk.d64 -t 18 -s 0

Write to a sector

dtools write -f mydisk.d64 -t 18 -s 0 -d "0123456789ABCDEF"

Show BAM

dtools show-bam -f mydisk.d64

Find a free sector

dtools find-free-sector -f mydisk.d64

Library Usage

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(())
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Commit count: 0

cargo fmt