diff options
author | 2015-01-10 15:34:42 +0100 | |
---|---|---|
committer | 2015-01-10 15:34:42 +0100 | |
commit | d103debef2830bd0e28b54348c21492f89c269c4 (patch) | |
tree | b28e9c5c8cec79767804b1ba77e6a6a1a77fd2ea /src | |
parent | ed25676f9a712d496d1aa4b9dff9a5b1b8cd0568 (diff) | |
parent | 344e5e89def3906c275093765678109884a6d17f (diff) |
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/bus/rs232/rs232.h | 10 | ||||
-rw-r--r-- | src/emu/bus/rs232/ser_mouse.c | 10 | ||||
-rw-r--r-- | src/emu/bus/sms_ctrl/graphic.c | 10 | ||||
-rw-r--r-- | src/emu/bus/sms_ctrl/joypad.c | 12 | ||||
-rw-r--r-- | src/emu/bus/sms_ctrl/lphaser.c | 8 | ||||
-rw-r--r-- | src/emu/bus/sms_ctrl/paddle.c | 8 | ||||
-rw-r--r-- | src/emu/bus/sms_ctrl/rfu.c | 2 | ||||
-rw-r--r-- | src/emu/bus/sms_ctrl/sports.c | 14 | ||||
-rw-r--r-- | src/emu/bus/sms_ctrl/sportsjp.c | 10 | ||||
-rw-r--r-- | src/emu/ioport.h | 14 | ||||
-rw-r--r-- | src/emu/ui/miscmenu.c | 68 | ||||
-rw-r--r-- | src/emu/ui/miscmenu.h | 2 |
12 files changed, 97 insertions, 71 deletions
diff --git a/src/emu/bus/rs232/rs232.h b/src/emu/bus/rs232/rs232.h index 5ca961ee9bd..a7df88e0700 100644 --- a/src/emu/bus/rs232/rs232.h +++ b/src/emu/bus/rs232/rs232.h @@ -41,7 +41,7 @@ #define MCFG_RS232_BAUD(_tag, _default_baud, _description, _class, _write_line) \ PORT_START(_tag) \ - PORT_CONFNAME(0xff, _default_baud, _description) PORT_DEVICE PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ + PORT_CONFNAME(0xff, _default_baud, _description) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ PORT_CONFSETTING( RS232_BAUD_110, "110") \ PORT_CONFSETTING( RS232_BAUD_150, "150") \ PORT_CONFSETTING( RS232_BAUD_300, "300") \ @@ -62,7 +62,7 @@ #define MCFG_RS232_STARTBITS(_tag, _default_startbits, _description, _class, _write_line) \ PORT_START(_tag) \ - PORT_CONFNAME(0xff, _default_startbits, _description) PORT_DEVICE PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ + PORT_CONFNAME(0xff, _default_startbits, _description) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ PORT_CONFSETTING( RS232_STARTBITS_0, "0") \ PORT_CONFSETTING( RS232_STARTBITS_1, "1") @@ -73,7 +73,7 @@ #define MCFG_RS232_DATABITS(_tag, _default_databits, _description, _class, _write_line) \ PORT_START(_tag) \ - PORT_CONFNAME(0xff, _default_databits, _description) PORT_DEVICE PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ + PORT_CONFNAME(0xff, _default_databits, _description) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ PORT_CONFSETTING( RS232_DATABITS_5, "5") \ PORT_CONFSETTING( RS232_DATABITS_6, "6") \ PORT_CONFSETTING( RS232_DATABITS_7, "7") \ @@ -87,7 +87,7 @@ #define MCFG_RS232_PARITY(_tag, _default_parity, _description, _class, _write_line) \ PORT_START(_tag) \ - PORT_CONFNAME(0xff, _default_parity, "Parity") PORT_DEVICE PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ + PORT_CONFNAME(0xff, _default_parity, "Parity") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ PORT_CONFSETTING( RS232_PARITY_NONE, "None") \ PORT_CONFSETTING( RS232_PARITY_ODD, "Odd") \ PORT_CONFSETTING( RS232_PARITY_EVEN, "Even") \ @@ -101,7 +101,7 @@ #define MCFG_RS232_STOPBITS(_tag, _default_stopbits, _description, _class, _write_line) \ PORT_START(_tag) \ - PORT_CONFNAME(0xff, 0x01, _description) PORT_DEVICE PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ + PORT_CONFNAME(0xff, 0x01, _description) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, _class, _write_line) \ PORT_CONFSETTING( RS232_STOPBITS_0, "0") \ PORT_CONFSETTING( RS232_STOPBITS_1, "1") \ PORT_CONFSETTING( RS232_STOPBITS_1_5, "1.5") \ diff --git a/src/emu/bus/rs232/ser_mouse.c b/src/emu/bus/rs232/ser_mouse.c index c1b22769398..823cf732607 100644 --- a/src/emu/bus/rs232/ser_mouse.c +++ b/src/emu/bus/rs232/ser_mouse.c @@ -246,15 +246,15 @@ WRITE_LINE_MEMBER(microsoft_mouse_device::input_rts) static INPUT_PORTS_START( ser_mouse ) PORT_START( "ser_mouse_btn" ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_DEVICE PORT_NAME("Mouse Left Button") PORT_CODE(MOUSECODE_BUTTON1) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_DEVICE PORT_NAME("Mouse Middle Button") PORT_CODE(MOUSECODE_BUTTON3) - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_DEVICE PORT_NAME("Mouse Right Button") PORT_CODE(MOUSECODE_BUTTON2) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse Left Button") PORT_CODE(MOUSECODE_BUTTON1) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Mouse Middle Button") PORT_CODE(MOUSECODE_BUTTON3) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_NAME("Mouse Right Button") PORT_CODE(MOUSECODE_BUTTON2) PORT_START( "ser_mouse_x" ) /* Mouse - X AXIS */ - PORT_BIT( 0xfff, 0x00, IPT_MOUSE_X) PORT_DEVICE PORT_SENSITIVITY(100) PORT_DEVICE PORT_KEYDELTA(0) PORT_PLAYER(1) + PORT_BIT( 0xfff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_START( "ser_mouse_y" ) /* Mouse - Y AXIS */ - PORT_BIT( 0xfff, 0x00, IPT_MOUSE_Y) PORT_DEVICE PORT_SENSITIVITY(100) PORT_DEVICE PORT_KEYDELTA(0) PORT_PLAYER(1) + PORT_BIT( 0xfff, 0x00, IPT_MOUSE_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) INPUT_PORTS_END ioport_constructor serial_mouse_device::device_input_ports() const diff --git a/src/emu/bus/sms_ctrl/graphic.c b/src/emu/bus/sms_ctrl/graphic.c index 527d8688f3b..a04b9c59473 100644 --- a/src/emu/bus/sms_ctrl/graphic.c +++ b/src/emu/bus/sms_ctrl/graphic.c @@ -46,16 +46,16 @@ const device_type SMS_GRAPHIC = &device_creator<sms_graphic_device>; static INPUT_PORTS_START( sms_graphic ) PORT_START("BUTTONS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_DEVICE // MENU - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_DEVICE // DO - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_DEVICE // PEN + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) // MENU + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) // DO + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) // PEN PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("X") - PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_X) PORT_DEVICE PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) + PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_START("Y") - PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_Y) PORT_DEVICE PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) + PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) INPUT_PORTS_END diff --git a/src/emu/bus/sms_ctrl/joypad.c b/src/emu/bus/sms_ctrl/joypad.c index 34f49cd80ae..e7a0f3607bd 100644 --- a/src/emu/bus/sms_ctrl/joypad.c +++ b/src/emu/bus/sms_ctrl/joypad.c @@ -20,14 +20,14 @@ const device_type SMS_JOYPAD = &device_creator<sms_joypad_device>; static INPUT_PORTS_START( sms_joypad ) PORT_START("JOYPAD") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_DEVICE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_DEVICE - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_DEVICE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_DEVICE + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_DEVICE // TL + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_DEVICE // TR + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) // TR INPUT_PORTS_END diff --git a/src/emu/bus/sms_ctrl/lphaser.c b/src/emu/bus/sms_ctrl/lphaser.c index 696f4ff90eb..8736657cae6 100644 --- a/src/emu/bus/sms_ctrl/lphaser.c +++ b/src/emu/bus/sms_ctrl/lphaser.c @@ -38,15 +38,15 @@ INPUT_CHANGED_MEMBER( sms_light_phaser_device::position_changed ) static INPUT_PORTS_START( sms_light_phaser ) PORT_START("CTRL_PORT") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_DEVICE // TL (trigger) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_DEVICE PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_light_phaser_device, th_pin_r, NULL) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL (trigger) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_light_phaser_device, th_pin_r, NULL) PORT_BIT( 0x9f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("LPHASER_X") - PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_X) PORT_DEVICE PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_light_phaser_device, position_changed, 0) + PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_light_phaser_device, position_changed, 0) PORT_START("LPHASER_Y") - PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_Y) PORT_DEVICE PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_light_phaser_device, position_changed, 0) + PORT_BIT( 0xff, 0x00, IPT_LIGHTGUN_Y) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(15) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_light_phaser_device, position_changed, 0) INPUT_PORTS_END diff --git a/src/emu/bus/sms_ctrl/paddle.c b/src/emu/bus/sms_ctrl/paddle.c index 176c537a02f..affe7456ab3 100644 --- a/src/emu/bus/sms_ctrl/paddle.c +++ b/src/emu/bus/sms_ctrl/paddle.c @@ -42,14 +42,14 @@ CUSTOM_INPUT_MEMBER( sms_paddle_device::tr_pin_r ) static INPUT_PORTS_START( sms_paddle ) PORT_START("CTRL_PORT") - PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_DEVICE PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_paddle_device, dir_pins_r, NULL) // Directional pins + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_paddle_device, dir_pins_r, NULL) // Directional pins PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_DEVICE // TL + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_DEVICE PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_paddle_device, tr_pin_r, NULL) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_paddle_device, tr_pin_r, NULL) PORT_START("PADDLE_X") // Paddle knob - PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_DEVICE PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) + PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255) INPUT_PORTS_END diff --git a/src/emu/bus/sms_ctrl/rfu.c b/src/emu/bus/sms_ctrl/rfu.c index d00376f0b37..c04ca1f8a84 100644 --- a/src/emu/bus/sms_ctrl/rfu.c +++ b/src/emu/bus/sms_ctrl/rfu.c @@ -23,7 +23,7 @@ const device_type SMS_RAPID_FIRE = &device_creator<sms_rapid_fire_device>; static INPUT_PORTS_START( sms_rapid_fire ) PORT_START("rfu_sw") // Rapid Fire Unit switches - PORT_CONFNAME( 0x03, 0x00, "Rapid Fire Unit" ) PORT_DEVICE + PORT_CONFNAME( 0x03, 0x00, "Rapid Fire Unit" ) PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) PORT_CONFSETTING( 0x01, "Button 1" ) PORT_CONFSETTING( 0x02, "Button 2" ) diff --git a/src/emu/bus/sms_ctrl/sports.c b/src/emu/bus/sms_ctrl/sports.c index a173f2d8ca4..81bf836dd8e 100644 --- a/src/emu/bus/sms_ctrl/sports.c +++ b/src/emu/bus/sms_ctrl/sports.c @@ -71,24 +71,24 @@ INPUT_CHANGED_MEMBER( sms_sports_pad_device::th_pin_w ) static INPUT_PORTS_START( sms_sports_pad ) PORT_START("SPORTS_IN") - PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_DEVICE PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_device, dir_pins_r, NULL) // Directional pins + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_device, dir_pins_r, NULL) // Directional pins PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_DEVICE // TL (Button 1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_DEVICE PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_r, NULL) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_DEVICE // TR (Button 2) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL (Button 1) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_r, NULL) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) // TR (Button 2) PORT_START("SPORTS_OUT") PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) // Directional pins PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // TL (Button 1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_DEVICE PORT_CHANGED_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_w, NULL) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_CHANGED_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_w, NULL) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) // TR (Button 2) PORT_START("SPORTS_X") /* Sports Pad X axis */ - PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_DEVICE PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE + PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE PORT_START("SPORTS_Y") /* Sports Pad Y axis */ - PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_DEVICE PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE + PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_RESET PORT_REVERSE INPUT_PORTS_END diff --git a/src/emu/bus/sms_ctrl/sportsjp.c b/src/emu/bus/sms_ctrl/sportsjp.c index 30333604cc1..4fc166ccd3d 100644 --- a/src/emu/bus/sms_ctrl/sportsjp.c +++ b/src/emu/bus/sms_ctrl/sportsjp.c @@ -53,17 +53,17 @@ DECLARE_CUSTOM_INPUT_MEMBER( sms_sports_pad_jp_device::dir_pins_r ) static INPUT_PORTS_START( sms_sports_pad_jp ) PORT_START("SPORTS_JP_IN") - PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_DEVICE PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_jp_device, dir_pins_r, NULL) // Directional pins + PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_jp_device, dir_pins_r, NULL) // Directional pins PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_DEVICE // TL (Button 1) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL (Button 1) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_DEVICE // TR (Button 2) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) // TR (Button 2) PORT_START("SPORTS_JP_X") /* Sports Pad X axis */ - PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_DEVICE PORT_SENSITIVITY(50) PORT_KEYDELTA(40) + PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) PORT_START("SPORTS_JP_Y") /* Sports Pad Y axis */ - PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_DEVICE PORT_SENSITIVITY(50) PORT_KEYDELTA(40) + PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(40) INPUT_PORTS_END diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 831c5232d60..eeb8d5c7ca1 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -996,11 +996,10 @@ class ioport_field static const int FIELD_FLAG_COCKTAIL = 0x0002; // set if this field is relevant only for cocktail cabinets static const int FIELD_FLAG_TOGGLE = 0x0004; // set if this field should behave as a toggle static const int FIELD_FLAG_ROTATED = 0x0008; // set if this field represents a rotated control - static const int FIELD_FLAG_DEVICE = 0x0010; // set if this field is used only in a device - static const int ANALOG_FLAG_REVERSE = 0x0020; // analog only: reverse the sense of the axis - static const int ANALOG_FLAG_RESET = 0x0040; // analog only: always preload in->default for relative axes, returning only deltas - static const int ANALOG_FLAG_WRAPS = 0x0080; // analog only: positional count wraps around - static const int ANALOG_FLAG_INVERT = 0x0100; // analog only: bitwise invert bits + static const int ANALOG_FLAG_REVERSE = 0x0010; // analog only: reverse the sense of the axis + static const int ANALOG_FLAG_RESET = 0x0020; // analog only: always preload in->default for relative axes, returning only deltas + static const int ANALOG_FLAG_WRAPS = 0x0040; // analog only: positional count wraps around + static const int ANALOG_FLAG_INVERT = 0x0080; // analog only: bitwise invert bits public: // construction/destruction @@ -1028,7 +1027,6 @@ public: bool cocktail() const { return ((m_flags & FIELD_FLAG_COCKTAIL) != 0); } bool toggle() const { return ((m_flags & FIELD_FLAG_TOGGLE) != 0); } bool rotated() const { return ((m_flags & FIELD_FLAG_ROTATED) != 0); } - bool used_in_device() const { return ((m_flags & FIELD_FLAG_DEVICE) != 0); } bool analog_reverse() const { return ((m_flags & ANALOG_FLAG_REVERSE) != 0); } bool analog_reset() const { return ((m_flags & ANALOG_FLAG_RESET) != 0); } bool analog_wraps() const { return ((m_flags & ANALOG_FLAG_WRAPS) != 0); } @@ -1491,7 +1489,6 @@ public: void field_set_way(int way) const { m_curfield->m_way = way; } void field_set_rotated() const { m_curfield->m_flags |= ioport_field::FIELD_FLAG_ROTATED; } void field_set_name(const char *name) const { m_curfield->m_name = string_from_token(name); } - void field_set_device() const { m_curfield->m_flags |= ioport_field::FIELD_FLAG_DEVICE; } void field_set_player(int player) const { m_curfield->m_player = player - 1; } void field_set_cocktail() const { m_curfield->m_flags |= ioport_field::FIELD_FLAG_COCKTAIL; field_set_player(2); } void field_set_toggle() const { m_curfield->m_flags |= ioport_field::FIELD_FLAG_TOGGLE; } @@ -1627,9 +1624,6 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, a #define PORT_NAME(_name) \ configurer.field_set_name(_name); -#define PORT_DEVICE \ - configurer.field_set_device(); - #define PORT_PLAYER(_player) \ configurer.field_set_player(_player); diff --git a/src/emu/ui/miscmenu.c b/src/emu/ui/miscmenu.c index b304a7f47a6..365cc281f47 100644 --- a/src/emu/ui/miscmenu.c +++ b/src/emu/ui/miscmenu.c @@ -561,11 +561,15 @@ void ui_menu_input_specific::populate() ((field->type() == IPT_OTHER && field->name() != NULL) || machine().ioport().type_group(field->type(), field->player()) != IPG_INVALID)) { input_seq_type seqtype; - UINT16 sortorder; + UINT32 sortorder; /* determine the sorting order */ if (field->type() >= IPT_START1 && field->type() < IPT_ANALOG_LAST) + { sortorder = (field->type() << 2) | (field->player() << 12); + if (strcmp(field->device().tag(), ":")) + sortorder |= 0x10000; + } else sortorder = field->type() | 0xf000; @@ -584,7 +588,7 @@ void ui_menu_input_specific::populate() item->sortorder = sortorder + suborder[seqtype]; item->type = field->is_analog() ? (INPUT_TYPE_ANALOG + seqtype) : INPUT_TYPE_DIGITAL; item->name = name; - item->owner_name = field->used_in_device() ? (field->device().tag() + 1) : NULL; + item->owner_name = field->device().tag(); item->next = itemlist; itemlist = item; @@ -762,8 +766,10 @@ void ui_menu_input::populate_and_sort(input_item_data *itemlist) const char *nameformat[INPUT_TYPE_TOTAL] = { 0 }; input_item_data **itemarray, *item; int numitems = 0, curitem; - astring subtext; astring text; + astring subtext; + astring prev_owner; + bool first_entry = true; /* create a mini lookup table for name format based on type */ nameformat[INPUT_TYPE_DIGITAL] = "%s"; @@ -791,13 +797,19 @@ void ui_menu_input::populate_and_sort(input_item_data *itemlist) /* generate the name of the item itself, based off the base name and the type */ item = itemarray[curitem]; assert(nameformat[item->type] != NULL); - if (item->owner_name) + + if (strcmp(item->owner_name, prev_owner.cstr()) != 0) { - text.printf("[%s] ", item->owner_name); - text.catprintf(nameformat[item->type], item->name); + if (first_entry) + first_entry = false; + else + item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); + text.printf("[root%s]", item->owner_name); + item_append(text, NULL, 0, NULL); + prev_owner.cpy(item->owner_name); } - else - text.printf(nameformat[item->type], item->name); + + text.printf(nameformat[item->type], item->name); /* if we're polling this item, use some spaces with left/right arrows */ if (pollingref == item->ref) @@ -917,6 +929,8 @@ void ui_menu_settings::populate() ioport_field *field; ioport_port *port; dip_descriptor **diplist_tailptr; + astring prev_owner; + bool first_entry = true; /* reset the dip switch tracking */ dipcount = 0; @@ -938,12 +952,20 @@ void ui_menu_settings::populate() flags |= MENU_FLAG_RIGHT_ARROW; /* add the menu item */ - if (field->used_in_device()) - name.cpy("[").cat(field->device().tag() + 1).cat("] ").cat(field->name()); - else - name.cpy(field->name()); + if (strcmp(field->device().tag(), prev_owner.cstr()) != 0) + { + if (first_entry) + first_entry = false; + else + item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); + name.printf("[root%s]", field->device().tag()); + item_append(name, NULL, 0, NULL); + prev_owner.cpy(field->device().tag()); + } - item_append(name.cstr(), field->setting_name(), flags, (void *)field); + name.cpy(field->name()); + + item_append(name, field->setting_name(), flags, (void *)field); /* for DIP switches, build up the model */ if (type == IPT_DIPSWITCH && field->first_diplocation() != NULL) @@ -1187,8 +1209,10 @@ void ui_menu_analog::populate() { ioport_field *field; ioport_port *port; - astring subtext; astring text; + astring subtext; + astring prev_owner; + bool first_entry = true; /* loop over input ports and add the items */ for (port = machine().ioport().first_port(); port != NULL; port = port->next()) @@ -1232,10 +1256,18 @@ void ui_menu_analog::populate() analog_item_data *data; UINT32 flags = 0; astring name; - if (field->used_in_device()) - name.cpy("[").cat(field->device().tag() + 1).cat("] ").cat(field->name()); - else - name.cpy(field->name()); + if (strcmp(field->device().tag(), prev_owner.cstr()) != 0) + { + if (first_entry) + first_entry = false; + else + item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); + name.printf("[root%s]", field->device().tag()); + item_append(name, NULL, 0, NULL); + prev_owner.cpy(field->device().tag()); + } + + name.cpy(field->name()); /* allocate a data item for tracking what this menu item refers to */ data = (analog_item_data *)m_pool_alloc(sizeof(*data)); diff --git a/src/emu/ui/miscmenu.h b/src/emu/ui/miscmenu.h index 717236335b9..a0dfbb003d1 100644 --- a/src/emu/ui/miscmenu.h +++ b/src/emu/ui/miscmenu.h @@ -82,7 +82,7 @@ protected: const input_seq * defseq; /* pointer to the default sequence */ const char * name; /* pointer to the base name of the item */ const char * owner_name; /* pointer to the name of the owner of the item */ - UINT16 sortorder; /* sorting information */ + UINT32 sortorder; /* sorting information */ UINT8 type; /* type of port */ }; |