diff options
-rw-r--r-- | hash/megadriv.xml | 48 | ||||
-rw-r--r-- | src/devices/bus/megadrive/md_carts.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/megadrive/md_slot.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/megadrive/md_slot.h | 2 | ||||
-rw-r--r-- | src/devices/bus/megadrive/rom.cpp | 116 | ||||
-rw-r--r-- | src/devices/bus/megadrive/rom.h | 39 |
6 files changed, 205 insertions, 4 deletions
diff --git a/hash/megadriv.xml b/hash/megadriv.xml index fbf184d3d95..c79d6873038 100644 --- a/hash/megadriv.xml +++ b/hash/megadriv.xml @@ -17146,6 +17146,20 @@ but dumps still have to be confirmed. </part> </software> + <software name="fbarg96" cloneof="jlps2"> + <description>Futbol Argentino 96 (Argentina) (hack of J. League Pro Striker 2)</description> + <year>1996</year> + <publisher>bootleg</publisher> + <part name="cart" interface="megadriv_cart"> + <feature name="slot" value="rom_sram_arg96"/> + <dataarea name="rom" width="16" endianness="big" size="2097152"> + <rom name="Futbol Argentino 96 (Argentina) (Unl) (Pirate).md" size="2097152" crc="65071ccc" sha1="097811a4c590c8856314aae1410f7b1d9f4a21e9"/> + </dataarea> + <dataarea name="sram" size="16384"> + </dataarea> + </part> + </software> + <software name="prostrfs"> <description>Pro Striker Final Stage (Jpn)</description> <year>1995</year> @@ -31492,8 +31506,9 @@ Notice that these are not working on real hardware due to bugged code with VDP i </part> </software> + <!-- is this set hacked to have the protection removed? --> <software name="truco96"> - <description>Truco '96 (Arg)</description> + <description>Truco '96 (Argentina, unprotected)</description> <year>1996</year> <publisher>Miky</publisher> <part name="cart" interface="megadriv_cart"> @@ -31503,9 +31518,23 @@ Notice that these are not working on real hardware due to bugged code with VDP i </part> </software> - <!-- // based on SMGP code --> + <software name="truco96a" cloneof="truco96" supported="no"> + <description>Truco '96 (Argentina, protected)</description> + <year>1996</year> + <publisher>Miky</publisher> + <part name="cart" interface="megadriv_cart"> + <feature name="slot" value="rom_tc2000"/> + <dataarea name="rom" width="16" endianness="big" size="2097152"> + <!-- 2nd half is probably not ROM as the protection maps there, could be cut in half? --> + <rom name="MIKY V1 TRUCO (X).bin" size="2097152" crc="79de5e57" sha1="51013c30ae736bd4e0e49e6ef8ea20c1cfbc79d7"/> + </dataarea> + </part> + </software> + + <!-- TC2000 is based on SMGP code --> + <!-- is this set hacked to have the protection removed? it's more than just a trivial patch however --> <software name="tc2000"> - <description>TC 2000 (Arg)</description> + <description>TC 2000 (Argentina, unprotected)</description> <year>199?</year> <publisher><unlicensed></publisher> <part name="cart" interface="megadriv_cart"> @@ -31515,6 +31544,19 @@ Notice that these are not working on real hardware due to bugged code with VDP i </part> </software> + <software name="tc2000a" cloneof="tc2000"> + <description>TC 2000 (Argentina, protected)</description> + <year>199?</year> + <publisher><unlicensed></publisher> + <part name="cart" interface="megadriv_cart"> + <feature name="slot" value="rom_tc2000"/> + <dataarea name="rom" width="16" endianness="big" size="2097152"> + <!-- 2nd half is probably not ROM as the protection maps there, could be cut in half? --> + <rom name="tc2000_protected.bin" size="2097152" crc="6f91b33c" sha1="d117b85ba12f5148808be65d2d25690935dfc9f4"/> + </dataarea> + </part> + </software> + <software name="ultsoccrp" cloneof="ultsoccr"> <description>Ultimate Soccer (Euro, Prototype)</description> <year>199?</year> 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) |