From 5f8eb3197acc6a81aa0de71e1ab13b453f06f625 Mon Sep 17 00:00:00 2001 From: mamehaze <140764005+mamehaze@users.noreply.github.com> Date: Fri, 22 Mar 2024 04:21:35 +0000 Subject: [PATCH] tvgames/xavix.cpp: Hooked up controls for tomplc and tcarnavi, and promoted them to working. (#12163) * Also increased tomplc CPU clock frequency to 43MHz (avoids crashes). * Corrected years for a couple of games. Systems promoted to working ----------------------------- Tomy / SSD Company LTD Tomica Carnavi Drive (Japan) [David Haywood] Tomy / SSD Company LTD Nihon Isshuu - Boku wa Plarail Untenshi (Japan) [David Haywood] --- src/mame/tvgames/xavix.cpp | 69 ++++++++++++++++++++++++++++----- src/mame/tvgames/xavix.h | 1 + src/mame/tvgames/xavix_2000.cpp | 4 +- src/mame/tvgames/xavix_2002.cpp | 2 +- 4 files changed, 64 insertions(+), 12 deletions(-) diff --git a/src/mame/tvgames/xavix.cpp b/src/mame/tvgames/xavix.cpp index 5dc41b87927..b5943016969 100644 --- a/src/mame/tvgames/xavix.cpp +++ b/src/mame/tvgames/xavix.cpp @@ -545,8 +545,6 @@ INPUT_PORTS_END - - static INPUT_PORTS_START( tomcpin ) PORT_INCLUDE(xavix_i2c) @@ -564,6 +562,28 @@ static INPUT_PORTS_START( tomcpin ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off. INPUT_PORTS_END + +static INPUT_PORTS_START( tomplc ) + PORT_INCLUDE(xavix_i2c) + + PORT_MODIFY("IN0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Doors / Right") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Wipers / Back") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Headlights / Left") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Horn / Select") + + // this is the up/down handle on the left (pull towards player to increase power) + PORT_BIT( 0x30, 0x00, IPT_POSITIONAL_V ) PORT_POSITIONS(3) PORT_SENSITIVITY(10) PORT_KEYDELTA(1) PORT_CENTERDELTA(0) PORT_FULL_TURN_COUNT(3) PORT_NAME("Power") + + PORT_MODIFY("IN1") + // this is the rotary lever (move anti-clockwise to the right to apply brakes) + PORT_BIT( 0x03, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(3) PORT_SENSITIVITY(10) PORT_KEYDELTA(1) PORT_CENTERDELTA(0) PORT_FULL_TURN_COUNT(3) PORT_NAME("Brake") + + // are you expected to say something when this is held? game makes a crackle and doesn't act like you said anything + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Speak") +INPUT_PORTS_END + + static INPUT_PORTS_START( ltv_tam ) PORT_INCLUDE(xavix_i2c) @@ -1306,7 +1326,28 @@ static INPUT_PORTS_START( jarajal ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) +INPUT_PORTS_END + +static INPUT_PORTS_START( tcarnavi ) + PORT_INCLUDE(xavix) + + PORT_MODIFY("IN0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Accelerate") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Brake") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Siren / Transform?") // turns you into a police car? + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Reverse") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Key") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Dashboard Power?") PORT_TOGGLE + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_NAME("Steer Left") // steering is digital? + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("Steer Right") + + PORT_MODIFY("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("Lights") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Horn") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Wipers") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("Menu") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off. INPUT_PORTS_END @@ -1430,6 +1471,17 @@ void xavix_i2c_state::xavix_i2c_24c02(machine_config &config) I2C_24C02(config, "i2cmem", 0); } +void xavix_i2c_state::xavix_i2c_24c02_43mhz(machine_config &config) +{ + xavix_i2c_24c02(config); + + // tomplc crashes when you start the game at regular clock speeds + // this could indicate that it's actually one of the newer chips + // even if extra opcodes are not being used. + m_maincpu->set_clock(MAIN_CLOCK * 2); +} + + void xavix_i2c_state::xavix_i2c_24lc04(machine_config &config) { xavix(config); @@ -2097,31 +2149,30 @@ CONS( 2000, epo_eppk, epo_epp, 0, xavix, epo_epp, xavix_state, // Excite Ping Pong 2 is from 2003 -CONS( 2006, epo_epp3, 0, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Challenge Ai-chan! Excite Ping Pong (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2006, epo_epp3, 0, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Challenge Ai-chan! Excite Ping Pong (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -CONS( 200?, epo_efdx, 0, 0, xavix_i2c_24c08, epo_efdx, xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Excite Fishing DX (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2003, epo_efdx, 0, 0, xavix_i2c_24c08, epo_efdx, xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Excite Fishing DX (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -CONS( 2005, epo_guru, 0, 0, xavix_guru, epo_guru, xavix_guru_state, init_xavix, "Epoch / SSD Company LTD", "Gururin World (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +CONS( 2005, epo_guru, 0, 0, xavix_guru, epo_guru, xavix_guru_state, init_xavix, "Epoch / SSD Company LTD", "Gururin World (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) CONS( 2002, epo_dmon, 0, 0, xavix_i2c_24c02, xavix_i2c,xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Doraemon Wakuwaku Kuukihou (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // full / proper title? -CONS( 200?, has_wamg, 0, 0, xavix, has_wamg, xavix_state, init_xavix, "Hasbro / Milton Bradley / SSD Company LTD", "TV Wild Adventure Mini Golf (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2005, has_wamg, 0, 0, xavix, has_wamg, xavix_state, init_xavix, "Hasbro / Milton Bradley / SSD Company LTD", "TV Wild Adventure Mini Golf (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2002, tak_geig, 0, 0, xavix_nv, tak_geig, xavix_state, init_xavix, "Takara / SSD Company LTD", "Geigeki Go Go Shooting (Japan)", MACHINE_IMPERFECT_SOUND ) // was also distributed by Atlus as an arcade cabinet in 2005, ROM almost certainly different (this one will auto-power off after inactivity, an arcade wouldn't do that) CONS( 2003, jarajal, 0, 0, xavix_nv, jarajal, xavix_state, init_xavix, "Takara / SSD Company LTD", "Jara-Ja Land (Japan, home version)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -CONS( 2003, tcarnavi, 0, 0, xavix_nv, jarajal, xavix_state, init_xavix, "Tomy / SSD Company LTD", "Tomica Carnavi Drive (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2003, tcarnavi, 0, 0, xavix_nv, tcarnavi, xavix_state, init_xavix, "Tomy / SSD Company LTD", "Tomica Carnavi Drive (Japan)", MACHINE_IMPERFECT_SOUND ) CONS( 2003, tomcpin, 0, 0, xavix_i2c_24c08, tomcpin, xavix_i2c_state, init_xavix, "Tomy / SSD Company LTD", "Champiyon Pinball (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) -CONS( 2004, tomplc, 0, 0, xavix_i2c_24c02, tomcpin, xavix_i2c_state, init_xavix, "Tomy / SSD Company LTD", "Nihon Isshuu - Boku wa Plarail Untenshi (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +CONS( 2004, tomplc, 0, 0, xavix_i2c_24c02_43mhz,tomplc,xavix_i2c_state, init_xavix, "Tomy / SSD Company LTD", "Nihon Isshuu - Boku wa Plarail Untenshi (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) CONS( 2001, gungunad, 0, 0, xavix_nv, xavix, xavix_state, init_xavix, "Takara / SSD Company LTD", "Gun Gun Adventure (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) /* Music titles: Emulation note: - SEEPROM write appears to work (save NVRAM file looks valid) but game fails to read it back properly, fails backup data checksum, and blanks it again. Timers might not be 100%, PAL stuff uses different ways to do timing. */ CONS( 2000, ekara, 0, 0, xavix_cart_ekara, ekara, xavix_ekara_state, init_xavix, "Takara / SSD Company LTD / Hasbro", "e-kara (US?, NTSC, set 1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND /*| MACHINE_IS_BIOS_ROOT*/ ) // shows "Please insert a cartridge before turn it on" without cart diff --git a/src/mame/tvgames/xavix.h b/src/mame/tvgames/xavix.h index 10a1539d14d..40d3894283d 100644 --- a/src/mame/tvgames/xavix.h +++ b/src/mame/tvgames/xavix.h @@ -615,6 +615,7 @@ public: void xavix_i2c_24lc04(machine_config &config); void xavix_i2c_24c02(machine_config &config); + void xavix_i2c_24c02_43mhz(machine_config &config); void xavix_i2c_24c08(machine_config &config); void xavix2000_i2c_24c08(machine_config &config); diff --git a/src/mame/tvgames/xavix_2000.cpp b/src/mame/tvgames/xavix_2000.cpp index 8938811eb01..a38861e630b 100644 --- a/src/mame/tvgames/xavix_2000.cpp +++ b/src/mame/tvgames/xavix_2000.cpp @@ -286,5 +286,5 @@ CONS( 2005, ttv_lotr, 0, 0, xavix2000_i2c_24c02, ttv_lotr, xavix_i2c_lotr_sta CONS( 2005, ttv_mx, 0, 0, xavix2000_i2c_24c04, ttv_mx, xavix_i2c_state, init_xavix, "Tiger / SSD Company LTD", "MX Dirt Rebel", MACHINE_IMPERFECT_SOUND ) CONS( 2003, drgqst, 0, 0, xavix2000_i2c_24c08, ttv_lotr, xavix_i2c_lotr_state, init_xavix, "Square Enix / SSD Company LTD", "Kenshin Dragon Quest: Yomigaerishi Densetsu no Ken", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -// hangs after starting a game, or after quite a long time in attract mode (first problem could be bad save data read with the eeprom code, 2nd problem might just be how it is, ends up in a dead loop, not executing invalid code, idle timeout / battery saver) -CONS( 2004, ban_onep, 0, 0, xavix2000_i2c_24c04, ttv_lotr, xavix_i2c_lotr_state, init_xavix, "Bandai / SSD Company LTD", "One Piece Punch Battle (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +// hangs after starting a game, check why +CONS( 2004, ban_onep, 0, 0, xavix2000_i2c_24c04, ttv_lotr, xavix_i2c_lotr_state, init_xavix, "Bandai / SSD Company LTD", "Let's! TV Play One Piece Punch Battle (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/tvgames/xavix_2002.cpp b/src/mame/tvgames/xavix_2002.cpp index c227e9b6ce6..5d6a235390e 100644 --- a/src/mame/tvgames/xavix_2002.cpp +++ b/src/mame/tvgames/xavix_2002.cpp @@ -591,7 +591,7 @@ CONS( 2007, domstepc, 0, 0, xavix2002_i2c_jmat, xavixp, xavix_i2c_jmat_state, in // some DIS games run on XaviX 2 instead, see xavix2.cpp for Domyos Fitness Adventure and Domyos Bike Concept -CONS( 2005, mrangbat, 0, 0, xavix2002_i2c_mrangbat, mrangbat, xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD", "Mahou Taiketsu Magiranger - Magimat de Dance & Battle (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +CONS( 2005, mrangbat, 0, 0, xavix2002_i2c_mrangbat, mrangbat, xavix_i2c_state, init_xavix, "Bandai / SSD Company LTD", "Let's! TV Play Mahou Taiketsu Magiranger - Magimat de Dance & Battle (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) CONS( 2004, epo_tfit, 0, 0, xavix2002_i2c_24c04, epo_tfit, xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Excite Sports Tennis x Fitness (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // Epoch Tennis and Fitness has 24LC04