diff --git a/hash/sms.xml b/hash/sms.xml index 69e92c607be..b1754d3ccf4 100644 --- a/hash/sms.xml +++ b/hash/sms.xml @@ -7587,7 +7587,23 @@ - + + + Super Game 11-in-1 (Kor) + 1990 + Seo Jin + + + + + + + + + + diff --git a/src/devices/bus/sega8/rom.cpp b/src/devices/bus/sega8/rom.cpp index 096369826b2..aaa4ad0a02b 100644 --- a/src/devices/bus/sega8/rom.cpp +++ b/src/devices/bus/sega8/rom.cpp @@ -40,6 +40,7 @@ const device_type SEGA8_ROM_JANGGUN = &device_creator; const device_type SEGA8_ROM_HICOM = &device_creator; const device_type SEGA8_ROM_KOREAN = &device_creator; const device_type SEGA8_ROM_KOREAN_NB = &device_creator; +const device_type SEGA8_ROM_SEOJIN = &device_creator; @@ -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() { save_item(NAME(m_rom_bank_base)); @@ -938,3 +945,76 @@ WRITE8_MEMBER(sega8_korean_device::write_cart) if (offset == 0xa000) 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]; +} + diff --git a/src/devices/bus/sega8/rom.h b/src/devices/bus/sega8/rom.h index ef3448a8428..a4b7df2599b 100644 --- a/src/devices/bus/sega8/rom.h +++ b/src/devices/bus/sega8/rom.h @@ -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 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_KOREAN; extern const device_type SEGA8_ROM_KOREAN_NB; +extern const device_type SEGA8_ROM_SEOJIN; #endif diff --git a/src/devices/bus/sega8/sega8_slot.cpp b/src/devices/bus/sega8/sega8_slot.cpp index 8a40d997421..92fc594389d 100644 --- a/src/devices/bus/sega8/sega8_slot.cpp +++ b/src/devices/bus/sega8/sega8_slot.cpp @@ -183,7 +183,8 @@ static const sega8_slot slot_list[] = { SEGA8_BASIC_L3, "level3" }, { SEGA8_MUSIC_EDITOR, "music_editor" }, { 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) @@ -831,6 +832,7 @@ SLOT_INTERFACE_START(sg1000mk3_cart) SLOT_INTERFACE_INTERNAL("hicom", SEGA8_ROM_HICOM) SLOT_INTERFACE_INTERNAL("korean", SEGA8_ROM_KOREAN) 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("castle", SEGA8_ROM_CASTLE) SLOT_INTERFACE_INTERNAL("dahjee_typea", SEGA8_ROM_DAHJEE_TYPEA) diff --git a/src/devices/bus/sega8/sega8_slot.h b/src/devices/bus/sega8/sega8_slot.h index 85ab4a2cb96..36181a547e7 100644 --- a/src/devices/bus/sega8/sega8_slot.h +++ b/src/devices/bus/sega8/sega8_slot.h @@ -29,7 +29,8 @@ enum SEGA8_BASIC_L3, SEGA8_MUSIC_EDITOR, SEGA8_DAHJEE_TYPEA, - SEGA8_DAHJEE_TYPEB + SEGA8_DAHJEE_TYPEB, + SEGA8_SEOJIN }; diff --git a/src/mame/drivers/sms_bootleg.cpp b/src/mame/drivers/sms_bootleg.cpp index f97bbef6c1d..b9aa5a66d14 100644 --- a/src/mame/drivers/sms_bootleg.cpp +++ b/src/mame/drivers/sms_bootleg.cpp @@ -296,7 +296,7 @@ ROM_START( smssgame ) 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) - 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? ROM_END diff --git a/src/mame/machine/sms.cpp b/src/mame/machine/sms.cpp index 4b7a6b0da18..1dc3827b811 100644 --- a/src/mame/machine/sms.cpp +++ b/src/mame/machine/sms.cpp @@ -963,7 +963,8 @@ void sms_state::setup_media_slots() if (m_cartslot->get_type() == SEGA8_BASIC_L3 || m_cartslot->get_type() == SEGA8_MUSIC_EDITOR || 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; }