mirror of
https://github.com/holub/mame
synced 2025-07-06 18:39:28 +03:00
ioport array for outrun and sega-yboard
This commit is contained in:
parent
e2003e3f1f
commit
fde0ff778d
@ -2796,7 +2796,7 @@ READ8_MEMBER(namcos22_state::mcu_port7_r)
|
||||
|
||||
READ8_MEMBER(namcos22_state::namcos22s_mcu_adc_r)
|
||||
{
|
||||
UINT16 adc = m_adc_inp[offset >> 1 & 7]->read_safe(0) << 2;
|
||||
UINT16 adc = m_adc_ports[offset >> 1 & 7]->read_safe(0) << 2;
|
||||
return (offset & 1) ? adc >> 8 : adc;
|
||||
}
|
||||
|
||||
|
@ -1377,7 +1377,7 @@ public:
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_generic_paletteram_32(*this, "paletteram"),
|
||||
m_adc_inp(*this, "ADC")
|
||||
m_adc_ports(*this, "ADC")
|
||||
{ }
|
||||
|
||||
required_device<mips3_device> m_maincpu;
|
||||
@ -1402,7 +1402,7 @@ public:
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
required_shared_ptr<UINT32> m_generic_paletteram_32;
|
||||
optional_ioport_array<4> m_adc_inp;
|
||||
optional_ioport_array<4> m_adc_ports;
|
||||
|
||||
c404_t m_c404;
|
||||
c361_t m_c361;
|
||||
@ -2962,7 +2962,7 @@ WRITE16_MEMBER(namcos23_state::iob_p6_w)
|
||||
|
||||
READ16_MEMBER(namcos23_state::iob_analog_r)
|
||||
{
|
||||
return m_adc_inp[offset & 3]->read_safe(0);
|
||||
return m_adc_ports[offset & 3]->read_safe(0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -688,16 +688,10 @@ READ16_MEMBER( segaorun_state::outrun_custom_io_r )
|
||||
return m_i8255->read(space, offset & 3);
|
||||
|
||||
case 0x10/2:
|
||||
{
|
||||
static const char *const sysports[] = { "SERVICE", "UNKNOWN", "COINAGE", "DSW" };
|
||||
return ioport(sysports[offset & 3])->read();
|
||||
}
|
||||
return m_in_ports[offset & 3]->read();
|
||||
|
||||
case 0x30/2:
|
||||
{
|
||||
static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
|
||||
return ioport(ports[m_adc_select])->read_safe(0x0010);
|
||||
}
|
||||
return m_adc_ports[m_adc_select]->read_safe(0x0010);
|
||||
|
||||
case 0x60/2:
|
||||
return watchdog_reset_r(space, 0);
|
||||
@ -776,16 +770,10 @@ READ16_MEMBER( segaorun_state::shangon_custom_io_r )
|
||||
case 0x1002/2:
|
||||
case 0x1004/2:
|
||||
case 0x1006/2:
|
||||
{
|
||||
static const char *const sysports[] = { "SERVICE", "UNKNOWN", "COINAGE", "DSW" };
|
||||
return ioport(sysports[offset & 3])->read();
|
||||
}
|
||||
return m_in_ports[offset & 3]->read();
|
||||
|
||||
case 0x3020/2:
|
||||
{
|
||||
static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" };
|
||||
return ioport(ports[m_adc_select])->read_safe(0x0010);
|
||||
}
|
||||
return m_adc_ports[m_adc_select]->read_safe(0x0010);
|
||||
|
||||
default:
|
||||
break;
|
||||
@ -947,7 +935,7 @@ CUSTOM_INPUT_MEMBER(segaorun_state::bankmotor_pos_r)
|
||||
|
||||
|
||||
static INPUT_PORTS_START( outrun_generic )
|
||||
PORT_START("SERVICE")
|
||||
PORT_START("IN.0")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
@ -957,13 +945,13 @@ static INPUT_PORTS_START( outrun_generic )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
|
||||
PORT_START("UNKNOWN")
|
||||
PORT_START("IN.1")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("COINAGE")
|
||||
PORT_START("IN.2")
|
||||
SEGA_COINAGE_LOC(SWA)
|
||||
|
||||
PORT_START("DSW")
|
||||
PORT_START("IN.3")
|
||||
PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, "SWB:1" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x02, IP_ACTIVE_LOW, "SWB:2" )
|
||||
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:3")
|
||||
@ -981,16 +969,16 @@ static INPUT_PORTS_START( outrun_generic )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
|
||||
|
||||
PORT_START("ADC0") // steering
|
||||
PORT_START("ADC.0") // steering
|
||||
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x20,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
|
||||
|
||||
PORT_START("ADC1") // gas pedal
|
||||
PORT_START("ADC.1") // gas pedal
|
||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
|
||||
|
||||
PORT_START("ADC2") // brake
|
||||
PORT_START("ADC.2") // brake
|
||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(40)
|
||||
|
||||
PORT_START("ADC3")
|
||||
PORT_START("ADC.3")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segaorun_state, bankmotor_pos_r, NULL)
|
||||
INPUT_PORTS_END
|
||||
|
||||
@ -1003,7 +991,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( outrun )
|
||||
PORT_INCLUDE( outrun_generic )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.3")
|
||||
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x03, "Moving" )
|
||||
PORT_DIPSETTING( 0x02, "Up Cockpit" )
|
||||
@ -1015,7 +1003,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( outrundx )
|
||||
PORT_INCLUDE( outrun_generic )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.3")
|
||||
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1")
|
||||
PORT_DIPSETTING( 0x00, "Not Moving" )
|
||||
PORT_DIPSETTING( 0x01, "Moving" )
|
||||
@ -1032,10 +1020,10 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( toutrun )
|
||||
PORT_INCLUDE( outrun_generic )
|
||||
|
||||
PORT_MODIFY("SERVICE")
|
||||
PORT_MODIFY("IN.0")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Turbo")
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.3")
|
||||
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x03, "Moving" )
|
||||
PORT_DIPSETTING( 0x02, "Cockpit Conversion" )
|
||||
@ -1058,7 +1046,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( toutrunm )
|
||||
PORT_INCLUDE( toutrun )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.3")
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x03, "Moving" )
|
||||
// PORT_DIPSETTING( 0x02, DEF_STR( Unused ) )
|
||||
@ -1075,7 +1063,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( toutrunc )
|
||||
PORT_INCLUDE( toutrun )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.3")
|
||||
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
|
||||
// PORT_DIPSETTING( 0x03, DEF_STR( Unused ) )
|
||||
// PORT_DIPSETTING( 0x02, DEF_STR( Unused ) )
|
||||
@ -1090,10 +1078,10 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( shangon )
|
||||
PORT_INCLUDE( outrun_generic )
|
||||
|
||||
PORT_MODIFY("SERVICE")
|
||||
PORT_MODIFY("IN.0")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_MODIFY("UNKNOWN")
|
||||
PORT_MODIFY("IN.1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
|
||||
@ -1103,7 +1091,7 @@ static INPUT_PORTS_START( shangon )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.3")
|
||||
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:1")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -1121,10 +1109,10 @@ static INPUT_PORTS_START( shangon )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SWB:7" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SWB:8" )
|
||||
|
||||
PORT_MODIFY("ADC0") // steering
|
||||
PORT_MODIFY("ADC.0") // steering
|
||||
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x20,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
|
||||
|
||||
PORT_MODIFY("ADC3")
|
||||
PORT_MODIFY("ADC.3")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
@ -108,9 +108,8 @@ READ16_MEMBER( segaybd_state::analog_r )
|
||||
|
||||
WRITE16_MEMBER( segaybd_state::analog_w )
|
||||
{
|
||||
static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6" };
|
||||
int selected = ((offset & 3) == 3) ? (3 + (m_misc_io_data[0x08/2] & 3)) : (offset & 3);
|
||||
m_analog_data[offset & 3] = ioport(ports[selected])->read_safe(0xff);
|
||||
m_analog_data[offset & 3] = m_adc_ports[selected]->read_safe(0xff);
|
||||
}
|
||||
|
||||
|
||||
@ -120,7 +119,6 @@ WRITE16_MEMBER( segaybd_state::analog_w )
|
||||
|
||||
READ16_MEMBER( segaybd_state::io_chip_r )
|
||||
{
|
||||
static const char *const portnames[] = { "P1", "GENERAL", "PORTC", "PORTD", "PORTE", "DSW", "COINAGE", "PORTH" };
|
||||
offset &= 0x1f/2;
|
||||
|
||||
switch (offset)
|
||||
@ -139,7 +137,7 @@ READ16_MEMBER( segaybd_state::io_chip_r )
|
||||
return m_misc_io_data[offset];
|
||||
|
||||
// otherwise, return an input port
|
||||
return ioport(portnames[offset])->read();
|
||||
return m_in_ports[offset]->read();
|
||||
|
||||
// 'SEGA' protection
|
||||
case 0x10/2:
|
||||
@ -818,10 +816,10 @@ ADDRESS_MAP_END
|
||||
//**************************************************************************
|
||||
|
||||
static INPUT_PORTS_START( yboard_generic )
|
||||
PORT_START("P1")
|
||||
PORT_START("IN.0")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("GENERAL")
|
||||
PORT_START("IN.1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // afterburner (gloc)
|
||||
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
@ -831,16 +829,16 @@ static INPUT_PORTS_START( yboard_generic )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
|
||||
PORT_START("PORTC")
|
||||
PORT_START("IN.2")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("PORTD")
|
||||
PORT_START("IN.3")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("PORTE")
|
||||
PORT_START("IN.4")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("DSW")
|
||||
PORT_START("IN.5")
|
||||
PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, "SWB:1" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x02, IP_ACTIVE_LOW, "SWB:2" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x04, IP_ACTIVE_LOW, "SWB:3" )
|
||||
@ -850,10 +848,10 @@ static INPUT_PORTS_START( yboard_generic )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SWB:7" )
|
||||
PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SWB:8" )
|
||||
|
||||
PORT_START("COINAGE")
|
||||
PORT_START("IN.6")
|
||||
SEGA_COINAGE_LOC(SWA)
|
||||
|
||||
PORT_START("PORTH")
|
||||
PORT_START("IN.7")
|
||||
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
INPUT_PORTS_END
|
||||
|
||||
@ -866,11 +864,11 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( gforce2 )
|
||||
PORT_INCLUDE( yboard_generic )
|
||||
|
||||
PORT_MODIFY("GENERAL")
|
||||
PORT_MODIFY("IN.1")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Shoot")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile")
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.5")
|
||||
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:1")
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
@ -893,13 +891,13 @@ static INPUT_PORTS_START( gforce2 )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Upright ) )
|
||||
PORT_DIPSETTING( 0x00, "City" )
|
||||
|
||||
PORT_START("ADC0") // stick X
|
||||
PORT_START("ADC.0") // stick X
|
||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
|
||||
|
||||
PORT_START("ADC1") // stick Y
|
||||
PORT_START("ADC.1") // stick Y
|
||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
|
||||
|
||||
PORT_START("ADC2") // throttle
|
||||
PORT_START("ADC.2") // throttle
|
||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(79)
|
||||
INPUT_PORTS_END
|
||||
|
||||
@ -907,12 +905,12 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( gloc )
|
||||
PORT_INCLUDE( yboard_generic )
|
||||
|
||||
PORT_MODIFY("GENERAL")
|
||||
PORT_MODIFY("IN.1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("After Burner")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Vulcan")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile")
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.5")
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( Normal ) )
|
||||
@ -935,13 +933,13 @@ static INPUT_PORTS_START( gloc )
|
||||
PORT_DIPSETTING( 0x80, "3 to Start, 2 to Continue" )
|
||||
PORT_DIPSETTING( 0x00, "4 to Start, 3 to Continue" )
|
||||
|
||||
PORT_START("ADC3") // stick Y
|
||||
PORT_START("ADC.3") // stick Y
|
||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x40,0xc0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
|
||||
|
||||
PORT_START("ADC4") // throttle
|
||||
PORT_START("ADC.4") // throttle
|
||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_SENSITIVITY(100) PORT_KEYDELTA(79)
|
||||
|
||||
PORT_START("ADC5") // stick X
|
||||
PORT_START("ADC.5") // stick X
|
||||
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x20,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
|
||||
INPUT_PORTS_END
|
||||
|
||||
@ -949,12 +947,12 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( glocr360 )
|
||||
PORT_INCLUDE( yboard_generic )
|
||||
|
||||
PORT_MODIFY("GENERAL")
|
||||
PORT_MODIFY("IN.1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("After Burner")
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Vulcan")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile")
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.5")
|
||||
PORT_DIPNAME( 0x03, 0x03, "Game Type" ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x02, "Fighting Only" )
|
||||
PORT_DIPSETTING( 0x03, "Fight/Experience" )
|
||||
@ -984,7 +982,7 @@ static INPUT_PORTS_START( glocr360 )
|
||||
// PORT_DIPSETTING( 0x50, "1" )
|
||||
// PORT_DIPSETTING( 0x60, "1" )
|
||||
|
||||
PORT_MODIFY("COINAGE")
|
||||
PORT_MODIFY("IN.6")
|
||||
PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3,4")
|
||||
// PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
|
||||
// PORT_DIPSETTING( 0x05, DEF_STR( 1C_1C ) )
|
||||
@ -1020,16 +1018,16 @@ static INPUT_PORTS_START( glocr360 )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( 1C_8C ) )
|
||||
PORT_DIPSETTING( 0x00, "Free Play (if Coin A too) or 1/1" )
|
||||
|
||||
PORT_START("ADC0") // moving pitch
|
||||
PORT_START("ADC.0") // moving pitch
|
||||
PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_PLAYER(2)
|
||||
|
||||
PORT_START("ADC2") // moving roll
|
||||
PORT_START("ADC.2") // moving roll
|
||||
PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_PLAYER(3)
|
||||
|
||||
PORT_START("ADC3") // stick Y
|
||||
PORT_START("ADC.3") // stick Y
|
||||
PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
|
||||
|
||||
PORT_START("ADC5") // stick X
|
||||
PORT_START("ADC.5") // stick X
|
||||
PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
|
||||
INPUT_PORTS_END
|
||||
|
||||
@ -1037,10 +1035,10 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( pdrift )
|
||||
PORT_INCLUDE( yboard_generic )
|
||||
|
||||
PORT_MODIFY("GENERAL")
|
||||
PORT_MODIFY("IN.1")
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gear Shift") PORT_CODE(KEYCODE_SPACE) PORT_TOGGLE
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.5")
|
||||
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x03, "Moving" )
|
||||
PORT_DIPSETTING( 0x02, "Upright/Sit Down" )
|
||||
@ -1063,13 +1061,13 @@ static INPUT_PORTS_START( pdrift )
|
||||
PORT_DIPSETTING( 0x40, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) )
|
||||
|
||||
PORT_START("ADC3") // brake
|
||||
PORT_START("ADC.3") // brake
|
||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(40)
|
||||
|
||||
PORT_START("ADC4") // gas pedal
|
||||
PORT_START("ADC.4") // gas pedal
|
||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
|
||||
|
||||
PORT_START("ADC5") // steering
|
||||
PORT_START("ADC.5") // steering
|
||||
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x20,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
|
||||
INPUT_PORTS_END
|
||||
|
||||
@ -1077,7 +1075,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( pdrifte )
|
||||
PORT_INCLUDE( pdrift )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.5")
|
||||
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x03, "Moving" )
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Upright ) )
|
||||
@ -1104,7 +1102,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( pdriftj )
|
||||
PORT_INCLUDE( pdrift )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.5")
|
||||
PORT_DIPNAME( 0x03, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x03, "Moving" )
|
||||
PORT_DIPSETTING( 0x02, "Upright/Sit Down" )
|
||||
@ -1131,7 +1129,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( pdriftl )
|
||||
PORT_INCLUDE( pdrift )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.5")
|
||||
PORT_DIPUNUSED_DIPLOC( 0x08, IP_ACTIVE_LOW, "SWB:4" )
|
||||
PORT_DIPNAME( 0x10, 0x00, "Ground Level Tilts" ) PORT_DIPLOCATION("SWB:5")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
@ -1146,7 +1144,7 @@ static INPUT_PORTS_START( pdriftl )
|
||||
PORT_DIPSETTING( 0x20, "6" )
|
||||
PORT_DIPSETTING( 0x00, "7 - Hardest" )
|
||||
|
||||
PORT_MODIFY("COINAGE")
|
||||
PORT_MODIFY("IN.6")
|
||||
PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3,4")
|
||||
PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) )
|
||||
@ -1213,7 +1211,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( rchase )
|
||||
PORT_INCLUDE( yboard_generic )
|
||||
|
||||
PORT_MODIFY("GENERAL")
|
||||
PORT_MODIFY("IN.1")
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
|
||||
@ -1223,7 +1221,7 @@ static INPUT_PORTS_START( rchase )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
|
||||
|
||||
PORT_MODIFY("COINAGE")
|
||||
PORT_MODIFY("IN.6")
|
||||
PORT_DIPNAME( 0x03, 0x03, "Coin to Credit" ) PORT_DIPLOCATION("SWA:1,2")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
|
||||
@ -1247,7 +1245,7 @@ static INPUT_PORTS_START( rchase )
|
||||
PORT_DIPSETTING( 0x20, "7 gives +1" )
|
||||
PORT_DIPSETTING( 0x00, "Error" )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.5")
|
||||
PORT_DIPNAME( 0x03, 0x03, "Credits" ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x03, "1 to Start, 1 to Continue" )
|
||||
PORT_DIPSETTING( 0x02, "2 to Start, 1 to Continue" )
|
||||
@ -1268,16 +1266,16 @@ static INPUT_PORTS_START( rchase )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
|
||||
PORT_START("ADC0")
|
||||
PORT_START("ADC.0")
|
||||
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5)
|
||||
|
||||
PORT_START("ADC1")
|
||||
PORT_START("ADC.1")
|
||||
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5)
|
||||
|
||||
PORT_START("ADC2")
|
||||
PORT_START("ADC.2")
|
||||
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_PLAYER(2)
|
||||
|
||||
PORT_START("ADC3")
|
||||
PORT_START("ADC.3")
|
||||
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_PLAYER(2)
|
||||
INPUT_PORTS_END
|
||||
|
||||
@ -1285,7 +1283,7 @@ INPUT_PORTS_END
|
||||
static INPUT_PORTS_START( strkfgtr )
|
||||
PORT_INCLUDE( gloc )
|
||||
|
||||
PORT_MODIFY("DSW")
|
||||
PORT_MODIFY("IN.5")
|
||||
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:1,2")
|
||||
PORT_DIPSETTING( 0x02, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x03, DEF_STR( Normal ) )
|
||||
|
@ -738,7 +738,7 @@ WRITE8_MEMBER(taitojc_state::hc11_output_w)
|
||||
|
||||
READ8_MEMBER(taitojc_state::hc11_analog_r)
|
||||
{
|
||||
return m_analog_inp[offset]->read_safe(0);
|
||||
return m_analog_ports[offset]->read_safe(0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -200,7 +200,7 @@ public:
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_adc_inp(*this, "ADC")
|
||||
m_adc_ports(*this, "ADC")
|
||||
{ }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -229,7 +229,7 @@ public:
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_ioport_array<8> m_adc_inp;
|
||||
optional_ioport_array<8> m_adc_ports;
|
||||
|
||||
|
||||
UINT8 m_syscontrol[0x20];
|
||||
|
@ -35,6 +35,8 @@ public:
|
||||
m_segaic16road(*this, "segaic16road"),
|
||||
m_bankmotor_timer(*this, "bankmotor"),
|
||||
m_workram(*this, "workram"),
|
||||
m_in_ports(*this, "IN"),
|
||||
m_adc_ports(*this, "ADC"),
|
||||
m_custom_map(NULL),
|
||||
m_shangon_video(false),
|
||||
m_scanline_timer(NULL),
|
||||
@ -125,6 +127,10 @@ protected:
|
||||
// memory
|
||||
required_shared_ptr<UINT16> m_workram;
|
||||
|
||||
// input ports
|
||||
required_ioport_array<4> m_in_ports;
|
||||
optional_ioport_array<8> m_adc_ports;
|
||||
|
||||
// configuration
|
||||
read16_delegate m_custom_io_r;
|
||||
write16_delegate m_custom_io_w;
|
||||
|
@ -21,20 +21,22 @@ public:
|
||||
// construction/destruction
|
||||
segaybd_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: sega_16bit_common_base(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_subx(*this, "subx"),
|
||||
m_suby(*this, "suby"),
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
m_linkcpu(*this, "linkcpu"),
|
||||
m_bsprites(*this, "bsprites"),
|
||||
m_ysprites(*this, "ysprites"),
|
||||
m_segaic16vid(*this, "segaic16vid"),
|
||||
m_pdrift_bank(0),
|
||||
m_scanline_timer(NULL),
|
||||
m_irq2_scanline(0),
|
||||
m_timer_irq_state(0),
|
||||
m_vblank_irq_state(0),
|
||||
m_tmp_bitmap(512, 512)
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_subx(*this, "subx"),
|
||||
m_suby(*this, "suby"),
|
||||
m_soundcpu(*this, "soundcpu"),
|
||||
m_linkcpu(*this, "linkcpu"),
|
||||
m_bsprites(*this, "bsprites"),
|
||||
m_ysprites(*this, "ysprites"),
|
||||
m_segaic16vid(*this, "segaic16vid"),
|
||||
m_in_ports(*this, "IN"),
|
||||
m_adc_ports(*this, "ADC"),
|
||||
m_pdrift_bank(0),
|
||||
m_scanline_timer(NULL),
|
||||
m_irq2_scanline(0),
|
||||
m_timer_irq_state(0),
|
||||
m_vblank_irq_state(0),
|
||||
m_tmp_bitmap(512, 512)
|
||||
{
|
||||
memset(m_analog_data, 0, sizeof(m_analog_data));
|
||||
memset(m_misc_io_data, 0, sizeof(m_misc_io_data));
|
||||
@ -110,6 +112,10 @@ protected:
|
||||
required_device<sega_yboard_sprite_device> m_ysprites;
|
||||
required_device<segaic16_video_device> m_segaic16vid;
|
||||
|
||||
// input ports
|
||||
required_ioport_array<8> m_in_ports;
|
||||
optional_ioport_array<6> m_adc_ports;
|
||||
|
||||
// configuration
|
||||
output_delegate m_output_cb1;
|
||||
output_delegate m_output_cb2;
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_screen(*this, "screen"),
|
||||
m_palette(*this, "palette"),
|
||||
m_analog_inp(*this, "AN")
|
||||
m_analog_ports(*this, "AN")
|
||||
{
|
||||
m_mcu_output = 0;
|
||||
m_speed_meter = 0;
|
||||
@ -76,7 +76,7 @@ public:
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<screen_device> m_screen;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_ioport_array<8> m_analog_inp;
|
||||
optional_ioport_array<8> m_analog_ports;
|
||||
|
||||
taitojc_renderer *m_renderer;
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
<screen index="0">
|
||||
<bounds x="0" y="0" width="640" height="480" />
|
||||
</screen>
|
||||
<bezel element="shifter" inputtag="SERVICE" inputmask="0x10">
|
||||
<bezel element="shifter" inputtag="IN.0" inputmask="0x10">
|
||||
<bounds x="606" y="414" width="32" height="64" />
|
||||
<color alpha="0.6" />
|
||||
</bezel>
|
||||
@ -61,7 +61,7 @@
|
||||
<screen index="0">
|
||||
<bounds x="0" y="0" width="640" height="480" />
|
||||
</screen>
|
||||
<bezel element="shifter" inputtag="SERVICE" inputmask="0x10">
|
||||
<bezel element="shifter" inputtag="IN.0" inputmask="0x10">
|
||||
<bounds x="2" y="414" width="32" height="64" />
|
||||
<color alpha="0.6" />
|
||||
</bezel>
|
||||
|
@ -52,7 +52,7 @@
|
||||
<screen index="0">
|
||||
<bounds x="0" y="0" width="640" height="480" />
|
||||
</screen>
|
||||
<bezel element="shifter" inputtag="GENERAL" inputmask="0x20">
|
||||
<bezel element="shifter" inputtag="IN.1" inputmask="0x20">
|
||||
<bounds x="606" y="414" width="32" height="64" />
|
||||
<color alpha="0.6" />
|
||||
</bezel>
|
||||
@ -61,7 +61,7 @@
|
||||
<screen index="0">
|
||||
<bounds x="0" y="0" width="640" height="480" />
|
||||
</screen>
|
||||
<bezel element="shifter" inputtag="GENERAL" inputmask="0x20">
|
||||
<bezel element="shifter" inputtag="IN.1" inputmask="0x20">
|
||||
<bounds x="2" y="414" width="32" height="64" />
|
||||
<color alpha="0.6" />
|
||||
</bezel>
|
||||
|
Loading…
Reference in New Issue
Block a user