From 49dc2f37ecde7fc2d2cfabc211275fa8b223c454 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Mon, 14 Jul 2025 23:02:28 +0100 Subject: [PATCH 1/4] added Gaelco DS5002FP programmer ROMs --- hash/gaelco_ds5002fp_rom.xml | 97 +++++++++++++++++++++ src/mame/gaelco/ds5002fp_programmer.cpp | 110 ++++++++++++++++++++++++ src/mame/mame.lst | 3 + 3 files changed, 210 insertions(+) create mode 100644 hash/gaelco_ds5002fp_rom.xml create mode 100644 src/mame/gaelco/ds5002fp_programmer.cpp diff --git a/hash/gaelco_ds5002fp_rom.xml b/hash/gaelco_ds5002fp_rom.xml new file mode 100644 index 0000000000000..1db3391f4032a --- /dev/null +++ b/hash/gaelco_ds5002fp_rom.xml @@ -0,0 +1,97 @@ + + + + + + + + Alligator Hunt + 1994 + Gaelco + + + + + + + + + Maniac Square + 1996 + Gaelco + + + + + + + + + Target Hits + 1994 + Gaelco + + + + + + + + + Glass + 1993 + Gaelco + + + + + + + + + TH Strikes Back + 1994 + Gaelco + + + + + + + + + Touch and Go + 1995 + Gaelco + + + + + + + + + World Rally 2 + 1995 + Gaelco + + + + + + + + + World Rally 2 (older) + 1995 + Gaelco + + + + + + + + diff --git a/src/mame/gaelco/ds5002fp_programmer.cpp b/src/mame/gaelco/ds5002fp_programmer.cpp new file mode 100644 index 0000000000000..87225563d5356 --- /dev/null +++ b/src/mame/gaelco/ds5002fp_programmer.cpp @@ -0,0 +1,110 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood +/****************************************************************************** + +Small device for programming / reprogramming the DS5002 internal SRAM +used by Gaelco (was it designed by Gaelco, or is this a standard device provided +with the DS5002?) + +has a 68000 at 16Mhz and various other parts (TODO: list them) + +*******************************************************************************/ + +#include "emu.h" + +#include "cpu/m68000/m68000.h" + +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" + +#include "softlist_dev.h" + +namespace { + +class ds5002fp_programmer_state : public driver_device +{ +public: + ds5002fp_programmer_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_cart(*this, "cartslot") + , m_cart_region(nullptr) + { } + + void ds5002fp_programmer(machine_config &config); + +private: + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); + + void prg_map(address_map &map); + + u16 cart_r(offs_t offset); + + required_device m_maincpu; + required_device m_cart; + memory_region *m_cart_region; +}; + +void ds5002fp_programmer_state::machine_start() +{ + // if there's a cart, override the standard mapping + if (m_cart && m_cart->exists()) + { + std::string region_tag; + m_cart_region = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); + } +} + +void ds5002fp_programmer_state::machine_reset() +{ +} + +void ds5002fp_programmer_state::prg_map(address_map &map) +{ + map(0x000000, 0x01ffff).r(FUNC(ds5002fp_programmer_state::cart_r)); +} + + +DEVICE_IMAGE_LOAD_MEMBER(ds5002fp_programmer_state::cart_load) +{ + uint32_t const size = m_cart->common_get_size("rom"); + + m_cart->rom_alloc(size, GENERIC_ROM16_WIDTH, ENDIANNESS_BIG); + m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); + + return std::make_pair(std::error_condition(), std::string()); +} + +u16 ds5002fp_programmer_state::cart_r(offs_t offset) +{ + return m_cart->read_rom(offset * 2) | (m_cart->read_rom((offset * 2) + 1) << 8); +} + +static INPUT_PORTS_START( ds5002fp_programmer ) +INPUT_PORTS_END + +void ds5002fp_programmer_state::ds5002fp_programmer(machine_config &config) +{ + M68000(config, m_maincpu, XTAL(32'000'000) / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &ds5002fp_programmer_state::prg_map); + + GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "gaelcods_rom"); + m_cart->set_width(GENERIC_ROM16_WIDTH); + m_cart->set_device_load(FUNC(ds5002fp_programmer_state::cart_load)); + + SOFTWARE_LIST(config, "cart_list").set_original("gaelco_ds5002fp_rom"); +} + +ROM_START( gaelcods ) + ROM_REGION( 0x200000, "pals", 0 ) + ROM_LOAD( "wr-2_pal16r6a-2.bin", 0x000, 0x104, CRC(4f027013) SHA1(8261665259a52f05e2682f2841fe788ec0b9e4ae) ) +ROM_END + +} // anonymous namespace + +CONS( 1992, gaelcods, 0, 0, ds5002fp_programmer, ds5002fp_programmer, ds5002fp_programmer_state, empty_init, "Gaelco", "Gaelco DS5002FP Programmer", MACHINE_NO_SOUND_HW | MACHINE_NOT_WORKING ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 84469da4e8263..8763f87290ca9 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -18666,6 +18666,9 @@ blmbycar blmbycaru watrball +@source:gaelco/ds5002_programmer.cpp +gaelcods + @source:gaelco/gaelco.cpp bigkarnk bigkarnka From 26f074a322ff20ae59256248feb7070362fb21d7 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Mon, 14 Jul 2025 23:07:37 +0100 Subject: [PATCH 2/4] minor update --- hash/gaelco_ds5002fp_rom.xml | 29 +++++++++++++++++-------- src/mame/gaelco/ds5002fp_programmer.cpp | 1 + 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/hash/gaelco_ds5002fp_rom.xml b/hash/gaelco_ds5002fp_rom.xml index 1db3391f4032a..ba4075b77dd19 100644 --- a/hash/gaelco_ds5002fp_rom.xml +++ b/hash/gaelco_ds5002fp_rom.xml @@ -6,7 +6,7 @@ license:CC0-1.0 - + Alligator Hunt 1994 Gaelco @@ -17,7 +17,7 @@ license:CC0-1.0 - + Maniac Square 1996 Gaelco @@ -28,7 +28,7 @@ license:CC0-1.0 - + Target Hits 1994 Gaelco @@ -39,7 +39,7 @@ license:CC0-1.0 - + Glass 1993 Gaelco @@ -50,7 +50,7 @@ license:CC0-1.0 - + TH Strikes Back 1994 Gaelco @@ -61,7 +61,7 @@ license:CC0-1.0 - + Touch and Go 1995 Gaelco @@ -72,7 +72,7 @@ license:CC0-1.0 - + World Rally 2 1995 Gaelco @@ -83,7 +83,7 @@ license:CC0-1.0 - + World Rally 2 (older) 1995 Gaelco @@ -93,5 +93,16 @@ license:CC0-1.0 - + + + Goldart + 1994 + Gaelco + + + + + + + diff --git a/src/mame/gaelco/ds5002fp_programmer.cpp b/src/mame/gaelco/ds5002fp_programmer.cpp index 87225563d5356..34a4bd88cc7af 100644 --- a/src/mame/gaelco/ds5002fp_programmer.cpp +++ b/src/mame/gaelco/ds5002fp_programmer.cpp @@ -96,6 +96,7 @@ void ds5002fp_programmer_state::ds5002fp_programmer(machine_config &config) GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "gaelcods_rom"); m_cart->set_width(GENERIC_ROM16_WIDTH); m_cart->set_device_load(FUNC(ds5002fp_programmer_state::cart_load)); + m_cart->set_must_be_loaded(true); SOFTWARE_LIST(config, "cart_list").set_original("gaelco_ds5002fp_rom"); } From 09edfeb5a95ee11947476864c804fdca09eaa615 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Tue, 15 Jul 2025 01:52:17 +0100 Subject: [PATCH 3/4] fix mame.lst entry --- src/mame/mame.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 8763f87290ca9..9ab07e9728227 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -18666,7 +18666,7 @@ blmbycar blmbycaru watrball -@source:gaelco/ds5002_programmer.cpp +@source:gaelco/ds5002fp_programmer.cpp gaelcods @source:gaelco/gaelco.cpp From fe827696cb29c7a47ca424af33526fe0388e1f4f Mon Sep 17 00:00:00 2001 From: David Haywood Date: Thu, 17 Jul 2025 22:43:51 +0100 Subject: [PATCH 4/4] add PCB details [ClawGrip] --- src/mame/gaelco/ds5002fp_programmer.cpp | 31 ++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/mame/gaelco/ds5002fp_programmer.cpp b/src/mame/gaelco/ds5002fp_programmer.cpp index 34a4bd88cc7af..3161bcaa2f592 100644 --- a/src/mame/gaelco/ds5002fp_programmer.cpp +++ b/src/mame/gaelco/ds5002fp_programmer.cpp @@ -6,7 +6,36 @@ Small device for programming / reprogramming the DS5002 internal SRAM used by Gaelco (was it designed by Gaelco, or is this a standard device provided with the DS5002?) -has a 68000 at 16Mhz and various other parts (TODO: list them) +Two different PCB versions. + +One labeled "WR-1". This one had the PAL protected (no dump): + _____________________________________ _____________________________________ + __| Green LED->(_)(_)(_)<-Yellow LED | | |__ + | Red LED | | ___________________________ | + | ___ Xtal ºººººººººººººººººººº | | | | | + || | 12 MHz | | | Motorola | | + ||__|<- Button <-EPROM socket | | MC68000P12 | | + | ºººººººººººººººººººº | | |__________________________| | + | ___________ | | | + |__ |PAL16R6ACN| | | __| + |_____________________________________| |____________________________________| + +Another one labeled "WR-2". This one has a 32MHz xtal (instead of 12 MHz), an unknown +chip with its Surface scratched out in the middle of the EPROM socket (the chips sets +behind the EPROM once on the socket) and a MC68000P12F 16MHz instead of a MC68000P12. +This one had the PAL unprotected (dumped). + _____________________________________ _____________________________________ + __| Green LED->(_)(_)(_)<-Yellow LED | | |__ + | Red LED | | ___________________________ | + | ___ Xtal ºººººººººººººººººººº | | | | | + || | 32 MHz _________ | | | Motorola | | + ||__|<- Button |_unknown_| <-EPROM socket | | MC68000P12F 16MHz | | + | ºººººººººººººººººººº | | |__________________________| | + | ___________ | | | + |__ |PAL16R6ACN| | | __| + |_____________________________________| |____________________________________| + +Both are silkcreened as "68K-DS5002" *******************************************************************************/