trunk/src/mess/drivers/tmtennis.c
| r243481 | r243482 | |
| 6 | 6 | * board labeled TOMY TN-04 TENNIS |
| 7 | 7 | * NEC uCOM-44 MCU, labeled D552C 048 |
| 8 | 8 | * VFD display NEC FIP11AM15T (FIP=fluorescent indicator panel) |
| 9 | |
| 10 | The initial release of this game was in 1979, known as Pro-Tennis, |
| 11 | it is unknown if the hardware and/or ROM contents differ. |
| 12 | |
| 9 | 13 | |
| 14 | TODO: |
| 15 | - 2-player mode doesn't work: the guys auto-serve and the left player |
| 16 | always hits the net, mcu emulation bug? |
| 17 | - difficulty switch changes mcu freq |
| 10 | 18 | |
| 11 | 19 | ***************************************************************************/ |
| 12 | 20 | |
| r243481 | r243482 | |
| 87 | 95 | |
| 88 | 96 | // read selected button rows |
| 89 | 97 | for (int i = 0; i < 2; i++) |
| 90 | | if (~m_input_mux & (1 << i)) |
| 98 | if (~m_input_mux >> i & 1) |
| 91 | 99 | inp &= m_button_matrix[i]->read(); |
| 92 | 100 | |
| 93 | 101 | return inp >> (offset*4); |
| r243481 | r243482 | |
| 122 | 130 | } |
| 123 | 131 | |
| 124 | 132 | |
| 133 | |
| 125 | 134 | /*************************************************************************** |
| 126 | 135 | |
| 127 | 136 | Inputs |
| 128 | 137 | |
| 129 | 138 | ***************************************************************************/ |
| 130 | 139 | |
| 140 | /* Pro-Tennis physical button layout and labels is like this: |
| 141 | |
| 142 | [SERVE] [1] [2] [3] [3] [2] [1] [SERVE] |
| 143 | [4] [5] [6] [6] [5] [4] |
| 144 | |
| 145 | PRACTICE<--PRO1-->PRO2 1PLAYER<--OFF-->2PLAYER |
| 146 | */ |
| 147 | |
| 131 | 148 | static INPUT_PORTS_START( tmtennis ) |
| 132 | | PORT_START("IN.0") // E0 port A/B |
| 133 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 134 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 135 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 149 | PORT_START("IN.0") // E0 port A/B (left side) |
| 150 | PORT_CONFNAME( 0x101, 0x001, DEF_STR( Difficulty ) ) |
| 151 | PORT_CONFSETTING( 0x000, "Practice" ) |
| 152 | PORT_CONFSETTING( 0x001, "Pro 1" ) |
| 153 | PORT_CONFSETTING( 0x101, "Pro 2" ) |
| 154 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) // P2 serve |
| 155 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) |
| 136 | 156 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) |
| 137 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 138 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 139 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(2) |
| 140 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(2) |
| 157 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) |
| 158 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2) |
| 159 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) |
| 160 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2) |
| 141 | 161 | |
| 142 | | PORT_START("IN.1") // E1 port A/B |
| 143 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 144 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 145 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 162 | PORT_START("IN.1") // E1 port A/B (right side) |
| 163 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) // P1 serve |
| 164 | PORT_CONFNAME( 0x02, 0x02, "Players" ) |
| 165 | PORT_CONFSETTING( 0x02, "1" ) |
| 166 | PORT_CONFSETTING( 0x00, "2" ) |
| 167 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 146 | 168 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) |
| 147 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) |
| 148 | | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) |
| 149 | | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) |
| 150 | | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON8 ) |
| 169 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) |
| 170 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 ) |
| 171 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) |
| 172 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON6 ) |
| 151 | 173 | INPUT_PORTS_END |
| 152 | 174 | |
| 153 | 175 | |
| r243481 | r243482 | |
| 212 | 234 | ROM_END |
| 213 | 235 | |
| 214 | 236 | |
| 215 | | CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tomytronic Tennis", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |
| 237 | CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomytronic)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) |