bus/nes: Fixed the 3 non-working games in 11 in 1 Ball Series multicart. (#8373)

- Fixed games: Volleyball, Paddle, Dynamite Bowling
This commit is contained in:
0kmg 2021-07-29 13:49:05 -08:00 committed by GitHub
parent 2bdab107da
commit 946ad8b339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 39 deletions

View File

@ -77577,7 +77577,7 @@ be better to redump them properly. -->
</software>
<software name="mc_11bal">
<description>11 in 1 Ball Games</description>
<description>11 in 1 Ball Series</description>
<year>19??</year>
<publisher>&lt;pirate&gt;</publisher>
<part name="cart" interface="nes_cart">

View File

@ -228,7 +228,7 @@ nes_bmc_s700_device::nes_bmc_s700_device(const machine_config &mconfig, const ch
{
}
nes_bmc_ball11_device::nes_bmc_ball11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
nes_bmc_ball11_device::nes_bmc_ball11_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_BALL11, tag, owner, clock)
{
}
@ -741,13 +741,11 @@ void nes_bmc_ball11_device::device_start()
void nes_bmc_ball11_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg32(0);
chr8(0, m_chr_source);
chr8(0, CHRRAM);
m_reg[0] = 1;
m_reg[0] = 2;
m_reg[1] = 0;
set_banks();
}
void nes_bmc_22games_device::device_start()
@ -1963,53 +1961,46 @@ void nes_bmc_s700_device::write_h(offs_t offset, uint8_t data)
BMC-BALLGAMES-11IN1
Known Boards: Unknown Multigame Bootleg Board
Games: 11 in 1 Ball Games
Games: 11 in 1 Ball Series
iNES: mapper 51
In MESS: Partially Supported.
In MAME: Supported.
-------------------------------------------------*/
void nes_bmc_ball11_device::set_banks()
u8 nes_bmc_ball11_device::read_m(offs_t offset)
{
set_nt_mirroring((m_reg[0] == 3) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
LOG_MMC(("bmc_ball11 read_m, offset: %04x, data: %02x\n", offset));
if (m_reg[0] & 0x01)
{
u8 bank = m_reg[1] << 2 | (m_reg[0] ? 0x23 : 0x2f);
return m_prg[bank * 0x2000 + offset];
}
void nes_bmc_ball11_device::update_prg()
{
if (m_reg[0])
prg32(m_reg[1]);
}
else
{
prg16_89ab((m_reg[1] << 1) | (m_reg[0] >> 1));
prg16_cdef((m_reg[1] << 1) | 0x07);
prg16_89ab(m_reg[1] << 1 | BIT(m_reg[1], 4));
prg16_cdef(m_reg[1] << 1 | 0x07);
}
}
void nes_bmc_ball11_device::write_m(offs_t offset, uint8_t data)
void nes_bmc_ball11_device::write_m(offs_t offset, u8 data)
{
LOG_MMC(("bmc_ball11 write_m, offset: %04x, data: %02x\n", offset, data));
m_reg[0] = ((data >> 1) & 0x01) | ((data >> 3) & 0x02);
set_banks();
set_nt_mirroring(BIT(data, 4) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
m_reg[0] = data & 0x02;
update_prg();
}
void nes_bmc_ball11_device::write_h(offs_t offset, uint8_t data)
void nes_bmc_ball11_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bmc_ball11 write_h, offset: %04x, data: %02x\n", offset, data));
switch (offset & 0x6000)
{
case 0x4000: // here we also update reg[0] upper bit
m_reg[0] = (m_reg[0] & 0x01) | ((data >> 3) & 0x02);
[[fallthrough]];
case 0x0000:
case 0x2000:
case 0x6000:
m_reg[1] = data & 0x0f;
set_banks();
break;
}
m_reg[1] = data & 0x1f;
update_prg();
}
/*-------------------------------------------------
@ -2203,7 +2194,7 @@ void nes_bmc_21in1_device::write_h(offs_t offset, uint8_t data)
iNES: mapper 229
In MESS: Supported.
In MAME: Supported.
-------------------------------------------------*/

View File

@ -565,10 +565,11 @@ class nes_bmc_ball11_device : public nes_nrom_device
{
public:
// construction/destruction
nes_bmc_ball11_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_bmc_ball11_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_h(offs_t offset, uint8_t data) override;
virtual u8 read_m(offs_t offset) override;
virtual void write_m(offs_t offset, u8 data) override;
virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
@ -577,8 +578,8 @@ protected:
virtual void device_start() override;
private:
void set_banks();
uint8_t m_reg[2];
void update_prg();
u8 m_reg[2];
};