trunk/src/mame/drivers/mrgame.c
| r31291 | r31292 | |
| 5 | 5 | These games have a M68000 and 3x Z80, and a M114 Sound IC. |
| 6 | 6 | They have a video screen upon which the scores and other info is displayed. |
| 7 | 7 | |
| 8 | Status: |
| 9 | - motrshow, motrshowa, dakar working in the electronic sense, but not mechanically |
| 10 | - macattck most roms are missing |
| 11 | - wcup90 different hardware, not coded |
| 12 | |
| 13 | How to set up the machine (motrshow, motrshowa, dakar): |
| 14 | - These machines need to be loaded with default settings before they can accept coins |
| 15 | - Press - key (minus in main keyboard) |
| 16 | - Press again until you see test 25 (Motor Show) or test 23 (Dakar) |
| 17 | - In the dipswitch menu turn off the Ram Protect switch |
| 18 | - Press Left shift and Right shift together (game stops responding) |
| 19 | - Turn the Ram Protect Switch back on |
| 20 | - Press F3 or reboot |
| 21 | - The default settings have been loaded and you can insert coins |
| 22 | - However, the game cannot be played due to missing balls. |
| 23 | |
| 8 | 24 | ToDo: |
| 9 | | - Everything |
| 10 | | - Support for unknown M114 audio processor |
| 11 | 25 | - Support for electronic volume control |
| 12 | 26 | - Audio rom banking |
| 13 | 27 | - Wrong colours |
| 14 | 28 | - Bad scrolling |
| 15 | | - No sound |
| 16 | | - wcup90 needs different address maps and display |
| 29 | - Most sounds missing due to unemulated M114 chip |
| 30 | - wcup90 is different hardware and there's no schematic |
| 17 | 31 | |
| 18 | 32 | *****************************************************************************************/ |
| 19 | 33 | |
| r31291 | r31292 | |
| 39 | 53 | , m_maincpu(*this, "maincpu") |
| 40 | 54 | , m_audiocpu1(*this, "audiocpu1") |
| 41 | 55 | , m_audiocpu2(*this, "audiocpu2") |
| 56 | , m_io_dsw0(*this, "DSW0") |
| 57 | , m_io_dsw1(*this, "DSW1") |
| 58 | , m_io_x0(*this, "X0") |
| 59 | , m_io_x1(*this, "X1") |
| 42 | 60 | { } |
| 43 | 61 | |
| 44 | 62 | DECLARE_PALETTE_INIT(mrgame); |
| r31291 | r31292 | |
| 78 | 96 | required_device<m68000_device> m_maincpu; |
| 79 | 97 | required_device<z80_device> m_audiocpu1; |
| 80 | 98 | required_device<z80_device> m_audiocpu2; |
| 99 | required_ioport m_io_dsw0; |
| 100 | required_ioport m_io_dsw1; |
| 101 | required_ioport m_io_x0; |
| 102 | required_ioport m_io_x1; |
| 81 | 103 | }; |
| 82 | 104 | |
| 83 | 105 | |
| r31291 | r31292 | |
| 133 | 155 | |
| 134 | 156 | static INPUT_PORTS_START( mrgame ) |
| 135 | 157 | PORT_START("DSW0") |
| 136 | | PORT_DIPNAME( 0x01, 0x00, "M01") |
| 158 | PORT_DIPNAME( 0x01, 0x00, "Ram Protect") |
| 137 | 159 | PORT_DIPSETTING( 0x01, DEF_STR( Off )) |
| 138 | 160 | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 139 | | PORT_DIPNAME( 0x02, 0x02, "M02") |
| 140 | | PORT_DIPSETTING( 0x02, DEF_STR( Off )) |
| 141 | | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 142 | | PORT_DIPNAME( 0x04, 0x04, "M03") |
| 143 | | PORT_DIPSETTING( 0x04, DEF_STR( Off )) |
| 144 | | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 145 | | PORT_DIPNAME( 0x08, 0x08, "M04") |
| 146 | | PORT_DIPSETTING( 0x08, DEF_STR( Off )) |
| 147 | | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 161 | PORT_DIPNAME( 0x0e, 0x0e, "Country") |
| 162 | PORT_DIPSETTING( 0x00, "Italy 1") |
| 163 | PORT_DIPSETTING( 0x02, "Italy") |
| 164 | PORT_DIPSETTING( 0x04, "Great Britain") |
| 165 | PORT_DIPSETTING( 0x06, "France") |
| 166 | PORT_DIPSETTING( 0x08, "Germany") |
| 167 | PORT_DIPSETTING( 0x0a, "Belgium") |
| 168 | PORT_DIPSETTING( 0x0c, "Yugoslavia") |
| 169 | PORT_DIPSETTING( 0x0e, "U.S.A.") |
| 170 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("R. Flipper") PORT_CODE(KEYCODE_RSHIFT) |
| 171 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("L. Flipper") PORT_CODE(KEYCODE_LSHIFT) |
| 148 | 172 | |
| 173 | // These dips are only documented for Motor Show |
| 149 | 174 | PORT_START("DSW1") |
| 150 | | PORT_DIPNAME( 0x01, 0x00, "V01") |
| 151 | | PORT_DIPSETTING( 0x01, DEF_STR( Off )) |
| 152 | | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 153 | | PORT_DIPNAME( 0x02, 0x02, "V02") |
| 154 | | PORT_DIPSETTING( 0x02, DEF_STR( Off )) |
| 155 | | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 156 | | PORT_DIPNAME( 0x04, 0x04, "V03") |
| 157 | | PORT_DIPSETTING( 0x04, DEF_STR( Off )) |
| 158 | | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 159 | | PORT_DIPNAME( 0x08, 0x08, "V04") |
| 160 | | PORT_DIPSETTING( 0x08, DEF_STR( Off )) |
| 161 | | PORT_DIPSETTING( 0x00, DEF_STR( On )) |
| 175 | PORT_DIPNAME( 0x01, 0x00, "Test Game") |
| 176 | PORT_DIPSETTING( 0x01, "Connected") |
| 177 | PORT_DIPSETTING( 0x00, "Disconnected") |
| 178 | PORT_DIPNAME( 0x02, 0x02, "Dragster") |
| 179 | PORT_DIPSETTING( 0x02, DEF_STR( Easy )) |
| 180 | PORT_DIPSETTING( 0x00, DEF_STR( Hard )) |
| 181 | PORT_DIPNAME( 0x04, 0x04, "F.1.") |
| 182 | PORT_DIPSETTING( 0x04, DEF_STR( Easy )) |
| 183 | PORT_DIPSETTING( 0x00, DEF_STR( Hard )) |
| 184 | PORT_DIPNAME( 0x08, 0x08, "Motocross") |
| 185 | PORT_DIPSETTING( 0x08, DEF_STR( Easy )) |
| 186 | PORT_DIPSETTING( 0x00, DEF_STR( Hard )) |
| 187 | |
| 188 | PORT_START("X0") |
| 189 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Advance Test") |
| 190 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Return Test") |
| 191 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) |
| 192 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) |
| 193 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 194 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 195 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 196 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 197 | |
| 198 | PORT_START("X1") |
| 199 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) |
| 200 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) |
| 201 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Factory Burn Test") |
| 202 | PORT_BIT( 0xe9, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 162 | 203 | INPUT_PORTS_END |
| 163 | 204 | |
| 164 | 205 | READ8_MEMBER( mrgame_state::rsw_r ) |
| 165 | 206 | { |
| 166 | | return ioport("DSW0")->read() | ((UINT8)m_ack1 << 5) | ((UINT8)m_ack2 << 4); |
| 207 | return m_io_dsw0->read() | ((UINT8)m_ack1 << 5) | ((UINT8)m_ack2 << 4); |
| 167 | 208 | } |
| 168 | 209 | |
| 169 | 210 | // this is like a keyboard, energise a row and read the column data |
| 170 | 211 | READ8_MEMBER( mrgame_state::col_r ) |
| 171 | 212 | { |
| 213 | if (m_row_data == 0) |
| 214 | return m_io_x0->read(); |
| 215 | else |
| 216 | if (m_row_data == 1) |
| 217 | return m_io_x1->read(); |
| 218 | else |
| 172 | 219 | if (m_row_data == 7) |
| 173 | 220 | return m_video_status; |
| 221 | else |
| 174 | 222 | |
| 175 | 223 | return 0xff; |
| 176 | 224 | } |
| r31291 | r31292 | |
| 241 | 289 | |
| 242 | 290 | READ8_MEMBER( mrgame_state::portc_r ) |
| 243 | 291 | { |
| 244 | | return ioport("DSW1")->read() | ((UINT8)m_ackv << 4); |
| 292 | return m_io_dsw1->read() | ((UINT8)m_ackv << 4); |
| 245 | 293 | } |
| 246 | 294 | |
| 247 | 295 | void mrgame_state::machine_reset() |
| r31291 | r31292 | |
| 415 | 463 | MCFG_SCREEN_REFRESH_RATE(50) |
| 416 | 464 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 417 | 465 | MCFG_SCREEN_SIZE(256, 256) |
| 418 | | MCFG_SCREEN_VISIBLE_AREA(0, 255, 0, 247) |
| 466 | MCFG_SCREEN_VISIBLE_AREA(0, 255, 0, 247) // If you align with X on test screen some info is chopped off |
| 419 | 467 | MCFG_SCREEN_UPDATE_DRIVER(mrgame_state, screen_update_mrgame) |
| 420 | 468 | MCFG_SCREEN_PALETTE("palette") |
| 421 | 469 | MCFG_PALETTE_ADD_INIT_BLACK("palette", 32) |