Technical Info

DC2N format (.DMP)

The DC2N format is used for tape recording and dumping operations. For comparison, the standard DC2N counter rate (2 MHz) is about 16 times higher than the one used by the TAP format (123.156 kHz). Each sample is the delay, expressed in clock cycles (at counter rate), between two consecutive rising [falling] edges. On a Commodore computer these occur at the computer’s write line [datassette read line] when recording [playing back] a tape, respectively.
0xFFFF at 16 bits per sample, and more in general the max value for a sample, is an overflow value, meaning that subsequent samples should be summed to this one to build up the total delay, up to the first non-0xFFFF sample (included).

The dc2nconv software is provided to convert DC2N 16-bit files to TAP v1 files, which are already supported by many emulators and tools.

Anybody can support the DMP format in their own software, as long as the following conditions are met:

  • DMP files must only be written using a hard real-time system used for doing the sampling
  • DMP files must NOT be edited: that includes trimming, splitting, enhancing, or correcting them (only exception being manual changes required to restore corrupted data: when that happens, both the original and restored DMP files together with a detailed report of the changes have to be bundled together and made available at the same time, i.e. not just “upon request”)
  • DMP files can be used for waveform generation, both in hardware or software
  • DMP files can be converted to TAP format (preferably version 1 or later)

Version 0

DC2N version 0 DMP format specification:

Offset Size Description
0x00 12 bytes ID string: “DC2N-TAP-RAW”
0x0C 1 byte Format version: 0
0x0D 1 byte Machine for which the tape content is intended

  • 0 = Commodore 64, Generic
  • 1 = VIC 20
  • 2 = Commodore 16, Plus/4

This information is only used to convert to TAP format.

0x0E 1 byte Video standard for which the tape content is intended

  • 0 = PAL
  • 1 = NTSC

This information is only used to convert to TAP format

0x0F 1 byte Bits per sample: 16 in DC2N
0x10 4 bytes Counter rate (LSBF) [Hz]: 2000000 in DC2N (0x80 0x84 0x1E 0x00)
0x14 any Samples (LSBF).

Version 1

DC2N version 1 DMP format specification:

Offset Size Description
0x00 12 bytes ID string: “DC2N-TAP-RAW”
0x0C 1 byte Format version: 1
0x0D 1 byte Lower 4 bits: Machine for which the tape content is intended

  • %0000 = Commodore 64, Generic
  • %0001 = VIC 20
  • %0010 = Commodore 16, Plus/4

Upper 4 bits: Type of event used to define pulse start/end

  • bit 4:
    0 = dump (starts at a falling edge)
    1 = record (starts at a rising edge)
  • bit 5:
    0 = measure length of 0+1 states as a whole
    1 = measure length of 0 and 1 states individually
  • bits 6-7:
    reserved for future use (must be clear)

This information is only used to convert to TAP format.

0x0E 1 byte Video standard for which the tape content is intended

  • 0 = PAL
  • 1 = NTSC

This information is only used to convert to TAP format

0x0F 1 byte Bits per sample: 16 in DC2N
0x10 4 bytes Counter rate (LSBF) [Hz]: 2000000 in DC2N (0x80 0x84 0x1E 0x00)
0x14 any Samples (LSBF).

Although DMP version 1 with all 4 event bits clear is equivalent to DMP version 0 (for tape dumps only), the latter is preferred due to the number of DMP version 0 files already available at this stage.
DMP version 1 is recommended only for those cases where recording the 0-state and 1-state of square waves is necessary (e.g. for C16, where the MCU is capable of detecting such states individually and a few turbo loaders take advantage of that – such as the turbo loaders used by some freezer).

PETSCII format (.PET)

The PETSCII format was designed for exchanging PETSCII graphics between graphic editors, such as Marq’s PETSCII Editor (November 2020 Edition), and the C64 Raster Effect Editor.

Specification:

Offset Size Description
0x00 1 byte Screen width in chars (40 for a whole C64 screen)
0x01 1 byte Screen height in chars (25 for a whole C64 screen)
0x02 1 byte Border color ($D020)
0x03 1 byte Background color ($D021)
0x05 1 byte
  • 0 = Uppercase PETSCII set
  • 1 = Lowercase PETSCII set
0x06 width*height bytes Video RAM data
0x06 + width*height width*height bytes Color RAM data