jennifer registry

@mplx/d64

Read, write, create and format Commodore 1541 D64 disk images: CBM DOS 2A directories, BAM allocation, PETSCII names, and the 40-track SpeedDOS / DolphinDOS / PrologicDOS extensions

d64commodorec641541cbm-dos

Every published version of this deck has been yanked. Nothing here will be chosen by a new install. A lockfile that already pins one of these versions keeps working.

Versions

VersionStatusKindPinRequiresEnginesCapabilities
0.1.0yankedgit8cf5c053fe21-jennifer >=0.25.0 jennifer-tiny >=0.25.0-

License

LGPL-3.0-only

Source

Released from
0.1.0
Published under
@mplx mplx
Repository owner
deckyard

Resolutions

Times a client asked this registry where to find this deck. Not downloads: the registry only stores metadata, and the code is fetched from its repository directly, so we never see an install and cannot count one. Repeated builds inflate these numbers; installs from an existing lockfile do not appear at all. Counted in UTC.

Readme

@mplx/d64

test Documentation release

Read, write, create and format Commodore 1541 D64 disk images from Jennifer.

A D64 is a byte-for-byte copy of a 5.25" floppy: 683 blocks of 256 bytes, holding CBM DOS 2.6 - a Block Availability Map in sector 18/0, a chain of 32-byte directory slots from 18/1, one linked list of blocks per file. This deck implements all of it in pure Jennifer: build images for an emulator or a real drive, inspect or repair existing ones, bulk-extract an archive, without c1541.

Read the documentation

Usage

use io;
import "@mplx/d64/" as d64;

def img as d64.Image init d64.formatDisk("sample disk", "01");
$img = d64.writeText($img, "readme", d64.FileType.Seq, "hello from jennifer\n");
$img = d64.writeProgram($img, "demo", 0x0801, $code);

io.printf("%s", d64.directoryText($img));
# 0 "sample disk     " 01 2a
#    1 "readme"            seq
#    3 "demo"              prg
# 660 blocks free.

d64.save($img, "sample.d64");

What it does

Value-semantic throughout: a mutator returns a fresh Image and leaves its argument alone.

Install

jvc add @mplx/d64

Or vendor the src/ subtree by hand from a release archive.

Requirements

Jennifer 0.25.0 or newer. No network, subprocess or database: the filesystem is built from bytes and bitwise operations, so the deck runs unchanged on jennifer-tiny. Only open and save touch the disk, through fs.

Development

tools/version.sh                     # the version the git tags imply
tools/inject-version.sh              # stamp it into src/topics/version.j
jennifer test src/d64_test.j         # the white-box overlay
jennifer lint src/d64.j              # the compilable unit
jennifer fmt -l src examples         # formatting
tools/check-headers.sh               # SPDX + interpreter floor
tools/check-overlays.sh              # every topic has a test
tools/check-docs.sh                  # docs match the code: signatures,
                                     #   docblocks, links, claimed values
tools/check-examples.sh              # every example still runs
tools/pack.sh dist                   # the release archive, as CI builds it
grimoire build                       # the documentation site

Licence

LGPL-3.0-only. Every source file carries the SPDX header, and tools/check-headers.sh keeps those in step with deck.toml.

This deck as JSON