cpm_tools_syntax
Differences
This shows you the differences between two versions of the page.
| cpm_tools_syntax [2026/05/24 22:19] – created admin | cpm_tools_syntax [2026/08/02 21:29] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | For Northstar Micro-Disk * | + | ====== Using cpmtools ====== |
| - | List disk - cpmls -f mdsad350 your_image.img | + | cpmtools is a set of command-line utilities for reading, writing, and managing CP/M disk images from a modern OS. No emulator needed — you can inject or extract files directly. |
| - | Inject file - cpmcp -f mdsad350 your_image.img / | + | ===== The diskdefs File ===== |
| - | Extract File - cpmcp -f mdsad350 your_image.img 0:file.COM /path/to/local/file.COM | + | cpmtools has no way to auto-detect a disk's geometry — CP/M itself never standardized this — so every format you want to work with has to be defined in a **diskdefs** |
| + | < | ||
| + | Each entry looks like this: | ||
| + | < | ||
| + | diskdef mdsad350 | ||
| + | seclen 512 | ||
| + | tracks 70 | ||
| + | sectrk 10 | ||
| + | blocksize 2048 | ||
| + | maxdir 64 | ||
| + | boottrk 2 | ||
| + | skew 5 | ||
| + | os 2.2 | ||
| + | end | ||
| + | </ | ||
| + | |||
| + | If your disk image doesn' | ||
| + | |||
| + | ===== Basic Commands ===== | ||
| + | |||
| + | **# List directory contents of an image:** | ||
| + | < | ||
| + | |||
| + | **# Inject (copy in) a file:** | ||
| + | < | ||
| + | |||
| + | **# Extract (copy out) a file:** | ||
| + | < | ||
| + | |||
| + | **# Delete a file from an image:** | ||
| + | < | ||
| + | |||
| + | **# Change file attributes (Read-Only, System, Archive):** | ||
| + | < | ||
| + | Common attribute flags: | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | **# Change Unix-side file mode when extracting: | ||
| + | < | ||
| + | |||
| + | **# Check a CP/M filesystem for errors:** | ||
| + | < | ||
| + | |||
| + | **# Create a brand new, blank CP/M filesystem in an existing image file:** | ||
| + | < | ||
| + | |||
| + | **# Interactively browse/edit a raw image (advanced/ | ||
| + | < | ||
| + | |||
| + | ===== Notes on User Numbers ===== | ||
| + | |||
| + | CP/M disks support multiple "user areas" (0–15) on a single disk — think of them like separate namespaces on the same volume. That's the '' | ||
| + | < | ||
| + | |||
| + | ===== Disk Type Definitions ===== | ||
| + | |||
| + | The format name you pass to '' | ||
| + | |||
| + | ==== Northstar Micro-Disk System ==== | ||
| + | |||
| + | ^ Name ^ Description ^ Capacity ^ | ||
| + | | mdsad87 | ||
| + | | mdsad175 | Northstar MDS-A-D 175 — SSDD, 48 tpi, 5.25", 512-byte sectors x 10/track | ~175K | | ||
| + | | mdsad350 | Northstar MDS-A-D 350 — DSDD, 48 tpi, 5.25", 512-byte sectors x 10/track | ~350K | | ||
| + | |||
| + | All three use a 5-sector skew and CP/M 2.2. The 350K format is effectively the double-sided version of the 175K disk — same sector layout, twice the tracks. | ||
| + | |||
| + | ==== Other Common Vintage Formats ==== | ||
| + | |||
| + | ^ Name ^ Description ^ Capacity ^ | ||
| + | | ibm3740 | ||
| + | | osborne1 | ||
| + | | osborne4 | ||
| + | | kaypro2 | ||
| + | | kaypro4 | ||
| + | | apple2 | ||
| + | | nshd8 | Northstar Hard Disk, 8MB partition style image | 8MB | | ||
| + | |||
| + | ===== Tips ===== | ||
| + | |||
| + | * If '' | ||
| + | * CP/M filenames are limited to 8.3 uppercase characters — lowercase local filenames get silently uppercased on injection. | ||
| + | * Always extract a copy before editing/ | ||
cpm_tools_syntax.1779661148.txt.gz · Last modified: by admin
