Merge pull request #8567 from 0kmg/nes-MC-Fix-a-Lot

bus/nes: More fixes for various multicart types.
This commit is contained in:
ajrhacker 2021-09-12 19:36:38 -04:00 committed by GitHub
commit 269d4731fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 91 additions and 129 deletions

View File

@ -80281,7 +80281,7 @@ be better to redump them properly. -->
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_d1038" />
<feature name="slot" value="bmc_vt5201" />
<feature name="pcb" value="BMC-D1038" />
<dataarea name="chr" size="65536">
<rom name="46-in-1 (d1038) [p1][u].chr" size="65536" crc="a2f2b37b" sha1="4cd8720e70762038b4a9cf2dec92dde0e38698d6" offset="00000" status="baddump" />
@ -80707,7 +80707,7 @@ be better to redump them properly. -->
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_d1038" />
<feature name="slot" value="bmc_vt5201" />
<feature name="pcb" value="BMC-D1038" />
<dataarea name="chr" size="65536">
<rom name="65-in-1 (nt766) [p1][u].chr" size="65536" crc="e1d03e4a" sha1="13c52b601ee0a9e3fe4030562e86118b7a5c9d62" offset="00000" status="baddump" />
@ -80938,7 +80938,7 @@ be better to redump them properly. -->
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_d1038" />
<feature name="slot" value="bmc_vt5201" />
<feature name="pcb" value="BMC-D1038" />
<dataarea name="chr" size="65536">
<rom name="74-in-1 (nt886) [p1][u].chr" size="65536" crc="b2f00487" sha1="f21320df2d199887a4e9b231c7bf3afcc77ac9ec" offset="00000" status="baddump" />
@ -80992,7 +80992,7 @@ be better to redump them properly. -->
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_d1038" />
<feature name="slot" value="bmc_vt5201" />
<feature name="pcb" value="BMC-D1038" />
<dataarea name="chr" size="65536">
<rom name="77-in-1 (nt141) [p1][u].chr" size="65536" crc="3f03ecaf" sha1="1e65bb75da9f008bf37a0a2c058f9771ac09caac" offset="00000" status="baddump" />
@ -81016,6 +81016,7 @@ be better to redump them properly. -->
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_21in1" />
<feature name="pcb" value="BMC-21IN1" />
<feature name="mirroring" value="horizontal" />
<dataarea name="chr" size="32768">
<rom name="8-in-1 [p1].chr" size="32768" crc="a1f6c479" sha1="888834d627637e75d2636a7f34d6a0ff234e8929" offset="00000" status="baddump" />
</dataarea>
@ -81915,6 +81916,21 @@ to check why this is different -->
</part>
</software>
<software name="mc_s190">
<description>Super 190 in 1</description>
<year>19??</year>
<publisher>&lt;pirate&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_s700" />
<dataarea name="prg" size="2097152">
<rom name="super 190-in-1.prg" size="2097152" crc="8dae13b2" sha1="cd36b113a0091666621c3248601ae5ca33d0605d" status="baddump" />
</dataarea>
<dataarea name="chr" size="1048576">
<rom name="super 190-in-1.chr" size="1048576" crc="47abdc9f" sha1="289ae7628687dc4b370adee42f3a97034ce6ed2b" status="baddump" />
</dataarea>
</part>
</software>
<!-- If you select the keyboard it does not work due to missing data -->
<software name="mc_s200" supported="partial">
<description>Super 200 in 1 MD-8802 (Incomplete?)</description>
@ -82089,7 +82105,6 @@ to check why this is different -->
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_vt5201" />
<feature name="pcb" value="BMC-VT5201" />
<feature name="mirroring" value="high" />
<dataarea name="chr" size="65536">
<rom name="super 35 in 1 (6 in 1 vt5201).chr" size="65536" crc="a3d8d9dd" sha1="34703a76b76c7244a21237e41b8aed7a1ef95cae" offset="00000" status="baddump" />
</dataarea>

View File

@ -186,8 +186,8 @@ nes_bmc_190in1_device::nes_bmc_190in1_device(const machine_config &mconfig, cons
{
}
nes_vt5201_device::nes_vt5201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, NES_VT5201, tag, owner, clock), m_latch(0), m_dipsetting(0)
nes_vt5201_device::nes_vt5201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_VT5201, tag, owner, clock), m_latch(0), m_jumper(0)
{
}
@ -298,7 +298,7 @@ nes_bmc_hik300_device::nes_bmc_hik300_device(const machine_config &mconfig, cons
{
}
nes_bmc_s700_device::nes_bmc_s700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
nes_bmc_s700_device::nes_bmc_s700_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_S700, tag, owner, clock)
{
}
@ -323,12 +323,12 @@ nes_bmc_12in1_device::nes_bmc_12in1_device(const machine_config &mconfig, const
{
}
nes_bmc_20in1_device::nes_bmc_20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
nes_bmc_20in1_device::nes_bmc_20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_20IN1, tag, owner, clock)
{
}
nes_bmc_21in1_device::nes_bmc_21in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
nes_bmc_21in1_device::nes_bmc_21in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_21IN1, tag, owner, clock)
{
}
@ -614,17 +614,16 @@ void nes_vt5201_device::device_start()
{
common_start();
save_item(NAME(m_latch));
save_item(NAME(m_dipsetting));
save_item(NAME(m_jumper));
}
void nes_vt5201_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg32(0);
chr8(0, m_chr_source);
chr8(0, CHRROM);
m_latch = 0;
m_dipsetting = 0;
m_jumper = 0;
}
void nes_bmc_80013b_device::device_start()
@ -827,18 +826,6 @@ void nes_bmc_hik300_device::pcb_reset()
chr8(0, CHRROM);
}
void nes_bmc_s700_device::device_start()
{
common_start();
}
void nes_bmc_s700_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg32(0);
chr8(0, m_chr_source);
}
void nes_bmc_ball11_device::device_start()
{
common_start();
@ -913,32 +900,6 @@ void nes_bmc_12in1_device::pcb_reset()
update_banks();
}
void nes_bmc_20in1_device::device_start()
{
common_start();
}
void nes_bmc_20in1_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg16_89ab(0);
prg16_cdef(m_prg_chunks - 1);
chr8(0, m_chr_source);
set_nt_mirroring(PPU_MIRROR_VERT);
}
void nes_bmc_21in1_device::device_start()
{
common_start();
}
void nes_bmc_21in1_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg32(0);
chr8(0, m_chr_source);
}
void nes_bmc_35in1_device::device_start()
{
common_start();
@ -1576,36 +1537,41 @@ void nes_bmc_190in1_device::write_h(offs_t offset, u8 data)
/*-------------------------------------------------
BMC-VT5201
BMC-VT5201, BMC-T3H53, BMC-D1038
Games: Super 35 in 1, TN 95 in 1, 46 in 1, 65 in 1,
74 in 1, 77 in 1
iNES: mapper 59
In MAME: Supported.
-------------------------------------------------*/
void nes_vt5201_device::write_h(offs_t offset, uint8_t data)
void nes_vt5201_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("vt5201 wirte_h, offset: %04x, data: %02x\n", offset, data));
LOG_MMC(("vt5201 write_h, offset: %04x, data: %02x\n", offset, data));
m_latch = BIT(offset, 8);
// not sure about this mirroring bit!!
// without it TN 95 in 1 has glitches in Lunar Ball; with it TN 95 in 1 has glitches in Galaxian!
set_nt_mirroring(BIT(data, 3) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
if (BIT(offset, 7))
if (!BIT(m_latch, 1)) // lock bit
{
prg16_89ab((offset >> 4) & 0x07);
prg16_cdef((offset >> 4) & 0x07);
m_latch = offset >> 8;
u8 bank = (offset >> 4) & 0x07;
u8 mode = !BIT(offset, 7);
prg16_89ab(bank & ~mode);
prg16_cdef(bank | mode);
chr8(offset & 0x07, CHRROM);
set_nt_mirroring(BIT(offset, 3) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
}
else
prg32((offset >> 5) & 0x03);
chr8(offset, CHRROM);
}
uint8_t nes_vt5201_device::read_h(offs_t offset)
u8 nes_vt5201_device::read_h(offs_t offset)
{
LOG_MMC(("bmc_vt5201 read_h, offset: %04x\n", offset));
// m_dipsetting = ioport("CARTDIPS")->read();
if (m_latch)
return m_dipsetting; // cart mode, depending on the Dip Switches (always zero atm, given we have no way to add cart-based DIPs)
if (BIT(m_latch, 0))
return (get_open_bus() & 0xfc) | m_jumper; // TODO: add jumper settings, m_jumper is 0 for now
else
return hi_access_rom(offset);
}
@ -2237,31 +2203,33 @@ void nes_bmc_hik300_device::write_h(offs_t offset, u8 data)
BMC-SUPER-700IN1
Unknown Bootleg Multigame Board
Games: Super 700 in 1
Games: Super 700 in 1, Super 190 in 1
iNES: mapper 62
In MESS: Supported.
In MAME: Supported.
TODO:
- Investigate why Gradius menu items 643-649 crash
700-in-1 after pressing start at title screen.
Gradius works from other menu numbers fine.
- Slalom and Star Force have the wrong mirroring
on 190-in-1. Bug on cart, bad dump, or is there
another bit that affects mirroring?
-------------------------------------------------*/
void nes_bmc_s700_device::write_h(offs_t offset, uint8_t data)
void nes_bmc_s700_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bmc_s700 write_h, offset :%04x, data: %02x\n", offset, data));
LOG_MMC(("bmc_s700 write_h, offset: %04x, data: %02x\n", offset, data));
chr8(((offset & 0x1f) << 2) | (data & 0x03), CHRROM);
u8 bank = (offset & 0x40) | ((offset >> 8) & 0x3f);
u8 mode = !BIT(offset, 5);
prg16_89ab(bank & ~mode);
prg16_cdef(bank | mode);
if (offset & 0x20)
{
prg16_89ab((offset & 0x40) | ((offset >> 8) & 0x3f));
prg16_cdef((offset & 0x40) | ((offset >> 8) & 0x3f));
}
else
{
prg32(((offset & 0x40) | ((offset >> 8) & 0x3f)) >> 1);
}
set_nt_mirroring(BIT(data, 7) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
chr8((offset & 0x1f) << 2 | (data & 0x03), CHRROM);
set_nt_mirroring(BIT(offset, 7) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
}
/*-------------------------------------------------
@ -2454,18 +2422,17 @@ void nes_bmc_12in1_device::write_h(offs_t offset, uint8_t data)
iNES: mapper 231
In MESS: Supported.
In MAME: Supported.
-------------------------------------------------*/
void nes_bmc_20in1_device::write_h(offs_t offset, uint8_t data)
void nes_bmc_20in1_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bmc_20in1 write_h, offset: %04x, data: %02x\n", offset, data));
set_nt_mirroring(BIT(data, 7) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
prg16_89ab((offset & 0x1e));
prg16_cdef((offset & 0x1e) | ((offset & 0x20) ? 1 : 0));
prg16_89ab(offset & 0x1e);
prg16_cdef((offset & 0x1e) | BIT(offset, 5));
set_nt_mirroring(BIT(offset, 7) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
}
/*-------------------------------------------------
@ -2477,11 +2444,11 @@ void nes_bmc_20in1_device::write_h(offs_t offset, uint8_t data)
iNES: mapper 201
In MESS: Supported.
In MAME: Supported.
-------------------------------------------------*/
void nes_bmc_21in1_device::write_h(offs_t offset, uint8_t data)
void nes_bmc_21in1_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bmc_21in1 write_h, offset: %04x, data: %02x\n", offset, data));

View File

@ -265,10 +265,10 @@ class nes_vt5201_device : public nes_nrom_device
{
public:
// construction/destruction
nes_vt5201_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_vt5201_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual uint8_t read_h(offs_t offset) override;
virtual void write_h(offs_t offset, uint8_t data) override;
virtual u8 read_h(offs_t offset) override;
virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
@ -277,7 +277,7 @@ protected:
virtual void device_start() override;
private:
uint8_t m_latch, m_dipsetting;
u8 m_latch, m_jumper;
};
@ -645,15 +645,9 @@ class nes_bmc_s700_device : public nes_nrom_device
{
public:
// construction/destruction
nes_bmc_s700_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_bmc_s700_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void write_h(offs_t offset, uint8_t data) override;
virtual void pcb_reset() override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void write_h(offs_t offset, u8 data) override;
};
@ -753,15 +747,9 @@ class nes_bmc_20in1_device : public nes_nrom_device
{
public:
// construction/destruction
nes_bmc_20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_bmc_20in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void write_h(offs_t offset, uint8_t data) override;
virtual void pcb_reset() override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void write_h(offs_t offset, u8 data) override;
};
@ -771,15 +759,9 @@ class nes_bmc_21in1_device : public nes_nrom_device
{
public:
// construction/destruction
nes_bmc_21in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_bmc_21in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void write_h(offs_t offset, uint8_t data) override;
virtual void pcb_reset() override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void write_h(offs_t offset, u8 data) override;
};

View File

@ -367,8 +367,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("novel2", NES_NOVEL2); // mapper 213... same as BMC-NOVELDIAMOND9999999IN1 board?
device.option_add_internal("studyngame", NES_STUDYNGAME); // mapper 39
device.option_add_internal("sgun20in1", NES_SUPERGUN20IN1);
device.option_add_internal("bmc_vt5201", NES_VT5201); // mapper 59?
device.option_add_internal("bmc_d1038", NES_VT5201); // mapper 59?
device.option_add_internal("bmc_vt5201", NES_VT5201); // mapper 59
device.option_add_internal("bmc_60311c", NES_BMC_60311C);
device.option_add_internal("bmc_80013b", NES_BMC_80013B);
device.option_add_internal("bmc_810544c", NES_BMC_810544C);

View File

@ -91,7 +91,7 @@ static const nes_mmc mmc_list[] =
{ 56, KAISER_KS202 },
{ 57, BMC_GKA },
{ 58, BMC_GKB },
// 59 BMC-T3H53 and BMC-D1038
{ 59, BMC_VT5201 }, // and BMC-T3H53, BMC-D1038
{ 60, BMC_4IN1RESET },
{ 61, RCM_TF9IN1 },
{ 62, BMC_SUPER_700IN1 },

View File

@ -252,8 +252,7 @@ static const nes_pcb pcb_list[] =
{ "novel2", BMC_NOVEL2 }, // mapper 213... same as BMC-NOVELDIAMOND9999999IN1 board?
{ "studyngame", UNL_STUDYNGAME }, // mapper 39
{ "sgun20in1", BMC_SUPERGUN_20IN1 },
{ "bmc_vt5201", BMC_VT5201 }, // mapper 59?
{ "bmc_d1038", BMC_VT5201 }, // mapper 59?
{ "bmc_vt5201", BMC_VT5201 }, // mapper 59
{ "bmc_60311c", BMC_60311C },
{ "bmc_80013b", BMC_80013B },
{ "bmc_810544c", BMC_810544C },

View File

@ -114,7 +114,7 @@ static const unif unif_list[] =
{ "UNL-YOKO", 0, 0, CHRRAM_0, YOKO_BOARD}, // similar to mapper 83, but not the same
{ "UNL-FS304", 0, 8, CHRRAM_8, WAIXING_FS304}, // used in Zelda 3 by Waixing
{ "UNL-43272", 0, 0, CHRRAM_0, UNL_43272}, // used in Gaau Hok Gwong Cheung
{ "BTL-MARIO1-MALEE2", 0, 0, CHRRAM_0, UNL_MMALEE}, // mapper 55?
{ "BTL-MARIO1-MALEE2", 0, 0, CHRRAM_0, UNL_MMALEE}, // mapper 55
{ "BMC-FK23C", 0, 0, CHRRAM_0, BMC_FK23C},
{ "BMC-FK23CA", 0, 0, CHRRAM_0, BMC_FK23CA},
{ "BMC-GHOSTBUSTERS63IN1", 0, 0, CHRRAM_8, BMC_G63IN1 },
@ -123,7 +123,7 @@ static const unif unif_list[] =
{ "BMC-411120-C", 0, 0, CHRRAM_0, BMC_411120C},
{ "BMC-8157", 0, 0, CHRRAM_8, BMC_8157},
{ "BMC-830118C", 0, 0, CHRRAM_0, BMC_830118C},
{ "BMC-D1038", 0, 0, CHRRAM_0, BMC_VT5201}, // mapper 60?
{ "BMC-D1038", 0, 0, CHRRAM_0, BMC_VT5201}, // mapper 59
{ "BMC-SUPERVISION16IN1", 0, 0, CHRRAM_0, SVISION16_BOARD}, // mapper 53
{ "BMC-NTD-03", 0, 0, CHRRAM_0, BMC_NTD_03},
{ "UNL-AC08", 0, 0, CHRRAM_0, UNL_AC08},