mirror of
https://github.com/holub/mame
synced 2025-07-03 00:56:03 +03:00
(MESS) compis: Keyboard WIP. (nw)
This commit is contained in:
parent
4720e17fe3
commit
eff2b286a6
@ -9,6 +9,14 @@
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
TODO:
|
||||
|
||||
- serial clocks are out of sync
|
||||
|
||||
*/
|
||||
|
||||
#include "compiskb.h"
|
||||
|
||||
|
||||
@ -53,10 +61,11 @@ const rom_entry *compis_keyboard_device::device_rom_region() const
|
||||
//-------------------------------------------------
|
||||
|
||||
static ADDRESS_MAP_START( compis_keyboard_io, AS_IO, 8, compis_keyboard_device )
|
||||
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READWRITE(bus_r, bus_w)
|
||||
AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READ(p1_r)
|
||||
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(p2_r)
|
||||
AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_NOP
|
||||
AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_NOP
|
||||
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_WRITE(bus_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -91,142 +100,129 @@ machine_config_constructor compis_keyboard_device::device_mconfig_additions() co
|
||||
//-------------------------------------------------
|
||||
|
||||
INPUT_PORTS_START( compis_keyboard )
|
||||
PORT_START("Y0")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("Y1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(u_UMLAUT " " U_UMLAUT) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(0x00FC) PORT_CHAR(0x00DC)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("TABR") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(PGDN))
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("TABL") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(PGUP))
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad +") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD))
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':')
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_')
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("Y2")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("'' *") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('*')
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("COMPIS !") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("COMPIS ?") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("COMPIS |") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 000") PORT_CODE(KEYCODE_ASTERISK)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 00") PORT_CODE(KEYCODE_SLASH_PAD)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) // 49
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED ) // 52
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("Y3")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('<') PORT_CHAR('>')
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) // 41
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';')
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("Y4")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) // 4b
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("Y5")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t')
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("Y6")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"')
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/')
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("Y7")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(o_UMLAUT " " O_UMLAUT) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0x00F6) PORT_CHAR(0x00D6)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("INPASSA") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("S" O_UMLAUT "K") PORT_CODE(KEYCODE_PRTSCR) PORT_CHAR(UCHAR_MAMEKEY(PRTSCR))
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("UTPL" A_RING "NA") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL))
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("COMPIS S") PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(F6))
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad C") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD))
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xe2\x8c\xab") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('+') PORT_CHAR('?')
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("Y8")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) //TODO utf8
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("AVBRYT") PORT_CODE(KEYCODE_SCRLOCK) PORT_CHAR(UCHAR_MAMEKEY(F7))
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD))
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("START-STOP") PORT_CODE(KEYCODE_PAUSE) PORT_CHAR(UCHAR_MAMEKEY(PAUSE))
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad ,") PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD))
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD))
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(a_RING " " A_RING) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0x00E5) PORT_CHAR(0x00C5)
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("Y9")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=')
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("COMPIS +")
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad -") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(a_UMLAUT " " A_UMLAUT) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00E4) PORT_CHAR(0x00C4)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xC2\xB4 `") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('`')
|
||||
PORT_BIT( 0xfc00, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("SPECIAL")
|
||||
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) // CAPS LOCK
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) // SHIFT
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) // CTRL
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) // SUPER
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xe2\x87\xa9") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xe2\x87\xa7\xe2\x87\xa7") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT)
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xe2\x87\xa7") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -254,7 +250,6 @@ compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, co
|
||||
m_write_irq(*this),
|
||||
m_maincpu(*this, I8748_TAG),
|
||||
m_speaker(*this, SPEAKER_TAG),
|
||||
m_y0(*this, "Y0"),
|
||||
m_y1(*this, "Y1"),
|
||||
m_y2(*this, "Y2"),
|
||||
m_y3(*this, "Y3"),
|
||||
@ -266,7 +261,8 @@ compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, co
|
||||
m_y9(*this, "Y9"),
|
||||
m_special(*this, "SPECIAL"),
|
||||
m_so(1),
|
||||
m_keylatch(0x3ff)
|
||||
m_bus(0xff),
|
||||
m_keylatch(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -283,11 +279,12 @@ void compis_keyboard_device::device_start()
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
// so_r - serial output read
|
||||
//-------------------------------------------------
|
||||
|
||||
void compis_keyboard_device::device_reset()
|
||||
READ_LINE_MEMBER( compis_keyboard_device::so_r )
|
||||
{
|
||||
return m_so;
|
||||
}
|
||||
|
||||
|
||||
@ -302,17 +299,18 @@ WRITE_LINE_MEMBER( compis_keyboard_device::si_w )
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// so_r - serial output read
|
||||
// bus_r -
|
||||
//-------------------------------------------------
|
||||
|
||||
READ_LINE_MEMBER( compis_keyboard_device::so_r )
|
||||
READ8_MEMBER( compis_keyboard_device::bus_r )
|
||||
{
|
||||
return m_so;
|
||||
// HACK this should be handled in mcs48.c
|
||||
return m_bus;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// p1_r -
|
||||
// bus_w -
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( compis_keyboard_device::bus_w )
|
||||
@ -332,6 +330,8 @@ WRITE8_MEMBER( compis_keyboard_device::bus_w )
|
||||
|
||||
*/
|
||||
|
||||
m_bus = data;
|
||||
|
||||
// keyboard column
|
||||
m_keylatch = (data & 0x0f);
|
||||
|
||||
@ -356,7 +356,6 @@ READ8_MEMBER( compis_keyboard_device::p1_r )
|
||||
|
||||
switch (m_keylatch)
|
||||
{
|
||||
case 0: data &= m_y0->read(); break;
|
||||
case 1: data &= m_y1->read(); break;
|
||||
case 2: data &= m_y2->read(); break;
|
||||
case 3: data &= m_y3->read(); break;
|
||||
@ -382,7 +381,6 @@ READ8_MEMBER( compis_keyboard_device::p2_r )
|
||||
|
||||
switch (m_keylatch)
|
||||
{
|
||||
case 0: data &= m_y0->read() >> 8; break;
|
||||
case 1: data &= m_y1->read() >> 8; break;
|
||||
case 2: data &= m_y2->read() >> 8; break;
|
||||
case 3: data &= m_y3->read() >> 8; break;
|
||||
|
@ -58,10 +58,10 @@ public:
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( dtr_w );
|
||||
DECLARE_WRITE_LINE_MEMBER( si_w );
|
||||
DECLARE_READ_LINE_MEMBER( so_r );
|
||||
DECLARE_WRITE_LINE_MEMBER( si_w );
|
||||
|
||||
DECLARE_READ8_MEMBER( bus_r );
|
||||
DECLARE_WRITE8_MEMBER( bus_w );
|
||||
DECLARE_READ8_MEMBER( p1_r );
|
||||
DECLARE_READ8_MEMBER( p2_r );
|
||||
@ -69,7 +69,6 @@ public:
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
enum
|
||||
@ -81,7 +80,6 @@ private:
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<speaker_sound_device> m_speaker;
|
||||
required_ioport m_y0;
|
||||
required_ioport m_y1;
|
||||
required_ioport m_y2;
|
||||
required_ioport m_y3;
|
||||
@ -95,7 +93,8 @@ private:
|
||||
|
||||
int m_so;
|
||||
|
||||
UINT16 m_keylatch;
|
||||
UINT8 m_bus;
|
||||
UINT8 m_keylatch;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user