trunk/src/mame/drivers/route16.c
| r245244 | r245245 | |
| 6 | 6 | |
| 7 | 7 | Notes: Route 16 and Stratovox use identical hardware with the following |
| 8 | 8 | exceptions: Stratovox has a DAC for voice. |
| 9 | | Route 16 has the added ability to turn off each bitplane indiviaually. |
| 9 | Route 16 has the added ability to turn off each bitplane individually. |
| 10 | 10 | This looks like an afterthought, as one of the same bits that control |
| 11 | 11 | the palette selection is doubly utilized as the bitmap enable bit. |
| 12 | 12 | |
| r245244 | r245245 | |
| 86 | 86 | |
| 87 | 87 | |
| 88 | 88 | |
| 89 | | READ8_MEMBER(route16_state::sharedram_r) |
| 90 | | { |
| 91 | | return m_sharedram[offset]; |
| 92 | | } |
| 93 | | |
| 94 | | |
| 95 | | WRITE8_MEMBER(route16_state::sharedram_w) |
| 96 | | { |
| 97 | | m_sharedram[offset] = data; |
| 98 | | } |
| 99 | | |
| 100 | | |
| 101 | 89 | WRITE8_MEMBER(route16_state::route16_sharedram_w) |
| 102 | 90 | { |
| 103 | 91 | m_sharedram[offset] = data; |
| r245244 | r245245 | |
| 214 | 202 | static ADDRESS_MAP_START( route16_cpu1_map, AS_PROGRAM, 8, route16_state ) |
| 215 | 203 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 216 | 204 | /*AM_RANGE(0x3000, 0x3001) AM_NOP protection device */ |
| 217 | | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(sharedram_r, route16_sharedram_w) AM_SHARE("sharedram") |
| 218 | | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(route16_out0_w) |
| 219 | | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") AM_WRITE(route16_out1_w) |
| 205 | AM_RANGE(0x4000, 0x43ff) AM_RAM_WRITE(route16_sharedram_w) AM_SHARE("sharedram") |
| 206 | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(out0_w) |
| 207 | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") AM_WRITE(out1_w) |
| 220 | 208 | AM_RANGE(0x5800, 0x5800) AM_READ_PORT("P2") |
| 221 | 209 | AM_RANGE(0x8000, 0xbfff) AM_RAM AM_SHARE("videoram1") |
| 222 | 210 | ADDRESS_MAP_END |
| r245244 | r245245 | |
| 224 | 212 | |
| 225 | 213 | static ADDRESS_MAP_START( routex_cpu1_map, AS_PROGRAM, 8, route16_state ) |
| 226 | 214 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 227 | | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(sharedram_r, route16_sharedram_w) AM_SHARE("sharedram") |
| 228 | | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(route16_out0_w) |
| 229 | | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") AM_WRITE(route16_out1_w) |
| 215 | AM_RANGE(0x4000, 0x43ff) AM_RAM_WRITE(route16_sharedram_w) AM_SHARE("sharedram") |
| 216 | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(out0_w) |
| 217 | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") AM_WRITE(out1_w) |
| 230 | 218 | AM_RANGE(0x5800, 0x5800) AM_READ_PORT("P2") |
| 231 | 219 | AM_RANGE(0x6400, 0x6400) AM_READ(routex_prot_read) |
| 232 | 220 | AM_RANGE(0x8000, 0xbfff) AM_RAM AM_SHARE("videoram1") |
| r245244 | r245245 | |
| 235 | 223 | |
| 236 | 224 | static ADDRESS_MAP_START( stratvox_cpu1_map, AS_PROGRAM, 8, route16_state ) |
| 237 | 225 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 238 | | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(sharedram_r, sharedram_w) AM_SHARE("sharedram") |
| 239 | | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(route16_out0_w) |
| 240 | | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") AM_WRITE(route16_out1_w) |
| 226 | AM_RANGE(0x4000, 0x43ff) AM_RAM AM_SHARE("sharedram") |
| 227 | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(out0_w) |
| 228 | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") AM_WRITE(out1_w) |
| 241 | 229 | AM_RANGE(0x5800, 0x5800) AM_READ_PORT("P2") |
| 242 | 230 | AM_RANGE(0x8000, 0xbfff) AM_RAM AM_SHARE("videoram1") |
| 243 | 231 | ADDRESS_MAP_END |
| r245244 | r245245 | |
| 245 | 233 | |
| 246 | 234 | static ADDRESS_MAP_START( speakres_cpu1_map, AS_PROGRAM, 8, route16_state ) |
| 247 | 235 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 248 | | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(sharedram_r, sharedram_w) AM_SHARE("sharedram") |
| 249 | | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(route16_out0_w) |
| 250 | | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") AM_WRITE(route16_out1_w) |
| 236 | AM_RANGE(0x4000, 0x43ff) AM_RAM AM_SHARE("sharedram") |
| 237 | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(out0_w) |
| 238 | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("P1") AM_WRITE(out1_w) |
| 251 | 239 | AM_RANGE(0x5800, 0x5800) AM_READ_PORT("P2") AM_WRITE(speakres_out2_w) |
| 252 | 240 | AM_RANGE(0x6000, 0x6000) AM_READ(speakres_in3_r) |
| 253 | 241 | AM_RANGE(0x8000, 0xbfff) AM_RAM AM_SHARE("videoram1") |
| r245244 | r245245 | |
| 256 | 244 | |
| 257 | 245 | static ADDRESS_MAP_START( ttmahjng_cpu1_map, AS_PROGRAM, 8, route16_state ) |
| 258 | 246 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 259 | | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(sharedram_r, sharedram_w) AM_SHARE("sharedram") |
| 260 | | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(route16_out0_w) |
| 261 | | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("IN0") AM_WRITE(route16_out1_w) |
| 247 | AM_RANGE(0x4000, 0x43ff) AM_RAM AM_SHARE("sharedram") |
| 248 | AM_RANGE(0x4800, 0x4800) AM_READ_PORT("DSW") AM_WRITE(out0_w) |
| 249 | AM_RANGE(0x5000, 0x5000) AM_READ_PORT("IN0") AM_WRITE(out1_w) |
| 262 | 250 | AM_RANGE(0x5800, 0x5800) AM_READWRITE(ttmahjng_input_port_matrix_r, ttmahjng_input_port_matrix_w) |
| 263 | 251 | AM_RANGE(0x6800, 0x6800) AM_DEVWRITE("ay8910", ay8910_device, data_w) |
| 264 | 252 | AM_RANGE(0x6900, 0x6900) AM_DEVWRITE("ay8910", ay8910_device, address_w) |
| r245244 | r245245 | |
| 268 | 256 | |
| 269 | 257 | static ADDRESS_MAP_START( route16_cpu2_map, AS_PROGRAM, 8, route16_state ) |
| 270 | 258 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 271 | | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(sharedram_r, route16_sharedram_w) |
| 259 | AM_RANGE(0x4000, 0x43ff) AM_RAM_WRITE(route16_sharedram_w) AM_SHARE("sharedram") |
| 272 | 260 | AM_RANGE(0x8000, 0xbfff) AM_RAM AM_SHARE("videoram2") |
| 273 | 261 | ADDRESS_MAP_END |
| 274 | 262 | |
| r245244 | r245245 | |
| 276 | 264 | static ADDRESS_MAP_START( stratvox_cpu2_map, AS_PROGRAM, 8, route16_state ) |
| 277 | 265 | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 278 | 266 | AM_RANGE(0x2800, 0x2800) AM_DEVWRITE("dac", dac_device, write_unsigned8) |
| 279 | | AM_RANGE(0x4000, 0x43ff) AM_READWRITE(sharedram_r, sharedram_w) |
| 267 | AM_RANGE(0x4000, 0x43ff) AM_RAM AM_SHARE("sharedram") |
| 280 | 268 | AM_RANGE(0x8000, 0xbfff) AM_RAM AM_SHARE("videoram2") |
| 281 | 269 | ADDRESS_MAP_END |
| 282 | 270 | |
| r245244 | r245245 | |
| 552 | 540 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 553 | 541 | INPUT_PORTS_END |
| 554 | 542 | |
| 543 | MACHINE_START_MEMBER(route16_state, speakres) |
| 544 | { |
| 545 | save_item(NAME(m_speakres_vrx)); |
| 546 | } |
| 555 | 547 | |
| 548 | MACHINE_START_MEMBER(route16_state, ttmahjng) |
| 549 | { |
| 550 | save_item(NAME(m_ttmahjng_port_select)); |
| 551 | } |
| 552 | |
| 553 | |
| 556 | 554 | static MACHINE_CONFIG_START( route16, route16_state ) |
| 557 | 555 | |
| 558 | 556 | /* basic machine hardware */ |
| r245244 | r245245 | |
| 596 | 594 | MCFG_CPU_MODIFY("cpu2") |
| 597 | 595 | MCFG_CPU_PROGRAM_MAP(stratvox_cpu2_map) |
| 598 | 596 | |
| 597 | |
| 599 | 598 | /* video hardware */ |
| 600 | 599 | MCFG_SCREEN_MODIFY("screen") |
| 601 | 600 | MCFG_SCREEN_UPDATE_DRIVER(route16_state, screen_update_stratvox) |
| r245244 | r245245 | |
| 630 | 629 | /* basic machine hardware */ |
| 631 | 630 | MCFG_CPU_MODIFY("cpu1") |
| 632 | 631 | MCFG_CPU_PROGRAM_MAP(speakres_cpu1_map) |
| 632 | |
| 633 | MCFG_MACHINE_START_OVERRIDE(route16_state, speakres) |
| 633 | 634 | MACHINE_CONFIG_END |
| 634 | 635 | |
| 635 | 636 | |
| r245244 | r245245 | |
| 646 | 647 | MCFG_CPU_PROGRAM_MAP(ttmahjng_cpu1_map) |
| 647 | 648 | MCFG_CPU_IO_MAP(0) |
| 648 | 649 | |
| 650 | MCFG_MACHINE_START_OVERRIDE(route16_state, ttmahjng) |
| 651 | |
| 649 | 652 | /* video hardware */ |
| 650 | 653 | MCFG_SCREEN_MODIFY("screen") |
| 651 | 654 | MCFG_SCREEN_UPDATE_DRIVER(route16_state, screen_update_ttmahjng) |
| r245244 | r245245 | |
| 969 | 972 | * |
| 970 | 973 | *************************************/ |
| 971 | 974 | |
| 972 | | GAME( 1981, route16, 0, route16, route16, route16_state, route16, ROT270, "Tehkan / Sun Electronics (Centuri license)", "Route 16 (set 1)", 0 ) |
| 973 | | GAME( 1981, route16a, route16, route16, route16, route16_state, route16a, ROT270, "Tehkan / Sun Electronics (Centuri license)", "Route 16 (set 2)", 0 ) |
| 974 | | GAME( 1981, route16b, route16, route16, route16, driver_device, 0, ROT270, "bootleg", "Route 16 (bootleg)", 0 ) |
| 975 | | GAME( 1981, routex, route16, routex, route16, driver_device, 0, ROT270, "bootleg", "Route X (bootleg)", 0 ) |
| 976 | | GAME( 1980, speakres, 0, speakres, speakres, driver_device, 0, ROT270, "Sun Electronics", "Speak & Rescue", 0 ) |
| 977 | | GAME( 1980, speakresb,speakres, speakres, speakres, driver_device, 0, ROT270, "bootleg", "Speak & Rescue (bootleg)", 0 ) |
| 978 | | GAME( 1980, stratvox, speakres, stratvox, stratvox, driver_device, 0, ROT270, "Sun Electronics (Taito license)", "Stratovox", 0 ) |
| 979 | | GAME( 1980, stratvoxb,speakres, stratvox, stratvox, driver_device, 0, ROT270, "bootleg", "Stratovox (bootleg)", 0 ) |
| 980 | | GAME( 1980, spacecho, speakres, spacecho, spacecho, driver_device, 0, ROT270, "bootleg", "Space Echo (set 1)", 0 ) |
| 981 | | GAME( 1980, spacecho2,speakres, spacecho, spacecho, driver_device, 0, ROT270, "bootleg", "Space Echo (set 2)", 0 ) |
| 982 | | GAME( 1981, ttmahjng, 0, ttmahjng, ttmahjng, driver_device, 0, ROT0, "Taito", "T.T Mahjong", 0 ) |
| 975 | GAME( 1981, route16, 0, route16, route16, route16_state, route16, ROT270, "Tehkan / Sun Electronics (Centuri license)", "Route 16 (set 1)", GAME_SUPPORTS_SAVE ) |
| 976 | GAME( 1981, route16a, route16, route16, route16, route16_state, route16a, ROT270, "Tehkan / Sun Electronics (Centuri license)", "Route 16 (set 2)", GAME_SUPPORTS_SAVE ) |
| 977 | GAME( 1981, route16b, route16, route16, route16, driver_device, 0, ROT270, "bootleg", "Route 16 (bootleg)", GAME_SUPPORTS_SAVE ) |
| 978 | GAME( 1981, routex, route16, routex, route16, driver_device, 0, ROT270, "bootleg", "Route X (bootleg)", GAME_SUPPORTS_SAVE ) |
| 979 | GAME( 1980, speakres, 0, speakres, speakres, driver_device, 0, ROT270, "Sun Electronics", "Speak & Rescue", GAME_SUPPORTS_SAVE ) |
| 980 | GAME( 1980, speakresb,speakres, speakres, speakres, driver_device, 0, ROT270, "bootleg", "Speak & Rescue (bootleg)", GAME_SUPPORTS_SAVE ) |
| 981 | GAME( 1980, stratvox, speakres, stratvox, stratvox, driver_device, 0, ROT270, "Sun Electronics (Taito license)", "Stratovox", GAME_SUPPORTS_SAVE ) |
| 982 | GAME( 1980, stratvoxb,speakres, stratvox, stratvox, driver_device, 0, ROT270, "bootleg", "Stratovox (bootleg)", GAME_SUPPORTS_SAVE ) |
| 983 | GAME( 1980, spacecho, speakres, spacecho, spacecho, driver_device, 0, ROT270, "bootleg", "Space Echo (set 1)", GAME_SUPPORTS_SAVE ) |
| 984 | GAME( 1980, spacecho2,speakres, spacecho, spacecho, driver_device, 0, ROT270, "bootleg", "Space Echo (set 2)", GAME_SUPPORTS_SAVE ) |
| 985 | GAME( 1981, ttmahjng, 0, ttmahjng, ttmahjng, driver_device, 0, ROT0, "Taito", "T.T Mahjong", GAME_SUPPORTS_SAVE ) |