summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2021-07-29 13:49:05 -0800
committer GitHub <noreply@github.com>2021-07-29 17:49:05 -0400
commit946ad8b3398eff7a10d16d1e1e4ca456fe215a3f (patch)
tree75ba402a1cef8e5beaf715b3b8167b35829cc0fb
parent2bdab107daf27d02fa70ae955db71626e3465f52 (diff)
bus/nes: Fixed the 3 non-working games in 11 in 1 Ball Series multicart. (#8373)
- Fixed games: Volleyball, Paddle, Dynamite Bowling
-rw-r--r--hash/nes.xml2
-rw-r--r--src/devices/bus/nes/multigame.cpp57
-rw-r--r--src/devices/bus/nes/multigame.h11
3 files changed, 31 insertions, 39 deletions
diff --git a/hash/nes.xml b/hash/nes.xml
index f233eb5b687..2f42bbb9221 100644
--- a/hash/nes.xml
+++ b/hash/nes.xml
@@ -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">
diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp
index 511bf8856cb..4d299a7bebb 100644
--- a/src/devices/bus/nes/multigame.cpp
+++ b/src/devices/bus/nes/multigame.cpp
@@ -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.
-------------------------------------------------*/
diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h
index f52d637a117..16b6ffb4182 100644
--- a/src/devices/bus/nes/multigame.h
+++ b/src/devices/bus/nes/multigame.h
@@ -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];
};