trunk/src/mess/drivers/tc4.c
| r243633 | r243634 | |
| 4 | 4 | |
| 5 | 5 | Coleco Total Control 4 |
| 6 | 6 | * TMS1400NLL MP7334-N2 (die labeled MP7334) |
| 7 | | |
| 8 | | This is a head to head electronic tabletop LED-display sports console. |
| 9 | | One cartridge(Football) was included with the console, the other three were |
| 10 | | sold separately. Gameplay has emphasis on strategy, read the official manual |
| 11 | | on how to play. Remember that you can rotate the view in MESS. |
| 12 | | |
| 13 | | Available cartridges: |
| 14 | | - Football |
| 15 | | - Basketball |
| 16 | | - Hockey |
| 17 | | - Soccer |
| 18 | 7 | |
| 19 | | Cartridge socket: |
| 20 | | 1 N/C |
| 21 | | 2 9V+ |
| 22 | | 3 power switch |
| 23 | | 4 K8 |
| 24 | | 5 K4 |
| 25 | | 6 K2 |
| 26 | | 7 K1 |
| 27 | | 8 R9 |
| 28 | | |
| 29 | | Football cartridge connects pins 4 and 8 |
| 30 | 8 | |
| 31 | 9 | |
| 32 | 10 | TODO: |
| 33 | | - pin configuration of other carts is guessed |
| 34 | | - offsensive players leds are supposed to look brighter |
| 35 | 11 | - MCU clock is unknown |
| 36 | 12 | |
| 37 | 13 | ***************************************************************************/ |
| r243633 | r243634 | |
| 44 | 20 | |
| 45 | 21 | // The master clock is a single stage RC oscillator: R=27.3K, C=100pf. |
| 46 | 22 | // TMS1400 RC curve is unknown, so let's do an approximation until it is. |
| 47 | | #define MASTER_CLOCK (450000) |
| 23 | #define MASTER_CLOCK (475000) |
| 48 | 24 | |
| 49 | 25 | |
| 50 | 26 | class tc4_state : public driver_device |
| r243633 | r243634 | |
| 58 | 34 | { } |
| 59 | 35 | |
| 60 | 36 | required_device<cpu_device> m_maincpu; |
| 61 | | required_ioport_array<7> m_button_matrix; |
| 37 | required_ioport_array<6> m_button_matrix; |
| 62 | 38 | required_device<speaker_sound_device> m_speaker; |
| 63 | 39 | |
| 64 | 40 | UINT16 m_r; |
| r243633 | r243634 | |
| 91 | 67 | // To prevent flickering here, we need to simulate a decay. |
| 92 | 68 | |
| 93 | 69 | // decay time, in steps of 1ms |
| 94 | | #define DISPLAY_DECAY_TIME 50 |
| 70 | #define DISPLAY_DECAY_TIME 40 |
| 95 | 71 | |
| 96 | 72 | inline bool tc4_state::index_is_7segled(int index) |
| 97 | 73 | { |
| r243633 | r243634 | |
| 99 | 75 | return (index >= 5 && index <= 9 && index != 6); |
| 100 | 76 | } |
| 101 | 77 | |
| 78 | |
| 102 | 79 | void tc4_state::display_update() |
| 103 | 80 | { |
| 104 | 81 | UINT16 active_state[0x10]; |
| r243633 | r243634 | |
| 167 | 144 | |
| 168 | 145 | // read from cartridge |
| 169 | 146 | if (m_r & 0x200) |
| 170 | | k |= m_button_matrix[6]->read(); |
| 147 | k |= ioport("CART")->read(); |
| 171 | 148 | |
| 172 | 149 | return k; |
| 173 | 150 | } |
| r243633 | r243634 | |
| 194 | 171 | |
| 195 | 172 | |
| 196 | 173 | |
| 174 | |
| 197 | 175 | /*************************************************************************** |
| 198 | 176 | |
| 199 | 177 | Inputs |
| r243633 | r243634 | |
| 202 | 180 | |
| 203 | 181 | static INPUT_PORTS_START( tc4 ) |
| 204 | 182 | PORT_START("IN.0") // R0 |
| 205 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Pass/Shoot Button 3") // right |
| 206 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Pass/Shoot Button 1") // left |
| 207 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Pass/Shoot Button 2") // middle |
| 208 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("P1 D/K Button") |
| 183 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) |
| 184 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) |
| 185 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) |
| 186 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) |
| 209 | 187 | |
| 210 | 188 | PORT_START("IN.1") // R1 |
| 211 | 189 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) |
| r243633 | r243634 | |
| 232 | 210 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(2) |
| 233 | 211 | |
| 234 | 212 | PORT_START("IN.5") // R5 |
| 235 | | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Pass/Shoot Button 3") // right |
| 236 | | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Pass/Shoot Button 1") // left |
| 237 | | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Pass/Shoot Button 2") // middle |
| 238 | | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(2) PORT_NAME("P2 D/K Button") |
| 213 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 214 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 215 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 216 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 239 | 217 | |
| 240 | | PORT_START("IN.6") // R9 |
| 218 | PORT_START("CART") |
| 241 | 219 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "R9:1" ) |
| 242 | 220 | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "R9:2" ) |
| 243 | 221 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "R9:3" ) |
| r243633 | r243634 | |
| 246 | 224 | |
| 247 | 225 | |
| 248 | 226 | |
| 227 | |
| 249 | 228 | /*************************************************************************** |
| 250 | 229 | |
| 251 | 230 | Machine Config |
| r243633 | r243634 | |
| 311 | 290 | ROM_END |
| 312 | 291 | |
| 313 | 292 | |
| 293 | |
| 314 | 294 | CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |