summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/mess/drivers/atom.c46
-rw-r--r--src/mess/drivers/beta.c17
-rw-r--r--src/mess/drivers/bullet.c4
-rw-r--r--src/mess/drivers/bw12.c4
-rw-r--r--src/mess/drivers/bw2.c15
-rw-r--r--src/mess/drivers/c128.c10
-rw-r--r--src/mess/drivers/c64.c2
-rw-r--r--src/mess/drivers/c80.c8
-rw-r--r--src/mess/drivers/cbm2.c32
-rw-r--r--src/mess/drivers/comx35.c4
-rw-r--r--src/mess/drivers/mikromik.c39
-rw-r--r--src/mess/drivers/mpz80.c2
-rw-r--r--src/mess/drivers/sage2.c64
-rw-r--r--src/mess/drivers/studio2.c6
-rw-r--r--src/mess/drivers/vip.c4
-rw-r--r--src/mess/includes/atom.h30
-rw-r--r--src/mess/includes/beta.h11
-rw-r--r--src/mess/includes/bw12.h2
-rw-r--r--src/mess/includes/bw2.h20
-rw-r--r--src/mess/includes/c128.h8
-rw-r--r--src/mess/includes/c64.h2
-rw-r--r--src/mess/includes/c80.h8
-rw-r--r--src/mess/includes/cbm2.h34
-rw-r--r--src/mess/includes/comx35.h2
-rw-r--r--src/mess/includes/mikromik.h22
-rw-r--r--src/mess/includes/mpz80.h2
-rw-r--r--src/mess/includes/sage2.h21
-rw-r--r--src/mess/includes/studio2.h8
-rw-r--r--src/mess/includes/vip.h4
-rw-r--r--src/mess/machine/abc77.c43
-rw-r--r--src/mess/machine/abc77.h12
-rw-r--r--src/mess/machine/abc800kb.c31
-rw-r--r--src/mess/machine/abc800kb.h12
-rw-r--r--src/mess/machine/abc99.c6
-rw-r--r--src/mess/machine/abc99.h2
-rw-r--r--src/mess/machine/adam_kb.c39
-rw-r--r--src/mess/machine/adam_kb.h13
-rw-r--r--src/mess/machine/tandy2kb.c36
-rw-r--r--src/mess/machine/tandy2kb.h12
-rw-r--r--src/mess/machine/trs80m2kb.c62
-rw-r--r--src/mess/machine/trs80m2kb.h12
-rw-r--r--src/mess/machine/v1050kb.c60
-rw-r--r--src/mess/machine/v1050kb.h12
-rw-r--r--src/mess/machine/victor9kb.c39
-rw-r--r--src/mess/machine/victor9kb.h13
45 files changed, 606 insertions, 229 deletions
diff --git a/src/mess/drivers/atom.c b/src/mess/drivers/atom.c
index 6dcef18f6c5..66dc1393f12 100644
--- a/src/mess/drivers/atom.c
+++ b/src/mess/drivers/atom.c
@@ -218,7 +218,7 @@ INPUT_CHANGED_MEMBER( atom_state::trigger_reset )
-------------------------------------------------*/
static INPUT_PORTS_START( atom )
- PORT_START("KEY0")
+ PORT_START("Y0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=')
@@ -228,7 +228,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY1")
+ PORT_START("Y1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
@@ -238,7 +238,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY2")
+ PORT_START("Y2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x87\x95") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+')
@@ -248,7 +248,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY3")
+ PORT_START("Y3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x87\x94") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(':') PORT_CHAR('*')
@@ -258,7 +258,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY4")
+ PORT_START("Y4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_TOGGLE
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DELETE") PORT_CODE(KEYCODE_DEL) PORT_CHAR(8)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
@@ -268,7 +268,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY5")
+ PORT_START("Y5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR('^')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("COPY") PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB))
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
@@ -278,7 +278,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY6")
+ PORT_START("Y6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'')
@@ -288,7 +288,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY7")
+ PORT_START("Y7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('\\')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
@@ -298,7 +298,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY8")
+ PORT_START("Y8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('[')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
@@ -308,7 +308,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY9")
+ PORT_START("Y9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(32)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
@@ -318,7 +318,7 @@ static INPUT_PORTS_START( atom )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("KEY10")
+ PORT_START("Y10")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -394,19 +394,19 @@ READ8_MEMBER( atom_state::ppi_pb_r )
switch (m_keylatch)
{
- case 0: data &= ioport("KEY0")->read(); break;
- case 1: data &= ioport("KEY1")->read(); break;
- case 2: data &= ioport("KEY2")->read(); break;
- case 3: data &= ioport("KEY3")->read(); break;
- case 4: data &= ioport("KEY4")->read(); break;
- case 5: data &= ioport("KEY5")->read(); break;
- case 6: data &= ioport("KEY6")->read(); break;
- case 7: data &= ioport("KEY7")->read(); break;
- case 8: data &= ioport("KEY8")->read(); break;
- case 9: data &= ioport("KEY9")->read(); break;
+ 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;
}
- data &= ioport("KEY10")->read();
+ data &= m_y10->read();
return data;
}
@@ -437,7 +437,7 @@ READ8_MEMBER( atom_state::ppi_pc_r )
data |= (m_cassette->input() > 0.0) << 5;
/* keyboard RPT */
- data |= BIT(ioport("RPT")->read(), 0) << 6;
+ data |= BIT(m_rpt->read(), 0) << 6;
/* MC6847 FS */
data |= (m_vdg->fs_r() ? 1 : 0) << 7;
diff --git a/src/mess/drivers/beta.c b/src/mess/drivers/beta.c
index 97bb5c2f319..5e054970faa 100644
--- a/src/mess/drivers/beta.c
+++ b/src/mess/drivers/beta.c
@@ -113,14 +113,14 @@ READ8_MEMBER( beta_state::riot_pa_r )
switch (m_ls145_p)
{
- case 6: data &= ioport("Q6")->read(); break;
- case 7: data &= ioport("Q7")->read(); break;
- case 8: data &= ioport("Q8")->read(); break;
- case 9: data &= ioport("Q9")->read(); break;
+ case 6: data &= m_q6->read(); break;
+ case 7: data &= m_q7->read(); break;
+ case 8: data &= m_q8->read(); break;
+ case 9: data &= m_q9->read(); break;
default:
if (!m_eprom_oe && !m_eprom_ce)
{
- data = memregion(EPROM_TAG)->base()[m_eprom_addr & 0x7ff];
+ data = m_eprom[m_eprom_addr & 0x7ff];
popmessage("EPROM read %04x = %02x\n", m_eprom_addr & 0x7ff, data);
}
}
@@ -207,7 +207,7 @@ WRITE8_MEMBER( beta_state::riot_pb_w )
if (BIT(data, 6) && (!BIT(m_old_data, 7) && BIT(data, 7)))
{
popmessage("EPROM write %04x = %02x\n", m_eprom_addr & 0x7ff, m_eprom_data);
- memregion(EPROM_TAG)->base()[m_eprom_addr & 0x7ff] &= m_eprom_data;
+ m_eprom[m_eprom_addr & 0x7ff] &= m_eprom_data;
}
m_old_data = data;
@@ -237,7 +237,10 @@ void beta_state::machine_start()
{
m_led_refresh_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(beta_state::led_refresh),this));
- /* register for state saving */
+ // find memory regions
+ m_eprom = memregion(EPROM_TAG)->base();
+
+ // state saving
save_item(NAME(m_eprom_oe));
save_item(NAME(m_eprom_ce));
save_item(NAME(m_eprom_addr));
diff --git a/src/mess/drivers/bullet.c b/src/mess/drivers/bullet.c
index bef7ba52e18..9ab4055822f 100644
--- a/src/mess/drivers/bullet.c
+++ b/src/mess/drivers/bullet.c
@@ -327,7 +327,7 @@ READ8_MEMBER( bullet_state::info_r )
UINT8 data = 0;
// DIP switches
- data |= ioport("SW1")->read() & 0x0f;
+ data |= m_sw1->read() & 0x0f;
// floppy
data |= m_fdc->hld_r() << 4;
@@ -579,7 +579,7 @@ READ8_MEMBER( bulletf_state::hwsts_r )
data |= m_centronics->busy_r();
// DIP switches
- data |= ioport("SW1")->read() & 0x06;
+ data |= m_sw1->read() & 0x06;
// floppy
data |= (m_floppy ? m_floppy->twosid_r() : 1) << 3;
diff --git a/src/mess/drivers/bw12.c b/src/mess/drivers/bw12.c
index 53018b80ef1..41de52543de 100644
--- a/src/mess/drivers/bw12.c
+++ b/src/mess/drivers/bw12.c
@@ -515,12 +515,12 @@ static const struct pit8253_config pit_intf =
READ_LINE_MEMBER( bw12_state::ay3600_shift_r )
{
- return BIT(ioport("MODIFIERS")->read(), 0);
+ return BIT(m_modifiers->read(), 0);
}
READ_LINE_MEMBER( bw12_state::ay3600_control_r )
{
- return BIT(ioport("MODIFIERS")->read(), 1);
+ return BIT(m_modifiers->read(), 1);
}
WRITE_LINE_MEMBER( bw12_state::ay3600_data_ready_w )
diff --git a/src/mess/drivers/bw2.c b/src/mess/drivers/bw2.c
index 052d6ad7de0..c134b698c3f 100644
--- a/src/mess/drivers/bw2.c
+++ b/src/mess/drivers/bw2.c
@@ -433,13 +433,20 @@ READ8_MEMBER( bw2_state::ppi_pb_r )
*/
- static const char *const rownames[] = { "Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7", "Y8", "Y9" };
-
UINT8 data = 0xff;
- if (m_kb <= 9)
+ switch (m_kb)
{
- data = ioport(rownames[m_kb])->read();
+ 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;
diff --git a/src/mess/drivers/c128.c b/src/mess/drivers/c128.c
index 9504c6558b1..27c118cdb11 100644
--- a/src/mess/drivers/c128.c
+++ b/src/mess/drivers/c128.c
@@ -39,7 +39,7 @@
inline void c128_state::check_interrupts()
{
- int restore = BIT(ioport("SPECIAL")->read(), 7);
+ int restore = BIT(m_special->read(), 7);
int irq = m_cia1_irq || m_vic_irq || m_exp_irq;
int nmi = m_cia2_irq || restore || m_exp_nmi;
@@ -767,7 +767,7 @@ READ_LINE_MEMBER( c128_state::mmu_exrom_r )
READ_LINE_MEMBER( c128_state::mmu_sense40_r )
{
- return BIT(ioport("SPECIAL")->read(), 4);
+ return BIT(m_special->read(), 4);
}
static MOS8722_INTERFACE( mmu_intf )
@@ -933,9 +933,9 @@ READ8_MEMBER( c128_state::cia1_pb_r )
data &= cbm_common_cia0_port_b_r(m_cia1, cia0porta);
- if (!BIT(m_vic_k, 0)) data &= ~ioport("K0")->read();
- if (!BIT(m_vic_k, 1)) data &= ~ioport("K1")->read();
- if (!BIT(m_vic_k, 2)) data &= ~ioport("K2")->read();
+ if (!BIT(m_vic_k, 0)) data &= ~m_k0->read();
+ if (!BIT(m_vic_k, 1)) data &= ~m_k1->read();
+ if (!BIT(m_vic_k, 2)) data &= ~m_k2->read();
return data;
}
diff --git a/src/mess/drivers/c64.c b/src/mess/drivers/c64.c
index 78e9538fedc..4c09d43e079 100644
--- a/src/mess/drivers/c64.c
+++ b/src/mess/drivers/c64.c
@@ -47,7 +47,7 @@
void c64_state::check_interrupts()
{
- int restore = BIT(ioport("SPECIAL")->read(), 7);
+ int restore = BIT(m_special->read(), 7);
int irq = m_cia1_irq || m_vic_irq || m_exp_irq;
int nmi = m_cia2_irq || restore || m_exp_nmi;
diff --git a/src/mess/drivers/c80.c b/src/mess/drivers/c80.c
index b0441d688c6..4cf181e64eb 100644
--- a/src/mess/drivers/c80.c
+++ b/src/mess/drivers/c80.c
@@ -2,8 +2,6 @@
C-80
- 12/05/2009 Skeleton driver.
-
Pasting:
0-F : as is
+ (inc) : ^
@@ -109,9 +107,9 @@ READ8_MEMBER( c80_state::pio1_pa_r )
{
if (!BIT(m_keylatch, i))
{
- if (!BIT(ioport("ROW0")->read(), i)) data &= ~0x01;
- if (!BIT(ioport("ROW1")->read(), i)) data &= ~0x02;
- if (!BIT(ioport("ROW2")->read(), i)) data &= ~0x04;
+ if (!BIT(m_row0->read(), i)) data &= ~0x01;
+ if (!BIT(m_row1->read(), i)) data &= ~0x02;
+ if (!BIT(m_row2->read(), i)) data &= ~0x04;
}
}
diff --git a/src/mess/drivers/cbm2.c b/src/mess/drivers/cbm2.c
index c5f21a2b654..6c61a2498c5 100644
--- a/src/mess/drivers/cbm2.c
+++ b/src/mess/drivers/cbm2.c
@@ -1376,22 +1376,22 @@ UINT8 cbm2_state::read_keyboard()
{
UINT8 data = 0xff;
- if (!BIT(m_tpi2_pa, 0)) data &= ioport("PA0")->read();
- if (!BIT(m_tpi2_pa, 1)) data &= ioport("PA1")->read();
- if (!BIT(m_tpi2_pa, 2)) data &= ioport("PA2")->read();
- if (!BIT(m_tpi2_pa, 3)) data &= ioport("PA3")->read();
- if (!BIT(m_tpi2_pa, 4)) data &= ioport("PA4")->read();
- if (!BIT(m_tpi2_pa, 5)) data &= ioport("PA5")->read();
- if (!BIT(m_tpi2_pa, 6)) data &= ioport("PA6")->read();
- if (!BIT(m_tpi2_pa, 7)) data &= ioport("PA7")->read();
- if (!BIT(m_tpi2_pb, 0)) data &= ioport("PB0")->read() & ioport("LOCK")->read();
- if (!BIT(m_tpi2_pb, 1)) data &= ioport("PB1")->read();
- if (!BIT(m_tpi2_pb, 2)) data &= ioport("PB2")->read();
- if (!BIT(m_tpi2_pb, 3)) data &= ioport("PB3")->read();
- if (!BIT(m_tpi2_pb, 4)) data &= ioport("PB4")->read();
- if (!BIT(m_tpi2_pb, 5)) data &= ioport("PB5")->read();
- if (!BIT(m_tpi2_pb, 6)) data &= ioport("PB6")->read();
- if (!BIT(m_tpi2_pb, 7)) data &= ioport("PB7")->read();
+ if (!BIT(m_tpi2_pa, 0)) data &= m_pa0->read();
+ if (!BIT(m_tpi2_pa, 1)) data &= m_pa1->read();
+ if (!BIT(m_tpi2_pa, 2)) data &= m_pa2->read();
+ if (!BIT(m_tpi2_pa, 3)) data &= m_pa3->read();
+ if (!BIT(m_tpi2_pa, 4)) data &= m_pa4->read();
+ if (!BIT(m_tpi2_pa, 5)) data &= m_pa5->read();
+ if (!BIT(m_tpi2_pa, 6)) data &= m_pa6->read();
+ if (!BIT(m_tpi2_pa, 7)) data &= m_pa7->read();
+ if (!BIT(m_tpi2_pb, 0)) data &= m_pb0->read() & m_lock->read();
+ if (!BIT(m_tpi2_pb, 1)) data &= m_pb1->read();
+ if (!BIT(m_tpi2_pb, 2)) data &= m_pb2->read();
+ if (!BIT(m_tpi2_pb, 3)) data &= m_pb3->read();
+ if (!BIT(m_tpi2_pb, 4)) data &= m_pb4->read();
+ if (!BIT(m_tpi2_pb, 5)) data &= m_pb5->read();
+ if (!BIT(m_tpi2_pb, 6)) data &= m_pb6->read();
+ if (!BIT(m_tpi2_pb, 7)) data &= m_pb7->read();
return data;
}
diff --git a/src/mess/drivers/comx35.c b/src/mess/drivers/comx35.c
index 6dcb5851349..474844166ce 100644
--- a/src/mess/drivers/comx35.c
+++ b/src/mess/drivers/comx35.c
@@ -357,12 +357,12 @@ static COSMAC_INTERFACE( cosmac_intf )
READ_LINE_MEMBER( comx35_state::shift_r )
{
- return BIT(ioport("MODIFIERS")->read(), 0);
+ return BIT(m_modifiers->read(), 0);
}
READ_LINE_MEMBER( comx35_state::control_r )
{
- return BIT(ioport("MODIFIERS")->read(), 1);
+ return BIT(m_modifiers->read(), 1);
}
static CDP1871_INTERFACE( kbc_intf )
diff --git a/src/mess/drivers/mikromik.c b/src/mess/drivers/mikromik.c
index eeb91222cb3..3211ed2b149 100644
--- a/src/mess/drivers/mikromik.c
+++ b/src/mess/drivers/mikromik.c
@@ -263,10 +263,23 @@ WRITE8_MEMBER( mm1_state::ls259_w )
void mm1_state::scan_keyboard()
{
- static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8", "ROW9" };
+ UINT8 data = 0xff;
- UINT8 data = ioport(keynames[m_drive])->read();
- UINT8 special = ioport("SPECIAL")->read();
+ switch (m_drive)
+ {
+ 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;
+ }
+
+ UINT8 special = m_special->read();
int ctrl = BIT(special, 0);
int shift = BIT(special, 2) & BIT(special, 1);
UINT8 keydata = 0xff;
@@ -344,7 +357,7 @@ ADDRESS_MAP_END
//-------------------------------------------------
static INPUT_PORTS_START( mm1 )
- PORT_START("ROW0")
+ PORT_START("Y0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
@@ -354,7 +367,7 @@ static INPUT_PORTS_START( mm1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
- PORT_START("ROW1")
+ PORT_START("Y1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
@@ -364,7 +377,7 @@ static INPUT_PORTS_START( mm1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
- PORT_START("ROW2")
+ PORT_START("Y2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
@@ -374,7 +387,7 @@ static INPUT_PORTS_START( mm1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
- PORT_START("ROW3")
+ PORT_START("Y3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
@@ -384,7 +397,7 @@ static INPUT_PORTS_START( mm1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
- PORT_START("ROW4")
+ PORT_START("Y4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
@@ -394,7 +407,7 @@ static INPUT_PORTS_START( mm1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
- PORT_START("ROW5")
+ PORT_START("Y5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('+') PORT_CHAR('?')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xC2\xB4 '") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(0x00B4) PORT_CHAR('`')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x96")
@@ -404,7 +417,7 @@ static INPUT_PORTS_START( mm1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(a_RING " " A_RING) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0x00E5) PORT_CHAR(0x00C5)
- PORT_START("ROW6")
+ PORT_START("Y6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('<') PORT_CHAR('>')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
@@ -414,7 +427,7 @@ static INPUT_PORTS_START( mm1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LF")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('@') PORT_CHAR('*')
- PORT_START("ROW7")
+ PORT_START("Y7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
@@ -424,7 +437,7 @@ static INPUT_PORTS_START( mm1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD)
- PORT_START("ROW8")
+ PORT_START("Y8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
@@ -434,7 +447,7 @@ static INPUT_PORTS_START( mm1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 0") PORT_CODE(KEYCODE_0_PAD)
- PORT_START("ROW9")
+ PORT_START("Y9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))
diff --git a/src/mess/drivers/mpz80.c b/src/mess/drivers/mpz80.c
index 57e2acd8e25..572565d63b3 100644
--- a/src/mess/drivers/mpz80.c
+++ b/src/mess/drivers/mpz80.c
@@ -468,7 +468,7 @@ READ8_MEMBER( mpz80_state::switch_r )
data |= m_int_pend << 1;
// boot address
- data |= ioport("16C")->read() & 0xfc;
+ data |= m_16c->read() & 0xfc;
return data;
}
diff --git a/src/mess/drivers/sage2.c b/src/mess/drivers/sage2.c
index c4fb0bdeeab..e72204603e5 100644
--- a/src/mess/drivers/sage2.c
+++ b/src/mess/drivers/sage2.c
@@ -38,16 +38,16 @@
//**************************************************************************
//-------------------------------------------------
-// mmu_r -
+// read -
//-------------------------------------------------
-READ8_MEMBER( sage2_state::mmu_r )
+READ8_MEMBER( sage2_state::read )
{
UINT8 data = 0xff;
if (m_reset || (offset >= 0xfe0000))
{
- data = memregion(M68000_TAG)->base()[offset & 0x1fff];
+ data = m_rom[offset & 0x1fff];
}
else if (offset < 0x080000)
{
@@ -59,10 +59,10 @@ READ8_MEMBER( sage2_state::mmu_r )
//-------------------------------------------------
-// mmu_w -
+// write -
//-------------------------------------------------
-WRITE8_MEMBER( sage2_state::mmu_w )
+WRITE8_MEMBER( sage2_state::write )
{
if (offset < 0x080000)
{
@@ -82,9 +82,9 @@ WRITE8_MEMBER( sage2_state::mmu_w )
static ADDRESS_MAP_START( sage2_mem, AS_PROGRAM, 16, sage2_state )
ADDRESS_MAP_UNMAP_HIGH
- AM_RANGE(0x000000, 0xfeffff) AM_READWRITE8(mmu_r, mmu_w, 0xffff)
+ AM_RANGE(0x000000, 0xfeffff) AM_READWRITE8(read, write, 0xffff)
AM_RANGE(0xffc000, 0xffc007) AM_DEVREADWRITE8_LEGACY(I8253_1_TAG, pit8253_r, pit8253_w, 0x00ff)
-// AM_RANGE(0xffc010, 0xffc01f) AM_DEVREADWRITE8(TMS9914_TAG, tms9914_device, read, write, 0x00ff)
+ AM_RANGE(0xffc010, 0xffc01f) AM_NOP //AM_DEVREADWRITE8(TMS9914_TAG, tms9914_device, read, write, 0x00ff)
AM_RANGE(0xffc020, 0xffc027) AM_DEVREADWRITE8(I8255A_0_TAG, i8255_device, read, write, 0x00ff) // i8255, DIPs + Floppy ctrl port
AM_RANGE(0xffc030, 0xffc031) AM_DEVREADWRITE8(I8251_1_TAG, i8251_device, data_r, data_w, 0x00ff)
AM_RANGE(0xffc032, 0xffc033) AM_DEVREADWRITE8(I8251_1_TAG, i8251_device, status_r, control_w, 0x00ff)
@@ -246,23 +246,18 @@ WRITE8_MEMBER( sage2_state::ppi0_pc_w )
update_fdc_int();
// drive select
- m_sl0 = BIT(data, 3);
- m_sl1 = BIT(data, 4);
+ m_floppy = NULL;
- if(m_sl0)
- m_fdc->set_floppy(m_floppy0);
- else if(m_sl1)
- m_fdc->set_floppy(m_floppy1);
- else
- m_fdc->set_floppy(NULL);
+ if (BIT(data, 3)) m_floppy = m_floppy0->get_device();
+ if (BIT(data, 4)) m_floppy = m_floppy1->get_device();
- // floppy motor
- m_floppy0->mon_w(BIT(data, 5));
- m_floppy1->mon_w(BIT(data, 5));
+ m_fdc->set_floppy(m_floppy);
+ // floppy motor
+ if (m_floppy) m_floppy->mon_w(BIT(data, 5));
+
// FDC reset
- if(BIT(data, 7))
- m_fdc->reset();
+ if(BIT(data, 7)) m_fdc->reset();
}
static I8255A_INTERFACE( ppi0_intf )
@@ -303,8 +298,7 @@ READ8_MEMBER( sage2_state::ppi1_pb_r )
data = m_fdc->get_irq();
// floppy write protected
- if (!m_sl0) data |= m_floppy0->wpt_r() << 1;
- if (!m_sl1) data |= m_floppy1->wpt_r() << 1;
+ data = (m_floppy ? m_floppy->wpt_r() : 1) << 1;
// RS-232 ring indicator
@@ -477,12 +471,12 @@ static const i8251_interface usart1_intf =
//-------------------------------------------------
static SLOT_INTERFACE_START( sage2_floppies )
- SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
+ SLOT_INTERFACE( "525qd", FLOPPY_525_QD ) // Mitsubishi M4859
SLOT_INTERFACE_END
void sage2_state::update_fdc_int()
{
- m_maincpu->set_input_line(M68K_IRQ_6, m_fdie & m_fdc_int);
+ m_maincpu->set_input_line(M68K_IRQ_6, m_fdie && m_fdc_int);
}
void sage2_state::fdc_irq(bool state)
@@ -491,10 +485,6 @@ void sage2_state::fdc_irq(bool state)
update_fdc_int();
}
-void sage2_state::machine_start()
-{
- m_fdc->setup_intrq_cb(upd765a_device::line_cb(FUNC(sage2_state::fdc_irq), this));
-}
//-------------------------------------------------
// centronics_interface centronics_intf
@@ -554,6 +544,20 @@ static GENERIC_TERMINAL_INTERFACE( terminal_intf )
//**************************************************************************
//-------------------------------------------------
+// MACHINE_START( sage2 )
+//-------------------------------------------------
+
+void sage2_state::machine_start()
+{
+ // find memory regions
+ m_rom = memregion(M68000_TAG)->base();
+
+ // setup floppy callbacks
+ m_fdc->setup_intrq_cb(upd765a_device::line_cb(FUNC(sage2_state::fdc_irq), this));
+}
+
+
+//-------------------------------------------------
// MACHINE_RESET( sage2 )
//-------------------------------------------------
@@ -590,8 +594,8 @@ static MACHINE_CONFIG_START( sage2, sage2_state )
MCFG_I8251_ADD(I8251_1_TAG, usart1_intf)
MCFG_UPD765A_ADD(UPD765_TAG, false, false)
MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, centronics_intf)
- MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", sage2_floppies, "525dd", 0, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", sage2_floppies, "525dd", 0, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", sage2_floppies, "525qd", 0, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", sage2_floppies, "525qd", 0, floppy_image_device::default_floppy_formats)
MCFG_IEEE488_BUS_ADD(ieee488_intf)
// internal ram
diff --git a/src/mess/drivers/studio2.c b/src/mess/drivers/studio2.c
index 7e1d46c91ed..c1fd598eb8a 100644
--- a/src/mess/drivers/studio2.c
+++ b/src/mess/drivers/studio2.c
@@ -355,17 +355,17 @@ static CDP1864_INTERFACE( mpt02_cdp1864_intf )
READ_LINE_MEMBER( studio2_state::clear_r )
{
- return BIT(ioport("CLEAR")->read(), 0);
+ return BIT(m_clear->read(), 0);
}
READ_LINE_MEMBER( studio2_state::ef3_r )
{
- return BIT(ioport("A")->read(), m_keylatch);
+ return BIT(m_a->read(), m_keylatch);
}
READ_LINE_MEMBER( studio2_state::ef4_r )
{
- return BIT(ioport("B")->read(), m_keylatch);
+ return BIT(m_b->read(), m_keylatch);
}
WRITE_LINE_MEMBER( studio2_state::q_w )
diff --git a/src/mess/drivers/vip.c b/src/mess/drivers/vip.c
index 7f068d012d5..67d3c4d24c1 100644
--- a/src/mess/drivers/vip.c
+++ b/src/mess/drivers/vip.c
@@ -447,7 +447,7 @@ INPUT_PORTS_END
READ_LINE_MEMBER( vip_state::clear_r )
{
- return BIT(ioport("RUN")->read(), 0);
+ return BIT(m_run->read(), 0);
}
READ_LINE_MEMBER( vip_state::ef1_r )
@@ -464,7 +464,7 @@ READ_LINE_MEMBER( vip_state::ef2_r )
READ_LINE_MEMBER( vip_state::ef3_r )
{
- return !BIT(ioport("KEYPAD")->read(), m_keylatch) || m_byteio_ef3 || m_exp_ef3;
+ return !BIT(m_keypad->read(), m_keylatch) || m_byteio_ef3 || m_exp_ef3;
}
READ_LINE_MEMBER( vip_state::ef4_r )
diff --git a/src/mess/includes/atom.h b/src/mess/includes/atom.h
index 7921181a9d9..90979860d93 100644
--- a/src/mess/includes/atom.h
+++ b/src/mess/includes/atom.h
@@ -47,15 +47,39 @@ public:
m_vdg(*this, MC6847_TAG),
m_cassette(*this, CASSETTE_TAG),
m_centronics(*this, CENTRONICS_TAG),
- m_speaker(*this, SPEAKER_TAG)
- ,
- m_video_ram(*this, "video_ram"){ }
+ 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_y10(*this, "Y10"),
+ m_rpt(*this, "RPT"),
+ m_video_ram(*this, "video_ram")
+ { }
required_device<cpu_device> m_maincpu;
required_device<mc6847_base_device> m_vdg;
required_device<cassette_image_device> m_cassette;
required_device<centronics_device> m_centronics;
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_y10;
+ required_ioport m_rpt;
virtual void machine_start();
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mess/includes/beta.h b/src/mess/includes/beta.h
index 271117cf4d4..632a64b953b 100644
--- a/src/mess/includes/beta.h
+++ b/src/mess/includes/beta.h
@@ -23,11 +23,19 @@ public:
beta_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, M6502_TAG),
- m_speaker(*this, SPEAKER_TAG)
+ m_speaker(*this, SPEAKER_TAG),
+ m_q6(*this, "Q6"),
+ m_q7(*this, "Q7"),
+ m_q8(*this, "Q8"),
+ m_q9(*this, "Q9")
{ }
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
+ required_ioport m_q6;
+ required_ioport m_q7;
+ required_ioport m_q8;
+ required_ioport m_q9;
virtual void machine_start();
@@ -38,6 +46,7 @@ public:
DECLARE_INPUT_CHANGED_MEMBER( trigger_reset );
/* EPROM state */
+ UINT8 *m_eprom;
int m_eprom_oe;
int m_eprom_ce;
UINT16 m_eprom_addr;
diff --git a/src/mess/includes/bw12.h b/src/mess/includes/bw12.h
index 82abe671caf..bf4269e86a8 100644
--- a/src/mess/includes/bw12.h
+++ b/src/mess/includes/bw12.h
@@ -47,6 +47,7 @@ public:
m_floppy0(*this, UPD765_TAG ":1:525dd"),
m_floppy1(*this, UPD765_TAG ":2:525dd"),
m_floppy_timer(*this, FLOPPY_TIMER_TAG),
+ m_modifiers(*this, "MODIFIERS"),
m_video_ram(*this, "video_ram")
{ }
@@ -61,6 +62,7 @@ public:
required_device<floppy_image_device> m_floppy0;
required_device<floppy_image_device> m_floppy1;
required_device<timer_device> m_floppy_timer;
+ required_ioport m_modifiers;
virtual void machine_start();
virtual void machine_reset();
diff --git a/src/mess/includes/bw2.h b/src/mess/includes/bw2.h
index 82af6b9f167..818834409a2 100644
--- a/src/mess/includes/bw2.h
+++ b/src/mess/includes/bw2.h
@@ -42,6 +42,16 @@ public:
m_floppy0(*this, WD2797_TAG":0"),
m_floppy1(*this, WD2797_TAG":1"),
m_floppy(NULL),
+ 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_video_ram(*this, "videoram")
{ }
@@ -55,6 +65,16 @@ public:
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
floppy_image_device *m_floppy;
+ 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;
virtual void machine_start();
diff --git a/src/mess/includes/c128.h b/src/mess/includes/c128.h
index caa44da9b66..4647dd376a6 100644
--- a/src/mess/includes/c128.h
+++ b/src/mess/includes/c128.h
@@ -58,6 +58,10 @@ public:
m_user(*this, C64_USER_PORT_TAG),
m_ram(*this, RAM_TAG),
m_cassette(*this, PET_DATASSETTE_PORT_TAG),
+ m_special(*this, "SPECIAL"),
+ m_k0(*this, "K0"),
+ m_k1(*this, "K1"),
+ m_k2(*this, "K2"),
m_z80en(0),
m_loram(1),
m_hiram(1),
@@ -104,6 +108,10 @@ public:
required_device<c64_user_port_device> m_user;
required_device<ram_device> m_ram;
required_device<pet_datassette_port_device> m_cassette;
+ required_ioport m_special;
+ required_ioport m_k0;
+ required_ioport m_k1;
+ required_ioport m_k2;
virtual void machine_start();
virtual void machine_reset();
diff --git a/src/mess/includes/c64.h b/src/mess/includes/c64.h
index 1940b560b35..7ad9db2bf65 100644
--- a/src/mess/includes/c64.h
+++ b/src/mess/includes/c64.h
@@ -49,6 +49,7 @@ public:
m_user(*this, C64_USER_PORT_TAG),
m_ram(*this, RAM_TAG),
m_cassette(*this, PET_DATASSETTE_PORT_TAG),
+ m_special(*this, "SPECIAL"),
m_loram(1),
m_hiram(1),
m_charen(1),
@@ -77,6 +78,7 @@ public:
required_device<c64_user_port_device> m_user;
required_device<ram_device> m_ram;
optional_device<pet_datassette_port_device> m_cassette;
+ required_ioport m_special;
virtual void machine_start();
virtual void machine_reset();
diff --git a/src/mess/includes/c80.h b/src/mess/includes/c80.h
index 33a320818d6..15b0cfc2a4d 100644
--- a/src/mess/includes/c80.h
+++ b/src/mess/includes/c80.h
@@ -21,12 +21,18 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, Z80_TAG),
m_pio1(*this, Z80PIO1_TAG),
- m_cassette(*this, CASSETTE_TAG)
+ m_cassette(*this, CASSETTE_TAG),
+ m_row0(*this, "ROW0"),
+ m_row1(*this, "ROW1"),
+ m_row2(*this, "ROW2")
{ }
required_device<cpu_device> m_maincpu;
required_device<z80pio_device> m_pio1;
required_device<cassette_image_device> m_cassette;
+ required_ioport m_row0;
+ required_ioport m_row1;
+ required_ioport m_row2;
virtual void machine_start();
diff --git a/src/mess/includes/cbm2.h b/src/mess/includes/cbm2.h
index d89895bc546..77c036a3061 100644
--- a/src/mess/includes/cbm2.h
+++ b/src/mess/includes/cbm2.h
@@ -70,6 +70,23 @@ public:
m_ram(*this, RAM_TAG),
m_cassette(*this, PET_DATASSETTE_PORT_TAG),
m_ieee(*this, IEEE488_TAG),
+ m_pa0(*this, "PA0"),
+ m_pa1(*this, "PA1"),
+ m_pa2(*this, "PA2"),
+ m_pa3(*this, "PA3"),
+ m_pa4(*this, "PA4"),
+ m_pa5(*this, "PA5"),
+ m_pa6(*this, "PA6"),
+ m_pa7(*this, "PA7"),
+ m_pb0(*this, "PB0"),
+ m_pb1(*this, "PB1"),
+ m_pb2(*this, "PB2"),
+ m_pb3(*this, "PB3"),
+ m_pb4(*this, "PB4"),
+ m_pb5(*this, "PB5"),
+ m_pb6(*this, "PB6"),
+ m_pb7(*this, "PB7"),
+ m_lock(*this, "LOCK"),
m_ext_cpu(*this, EXT_I8088_TAG),
m_ext_pic(*this, EXT_I8259A_TAG),
m_ext_cia(*this, EXT_MOS6526_TAG),
@@ -105,6 +122,23 @@ public:
required_device<ram_device> m_ram;
required_device<pet_datassette_port_device> m_cassette;
required_device<ieee488_device> m_ieee;
+ required_ioport m_pa0;
+ required_ioport m_pa1;
+ required_ioport m_pa2;
+ required_ioport m_pa3;
+ required_ioport m_pa4;
+ required_ioport m_pa5;
+ required_ioport m_pa6;
+ required_ioport m_pa7;
+ required_ioport m_pb0;
+ required_ioport m_pb1;
+ required_ioport m_pb2;
+ required_ioport m_pb3;
+ required_ioport m_pb4;
+ required_ioport m_pb5;
+ required_ioport m_pb6;
+ required_ioport m_pb7;
+ required_ioport m_lock;
optional_device<cpu_device> m_ext_cpu;
optional_device<pic8259_device> m_ext_pic;
diff --git a/src/mess/includes/comx35.h b/src/mess/includes/comx35.h
index 8bac1fa1e40..4f1daaf3239 100644
--- a/src/mess/includes/comx35.h
+++ b/src/mess/includes/comx35.h
@@ -48,6 +48,7 @@ public:
m_cassette(*this, CASSETTE_TAG),
m_ram(*this, RAM_TAG),
m_exp(*this, EXPANSION_TAG),
+ m_modifiers(*this, "MODIFIERS"),
m_char_ram(*this, "char_ram")
{ }
@@ -57,6 +58,7 @@ public:
required_device<cassette_image_device> m_cassette;
required_device<ram_device> m_ram;
required_device<comx_expansion_slot_device> m_exp;
+ required_ioport m_modifiers;
optional_shared_ptr<UINT8> m_char_ram;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
diff --git a/src/mess/includes/mikromik.h b/src/mess/includes/mikromik.h
index 657151b0422..971d0b1e80e 100644
--- a/src/mess/includes/mikromik.h
+++ b/src/mess/includes/mikromik.h
@@ -44,6 +44,17 @@ public:
m_floppy1(*this, UPD765_TAG ":1:525qd"),
m_ram(*this, RAM_TAG),
m_video_ram(*this, "video_ram"),
+ 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_a8(0),
m_recall(0),
m_dack3(1),
@@ -64,6 +75,17 @@ public:
required_device<floppy_image_device> m_floppy1;
required_device<ram_device> m_ram;
required_shared_ptr<UINT8> m_video_ram;
+ 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;
virtual void machine_start();
virtual void machine_reset();
diff --git a/src/mess/includes/mpz80.h b/src/mess/includes/mpz80.h
index 04d9cbccfed..333829db01e 100644
--- a/src/mess/includes/mpz80.h
+++ b/src/mess/includes/mpz80.h
@@ -28,6 +28,7 @@ public:
m_terminal(*this, TERMINAL_TAG),
m_s100(*this, S100_TAG),
m_map_ram(*this, "map_ram"),
+ m_16c(*this, "16C"),
m_nmi(1),
m_pint(1),
m_int_pend(0),
@@ -46,6 +47,7 @@ public:
required_device<generic_terminal_device> m_terminal;
required_device<s100_device> m_s100;
optional_shared_ptr<UINT8> m_map_ram;
+ required_ioport m_16c;
virtual void machine_start();
virtual void machine_reset();
diff --git a/src/mess/includes/sage2.h b/src/mess/includes/sage2.h
index 20332d69be1..a4b6e0ba9c6 100644
--- a/src/mess/includes/sage2.h
+++ b/src/mess/includes/sage2.h
@@ -34,16 +34,15 @@ public:
m_usart1(*this, I8251_1_TAG),
m_fdc(*this, UPD765_TAG),
m_ram(*this, RAM_TAG),
- m_floppy0(*this, UPD765_TAG ":0:525dd"),
- m_floppy1(*this, UPD765_TAG ":1:525dd"),
+ m_floppy0(*this, UPD765_TAG ":0"),
+ m_floppy1(*this, UPD765_TAG ":1"),
+ m_floppy(NULL),
m_centronics(*this, CENTRONICS_TAG),
m_ieee488(*this, IEEE488_TAG),
m_terminal(*this, TERMINAL_TAG),
m_reset(1),
m_fdc_int(0),
- m_fdie(0),
- m_sl0(1),
- m_sl1(1)
+ m_fdie(0)
{ }
required_device<cpu_device> m_maincpu;
@@ -52,8 +51,9 @@ public:
required_device<i8251_device> m_usart1;
required_device<upd765a_device> m_fdc;
required_device<ram_device> m_ram;
- required_device<floppy_image_device> m_floppy0;
- required_device<floppy_image_device> m_floppy1;
+ required_device<floppy_connector> m_floppy0;
+ required_device<floppy_connector> m_floppy1;
+ floppy_image_device *m_floppy;
required_device<centronics_device> m_centronics;
required_device<ieee488_device> m_ieee488;
required_device<generic_terminal_device> m_terminal;
@@ -63,8 +63,8 @@ public:
void update_fdc_int();
- DECLARE_READ8_MEMBER( mmu_r );
- DECLARE_WRITE8_MEMBER( mmu_w );
+ DECLARE_READ8_MEMBER( read );
+ DECLARE_WRITE8_MEMBER( write );
DECLARE_WRITE_LINE_MEMBER( br1_w );
DECLARE_WRITE_LINE_MEMBER( br2_w );
DECLARE_WRITE8_MEMBER( ppi0_pc_w );
@@ -78,12 +78,11 @@ public:
void fdc_irq(bool state);
+ const UINT8 *m_rom;
int m_reset;
// floppy state
int m_fdc_int;
int m_fdie;
- int m_sl0;
- int m_sl1;
DECLARE_DRIVER_INIT(sage2);
};
diff --git a/src/mess/includes/studio2.h b/src/mess/includes/studio2.h
index 976017118fd..ad6fc7d3098 100644
--- a/src/mess/includes/studio2.h
+++ b/src/mess/includes/studio2.h
@@ -25,12 +25,18 @@ public:
: driver_device(mconfig, type, tag),
m_maincpu(*this, CDP1802_TAG),
m_speaker(*this, BEEPER_TAG),
- m_vdc(*this, CDP1861_TAG)
+ m_vdc(*this, CDP1861_TAG),
+ m_clear(*this, "CLEAR"),
+ m_a(*this, "A"),
+ m_b(*this, "B")
{ }
required_device<cosmac_device> m_maincpu;
required_device<beep_device> m_speaker;
optional_device<cdp1861_device> m_vdc;
+ required_ioport m_clear;
+ required_ioport m_a;
+ required_ioport m_b;
virtual void machine_start();
virtual void machine_reset();
diff --git a/src/mess/includes/vip.h b/src/mess/includes/vip.h
index 3f2373c266f..239bd75a597 100644
--- a/src/mess/includes/vip.h
+++ b/src/mess/includes/vip.h
@@ -31,6 +31,8 @@ public:
m_byteio(*this, VIP_BYTEIO_PORT_TAG),
m_exp(*this, VIP_EXPANSION_SLOT_TAG),
m_ram(*this, RAM_TAG),
+ m_run(*this, "RUN"),
+ m_keypad(*this, "KEYPAD"),
m_8000(1),
m_vdc_int(CLEAR_LINE),
m_vdc_dma_out(CLEAR_LINE),
@@ -52,6 +54,8 @@ public:
required_device<vip_byteio_port_device> m_byteio;
required_device<vip_expansion_slot_device> m_exp;
required_device<ram_device> m_ram;
+ required_ioport m_run;
+ required_ioport m_keypad;
virtual void machine_start();
virtual void machine_reset();
diff --git a/src/mess/machine/abc77.c b/src/mess/machine/abc77.c
index 00432bd3651..50824502b3e 100644
--- a/src/mess/machine/abc77.c
+++ b/src/mess/machine/abc77.c
@@ -448,6 +448,18 @@ abc77_device::abc77_device(const machine_config &mconfig, const char *tag, devic
: device_t(mconfig, ABC77, "Luxor ABC 77", tag, owner, clock),
m_maincpu(*this, I8035_TAG),
m_discrete(*this, DISCRETE_TAG),
+ m_x0(*this, "X0"),
+ m_x1(*this, "X1"),
+ m_x2(*this, "X2"),
+ m_x3(*this, "X3"),
+ m_x4(*this, "X4"),
+ m_x5(*this, "X5"),
+ m_x6(*this, "X6"),
+ m_x7(*this, "X7"),
+ m_x8(*this, "X8"),
+ m_x9(*this, "X9"),
+ m_x10(*this, "X10"),
+ m_x11(*this, "X11"),
m_txd(1),
m_keydown(1),
m_clock(0),
@@ -459,6 +471,18 @@ abc77_device::abc77_device(const machine_config &mconfig, device_type type, cons
: device_t(mconfig, type, name, tag, owner, clock),
m_maincpu(*this, I8035_TAG),
m_discrete(*this, DISCRETE_TAG),
+ m_x0(*this, "X0"),
+ m_x1(*this, "X1"),
+ m_x2(*this, "X2"),
+ m_x3(*this, "X3"),
+ m_x4(*this, "X4"),
+ m_x5(*this, "X5"),
+ m_x6(*this, "X6"),
+ m_x7(*this, "X7"),
+ m_x8(*this, "X8"),
+ m_x9(*this, "X9"),
+ m_x10(*this, "X10"),
+ m_x11(*this, "X11"),
m_txd(1),
m_keydown(1),
m_clock(0),
@@ -545,12 +569,25 @@ READ8_MEMBER( abc77_device::p1_r )
*/
- static const char *const keynames[] = { "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "X10", "X11" };
UINT8 data = 0xff;
- if (m_stb && m_keylatch < 12)
+ if (m_stb)
{
- data = ioport(keynames[m_keylatch])->read();
+ switch (m_keylatch)
+ {
+ case 0: data = m_x0->read(); break;
+ case 1: data = m_x1->read(); break;
+ case 2: data = m_x2->read(); break;
+ case 3: data = m_x3->read(); break;
+ case 4: data = m_x4->read(); break;
+ case 5: data = m_x5->read(); break;
+ case 6: data = m_x6->read(); break;
+ case 7: data = m_x7->read(); break;
+ case 8: data = m_x8->read(); break;
+ case 9: data = m_x9->read(); break;
+ case 10: data = m_x10->read(); break;
+ case 11: data = m_x11->read(); break;
+ }
}
return data;
diff --git a/src/mess/machine/abc77.h b/src/mess/machine/abc77.h
index 83f0257e0bf..870e6757976 100644
--- a/src/mess/machine/abc77.h
+++ b/src/mess/machine/abc77.h
@@ -106,6 +106,18 @@ protected:
required_device<cpu_device> m_maincpu;
required_device<discrete_sound_device> m_discrete;
+ required_ioport m_x0;
+ required_ioport m_x1;
+ required_ioport m_x2;
+ required_ioport m_x3;
+ required_ioport m_x4;
+ required_ioport m_x5;
+ required_ioport m_x6;
+ required_ioport m_x7;
+ required_ioport m_x8;
+ required_ioport m_x9;
+ required_ioport m_x10;
+ required_ioport m_x11;
int m_txd; // transmit data
int m_keylatch; // keyboard row latch
diff --git a/src/mess/machine/abc800kb.c b/src/mess/machine/abc800kb.c
index 6be6e66581a..3f5b43ce923 100644
--- a/src/mess/machine/abc800kb.c
+++ b/src/mess/machine/abc800kb.c
@@ -358,6 +358,18 @@ inline void abc800_keyboard_device::key_down(int state)
abc800_keyboard_device::abc800_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ABC800_KEYBOARD, "ABC-800 Keyboard", tag, owner, clock),
m_maincpu(*this, I8048_TAG),
+ m_x0(*this, "X0"),
+ m_x1(*this, "X1"),
+ m_x2(*this, "X2"),
+ m_x3(*this, "X3"),
+ m_x4(*this, "X4"),
+ m_x5(*this, "X5"),
+ m_x6(*this, "X6"),
+ m_x7(*this, "X7"),
+ m_x8(*this, "X8"),
+ m_x9(*this, "X9"),
+ m_x10(*this, "X10"),
+ m_x11(*this, "X11"),
m_row(0),
m_txd(1),
m_clk(0),
@@ -435,12 +447,25 @@ READ_LINE_MEMBER( abc800_keyboard_device::txd_r )
READ8_MEMBER( abc800_keyboard_device::kb_p1_r )
{
- static const char *const ABC800_KEY_ROW[] = { "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "X10", "X11" };
UINT8 data = 0xff;
- if (m_stb && m_row < 12)
+ if (m_stb)
{
- data = ioport(ABC800_KEY_ROW[m_row])->read();
+ switch (m_row)
+ {
+ case 0: data = m_x0->read(); break;
+ case 1: data = m_x1->read(); break;
+ case 2: data = m_x2->read(); break;
+ case 3: data = m_x3->read(); break;
+ case 4: data = m_x4->read(); break;
+ case 5: data = m_x5->read(); break;
+ case 6: data = m_x6->read(); break;
+ case 7: data = m_x7->read(); break;
+ case 8: data = m_x8->read(); break;
+ case 9: data = m_x9->read(); break;
+ case 10: data = m_x10->read(); break;
+ case 11: data = m_x11->read(); break;
+ }
}
return data;
diff --git a/src/mess/machine/abc800kb.h b/src/mess/machine/abc800kb.h
index fe512898912..2caa2e55003 100644
--- a/src/mess/machine/abc800kb.h
+++ b/src/mess/machine/abc800kb.h
@@ -93,6 +93,18 @@ private:
inline void key_down(int state);
required_device<cpu_device> m_maincpu;
+ required_ioport m_x0;
+ required_ioport m_x1;
+ required_ioport m_x2;
+ required_ioport m_x3;
+ required_ioport m_x4;
+ required_ioport m_x5;
+ required_ioport m_x6;
+ required_ioport m_x7;
+ required_ioport m_x8;
+ required_ioport m_x9;
+ required_ioport m_x10;
+ required_ioport m_x11;
int m_row;
int m_txd;
diff --git a/src/mess/machine/abc99.c b/src/mess/machine/abc99.c
index 846b892f5d5..95c0a2f8840 100644
--- a/src/mess/machine/abc99.c
+++ b/src/mess/machine/abc99.c
@@ -527,6 +527,8 @@ abc99_device::abc99_device(const machine_config &mconfig, const char *tag, devic
m_maincpu(*this, I8035_Z2_TAG),
m_mousecpu(*this, I8035_Z5_TAG),
m_speaker(*this, SPEAKER_TAG),
+ m_z14(*this, "Z14"),
+ m_mouseb(*this, "MOUSEB"),
m_si(1),
m_si_en(1),
m_so(1),
@@ -691,7 +693,7 @@ READ8_MEMBER( abc99_device::z2_p2_r )
*/
- UINT8 data = ioport("Z14")->read() << 5;
+ UINT8 data = m_z14->read() << 5;
return data;
}
@@ -741,7 +743,7 @@ READ8_MEMBER( abc99_device::z5_p1_r )
UINT8 data = 0;
// mouse buttons
- data |= (ioport("MOUSEB")->read() & 0x07) << 4;
+ data |= (m_mouseb->read() & 0x07) << 4;
// serial input
data |= m_si << 7;
diff --git a/src/mess/machine/abc99.h b/src/mess/machine/abc99.h
index 5474bcc44dc..befadb276ad 100644
--- a/src/mess/machine/abc99.h
+++ b/src/mess/machine/abc99.h
@@ -108,6 +108,8 @@ private:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_mousecpu;
required_device<speaker_sound_device> m_speaker;
+ required_ioport m_z14;
+ required_ioport m_mouseb;
int m_si;
int m_si_en;
diff --git a/src/mess/machine/adam_kb.c b/src/mess/machine/adam_kb.c
index 509f3ab1a55..0b3b6b6d1ec 100644
--- a/src/mess/machine/adam_kb.c
+++ b/src/mess/machine/adam_kb.c
@@ -227,6 +227,19 @@ adam_keyboard_device::adam_keyboard_device(const machine_config &mconfig, const
: device_t(mconfig, ADAM_KB, "Adam keyboard", tag, owner, clock),
device_adamnet_card_interface(mconfig, *this),
m_maincpu(*this, M6801_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_y10(*this, "Y10"),
+ m_y11(*this, "Y11"),
+ m_y12(*this, "Y12"),
m_key_y(0x1ff)
{
}
@@ -276,19 +289,19 @@ READ8_MEMBER( adam_keyboard_device::p1_r )
UINT8 data = 0xff;
- if (!BIT(m_key_y, 0)) data &= ioport("Y0")->read();
- if (!BIT(m_key_y, 1)) data &= ioport("Y1")->read();
- if (!BIT(m_key_y, 2)) data &= ioport("Y2")->read();
- if (!BIT(m_key_y, 3)) data &= ioport("Y3")->read();
- if (!BIT(m_key_y, 4)) data &= ioport("Y4")->read();
- if (!BIT(m_key_y, 5)) data &= ioport("Y5")->read();
- if (!BIT(m_key_y, 6)) data &= ioport("Y6")->read();
- if (!BIT(m_key_y, 7)) data &= ioport("Y7")->read();
- if (!BIT(m_key_y, 8)) data &= ioport("Y8")->read();
- if (!BIT(m_key_y, 9)) data &= ioport("Y9")->read();
- if (!BIT(m_key_y, 10)) data &= ioport("Y10")->read();
- if (!BIT(m_key_y, 11)) data &= ioport("Y11")->read();
- if (!BIT(m_key_y, 12)) data &= ioport("Y12")->read();
+ if (!BIT(m_key_y, 0)) data &= m_y0->read();
+ if (!BIT(m_key_y, 1)) data &= m_y1->read();
+ if (!BIT(m_key_y, 2)) data &= m_y2->read();
+ if (!BIT(m_key_y, 3)) data &= m_y3->read();
+ if (!BIT(m_key_y, 4)) data &= m_y4->read();
+ if (!BIT(m_key_y, 5)) data &= m_y5->read();
+ if (!BIT(m_key_y, 6)) data &= m_y6->read();
+ if (!BIT(m_key_y, 7)) data &= m_y7->read();
+ if (!BIT(m_key_y, 8)) data &= m_y8->read();
+ if (!BIT(m_key_y, 9)) data &= m_y9->read();
+ if (!BIT(m_key_y, 10)) data &= m_y10->read();
+ if (!BIT(m_key_y, 11)) data &= m_y11->read();
+ if (!BIT(m_key_y, 12)) data &= m_y12->read();
return data;
}
diff --git a/src/mess/machine/adam_kb.h b/src/mess/machine/adam_kb.h
index 209be1cb056..606be14dada 100644
--- a/src/mess/machine/adam_kb.h
+++ b/src/mess/machine/adam_kb.h
@@ -54,6 +54,19 @@ protected:
virtual void adamnet_reset_w(int state);
required_device<cpu_device> m_maincpu;
+ 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_y10;
+ required_ioport m_y11;
+ required_ioport m_y12;
UINT16 m_key_y;
};
diff --git a/src/mess/machine/tandy2kb.c b/src/mess/machine/tandy2kb.c
index 350009c4529..11a14283f50 100644
--- a/src/mess/machine/tandy2kb.c
+++ b/src/mess/machine/tandy2kb.c
@@ -234,6 +234,18 @@ ioport_constructor tandy2k_keyboard_device::device_input_ports() const
tandy2k_keyboard_device::tandy2k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TANDY2K_KEYBOARD, "Tandy 2000 Keyboard", tag, owner, clock),
m_maincpu(*this, I8048_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_y10(*this, "Y10"),
+ m_y11(*this, "Y11"),
m_keylatch(0xffff),
m_clock(0),
m_data(0)
@@ -331,18 +343,18 @@ READ8_MEMBER( tandy2k_keyboard_device::kb_p1_r )
UINT8 data = 0xff;
- if (!BIT(m_keylatch, 0)) data &= ioport("Y0")->read();
- if (!BIT(m_keylatch, 1)) data &= ioport("Y1")->read();
- if (!BIT(m_keylatch, 2)) data &= ioport("Y2")->read();
- if (!BIT(m_keylatch, 3)) data &= ioport("Y3")->read();
- if (!BIT(m_keylatch, 4)) data &= ioport("Y4")->read();
- if (!BIT(m_keylatch, 5)) data &= ioport("Y5")->read();
- if (!BIT(m_keylatch, 6)) data &= ioport("Y6")->read();
- if (!BIT(m_keylatch, 7)) data &= ioport("Y7")->read();
- if (!BIT(m_keylatch, 8)) data &= ioport("Y8")->read();
- if (!BIT(m_keylatch, 9)) data &= ioport("Y9")->read();
- if (!BIT(m_keylatch, 10)) data &= ioport("Y10")->read();
- if (!BIT(m_keylatch, 11)) data &= ioport("Y11")->read();
+ if (!BIT(m_keylatch, 0)) data &= m_y0->read();
+ if (!BIT(m_keylatch, 1)) data &= m_y1->read();
+ if (!BIT(m_keylatch, 2)) data &= m_y2->read();
+ if (!BIT(m_keylatch, 3)) data &= m_y3->read();
+ if (!BIT(m_keylatch, 4)) data &= m_y4->read();
+ if (!BIT(m_keylatch, 5)) data &= m_y5->read();
+ if (!BIT(m_keylatch, 6)) data &= m_y6->read();
+ if (!BIT(m_keylatch, 7)) data &= m_y7->read();
+ if (!BIT(m_keylatch, 8)) data &= m_y8->read();
+ if (!BIT(m_keylatch, 9)) data &= m_y9->read();
+ if (!BIT(m_keylatch, 10)) data &= m_y10->read();
+ if (!BIT(m_keylatch, 11)) data &= m_y11->read();
return ~data;
}
diff --git a/src/mess/machine/tandy2kb.h b/src/mess/machine/tandy2kb.h
index 0c7263b049e..49988062f53 100644
--- a/src/mess/machine/tandy2kb.h
+++ b/src/mess/machine/tandy2kb.h
@@ -88,6 +88,18 @@ private:
devcb_resolved_write_line m_out_data_func;
required_device<cpu_device> m_maincpu;
+ 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_y10;
+ required_ioport m_y11;
UINT16 m_keylatch;
diff --git a/src/mess/machine/trs80m2kb.c b/src/mess/machine/trs80m2kb.c
index 4a19e5ec396..9c583b1c3a4 100644
--- a/src/mess/machine/trs80m2kb.c
+++ b/src/mess/machine/trs80m2kb.c
@@ -93,8 +93,7 @@ machine_config_constructor trs80m2_keyboard_device::device_mconfig_additions() c
//-------------------------------------------------
INPUT_PORTS_START( trs80m2_keyboard )
-/*
- PORT_START("X0")
+ PORT_START("Y0")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
@@ -104,7 +103,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("X1")
+ PORT_START("Y1")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
@@ -114,7 +113,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("X2")
+ PORT_START("Y2")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("REPEAT")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Right SHIFT") PORT_CODE(KEYCODE_RSHIFT)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
@@ -124,7 +123,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("X3")
+ PORT_START("Y3")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("cannot read label")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
@@ -134,7 +133,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
- PORT_START("X4")
+ PORT_START("Y4")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
@@ -144,7 +143,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
- PORT_START("X5")
+ PORT_START("Y5")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("HOLD")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
@@ -154,7 +153,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
- PORT_START("X6")
+ PORT_START("Y6")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
@@ -164,7 +163,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD)
- PORT_START("X7")
+ PORT_START("Y7")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
@@ -174,7 +173,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD)
- PORT_START("X8")
+ PORT_START("Y8")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
@@ -184,7 +183,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD)
- PORT_START("X9")
+ PORT_START("Y9")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
@@ -194,7 +193,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("XA")
+ PORT_START("YA")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
@@ -204,7 +203,7 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("XB")
+ PORT_START("YB")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
@@ -213,7 +212,6 @@ INPUT_PORTS_START( trs80m2_keyboard )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t')
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
-*/
INPUT_PORTS_END
@@ -239,6 +237,18 @@ ioport_constructor trs80m2_keyboard_device::device_input_ports() const
trs80m2_keyboard_device::trs80m2_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TRS80M2_KEYBOARD, "TRS-80 Model II Keyboard", tag, owner, clock),
m_maincpu(*this, I8021_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_ya(*this, "YA"),
+ m_yb(*this, "YB"),
m_busy(1),
m_data(1),
m_clk(0)
@@ -311,18 +321,18 @@ READ8_MEMBER( trs80m2_keyboard_device::kb_p0_r )
switch (m_y)
{
- case 0: data &= ioport("X0")->read(); break;
- case 1: data &= ioport("X1")->read(); break;
- case 2: data &= ioport("X2")->read(); break;
- case 3: data &= ioport("X3")->read(); break;
- case 4: data &= ioport("X4")->read(); break;
- case 5: data &= ioport("X5")->read(); break;
- case 6: data &= ioport("X6")->read(); break;
- case 7: data &= ioport("X7")->read(); break;
- case 8: data &= ioport("X8")->read(); break;
- case 9: data &= ioport("X9")->read(); break;
- case 0xa: data &= ioport("XA")->read(); break;
- case 0xb: data &= ioport("XB")->read(); break;
+ 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;
+ case 0xa: data &= m_ya->read(); break;
+ case 0xb: data &= m_yb->read(); break;
}
return data;
diff --git a/src/mess/machine/trs80m2kb.h b/src/mess/machine/trs80m2kb.h
index 54e377fcb19..ac62a47d121 100644
--- a/src/mess/machine/trs80m2kb.h
+++ b/src/mess/machine/trs80m2kb.h
@@ -86,6 +86,18 @@ private:
devcb_resolved_write_line m_out_clock_func;
required_device<cpu_device> m_maincpu;
+ 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_ya;
+ required_ioport m_yb;
int m_busy;
int m_data;
diff --git a/src/mess/machine/v1050kb.c b/src/mess/machine/v1050kb.c
index 71a599f7453..710468db2db 100644
--- a/src/mess/machine/v1050kb.c
+++ b/src/mess/machine/v1050kb.c
@@ -110,7 +110,7 @@ machine_config_constructor v1050_keyboard_device::device_mconfig_additions() con
//-------------------------------------------------
INPUT_PORTS_START( v1050_keyboard )
- PORT_START("X0")
+ PORT_START("Y0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
@@ -120,7 +120,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB))
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("No Scrl")
- PORT_START("X1")
+ PORT_START("Y1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad Enter DelCh") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD))
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6 Pg Dn") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3 \xE2\x86\x92") PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
@@ -130,7 +130,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad , DelWd")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad . Wd\xE2\x86\x92") PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD))
- PORT_START("X2")
+ PORT_START("Y2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F14 OnSer")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F16 Print")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F12 Copy") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12))
@@ -140,7 +140,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F17 Block")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F13 Hide")
- PORT_START("X3")
+ PORT_START("Y3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Line Feed")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('|') PORT_CHAR('\\')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Retn") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
@@ -150,7 +150,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL))
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 0 Wd\xE2\x86\x90") PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
- PORT_START("X4")
+ PORT_START("Y4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5 \xE2\x86\x91") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1 \xE2\x86\x90") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
@@ -160,7 +160,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4 PgUp") PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2 \xE2\x86\x93") PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
- PORT_START("X5")
+ PORT_START("Y5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
@@ -170,7 +170,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
- PORT_START("X6")
+ PORT_START("Y6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
@@ -180,7 +180,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
- PORT_START("X7")
+ PORT_START("Y7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F8 Insert") PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F6 InsCr") PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
@@ -190,7 +190,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F4 Again") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F7 Refs") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
- PORT_START("X8")
+ PORT_START("Y8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
@@ -200,7 +200,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
- PORT_START("X9")
+ PORT_START("Y9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
@@ -210,7 +210,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
- PORT_START("XA")
+ PORT_START("YA")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('~') PORT_CHAR('\'')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('0') PORT_CHAR(')')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('9') PORT_CHAR('(')
@@ -220,7 +220,7 @@ INPUT_PORTS_START( v1050_keyboard )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
- PORT_START("XB")
+ PORT_START("YB")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"')
@@ -307,6 +307,18 @@ v1050_keyboard_device::v1050_keyboard_device(const machine_config &mconfig, cons
: device_t(mconfig, V1050_KEYBOARD, "Visual 1050 Keyboard", tag, owner, clock),
m_maincpu(*this, I8049_TAG),
m_discrete(*this, DISCRETE_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_ya(*this, "YA"),
+ m_yb(*this, "YB"),
m_y(0),
m_so(1)
{
@@ -364,18 +376,18 @@ READ8_MEMBER( v1050_keyboard_device::kb_p1_r )
switch (m_y)
{
- case 0: data &= ioport("X0")->read(); break;
- case 1: data &= ioport("X1")->read(); break;
- case 2: data &= ioport("X2")->read(); break;
- case 3: data &= ioport("X3")->read(); break;
- case 4: data &= ioport("X4")->read(); break;
- case 5: data &= ioport("X5")->read(); break;
- case 6: data &= ioport("X6")->read(); break;
- case 7: data &= ioport("X7")->read(); break;
- case 8: data &= ioport("X8")->read(); break;
- case 9: data &= ioport("X9")->read(); break;
- case 0xa: data &= ioport("XA")->read(); break;
- case 0xb: data &= ioport("XB")->read(); break;
+ 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;
+ case 0xa: data &= m_ya->read(); break;
+ case 0xb: data &= m_yb->read(); break;
}
return data;
diff --git a/src/mess/machine/v1050kb.h b/src/mess/machine/v1050kb.h
index 45a18141e9e..dd577efee95 100644
--- a/src/mess/machine/v1050kb.h
+++ b/src/mess/machine/v1050kb.h
@@ -74,6 +74,18 @@ protected:
private:
required_device<cpu_device> m_maincpu;
required_device<discrete_sound_device> m_discrete;
+ 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_ya;
+ required_ioport m_yb;
UINT8 m_y;
int m_so;
diff --git a/src/mess/machine/victor9kb.c b/src/mess/machine/victor9kb.c
index 4d00bd74deb..87cb999d642 100644
--- a/src/mess/machine/victor9kb.c
+++ b/src/mess/machine/victor9kb.c
@@ -238,6 +238,19 @@ ioport_constructor victor9k_keyboard_device::device_input_ports() const
victor9k_keyboard_device::victor9k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VICTOR9K_KEYBOARD, "Victor 9000 Keyboard", tag, owner, clock),
m_maincpu(*this, I8021_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_ya(*this, "YA"),
+ m_yb(*this, "YB"),
+ m_yc(*this, "YC"),
m_y(0),
m_kbrdy(1),
m_kbdata(1),
@@ -312,19 +325,19 @@ READ8_MEMBER( victor9k_keyboard_device::kb_p1_r )
switch (m_y)
{
- case 0: data &= ioport("Y0")->read(); break;
- case 1: data &= ioport("Y1")->read(); break;
- case 2: data &= ioport("Y2")->read(); break;
- case 3: data &= ioport("Y3")->read(); break;
- case 4: data &= ioport("Y4")->read(); break;
- case 5: data &= ioport("Y5")->read(); break;
- case 6: data &= ioport("Y6")->read(); break;
- case 7: data &= ioport("Y7")->read(); break;
- case 8: data &= ioport("Y8")->read(); break;
- case 9: data &= ioport("Y9")->read(); break;
- case 0xa: data &= ioport("YA")->read(); break;
- case 0xb: data &= ioport("YB")->read(); break;
- case 0xc: data &= ioport("YC")->read(); break;
+ 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;
+ case 0xa: data &= m_ya->read(); break;
+ case 0xb: data &= m_yb->read(); break;
+ case 0xc: data &= m_yc->read(); break;
}
return data;
diff --git a/src/mess/machine/victor9kb.h b/src/mess/machine/victor9kb.h
index 5babd50cdf5..011cf7b7994 100644
--- a/src/mess/machine/victor9kb.h
+++ b/src/mess/machine/victor9kb.h
@@ -86,6 +86,19 @@ private:
devcb_resolved_write_line m_out_kbrdy_func;
required_device<cpu_device> m_maincpu;
+ 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_ya;
+ required_ioport m_yb;
+ required_ioport m_yc;
UINT8 m_y;
int m_kbrdy;