[ Spectaculator, ZX Spectrum Emulator ] Home | Downloads | Support [ ZX Spectrum Image ]

Table of contents

The zx-state file format
Block types

ZXSTOPUS

Discovery disk interface by Opus Supplies.

Any blocks specifying which disk files are in which drive will follow this one.

// Flags
#define ZXSTOPUSF_PAGED        1
#define ZXSTOPUSF_COMPRESSED   2
#define ZXSTOPUSF_SEEKLOWER    4
#define ZXSTOPUSF_CUSTOMROM    8


typedef struct _tagZXSTOPUS
{
  ZXSTBLOCK blk;
  DWORD dwFlags;
  DWORD dwcbRam;
  DWORD dwcbRom;
  BYTE chCtrlRegA;
  BYTE chPeripheralRegA;
  BYTE chDataDirRegA;
  BYTE chCtrlRegB;
  BYTE chPeripheralRegB;
  BYTE chDataDirRegB;
  BYTE chNumDrives;
  BYTE chTrackReg;
  BYTE chSectorReg;
  BYTE chDataReg;
  BYTE chStatusReg;
  BYTE chRam[1];
} ZXSTOPUS, *LPZXSTOPUS;

Members

blk
The block header. The block id is ZXSTBID_OPUS ('O', 'P', 'U', 'S').
dwFlags
Various flags. This can be a combination of:
Flag Meaning
ZXSTOPUSF_PAGED The Opus Discovery's ROM and RAM are currently paged in.
ZXSTOPUSF_COMPRESSED Specifies the RAM (and any custom ROM) have been compressed with the Zlib compression library.
ZXSTOPUSF_SEEKLOWER If set, the WD1770 FDC's current seek direction is towards lower cylinder numbers. Otherwise, it is towards higher ones.
ZXSTOPUSRT_CUSTOM A custom ROM is installed. The Zlib compressed or uncompressed ROM image begins after the RAM image at chRam. dwcbRom contains the size of the compressed (or uncompressed) data.
dwcbRam
Size in bytes of the Zlib compressed or uncompressed Opus Discovery RAM. The uncompressed RAM size is always 2,048 bytes.
dwcbRom
Size in bytes of the Zlib compressed or uncompressed custom Opus Discovery ROM (if one was installed). The uncompressed ROM size is always 8,192 bytes.
chCtrlRegA
The last value written to the 6821 PIA's control register A.
chPeripheralRegA
The last value written to the 6821 PIA's peripheral register A.
chDataDirRegA
The last value written to the 6821 PIA's data direction register A.
chCtrlRegB
The last value written to the 6821 PIA's control register B.
chPeripheralRegB
The last value written to the 6821 PIA's peripheral register B.
chDataDirRegB
The last value written to the 6821 PIA's data direction register B.
chNumDrives
The number of disk drives connected (1 or 2).
chTrackReg
The current value of the WD1770 FDC's track register (address $3001).
chSectorReg
The current value of the WD1770 FDC's sector register (address $3002).
chDataReg
The current value of the WD1770 FDC's data register (address $3003).
chStatusReg
The current value of the WD1770 FDC's status register (address $3000).
chRam
A Zlib compressed or uncompressed image of the Opus Discovery's RAM. The uncompressed RAM size is always 2048 bytes.

If a custom ROM is installed. The image follows immediately after the RAM data.

Remarks

Any ZXSTOPUSDISK blocks specifying which disk files are in which drives will follow this one.

Revision history

Available since version 1.4


  Copyright © 2001 - 2011 Jonathan Needle Top