mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
(MESS) compis: Keyboard WIP. (nw)
This commit is contained in:
parent
809da148f5
commit
6179584cb3
@ -53,10 +53,10 @@ 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_P1, MCS48_PORT_P1) AM_NOP
|
||||
AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_NOP
|
||||
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_T1, MCS48_PORT_T1) AM_NOP
|
||||
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_NOP
|
||||
AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_WRITE(bus_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
@ -65,8 +65,13 @@ ADDRESS_MAP_END
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( compis_keyboard )
|
||||
MCFG_CPU_ADD(I8748_TAG, I8748, 4000000)
|
||||
MCFG_CPU_ADD(I8748_TAG, I8748, XTAL_2MHz)
|
||||
MCFG_CPU_IO_MAP(compis_keyboard_io)
|
||||
|
||||
// sound hardware
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -87,164 +92,141 @@ machine_config_constructor compis_keyboard_device::device_mconfig_additions() co
|
||||
|
||||
INPUT_PORTS_START( compis_keyboard )
|
||||
PORT_START("Y0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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("Y2")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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("Y3")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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("Y4")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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("Y5")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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("Y6")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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("Y7")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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("Y8")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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("Y9")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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("YA")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
|
||||
PORT_START("YB")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
|
||||
PORT_START("YC")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
|
||||
PORT_START("YD")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
|
||||
PORT_START("YE")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
|
||||
PORT_START("YF")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD )
|
||||
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
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
@ -269,9 +251,22 @@ ioport_constructor compis_keyboard_device::device_input_ports() const
|
||||
|
||||
compis_keyboard_device::compis_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, COMPIS_KEYBOARD, "Compis Keyboard", tag, owner, clock, "compiskb", __FILE__),
|
||||
m_maincpu(*this, I8748_TAG),
|
||||
m_write_irq(*this),
|
||||
m_so(1)
|
||||
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"),
|
||||
m_y4(*this, "Y4"),
|
||||
m_y5(*this, "Y5"),
|
||||
m_y6(*this, "Y6"),
|
||||
m_y7(*this, "Y7"),
|
||||
m_y8(*this, "Y8"),
|
||||
m_y9(*this, "Y9"),
|
||||
m_special(*this, "SPECIAL"),
|
||||
m_so(1),
|
||||
m_keylatch(0x3ff)
|
||||
{
|
||||
}
|
||||
|
||||
@ -296,15 +291,6 @@ void compis_keyboard_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// dtr_w - data terminal ready write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE_LINE_MEMBER( compis_keyboard_device::dtr_w )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// si_w - serial input write
|
||||
//-------------------------------------------------
|
||||
@ -323,3 +309,92 @@ READ_LINE_MEMBER( compis_keyboard_device::so_r )
|
||||
{
|
||||
return m_so;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// p1_r -
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( compis_keyboard_device::bus_w )
|
||||
{
|
||||
/*
|
||||
|
||||
bit description
|
||||
|
||||
0 keyboard row bit 0
|
||||
1 keyboard row bit 1
|
||||
2 keyboard row bit 2
|
||||
3 keyboard row bit 3
|
||||
4
|
||||
5 speaker
|
||||
6 CAPS LED
|
||||
7 data out
|
||||
|
||||
*/
|
||||
|
||||
// keyboard column
|
||||
m_keylatch = (data & 0x0f);
|
||||
|
||||
// speaker
|
||||
m_speaker->level_w(BIT(data, 5));
|
||||
|
||||
// LEDs
|
||||
output_set_led_value(LED_CAPS, BIT(data, 6));
|
||||
|
||||
// serial data out
|
||||
m_so = BIT(data, 7);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// bus_w -
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( compis_keyboard_device::p1_r )
|
||||
{
|
||||
UINT8 data = 0xff;
|
||||
|
||||
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;
|
||||
case 4: data &= m_y4->read(); break;
|
||||
case 5: data &= m_y5->read(); break;
|
||||
case 6: data &= m_y6->read(); break;
|
||||
case 7: data &= m_y7->read(); break;
|
||||
case 8: data &= m_y8->read(); break;
|
||||
case 9: data &= m_y9->read(); break;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// p2_r -
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( compis_keyboard_device::p2_r )
|
||||
{
|
||||
UINT8 data = 0xff;
|
||||
|
||||
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;
|
||||
case 4: data &= m_y4->read() >> 8; break;
|
||||
case 5: data &= m_y5->read() >> 8; break;
|
||||
case 6: data &= m_y6->read() >> 8; break;
|
||||
case 7: data &= m_y7->read() >> 8; break;
|
||||
case 8: data &= m_y8->read() >> 8; break;
|
||||
case 9: data &= m_y9->read() >> 8; break;
|
||||
}
|
||||
|
||||
data &= m_special->read();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/mcs48/mcs48.h"
|
||||
#include "sound/speaker.h"
|
||||
|
||||
|
||||
|
||||
@ -24,6 +25,7 @@
|
||||
//**************************************************************************
|
||||
|
||||
#define COMPIS_KEYBOARD_TAG "compiskb"
|
||||
#define SPEAKER_TAG "speaker"
|
||||
|
||||
|
||||
|
||||
@ -60,17 +62,40 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER( si_w );
|
||||
DECLARE_READ_LINE_MEMBER( so_r );
|
||||
|
||||
DECLARE_WRITE8_MEMBER( bus_w );
|
||||
DECLARE_READ8_MEMBER( p1_r );
|
||||
DECLARE_READ8_MEMBER( p2_r );
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
enum
|
||||
{
|
||||
LED_CAPS
|
||||
};
|
||||
|
||||
devcb2_write_line m_write_irq;
|
||||
|
||||
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;
|
||||
required_ioport m_y4;
|
||||
required_ioport m_y5;
|
||||
required_ioport m_y6;
|
||||
required_ioport m_y7;
|
||||
required_ioport m_y8;
|
||||
required_ioport m_y9;
|
||||
required_ioport m_special;
|
||||
|
||||
int m_so;
|
||||
|
||||
UINT16 m_keylatch;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user