PORT_CUSTOM simplification (nw)

- Remove both arguments from CUSTOM_INPUT_MEMBER (adding template parameters as necessary)
- Remove 'param' from PORT_CUSTOM_MEMBER and assume 'device' is DEVICE_SELF (use PORT_CUSTOM_DEVICE_MEMBER if it isn't)
- Replace PORT_CUSTOM_MEMBER with PORT_READ_LINE_MEMBER where applicable

Add implicit DEVICE_SELF variants of PORT_READ_LINE_DEVICE_MEMBER and PORT_WRITE_LINE_DEVICE_MEMBER (nw)

Remove ioport_field argument from PORT_CROSSHAIR_MAPPER (nw)

captflag, gmgalax: Separate driver classes from base (nw)
This commit is contained in:
AJR 2019-09-14 15:27:30 -04:00
parent 2f39181ac1
commit 6fab769298
305 changed files with 1734 additions and 1692 deletions

View File

@ -112,7 +112,7 @@ public:
m_mcu->pa_w(machine().dummy_space(), 0, m_meta->read());
}
CUSTOM_INPUT_MEMBER(kdat_r)
READ_LINE_MEMBER(kdat_r)
{
return m_kdat_in ^ 0x01U;
}
@ -128,7 +128,7 @@ public:
return (result >> 2) ^ 0x3fU;
}
CUSTOM_INPUT_MEMBER(reset_r)
READ_LINE_MEMBER(reset_r)
{
return m_ctrl_a_a;
}
@ -414,17 +414,17 @@ protected:
INPUT_PORTS_START(fullsize_cols)
PORT_START("COLS")
PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, cols_r, nullptr)
PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(mitsumi_keyboard_base, cols_r)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, kdat_r, nullptr)
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(mitsumi_keyboard_base, kdat_r)
INPUT_PORTS_END
INPUT_PORTS_START(compact_cols)
PORT_START("COLS")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, reset_r, nullptr)
PORT_BIT(0x7c, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, cols_r, nullptr)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(mitsumi_keyboard_base, reset_r)
PORT_BIT(0x7c, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(mitsumi_keyboard_base, cols_r)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, kdat_r, nullptr)
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(mitsumi_keyboard_base, kdat_r)
INPUT_PORTS_END
INPUT_PORTS_START(mitsumi_meta)

View File

@ -50,7 +50,7 @@ static INPUT_PORTS_START( coleco_hand_controller )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_START("COMMON1")
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, coleco_hand_controller_device, keypad_r, nullptr)
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(coleco_hand_controller_device, keypad_r)
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )

View File

@ -57,7 +57,7 @@ static INPUT_PORTS_START( coleco_super_action_controller )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_START("COMMON1")
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, coleco_super_action_controller_device, keypad_r, nullptr)
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(coleco_super_action_controller_device, keypad_r)
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )

View File

@ -60,11 +60,11 @@ READ_LINE_MEMBER( sms_paddle_device::tr_pin_r )
static INPUT_PORTS_START( sms_paddle )
PORT_START("CTRL_PORT")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_paddle_device, rldu_pins_r, nullptr) // R,L,D,U
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sms_paddle_device, rldu_pins_r) // R,L,D,U
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
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_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER( DEVICE_SELF, sms_paddle_device, tr_pin_r ) // TR
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sms_paddle_device, tr_pin_r) // TR
PORT_START("PADDLE_X") // Paddle knob
PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255)

View File

@ -120,17 +120,17 @@ CUSTOM_INPUT_MEMBER( sms_sports_pad_device::rldu_pins_r )
static INPUT_PORTS_START( sms_sports_pad )
PORT_START("SPORTS_IN")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_device, rldu_pins_r, nullptr) // R,L,D,U
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sms_sports_pad_device, rldu_pins_r) // R,L,D,U
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL (Button 1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_r) // TH
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sms_sports_pad_device, th_pin_r) // TH
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_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_w) // TH
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(sms_sports_pad_device, th_pin_w) // TH
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) // TR (Button 2)
PORT_START("SPORTS_X") /* Sports Pad X axis */

View File

@ -65,11 +65,11 @@ CUSTOM_INPUT_MEMBER( sms_sports_pad_jp_device::rldu_pins_r ) { return ~(m_rldu_p
static INPUT_PORTS_START( sms_sports_pad_jp )
PORT_START("SPORTS_JP_IN")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_jp_device, rldu_pins_r, nullptr) // R,L,D,U
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sms_sports_pad_jp_device, rldu_pins_r) // R,L,D,U
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER( DEVICE_SELF, sms_sports_pad_jp_device, tl_pin_r ) // TL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sms_sports_pad_jp_device, tl_pin_r) // TL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER( DEVICE_SELF, sms_sports_pad_jp_device, tr_pin_r ) // TR
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sms_sports_pad_jp_device, tr_pin_r) // TR
PORT_START("SPORTS_JP_BT") /* Sports Pad buttons nibble */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )

View File

@ -730,7 +730,7 @@ static INPUT_PORTS_START( sensorboard )
PORT_START("UI")
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1, NOTEQUALS, 0) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("Modifier 2 / Force Sensor") // hold while clicking to force sensor (ignore piece)
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1, NOTEQUALS, 0) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_NAME("Modifier 1 / Force Piece") // hold while clicking to force piece (ignore sensor)
PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_sensor_busy, nullptr) // check if any sensor is busy / pressed (read-only)
PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sensorboard_device, check_sensor_busy) // check if any sensor is busy / pressed (read-only)
PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_hand, 0) PORT_NAME("Remove Piece")
PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 0) PORT_NAME("Undo Buffer First")
PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 1) PORT_NAME("Undo Buffer Previous")
@ -740,13 +740,13 @@ static INPUT_PORTS_START( sensorboard )
PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_init, 1) PORT_NAME("Board Reset")
PORT_START("BS_CHECK") // board size (internal use)
PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_bs_mask, nullptr)
PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sensorboard_device, check_bs_mask)
PORT_START("SS_CHECK") // spawn size (internal use)
PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_ss_mask, nullptr)
PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sensorboard_device, check_ss_mask)
PORT_START("UI_CHECK") // UI enabled (internal use)
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_ui_enabled, nullptr)
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sensorboard_device, check_ui_enabled)
INPUT_PORTS_END
ioport_constructor sensorboard_device::device_input_ports() const

View File

@ -597,7 +597,6 @@ ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value def
m_flags(0),
m_impulse(0),
m_name(name),
m_read_param(nullptr),
m_write_param(0),
m_digital_value(false),
m_min(0),
@ -1210,7 +1209,7 @@ void ioport_field::crosshair_position(float &x, float &y, bool &gotx, bool &goty
// apply custom mapping if necessary
if (!m_crosshair_mapper.isnull())
value = m_crosshair_mapper(*this, value);
value = m_crosshair_mapper(value);
// handle X axis
if (m_crosshair_axis == CROSSHAIR_AXIS_X)
@ -3189,7 +3188,7 @@ void dynamic_field::read(ioport_value &result)
return;
// call the callback to read a new value
ioport_value newval = m_field.m_read(m_field, m_field.m_read_param);
ioport_value newval = m_field.m_read();
m_oldval = newval;
// merge in the bits (don't invert yet, as all digitals are inverted together)

View File

@ -653,9 +653,9 @@ enum
typedef void(*ioport_constructor)(device_t &owner, ioport_list &portlist, std::string &errorbuf);
// I/O port callback function delegates
typedef device_delegate<ioport_value (ioport_field &, void *)> ioport_field_read_delegate;
typedef device_delegate<ioport_value ()> ioport_field_read_delegate;
typedef device_delegate<void (ioport_field &, u32, ioport_value, ioport_value)> ioport_field_write_delegate;
typedef device_delegate<float (ioport_field &, float)> ioport_field_crossmap_delegate;
typedef device_delegate<float (float)> ioport_field_crossmap_delegate;
// ======================> inp_header
@ -1128,7 +1128,6 @@ private:
const char * m_name; // user-friendly name to display
input_seq m_seq[SEQ_TYPE_TOTAL];// sequences of all types
ioport_field_read_delegate m_read; // read callback routine
void * m_read_param; // parameter for read callback routine
ioport_field_write_delegate m_write; // write callback routine
u32 m_write_param; // parameter for write callback routine
@ -1525,7 +1524,7 @@ public:
ioport_configurer& field_set_analog_wraps() { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_WRAPS; return *this; }
ioport_configurer& field_set_remap_table(const ioport_value *table) { m_curfield->m_remap_table = table; return *this; }
ioport_configurer& field_set_analog_invert() { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_INVERT; return *this; }
ioport_configurer& field_set_dynamic_read(ioport_field_read_delegate delegate, void *param = nullptr) { m_curfield->m_read = delegate; m_curfield->m_read_param = param; return *this; }
ioport_configurer& field_set_dynamic_read(ioport_field_read_delegate delegate) { m_curfield->m_read = delegate; return *this; }
ioport_configurer& field_set_dynamic_write(ioport_field_write_delegate delegate, u32 param = 0) { m_curfield->m_write = delegate; m_curfield->m_write_param = param; return *this; }
ioport_configurer& field_set_diplocation(const char *location) { m_curfield->expand_diplocation(location, m_errorbuf); return *this; }
@ -1556,16 +1555,16 @@ private:
#define UCHAR_MAMEKEY(code) (UCHAR_MAMEKEY_BEGIN + ITEM_ID_##code)
// macro for a read callback function (PORT_CUSTOM)
#define CUSTOM_INPUT_MEMBER(name) ioport_value name(ioport_field &field, void *param)
#define DECLARE_CUSTOM_INPUT_MEMBER(name) ioport_value name(ioport_field &field, void *param)
#define CUSTOM_INPUT_MEMBER(name) ioport_value name()
#define DECLARE_CUSTOM_INPUT_MEMBER(name) ioport_value name()
// macro for port write callback functions (PORT_CHANGED)
#define INPUT_CHANGED_MEMBER(name) void name(ioport_field &field, u32 param, ioport_value oldval, ioport_value newval)
#define DECLARE_INPUT_CHANGED_MEMBER(name) void name(ioport_field &field, u32 param, ioport_value oldval, ioport_value newval)
// macro for port changed callback functions (PORT_CROSSHAIR_MAPPER)
#define CROSSHAIR_MAPPER_MEMBER(name) float name(ioport_field &field, float linear_value)
#define DECLARE_CROSSHAIR_MAPPER_MEMBER(name) float name(ioport_field &field, float linear_value)
#define CROSSHAIR_MAPPER_MEMBER(name) float name(float linear_value)
#define DECLARE_CROSSHAIR_MAPPER_MEMBER(name) float name(float linear_value)
// macro for wrapping a default string
#define DEF_STR(str_num) ((const char *)INPUT_STRING_##str_num)
@ -1710,18 +1709,24 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s
configurer.field_set_analog_invert();
// read callbacks
#define PORT_CUSTOM_MEMBER(_device, _class, _member, _param) \
configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)nullptr), (void *)(_param));
#define PORT_CUSTOM_MEMBER(_class, _member) \
configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, DEVICE_SELF, (_class *)nullptr));
#define PORT_CUSTOM_DEVICE_MEMBER(_device, _class, _member) \
configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)nullptr));
// write callbacks
#define PORT_CHANGED_MEMBER(_device, _class, _member, _param) \
configurer.field_set_dynamic_write(ioport_field_write_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)nullptr), (_param));
// input device handler
#define PORT_READ_LINE_MEMBER(_class, _member) \
configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device)->ioport_value { return (device._member() & 1) ? ~ioport_value(0) : 0; } , #_class "::" #_member, DEVICE_SELF, (_class *)nullptr));
#define PORT_READ_LINE_DEVICE_MEMBER(_device, _class, _member) \
configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device, ioport_field &field, void *param)->ioport_value { return (device._member() & 1) ? ~ioport_value(0) : 0; } , #_class "::" #_member, _device, (_class *)nullptr));
configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device)->ioport_value { return (device._member() & 1) ? ~ioport_value(0) : 0; } , #_class "::" #_member, _device, (_class *)nullptr));
// output device handler
#define PORT_WRITE_LINE_MEMBER(_class, _member) \
configurer.field_set_dynamic_write(ioport_field_write_delegate([](_class &device, ioport_field &field, u32 param, ioport_value oldval, ioport_value newval) { device._member(newval); }, #_class "::" #_member, DEVICE_SELF, (_class *)nullptr));
#define PORT_WRITE_LINE_DEVICE_MEMBER(_device, _class, _member) \
configurer.field_set_dynamic_write(ioport_field_write_delegate([](_class &device, ioport_field &field, u32 param, ioport_value oldval, ioport_value newval) { device._member(newval); }, #_class "::" #_member, _device, (_class *)nullptr));

View File

@ -647,7 +647,7 @@ INPUT_PORTS_START( gottlieb_sound_r2 )
PORT_DIPNAME( 0x40, 0x40, "Sound Test" ) PORT_DIPLOCATION("SB2:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_sound_r2_device, speech_drq_custom_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_sound_r2_device, speech_drq_custom_r)
INPUT_PORTS_END

View File

@ -319,9 +319,9 @@ void snk6502_sound_device::set_music_clock(double clock_time)
m_tone_clock = 0;
}
CUSTOM_INPUT_MEMBER(snk6502_sound_device::music0_playing)
READ_LINE_MEMBER(snk6502_sound_device::music0_playing)
{
return m_tone_channels[0].mute ? 0x01 : 0x00;
return m_tone_channels[0].mute ? 1 : 0;
}
void snk6502_sound_device::set_channel_base(int channel, int base, int mask)

View File

@ -19,7 +19,7 @@ class snk6502_sound_device : public device_t, public device_sound_interface
public:
snk6502_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_CUSTOM_INPUT_MEMBER(music0_playing);
DECLARE_READ_LINE_MEMBER(music0_playing);
void set_music_freq(int freq);
void set_music_clock(double clock_time);

View File

@ -245,7 +245,7 @@ static INPUT_PORTS_START( sicv )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2")
@ -260,7 +260,7 @@ static INPUT_PORTS_START( sicv )
PORT_DIPSETTING( 0x00, "1500" )
/* SW1:5,6,7: In OFF, PL2 can have no control of joystick, going auto left/right and other problems like no laser gun.
Be sure these are always ON */
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr) PORT_DIPLOCATION("SW1:5,6,7") /* Labeled as "FACTORY" */
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r) PORT_DIPLOCATION("SW1:5,6,7") // Labeled as "FACTORY"
PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@ -318,7 +318,7 @@ static INPUT_PORTS_START( alieninv )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
@ -330,7 +330,7 @@ static INPUT_PORTS_START( alieninv )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_DIPLOCATION("SW1:3") /* Pence Coin */
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW1:4" ) /* Not bonus */
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr) PORT_DIPLOCATION("SW1:5,6,7")
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r) PORT_DIPLOCATION("SW1:5,6,7")
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x00, "2C/1C 50p/3C (+ Bonus Life)" )
PORT_DIPSETTING( 0x80, "1C/1C 50p/5C" )
@ -1722,7 +1722,7 @@ void _8080bw_state::crashrd(machine_config &config)
/* */
/*******************************************************/
CUSTOM_INPUT_MEMBER(_8080bw_state::sflush_80_r)
READ_LINE_MEMBER(_8080bw_state::sflush_80_r)
{
return (m_screen->vpos() & 0x80) ? 1 : 0;
}
@ -1775,7 +1775,7 @@ static INPUT_PORTS_START( sflush )
PORT_DIPNAME( 0x40, 0x00, "Coinage Display" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, _8080bw_state,sflush_80_r, nullptr) // 128V?
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(_8080bw_state, sflush_80_r) // 128V?
PORT_START("PADDLE")
PORT_BIT( 0xff, 0x6a, IPT_PADDLE ) PORT_MINMAX(0x16,0xbf) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_CENTERDELTA(0)
@ -2249,7 +2249,7 @@ static INPUT_PORTS_START( yosakdon )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN1")
@ -2264,7 +2264,7 @@ static INPUT_PORTS_START( yosakdon )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
/* Dummy controls port, P1 */
@ -3173,7 +3173,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(_8080bw_state::claybust_gun_callback)
m_claybust_gun_pos = 0;
}
CUSTOM_INPUT_MEMBER(_8080bw_state::claybust_gun_on_r)
READ_LINE_MEMBER(_8080bw_state::claybust_gun_on_r)
{
return (m_claybust_gun_pos != 0) ? 1 : 0;
}
@ -3231,7 +3231,7 @@ void _8080bw_state::claybust_io_map(address_map &map)
static INPUT_PORTS_START( claybust )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, _8080bw_state, claybust_gun_on_r, nullptr)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(_8080bw_state, claybust_gun_on_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(2) PORT_CHANGED_MEMBER(DEVICE_SELF, _8080bw_state, claybust_gun_trigger, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
@ -3323,7 +3323,7 @@ static INPUT_PORTS_START( galactic )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2")
@ -3338,7 +3338,7 @@ static INPUT_PORTS_START( galactic )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x08, "6" )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* Dummy controls port, P1 */
@ -3446,17 +3446,17 @@ static INPUT_PORTS_START( invmulti )
/* same as Midway Space Invaders, except that SW is unused */
PORT_START("IN0")
PORT_DIPUNUSED_DIPLOC( 0x01, 0x00, "SW:8" )
PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw6_sw7_r, nullptr)
PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_sw6_sw7_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in0_control_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw5_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in0_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_sw5_r)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, nullptr)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_coin_input_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN2")
@ -3464,7 +3464,7 @@ static INPUT_PORTS_START( invmulti )
PORT_DIPUNUSED_DIPLOC( 0x02, 0x00, "SW:4" )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPUNUSED_DIPLOC( 0x08, 0x00, "SW:2" )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r)
PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW:1" )
/* fake port for reading the coin input */

View File

@ -43,9 +43,9 @@ public:
void init_sidewndr();
DECLARE_CUSTOM_INPUT_MEMBER(sidewndr_payout_r);
DECLARE_CUSTOM_INPUT_MEMBER(starspnr_coinage_r);
DECLARE_CUSTOM_INPUT_MEMBER(starspnr_payout_r);
template <int Mask> DECLARE_READ_LINE_MEMBER(sidewndr_payout_r);
template <int Mask> DECLARE_READ_LINE_MEMBER(starspnr_coinage_r);
template <int Mask> DECLARE_READ_LINE_MEMBER(starspnr_payout_r);
protected:
enum
@ -229,56 +229,53 @@ uint32_t acefruit_state::screen_update_acefruit(screen_device &screen, bitmap_in
return 0;
}
CUSTOM_INPUT_MEMBER(acefruit_state::sidewndr_payout_r)
template <int Mask>
READ_LINE_MEMBER(acefruit_state::sidewndr_payout_r)
{
int bit_mask = (uintptr_t)param;
switch (bit_mask)
switch (Mask)
{
case 0x01:
return ((m_port_payout->read() & bit_mask) >> 0);
return ((m_port_payout->read() & Mask) >> 0);
case 0x02:
return ((m_port_payout->read() & bit_mask) >> 1);
return ((m_port_payout->read() & Mask) >> 1);
default:
logerror("sidewndr_payout_r : invalid %02X bit_mask\n",bit_mask);
logerror("sidewndr_payout_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_coinage_r)
template <int Mask>
READ_LINE_MEMBER(acefruit_state::starspnr_coinage_r)
{
int bit_mask = (uintptr_t)param;
switch (bit_mask)
switch (Mask)
{
case 0x01:
return ((m_port_coinage->read() & bit_mask) >> 0);
return ((m_port_coinage->read() & Mask) >> 0);
case 0x02:
return ((m_port_coinage->read() & bit_mask) >> 1);
return ((m_port_coinage->read() & Mask) >> 1);
case 0x04:
return ((m_port_coinage->read() & bit_mask) >> 2);
return ((m_port_coinage->read() & Mask) >> 2);
case 0x08:
return ((m_port_coinage->read() & bit_mask) >> 3);
return ((m_port_coinage->read() & Mask) >> 3);
default:
logerror("starspnr_coinage_r : invalid %02X bit_mask\n",bit_mask);
logerror("starspnr_coinage_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_payout_r)
template <int Mask>
READ_LINE_MEMBER(acefruit_state::starspnr_payout_r)
{
int bit_mask = (uintptr_t)param;
switch (bit_mask)
switch (Mask)
{
case 0x01:
return ((m_port_payout->read() & bit_mask) >> 0);
return ((m_port_payout->read() & Mask) >> 0);
case 0x02:
return ((m_port_payout->read() & bit_mask) >> 1);
return ((m_port_payout->read() & Mask) >> 1);
case 0x04:
return ((m_port_payout->read() & bit_mask) >> 2);
return ((m_port_payout->read() & Mask) >> 2);
default:
logerror("starspnr_payout_r : invalid %02X bit_mask\n",bit_mask);
logerror("starspnr_payout_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@ -383,14 +380,14 @@ static INPUT_PORTS_START( sidewndr )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME( "Cancel/Clear" )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME( "Refill" ) PORT_TOGGLE
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) /* "Token in" - also "Refill" when "Refill" mode ON */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,sidewndr_payout_r, (void *)0x01)
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, sidewndr_payout_r<0x01>)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN3") // 3
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME( "Hold/Nudge 1" )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME( "Accountancy System" ) PORT_TOGGLE
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN4 ) /* "50P in" */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,sidewndr_payout_r, (void *)0x02)
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, sidewndr_payout_r<0x02>)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN4") // 4
@ -497,7 +494,7 @@ static INPUT_PORTS_START( starspnr )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Collect/Cancel" )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
/* tested at 0xeed7 with IN1 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x08) /* to be confirmed */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_coinage_r<0x08>) /* to be confirmed */
PORT_START("IN2") // 2
/* tested at 0xe83c */
@ -507,7 +504,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xef82 after IN5 bit 1 and after IN1 bit 3 - after coins are tested - table at 0xefa8 (3 bytes) */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0xeeba with IN3 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x02) /* to be confirmed */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_coinage_r<0x02>) /* to be confirmed */
/* tested at 0x1b0f */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -516,7 +513,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xe8ea and 0xecbe */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0xeeba with IN2 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x01) /* to be confirmed */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_coinage_r<0x01>) /* to be confirmed */
/* tested at 0x0178 */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -527,7 +524,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xed86 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0xeed7 with IN1 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x04) /* to be confirmed */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_coinage_r<0x04>) /* to be confirmed */
PORT_START("IN5") // 5
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME( "Hold 3" )
@ -536,7 +533,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xec6f */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0x1d60 with IN6 bit 3 and IN7 bit 3 - table at 0x1d90 (8 * 3 bytes) */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_payout_r, (void *)0x01) /* to be confirmed */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_payout_r<0x01>) /* to be confirmed */
/* tested at 0xe312 and 0xe377 */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -545,7 +542,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xee42, 0xee5e and 0xeff5 before IN1 bit 0 - invalid code after 0xf000 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0x1d60 with IN5 bit 3 and IN7 bit 3 - table at 0x1d90 (8 * 3 bytes) */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_payout_r, (void *)0x02) /* to be confirmed */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_payout_r<0x02>) /* to be confirmed */
/* tested at 0xe8dd and 0xec1c */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -557,7 +554,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xedcb */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0x1d60 with IN5 bit 3 and IN6 bit 3 - table at 0x1d90 (8 * 3 bytes) */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_payout_r, (void *)0x04) /* to be confirmed */
PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_payout_r<0x04>) /* to be confirmed */
/* tested at 0xec2a */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )

View File

@ -411,7 +411,7 @@ static INPUT_PORTS_START( ggm )
PORT_CONFSETTING( 0x03, "Steinitz" )
PORT_START("IN.6")
PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, ggm_state, overlay_r, nullptr)
PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(ggm_state, overlay_r)
INPUT_PORTS_END

View File

@ -48,8 +48,8 @@ public:
{ }
DECLARE_CUSTOM_INPUT_MEMBER(lightgun_pos_r);
DECLARE_CUSTOM_INPUT_MEMBER(lightgun_trigger_r);
DECLARE_CUSTOM_INPUT_MEMBER(lightgun_holster_r);
DECLARE_READ_LINE_MEMBER(lightgun_trigger_r);
DECLARE_READ_LINE_MEMBER(lightgun_holster_r);
void init_aplatoon();
void init_palr3();
@ -155,14 +155,14 @@ CUSTOM_INPUT_MEMBER(alg_state::lightgun_pos_r)
}
CUSTOM_INPUT_MEMBER(alg_state::lightgun_trigger_r)
READ_LINE_MEMBER(alg_state::lightgun_trigger_r)
{
/* read the trigger control based on the input select */
return (m_triggers->read() >> m_input_select) & 1;
}
CUSTOM_INPUT_MEMBER(alg_state::lightgun_holster_r)
READ_LINE_MEMBER(alg_state::lightgun_holster_r)
{
/* read the holster control based on the input select */
return (m_triggers->read() >> (2 + m_input_select)) & 1;
@ -230,11 +230,11 @@ void alg_state::main_map_picmatic(address_map &map)
static INPUT_PORTS_START( alg )
PORT_START("joy_0_dat") /* read by Amiga core */
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, (void *)0)
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(alg_state, amiga_joystick_convert<0>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("joy_1_dat") /* read by Amiga core */
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, (void *)1)
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(alg_state, amiga_joystick_convert<1>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("potgo") /* read by Amiga core */
@ -245,7 +245,7 @@ static INPUT_PORTS_START( alg )
PORT_BIT( 0xaaff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("HVPOS") /* read by Amiga core */
PORT_BIT( 0x1ffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_pos_r, nullptr)
PORT_BIT( 0x1ffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(alg_state, lightgun_pos_r)
PORT_START("FIRE")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
@ -276,13 +276,13 @@ static INPUT_PORTS_START( alg_2p )
PORT_MODIFY("potgo")
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_trigger_r, nullptr)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(alg_state, lightgun_trigger_r)
PORT_MODIFY("FIRE")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_MODIFY("p2_joy")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_holster_r, nullptr)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(alg_state, lightgun_holster_r)
PORT_START("GUN2X") /* referenced by lightgun_pos_r */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)

View File

@ -552,7 +552,7 @@ public:
u16 handle_joystick_potgor(u16 potgor);
DECLARE_CUSTOM_INPUT_MEMBER( cd32_input );
DECLARE_CUSTOM_INPUT_MEMBER( cd32_sel_mirror_input );
template <int P> DECLARE_READ_LINE_MEMBER( cd32_sel_mirror_input );
void init_pal();
void init_ntsc();
@ -1146,9 +1146,10 @@ CUSTOM_INPUT_MEMBER( cd32_state::cd32_input )
return handle_joystick_potgor(m_potgo_value) >> 8;
}
CUSTOM_INPUT_MEMBER( cd32_state::cd32_sel_mirror_input )
template <int P>
READ_LINE_MEMBER( cd32_state::cd32_sel_mirror_input )
{
u8 bits = m_player_ports[(int)(uintptr_t)param]->read();
u8 bits = m_player_ports[P]->read();
return (bits & 0x20)>>5;
}
@ -1459,6 +1460,22 @@ void a4000_state::a4000t_mem(address_map &map)
// INPUTS
//**************************************************************************
template <int P>
CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert )
{
uint8_t bits = m_joy_ports[P].read_safe(0xff);
int up = (bits >> 0) & 1;
int down = (bits >> 1) & 1;
int left = (bits >> 2) & 1;
int right = (bits >> 3) & 1;
if (left) up ^= 1;
if (right) down ^= 1;
return down | (right << 1) | (up << 8) | (left << 9);
}
static INPUT_PORTS_START( amiga )
PORT_START("input")
PORT_CONFNAME(0x10, 0x00, "Game Port 0 Device")
@ -1469,16 +1486,16 @@ static INPUT_PORTS_START( amiga )
PORT_CONFSETTING(0x20, DEF_STR(Joystick) )
PORT_START("cia_0_port_a")
PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, floppy_drive_status, (void *)0)
PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(amiga_state, floppy_drive_status)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
PORT_START("joy_0_dat")
PORT_BIT(0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, amiga_joystick_convert, (void *)0)
PORT_BIT(0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(amiga_state, amiga_joystick_convert<0>)
PORT_BIT(0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("joy_1_dat")
PORT_BIT(0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, amiga_joystick_convert, (void *)1)
PORT_BIT(0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(amiga_state, amiga_joystick_convert<1>)
PORT_BIT(0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("potgo")
@ -1519,19 +1536,19 @@ INPUT_PORTS_START( cd32 )
PORT_MODIFY("cia_0_port_a")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_CUSTOM )
// this is the regular port for reading a single button joystick on the Amiga, many CD32 games require this to mirror the pad start button!
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state, cd32_sel_mirror_input, (void *)0)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state, cd32_sel_mirror_input, (void *)1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cd32_state, cd32_sel_mirror_input<0>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cd32_state, cd32_sel_mirror_input<1>)
PORT_MODIFY("joy_0_dat")
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, amiga_joystick_convert, (void *)0)
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(amiga_state, amiga_joystick_convert<0>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("joy_1_dat")
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, amiga_joystick_convert, (void *)1)
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(amiga_state, amiga_joystick_convert<1>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("potgo")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state, cd32_input, (void *)0)
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cd32_state, cd32_input)
PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED )
// CD32 '11' button pad (4 dpad directions + 7 buttons), not read directly

View File

@ -704,7 +704,7 @@ public:
INPUT_CHANGED_MEMBER(coin_start);
CUSTOM_INPUT_MEMBER(coin_r);
CUSTOM_INPUT_MEMBER(coin_usa_r);
CUSTOM_INPUT_MEMBER(hopper_r);
DECLARE_READ_LINE_MEMBER(hopper_r);
private:
DECLARE_WRITE32_MEMBER(Ns5w48);
@ -1213,7 +1213,7 @@ void aristmk5_state::aristmk5_drame_map(address_map &map)
}
CUSTOM_INPUT_MEMBER(aristmk5_state::hopper_r)
READ_LINE_MEMBER(aristmk5_state::hopper_r)
{
return (m_hopper_test && m_hopper->line_r()) ? 0 : 1;
}
@ -1388,7 +1388,7 @@ static INPUT_PORTS_START( aristmk5_usa )
PORT_BIT(0x00000080, IP_ACTIVE_HIGH, IPT_GAMBLE_DOOR) PORT_CODE(KEYCODE_C) PORT_TOGGLE PORT_NAME("Cashbox door")
PORT_START("P4")
PORT_BIT(0x00000078, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, aristmk5_state, coin_usa_r, nullptr)
PORT_BIT(0x00000078, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(aristmk5_state, coin_usa_r)
PORT_START("P5")
PORT_BIT(0x00000008, IP_ACTIVE_LOW, IPT_OTHER) // Meters
@ -1442,8 +1442,8 @@ static INPUT_PORTS_START( aristmk5 )
PORT_BIT(0x00c00000, IP_ACTIVE_HIGH, IPT_UNUSED) // Unused mechanical security switch
PORT_START("P3")
PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CUSTOM_MEMBER(DEVICE_SELF, aristmk5_state, hopper_r, nullptr)
PORT_BIT(0x000000f8, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, aristmk5_state, coin_r, nullptr)
PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_READ_LINE_MEMBER(aristmk5_state, hopper_r)
PORT_BIT(0x000000f8, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(aristmk5_state, coin_r)
PORT_START("P6")
PORT_BIT(0x00000002, IP_ACTIVE_LOW, IPT_OTHER) // Battery

View File

@ -1010,7 +1010,7 @@ static INPUT_PORTS_START( arkanoid )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arkanoid_state, arkanoid_semaphore_input_r, nullptr) // Z80 and MCU Semaphores
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arkanoid_state, arkanoid_semaphore_input_r) // Z80 and MCU Semaphores
PORT_START("SYSTEM2") // these are the secondary "RH" joystick ports for P1 and P2; the circuitry to read them is populated on the arkanoid PCB, but the game never actually reads these.
/*PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP )

View File

@ -89,7 +89,7 @@ public:
void init_argh();
DECLARE_WRITE16_MEMBER(arcadia_multibios_change_game);
DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r);
template <int Coin> DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_changed_callback);
DECLARE_WRITE8_MEMBER(arcadia_cia_0_portb_w);
@ -162,12 +162,11 @@ WRITE8_MEMBER(arcadia_amiga_state::arcadia_cia_0_portb_w)
*
*************************************/
template <int Coin>
CUSTOM_INPUT_MEMBER(arcadia_amiga_state::coin_counter_r)
{
int coin = (uintptr_t)param;
/* return coin counter values */
return m_coin_counter[coin] & 3;
return m_coin_counter[Coin] & 3;
}
@ -257,15 +256,15 @@ static INPUT_PORTS_START( arcadia )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,coin_counter_r, (void *)0)
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,coin_counter_r, (void *)1)
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arcadia_amiga_state, coin_counter_r<0>)
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arcadia_amiga_state, coin_counter_r<1>)
PORT_START("joy_0_dat")
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, (void *)0)
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arcadia_amiga_state, amiga_joystick_convert<0>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("joy_1_dat")
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, (void *)1)
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arcadia_amiga_state, amiga_joystick_convert<1>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("potgo")

View File

@ -371,7 +371,7 @@ void artmagic_state::stonebal_protection()
}
CUSTOM_INPUT_MEMBER(artmagic_state::prot_r)
READ_LINE_MEMBER(artmagic_state::prot_r)
{
return m_prot_output_bit;
}
@ -599,8 +599,8 @@ static INPUT_PORTS_START( cheesech )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("30000a")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, nullptr) /* protection data */
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* protection ready */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(artmagic_state, prot_r) // protection data
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_CUSTOM ) // protection ready
PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@ -791,8 +791,8 @@ static INPUT_PORTS_START( shtstar )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("3c000a")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, nullptr) /* protection data */
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* protection ready */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(artmagic_state, prot_r) // protection data
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_CUSTOM ) // protection ready
PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END

View File

@ -389,7 +389,7 @@ void asteroid_state::llander_map(address_map &map)
*
*************************************/
CUSTOM_INPUT_MEMBER(asteroid_state::clock_r)
READ_LINE_MEMBER(asteroid_state::clock_r)
{
return (m_maincpu->total_cycles() & 0x100) ? 1 : 0;
}
@ -398,8 +398,8 @@ static INPUT_PORTS_START( asteroid )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(asteroid_state, clock_r)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
@ -458,7 +458,7 @@ static INPUT_PORTS_START( asteroidb )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* Bit 7 is VG_HALT */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_MODIFY("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
@ -495,9 +495,9 @@ static INPUT_PORTS_START( asterock )
PORT_MODIFY("IN0")
/* Bit 0 is VG_HALT and Bit 2 is the 3 KHz source */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(asteroid_state, clock_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
@ -537,8 +537,8 @@ static INPUT_PORTS_START( astdelux )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) /* According to schematics */
/* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(asteroid_state, clock_r)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
@ -625,12 +625,12 @@ INPUT_PORTS_END
static INPUT_PORTS_START( llander )
PORT_START("IN0")
/* Bit 0 is VG_HALT */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
/* Of the rest, Bit 6 is the 3KHz source. 3,4 and 5 are unknown */
PORT_BIT( 0x38, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(asteroid_state, clock_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
PORT_START("IN1")

View File

@ -404,7 +404,7 @@ WRITE8_MEMBER(astrocde_state::votrax_speech_w)
}
CUSTOM_INPUT_MEMBER( astrocde_state::votrax_speech_status_r )
READ_LINE_MEMBER( astrocde_state::votrax_speech_status_r )
{
return m_votrax->request();
}
@ -723,7 +723,7 @@ static INPUT_PORTS_START( ebases )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "S1:8" )
PORT_START("P4HANDLE")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ebases_state, trackball_r, nullptr)
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ebases_state, trackball_r)
PORT_START("TRACKX1")
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_RESET
@ -838,7 +838,7 @@ static INPUT_PORTS_START( wow )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, votrax_speech_status_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(astrocde_state, votrax_speech_status_r)
PORT_START("P4HANDLE")
/* "If S1:1,2,3 are all ON or all OFF, only coin meter number 1 will count." */
@ -908,7 +908,7 @@ static INPUT_PORTS_START( gorf )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, votrax_speech_status_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(astrocde_state, votrax_speech_status_r)
PORT_START("P4HANDLE")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("S1:1")
@ -1055,7 +1055,7 @@ static INPUT_PORTS_START( demndrgn )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("P2HANDLE")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, demndrgn_state, joystick_r, nullptr)
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(demndrgn_state, joystick_r)
PORT_START("P3HANDLE")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )

View File

@ -624,8 +624,8 @@ static INPUT_PORTS_START( astrof )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p1_controls_r)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p2_controls_r)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@ -679,8 +679,8 @@ static INPUT_PORTS_START( abattle )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p1_controls_r)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p2_controls_r)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@ -734,8 +734,8 @@ static INPUT_PORTS_START( spfghmk2 )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p1_controls_r)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p2_controls_r)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@ -785,8 +785,8 @@ static INPUT_PORTS_START( spfghmk22 )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p1_controls_r)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p2_controls_r)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@ -839,7 +839,7 @@ static INPUT_PORTS_START( tomahawk )
PORT_INCLUDE( astrof_common )
PORT_START("IN")
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,tomahawk_controls_r, nullptr)
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, tomahawk_controls_r)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )

View File

@ -767,7 +767,7 @@ static INPUT_PORTS_START( mwskins )
PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("IN2")
//PORT_BIT(0x0007, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, atlantis_state, port_mod_r, "KEYPAD")
//PORT_BIT(0x0007, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(atlantis_state, port_mod_r)
PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("AN.0")

View File

@ -343,7 +343,7 @@ static INPUT_PORTS_START( squaitsa )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, squaitsa_state, dial_input_r<0>, nullptr)
PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(squaitsa_state, dial_input_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_START("P2")
@ -352,7 +352,7 @@ static INPUT_PORTS_START( squaitsa )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, squaitsa_state, dial_input_r<1>, nullptr)
PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(squaitsa_state, dial_input_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_START("DSW")

View File

@ -1022,7 +1022,7 @@ static INPUT_PORTS_START( nstocker )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "G1:7" )
PORT_MODIFY("IN0")
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, balsente_state,nstocker_bits_r, nullptr)
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(balsente_state, nstocker_bits_r)
/* cheese alert -- we have to map this to player 2 so that it doesn't interfere with
the crosshair controls */

View File

@ -166,7 +166,7 @@ static INPUT_PORTS_START( battlex )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, battlex_state,battlex_in0_b4_r, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(battlex_state, battlex_in0_b4_r)
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x20, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )

View File

@ -45,7 +45,7 @@ public:
{ }
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
DECLARE_CUSTOM_INPUT_MEMBER(coin_r);
DECLARE_READ_LINE_MEMBER(coin_r);
DECLARE_WRITE8_MEMBER(coin_latch_w);
DECLARE_WRITE8_MEMBER(videoram_w);
@ -123,7 +123,7 @@ static INPUT_PORTS_START( blockade )
PORT_CONFSETTING( 0x50, "4" )
PORT_CONFSETTING( 0x30, "5" )
PORT_CONFSETTING( 0x70, "6" )
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_START("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(2)
@ -154,7 +154,7 @@ static INPUT_PORTS_START( comotion )
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(1)
@ -193,7 +193,7 @@ static INPUT_PORTS_START( blasto )
PORT_CONFSETTING( 0x00, "70 Secs") // though service manual says 60
PORT_CONFSETTING( 0x08, "90 Secs")
PORT_BIT(0x70, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
@ -228,7 +228,7 @@ static INPUT_PORTS_START( hustle )
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_START1)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START2)
PORT_BIT(0x60, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(2)
@ -265,7 +265,7 @@ static INPUT_PORTS_START( mineswpr )
PORT_CONFSETTING( 0x50, "4")
PORT_CONFSETTING( 0x30, "5")
PORT_CONFSETTING( 0x70, "6")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(1)
@ -296,7 +296,7 @@ static INPUT_PORTS_START( mineswpr4 )
PORT_CONFSETTING( 0x50, "4")
PORT_CONFSETTING( 0x30, "5")
PORT_CONFSETTING( 0x70, "6")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(1)
@ -332,7 +332,7 @@ INPUT_CHANGED_MEMBER( blockade_state::coin_inserted )
m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
}
CUSTOM_INPUT_MEMBER( blockade_state::coin_r )
READ_LINE_MEMBER( blockade_state::coin_r )
{
return m_coin_latch;
}

View File

@ -44,7 +44,7 @@ public:
m_palette(*this, "palette")
{ }
DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
DECLARE_READ_LINE_MEMBER(hopper_r);
void bmcpokr(machine_config &config);
void mjmaglmp(machine_config &config);
@ -336,7 +336,7 @@ READ16_MEMBER(bmcpokr_state::dsw_r)
return 0xff << 8;
}
CUSTOM_INPUT_MEMBER(bmcpokr_state::hopper_r)
READ_LINE_MEMBER(bmcpokr_state::hopper_r)
{
// motor off should clear the sense bit (I guess ticket.c should actually do this).
// Otherwise a hopper bit stuck low will prevent several keys from being registered.
@ -489,7 +489,7 @@ static INPUT_PORTS_START( bmcpokr )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // n.a. [START, ESC in service mode]
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // SCORE
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // BET [BET, credit -1]
PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, nullptr) // HP [HOPPER, credit -100]
PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bmcpokr_state, hopper_r) // HP [HOPPER, credit -100]
PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // ACCOUNT [SERVICE MODE]
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // KEY-OUT [KEY-OUT, no hopper]
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // DOUBLE-UP
@ -507,7 +507,7 @@ static INPUT_PORTS_START( bmcpokr )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // n.a. [START, ESC in service mode]
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // <Left>2 (3rd)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // <Down>1 (2nd) [BET, credit -1]
// PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, nullptr) // HP [HOPPER, credit -100]
// PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bmcpokr_state, hopper_r) // HP [HOPPER, credit -100]
PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // A2 [SERVICE MODE]
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // C2 [KEY-OUT, no hopper]
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // S1 [START, ESC in service mode]
@ -609,7 +609,7 @@ static INPUT_PORTS_START( mjmaglmp )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) // NOTE
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // KEY DOWN
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // PAY
PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, nullptr) // HOPPER
PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bmcpokr_state, hopper_r) // HOPPER
PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) // ACCOUNT
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reset") // RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // (unused)

View File

@ -126,7 +126,7 @@ public:
void init_bnstars();
DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r);
template <int P> DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r);
private:
@ -558,7 +558,7 @@ uint32_t bnstars_state::screen_update_bnstars_right(screen_device &screen, bitma
static INPUT_PORTS_START( bnstars )
PORT_START("P1")
PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bnstars_state, mahjong_ctrl_r, (void *)0)
PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(bnstars_state, mahjong_ctrl_r<0>)
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -601,7 +601,7 @@ static INPUT_PORTS_START( bnstars )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("P2")
PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bnstars_state, mahjong_ctrl_r, (void *)1)
PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(bnstars_state, mahjong_ctrl_r<1>)
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -752,9 +752,10 @@ static GFXDECODE_START( gfx_bnstars )
GFXDECODE_ENTRY( "gfx7", 0, txlayout, 0x6000, 0x10 ) /* Tx scr2 */
GFXDECODE_END
template <int P>
CUSTOM_INPUT_MEMBER(bnstars_state::mahjong_ctrl_r)
{
required_ioport_array<4> &keys = (((int)(uintptr_t)param) == 0) ? m_p1_keys : m_p2_keys;
required_ioport_array<4> &keys = (P == 0) ? m_p1_keys : m_p2_keys;
switch (m_bnstars1_mahjong_select & 0x2080)
{

View File

@ -73,13 +73,13 @@ READ16_MEMBER( btoads_state::main_sound_r )
}
CUSTOM_INPUT_MEMBER( btoads_state::main_to_sound_r )
READ_LINE_MEMBER( btoads_state::main_to_sound_r )
{
return m_main_to_sound_ready;
}
CUSTOM_INPUT_MEMBER( btoads_state::sound_to_main_r )
READ_LINE_MEMBER( btoads_state::sound_to_main_r )
{
return m_sound_to_main_ready;
}
@ -264,9 +264,9 @@ static INPUT_PORTS_START( btoads )
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SPECIAL")
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, btoads_state, sound_to_main_r, nullptr)
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(btoads_state, sound_to_main_r)
PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, btoads_state, main_to_sound_r, nullptr)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(btoads_state, main_to_sound_r)
PORT_BIT( 0xff7c, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SW1")

View File

@ -732,8 +732,8 @@ static INPUT_PORTS_START( tokio )
PORT_INCLUDE( tokio_base )
PORT_MODIFY("IN0")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("bmcu", taito68705_mcu_device, host_semaphore_r, nullptr)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("bmcu", taito68705_mcu_device, mcu_semaphore_r, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("bmcu", taito68705_mcu_device, host_semaphore_r)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("bmcu", taito68705_mcu_device, mcu_semaphore_r)
INPUT_PORTS_END
static INPUT_PORTS_START( bublboblp )

View File

@ -417,7 +417,7 @@ static INPUT_PORTS_START( buggychl )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_TILT )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, buggychl_state, pedal_in_r, nullptr)
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(buggychl_state, pedal_in_r)
PORT_START("PEDAL")
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_NAME("P1 Pedal") PORT_SENSITIVITY(100) PORT_KEYDELTA(15) /* accelerator */

View File

@ -309,7 +309,7 @@ READ8_MEMBER(bwidow_state::spacduel_IN3_r)
return res;
}
CUSTOM_INPUT_MEMBER(bwidow_state::clock_r)
READ_LINE_MEMBER(bwidow_state::clock_r)
{
return (m_maincpu->total_cycles() & 0x100) ? 1 : 0;
}
@ -484,9 +484,9 @@ static INPUT_PORTS_START( bwidow )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
/* bit 7 is tied to a 3kHz clock */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
PORT_START("DSW0")
PORT_DIPNAME(0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("D4:!7,!8")
@ -562,9 +562,9 @@ static INPUT_PORTS_START( gravitar )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
/* bit 7 is tied to a 3kHz clock */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
PORT_START("DSW0")
PORT_DIPUNUSED_DIPLOC( 0x03, IP_ACTIVE_HIGH, "D4:!7,!8" )
@ -636,9 +636,9 @@ static INPUT_PORTS_START( lunarbat )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
/* bit 7 is tied to a 3kHz clock */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
PORT_START("DSW0") /* DSW0 - Not read */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
@ -670,9 +670,9 @@ static INPUT_PORTS_START( spacduel )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
/* bit 7 is tied to a 3kHz clock */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
PORT_START("DSW0")
PORT_DIPNAME(0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("D4:!7,!8")

View File

@ -60,9 +60,9 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(activity_button);
DECLARE_INPUT_CHANGED_MEMBER(self_test);
DECLARE_CUSTOM_INPUT_MEMBER(outhole_x0);
DECLARE_CUSTOM_INPUT_MEMBER(saucer_x3);
DECLARE_CUSTOM_INPUT_MEMBER(drop_target_x2);
template <int Param> DECLARE_READ_LINE_MEMBER(outhole_x0);
template <int Param> DECLARE_READ_LINE_MEMBER(saucer_x3);
template <int Param> DECLARE_READ_LINE_MEMBER(drop_target_x2);
void by17(machine_config &config);
@ -302,7 +302,7 @@ static INPUT_PORTS_START( by17 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, outhole_x0, (void *)0x07) // PORT_CODE(KEYCODE_BACKSPACE)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, outhole_x0<0x07>) // PORT_CODE(KEYCODE_BACKSPACE)
PORT_START("X1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 )
@ -386,17 +386,17 @@ static INPUT_PORTS_START( matahari )
PORT_DIPSETTING( 0x80, "Replay")
PORT_MODIFY("X2") /* Drop Target switches */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20) // PORT_CODE(KEYCODE_K)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21) // PORT_CODE(KEYCODE_J)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22) // PORT_CODE(KEYCODE_H)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23) // PORT_CODE(KEYCODE_G)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24) // PORT_CODE(KEYCODE_F)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25) // PORT_CODE(KEYCODE_D)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26) // PORT_CODE(KEYCODE_S)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27) // PORT_CODE(KEYCODE_A)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x20>) // PORT_CODE(KEYCODE_K)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x21>) // PORT_CODE(KEYCODE_J)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x22>) // PORT_CODE(KEYCODE_H)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x23>) // PORT_CODE(KEYCODE_G)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x24>) // PORT_CODE(KEYCODE_F)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x25>) // PORT_CODE(KEYCODE_D)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x26>) // PORT_CODE(KEYCODE_S)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x27>) // PORT_CODE(KEYCODE_A)
PORT_MODIFY("X3")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, saucer_x3<0x37>) // PORT_CODE(KEYCODE_Q)
INPUT_PORTS_END
static INPUT_PORTS_START( pwerplay )
@ -438,24 +438,25 @@ static INPUT_PORTS_START( pwerplay )
PORT_DIPSETTING( 0xc0, "Extra Ball / Replay")
PORT_MODIFY("X2") /* Drop Target switches */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20) // PORT_CODE(KEYCODE_K)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21) // PORT_CODE(KEYCODE_J)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22) // PORT_CODE(KEYCODE_H)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23) // PORT_CODE(KEYCODE_G)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24) // PORT_CODE(KEYCODE_F)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25) // PORT_CODE(KEYCODE_D)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26) // PORT_CODE(KEYCODE_S)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27) // PORT_CODE(KEYCODE_A)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x20>) // PORT_CODE(KEYCODE_K)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x21>) // PORT_CODE(KEYCODE_J)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x22>) // PORT_CODE(KEYCODE_H)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x23>) // PORT_CODE(KEYCODE_G)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x24>) // PORT_CODE(KEYCODE_F)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x25>) // PORT_CODE(KEYCODE_D)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x26>) // PORT_CODE(KEYCODE_S)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x27>) // PORT_CODE(KEYCODE_A)
PORT_MODIFY("X3")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, saucer_x3<0x37>) // PORT_CODE(KEYCODE_Q)
INPUT_PORTS_END
CUSTOM_INPUT_MEMBER( by17_state::outhole_x0 )
template <int Param>
READ_LINE_MEMBER( by17_state::outhole_x0 )
{
int bit_shift = ((uintptr_t)param & 0x07);
int port = (((uintptr_t)param >> 4) & 0x07);
int bit_shift = (Param & 0x07);
int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */
@ -465,10 +466,11 @@ CUSTOM_INPUT_MEMBER( by17_state::outhole_x0 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
CUSTOM_INPUT_MEMBER( by17_state::saucer_x3 )
template <int Param>
READ_LINE_MEMBER( by17_state::saucer_x3 )
{
int bit_shift = ((uintptr_t)param & 0x07);
int port = (((uintptr_t)param >> 4) & 0x07);
int bit_shift = (Param & 0x07);
int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */
@ -478,13 +480,13 @@ CUSTOM_INPUT_MEMBER( by17_state::saucer_x3 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
CUSTOM_INPUT_MEMBER( by17_state::drop_target_x2 )
template <int Param>
READ_LINE_MEMBER( by17_state::drop_target_x2 )
{
/* Here we simulate fallen Drop Targets so the Drop Target Reset Solenoids can release the switches */
int bit_shift = ((uintptr_t)param & 0x07);
int port = (((uintptr_t)param >> 4) & 0x07);
int bit_shift = (Param & 0x07);
int port = ((Param >> 4) & 0x07);
switch (bit_shift)
{

View File

@ -95,9 +95,9 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(activity_button);
DECLARE_INPUT_CHANGED_MEMBER(self_test);
DECLARE_CUSTOM_INPUT_MEMBER(outhole_x0);
DECLARE_CUSTOM_INPUT_MEMBER(drop_target_x0);
DECLARE_CUSTOM_INPUT_MEMBER(kickback_x3);
template <int Param> DECLARE_READ_LINE_MEMBER(outhole_x0);
template <int Param> DECLARE_READ_LINE_MEMBER(drop_target_x0);
template <int Param> DECLARE_READ_LINE_MEMBER(kickback_x3);
void by35(machine_config &config);
void nuovo(machine_config &config);
@ -402,7 +402,7 @@ static INPUT_PORTS_START( by35 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, outhole_x0, (void *)0x07) // PORT_CODE(KEYCODE_BACKSPACE)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, outhole_x0<0x07>) // PORT_CODE(KEYCODE_BACKSPACE)
PORT_START("X1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 )
@ -843,14 +843,14 @@ static INPUT_PORTS_START( playboy )
PORT_DIPSETTING( 0x40, "Extra Ball or Special Held Until Collected")
PORT_MODIFY("X0") /* Drop Target switches */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x00) // PORT_CODE(KEYCODE_STOP)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x01) // PORT_CODE(KEYCODE_SLASH)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x02) // PORT_CODE(KEYCODE_OPENBRACE)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x03) // PORT_CODE(KEYCODE_CLOSEBRACE)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x04) // PORT_CODE(KEYCODE_BACKSLASH)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x00>) // PORT_CODE(KEYCODE_STOP)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x01>) // PORT_CODE(KEYCODE_SLASH)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x02>) // PORT_CODE(KEYCODE_OPENBRACE)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x03>) // PORT_CODE(KEYCODE_CLOSEBRACE)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x04>) // PORT_CODE(KEYCODE_BACKSLASH)
PORT_MODIFY("X3")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, kickback_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, kickback_x3<0x37>) // PORT_CODE(KEYCODE_Q)
PORT_START("RT2")
PORT_ADJUSTER( 50, "RT2 - Tone Sustain" )
@ -952,10 +952,11 @@ static INPUT_PORTS_START( frontier )
INPUT_PORTS_END
CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 )
template <int Param>
READ_LINE_MEMBER( by35_state::outhole_x0 )
{
int bit_shift = ((uintptr_t)param & 0x07);
int port = (((uintptr_t)param >> 4) & 0x07);
int bit_shift = (Param & 0x07);
int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */
@ -965,10 +966,11 @@ CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
CUSTOM_INPUT_MEMBER( by35_state::kickback_x3 )
template <int Param>
READ_LINE_MEMBER( by35_state::kickback_x3 )
{
int bit_shift = ((uintptr_t)param & 0x07);
int port = (((uintptr_t)param >> 4) & 0x07);
int bit_shift = (Param & 0x07);
int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */
@ -978,12 +980,13 @@ CUSTOM_INPUT_MEMBER( by35_state::kickback_x3 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
CUSTOM_INPUT_MEMBER( by35_state::drop_target_x0 )
template <int Param>
READ_LINE_MEMBER( by35_state::drop_target_x0 )
{
/* Here we simulate the Drop Target switch states so the Drop Target Reset Solenoid can also release the switches */
int bit_shift = ((uintptr_t)param & 0x07);
int port = (((uintptr_t)param >> 4) & 0x07);
int bit_shift = (Param & 0x07);
int port = ((Param >> 4) & 0x07);
switch (bit_shift)
{

View File

@ -267,7 +267,7 @@ INTERRUPT_GEN_MEMBER(bzone_state::bzone_interrupt)
*
*************************************/
CUSTOM_INPUT_MEMBER(bzone_state::clock_r)
READ_LINE_MEMBER(bzone_state::clock_r)
{
return (m_maincpu->total_cycles() & 0x100) ? 1 : 0;
}
@ -394,9 +394,9 @@ void redbaron_state::redbaron_map(address_map &map)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step") \
/* bit 6 is the VG HALT bit. We set it to "low" */\
/* per default (busy vector processor). */\
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_bzone_device, done_r, nullptr)\
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_bzone_device, done_r)\
/* bit 7 is tied to a 3kHz clock */\
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bzone_state,clock_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bzone_state, clock_r)
#define BZONEDSW0\

View File

@ -735,7 +735,7 @@ void cave_state::korokoro_eeprom_w(offs_t offset, u16 data, u16 mem_mask)
}
}
CUSTOM_INPUT_MEMBER(cave_state::korokoro_hopper_r)
READ_LINE_MEMBER(cave_state::korokoro_hopper_r)
{
return m_hopper ? 1 : 0;
}
@ -1123,7 +1123,7 @@ void cave_state::tjumpman_leds_w(u8 data)
// popmessage("led %04X", data);
}
CUSTOM_INPUT_MEMBER(cave_state::tjumpman_hopper_r)
READ_LINE_MEMBER(cave_state::tjumpman_hopper_r)
{
return (m_hopper && !(m_screen[0]->frame_number() % 10)) ? 0 : 1;
}
@ -1608,7 +1608,7 @@ static INPUT_PORTS_START( korokoro )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // service medal out?
PORT_SERVICE( 0x2000, IP_ACTIVE_LOW )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) // service coin
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,korokoro_hopper_r, nullptr) // motor / hopper status ???
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, korokoro_hopper_r) // motor / hopper status ???
PORT_START("IN1")
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
@ -1625,7 +1625,7 @@ static INPUT_PORTS_START( tekkencw )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( DEF_STR( Yes ) ) PORT_CODE(KEYCODE_Y) // suru ("do")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Bet" )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, tjumpman_hopper_r)
PORT_START("IN1")
PORT_CONFNAME( 0x08, 0x08, "Self Test" )
@ -1647,7 +1647,7 @@ static INPUT_PORTS_START( tekkenbs )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Bet" )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, tjumpman_hopper_r)
PORT_START("IN1")
PORT_CONFNAME( 0x08, 0x08, "Self Test" )
@ -1668,7 +1668,7 @@ static INPUT_PORTS_START( tjumpman )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( DEF_STR( Yes ) ) PORT_CODE(KEYCODE_Y) // suru ("do")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "1 Bet" )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, tjumpman_hopper_r)
PORT_START("IN1")
PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -1691,7 +1691,7 @@ static INPUT_PORTS_START( pacslot )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "Pac-Man" ) PORT_CODE(KEYCODE_Y)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Bet" )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state, tjumpman_hopper_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, tjumpman_hopper_r)
PORT_START("IN1")
PORT_CONFNAME( 0x08, 0x08, "Self Test" )

View File

@ -170,7 +170,7 @@ TIMER_CALLBACK_MEMBER(ccastles_state::clock_irq)
}
CUSTOM_INPUT_MEMBER(ccastles_state::get_vblank)
READ_LINE_MEMBER(ccastles_state::vblank_r)
{
int scanline = m_screen->vpos();
return m_syncprom[scanline & 0xff] & 1;
@ -340,7 +340,7 @@ static INPUT_PORTS_START( ccastles )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ccastles_state,get_vblank, nullptr)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ccastles_state, vblank_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Left Jump/1P Start Upright") PORT_CONDITION("IN1",0x20,EQUALS,0x00) /* left Jump, non-cocktail start1 */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("1P Jump") PORT_CONDITION("IN1",0x20,EQUALS,0x20) /* 1p Jump, cocktail */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Right Jump/2P Start Upright") PORT_CONDITION("IN1",0x20,EQUALS,0x00) /* right Jump, non-cocktail start2 */

View File

@ -98,7 +98,7 @@ TODO:
*
*************************************/
CUSTOM_INPUT_MEMBER(champbas_state::watchdog_bit2)
READ_LINE_MEMBER(champbas_state::watchdog_bit2)
{
return (0x10 - m_watchdog->get_vblank_counter()) >> 2 & 1;
}
@ -337,7 +337,7 @@ static INPUT_PORTS_START( talbot )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state, watchdog_bit2, nullptr) // bit 2 of the watchdog counter
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(champbas_state, watchdog_bit2) // bit 2 of the watchdog counter
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )

View File

@ -698,7 +698,7 @@ void cischeat_state::armchmp2_map(address_map &map)
#define RIGHT 0
#define LEFT 1
WRITE16_MEMBER(cischeat_state::captflag_leds_w)
WRITE16_MEMBER(captflag_state::leds_w)
{
COMBINE_DATA( &m_captflag_leds );
if (ACCESSING_BITS_8_15)
@ -709,13 +709,13 @@ WRITE16_MEMBER(cischeat_state::captflag_leds_w)
m_leds[1] = BIT(data, 13); // select
int power = (data & 0x1000);
m_captflag_hopper->motor_w(power ? 1 : 0); // prize motor
m_hopper->motor_w(power ? 1 : 0); // prize motor
if (!power)
m_captflag_hopper->reset();
m_hopper->reset();
}
}
WRITE16_MEMBER(cischeat_state::captflag_oki_bank_w)
WRITE16_MEMBER(captflag_state::oki_bank_w)
{
if (ACCESSING_BITS_0_7)
{
@ -726,32 +726,32 @@ WRITE16_MEMBER(cischeat_state::captflag_oki_bank_w)
// Motors
WRITE16_MEMBER(cischeat_state::captflag_motor_command_right_w)
WRITE16_MEMBER(captflag_state::motor_command_right_w)
{
// Output check:
// e09a up
// 80b9 - (when not busy)
// 0088 - (when busy)
// e0ba down
data = COMBINE_DATA( &m_captflag_motor_command[RIGHT] );
captflag_motor_move(RIGHT, data);
data = COMBINE_DATA( &m_motor_command[RIGHT] );
motor_move(RIGHT, data);
}
WRITE16_MEMBER(cischeat_state::captflag_motor_command_left_w)
WRITE16_MEMBER(captflag_state::motor_command_left_w)
{
// Output check:
// e0ba up
// 8099 - (when not busy)
// 0088 - (when busy)
// e09a down
data = COMBINE_DATA( &m_captflag_motor_command[LEFT] );
captflag_motor_move(LEFT, data);
data = COMBINE_DATA( &m_motor_command[LEFT] );
motor_move(LEFT, data);
}
void cischeat_state::captflag_motor_move(int side, uint16_t data)
void captflag_state::motor_move(int side, uint16_t data)
{
uint16_t & pos = m_captflag_motor_pos[side];
uint16_t & pos = m_motor_pos[side];
timer_device &dev((side == RIGHT) ? *m_captflag_motor_right : *m_captflag_motor_left);
timer_device &dev((side == RIGHT) ? *m_motor_right : *m_motor_left);
// bool busy = !(dev.time_left() == attotime::never);
bool busy = false;
@ -802,20 +802,22 @@ void cischeat_state::captflag_motor_move(int side, uint16_t data)
output().set_value((side == RIGHT) ? "right" : "left", pos);
}
CUSTOM_INPUT_MEMBER(cischeat_state::captflag_motor_pos_r)
template <int N>
CUSTOM_INPUT_MEMBER(captflag_state::motor_pos_r)
{
const uint8_t pos[4] = {1,0,2,3}; // -> 2,3,1,0 offsets -> 0123
return ~pos[m_captflag_motor_pos[(uintptr_t)param]];
return ~pos[m_motor_pos[N]];
}
CUSTOM_INPUT_MEMBER(cischeat_state::captflag_motor_busy_r)
template <int N>
READ_LINE_MEMBER(captflag_state::motor_busy_r)
{
// timer_device & dev = ((side == RIGHT) ? m_captflag_motor_right : m_captflag_motor_left);
// timer_device & dev = ((side == RIGHT) ? m_motor_right : m_motor_left);
// return (dev.time_left() == attotime::never) ? 0 : 1;
return 0;
}
void cischeat_state::captflag_map(address_map &map)
void captflag_state::captflag_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x082000, 0x082005).w("scroll0", FUNC(megasys1_tilemap_device::scroll_w));
@ -827,24 +829,24 @@ void cischeat_state::captflag_map(address_map &map)
map(0x0b0000, 0x0b7fff).ram().w("scroll2", FUNC(megasys1_tilemap_device::write)).share("scroll2"); // Scroll RAM 2
map(0x0b8000, 0x0bffff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette
map(0x0f0000, 0x0fffff).ram().share("ram"); // Work RAM + Spriteram
map(0x100000, 0x100001).portr("SW1_2").w(FUNC(cischeat_state::captflag_oki_bank_w)); // 2 x DSW + Sound
map(0x100008, 0x100009).portr("Buttons").w(FUNC(cischeat_state::captflag_leds_w)); // Buttons + Leds
map(0x100000, 0x100001).portr("SW1_2").w(FUNC(captflag_state::oki_bank_w)); // 2 x DSW + Sound
map(0x100008, 0x100009).portr("Buttons").w(FUNC(captflag_state::leds_w)); // Buttons + Leds
map(0x100015, 0x100015).rw(m_oki1, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // Sound
map(0x100019, 0x100019).rw(m_oki2, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); //
map(0x10001c, 0x10001d).w(FUNC(cischeat_state::scudhamm_enable_w)); // ?
map(0x10001c, 0x10001d).w(FUNC(captflag_state::scudhamm_enable_w)); // ?
map(0x100040, 0x100041).portr("SW01"); // DSW + Motor
map(0x100044, 0x100045).w(FUNC(cischeat_state::captflag_motor_command_left_w)); // Motor Command (Left)
map(0x100048, 0x100049).w(FUNC(cischeat_state::captflag_motor_command_right_w)); // Motor Command (Right)
map(0x100044, 0x100045).w(FUNC(captflag_state::motor_command_left_w)); // Motor Command (Left)
map(0x100048, 0x100049).w(FUNC(captflag_state::motor_command_right_w)); // Motor Command (Right)
map(0x100060, 0x10007f).ram().share("nvram"); // NVRAM (even bytes only)
}
void cischeat_state::captflag_oki1_map(address_map &map)
void captflag_state::oki1_map(address_map &map)
{
map(0x00000, 0x1ffff).rom();
map(0x20000, 0x3ffff).bankr("oki1_bank");
}
void cischeat_state::captflag_oki2_map(address_map &map)
void captflag_state::oki2_map(address_map &map)
{
map(0x00000, 0x1ffff).rom();
map(0x20000, 0x3ffff).bankr("oki2_bank");
@ -1752,11 +1754,11 @@ static INPUT_PORTS_START( captflag )
PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x8000, "SW2:8" )
PORT_START("SW01")
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, cischeat_state, captflag_motor_pos_r, (void *)LEFT)
PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, cischeat_state, captflag_motor_pos_r, (void *)RIGHT)
PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(captflag_state, motor_pos_r<LEFT>)
PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(captflag_state, motor_pos_r<RIGHT>)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, cischeat_state, captflag_motor_busy_r, (void *)LEFT)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, cischeat_state, captflag_motor_busy_r, (void *)RIGHT)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(captflag_state, motor_busy_r<LEFT>)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(captflag_state, motor_busy_r<RIGHT>)
PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW01:1,2")
PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) )
@ -2157,7 +2159,7 @@ void cischeat_state::armchmp2(machine_config &config)
4-7] rte
*/
TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::captflag_scanline)
TIMER_DEVICE_CALLBACK_MEMBER(captflag_state::captflag_scanline)
{
int scanline = param;
@ -2168,14 +2170,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::captflag_scanline)
m_maincpu->set_input_line(3, HOLD_LINE);
}
void cischeat_state::captflag(machine_config &config)
void captflag_state::captflag(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(24'000'000) / 2); // TMP68000P-12
m_maincpu->set_addrmap(AS_PROGRAM, &cischeat_state::captflag_map);
TIMER(config, "scantimer").configure_scanline(FUNC(cischeat_state::captflag_scanline), "screen", 0, 1);
m_maincpu->set_addrmap(AS_PROGRAM, &captflag_state::captflag_map);
TIMER(config, "scantimer").configure_scanline(FUNC(captflag_state::captflag_scanline), "screen", 0, 1);
TICKET_DISPENSER(config, m_captflag_hopper, attotime::from_msec(2000), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH );
TICKET_DISPENSER(config, m_hopper, attotime::from_msec(2000), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH );
WATCHDOG_TIMER(config, m_watchdog);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@ -2187,7 +2189,7 @@ void cischeat_state::captflag(machine_config &config)
// m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500 * 3) /* not accurate */);
m_screen->set_size(256, 256);
m_screen->set_visarea(0, 256-1, 0 +16, 256-1 -16);
m_screen->set_screen_update(FUNC(cischeat_state::screen_update_scudhamm));
m_screen->set_screen_update(FUNC(captflag_state::screen_update_scudhamm));
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_scudhamm);
@ -2198,8 +2200,8 @@ void cischeat_state::captflag(machine_config &config)
MEGASYS1_TILEMAP(config, m_tmap[2], m_palette, 0x4e00/2);
// Motors
TIMER(config, m_captflag_motor_left).configure_generic(timer_device::expired_delegate());
TIMER(config, m_captflag_motor_right).configure_generic(timer_device::expired_delegate());
TIMER(config, m_motor_left).configure_generic(timer_device::expired_delegate());
TIMER(config, m_motor_right).configure_generic(timer_device::expired_delegate());
// Layout
config.set_default_layout(layout_captflag);
@ -2209,12 +2211,12 @@ void cischeat_state::captflag(machine_config &config)
SPEAKER(config, "rspeaker").front_right();
OKIM6295(config, m_oki1, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified
m_oki1->set_addrmap(0, &cischeat_state::captflag_oki1_map);
m_oki1->set_addrmap(0, &captflag_state::oki1_map);
m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
OKIM6295(config, m_oki2, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified
m_oki2->set_addrmap(0, &cischeat_state::captflag_oki2_map);
m_oki2->set_addrmap(0, &captflag_state::oki2_map);
m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
}
@ -3711,7 +3713,7 @@ ROM_START( captflag )
ROM_LOAD( "mr92027-09_w26.ic18", 0x000000, 0x100000, CRC(3aaa332a) SHA1(6c19364069e0b077a07ac4f9c4b0cf0c0985a42a) ) // 1 on the PCB
ROM_END
void cischeat_state::init_captflag()
void captflag_state::init_captflag()
{
m_oki1_bank->configure_entries(0, 0x100000 / 0x20000, memregion("oki1")->base(), 0x20000);
m_oki2_bank->configure_entries(0, 0x100000 / 0x20000, memregion("oki2")->base(), 0x20000);
@ -3736,5 +3738,5 @@ GAME( 1992, armchmp2o2,armchmp2, armchmp2, armchmp2, cischeat_state, empty_init
GAME( 1992, armchmp2o, armchmp2, armchmp2, armchmp2, cischeat_state, empty_init, ROT270, "Jaleco", "Arm Champs II (ver 1.7)", MACHINE_IMPERFECT_GRAPHICS )
GAME( 1992, wildplt, 0, wildplt, wildplt, wildplt_state, init_f1gpstar, ROT0, "Jaleco", "Wild Pilot", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // busted timings
GAMEL( 1993, f1gpstr2, 0, f1gpstr2, f1gpstr2, cischeat_state, init_f1gpstar, ROT0, "Jaleco", "F-1 Grand Prix Star II", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN, layout_f1gpstar )
GAME( 1993, captflag, 0, captflag, captflag, cischeat_state, init_captflag, ROT270, "Jaleco", "Captain Flag (Japan)", MACHINE_IMPERFECT_GRAPHICS )
GAME( 1993, captflag, 0, captflag, captflag, captflag_state, init_captflag, ROT270, "Jaleco", "Captain Flag (Japan)", MACHINE_IMPERFECT_GRAPHICS )
GAME( 1994, scudhamm, 0, scudhamm, scudhamm, cischeat_state, empty_init, ROT270, "Jaleco", "Scud Hammer", MACHINE_IMPERFECT_GRAPHICS )

View File

@ -142,7 +142,7 @@ TIMER_CALLBACK_MEMBER(cloud9_state::clock_irq)
}
CUSTOM_INPUT_MEMBER(cloud9_state::get_vblank)
READ_LINE_MEMBER(cloud9_state::vblank_r)
{
int scanline = m_screen->vpos();
return (~m_syncprom[scanline & 0xff] >> 1) & 1;
@ -289,7 +289,7 @@ static INPUT_PORTS_START( cloud9 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cloud9_state, vblank_r)
PORT_START("IN1")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -330,7 +330,7 @@ static INPUT_PORTS_START( firebeas )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cloud9_state, vblank_r)
PORT_START("IN1")
PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN )

View File

@ -102,10 +102,10 @@ READ8_MEMBER(cop01_state::cop01_sound_command_r)
}
CUSTOM_INPUT_MEMBER(cop01_state::mightguy_area_r)
template <int Mask>
READ_LINE_MEMBER(cop01_state::mightguy_area_r)
{
int bit_mask = (uintptr_t)param;
return (ioport("FAKE")->read() & bit_mask) ? 0x01 : 0x00;
return (ioport("FAKE")->read() & Mask) ? 1 : 0;
}
WRITE8_MEMBER(cop01_state::cop01_irq_ack_w)
@ -329,7 +329,7 @@ static INPUT_PORTS_START( mightguy )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x04) // "Start Area" - see fake Dip Switch
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cop01_state, mightguy_area_r<0x04>) // "Start Area" - see fake Dip Switch
PORT_START("DSW2")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
@ -347,8 +347,8 @@ static INPUT_PORTS_START( mightguy )
PORT_DIPSETTING( 0x20, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, "Invincibility")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x01) // "Start Area" - see fake Dip Switch
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x02) // "Start Area" - see fake Dip Switch
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cop01_state, mightguy_area_r<0x01>) // "Start Area" - see fake Dip Switch
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cop01_state, mightguy_area_r<0x02>) // "Start Area" - see fake Dip Switch
PORT_START("FAKE") /* FAKE Dip Switch */
PORT_DIPNAME( 0x07, 0x07, "Starting Area" )

View File

@ -295,7 +295,7 @@ static INPUT_PORTS_START( crbaloon )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Name Reset")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, crbaloon_state,pc3092_r, nullptr)
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(crbaloon_state, pc3092_r)
PORT_START("PC3092")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )

View File

@ -183,7 +183,7 @@ static INPUT_PORTS_START( crimfght )
PORT_DIPUNUSED_DIPLOC(0x02, IP_ACTIVE_LOW, "SW3:2")
PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW3:3")
PORT_DIPUNUSED_DIPLOC(0x08, IP_ACTIVE_LOW, "SW3:4")
PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, crimfght_state, system_r, nullptr)
PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(crimfght_state, system_r)
PORT_START("P1")
KONAMI8_B123_START(1)

View File

@ -336,7 +336,7 @@ public:
uint16_t handle_joystick_potgor(uint16_t potgor);
DECLARE_CUSTOM_INPUT_MEMBER(cubo_input);
DECLARE_CUSTOM_INPUT_MEMBER(cd32_sel_mirror_input);
template <int P> DECLARE_READ_LINE_MEMBER(cd32_sel_mirror_input);
DECLARE_WRITE_LINE_MEMBER( akiko_int_w );
DECLARE_WRITE8_MEMBER( akiko_cia_0_port_a_write );
@ -534,9 +534,10 @@ CUSTOM_INPUT_MEMBER( cubo_state::cubo_input )
return handle_joystick_potgor(m_potgo_value) >> 8;
}
CUSTOM_INPUT_MEMBER( cubo_state::cd32_sel_mirror_input )
template <int P>
READ_LINE_MEMBER( cubo_state::cd32_sel_mirror_input )
{
uint8_t bits = m_player_ports[(int)(uintptr_t)param]->read();
uint8_t bits = m_player_ports[P]->read();
return (bits & 0x20)>>5;
}
@ -546,22 +547,22 @@ static INPUT_PORTS_START( cubo )
PORT_START("CIA0PORTA")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_CUSTOM )
/* this is the regular port for reading a single button joystick on the Amiga, many CD32 games require this to mirror the pad start button! */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state,cd32_sel_mirror_input, (void *)1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state,cd32_sel_mirror_input, (void *)0)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cubo_state, cd32_sel_mirror_input<1>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cubo_state, cd32_sel_mirror_input<0>)
PORT_START("CIA0PORTB")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("joy_0_dat")
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state, amiga_joystick_convert, (void *)1)
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cubo_state, amiga_joystick_convert<1>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("joy_1_dat")
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state, amiga_joystick_convert, (void *)0)
PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cubo_state, amiga_joystick_convert<0>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("potgo")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state,cubo_input, nullptr)
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cubo_state, cubo_input)
PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED )

View File

@ -708,7 +708,7 @@ static INPUT_PORTS_START( cyclemb )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P1_1")
PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cyclemb_state, pad_r<0>, nullptr)
PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cyclemb_state, pad_r<0>)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("PAD_P1")
@ -731,7 +731,7 @@ static INPUT_PORTS_START( cyclemb )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P2_1")
PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cyclemb_state, pad_r<1>, nullptr)
PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cyclemb_state, pad_r<1>)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("PAD_P2")

View File

@ -62,7 +62,7 @@ public:
void itaten(machine_config &config);
void dacholer(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(snd_ack_r);
DECLARE_READ_LINE_MEMBER(snd_ack_r);
private:
DECLARE_WRITE8_MEMBER(bg_scroll_x_w);
@ -302,7 +302,7 @@ WRITE8_MEMBER(dacholer_state::snd_ack_w)
m_snd_ack = data;
}
CUSTOM_INPUT_MEMBER(dacholer_state::snd_ack_r)
READ_LINE_MEMBER(dacholer_state::snd_ack_r)
{
return m_snd_ack; //guess ...
}
@ -382,7 +382,7 @@ static INPUT_PORTS_START( dacholer )
PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dacholer_state,snd_ack_r, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dacholer_state, snd_ack_r)
PORT_START("DSWB")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) /* table at 0x0a9c */

View File

@ -111,12 +111,6 @@ void dcheese_state::machine_start()
*
*************************************/
CUSTOM_INPUT_MEMBER(dcheese_state::sound_latch_state_r)
{
return m_soundlatch->pending_r();
}
WRITE16_MEMBER(dcheese_state::eeprom_control_w)
{
/* toggles bit $0100 very frequently while waiting for things */
@ -245,7 +239,7 @@ static INPUT_PORTS_START( dcheese )
PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* sound->main buffer status (0=empty) */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, nullptr)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
@ -295,7 +289,7 @@ static INPUT_PORTS_START( lottof2 )
PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* sound->main buffer status (0=empty) */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, nullptr)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
@ -343,7 +337,7 @@ static INPUT_PORTS_START( fredmem )
PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* sound->main buffer status (0=empty) */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, nullptr)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )

View File

@ -454,7 +454,7 @@ static INPUT_PORTS_START( ddayjlc )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddayjlc_state,prot_r, nullptr)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ddayjlc_state, prot_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSW1")

View File

@ -212,7 +212,7 @@ public:
void init_rongrong();
void init_momotaro();
DECLARE_CUSTOM_INPUT_MEMBER(ddenlovr_blitter_irq_r);
DECLARE_READ_LINE_MEMBER(blitter_irq_r);
DECLARE_CUSTOM_INPUT_MEMBER(ddenlovj_blitter_r);
DECLARE_CUSTOM_INPUT_MEMBER(nettoqc_special_r);
DECLARE_CUSTOM_INPUT_MEMBER(mjflove_blitter_r);
@ -1748,7 +1748,7 @@ uint32_t ddenlovr_state::screen_update_ddenlovr(screen_device &screen, bitmap_rg
return 0;
}
CUSTOM_INPUT_MEMBER(ddenlovr_state::ddenlovr_blitter_irq_r)
READ_LINE_MEMBER(ddenlovr_state::blitter_irq_r)
{
return m_ddenlovr_blitter_irq_flag;
}
@ -4548,7 +4548,7 @@ static INPUT_PORTS_START( ddenlovj )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovj_blitter_r, nullptr) // blitter irq flag? (bit 5) & RTC (bit 6)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ddenlovr_state, ddenlovj_blitter_r) // blitter irq flag? (bit 5) & RTC (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_START("DSW1")
@ -4654,7 +4654,7 @@ static INPUT_PORTS_START( ddenlovr )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? quiz365
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, nullptr) // blitter irq flag
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ddenlovr_state, blitter_irq_r) // blitter irq flag
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_START("DSW")
@ -4709,7 +4709,7 @@ static INPUT_PORTS_START( nettoqc )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,nettoqc_special_r, nullptr) // ? (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ddenlovr_state, nettoqc_special_r) // ? (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_START("DSW1")
@ -4807,7 +4807,7 @@ static INPUT_PORTS_START( ultrchmp )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, nullptr) // blitter irq flag
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ddenlovr_state, blitter_irq_r) // blitter irq flag
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_START("DSW")
@ -4987,7 +4987,7 @@ static INPUT_PORTS_START( quiz365 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? quiz365
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, nullptr) // blitter irq flag
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ddenlovr_state, blitter_irq_r) // blitter irq flag
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_START("DSW1")
@ -8089,7 +8089,7 @@ static INPUT_PORTS_START( mjflove )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) PORT_TOGGLE
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,mjflove_blitter_r, nullptr) // RTC (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ddenlovr_state, mjflove_blitter_r) // RTC (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_START("KEY0")

View File

@ -332,7 +332,7 @@ WRITE8_MEMBER(ddragon_state::ddragonba_port_w)
*
*************************************/
CUSTOM_INPUT_MEMBER(ddragon_state::subcpu_bus_free)
READ_LINE_MEMBER(ddragon_state::subcpu_bus_free_r)
{
// Corresponds to BA (Bus Available) on the HD63701
if (m_subcpu)
@ -680,7 +680,7 @@ static INPUT_PORTS_START( ddragon )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddragon_state, subcpu_bus_free, nullptr)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ddragon_state, subcpu_bus_free_r)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END

View File

@ -270,16 +270,16 @@ WRITE8_MEMBER(wwfwfest_state::wwfwfest_priority_w)
/* DIPs are spread across the other input ports */
template <int N>
CUSTOM_INPUT_MEMBER(wwfwfest_state::dsw_3f_r)
{
const char *tag = (const char *)param;
return ioport(tag)->read() & 0x3f;
return m_dsw[N]->read() & 0x3f;
}
template <int N>
CUSTOM_INPUT_MEMBER(wwfwfest_state::dsw_c0_r)
{
const char *tag = (const char *)param;
return (ioport(tag)->read() & 0xc0) >> 6;
return (m_dsw[N]->read() & 0xc0) >> 6;
}
@ -604,7 +604,7 @@ static INPUT_PORTS_START( wwfwfest )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_c0_r, "DSW2")
PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wwfwfest_state, dsw_c0_r<1>)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -617,7 +617,7 @@ static INPUT_PORTS_START( wwfwfest )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_3f_r, "DSW2")
PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wwfwfest_state, dsw_3f_r<1>)
PORT_START("P3")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
@ -628,7 +628,7 @@ static INPUT_PORTS_START( wwfwfest )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START3 )
PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_3f_r, "DSW1")
PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wwfwfest_state, dsw_3f_r<0>)
PORT_START("P4")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
@ -639,7 +639,7 @@ static INPUT_PORTS_START( wwfwfest )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START4 )
PORT_BIT( 0x0300, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_c0_r, "DSW1")
PORT_BIT( 0x0300, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wwfwfest_state, dsw_c0_r<0>)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )

View File

@ -140,7 +140,7 @@ public:
void rblaster(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(begas_vblank_r);
DECLARE_READ_LINE_MEMBER(begas_vblank_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
private:
@ -318,7 +318,7 @@ void deco_ld_state::rblaster_sound_map(address_map &map)
map(0xe000, 0xffff).rom();
}
CUSTOM_INPUT_MEMBER( deco_ld_state::begas_vblank_r )
READ_LINE_MEMBER( deco_ld_state::begas_vblank_r )
{
return m_screen->vpos() >= 240*2;
}
@ -361,7 +361,7 @@ static INPUT_PORTS_START( begas )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,deco_ld_state,begas_vblank_r, nullptr) // TODO: IPT_VBLANK doesn't seem to work fine?
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(deco_ld_state, begas_vblank_r) // TODO: IPT_VBLANK doesn't seem to work fine?
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "DSWA" )

View File

@ -69,8 +69,8 @@ public:
{
}
DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_status_r);
DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_command_r);
DECLARE_READ_LINE_MEMBER(laserdisc_status_r);
DECLARE_READ_LINE_MEMBER(laserdisc_command_r);
void init_fixed();
void init_variable();
@ -106,7 +106,7 @@ private:
return CLEAR_LINE;
}
uint8_t laserdisc_status_r()
uint8_t laserdisc_status_strobe_r()
{
if (m_ldv1000 != nullptr) return m_ldv1000->status_strobe_r();
return CLEAR_LINE;
@ -343,13 +343,13 @@ WRITE8_MEMBER(dlair_state::led_den2_w)
*
*************************************/
CUSTOM_INPUT_MEMBER(dlair_state::laserdisc_status_r)
READ_LINE_MEMBER(dlair_state::laserdisc_status_r)
{
return laserdisc_status_r();
return laserdisc_status_strobe_r();
}
CUSTOM_INPUT_MEMBER(dlair_state::laserdisc_command_r)
READ_LINE_MEMBER(dlair_state::laserdisc_command_r)
{
return (laserdisc_ready_r() == ASSERT_LINE) ? 0 : 1;
}
@ -563,8 +563,8 @@ static INPUT_PORTS_START( dlair )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, nullptr) /* status strobe */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, nullptr) /* command strobe */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dlair_state, laserdisc_status_r) /* status strobe */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dlair_state, laserdisc_command_r) /* command strobe */
INPUT_PORTS_END
@ -595,8 +595,8 @@ static INPUT_PORTS_START( dleuro )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, nullptr) /* status strobe */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, nullptr) /* command strobe */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dlair_state, laserdisc_status_r) /* status strobe */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dlair_state, laserdisc_command_r) /* command strobe */
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("A:1")

View File

@ -67,9 +67,9 @@ public:
void init_ecoinfr();
void init_ecoinfrmab();
DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel1_opto_r);
DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel2_opto_r);
DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel3_opto_r);
DECLARE_READ_LINE_MEMBER(reel1_opto_r);
DECLARE_READ_LINE_MEMBER(reel2_opto_r);
DECLARE_READ_LINE_MEMBER(reel3_opto_r);
private:
int irq_toggle;
@ -515,19 +515,19 @@ void ecoinfr_state::portmap(address_map &map)
map(0x18, 0x18).w(FUNC(ecoinfr_state::ec_port18_out_w)); // 24 (Watchdog)
}
CUSTOM_INPUT_MEMBER(ecoinfr_state::ecoinfr_reel1_opto_r)
READ_LINE_MEMBER(ecoinfr_state::reel1_opto_r)
{
if (m_optic_pattern & 0x1) return 1;
return 0;
}
CUSTOM_INPUT_MEMBER(ecoinfr_state::ecoinfr_reel2_opto_r)
READ_LINE_MEMBER(ecoinfr_state::reel2_opto_r)
{
if (m_optic_pattern & 0x2) return 1;
return 0;
}
CUSTOM_INPUT_MEMBER(ecoinfr_state::ecoinfr_reel3_opto_r)
READ_LINE_MEMBER(ecoinfr_state::reel3_opto_r)
{
if (m_optic_pattern & 0x4) return 1;
return 0;
@ -561,12 +561,12 @@ static INPUT_PORTS_START( ecoinfr_barx )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel1_opto_r, nullptr)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ecoinfr_state, reel1_opto_r)
PORT_DIPNAME( 0x02, 0x02, "IN1:02" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel3_opto_r, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel2_opto_r, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ecoinfr_state, reel3_opto_r)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ecoinfr_state, reel2_opto_r)
PORT_DIPNAME( 0x10, 0x10, "IN1:10" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )

View File

@ -502,14 +502,14 @@ static INPUT_PORTS_START( enigma2 )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, nullptr)
PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(enigma2_state, p1_controls_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, nullptr)
PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(enigma2_state, p2_controls_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW")
@ -557,7 +557,7 @@ static INPUT_PORTS_START( enigma2a )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(enigma2_state, p1_controls_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN1")
@ -565,7 +565,7 @@ static INPUT_PORTS_START( enigma2a )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, nullptr)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(enigma2_state, p2_controls_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW")

View File

@ -277,7 +277,7 @@ static INPUT_PORTS_START( common )
PORT_BIT( 0x00000008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, eolith_speedup_getvblank, nullptr)
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(eolith_state, speedup_vblank_r)
PORT_BIT( 0x00003f80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00008000, IP_ACTIVE_LOW )
@ -515,7 +515,7 @@ static INPUT_PORTS_START( stealsee )
PORT_INCLUDE(common)
PORT_MODIFY("IN0")
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, stealsee_speedup_getvblank, nullptr)
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(eolith_state, stealsee_speedup_vblank_r)
INPUT_PORTS_END
@ -1726,7 +1726,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(eolith_state::eolith_speedup)
}
}
CUSTOM_INPUT_MEMBER(eolith_state::eolith_speedup_getvblank)
READ_LINE_MEMBER(eolith_state::speedup_vblank_r)
{
// printf("%s:eolith speedup_read data %02x\n",machine().describe_context().c_str(), m_speedup_vblank);
@ -1735,7 +1735,7 @@ CUSTOM_INPUT_MEMBER(eolith_state::eolith_speedup_getvblank)
}
// StealSee doesn't use interrupts, just the vblank
CUSTOM_INPUT_MEMBER(eolith_state::stealsee_speedup_getvblank)
READ_LINE_MEMBER(eolith_state::stealsee_speedup_vblank_r)
{
int pc = m_maincpu->pc();

View File

@ -90,7 +90,7 @@ void eolith16_state::eolith16_map(address_map &map)
static INPUT_PORTS_START( eolith16 )
PORT_START("SPECIAL")
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith16_state, eolith_speedup_getvblank, nullptr)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(eolith16_state, speedup_vblank_r)
PORT_BIT( 0xff6f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")

View File

@ -583,7 +583,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(splndrbt_state::splndrbt_scanline)
/******************************************************************************/
// CPU Handlers
CUSTOM_INPUT_MEMBER(gekisou_state::gekisou_unknown_bit_r)
READ_LINE_MEMBER(gekisou_state::gekisou_unknown_bit_r)
{
return m_gekisou_unknown_bit;
}
@ -791,7 +791,7 @@ static INPUT_PORTS_START( gekisou )
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gekisou_state, gekisou_unknown_bit_r, nullptr)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(gekisou_state, gekisou_unknown_bit_r)
/* this is actually a variable resistor */
PORT_START(FRQ_ADJUSTER_TAG)

View File

@ -237,7 +237,7 @@ void exerion_state::sub_map(address_map &map)
/* verified from Z80 code */
static INPUT_PORTS_START( exerion )
PORT_START("IN0")
PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exerion_state, exerion_controls_r, nullptr)
PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(exerion_state, exerion_controls_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )

View File

@ -638,7 +638,7 @@ static INPUT_PORTS_START( teetert )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy_state,teetert_input_r, nullptr)
PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(exidy_state, teetert_input_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )

View File

@ -271,13 +271,13 @@ INPUT_CHANGED_MEMBER(exidy440_state::coin_inserted)
*
*************************************/
CUSTOM_INPUT_MEMBER(exidy440_state::firq_beam_r)
READ_LINE_MEMBER(exidy440_state::firq_beam_r)
{
return m_firq_beam;
}
CUSTOM_INPUT_MEMBER(exidy440_state::firq_vblank_r)
READ_LINE_MEMBER(exidy440_state::firq_vblank_r)
{
return m_firq_vblank;
}
@ -530,8 +530,8 @@ static INPUT_PORTS_START( crossbow )
PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -571,8 +571,8 @@ static INPUT_PORTS_START( cheyenne )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -612,8 +612,8 @@ static INPUT_PORTS_START( combat )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -653,8 +653,8 @@ static INPUT_PORTS_START( catch22 )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -696,8 +696,8 @@ static INPUT_PORTS_START( cracksht )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -734,8 +734,8 @@ static INPUT_PORTS_START( claypign )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -776,8 +776,8 @@ static INPUT_PORTS_START( chiller )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -815,8 +815,8 @@ static INPUT_PORTS_START( topsecex )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -852,7 +852,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( hitnmiss )
PORT_START("IN0") /* player inputs and logic board dips */
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,hitnmiss_button1_r, nullptr)
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(exidy440_state, hitnmiss_button1_r)
PORT_DIPNAME( 0x0c, 0x00, "Seconds" )
PORT_DIPSETTING( 0x04, "20" )
PORT_DIPSETTING( 0x00, "30" )
@ -863,8 +863,8 @@ static INPUT_PORTS_START( hitnmiss )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -896,7 +896,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( whodunit )
PORT_START("IN0") /* player inputs and logic board dips */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x04, "2" )
@ -908,8 +908,8 @@ static INPUT_PORTS_START( whodunit )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@ -947,8 +947,8 @@ static INPUT_PORTS_START( showdown )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE

View File

@ -77,7 +77,7 @@ public:
void famibox(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(famibox_coin_r);
DECLARE_READ_LINE_MEMBER(coin_r);
DECLARE_INPUT_CHANGED_MEMBER(famibox_keyswitch_changed);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
@ -421,7 +421,7 @@ INPUT_CHANGED_MEMBER(famibox_state::coin_inserted)
}
}
CUSTOM_INPUT_MEMBER(famibox_state::famibox_coin_r)
READ_LINE_MEMBER(famibox_state::coin_r)
{
return m_coins > 0;
}
@ -480,7 +480,7 @@ static INPUT_PORTS_START( famibox )
PORT_DIPSETTING( 0x08, "Key position 4" )
PORT_DIPSETTING( 0x10, "Key position 5" )
PORT_DIPSETTING( 0x20, "Key position 6" )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, famibox_state,famibox_coin_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(famibox_state, coin_r)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, famibox_state,coin_inserted, 0)

View File

@ -689,10 +689,10 @@ INPUT_PORTS_END
Wheels Runner
***************************************************************************/
template <int Player>
CUSTOM_INPUT_MEMBER(fantland_state::wheelrun_wheel_r)
{
int player = (uintptr_t)param;
int delta = ioport(player ? "WHEEL1" : "WHEEL0")->read();
int delta = m_wheel[Player]->read();
delta = (delta & 0x7f) - (delta & 0x80) + 4;
if (delta > 7) delta = 7;
@ -708,7 +708,7 @@ static INPUT_PORTS_START( wheelrun )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)0)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(fantland_state, wheelrun_wheel_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("53001") /* 53001 */
@ -716,7 +716,7 @@ static INPUT_PORTS_START( wheelrun )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)1)
PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(fantland_state, wheelrun_wheel_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("53002") /* 53002 */

View File

@ -110,7 +110,7 @@ READ8_MEMBER(fgoal_state::analog_r)
}
CUSTOM_INPUT_MEMBER(fgoal_state::_80_r)
READ_LINE_MEMBER(fgoal_state::_80_r)
{
uint8_t ret = (m_screen->vpos() & 0x80) ? 1 : 0;
@ -263,7 +263,7 @@ static INPUT_PORTS_START( fgoal )
/* extra credit score changes depending on player's performance */
PORT_START("IN1")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fgoal_state, _80_r, nullptr) /* 128V */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fgoal_state, _80_r) /* 128V */
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ))
PORT_DIPSETTING( 0x00, DEF_STR( Upright ))
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ))

View File

@ -69,8 +69,6 @@ public:
m_mainbank(*this, "mainbank")
{ }
DECLARE_CUSTOM_INPUT_MEMBER(mainflag_r);
DECLARE_CUSTOM_INPUT_MEMBER(soundflag_r);
void firefox(machine_config &config);
private:
@ -330,16 +328,6 @@ WRITE8_MEMBER(firefox_state::firefox_objram_bank_w)
*
*************************************/
CUSTOM_INPUT_MEMBER(firefox_state::mainflag_r)
{
return m_soundlatch->pending_r() ? 1 : 0;
}
CUSTOM_INPUT_MEMBER(firefox_state::soundflag_r)
{
return m_soundlatch2->pending_r() ? 1 : 0;
}
WRITE_LINE_MEMBER(firefox_state::sound_reset_w)
{
m_audiocpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE);
@ -540,8 +528,8 @@ static INPUT_PORTS_START( firefox )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("rdin1")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,mainflag_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,soundflag_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch2", generic_latch_8_device, pending_r)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )

View File

@ -178,25 +178,27 @@ READ8_MEMBER(firetrk_state::montecar_dip_r)
}
CUSTOM_INPUT_MEMBER(firetrk_state::steer_dir_r)
template <int P>
READ_LINE_MEMBER(firetrk_state::steer_dir_r)
{
return m_steer_dir[(uintptr_t)param];
return m_steer_dir[P];
}
CUSTOM_INPUT_MEMBER(firetrk_state::steer_flag_r)
template <int P>
READ_LINE_MEMBER(firetrk_state::steer_flag_r)
{
return m_steer_flag[(uintptr_t)param];
return m_steer_flag[P];
}
CUSTOM_INPUT_MEMBER(firetrk_state::skid_r)
template <int P>
READ_LINE_MEMBER(firetrk_state::skid_r)
{
uint32_t ret;
int which = (uintptr_t)param;
if (which != 2)
ret = m_skid[which];
if (P != 2)
ret = m_skid[P];
else
ret = m_skid[0] | m_skid[1];
@ -204,13 +206,13 @@ CUSTOM_INPUT_MEMBER(firetrk_state::skid_r)
}
CUSTOM_INPUT_MEMBER(firetrk_state::crash_r)
template <int P>
READ_LINE_MEMBER(firetrk_state::crash_r)
{
uint32_t ret;
int which = (uintptr_t)param;
if (which != 2)
ret = m_crash[which];
if (P != 2)
ret = m_crash[P];
else
ret = m_crash[0] | m_crash[1];
@ -218,9 +220,10 @@ CUSTOM_INPUT_MEMBER(firetrk_state::crash_r)
}
CUSTOM_INPUT_MEMBER(firetrk_state::gear_r)
template <int P>
READ_LINE_MEMBER(firetrk_state::gear_r)
{
return (m_gear == (uintptr_t)param) ? 1 : 0;
return (m_gear == P) ? 1 : 0;
}
@ -417,11 +420,11 @@ static INPUT_PORTS_START( firetrk )
PORT_START("BIT_0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas") PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_dir_r, (void *)0)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_dir_r, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_dir_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_dir_r<1>)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Bell") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_TILT )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, skid_r, (void *)2)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, skid_r<2>)
PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state, service_mode_switch_changed, 0)
PORT_START("BIT_6")
@ -439,11 +442,11 @@ static INPUT_PORTS_START( firetrk )
PORT_START("BIT_7")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_flag_r, (void *)0)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_flag_r, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_flag_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_flag_r<1>)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, crash_r, (void *)2)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, crash_r<2>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Diag Step")
PORT_START("HORN")
@ -485,23 +488,23 @@ static INPUT_PORTS_START( superbug )
PORT_DIPSETTING( 0xc0, DEF_STR( German ) )
PORT_START("BIT_0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)1)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<1>)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_dir_r, (void *)0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_dir_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MEMORY_RESET ) PORT_NAME("Hiscore Reset")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_SERVICE( 0x20, IP_ACTIVE_HIGH )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, skid_r, (void *)0)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, skid_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT )
PORT_START("BIT_7")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)0)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_flag_r, (void *)0)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<2>)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<0>)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_flag_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, crash_r, (void *)0)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, crash_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select")
PORT_START("GEAR")
@ -557,14 +560,14 @@ static INPUT_PORTS_START( montecar )
PORT_DIPSETTING( 0x00, DEF_STR( German ) )
PORT_START("BIT_6")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)2)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<0>)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<1>)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<2>)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_dir_r, (void *)0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, skid_r, (void *)1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_dir_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, skid_r<1>)
PORT_START("BIT_7")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
@ -573,8 +576,8 @@ static INPUT_PORTS_START( montecar )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_flag_r, (void *)0)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, skid_r, (void *)0)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_flag_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, skid_r<0>)
PORT_START("GEAR")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state, gear_changed, 0)

View File

@ -125,7 +125,7 @@ static INPUT_PORTS_START( flicker )
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Door Slam") PORT_CODE(KEYCODE_HOME) PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0)
PORT_BIT(0x001c, IP_ACTIVE_HIGH, IPT_UNKNOWN) // called "two coins", "three coins", "four coins" in patent, purpose unknown
PORT_BIT(0x07e0, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, flicker_state, coins_in, nullptr)
PORT_BIT(0x07e0, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(flicker_state, coins_in)
PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_TILT)
PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_START) PORT_NAME("Credit Button") PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0)
PORT_BIT(0x6000, IP_ACTIVE_HIGH, IPT_UNUSED)

View File

@ -506,7 +506,7 @@ static INPUT_PORTS_START( victnine )
/* bits 0,1 are MCU related:
- bit 0: mcu is ready to receive data from main cpu
- bit 1: mcu has sent data to the main cpu */
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, flstory_state,victnine_mcu_status_bit01_r, nullptr)
PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(flstory_state, victnine_mcu_status_bit01_r)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 )

View File

@ -67,17 +67,17 @@ READ16_MEMBER(fromanc2_state::keymatrix_r)
return ret;
}
CUSTOM_INPUT_MEMBER(fromanc2_state::subcpu_int_r)
READ_LINE_MEMBER(fromanc2_state::subcpu_int_r)
{
return m_subcpu_int_flag & 0x01;
}
CUSTOM_INPUT_MEMBER(fromanc2_state::sndcpu_nmi_r)
READ_LINE_MEMBER(fromanc2_state::sndcpu_nmi_r)
{
return m_sndcpu_nmi_flag & 0x01;
}
CUSTOM_INPUT_MEMBER(fromanc2_state::subcpu_nmi_r)
READ_LINE_MEMBER(fromanc2_state::subcpu_nmi_r)
{
return m_subcpu_nmi_flag & 0x01;
}
@ -304,9 +304,9 @@ static INPUT_PORTS_START( fromanc2 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_int_r, nullptr) // SUBCPU INT FLAG
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, nullptr) // SNDCPU NMI FLAG
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_nmi_r, nullptr) // SUBCPU NMI FLAG
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fromanc2_state, subcpu_int_r) // SUBCPU INT FLAG
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fromanc2_state, sndcpu_nmi_r) // SNDCPU NMI FLAG
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fromanc2_state, subcpu_nmi_r) // SUBCPU NMI FLAG
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (1P)" ) PORT_CODE(KEYCODE_F2) // TEST (1P)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (2P)" ) PORT_CODE(KEYCODE_F2) // TEST (2P)
@ -405,7 +405,7 @@ static INPUT_PORTS_START( fromanc4 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, nullptr) // SNDCPU NMI FLAG
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fromanc2_state, sndcpu_nmi_r) // SNDCPU NMI FLAG
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )

View File

@ -1968,6 +1968,50 @@ ROM_END
WORLD RALLY 2
============================================================================*/
/***************************************************************************
World Rally 2 analog controls
- added by Mirko Mattioli <els@fastwebnet.it>
---------------------------------------------------------------
WR2 pcb has two ADC, one for each player. The ADCs have in common
the clock signal line (adc_clk) and the chip enable signal line
(adc_cs) and, of course, two different data out signal lines.
When "Pot Wheel" option is selected via dip-switch, then the gear
is enabled (low/high shifter); the gear is disabled in joy mode by
the CPU program code. No brakes are present in this game.
Analog controls routines come from modified code wrote by Aaron
Giles for gaelco3d driver.
***************************************************************************/
template <int N>
READ_LINE_MEMBER(wrally2_state::wrally2_analog_bit_r)
{
return (m_analog_ports[N] >> 7) & 0x01;
}
WRITE_LINE_MEMBER(wrally2_state::wrally2_adc_clk)
{
/* a zero/one combo is written here to clock the next analog port bit */
if (!state)
{
m_analog_ports[0] <<= 1;
m_analog_ports[1] <<= 1;
}
}
WRITE_LINE_MEMBER(wrally2_state::wrally2_adc_cs)
{
/* a zero is written here to read the analog ports, and a one is written when finished */
if (!state)
{
m_analog_ports[0] = m_analog0->read();
m_analog_ports[1] = m_analog1->read();
}
}
void wrally2_state::wrally2_map(address_map &map)
{
map(0x000000, 0x0fffff).rom(); /* ROM */
@ -1994,7 +2038,7 @@ static INPUT_PORTS_START( wrally2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Acc.")
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Gear") PORT_TOGGLE
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, wrally2_state,wrally2_analog_bit_r, (void *)0x00) /* ADC_1 serial input */
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(wrally2_state, wrally2_analog_bit_r<0>) /* ADC_1 serial input */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
PORT_SERVICE_DIPLOC( 0x0100, IP_ACTIVE_LOW, "SW2:1" )
PORT_DIPNAME( 0x0200, 0x0000, "Coin mechanism" ) PORT_DIPLOCATION("SW2:2")
@ -2052,7 +2096,7 @@ static INPUT_PORTS_START( wrally2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Acc.")
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Gear") PORT_TOGGLE
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, wrally2_state,wrally2_analog_bit_r, (void *)0x01) /* ADC_2 serial input */
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(wrally2_state, wrally2_analog_bit_r<1>) /* ADC_2 serial input */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN2 )

View File

@ -305,10 +305,10 @@ WRITE16_MEMBER(gaelco3d_state::sound_status_w)
*
*************************************/
CUSTOM_INPUT_MEMBER(gaelco3d_state::analog_bit_r)
template <int N>
READ_LINE_MEMBER(gaelco3d_state::analog_bit_r)
{
int which = (uintptr_t)param;
return (m_analog_ports[which] >> 7) & 0x01;
return (m_analog_ports[N] >> 7) & 0x01;
}
@ -337,10 +337,10 @@ WRITE_LINE_MEMBER(gaelco3d_state::analog_port_latch_w)
}
}
CUSTOM_INPUT_MEMBER(gaelco3d_state::fp_analog_bit_r)
template <int N>
READ_LINE_MEMBER(gaelco3d_state::fp_analog_bit_r)
{
int which = (uintptr_t)param;
return (m_fp_analog_ports[which] >> m_fp_clock) & 1;
return (m_fp_analog_ports[N] >> m_fp_clock) & 1;
}
WRITE_LINE_MEMBER(gaelco3d_state::fp_analog_clock_w)
@ -747,10 +747,10 @@ static INPUT_PORTS_START( speedup )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // checked after reading analog from port 1
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) // checked after reading analog from port 2
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // checked after reading analog from port 3
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0)
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1)
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3)
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<0>)
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<1>)
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<2>)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<3>)
PORT_START("IN3")
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 ) // verified
@ -786,10 +786,10 @@ static INPUT_PORTS_START( surfplnt )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x0800, IP_ACTIVE_LOW )
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0)
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1)
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3)
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<0>)
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<1>)
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<2>)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<3>)
PORT_START("IN3")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -823,10 +823,10 @@ static INPUT_PORTS_START( radikalb )
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x08000000, IP_ACTIVE_LOW )
PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0)
PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1)
PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2)
PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3)
PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<0>)
PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<1>)
PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<2>)
PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<3>)
PORT_START("IN3")
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@ -868,8 +868,8 @@ static INPUT_PORTS_START( footbpow )
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x08000000, IP_ACTIVE_LOW )
PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,fp_analog_bit_r, (void *)1)
PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,fp_analog_bit_r, (void *)0)
PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, fp_analog_bit_r<1>)
PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, fp_analog_bit_r<0>)
PORT_BIT( 0xc0000000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3")

View File

@ -70,7 +70,7 @@ void galastrm_state::tc0610_w(offs_t offset, u16 data)
}
CUSTOM_INPUT_MEMBER(galastrm_state::frame_counter_r)
READ_LINE_MEMBER(galastrm_state::frame_counter_r)
{
return m_frame_counter;
}
@ -113,7 +113,7 @@ void galastrm_state::main_map(address_map &map)
static INPUT_PORTS_START( galastrm )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state, frame_counter_r, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galastrm_state, frame_counter_r)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )

View File

@ -70,8 +70,8 @@ public:
void lastfour(machine_config &config);
void magjoker(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(ticket_r);
DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
DECLARE_READ_LINE_MEMBER(ticket_r);
DECLARE_READ_LINE_MEMBER(hopper_r);
protected:
virtual void machine_start() override;
@ -297,12 +297,12 @@ WRITE16_MEMBER(galaxi_state::_500004_w)
show_out();
}
CUSTOM_INPUT_MEMBER(galaxi_state::ticket_r)
READ_LINE_MEMBER(galaxi_state::ticket_r)
{
return m_ticket && !(m_screen->frame_number() % 10);
}
CUSTOM_INPUT_MEMBER(galaxi_state::hopper_r)
READ_LINE_MEMBER(galaxi_state::hopper_r)
{
return m_hopper && !(m_screen->frame_number() % 10);
}
@ -376,11 +376,11 @@ static INPUT_PORTS_START( galaxi )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_POKER_HOLD5 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, hopper_r, nullptr) // hopper sensor
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(galaxi_state, hopper_r) // hopper sensor
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(5) // coin a
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(5) // coin b (token)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_COIN3 ) // pin 25LC
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, ticket_r, nullptr) // ticket sensor
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxi_state, ticket_r) // ticket sensor
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM ) // hopper out (pin 14LS)
PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_HIGH ) // test
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM ) // (pin 26LC)
@ -396,11 +396,11 @@ static INPUT_PORTS_START( magjoker )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_POKER_HOLD5 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, hopper_r, nullptr) // hopper sensor
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxi_state, hopper_r) // hopper sensor
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(5) // coin a
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(5) // coin b (token)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper Refill") PORT_CODE(KEYCODE_H)
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, ticket_r, nullptr) // ticket sensor
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxi_state, ticket_r) // ticket sensor
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM ) // hopper out (pin 14LS)
PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_HIGH ) // test
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_GAMBLE_KEYOUT ) // (pin 26LC)

View File

@ -929,8 +929,8 @@ READ8_MEMBER(galaxian_state::theend_protection_r)
return m_protection_result;
}
CUSTOM_INPUT_MEMBER(galaxian_state::theend_protection_alt_r)
template <int N>
READ_LINE_MEMBER(galaxian_state::theend_protection_alt_r)
{
/*
Handled by a custom IC. Holds two bits derived from the upper bit of
@ -1231,16 +1231,16 @@ WRITE8_MEMBER(galaxian_state::scorpion_digitalker_control_w)
*
*************************************/
INPUT_CHANGED_MEMBER(galaxian_state::gmgalax_game_changed)
INPUT_CHANGED_MEMBER(gmgalax_state::game_changed)
{
address_space &space = m_maincpu->space(AS_PROGRAM);
/* new value is the selected game */
m_gmgalax_selected_game = newval;
m_selected_game = newval;
/* select the bank and graphics bank based on it */
membank("bank1")->set_entry(m_gmgalax_selected_game);
galaxian_gfxbank_w(space, 0, m_gmgalax_selected_game);
membank("bank1")->set_entry(m_selected_game);
galaxian_gfxbank_w(space, 0, m_selected_game);
/* reset the stars */
galaxian_stars_enable_w(space, 0, 0);
@ -1250,12 +1250,10 @@ INPUT_CHANGED_MEMBER(galaxian_state::gmgalax_game_changed)
}
CUSTOM_INPUT_MEMBER(galaxian_state::gmgalax_port_r)
template <int N>
CUSTOM_INPUT_MEMBER(gmgalax_state::port_r)
{
const char *portname = (const char *)param;
if (m_gmgalax_selected_game != 0)
portname += strlen(portname) + 1;
return ioport(portname)->read();
return (m_selected_game != 0 ? m_glin : m_gmin)[N]->read();
}
@ -1305,9 +1303,10 @@ WRITE8_MEMBER(galaxian_state::zigzag_ay8910_w)
*
*************************************/
CUSTOM_INPUT_MEMBER(galaxian_state::azurian_port_r)
template <int N>
READ_LINE_MEMBER(galaxian_state::azurian_port_r)
{
return (ioport("FAKE")->read() >> (uintptr_t)param) & 1;
return (ioport("FAKE")->read() >> N) & 1;
}
@ -1318,14 +1317,14 @@ CUSTOM_INPUT_MEMBER(galaxian_state::azurian_port_r)
*
*************************************/
CUSTOM_INPUT_MEMBER(galaxian_state::kingball_muxbit_r)
READ_LINE_MEMBER(galaxian_state::kingball_muxbit_r)
{
/* multiplex the service mode switch with a speech DIP switch */
return (ioport("FAKE")->read() >> m_kingball_speech_dip) & 1;
}
CUSTOM_INPUT_MEMBER(galaxian_state::kingball_noise_r)
READ_LINE_MEMBER(galaxian_state::kingball_noise_r)
{
/* bit 5 is the NOISE line from the sound circuit. The code just verifies
that it's working, doesn't actually use return value, so we can just use
@ -2867,7 +2866,7 @@ static INPUT_PORTS_START( azurian )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, azurian_port_r, (void *)0) /* "linked" with bit 2 of IN2 */
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, azurian_port_r<0>) /* "linked" with bit 2 of IN2 */
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x80, "5" )
@ -2879,7 +2878,7 @@ static INPUT_PORTS_START( azurian )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "5000" )
PORT_DIPSETTING( 0x02, "7000" )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, azurian_port_r, (void *)1) /* "linked" with bit 6 of IN1 */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, azurian_port_r<1>) /* "linked" with bit 6 of IN1 */
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
@ -3491,13 +3490,13 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gmgalax )
PORT_START("IN0")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN0\0GLIN0")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(gmgalax_state, port_r<0>)
PORT_START("IN1")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN1\0GLIN1")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(gmgalax_state, port_r<1>)
PORT_START("IN2")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN2\0GLIN2")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(gmgalax_state, port_r<2>)
PORT_START("GMIN0") /* Ghost Muncher - IN0 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01)
@ -3575,7 +3574,7 @@ static INPUT_PORTS_START( gmgalax )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("GAMESEL") /* fake - game select */
PORT_DIPNAME( 0x01, 0x00, "Game Select") PORT_CODE(KEYCODE_F1) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_game_changed, 0)
PORT_DIPNAME( 0x01, 0x00, "Game Select") PORT_CODE(KEYCODE_F1) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, gmgalax_state, game_changed, 0)
PORT_DIPSETTING( 0x00, "Ghost Muncher" )
PORT_DIPSETTING( 0x01, "Galaxian" )
INPUT_PORTS_END
@ -4328,14 +4327,14 @@ static INPUT_PORTS_START( kingball )
PORT_INCLUDE(galaxian)
PORT_MODIFY("IN0")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_muxbit_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, kingball_muxbit_r)
/* Relating to above port:Hack? - possibly multiplexed via writes to $b003 */
//PORT_DIPNAME( 0x40, 0x40, "Speech" )
//PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
//PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_MODIFY("IN1")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_noise_r, nullptr) /* NOISE line */
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, kingball_noise_r) /* NOISE line */
PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) )
@ -4826,9 +4825,9 @@ static INPUT_PORTS_START( theend )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, theend_protection_alt_r, (void *)0) /* protection bit */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, theend_protection_alt_r<0>) /* protection bit */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, theend_protection_alt_r, (void *)1) /* protection bit */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, theend_protection_alt_r<1>) /* protection bit */
PORT_START("IN3") /* need for some PPI accesses */
PORT_BIT( 0xff, 0x00, IPT_UNUSED )
@ -4870,9 +4869,9 @@ static INPUT_PORTS_START( scramble )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, theend_protection_alt_r, (void *)0) /* protection bit */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, theend_protection_alt_r<0>) /* protection bit */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, theend_protection_alt_r, (void *)1) /* protection bit */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, theend_protection_alt_r<1>) /* protection bit */
PORT_START("IN3") /* need for some PPI accesses */
PORT_BIT( 0xff, 0x00, IPT_UNUSED )
@ -5348,7 +5347,7 @@ CUSTOM_INPUT_MEMBER(galaxian_state::moonwar_dial_r)
/* verified from Z80 code */
static INPUT_PORTS_START( moonwar )
PORT_START("IN0")
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, moonwar_dial_r, nullptr)
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxian_state, moonwar_dial_r)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // cocktail: p2 shield
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
@ -6183,14 +6182,14 @@ void galaxian_state::zigzag(machine_config &config)
}
void galaxian_state::gmgalax(machine_config &config)
void gmgalax_state::gmgalax(machine_config &config)
{
galaxian(config);
/* banked video hardware */
m_gfxdecode->set_info(gfx_gmgalax);
m_palette->set_entries(64);
m_palette->set_init(FUNC(galaxian_state::galaxian_palette));
m_palette->set_init(FUNC(gmgalax_state::galaxian_palette));
}
@ -7073,20 +7072,20 @@ void galaxian_state::init_azurian()
}
void galaxian_state::init_gmgalax()
void gmgalax_state::init_gmgalax()
{
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::gmgalax_extend_tile_info, &galaxian_state::gmgalax_extend_sprite_info);
common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &gmgalax_state::gmgalax_extend_tile_info, &gmgalax_state::gmgalax_extend_sprite_info);
/* ROM is banked */
space.install_read_bank(0x0000, 0x3fff, "bank1");
membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x4000);
/* callback when the game select is toggled */
gmgalax_game_changed(*machine().ioport().ports().begin()->second->fields().first(), 0, 0, 0);
save_item(NAME(m_gmgalax_selected_game));
game_changed(*machine().ioport().ports().begin()->second->fields().first(), 0, 0, 0);
save_item(NAME(m_selected_game));
}
@ -12777,7 +12776,7 @@ GAME( 1982, zigzagb, 0, zigzag, zigzag, galaxian_state, init_
GAME( 1982, zigzagb2, zigzagb, zigzag, zigzag, galaxian_state, init_zigzag, ROT90, "bootleg (LAX)", "Zig Zag (Dig Dug conversion on Galaxian hardware, bootleg set 2)", MACHINE_SUPPORTS_SAVE )
/* multi-game select via external switch */
GAME( 1981, gmgalax, 0, gmgalax, gmgalax, galaxian_state, init_gmgalax, ROT90, "bootleg", "Ghostmuncher Galaxian (bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, gmgalax, 0, gmgalax, gmgalax, gmgalax_state, init_gmgalax, ROT90, "bootleg", "Ghostmuncher Galaxian (bootleg)", MACHINE_SUPPORTS_SAVE )
// Multigames
GAME( 2002, fourplay, 0, fourplay, galaxian, galaxian_state, init_fourplay, ROT90, "Macro", "Four Play", MACHINE_SUPPORTS_SAVE )

View File

@ -837,19 +837,18 @@ void galaxold_state::bullsdrtg_data_map(address_map &map)
}
/* Lives Dips are spread across two input ports */
CUSTOM_INPUT_MEMBER(galaxold_state::vpool_lives_r)
template <int Mask>
READ_LINE_MEMBER(galaxold_state::vpool_lives_r)
{
int bit_mask = (uintptr_t)param;
switch (bit_mask)
switch (Mask)
{
case 0x40: /* vpool : IN1 (0xa800) bit 6 */
return ((ioport("LIVES")->read() & bit_mask) >> 6);
return ((ioport("LIVES")->read() & Mask) >> 6);
case 0x01: /* vpool : DSW (0xb000) bit 0 */
return ((ioport("LIVES")->read() & bit_mask) >> 0);
return ((ioport("LIVES")->read() & Mask) >> 0);
default:
logerror("vpool_lives_r : invalid %02X bit_mask\n",bit_mask);
logerror("vpool_lives_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@ -873,11 +872,11 @@ static INPUT_PORTS_START( vpool )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,vpool_lives_r, (void *)0x40)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, vpool_lives_r<0x40>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,vpool_lives_r, (void *)0x01)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, vpool_lives_r<0x01>)
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x02, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
@ -1080,24 +1079,23 @@ INPUT_PORTS_END
/* Coinage Dips are spread across two input ports */
template <int Mask>
CUSTOM_INPUT_MEMBER(galaxold_state::ckongg_coinage_r)
{
int bit_mask = (uintptr_t)param;
switch (bit_mask)
switch (Mask)
{
case 0x0c: /* ckongg : DSW (0xc800) bits 2 and 3 */
return ((ioport("COINAGE")->read() & bit_mask) >> 2);
return ((ioport("COINAGE")->read() & Mask) >> 2);
case 0x40: /* ckongg : IN1 (0xc400) bit 6 */
return ((ioport("COINAGE")->read() & bit_mask) >> 6);
return ((ioport("COINAGE")->read() & Mask) >> 6);
case 0xc0: /* ckongmc : IN1 (0xa800) bits 6 and 7 */
return ((ioport("COINAGE")->read() & bit_mask) >> 6);
return ((ioport("COINAGE")->read() & Mask) >> 6);
case 0x01: /* ckongmc : DSW (0xb000) bit 0 */
return ((ioport("COINAGE")->read() & bit_mask) >> 0);
return ((ioport("COINAGE")->read() & Mask) >> 0);
default:
logerror("ckongg_coinage_r : invalid %02X bit_mask\n",bit_mask);
logerror("ckongg_coinage_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@ -1121,7 +1119,7 @@ static INPUT_PORTS_START( ckongg )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0x40)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, ckongg_coinage_r<0x40>)
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
@ -1132,7 +1130,7 @@ static INPUT_PORTS_START( ckongg )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x03, "6" )
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0x0c)
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, ckongg_coinage_r<0x0c>)
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("COINAGE")
@ -1166,10 +1164,10 @@ static INPUT_PORTS_START( ckongmc )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0xc0)
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, ckongg_coinage_r<0xc0>)
PORT_START("DSW")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0x01)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, ckongg_coinage_r<0x01>)
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x02, "4" )
@ -1417,6 +1415,14 @@ static INPUT_PORTS_START( scrambler )
INPUT_PORTS_END
template <int Mask>
READ_LINE_MEMBER(galaxold_state::_4in1_fake_port_r)
{
static const char *const portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" };
return (ioport(portnames[m__4in1_bank])->read() & Mask) ? 1 : 0;
}
static INPUT_PORTS_START( 4in1 )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
@ -1437,18 +1443,18 @@ static INPUT_PORTS_START( 4in1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x40) // See fake ports
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x80) // See fake ports
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x40>) // See fake ports
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x80>) // See fake ports
PORT_START("DSW0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x01) // See fake ports
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x02) // See fake ports
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x01>) // See fake ports
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x02>) // See fake ports
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" ) // 2 when continue (Scramble PT2)
PORT_DIPSETTING( 0x04, "5" ) // 2 when continue (Scramble PT2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x08) // See fake ports
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x10) // See fake ports
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x20) // See fake ports
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x08>) // See fake ports
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x10>) // See fake ports
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x20>) // fake ports
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("FAKE1") /* The Ghost Muncher PT3 - FAKE DSW0 (bits 0 to 5) and IN1 (bits 6 and 7) */
@ -1592,19 +1598,18 @@ INPUT_PORTS_END
/* Coinage Dips are spread across two input ports */
template <int Mask>
CUSTOM_INPUT_MEMBER(galaxold_state::dkongjrm_coinage_r)
{
int bit_mask = (uintptr_t)param;
switch (bit_mask)
switch (Mask)
{
case 0xc0: /* dkongjrm : IN1 (0xa8??) bits 6 and 7 */
return ((ioport("COINAGE")->read() & bit_mask) >> 6);
return ((ioport("COINAGE")->read() & Mask) >> 6);
case 0x01: /* dkongjrm : DSW (0xb0??) bit 0 */
return ((ioport("COINAGE")->read() & bit_mask) >> 0);
return ((ioport("COINAGE")->read() & Mask) >> 0);
default:
logerror("dkongjrm_coinage_r : invalid %02X bit_mask\n",bit_mask);
logerror("dkongjrm_coinage_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@ -1628,10 +1633,10 @@ static INPUT_PORTS_START( dkongjrm )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,dkongjrm_coinage_r, (void *)0xc0)
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, dkongjrm_coinage_r<0xc0>)
PORT_START("DSW")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,dkongjrm_coinage_r, (void *)0x01)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, dkongjrm_coinage_r<0x01>)
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x02, "4" )

View File

@ -277,12 +277,10 @@ void gottlieb_state::machine_reset()
*
*************************************/
CUSTOM_INPUT_MEMBER(gottlieb_state::analog_delta_r)
template <int N>
CUSTOM_INPUT_MEMBER(gottlieb_state::track_delta_r)
{
const char *string = (const char *)param;
int which = string[0] - '0';
return ioport(&string[1])->read() - m_track[which];
return (N ? m_track_y : m_track_x)->read() - m_track[N];
}
@ -837,10 +835,10 @@ static INPUT_PORTS_START( reactor )
PORT_BIT ( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2") /* trackball H */
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "0TRACKX")
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<0>)
PORT_START("IN3") /* trackball V */
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY")
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<1>)
PORT_START("IN4")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
@ -1048,10 +1046,10 @@ static INPUT_PORTS_START( argusg )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2") /* trackball H */
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "0TRACKX")
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<0>)
PORT_START("IN3") /* trackball V */
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY")
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<1>)
/* NOTE: Buttons are shared for both players; are mirrored to each side of the controller */
PORT_START("IN4")
@ -1105,7 +1103,7 @@ static INPUT_PORTS_START( mplanets )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN3") /* trackball V (dial) */
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY")
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<1>)
PORT_START("IN4")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
@ -1584,7 +1582,7 @@ static INPUT_PORTS_START( 3stooges )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN4") /* joystick inputs */
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,stooges_joystick_r, nullptr)
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, stooges_joystick_r)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(3)
@ -1696,7 +1694,7 @@ static INPUT_PORTS_START( wizwarz )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN3") /* trackball V is a dial input */
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY")
PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<1>)
PORT_START("IN4") /* ? */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY

View File

@ -161,9 +161,9 @@ public:
void init_gstream();
void init_x2222();
DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_service_r);
DECLARE_READ_LINE_MEMBER(mirror_service_r);
DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_r);
DECLARE_CUSTOM_INPUT_MEMBER(x2222_toggle_r);
DECLARE_READ_LINE_MEMBER(x2222_toggle_r);
private:
/* devices */
@ -212,14 +212,14 @@ private:
void x2222_io(address_map &map);
};
CUSTOM_INPUT_MEMBER(gstream_state::x2222_toggle_r) // or the game hangs when starting, might be a status flag for the sound?
READ_LINE_MEMBER(gstream_state::x2222_toggle_r) // or the game hangs when starting, might be a status flag for the sound?
{
m_toggle ^= 0xffff;
return m_toggle;
}
CUSTOM_INPUT_MEMBER(gstream_state::gstream_mirror_service_r)
READ_LINE_MEMBER(gstream_state::mirror_service_r)
{
int result;
@ -427,10 +427,10 @@ static INPUT_PORTS_START( gstream )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x7000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_service_r, nullptr)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(gstream_state, mirror_service_r)
PORT_START("IN2")
PORT_BIT( 0x004f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_r, nullptr)
PORT_BIT( 0x004f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gstream_state, gstream_mirror_r)
PORT_BIT( 0xffb0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@ -522,7 +522,7 @@ static INPUT_PORTS_START( x2222 )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,x2222_toggle_r, nullptr)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(gstream_state, x2222_toggle_r)
INPUT_PORTS_END

View File

@ -678,7 +678,7 @@ public:
u8 m_motor_pos;
TIMER_DEVICE_CALLBACK_MEMBER(motor_sim_tick);
DECLARE_CUSTOM_INPUT_MEMBER(motor_switch);
DECLARE_READ_LINE_MEMBER(motor_switch_r);
DECLARE_WRITE8_MEMBER(write_l);
DECLARE_WRITE8_MEMBER(write_d);
@ -703,7 +703,7 @@ void lchicken_state::machine_start()
// handlers
CUSTOM_INPUT_MEMBER(lchicken_state::motor_switch)
READ_LINE_MEMBER(lchicken_state::motor_switch_r)
{
return m_motor_pos > 0xe8; // approximation
}
@ -782,7 +782,7 @@ static INPUT_PORTS_START( lchicken )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, lchicken_state, motor_switch, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(lchicken_state, motor_switch_r)
INPUT_PORTS_END
void lchicken_state::lchicken(machine_config &config)

View File

@ -62,7 +62,7 @@ public:
void init_brailab4();
DECLARE_CUSTOM_INPUT_MEMBER(cass3_r);
DECLARE_READ_LINE_MEMBER(cass3_r);
private:
DECLARE_READ8_MEMBER(key_r);
@ -170,7 +170,7 @@ WRITE8_MEMBER( homelab_state::brailab4_portff_w )
membank("bank1")->set_entry(1);
}
CUSTOM_INPUT_MEMBER( homelab_state::cass3_r )
READ_LINE_MEMBER( homelab_state::cass3_r )
{
return (m_cass->input() > 0.03);
}
@ -362,7 +362,7 @@ static INPUT_PORTS_START( homelab3 ) // F4 to F8 are foreign characters
PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("X3")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homelab_state, cass3_r, " ")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homelab_state, cass3_r)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
@ -475,7 +475,7 @@ static INPUT_PORTS_START( brailab4 ) // F4 to F8 are foreign characters
PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("X3")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homelab_state, cass3_r, " ")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homelab_state, cass3_r)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)

View File

@ -126,12 +126,12 @@ void homerun_state::io_map(address_map &map)
}
CUSTOM_INPUT_MEMBER(homerun_state::homerun_d7756_busy_r)
READ_LINE_MEMBER(homerun_state::homerun_d7756_busy_r)
{
return m_samples->playing(0) ? 0 : 1;
}
CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_d7756_busy_r)
READ_LINE_MEMBER(homerun_state::ganjaja_d7756_busy_r)
{
return m_d7756->busy_r();
}
@ -152,8 +152,8 @@ CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_hopper_status_r)
static INPUT_PORTS_START( homerun )
PORT_START("IN0")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, sprite0_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_d7756_busy_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, sprite0_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, homerun_d7756_busy_r)
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN1")
@ -189,7 +189,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( dynashot )
PORT_START("IN0")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, sprite0_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, sprite0_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // doesn't have d7756
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@ -227,8 +227,8 @@ static INPUT_PORTS_START( ganjaja )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ?
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, sprite0_r, nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_d7756_busy_r, nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, sprite0_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, ganjaja_d7756_busy_r)
PORT_BIT( 0x36, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN1")
@ -236,7 +236,7 @@ static INPUT_PORTS_START( ganjaja )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P1 Down / Paper")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P1 Right / Scissors")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) // unused?
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_hopper_status_r, nullptr)
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(homerun_state, ganjaja_hopper_status_r)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )

View File

@ -156,7 +156,7 @@ static INPUT_PORTS_START( icecold )
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP)
PORT_BIT(0x55, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, icecold_state, motors_limit_r, nullptr)
PORT_BIT(0x55, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(icecold_state, motors_limit_r)
PORT_START("X0")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START1)

View File

@ -66,7 +66,7 @@ public:
void init_jingbell();
void init_jingbelli();
DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
DECLARE_READ_LINE_MEMBER(hopper_r);
private:
DECLARE_WRITE8_MEMBER(reel1_ram_w);
@ -387,7 +387,7 @@ uint32_t igs009_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
***************************************************************************/
CUSTOM_INPUT_MEMBER(igs009_state::hopper_r)
READ_LINE_MEMBER(igs009_state::hopper_r)
{
return m_hopper && !(m_screen->frame_number()%10);
}
@ -698,7 +698,7 @@ static INPUT_PORTS_START( jingbell )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Memory Clear") // stats, memory
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igs009_state,hopper_r, nullptr) // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs009_state, hopper_r) // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Pay Out")
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // test (press during boot)

View File

@ -100,7 +100,7 @@ public:
{
}
DECLARE_CUSTOM_INPUT_MEMBER(igs_hopper_r);
DECLARE_READ_LINE_MEMBER(igs_hopper_r);
void init_lhbv33c();
void init_drgnwrldv21j();
@ -641,7 +641,7 @@ void igs011_state::machine_start()
// Inputs
CUSTOM_INPUT_MEMBER(igs011_state::igs_hopper_r)
READ_LINE_MEMBER(igs011_state::igs_hopper_r)
{
return (m_igs_hopper && ((m_screen->frame_number()/5)&1)) ? 0x0000 : 0x0001;
}
@ -3275,7 +3275,7 @@ static INPUT_PORTS_START( lhb2 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // data clear
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state, igs_hopper_r, nullptr) // hopper switch
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // stats
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -3405,7 +3405,7 @@ static INPUT_PORTS_START( nkishusp )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // data clear
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // stats
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -3534,7 +3534,7 @@ static INPUT_PORTS_START( wlcc )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // shown in test mode
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
@ -3663,7 +3663,7 @@ static INPUT_PORTS_START( lhb )
PORT_DIPUNKNOWN( 0x80, 0x80 )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) // system reset
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats
@ -3964,7 +3964,7 @@ static INPUT_PORTS_START( xymg )
PORT_DIPUNKNOWN( 0x80, 0x80 )
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats

View File

@ -124,7 +124,7 @@ public:
void init_cpokerpk();
void init_kungfu();
DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
DECLARE_READ_LINE_MEMBER(hopper_r);
private:
DECLARE_READ8_MEMBER(igs_irqack_r);
@ -393,7 +393,7 @@ WRITE8_MEMBER(igspoker_state::custom_io_w)
}
}
CUSTOM_INPUT_MEMBER(igspoker_state::hopper_r)
READ_LINE_MEMBER(igspoker_state::hopper_r)
{
if (m_hopper) return !(m_screen->frame_number()%10);
return machine().input().code_pressed(KEYCODE_H);
@ -541,7 +541,7 @@ static INPUT_PORTS_START( cpoker )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SERVICE")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@ -675,7 +675,7 @@ static INPUT_PORTS_START( cpokerx )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Attendent")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -840,7 +840,7 @@ static INPUT_PORTS_START( csk227 )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
@ -985,7 +985,7 @@ static INPUT_PORTS_START( csk234 )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SERVICE")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@ -1137,7 +1137,7 @@ static INPUT_PORTS_START( igs_ncs )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_START("SERVICE")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@ -1459,7 +1459,7 @@ static INPUT_PORTS_START( cpokerpk )
PORT_DIPSETTING( 0x00, "100:1" )
PORT_START("SERVICE")
PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@ -1594,7 +1594,7 @@ static INPUT_PORTS_START( chleague )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SERVICE")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@ -1733,7 +1733,7 @@ static INPUT_PORTS_START( pktet346 )
PORT_START("SERVICE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@ -1844,7 +1844,7 @@ static INPUT_PORTS_START( igstet341 )
PORT_START("SERVICE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")

View File

@ -450,7 +450,7 @@ static INPUT_PORTS_START( imolagp )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("IN0")
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, imolagp_state, imolagp_steerlatch_r, nullptr)
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(imolagp_state, imolagp_steerlatch_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
@ -481,7 +481,7 @@ static INPUT_PORTS_START( imolagpo )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("IN1")
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, imolagp_state, imolagp_steerlatch_r, nullptr)
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(imolagp_state, imolagp_steerlatch_r)
INPUT_PORTS_END

View File

@ -100,7 +100,7 @@ WRITE8_MEMBER(inufuku_state::inufuku_soundrombank_w)
******************************************************************************/
CUSTOM_INPUT_MEMBER(inufuku_state::soundflag_r)
READ_LINE_MEMBER(inufuku_state::soundflag_r)
{
return m_soundlatch->pending_r() ? 0 : 1;
}
@ -222,7 +222,7 @@ static INPUT_PORTS_START( inufuku )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, inufuku_state,soundflag_r, nullptr) // pending sound command
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(inufuku_state, soundflag_r) // pending sound command
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 3on3dunk cares about something in here, possibly a vblank flag
PORT_START( "EEPROMOUT" )

View File

@ -144,7 +144,7 @@ public:
void istreb(machine_config &config);
void motogonki(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(collision_r);
template <int ID> DECLARE_READ_LINE_MEMBER(collision_r);
DECLARE_CUSTOM_INPUT_MEMBER(coin_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_inc);
@ -449,23 +449,23 @@ void istrebiteli_state::moto_io_map(address_map &map)
map(0x40, 0x4f).w(FUNC(istrebiteli_state::moto_tileram_w));
}
CUSTOM_INPUT_MEMBER(istrebiteli_state::collision_r)
template <int ID>
READ_LINE_MEMBER(istrebiteli_state::collision_r)
{
// piece of HACK
// real hardware does per-pixel sprite collision detection
int id = *(int*)&param;
if ((m_spr_ctrl[id] & 0x80) == 0)
if ((m_spr_ctrl[ID] & 0x80) == 0)
{
int sx = m_spr_xy[0 + id * 2];
int sy = m_spr_xy[1 + id * 2];
int px = m_spr_xy[6 - id * 2] + 3;
int py = m_spr_xy[7 - id * 2] + 3;
int sx = m_spr_xy[0 + ID * 2];
int sy = m_spr_xy[1 + ID * 2];
int px = m_spr_xy[6 - ID * 2] + 3;
int py = m_spr_xy[7 - ID * 2] + 3;
if (sx > 56 && px >= sx && px < (sx + 8) && py >= sy && py < (sy + 8))
m_spr_collision[id] |= 1;
m_spr_collision[ID] |= 1;
}
return m_spr_collision[id];
return m_spr_collision[ID];
}
CUSTOM_INPUT_MEMBER(istrebiteli_state::coin_r)
@ -486,7 +486,7 @@ static INPUT_PORTS_START( istreb )
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, istrebiteli_state, collision_r, 1)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(istrebiteli_state, collision_r<1>)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
@ -496,14 +496,14 @@ static INPUT_PORTS_START( istreb )
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, istrebiteli_state, collision_r, 0)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(istrebiteli_state, collision_r<0>)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("IN2")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_START1)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_START2)
PORT_BIT(0x3c, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, istrebiteli_state, coin_r, nullptr)
PORT_BIT(0x3c, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(istrebiteli_state, coin_r)
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_HBLANK("screen")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen")

View File

@ -488,7 +488,7 @@ void itech32_state::color_w(u8 data)
*************************************/
CUSTOM_INPUT_MEMBER(itech32_state::special_port_r)
READ_LINE_MEMBER(itech32_state::special_port_r)
{
if (m_soundlatch->pending_r())
m_special_result ^= 1;
@ -1093,7 +1093,7 @@ static INPUT_PORTS_START( timekill )
PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, nullptr)
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech32_state, special_port_r)
PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0000, "-" )
PORT_DIPSETTING( 0x0010, "+" )
@ -1138,7 +1138,7 @@ static INPUT_PORTS_START( itech32_base_16bit )
PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, nullptr)
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech32_state, special_port_r)
PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x0000, "-" )
PORT_DIPSETTING( 0x0010, "+" )
@ -1357,7 +1357,7 @@ static INPUT_PORTS_START( itech32_base_32bit )
PORT_SERVICE_NO_TOGGLE( 0x00010000, IP_ACTIVE_LOW )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, nullptr)
PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech32_state, special_port_r)
PORT_DIPNAME( 0x00100000, 0x00000000, "Video Sync" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x00000000, "-" )
PORT_DIPSETTING( 0x00100000, "+" )

View File

@ -752,7 +752,7 @@ WRITE8_MEMBER(itech8_state::rimrockn_bank_w)
*
*************************************/
CUSTOM_INPUT_MEMBER(itech8_state::special_r)
READ_LINE_MEMBER(itech8_state::special_r)
{
return m_pia_portb_data & 0x01;
}
@ -1056,7 +1056,7 @@ void itech8_state::slikz80_io_map(address_map &map)
static INPUT_PORTS_START( wfortune )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@ -1085,7 +1085,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( grmatch )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, "Adjustments Lockout" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
@ -1123,7 +1123,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( stratab )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@ -1171,14 +1171,12 @@ INPUT_PORTS_END
CUSTOM_INPUT_MEMBER(itech8_state::gtg_mux)
{
const char *tag1 = (const char *)param;
const char *tag2 = tag1 + strlen(tag1) + 1;
return ioport(tag1)->read() & ioport(tag2)->read();
return m_p1->read() & m_p2->read();
}
static INPUT_PORTS_START( gtg )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@ -1189,7 +1187,7 @@ static INPUT_PORTS_START( gtg )
PORT_START("60")
/* it is still unknown how the second player inputs are muxed in */
/* currently we map both sets of controls to the same inputs */
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,gtg_mux, "P1\0P2")
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(itech8_state, gtg_mux)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
@ -1215,7 +1213,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gtgt )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@ -1242,7 +1240,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gtg2t )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@ -1279,7 +1277,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( slikshot )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@ -1306,7 +1304,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( dynobop )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@ -1333,7 +1331,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( sstrike )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@ -1360,7 +1358,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( pokrdice )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Lower Right") PORT_CODE(KEYCODE_3_PAD)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
@ -1389,7 +1387,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( hstennis )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@ -1424,7 +1422,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( arlingtn )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) /* see code at e23c */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
@ -1455,7 +1453,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( peggle )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@ -1477,7 +1475,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( pegglet )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@ -1499,7 +1497,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( neckneck )
PORT_START("40")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) /* see code at e23c */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
@ -1540,7 +1538,7 @@ static INPUT_PORTS_START( rimrockn )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_START("80")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )

View File

@ -77,7 +77,7 @@ public:
void init_jackie();
DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
DECLARE_READ_LINE_MEMBER(hopper_r);
private:
DECLARE_WRITE8_MEMBER(fg_tile_w);
@ -375,7 +375,7 @@ void jackie_state::io_map(address_map &map)
map(0x8000, 0xffff).r(FUNC(jackie_state::expram_r));
}
CUSTOM_INPUT_MEMBER(jackie_state::hopper_r)
READ_LINE_MEMBER(jackie_state::hopper_r)
{
if (m_hopper) return !(m_screen->frame_number()%10);
return machine().input().code_pressed(KEYCODE_H);
@ -454,7 +454,7 @@ static INPUT_PORTS_START( jackie )
PORT_START("SERVICE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_9) PORT_NAME("Attendent")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jackie_state,hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jackie_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // test (press during boot)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")

View File

@ -169,7 +169,7 @@ public:
, m_lamps(*this, "lamp%u", 0U)
{ }
DECLARE_CUSTOM_INPUT_MEMBER(hopper_status_r);
DECLARE_READ_LINE_MEMBER(hopper_status_r);
void jankenmn(machine_config &config);
@ -251,7 +251,7 @@ WRITE8_MEMBER(jankenmn_state::lamps3_w)
logerror("payout: %02X\n", (data & 0x04));
}
CUSTOM_INPUT_MEMBER(jankenmn_state::hopper_status_r)
READ_LINE_MEMBER(jankenmn_state::hopper_status_r)
{
// temp workaround, needs hopper
return machine().rand();
@ -336,7 +336,7 @@ static INPUT_PORTS_START( jankenmn )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Paa (Paper)")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN3 ) // 100 yen coin
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jankenmn_state, hopper_status_r, nullptr)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jankenmn_state, hopper_status_r)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) // 10 yen coin
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) // 10 yen coin

View File

@ -303,7 +303,7 @@ static INPUT_PORTS_START( jedi )
PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
PORT_BIT( 0x18, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jedi_state,jedi_audio_comm_stat_r, nullptr)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(jedi_state, jedi_audio_comm_stat_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_START("STICKY")

View File

@ -172,11 +172,11 @@ public:
void init_kenseim();
DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_1234_r);
DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_5678_r);
DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_9_r);
DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_req_r);
DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_LVm_r);
DECLARE_CUSTOM_INPUT_MEMBER(cmd_1234_r);
DECLARE_CUSTOM_INPUT_MEMBER(cmd_5678_r);
DECLARE_READ_LINE_MEMBER(cmd_9_r);
DECLARE_READ_LINE_MEMBER(cmd_req_r);
DECLARE_READ_LINE_MEMBER(cmd_LVm_r);
private:
void mole_up(int side, int mole)
@ -373,27 +373,27 @@ WRITE8_MEMBER(kenseim_state::cpu_portc_w)
/* 68k side COMMS reads */
CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_1234_r)
CUSTOM_INPUT_MEMBER(kenseim_state::cmd_1234_r)
{
return (m_to_68k_cmd_low & 0x0f) >> 0;
}
CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_5678_r)
CUSTOM_INPUT_MEMBER(kenseim_state::cmd_5678_r)
{
return (m_to_68k_cmd_low & 0xf0) >> 4;
}
CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_9_r)
READ_LINE_MEMBER(kenseim_state::cmd_9_r)
{
return m_to_68k_cmd_d9;
}
CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_req_r)
READ_LINE_MEMBER(kenseim_state::cmd_req_r)
{
return m_to_68k_cmd_req;
}
CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_LVm_r)
READ_LINE_MEMBER(kenseim_state::cmd_LVm_r)
{
return m_to_68k_cmd_LVm;;
}
@ -512,10 +512,10 @@ static INPUT_PORTS_START( kenseim )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_COIN1*/ ) // n/c
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_COIN2*/ ) // n/c
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_9_r, nullptr) // PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // D9
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(kenseim_state, cmd_9_r) // PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // D9
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // n/c?
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_req_r, nullptr) // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // REQ
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_LVm_r, nullptr) // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) // LVm
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(kenseim_state, cmd_req_r) // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // REQ
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(kenseim_state, cmd_LVm_r) // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) // LVm
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) n/c
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // n/c?
@ -524,7 +524,7 @@ static INPUT_PORTS_START( kenseim )
// PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) // D6
// PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) // D7
// PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) // D8
PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_5678_r, nullptr)
PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(kenseim_state, cmd_5678_r)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED/*IPT_BUTTON1*/ ) /*PORT_PLAYER(1)*/ // n/c
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED/*IPT_BUTTON2*/ ) /*PORT_PLAYER(1)*/ // n/c
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED/*IPT_BUTTON3*/ ) /*PORT_PLAYER(1)*/ // n/c
@ -534,7 +534,7 @@ static INPUT_PORTS_START( kenseim )
// PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) // D2
// PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) // D3
// PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) // D4
PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_1234_r, nullptr)
PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(kenseim_state, cmd_1234_r)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_BUTTON1*/ ) /*PORT_PLAYER(2)*/ // n/c
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_BUTTON2*/ ) /*PORT_PLAYER(2)*/ // n/c
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_BUTTON3*/ ) /*PORT_PLAYER(2)*/ // n/c

View File

@ -1189,7 +1189,7 @@ static INPUT_PORTS_START( common )
// note: racin' force expects bit 1 of the eeprom port to toggle
PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x000000fe, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, konamigx_state, gx_rdport1_3_r, nullptr)
PORT_BIT( 0x000000fe, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(konamigx_state, gx_rdport1_3_r)
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN )

View File

@ -466,8 +466,8 @@ public:
void init_drmn();
DECLARE_CUSTOM_INPUT_MEMBER( gn845pwbb_read );
DECLARE_CUSTOM_INPUT_MEMBER( gunmania_tank_shutter_sensor );
DECLARE_CUSTOM_INPUT_MEMBER( gunmania_cable_holder_sensor );
DECLARE_READ_LINE_MEMBER( gunmania_tank_shutter_sensor );
DECLARE_READ_LINE_MEMBER( gunmania_cable_holder_sensor );
DECLARE_READ_LINE_MEMBER( h8_d0_r );
DECLARE_READ_LINE_MEMBER( h8_d1_r );
@ -2026,7 +2026,7 @@ WRITE16_MEMBER( ksys573_state::gunmania_w )
verboselog( 2, "gunmania_w %08x %08x %08x\n", offset, mem_mask, data );
}
CUSTOM_INPUT_MEMBER( ksys573_state::gunmania_tank_shutter_sensor )
READ_LINE_MEMBER( ksys573_state::gunmania_tank_shutter_sensor )
{
if( m_tank_shutter_position == 0 )
{
@ -2036,7 +2036,7 @@ CUSTOM_INPUT_MEMBER( ksys573_state::gunmania_tank_shutter_sensor )
return 0;
}
CUSTOM_INPUT_MEMBER( ksys573_state::gunmania_cable_holder_sensor )
READ_LINE_MEMBER( ksys573_state::gunmania_cable_holder_sensor )
{
return m_cable_holder_release;
}
@ -2713,7 +2713,7 @@ static INPUT_PORTS_START( ddr )
PORT_INCLUDE( konami573 )
PORT_MODIFY( "IN2" )
PORT_BIT( 0x00000f0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER( DEVICE_SELF, ksys573_state,gn845pwbb_read, nullptr )
PORT_BIT( 0x00000f0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER( ksys573_state, gn845pwbb_read )
PORT_START( "STAGE" )
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_PLAYER( 1 )
@ -2873,11 +2873,11 @@ static INPUT_PORTS_START( gunmania )
PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER( 1 ) PORT_NAME( "Bullet Tube-1 Sensor" )
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER( 1 ) PORT_NAME( "Bullet Tube-2 Sensor" )
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER( 1 ) PORT_NAME( "Safety Sensor Under" )
PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER( DEVICE_SELF,ksys573_state,gunmania_tank_shutter_sensor, nullptr )
PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ksys573_state, gunmania_tank_shutter_sensor)
PORT_MODIFY( "IN3" )
PORT_BIT( 0x0d000b00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02000000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER( DEVICE_SELF,ksys573_state,gunmania_cable_holder_sensor, nullptr )
PORT_BIT( 0x02000000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ksys573_state, gunmania_cable_holder_sensor)
PORT_START( "GUNX" )
PORT_BIT( 0x7f, 0x2f, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_MINMAX( 0x00,0x5f ) PORT_SENSITIVITY( 100 ) PORT_KEYDELTA( 15 ) PORT_PLAYER( 1 )

View File

@ -202,13 +202,13 @@ CUSTOM_INPUT_MEMBER(ladybug_state::ladybug_p2_control_r)
static INPUT_PORTS_START( ladybug )
PORT_START("IN0")
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state, ladybug_p1_control_r, nullptr)
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ladybug_state, ladybug_p1_control_r)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )
PORT_START("IN1")
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state, ladybug_p2_control_r, nullptr)
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ladybug_state, ladybug_p2_control_r)
// This should be connected to the 4V clock. I don't think the game uses it.
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
// Note that there are TWO VBlank inputs, one is active low, the other active

View File

@ -223,7 +223,7 @@ static INPUT_PORTS_START( lastbank )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, lastbank_state, sound_status_r, nullptr)
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(lastbank_state, sound_status_r)
PORT_START("P1_KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5-6") PORT_CODE(KEYCODE_B)

Some files were not shown because too many files have changed in this diff Show More