mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
(MESS) gameboy: added dump of Color GameBoy 188 in 1 multicart,
and partially implemented the required mapper [Team Europe, Fabio Priuli] after selecting a game, the CPU always points to the correct bank of the cart, but some games don't work anyway (e.g. Duck Tales, PacMan, etc.) I don't have time to further debug this, at the moment, so I leave it to whoever wants to take a look
This commit is contained in:
parent
eb21ba57de
commit
13e872d80f
@ -23851,6 +23851,19 @@
|
||||
</software>
|
||||
|
||||
|
||||
<software name="188in1" supported="partial">
|
||||
<description>Color GameBoy 188 in 1 (HK)</description>
|
||||
<year>199?</year>
|
||||
<publisher><unknown></publisher>
|
||||
<part name="cart" interface="gameboy_cart">
|
||||
<feature name="slot" value="rom_188in1" />
|
||||
<dataarea name="rom" size="8388608">
|
||||
<rom name="m29w640ft.u2" size="8388608" crc="e4068d7d" sha1="e61ee50ed39fd5b5cc8bdcb96fe1c3cccdcfc76f" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
|
||||
<!-- Non game cartridges -->
|
||||
|
||||
<software name="ggenie" supported="no">
|
||||
|
@ -220,7 +220,8 @@ static const gb_slot slot_list[] =
|
||||
{ GB_MBC_SM3SP, "rom_sm3sp" },
|
||||
{ GB_MBC_UNK01, "rom_unk01" },
|
||||
{ GB_MBC_DKONG5, "rom_dkong5" },
|
||||
{ GB_MBC_CAMERA, "rom_camera" }
|
||||
{ GB_MBC_CAMERA, "rom_camera" },
|
||||
{ GB_MBC_188IN1, "rom_188in1" }
|
||||
};
|
||||
|
||||
static int gb_get_pcb_id(const char *slot)
|
||||
|
@ -27,6 +27,7 @@ enum
|
||||
GB_MBC_LASAMA, /* ?? ROM, ?? RAM - Appears in La Sa Ma */
|
||||
GB_MBC_ATVRACIN,
|
||||
GB_MBC_CAMERA,
|
||||
GB_MBC_188IN1,
|
||||
GB_MBC_SINTAX,
|
||||
GB_MBC_CHONGWU,
|
||||
GB_MBC_LICHENG,
|
||||
|
@ -24,6 +24,7 @@ const device_type GB_ROM_MBC5 = &device_creator<gb_rom_mbc5_device>;
|
||||
const device_type GB_ROM_MBC6 = &device_creator<gb_rom_mbc6_device>;
|
||||
const device_type GB_ROM_MBC7 = &device_creator<gb_rom_mbc7_device>;
|
||||
const device_type GB_ROM_MMM01 = &device_creator<gb_rom_mmm01_device>;
|
||||
const device_type GB_ROM_188IN1 = &device_creator<gb_rom_188in1_device>;
|
||||
const device_type GB_ROM_SINTAX = &device_creator<gb_rom_sintax_device>;
|
||||
const device_type GB_ROM_CHONGWU = &device_creator<gb_rom_chongwu_device>;
|
||||
const device_type GB_ROM_LICHENG = &device_creator<gb_rom_licheng_device>;
|
||||
@ -38,6 +39,11 @@ gb_rom_mbc_device::gb_rom_mbc_device(const machine_config &mconfig, device_type
|
||||
{
|
||||
}
|
||||
|
||||
gb_rom_mbc1_device::gb_rom_mbc1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
|
||||
: gb_rom_mbc_device(mconfig, type, name, tag, owner, clock, shortname, source)
|
||||
{
|
||||
}
|
||||
|
||||
gb_rom_mbc1_device::gb_rom_mbc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: gb_rom_mbc_device(mconfig, GB_ROM_MBC1, "GB MBC1 Carts", tag, owner, clock, "gb_rom_mbc1", __FILE__)
|
||||
{
|
||||
@ -83,6 +89,11 @@ gb_rom_mmm01_device::gb_rom_mmm01_device(const machine_config &mconfig, const ch
|
||||
{
|
||||
}
|
||||
|
||||
gb_rom_188in1_device::gb_rom_188in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: gb_rom_mbc1_device(mconfig, GB_ROM_188IN1, "GB 188in1", tag, owner, clock, "gb_rom_188in1", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
gb_rom_sintax_device::gb_rom_sintax_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: gb_rom_mbc_device(mconfig, GB_ROM_SINTAX, "GB MBC5 Sintax Carts", tag, owner, clock, "gb_rom_sintax", __FILE__)
|
||||
{
|
||||
@ -262,7 +273,6 @@ WRITE8_MEMBER(gb_rom_mbc_device::write_ram)
|
||||
|
||||
// MBC1
|
||||
|
||||
|
||||
READ8_MEMBER(gb_rom_mbc1_device::read_rom)
|
||||
{
|
||||
if (offset < 0x4000)
|
||||
@ -689,6 +699,39 @@ WRITE8_MEMBER(gb_rom_mmm01_device::write_bank)
|
||||
}
|
||||
}
|
||||
|
||||
// 188 in 1 pirate (only preliminary)
|
||||
|
||||
READ8_MEMBER(gb_rom_188in1_device::read_rom)
|
||||
{
|
||||
if (offset < 0x4000)
|
||||
return m_rom[m_game_base + rom_bank_map[m_latch_bank] * 0x4000 + (offset & 0x3fff)];
|
||||
else
|
||||
return m_rom[m_game_base + rom_bank_map[m_latch_bank2] * 0x4000 + (offset & 0x3fff)];
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(gb_rom_188in1_device::write_bank)
|
||||
{
|
||||
if (offset == 0x7b00)
|
||||
{
|
||||
if (data < 0x80)
|
||||
logerror("write to 0x%X data 0x%X\n", offset, data);
|
||||
else
|
||||
{
|
||||
data -= 0x80;
|
||||
m_game_base = 0x400000 + (data * 0x8000);
|
||||
//logerror("offset 0x%X\n", m_game_base);
|
||||
}
|
||||
}
|
||||
else if (offset == 0x7b01 || offset == 0x7b02)
|
||||
{
|
||||
// what do these writes do?
|
||||
printf("write to 0x%X data 0x%X\n", offset, data);
|
||||
}
|
||||
else
|
||||
gb_rom_mbc1_device::write_bank(space, offset, data);
|
||||
}
|
||||
|
||||
|
||||
// MBC5 variant used by Li Cheng / Niutoude games
|
||||
|
||||
WRITE8_MEMBER(gb_rom_licheng_device::write_bank)
|
||||
|
@ -35,6 +35,7 @@ class gb_rom_mbc1_device : public gb_rom_mbc_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
gb_rom_mbc1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
gb_rom_mbc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
@ -176,6 +177,25 @@ public:
|
||||
UINT8 m_bank_mask, m_bank, m_reg;
|
||||
};
|
||||
|
||||
// ======================> gb_rom_188in1_device
|
||||
class gb_rom_188in1_device : public gb_rom_mbc1_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
gb_rom_188in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() { shared_start(); save_item(NAME(m_game_base)); };
|
||||
virtual void device_reset() { shared_reset(); m_game_base = 0; };
|
||||
|
||||
// reading and writing
|
||||
virtual DECLARE_READ8_MEMBER(read_rom);
|
||||
virtual DECLARE_WRITE8_MEMBER(write_bank);
|
||||
|
||||
private:
|
||||
UINT32 m_game_base;
|
||||
};
|
||||
|
||||
// ======================> gb_rom_sintax_device
|
||||
class gb_rom_sintax_device : public gb_rom_mbc_device
|
||||
{
|
||||
@ -293,6 +313,7 @@ extern const device_type GB_ROM_MBC5;
|
||||
extern const device_type GB_ROM_MBC6;
|
||||
extern const device_type GB_ROM_MBC7;
|
||||
extern const device_type GB_ROM_MMM01;
|
||||
extern const device_type GB_ROM_188IN1;
|
||||
extern const device_type GB_ROM_SINTAX;
|
||||
extern const device_type GB_ROM_CHONGWU;
|
||||
extern const device_type GB_ROM_LICHENG;
|
||||
|
@ -627,6 +627,7 @@ static SLOT_INTERFACE_START(gb_cart)
|
||||
SLOT_INTERFACE_INTERNAL("rom_lasama", GB_ROM_LASAMA)
|
||||
SLOT_INTERFACE_INTERNAL("rom_atvrac", GB_ROM_ATVRAC)
|
||||
SLOT_INTERFACE_INTERNAL("rom_camera", GB_STD_ROM)
|
||||
SLOT_INTERFACE_INTERNAL("rom_188in1", GB_ROM_188IN1)
|
||||
SLOT_INTERFACE_INTERNAL("rom_sintax", GB_ROM_SINTAX)
|
||||
SLOT_INTERFACE_INTERNAL("rom_chong", GB_ROM_CHONGWU)
|
||||
SLOT_INTERFACE_INTERNAL("rom_licheng", GB_ROM_LICHENG)
|
||||
|
Loading…
Reference in New Issue
Block a user