From cdb9c0e96053810fb80c998f4d93f313406eba89 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Sun, 2 Jul 2017 03:36:13 +0100 Subject: split decocass class up so that the dongle types aren't polluting main class (#2429) * split decocass class up so that the dongle types aren't polluting main class, emulate bootleg multigame, change accidental? drawing order change that was made a while back and broke several games --- src/mame/drivers/decocass.cpp | 263 +++++++++++----------- src/mame/includes/decocass.h | 277 ++++++++++++++++------- src/mame/machine/decocass.cpp | 499 +++++++++++++++++++++++++----------------- src/mame/mame.lst | 1 + src/mame/video/decocass.cpp | 11 +- 5 files changed, 632 insertions(+), 419 deletions(-) diff --git a/src/mame/drivers/decocass.cpp b/src/mame/drivers/decocass.cpp index a32f2f44efd..4ce5b2e49ec 100644 --- a/src/mame/drivers/decocass.cpp +++ b/src/mame/drivers/decocass.cpp @@ -1014,260 +1014,214 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ctsttape, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,ctsttape) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,ctsttape) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cprogolfj, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cprogolfj) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,cprogolfj) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cdsteljn, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cdsteljn) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,cdsteljn) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cmanhat, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cmanhat) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,cmanhat) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cfishing, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cfishing) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cfishing) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( chwy, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,chwy) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,chwy) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cterrani, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cterrani) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,cterrani) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( castfant, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,castfant) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,castfant) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( csuperas, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,csuperas) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,csuperas) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cocean1a, decocass ) /* 10 */ /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cocean1a) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,cocean1a) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( clocknch, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,clocknch) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,clocknch) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( clocknchj, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,clocknchj) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,clocknchj) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cfboy0a1, decocass ) /* 12 */ /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cfboy0a1) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,cfboy0a1) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cprogolf, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cprogolf) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,cprogolf) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cluckypo, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cluckypo) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,cluckypo) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ctisland, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,ctisland) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,ctisland) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ctisland3, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,ctisland3) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,ctisland3) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cexplore, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cexplore) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type1_state,cexplore) MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( cdiscon1, decocass ) - - /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cdiscon1) -MACHINE_CONFIG_END - - -static MACHINE_CONFIG_DERIVED( ctornado, decocass ) - - /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,ctornado) -MACHINE_CONFIG_END - - -static MACHINE_CONFIG_DERIVED( cmissnx, decocass ) - - /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cmissnx) -MACHINE_CONFIG_END - - -static MACHINE_CONFIG_DERIVED( cptennis, decocass ) - - /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cptennis) -MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cbtime, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cbtime) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cbtime) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cburnrub, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cburnrub) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cburnrub) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cgraplop, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cgraplop) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cgraplop) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cgraplop2, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cgraplop2) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cgraplop2) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( clapapa, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,clapapa) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,clapapa) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cskater, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cskater) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cskater) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cprobowl, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cprobowl) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cprobowl) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cnightst, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cnightst) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cnightst) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cpsoccer, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cpsoccer) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cpsoccer) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( csdtenis, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,csdtenis) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,csdtenis) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( czeroize, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,czeroize) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,czeroize) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cppicf, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cppicf) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cppicf) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cfghtice, decocass ) /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cfghtice) -MACHINE_CONFIG_END - - -static MACHINE_CONFIG_DERIVED( type4, decocass ) - - /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,type4) -MACHINE_CONFIG_END - - -static MACHINE_CONFIG_DERIVED( cbdash, decocass ) - - /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cbdash) + MCFG_MACHINE_RESET_OVERRIDE(decocass_type3_state,cfghtice) MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( cflyball, decocass ) - - /* basic machine hardware */ - MCFG_MACHINE_RESET_OVERRIDE(decocass_state,cflyball) -MACHINE_CONFIG_END - #define ROM_LOAD_BIOS(bios,name,offset,length,hash) \ ROMX_LOAD(name, offset, length, hash, ROM_BIOS(bios+1)) /* Note '+1' */ @@ -1579,7 +1533,7 @@ ROM_START( ctisland ) ROM_REGION( 0x10000, "cassette", 0 ) /* (max) 64k for cassette image */ ROM_LOAD( "ctisland.cas", 0x0000, 0x8000, CRC(3f63b8f8) SHA1(2fd0679ef9750a228ebb098672ab6091fda75804) ) - ROM_REGION( 0x4000, "user3", 0 ) /* roms from the overlay pcb */ + ROM_REGION( 0xa000, "user3", ROMREGION_ERASEFF ) /* roms from the overlay pcb */ ROM_LOAD( "deco-ti.x1", 0x0000, 0x1000, CRC(a7f8aeba) SHA1(0c9ba1a46d0636b36f40fad31638db89f374f778) ) ROM_LOAD( "deco-ti.x2", 0x1000, 0x1000, CRC(2a0d3c91) SHA1(552d08fcddddbea5b52fa1e8decd188ae49c86ea) ) ROM_LOAD( "deco-ti.x3", 0x2000, 0x1000, CRC(3a26b97c) SHA1(f57e76077806e149a9e455c85e5431eac2d42bc3) ) @@ -1595,7 +1549,7 @@ ROM_START( ctisland2 ) ROM_REGION( 0x10000, "cassette", 0 ) /* (max) 64k for cassette image */ ROM_LOAD( "ctislnd2.cas", 0x0000, 0x8000, CRC(2854b4c0) SHA1(d3b4e0031dbb2340fbbe396a1ff9b8fbfd63663e) ) - ROM_REGION( 0x4000, "user3", 0 ) /* roms from the overlay pcb */ + ROM_REGION( 0xa000, "user3", ROMREGION_ERASEFF ) /* roms from the overlay pcb */ ROM_LOAD( "deco-ti.x1", 0x0000, 0x1000, CRC(a7f8aeba) SHA1(0c9ba1a46d0636b36f40fad31638db89f374f778) ) ROM_LOAD( "deco-ti.x2", 0x1000, 0x1000, CRC(2a0d3c91) SHA1(552d08fcddddbea5b52fa1e8decd188ae49c86ea) ) ROM_LOAD( "deco-ti.x3", 0x2000, 0x1000, CRC(3a26b97c) SHA1(f57e76077806e149a9e455c85e5431eac2d42bc3) ) @@ -1611,7 +1565,7 @@ ROM_START( ctisland3 ) ROM_REGION( 0x10000, "cassette", 0 ) /* (max) 64k for cassette image */ ROM_LOAD( "ctislnd3.cas", 0x0000, 0x8000, CRC(45464e1e) SHA1(03275694d963c7ab0e0f5525e248e69da5f9b591) ) - ROM_REGION( 0x4000, "user3", 0 ) /* roms from the overlay pcb */ + ROM_REGION( 0xa000, "user3", ROMREGION_ERASEFF ) /* roms from the overlay pcb */ ROM_LOAD( "deco-ti.x1", 0x0000, 0x1000, CRC(a7f8aeba) SHA1(0c9ba1a46d0636b36f40fad31638db89f374f778) ) ROM_LOAD( "deco-ti.x2", 0x1000, 0x1000, CRC(2a0d3c91) SHA1(552d08fcddddbea5b52fa1e8decd188ae49c86ea) ) ROM_LOAD( "deco-ti.x3", 0x2000, 0x1000, CRC(3a26b97c) SHA1(f57e76077806e149a9e455c85e5431eac2d42bc3) ) @@ -1630,8 +1584,17 @@ ROM_START( cexplore ) ROM_REGION( 0x10000, "cassette", 0 ) /* (max) 64k for cassette image */ ROM_LOAD( "cexplore.cas", 0x0000, 0x8000, CRC(fae49c66) SHA1(4ae69e2f706fdf30204f0aa1277619395cacc21b) ) - ROM_REGION( 0x4000, "user3", 0 ) /* roms from the overlay pcb */ - ROM_LOAD( "cexplore_overlay_roms", 0x0000, 0x4000, NO_DUMP ) + ROM_REGION( 0xa000, "user3", ROMREGION_ERASEFF ) /* roms from the overlay pcb */ + ROM_LOAD( "x1_made_in_japan_18.x1", 0x0000, 0x1000, CRC(f2ca58f0) SHA1(5c9faeca6247b70586dc2a3765805ac96960ac79) ) + ROM_LOAD( "x2_made_in_japan_18.x2", 0x1000, 0x1000, CRC(75d999bf) SHA1(7c257285d5b69642ec542dc56defdbb1f2072454) ) + ROM_LOAD( "x3_made_in_japan_18.x3", 0x2000, 0x1000, CRC(941539c6) SHA1(2e879107f56bf258ad90fb83c2ab278027acb0bb) ) // FIXED BITS (1xxxxxxx) (but correct?) + ROM_LOAD( "x4_made_in_japan_18.x4", 0x3000, 0x1000, CRC(73388544) SHA1(9c98f79e431d0881e20eac4c6c4177db8973ce20) ) // FIXED BITS (1xxxxxxx) (but correct?) + ROM_LOAD( "x5_made_in_japan_18.x5", 0x4000, 0x1000, CRC(b40699c5) SHA1(4934283d2845dbd3ea9a7fa349f663a34fcdfdf8) ) + ROM_LOAD( "y1_made_in_japan_18.y1", 0x5000, 0x1000, CRC(d887dc50) SHA1(9321e40d208bd029657ab87eaf815f8a09e49b48) ) + ROM_LOAD( "y2_made_in_japan_18.y2", 0x6000, 0x1000, CRC(fe325d0d) SHA1(3e4aaba87e2aa656346169d512d70083605692c6) ) + ROM_LOAD( "y3_made_in_japan_18.y3", 0x7000, 0x1000, CRC(7a787ecf) SHA1(5261747823b58be3fabb8d1a8cb4069082f95b30) ) + ROM_LOAD( "y4_made_in_japan_18.y4", 0x8000, 0x1000, CRC(ac30e8c7) SHA1(f8f53b982df356e5bf2624afe0f8a72635b3b4b3) ) + ROM_LOAD( "y5_made_in_japan_18.y5", 0x9000, 0x1000, CRC(0a6b8f03) SHA1(09b477579a5fed4c45299b6366141ef4a8c9a410) ) ROM_END /* The Following use Dongle Type 2 (CS82-007) @@ -2022,6 +1985,26 @@ ROM_START( cflyball ) ROM_LOAD( "cflyball.cas", 0x0000, 0x10000, CRC(cb40d043) SHA1(57698bac7e0d552167efa99d08116bf19a3b29c9) ) ROM_END +ROM_START( decomult ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "WIDLBIOS.V0B", 0xf800, 0x0800, CRC(9ad7c451) SHA1(cda3513ca9904cd9f097a4a79226e3e30f83bb1c) ) + + ROM_REGION( 0x100000, "dongle", 0 ) + ROM_LOAD( "WIDLDECO.LOW", 0x00000, 0x80000, CRC(fd4dc36c) SHA1(1ef7f9e1dd333a1adc7b94e2b20eda41fe73a9f8) ) + ROM_LOAD( "WIDLDECO.HGH", 0x80000, 0x80000, CRC(a8a30112) SHA1(b4feaa3e68c5d347c97958bc3c06472dd66df2f7) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "v1-.5a", 0xf800, 0x0800, CRC(b66b2c2a) SHA1(0097f38beb4872e735e560148052e258a26b08fd) ) + + ROM_REGION( 0x00060, "proms", 0 ) + ROM_LOAD( "v2.3m", 0x0000, 0x0020, CRC(238fdb40) SHA1(b88e8fabb82092105c3828154608ea067acbf2e5) ) + ROM_LOAD( "v4.10d", 0x0020, 0x0020, CRC(3b5836b4) SHA1(b630bb277d9ec09d46ef26b944014dd6165b35d8) ) + ROM_LOAD( "v3.3j", 0x0040, 0x0020, CRC(51eef657) SHA1(eaedce5caf55624ad6ae706aedf82c5717c60f1f) ) + + ROM_REGION( 0x10000, "mcu", 0 ) + ROM_LOAD( "cassmcu.1c", 0x0000, 0x0400, CRC(a6df18fd) SHA1(1f9ea47e372d31767c936c15852b43df2b0ee8ff) ) +ROM_END + DRIVER_INIT_MEMBER(decocass_state,decocass) { @@ -2041,6 +2024,7 @@ DRIVER_INIT_MEMBER(decocass_state,decocrom) m_maincpu->space(AS_PROGRAM).install_write_handler(0x6000, 0xafff, write8_delegate(FUNC(decocass_state::decocass_de0091_w),this)); membank("bank1")->configure_entry(0, m_charram); membank("bank1")->configure_entry(1, memregion("user3")->base()); + membank("bank1")->configure_entry(2, memregion("user3")->base()+0x5000); membank("bank1")->set_entry(0); /* install the bank selector */ @@ -2081,72 +2065,75 @@ DRIVER_INIT_MEMBER(decocass_state,cdsteljn) m_maincpu->space(AS_PROGRAM).install_read_handler(0xe600, 0xe6ff, read8_delegate(FUNC(decocass_state::cdsteljn_input_r), this)); } -/* -- */ GAME( 1981, decocass, 0, decocass, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "DECO Cassette System", MACHINE_IS_BIOS_ROOT ) -/* -- */ GAME( 1981, ctsttape, decocass, ctsttape, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "Test Tape (DECO Cassette) (US)", 0 ) -/* 01 */ GAME( 1980, chwy, decocass, chwy, chwy, decocass_state, decocass, ROT270, "Data East Corporation", "Highway Chase (DECO Cassette) (US)", 0 ) +/* -- */ GAME( 1981, decocass, 0, decocass, decocass, decocass_state, decocass, ROT270, "Data East Corporation", "DECO Cassette System", MACHINE_IS_BIOS_ROOT ) +/* -- */ GAME( 1981, ctsttape, decocass, ctsttape, decocass, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Test Tape (DECO Cassette) (US)", 0 ) +/* 01 */ GAME( 1980, chwy, decocass, chwy, chwy, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Highway Chase (DECO Cassette) (US)", 0 ) /* 02 */ // 1980.12 Sengoku Ninjatai -/* 03 */ GAME( 1981, cmanhat, decocass, cmanhat, cmanhat, decocass_state, decocass, ROT270, "Data East Corporation", "Manhattan (DECO Cassette) (Japan)", MACHINE_IMPERFECT_GRAPHICS ) -/* 04 */ GAME( 1981, cterrani, decocass, cterrani, cterrani, decocass_state, decocass, ROT270, "Data East Corporation", "Terranean (DECO Cassette) (US)", 0 ) +/* 03 */ GAME( 1981, cmanhat, decocass, cmanhat, cmanhat, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Manhattan (DECO Cassette) (Japan)", MACHINE_IMPERFECT_GRAPHICS ) +/* 04 */ GAME( 1981, cterrani, decocass, cterrani, cterrani, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Terranean (DECO Cassette) (US)", 0 ) /* 05 */ // 1981.?? Missile Sprinter /* 06 */ // 1980.12 Nebula -/* 07 */ GAME( 1981, castfant, decocass, castfant, castfant, decocass_state, decocass, ROT270, "Data East Corporation", "Astro Fantasia (DECO Cassette) (US)", 0 ) +/* 07 */ GAME( 1981, castfant, decocass, castfant, castfant, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Astro Fantasia (DECO Cassette) (US)", 0 ) /* 08 */ // 1981.03 The Tower -/* 09 */ GAME( 1981, csuperas, decocass, csuperas, csuperas, decocass_state, decocass, ROT270, "Data East Corporation", "Super Astro Fighter (DECO Cassette) (US)", 0 ) -/* 10 */ GAME( 1981, cocean1a, decocass, cocean1a, cocean1a, decocass_state, decocass, ROT270, "Data East Corporation", "Ocean to Ocean (Medal) (DECO Cassette MD) (No.10/Ver.1,Japan)", 0 ) /* no lever, 1P/2P buttons used to switch player, cocktail mode not emulated */ -/* */ GAME( 1981, cocean6b, cocean1a, cocean1a, cocean1a, decocass_state, decocass, ROT270, "Data East Corporation", "Ocean to Ocean (Medal) (DECO Cassette MD) (No.10/Ver.6,US)", 0 ) /* lever, 1P/2P buttons used to switch player, cocktail mode not emulated */ -/* 11 */ GAME( 1981, clocknch, decocass, clocknch, clocknch, decocass_state, decocass, ROT270, "Data East Corporation", "Lock'n'Chase (DECO Cassette) (US)", 0 ) -/* */ GAME( 1981, clocknchj, clocknch, clocknchj,clocknchj,decocass_state, decocass, ROT270, "Data East Corporation", "Lock'n'Chase (DECO Cassette) (Japan)", 0 ) -/* 12 */ GAME( 1981, cfboy0a1, decocass, cfboy0a1, cfboy0a1, decocass_state, decocass, ROT270, "Data East Corporation", "Flash Boy (vertical) (DECO Cassette MD) (No.12/Ver.0/Set.1,Japan)", 0 ) -/* 13 */ GAME( 1981, cprogolf, decocass, cprogolf, cprogolf, decocass_state, decocass, ROT270, "Data East Corporation", "Tournament Pro Golf (DECO Cassette) (US)", 0 ) -/* */ GAME( 1981, cprogolfj, cprogolf, cprogolfj,cprogolf, decocass_state, decocass, ROT270, "Data East Corporation", "Tournament Pro Golf (DECO Cassette) (Japan)", 0 ) -/* 14 */ GAME( 1981, cdsteljn, decocass, cdsteljn, cdsteljn, decocass_state, cdsteljn, ROT270, "Data East Corporation", "DS Telejan (DECO Cassette) (Japan)", 0 ) -/* 15 */ GAME( 1981, cluckypo, decocass, cluckypo, cluckypo, decocass_state, decocass, ROT270, "Data East Corporation", "Lucky Poker (DECO Cassette) (US)", 0 ) -/* 16 */ GAME( 1981, ctisland, decocass, ctisland, ctisland, decocass_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette) (US) (set 1)", 0 ) -/* */ GAME( 1981, ctisland2, ctisland, ctisland, ctisland, decocass_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette) (US) (set 2)", 0 ) /* newer? has instructions in attract */ -/* */ GAME( 1981, ctisland3, ctisland, ctisland3,ctisland, decocass_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette) (Region D)", 0 ) /* region code 'D' unknown region */ +/* 09 */ GAME( 1981, csuperas, decocass, csuperas, csuperas, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Super Astro Fighter (DECO Cassette) (US)", 0 ) +/* 10 */ GAME( 1981, cocean1a, decocass, cocean1a, cocean1a, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Ocean to Ocean (Medal) (DECO Cassette MD) (No.10/Ver.1,Japan)", 0 ) /* no lever, 1P/2P buttons used to switch player, cocktail mode not emulated */ +/* */ GAME( 1981, cocean6b, cocean1a, cocean1a, cocean1a, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Ocean to Ocean (Medal) (DECO Cassette MD) (No.10/Ver.6,US)", 0 ) /* lever, 1P/2P buttons used to switch player, cocktail mode not emulated */ +/* 11 */ GAME( 1981, clocknch, decocass, clocknch, clocknch, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Lock'n'Chase (DECO Cassette) (US)", 0 ) +/* */ GAME( 1981, clocknchj, clocknch, clocknchj,clocknchj,decocass_type1_state, decocass, ROT270, "Data East Corporation", "Lock'n'Chase (DECO Cassette) (Japan)", 0 ) +/* 12 */ GAME( 1981, cfboy0a1, decocass, cfboy0a1, cfboy0a1, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Flash Boy (vertical) (DECO Cassette MD) (No.12/Ver.0/Set.1,Japan)", 0 ) +/* 13 */ GAME( 1981, cprogolf, decocass, cprogolf, cprogolf, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Tournament Pro Golf (DECO Cassette) (US)", 0 ) +/* */ GAME( 1981, cprogolfj, cprogolf, cprogolfj,cprogolf, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Tournament Pro Golf (DECO Cassette) (Japan)", 0 ) +/* 14 */ GAME( 1981, cdsteljn, decocass, cdsteljn, cdsteljn, decocass_type1_state, cdsteljn, ROT270, "Data East Corporation", "DS Telejan (DECO Cassette) (Japan)", 0 ) +/* 15 */ GAME( 1981, cluckypo, decocass, cluckypo, cluckypo, decocass_type1_state, decocass, ROT270, "Data East Corporation", "Lucky Poker (DECO Cassette) (US)", 0 ) +/* 16 */ GAME( 1981, ctisland, decocass, ctisland, ctisland, decocass_type1_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette) (US) (set 1)", 0 ) +/* */ GAME( 1981, ctisland2, ctisland, ctisland, ctisland, decocass_type1_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette) (US) (set 2)", 0 ) /* newer? has instructions in attract */ +/* */ GAME( 1981, ctisland3, ctisland, ctisland3,ctisland, decocass_type1_state, decocrom, ROT270, "Data East Corporation", "Treasure Island (DECO Cassette) (Region D)", 0 ) /* region code 'D' unknown region */ /* 17 */ // 1981.10 Bobbitto -/* 18 */ GAME( 1982, cexplore, decocass, cexplore, cexplore, decocass_state, decocass, ROT270, "Data East Corporation", "Explorer (DECO Cassette) (US)", MACHINE_NOT_WORKING ) -/* 19 */ GAME( 1982, cdiscon1, decocass, cdiscon1, cdiscon1, decocass_state, decocass, ROT270, "Data East Corporation", "Disco No.1 (DECO Cassette) (US)", 0 ) -/* */ GAME( 1982, csweetht, cdiscon1, cdiscon1, csweetht, decocass_state, decocass, ROT270, "Data East Corporation", "Sweet Heart (DECO Cassette) (US)", 0 ) -/* 20 */ GAME( 1982, ctornado, decocass, ctornado, ctornado, decocass_state, decocass, ROT270, "Data East Corporation", "Tornado (DECO Cassette) (US)", 0 ) -/* 21 */ GAME( 1982, cmissnx, decocass, cmissnx, cmissnx, decocass_state, decocass, ROT270, "Data East Corporation", "Mission-X (DECO Cassette) (US)", 0 ) -/* 22 */ GAME( 1982, cptennis, decocass, cptennis, cptennis, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Tennis (DECO Cassette) (US)", 0 ) -/* */ GAME( 1982, cptennisj, cptennis, cptennis, cptennis, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Tennis (DECO Cassette) (Japan)", 0 ) -/* 23 */ GAME( 1982, cprogolf18,cprogolf, cprogolfj,cprogolf, decocass_state, decocass, ROT270, "Data East Corporation", "18 Challenge Pro Golf (DECO Cassette) (Japan)", 0 ) // 1982.?? 18 Hole Pro Golf +/* 18 */ GAME( 1982, cexplore, decocass, cexplore, cexplore, decocass_type1_state, decocrom, ROT270, "Data East Corporation", "Explorer (DECO Cassette) (US)", 0 ) +/* 19 */ GAME( 1982, cdiscon1, decocass, decocass, cdiscon1, decocass_type2_state, decocass, ROT270, "Data East Corporation", "Disco No.1 (DECO Cassette) (US)", 0 ) +/* */ GAME( 1982, csweetht, cdiscon1, decocass, csweetht, decocass_type2_state, decocass, ROT270, "Data East Corporation", "Sweet Heart (DECO Cassette) (US)", 0 ) +/* 20 */ GAME( 1982, ctornado, decocass, decocass, ctornado, decocass_type2_state, decocass, ROT270, "Data East Corporation", "Tornado (DECO Cassette) (US)", 0 ) +/* 21 */ GAME( 1982, cmissnx, decocass, decocass, cmissnx, decocass_type2_state, decocass, ROT270, "Data East Corporation", "Mission-X (DECO Cassette) (US)", 0 ) +/* 22 */ GAME( 1982, cptennis, decocass, decocass, cptennis, decocass_type2_state, decocass, ROT270, "Data East Corporation", "Pro Tennis (DECO Cassette) (US)", 0 ) +/* */ GAME( 1982, cptennisj, cptennis, decocass, cptennis, decocass_type2_state, decocass, ROT270, "Data East Corporation", "Pro Tennis (DECO Cassette) (Japan)", 0 ) +/* 23 */ GAME( 1982, cprogolf18,cprogolf, cprogolfj,cprogolf, decocass_type1_state, decocass, ROT270, "Data East Corporation", "18 Challenge Pro Golf (DECO Cassette) (Japan)", 0 ) // 1982.?? 18 Hole Pro Golf /* 24 */ // 1982.07 Tsumego Kaisyou -/* 25 */ GAME( 1982, cadanglr, decocass, cfishing, cfishing, decocass_state, decocass, ROT270, "Data East Corporation", "Angler Dangler (DECO Cassette) (US)", 0 ) -/* 25 */ GAME( 1982, cfishing, cadanglr, cfishing, cfishing, decocass_state, decocass, ROT270, "Data East Corporation", "Fishing (DECO Cassette) (Japan)", 0 ) -/* 26 */ GAME( 1983, cbtime, decocass, cbtime, cbtime, decocass_state, decocass, ROT270, "Data East Corporation", "Burger Time (DECO Cassette) (US)", 0 ) -/* */ GAME( 1982, chamburger,cbtime, cbtime, cbtime, decocass_state, decocass, ROT270, "Data East Corporation", "Hamburger (DECO Cassette) (Japan)", 0 ) -/* 27 */ GAME( 1982, cburnrub, decocass, cburnrub, cburnrub, decocass_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette) (US) (set 1)", 0 ) /* large stylized red title (newer release?) */ -/* */ GAME( 1982, cburnrub2, cburnrub, cburnrub, cburnrub, decocass_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette) (US) (set 2)", 0 ) /* large monochrome title (original release?) */ -/* */ GAME( 1982, cburnrubj, cburnrub, cburnrub, cburnrub, decocass_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette) (Japan)", 0 ) /* large monochrome title (original release?) */ -/* */ GAME( 1982, cbnj, cburnrub, cburnrub, cburnrub, decocass_state, decocass, ROT270, "Data East Corporation", "Bump 'n' Jump (DECO Cassette) (US)", 0 ) /* name was changed from Burnin' Rubber to Bump 'n' Jump (newest release?) */ -/* 28 */ GAME( 1983, cgraplop, decocass, cgraplop, cgraplop, decocass_state, decocass, ROT270, "Data East Corporation", "Cluster Buster (DECO Cassette) (US)", 0 ) -/* */ GAME( 1983, cgraplopj, cgraplop, cgraplop, cgraplop, decocass_state, decocass, ROT270, "Data East Corporation", "Graplop (DECO Cassette) (Japan)", 0 ) -/* */ GAME( 1983, cgraplop2, cgraplop, cgraplop2,cgraplop, decocass_state, decocass, ROT270, "Data East Corporation", "Graplop (no title screen) (DECO Cassette) (US)", 0 ) /* before name was changed to Cluster Buster? */ -/* 29 */ GAME( 1983, clapapa, decocass, clapapa, clapapa, decocass_state, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' / La-Pa-Pa (DECO Cassette) (US)" , 0) /* Displays 'La-Pa-Pa during attract */ -/* */ GAME( 1983, clapapa2, clapapa, clapapa, clapapa, decocass_state, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' (DECO Cassette) (US)" , 0) /* Displays 'Rootin' Tootin' during attract */ -/* 30 */ GAME( 1983, cskater, decocass, cskater, cskater, decocass_state, decocass, ROT270, "Data East Corporation", "Skater (DECO Cassette) (Japan)", 0 ) -/* 31 */ GAME( 1983, cprobowl, decocass, cprobowl, cprobowl, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Bowling (DECO Cassette) (US)", 0 ) -/* 32 */ GAME( 1983, cnightst, decocass, cnightst, cnightst, decocass_state, decocass, ROT270, "Data East Corporation", "Night Star (DECO Cassette) (US) (set 1)", 0 ) -/* */ GAME( 1983, cnightst2, cnightst, cnightst, cnightst, decocass_state, decocass, ROT270, "Data East Corporation", "Night Star (DECO Cassette) (US) (set 2)", 0 ) -/* 33 */ GAME( 1983, cpsoccer, decocass, cpsoccer, cpsoccer, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Soccer (DECO Cassette) (US)", 0 ) -/* */ GAME( 1983, cpsoccerj, cpsoccer, cpsoccer, cpsoccer, decocass_state, decocass, ROT270, "Data East Corporation", "Pro Soccer (DECO Cassette) (Japan)", 0 ) -/* 34 */ GAME( 1983, csdtenis, decocass, csdtenis, csdtenis, decocass_state, decocass, ROT270, "Data East Corporation", "Super Doubles Tennis (DECO Cassette) (Japan)", MACHINE_WRONG_COLORS ) -/* 35 */ GAME( 1985, cflyball, decocass, cflyball, cflyball, decocass_state, decocass, ROT270, "Data East Corporation", "Flying Ball (DECO Cassette) (US)", 0 ) +/* 25 */ GAME( 1982, cadanglr, decocass, cfishing, cfishing, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Angler Dangler (DECO Cassette) (US)", 0 ) +/* 25 */ GAME( 1982, cfishing, cadanglr, cfishing, cfishing, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Fishing (DECO Cassette) (Japan)", 0 ) +/* 26 */ GAME( 1983, cbtime, decocass, cbtime, cbtime, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Burger Time (DECO Cassette) (US)", 0 ) +/* */ GAME( 1982, chamburger,cbtime, cbtime, cbtime, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Hamburger (DECO Cassette) (Japan)", 0 ) +/* 27 */ GAME( 1982, cburnrub, decocass, cburnrub, cburnrub, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette) (US) (set 1)", 0 ) /* large stylized red title (newer release?) */ +/* */ GAME( 1982, cburnrub2, cburnrub, cburnrub, cburnrub, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette) (US) (set 2)", 0 ) /* large monochrome title (original release?) */ +/* */ GAME( 1982, cburnrubj, cburnrub, cburnrub, cburnrub, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Burnin' Rubber (DECO Cassette) (Japan)", 0 ) /* large monochrome title (original release?) */ +/* */ GAME( 1982, cbnj, cburnrub, cburnrub, cburnrub, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Bump 'n' Jump (DECO Cassette) (US)", 0 ) /* name was changed from Burnin' Rubber to Bump 'n' Jump (newest release?) */ +/* 28 */ GAME( 1983, cgraplop, decocass, cgraplop, cgraplop, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Cluster Buster (DECO Cassette) (US)", 0 ) +/* */ GAME( 1983, cgraplopj, cgraplop, cgraplop, cgraplop, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Graplop (DECO Cassette) (Japan)", 0 ) +/* */ GAME( 1983, cgraplop2, cgraplop, cgraplop2,cgraplop, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Graplop (no title screen) (DECO Cassette) (US)", 0 ) /* before name was changed to Cluster Buster? */ +/* 29 */ GAME( 1983, clapapa, decocass, clapapa, clapapa, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' / La-Pa-Pa (DECO Cassette) (US)" , 0) /* Displays 'La-Pa-Pa during attract */ +/* */ GAME( 1983, clapapa2, clapapa, clapapa, clapapa, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Rootin' Tootin' (DECO Cassette) (US)" , 0) /* Displays 'Rootin' Tootin' during attract */ +/* 30 */ GAME( 1983, cskater, decocass, cskater, cskater, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Skater (DECO Cassette) (Japan)", 0 ) +/* 31 */ GAME( 1983, cprobowl, decocass, cprobowl, cprobowl, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Pro Bowling (DECO Cassette) (US)", 0 ) +/* 32 */ GAME( 1983, cnightst, decocass, cnightst, cnightst, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Night Star (DECO Cassette) (US) (set 1)", 0 ) +/* */ GAME( 1983, cnightst2, cnightst, cnightst, cnightst, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Night Star (DECO Cassette) (US) (set 2)", 0 ) +/* 33 */ GAME( 1983, cpsoccer, decocass, cpsoccer, cpsoccer, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Pro Soccer (DECO Cassette) (US)", 0 ) +/* */ GAME( 1983, cpsoccerj, cpsoccer, cpsoccer, cpsoccer, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Pro Soccer (DECO Cassette) (Japan)", 0 ) +/* 34 */ GAME( 1983, csdtenis, decocass, csdtenis, csdtenis, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Super Doubles Tennis (DECO Cassette) (Japan)", MACHINE_WRONG_COLORS ) +/* 35 */ GAME( 1985, cflyball, decocass, decocass, cflyball, decocass_nodong_state,decocass, ROT270, "Data East Corporation", "Flying Ball (DECO Cassette) (US)", 0 ) /* 36 */ // 1984.04 Genesis/Boomer Rang'r -/* 37 */ GAME( 1983, czeroize, decocass, czeroize, czeroize, decocass_state, decocass, ROT270, "Data East Corporation", "Zeroize (DECO Cassette) (US)", 0 ) -/* 38 */ GAME( 1984, cscrtry, decocass, type4, cscrtry, decocass_state, decocass, ROT270, "Data East Corporation", "Scrum Try (DECO Cassette) (US) (set 1)", 0 ) -/* */ GAME( 1984, cscrtry2, cscrtry, type4, cscrtry, decocass_state, decocass, ROT270, "Data East Corporation", "Scrum Try (DECO Cassette) (US) (set 2)", 0 ) -/* 39 */ GAME( 1984, cppicf, decocass, cppicf, cppicf, decocass_state, decocass, ROT270, "Data East Corporation", "Peter Pepper's Ice Cream Factory (DECO Cassette) (US) (set 1)", 0 ) -/* */ GAME( 1984, cppicf2, cppicf, cppicf, cppicf, decocass_state, decocass, ROT270, "Data East Corporation", "Peter Pepper's Ice Cream Factory (DECO Cassette) (US) (set 2)", 0 ) -/* 40 */ GAME( 1984, cfghtice, decocass, cfghtice, cfghtice, decocass_state, decocass, ROT270, "Data East Corporation", "Fighting Ice Hockey (DECO Cassette) (US)", 0 ) -/* 41 */ GAME( 1984, coozumou, decocass, type4, cscrtry, decocass_state, decocass, ROT270, "Data East Corporation", "Oozumou - The Grand Sumo (DECO Cassette) (Japan)", 0 ) +/* 37 */ GAME( 1983, czeroize, decocass, czeroize, czeroize, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Zeroize (DECO Cassette) (US)", 0 ) +/* 38 */ GAME( 1984, cscrtry, decocass, decocass, cscrtry, decocass_type4_state, decocass, ROT270, "Data East Corporation", "Scrum Try (DECO Cassette) (US) (set 1)", 0 ) +/* */ GAME( 1984, cscrtry2, cscrtry, decocass, cscrtry, decocass_type4_state, decocass, ROT270, "Data East Corporation", "Scrum Try (DECO Cassette) (US) (set 2)", 0 ) +/* 39 */ GAME( 1984, cppicf, decocass, cppicf, cppicf, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Peter Pepper's Ice Cream Factory (DECO Cassette) (US) (set 1)", 0 ) +/* */ GAME( 1984, cppicf2, cppicf, cppicf, cppicf, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Peter Pepper's Ice Cream Factory (DECO Cassette) (US) (set 2)", 0 ) +/* 40 */ GAME( 1984, cfghtice, decocass, cfghtice, cfghtice, decocass_type3_state, decocass, ROT270, "Data East Corporation", "Fighting Ice Hockey (DECO Cassette) (US)", 0 ) +/* 41 */ GAME( 1984, coozumou, decocass, decocass, cscrtry, decocass_type4_state, decocass, ROT270, "Data East Corporation", "Oozumou - The Grand Sumo (DECO Cassette) (Japan)", 0 ) /* 42 */ // 1984.08 Hellow Gateball // not a typo, this is official spelling /* 43 */ // 1984.08 Yellow Cab -/* 44 */ GAME( 1985, cbdash, decocass, cbdash, cbdash, decocass_state, decocass, ROT270, "Data East Corporation", "Boulder Dash (DECO Cassette) (US)", 0 ) +/* 44 */ GAME( 1985, cbdash, decocass, decocass, cbdash, decocass_type5_state, decocass, ROT270, "Data East Corporation", "Boulder Dash (DECO Cassette) (US)", 0 ) /* UX7 */ // 1984.12 Tokyo MIE Clinic/Tokyo MIE Shinryoujo /* UX8 */ // 1985.01 Tokyo MIE Clinic/Tokyo MIE Shinryoujo Part 2 /* UX9 */ // 1985.05 Geinoujin Shikaku Shiken + +/* xx */ GAME( 2008, decomult, decocass, decocass, decocass, decocass_widel_state, decocass, ROT270, "bootleg (David Widel)", "Deco Cassette System Multigame (ROM based)", 0 ) + diff --git a/src/mame/includes/decocass.h b/src/mame/includes/decocass.h index 27427b3c30d..71eabc792cf 100644 --- a/src/mame/includes/decocass.h +++ b/src/mame/includes/decocass.h @@ -41,7 +41,6 @@ public: m_objectram(*this, "objectram"), m_paletteram(*this, "paletteram") { - m_type1_map = nullptr; } /* devices */ @@ -113,28 +112,6 @@ public: read8_delegate m_dongle_r; write8_delegate m_dongle_w; - /* dongle type #1 */ - uint32_t m_type1_inmap; - uint32_t m_type1_outmap; - - /* dongle type #2: status of the latches */ - int32_t m_type2_d2_latch; /* latched 8041-STATUS D2 value */ - int32_t m_type2_xx_latch; /* latched value (D7-4 == 0xc0) ? 1 : 0 */ - int32_t m_type2_promaddr; /* latched PROM address A0-A7 */ - - /* dongle type #3: status and patches */ - int32_t m_type3_ctrs; /* 12 bit counter stage */ - int32_t m_type3_d0_latch; /* latched 8041-D0 value */ - int32_t m_type3_pal_19; /* latched 1 for PAL input pin-19 */ - int32_t m_type3_swap; - - /* dongle type #4: status */ - int32_t m_type4_ctrs; /* latched PROM address (E5x0 LSB, E5x1 MSB) */ - int32_t m_type4_latch; /* latched enable PROM (1100xxxx written to E5x1) */ - - /* dongle type #5: status */ - int32_t m_type5_latch; /* latched enable PROM (1100xxxx written to E5x1) */ - /* DS Telejan */ uint8_t m_mux_data; @@ -150,48 +127,11 @@ public: virtual void machine_reset() override; virtual void video_start() override; DECLARE_PALETTE_INIT(decocass); - DECLARE_MACHINE_RESET(ctsttape); - DECLARE_MACHINE_RESET(cprogolfj); - DECLARE_MACHINE_RESET(cdsteljn); - DECLARE_MACHINE_RESET(cfishing); - DECLARE_MACHINE_RESET(chwy); - DECLARE_MACHINE_RESET(cterrani); - DECLARE_MACHINE_RESET(castfant); - DECLARE_MACHINE_RESET(csuperas); - DECLARE_MACHINE_RESET(clocknch); - DECLARE_MACHINE_RESET(cprogolf); - DECLARE_MACHINE_RESET(cluckypo); - DECLARE_MACHINE_RESET(ctisland); - DECLARE_MACHINE_RESET(ctisland3); - DECLARE_MACHINE_RESET(cexplore); - DECLARE_MACHINE_RESET(cdiscon1); - DECLARE_MACHINE_RESET(ctornado); - DECLARE_MACHINE_RESET(cmissnx); - DECLARE_MACHINE_RESET(cptennis); - DECLARE_MACHINE_RESET(cbtime); - DECLARE_MACHINE_RESET(cburnrub); - DECLARE_MACHINE_RESET(cgraplop); - DECLARE_MACHINE_RESET(cgraplop2); - DECLARE_MACHINE_RESET(clapapa); - DECLARE_MACHINE_RESET(cskater); - DECLARE_MACHINE_RESET(cprobowl); - DECLARE_MACHINE_RESET(cnightst); - DECLARE_MACHINE_RESET(cpsoccer); - DECLARE_MACHINE_RESET(csdtenis); - DECLARE_MACHINE_RESET(czeroize); - DECLARE_MACHINE_RESET(cppicf); - DECLARE_MACHINE_RESET(cfghtice); - DECLARE_MACHINE_RESET(type4); - DECLARE_MACHINE_RESET(cbdash); - DECLARE_MACHINE_RESET(cflyball); - DECLARE_MACHINE_RESET(cmanhat); - DECLARE_MACHINE_RESET(cocean1a); /* 10 */ - DECLARE_MACHINE_RESET(clocknchj); /* 11 */ - DECLARE_MACHINE_RESET(cfboy0a1); /* 12 */ + uint32_t screen_update_decocass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE8_MEMBER(decocass_coin_counter_w); DECLARE_WRITE8_MEMBER(decocass_sound_command_w); - DECLARE_READ8_MEMBER( decocass_sound_command_main_r ); + DECLARE_READ8_MEMBER(decocass_sound_command_main_r); DECLARE_READ8_MEMBER(decocass_sound_data_r); DECLARE_READ8_MEMBER(decocass_sound_ack_r); DECLARE_WRITE8_MEMBER(decocass_sound_data_w); @@ -251,18 +191,6 @@ public: DECLARE_WRITE8_MEMBER(cdsteljn_mux_w); TIMER_DEVICE_CALLBACK_MEMBER(decocass_audio_nmi_gen); private: - DECLARE_READ8_MEMBER(decocass_type1_r); - DECLARE_READ8_MEMBER(decocass_type2_r); - DECLARE_WRITE8_MEMBER(decocass_type2_w); - DECLARE_READ8_MEMBER(decocass_type3_r); - DECLARE_WRITE8_MEMBER(decocass_type3_w); - DECLARE_READ8_MEMBER(decocass_type4_r); - DECLARE_WRITE8_MEMBER(decocass_type4_w); - DECLARE_READ8_MEMBER(decocass_type5_r); - DECLARE_WRITE8_MEMBER(decocass_type5_w); - DECLARE_READ8_MEMBER(decocass_nodong_r); - - uint8_t* m_type1_map; void draw_edge(bitmap_ind16 &bitmap, const rectangle &cliprect, int which, bool opaque); void draw_object(bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_center(bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -276,3 +204,204 @@ private: uint8_t *missile_ram, int interleave); void decocass_fno( offs_t offset, uint8_t data ); }; + +class decocass_type1_state : public decocass_state +{ +public: + decocass_type1_state(const machine_config &mconfig, device_type type, const char *tag) + : decocass_state(mconfig, type, tag) + { + m_type1_map = nullptr; + } + + DECLARE_MACHINE_RESET(ctsttape); + DECLARE_MACHINE_RESET(chwy); + DECLARE_MACHINE_RESET(cdsteljn); + DECLARE_MACHINE_RESET(cterrani); + DECLARE_MACHINE_RESET(castfant); + DECLARE_MACHINE_RESET(csuperas); + DECLARE_MACHINE_RESET(cmanhat); + DECLARE_MACHINE_RESET(clocknch); + DECLARE_MACHINE_RESET(cprogolf); + DECLARE_MACHINE_RESET(cprogolfj); + DECLARE_MACHINE_RESET(cluckypo); + DECLARE_MACHINE_RESET(ctisland); + DECLARE_MACHINE_RESET(ctisland3); + DECLARE_MACHINE_RESET(cexplore); + DECLARE_MACHINE_RESET(cocean1a); /* 10 */ + DECLARE_MACHINE_RESET(cfboy0a1); /* 12 */ + DECLARE_MACHINE_RESET(clocknchj); /* 11 */ + +protected: + + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + + DECLARE_READ8_MEMBER(decocass_type1_r); + + /* dongle type #1 */ + uint32_t m_type1_inmap; + uint32_t m_type1_outmap; + uint8_t* m_type1_map; +}; + + +class decocass_type2_state : public decocass_state +{ +public: + decocass_type2_state(const machine_config &mconfig, device_type type, const char *tag) + : decocass_state(mconfig, type, tag) + { + } + +protected: + + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + + DECLARE_READ8_MEMBER(decocass_type2_r); + DECLARE_WRITE8_MEMBER(decocass_type2_w); + + /* dongle type #2: status of the latches */ + int32_t m_type2_d2_latch; /* latched 8041-STATUS D2 value */ + int32_t m_type2_xx_latch; /* latched value (D7-4 == 0xc0) ? 1 : 0 */ + int32_t m_type2_promaddr; /* latched PROM address A0-A7 */ +}; + + +class decocass_type3_state : public decocass_state +{ +public: + decocass_type3_state(const machine_config &mconfig, device_type type, const char *tag) + : decocass_state(mconfig, type, tag) + { + } + + DECLARE_MACHINE_RESET(cfishing); + DECLARE_MACHINE_RESET(cbtime); + DECLARE_MACHINE_RESET(cburnrub); + DECLARE_MACHINE_RESET(cgraplop); + DECLARE_MACHINE_RESET(cgraplop2); + DECLARE_MACHINE_RESET(clapapa); + DECLARE_MACHINE_RESET(cskater); + DECLARE_MACHINE_RESET(cprobowl); + DECLARE_MACHINE_RESET(cnightst); + DECLARE_MACHINE_RESET(cpsoccer); + DECLARE_MACHINE_RESET(csdtenis); + DECLARE_MACHINE_RESET(czeroize); + DECLARE_MACHINE_RESET(cppicf); + DECLARE_MACHINE_RESET(cfghtice); + +protected: + + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + + DECLARE_READ8_MEMBER(decocass_type3_r); + DECLARE_WRITE8_MEMBER(decocass_type3_w); + + /* dongle type #3: status and patches */ + int32_t m_type3_ctrs; /* 12 bit counter stage */ + int32_t m_type3_d0_latch; /* latched 8041-D0 value */ + int32_t m_type3_pal_19; /* latched 1 for PAL input pin-19 */ + int32_t m_type3_swap; +}; + + + +class decocass_type4_state : public decocass_state +{ +public: + decocass_type4_state(const machine_config &mconfig, device_type type, const char *tag) + : decocass_state(mconfig, type, tag) + { + } + +protected: + + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + + DECLARE_READ8_MEMBER(decocass_type4_r); + DECLARE_WRITE8_MEMBER(decocass_type4_w); + + /* dongle type #4: status */ + int32_t m_type4_ctrs; /* latched PROM address (E5x0 LSB, E5x1 MSB) */ + int32_t m_type4_latch; /* latched enable PROM (1100xxxx written to E5x1) */ +}; + + +class decocass_type5_state : public decocass_state +{ +public: + decocass_type5_state(const machine_config &mconfig, device_type type, const char *tag) + : decocass_state(mconfig, type, tag) + { + } + +protected: + + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + + DECLARE_READ8_MEMBER(decocass_type5_r); + DECLARE_WRITE8_MEMBER(decocass_type5_w); + + /* dongle type #5: status */ + int32_t m_type5_latch; /* latched enable PROM (1100xxxx written to E5x1) */ +}; + + +class decocass_nodong_state : public decocass_state +{ +public: + decocass_nodong_state(const machine_config &mconfig, device_type type, const char *tag) + : decocass_state(mconfig, type, tag) + { + } + +protected: + + //virtual void machine_start() override; + virtual void machine_reset() override; + +private: + DECLARE_READ8_MEMBER(decocass_nodong_r); +}; + + +class decocass_widel_state : public decocass_state +{ +public: + decocass_widel_state(const machine_config &mconfig, device_type type, const char *tag) + : decocass_state(mconfig, type, tag) + { + } + +protected: + + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + + DECLARE_READ8_MEMBER(decocass_widel_r); + DECLARE_WRITE8_MEMBER(decocass_widel_w); + DECLARE_READ8_MEMBER(decocass_fbc2_r); + + /* dongle type widel: status */ + int32_t m_widel_ctrs; /* latched PROM address (E5x0 LSB, E5x1 MSB) */ + int32_t m_widel_latch; /* latched enable PROM (1100xxxx written to E5x1) */ + uint8_t m_decomult_bank; +}; + diff --git a/src/mame/machine/decocass.cpp b/src/mame/machine/decocass.cpp index c7bb5483039..abac33a48e7 100644 --- a/src/mame/machine/decocass.cpp +++ b/src/mame/machine/decocass.cpp @@ -241,7 +241,7 @@ void decocass_state::decocass_fno( offs_t offset, uint8_t data ) #endif -READ8_MEMBER(decocass_state::decocass_type1_r) +READ8_MEMBER(decocass_type1_state::decocass_type1_r) { if (!m_type1_map) return 0x00; @@ -429,11 +429,10 @@ static uint8_t type1_latch_16_pass_3_inv_1_table[8] = { T1PROM,T1LATCHINV,T1PROM static uint8_t type1_map1100[8] = { T1PROM,T1PROM,T1LATCHINV,T1PROM,T1DIRECT,T1PROM,T1LATCH,T1PROM }; -MACHINE_RESET_MEMBER(decocass_state,cocean1a) /* 10 */ +MACHINE_RESET_MEMBER(decocass_type1_state,cocean1a) /* 10 */ { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DP-1100 map)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_map1100; m_type1_inmap = MAKE_MAP(0,1,2,3,4,5,6,7); m_type1_outmap = MAKE_MAP(0,1,2,3,4,5,6,7); @@ -461,11 +460,10 @@ MACHINE_RESET_MEMBER(decocass_state,cocean1a) /* 10 */ static uint8_t type1_map1120[8] = { T1PROM,T1PROM,T1LATCHINV,T1DIRECT,T1PROM,T1LATCH,T1PROM,T1PROM }; -MACHINE_RESET_MEMBER(decocass_state,cfboy0a1) /* 12 */ +MACHINE_RESET_MEMBER(decocass_type1_state,cfboy0a1) /* 12 */ { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DP-1120 map)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_map1120; m_type1_inmap = MAKE_MAP(0,1,2,3,4,5,6,7); m_type1_outmap = MAKE_MAP(0,1,2,3,4,5,6,7); @@ -491,11 +489,10 @@ TYPE 1 static uint8_t type1_map_clocknchj[8] = { T1PROM,T1PROM,T1DIRECT,T1LATCHINV,T1PROM,T1PROM,T1LATCH,T1PROM }; -MACHINE_RESET_MEMBER(decocass_state,clocknchj) /* 11 */ +MACHINE_RESET_MEMBER(decocass_type1_state,clocknchj) /* 11 */ { - decocass_state::machine_reset(); - LOG(0,("dongle type #1x (type1_map_clocknchj map)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); + machine_reset(); + LOG(0,("dongle type #1 (type1_map_clocknchj map)\n")); m_type1_map = type1_map_clocknchj; m_type1_inmap = MAKE_MAP(0,1,2,3,4,5,6,7); m_type1_outmap = MAKE_MAP(0,1,2,3,4,5,6,7); @@ -511,7 +508,7 @@ MACHINE_RESET_MEMBER(decocass_state,clocknchj) /* 11 */ * - Pro Tennis * ***************************************************************************/ -READ8_MEMBER(decocass_state::decocass_type2_r) +READ8_MEMBER(decocass_type2_state::decocass_type2_r) { uint8_t data; @@ -540,7 +537,7 @@ READ8_MEMBER(decocass_state::decocass_type2_r) return data; } -WRITE8_MEMBER(decocass_state::decocass_type2_w) +WRITE8_MEMBER(decocass_type2_state::decocass_type2_w) { if (1 == m_type2_xx_latch) { @@ -593,7 +590,7 @@ WRITE8_MEMBER(decocass_state::decocass_type2_w) * - Fighting Ice Hockey * ***************************************************************************/ -READ8_MEMBER(decocass_state::decocass_type3_r) +READ8_MEMBER(decocass_type3_state::decocass_type3_r) { uint8_t data, save; @@ -791,7 +788,7 @@ READ8_MEMBER(decocass_state::decocass_type3_r) return data; } -WRITE8_MEMBER(decocass_state::decocass_type3_w) +WRITE8_MEMBER(decocass_type3_state::decocass_type3_w) { if (1 == (offset & 1)) { @@ -831,7 +828,7 @@ WRITE8_MEMBER(decocass_state::decocass_type3_w) * ***************************************************************************/ -READ8_MEMBER(decocass_state::decocass_type4_r) +READ8_MEMBER(decocass_type4_state::decocass_type4_r) { uint8_t data; @@ -876,7 +873,7 @@ READ8_MEMBER(decocass_state::decocass_type4_r) return data; } -WRITE8_MEMBER(decocass_state::decocass_type4_w) +WRITE8_MEMBER(decocass_type4_state::decocass_type4_w) { if (1 == (offset & 1)) { @@ -914,7 +911,7 @@ WRITE8_MEMBER(decocass_state::decocass_type4_w) * ***************************************************************************/ -READ8_MEMBER(decocass_state::decocass_type5_r) +READ8_MEMBER(decocass_type5_state::decocass_type5_r) { uint8_t data; @@ -956,7 +953,7 @@ READ8_MEMBER(decocass_state::decocass_type5_r) return data; } -WRITE8_MEMBER(decocass_state::decocass_type5_w) +WRITE8_MEMBER(decocass_type5_state::decocass_type5_w) { if (1 == (offset & 1)) { @@ -990,7 +987,7 @@ WRITE8_MEMBER(decocass_state::decocass_type5_w) * ***************************************************************************/ -READ8_MEMBER(decocass_state::decocass_nodong_r) +READ8_MEMBER(decocass_nodong_state::decocass_nodong_r) { uint8_t data; @@ -1024,6 +1021,94 @@ READ8_MEMBER(decocass_state::decocass_nodong_r) return data; } + +/*************************************************************************** + * + * Widel Multigame Dongle + * - provides access to a large ROM + * + ***************************************************************************/ + +READ8_MEMBER(decocass_widel_state::decocass_widel_r) +{ + uint8_t data; + + if (1 == (offset & 1)) + { + if (0 == (offset & E5XX_MASK)) + { + data = m_mcu->upi41_master_r(space,1); + LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- 8041 STATUS\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + } + else + { + data = 0xff; /* open data bus? */ + LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- open bus\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + } + } + else + { + if (m_widel_latch) + { + uint8_t *prom = space.machine().root_device().memregion("dongle")->base(); + + data = prom[m_widel_ctrs | (m_decomult_bank << 16)]; + LOG(3,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x '%c' <- PROM[%04x]\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.', m_widel_ctrs)); + + m_widel_ctrs = (m_widel_ctrs + 1) & 0xffff; + if (m_widel_ctrs == 0) + { + m_decomult_bank++; + } + + } + else + { + if (0 == (offset & E5XX_MASK)) + { + data = m_mcu->upi41_master_r(space,0); + LOG(3,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x '%c' <- open bus (D0 replaced with latch)\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data, (data >= 32) ? data : '.')); + } + else + { + data = 0xff; /* open data bus? */ + LOG(4,("%10s 6502-PC: %04x decocass_widel_r(%02x): $%02x <- open bus\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data)); + } + } + } + + return data; +} + +WRITE8_MEMBER(decocass_widel_state::decocass_widel_w) +{ + if (1 == (offset & 1)) + { + if (1 == m_widel_latch) + { + m_widel_ctrs = data << 8; // clears lower bits + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS MSB (%04x)\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data, m_widel_ctrs)); + return; + } + else + if (0xc0 == (data & 0xf0)) + { + m_widel_latch = 1; + } + } + else + { + if (m_widel_latch) + { + m_widel_ctrs = data; // clears upper bits + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> CTRS LSB (%04x)\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data, m_widel_ctrs)); + return; + } + } + LOG(3,("%10s 6502-PC: %04x decocass_e5xx_w(%02x): $%02x -> %s\n", space.machine().time().as_string(6), space.device().safe_pcbase(), offset, data, offset & 1 ? "8041-CMND" : "8041-DATA")); + m_mcu->upi41_master_w(space,offset, data); +} + /*************************************************************************** * * Main dongle and 8041 interface @@ -1099,28 +1184,27 @@ WRITE8_MEMBER(decocass_state::decocass_e5xx_w) * DE-0091xx daughter board handler * * The DE-0091xx daughter board seems to be a read-only ROM board with - * two times five 4K ROMs. The only game using it (so far) is - * Treasure Island, which has 4 ROMs. + * two times five 4K ROMs. + * * The board's ROMs are mapped into view for reads between addresses - * 0x6000 and 0xafff by setting bit0 of address 0xe900. + * 0x6000 and 0xafff by setting bits 0 and 1 of address 0xe900. * ***************************************************************************/ WRITE8_MEMBER(decocass_state::decocass_e900_w) { - m_de0091_enable = data & 1; - membank("bank1")->set_entry(data & 1); - /* Perhaps the second row of ROMs is enabled by another bit. - * There is no way to verify this yet, so for now just look - * at bit 0 to enable the daughter board at reads between - * 0x6000 and 0xafff. - */ + m_de0091_enable = data & 3; + + if (m_de0091_enable == 0x3) // invalid + return; + + membank("bank1")->set_entry(data & 3); } WRITE8_MEMBER(decocass_state::decocass_de0091_w) { - /* don't allow writes to the ROMs */ - if (!m_de0091_enable) + /* don't allow writes to the ROMs - actually cexplore requires us to allow them */ + //if (!m_de0091_enable) decocass_charram_w(space, offset, data); } @@ -1137,18 +1221,6 @@ void decocass_state::decocass_machine_state_save_init() save_item(NAME(m_i8041_p1)); save_item(NAME(m_i8041_p2)); save_item(NAME(m_de0091_enable)); - save_item(NAME(m_type1_inmap)); - save_item(NAME(m_type1_outmap)); - save_item(NAME(m_type2_d2_latch)); - save_item(NAME(m_type2_xx_latch)); - save_item(NAME(m_type2_promaddr)); - save_item(NAME(m_type3_ctrs)); - save_item(NAME(m_type3_d0_latch)); - save_item(NAME(m_type3_pal_19)); - save_item(NAME(m_type3_swap)); - save_item(NAME(m_type4_ctrs)); - save_item(NAME(m_type4_latch)); - save_item(NAME(m_type5_latch)); save_item(NAME(m_sound_ack)); save_item(NAME(m_quadrature_decoder)); @@ -1171,6 +1243,7 @@ void decocass_state::machine_start() { } + void decocass_state::machine_reset() { m_firsttime = 1; @@ -1188,23 +1261,6 @@ void decocass_state::machine_reset() m_i8041_p2_read_latch = 0xff; m_de0091_enable = 0; - m_type1_inmap = MAKE_MAP(0,1,2,3,4,5,6,7); - m_type1_outmap = MAKE_MAP(0,1,2,3,4,5,6,7); - - m_type2_d2_latch = 0; - m_type2_xx_latch = 0; - m_type2_promaddr = 0; - - m_type3_ctrs = 0; - m_type3_d0_latch = 0; - m_type3_pal_19 = 0; - m_type3_swap = 0; - - m_type4_ctrs = 0; - m_type4_latch = 0; - - m_type5_latch = 0; - memset(m_quadrature_decoder, 0, sizeof(m_quadrature_decoder)); m_sound_ack = 0; m_audio_nmi_enabled = 0; @@ -1224,274 +1280,301 @@ void decocass_state::machine_reset() m_center_v_shift = 0; } -MACHINE_RESET_MEMBER(decocass_state,ctsttape) +void decocass_type1_state::machine_start() +{ + save_item(NAME(m_type1_inmap)); + save_item(NAME(m_type1_outmap)); +} + +void decocass_type1_state::machine_reset() { decocass_state::machine_reset(); + + m_dongle_r = read8_delegate(FUNC(decocass_type1_state::decocass_type1_r),this); + m_type1_inmap = MAKE_MAP(0,1,2,3,4,5,6,7); + m_type1_outmap = MAKE_MAP(0,1,2,3,4,5,6,7); +} + +void decocass_type2_state::machine_start() +{ + save_item(NAME(m_type2_d2_latch)); + save_item(NAME(m_type2_xx_latch)); + save_item(NAME(m_type2_promaddr)); +} + +void decocass_type2_state::machine_reset() +{ + decocass_state::machine_reset(); + + LOG(0,("dongle type #2 (CS82-007)\n")); + m_dongle_r = read8_delegate(FUNC(decocass_type2_state::decocass_type2_r),this); + m_dongle_w = write8_delegate(FUNC(decocass_type2_state::decocass_type2_w),this); + + m_type2_d2_latch = 0; + m_type2_xx_latch = 0; + m_type2_promaddr = 0; +} + +void decocass_type3_state::machine_start() +{ + save_item(NAME(m_type3_ctrs)); + save_item(NAME(m_type3_d0_latch)); + save_item(NAME(m_type3_pal_19)); + save_item(NAME(m_type3_swap)); +} + +void decocass_type3_state::machine_reset() +{ + decocass_state::machine_reset(); + + m_dongle_r = read8_delegate(FUNC(decocass_type3_state::decocass_type3_r),this); + m_dongle_w = write8_delegate(FUNC(decocass_type3_state::decocass_type3_w),this); + + m_type3_ctrs = 0; + m_type3_d0_latch = 0; + m_type3_pal_19 = 0; + m_type3_swap = 0; +} + +void decocass_type4_state::machine_start() +{ + save_item(NAME(m_type4_ctrs)); + save_item(NAME(m_type4_latch)); +} + +void decocass_type4_state::machine_reset() +{ + decocass_state::machine_reset(); + + LOG(0,("dongle type #4 (32K ROM)\n")); + m_dongle_r = read8_delegate(FUNC(decocass_type4_state::decocass_type4_r),this); + m_dongle_w = write8_delegate(FUNC(decocass_type4_state::decocass_type4_w),this); + + m_type4_ctrs = 0; + m_type4_latch = 0; +} + +void decocass_type5_state::machine_start() +{ + save_item(NAME(m_type5_latch)); +} + +void decocass_type5_state::machine_reset() +{ + decocass_state::machine_reset(); + + LOG(0,("dongle type #5 (NOP)\n")); + m_dongle_r = read8_delegate(FUNC(decocass_type5_state::decocass_type5_r),this); + m_dongle_w = write8_delegate(FUNC(decocass_type5_state::decocass_type5_w),this); + + m_type5_latch = 0; +} + +void decocass_nodong_state::machine_reset() +{ + decocass_state::machine_reset(); + LOG(0, ("no dongle\n")); + m_dongle_r = read8_delegate(FUNC(decocass_nodong_state::decocass_nodong_r), this); +} + +MACHINE_RESET_MEMBER(decocass_type1_state,ctsttape) +{ + machine_reset(); LOG(0,("dongle type #1 (DE-0061)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_pass_136_table; } -MACHINE_RESET_MEMBER(decocass_state,chwy) +MACHINE_RESET_MEMBER(decocass_type1_state,chwy) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061 own PROM)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_27_pass_3_inv_2_table; } -MACHINE_RESET_MEMBER(decocass_state,cdsteljn) +MACHINE_RESET_MEMBER(decocass_type1_state,cdsteljn) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (A-0061)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_27_pass_3_inv_2_table; } -MACHINE_RESET_MEMBER(decocass_state,cterrani) +MACHINE_RESET_MEMBER(decocass_type1_state,cterrani) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061 straight)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_26_pass_3_inv_2_table; m_type1_inmap = MAKE_MAP(0,1,2,3,4,5,6,7); m_type1_outmap = MAKE_MAP(0,1,2,3,4,5,6,7); } -MACHINE_RESET_MEMBER(decocass_state,castfant) +MACHINE_RESET_MEMBER(decocass_type1_state,castfant) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_16_pass_3_inv_1_table; } -MACHINE_RESET_MEMBER(decocass_state,csuperas) +MACHINE_RESET_MEMBER(decocass_type1_state,csuperas) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061 flip 4-5)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_26_pass_3_inv_2_table; m_type1_inmap = MAKE_MAP(0,1,2,3,5,4,6,7); m_type1_outmap = MAKE_MAP(0,1,2,3,5,4,6,7); } -MACHINE_RESET_MEMBER(decocass_state,cmanhat) +MACHINE_RESET_MEMBER(decocass_type1_state,cmanhat) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_xab_pass_x54_table; } -MACHINE_RESET_MEMBER(decocass_state,clocknch) +MACHINE_RESET_MEMBER(decocass_type1_state,clocknch) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061 flip 2-3)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_26_pass_3_inv_2_table; m_type1_inmap = MAKE_MAP(0,1,3,2,4,5,6,7); m_type1_outmap = MAKE_MAP(0,1,3,2,4,5,6,7); } -MACHINE_RESET_MEMBER(decocass_state,cprogolf) +MACHINE_RESET_MEMBER(decocass_type1_state,cprogolf) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061 flip 0-1)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_26_pass_3_inv_2_table; m_type1_inmap = MAKE_MAP(1,0,2,3,4,5,6,7); m_type1_outmap = MAKE_MAP(1,0,2,3,4,5,6,7); } -MACHINE_RESET_MEMBER(decocass_state,cprogolfj) +MACHINE_RESET_MEMBER(decocass_type1_state,cprogolfj) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (A-0061 flip 0-1)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_26_pass_3_inv_2_table; m_type1_inmap = MAKE_MAP(1,0,2,3,4,5,6,7); m_type1_outmap = MAKE_MAP(1,0,2,3,4,5,6,7); } -MACHINE_RESET_MEMBER(decocass_state,cluckypo) +MACHINE_RESET_MEMBER(decocass_type1_state,cluckypo) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061 flip 1-3)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_26_pass_3_inv_2_table; m_type1_inmap = MAKE_MAP(0,3,2,1,4,5,6,7); m_type1_outmap = MAKE_MAP(0,3,2,1,4,5,6,7); } -MACHINE_RESET_MEMBER(decocass_state,ctisland) +MACHINE_RESET_MEMBER(decocass_type1_state,ctisland) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061 flip 0-2)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_26_pass_3_inv_2_table; m_type1_inmap = MAKE_MAP(2,1,0,3,4,5,6,7); m_type1_outmap = MAKE_MAP(2,1,0,3,4,5,6,7); } -MACHINE_RESET_MEMBER(decocass_state,ctisland3) +MACHINE_RESET_MEMBER(decocass_type1_state,ctisland3) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061 custom)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_ctisland3; m_type1_inmap = MAKE_MAP(0,1,2,3,4,5,6,7); // correct for handcrafted prom m_type1_outmap = MAKE_MAP(0,1,2,3,4,5,6,7); // ^ } -MACHINE_RESET_MEMBER(decocass_state,cexplore) +MACHINE_RESET_MEMBER(decocass_type1_state,cexplore) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #1 (DE-0061 own PROM)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type1_r),this); m_type1_map = type1_latch_26_pass_5_inv_2_table; } -MACHINE_RESET_MEMBER(decocass_state,cdiscon1) -{ - decocass_state::machine_reset(); - LOG(0,("dongle type #2 (CS82-007)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type2_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type2_w),this); -} - -MACHINE_RESET_MEMBER(decocass_state,ctornado) -{ - decocass_state::machine_reset(); - LOG(0,("dongle type #2 (CS82-007)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type2_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type2_w),this); -} - -MACHINE_RESET_MEMBER(decocass_state,cmissnx) -{ - decocass_state::machine_reset(); - LOG(0,("dongle type #2 (CS82-007)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type2_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type2_w),this); -} - -MACHINE_RESET_MEMBER(decocass_state,cptennis) -{ - decocass_state::machine_reset(); - LOG(0,("dongle type #2 (CS82-007)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type2_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type2_w),this); -} - -MACHINE_RESET_MEMBER(decocass_state,cfishing) +MACHINE_RESET_MEMBER(decocass_type3_state,cfishing) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_01; } -MACHINE_RESET_MEMBER(decocass_state,cbtime) +MACHINE_RESET_MEMBER(decocass_type3_state,cbtime) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_12; } -MACHINE_RESET_MEMBER(decocass_state,cburnrub) +MACHINE_RESET_MEMBER(decocass_type3_state,cburnrub) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_67; } -MACHINE_RESET_MEMBER(decocass_state,cgraplop) +MACHINE_RESET_MEMBER(decocass_type3_state,cgraplop) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_56; } -MACHINE_RESET_MEMBER(decocass_state,cgraplop2) +MACHINE_RESET_MEMBER(decocass_type3_state,cgraplop2) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_67; } -MACHINE_RESET_MEMBER(decocass_state,clapapa) +MACHINE_RESET_MEMBER(decocass_type3_state,clapapa) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_34_7; } -MACHINE_RESET_MEMBER(decocass_state,cskater) +MACHINE_RESET_MEMBER(decocass_type3_state,cskater) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_45; } -MACHINE_RESET_MEMBER(decocass_state,cprobowl) +MACHINE_RESET_MEMBER(decocass_type3_state,cprobowl) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_34_0; } -MACHINE_RESET_MEMBER(decocass_state,cnightst) +MACHINE_RESET_MEMBER(decocass_type3_state,cnightst) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_13; } -MACHINE_RESET_MEMBER(decocass_state,cpsoccer) +MACHINE_RESET_MEMBER(decocass_type3_state,cpsoccer) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_24; } -MACHINE_RESET_MEMBER(decocass_state,csdtenis) +MACHINE_RESET_MEMBER(decocass_type3_state,csdtenis) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_23_56; } -MACHINE_RESET_MEMBER(decocass_state,czeroize) +MACHINE_RESET_MEMBER(decocass_type3_state,czeroize) { uint8_t *mem = memregion("dongle")->base(); - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_23_56; /* @@ -1508,47 +1591,57 @@ MACHINE_RESET_MEMBER(decocass_state,czeroize) mem[0x08a1] = 0xf7; } -MACHINE_RESET_MEMBER(decocass_state,cppicf) +MACHINE_RESET_MEMBER(decocass_type3_state,cppicf) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_01; } -MACHINE_RESET_MEMBER(decocass_state,cfghtice) +MACHINE_RESET_MEMBER(decocass_type3_state,cfghtice) { - decocass_state::machine_reset(); + machine_reset(); LOG(0,("dongle type #3 (PAL)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type3_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type3_w),this); m_type3_swap = TYPE3_SWAP_25; } -MACHINE_RESET_MEMBER(decocass_state,type4) + + + +// Note, this is a hack, I can't see where the bank bits actually get written out +// and the MAME disassembly is currently a mess. +READ8_MEMBER(decocass_widel_state::decocass_fbc2_r) { - decocass_state::machine_reset(); - LOG(0,("dongle type #4 (32K ROM)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type4_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type4_w),this); + if (!machine().side_effect_disabled()) + { + uint8_t data = m_maincpu->space(AS_PROGRAM).read_byte(0xb3); + m_decomult_bank = data; + } + return 0xa8; } -MACHINE_RESET_MEMBER(decocass_state,cbdash) +void decocass_widel_state::machine_start() { - decocass_state::machine_reset(); - LOG(0,("dongle type #5 (NOP)\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_type5_r),this); - m_dongle_w = write8_delegate(FUNC(decocass_state::decocass_type5_w),this); + decocass_state::machine_start(); + + save_item(NAME(m_widel_ctrs)); + save_item(NAME(m_widel_latch)); } -MACHINE_RESET_MEMBER(decocass_state,cflyball) +void decocass_widel_state::machine_reset() { decocass_state::machine_reset(); - LOG(0,("no dongle\n")); - m_dongle_r = read8_delegate(FUNC(decocass_state::decocass_nodong_r),this); + LOG(0,("Deco Multigame Dongle\n")); + m_dongle_r = read8_delegate(FUNC(decocass_widel_state::decocass_widel_r),this); + m_dongle_w = write8_delegate(FUNC(decocass_widel_state::decocass_widel_w),this); + + m_maincpu->space(AS_PROGRAM).install_read_handler(0xfbc2, 0xfbc2, read8_delegate(FUNC(decocass_widel_state::decocass_fbc2_r),this)); + m_decomult_bank = 0; + m_widel_ctrs = 0; + m_widel_latch = 0; } + /*************************************************************************** * * 8041 port handlers diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 2133d4ac483..bdf03df6945 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -11137,6 +11137,7 @@ ctornado // 20 1982.05 Tornado ctsttape // ? czeroize // 37 1983.10 Zeroize decocass // +decomult // @source:dectalk.cpp dectalk // 1983 Digital Equipment Corporation diff --git a/src/mame/video/decocass.cpp b/src/mame/video/decocass.cpp index 72c3684bb56..525713c6cfc 100644 --- a/src/mame/video/decocass.cpp +++ b/src/mame/video/decocass.cpp @@ -373,8 +373,8 @@ WRITE8_MEMBER(decocass_state::decocass_color_missiles_w ) } /* - * D0 - ?? - * D1 - ?? + * D0 - bg paging + * D1 - bg paging * D2 - ptn 1/2 * D3 - BKG ena * D4 - center L on @@ -742,14 +742,17 @@ uint32_t decocass_state::screen_update_decocass(screen_device &screen, bitmap_in // LS148 @ 2B (DSP-8 board) sets pen priority + // priority 0: foreground - should be drawn last in some cases? what breaks with it here? + m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + // priority 1: sprites draw_sprites(bitmap, cliprect, (m_color_center_bot >> 1) & 1, 0, 0, m_fgvideoram, 0x20); // priority 2 & 3: missiles draw_missiles(bitmap, cliprect, 1, 0, m_colorram, 0x20); - // priority 4: foreground - m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + // priority 4: foreground - drawing this here breaks Tornado and Pro Tennis and Mission X (priority vs boats) + //m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); return 0; } -- cgit v1.2.3