ZX-State format: Difference between revisions

Jump to navigation Jump to search
Move ULAplus SZX block definition here (as I'm going to add some more in a bit).
m (Add category)
(Move ULAplus SZX block definition here (as I'm going to add some more in a bit).)
Line 8: Line 8:
Early versions of libspectrum (prior to 1.0.0) contained a bug which caused the A and A' registers to be swapped with F and F', respectively, when loading or saving in the SZX format. Current versions of libspectrum detect "libspectrum: 0.5.0" and earlier versions strings and correct for this.
Early versions of libspectrum (prior to 1.0.0) contained a bug which caused the A and A' registers to be swapped with F and F', respectively, when loading or saving in the SZX format. Current versions of libspectrum detect "libspectrum: 0.5.0" and earlier versions strings and correct for this.


There is an extension to the format to add a block type for [[ULAplus#Extension to the ZX-State (SZX) format|ULAplus support]].
== Format extensions ==
 
With the official specification being somewhat stalled, some emulators have added ''unofficial'' extensions to the format. These include:
 
=== ZXSTPALETTE ===
The state of the ULA registers found in the [[ULAplus|64 colour replacement ULA]]. This block may be present for any machine.
// Palette Block flags
#define ZXSTPALETTE_DISABLED  0
#define ZXSTPALETTE_ENABLED  1
// Palette Block. Contains the palette register values
typedef struct _tagZXSTPALETTEBLOCK
{
  ZXSTBLOCK blk;
  BYTE chFlags;
  BYTE chCurrentRegister;
  BYTE chPaletteRegs[64];
} ZXSTPALETTEBLOCK, *LPZXSTPALETTEBLOCK;
 
==== Members ====
&nbsp;&nbsp; '''blk'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The block header. The block id is ZXSTBID_PALETTE ('P', 'L', 'T', 'T').<br />&nbsp;&nbsp; '''chFlags'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A flags that indicates if the palette is enabled or if the normal display mode is in use. This can be one of:
 
{|cellspacing="1" cellpadding="1" border="1" width="100%"
|'''Flag'''
|'''Meaning'''
|-
|ZXSTPALETTE_DISABLED
|Normal palette mode with BRIGHT and FLASH
|-
|ZXSTPALETTE_ENABLED
|64 colour palette mode
|}
<br />&nbsp;&nbsp;&nbsp; '''chCurrentRegister'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The currently selected palette register (0-63).<br />&nbsp;&nbsp;&nbsp; '''chPaletteRegs'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The current values of the palette registers.


[[Category:Emulator Snapshot File Formats]]
[[Category:Emulator Snapshot File Formats]]
49

edits

Navigation menu