src/mess/drivers/coleco.c
| r4476 | r4477 | |
| 1 | | /*************************************************************************** |
| 1 | /******************************************************************************************************* |
| 2 | 2 | |
| 3 | 3 | coleco.c |
| 4 | 4 | |
| r4476 | r4477 | |
| 11 | 11 | Sean Young |
| 12 | 12 | |
| 13 | 13 | NEWS: |
| 14 | | - Modified memory map, now it has only 1k of RAM mapped on 8k Slot |
| 15 | | - Modified I/O map, now it is handled as on a real ColecoVision: |
| 14 | - Modified memory map, now it has only 1k of RAM mapped on 8k Slot |
| 15 | - Modified I/O map, now it is handled as on a real ColecoVision: |
| 16 | 16 | The I/O map is broken into 4 write and 4 read ports: |
| 17 | 17 | 80-9F (W) = Set both controllers to keypad mode |
| 18 | 18 | 80-9F (R) = Not Connected |
| r4476 | r4477 | |
| 26 | 26 | E0-FF (W) = Sound Chip (SN76489A) |
| 27 | 27 | E0-FF (R) = Read Controller data, A1=0 -> read controller 1, A1=1 -> read controller 2 |
| 28 | 28 | |
| 29 | | - Modified paddle handler, now it is handled as on a real ColecoVision |
| 30 | | - Added support for a Driving Controller (Expansion Module #2), enabled via configuration |
| 31 | | - Added support for a Roller Controller (Trackball), enabled via configuration |
| 32 | | - Added support for two Super Action Controller, enabled via configuracion |
| 29 | - Modified paddle handler, now it is handled as on a real ColecoVision |
| 30 | - Added support for a Driving Controller (Expansion Module #2), enabled via category |
| 31 | - Added support for a Roller Controller (Trackball), enabled via category |
| 32 | - Added support for two Super Action Controller, enabled via category |
| 33 | 33 | |
| 34 | 34 | EXTRA CONTROLLERS INFO: |
| 35 | 35 | |
| 36 | | -Driving Controller (Expansion Module #2). It consist of a steering wheel and a gas pedal. Only one |
| 37 | | can be used on a real ColecoVision. The gas pedal is not analog, internally it is just a switch. |
| 38 | | On a real ColecoVision, when the Driving Controller is enabled, the controller 1 do not work because |
| 39 | | have been replaced by the Driving Controller, and controller 2 have to be used to start game, gear |
| 40 | | shift, etc. |
| 41 | | Driving Controller is just a spinner on controller 1 socket similar to the one on Roller Controller |
| 42 | | and Super Action Controllers so you can use Roller Controller or Super Action Controllers to play |
| 43 | | games requiring Driving Controller. |
| 36 | -Driving Controller (Expansion Module #2). It consist of a steering wheel and a gas pedal. Only one |
| 37 | can be used on a real ColecoVision. The gas pedal is not analog, internally it is just a switch. |
| 38 | On a real ColecoVision, when the Driving Controller is enabled, the controller 1 do not work because |
| 39 | have been replaced by the Driving Controller, and controller 2 have to be used to start game, gear |
| 40 | shift, etc. |
| 41 | Driving Controller is just a spinner on controller 1 socket similar to the one on Roller Controller |
| 42 | and Super Action Controllers so you can use Roller Controller or Super Action Controllers to play |
| 43 | games requiring Driving Controller. |
| 44 | 44 | |
| 45 | | -Roller Controller. Basically a trackball with four buttons (the two fire buttons from player 1 and |
| 46 | | the two fire buttons from player 2). Only one Roller Controller can be used on a real ColecoVision. |
| 47 | | Roller Controller is connected to both controller sockets and both controllers are conected to the Roller |
| 48 | | Controller, it uses the spinner pins of both sockets to generate the X and Y signals (X from controller 1 |
| 49 | | and the Y from controller 2) |
| 45 | -Roller Controller. Basically a trackball with four buttons (the two fire buttons from player 1 and |
| 46 | the two fire buttons from player 2). Only one Roller Controller can be used on a real ColecoVision. |
| 47 | Roller Controller is connected to both controller sockets and both controllers are conected to the Roller |
| 48 | Controller, it uses the spinner pins of both sockets to generate the X and Y signals (X from controller 1 |
| 49 | and the Y from controller 2) |
| 50 | 50 | |
| 51 | | -Super Action Controllers. It is a hand controller with a keypad, four buttons (the two from |
| 52 | | the player pad and two more), and a spinner. This was made primarily for two player sport games, but |
| 53 | | will work for every other ColecoVision game. |
| 51 | -Super Action Controllers. It is a hand controller with a keypad, four buttons (the two from |
| 52 | the player pad and two more), and a spinner. This was made primarily for two player sport games, but |
| 53 | will work for every other ColecoVision game. |
| 54 | 54 | |
| 55 | | ***************************************************************************/ |
| 55 | *******************************************************************************************************/ |
| 56 | 56 | |
| 57 | 57 | /* |
| 58 | 58 | |
| r4476 | r4477 | |
| 75 | 75 | |
| 76 | 76 | static READ8_HANDLER( paddle_1_r ) |
| 77 | 77 | { |
| 78 | | UINT8 inport6 = input_port_read_safe(space->machine, "IN6", 0); |
| 78 | UINT8 ctrl_sel = input_port_read_safe(space->machine, "CTRLSEL", 0); |
| 79 | 79 | |
| 80 | | /* Keypad and fire 1 (SAC Yellow Button) */ |
| 81 | | if (joy_mode==0) |
| 80 | /* is there a controller connected to port1? */ |
| 81 | if ((ctrl_sel & 0x07) != 0x01 ) |
| 82 | 82 | { |
| 83 | | UINT8 inport0 = input_port_read(space->machine, "IN0"); |
| 84 | | UINT8 inport1 = input_port_read(space->machine, "IN1"); |
| 83 | /* Keypad and fire 1 (SAC Yellow Button) */ |
| 84 | if (joy_mode == 0) |
| 85 | { |
| 86 | UINT8 data = 0x0f; /* No key pressed by default */ |
| 87 | UINT16 ipt1 = 0x00; |
| 85 | 88 | |
| 86 | | /* Numeric pad buttons are not independent on a real ColecoVision, if you push more |
| 87 | | than one, a real ColecoVision think that it is a third button, so we are going to emulate |
| 88 | | the right behaviour */ |
| 89 | if ((ctrl_sel & 0x07) == 0x00) // colecovision controller |
| 90 | ipt1 = input_port_read(space->machine, "KEYPAD1"); |
| 91 | else if ((ctrl_sel & 0x07) == 0x02) // super action controller controller |
| 92 | ipt1 = input_port_read(space->machine, "SAC_KPD1"); |
| 89 | 93 | |
| 90 | | UINT8 data = 0x0F; /* No key pressed by default */ |
| 94 | /* Numeric pad buttons are not independent on a real ColecoVision, if you push more |
| 95 | than one, a real ColecoVision think that it is a third button, so we are going to emulate |
| 96 | the right behaviour */ |
| 97 | /* Super Action Controller additional buttons are read in the same way */ |
| 98 | if ((ctrl_sel & 0x07) != 0x03) /* If Driving Controller enabled -> no keypad 1*/ |
| 99 | { |
| 100 | if (!(ipt1 & 0x0001)) data &= 0x0a; /* 0 */ |
| 101 | if (!(ipt1 & 0x0002)) data &= 0x0d; /* 1 */ |
| 102 | if (!(ipt1 & 0x0004)) data &= 0x07; /* 2 */ |
| 103 | if (!(ipt1 & 0x0008)) data &= 0x0c; /* 3 */ |
| 104 | if (!(ipt1 & 0x0010)) data &= 0x02; /* 4 */ |
| 105 | if (!(ipt1 & 0x0020)) data &= 0x03; /* 5 */ |
| 106 | if (!(ipt1 & 0x0040)) data &= 0x0e; /* 6 */ |
| 107 | if (!(ipt1 & 0x0080)) data &= 0x05; /* 7 */ |
| 108 | if (!(ipt1 & 0x0100)) data &= 0x01; /* 8 */ |
| 109 | if (!(ipt1 & 0x0200)) data &= 0x0b; /* 9 */ |
| 110 | if (!(ipt1 & 0x0400)) data &= 0x06; /* # */ |
| 111 | if (!(ipt1 & 0x0800)) data &= 0x09; /* . */ |
| 112 | if (!(ipt1 & 0x1000)) data &= 0x04; /* Blue Action Button */ |
| 113 | if (!(ipt1 & 0x2000)) data &= 0x08; /* Purple Action Button */ |
| 114 | } |
| 91 | 115 | |
| 92 | | if (!(inport6 & 0x01)) /* If Driving Controller enabled -> no keypad 1*/ |
| 116 | return ((ipt1 & 0x4000) >> 2) | 0x30 | (data); |
| 117 | } |
| 118 | /* Joystick and fire 2 (SAC Red Button) */ |
| 119 | else |
| 93 | 120 | { |
| 94 | | if (!(inport0 & 0x01)) data &= 0x0A; /* 0 */ |
| 95 | | if (!(inport0 & 0x02)) data &= 0x0D; /* 1 */ |
| 96 | | if (!(inport0 & 0x04)) data &= 0x07; /* 2 */ |
| 97 | | if (!(inport0 & 0x08)) data &= 0x0C; /* 3 */ |
| 98 | | if (!(inport0 & 0x10)) data &= 0x02; /* 4 */ |
| 99 | | if (!(inport0 & 0x20)) data &= 0x03; /* 5 */ |
| 100 | | if (!(inport0 & 0x40)) data &= 0x0E; /* 6 */ |
| 101 | | if (!(inport0 & 0x80)) data &= 0x05; /* 7 */ |
| 102 | | if (!(inport1 & 0x01)) data &= 0x01; /* 8 */ |
| 103 | | if (!(inport1 & 0x02)) data &= 0x0B; /* 9 */ |
| 104 | | if (!(inport1 & 0x04)) data &= 0x06; /* # */ |
| 105 | | if (!(inport1 & 0x08)) data &= 0x09; /* . */ |
| 121 | UINT8 data = 0x0f; |
| 122 | |
| 123 | if ((ctrl_sel & 0x07) == 0x00) // colecovision controller |
| 124 | data = input_port_read(space->machine, "JOY1") & 0xcf; |
| 125 | else if ((ctrl_sel & 0x07) == 0x02) // super action controller controller |
| 126 | data = input_port_read(space->machine, "SAC_JOY1") & 0xcf; |
| 127 | |
| 128 | /* If any extra contoller enabled */ |
| 129 | if ((ctrl_sel & 0x80) || ((ctrl_sel & 0x07) == 0x02) || ((ctrl_sel & 0x07) == 0x03)) |
| 130 | { |
| 131 | if (joy_status[0] == 0) data |= 0x30; /* Spinner Move Left*/ |
| 132 | else if (joy_status[0] == 1) data |= 0x20; /* Spinner Move Right */ |
| 133 | } |
| 134 | |
| 135 | return data | 0x80; |
| 106 | 136 | } |
| 107 | | return (inport1 & 0x70) | (data); |
| 108 | 137 | } |
| 109 | | /* Joystick and fire 2 (SAC Red Button) */ |
| 110 | | else |
| 111 | | { |
| 112 | | UINT8 data = input_port_read(space->machine, "IN2") & 0xCF; |
| 113 | 138 | |
| 114 | | if (inport6 & 0x07) /* If Extra Contollers enabled */ |
| 115 | | { |
| 116 | | if (joy_status[0] == 0) data |= 0x30; /* Spinner Move Left*/ |
| 117 | | else if (joy_status[0] == 1) data |= 0x20; /* Spinner Move Right */ |
| 118 | | } |
| 119 | | |
| 120 | | return data | 0x80; |
| 121 | | } |
| 139 | return 0x0f; |
| 122 | 140 | } |
| 123 | 141 | |
| 124 | 142 | static READ8_HANDLER( paddle_2_r ) |
| 125 | 143 | { |
| 126 | | /* Keypad and fire 1 */ |
| 127 | | if (joy_mode == 0) |
| 144 | UINT8 ctrl_sel = input_port_read_safe(space->machine, "CTRLSEL", 0); |
| 145 | |
| 146 | /* is there a controller connected to port2? */ |
| 147 | if ((ctrl_sel & 0x70) != 0x10 ) |
| 128 | 148 | { |
| 129 | | UINT8 inport3 = input_port_read(space->machine, "IN3"); |
| 130 | | UINT8 inport4 = input_port_read(space->machine, "IN4"); |
| 149 | /* Keypad and fire 1 */ |
| 150 | if (joy_mode == 0) |
| 151 | { |
| 152 | UINT8 data = 0x0f; /* No key pressed by default */ |
| 153 | UINT16 ipt2 = 0x00; |
| 131 | 154 | |
| 132 | | /* Numeric pad buttons are not independent on a real ColecoVision, if you push more |
| 133 | | than one, a real ColecoVision think that it is a third button, so we are going to emulate |
| 134 | | the right behaviour */ |
| 155 | if ((ctrl_sel & 0x70) == 0x00) // colecovision controller |
| 156 | ipt2 = input_port_read(space->machine, "KEYPAD2"); |
| 157 | else if ((ctrl_sel & 0x70) == 0x20) // super action controller controller |
| 158 | ipt2 = input_port_read(space->machine, "SAC_KPD2"); |
| 135 | 159 | |
| 136 | | UINT8 data = 0x0F; /* No key pressed by default */ |
| 160 | /* Numeric pad buttons are not independent on a real ColecoVision, if you push more |
| 161 | than one, a real ColecoVision think that it is a third button, so we are going to emulate |
| 162 | the right behaviour */ |
| 163 | /* Super Action Controller additional buttons are read in the same way */ |
| 164 | if (!(ipt2 & 0x0001)) data &= 0x0a; /* 0 */ |
| 165 | if (!(ipt2 & 0x0002)) data &= 0x0d; /* 1 */ |
| 166 | if (!(ipt2 & 0x0004)) data &= 0x07; /* 2 */ |
| 167 | if (!(ipt2 & 0x0008)) data &= 0x0c; /* 3 */ |
| 168 | if (!(ipt2 & 0x0010)) data &= 0x02; /* 4 */ |
| 169 | if (!(ipt2 & 0x0020)) data &= 0x03; /* 5 */ |
| 170 | if (!(ipt2 & 0x0040)) data &= 0x0e; /* 6 */ |
| 171 | if (!(ipt2 & 0x0080)) data &= 0x05; /* 7 */ |
| 172 | if (!(ipt2 & 0x0100)) data &= 0x01; /* 8 */ |
| 173 | if (!(ipt2 & 0x0200)) data &= 0x0b; /* 9 */ |
| 174 | if (!(ipt2 & 0x0400)) data &= 0x06; /* # */ |
| 175 | if (!(ipt2 & 0x0800)) data &= 0x09; /* . */ |
| 176 | if (!(ipt2 & 0x1000)) data &= 0x04; /* Blue Action Button */ |
| 177 | if (!(ipt2 & 0x2000)) data &= 0x08; /* Purple Action Button */ |
| 137 | 178 | |
| 138 | | if (!(inport3 & 0x01)) data &= 0x0A; /* 0 */ |
| 139 | | if (!(inport3 & 0x02)) data &= 0x0D; /* 1 */ |
| 140 | | if (!(inport3 & 0x04)) data &= 0x07; /* 2 */ |
| 141 | | if (!(inport3 & 0x08)) data &= 0x0C; /* 3 */ |
| 142 | | if (!(inport3 & 0x10)) data &= 0x02; /* 4 */ |
| 143 | | if (!(inport3 & 0x20)) data &= 0x03; /* 5 */ |
| 144 | | if (!(inport3 & 0x40)) data &= 0x0E; /* 6 */ |
| 145 | | if (!(inport3 & 0x80)) data &= 0x05; /* 7 */ |
| 146 | | if (!(inport4 & 0x01)) data &= 0x01; /* 8 */ |
| 147 | | if (!(inport4 & 0x02)) data &= 0x0B; /* 9 */ |
| 148 | | if (!(inport4 & 0x04)) data &= 0x06; /* # */ |
| 149 | | if (!(inport4 & 0x08)) data &= 0x09; /* . */ |
| 179 | return ((ipt2 & 0x4000) >> 2) | 0x30 | (data); |
| 180 | } |
| 181 | /* Joystick and fire 2*/ |
| 182 | else |
| 183 | { |
| 184 | UINT8 data = 0x0f; |
| 150 | 185 | |
| 151 | | return (inport4 & 0x70) | (data); |
| 152 | | } |
| 153 | | /* Joystick and fire 2*/ |
| 154 | | else |
| 155 | | { |
| 156 | | UINT8 data = input_port_read(space->machine, "IN5") & 0xCF; |
| 157 | | UINT8 inport6 = input_port_read_safe(space->machine, "IN6", 0); |
| 186 | if ((ctrl_sel & 0x70) == 0x00) // colecovision controller |
| 187 | data = input_port_read(space->machine, "JOY2") & 0xcf; |
| 188 | else if ((ctrl_sel & 0x70) == 0x20) // super action controller controller |
| 189 | data = input_port_read(space->machine, "SAC_JOY2") & 0xcf; |
| 158 | 190 | |
| 159 | | if (inport6 & 0x02) /* If Roller Controller enabled */ |
| 160 | | { |
| 161 | | if (joy_status[1] == 0) data |= 0x30; |
| 162 | | else if (joy_status[1] == 1) data |= 0x20; |
| 191 | /* If Roller Controller or P2 Super Action Controller enabled */ |
| 192 | if ((ctrl_sel & 0x80) || ((ctrl_sel & 0x70) == 0x20)) |
| 193 | { |
| 194 | if (joy_status[1] == 0) data |= 0x30; |
| 195 | else if (joy_status[1] == 1) data |= 0x20; |
| 196 | } |
| 197 | |
| 198 | return data | 0x80; |
| 163 | 199 | } |
| 200 | } |
| 164 | 201 | |
| 165 | | return data | 0x80; |
| 166 | | } |
| 202 | return 0x0f; |
| 167 | 203 | } |
| 168 | 204 | |
| 169 | 205 | static WRITE8_HANDLER( paddle_off_w ) |
| r4476 | r4477 | |
| 214 | 250 | |
| 215 | 251 | /* Input Ports */ |
| 216 | 252 | |
| 217 | | static INPUT_PORTS_START( coleco ) |
| 218 | | PORT_START("IN0") |
| 219 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("0 (pad 1)") PORT_CODE(KEYCODE_0) |
| 220 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("1 (pad 1)") PORT_CODE(KEYCODE_1) |
| 221 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("2 (pad 1)") PORT_CODE(KEYCODE_2) |
| 222 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3 (pad 1)") PORT_CODE(KEYCODE_3) |
| 223 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4 (pad 1)") PORT_CODE(KEYCODE_4) |
| 224 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("5 (pad 1)") PORT_CODE(KEYCODE_5) |
| 225 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("6 (pad 1)") PORT_CODE(KEYCODE_6) |
| 226 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("7 (pad 1)") PORT_CODE(KEYCODE_7) |
| 253 | static INPUT_PORTS_START( ctrl1 ) |
| 254 | PORT_START("KEYPAD1") |
| 255 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("0 (pad 1)") PORT_CODE(KEYCODE_0) PORT_CATEGORY(1) |
| 256 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("1 (pad 1)") PORT_CODE(KEYCODE_1) PORT_CATEGORY(1) |
| 257 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("2 (pad 1)") PORT_CODE(KEYCODE_2) PORT_CATEGORY(1) |
| 258 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3 (pad 1)") PORT_CODE(KEYCODE_3) PORT_CATEGORY(1) |
| 259 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4 (pad 1)") PORT_CODE(KEYCODE_4) PORT_CATEGORY(1) |
| 260 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("5 (pad 1)") PORT_CODE(KEYCODE_5) PORT_CATEGORY(1) |
| 261 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("6 (pad 1)") PORT_CODE(KEYCODE_6) PORT_CATEGORY(1) |
| 262 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("7 (pad 1)") PORT_CODE(KEYCODE_7) PORT_CATEGORY(1) |
| 263 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("8 (pad 1)") PORT_CODE(KEYCODE_8) PORT_CATEGORY(1) |
| 264 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("9 (pad 1)") PORT_CODE(KEYCODE_9) PORT_CATEGORY(1) |
| 265 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("# (pad 1)") PORT_CODE(KEYCODE_MINUS) PORT_CATEGORY(1) |
| 266 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(". (pad 1)") PORT_CODE(KEYCODE_EQUALS) PORT_CATEGORY(1) |
| 267 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_CATEGORY(1) |
| 268 | PORT_BIT( 0xb000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CATEGORY(1) |
| 227 | 269 | |
| 228 | | PORT_START("IN1") |
| 229 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("8 (pad 1)") PORT_CODE(KEYCODE_8) |
| 230 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("9 (pad 1)") PORT_CODE(KEYCODE_9) |
| 231 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("# (pad 1)") PORT_CODE(KEYCODE_MINUS) |
| 232 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(". (pad 1)") PORT_CODE(KEYCODE_EQUALS) |
| 233 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 234 | | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 270 | PORT_START("JOY1") |
| 271 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CATEGORY(1) |
| 272 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CATEGORY(1) |
| 273 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CATEGORY(1) |
| 274 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CATEGORY(1) |
| 275 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_CATEGORY(1) |
| 276 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CATEGORY(1) |
| 277 | INPUT_PORTS_END |
| 235 | 278 | |
| 236 | | PORT_START("IN2") |
| 237 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| 238 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) |
| 239 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) |
| 240 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) |
| 241 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 242 | | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 279 | static INPUT_PORTS_START( ctrl2 ) |
| 280 | PORT_START("KEYPAD2") |
| 281 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("0 (pad 2)") PORT_CODE(KEYCODE_0_PAD) PORT_CATEGORY(2) |
| 282 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("1 (pad 2)") PORT_CODE(KEYCODE_1_PAD) PORT_CATEGORY(2) |
| 283 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("2 (pad 2)") PORT_CODE(KEYCODE_2_PAD) PORT_CATEGORY(2) |
| 284 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3 (pad 2)") PORT_CODE(KEYCODE_3_PAD) PORT_CATEGORY(2) |
| 285 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4 (pad 2)") PORT_CODE(KEYCODE_4_PAD) PORT_CATEGORY(2) |
| 286 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("5 (pad 2)") PORT_CODE(KEYCODE_5_PAD) PORT_CATEGORY(2) |
| 287 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("6 (pad 2)") PORT_CODE(KEYCODE_6_PAD) PORT_CATEGORY(2) |
| 288 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("7 (pad 2)") PORT_CODE(KEYCODE_7_PAD) PORT_CATEGORY(2) |
| 289 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("8 (pad 2)") PORT_CODE(KEYCODE_8_PAD) PORT_CATEGORY(2) |
| 290 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("9 (pad 2)") PORT_CODE(KEYCODE_9_PAD) PORT_CATEGORY(2) |
| 291 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("# (pad 2)") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CATEGORY(2) |
| 292 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(". (pad 2)") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CATEGORY(2) |
| 293 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_CATEGORY(2) |
| 294 | PORT_BIT( 0xb000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CATEGORY(2) |
| 243 | 295 | |
| 244 | | PORT_START("IN3") |
| 245 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("0 (pad 2)") PORT_CODE(KEYCODE_0_PAD) |
| 246 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("1 (pad 2)") PORT_CODE(KEYCODE_1_PAD) |
| 247 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("2 (pad 2)") PORT_CODE(KEYCODE_2_PAD) |
| 248 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3 (pad 2)") PORT_CODE(KEYCODE_3_PAD) |
| 249 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4 (pad 2)") PORT_CODE(KEYCODE_4_PAD) |
| 250 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("5 (pad 2)") PORT_CODE(KEYCODE_5_PAD) |
| 251 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("6 (pad 2)") PORT_CODE(KEYCODE_6_PAD) |
| 252 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("7 (pad 2)") PORT_CODE(KEYCODE_7_PAD) |
| 296 | PORT_START("JOY2") |
| 297 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CATEGORY(2) |
| 298 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CATEGORY(2) |
| 299 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CATEGORY(2) |
| 300 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CATEGORY(2) |
| 301 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CATEGORY(2) |
| 302 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CATEGORY(2) |
| 303 | INPUT_PORTS_END |
| 253 | 304 | |
| 254 | | PORT_START("IN4") |
| 255 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("8 (pad 2)") PORT_CODE(KEYCODE_8_PAD) |
| 256 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("9 (pad 2)") PORT_CODE(KEYCODE_9_PAD) |
| 257 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("# (pad 2)") PORT_CODE(KEYCODE_MINUS_PAD) |
| 258 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(". (pad 2)") PORT_CODE(KEYCODE_PLUS_PAD) |
| 259 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 260 | | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 305 | static INPUT_PORTS_START( sac1 ) |
| 306 | PORT_START("SAC_KPD1") |
| 307 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("0 (SAC pad 1)") PORT_CODE(KEYCODE_0) PORT_CATEGORY(3) |
| 308 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("1 (SAC pad 1)") PORT_CODE(KEYCODE_1) PORT_CATEGORY(3) |
| 309 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("2 (SAC pad 1)") PORT_CODE(KEYCODE_2) PORT_CATEGORY(3) |
| 310 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3 (SAC pad 1)") PORT_CODE(KEYCODE_3) PORT_CATEGORY(3) |
| 311 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4 (SAC pad 1)") PORT_CODE(KEYCODE_4) PORT_CATEGORY(3) |
| 312 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("5 (SAC pad 1)") PORT_CODE(KEYCODE_5) PORT_CATEGORY(3) |
| 313 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("6 (SAC pad 1)") PORT_CODE(KEYCODE_6) PORT_CATEGORY(3) |
| 314 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("7 (SAC pad 1)") PORT_CODE(KEYCODE_7) PORT_CATEGORY(3) |
| 315 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("8 (SAC pad 1)") PORT_CODE(KEYCODE_8) PORT_CATEGORY(3) |
| 316 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("9 (SAC pad 1)") PORT_CODE(KEYCODE_9) PORT_CATEGORY(3) |
| 317 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("# (SAC pad 1)") PORT_CODE(KEYCODE_MINUS) PORT_CATEGORY(3) |
| 318 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(". (SAC pad 1)") PORT_CODE(KEYCODE_EQUALS) PORT_CATEGORY(3) |
| 319 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Blue Action Button P1") PORT_PLAYER(1) PORT_CATEGORY(3) |
| 320 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Purple Action Button P1") PORT_PLAYER(1) PORT_CATEGORY(3) |
| 321 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Orange Action Button P1") PORT_PLAYER(1) PORT_CATEGORY(3) |
| 322 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CATEGORY(3) |
| 261 | 323 | |
| 262 | | PORT_START("IN5") |
| 263 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| 264 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 265 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) |
| 266 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 267 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 268 | | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 324 | PORT_START("SAC_JOY1") |
| 325 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_CATEGORY(3) |
| 326 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_CATEGORY(3) |
| 327 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_CATEGORY(3) |
| 328 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_CATEGORY(3) |
| 329 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Yellow Action Button P1") PORT_PLAYER(1) PORT_CATEGORY(3) |
| 330 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CATEGORY(3) |
| 269 | 331 | |
| 270 | | PORT_START("IN6") |
| 271 | | PORT_DIPNAME( 0x07, 0x00, "Extra Controllers" ) |
| 272 | | PORT_DIPSETTING( 0x00, DEF_STR( None ) ) |
| 273 | | PORT_DIPSETTING( 0x01, "Driving Controller" ) |
| 274 | | PORT_DIPSETTING( 0x02, "Roller Controller" ) |
| 275 | | PORT_DIPSETTING( 0x04, "Super Action Controllers" ) |
| 276 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("SAC Blue Button P1") PORT_CODE(KEYCODE_Z) |
| 277 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("SAC Purple Button P1") PORT_CODE(KEYCODE_X) |
| 278 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("SAC Blue Button P2") PORT_CODE(KEYCODE_Q) PORT_PLAYER(2) |
| 279 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("SAC Purple Button P2") PORT_CODE(KEYCODE_W) PORT_PLAYER(2) |
| 332 | PORT_START("SAC_SLIDE1") // SAC P1 slider |
| 333 | PORT_BIT( 0x0f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_L) PORT_CODE_INC(KEYCODE_J) PORT_RESET PORT_PLAYER(1) PORT_CATEGORY(3) |
| 334 | INPUT_PORTS_END |
| 280 | 335 | |
| 281 | | PORT_START("IN7") // Extra Controls (Driving Controller, SAC P1 slider, Roller Controller X Axis) |
| 282 | | PORT_BIT( 0x0f, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_L) PORT_CODE_INC(KEYCODE_J) PORT_RESET |
| 336 | static INPUT_PORTS_START( sac2 ) |
| 337 | PORT_START("SAC_KPD2") |
| 338 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("0 (SAC pad 2)") PORT_CODE(KEYCODE_0_PAD) PORT_CATEGORY(4) |
| 339 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("1 (SAC pad 2)") PORT_CODE(KEYCODE_1_PAD) PORT_CATEGORY(4) |
| 340 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("2 (SAC pad 2)") PORT_CODE(KEYCODE_2_PAD) PORT_CATEGORY(4) |
| 341 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3 (SAC pad 2)") PORT_CODE(KEYCODE_3_PAD) PORT_CATEGORY(4) |
| 342 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4 (SAC pad 2)") PORT_CODE(KEYCODE_4_PAD) PORT_CATEGORY(4) |
| 343 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("5 (SAC pad 2)") PORT_CODE(KEYCODE_5_PAD) PORT_CATEGORY(4) |
| 344 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("6 (SAC pad 2)") PORT_CODE(KEYCODE_6_PAD) PORT_CATEGORY(4) |
| 345 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("7 (SAC pad 2)") PORT_CODE(KEYCODE_7_PAD) PORT_CATEGORY(4) |
| 346 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("8 (SAC pad 2)") PORT_CODE(KEYCODE_8_PAD) PORT_CATEGORY(4) |
| 347 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("9 (SAC pad 2)") PORT_CODE(KEYCODE_9_PAD) PORT_CATEGORY(4) |
| 348 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("# (SAC pad 2)") PORT_CODE(KEYCODE_MINUS_PAD) PORT_CATEGORY(4) |
| 349 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(". (SAC pad 2)") PORT_CODE(KEYCODE_PLUS_PAD) PORT_CATEGORY(4) |
| 350 | PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Blue Action Button P2") PORT_PLAYER(2) PORT_CATEGORY(4) |
| 351 | PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Purple Action Button P2") PORT_PLAYER(2) PORT_CATEGORY(4) |
| 352 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Orange Action Button P2") PORT_PLAYER(2) PORT_CATEGORY(4) |
| 353 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CATEGORY(4) |
| 283 | 354 | |
| 284 | | PORT_START("IN8") // Extra Controls (SAC P2 slider, Roller Controller Y Axis) |
| 285 | | PORT_BIT( 0x0f, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_RESET PORT_PLAYER(2) |
| 355 | PORT_START("SAC_JOY2") |
| 356 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_CATEGORY(4) |
| 357 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_CATEGORY(4) |
| 358 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_CATEGORY(4) |
| 359 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CATEGORY(4) |
| 360 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Yellow Action Button P2") PORT_PLAYER(2) PORT_CATEGORY(4) |
| 361 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CATEGORY(4) |
| 362 | |
| 363 | PORT_START("SAC_SLIDE2") // SAC P2 slider |
| 364 | PORT_BIT( 0x0f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_RESET PORT_PLAYER(2) PORT_CATEGORY(4) |
| 286 | 365 | INPUT_PORTS_END |
| 287 | 366 | |
| 288 | | static INPUT_PORTS_START( czz50 ) |
| 289 | | PORT_START("IN0") |
| 290 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 291 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') |
| 292 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') |
| 293 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') |
| 294 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') |
| 295 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') |
| 296 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') |
| 297 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') |
| 367 | static INPUT_PORTS_START( driving ) |
| 368 | PORT_START("DRIV") // Driving Controller |
| 369 | PORT_BIT( 0x0f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_L) PORT_CODE_INC(KEYCODE_J) PORT_RESET PORT_CATEGORY(5) |
| 298 | 370 | |
| 299 | | PORT_START("IN1") |
| 300 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| 301 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 302 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("#") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('#') |
| 303 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(".") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('.') |
| 304 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 305 | | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 371 | // PORT_START("IN8") // |
| 372 | // PORT_BIT( 0x0f, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_PLAYER(2) PORT_CATEGORY(5) |
| 373 | INPUT_PORTS_END |
| 306 | 374 | |
| 307 | | PORT_START("IN2") |
| 308 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 309 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 310 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 311 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) |
| 312 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 313 | | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 375 | static INPUT_PORTS_START( roller ) |
| 376 | PORT_START("ROLLER_X") // Roller Controller X Axis |
| 377 | PORT_BIT( 0x0f, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_L) PORT_CODE_INC(KEYCODE_J) PORT_RESET PORT_CATEGORY(6) |
| 314 | 378 | |
| 315 | | PORT_START("IN3") |
| 316 | | PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 379 | PORT_START("ROLLER_Y") // Roller Controller Y Axis |
| 380 | PORT_BIT( 0x0f, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_I) PORT_CODE_INC(KEYCODE_K) PORT_RESET PORT_CATEGORY(6) |
| 381 | INPUT_PORTS_END |
| 317 | 382 | |
| 318 | | PORT_START("IN4") |
| 319 | | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 320 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 321 | | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 383 | static INPUT_PORTS_START( coleco ) |
| 384 | PORT_START("CTRLSEL") /* Select Controller Type */ |
| 385 | PORT_CATEGORY_CLASS( 0x07, 0x00, "Port 1 Controller" ) |
| 386 | PORT_CATEGORY_ITEM( 0x01, DEF_STR( None ), 0 ) |
| 387 | PORT_CATEGORY_ITEM( 0x00, "ColecoVision Controller", 1 ) |
| 388 | PORT_CATEGORY_ITEM( 0x02, "Super Action Controller", 3 ) |
| 389 | PORT_CATEGORY_ITEM( 0x03, "Driving Controller", 5 ) |
| 390 | PORT_CATEGORY_CLASS( 0x70, 0x00, "Port 2 Controller" ) |
| 391 | PORT_CATEGORY_ITEM( 0x10, DEF_STR( None ), 0 ) |
| 392 | PORT_CATEGORY_ITEM( 0x00, "ColecoVision Controller", 2 ) |
| 393 | PORT_CATEGORY_ITEM( 0x20, "Super Action Controller", 4 ) |
| 394 | PORT_CATEGORY_CLASS( 0x80, 0x00, "Extra Controller" ) |
| 395 | PORT_CATEGORY_ITEM( 0x00, DEF_STR( None ), 0 ) |
| 396 | PORT_CATEGORY_ITEM( 0x80, "Roller Controller", 6 ) |
| 322 | 397 | |
| 323 | | PORT_START("IN5") |
| 324 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| 325 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 326 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) |
| 327 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 328 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 329 | | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 398 | PORT_INCLUDE( ctrl1 ) |
| 399 | PORT_INCLUDE( ctrl2 ) |
| 400 | PORT_INCLUDE( sac1 ) |
| 401 | PORT_INCLUDE( sac2 ) |
| 402 | PORT_INCLUDE( driving ) |
| 403 | PORT_INCLUDE( roller ) |
| 330 | 404 | INPUT_PORTS_END |
| 331 | 405 | |
| 406 | |
| 407 | static INPUT_PORTS_START( czz50 ) |
| 408 | PORT_START("KEYPAD1") |
| 409 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 410 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') |
| 411 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') |
| 412 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') |
| 413 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') |
| 414 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') |
| 415 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') |
| 416 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') |
| 417 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| 418 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 419 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("#") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('#') |
| 420 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(".") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('.') |
| 421 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) |
| 422 | PORT_BIT( 0xb000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 423 | |
| 424 | PORT_START("JOY1") |
| 425 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1) |
| 426 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) |
| 427 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) |
| 428 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) |
| 429 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) |
| 430 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 431 | |
| 432 | PORT_START("KEYPAD2") |
| 433 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 434 | PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 435 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 436 | PORT_BIT( 0xb000, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 437 | |
| 438 | PORT_START("JOY2") |
| 439 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2) |
| 440 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) |
| 441 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) |
| 442 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) |
| 443 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 444 | PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 445 | INPUT_PORTS_END |
| 446 | |
| 332 | 447 | /*************************************************************************** |
| 333 | 448 | |
| 334 | 449 | The interrupts come from the vdp. The vdp (tms9928a) interrupt can go up |
| r4476 | r4477 | |
| 359 | 474 | |
| 360 | 475 | static TIMER_CALLBACK( paddle_callback ) |
| 361 | 476 | { |
| 362 | | int port7 = input_port_read_safe(machine, "IN7", 0); |
| 363 | | int port8 = input_port_read_safe(machine, "IN8", 0); |
| 477 | UINT8 analog1 = 0x00; |
| 478 | UINT8 analog2 = 0x00; |
| 479 | UINT8 ctrl_sel = input_port_read_safe(machine, "CTRLSEL", 0); |
| 364 | 480 | |
| 365 | | if (port7 == 0) |
| 481 | /* which controller shall we read? */ |
| 482 | if ((ctrl_sel & 0x07) == 0x03) // Driving controller |
| 483 | analog1 = input_port_read_safe(machine, "DRIV", 0); |
| 484 | |
| 485 | else |
| 486 | { |
| 487 | if ((ctrl_sel & 0x07) == 0x02) // Super Action Controller P1 |
| 488 | analog1 = input_port_read_safe(machine, "SAC_SLIDE1", 0); |
| 489 | |
| 490 | if ((ctrl_sel & 0x70) == 0x20) // Super Action Controller P2 |
| 491 | analog2 = input_port_read_safe(machine, "SAC_SLIDE2", 0); |
| 492 | |
| 493 | /* In principle, even if not supported by any game, I guess we could have two Super |
| 494 | Action Controllers plugged into the Roller controller ports. Since I found no info |
| 495 | about the behavior of sliders in such a configuration, we overwrite SAC sliders with |
| 496 | the Roller trackball inputs and actually use the latter ones, when both are selected. */ |
| 497 | if (ctrl_sel & 0x80) // Roller controller |
| 498 | { |
| 499 | analog1 = input_port_read_safe(machine, "ROLLER_X", 0); |
| 500 | analog2 = input_port_read_safe(machine, "ROLLER_Y", 0); |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | if (analog1 == 0) |
| 366 | 505 | joy_status[0] = 0; |
| 367 | | else if (port7 & 0x08) |
| 506 | else if (analog1 & 0x08) |
| 368 | 507 | joy_status[0] = -1; |
| 369 | 508 | else |
| 370 | 509 | joy_status[0] = 1; |
| 371 | 510 | |
| 372 | | if (port8 == 0) |
| 511 | if (analog2 == 0) |
| 373 | 512 | joy_status[1] = 0; |
| 374 | | else if (port8 & 0x08) |
| 513 | else if (analog2 & 0x08) |
| 375 | 514 | joy_status[1] = -1; |
| 376 | 515 | else |
| 377 | 516 | joy_status[1] = 1; |