trunk/src/mess/drivers/tc4.c
| r243632 | r243633 | |
| 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 |
| 7 | 18 | |
| 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 |
| 8 | 30 | |
| 9 | 31 | |
| 10 | 32 | TODO: |
| 33 | - pin configuration of other carts is guessed |
| 34 | - offsensive players leds are supposed to look brighter |
| 11 | 35 | - MCU clock is unknown |
| 12 | 36 | |
| 13 | 37 | ***************************************************************************/ |
| r243632 | r243633 | |
| 20 | 44 | |
| 21 | 45 | // The master clock is a single stage RC oscillator: R=27.3K, C=100pf. |
| 22 | 46 | // TMS1400 RC curve is unknown, so let's do an approximation until it is. |
| 23 | | #define MASTER_CLOCK (475000) |
| 47 | #define MASTER_CLOCK (450000) |
| 24 | 48 | |
| 25 | 49 | |
| 26 | 50 | class tc4_state : public driver_device |
| r243632 | r243633 | |
| 34 | 58 | { } |
| 35 | 59 | |
| 36 | 60 | required_device<cpu_device> m_maincpu; |
| 37 | | required_ioport_array<6> m_button_matrix; |
| 61 | required_ioport_array<7> m_button_matrix; |
| 38 | 62 | required_device<speaker_sound_device> m_speaker; |
| 39 | 63 | |
| 40 | 64 | UINT16 m_r; |
| r243632 | r243633 | |
| 67 | 91 | // To prevent flickering here, we need to simulate a decay. |
| 68 | 92 | |
| 69 | 93 | // decay time, in steps of 1ms |
| 70 | | #define DISPLAY_DECAY_TIME 40 |
| 94 | #define DISPLAY_DECAY_TIME 50 |
| 71 | 95 | |
| 72 | 96 | inline bool tc4_state::index_is_7segled(int index) |
| 73 | 97 | { |
| r243632 | r243633 | |
| 75 | 99 | return (index >= 5 && index <= 9 && index != 6); |
| 76 | 100 | } |
| 77 | 101 | |
| 78 | | |
| 79 | 102 | void tc4_state::display_update() |
| 80 | 103 | { |
| 81 | 104 | UINT16 active_state[0x10]; |
| r243632 | r243633 | |
| 144 | 167 | |
| 145 | 168 | // read from cartridge |
| 146 | 169 | if (m_r & 0x200) |
| 147 | | k |= ioport("CART")->read(); |
| 170 | k |= m_button_matrix[6]->read(); |
| 148 | 171 | |
| 149 | 172 | return k; |
| 150 | 173 | } |
| r243632 | r243633 | |
| 171 | 194 | |
| 172 | 195 | |
| 173 | 196 | |
| 174 | | |
| 175 | 197 | /*************************************************************************** |
| 176 | 198 | |
| 177 | 199 | Inputs |
| r243632 | r243633 | |
| 180 | 202 | |
| 181 | 203 | static INPUT_PORTS_START( tc4 ) |
| 182 | 204 | PORT_START("IN.0") // R0 |
| 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 ) |
| 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") |
| 187 | 209 | |
| 188 | 210 | PORT_START("IN.1") // R1 |
| 189 | 211 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) |
| r243632 | r243633 | |
| 210 | 232 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(2) |
| 211 | 233 | |
| 212 | 234 | PORT_START("IN.5") // R5 |
| 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) |
| 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") |
| 217 | 239 | |
| 218 | | PORT_START("CART") |
| 240 | PORT_START("IN.6") // R9 |
| 219 | 241 | PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "R9:1" ) |
| 220 | 242 | PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "R9:2" ) |
| 221 | 243 | PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "R9:3" ) |
| r243632 | r243633 | |
| 224 | 246 | |
| 225 | 247 | |
| 226 | 248 | |
| 227 | | |
| 228 | 249 | /*************************************************************************** |
| 229 | 250 | |
| 230 | 251 | Machine Config |
| r243632 | r243633 | |
| 290 | 311 | ROM_END |
| 291 | 312 | |
| 292 | 313 | |
| 293 | | |
| 294 | 314 | CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |