From d9b433540f49cdb2c21b7358da43d7d8074856e6 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sat, 21 Jan 2017 10:49:10 +0100 Subject: [PATCH] naomi.cpp: Added inputs for Mars TV [Angelo Salese] out-of-whatsnew: * Added cheat for main CPU unscaled clock; * Moved debug inputs into Machine Configuration; * Made doa2m, dankuga and dariusgx parents; --- src/mame/drivers/naomi.cpp | 76 +++++++++++++++++++++++++---------- src/mame/drivers/taito_f3.cpp | 4 +- src/mame/includes/naomi.h | 1 + 3 files changed, 57 insertions(+), 24 deletions(-) diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp index f0c4ed02faa..9c58746389d 100644 --- a/src/mame/drivers/naomi.cpp +++ b/src/mame/drivers/naomi.cpp @@ -1,5 +1,5 @@ // license:LGPL-2.1+ -// copyright-holders:Angelo Salese, Olivier Galibert, David Haywood, Samuele Zannoli, R. Belmont, ElSemi +// copyright-holders: Samuele Zannoli, R. Belmont, ElSemi, David Haywood, Angelo Salese, Olivier Galibert, MetalliC /* Sega Naomi / Naomi 2 / Atomiswave @@ -83,7 +83,7 @@ TODO (game-specific): - Giant Gram 2: no VMU emulation; - Gun Survivor 2: crashes during game loading; - Lupin the Shooting: "com. error between Naomi BD and i/o BD" after some secs. of gameplay; - - Monkey Ball: dies when attempts to load the gameplay; + - Monkey Ball: asserts when attempts to load the gameplay; - Oinori-Daimyoujin Matsuri: reports "B. RAM error" in test mode, inputs doesn't seem to work after that point; - OutTrigger: crashes on naomibd_r(); - Ringout 4x4: needs cabinet set to 4p, moans about not having two jamma i/o boards; @@ -92,7 +92,6 @@ TODO (game-specific): - The Typing of the Dead: missing keyboard inputs, doesn't enter into attract/test mode anymore (JVS issue); - Virtua Tennis: dies when accessing the gameplay or the attract mode (PVR or SH-4 bug, most likely); - World Kicks (both sets): "NAOMIM2: unhandled board write a0800600, 0000" after Naomi logo - (more will come up soon ...) --------------------------------------------------------------------------------------------------------------------------------------------------- Guru's Readmes @@ -1988,14 +1987,26 @@ ADDRESS_MAP_END * Input ports */ +// crude cheat pending SH4 DRC, especially useful for inp playback +INPUT_CHANGED_MEMBER(naomi_state::naomi_mastercpu_cheat_r) +{ + const u32 timing_value[4] = { CPU_CLOCK, CPU_CLOCK/2, CPU_CLOCK/4, CPU_CLOCK/16 }; + m_maincpu->set_unscaled_clock(timing_value[newval]); +} + INPUT_PORTS_START( naomi_debug ) PORT_START("MAMEDEBUG") - PORT_DIPNAME( 0x01, 0x00, "Bilinear Filtering" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, "Disable Render Calls" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) + PORT_CONFNAME( 0x01, 0x00, "Bilinear Filtering" ) + PORT_CONFSETTING( 0x00, DEF_STR( No ) ) + PORT_CONFSETTING( 0x01, DEF_STR( Yes ) ) + PORT_CONFNAME( 0x02, 0x00, "Disable Render Calls" ) + PORT_CONFSETTING( 0x00, DEF_STR( No ) ) + PORT_CONFSETTING( 0x02, DEF_STR( Yes ) ) + PORT_CONFNAME( 0x0c, 0x00, "Master CPU Clock Rate (Cheat)") PORT_CHANGED_MEMBER(DEVICE_SELF, naomi_state, naomi_mastercpu_cheat_r, nullptr) + PORT_CONFSETTING( 0x00, "100%" ) + PORT_CONFSETTING( 0x04, "50%" ) + PORT_CONFSETTING( 0x08, "25%" ) + PORT_CONFSETTING( 0x0c, "12.5%" ) INPUT_PORTS_END static INPUT_PORTS_START( naomi_mie ) @@ -2086,6 +2097,27 @@ static INPUT_PORTS_START( naomi ) PORT_BIT( 0x07ff, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END +static INPUT_PORTS_START( marstv ) + PORT_INCLUDE( naomi ) + + PORT_MODIFY("P1") + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START1 ) PORT_PLAYER(1) PORT_NAME("P1 Start") + PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Red Large Button \u5927") + PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Yellow Medium Button \u4E2D") + PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Blue Small Button \u5C0F") + PORT_BIT( 0x53ff, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_MODIFY("P2") + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_START2 ) PORT_PLAYER(2) PORT_NAME("P2 Start") + PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Red Large Button \u5927") + PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Yellow Medium Button \u4E2D") + PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Blue Small Button \u5C0F") + PORT_BIT( 0x53ff, IP_ACTIVE_HIGH, IPT_UNUSED ) + + // TODO: Player 3 +INPUT_PORTS_END + + static INPUT_PORTS_START( hotd2 ) PORT_INCLUDE( naomi_mie ) PORT_INCLUDE( naomi_debug ) @@ -9625,12 +9657,12 @@ ROM_END /* 834-xxxxx (Sega Naomi cart with game specific BIOS sets) */ /* 13636-01 */ GAME( 1998, hotd2, hod2bios, naomim2, hotd2, naomi_state, hotd2, ROT0, "Sega", "House of the Dead 2 (USA)", GAME_FLAGS ) /* specific BIOS "hod2bios" needed */ -/* 13636 */ GAME( 1998, hotd2o, hotd2, naomim2, hotd2, naomi_state, hotd2, ROT0, "Sega", "House of the Dead 2", GAME_FLAGS ) /* specific BIOS "hod2bios" needed */ -/* none */ GAME( 1998, hotd2p, hotd2, naomim2, hotd2, naomi_state, hotd2, ROT0, "Sega", "House of the Dead 2 (prototype)", GAME_FLAGS ) /* specific BIOS "hod2bios" needed */ -/* 13842 */ GAME( 1999, f355, f355dlx, naomim2, naomi, driver_device, 0, ROT0, "Sega", "Ferrari F355 Challenge (deluxe, no link)", GAME_FLAGS ) /* specific BIOS "f355dlx" needed */ -/* 13950 */ GAME( 1999, f355twin, f355bios, naomim2, naomi, driver_device, 0, ROT0, "Sega", "Ferrari F355 Challenge (twin/deluxe)", GAME_FLAGS ) /* specific BIOS "f355bios" needed */ -/* none */ GAME( 2001, f355twn2, f355bios, naomim2, naomi, driver_device, 0, ROT0, "Sega", "Ferrari F355 Challenge 2 - International Course Edition (twin/deluxe)", GAME_FLAGS ) /* specific BIOS "f355bios" needed */ -/* ????? */ GAME( 1999, alpiltdx, airlbios, naomim2, naomi, driver_device, 0, ROT0, "Sega", "Airline Pilots (deluxe) (Rev B)", GAME_FLAGS ) /* specific BIOS "airlbios" needed */ +/* 13636 */ GAME( 1998, hotd2o, hotd2, naomim2, hotd2, naomi_state, hotd2, ROT0, "Sega", "House of the Dead 2", GAME_FLAGS ) /* specific BIOS "hod2bios" needed */ +/* none */ GAME( 1998, hotd2p, hotd2, naomim2, hotd2, naomi_state, hotd2, ROT0, "Sega", "House of the Dead 2 (prototype)", GAME_FLAGS ) /* specific BIOS "hod2bios" needed */ +/* 13842 */ GAME( 1999, f355, f355dlx, naomim2, naomi, driver_device, 0, ROT0, "Sega", "Ferrari F355 Challenge (deluxe, no link)", GAME_FLAGS ) /* specific BIOS "f355dlx" needed */ +/* 13950 */ GAME( 1999, f355twin, f355bios, naomim2, naomi, driver_device, 0, ROT0, "Sega", "Ferrari F355 Challenge (twin/deluxe)", GAME_FLAGS ) /* specific BIOS "f355bios" needed */ +/* none */ GAME( 2001, f355twn2, f355bios, naomim2, naomi, driver_device, 0, ROT0, "Sega", "Ferrari F355 Challenge 2 - International Course Edition (twin/deluxe)", GAME_FLAGS ) /* specific BIOS "f355bios" needed */ +/* ????? */ GAME( 1999, alpiltdx, airlbios, naomim2, naomi, driver_device, 0, ROT0, "Sega", "Airline Pilots (deluxe) (Rev B)", GAME_FLAGS ) /* specific BIOS "airlbios" needed */ /* 840-xxxxx (Sega Naomi cart games)*/ /* 0001 */ GAME( 1998, dybbnao, naomi, naomim2, dybbnao, naomi_state, naomi, ROT0, "Sega", "Dynamite Baseball NAOMI (Japan)", GAME_FLAGS ) @@ -9643,7 +9675,7 @@ ROM_END /* 0008 */ GAME( 1999, tduno, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Touch de Uno! / Unou Nouryoku Check Machine (Japan)", GAME_FLAGS ) /* 0010 */ GAME( 1999, vs2_2k, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtua Striker 2 Ver. 2000 (Rev C)", GAME_FLAGS ) /* 0011 */ GAME( 1999, toyfight, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Toy Fighter", GAME_FLAGS ) -/* 0012 -01*/GAME( 1999, smlg99, naomi, naomim2, dybbnao, naomi_state, naomi, ROT0, "Sega", "World Series 99 / Super Major League 99", GAME_FLAGS ) +/* 0012-01 */ GAME( 1999, smlg99, naomi, naomim2, dybbnao, naomi_state, naomi, ROT0, "Sega", "World Series 99 / Super Major League 99", GAME_FLAGS ) /* 0013 */ GAME( 1999, jambo, naomi, naomim2, jambo, naomi_state, naomi, ROT0, "Sega", "Jambo! Safari (Rev A)", GAME_FLAGS ) /* 0015 */ GAME( 1999, vtennis, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtua Tennis / Power Smash", GAME_FLAGS ) /* 0016 */ GAME( 1999, derbyoc, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Derby Owners Club (Japan, Rev B)", GAME_FLAGS ) @@ -9654,10 +9686,10 @@ ROM_END /* none */ GAME( 1999, sambap, samba, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Samba De Amigo (USA, prototype)", GAME_FLAGS ) /* none */ GAME( 2000, virnbap, virnba, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtua NBA (prototype)", GAME_FLAGS ) /* 0021 */ GAME( 2000, virnbao, virnba, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtua NBA", GAME_FLAGS ) -/* 0021-01*/GAME( 2000,virnba, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtua NBA (USA)", GAME_FLAGS ) +/* 0021-01 */ GAME( 2000,virnba, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Virtua NBA (USA)", GAME_FLAGS ) /* 0022 */ GAME( 2000, tduno2, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Touch de Uno! 2 (Japan)", GAME_FLAGS ) /* 0023 */ GAME( 2000, 18wheelr, naomi, naomim2, 18wheelr,naomi_state, naomi, ROT0, "Sega", "18 Wheeler (deluxe) (Rev A)", GAME_FLAGS ) -/* 0025 */ GAME( 1999, marstv, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Mars TV (Japan)", GAME_FLAGS ) +/* 0025 */ GAME( 1999, marstv, naomi, naomim2, marstv, naomi_state, naomi, ROT0, "Sega", "Mars TV (Japan)", GAME_FLAGS ) /* 0026 */ GAME( 2000, totdo, totd, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "The Typing of the Dead", GAME_FLAGS ) /* 0026 */ GAME( 2000, totd, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "The Typing of the Dead (Rev A)", GAME_FLAGS ) /* 0027 */ GAME( 2000, smarinef, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Sega", "Sega Marine Fishing", GAME_FLAGS ) @@ -9710,7 +9742,7 @@ ROM_END // 00xx Mayjinsen (Formation Battle in May) - prototype, never released /* Cartridge prototypes of games released on GD-ROM */ -GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Puyo Puyo Fever (prototype ver 0.01)", GAME_FLAGS ) +/* ???? */ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", "Puyo Puyo Fever (prototype ver 0.01)", GAME_FLAGS ) /* 840-xxxxx (Sega Naomi 2 cart games) */ /* 0046 */ GAME( 2001, wldrider, naomi2, naomi2m2, naomi, naomi_state, naomi2, ROT0, "Sega", "Wild Riders", GAME_FLAGS ) @@ -9733,8 +9765,8 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", " /* 0002 */ GAME( 1999, suchie3, naomi, naomim2, suchie3, naomi_state,naomi_mp,ROT0, "Jaleco", "Idol Janshi Suchie-Pai 3 (Japan)", MACHINE_IMPERFECT_GRAPHICS|MACHINE_IMPERFECT_SOUND ) /* 0003 */ GAME( 1999, doa2a, doa2, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 (Rev A)", GAME_FLAGS ) /* 0003-01 */ GAME( 1999, doa2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2", GAME_FLAGS ) -/* 0003 */ GAME( 2000, doa2m, doa2, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 Millennium", GAME_FLAGS ) -/* 0004 */ GAME( 1999, shangril, naomi, naomim2, naomi_mp,naomi_state,naomi_mp,ROT0, "Marvelous Ent.", "Dengen Tenshi Taisen Janshi Shangri-la", GAME_FLAGS ) // (Build 0728) version taken from service mode +/* 0003 */ GAME( 2000, doa2m, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 Millennium", GAME_FLAGS ) +/* 0004 */ GAME( 1999, shangril, naomi, naomim2, naomi_mp,naomi_state,naomi_mp,ROT0, "Marvelous Ent.", "Dengen Tenshi Taisen Janshi Shangri-la", GAME_FLAGS ) // (Build 0728) version shown in service mode /* 0005 */ GAME( 1999, spawn, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Todd Mc Farlane / Capcom","Spawn In the Demon's Hand (Rev B)", GAME_FLAGS ) /* 0006 */ GAME( 1999, puyoda, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Compile", "Puyo Puyo Da! (Japan)", GAME_FLAGS ) /* 0007-01 */ GAME( 2000, mvsc2u, mvsc2, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / Marvel", "Marvel Vs. Capcom 2 New Age of Heroes (USA, Rev A)", GAME_FLAGS) @@ -9743,7 +9775,7 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", " /* 0011 */ GAME( 2000, capsnk, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000 (Rev C)", GAME_FLAGS ) /* 0011 */ GAME( 2000, capsnka, capsnk,naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000 (Rev A)", GAME_FLAGS ) /* 0011 */ GAME( 2000, capsnkb, capsnk,naomim2, naomi, naomi_state, naomi, ROT0, "Capcom / SNK", "Capcom Vs. SNK Millennium Fight 2000", GAME_FLAGS ) -/* 0012 -01 */ GAME( 2000, cspike, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Psikyo / Capcom", "Cannon Spike / Gun Spike", GAME_FLAGS ) +/* 0012-01 */ GAME( 2000, cspike, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Psikyo / Capcom", "Cannon Spike / Gun Spike", GAME_FLAGS ) /* 0013 */ GAME( 2000, ggx, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Arc System Works","Guilty Gear X", GAME_FLAGS ) /* 0014 */ GAME( 2000, gwing2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Takumi / Capcom", "Giga Wing 2", GAME_FLAGS ) /* 0015 */ GAME( 2000, pjustic, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom", "Project Justice / Moero! Justice Gakuen (Rev A)", GAME_FLAGS ) diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp index e3cecd934c1..cf993d23146 100644 --- a/src/mame/drivers/taito_f3.cpp +++ b/src/mame/drivers/taito_f3.cpp @@ -4208,11 +4208,11 @@ GAME( 1994, hthero94, intcup94, f3_224a, f3, taito_f3_state, intcup94, ROT0, " GAME( 1994, kaiserkn, 0, f3_224a, kn, taito_f3_state, kaiserkn, ROT0, "Taito Corporation Japan", "Kaiser Knuckle (Ver 2.1O 1994/07/29)", 0 ) GAME( 1994, kaiserknj,kaiserkn, f3_224a, kn, taito_f3_state, kaiserkn, ROT0, "Taito Corporation", "Kaiser Knuckle (Ver 2.1J 1994/07/29)", 0 ) GAME( 1994, gblchmp, kaiserkn, f3_224a, kn, taito_f3_state, kaiserkn, ROT0, "Taito America Corporation", "Global Champion (Ver 2.1A 1994/07/29)", 0 ) -GAME( 1994, dankuga, kaiserkn, f3_224a, kn, taito_f3_state, kaiserkn, ROT0, "Taito Corporation", "Dan-Ku-Ga (Ver 0.0J 1994/12/13, prototype)", 0 ) +GAME( 1994, dankuga, 0, f3_224a, kn, taito_f3_state, kaiserkn, ROT0, "Taito Corporation", "Dan-Ku-Ga (Ver 0.0J 1994/12/13, prototype)", 0 ) GAME( 1994, dariusg, 0, f3, f3, taito_f3_state, dariusg, ROT0, "Taito Corporation Japan", "Darius Gaiden - Silver Hawk (Ver 2.5O 1994/09/19)", 0 ) GAME( 1994, dariusgj, dariusg, f3, f3, taito_f3_state, dariusg, ROT0, "Taito Corporation", "Darius Gaiden - Silver Hawk (Ver 2.5J 1994/09/19)", 0 ) GAME( 1994, dariusgu, dariusg, f3, f3, taito_f3_state, dariusg, ROT0, "Taito America Corporation", "Darius Gaiden - Silver Hawk (Ver 2.5A 1994/09/19)", 0 ) -GAME( 1994, dariusgx, dariusg, f3, f3, taito_f3_state, dariusg, ROT0, "Taito Corporation", "Darius Gaiden - Silver Hawk Extra Version (Ver 2.7J 1995/03/06) (Official Hack)", 0 ) +GAME( 1994, dariusgx, 0, f3, f3, taito_f3_state, dariusg, ROT0, "Taito Corporation", "Darius Gaiden - Silver Hawk Extra Version (Ver 2.7J 1995/03/06) (Official Hack)", 0 ) GAME( 1994, bublbob2, 0, f3_224a, f3, taito_f3_state, bubsymph, ROT0, "Taito Corporation Japan", "Bubble Bobble II (Ver 2.6O 1994/12/16)", 0 ) GAME( 1994, bublbob2o,bublbob2, f3_224a, f3, taito_f3_state, bubsymph, ROT0, "Taito Corporation Japan", "Bubble Bobble II (Ver 2.5O 1994/10/05)", 0 ) GAME( 1994, bublbob2p,bublbob2, f3_224a, f3, taito_f3_state, bubsymph, ROT0, "Taito Corporation Japan", "Bubble Bobble II (Ver 0.0J 1993/12/13, prototype)", 0 ) diff --git a/src/mame/includes/naomi.h b/src/mame/includes/naomi.h index c9f1b7ba16d..1f9c498f798 100644 --- a/src/mame/includes/naomi.h +++ b/src/mame/includes/naomi.h @@ -82,6 +82,7 @@ class naomi_state : public dc_state uint8_t m_mp_mux; DECLARE_CUSTOM_INPUT_MEMBER(naomi_mp_r); + DECLARE_INPUT_CHANGED_MEMBER(naomi_mastercpu_cheat_r); DECLARE_INPUT_CHANGED_MEMBER(naomi_mp_w); inline int decode_reg32_64(uint32_t offset, uint64_t mem_mask, uint64_t *shift);