ZXSTBETADISK

Each disk drive connected to the Beta 128 disk interface will have one of these blocks, if a disk is inserted. They follow the ZXSTBETA128 block which identifies the number of drives.

// Beta 128 disk image

// Flags
#define ZXSTBDF_EMBEDDED      1
#define ZXSTBDF_COMPRESSED    2
#define ZXSTBDF_WRITEPROTECT  4

// Disk image types
#define ZXSTBDT_TRD         0
#define ZXSTBDT_SCL         1
#define ZXSTBDT_FDI         2
#define ZXSTBDT_UDI         3

typedef struct _tagZXSTBETADISK
{
  ZXSTBLOCK blk;
  DWORD dwFlags;
  BYTE chDriveNum;
  BYTE chCylinder;
  BYTE chDiskType;
  union {
    CHAR szFileName[1];
    BYTE chDiskImage[1];
  };
} ZXSTBETADISK, *LPZXSTBETADISK;

Members

blk

The block header. The block id is ZXSTBID_BETADISK ('B', 'D', 'S', 'K').

dwFlags

Various flags. This can be a combination of:

Flag

Meaning

ZXSTBDF_EMBEDDED

The actual disk image is embedded in this block.

ZXSTBDF_COMPRESSED

If ZXSTBDF_EMBEDDED is also set, the disk image in this block is compressed using the Zlib compression library.

ZXSTBDF_WRITEPROTECT

Specifies whether or not the disk image is write-protected.

chDriveNum

Specifies the drive to insert this disk image into (0-3).

chCylinder

The cylinder the drive heads are currently over (0-86).

chDiskType

Specifies the type of disk image. This can be one of:

Value

Meaning

ZXSTBDT_TRD

The disk image is in the .trd format.

ZXSTBDT_SCL

The disk image is in the .scl format.

ZXSTBDT_FDI

The disk image is in the .fdi format.

ZXSTBDT_UDI

The disk image is in the Ultra disk image (.udi) format.

szFileName

The file name of the disk image which should be opened and inserted into this drive, if the disk image is not embedded.

chDiskImage

If the disk image is embedded, this member is the (possibly compressed) disk image to be inserted into this drive.

Remarks

These blocks follow the ZXSTBETA128 block which identifies the number of drives.

When loading this block, you should use the chDiskType member to determine the disk image format, rather than the file extension of szFileName.

Revision history

Available since version 1.2