Previous 199869 Revisions Next

r35123 Wednesday 18th February, 2015 at 23:18:11 UTC by Angelo Salese
Merge branch 'master' of https://github.com/mamedev/mame
[src/mess/drivers]tc4.c

trunk/src/mess/drivers/tc4.c
r243634r243635
44
55  Coleco Total Control 4
66  * 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
718
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
830
931
1032  TODO:
33  - pin configuration of other carts is guessed
34  - offsensive players leds are supposed to look brighter
1135  - MCU clock is unknown
1236
1337***************************************************************************/
r243634r243635
2044
2145// The master clock is a single stage RC oscillator: R=27.3K, C=100pf.
2246// TMS1400 RC curve is unknown, so let's do an approximation until it is.
23#define MASTER_CLOCK (475000)
47#define MASTER_CLOCK (450000)
2448
2549
2650class tc4_state : public driver_device
r243634r243635
3458   { }
3559
3660   required_device<cpu_device> m_maincpu;
37   required_ioport_array<6> m_button_matrix;
61   required_ioport_array<7> m_button_matrix;
3862   required_device<speaker_sound_device> m_speaker;
3963
4064   UINT16 m_r;
r243634r243635
6791// To prevent flickering here, we need to simulate a decay.
6892
6993// decay time, in steps of 1ms
70#define DISPLAY_DECAY_TIME 40
94#define DISPLAY_DECAY_TIME 50
7195
7296inline bool tc4_state::index_is_7segled(int index)
7397{
r243634r243635
7599   return (index >= 5 && index <= 9 && index != 6);
76100}
77101
78
79102void tc4_state::display_update()
80103{
81104   UINT16 active_state[0x10];
r243634r243635
144167   
145168   // read from cartridge
146169   if (m_r & 0x200)
147      k |= ioport("CART")->read();
170      k |= m_button_matrix[6]->read();
148171   
149172   return k;
150173}
r243634r243635
171194
172195
173196
174
175197/***************************************************************************
176198
177199  Inputs
r243634r243635
180202
181203static INPUT_PORTS_START( tc4 )
182204   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")
187209
188210   PORT_START("IN.1") // R1
189211   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT )
r243634r243635
210232   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(2)
211233
212234   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")
217239
218   PORT_START("CART")
240   PORT_START("IN.6") // R9
219241   PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "R9:1" )
220242   PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "R9:2" )
221243   PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "R9:3" )
r243634r243635
224246
225247
226248
227
228249/***************************************************************************
229250
230251  Machine Config
r243634r243635
290311ROM_END
291312
292313
293
294314CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team