trunk/src/mame/drivers/segaybd.c
r241779 | r241780 | |
118 | 118 | //------------------------------------------------- |
119 | 119 | |
120 | 120 | IOPORT_ARRAY_MEMBER( segaybd_state::digital_ports ) |
121 | | { "P1", "GENERAL", "PORTC", "PORTD", "PORTE", "DSW", "COINAGE", "PORTH" }; |
| 121 | { "P1", "GENERAL", "LIMITSW", "PORTD", "PORTE", "DSW", "COINAGE", "PORTH" }; |
122 | 122 | |
123 | 123 | READ16_MEMBER( segaybd_state::io_chip_r ) |
124 | 124 | { |
r241779 | r241780 | |
403 | 403 | void segaybd_state::gforce2_output_cb1(UINT16 data) |
404 | 404 | { |
405 | 405 | logerror("gforce2_output_cb1: '%02X'\n", data & 0xFF); |
406 | | //bits 4, 5, and 7 seem to be used to multiplex the PORTC signals |
| 406 | //bits 4, 5, and 7 seem to be used to multiplex the "LIMITSW" port signals |
407 | 407 | //The exact mapping of these signals is yet not perfectly understood. |
408 | 408 | //You can observe how this value changes when switching pages in the |
409 | 409 | //service mode motor test menu |
r241779 | r241780 | |
846 | 846 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) |
847 | 847 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 ) |
848 | 848 | |
849 | | PORT_START("PORTC") |
| 849 | PORT_START("LIMITSW") |
850 | 850 | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
851 | 851 | |
852 | 852 | PORT_START("PORTD") |
r241779 | r241780 | |
885 | 885 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Shoot") |
886 | 886 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile") |
887 | 887 | |
888 | | PORT_MODIFY("PORTC") |
| 888 | PORT_MODIFY("LIMITSW") |
889 | 889 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Floor Switch") |
890 | 890 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Beam Sensor 2 / Down Limit") //The meaning of these portbits seems to be selected |
891 | 891 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Beam Sensor 1 / Up Limit") // by the output value written to gforce2_output_cb1 |
r241779 | r241780 | |
934 | 934 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Vulcan") |
935 | 935 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Missile") |
936 | 936 | |
| 937 | PORT_MODIFY("LIMITSW") |
| 938 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Right Upper Limit Switch") |
| 939 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Right Lower Limit Switch") |
| 940 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Left Upper Limit Switch") |
| 941 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Left Lower Limit Switch") |
| 942 | |
937 | 943 | PORT_MODIFY("DSW") |
938 | 944 | PORT_DIPNAME( 0x03, 0x03, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWB:1,2") |
939 | 945 | PORT_DIPSETTING( 0x02, DEF_STR( Easy ) ) |