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
This commit is contained in:
0kmg 2021-09-20 10:21:31 -08:00 committed by GitHub
parent da1af2b0d6
commit 501c949c25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 58 additions and 159 deletions

View File

@ -80675,15 +80675,19 @@ be better to redump them properly. -->
</part>
</software>
<software name="mc_63gb" supported="no">
<!-- The UNIF file contained separate PRG banks -->
<software name="mc_63gb">
<description>Ghostbusters 63 in 1</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_gb63" />
<feature name="slot" value="bmc_76in1" />
<feature name="pcb" value="BMC-GHOSTBUSTERS63IN1" />
<dataarea name="prg" size="1572864">
<rom name="63-in-1 (ghostbusters63in1) [p1][u].prg" size="1572864" crc="54f2e672" sha1="d5316ddc53a4a70f99f80a0d4c9831b4835e0050" offset="00000" status="baddump" />
<dataarea name="prg" size="2097152">
<rom name="63-in-1 (ghostbusters63in1) [p1][u].prg0" size="524288" crc="64750df8" sha1="cfc6bd97c38061e344e37a2ce5d46d703fc1ee77" offset="0x000000" status="baddump" />
<rom size="524288" offset="0x080000" loadflag="reload" />
<rom name="63-in-1 (ghostbusters63in1) [p1][u].prg2" size="524288" crc="d01373cf" sha1="f26875339384d3700a9493d7044eb67fbc709c7b" offset="0x100000" status="baddump" />
<rom name="63-in-1 (ghostbusters63in1) [p1][u].prg3" size="524288" crc="561d4e03" sha1="170a43555a0883f18edc97d806430abbeec6bc83" offset="0x180000" status="baddump" />
</dataarea>
<!-- 8k VRAM on cartridge -->
<dataarea name="vram" size="8192">
@ -82664,7 +82668,7 @@ to check why this is different -->
</software>
<!-- The UNIF file contained separate PRG banks -->
<software name="mc_16sv" supported="no">
<software name="mc_16sv">
<description>Super 128k - 16 in 1</description>
<year>19??</year>
<publisher>Supervision</publisher>

View File

@ -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)

View File

@ -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
@ -1690,60 +1665,6 @@ void nes_bmc_ctc09_device::write_h(offs_t offset, u8 data)
chr8(data & 0x0f, CHRROM);
}
/*-------------------------------------------------
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
@ -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)

View File

@ -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)

View File

@ -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);

View File

@ -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)

View File

@ -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,

View File

@ -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},

View File

@ -79,7 +79,6 @@ void nes_state::machine_start()
BMC_70IN1,
BMC_800IN1,
BMC_8157,
BMC_G63IN1,
BMC_GOLD150,
BMC_VT5201,
BTL_PALTHENA,