From df2b117eb62724f187e6ee22978364f2ddec7e22 Mon Sep 17 00:00:00 2001 From: ClawGrip Date: Sat, 22 Mar 2025 16:13:45 +0100 Subject: [PATCH] Create skeleton device for Sega Megalo 50 DASS and hook it on supported Sega C2 games [jordigahan, Recreativas.org] (#12401) --- src/mame/sega/m50dass.cpp | 52 +++++++++++++++++++++++++++++++++++++++ src/mame/sega/m50dass.h | 30 ++++++++++++++++++++++ src/mame/sega/segac2.cpp | 43 ++++++++++++++++++++------------ 3 files changed, 109 insertions(+), 16 deletions(-) create mode 100644 src/mame/sega/m50dass.cpp create mode 100644 src/mame/sega/m50dass.h diff --git a/src/mame/sega/m50dass.cpp b/src/mame/sega/m50dass.cpp new file mode 100644 index 00000000000..5ed59972527 --- /dev/null +++ b/src/mame/sega/m50dass.cpp @@ -0,0 +1,52 @@ +// license:BSD-3-Clause +// copyright-holders: + +/******************************************************************************************* + + Skeleton device for Sega DASS (Dual Active Seat System), found on the Megalo 50 cabinet. + Sega PCB 837-8683: + -Z0840004PSC Z80 CPU + -YM-2413 + -Two Sega 315-5296 I/O chips + -3 banks of eight dip switches + There is at least an undumped "A" revision. + +*******************************************************************************************/ + +#include "emu.h" +#include "m50dass.h" +#include "speaker.h" + +DEFINE_DEVICE_TYPE(MEGALO50_DASS, m50dass_device, "m50dass", "Sega DASS") + +m50dass_device::m50dass_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, MEGALO50_DASS, tag, owner, clock) + , m_maincpu(*this, "maincpu") + , m_ym2413(*this, "ym2413") +{ +} + +void m50dass_device::device_start() +{ +} + +void m50dass_device::device_add_mconfig(machine_config &config) +{ + Z80(config, m_maincpu, 8_MHz_XTAL / 2); // Z0840004PSC, divider not verified + + SPEAKER(config, "mono").front_center(); + YM2413(config, m_ym2413, 8_MHz_XTAL / 2).add_route(ALL_OUTPUTS, "mono", 0.8); // divider and configuration unknown +} + +ROM_START(m50dass) + ROM_REGION(0x20000, "maincpu", 0) + ROM_LOAD("epr-14705.ic18", 0x00000, 0x20000, CRC(b863d2c5) SHA1(f6aa309bc8be15c26d91f3cf048ea140a9ca12eb)) // Strings "MEGALO50 910322", "** SHUNICHI **" on ROM + + ROM_REGION(0x117, "pld", 0) + ROM_LOAD("315-5592_gal16v8a.ic19", 0x000, 0x117, NO_DUMP) +ROM_END + +const tiny_rom_entry *m50dass_device::device_rom_region() const +{ + return ROM_NAME(m50dass); +} diff --git a/src/mame/sega/m50dass.h b/src/mame/sega/m50dass.h new file mode 100644 index 00000000000..b590c8b3a96 --- /dev/null +++ b/src/mame/sega/m50dass.h @@ -0,0 +1,30 @@ +// license:BSD-3-Clause +// copyright-holders: + +#ifndef MAME_SEGA_M50DASS_H +#define MAME_SEGA_M50DASS_H + +#pragma once + +#include "cpu/z80/z80.h" +#include "sound/ymopl.h" + +class m50dass_device : public device_t +{ +public: + m50dass_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + void m50dass(machine_config &config) ATTR_COLD; + +protected: + virtual void device_start() override ATTR_COLD; + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD; + +private: + required_device m_maincpu; + required_device m_ym2413; +}; + +DECLARE_DEVICE_TYPE(MEGALO50_DASS, m50dass_device) + +#endif // MAME_SEGA_M50DASS_H diff --git a/src/mame/sega/segac2.cpp b/src/mame/sega/segac2.cpp index 6fcd631f987..6e528b7e336 100644 --- a/src/mame/sega/segac2.cpp +++ b/src/mame/sega/segac2.cpp @@ -156,11 +156,13 @@ ***********************************************************************************************/ #include "emu.h" + +#include "315_5296.h" +#include "m50dass.h" #include "segaipt.h" #include "cpu/m68000/m68000.h" #include "machine/nvram.h" -#include "315_5296.h" #include "sound/sn76496.h" #include "sound/upd7759.h" #include "sound/ymopn.h" @@ -209,6 +211,7 @@ public: void tfrceacjpb(machine_config &config); void ribbit(machine_config &config); + void c2m50dass(machine_config &config); void init_noprot(); void init_columns(); @@ -1922,13 +1925,13 @@ void segac2_state::segac2(machine_config &config) UPD7759(config, m_upd7759, XL1_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.50); } -void segac2_state::tfrceacjpb(machine_config& config) +void segac2_state::tfrceacjpb(machine_config &config) { segac2(config); m_io->set_ddr_override(0xf); // game erroneously writes 0x58 to DDR } -void segac2_state::ribbit(machine_config& config) +void segac2_state::ribbit(machine_config &config) { segac2(config); @@ -1937,7 +1940,15 @@ void segac2_state::ribbit(machine_config& config) m_upd7759->set_start_delay(250); } -void pclub_state::pclub(machine_config& config) +// Games supporting Megalo 50 moving seats (DASS) +void segac2_state::c2m50dass(machine_config &config) +{ + segac2(config); + + MEGALO50_DASS(config, "m50dass"); +} + +void pclub_state::pclub(machine_config &config) { segac2(config); // Print Club boards use a different crystal, possibly for better compatibility with the camera timings. @@ -3031,7 +3042,7 @@ GAME( 1990, column2j, columns2, segac, columns2, segac2_state, init_co /* System C-2 Games */ GAME( 1990, tfrceac, 0, segac2, tfrceac, segac2_state, init_tfrceac, ROT0, "Technosoft / Sega", "Thunder Force AC", 0 ) GAME( 1990, tfrceacj, tfrceac, segac2, tfrceac, segac2_state, init_tfrceac, ROT0, "Technosoft / Sega", "Thunder Force AC (Japan)", 0 ) -GAME( 1990, tfrceacb, tfrceac, segac2, tfrceac, segac2_state, init_tfrceacb, ROT0, "bootleg", "Thunder Force AC (bootleg)", 0 ) +GAME( 1990, tfrceacb, tfrceac, segac2, tfrceac, segac2_state, init_tfrceacb, ROT0, "bootleg", "Thunder Force AC (bootleg)", 0 ) GAME( 1990, tfrceacjpb, tfrceac, tfrceacjpb, tfrceac, segac2_state, init_tfrceac, ROT0, "Technosoft / Sega", "Thunder Force AC (Japan, prototype, bootleg)", 0 ) GAME( 1990, borench, 0, segac2, borench, segac2_state, init_borench, ROT0, "Sega", "Borench (set 1)", 0 ) @@ -3041,7 +3052,7 @@ GAME( 1990, borenchj, borench, segac2, borench, segac2_state, init_bo GAME( 1991, ribbit, 0, ribbit, ribbit, segac2_state, init_ribbit, ROT0, "Sega", "Ribbit!", 0 ) GAME( 1991, ribbitj, ribbit, ribbit, ribbitj, segac2_state, init_ribbit, ROT0, "Sega", "Ribbit! (Japan)", 0 ) -GAME( 1991, twinsqua, 0, segac2, twinsqua, segac2_state, init_twinsqua, ROT0, "Sega", "Twin Squash", 0 ) +GAME( 1991, twinsqua, 0, c2m50dass, twinsqua, segac2_state, init_twinsqua, ROT0, "Sega", "Twin Squash", 0 ) GAME( 1991, soniccar, 0, segac2, soniccar, segac2_state, init_noprot, ROT0, "Sega", "Waku Waku Sonic Patrol Car", 0 ) @@ -3049,13 +3060,13 @@ GAME( 1992, ssonicbr, 0, segac2, ssonicbr, segac2_state, init_no GAME( 1992, ooparts, 0, segac2, ooparts, segac2_state, init_noprot, ROT270, "hack", "OOPArts (prototype, joystick hack)", 0 ) -GAME( 1992, puyo, 0, segac2, puyo, segac2_state, init_puyo, ROT0, "Compile / Sega", "Puyo Puyo (World)", 0 ) -GAME( 1992, puyobl, puyo, segac2, puyo, segac2_state, init_puyo, ROT0, "bootleg", "Puyo Puyo (World, bootleg)", 0 ) -GAME( 1992, puyoj, puyo, segac2, puyo, segac2_state, init_puyo, ROT0, "Compile / Sega", "Puyo Puyo (Japan, Rev B)", 0 ) -GAME( 1992, puyoja, puyo, segac2, puyo, segac2_state, init_puyo, ROT0, "Compile / Sega", "Puyo Puyo (Japan, Rev A)", 0 ) +GAME( 1992, puyo, 0, c2m50dass, puyo, segac2_state, init_puyo, ROT0, "Compile / Sega", "Puyo Puyo (World)", 0 ) +GAME( 1992, puyobl, puyo, c2m50dass, puyo, segac2_state, init_puyo, ROT0, "bootleg", "Puyo Puyo (World, bootleg)", 0 ) +GAME( 1992, puyoj, puyo, c2m50dass, puyo, segac2_state, init_puyo, ROT0, "Compile / Sega", "Puyo Puyo (Japan, Rev B)", 0 ) +GAME( 1992, puyoja, puyo, c2m50dass, puyo, segac2_state, init_puyo, ROT0, "Compile / Sega", "Puyo Puyo (Japan, Rev A)", 0 ) -GAME( 1992, tantr, 0, segac2, ichir, segac2_state, init_tantr, ROT0, "Sega", "Puzzle & Action: Tant-R (Japan)", 0 ) -GAME( 1993, tantrkor, tantr, segac2, ichir, segac2_state, init_tantrkor, ROT0, "Sega", "Puzzle & Action: Tant-R (Korea)", 0 ) +GAME( 1992, tantr, 0, segac2, ichir, segac2_state, init_tantr, ROT0, "Sega", "Puzzle & Action: Tant-R (Japan)", 0 ) +GAME( 1993, tantrkor, tantr, segac2, ichir, segac2_state, init_tantrkor, ROT0, "Sega", "Puzzle & Action: Tant-R (Korea)", 0 ) GAME( 1992, tantrbl, tantr, segac2, ichir, segac2_state, init_noprot, ROT0, "bootleg", "Puzzle & Action: Tant-R (Japan) (bootleg set 1)", 0 ) GAME( 1992, tantrbl4, tantr, segac2, ichir, segac2_state, init_noprot, ROT0, "bootleg", "Puzzle & Action: Tant-R (Japan) (bootleg set 4)", 0 ) GAME( 1994, tantrbl2, tantr, segac, ichir, segac2_state, init_tantr, ROT0, "bootleg", "Puzzle & Action: Tant-R (Japan) (bootleg set 2)", 0 ) // Common bootleg in Europe, C board, no samples @@ -3073,15 +3084,15 @@ GAME( 1993, sonicpop, 0, segac2, sonicpop, segac2_state, init_no GAME( 1993, sonicfgt, 0, segac2, sonicfgt, segac2_state, init_noprot, ROT0, "Sega", "SegaSonic Cosmo Fighter (World)", 0 ) GAME( 1993, sonicfgtj, sonicfgt, segac2, sonicfgt, segac2_state, init_noprot, ROT0, "Sega", "SegaSonic Cosmo Fighter (Japan)", 0 ) -GAME( 1994, potopoto, 0, segac2, potopoto, segac2_state, init_potopoto, ROT0, "Sega", "Poto Poto (Japan, Rev A)", 0 ) +GAME( 1994, potopoto, 0, c2m50dass, potopoto, segac2_state, init_potopoto, ROT0, "Sega", "Poto Poto (Japan, Rev A)", 0 ) GAME( 1994, stkclmns, 0, segac2, stkclmns, segac2_state, init_stkclmns, ROT0, "Sega", "Stack Columns (World)", 0 ) GAME( 1994, stkclmnsj, stkclmns, segac2, stkclmns, segac2_state, init_stkclmnj, ROT0, "Sega", "Stack Columns (Japan)", 0 ) -GAME( 1994, ichir, 0, segac2, ichir, segac2_state, init_ichir, ROT0, "Sega", "Puzzle & Action: Ichidant-R (World)", 0 ) +GAME( 1994, ichir, 0, segac2, ichir, segac2_state, init_ichir, ROT0, "Sega", "Puzzle & Action: Ichidant-R (World)", 0 ) GAME( 1994, ichirbl, ichir, segac2, ichir, segac2_state, init_noprot, ROT0, "bootleg", "Puzzle & Action: Ichidant-R (World) (bootleg)", 0 ) -GAME( 1994, ichirk, ichir, segac2, ichir, segac2_state, init_ichirk, ROT0, "Sega", "Puzzle & Action: Ichidant-R (Korea)", 0 ) -GAME( 1994, ichirj, ichir, segac2, ichir, segac2_state, init_ichirj, ROT0, "Sega", "Puzzle & Action: Ichidant-R (Japan)", 0 ) +GAME( 1994, ichirk, ichir, segac2, ichir, segac2_state, init_ichirk, ROT0, "Sega", "Puzzle & Action: Ichidant-R (Korea)", 0 ) +GAME( 1994, ichirj, ichir, segac2, ichir, segac2_state, init_ichirj, ROT0, "Sega", "Puzzle & Action: Ichidant-R (Japan)", 0 ) GAME( 1994, ichirjbl, ichir, segac, ichir, segac2_state, init_ichirjbl, ROT0, "bootleg", "Puzzle & Action: Ichidant-R (Japan) (bootleg)", 0 ) // C board, no samples GAME( 1994, puyopuy2, 0, segac2, puyopuy2, segac2_state, init_puyopuy2, ROT0, "Compile (Sega license)", "Puyo Puyo 2 (Japan)", 0 )