mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
(MESS) megadriv.c: added support for reset-base Codemaster 2-in-1 cart and documented even more carts. nw.
This commit is contained in:
parent
cd29176897
commit
7923655446
1044
hash/megadriv.xml
1044
hash/megadriv.xml
File diff suppressed because it is too large
Load Diff
@ -322,6 +322,8 @@ static SLOT_INTERFACE_START(md_cart)
|
||||
SLOT_INTERFACE_INTERNAL("rom_mm96", MD_SEPROM_MM96)
|
||||
// STM95 EEPROM
|
||||
SLOT_INTERFACE_INTERNAL("rom_stm95", MD_EEPROM_STM95)
|
||||
// CodeMasters 2-in-1 (reset based)
|
||||
SLOT_INTERFACE_INTERNAL("rom_cm2in1", MD_ROM_CM2IN1)
|
||||
// unique bankswitch
|
||||
SLOT_INTERFACE_INTERNAL("rom_ssf2", MD_ROM_SSF2)
|
||||
SLOT_INTERFACE_INTERNAL("rom_radica", MD_ROM_RADICA)
|
||||
|
@ -23,6 +23,9 @@ const device_type MD_STD_ROM = &device_creator<md_std_rom_device>;
|
||||
const device_type MD_ROM_SRAM = &device_creator<md_rom_sram_device>;
|
||||
const device_type MD_ROM_FRAM = &device_creator<md_rom_fram_device>;
|
||||
|
||||
// BASE CARTS + BANKSWITCH AT RESET
|
||||
const device_type MD_ROM_CM2IN1 = &device_creator<md_rom_cm2in1_device>;
|
||||
|
||||
// BASE CARTS + PROTECTION / BANKSWITCH
|
||||
const device_type MD_ROM_SSF2 = &device_creator<md_rom_ssf2_device>;
|
||||
const device_type MD_ROM_BUGSLIFE = &device_creator<md_rom_bugslife_device>;
|
||||
@ -80,6 +83,11 @@ md_rom_ssf2_device::md_rom_ssf2_device(const machine_config &mconfig, const char
|
||||
{
|
||||
}
|
||||
|
||||
md_rom_cm2in1_device::md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: md_std_rom_device(mconfig, MD_ROM_CM2IN1, "MD Codemasters 2in1", tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
md_rom_mcpirate_device::md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: md_std_rom_device(mconfig, MD_ROM_MCPIR, "MD Pirate Multicarts (Various)", tag, owner, clock)
|
||||
{
|
||||
@ -229,6 +237,18 @@ void md_rom_ssf2_device::device_reset()
|
||||
m_lastdata = -1;
|
||||
}
|
||||
|
||||
void md_rom_cm2in1_device::device_start()
|
||||
{
|
||||
m_base = -1;
|
||||
save_item(NAME(m_base));
|
||||
}
|
||||
|
||||
void md_rom_cm2in1_device::device_reset()
|
||||
{
|
||||
m_base++;
|
||||
m_base &= 1;
|
||||
}
|
||||
|
||||
void md_rom_mcpirate_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_bank));
|
||||
@ -485,6 +505,21 @@ WRITE16_MEMBER(md_rom_ssf2_device::write_a13)
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
CODEMASTERS 2 IN 1 (RESET BASED)
|
||||
-------------------------------------------------*/
|
||||
|
||||
#define MD_ADDR_CM2IN1(a) (m_base == 0 ? ((a << 1) & 0x1fffff)/2 : (((a << 1) & 0x7ffff) + 0x200000)/2)
|
||||
|
||||
READ16_MEMBER(md_rom_cm2in1_device::read)
|
||||
{
|
||||
if (offset < 0x400000/2)
|
||||
return m_rom[MD_ADDR_CM2IN1(offset)];
|
||||
else
|
||||
return 0xffff;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
PIRATE MULTICARTS
|
||||
-------------------------------------------------*/
|
||||
|
@ -83,6 +83,27 @@ private:
|
||||
int m_lastoff, m_lastdata;
|
||||
};
|
||||
|
||||
// ======================> md_rom_cm2in1_device
|
||||
|
||||
class md_rom_cm2in1_device : public md_std_rom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual void device_config_complete() { m_shortname = "md_rom_cm2in1"; }
|
||||
|
||||
// reading and writing
|
||||
virtual DECLARE_READ16_MEMBER(read);
|
||||
|
||||
private:
|
||||
int m_base;
|
||||
};
|
||||
|
||||
|
||||
// ======================> md_rom_mcpirate_device
|
||||
|
||||
class md_rom_mcpirate_device : public md_std_rom_device
|
||||
@ -559,6 +580,7 @@ private:
|
||||
extern const device_type MD_STD_ROM;
|
||||
extern const device_type MD_ROM_SRAM;
|
||||
extern const device_type MD_ROM_FRAM;
|
||||
extern const device_type MD_ROM_CM2IN1;
|
||||
extern const device_type MD_ROM_BUGSLIFE;
|
||||
extern const device_type MD_ROM_CHINF3;
|
||||
extern const device_type MD_ROM_ELFWOR;
|
||||
|
@ -253,6 +253,7 @@ static const md_slot slot_list[] =
|
||||
{ PSOLAR, "rom_stm95"},
|
||||
|
||||
{ SSF2, "rom_ssf2" },
|
||||
{ CM_2IN1, "rom_cm2in1" },
|
||||
{ RADICA, "rom_radica" },
|
||||
// { GAME_KANDUME, "rom_gkand" }, // what's needed by this?
|
||||
|
||||
|
@ -42,6 +42,7 @@ enum
|
||||
|
||||
// Various
|
||||
SSF2, /* Super Street Fighter 2 */
|
||||
CM_2IN1, /* CodeMasters 2in1 : Psycho Pinball + Micro Machines */
|
||||
GAME_KANDUME, /* Game no Kandume Otokuyou */
|
||||
RADICA, /* Radica TV games.. these probably should be a separate driver since they are a separate 'console' */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user