summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2021-09-20 10:21:31 -0800
committer GitHub <noreply@github.com>2021-09-21 04:21:31 +1000
commit501c949c257dcd6b4db084ea8f293f6a319d2ad0 (patch)
tree76917098fc51bfa2b839ec20a93c93e4fade2f03 /src/devices/bus/nes
parentda1af2b0d6816a5da1544176b882407bd0dad2ee (diff)
bus/nes: Several small separate fixes. (#8580)
* Fixed empty menu in Supervision 16 in 1. * Fixed softlist loading of GB 63 in 1 and hooked it up with a compatible board type. Removed old partially-working code. * Removed a spurious line in PCB loader that set WRAM in SMB2J bootlegs--they don't have any! Software list items promoted to working (nes.xml) --------------------------------------- Ghostbusters 63 in 1 Super 128k - 16 in 1
Diffstat (limited to 'src/devices/bus/nes')
-rw-r--r--src/devices/bus/nes/bootleg.cpp2
-rw-r--r--src/devices/bus/nes/multigame.cpp153
-rw-r--r--src/devices/bus/nes/multigame.h37
-rw-r--r--src/devices/bus/nes/nes_carts.cpp1
-rw-r--r--src/devices/bus/nes/nes_pcb.hxx5
-rw-r--r--src/devices/bus/nes/nes_slot.h2
-rw-r--r--src/devices/bus/nes/nes_unif.hxx2
7 files changed, 49 insertions, 153 deletions
diff --git a/src/devices/bus/nes/bootleg.cpp b/src/devices/bus/nes/bootleg.cpp
index 52990004f14..4382bf7ec43 100644
--- a/src/devices/bus/nes/bootleg.cpp
+++ b/src/devices/bus/nes/bootleg.cpp
@@ -1270,7 +1270,7 @@ u8 nes_smb2j_device::read_l(offs_t offset)
if (offset >= 0x1000)
return m_prg[0x10000 + (offset & 0x0fff)];
- return get_open_bus(); // open bus
+ return get_open_bus();
}
u8 nes_smb2j_device::read_m(offs_t offset)
diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp
index 05f0b9e1aef..58679f5ea1e 100644
--- a/src/devices/bus/nes/multigame.cpp
+++ b/src/devices/bus/nes/multigame.cpp
@@ -48,7 +48,6 @@ DEFINE_DEVICE_TYPE(NES_BMC_830928C, nes_bmc_830928c_device, "nes_bmc_83092
DEFINE_DEVICE_TYPE(NES_BMC_850437C, nes_bmc_850437c_device, "nes_bmc_850437c", "NES Cart BMC 850437C PCB")
DEFINE_DEVICE_TYPE(NES_NTD03, nes_ntd03_device, "nes_ntd03", "NES Cart NTD-03 PCB")
DEFINE_DEVICE_TYPE(NES_BMC_CTC09, nes_bmc_ctc09_device, "nes_bmc_ctc09", "NES Cart BMC CTC-09 PCB")
-DEFINE_DEVICE_TYPE(NES_BMC_GB63, nes_bmc_gb63_device, "nes_bmc_gb63", "NES Cart BMC Ghostbusters 63 in 1 PCB")
DEFINE_DEVICE_TYPE(NES_BMC_GKA, nes_bmc_gka_device, "nes_bmc_gka", "NES Cart BMC GK-A PCB")
DEFINE_DEVICE_TYPE(NES_BMC_GKB, nes_bmc_gkb_device, "nes_bmc_gkb", "NES Cart BMC GK-B PCB")
DEFINE_DEVICE_TYPE(NES_BMC_GKCXIN1, nes_bmc_gkcxin1_device, "nes_bmc_gkcxin1", "NES Cart BMC GKCXIN1 PCB")
@@ -134,7 +133,7 @@ nes_rumblestat_device::nes_rumblestat_device(const machine_config &mconfig, cons
{
}
-nes_svision16_device::nes_svision16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+nes_svision16_device::nes_svision16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_SVISION16, tag, owner, clock), m_latch1(0), m_latch2(0)
{
}
@@ -214,11 +213,6 @@ nes_bmc_ctc09_device::nes_bmc_ctc09_device(const machine_config &mconfig, const
{
}
-nes_bmc_gb63_device::nes_bmc_gb63_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : nes_nrom_device(mconfig, NES_BMC_GB63, tag, owner, clock), m_latch(0), m_dipsetting(0), m_vram_disable(0)
-{
-}
-
nes_bmc_gka_device::nes_bmc_gka_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_GKA, tag, owner, clock)
{
@@ -502,9 +496,8 @@ void nes_svision16_device::device_start()
void nes_svision16_device::pcb_reset()
{
- m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg32(0);
- chr8(0, m_chr_source);
+ chr8(0, CHRRAM);
m_latch1 = 0;
m_latch2 = 0;
@@ -683,29 +676,6 @@ void nes_bmc_ctc09_device::pcb_reset()
// contents?). Soft reset can similarly crash the main menu (BTANB?).
}
-void nes_bmc_gb63_device::device_start()
-{
- common_start();
- save_item(NAME(m_latch));
- save_item(NAME(m_dipsetting));
- save_item(NAME(m_reg));
- save_item(NAME(m_vram_disable));
-}
-
-void nes_bmc_gb63_device::pcb_reset()
-{
- prg16_89ab(0);
- prg16_cdef(0xfff);
- chr8(0, CHRRAM);
-
- m_latch = 0;
- m_dipsetting = 0;
- m_reg[0] = 0;
- m_reg[1] = 0;
- update_banks();
- m_vram_disable = 0;
-}
-
void nes_bmc_gka_device::device_start()
{
common_start();
@@ -1246,52 +1216,57 @@ void nes_rumblestat_device::write_h(offs_t offset, uint8_t data)
Games: Supervision 16 in 1
+ This cart contains a 32KB boot menu that selects
+ games from a separate 2MB of ROM. The common iNES
+ file arbitrarily puts this first before the 2MB ROM.
+ A simpler alternate approach would be to place the
+ 32KB menu at the end of contiguous PRG. In that case
+ pcb_reset should be changed to point to the last
+ part of PRG and the +2s and +4 below can be removed.
+
iNES: mapper 53
- In MESS: Partially Supported. (the dump contains 32KB of
- EEPROM which is not currently handled well)
+ In MAME: Supported.
-------------------------------------------------*/
void nes_svision16_device::update_prg()
{
- int base = (m_latch1 & 0x0f) << 3;
- if (m_latch1 & 0x10)
+ if (BIT(m_latch1, 4))
{
- prg16_89ab((base | (m_latch2 & 7)) + 2); // +2 due to the eeprom
- prg16_cdef((base | 0x07) + 2); // +2 due to the eeprom
+ u8 bank = (m_latch1 & 0x0f) << 3 | (m_latch2 & 0x07);
+ prg16_89ab(bank + 2); // +2 due to the 32KB menu
+ prg16_cdef((bank | 0x07) + 2); // +2 due to the 32KB menu
}
- else
- {
- prg16_89ab(0);
- prg16_cdef(1);
- }
-
}
-uint8_t nes_svision16_device::read_m(offs_t offset)
-{
- int bank = (((m_latch1 & 0x0f) << 4) | 0x0f) + 4 ; // +4 due to the eeprom
- LOG_MMC(("svision16 read_m, offset: %04x\n", offset));
- return m_prg[((bank * 0x2000) + (offset & 0x1fff)) & m_prg_mask];
-}
-
-void nes_svision16_device::write_m(offs_t offset, uint8_t data)
+void nes_svision16_device::write_m(offs_t offset, u8 data)
{
LOG_MMC(("svision16 write_m, offset: %04x, data: %02x\n", offset, data));
- m_latch1 = data;
- update_prg();
- set_nt_mirroring(BIT(data, 5) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
+ if (!BIT(m_latch1, 4))
+ {
+ m_latch1 = data;
+ update_prg();
+ set_nt_mirroring(BIT(m_latch1, 5) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
+ }
}
-void nes_svision16_device::write_h(offs_t offset, uint8_t data)
+void nes_svision16_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("svision16 write_h, offset: %04x, data: %02x\n", offset, data));
m_latch2 = data;
update_prg();
}
+u8 nes_svision16_device::read_m(offs_t offset)
+{
+ LOG_MMC(("svision16 read_m, offset: %04x\n", offset));
+
+ u8 bank = m_latch1 << 4 | 0x0f;
+ return m_prg[((bank + 4) * 0x2000 + offset) % m_prg_size]; // +4 due to the 32KB menu
+}
+
/*-------------------------------------------------
Bootleg Board KN-42
@@ -1692,60 +1667,6 @@ void nes_bmc_ctc09_device::write_h(offs_t offset, u8 data)
/*-------------------------------------------------
- BMC-GHOSTBUSTERS63IN1
-
- in MESS: only preliminar support
-
- -------------------------------------------------*/
-
-void nes_bmc_gb63_device::chr_w(offs_t offset, uint8_t data)
-{
- int bank = offset >> 10;
-
- if (!m_vram_disable)
- m_chr_access[bank][offset & 0x3ff] = data;
-}
-
-void nes_bmc_gb63_device::update_banks()
-{
- set_nt_mirroring(BIT(m_reg[0], 6) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ);
-
- if (BIT(m_reg[0], 5))
- {
- prg16_89ab(m_reg[0] & 0x1f);
- prg16_cdef(m_reg[0] & 0x1f);
- }
- else
- prg32((m_reg[0] & 0x1f) >> 1);
-
-// according to FCEUMM source, the game should be able to disable the VRAM, but this stops the game from working
-// maybe the VRAM disable does not work at start?
-// m_vram_disable = BIT(m_reg[1], 1) ? 0 : 1;
-}
-
-void nes_bmc_gb63_device::write_h(offs_t offset, uint8_t data)
-{
- LOG_MMC(("bmc_gb63 write_h, offset: %04x, data: %02x\n", offset, data));
-
- m_reg[offset & 1] = data;
- m_latch = BIT(m_reg[0], 7) | (BIT(m_reg[1], 0) << 1);
- update_banks();
-}
-
-uint8_t nes_bmc_gb63_device::read_h(offs_t offset)
-{
- LOG_MMC(("bmc_gb63 read_h, offset: %04x\n", offset));
- // m_dipsetting = ioport("CARTDIPS")->read();
-
- if (m_latch == 1)
- return get_open_bus(); // open bus
- else
- return hi_access_rom(offset);
-}
-
-
-/*-------------------------------------------------
-
Board BMC-GKA
Unknown Bootleg Multigame Board
@@ -2608,15 +2529,23 @@ void nes_bmc_72in1_device::write_h(offs_t offset, u8 data)
/*-------------------------------------------------
- BMC-76IN1, BMC-SUPER42IN1
+ BMC-76IN1, BMC-SUPER42IN1, BMC-GHOSTBUSTERS63IN1
Unknown Bootleg Multigame Board
- Games: 76 in 1, Super 42 in 1
+ Games: 76 in 1, Super 42 in 1, Ghostbusters 63 in 1
iNES: mapper 226
In MAME: Supported.
+ TODO: Investigate nature of GB63's PCB. It likely has
+ three 512KB chips and it seems the two high-order bits
+ here select between them. However, 0,1 select the first
+ chip and 2,3 correspond to the other two respectively.
+ Does the PCB have an empty socket for a fourth chip in
+ position 1? We mirror the first chip by reloading in
+ the softlist, but should this really be open bus?
+
-------------------------------------------------*/
void nes_bmc_76in1_device::write_h(offs_t offset, u8 data)
diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h
index f2381ed955b..fe4a780691c 100644
--- a/src/devices/bus/nes/multigame.h
+++ b/src/devices/bus/nes/multigame.h
@@ -98,11 +98,11 @@ class nes_svision16_device : public nes_nrom_device
{
public:
// construction/destruction
- nes_svision16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ nes_svision16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
- virtual uint8_t read_m(offs_t offset) override;
- 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;
@@ -112,7 +112,7 @@ protected:
private:
void update_prg();
- uint8_t m_latch1, m_latch2;
+ u8 m_latch1, m_latch2;
};
@@ -380,32 +380,6 @@ public:
};
-// ======================> nes_bmc_gb63_device
-
-class nes_bmc_gb63_device : public nes_nrom_device
-{
-public:
- // construction/destruction
- nes_bmc_gb63_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
- virtual uint8_t read_h(offs_t offset) override;
- virtual void write_h(offs_t offset, uint8_t data) override;
- virtual void chr_w(offs_t offset, uint8_t data) override;
-
- virtual void pcb_reset() override;
-
-protected:
- // device-level overrides
- virtual void device_start() override;
-
-private:
- void update_banks();
- uint8_t m_latch, m_dipsetting;
- uint8_t m_reg[2];
- int m_vram_disable;
-};
-
-
// ======================> nes_bmc_gka_device
class nes_bmc_gka_device : public nes_nrom_device
@@ -1151,7 +1125,6 @@ DECLARE_DEVICE_TYPE(NES_BMC_830928C, nes_bmc_830928c_device)
DECLARE_DEVICE_TYPE(NES_BMC_850437C, nes_bmc_850437c_device)
DECLARE_DEVICE_TYPE(NES_NTD03, nes_ntd03_device)
DECLARE_DEVICE_TYPE(NES_BMC_CTC09, nes_bmc_ctc09_device)
-DECLARE_DEVICE_TYPE(NES_BMC_GB63, nes_bmc_gb63_device)
DECLARE_DEVICE_TYPE(NES_BMC_GKA, nes_bmc_gka_device)
DECLARE_DEVICE_TYPE(NES_BMC_GKB, nes_bmc_gkb_device)
DECLARE_DEVICE_TYPE(NES_BMC_GKCXIN1, nes_bmc_gkcxin1_device)
diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp
index 6542b54cb73..eb35338a381 100644
--- a/src/devices/bus/nes/nes_carts.cpp
+++ b/src/devices/bus/nes/nes_carts.cpp
@@ -379,7 +379,6 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("n32_4in1", NES_N32_4IN1);
device.option_add_internal("ntd03", NES_NTD03);
device.option_add_internal("bmc_ctc09", NES_BMC_CTC09);
- device.option_add_internal("bmc_gb63", NES_BMC_GB63);
device.option_add_internal("bmc_gka", NES_BMC_GKA);
device.option_add_internal("bmc_gkb", NES_BMC_GKB);
device.option_add_internal("bmc_gkcxin1", NES_BMC_GKCXIN1);
diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx
index ac1eb21ea54..c6982660d52 100644
--- a/src/devices/bus/nes/nes_pcb.hxx
+++ b/src/devices/bus/nes/nes_pcb.hxx
@@ -263,7 +263,6 @@ static const nes_pcb pcb_list[] =
{ "n32_4in1", BMC_N32_4IN1 },
{ "ntd03", BMC_NTD_03 },
{ "bmc_ctc09", BMC_CTC09 },
- { "bmc_gb63", BMC_G63IN1 },
{ "bmc_gka", BMC_GKA },
{ "bmc_gkb", BMC_GKB },
{ "bmc_gkcxin1", BMC_GKCXIN1 },
@@ -688,10 +687,6 @@ void nes_cart_slot_device::call_load_pcb()
if (prgram_size)
m_cart->prgram_alloc(prgram_size);
- // also nes_smb2j_device needs WRAM initialized to 0xff? check!
- if (m_pcb_id == UNL_SMB2J)
- memset(m_cart->get_prgram_base(), 0xff, prgram_size);
-
// Attempt to load a battery file for this ROM
// A few boards have internal RAM with a battery (MMC6, Taito X1-005 & X1-017, etc.)
if (battery_size || mapper_sram_size)
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index 965cbffd4e0..fb2d481c119 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -97,7 +97,7 @@ enum
BMC_70IN1, BMC_500IN1, BMC_800IN1, BMC_1200IN1,
BMC_GKA, BMC_GKB, BMC_GKCXIN1, BMC_HP898F, BMC_VT5201, BMC_BENSHIENG,
BMC_60311C, BMC_80013B, BMC_810544C, BMC_830425C, BMC_830928C, BMC_850437C,
- BMC_N32_4IN1, BMC_NT639, BMC_NTD_03, BMC_G63IN1,
+ BMC_N32_4IN1, BMC_NT639, BMC_NTD_03,
BMC_FCGENJIN_8IN1, BMC_FK23C, BMC_FK23CA, BMC_JY820845C,
BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146,
BMC_2751, BMC_8157, BMC_00202650,
diff --git a/src/devices/bus/nes/nes_unif.hxx b/src/devices/bus/nes/nes_unif.hxx
index 55e8319dd4e..66eb6a00e90 100644
--- a/src/devices/bus/nes/nes_unif.hxx
+++ b/src/devices/bus/nes/nes_unif.hxx
@@ -117,7 +117,7 @@ static const unif unif_list[] =
{ "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 },
+ { "BMC-GHOSTBUSTERS63IN1", 0, 0, CHRRAM_8, BMC_76IN1 },
{ "BMC-BS-5", 0, 0, CHRRAM_0, BMC_BENSHIENG},
{ "BMC-810544-C-A1", 0, 0, CHRRAM_0, BMC_810544C},
{ "BMC-411120-C", 0, 0, CHRRAM_0, BMC_411120C},