smskr: add support for the seo-jin 11-in-1 multi-game bootleg cartridge

(and fix the CRC, I'd accidentally added the CRC for the decrypted ROM I was testing with)
This commit is contained in:
David Haywood 2016-11-16 21:57:25 +00:00
parent e240181aa3
commit 7f59416827
7 changed files with 130 additions and 5 deletions

View File

@ -7587,7 +7587,23 @@
</part> </part>
</software> </software>
<!-- This MASK rom was actually found on a larger arcade multi-game but appears to have been taken directly from a home cartridge.
The menu contained within it, and bank switching system used is ignored by the arcade board which just makes use of the game
data from it -->
<software name="smssgame">
<description>Super Game 11-in-1 (Kor)</description>
<year>1990</year>
<publisher>Seo Jin</publisher>
<part name="cart" interface="sms_cart">
<feature name="slot" value="seojin" />
<dataarea name="rom" size="0x080000">
<rom name="SG11004A 79ST0086END 9045" size="0x080000" crc="cdbfe86e" sha1="83d6f261471dca20f8d2e33b9807d670e9b4eb9c" offset="000000" />
</dataarea>
<dataarea name="ram" size="16384">
</dataarea>
</part>
</software>
<!-- The next items have been compiled from original source code written by Jeroen Tel. <!-- The next items have been compiled from original source code written by Jeroen Tel.
It is unsure if Probe has ever written any game code for these licensed titles --> It is unsure if Probe has ever written any game code for these licensed titles -->

View File

@ -40,6 +40,7 @@ const device_type SEGA8_ROM_JANGGUN = &device_creator<sega8_janggun_device>;
const device_type SEGA8_ROM_HICOM = &device_creator<sega8_hicom_device>; const device_type SEGA8_ROM_HICOM = &device_creator<sega8_hicom_device>;
const device_type SEGA8_ROM_KOREAN = &device_creator<sega8_korean_device>; const device_type SEGA8_ROM_KOREAN = &device_creator<sega8_korean_device>;
const device_type SEGA8_ROM_KOREAN_NB = &device_creator<sega8_korean_nb_device>; const device_type SEGA8_ROM_KOREAN_NB = &device_creator<sega8_korean_nb_device>;
const device_type SEGA8_ROM_SEOJIN = &device_creator<sega8_seojin_device>;
@ -170,6 +171,12 @@ sega8_korean_nb_device::sega8_korean_nb_device(const machine_config &mconfig, co
} }
sega8_seojin_device::sega8_seojin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: sega8_rom_device(mconfig, SEGA8_ROM_SEOJIN, "SMS Seo Jin Multi-cart", tag, owner, clock, "sega8_seojin", __FILE__)
{
}
void sega8_rom_device::device_start() void sega8_rom_device::device_start()
{ {
save_item(NAME(m_rom_bank_base)); save_item(NAME(m_rom_bank_base));
@ -938,3 +945,76 @@ WRITE8_MEMBER(sega8_korean_device::write_cart)
if (offset == 0xa000) if (offset == 0xa000)
m_rom_bank_base[2] = data % m_rom_page_count; m_rom_bank_base[2] = data % m_rom_page_count;
} }
/*-------------------------------------------------
Seo Jin Multi-Carts
have regular style bank switching with an overall
'game select' register at 0xfff0
-------------------------------------------------*/
void sega8_seojin_device::device_start()
{
sega8_rom_device::device_start();
save_item(NAME(m_gamesel));
m_readxor = 0x80;
}
void sega8_seojin_device::device_reset()
{
sega8_rom_device::device_reset();
m_gamesel = 0;
late_bank_setup();
}
READ8_MEMBER(sega8_seojin_device::read_cart)
{
int bank = offset / 0x4000;
if (offset < 0x400) // first 1k is hardcoded
return m_rom[((m_gamesel&0xf)*0x8000)+offset]^m_readxor;
int bank_to_use = (((m_gamesel&0xf) << 1) | m_rom_bank_base[bank]) % m_rom_page_count;
return m_rom[bank_to_use * 0x4000 + (offset & 0x3fff)]^m_readxor;
}
WRITE8_MEMBER(sega8_seojin_device::write_cart)
{
}
WRITE8_MEMBER(sega8_seojin_device::write_mapper)
{
switch (offset)
{
case 0:
break;
case 1: // Select 16k ROM bank for 0000-3fff
case 2: // Select 16k ROM bank for 4000-7fff
case 3: // Select 16k ROM bank for 8000-bfff
m_rom_bank_base[offset - 1] = data;
break;
}
}
// it might not have RAM inside, but the only way to get 0xfff0 to fall through to the cart with the current hook-up
// is by saying there is.
WRITE8_MEMBER(sega8_seojin_device::write_ram)
{
m_ram[offset & 0x3fff] = data;
if (offset == 0x3ff0)
{
m_gamesel = data;
}
}
READ8_MEMBER(sega8_seojin_device::read_ram)
{
return m_ram[offset & 0x3fff];
}

View File

@ -365,6 +365,30 @@ public:
}; };
// ======================> sega8_seojin_device
class sega8_seojin_device : public sega8_rom_device
{
public:
// construction/destruction
sega8_seojin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// reading and writing
virtual DECLARE_READ8_MEMBER(read_cart) override;
virtual DECLARE_WRITE8_MEMBER(write_cart) override;
virtual DECLARE_WRITE8_MEMBER(write_mapper) override;
virtual DECLARE_READ8_MEMBER(read_ram) override;
virtual DECLARE_WRITE8_MEMBER(write_ram) override;
protected:
uint8_t m_gamesel;
uint8_t m_readxor;
};
// device type definition // device type definition
extern const device_type SEGA8_ROM_STD; extern const device_type SEGA8_ROM_STD;
@ -384,5 +408,6 @@ extern const device_type SEGA8_ROM_JANGGUN;
extern const device_type SEGA8_ROM_HICOM; extern const device_type SEGA8_ROM_HICOM;
extern const device_type SEGA8_ROM_KOREAN; extern const device_type SEGA8_ROM_KOREAN;
extern const device_type SEGA8_ROM_KOREAN_NB; extern const device_type SEGA8_ROM_KOREAN_NB;
extern const device_type SEGA8_ROM_SEOJIN;
#endif #endif

View File

@ -183,7 +183,8 @@ static const sega8_slot slot_list[] =
{ SEGA8_BASIC_L3, "level3" }, { SEGA8_BASIC_L3, "level3" },
{ SEGA8_MUSIC_EDITOR, "music_editor" }, { SEGA8_MUSIC_EDITOR, "music_editor" },
{ SEGA8_DAHJEE_TYPEA, "dahjee_typea" }, { SEGA8_DAHJEE_TYPEA, "dahjee_typea" },
{ SEGA8_DAHJEE_TYPEB, "dahjee_typeb" } { SEGA8_DAHJEE_TYPEB, "dahjee_typeb" },
{ SEGA8_SEOJIN, "seojin" }
}; };
static int sega8_get_pcb_id(const char *slot) static int sega8_get_pcb_id(const char *slot)
@ -831,6 +832,7 @@ SLOT_INTERFACE_START(sg1000mk3_cart)
SLOT_INTERFACE_INTERNAL("hicom", SEGA8_ROM_HICOM) SLOT_INTERFACE_INTERNAL("hicom", SEGA8_ROM_HICOM)
SLOT_INTERFACE_INTERNAL("korean", SEGA8_ROM_KOREAN) SLOT_INTERFACE_INTERNAL("korean", SEGA8_ROM_KOREAN)
SLOT_INTERFACE_INTERNAL("korean_nb", SEGA8_ROM_KOREAN_NB) SLOT_INTERFACE_INTERNAL("korean_nb", SEGA8_ROM_KOREAN_NB)
SLOT_INTERFACE_INTERNAL("seojin", SEGA8_ROM_SEOJIN)
SLOT_INTERFACE_INTERNAL("othello", SEGA8_ROM_OTHELLO) SLOT_INTERFACE_INTERNAL("othello", SEGA8_ROM_OTHELLO)
SLOT_INTERFACE_INTERNAL("castle", SEGA8_ROM_CASTLE) SLOT_INTERFACE_INTERNAL("castle", SEGA8_ROM_CASTLE)
SLOT_INTERFACE_INTERNAL("dahjee_typea", SEGA8_ROM_DAHJEE_TYPEA) SLOT_INTERFACE_INTERNAL("dahjee_typea", SEGA8_ROM_DAHJEE_TYPEA)

View File

@ -29,7 +29,8 @@ enum
SEGA8_BASIC_L3, SEGA8_BASIC_L3,
SEGA8_MUSIC_EDITOR, SEGA8_MUSIC_EDITOR,
SEGA8_DAHJEE_TYPEA, SEGA8_DAHJEE_TYPEA,
SEGA8_DAHJEE_TYPEB SEGA8_DAHJEE_TYPEB,
SEGA8_SEOJIN
}; };

View File

@ -296,7 +296,7 @@ ROM_START( smssgame )
ROM_LOAD( "K1.bin", 0x140000, 0x20000, CRC(dadffecd) SHA1(68ebb968539049a9e193da5200856b9f956f7e02) ) // Final Bubble Bobble (2/2) ROM_LOAD( "K1.bin", 0x140000, 0x20000, CRC(dadffecd) SHA1(68ebb968539049a9e193da5200856b9f956f7e02) ) // Final Bubble Bobble (2/2)
// this mask rom appears to be taken straight from an SMS multi-game cart, bank 0 of it is even a menu just for the games in this ROM! same style, so presumably the same developer (Seo Jin 1990 copyright) // this mask rom appears to be taken straight from an SMS multi-game cart, bank 0 of it is even a menu just for the games in this ROM! same style, so presumably the same developer (Seo Jin 1990 copyright)
ROM_LOAD( "SG11004A 79ST0086END 9045.rom4",0x180000, 0x080000, CRC(cb6cbe40) SHA1(f7735f3357bb89ad2918c28eafeaf9808532f599) ) ROM_LOAD( "SG11004A 79ST0086END 9045.rom4",0x180000, 0x080000, CRC(cdbfe86e) SHA1(83d6f261471dca20f8d2e33b9807d670e9b4eb9c) )
// there seems to be some kind of MCU for the timer? // there seems to be some kind of MCU for the timer?
ROM_END ROM_END

View File

@ -963,7 +963,8 @@ void sms_state::setup_media_slots()
if (m_cartslot->get_type() == SEGA8_BASIC_L3 || if (m_cartslot->get_type() == SEGA8_BASIC_L3 ||
m_cartslot->get_type() == SEGA8_MUSIC_EDITOR || m_cartslot->get_type() == SEGA8_MUSIC_EDITOR ||
m_cartslot->get_type() == SEGA8_DAHJEE_TYPEA || m_cartslot->get_type() == SEGA8_DAHJEE_TYPEA ||
m_cartslot->get_type() == SEGA8_DAHJEE_TYPEB) m_cartslot->get_type() == SEGA8_DAHJEE_TYPEB ||
m_cartslot->get_type() == SEGA8_SEOJIN)
{ {
m_mem_device_enabled |= ENABLE_EXT_RAM; m_mem_device_enabled |= ENABLE_EXT_RAM;
} }