2017-11-05 01:57:04 -05:00
|
|
|
/*
|
|
|
|
|
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
* running old operating systems and software designed for IBM
|
|
|
|
|
* PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
* system designs based on the PCI bus.
|
|
|
|
|
*
|
|
|
|
|
* This file is part of the 86Box distribution.
|
|
|
|
|
*
|
|
|
|
|
* Implementation of the XT-style keyboard.
|
|
|
|
|
*
|
2018-11-02 11:36:58 +01:00
|
|
|
* Version: @(#)keyboard_xt.c 1.0.14 2018/11/02
|
2017-11-05 01:57:04 -05:00
|
|
|
*
|
|
|
|
|
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
|
|
|
|
* Miran Grca, <mgrca8@gmail.com>
|
|
|
|
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
|
|
|
|
*
|
2018-01-13 22:56:13 +01:00
|
|
|
* Copyright 2008-2018 Sarah Walker.
|
2018-03-19 01:02:04 +01:00
|
|
|
* Copyright 2016-2018 Miran Grca.
|
|
|
|
|
* Copyright 2017,2018 Fred N. van kempen.
|
2017-11-05 01:57:04 -05:00
|
|
|
*/
|
2017-09-25 04:31:20 -04:00
|
|
|
#include <stdio.h>
|
2016-07-19 02:44:32 +02:00
|
|
|
#include <stdint.h>
|
2017-11-05 01:57:04 -05:00
|
|
|
#include <stdlib.h>
|
2017-09-25 04:31:20 -04:00
|
|
|
#include <string.h>
|
|
|
|
|
#include <wchar.h>
|
2017-10-17 01:59:09 -04:00
|
|
|
#include "86box.h"
|
2017-11-02 02:28:00 -05:00
|
|
|
#include "machine/machine.h"
|
2016-06-26 00:34:39 +02:00
|
|
|
#include "io.h"
|
|
|
|
|
#include "pic.h"
|
2017-05-05 01:49:42 +02:00
|
|
|
#include "pit.h"
|
2017-11-02 02:28:00 -05:00
|
|
|
#include "ppi.h"
|
2017-11-05 01:57:04 -05:00
|
|
|
#include "mem.h"
|
|
|
|
|
#include "rom.h"
|
2016-06-26 00:34:39 +02:00
|
|
|
#include "timer.h"
|
2017-05-06 17:48:33 +02:00
|
|
|
#include "device.h"
|
2017-08-27 04:33:47 +01:00
|
|
|
#include "sound/sound.h"
|
|
|
|
|
#include "sound/snd_speaker.h"
|
2017-11-05 01:57:04 -05:00
|
|
|
#include "video/video.h"
|
2016-06-26 00:34:39 +02:00
|
|
|
#include "keyboard.h"
|
|
|
|
|
|
2017-05-06 17:48:33 +02:00
|
|
|
|
2016-06-26 00:34:39 +02:00
|
|
|
#define STAT_PARITY 0x80
|
|
|
|
|
#define STAT_RTIMEOUT 0x40
|
|
|
|
|
#define STAT_TTIMEOUT 0x20
|
|
|
|
|
#define STAT_LOCK 0x10
|
|
|
|
|
#define STAT_CD 0x08
|
|
|
|
|
#define STAT_SYSFLAG 0x04
|
|
|
|
|
#define STAT_IFULL 0x02
|
|
|
|
|
#define STAT_OFULL 0x01
|
|
|
|
|
|
2017-05-06 17:48:33 +02:00
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
typedef struct {
|
|
|
|
|
int blocked;
|
|
|
|
|
|
|
|
|
|
uint8_t pa;
|
|
|
|
|
uint8_t pb;
|
2016-06-26 00:34:39 +02:00
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
int tandy;
|
2018-09-15 16:15:39 +02:00
|
|
|
int type;
|
2017-11-05 01:57:04 -05:00
|
|
|
} xtkbd_t;
|
2016-06-26 00:34:39 +02:00
|
|
|
|
2017-08-24 01:14:39 -04:00
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
/*XT keyboard has no escape scancodes, and no scancodes beyond 53*/
|
2018-03-19 08:01:13 +01:00
|
|
|
const scancode scancode_xt[512] = {
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {0x01, -1}, {0x81, -1} },
|
|
|
|
|
{ {0x02, -1}, {0x82, -1} }, { {0x03, -1}, {0x83, -1} },
|
|
|
|
|
{ {0x04, -1}, {0x84, -1} }, { {0x05, -1}, {0x85, -1} },
|
|
|
|
|
{ {0x06, -1}, {0x86, -1} }, { {0x07, -1}, {0x87, -1} },
|
|
|
|
|
{ {0x08, -1}, {0x88, -1} }, { {0x09, -1}, {0x89, -1} },
|
|
|
|
|
{ {0x0a, -1}, {0x8a, -1} }, { {0x0b, -1}, {0x8b, -1} },
|
|
|
|
|
{ {0x0c, -1}, {0x8c, -1} }, { {0x0d, -1}, {0x8d, -1} },
|
|
|
|
|
{ {0x0e, -1}, {0x8e, -1} }, { {0x0f, -1}, {0x8f, -1} },
|
|
|
|
|
{ {0x10, -1}, {0x90, -1} }, { {0x11, -1}, {0x91, -1} },
|
|
|
|
|
{ {0x12, -1}, {0x92, -1} }, { {0x13, -1}, {0x93, -1} },
|
|
|
|
|
{ {0x14, -1}, {0x94, -1} }, { {0x15, -1}, {0x95, -1} },
|
|
|
|
|
{ {0x16, -1}, {0x96, -1} }, { {0x17, -1}, {0x97, -1} },
|
|
|
|
|
{ {0x18, -1}, {0x98, -1} }, { {0x19, -1}, {0x99, -1} },
|
|
|
|
|
{ {0x1a, -1}, {0x9a, -1} }, { {0x1b, -1}, {0x9b, -1} },
|
|
|
|
|
{ {0x1c, -1}, {0x9c, -1} }, { {0x1d, -1}, {0x9d, -1} },
|
|
|
|
|
{ {0x1e, -1}, {0x9e, -1} }, { {0x1f, -1}, {0x9f, -1} },
|
|
|
|
|
{ {0x20, -1}, {0xa0, -1} }, { {0x21, -1}, {0xa1, -1} },
|
|
|
|
|
{ {0x22, -1}, {0xa2, -1} }, { {0x23, -1}, {0xa3, -1} },
|
|
|
|
|
{ {0x24, -1}, {0xa4, -1} }, { {0x25, -1}, {0xa5, -1} },
|
|
|
|
|
{ {0x26, -1}, {0xa6, -1} }, { {0x27, -1}, {0xa7, -1} },
|
|
|
|
|
{ {0x28, -1}, {0xa8, -1} }, { {0x29, -1}, {0xa9, -1} },
|
|
|
|
|
{ {0x2a, -1}, {0xaa, -1} }, { {0x2b, -1}, {0xab, -1} },
|
|
|
|
|
{ {0x2c, -1}, {0xac, -1} }, { {0x2d, -1}, {0xad, -1} },
|
|
|
|
|
{ {0x2e, -1}, {0xae, -1} }, { {0x2f, -1}, {0xaf, -1} },
|
|
|
|
|
{ {0x30, -1}, {0xb0, -1} }, { {0x31, -1}, {0xb1, -1} },
|
|
|
|
|
{ {0x32, -1}, {0xb2, -1} }, { {0x33, -1}, {0xb3, -1} },
|
|
|
|
|
{ {0x34, -1}, {0xb4, -1} }, { {0x35, -1}, {0xb5, -1} },
|
|
|
|
|
{ {0x36, -1}, {0xb6, -1} }, { {0x37, -1}, {0xb7, -1} },
|
|
|
|
|
{ {0x38, -1}, {0xb8, -1} }, { {0x39, -1}, {0xb9, -1} },
|
|
|
|
|
{ {0x3a, -1}, {0xba, -1} }, { {0x3b, -1}, {0xbb, -1} },
|
|
|
|
|
{ {0x3c, -1}, {0xbc, -1} }, { {0x3d, -1}, {0xbd, -1} },
|
|
|
|
|
{ {0x3e, -1}, {0xbe, -1} }, { {0x3f, -1}, {0xbf, -1} },
|
|
|
|
|
{ {0x40, -1}, {0xc0, -1} }, { {0x41, -1}, {0xc1, -1} },
|
|
|
|
|
{ {0x42, -1}, {0xc2, -1} }, { {0x43, -1}, {0xc3, -1} },
|
|
|
|
|
{ {0x44, -1}, {0xc4, -1} }, { {0x45, -1}, {0xc5, -1} },
|
|
|
|
|
{ {0x46, -1}, {0xc6, -1} }, { {0x47, -1}, {0xc7, -1} },
|
|
|
|
|
{ {0x48, -1}, {0xc8, -1} }, { {0x49, -1}, {0xc9, -1} },
|
|
|
|
|
{ {0x4a, -1}, {0xca, -1} }, { {0x4b, -1}, {0xcb, -1} },
|
|
|
|
|
{ {0x4c, -1}, {0xcc, -1} }, { {0x4d, -1}, {0xcd, -1} },
|
|
|
|
|
{ {0x4e, -1}, {0xce, -1} }, { {0x4f, -1}, {0xcf, -1} },
|
|
|
|
|
{ {0x50, -1}, {0xd0, -1} }, { {0x51, -1}, {0xd1, -1} },
|
|
|
|
|
{ {0x52, -1}, {0xd2, -1} }, { {0x53, -1}, {0xd3, -1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*054*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*058*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*05c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*060*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*064*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*068*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*06c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*070*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*074*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*078*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*07c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*080*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*084*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*088*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*08c*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*090*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*094*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*098*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*09c*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0a0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0a4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0a8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0ac*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0b0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0b4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0b8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0bc*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0c0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0c4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0c8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0cc*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0d0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0d4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0d8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0dc*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0e0*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0e4*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0e8*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0ec*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0f0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0f4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0f8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*0fc*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*100*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*104*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*108*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*10c*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*110*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*114*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*118*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {0x1c, -1}, {0x9c, -1} }, { {0x1d, -1}, {0x9d, -1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*11c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*120*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*124*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*128*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*12c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*130*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {0x35, -1}, {0xb5, -1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {0x37, -1}, {0xb7, -1} }, /*134*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {0x38, -1}, {0xb8, -1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*138*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*13c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*140*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {0x46, -1}, {0xc6, -1} }, { {0x47, -1}, {0xc7, -1} }, /*144*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {0x48, -1}, {0xc8, -1} }, { {0x49, -1}, {0xc9, -1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {0x4b, -1}, {0xcb, -1} }, /*148*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {0x4d, -1}, {0xcd, -1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {0x4f, -1}, {0xcf, -1} }, /*14c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {0x50, -1}, {0xd0, -1} }, { {0x51, -1}, {0xd1, -1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {0x52, -1}, {0xd2, -1} }, { {0x53, -1}, {0xd3, -1} }, /*150*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*154*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*158*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*15c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*160*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*164*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*168*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*16c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*170*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*174*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*148*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*17c*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*180*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*184*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*88*/
|
2017-11-05 01:57:04 -05:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
2018-01-13 22:56:13 +01:00
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*18c*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*190*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*194*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*198*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*19c*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1a0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1a4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1a8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1ac*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1b0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1b4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1b8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1bc*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1c0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1c4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1c8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1cc*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1d0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1d4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1d8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1dc*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1e0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1e4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1e8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1ec*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1f0*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1f4*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} }, /*1f8*/
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} },
|
|
|
|
|
{ {-1}, {-1} }, { {-1}, {-1} } /*1fc*/
|
2017-11-05 01:57:04 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static uint8_t key_queue[16];
|
|
|
|
|
static int key_queue_start,
|
|
|
|
|
key_queue_end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
kbd_poll(void *priv)
|
2016-06-26 00:34:39 +02:00
|
|
|
{
|
2017-11-05 01:57:04 -05:00
|
|
|
xtkbd_t *kbd = (xtkbd_t *)priv;
|
|
|
|
|
|
|
|
|
|
keyboard_delay += (1000LL * TIMER_USEC);
|
|
|
|
|
|
|
|
|
|
if (key_queue_start != key_queue_end && !kbd->blocked) {
|
|
|
|
|
kbd->pa = key_queue[key_queue_start];
|
|
|
|
|
picint(2);
|
2017-09-28 20:10:15 -04:00
|
|
|
#if ENABLE_KEYBOARD_LOG
|
2017-11-10 23:47:04 -05:00
|
|
|
pclog("XTkbd: reading %02X from the key queue at %i\n",
|
2017-11-05 01:57:04 -05:00
|
|
|
kbd->pa, key_queue_start);
|
2017-09-28 20:10:15 -04:00
|
|
|
#endif
|
2017-11-10 23:47:04 -05:00
|
|
|
key_queue_start = (key_queue_start + 1) & 0x0f;
|
2017-11-05 01:57:04 -05:00
|
|
|
kbd->blocked = 1;
|
|
|
|
|
}
|
2016-06-26 00:34:39 +02:00
|
|
|
}
|
|
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
|
|
|
|
|
static void
|
2018-01-13 22:56:13 +01:00
|
|
|
kbd_adddata(uint16_t val)
|
2016-06-26 00:34:39 +02:00
|
|
|
{
|
2017-11-05 01:57:04 -05:00
|
|
|
key_queue[key_queue_end] = val;
|
2017-09-28 20:10:15 -04:00
|
|
|
#if ENABLE_KEYBOARD_LOG
|
2017-11-05 01:57:04 -05:00
|
|
|
pclog("XTkbd: %02X added to key queue at %i\n",
|
|
|
|
|
val, key_queue_end);
|
2017-09-28 20:10:15 -04:00
|
|
|
#endif
|
2017-11-10 23:47:04 -05:00
|
|
|
key_queue_end = (key_queue_end + 1) & 0x0f;
|
2016-06-26 00:34:39 +02:00
|
|
|
}
|
|
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
|
2018-01-13 22:56:13 +01:00
|
|
|
void
|
|
|
|
|
kbd_adddata_process(uint16_t val, void (*adddata)(uint16_t val))
|
|
|
|
|
{
|
|
|
|
|
uint8_t num_lock = 0, shift_states = 0;
|
|
|
|
|
|
|
|
|
|
if (!adddata)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
keyboard_get_states(NULL, &num_lock, NULL);
|
|
|
|
|
shift_states = keyboard_get_shift() & STATE_SHIFT_MASK;
|
|
|
|
|
|
|
|
|
|
switch(val) {
|
|
|
|
|
case FAKE_LSHIFT_ON:
|
|
|
|
|
if (num_lock) {
|
|
|
|
|
if (!shift_states) {
|
|
|
|
|
/* Num lock on and no shifts are pressed, send non-inverted fake shift. */
|
|
|
|
|
adddata(0x2a);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (shift_states & STATE_LSHIFT) {
|
|
|
|
|
/* Num lock off and left shift pressed. */
|
|
|
|
|
adddata(0xaa);
|
|
|
|
|
}
|
|
|
|
|
if (shift_states & STATE_RSHIFT) {
|
|
|
|
|
/* Num lock off and right shift pressed. */
|
|
|
|
|
adddata(0xb6);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case FAKE_LSHIFT_OFF:
|
|
|
|
|
if (num_lock) {
|
|
|
|
|
if (!shift_states) {
|
|
|
|
|
/* Num lock on and no shifts are pressed, send non-inverted fake shift. */
|
|
|
|
|
adddata(0xaa);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (shift_states & STATE_LSHIFT) {
|
|
|
|
|
/* Num lock off and left shift pressed. */
|
|
|
|
|
adddata(0x2a);
|
|
|
|
|
}
|
|
|
|
|
if (shift_states & STATE_RSHIFT) {
|
|
|
|
|
/* Num lock off and right shift pressed. */
|
|
|
|
|
adddata(0x36);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
adddata(val);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2018-11-02 11:36:58 +01:00
|
|
|
static void
|
2018-01-13 22:56:13 +01:00
|
|
|
kbd_adddata_ex(uint16_t val)
|
|
|
|
|
{
|
|
|
|
|
kbd_adddata_process(val, kbd_adddata);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
static void
|
|
|
|
|
kbd_write(uint16_t port, uint8_t val, void *priv)
|
2016-06-26 00:34:39 +02:00
|
|
|
{
|
2017-11-05 01:57:04 -05:00
|
|
|
xtkbd_t *kbd = (xtkbd_t *)priv;
|
|
|
|
|
|
|
|
|
|
if (port != 0x61) return;
|
|
|
|
|
|
|
|
|
|
if (!(kbd->pb & 0x40) && (val & 0x40)) { /*Reset keyboard*/
|
2017-09-28 20:10:15 -04:00
|
|
|
#if ENABLE_KEYBOARD_LOG
|
2017-11-05 01:57:04 -05:00
|
|
|
pclog("XTkbd: reset keyboard\n");
|
2017-09-28 20:10:15 -04:00
|
|
|
#endif
|
2017-11-05 01:57:04 -05:00
|
|
|
key_queue_end = key_queue_start;
|
|
|
|
|
kbd_adddata(0xaa);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((kbd->pb & 0x80)==0 && (val & 0x80)!=0) {
|
|
|
|
|
kbd->pa = 0;
|
|
|
|
|
kbd->blocked = 0;
|
|
|
|
|
picintc(2);
|
|
|
|
|
}
|
|
|
|
|
kbd->pb = val;
|
|
|
|
|
ppi.pb = val;
|
|
|
|
|
|
|
|
|
|
timer_process();
|
|
|
|
|
timer_update_outstanding();
|
|
|
|
|
|
|
|
|
|
speaker_update();
|
|
|
|
|
speaker_gated = val & 1;
|
|
|
|
|
speaker_enable = val & 2;
|
|
|
|
|
if (speaker_enable)
|
|
|
|
|
was_speaker_enable = 1;
|
|
|
|
|
pit_set_gate(&pit, 2, val & 1);
|
2016-06-26 00:34:39 +02:00
|
|
|
}
|
|
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
|
|
|
|
|
static uint8_t
|
|
|
|
|
kbd_read(uint16_t port, void *priv)
|
2016-06-26 00:34:39 +02:00
|
|
|
{
|
2017-11-05 01:57:04 -05:00
|
|
|
xtkbd_t *kbd = (xtkbd_t *)priv;
|
|
|
|
|
uint8_t ret = 0xff;
|
|
|
|
|
|
|
|
|
|
switch (port) {
|
|
|
|
|
case 0x60:
|
2018-09-15 16:15:39 +02:00
|
|
|
if (!kbd->type && (kbd->pb & 0x80)) {
|
2018-02-24 17:25:50 +01:00
|
|
|
if (video_is_ega_vga())
|
2017-11-10 23:47:04 -05:00
|
|
|
ret = 0x4d;
|
2018-02-24 17:25:50 +01:00
|
|
|
else if (video_is_mda())
|
2017-11-10 23:47:04 -05:00
|
|
|
ret = 0x7d;
|
2017-11-05 01:57:04 -05:00
|
|
|
else
|
2017-11-10 23:47:04 -05:00
|
|
|
ret = 0x6d;
|
2017-11-05 01:57:04 -05:00
|
|
|
} else
|
|
|
|
|
ret = kbd->pa;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x61:
|
|
|
|
|
ret = kbd->pb;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 0x62:
|
2018-09-15 16:15:39 +02:00
|
|
|
if (!kbd->type) {
|
2017-11-05 01:57:04 -05:00
|
|
|
if (kbd->pb & 0x04)
|
2017-11-10 23:47:04 -05:00
|
|
|
ret = ((mem_size-64) / 32) & 0x0f;
|
2016-06-26 00:34:39 +02:00
|
|
|
else
|
2017-11-05 01:57:04 -05:00
|
|
|
ret = ((mem_size-64) / 32) >> 4;
|
|
|
|
|
} else {
|
|
|
|
|
if (kbd->pb & 0x08) {
|
2018-02-24 17:25:50 +01:00
|
|
|
if (video_is_ega_vga())
|
2018-01-25 22:36:24 +01:00
|
|
|
ret = 0x4;
|
2018-02-24 17:25:50 +01:00
|
|
|
else if (video_is_mda())
|
2018-01-25 22:36:24 +01:00
|
|
|
ret = 0x7;
|
2017-11-05 01:57:04 -05:00
|
|
|
else
|
2018-01-25 22:36:24 +01:00
|
|
|
ret = 0x6;
|
|
|
|
|
} else {
|
|
|
|
|
/* LaserXT = Always 512k RAM;
|
|
|
|
|
LaserXT/3 = Bit 0: set = 512k, clear = 256k. */
|
2018-01-28 17:59:26 +01:00
|
|
|
#if defined(DEV_BRANCH) && defined(USE_LASERXT)
|
2018-09-15 16:15:39 +02:00
|
|
|
if (kbd->type == 3)
|
2018-01-25 22:36:24 +01:00
|
|
|
ret = (mem_size == 512) ? 0x0d : 0x0c;
|
|
|
|
|
else
|
2018-01-28 17:59:26 +01:00
|
|
|
#endif
|
2018-01-25 22:36:24 +01:00
|
|
|
ret = 0x0d;
|
|
|
|
|
}
|
2016-06-26 00:34:39 +02:00
|
|
|
}
|
2017-11-05 01:57:04 -05:00
|
|
|
ret |= (ppispeakon ? 0x20 : 0);
|
|
|
|
|
|
2018-09-15 16:15:39 +02:00
|
|
|
if (kbd->type == 2)
|
2017-11-10 23:47:04 -05:00
|
|
|
ret |= (tandy1k_eeprom_read() ? 0x10 : 0);
|
2017-11-05 01:57:04 -05:00
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
2017-11-10 23:47:04 -05:00
|
|
|
pclog("XTkbd: bad read %04X\n", port);
|
2017-11-05 01:57:04 -05:00
|
|
|
ret = 0xff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return(ret);
|
2016-06-26 00:34:39 +02:00
|
|
|
}
|
|
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
kbd_reset(void *priv)
|
2016-06-26 00:34:39 +02:00
|
|
|
{
|
2017-11-05 01:57:04 -05:00
|
|
|
xtkbd_t *kbd = (xtkbd_t *)priv;
|
|
|
|
|
|
|
|
|
|
kbd->blocked = 0;
|
|
|
|
|
kbd->pa = 0x00;
|
|
|
|
|
kbd->pb = 0x00;
|
|
|
|
|
|
|
|
|
|
key_queue_start = 0,
|
|
|
|
|
key_queue_end = 0;
|
2016-06-26 00:34:39 +02:00
|
|
|
}
|
|
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
|
|
|
|
|
static void *
|
2018-03-19 01:02:04 +01:00
|
|
|
kbd_init(const device_t *info)
|
2016-06-26 00:34:39 +02:00
|
|
|
{
|
2017-11-05 01:57:04 -05:00
|
|
|
xtkbd_t *kbd;
|
|
|
|
|
|
|
|
|
|
kbd = (xtkbd_t *)malloc(sizeof(xtkbd_t));
|
|
|
|
|
memset(kbd, 0x00, sizeof(xtkbd_t));
|
|
|
|
|
|
|
|
|
|
keyboard_set_table(scancode_xt);
|
|
|
|
|
|
2018-09-15 16:15:39 +02:00
|
|
|
kbd->type = info->local;
|
2016-06-26 00:34:39 +02:00
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
keyboard_scan = 1;
|
|
|
|
|
|
|
|
|
|
io_sethandler(0x0060, 4,
|
|
|
|
|
kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd);
|
2018-01-13 22:56:13 +01:00
|
|
|
keyboard_send = kbd_adddata_ex;
|
2017-11-05 01:57:04 -05:00
|
|
|
timer_add(kbd_poll, &keyboard_delay, TIMER_ALWAYS_ENABLED, kbd);
|
|
|
|
|
|
|
|
|
|
return(kbd);
|
2016-06-26 00:34:39 +02:00
|
|
|
}
|
|
|
|
|
|
2017-11-05 01:57:04 -05:00
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
kbd_close(void *priv)
|
2016-06-26 00:34:39 +02:00
|
|
|
{
|
2017-11-05 01:57:04 -05:00
|
|
|
xtkbd_t *kbd = (xtkbd_t *)priv;
|
|
|
|
|
|
|
|
|
|
/* Stop the timer. */
|
|
|
|
|
keyboard_delay = 0;
|
|
|
|
|
|
|
|
|
|
/* Disable scanning. */
|
|
|
|
|
keyboard_scan = 0;
|
|
|
|
|
|
|
|
|
|
keyboard_send = NULL;
|
|
|
|
|
|
|
|
|
|
io_removehandler(0x0060, 4,
|
|
|
|
|
kbd_read, NULL, NULL, kbd_write, NULL, NULL, kbd);
|
|
|
|
|
|
|
|
|
|
free(kbd);
|
2016-06-26 00:34:39 +02:00
|
|
|
}
|
2017-11-05 01:57:04 -05:00
|
|
|
|
|
|
|
|
|
2018-09-15 16:15:39 +02:00
|
|
|
const device_t keyboard_pc_device = {
|
|
|
|
|
"IBM PC Keyboard",
|
2017-11-05 01:57:04 -05:00
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
kbd_init,
|
|
|
|
|
kbd_close,
|
|
|
|
|
kbd_reset,
|
2018-04-26 13:33:29 +02:00
|
|
|
NULL, NULL, NULL
|
2017-11-05 01:57:04 -05:00
|
|
|
};
|
|
|
|
|
|
2018-09-15 16:15:39 +02:00
|
|
|
const device_t keyboard_xt_device = {
|
|
|
|
|
"XT Keyboard",
|
|
|
|
|
0,
|
|
|
|
|
1,
|
|
|
|
|
kbd_init,
|
|
|
|
|
kbd_close,
|
|
|
|
|
kbd_reset,
|
|
|
|
|
NULL, NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
2018-03-19 01:02:04 +01:00
|
|
|
const device_t keyboard_tandy_device = {
|
2017-11-05 01:57:04 -05:00
|
|
|
"Tandy 1000 Keyboard",
|
|
|
|
|
0,
|
2018-09-15 16:15:39 +02:00
|
|
|
2,
|
|
|
|
|
kbd_init,
|
|
|
|
|
kbd_close,
|
|
|
|
|
kbd_reset,
|
|
|
|
|
NULL, NULL, NULL
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#if defined(DEV_BRANCH) && defined(USE_LASERXT)
|
|
|
|
|
const device_t keyboard_xt_lxt3_device = {
|
|
|
|
|
"VTech Laser XT3 Keyboard",
|
|
|
|
|
0,
|
|
|
|
|
3,
|
2017-11-05 01:57:04 -05:00
|
|
|
kbd_init,
|
|
|
|
|
kbd_close,
|
|
|
|
|
kbd_reset,
|
2018-04-26 13:33:29 +02:00
|
|
|
NULL, NULL, NULL
|
2017-11-05 01:57:04 -05:00
|
|
|
};
|
2018-09-15 16:15:39 +02:00
|
|
|
#endif
|