summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mess/drivers/super80.c36
-rw-r--r--src/mess/includes/super80.h31
-rw-r--r--src/mess/machine/super80.c38
3 files changed, 58 insertions, 47 deletions
diff --git a/src/mess/drivers/super80.c b/src/mess/drivers/super80.c
index 98d5d9d7f53..fd00097aeb8 100644
--- a/src/mess/drivers/super80.c
+++ b/src/mess/drivers/super80.c
@@ -324,7 +324,7 @@ static INPUT_PORTS_START( super80 )
PORT_DIPSETTING( 0x80, DEF_STR(Off))
PORT_DIPSETTING( 0x00, DEF_STR(On))
- PORT_START("X0") /* line 0 */
+ PORT_START("KEY.0") /* line 0 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@ `") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('@') PORT_CHAR('`') PORT_CHAR(0x00)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('H') PORT_CHAR(0x08)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('P') PORT_CHAR(0x10)
@@ -333,7 +333,7 @@ static INPUT_PORTS_START( super80 )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("REPT") PORT_CODE(KEYCODE_LALT)
- PORT_START("X1") /* line 1 */
+ PORT_START("KEY.1") /* line 1 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('A') PORT_CHAR(0x01)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('I') PORT_CHAR(0x09)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('Q') PORT_CHAR(0x11)
@@ -342,7 +342,7 @@ static INPUT_PORTS_START( super80 )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(": *") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(0x08)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_START("X2") /* line 2 */
+ PORT_START("KEY.2") /* line 2 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('B') PORT_CHAR(0x02)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('J') PORT_CHAR(0x0a) // port_char 0x0a is hijacked to 0x0d
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('R') PORT_CHAR(0x12)
@@ -351,7 +351,7 @@ static INPUT_PORTS_START( super80 )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(0x09)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Fire)") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
- PORT_START("X3") /* line 3 */
+ PORT_START("KEY.3") /* line 3 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('C') PORT_CHAR(0x03)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('K') PORT_CHAR(0x0b)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('S') PORT_CHAR(0x13)
@@ -360,7 +360,7 @@ static INPUT_PORTS_START( super80 )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LINEFEED") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(0x0a)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
- PORT_START("X4") /* line 4 */
+ PORT_START("KEY.4") /* line 4 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('D') PORT_CHAR(0x04)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('L') PORT_CHAR(0x0c)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('T') PORT_CHAR(0x14)
@@ -369,7 +369,7 @@ static INPUT_PORTS_START( super80 )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BRK") PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(0x03)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0d)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
- PORT_START("X5") /* line 5 */
+ PORT_START("KEY.5") /* line 5 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('E') PORT_CHAR(0x05)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('M') PORT_CHAR(0x0d)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('U') PORT_CHAR(0x15)
@@ -378,7 +378,7 @@ static INPUT_PORTS_START( super80 )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1b)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
- PORT_START("X6") /* line 6 */
+ PORT_START("KEY.6") /* line 6 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('F') PORT_CHAR(0x06)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('N') PORT_CHAR(0x0e)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('V') PORT_CHAR(0x16)
@@ -387,7 +387,7 @@ static INPUT_PORTS_START( super80 )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) PORT_CHAR(0x7f) PORT_CHAR(0x7f) PORT_CHAR(0x1f) // natural kbd, press ctrl-backspace to DEL
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
- PORT_START("X7") /* line 7 */
+ PORT_START("KEY.7") /* line 7 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('G') PORT_CHAR(0x07)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('O') PORT_CHAR(0x0f)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('W') PORT_CHAR(0x17)
@@ -429,7 +429,7 @@ static INPUT_PORTS_START( super80d )
PORT_DIPSETTING( 0x80, DEF_STR(Off))
PORT_DIPSETTING( 0x00, DEF_STR(On))
- PORT_START("X0") /* line 0 */
+ PORT_START("KEY.0") /* line 0 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@ `") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('@') PORT_CHAR('`') PORT_CHAR(0x00)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h') PORT_CHAR(0x08)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p') PORT_CHAR(0x10)
@@ -438,7 +438,7 @@ static INPUT_PORTS_START( super80d )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("REPT") PORT_CODE(KEYCODE_LALT)
- PORT_START("X1") /* line 1 */
+ PORT_START("KEY.1") /* line 1 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a') PORT_CHAR(0x01)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i') PORT_CHAR(0x09)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q') PORT_CHAR(0x11)
@@ -447,7 +447,7 @@ static INPUT_PORTS_START( super80d )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(": *") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(0x08)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_START("X2") /* line 2 */
+ PORT_START("KEY.2") /* line 2 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b') PORT_CHAR(0x02)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') PORT_CHAR(0x0a) // port_char 0x0a is hijacked to 0x0d
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r') PORT_CHAR(0x12)
@@ -456,7 +456,7 @@ static INPUT_PORTS_START( super80d )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(0x09)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Fire)") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
- PORT_START("X3") /* line 3 */
+ PORT_START("KEY.3") /* line 3 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c') PORT_CHAR(0x03)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k') PORT_CHAR(0x0b)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s') PORT_CHAR(0x13)
@@ -465,7 +465,7 @@ static INPUT_PORTS_START( super80d )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LINEFEED") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(0x0a)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
- PORT_START("X4") /* line 4 */
+ PORT_START("KEY.4") /* line 4 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d') PORT_CHAR(0x04)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l') PORT_CHAR(0x0c)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t') PORT_CHAR(0x14)
@@ -474,7 +474,7 @@ static INPUT_PORTS_START( super80d )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BRK") PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(0x03)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(0x0d)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Right)") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
- PORT_START("X5") /* line 5 */
+ PORT_START("KEY.5") /* line 5 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('e') PORT_CHAR(0x05)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m') PORT_CHAR(0x0d)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('u') PORT_CHAR(0x15)
@@ -483,7 +483,7 @@ static INPUT_PORTS_START( super80d )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1b)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Left)") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
- PORT_START("X6") /* line 6 */
+ PORT_START("KEY.6") /* line 6 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f') PORT_CHAR(0x06)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') PORT_CHAR(0x0e)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v') PORT_CHAR(0x16)
@@ -492,7 +492,7 @@ static INPUT_PORTS_START( super80d )
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) PORT_CHAR(0x7f) PORT_CHAR(0x5f) PORT_CHAR(0x1f) // natural kbd, press ctrl-backspace to DEL
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("(Down)") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
- PORT_START("X7") /* line 7 */
+ PORT_START("KEY.7") /* line 7 */
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g') PORT_CHAR(0x07)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o') PORT_CHAR(0x0f)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w') PORT_CHAR(0x17)
@@ -759,6 +759,8 @@ static MACHINE_CONFIG_START( super80, super80_state )
/* cassette */
MCFG_CASSETTE_ADD( "cassette", super80_cassette_interface )
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_p", super80_state, timer_p, attotime::from_hz(40000)) // cass read
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_k", super80_state, timer_k, attotime::from_hz(100)) // keyb scan
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( super80d, super80 )
@@ -835,6 +837,8 @@ static MACHINE_CONFIG_START( super80v, super80_state )
/* cassette */
MCFG_CASSETTE_ADD( "cassette", super80_cassette_interface )
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_p", super80_state, timer_p, attotime::from_hz(40000)) // cass read
+ MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_k", super80_state, timer_k, attotime::from_hz(300)) // keyb scan
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( super80r, super80v )
diff --git a/src/mess/includes/super80.h b/src/mess/includes/super80.h
index d6dfd2f9b93..779a7153289 100644
--- a/src/mess/includes/super80.h
+++ b/src/mess/includes/super80.h
@@ -20,7 +20,7 @@
d2 super80v video or colour bankswitch (1=video ram, 0=colour ram)
d2 super80 screen off (=2mhz) or on (bursts of 2mhz at 50hz = 1mhz) */
-
+// NOTE: ioport_array is buggy in this driver, do not use it
class super80_state : public driver_device
{
@@ -30,23 +30,23 @@ public:
, m_palette(*this, "palette")
, m_maincpu(*this, "maincpu")
, m_pio(*this, "z80pio")
- , m_dma(*this, "dma")
, m_cassette(*this, "cassette")
, m_wave(*this, WAVE_TAG)
, m_speaker(*this, "speaker")
, m_centronics(*this, "centronics")
, m_cent_data_out(*this, "cent_data_out")
- , m_crtc(*this, "crtc")
, m_io_dsw(*this, "DSW")
- , m_io_x0(*this, "X0")
- , m_io_x1(*this, "X1")
- , m_io_x2(*this, "X2")
- , m_io_x3(*this, "X3")
- , m_io_x4(*this, "X4")
- , m_io_x5(*this, "X5")
- , m_io_x6(*this, "X6")
- , m_io_x7(*this, "X7")
, m_io_config(*this, "CONFIG")
+ , m_io_x0(*this, "KEY.0")
+ , m_io_x1(*this, "KEY.1")
+ , m_io_x2(*this, "KEY.2")
+ , m_io_x3(*this, "KEY.3")
+ , m_io_x4(*this, "KEY.4")
+ , m_io_x5(*this, "KEY.5")
+ , m_io_x6(*this, "KEY.6")
+ , m_io_x7(*this, "KEY.7")
+ , m_crtc(*this, "crtc")
+ , m_dma(*this, "dma")
, m_fdc (*this, "fdc")
, m_floppy0(*this, "fdc:0")
, m_floppy1(*this, "fdc:1")
@@ -89,6 +89,8 @@ public:
TIMER_CALLBACK_MEMBER(super80_timer);
TIMER_CALLBACK_MEMBER(super80_reset);
TIMER_CALLBACK_MEMBER(super80_halfspeed);
+ TIMER_DEVICE_CALLBACK_MEMBER(timer_p);
+ TIMER_DEVICE_CALLBACK_MEMBER(timer_k);
UINT8 m_s_options;
UINT8 m_shared;
UINT8 *m_p_videoram;
@@ -106,6 +108,7 @@ private:
UINT8 m_cass_data[4];
UINT8 m_int_sw;
UINT8 m_last_data;
+ UINT8 m_key_pressed;
UINT16 m_vidpg;
UINT8 m_current_palette;
UINT8 m_current_charset;
@@ -119,14 +122,13 @@ private:
void driver_init_common();
required_device<cpu_device> m_maincpu;
required_device<z80pio_device> m_pio;
- optional_device<z80dma_device> m_dma;
required_device<cassette_image_device> m_cassette;
required_device<wave_device> m_wave;
required_device<speaker_sound_device> m_speaker;
required_device<centronics_device> m_centronics;
required_device<output_latch_device> m_cent_data_out;
- optional_device<mc6845_device> m_crtc;
required_ioport m_io_dsw;
+ required_ioport m_io_config;
required_ioport m_io_x0;
required_ioport m_io_x1;
required_ioport m_io_x2;
@@ -135,7 +137,8 @@ private:
required_ioport m_io_x5;
required_ioport m_io_x6;
required_ioport m_io_x7;
- required_ioport m_io_config;
+ optional_device<mc6845_device> m_crtc;
+ optional_device<z80dma_device> m_dma;
optional_device<wd2793_t> m_fdc;
optional_device<floppy_connector> m_floppy0;
optional_device<floppy_connector> m_floppy1;
diff --git a/src/mess/machine/super80.c b/src/mess/machine/super80.c
index d52f96da973..82fc96a8915 100644
--- a/src/mess/machine/super80.c
+++ b/src/mess/machine/super80.c
@@ -9,7 +9,8 @@
WRITE8_MEMBER( super80_state::pio_port_a_w )
{
m_keylatch = data;
-};
+ m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff)); // refresh kbd int
+}
READ8_MEMBER( super80_state::pio_port_b_r )
{
@@ -32,6 +33,8 @@ READ8_MEMBER( super80_state::pio_port_b_r )
if (!BIT(m_keylatch, 7))
data &= m_io_x7->read();
+ m_key_pressed = 3;
+
return data;
};
@@ -66,25 +69,27 @@ void super80_state::super80_cassette_motor( UINT8 data )
/********************************************* TIMER ************************************************/
- /* this timer runs at 200khz and does 2 jobs:
- 1. Scan the keyboard and present the results to the pio
- 2. Emulate the 2 chips in the cassette input circuit
+// If normal keyboard scan has stopped, then do a scan to allow the interrupt key sequence
+TIMER_DEVICE_CALLBACK_MEMBER( super80_state::timer_k )
+{
+ if (m_key_pressed)
+ m_key_pressed--;
+ else
+ if (!m_key_pressed)
+ m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff));
+}
- Reasons why it is necessary:
- 1. The real z80pio is driven by the cpu clock and is capable of independent actions.
- MAME does not support this at all. If the interrupt key sequence is entered, the
- computer can be reset out of a hung state by the operator.
- 2. This "emulates" U79 CD4046BCN PLL chip and U1 LM311P op-amp. U79 converts a frequency to a voltage,
+/* cassette load circuit
+ This "emulates" U79 CD4046BCN PLL chip and U1 LM311P op-amp. U79 converts a frequency to a voltage,
and U1 amplifies that voltage to digital levels. U1 has a trimpot connected, to set the midpoint.
The MDS homebrew input circuit consists of 2 op-amps followed by a D-flipflop.
- My "read-any-system" cassette circuit was a CA3140 op-amp, the smarts being done in software.
+ The "read-any-system" cassette circuit is a CA3140 op-amp, the smarts being done in software.
bit 0 = original system (U79 and U1)
bit 1 = MDS fast system
bit 2 = CA3140 */
-
-TIMER_CALLBACK_MEMBER(super80_state::super80_timer)
+TIMER_DEVICE_CALLBACK_MEMBER( super80_state::timer_p )
{
UINT8 cass_ws=0;
@@ -95,11 +100,9 @@ TIMER_CALLBACK_MEMBER(super80_state::super80_timer)
{
if (cass_ws) m_cass_data[3] ^= 2; // the MDS flipflop
m_cass_data[0] = cass_ws;
- m_cass_data[2] = ((m_cass_data[1] < 0x40) ? 1 : 0) | cass_ws | m_cass_data[3];
+ m_cass_data[2] = ((m_cass_data[1] < 0x0d) ? 1 : 0) | cass_ws | m_cass_data[3];
m_cass_data[1] = 0;
}
-
- m_pio->port_b_write(pio_port_b_r(generic_space(),0,0xff));
}
/* after the first 4 bytes have been read from ROM, switch the ram back in */
@@ -221,7 +224,9 @@ WRITE8_MEMBER( super80_state::super80r_f0_w )
void super80_state::machine_reset()
{
- m_shared=0xff;
+ m_shared = 0xff;
+ m_keylatch = 0xff;
+ m_key_pressed = 0;
machine().scheduler().timer_set(attotime::from_usec(10), timer_expired_delegate(FUNC(super80_state::super80_reset),this));
membank("boot")->set_entry(1);
}
@@ -230,7 +235,6 @@ void super80_state::driver_init_common()
{
UINT8 *RAM = memregion("maincpu")->base();
membank("boot")->configure_entries(0, 2, &RAM[0x0000], 0xc000);
- machine().scheduler().timer_pulse(attotime::from_hz(200000), timer_expired_delegate(FUNC(super80_state::super80_timer),this)); /* timer for keyboard and cassette */
}
DRIVER_INIT_MEMBER(super80_state,super80)