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

Table of contents

The zx-state file format
Block types

ZXSTKEYBOARD

The state of the Spectrum keyboard and any keyboard joystick emulation.

// Keyboard state
#define ZXSTKF_ISSUE2     1

// Supported joystick types
#define ZXSTKJT_KEMPSTON       0
#define ZXSTKJT_FULLER         1
#define ZXSTKJT_CURSOR         2
#define ZXSTKJT_SINCLAIR1      3
#define ZXSTKJT_SINCLAIR2      4
#define ZXSTKJT_SPECTRUMPLUS   5
#define ZXSTKJT_TIMEX1         6
#define ZXSTKJT_TIMEX2         7
#define ZXSTKJT_NONE           8

typedef struct _tagZXSTKEYBOARD
{
  ZXSTBLOCK blk;
  DWORD dwFlags;
  BYTE chKeyboardJoystick;
} ZXSTKEYBOARD, *LPZXSTKEYBOARD;

Members

blk
The block header. The block id is ZXSTBID_KEYBOARD ('K', 'E', 'Y', 'B').
dwFlags
Various state flags. This can be a combination of:
FlagMeaning
ZXSTKF_ISSUE2Indicates Issue 2 keyboard emulation is enabled.

Note: This is only applicable for the 16k or 48k ZX Spectrum. For other models, set this member to 0 (zero).

chKeyboardJoystick
Specfies which joystick the PC keyboard should emulate (the actual keys are emulator dependant). This can be one of:
FlagMeaning
ZXSTKJT_KEMPSTONKempston joystick emulation
ZXSTKJT_FULLERFuller joystick emulation
ZXSTKJT_CURSORCursor (AGF or Protek) emulation
ZXSTKJT_SINCLAIR1Sinclair Interface II port 1 (or Spectrum +2A/+3 joystick 1)
ZXSTKJT_SINCLAIR2Sinclair Interface II port 2 (or Spectrum +2A/+3 joystick 2)
ZXSTKJT_SPECTRUMPLUSSpectrum+/128/+2/+2A/+3 cursor keys
ZXSTKJT_TIMEX1Timex TC2048, TC2068, TS2068 and Spectrum SE built-in joystick, port 1.
ZXSTKJT_TIMEX2Timex TC2048, TC2068, TS2068 and Spectrum SE built-in joystick, port 2.
ZXSTKJT_NONENone

Revision history

Available since version 1.0.

chKeyboard was added in version 1.1. The size of a version 1.1 ZXSTKEYBOARD block is therefore one byte larger than in version 1.0.


  Copyright © 2001 - 2011 Jonathan Needle Top