diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp index 61bc1c5ce0e..7062c59c8fa 100644 --- a/src/devices/machine/pckeybrd.cpp +++ b/src/devices/machine/pckeybrd.cpp @@ -286,7 +286,7 @@ pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, const char pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, type, tag, owner, clock), - m_ioport(*this, ":pc_keyboard_%u", 0), + m_ioport(*this, "pc_keyboard_%u", 0), m_out_keypress_func(*this) { } @@ -1117,7 +1117,7 @@ INPUT_PORTS_START( pc_keyboard ) PORT_BIT ( 0xff80, 0x0000, IPT_UNUSED ) INPUT_PORTS_END -INPUT_PORTS_START( at_keyboard ) +static INPUT_PORTS_START( at_keyboard ) PORT_START("pc_keyboard_0") PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED ) /* unused scancode 0 */ PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) /* Esc 01 81 */ @@ -1242,6 +1242,18 @@ INPUT_PORTS_START( at_keyboard ) PORT_BIT ( 0xfffe, 0x0000, IPT_UNUSED ) INPUT_PORTS_END + +ioport_constructor pc_keyboard_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(pc_keyboard); +} + + +ioport_constructor at_keyboard_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(at_keyboard); +} + /*************************************************************************** Inputx stuff ***************************************************************************/ diff --git a/src/devices/machine/pckeybrd.h b/src/devices/machine/pckeybrd.h index ce3d5610ce6..8eeb2118b6b 100644 --- a/src/devices/machine/pckeybrd.h +++ b/src/devices/machine/pckeybrd.h @@ -37,6 +37,7 @@ public: protected: pc_keyboard_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + virtual ioport_constructor device_input_ports() const override; virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; @@ -89,6 +90,7 @@ public: void set_type(KEYBOARD_TYPE type, int default_set) { m_scan_code_set = default_set; m_type = type; } protected: + virtual ioport_constructor device_input_ports() const override; virtual void device_reset() override; virtual void device_start() override; @@ -114,7 +116,6 @@ private: }; INPUT_PORTS_EXTERN( pc_keyboard ); -INPUT_PORTS_EXTERN( at_keyboard ); DECLARE_DEVICE_TYPE(PC_KEYB, pc_keyboard_device) DECLARE_DEVICE_TYPE(AT_KEYB, at_keyboard_device) diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp index 8c8a230d791..ab656d0a514 100644 --- a/src/mame/drivers/amstr_pc.cpp +++ b/src/mame/drivers/amstr_pc.cpp @@ -465,8 +465,6 @@ Since pc200 is anyway NOT_WORKING, I comment out this one */ PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) PORT_BIT( 0x02, 0x02, IPT_UNUSED ) /* no turbo switch */ PORT_BIT( 0x01, 0x01, IPT_UNUSED ) - - PORT_INCLUDE( at_keyboard ) /* IN4 - IN11 */ INPUT_PORTS_END // static const gfx_layout pc200_charlayout = diff --git a/src/mame/drivers/atpci.cpp b/src/mame/drivers/atpci.cpp index e3a59eed507..b879844dd7b 100644 --- a/src/mame/drivers/atpci.cpp +++ b/src/mame/drivers/atpci.cpp @@ -155,7 +155,6 @@ void at586_state::at586x3(machine_config &config) } static INPUT_PORTS_START(at586m55) - PORT_INCLUDE(at_keyboard) INPUT_PORTS_END void at586_state::at586m55(machine_config &config) diff --git a/src/mame/drivers/bebox.cpp b/src/mame/drivers/bebox.cpp index ccd3f04adbb..f6514b8da87 100644 --- a/src/mame/drivers/bebox.cpp +++ b/src/mame/drivers/bebox.cpp @@ -275,7 +275,6 @@ void bebox_state::bebox2(machine_config &config) } static INPUT_PORTS_START( bebox ) - PORT_INCLUDE( at_keyboard ) INPUT_PORTS_END ROM_START(bebox) diff --git a/src/mame/drivers/calchase.cpp b/src/mame/drivers/calchase.cpp index 1493631dcb2..d0ec40da6bb 100644 --- a/src/mame/drivers/calchase.cpp +++ b/src/mame/drivers/calchase.cpp @@ -472,75 +472,9 @@ void calchase_state::calchase_io(address_map &map) map(0x92e8, 0x92ef).noprw(); //To debug } -#define AT_KEYB_HELPER(bit, text, key1) \ - PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1) - -#if 1 static INPUT_PORTS_START( calchase ) - PORT_START("pc_keyboard_0") - PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED ) /* unused scancode 0 */ -// AT_KEYB_HELPER( 0x0002, "Esc", KEYCODE_Q ) /* Esc 01 81 */ - // 0x0004, KEYCODE_0 - // 0x0008, KEYCODE_1 - // 0x0010, KEYCODE_2 - // 0x0020, KEYCODE_3 - // 0x0040, KEYCODE_4 - // 0x0080, KEYCODE_5 - // 0x0100, KEYCODE_6 - // 0x0200, KEYCODE_7 - // 0x0400, KEYCODE_8 - // 0x0800, KEYCODE_9 - // 0x1000, KEYCODE_MINUS - // 0x2000, KEYCODE_EQUAL - // 0x4000, KEYCODE_BACKSPACE - // 0x8000, KEYCODE_TAB - - PORT_START("pc_keyboard_1") - // 0x0001, KEYCODE_Q - // 0x0002, KEYCODE_W - AT_KEYB_HELPER( 0x0004, "E", KEYCODE_E ) - AT_KEYB_HELPER( 0x0008, "R", KEYCODE_R ) - AT_KEYB_HELPER( 0x0010, "T", KEYCODE_T ) /* T 14 94 */ - AT_KEYB_HELPER( 0x0020, "Y", KEYCODE_Y ) /* Y 15 95 */ - // 0x0040, KEYCODE_U - AT_KEYB_HELPER( 0x0080, "I", KEYCODE_I ) - AT_KEYB_HELPER( 0x0100, "O", KEYCODE_O ) /* O 18 98 */ - // 0x0200, KEYCODE_P - AT_KEYB_HELPER( 0x1000, "Enter", KEYCODE_ENTER ) /* Enter 1C 9C */ - AT_KEYB_HELPER( 0x4000, "A", KEYCODE_A ) - AT_KEYB_HELPER( 0x8000, "S", KEYCODE_S ) - - PORT_START("pc_keyboard_2") - AT_KEYB_HELPER( 0x0001, "D", KEYCODE_D ) - AT_KEYB_HELPER( 0x0002, "F", KEYCODE_F ) - - - PORT_START("pc_keyboard_3") - AT_KEYB_HELPER( 0x0001, "B", KEYCODE_B ) /* B 30 B0 */ - AT_KEYB_HELPER( 0x0002, "N", KEYCODE_N ) /* N 31 B1 */ - AT_KEYB_HELPER( 0x0200, "SPACE", KEYCODE_SPACE ) /* N 31 B1 */ - AT_KEYB_HELPER( 0x0800, "F1", KEYCODE_F1 ) /* F1 3B BB */ -// AT_KEYB_HELPER( 0x8000, "F5", KEYCODE_F5 ) - - PORT_START("pc_keyboard_4") -// AT_KEYB_HELPER( 0x0004, "F8", KEYCODE_F8 ) - - PORT_START("pc_keyboard_5") - - - PORT_START("pc_keyboard_6") - AT_KEYB_HELPER( 0x0040, "(MF2)Cursor Up", KEYCODE_UP ) /* Up 67 e7 */ - AT_KEYB_HELPER( 0x0080, "(MF2)Page Up", KEYCODE_PGUP ) /* Page Up 68 e8 */ - AT_KEYB_HELPER( 0x0100, "(MF2)Cursor Left", KEYCODE_LEFT ) /* Left 69 e9 */ - AT_KEYB_HELPER( 0x0200, "(MF2)Cursor Right", KEYCODE_RIGHT ) /* Right 6a ea */ - AT_KEYB_HELPER( 0x0800, "(MF2)Cursor Down", KEYCODE_DOWN ) /* Down 6c ec */ - AT_KEYB_HELPER( 0x1000, "(MF2)Page Down", KEYCODE_PGDN ) /* Page Down 6d ed */ - AT_KEYB_HELPER( 0x4000, "Del", KEYCODE_DEL ) /* Delete 6f ef */ - - PORT_START("pc_keyboard_7") - PORT_START("IOCARD1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -678,7 +612,6 @@ static INPUT_PORTS_START( calchase ) PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END -#endif void calchase_state::machine_start() { diff --git a/src/mame/drivers/compc.cpp b/src/mame/drivers/compc.cpp index f5007b5bcd6..3b5eb7902fa 100644 --- a/src/mame/drivers/compc.cpp +++ b/src/mame/drivers/compc.cpp @@ -170,8 +170,6 @@ static INPUT_PORTS_START(compciii) PORT_DIPSETTING( 0x10, "Color 40x25" ) PORT_DIPSETTING( 0x20, "Color 80x25" ) PORT_DIPSETTING( 0x30, "Monochrome" ) - - PORT_INCLUDE(pc_keyboard) INPUT_PORTS_END static INPUT_PORTS_START(compc) @@ -197,8 +195,6 @@ static INPUT_PORTS_START(compc) PORT_DIPNAME( 0x01, 0x01, "Boot from floppy") PORT_DIPSETTING( 0x01, DEF_STR(Yes) ) PORT_DIPSETTING( 0x00, DEF_STR(No) ) - - PORT_INCLUDE(pc_keyboard) INPUT_PORTS_END void compc_state::compc_map(address_map &map) diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp index f5e7361ae87..67a531a092b 100644 --- a/src/mame/drivers/europc.cpp +++ b/src/mame/drivers/europc.cpp @@ -366,7 +366,9 @@ static INPUT_PORTS_START( europc ) PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) PORT_BIT( 0x02, 0x02, IPT_UNUSED ) /* no turbo switch */ PORT_BIT( 0x01, 0x01, IPT_UNUSED ) +INPUT_PORTS_END +static INPUT_PORTS_START( europc_keyboard ) PORT_INCLUDE(pc_keyboard) PORT_MODIFY("pc_keyboard_2") /* IN6 */ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("` ~") PORT_CODE(KEYCODE_BACKSLASH) /* ` 29 A9 */ @@ -383,6 +385,28 @@ static INPUT_PORTS_START( europc ) PORT_BIT(0xfffe, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END +class europc_keyboard_device : public pc_keyboard_device +{ +public: + europc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + +protected: + virtual ioport_constructor device_input_ports() const override; +}; + +DEFINE_DEVICE_TYPE(EUROPC_KEYB, europc_keyboard_device, "europc_keyb", "EURO PC Keyboard") + +europc_keyboard_device::europc_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + pc_keyboard_device(mconfig, EUROPC_KEYB, tag, owner, clock) +{ + m_type = KEYBOARD_TYPE::PC; +} + +ioport_constructor europc_keyboard_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(europc_keyboard); +} + void europc_pc_state::europc_map(address_map &map) { map.unmap_value_high(); @@ -471,7 +495,7 @@ void europc_pc_state::europc(machine_config &config) ISA8_SLOT(config, "isa2", 0, "mb:isa", pc_isa8_cards, "lpt", true); ISA8_SLOT(config, "isa3", 0, "mb:isa", pc_isa8_cards, "com", true); ISA8_SLOT(config, "isa4", 0, "mb:isa", europc_fdc, "fdc", true); - PC_KEYB(config, m_keyboard); + EUROPC_KEYB(config, m_keyboard); m_keyboard->keypress().set("mb:pic8259", FUNC(pic8259_device::ir1_w)); M3002(config, m_rtc, 32.768_kHz_XTAL); @@ -499,6 +523,9 @@ void europc_pc_state::euroxt(machine_config &config) config.device_remove("kbdctrl"); + PC_KEYB(config.replace(), m_keyboard); + m_keyboard->keypress().set("mb:pic8259", FUNC(pic8259_device::ir1_w)); + m_ram->set_default_size("768K"); subdevice("isa2")->set_default_option(nullptr); diff --git a/src/mame/drivers/gamecstl.cpp b/src/mame/drivers/gamecstl.cpp index 699c0b9ed55..cb716353564 100644 --- a/src/mame/drivers/gamecstl.cpp +++ b/src/mame/drivers/gamecstl.cpp @@ -398,38 +398,7 @@ static GFXDECODE_START( gfx_cga ) GFXDECODE_ENTRY( "gfx1", 0x1800, CGA_charlayout, 0, 256 ) /* Font 3*/ GFXDECODE_END -#define AT_KEYB_HELPER(bit, text, key1) \ - PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1) - static INPUT_PORTS_START(gamecstl) - PORT_START("pc_keyboard_0") - PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED ) /* unused scancode 0 */ - AT_KEYB_HELPER( 0x0002, "Esc", KEYCODE_Q ) /* Esc 01 81 */ - - PORT_START("pc_keyboard_1") - AT_KEYB_HELPER( 0x0020, "Y", KEYCODE_Y ) /* Y 15 95 */ - AT_KEYB_HELPER( 0x1000, "Enter", KEYCODE_ENTER ) /* Enter 1C 9C */ - - PORT_START("pc_keyboard_2") - - PORT_START("pc_keyboard_3") - AT_KEYB_HELPER( 0x0002, "N", KEYCODE_N ) /* N 31 B1 */ - AT_KEYB_HELPER( 0x0800, "F1", KEYCODE_S ) /* F1 3B BB */ - - PORT_START("pc_keyboard_4") - - PORT_START("pc_keyboard_5") - - PORT_START("pc_keyboard_6") - AT_KEYB_HELPER( 0x0040, "(MF2)Cursor Up", KEYCODE_UP ) /* Up 67 e7 */ - AT_KEYB_HELPER( 0x0080, "(MF2)Page Up", KEYCODE_PGUP ) /* Page Up 68 e8 */ - AT_KEYB_HELPER( 0x0100, "(MF2)Cursor Left", KEYCODE_LEFT ) /* Left 69 e9 */ - AT_KEYB_HELPER( 0x0200, "(MF2)Cursor Right", KEYCODE_RIGHT ) /* Right 6a ea */ - AT_KEYB_HELPER( 0x0800, "(MF2)Cursor Down", KEYCODE_DOWN ) /* Down 6c ec */ - AT_KEYB_HELPER( 0x1000, "(MF2)Page Down", KEYCODE_PGDN ) /* Page Down 6d ed */ - AT_KEYB_HELPER( 0x4000, "Del", KEYCODE_A ) /* Delete 6f ef */ - - PORT_START("pc_keyboard_7") INPUT_PORTS_END void gamecstl_state::machine_start() diff --git a/src/mame/drivers/gammagic.cpp b/src/mame/drivers/gammagic.cpp index 9b1172e634b..b69dac177fc 100644 --- a/src/mame/drivers/gammagic.cpp +++ b/src/mame/drivers/gammagic.cpp @@ -77,54 +77,8 @@ void gammagic_state::gammagic_io(address_map &map) map(0x0400, 0xffff).noprw(); } -#define AT_KEYB_HELPER(bit, text, key1) \ - PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1) - -#if 1 static INPUT_PORTS_START( gammagic ) - PORT_START("pc_keyboard_0") - PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED ) /* unused scancode 0 */ - AT_KEYB_HELPER( 0x0002, "Esc", KEYCODE_Q ) /* Esc 01 81 */ - - PORT_START("pc_keyboard_1") - AT_KEYB_HELPER( 0x0010, "T", KEYCODE_T ) /* T 14 94 */ - AT_KEYB_HELPER( 0x0020, "Y", KEYCODE_Y ) /* Y 15 95 */ - AT_KEYB_HELPER( 0x0100, "O", KEYCODE_O ) /* O 18 98 */ - AT_KEYB_HELPER( 0x1000, "Enter", KEYCODE_ENTER ) /* Enter 1C 9C */ - - PORT_START("pc_keyboard_2") - - PORT_START("pc_keyboard_3") - AT_KEYB_HELPER( 0x0001, "B", KEYCODE_B ) /* B 30 B0 */ - AT_KEYB_HELPER( 0x0002, "N", KEYCODE_N ) /* N 31 B1 */ - AT_KEYB_HELPER( 0x0800, "F1", KEYCODE_S ) /* F1 3B BB */ - AT_KEYB_HELPER( 0x1000, "F2", KEYCODE_D ) /* F2 3C BC */ - AT_KEYB_HELPER( 0x4000, "F4", KEYCODE_F ) /* F4 3E BE */ - - - PORT_START("pc_keyboard_4") - AT_KEYB_HELPER( 0x0004, "F8", KEYCODE_F8 ) // f8=42 /f10=44 /minus 4a /plus=4e - AT_KEYB_HELPER( 0x0010, "F10", KEYCODE_F10 ) // f8=42 /f10=44 /minus 4a /plus=4e - AT_KEYB_HELPER( 0x0100, "KP 8(UP)", KEYCODE_8_PAD ) /* Keypad 8 (Up arrow) 48 C8 */ - AT_KEYB_HELPER( 0x0400, "KP -", KEYCODE_MINUS_PAD ) // f8=42 /f10=44 /minus 4a /plus=4e - AT_KEYB_HELPER( 0x4000, "KP +", KEYCODE_PLUS_PAD ) // f8=42 /f10=44 /minus 4a /plus=4e - - PORT_START("pc_keyboard_5") - AT_KEYB_HELPER( 0x0001, "KP 2(DN)", KEYCODE_2_PAD ) /* Keypad 2 (Down arrow) 50 D0 */ - - PORT_START("pc_keyboard_6") - AT_KEYB_HELPER( 0x0040, "(MF2)Cursor Up", KEYCODE_UP ) /* Up 67 e7 */ - AT_KEYB_HELPER( 0x0080, "(MF2)Page Up", KEYCODE_PGUP ) /* Page Up 68 e8 */ - AT_KEYB_HELPER( 0x0100, "(MF2)Cursor Left", KEYCODE_LEFT ) /* Left 69 e9 */ - AT_KEYB_HELPER( 0x0200, "(MF2)Cursor Right", KEYCODE_RIGHT ) /* Right 6a ea */ - AT_KEYB_HELPER( 0x0800, "(MF2)Cursor Down", KEYCODE_DOWN ) /* Down 6c ec */ - AT_KEYB_HELPER( 0x1000, "(MF2)Page Down", KEYCODE_PGDN ) /* Page Down 6d ed */ - AT_KEYB_HELPER( 0x4000, "Del", KEYCODE_A ) /* Delete 6f ef */ - - PORT_START("pc_keyboard_7") - INPUT_PORTS_END -#endif void gammagic_state::machine_start() { diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp index 26ef951ef54..123d17e3c84 100644 --- a/src/mame/drivers/ibmpcjr.cpp +++ b/src/mame/drivers/ibmpcjr.cpp @@ -119,8 +119,6 @@ private: }; static INPUT_PORTS_START( ibmpcjr ) - PORT_INCLUDE(pc_keyboard) - PORT_START("IN0") /* IN0 */ PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_VBLANK("pcvideo_pcjr:screen") diff --git a/src/mame/drivers/indy_indigo2.cpp b/src/mame/drivers/indy_indigo2.cpp index cd1d069e021..207f2214230 100644 --- a/src/mame/drivers/indy_indigo2.cpp +++ b/src/mame/drivers/indy_indigo2.cpp @@ -310,7 +310,6 @@ void ip24_state::machine_reset() } static INPUT_PORTS_START( ip24 ) - PORT_INCLUDE( at_keyboard ) INPUT_PORTS_END void ip24_state::wd33c93(device_t *device) diff --git a/src/mame/drivers/kron.cpp b/src/mame/drivers/kron.cpp index bb9cd9dc0d3..46e49477c18 100644 --- a/src/mame/drivers/kron.cpp +++ b/src/mame/drivers/kron.cpp @@ -218,7 +218,6 @@ void kron180_state::kron180_iomap(address_map &map) /* Input ports */ static INPUT_PORTS_START (kron180) - PORT_INCLUDE(pc_keyboard) INPUT_PORTS_END /* Video TODO: find and understand the char table within main rom */ diff --git a/src/mame/drivers/midqslvr.cpp b/src/mame/drivers/midqslvr.cpp index 261937e8525..5a876a7fc2e 100644 --- a/src/mame/drivers/midqslvr.cpp +++ b/src/mame/drivers/midqslvr.cpp @@ -747,11 +747,11 @@ ROM_START( ultarctcup ) ROM_END // there are almost certainly multiple versions of these; updates were offered on floppy disk. The version numbers for the existing CHDs are unknown. -GAME(1999, hydrthnd, 0, midqslvr, at_keyboard, midqslvr_state, empty_init, ROT0, "Midway Games", "Hydro Thunder", MACHINE_IS_SKELETON) +GAME(1999, hydrthnd, 0, midqslvr, 0, midqslvr_state, empty_init, ROT0, "Midway Games", "Hydro Thunder", MACHINE_IS_SKELETON) -GAME(2000, offrthnd, 0, midqslvr, at_keyboard, midqslvr_state, empty_init, ROT0, "Midway Games", "Offroad Thunder", MACHINE_IS_SKELETON) +GAME(2000, offrthnd, 0, midqslvr, 0, midqslvr_state, empty_init, ROT0, "Midway Games", "Offroad Thunder", MACHINE_IS_SKELETON) -GAME(2001, arctthnd, 0, graphite, at_keyboard, midqslvr_state, empty_init, ROT0, "Midway Games", "Arctic Thunder (v1.002)", MACHINE_IS_SKELETON) +GAME(2001, arctthnd, 0, graphite, 0, midqslvr_state, empty_init, ROT0, "Midway Games", "Arctic Thunder (v1.002)", MACHINE_IS_SKELETON) -GAME(2001, ultarctc, 0, graphite, at_keyboard, midqslvr_state, empty_init, ROT0, "Midway Games", "Ultimate Arctic Thunder", MACHINE_IS_SKELETON) -GAME(2004, ultarctcup, ultarctc, graphite, at_keyboard, midqslvr_state, empty_init, ROT0, "Midway Games", "Ultimate Arctic Thunder Update CD ver 1.950 (5/3/04)", MACHINE_IS_SKELETON) +GAME(2001, ultarctc, 0, graphite, 0, midqslvr_state, empty_init, ROT0, "Midway Games", "Ultimate Arctic Thunder", MACHINE_IS_SKELETON) +GAME(2004, ultarctcup, ultarctc, graphite, 0, midqslvr_state, empty_init, ROT0, "Midway Games", "Ultimate Arctic Thunder Update CD ver 1.950 (5/3/04)", MACHINE_IS_SKELETON) diff --git a/src/mame/drivers/nforcepc.cpp b/src/mame/drivers/nforcepc.cpp index c6a73538d71..a338e8483d7 100644 --- a/src/mame/drivers/nforcepc.cpp +++ b/src/mame/drivers/nforcepc.cpp @@ -1241,7 +1241,6 @@ ROM_START(nforcepc) ROM_END static INPUT_PORTS_START(nforcepc) - PORT_INCLUDE(at_keyboard) INPUT_PORTS_END COMP(2002, nforcepc, 0, 0, nforcepc, nforcepc, nforcepc_state, empty_init, "Nvidia", "Nvidia nForce PC (CRUSH11/12)", MACHINE_IS_SKELETON) diff --git a/src/mame/drivers/olivpc1.cpp b/src/mame/drivers/olivpc1.cpp index 125fd33d144..ac878b7bf03 100644 --- a/src/mame/drivers/olivpc1.cpp +++ b/src/mame/drivers/olivpc1.cpp @@ -106,7 +106,6 @@ void olivpc1_state::pc8_io(address_map &map) } static INPUT_PORTS_START(olivpc1) - PORT_INCLUDE(pc_keyboard) INPUT_PORTS_END // TODO: replace with 8042 dump diff --git a/src/mame/drivers/pangofun.cpp b/src/mame/drivers/pangofun.cpp index 3415ea761b1..650cd47bf69 100644 --- a/src/mame/drivers/pangofun.cpp +++ b/src/mame/drivers/pangofun.cpp @@ -141,38 +141,7 @@ void pangofun_state::pcat_io(address_map &map) map(0x03d0, 0x03df).rw("vga", FUNC(vga_device::port_03d0_r), FUNC(vga_device::port_03d0_w)); } -#define AT_KEYB_HELPER(bit, text, key1) \ - PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(text) PORT_CODE(key1) - static INPUT_PORTS_START( pangofun ) - PORT_START("pc_keyboard_0") - PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED ) /* unused scancode 0 */ - AT_KEYB_HELPER( 0x0002, "Esc", KEYCODE_Q ) /* Esc 01 81 */ - - PORT_START("pc_keyboard_1") - AT_KEYB_HELPER( 0x0020, "Y", KEYCODE_Y ) /* Y 15 95 */ - AT_KEYB_HELPER( 0x1000, "Enter", KEYCODE_ENTER ) /* Enter 1C 9C */ - - PORT_START("pc_keyboard_2") - - PORT_START("pc_keyboard_3") - AT_KEYB_HELPER( 0x0002, "N", KEYCODE_N ) /* N 31 B1 */ - AT_KEYB_HELPER( 0x0800, "F1", KEYCODE_S ) /* F1 3B BB */ - - PORT_START("pc_keyboard_4") - - PORT_START("pc_keyboard_5") - - PORT_START("pc_keyboard_6") - AT_KEYB_HELPER( 0x0040, "(MF2)Cursor Up", KEYCODE_UP ) /* Up 67 e7 */ - AT_KEYB_HELPER( 0x0080, "(MF2)Page Up", KEYCODE_PGUP ) /* Page Up 68 e8 */ - AT_KEYB_HELPER( 0x0100, "(MF2)Cursor Left", KEYCODE_LEFT ) /* Left 69 e9 */ - AT_KEYB_HELPER( 0x0200, "(MF2)Cursor Right", KEYCODE_RIGHT ) /* Right 6a ea */ - AT_KEYB_HELPER( 0x0800, "(MF2)Cursor Down", KEYCODE_DOWN ) /* Down 6c ec */ - AT_KEYB_HELPER( 0x1000, "(MF2)Page Down", KEYCODE_PGDN ) /* Page Down 6d ed */ - AT_KEYB_HELPER( 0x4000, "Del", KEYCODE_A ) /* Delete 6f ef */ - - PORT_START("pc_keyboard_7") INPUT_PORTS_END void pangofun_state::machine_start() diff --git a/src/mame/drivers/pcipc.cpp b/src/mame/drivers/pcipc.cpp index 55b305f2ac1..cdf7d2d3104 100644 --- a/src/mame/drivers/pcipc.cpp +++ b/src/mame/drivers/pcipc.cpp @@ -600,7 +600,6 @@ ROM_START(pcipctx) ROM_END static INPUT_PORTS_START(pcipc) - PORT_INCLUDE(at_keyboard) INPUT_PORTS_END COMP(1998, pcipc, 0, 0, pcipc, pcipc, pcipc_state, empty_init, "Hack Inc.", "Sandbox PCI PC (440HX)", MACHINE_NO_SOUND) diff --git a/src/mame/drivers/pcw16.cpp b/src/mame/drivers/pcw16.cpp index 236bcb5abc8..9611aadf492 100644 --- a/src/mame/drivers/pcw16.cpp +++ b/src/mame/drivers/pcw16.cpp @@ -1001,8 +1001,6 @@ static INPUT_PORTS_START(pcw16) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen") /* power switch - default is on */ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE) PORT_NAME("Power Switch/Suspend") PORT_WRITE_LINE_DEVICE_MEMBER("ns16550_2", ins8250_uart_device, ri_w) PORT_TOGGLE - - PORT_INCLUDE( at_keyboard ) /* IN4 - IN11 */ INPUT_PORTS_END static void pcw16_com(device_slot_interface &device) diff --git a/src/mame/drivers/photoply.cpp b/src/mame/drivers/photoply.cpp index 85a86e3e22f..6b483674ca2 100644 --- a/src/mame/drivers/photoply.cpp +++ b/src/mame/drivers/photoply.cpp @@ -225,50 +225,7 @@ void photoply_state::photoply_io(address_map &map) } -#define AT_KEYB_HELPER(bit, text, key1) \ - PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1) - static INPUT_PORTS_START( photoply ) - PORT_START("pc_keyboard_0") - PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED ) // Unused scancode 0 - AT_KEYB_HELPER( 0x0002, "Esc", KEYCODE_Q ) // Esc 01 81 - AT_KEYB_HELPER( 0x0004, "1", KEYCODE_1 ) - AT_KEYB_HELPER( 0x0008, "2", KEYCODE_2 ) - AT_KEYB_HELPER( 0x0010, "3", KEYCODE_3 ) - AT_KEYB_HELPER( 0x0020, "4", KEYCODE_4 ) - AT_KEYB_HELPER( 0x0040, "5", KEYCODE_5 ) - AT_KEYB_HELPER( 0x0080, "6", KEYCODE_6 ) - AT_KEYB_HELPER( 0x0100, "7", KEYCODE_7 ) - AT_KEYB_HELPER( 0x0200, "8", KEYCODE_8 ) - AT_KEYB_HELPER( 0x0400, "9", KEYCODE_9 ) - AT_KEYB_HELPER( 0x0800, "0", KEYCODE_0 ) - - PORT_START("pc_keyboard_1") - AT_KEYB_HELPER( 0x0020, "Y", KEYCODE_Y ) // Y 15 95 - AT_KEYB_HELPER( 0x1000, "Enter", KEYCODE_ENTER ) // Enter 1C 9C - - PORT_START("pc_keyboard_2") - - PORT_START("pc_keyboard_3") - AT_KEYB_HELPER( 0x0002, "N", KEYCODE_N ) // N 31 B1 - AT_KEYB_HELPER( 0x0800, "F1", KEYCODE_F1 ) // F1 3B BB - AT_KEYB_HELPER( 0x1000, "F2", KEYCODE_F2 ) - AT_KEYB_HELPER( 0x4000, "F4", KEYCODE_F4 ) - - PORT_START("pc_keyboard_4") - - PORT_START("pc_keyboard_5") - - PORT_START("pc_keyboard_6") - AT_KEYB_HELPER( 0x0040, "(MF2)Cursor Up", KEYCODE_UP ) // Up 67 e7 - AT_KEYB_HELPER( 0x0080, "(MF2)Page Up", KEYCODE_PGUP ) // Page Up 68 e8 - AT_KEYB_HELPER( 0x0100, "(MF2)Cursor Left", KEYCODE_LEFT ) // Left 69 e9 - AT_KEYB_HELPER( 0x0200, "(MF2)Cursor Right", KEYCODE_RIGHT ) // Right 6a ea - AT_KEYB_HELPER( 0x0800, "(MF2)Cursor Down", KEYCODE_DOWN ) // Down 6c ec - AT_KEYB_HELPER( 0x1000, "(MF2)Page Down", KEYCODE_PGDN ) // Page Down 6d ed - AT_KEYB_HELPER( 0x4000, "Del", KEYCODE_A ) // Delete 6f ef - - PORT_START("pc_keyboard_7") INPUT_PORTS_END void photoply_state::machine_start() diff --git a/src/mame/drivers/queen.cpp b/src/mame/drivers/queen.cpp index f6a62a81ea4..75b6ecc2827 100644 --- a/src/mame/drivers/queen.cpp +++ b/src/mame/drivers/queen.cpp @@ -317,4 +317,4 @@ ROM_START( queen ) ROM_END -GAME( 2002?, queen, 0, queen, at_keyboard, queen_state, empty_init, ROT0, "STG", "Queen?", MACHINE_IS_SKELETON ) +GAME( 2002?, queen, 0, queen, 0, queen_state, empty_init, ROT0, "STG", "Queen?", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/su2000.cpp b/src/mame/drivers/su2000.cpp index d5efb43f96d..3993a3c610e 100644 --- a/src/mame/drivers/su2000.cpp +++ b/src/mame/drivers/su2000.cpp @@ -273,4 +273,4 @@ ROM_START( su2000 ) * *************************************/ -GAME( 1993, su2000, 0, su2000, pc_keyboard, su2000_state, empty_init, ROT0, "Virtuality", "SU2000", MACHINE_IS_BIOS_ROOT | MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +GAME( 1993, su2000, 0, su2000, 0, su2000_state, empty_init, ROT0, "Virtuality", "SU2000", MACHINE_IS_BIOS_ROOT | MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff --git a/src/mame/drivers/taitowlf.cpp b/src/mame/drivers/taitowlf.cpp index 74d86eefeb7..5ce7ccf8f40 100644 --- a/src/mame/drivers/taitowlf.cpp +++ b/src/mame/drivers/taitowlf.cpp @@ -326,42 +326,6 @@ void taitowlf_state::taitowlf_io(address_map &map) /*****************************************************************************/ -#if 0 -#define AT_KEYB_HELPER(bit, text, key1) \ - PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1) - -static INPUT_PORTS_START(taitowlf) - PORT_START("pc_keyboard_0") - PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED ) /* unused scancode 0 */ - AT_KEYB_HELPER( 0x0002, "Esc", KEYCODE_Q ) /* Esc 01 81 */ - - PORT_START("pc_keyboard_1") - AT_KEYB_HELPER( 0x0020, "Y", KEYCODE_Y ) /* Y 15 95 */ - AT_KEYB_HELPER( 0x1000, "Enter", KEYCODE_ENTER ) /* Enter 1C 9C */ - - PORT_START("pc_keyboard_2") - - PORT_START("pc_keyboard_3") - AT_KEYB_HELPER( 0x0002, "N", KEYCODE_N ) /* N 31 B1 */ - AT_KEYB_HELPER( 0x0800, "F1", KEYCODE_S ) /* F1 3B BB */ - - PORT_START("pc_keyboard_4") - - PORT_START("pc_keyboard_5") - - PORT_START("pc_keyboard_6") - AT_KEYB_HELPER( 0x0040, "(MF2)Cursor Up", KEYCODE_UP ) /* Up 67 e7 */ - AT_KEYB_HELPER( 0x0080, "(MF2)Page Up", KEYCODE_PGUP ) /* Page Up 68 e8 */ - AT_KEYB_HELPER( 0x0100, "(MF2)Cursor Left", KEYCODE_LEFT ) /* Left 69 e9 */ - AT_KEYB_HELPER( 0x0200, "(MF2)Cursor Right", KEYCODE_RIGHT ) /* Right 6a ea */ - AT_KEYB_HELPER( 0x0800, "(MF2)Cursor Down", KEYCODE_DOWN ) /* Down 6c ec */ - AT_KEYB_HELPER( 0x1000, "(MF2)Page Down", KEYCODE_PGDN ) /* Page Down 6d ed */ - AT_KEYB_HELPER( 0x4000, "Del", KEYCODE_A ) /* Delete 6f ef */ - - PORT_START("pc_keyboard_7") -INPUT_PORTS_END -#endif - void taitowlf_state::machine_start() { } @@ -466,4 +430,4 @@ ROM_END /*****************************************************************************/ -GAME(1997, pf2012, 0, taitowlf, pc_keyboard, taitowlf_state, init_taitowlf, ROT0, "Taito", "Psychic Force 2012", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) +GAME(1997, pf2012, 0, taitowlf, 0, taitowlf_state, init_taitowlf, ROT0, "Taito", "Psychic Force 2012", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp index 45a4da80bcf..514e1d37fd5 100644 --- a/src/mame/drivers/tandy1t.cpp +++ b/src/mame/drivers/tandy1t.cpp @@ -479,7 +479,7 @@ void tandy1000_state::tandy1000_bank_w(offs_t offset, uint8_t data) } } -static INPUT_PORTS_START( t1000_common ) +static INPUT_PORTS_START( t1000 ) PORT_START("IN0") /* IN0 */ PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_VBLANK("pcvideo_t1000:screen") @@ -554,15 +554,29 @@ static INPUT_PORTS_START( t1000_keyboard ) PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F12") PORT_CODE(KEYCODE_F12) /* F12 5a Da */ INPUT_PORTS_END -static INPUT_PORTS_START( t1000_90key ) - PORT_INCLUDE(t1000_common) - PORT_INCLUDE(t1000_keyboard) -INPUT_PORTS_END +class t1000_keyboard_device : public pc_keyboard_device +{ +public: + t1000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + +protected: + virtual ioport_constructor device_input_ports() const override; +}; + +DEFINE_DEVICE_TYPE(T1000_KEYB, t1000_keyboard_device, "t1000_keyb", "Tandy 1000 Keyboard") + +t1000_keyboard_device::t1000_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + pc_keyboard_device(mconfig, T1000_KEYB, tag, owner, clock) +{ + m_type = KEYBOARD_TYPE::PC; +} + +ioport_constructor t1000_keyboard_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(t1000_keyboard); +} + -static INPUT_PORTS_START( t1000_101key ) - PORT_INCLUDE(t1000_common) - PORT_INCLUDE(at_keyboard) -INPUT_PORTS_END void tandy1000_state::tandy1000_map(address_map &map) { @@ -696,7 +710,7 @@ void tandy1000_state::tandy1000_common(machine_config &config) void tandy1000_state::tandy1000_90key(machine_config &config) { - PC_KEYB(config, m_keyboard); + T1000_KEYB(config, m_keyboard); m_keyboard->keypress().set("mb:pic8259", FUNC(pic8259_device::ir1_w)); } @@ -957,10 +971,10 @@ ROM_END // tandy 1000 -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1987, t1000hx, ibm5150, 0, t1000hx, t1000_90key, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 HX", 0 ) -COMP( 1987, t1000sx, ibm5150, 0, t1000sx, t1000_90key, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 SX", 0 ) -COMP( 1987, t1000tx, ibm5150, 0, t1000tx, t1000_90key, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 TX", 0 ) -COMP( 1989, t1000rl, ibm5150, 0, t1000rl, t1000_101key, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 RL", 0 ) -COMP( 1989, t1000tl2, ibm5150, 0, t1000tl, t1000_101key, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 TL/2", 0 ) -COMP( 1988, t1000sl2, ibm5150, 0, t1000sl2, t1000_101key, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 SL/2", 0 ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1987, t1000hx, ibm5150, 0, t1000hx, t1000, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 HX", 0 ) +COMP( 1987, t1000sx, ibm5150, 0, t1000sx, t1000, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 SX", 0 ) +COMP( 1987, t1000tx, ibm5150, 0, t1000tx, t1000, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 TX", 0 ) +COMP( 1989, t1000rl, ibm5150, 0, t1000rl, t1000, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 RL", 0 ) +COMP( 1989, t1000tl2, ibm5150, 0, t1000tl, t1000, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 TL/2", 0 ) +COMP( 1988, t1000sl2, ibm5150, 0, t1000sl2, t1000, tandy1000_state, empty_init, "Tandy Radio Shack", "Tandy 1000 SL/2", 0 ) diff --git a/src/mame/drivers/tandy2k.cpp b/src/mame/drivers/tandy2k.cpp index 6785eb42d67..85a1e3f3d01 100644 --- a/src/mame/drivers/tandy2k.cpp +++ b/src/mame/drivers/tandy2k.cpp @@ -403,6 +403,20 @@ void tandy2k_state::vpac_mem(address_map &map) static INPUT_PORTS_START( tandy2k ) // defined in machine/tandy2kb.c + PORT_START("MOUSEBTN") + PORT_BIT( 0xff8f, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, tandy2k_state, input_changed, 0) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(MOUSECODE_BUTTON2) PORT_CHANGED_MEMBER(DEVICE_SELF, tandy2k_state, input_changed, 0) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* this would be button three but AFAIK no tandy mouse ever had one */ + + PORT_START("MOUSEX") + PORT_BIT( 0xffff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(0) PORT_CHANGED_MEMBER(DEVICE_SELF, tandy2k_state, input_changed, 0) + + PORT_START("MOUSEY") + PORT_BIT( 0xffff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(0) PORT_CHANGED_MEMBER(DEVICE_SELF, tandy2k_state, input_changed, 0) +INPUT_PORTS_END + +static INPUT_PORTS_START( tandy2kb_hle ) PORT_INCLUDE(pc_keyboard) PORT_MODIFY("pc_keyboard_2") @@ -437,20 +451,30 @@ static INPUT_PORTS_START( tandy2k ) PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) /* HOME 58 D8 */ PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F11") PORT_CODE(KEYCODE_F11) /* F11 59 D9 */ PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F12") PORT_CODE(KEYCODE_F12) /* F12 5a Da */ - - PORT_START("MOUSEBTN") - PORT_BIT( 0xff8f, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(MOUSECODE_BUTTON1) PORT_CHANGED_MEMBER(DEVICE_SELF, tandy2k_state, input_changed, 0) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(MOUSECODE_BUTTON2) PORT_CHANGED_MEMBER(DEVICE_SELF, tandy2k_state, input_changed, 0) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) /* this would be button three but AFAIK no tandy mouse ever had one */ - - PORT_START("MOUSEX") - PORT_BIT( 0xffff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(0) PORT_CHANGED_MEMBER(DEVICE_SELF, tandy2k_state, input_changed, 0) - - PORT_START("MOUSEY") - PORT_BIT( 0xffff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(0) PORT_CHANGED_MEMBER(DEVICE_SELF, tandy2k_state, input_changed, 0) INPUT_PORTS_END +class tandy2kb_hle_device : public pc_keyboard_device +{ +public: + tandy2kb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + +protected: + virtual ioport_constructor device_input_ports() const override; +}; + +DEFINE_DEVICE_TYPE(TANDY2K_HLE_KEYB, tandy2kb_hle_device, "tandy2kb_hle", "Tandy 2000 Keyboard HLE") + +tandy2kb_hle_device::tandy2kb_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + pc_keyboard_device(mconfig, TANDY2K_HLE_KEYB, tag, owner, clock) +{ + m_type = KEYBOARD_TYPE::PC; +} + +ioport_constructor tandy2kb_hle_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(tandy2kb_hle); +} + INPUT_CHANGED_MEMBER(tandy2k_state::input_changed) { if (m_clkmouse_cnt || !m_clkmouse_irq) @@ -1076,7 +1100,7 @@ void tandy2k_state::tandy2k(machine_config &config) m_kb->data_wr_callback().set(FUNC(tandy2k_state::kbddat_w)); // temporary until the tandy keyboard has a rom dump - PC_KEYB(config, m_pc_keyboard, 0).keypress().set(I8259A_1_TAG, FUNC(pic8259_device::ir0_w)); + TANDY2K_HLE_KEYB(config, m_pc_keyboard, 0).keypress().set(I8259A_1_TAG, FUNC(pic8259_device::ir0_w)); // software lists SOFTWARE_LIST(config, "flop_list").set_original("tandy2k"); diff --git a/src/mame/drivers/tv990.cpp b/src/mame/drivers/tv990.cpp index f28d5b01c42..86c8d119502 100644 --- a/src/mame/drivers/tv990.cpp +++ b/src/mame/drivers/tv990.cpp @@ -324,7 +324,6 @@ void tv990_state::tv990_mem(address_map &map) /* Input ports */ static INPUT_PORTS_START( tv990 ) - PORT_INCLUDE( at_keyboard ) PORT_START("Screen") PORT_CONFNAME( 0x30, 0x00, "Color") PORT_CHANGED_MEMBER(DEVICE_SELF, tv990_state, color, 0) PORT_CONFSETTING( 0x00, "Green") diff --git a/src/mame/drivers/voyager.cpp b/src/mame/drivers/voyager.cpp index 85dbc8955fb..811026b9d93 100644 --- a/src/mame/drivers/voyager.cpp +++ b/src/mame/drivers/voyager.cpp @@ -323,47 +323,9 @@ void voyager_state::voyager_io(address_map &map) } -#define AT_KEYB_HELPER(bit, text, key1) \ - PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1) - -#if 1 static INPUT_PORTS_START( voyager ) - PORT_START("pc_keyboard_0") - PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED ) /* unused scancode 0 */ - AT_KEYB_HELPER( 0x0002, "Esc", KEYCODE_Q ) /* Esc 01 81 */ - - PORT_START("pc_keyboard_1") - AT_KEYB_HELPER( 0x0010, "T", KEYCODE_T ) /* T 14 94 */ - AT_KEYB_HELPER( 0x0020, "Y", KEYCODE_Y ) /* Y 15 95 */ - AT_KEYB_HELPER( 0x0100, "O", KEYCODE_O ) /* O 18 98 */ - AT_KEYB_HELPER( 0x1000, "Enter", KEYCODE_ENTER ) /* Enter 1C 9C */ - - PORT_START("pc_keyboard_2") - - PORT_START("pc_keyboard_3") - AT_KEYB_HELPER( 0x0001, "B", KEYCODE_B ) /* B 30 B0 */ - AT_KEYB_HELPER( 0x0002, "N", KEYCODE_N ) /* N 31 B1 */ - AT_KEYB_HELPER( 0x0800, "F1", KEYCODE_S ) /* F1 3B BB */ -// AT_KEYB_HELPER( 0x8000, "F5", KEYCODE_F5 ) - - PORT_START("pc_keyboard_4") -// AT_KEYB_HELPER( 0x0004, "F8", KEYCODE_F8 ) - - PORT_START("pc_keyboard_5") - - PORT_START("pc_keyboard_6") - AT_KEYB_HELPER( 0x0040, "(MF2)Cursor Up", KEYCODE_UP ) /* Up 67 e7 */ - AT_KEYB_HELPER( 0x0080, "(MF2)Page Up", KEYCODE_PGUP ) /* Page Up 68 e8 */ - AT_KEYB_HELPER( 0x0100, "(MF2)Cursor Left", KEYCODE_LEFT ) /* Left 69 e9 */ - AT_KEYB_HELPER( 0x0200, "(MF2)Cursor Right", KEYCODE_RIGHT ) /* Right 6a ea */ - AT_KEYB_HELPER( 0x0800, "(MF2)Cursor Down", KEYCODE_DOWN ) /* Down 6c ec */ - AT_KEYB_HELPER( 0x1000, "(MF2)Page Down", KEYCODE_PGDN ) /* Page Down 6d ed */ - AT_KEYB_HELPER( 0x4000, "Del", KEYCODE_A ) /* Delete 6f ef */ - - PORT_START("pc_keyboard_7") - PORT_START("IOCARD1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) @@ -503,7 +465,6 @@ static INPUT_PORTS_START( voyager ) PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END -#endif void voyager_state::machine_start() { diff --git a/src/mame/drivers/xtom3d.cpp b/src/mame/drivers/xtom3d.cpp index 97108e670ff..5be72e7dca1 100644 --- a/src/mame/drivers/xtom3d.cpp +++ b/src/mame/drivers/xtom3d.cpp @@ -449,4 +449,4 @@ ROM_START( xtom3d ) ROM_END -GAME(1999, xtom3d, 0, xtom3d, at_keyboard, xtom3d_state, empty_init, ROT0, "Jamie System Development", "X Tom 3D", MACHINE_IS_SKELETON) +GAME(1999, xtom3d, 0, xtom3d, 0, xtom3d_state, empty_init, ROT0, "Jamie System Development", "X Tom 3D", MACHINE_IS_SKELETON)