Previous 199869 Revisions Next

r32320 Tuesday 23rd September, 2014 at 17:56:41 UTC by hap
i'm tired
[src/mame/drivers]namcos22.c namcos23.c segaorun.c segaybd.c taitojc.c
[src/mame/includes]namcos22.h segaorun.h segaybd.h taitojc.h
[src/mame/layout]outrun.lay pdrift.lay

trunk/src/mame/layout/outrun.lay
r32319r32320
5252      <screen index="0">
5353         <bounds x="0" y="0" width="640" height="480" />
5454      </screen>
55      <bezel element="shifter" inputtag="IN.0" inputmask="0x10">
55      <bezel element="shifter" inputtag="SERVICE" inputmask="0x10">
5656         <bounds x="606" y="414" width="32" height="64" />
5757         <color alpha="0.6" />
5858      </bezel>
r32319r32320
6161      <screen index="0">
6262         <bounds x="0" y="0" width="640" height="480" />
6363      </screen>
64      <bezel element="shifter" inputtag="IN.0" inputmask="0x10">
64      <bezel element="shifter" inputtag="SERVICE" inputmask="0x10">
6565         <bounds x="2" y="414" width="32" height="64" />
6666         <color alpha="0.6" />
6767      </bezel>
trunk/src/mame/layout/pdrift.lay
r32319r32320
5252      <screen index="0">
5353         <bounds x="0" y="0" width="640" height="480" />
5454      </screen>
55      <bezel element="shifter" inputtag="IN.1" inputmask="0x20">
55      <bezel element="shifter" inputtag="GENERAL" inputmask="0x20">
5656         <bounds x="606" y="414" width="32" height="64" />
5757         <color alpha="0.6" />
5858      </bezel>
r32319r32320
6161      <screen index="0">
6262         <bounds x="0" y="0" width="640" height="480" />
6363      </screen>
64      <bezel element="shifter" inputtag="IN.1" inputmask="0x20">
64      <bezel element="shifter" inputtag="GENERAL" inputmask="0x20">
6565         <bounds x="2" y="414" width="32" height="64" />
6666         <color alpha="0.6" />
6767      </bezel>
trunk/src/mame/drivers/namcos23.c
r32319r32320
13771377      m_screen(*this, "screen"),
13781378      m_palette(*this, "palette"),
13791379      m_generic_paletteram_32(*this, "paletteram"),
1380      m_adc_ports(*this, "ADC")
1380      m_adc_inp(*this, "ADC")
13811381   { }
13821382
13831383   required_device<mips3_device> m_maincpu;
r32319r32320
14021402   required_device<screen_device> m_screen;
14031403   required_device<palette_device> m_palette;
14041404   required_shared_ptr<UINT32> m_generic_paletteram_32;
1405   optional_ioport_array<4> m_adc_ports;
1405   optional_ioport_array<4> m_adc_inp;
14061406
14071407   c404_t m_c404;
14081408   c361_t m_c361;
r32319r32320
29622962
29632963READ16_MEMBER(namcos23_state::iob_analog_r)
29642964{
2965   return m_adc_ports[offset & 3]->read_safe(0);
2965   return m_adc_inp[offset & 3]->read_safe(0);
29662966}
29672967
29682968
trunk/src/mame/drivers/segaybd.c
r32319r32320
108108
109109WRITE16_MEMBER( segaybd_state::analog_w )
110110{
111   static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6" };
111112   int selected = ((offset & 3) == 3) ? (3 + (m_misc_io_data[0x08/2] & 3)) : (offset & 3);
112   m_analog_data[offset & 3] = m_adc_ports[selected]->read_safe(0xff);
113   m_analog_data[offset & 3] = ioport(ports[selected])->read_safe(0xff);
113114}
114115
115116
r32319r32320
119120
120121READ16_MEMBER( segaybd_state::io_chip_r )
121122{
123   static const char *const portnames[] = { "P1", "GENERAL", "PORTC", "PORTD", "PORTE", "DSW", "COINAGE", "PORTH" };
122124   offset &= 0x1f/2;
123125
124126   switch (offset)
r32319r32320
137139            return m_misc_io_data[offset];
138140
139141         // otherwise, return an input port
140         return m_in_ports[offset]->read();
142         return ioport(portnames[offset])->read();
141143
142144      // 'SEGA' protection
143145      case 0x10/2:
r32319r32320
816818//**************************************************************************
817819
818820static INPUT_PORTS_START( yboard_generic )
819   PORT_START("IN.0")
821   PORT_START("P1")
820822   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
821823
822   PORT_START("IN.1")
824   PORT_START("GENERAL")
823825   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )    // afterburner (gloc)
824826   PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
825827   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
r32319r32320
829831   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
830832   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
831833
832   PORT_START("IN.2")
834   PORT_START("PORTC")
833835   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
834836
835   PORT_START("IN.3")
837   PORT_START("PORTD")
836838   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
837839
838   PORT_START("IN.4")
840   PORT_START("PORTE")
839841   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
840842
841   PORT_START("IN.5")
843   PORT_START("DSW")
842844   PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, "SWB:1" )
843845   PORT_DIPUNUSED_DIPLOC( 0x02, IP_ACTIVE_LOW, "SWB:2" )
844846   PORT_DIPUNUSED_DIPLOC( 0x04, IP_ACTIVE_LOW, "SWB:3" )
r32319r32320
848850   PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SWB:7" )
849851   PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SWB:8" )
850852
851   PORT_START("IN.6")
853   PORT_START("COINAGE")
852854   SEGA_COINAGE_LOC(SWA)
853855
854   PORT_START("IN.7")
856   PORT_START("PORTH")
855857   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
856858INPUT_PORTS_END
857859
r32319r32320
864866static INPUT_PORTS_START( gforce2 )
865867   PORT_INCLUDE( yboard_generic )
866868
867   PORT_MODIFY("IN.1")
869   PORT_MODIFY("GENERAL")
868870   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Shoot")
869871   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile")
870872
871   PORT_MODIFY("IN.5")
873   PORT_MODIFY("DSW")
872874   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:1")
873875   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
874876   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
r32319r32320
891893   PORT_DIPSETTING(    0x40, DEF_STR( Upright ) )
892894   PORT_DIPSETTING(    0x00, "City" )
893895
894   PORT_START("ADC.0")  // stick X
896   PORT_START("ADC0")  // stick X
895897   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
896898
897   PORT_START("ADC.1")  // stick Y
899   PORT_START("ADC1")  // stick Y
898900   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
899901
900   PORT_START("ADC.2")  // throttle
902   PORT_START("ADC2")  // throttle
901903   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_MINMAX(0x01,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(79)
902904INPUT_PORTS_END
903905
r32319r32320
905907static INPUT_PORTS_START( gloc )
906908   PORT_INCLUDE( yboard_generic )
907909
908   PORT_MODIFY("IN.1")
910   PORT_MODIFY("GENERAL")
909911   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("After Burner")
910912   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Vulcan")
911913   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile")
912914
913   PORT_MODIFY("IN.5")
915   PORT_MODIFY("DSW")
914916   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:1,2")
915917   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
916918   PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
r32319r32320
933935   PORT_DIPSETTING(    0x80, "3 to Start, 2 to Continue" )
934936   PORT_DIPSETTING(    0x00, "4 to Start, 3 to Continue" )
935937
936   PORT_START("ADC.3")  // stick Y
938   PORT_START("ADC3")  // stick Y
937939   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x40,0xc0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
938940
939   PORT_START("ADC.4")  // throttle
941   PORT_START("ADC4")  // throttle
940942   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_SENSITIVITY(100) PORT_KEYDELTA(79)
941943
942   PORT_START("ADC.5")  // stick X
944   PORT_START("ADC5")  // stick X
943945   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x20,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
944946INPUT_PORTS_END
945947
r32319r32320
947949static INPUT_PORTS_START( glocr360 )
948950   PORT_INCLUDE( yboard_generic )
949951
950   PORT_MODIFY("IN.1")
952   PORT_MODIFY("GENERAL")
951953   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("After Burner")
952954   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Vulcan")
953955   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile")
954956
955   PORT_MODIFY("IN.5")
957   PORT_MODIFY("DSW")
956958   PORT_DIPNAME( 0x03, 0x03, "Game Type" ) PORT_DIPLOCATION("SWB:1,2")
957959   PORT_DIPSETTING(    0x02, "Fighting Only" )
958960   PORT_DIPSETTING(    0x03, "Fight/Experience" )
r32319r32320
982984//  PORT_DIPSETTING(    0x50, "1" )
983985//  PORT_DIPSETTING(    0x60, "1" )
984986
985   PORT_MODIFY("IN.6")
987   PORT_MODIFY("COINAGE")
986988   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3,4")
987989//  PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
988990//  PORT_DIPSETTING(    0x05, DEF_STR( 1C_1C ) )
r32319r32320
10181020   PORT_DIPSETTING(    0x80, DEF_STR( 1C_8C ) )
10191021   PORT_DIPSETTING(    0x00, "Free Play (if Coin A too) or 1/1" )
10201022
1021   PORT_START("ADC.0")  // moving pitch
1023   PORT_START("ADC0")  // moving pitch
10221024   PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_PLAYER(2)
10231025
1024   PORT_START("ADC.2")  // moving roll
1026   PORT_START("ADC2")  // moving roll
10251027   PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_PLAYER(3)
10261028
1027   PORT_START("ADC.3")  // stick Y
1029   PORT_START("ADC3")  // stick Y
10281030   PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
10291031
1030   PORT_START("ADC.5")  // stick X
1032   PORT_START("ADC5")  // stick X
10311033   PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
10321034INPUT_PORTS_END
10331035
r32319r32320
10351037static INPUT_PORTS_START( pdrift )
10361038   PORT_INCLUDE( yboard_generic )
10371039
1038   PORT_MODIFY("IN.1")
1040   PORT_MODIFY("GENERAL")
10391041   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gear Shift") PORT_CODE(KEYCODE_SPACE) PORT_TOGGLE
10401042
1041   PORT_MODIFY("IN.5")
1043   PORT_MODIFY("DSW")
10421044   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
10431045   PORT_DIPSETTING(    0x03, "Moving" )
10441046   PORT_DIPSETTING(    0x02, "Upright/Sit Down" )
r32319r32320
10611063   PORT_DIPSETTING(    0x40, DEF_STR( Hard ) )
10621064   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
10631065
1064   PORT_START("ADC.3")  // brake
1066   PORT_START("ADC3")  // brake
10651067   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(40)
10661068
1067   PORT_START("ADC.4")  // gas pedal
1069   PORT_START("ADC4")  // gas pedal
10681070   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
10691071
1070   PORT_START("ADC.5")  // steering
1072   PORT_START("ADC5")  // steering
10711073   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x20,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
10721074INPUT_PORTS_END
10731075
r32319r32320
10751077static INPUT_PORTS_START( pdrifte )
10761078   PORT_INCLUDE( pdrift )
10771079
1078   PORT_MODIFY("IN.5")
1080   PORT_MODIFY("DSW")
10791081   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
10801082   PORT_DIPSETTING(    0x03, "Moving" )
10811083   PORT_DIPSETTING(    0x02, DEF_STR( Upright ) )
r32319r32320
11021104static INPUT_PORTS_START( pdriftj )
11031105   PORT_INCLUDE( pdrift )
11041106
1105   PORT_MODIFY("IN.5")
1107   PORT_MODIFY("DSW")
11061108   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
11071109   PORT_DIPSETTING(    0x03, "Moving" )
11081110   PORT_DIPSETTING(    0x02, "Upright/Sit Down" )
r32319r32320
11291131static INPUT_PORTS_START( pdriftl )
11301132   PORT_INCLUDE( pdrift )
11311133
1132   PORT_MODIFY("IN.5")
1134   PORT_MODIFY("DSW")
11331135   PORT_DIPUNUSED_DIPLOC( 0x08, IP_ACTIVE_LOW, "SWB:4" )
11341136   PORT_DIPNAME( 0x10, 0x00, "Ground Level Tilts" ) PORT_DIPLOCATION("SWB:5")
11351137   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
r32319r32320
11441146   PORT_DIPSETTING(    0x20, "6" )
11451147   PORT_DIPSETTING(    0x00, "7 - Hardest" )
11461148
1147   PORT_MODIFY("IN.6")
1149   PORT_MODIFY("COINAGE")
11481150   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWA:1,2,3,4")
11491151   PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
11501152   PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
r32319r32320
12111213static INPUT_PORTS_START( rchase )
12121214   PORT_INCLUDE( yboard_generic )
12131215
1214   PORT_MODIFY("IN.1")
1216   PORT_MODIFY("GENERAL")
12151217   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
12161218   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
12171219   PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
r32319r32320
12211223   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
12221224   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
12231225
1224   PORT_MODIFY("IN.6")
1226   PORT_MODIFY("COINAGE")
12251227   PORT_DIPNAME( 0x03, 0x03, "Coin to Credit" ) PORT_DIPLOCATION("SWA:1,2")
12261228   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
12271229   PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
r32319r32320
12451247   PORT_DIPSETTING(    0x20, "7 gives +1" )
12461248   PORT_DIPSETTING(    0x00, "Error" )
12471249
1248   PORT_MODIFY("IN.5")
1250   PORT_MODIFY("DSW")
12491251   PORT_DIPNAME( 0x03, 0x03, "Credits" ) PORT_DIPLOCATION("SWB:1,2")
12501252   PORT_DIPSETTING(    0x03, "1 to Start, 1 to Continue" )
12511253   PORT_DIPSETTING(    0x02, "2 to Start, 1 to Continue" )
r32319r32320
12661268   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
12671269   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
12681270
1269   PORT_START("ADC.0")
1271   PORT_START("ADC0")
12701272   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5)
12711273
1272   PORT_START("ADC.1")
1274   PORT_START("ADC1")
12731275   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5)
12741276
1275   PORT_START("ADC.2")
1277   PORT_START("ADC2")
12761278   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_PLAYER(2)
12771279
1278   PORT_START("ADC.3")
1280   PORT_START("ADC3")
12791281   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_PLAYER(2)
12801282INPUT_PORTS_END
12811283
r32319r32320
12831285static INPUT_PORTS_START( strkfgtr )
12841286   PORT_INCLUDE( gloc )
12851287
1286   PORT_MODIFY("IN.5")
1288   PORT_MODIFY("DSW")
12871289   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:1,2")
12881290   PORT_DIPSETTING(    0x02, DEF_STR( Easy ) )
12891291   PORT_DIPSETTING(    0x03, DEF_STR( Normal ) )
trunk/src/mame/drivers/segaorun.c
r32319r32320
688688         return m_i8255->read(space, offset & 3);
689689
690690      case 0x10/2:
691         return m_in_ports[offset & 3]->read();
691      {
692         static const char *const sysports[] = { "SERVICE", "UNKNOWN", "COINAGE", "DSW" };
693         return ioport(sysports[offset & 3])->read();
694      }
692695
693696      case 0x30/2:
694         return m_adc_ports[m_adc_select]->read_safe(0x0010);
697      {
698         static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3", "ADC4", "ADC5", "ADC6", "ADC7" };
699         return ioport(ports[m_adc_select])->read_safe(0x0010);
700      }
695701
696702      case 0x60/2:
697703         return watchdog_reset_r(space, 0);
r32319r32320
770776      case 0x1002/2:
771777      case 0x1004/2:
772778      case 0x1006/2:
773         return m_in_ports[offset & 3]->read();
779      {
780         static const char *const sysports[] = { "SERVICE", "UNKNOWN", "COINAGE", "DSW" };
781         return ioport(sysports[offset & 3])->read();
782      }
774783
775784      case 0x3020/2:
776         return m_adc_ports[m_adc_select]->read_safe(0x0010);
785      {
786         static const char *const ports[] = { "ADC0", "ADC1", "ADC2", "ADC3" };
787         return ioport(ports[m_adc_select])->read_safe(0x0010);
788      }
777789
778790      default:
779791         break;
r32319r32320
935947
936948
937949static INPUT_PORTS_START( outrun_generic )
938   PORT_START("IN.0")
950   PORT_START("SERVICE")
939951   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
940952   PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
941953   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
r32319r32320
945957   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
946958   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
947959
948   PORT_START("IN.1")
960   PORT_START("UNKNOWN")
949961   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
950962
951   PORT_START("IN.2")
963   PORT_START("COINAGE")
952964   SEGA_COINAGE_LOC(SWA)
953965
954   PORT_START("IN.3")
966   PORT_START("DSW")
955967   PORT_DIPUNUSED_DIPLOC( 0x01, IP_ACTIVE_LOW, "SWB:1" )
956968   PORT_DIPUNUSED_DIPLOC( 0x02, IP_ACTIVE_LOW, "SWB:2" )
957969   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) )  PORT_DIPLOCATION("SWB:3")
r32319r32320
969981   PORT_DIPSETTING(    0x40, DEF_STR( Hard ) )
970982   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
971983
972   PORT_START("ADC.0")  // steering
984   PORT_START("ADC0")  // steering
973985   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x20,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
974986
975   PORT_START("ADC.1")  // gas pedal
987   PORT_START("ADC1")  // gas pedal
976988   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20)
977989
978   PORT_START("ADC.2")  // brake
990   PORT_START("ADC2")  // brake
979991   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(40)
980992
981   PORT_START("ADC.3")
993   PORT_START("ADC3")
982994   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segaorun_state, bankmotor_pos_r, NULL)
983995INPUT_PORTS_END
984996
r32319r32320
9911003static INPUT_PORTS_START( outrun )
9921004   PORT_INCLUDE( outrun_generic )
9931005
994   PORT_MODIFY("IN.3")
1006   PORT_MODIFY("DSW")
9951007   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
9961008   PORT_DIPSETTING(    0x03, "Moving" )
9971009   PORT_DIPSETTING(    0x02, "Up Cockpit" )
r32319r32320
10031015static INPUT_PORTS_START( outrundx )
10041016   PORT_INCLUDE( outrun_generic )
10051017
1006   PORT_MODIFY("IN.3")
1018   PORT_MODIFY("DSW")
10071019   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1")
10081020   PORT_DIPSETTING(    0x00, "Not Moving" )
10091021   PORT_DIPSETTING(    0x01, "Moving" )
r32319r32320
10201032static INPUT_PORTS_START( toutrun )
10211033   PORT_INCLUDE( outrun_generic )
10221034
1023   PORT_MODIFY("IN.0")
1035   PORT_MODIFY("SERVICE")
10241036   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Turbo")
10251037
1026   PORT_MODIFY("IN.3")
1038   PORT_MODIFY("DSW")
10271039   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
10281040   PORT_DIPSETTING(    0x03, "Moving" )
10291041   PORT_DIPSETTING(    0x02, "Cockpit Conversion" )
r32319r32320
10461058static INPUT_PORTS_START( toutrunm )
10471059   PORT_INCLUDE( toutrun )
10481060
1049   PORT_MODIFY("IN.3")
1061   PORT_MODIFY("DSW")
10501062   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
10511063   PORT_DIPSETTING(    0x03, "Moving" )
10521064//  PORT_DIPSETTING(    0x02, DEF_STR( Unused ) )
r32319r32320
10631075static INPUT_PORTS_START( toutrunc )
10641076   PORT_INCLUDE( toutrun )
10651077
1066   PORT_MODIFY("IN.3")
1078   PORT_MODIFY("DSW")
10671079   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWB:1,2")
10681080//  PORT_DIPSETTING(    0x03, DEF_STR( Unused ) )
10691081//  PORT_DIPSETTING(    0x02, DEF_STR( Unused ) )
r32319r32320
10781090static INPUT_PORTS_START( shangon )
10791091   PORT_INCLUDE( outrun_generic )
10801092
1081   PORT_MODIFY("IN.0")
1093   PORT_MODIFY("SERVICE")
10821094   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
10831095
1084   PORT_MODIFY("IN.1")
1096   PORT_MODIFY("UNKNOWN")
10851097   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
10861098   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
10871099   PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
r32319r32320
10911103   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
10921104   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
10931105
1094   PORT_MODIFY("IN.3")
1106   PORT_MODIFY("DSW")
10951107   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SWB:1")
10961108   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
10971109   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
r32319r32320
11091121   PORT_DIPUNUSED_DIPLOC( 0x40, IP_ACTIVE_LOW, "SWB:7" )
11101122   PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SWB:8" )
11111123
1112   PORT_MODIFY("ADC.0") // steering
1124   PORT_MODIFY("ADC0") // steering
11131125   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x20,0xe0) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE
11141126
1115   PORT_MODIFY("ADC.3")
1127   PORT_MODIFY("ADC3")
11161128   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
11171129INPUT_PORTS_END
11181130
trunk/src/mame/drivers/namcos22.c
r32319r32320
27962796
27972797READ8_MEMBER(namcos22_state::namcos22s_mcu_adc_r)
27982798{
2799   UINT16 adc = m_adc_ports[offset >> 1 & 7]->read_safe(0) << 2;
2799   UINT16 adc = m_adc_inp[offset >> 1 & 7]->read_safe(0) << 2;
28002800   return (offset & 1) ? adc >> 8 : adc;
28012801}
28022802
trunk/src/mame/drivers/taitojc.c
r32319r32320
738738
739739READ8_MEMBER(taitojc_state::hc11_analog_r)
740740{
741   return m_analog_ports[offset]->read_safe(0);
741   return m_analog_inp[offset]->read_safe(0);
742742}
743743
744744
trunk/src/mame/includes/segaorun.h
r32319r32320
3535      m_segaic16road(*this, "segaic16road"),
3636      m_bankmotor_timer(*this, "bankmotor"),
3737      m_workram(*this, "workram"),
38      m_in_ports(*this, "IN"),
39      m_adc_ports(*this, "ADC"),
4038      m_custom_map(NULL),
4139      m_shangon_video(false),
4240      m_scanline_timer(NULL),
r32319r32320
127125   // memory
128126   required_shared_ptr<UINT16> m_workram;
129127
130   // input ports
131   required_ioport_array<4> m_in_ports;
132   optional_ioport_array<8> m_adc_ports;
133
134128   // configuration
135129   read16_delegate     m_custom_io_r;
136130   write16_delegate    m_custom_io_w;
trunk/src/mame/includes/namcos22.h
r32319r32320
200200      m_gfxdecode(*this, "gfxdecode"),
201201      m_screen(*this, "screen"),
202202      m_palette(*this, "palette"),
203      m_adc_ports(*this, "ADC")
203      m_adc_inp(*this, "ADC")
204204   { }
205205
206206   required_device<cpu_device> m_maincpu;
r32319r32320
229229   required_device<gfxdecode_device> m_gfxdecode;
230230   required_device<screen_device> m_screen;
231231   required_device<palette_device> m_palette;
232   optional_ioport_array<8> m_adc_ports;
232   optional_ioport_array<8> m_adc_inp;
233233
234234
235235   UINT8 m_syscontrol[0x20];
trunk/src/mame/includes/segaybd.h
r32319r32320
2121   // construction/destruction
2222   segaybd_state(const machine_config &mconfig, device_type type, const char *tag)
2323      : sega_16bit_common_base(mconfig, type, tag),
24      m_maincpu(*this, "maincpu"),
25      m_subx(*this, "subx"),
26      m_suby(*this, "suby"),
27      m_soundcpu(*this, "soundcpu"),
28      m_linkcpu(*this, "linkcpu"),
29      m_bsprites(*this, "bsprites"),
30      m_ysprites(*this, "ysprites"),
31      m_segaic16vid(*this, "segaic16vid"),
32      m_in_ports(*this, "IN"),
33      m_adc_ports(*this, "ADC"),
34      m_pdrift_bank(0),
35      m_scanline_timer(NULL),
36      m_irq2_scanline(0),
37      m_timer_irq_state(0),
38      m_vblank_irq_state(0),
39      m_tmp_bitmap(512, 512)
24         m_maincpu(*this, "maincpu"),
25         m_subx(*this, "subx"),
26         m_suby(*this, "suby"),
27         m_soundcpu(*this, "soundcpu"),
28         m_linkcpu(*this, "linkcpu"),
29         m_bsprites(*this, "bsprites"),
30         m_ysprites(*this, "ysprites"),
31         m_segaic16vid(*this, "segaic16vid"),
32         m_pdrift_bank(0),
33         m_scanline_timer(NULL),
34         m_irq2_scanline(0),
35         m_timer_irq_state(0),
36         m_vblank_irq_state(0),
37         m_tmp_bitmap(512, 512)
4038   {
4139      memset(m_analog_data, 0, sizeof(m_analog_data));
4240      memset(m_misc_io_data, 0, sizeof(m_misc_io_data));
r32319r32320
112110   required_device<sega_yboard_sprite_device> m_ysprites;
113111   required_device<segaic16_video_device> m_segaic16vid;
114112
115   // input ports
116   required_ioport_array<8> m_in_ports;
117   optional_ioport_array<6> m_adc_ports;
118
119113   // configuration
120114   output_delegate m_output_cb1;
121115   output_delegate m_output_cb2;
trunk/src/mame/includes/taitojc.h
r32319r32320
5353      m_gfxdecode(*this, "gfxdecode"),
5454      m_screen(*this, "screen"),
5555      m_palette(*this, "palette"),
56      m_analog_ports(*this, "AN")
56      m_analog_inp(*this, "AN")
5757   {
5858      m_mcu_output = 0;
5959      m_speed_meter = 0;
r32319r32320
7676   required_device<gfxdecode_device> m_gfxdecode;
7777   required_device<screen_device> m_screen;
7878   required_device<palette_device> m_palette;
79   optional_ioport_array<8> m_analog_ports;
79   optional_ioport_array<8> m_analog_inp;
8080
8181   taitojc_renderer *m_renderer;
8282

Previous 199869 Revisions Next


© 1997-2024 The MAME Team