From d4a570081f61430f6d9bed86a1b2bc18b5ec5153 Mon Sep 17 00:00:00 2001 From: mamehaze <140764005+mamehaze@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:38:10 +0100 Subject: tvgames/xavix_2000.cpp: Add preliminary support for Duel Masters: Duel Station (#12639) * new NOT WORKING machines --------------------------------------- Duel Masters: Duel Station (Japan) [David Haywood, Team Europe] --------- Co-authored-by: DavidHaywood --- src/mame/mame.lst | 1 + src/mame/tvgames/xavix.h | 11 +++++++++++ src/mame/tvgames/xavix_2000.cpp | 28 ++++++++++++++++++++++++++++ src/mame/tvgames/xavix_m.cpp | 29 +++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index ec11de34f56..45a517bf158 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -45643,6 +45643,7 @@ domfitad // dombikec // @source:tvgames/xavix_2000.cpp +duelmast // epo_ebox // epo_bowl // epo_sdb // diff --git a/src/mame/tvgames/xavix.h b/src/mame/tvgames/xavix.h index 6a74dfd98a0..07251d34942 100644 --- a/src/mame/tvgames/xavix.h +++ b/src/mame/tvgames/xavix.h @@ -1000,5 +1000,16 @@ protected: }; +class xavix_duelmast_state : public xavix_i2c_state +{ +public: + xavix_duelmast_state(const machine_config &mconfig, device_type type, const char *tag) + : xavix_i2c_state(mconfig, type, tag) + { } + +protected: + virtual uint8_t read_io1(uint8_t direction) override; +}; + #endif // MAME_TVGAMES_XAVIX_H diff --git a/src/mame/tvgames/xavix_2000.cpp b/src/mame/tvgames/xavix_2000.cpp index a38861e630b..2ac9a48f79e 100644 --- a/src/mame/tvgames/xavix_2000.cpp +++ b/src/mame/tvgames/xavix_2000.cpp @@ -140,6 +140,23 @@ static INPUT_PORTS_START( epo_bowl ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda) INPUT_PORTS_END +static INPUT_PORTS_START( duelmast ) + PORT_INCLUDE(xavix) + + PORT_MODIFY("IN0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) + + PORT_MODIFY("IN1") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda) +INPUT_PORTS_END + + static INPUT_PORTS_START( epo_sdb ) PORT_INCLUDE(xavix) @@ -274,11 +291,22 @@ ROM_START( ban_onep ) ROM_LOAD("onepiece.bin", 0x000000, 0x800000, CRC(c5cb5a5f) SHA1(db85f6cc48d77c5a4967b9b8e2999167e3dfc8c8) ) ROM_END +ROM_START( duelmast ) + ROM_REGION(0x200000, "bios", ROMREGION_ERASE00) + ROM_LOAD("duelmasters.u4", 0x000000, 0x200000, CRC(2f11fcd7) SHA1(d8849c74833e77b8b309e845523f2cdc7ac68054) ) +ROM_END + + // doesn't use extra opcodes? CONS( 2002, epo_ebox, 0, 0, xavix2000_nv, epo_ebox, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Excite Boxing (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // doesn't use XaviX2000 extra opcodes, but had that type of CPU // die not confirmed, but uses extra opcodes. (hangs on title screen due to combination of freq_timer_done nested interrupts tripping, and waiting on bits in input ports to change CONS( 2002, epo_bowl, 0, 0, xavix2000_i2c_24c04, epo_bowl, xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Excite Bowling (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +// takes a long time to boot to a card scanner error +// This is a product in the Duel Masters line called Duel Station; the boot up screen calls it Duel Station, title logo is Duel Masters +// It also has a cartridge slot in addition to the card scanner and at least 1 ROM cartridge was produced "デュエルマスターズ デュエルステーション専用カートリッジ Ver.1" +CONS( 2003, duelmast, 0, 0, xavix2000_i2c_24c04, duelmast, xavix_duelmast_state, init_xavix, "Takara / SSD Company LTD", "Duel Masters: Duel Station (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) + CONS( 2004, epo_sdb, 0, 0, xavix2000_nv_sdb, epo_sdb, xavix_2000_nv_sdb_state, init_xavix, "Epoch / SSD Company LTD", "Super Dash Ball (Japan)", MACHINE_IMPERFECT_SOUND ) CONS( 2005, ttv_sw, 0, 0, xavix2000_i2c_24c02, ttv_lotr, xavix_i2c_lotr_state, init_xavix, "Tiger / SSD Company LTD", "Star Wars Saga Edition - Lightsaber Battle Game", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/tvgames/xavix_m.cpp b/src/mame/tvgames/xavix_m.cpp index 6d9ed194ad9..5e68dbf9b1f 100644 --- a/src/mame/tvgames/xavix_m.cpp +++ b/src/mame/tvgames/xavix_m.cpp @@ -453,6 +453,35 @@ uint8_t xavix_state::read_io1(uint8_t direction) return m_in1->read(); } +uint8_t xavix_duelmast_state::read_io1(uint8_t direction) +{ + int pc = m_maincpu->pc(); + + // hacks to get it to boot. It will still spin for a long time on a black + // screen before giving a card scanner error, you can bypass that with button 1 + // but the game isn't playable + + if (pc == 0x3c01) + return 0x00; + + if (pc == 0x3c06) + return 0x02; + + if (pc == 0x3c14) + return 0x04; + + if (pc == 0x3c19) + return 0x00; + + if (pc == 0x3c25) + return 0x04; + + if (pc == 0x3c2a) + return 0x00; + + return m_in1->read(); +} + void xavix_state::write_io0(uint8_t data, uint8_t direction) { // no special handling -- cgit v1.2.3