tv912.cpp: Add key matrix structure and beeper (nw)
This commit is contained in:
parent
14282a25fe
commit
a34468cd86
@ -242,11 +242,19 @@ WRITE8_MEMBER( tms9927_device::write )
|
||||
case 0x03: /* SKEW BITS / DATA ROWS PER FRAME */
|
||||
case 0x04: /* SCAN LINES / FRAME */
|
||||
case 0x05: /* VERTICAL DATA START */
|
||||
case 0x06: /* LAST DISPLAYED DATA ROW */
|
||||
m_reg[offset] = data;
|
||||
recompute_parameters(false);
|
||||
break;
|
||||
|
||||
case 0x06: /* LAST DISPLAYED DATA ROW */
|
||||
// TVI-912 writes to this register frequently
|
||||
if (m_reg[offset] != data)
|
||||
{
|
||||
m_reg[offset] = data;
|
||||
recompute_parameters(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x0c: /* LOAD CURSOR CHARACTER ADDRESS */
|
||||
case 0x0d: /* LOAD CURSOR ROW ADDRESS */
|
||||
m_reg[offset - 0x0c + 7] = data;
|
||||
|
@ -17,8 +17,10 @@
|
||||
//#include "bus/rs232/rs232.h"
|
||||
//#include "machine/ay31015.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "sound/beep.h"
|
||||
#include "video/tms9927.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
|
||||
#define CHAR_WIDTH 14
|
||||
|
||||
@ -30,11 +32,14 @@ public:
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_crtc(*this, "crtc")
|
||||
, m_bankdev(*this, "bankdev")
|
||||
, m_beep(*this, "beep")
|
||||
, m_dispram_bank(*this, "dispram")
|
||||
, m_p_chargen(*this, "chargen")
|
||||
, m_sw2(*this, "SW2")
|
||||
, m_keys(*this, "KEY%u", 0)
|
||||
, m_modifiers(*this, "MODIFIERS")
|
||||
{ }
|
||||
|
||||
DECLARE_WRITE8_MEMBER(p1_w);
|
||||
DECLARE_WRITE8_MEMBER(p2_w);
|
||||
DECLARE_READ8_MEMBER(crtc_r);
|
||||
DECLARE_WRITE8_MEMBER(crtc_w);
|
||||
@ -46,18 +51,25 @@ public:
|
||||
void tv912(machine_config &config);
|
||||
private:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<tms9927_device> m_crtc;
|
||||
required_device<address_map_bank_device> m_bankdev;
|
||||
required_device<beep_device> m_beep;
|
||||
required_memory_bank m_dispram_bank;
|
||||
required_region_ptr<u8> m_p_chargen;
|
||||
required_ioport m_sw2;
|
||||
required_ioport_array<32> m_keys;
|
||||
required_ioport m_modifiers;
|
||||
|
||||
u8 m_keyboard_scan;
|
||||
std::unique_ptr<u8[]> m_dispram;
|
||||
};
|
||||
|
||||
WRITE8_MEMBER(tv912_state::p1_w)
|
||||
{
|
||||
m_keyboard_scan = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(tv912_state::p2_w)
|
||||
{
|
||||
// P20-P23: Address Signals (4MSBS)
|
||||
@ -81,10 +93,11 @@ WRITE8_MEMBER(tv912_state::crtc_w)
|
||||
|
||||
READ8_MEMBER(tv912_state::keyboard_r)
|
||||
{
|
||||
u8 result = 0xff;
|
||||
u8 result = m_modifiers->read();
|
||||
|
||||
if (!BIT(m_sw2->read(), 0))
|
||||
result &= 0x7f;
|
||||
for (int b = 0; b < 8; b++)
|
||||
if (!BIT(m_keyboard_scan, b))
|
||||
result &= m_keys[b + offset * 8]->read();
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -95,7 +108,9 @@ WRITE8_MEMBER(tv912_state::output_40c)
|
||||
// Bit 4: +SEL LPT
|
||||
// Bit 3: -BREAK
|
||||
// Bit 2: -RQS
|
||||
|
||||
// Bit 1: +BEEP
|
||||
m_beep->set_state(BIT(data, 1));
|
||||
|
||||
// Bit 0: +PG SEL
|
||||
m_dispram_bank->set_entry(BIT(data, 0));
|
||||
@ -111,14 +126,10 @@ void tv912_state::machine_start()
|
||||
m_dispram = make_unique_clear<u8[]>(0x1000);
|
||||
m_dispram_bank->configure_entries(0, 2, m_dispram.get(), 0x800);
|
||||
|
||||
save_item(NAME(m_keyboard_scan));
|
||||
save_pointer(NAME(m_dispram.get()), 0x1000);
|
||||
}
|
||||
|
||||
void tv912_state::machine_reset()
|
||||
{
|
||||
m_dispram_bank->set_entry(0);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( prog_map, AS_PROGRAM, 8, tv912_state )
|
||||
AM_RANGE(0x000, 0xfff) AM_ROM AM_REGION("maincpu", 0)
|
||||
ADDRESS_MAP_END
|
||||
@ -136,26 +147,416 @@ static ADDRESS_MAP_START( bank_map, 0, 8, tv912_state )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static INPUT_PORTS_START( switches )
|
||||
PORT_START("SW2")
|
||||
PORT_DIPNAME(0x01, 0x01, "Refresh Rate") PORT_DIPLOCATION("S2:4")
|
||||
PORT_START("MODIFIERS")
|
||||
PORT_DIPNAME(0x80, 0x80, "Refresh Rate") PORT_DIPLOCATION("S2:4")
|
||||
PORT_DIPSETTING(0x00, "50 Hz")
|
||||
PORT_DIPSETTING(0x01, "60 Hz")
|
||||
PORT_DIPSETTING(0x80, "60 Hz")
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Alpha Lock") PORT_CODE(KEYCODE_CAPSLOCK)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Funct") PORT_CODE(KEYCODE_LALT)
|
||||
PORT_BIT(0x23, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static INPUT_PORTS_START( tv912b )
|
||||
PORT_INCLUDE(switches)
|
||||
|
||||
PORT_START("KEY0")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY1")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY2")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY3")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY4")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY5")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY6")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY7")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY8")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY9")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY10")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY11")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY12")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY13")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY14")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY15")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY16")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY17")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY18")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY19")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY20")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY21")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY22")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY23")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY24")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY25")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY26")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY27")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY28")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY29")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY30")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY31")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
INPUT_PORTS_END
|
||||
|
||||
static INPUT_PORTS_START( tv912c )
|
||||
PORT_INCLUDE(switches)
|
||||
|
||||
PORT_START("KEY0")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY1")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY2")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY3")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY4")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY5")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY6")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY7")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY8")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY9")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY10")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY11")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY12")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY13")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY14")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY15")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY16")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY17")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY18")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY19")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY20")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY21")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY22")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY23")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY24")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY25")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY26")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY27")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY28")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY29")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY30")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("KEY31")
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
|
||||
PORT_BIT(0xdc, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
INPUT_PORTS_END
|
||||
|
||||
MACHINE_CONFIG_START(tv912_state::tv912)
|
||||
MCFG_CPU_ADD("maincpu", I8035, XTAL_23_814MHz / 4)
|
||||
MCFG_CPU_PROGRAM_MAP(prog_map)
|
||||
MCFG_CPU_IO_MAP(io_map)
|
||||
MCFG_MCS48_PORT_P1_OUT_CB(WRITE8(tv912_state, p1_w))
|
||||
MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(tv912_state, p2_w))
|
||||
MCFG_MCS48_PORT_T1_IN_CB(DEVREADLINE("crtc", tms9927_device, bl_r))
|
||||
MCFG_MCS48_PORT_T1_IN_CB(DEVREADLINE("crtc", tms9927_device, bl_r)) MCFG_DEVCB_INVERT
|
||||
|
||||
MCFG_DEVICE_ADD("bankdev", ADDRESS_MAP_BANK, 0)
|
||||
MCFG_DEVICE_PROGRAM_MAP(bank_map)
|
||||
@ -170,6 +571,10 @@ MACHINE_CONFIG_START(tv912_state::tv912)
|
||||
MCFG_DEVICE_ADD("crtc", TMS9927, XTAL_23_814MHz)
|
||||
MCFG_TMS9927_CHAR_WIDTH(CHAR_WIDTH)
|
||||
MCFG_TMS9927_VSYN_CALLBACK(INPUTLINE("maincpu", MCS48_INPUT_IRQ))
|
||||
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
MCFG_SOUND_ADD("beep", BEEP, XTAL_23_814MHz / 7 / 11 / 256) // nominally 1200 Hz (same clock as for 75 baud setting)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/**************************************************************************************************************
|
||||
@ -197,5 +602,5 @@ ROM_START( tv912b )
|
||||
ROM_LOAD( "televideo912b_rom_a3.bin", 0x0000, 0x0800, CRC(bb9a7fbd) SHA1(5f1c4d41b25bd3ca4dbc336873362935daf283da) ) // 2316E
|
||||
ROM_END
|
||||
|
||||
COMP( 1978, tv912c, 0, 0, tv912, tv912c, tv912_state, 0, "TeleVideo Systems", "TVI-912C", MACHINE_IS_SKELETON )
|
||||
COMP( 1978, tv912b, tv912c, 0, tv912, tv912b, tv912_state, 0, "TeleVideo Systems", "TVI-912B", MACHINE_IS_SKELETON )
|
||||
COMP( 1978, tv912c, 0, 0, tv912, tv912c, tv912_state, 0, "TeleVideo Systems", "TVI-912C", MACHINE_NOT_WORKING )
|
||||
COMP( 1978, tv912b, tv912c, 0, tv912, tv912b, tv912_state, 0, "TeleVideo Systems", "TVI-912B", MACHINE_NOT_WORKING )
|
||||
|
Loading…
Reference in New Issue
Block a user