bus/nes: Fixed BMC 411120-C cartridge emulation and added a compatible game. (#8416)

New working software list additions
-----------------------------------
19 in 1 (K-3088) [anonymous]

Software list items promoted to working
---------------------------------------
4 in 1 (411120-C)
This commit is contained in:
0kmg 2021-08-10 09:51:46 -08:00 committed by GitHub
parent c354d8d203
commit 9be98f7c8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 26 deletions

View File

@ -78154,6 +78154,21 @@ be better to redump them properly. -->
</part>
</software>
<software name="mc_19k88">
<description>19 in 1 (K-3088)</description>
<year>199?</year>
<publisher>&lt;pirate&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_411120c" />
<dataarea name="prg" size="1048576">
<rom name="19-in-1 (k-3088) (810849-c).prg" size="1048576" crc="0fccb6f0" sha1="62c199c71f06a1023bd080f48628e21c713a2c62" status="baddump" />
</dataarea>
<dataarea name="chr" size="1048576">
<rom name="19-in-1 (k-3088) (810849-c).chr" size="1048576" crc="32b3d63f" sha1="292227a5a98659d3d478fa6425042896cdb60f0c" status="baddump" />
</dataarea>
</part>
</software>
<software name="mc_190">
<description>190 in 1</description>
<year>19??</year>
@ -78920,10 +78935,10 @@ be better to redump them properly. -->
</part>
</software>
<software name="mc_4c20" supported="no">
<software name="mc_4c20">
<description>4 in 1 (411120-C)</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<year>199?</year>
<publisher>&lt;pirate&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_411120c" />
<feature name="pcb" value="BMC-411120-C" />

View File

@ -251,7 +251,7 @@ nes_bmc_k3006_device::nes_bmc_k3006_device(const machine_config &mconfig, const
{
}
nes_bmc_411120c_device::nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
nes_bmc_411120c_device::nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_txrom_device(mconfig, NES_BMC_411120C, tag, owner, clock), m_reg(0)
{
}
@ -642,7 +642,7 @@ void nes_bmc_411120c_device::pcb_reset()
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
m_reg = 0;
mmc3_common_initialize(0x7f, 0x7f, 0);
mmc3_common_initialize(0x0f, 0x7f, 0);
}
void nes_bmc_830118c_device::device_start()
@ -2550,36 +2550,41 @@ void nes_bmc_k3006_device::write_m(offs_t offset, u8 data)
/*-------------------------------------------------
BMC-411120C
BMC-411120C, BMC-810849-C
Games: 4 in 1, 19 in 1
MMC3 clone
MMC3 clone with banking for multigame menu.
NES 2.0: mapper 287
In MESS: Very Preliminary Support
In MAME: Supported.
-------------------------------------------------*/
void nes_bmc_411120c_device::prg_cb(int start, int bank)
{
if (m_reg & 8) // & 0xc when DSW change (diff menu?)
prg32(((m_reg >> 4) & 3) | 0x0c);
else
prg8_x(start, (bank & 0x0f) | ((m_reg & 0x03) << 4));
if (!BIT(m_reg, 3)) // all games use MMC3 PRG banking except Master Fighter II
nes_txrom_device::prg_cb(start, bank);
}
void nes_bmc_411120c_device::chr_cb(int start, int bank, int source)
{
chr1_x(start, bank | ((m_reg & 3) << 7), source);
}
void nes_bmc_411120c_device::write_m(offs_t offset, uint8_t data)
void nes_bmc_411120c_device::write_m(offs_t offset, u8 data)
{
LOG_MMC(("bmc_411120c write_m, offset: %04x, data: %02x\n", offset, data));
m_reg = data;
set_prg(m_prg_base, m_prg_mask);
set_chr(m_chr_source, m_chr_base, m_chr_mask);
if (BIT(m_wram_protect, 7))
{
m_reg = offset;
if (BIT(m_reg, 3))
prg32((m_reg & 0x07) << 2 | (m_reg & 0x30) >> 4);
else
{
m_prg_base = (m_reg & 0x07) << 4;
set_prg(m_prg_base, m_prg_mask);
}
m_chr_base = (m_reg & 0x07) << 7;
set_chr(m_chr_source, m_chr_base, m_chr_mask);
}
}
/*-------------------------------------------------

View File

@ -692,11 +692,10 @@ class nes_bmc_411120c_device : public nes_txrom_device
{
public:
// construction/destruction
nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void write_m(offs_t offset, uint8_t data) override;
virtual void write_m(offs_t offset, u8 data) override;
virtual void prg_cb(int start, int bank) override;
virtual void chr_cb(int start, int bank, int source) override;
virtual void pcb_reset() override;
@ -705,7 +704,7 @@ protected:
virtual void device_start() override;
private:
uint8_t m_reg;
u8 m_reg;
};

View File

@ -322,7 +322,7 @@ static const nes_mmc mmc_list[] =
// 284 UNL_DRIPGAME, not in nes.xml
{ 285, BMC_A65AS },
{ 286, BMC_BENSHIENG },
{ 287, BMC_411120C }, // also BMC-K-3088, not in nes.xml?
{ 287, BMC_411120C },
// 288 GKCX1 21 in 1 multicarts, not in nes.xml?
// { 289, BMC_60311C }, not in nes.xml?
{ 290, BMC_NTD_03 },