Next: The D71 disk image format, Previous: The D64 disk image format, Up: The emulator file formats [Contents][Index]

### 17.6 The X64 disk image format

(This section was contributed by Peter Schepers and slightly edited by Marco van den Heuvel.)

This file type, created by Teemu Rantanen, was used on the X64 emulator (a UNIX-based emulator) which has been superceeded by VICE. Both VICE and X64 support the X64 file standard, with VICE also supporting the regular D64 and T64 files.

Note that this ancient format is deprecated and subject for removal. It never got any momentum in the emulation community, and VICE never supported it for anything but 1541 disks.

X64 is not a specific type of file, but rather encompasses *all* known C64 disk types (hard disk, floppies, etc). An X64 is created by prepending a 64-byte header to an existing image (1541, 1571, etc) and setting specific bytes which describe what type of image follows. This header has undergone some revision, and this description is based on the 1.02 version, which was the last known at the time of writing.

The most common X64 file you will see is the D64 variety, typically 174912 bytes long (174848 for the D64 and 64 bytes for the header, assuming no error bytes are appended). The header layout (as used in 64COPY) is as follows:

          00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
          -----------------------------------------------
    0000: 43 15 41 64 01 02 01 23 00 00 00 00 00 00 00 00
    0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0040: XX XX XX <- standard C64 image starts here….

Bytes | Description
$00-$03 | This is the "Magic header" ($43 $15 $41 $64)
$04 | Header version major ($01)
$05 | Header version minor ($01, now its up to $02)
$06 | Device type represented
$07 | Maximum tracks in image (only in version 1.02 or greater) 1540/41/70: 35 1571: 35 1581: 80 (Logical single-sided disk)
$08 | Number of disk sides in image. This value must be $00 for all 1541 and 1581 formats. $00=No second side $01=Second side
$09 | Error data flag.
$0A-$1F | Unused, set to $00
$20-$3E | Disk image description (in ASCII or ISO Latin/1)
$3F | Always set to $00
$40- | Standard C64 file begins here.

The device types are:

Value | Drive type
$00 | 1540 See note below…
$01 | 1541 (Default)
$02 | 1542
$03 | 1551
$04 | 1570
$05 | 1571
$06 | 1572
$08 | 1581
$10 | 2031 or 4031
$11 | 2040 or 3040
$12 | 2041
$18 | 4040
$20 | 8050
$21 | 8060
$22 | 8061
$30 | SFD-1001
$31 | 8250
$32 | 8280

The first four bytes used for the device type at position $06 ($00 to $03) are functionally the same, and are compatible with older version of X64 files. Some old X64 files might have $00 for the device type (instead of $01), but it makes no real difference.

As most instances of X64 files will be strictly 1541 images, bytes $08-$3F are set to zero, and some versions of the X64 emulator don’t use bytes $08-$3F.

Next: The D71 disk image format, Previous: The D64 disk image format, Up: The emulator file formats [Contents][Index]