summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author David Haywood <28625134+DavidHaywood@users.noreply.github.com>2021-04-05 19:34:22 +0100
committer GitHub <noreply@github.com>2021-04-05 14:34:22 -0400
commit21ff4587caf49962a6bb1be848276c4a978e0224 (patch)
tree6738b2c0ce3ed0e4533e14c33179b2edca22b0ac /src
parent3bc38ce450cd4cd6b3bfb2ed16e556fd318c3033 (diff)
new WORKING software list entries (#7884)
* new WORKING software list entries ------ megadriv.xml fbarg96 - Futbol Argentino 96 (Argentina) (hack of J. League Pro Striker 2) [Sebastian Beltran, David Haywood] tc2000a - TC 2000 (Argentina, protected) [Sebastian Beltran, David Haywood] * new NOT WORKING software list entries ------ megadriv.xml: truco96a - Truco '96 (Argentina, protected) [Sebastian Beltran, David Haywood]
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/megadrive/md_carts.cpp2
-rw-r--r--src/devices/bus/megadrive/md_slot.cpp2
-rw-r--r--src/devices/bus/megadrive/md_slot.h2
-rw-r--r--src/devices/bus/megadrive/rom.cpp116
-rw-r--r--src/devices/bus/megadrive/rom.h39
5 files changed, 160 insertions, 1 deletions
diff --git a/src/devices/bus/megadrive/md_carts.cpp b/src/devices/bus/megadrive/md_carts.cpp
index 412ae2a5d9c..c5be97a54f4 100644
--- a/src/devices/bus/megadrive/md_carts.cpp
+++ b/src/devices/bus/megadrive/md_carts.cpp
@@ -80,6 +80,8 @@ void md_cart(device_slot_interface &device)
device.option_add_internal("rom_smouse", MD_ROM_SMOUSE);
device.option_add_internal("rom_soulb", MD_ROM_SOULB);
device.option_add_internal("rom_squir", MD_ROM_SQUIR);
+ device.option_add_internal("rom_sram_arg96", MD_ROM_SRAM_ARG96);
+ device.option_add_internal("rom_tc2000", MD_ROM_TC2000);
device.option_add_internal("rom_tekkensp", MD_ROM_TEKKENSP);
device.option_add_internal("rom_topf", MD_ROM_TOPF);
diff --git a/src/devices/bus/megadrive/md_slot.cpp b/src/devices/bus/megadrive/md_slot.cpp
index d36ea109bf6..f338fc25d87 100644
--- a/src/devices/bus/megadrive/md_slot.cpp
+++ b/src/devices/bus/megadrive/md_slot.cpp
@@ -270,6 +270,7 @@ static const md_slot slot_list[] =
{ SMOUSE, "rom_smouse" },
{ SOULBLAD, "rom_soulblad" },
{ SQUIRRELK, "rom_squir" },
+ { SRAM_ARG96, "rom_sram_arg96" },
{ TEKKENSP, "rom_tekkesp" },
{ TOPFIGHTER, "rom_topf" },
@@ -614,6 +615,7 @@ void base_md_cart_slot_device::setup_nvram()
// These types only come from softlist loading
case SEGA_SRAM:
+ case SRAM_ARG96:
m_cart->m_nvram_start = 0x200000;
m_cart->m_nvram_end = m_cart->m_nvram_start + get_software_region_length("sram") - 1;
m_cart->nvram_alloc(m_cart->m_nvram_end - m_cart->m_nvram_start + 1);
diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h
index 1e44cabaace..73043bacca6 100644
--- a/src/devices/bus/megadrive/md_slot.h
+++ b/src/devices/bus/megadrive/md_slot.h
@@ -78,6 +78,8 @@ enum
SMOUSE, /* Smart Mouse */
SOULBLAD, /* Soul Blade */
SQUIRRELK, /* Squirrel King */
+ SRAM_ARG96, /* Futbol Argentino 96 (Argentina) (hack of J. League Pro Striker 2) */
+ TC2000, /* TC 2000 (Argentina, protected) */
TEKKENSP, /* Tekken Special */
TOPFIGHTER, /* Top Fighter 2000 MK VIII */
diff --git a/src/devices/bus/megadrive/rom.cpp b/src/devices/bus/megadrive/rom.cpp
index c6a8f592b3f..6c624f2b515 100644
--- a/src/devices/bus/megadrive/rom.cpp
+++ b/src/devices/bus/megadrive/rom.cpp
@@ -57,12 +57,14 @@ DEFINE_DEVICE_TYPE(MD_ROM_POKESTAD, md_rom_pokestad_device, "md_rom_pokestad", "
DEFINE_DEVICE_TYPE(MD_ROM_REALTEC, md_rom_realtec_device, "md_rom_realtec", "MD Realtec")
DEFINE_DEVICE_TYPE(MD_ROM_REDCL, md_rom_redcl_device, "md_rom_redcl", "MD Redcliff")
DEFINE_DEVICE_TYPE(MD_ROM_SQUIR, md_rom_squir_device, "md_rom_squir", "MD Squirrel King")
+DEFINE_DEVICE_TYPE(MD_ROM_TC2000, md_rom_tc2000_device, "md_rom_tc2000", "MD TC2000")
DEFINE_DEVICE_TYPE(MD_ROM_TEKKENSP, md_rom_tekkensp_device, "md_rom_tekkensp", "MD Tekken Special")
DEFINE_DEVICE_TYPE(MD_ROM_TOPF, md_rom_topf_device, "md_rom_topf", "MD Top Fighter")
DEFINE_DEVICE_TYPE(MD_ROM_RADICA, md_rom_radica_device, "md_rom_radica", "MD Radica TV games")
DEFINE_DEVICE_TYPE(MD_ROM_BEGGARP, md_rom_beggarp_device, "md_rom_beggarp", "MD Beggar Prince")
DEFINE_DEVICE_TYPE(MD_ROM_WUKONG, md_rom_wukong_device, "md_rom_wukong", "MD Legend of Wukong")
DEFINE_DEVICE_TYPE(MD_ROM_STARODYS, md_rom_starodys_device, "md_rom_starodys", "MD Star Odyssey")
+DEFINE_DEVICE_TYPE(MD_ROM_SRAM_ARG96, md_rom_sram_arg96_device, "md_rom_sram_arg96", "MD Futbol Argentino 96")
md_std_rom_device::md_std_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
@@ -76,10 +78,22 @@ md_std_rom_device::md_std_rom_device(const machine_config &mconfig, const char *
}
md_rom_sram_device::md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : md_std_rom_device(mconfig, MD_ROM_SRAM, tag, owner, clock)
+ : md_rom_sram_device(mconfig, MD_ROM_SRAM, tag, owner, clock)
{
}
+md_rom_sram_device::md_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
+ : md_std_rom_device(mconfig, type, tag, owner, clock)
+{
+}
+
+
+md_rom_sram_arg96_device::md_rom_sram_arg96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : md_rom_sram_device(mconfig, MD_ROM_SRAM_ARG96, tag, owner, clock)
+{
+}
+
+
md_rom_fram_device::md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_FRAM, tag, owner, clock)
{
@@ -215,6 +229,11 @@ md_rom_squir_device::md_rom_squir_device(const machine_config &mconfig, const ch
{
}
+md_rom_tc2000_device::md_rom_tc2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : md_std_rom_device(mconfig, MD_ROM_TC2000, tag, owner, clock)
+{
+}
+
md_rom_tekkensp_device::md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: md_std_rom_device(mconfig, MD_ROM_TEKKENSP, tag, owner, clock), m_reg(0)
{
@@ -1225,6 +1244,61 @@ void md_rom_smw64_device::write(offs_t offset, uint16_t data, uint16_t mem_mask)
}
/*-------------------------------------------------
+ TC2000 / TRUCO 96
+ -------------------------------------------------*/
+
+void md_rom_tc2000_device::device_start()
+{
+ save_item(NAME(m_retvalue));
+}
+
+void md_rom_tc2000_device::device_reset()
+{
+ m_retvalue = 0;
+}
+
+uint16_t md_rom_tc2000_device::read(offs_t offset)
+{
+ if (offset < 0x100000 / 2)
+ {
+ return md_std_rom_device::read(offset);
+ }
+ else
+ {
+ // this works for game boot and starting a game, are there any further checks?
+ logerror("protection read at offset %08x returning %04x\n", offset*2, m_retvalue);
+
+ return m_retvalue;
+ }
+}
+
+void md_rom_tc2000_device::write(offs_t offset, uint16_t data, uint16_t mem_mask)
+{
+ if (offset < 0x100000/2)
+ {
+ md_std_rom_device::write(offset, data, mem_mask);
+ }
+ else
+ {
+ if (((offset * 2) & 0xf) == 0x0) // truco96a uses this case
+ {
+ m_retvalue = 0x0000;
+ }
+ else if (((offset * 2) & 0xf) == 0x8)
+ {
+ m_retvalue = 0x5000;
+ }
+ else if (((offset * 2) & 0xf) == 0xc)
+ {
+ m_retvalue = 0xa000;
+ }
+
+ logerror("protection write at offset %08x %04x %04x\n", offset*2, data, mem_mask);
+ }
+}
+
+
+/*-------------------------------------------------
TEKKEN SPECIAL
-------------------------------------------------*/
@@ -1553,3 +1627,43 @@ void md_rom_starodys_device::write_a13(offs_t offset, uint16_t data)
m_nvram_handlers_installed = 1;
}
}
+
+
+/*-------------------------------------------------
+ Futbol Argentino 96 (Argentina)
+ -------------------------------------------------*/
+
+uint16_t md_rom_sram_arg96_device::read(offs_t offset)
+{
+ if (offset < 0x400000 / 2)
+ {
+ return md_rom_sram_device::read(offset);
+ }
+ else
+ {
+ // these return values are probably connected somehow with the writes
+ // but the game only ever looks for these results before doing DMA operations
+ if ((offset * 2) == 0x4c6200)
+ return 0xa;
+ else if ((offset * 2) == 0x4c6600)
+ return 0x9;
+ else if ((offset * 2) == 0x4c6a00)
+ return 0x7;
+ else
+ logerror("unhandled read at offset %08x\n", offset);
+
+ return 0x0000;
+ }
+}
+
+void md_rom_sram_arg96_device::write(offs_t offset, uint16_t data, uint16_t mem_mask)
+{
+ if (offset < 0x400000/2)
+ {
+ md_rom_sram_device::write(offset, data, mem_mask);
+ }
+ else
+ {
+ logerror("unhandled write at offset %08x %04x %04x\n", offset, data, mem_mask);
+ }
+}
diff --git a/src/devices/bus/megadrive/rom.h b/src/devices/bus/megadrive/rom.h
index 7422ae58bdf..0acf73061ee 100644
--- a/src/devices/bus/megadrive/rom.h
+++ b/src/devices/bus/megadrive/rom.h
@@ -39,12 +39,27 @@ public:
// construction/destruction
md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+protected:
+ md_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+public:
// reading and writing
virtual uint16_t read(offs_t offset) override;
virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override;
virtual void write_a13(offs_t offset, uint16_t data) override;
};
+// ======================> md_rom_sram_arg96_device
+
+class md_rom_sram_arg96_device : public md_rom_sram_device
+{
+public:
+ md_rom_sram_arg96_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ virtual uint16_t read(offs_t offset) override;
+ virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override;
+};
+
// ======================> md_rom_fram_device
class md_rom_fram_device : public md_std_rom_device
@@ -468,6 +483,28 @@ private:
uint16_t m_latch;
};
+// ======================> md_rom_tc2000_device
+
+class md_rom_tc2000_device : public md_std_rom_device
+{
+public:
+ // construction/destruction
+ md_rom_tc2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ // reading and writing
+ virtual uint16_t read(offs_t offset) override;
+ virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override;
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+private:
+ uint16_t m_retvalue;
+};
+
+
// ======================> md_rom_tekkensp_device
class md_rom_tekkensp_device : public md_std_rom_device
@@ -631,6 +668,8 @@ DECLARE_DEVICE_TYPE(MD_ROM_POKESTAD, md_rom_pokestad_device)
DECLARE_DEVICE_TYPE(MD_ROM_REALTEC, md_rom_realtec_device)
DECLARE_DEVICE_TYPE(MD_ROM_REDCL, md_rom_redcl_device)
DECLARE_DEVICE_TYPE(MD_ROM_SQUIR, md_rom_squir_device)
+DECLARE_DEVICE_TYPE(MD_ROM_SRAM_ARG96, md_rom_sram_arg96_device)
+DECLARE_DEVICE_TYPE(MD_ROM_TC2000, md_rom_tc2000_device)
DECLARE_DEVICE_TYPE(MD_ROM_TEKKENSP, md_rom_tekkensp_device)
DECLARE_DEVICE_TYPE(MD_ROM_TOPF, md_rom_topf_device)
DECLARE_DEVICE_TYPE(MD_ROM_RADICA, md_rom_radica_device)