Previous 15994 Revisions Next

r9103 Sunday 12th September, 2010 at 11:04:41 UTC by Fabio Priuli
[PCE] Converted the driver to use Categories to select the controller type
[src/mess/drivers]pce.c
[src/mess/machine]pce.c

src/mess/machine/pce.c
r9102r9103
334334   pce_cd_init( machine );
335335}
336336
337static UINT8 joy_type[5],joy_6b_packet[5],joy_i;
337static UINT8 joy_6b_packet[5];
338338
339339MACHINE_RESET( pce )
340340{
341   joy_type[0] = (input_port_read(machine,"JOY_TYPE") & 0x01) >> 0;
342   joy_type[1] = (input_port_read(machine,"JOY_TYPE") & 0x02) >> 1;
343   joy_type[2] = (input_port_read(machine,"JOY_TYPE") & 0x04) >> 2;
344   joy_type[3] = (input_port_read(machine,"JOY_TYPE") & 0x08) >> 3;
345   joy_type[4] = (input_port_read(machine,"JOY_TYPE") & 0x10) >> 4;
341   int joy_i;
346342
347   for(joy_i=0;joy_i<5;joy_i++)
343   for (joy_i = 0; joy_i < 5; joy_i++)
348344      joy_6b_packet[joy_i] = 0;
349345
350346   pce_cd.adpcm_read_buf = 0;
r9102r9103
360356/* todo: how many input ports does the PCE have? */
361357WRITE8_HANDLER ( pce_joystick_w )
362358{
359   int joy_i;
360   UINT8 joy_type = input_port_read(space->machine,"JOY_TYPE");
361
363362   h6280io_set_buffer(space->cpu, data);
363
364364    /* bump counter on a low-to-high transition of bit 1 */
365    if((!joystick_data_select) && (data & JOY_CLOCK))
365    if ((!joystick_data_select) && (data & JOY_CLOCK))
366366    {
367367        joystick_port_select = (joystick_port_select + 1) & 0x07;
368368    }
r9102r9103
371371    joystick_data_select = data & JOY_CLOCK;
372372
373373    /* clear counter if bit 2 is set */
374    if(data & JOY_RESET)
374    if (data & JOY_RESET)
375375    {
376        joystick_port_select = 0;
376      joystick_port_select = 0;
377377
378      for(joy_i=0;joy_i<5;joy_i++)
378      for (joy_i = 0; joy_i < 5; joy_i++)
379379      {
380         if(joy_type[joy_i] & 1)
381              joy_6b_packet[joy_i]^=1;
380         if (BIT(joy_type, joy_i))
381              joy_6b_packet[joy_i] ^= 1;
382382      }
383383    }
384384}
385385
386386READ8_HANDLER ( pce_joystick_r )
387387{
388   static const char *const joyname[] = { "JOY_P1", "JOY_P2", "JOY_P3", "JOY_P4", "JOY_P5" };
389   UINT8 ret;
390   int data;
388   static const char *const joyname[2][5] = {
389      { "JOY_P1", "JOY_P2", "JOY_P3", "JOY_P4", "JOY_P5" },
390      { "JOY6B_P1", "JOY6B_P2", "JOY6B_P3", "JOY6B_P4", "JOY6B_P5" }
391   };
392   UINT8 joy_type = input_port_read(space->machine, "JOY_TYPE");
393   UINT8 ret, data;
391394
392   if(joy_6b_packet[joystick_port_select])
395   if (joystick_port_select <= 4)
393396   {
394      if(joystick_port_select <= 4)
395         data = (input_port_read(space->machine, joyname[joystick_port_select]) >> 8) & 0x0f;
397      if (joy_6b_packet[joystick_port_select])
398         data = ((input_port_read(space->machine, joyname[BIT(joy_type, joystick_port_select)][joystick_port_select]) >> 8) & 0x0f);
396399      else
397         data = 0xff;
400         data = input_port_read(space->machine, joyname[BIT(joy_type, joystick_port_select)][joystick_port_select]);
398401   }
399402   else
400   {
401      if(joystick_port_select <= 4)
402         data = input_port_read(space->machine, joyname[joystick_port_select]);
403      else
404         data = 0xff;
405   }
406   if(joystick_data_select) data >>= 4;
407   ret = (data & 0x0F) | pce.io_port_options;
403      data = 0xff;
404
405
406   if (joystick_data_select)
407      data >>= 4;
408
409   ret = (data & 0x0f) | pce.io_port_options;
408410#ifdef UNIFIED_PCE
409411   ret &= ~0x40;
410412#endif
src/mess/drivers/pce.c
r9102r9103
121121/* todo: alternate forms of input (multitap, mouse, etc.) */
122122static INPUT_PORTS_START( pce )
123123
124    PORT_START("JOY_P1")  /* Player 1 controls */
125    /* II is left of I on the original pad so we map them in reverse order */
126    PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button I") PORT_PLAYER(1)
127    PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Button II") PORT_PLAYER(1)
128    PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P1 Select") PORT_PLAYER(1)
129    PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P1 Run") PORT_PLAYER(1)
130    PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
131    PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
132    PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
133    PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
134    PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Button III") PORT_PLAYER(1)
135    PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Button IV") PORT_PLAYER(1)
136    PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Button V") PORT_PLAYER(1)
137    PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Button VI") PORT_PLAYER(1)
124   PORT_START("JOY_P1")
125   /* II is left of I on the original pad so we map them in reverse order */
126   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button I") PORT_PLAYER(1) PORT_CATEGORY(10)
127   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Button II") PORT_PLAYER(1) PORT_CATEGORY(10)
128   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P1 Select") PORT_PLAYER(1) PORT_CATEGORY(10)
129   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P1 Run") PORT_PLAYER(1) PORT_CATEGORY(10)
130   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CATEGORY(10)
131   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CATEGORY(10)
132   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CATEGORY(10)
133   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CATEGORY(10)
138134
139    PORT_START("JOY_P2")  /* Player 2 controls */
140    /* II is left of I on the original pad so we map them in reverse order */
141    PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Button I") PORT_PLAYER(2)
142    PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Button II") PORT_PLAYER(2)
143    PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P2 Select") PORT_PLAYER(2)
144    PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P2 Run") PORT_PLAYER(2)
145    PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
146    PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
147    PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
148    PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
149    PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Button III") PORT_PLAYER(2)
150    PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Button IV") PORT_PLAYER(2)
151    PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Button V") PORT_PLAYER(2)
152    PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Button VI") PORT_PLAYER(2)
135   PORT_START("JOY_P2")
136   /* II is left of I on the original pad so we map them in reverse order */
137   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Button I") PORT_PLAYER(2) PORT_CATEGORY(20)
138   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Button II") PORT_PLAYER(2) PORT_CATEGORY(20)
139   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P2 Select") PORT_PLAYER(2) PORT_CATEGORY(20)
140   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P2 Run") PORT_PLAYER(2) PORT_CATEGORY(20)
141   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CATEGORY(20)
142   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CATEGORY(20)
143   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CATEGORY(20)
144   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CATEGORY(20)
153145
154    PORT_START("JOY_P3")  /* Player 3 controls */
155    /* II is left of I on the original pad so we map them in reverse order */
156    PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Button I") PORT_PLAYER(3)
157    PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Button II") PORT_PLAYER(3)
158    PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P3 Select") PORT_PLAYER(3)
159    PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P3 Run") PORT_PLAYER(3)
160    PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3)
161    PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3)
162    PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3)
163    PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
164    PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Button III") PORT_PLAYER(3)
165    PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P3 Button IV") PORT_PLAYER(3)
166    PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P3 Button V") PORT_PLAYER(3)
167    PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P3 Button VI") PORT_PLAYER(3)
146   PORT_START("JOY_P3")
147   /* II is left of I on the original pad so we map them in reverse order */
148   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Button I") PORT_PLAYER(3) PORT_CATEGORY(30)
149   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Button II") PORT_PLAYER(3) PORT_CATEGORY(30)
150   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P3 Select") PORT_PLAYER(3) PORT_CATEGORY(30)
151   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P3 Run") PORT_PLAYER(3) PORT_CATEGORY(30)
152   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_CATEGORY(30)
153   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_CATEGORY(30)
154   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_CATEGORY(30)
155   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_CATEGORY(30)
168156
169    PORT_START("JOY_P4")  /* Player 4 controls */
170    /* II is left of I on the original pad so we map them in reverse order */
171    PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P4 Button I") PORT_PLAYER(4)
172    PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Button II") PORT_PLAYER(4)
173    PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P4 Select") PORT_PLAYER(4)
174    PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P4 Run") PORT_PLAYER(4)
175    PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4)
176    PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4)
177    PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)
178    PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
179    PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Button III") PORT_PLAYER(4)
180    PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P3 Button IV") PORT_PLAYER(4)
181    PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P3 Button V") PORT_PLAYER(4)
182    PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P3 Button VI") PORT_PLAYER(4)
157   PORT_START("JOY_P4")
158   /* II is left of I on the original pad so we map them in reverse order */
159   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P4 Button I") PORT_PLAYER(4) PORT_CATEGORY(40)
160   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Button II") PORT_PLAYER(4) PORT_CATEGORY(40)
161   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P4 Select") PORT_PLAYER(4) PORT_CATEGORY(40)
162   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P4 Run") PORT_PLAYER(4) PORT_CATEGORY(40)
163   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_CATEGORY(40)
164   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_CATEGORY(40)
165   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_CATEGORY(40)
166   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_CATEGORY(40)
183167
184    PORT_START("JOY_P5")  /* Player 5 controls */
185    /* II is left of I on the original pad so we map them in reverse order */
186    PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P5 Button I") PORT_PLAYER(5)
187    PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P5 Button II") PORT_PLAYER(5)
188    PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P5 Select") PORT_PLAYER(5)
189    PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P5 Run") PORT_PLAYER(5)
190    PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(5)
191    PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(5)
192    PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(5)
193    PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(5)
194    PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P5 Button III") PORT_PLAYER(5)
195    PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P5 Button IV") PORT_PLAYER(5)
196    PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P5 Button V") PORT_PLAYER(5)
197    PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P5 Button VI") PORT_PLAYER(5)
168   PORT_START("JOY_P5")
169   /* II is left of I on the original pad so we map them in reverse order */
170   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P5 Button I") PORT_PLAYER(5) PORT_CATEGORY(50)
171   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P5 Button II") PORT_PLAYER(5) PORT_CATEGORY(50)
172   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P5 Select") PORT_PLAYER(5) PORT_CATEGORY(50)
173   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P5 Run") PORT_PLAYER(5) PORT_CATEGORY(50)
174   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(5) PORT_CATEGORY(50)
175   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(5) PORT_CATEGORY(50)
176   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(5) PORT_CATEGORY(50)
177   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(5) PORT_CATEGORY(50)
198178
179   PORT_START("JOY6B_P1")
180   /* II is left of I on the original pad so we map them in reverse order */
181   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P1 Button I") PORT_PLAYER(1) PORT_CATEGORY(11)
182   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Button II") PORT_PLAYER(1) PORT_CATEGORY(11)
183   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P1 Select") PORT_PLAYER(1) PORT_CATEGORY(11)
184   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P1 Run") PORT_PLAYER(1) PORT_CATEGORY(11)
185   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CATEGORY(11)
186   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CATEGORY(11)
187   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CATEGORY(11)
188   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CATEGORY(11)
189   PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 Button III") PORT_PLAYER(1) PORT_CATEGORY(11)
190   PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Button IV") PORT_PLAYER(1) PORT_CATEGORY(11)
191   PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Button V") PORT_PLAYER(1) PORT_CATEGORY(11)
192   PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Button VI") PORT_PLAYER(1) PORT_CATEGORY(11)
193
194   PORT_START("JOY6B_P2")  /* Player 2 controls */
195   /* II is left of I on the original pad so we map them in reverse order */
196   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P2 Button I") PORT_PLAYER(2) PORT_CATEGORY(21)
197   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Button II") PORT_PLAYER(2) PORT_CATEGORY(21)
198   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P2 Select") PORT_PLAYER(2) PORT_CATEGORY(21)
199   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P2 Run") PORT_PLAYER(2) PORT_CATEGORY(21)
200   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CATEGORY(21)
201   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CATEGORY(21)
202   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CATEGORY(21)
203   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CATEGORY(21)
204   PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P2 Button III") PORT_PLAYER(2) PORT_CATEGORY(21)
205   PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P2 Button IV") PORT_PLAYER(2) PORT_CATEGORY(21)
206   PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P2 Button V") PORT_PLAYER(2) PORT_CATEGORY(21)
207   PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Button VI") PORT_PLAYER(2) PORT_CATEGORY(21)
208
209   PORT_START("JOY6B_P3")  /* Player 3 controls */
210   /* II is left of I on the original pad so we map them in reverse order */
211   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P3 Button I") PORT_PLAYER(3) PORT_CATEGORY(31)
212   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P3 Button II") PORT_PLAYER(3) PORT_CATEGORY(31)
213   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P3 Select") PORT_PLAYER(3) PORT_CATEGORY(31)
214   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P3 Run") PORT_PLAYER(3) PORT_CATEGORY(31)
215   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_CATEGORY(31)
216   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_CATEGORY(31)
217   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_CATEGORY(31)
218   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_CATEGORY(31)
219   PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Button III") PORT_PLAYER(3) PORT_CATEGORY(31)
220   PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P3 Button IV") PORT_PLAYER(3) PORT_CATEGORY(31)
221   PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P3 Button V") PORT_PLAYER(3) PORT_CATEGORY(31)
222   PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P3 Button VI") PORT_PLAYER(3) PORT_CATEGORY(31)
223
224   PORT_START("JOY6B_P4")  /* Player 4 controls */
225   /* II is left of I on the original pad so we map them in reverse order */
226   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P4 Button I") PORT_PLAYER(4) PORT_CATEGORY(41)
227   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P4 Button II") PORT_PLAYER(4) PORT_CATEGORY(41)
228   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P4 Select") PORT_PLAYER(4) PORT_CATEGORY(41)
229   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P4 Run") PORT_PLAYER(4) PORT_CATEGORY(41)
230   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_CATEGORY(41)
231   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_CATEGORY(41)
232   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_CATEGORY(41)
233   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_CATEGORY(41)
234   PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P3 Button III") PORT_PLAYER(4) PORT_CATEGORY(41)
235   PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P3 Button IV") PORT_PLAYER(4) PORT_CATEGORY(41)
236   PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P3 Button V") PORT_PLAYER(4) PORT_CATEGORY(41)
237   PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P3 Button VI") PORT_PLAYER(4) PORT_CATEGORY(41)
238
239   PORT_START("JOY6B_P5")  /* Player 5 controls */
240   /* II is left of I on the original pad so we map them in reverse order */
241   PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("P5 Button I") PORT_PLAYER(5) PORT_CATEGORY(51)
242   PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P5 Button II") PORT_PLAYER(5) PORT_CATEGORY(51)
243   PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_SELECT  ) PORT_NAME("P5 Select") PORT_PLAYER(5) PORT_CATEGORY(51)
244   PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_START   ) PORT_NAME("P5 Run") PORT_PLAYER(5) PORT_CATEGORY(51)
245   PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(5) PORT_CATEGORY(51)
246   PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(5) PORT_CATEGORY(51)
247   PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(5) PORT_CATEGORY(51)
248   PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(5) PORT_CATEGORY(51)
249   PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P5 Button III") PORT_PLAYER(5) PORT_CATEGORY(51)
250   PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P5 Button IV") PORT_PLAYER(5) PORT_CATEGORY(51)
251   PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P5 Button V") PORT_PLAYER(5) PORT_CATEGORY(51)
252   PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P5 Button VI") PORT_PLAYER(5) PORT_CATEGORY(51)
253
199254   PORT_START("JOY_TYPE")
200   PORT_CONFNAME(0x01,0x00,"Joystick Type Player 1")
201   PORT_CONFSETTING(0x00,"2-buttons")
202   PORT_CONFSETTING(0x01,"6-buttons")
203   PORT_CONFNAME(0x02,0x00,"Joystick Type Player 2")
204   PORT_CONFSETTING(0x00,"2-buttons")
205   PORT_CONFSETTING(0x02,"6-buttons")
206   PORT_CONFNAME(0x04,0x00,"Joystick Type Player 3")
207   PORT_CONFSETTING(0x00,"2-buttons")
208   PORT_CONFSETTING(0x04,"6-buttons")
209   PORT_CONFNAME(0x08,0x00,"Joystick Type Player 4")
210   PORT_CONFSETTING(0x00,"2-buttons")
211   PORT_CONFSETTING(0x08,"6-buttons")
212   PORT_CONFNAME(0x10,0x00,"Joystick Type Player 5")
213   PORT_CONFSETTING(0x00,"2-buttons")
214   PORT_CONFSETTING(0x10,"6-buttons")
255   PORT_CATEGORY_CLASS(0x01,0x00,"Joystick Type Player 1")
256   PORT_CATEGORY_ITEM(0x00,"2-buttons", 10)
257   PORT_CATEGORY_ITEM(0x01,"6-buttons", 11)
258   PORT_CATEGORY_CLASS(0x02,0x00,"Joystick Type Player 2")
259   PORT_CATEGORY_ITEM(0x00,"2-buttons", 20)
260   PORT_CATEGORY_ITEM(0x02,"6-buttons", 21)
261   PORT_CATEGORY_CLASS(0x04,0x00,"Joystick Type Player 3")
262   PORT_CATEGORY_ITEM(0x00,"2-buttons", 30)
263   PORT_CATEGORY_ITEM(0x04,"6-buttons", 31)
264   PORT_CATEGORY_CLASS(0x08,0x00,"Joystick Type Player 4")
265   PORT_CATEGORY_ITEM(0x00,"2-buttons", 40)
266   PORT_CATEGORY_ITEM(0x08,"6-buttons", 41)
267   PORT_CATEGORY_CLASS(0x10,0x00,"Joystick Type Player 5")
268   PORT_CATEGORY_ITEM(0x00,"2-buttons", 50)
269   PORT_CATEGORY_ITEM(0x10,"6-buttons", 51)
215270#if 0
216    PORT_START  /* Fake dipswitches for system config */
217    PORT_DIPNAME( 0x01, 0x01, "Console type")
218    PORT_DIPSETTING(    0x00, "Turbo-Grafx 16")
219    PORT_DIPSETTING(    0x01, "PC-Engine")
271   PORT_START  /* Fake dipswitches for system config */
272   PORT_DIPNAME( 0x01, 0x01, "Console type")
273   PORT_DIPSETTING(    0x00, "Turbo-Grafx 16")
274   PORT_DIPSETTING(    0x01, "PC-Engine")
220275
221    PORT_DIPNAME( 0x01, 0x01, "Joystick type")
222    PORT_DIPSETTING(    0x00, "2 Button")
223    PORT_DIPSETTING(    0x01, "6 Button")
276   PORT_DIPNAME( 0x01, 0x01, "Joystick type")
277   PORT_DIPSETTING(    0x00, "2 Button")
278   PORT_DIPSETTING(    0x01, "6 Button")
224279#endif
225280INPUT_PORTS_END
226281

Previous 15994 Revisions Next


© 1998-2018 The MESS Team