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:

Flag

Meaning

ZXSTKF_ISSUE2

Indicates 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:

Flag

Meaning

ZXSTKJT_KEMPSTON

Kempston joystick emulation

ZXSTKJT_FULLER

Fuller joystick emulation

ZXSTKJT_CURSOR

Cursor (AGF or Protek) emulation

ZXSTKJT_SINCLAIR1

Sinclair Interface II port 1 (or Spectrum +2A/+3 joystick 1)

ZXSTKJT_SINCLAIR2

Sinclair Interface II port 2 (or Spectrum +2A/+3 joystick 2)

ZXSTKJT_SPECTRUMPLUS

Spectrum+/128/+2/+2A/+3 cursor keys

ZXSTKJT_TIMEX1

Timex TC2048, TC2068, TS2068 and Spectrum SE built-in joystick, port 1.

ZXSTKJT_TIMEX2

Timex TC2048, TC2068, TS2068 and Spectrum SE built-in joystick, port 2.

ZXSTKJT_NONE

None

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.