CBMCONVERT(1)

πŸ“¦
version 2.1.6 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

okay bestie, buckle UP πŸ’– you just opened the manual page for cbmconvert, and it's section 1 of the General Commands Manual. tiny utility, enormous job. let's go.

✨ NAME ✨

cbmconvert β€” create, extract and convert various Commodore binary archives. that's it, that's the whole vibe. πŸŽ€

🌸 SYNOPSIS 🌸

cbmconvert [options] file...

πŸ’… DESCRIPTION πŸ’…

okay so first things first: this page is the (brief!) documentation for the cbmconvert command. 🫢

here's the whole problem. there are SO many archiving programs for the Commodore 64, and literally none of them play nice with archiving programs on other systems. incompatible. iconic behaviour honestly. so cbmconvert shows up to fix exactly that. it extracts files from most known formats and writes them back out in several different formats β€” including some formats that certain Commodore 64 emulators use. πŸ‘‘

here's the format tour:

Native (raw) files

files that are just the raw data, no garnish. written with the -I and -N options, read with the -n option.

PC64 files

also known as "P00" files (iykyk). written with the -P option, read with the -p option.

Lynx archives

Lynx was originally developed for the Commodore 64. what it does: it modifies the next-sector links in place, and combines a number of files on a Commodore disk into a single file that can be transferred, e.g. over a modem connection. 🌈

now the messy part, and I need you to hear me: earlier versions of this format do not specify the length of the last contained file, so nothing protects that file from padding that could get introduced, e.g. by the X-modem transfer protocol. and there are no checksums on the data either. πŸ’€

Lynx archives are written with -L and read with -l.

Commodore C2N tape archives

written with -C, read with -c. these files are raw dumps of the data format that the Commodore KERNAL routines maintain. block checksums and countdown leaders (0x89..0x81 for the first copy and 9..1 for the second) are omitted, and the blocks are not stored twice β€” only once. the data consists of 192-byte tape header blocks, 192-byte data file blocks, and arbitrary-length program file blocks.

Commodore 128 CP/M disk images

written with -M, read with -m.

CBM DOS disk images

written with -D, read with -d. ⚠️ heads up though: Commodore 1571 and 1581 support have not been tested properly, and not all 1581 features have been implemented.

ARC/SDA (Self-Dissolving Archive)

read with -a. no write support. (not me being read-only 😭)

Arkive

Arkive archives in this Lynx-like format are read with the -k option. there is no write support.

T64

this tape format was introduced by the C64S emulator. many variations of this format exist. these files are read with the -t option.


okay so the big picture: cbmconvert reads all files in all input files listed on the command line, and writes them in the specified format. ✨

and here's a thing you should know: there is no interactive user interface. so the only way to copy only some files from a set of archive files into an archive file or a disk image is to extract all the files to a single-file format such as the PC64 format, and then copy the desired individual files to the output archive with another invocation of cbmconvert. two trips. it's fine. we love a two-step. πŸ’…

πŸŽ€ OPTIONS πŸŽ€

cbmconvert follows the usual Unix command line syntax, with options starting with a dash (`-`). classic. πŸ’–

  • -- β€” stop processing options. super useful if the first file name begins with a dash.
  • -I β€” output files in native (raw) format, with ISO 9660 compliant file names.
  • -P β€” output files in PC64 format.
  • -N β€” output files in native (raw) format.
  • -L archive.lnx β€” output files in Lynx format.
  • -C archive.c2n β€” output files in Commodore C2N tape format.
  • -D4[d|o] image.d64 β€” write to a Commodore 1541 CBM DOS disk image. the o option specifies that file name collisions should be resolved by overwriting existing files. the d option specifies that duplicate file names be allowed. the default behaviour is keep the old files.
  • -D7[d|o] image.d71 β€” write to a Commodore 1571 CBM DOS disk image.
  • -D8[d|o] image.d81 β€” write to a Commodore 1581 CBM DOS disk image.
  • -M4[d|o] image.d64 β€” write to a Commodore 1541 disk image in the Commodore 128 CP/M format.
  • -M7[d|o] image.d71 β€” write to a Commodore 1571 disk image in the Commodore 128 CP/M format.
  • -M8[d|o] image.d81 β€” write to a Commodore 1581 disk image in the Commodore 128 CP/M format.
  • -i2 β€” switch disk images when running out of space or a duplicate file name is detected.
  • -i1 β€” switch disk images when running out of space. this is the default behaviour.
  • -i0 β€” never switch disk images.
  • -o2 β€” write files even with duplicate names. if the -N option is in effect, this will be treated as -o0.
  • -o1 β€” skip files with duplicate names (except the first one).
  • -o0 β€” stop if a duplicate file name is found. this is the default behaviour.
  • -n β€” input files in native (raw) format.
  • -p β€” input files in PC64 format.
  • -a β€” input files in ARC/SDA format.
  • -k β€” input files in Arkive format.
  • -l β€” input files in Lynx format.
  • -t β€” input files in T64 format.
  • -c β€” input files in Commodore C2N format.
  • -d β€” input files in CBM DOS disk image format.
  • -m β€” input files in Commodore 128 CP/M disk image format.
  • -v2 β€” verbose mode. display all messages.
  • -v1 β€” display warning and error messages. this is the default option.
  • -v0 β€” display error messages only.

πŸ’€ BUGS πŸ’€

okay, deep breath bestie. 🫠

  • many of the file formats lack safety measures, such as storing the exact lengths of the contained files, or storing even rudimentary checksums. πŸ’€
  • most formats have been reverse-engineered, and there may be other implementations that accept files in a stricter format than cbmconvert produces, or produce files that cbmconvert does not recognize.
  • on disk images, it is common to decorate directory listings with unnecessary entries that contain Commodore-specific graphic characters. and since subdirectories were not supported by Commodore until the 1581 disk drive was introduced, the slash character (/) is valid in Commodore file names but not on the Unix system. for these reasons, it is advisable to avoid the raw file format and the host file system whenever possible, and to convert directly from one Commodore-specific format to another. πŸ™ˆ
  • the program lacks an interactive user interface. a shell-like command line interface could be useful, and a graphical file manager like interface could be even better. are there any volunteers? πŸ‘€
  • more disk image formats should be supported, and the 1571 and 1581 support should be tested extensively. unsupported formats include the 8050, the 8250, the 2040 and the Commodore 64 CP/M format for the 1541.

πŸ‘‘ AUTHOR πŸ‘‘

  • the cbmconvert utility was designed and implemented by Marko MΓ€kelΓ€.
  • support for Commodore 1581 disk images was programmed by Pasi Ojala.
  • the ARC/SDA dissolving code was originally written by Chris Smeets.

πŸ”₯ SEE ALSO πŸ”₯

c2n(1), disk2zip(1), zip2disk(1).


and that's the whole page, bestie!! πŸ’– this one is dated July 6, 2024 and it lives as CBMCONVERT(1) β€” go forth and convert, you've absolutely got this, no cap. πŸ¦‹βœ¨

πŸ“¦ where this page comes from