bus/nes: Updates for Camerica/Codemasters boards. (#9647)

- BF9096: Added alternate paging required by certain dumps. Fixes menu items that didn't load or were crisscrossed.
- Golden Five: Corrected reset/game lock behavior according to reverse engineered hardware info.
This commit is contained in:
0kmg 2022-04-30 13:34:17 -08:00 committed by GitHub
parent 49f9318bff
commit 3587aed859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 118 additions and 92 deletions

View File

@ -30106,6 +30106,7 @@ license:CC0
</part>
</software>
<!-- Only Go Dizzy Go works -->
<software name="quatrarc" supported="partial">
<description>Quattro Arcade (USA)</description>
<year>1992</year>
@ -30124,7 +30125,8 @@ license:CC0
</part>
</software>
<software name="quatrspt" cloneof="supsport">
<!-- BMX Simulator doesn't respond to start on its title screen -->
<software name="quatrspt" cloneof="supsport" supported="partial">
<description>Quattro Sports (USA)</description>
<year>1991</year>
<publisher>Camerica</publisher>
@ -36501,8 +36503,8 @@ license:CC0
<year>19??</year>
<publisher>Codemasters</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bf9096" />
<feature name="pcb" value="CAMERICA-BF9096" />
<feature name="slot" value="bf9096a" />
<feature name="pcb" value="CAMERICA-BF9096-ALT" />
<feature name="pcb_model" value="NR8OV2-1" />
<feature name="u1" value="U1 PRG" />
<feature name="u2" value="U2 CHR" />
@ -51230,8 +51232,9 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
</part>
</software>
<software name="supsporta" cloneof="supsport">
<description>Super Sports Challenge (Euro, Plug-Thru Cart)</description>
<!-- BMX Simulator doesn't respond to start on its title screen -->
<software name="supsporta" cloneof="supsport" supported="partial">
<description>Super Sports Challenge (Euro, plug-thru cart)</description>
<year>19??</year>
<publisher>Codemasters</publisher>
<part name="cart" interface="nes_cart">
@ -51247,13 +51250,14 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
</part>
</software>
<software name="supsport">
<!-- BMX Simulator doesn't respond to start on its title screen -->
<software name="supsport" supported="partial">
<description>Super Sports Challenge (Euro)</description>
<year>19??</year>
<publisher>Codemasters</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bf9096" />
<feature name="pcb" value="CAMERICA-BF9096" />
<feature name="slot" value="bf9096a" />
<feature name="pcb" value="CAMERICA-BF9096-ALT" />
<feature name="mirroring" value="vertical" />
<dataarea name="prg" size="262144">
<rom name="super sports challenge (europe) (unl).prg" size="262144" crc="a045fe1d" sha1="6ec9f19845848130513f5ce359952afe56dcae8e" offset="00000" status="baddump" />
@ -85605,13 +85609,13 @@ be better to redump them properly. -->
</software>
<!-- Pegasus was a Polish NES clone -->
<software name="mc_pega4" supported="partial">
<description>Pegasus 4 in 1 ~ Golden Four (Pol)</description>
<year>19??</year>
<software name="mc_pega4">
<description>Pegasus 4 in 1 ~ Golden Four (Poland)</description>
<year>199?</year>
<publisher>&lt;pirate&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bf9096" />
<feature name="pcb" value="CAMERICA-BF9096" />
<feature name="slot" value="bf9096a" />
<feature name="pcb" value="CAMERICA-BF9096-ALT" />
<feature name="mirroring" value="vertical" />
<dataarea name="prg" size="262144">
<rom name="pegasus 4 in 1 (unl).prg" size="262144" crc="4b40cbd9" sha1="40409fec8249efdb772e6ffb2dcd41860c6cca23" offset="00000" status="baddump" />
@ -85623,9 +85627,9 @@ be better to redump them properly. -->
</software>
<!-- Pegasus was a Polish NES clone -->
<software name="mc_pega5">
<description>Pegasus 5 in 1 ~ Golden Five (Pol)</description>
<year>19??</year>
<software name="mc_pega5" supported="partial"> <!-- Big Nose Freaks out has the same issues as the singleton cart -->
<description>Pegasus 5 in 1 ~ Golden Five (Poland)</description>
<year>199?</year>
<publisher>&lt;pirate&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="goldenfive" />

View File

@ -17,9 +17,8 @@
TODO:
- check what causes flickering from PPU in Fire Hawk, Poogie and Big Nose (same PPU issue as Back to
Future 2&3?)
- not all the Golden Five games work. investigate!
- check what causes flickering from PPU in Fire Hawk, Pogie and Big Nose Freaks Out (same PPU issue as Back to Future 2&3?)
- mapper 232 games need properly dumped to determine if the "alt" BF9096 board really exists.
***********************************************************************************************************/
@ -43,21 +42,32 @@
DEFINE_DEVICE_TYPE(NES_BF9093, nes_bf9093_device, "nes_bf9093", "NES Cart Camerica BF9093 PCB")
DEFINE_DEVICE_TYPE(NES_BF9096, nes_bf9096_device, "nes_bf9096", "NES Cart Camerica BF9096 PCB")
DEFINE_DEVICE_TYPE(NES_BF9096A, nes_bf9096a_device, "nes_bf9096a", "NES Cart Camerica BF9096 Alt PCB")
DEFINE_DEVICE_TYPE(NES_GOLDEN5, nes_golden5_device, "nes_golden5", "NES Cart Camerica Golden 5 PCB")
nes_bf9093_device::nes_bf9093_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
nes_bf9093_device::nes_bf9093_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BF9093, tag, owner, clock)
{
}
nes_bf9096_device::nes_bf9096_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, NES_BF9096, tag, owner, clock), m_bank_base(0), m_latch(0)
nes_bf9096_device::nes_bf9096_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool page_swap)
: nes_nrom_device(mconfig, type, tag, owner, clock), m_reg(0), m_page_swap(page_swap)
{
}
nes_golden5_device::nes_golden5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, NES_GOLDEN5, tag, owner, clock), m_bank_base(0), m_latch(0)
nes_bf9096_device::nes_bf9096_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_bf9096_device(mconfig, NES_BF9096, tag, owner, clock, false)
{
}
nes_bf9096a_device::nes_bf9096a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_bf9096_device(mconfig, NES_BF9096A, tag, owner, clock, true)
{
}
nes_golden5_device::nes_golden5_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_GOLDEN5, tag, owner, clock), m_lock(0), m_reg(0)
{
}
@ -66,50 +76,46 @@ nes_golden5_device::nes_golden5_device(const machine_config &mconfig, const char
void nes_bf9093_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg32(0xff);
chr8(0, m_chr_source);
prg16_89ab(0);
prg16_cdef(m_prg_chunks - 1);
if (m_pcb_ctrl_mirror)
set_nt_mirroring(PPU_MIRROR_LOW);
}
void nes_bf9096_device::device_start()
{
common_start();
save_item(NAME(m_latch));
save_item(NAME(m_bank_base));
save_item(NAME(m_reg));
}
void nes_bf9096_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
chr8(0, m_chr_source);
prg16_89ab(0);
prg16_cdef(3);
m_latch = 0x00;
m_bank_base = 0x0c;
prg16_89ab(m_bank_base | m_latch);
prg16_cdef(m_bank_base | 3);
m_reg = 0;
}
void nes_golden5_device::device_start()
{
common_start();
save_item(NAME(m_latch));
save_item(NAME(m_lock));
save_item(NAME(m_reg));
// these are not cleared on reset
m_lock = 0;
m_reg = 0;
}
void nes_golden5_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
chr8(0, m_chr_source);
m_latch = 0x00;
m_bank_base = 0x00;
prg16_89ab(m_bank_base | m_latch);
prg16_cdef(m_bank_base | 0x0f);
prg16_89ab(m_reg);
prg16_cdef(m_reg | 0x0f);
}
/*-------------------------------------------------
mapper specific handlers
-------------------------------------------------*/
@ -127,25 +133,22 @@ void nes_golden5_device::pcb_reset()
iNES: mapper 71
In MESS: Partially Supported.
In MAME: Partially supported.
-------------------------------------------------*/
void nes_bf9093_device::write_h(offs_t offset, uint8_t data)
void nes_bf9093_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bf9093 write_h, offset: %04x, data: %02x\n", offset, data));
switch (offset & 0x7000)
switch (offset & 0x6000)
{
case 0x0000:
case 0x1000:
if (m_pcb_ctrl_mirror)
set_nt_mirroring(BIT(data, 4) ? PPU_MIRROR_HIGH : PPU_MIRROR_LOW);
break;
case 0x4000:
case 0x5000:
case 0x6000:
case 0x7000:
prg16_89ab(data);
break;
}
@ -165,24 +168,26 @@ void nes_bf9093_device::write_h(offs_t offset, uint8_t data)
iNES: mapper 232
In MESS: Supported.
In MAME: Supported.
-------------------------------------------------*/
void nes_bf9096_device::write_h(offs_t offset, uint8_t data)
void nes_bf9096_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bf9096 write_h, offset: %04x, data: %02x\n", offset, data));
if (offset < 0x4000)
{
m_bank_base = (data & 0x18) >> 1;
prg16_89ab(m_bank_base | m_latch);
prg16_cdef(m_bank_base | 3);
m_reg = (m_reg & 0x03) | (data & 0x18) >> 1;
if (m_page_swap)
m_reg = bitswap<4>(m_reg, 2, 3, 1, 0);
prg16_89ab(m_reg);
prg16_cdef(m_reg | 0x03);
}
else
{
m_latch = data & 3;
prg16_89ab(m_bank_base | m_latch);
m_reg = (m_reg & 0x0c) | (data & 0x03);
prg16_89ab(m_reg);
}
}
@ -194,27 +199,24 @@ void nes_bf9096_device::write_h(offs_t offset, uint8_t data)
iNES: mapper 104
In MESS: Supported.
In MAME: Supported.
-------------------------------------------------*/
void nes_golden5_device::write_h(offs_t offset, uint8_t data)
void nes_golden5_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("golden5 write_h, offset: %04x, data: %02x\n", offset, data));
if (offset < 0x4000)
if (offset >= 0x4000)
{
if (data & 0x08)
{
m_bank_base = (data & 0x07) << 4;
prg16_89ab(m_bank_base | m_latch);
prg16_cdef(m_bank_base | 0x0f);
}
m_reg = (m_reg & 0x70) | (data & 0x0f);
prg16_89ab(m_reg);
}
else
else if (!m_lock)
{
m_latch = data & 0x0f;
prg16_89ab(m_bank_base | m_latch);
m_lock = BIT(data, 3);
m_reg = (m_reg & 0x0f) | (data & 0x07) << 4;
prg16_89ab(m_reg);
prg16_cdef(m_reg | 0x0f);
}
}

View File

@ -14,9 +14,9 @@ class nes_bf9093_device : public nes_nrom_device
{
public:
// construction/destruction
nes_bf9093_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_bf9093_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void write_h(offs_t offset, uint8_t data) override;
virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
};
@ -28,19 +28,31 @@ class nes_bf9096_device : public nes_nrom_device
{
public:
// construction/destruction
nes_bf9096_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_bf9096_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void write_h(offs_t offset, uint8_t data) override;
virtual void write_m(offs_t offset, uint8_t data) override { write_h(offset, data); }
virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
protected:
nes_bf9096_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, bool page_swap);
// device-level overrides
virtual void device_start() override;
private:
uint8_t m_bank_base, m_latch;
u8 m_reg;
const bool m_page_swap;
};
// ======================> nes_bf9096a_device
class nes_bf9096a_device : public nes_bf9096_device
{
public:
// construction/destruction
nes_bf9096a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
};
@ -50,9 +62,9 @@ class nes_golden5_device : public nes_nrom_device
{
public:
// construction/destruction
nes_golden5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_golden5_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void write_h(offs_t offset, uint8_t data) override;
virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
@ -61,13 +73,14 @@ protected:
virtual void device_start() override;
private:
uint8_t m_bank_base, m_latch;
u8 m_lock, m_reg;
};
// device type definition
DECLARE_DEVICE_TYPE(NES_BF9093, nes_bf9093_device)
DECLARE_DEVICE_TYPE(NES_BF9096, nes_bf9096_device)
DECLARE_DEVICE_TYPE(NES_BF9096A, nes_bf9096a_device)
DECLARE_DEVICE_TYPE(NES_GOLDEN5, nes_golden5_device)
#endif // MAME_BUS_NES_CAMERICA_H

View File

@ -73,7 +73,8 @@ protected:
u8 m_latch;
private:
u8 m_reg, m_prg_mask;
u8 m_reg;
const u8 m_prg_mask;
};

View File

@ -76,7 +76,7 @@ protected:
private:
u8 m_latch;
bool m_prg_flip;
const bool m_prg_flip;
};

View File

@ -193,7 +193,7 @@ nes_pikay2k_device::nes_pikay2k_device(const machine_config &mconfig, const char
{
}
nes_8237_device::nes_8237_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int board)
nes_8237_device::nes_8237_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 board)
: nes_txrom_device(mconfig, type, tag, owner, clock), m_board(board)
{
}
@ -223,7 +223,7 @@ nes_kasing_device::nes_kasing_device(const machine_config &mconfig, const char *
{
}
nes_sglionk_device::nes_sglionk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int board)
nes_sglionk_device::nes_sglionk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 board)
: nes_kasing_device(mconfig, type, tag, owner, clock), m_board(board)
{
}

View File

@ -143,7 +143,7 @@ public:
protected:
// construction/destruction
nes_8237_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int board);
nes_8237_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 board);
// device-level overrides
virtual void device_start() override;
@ -151,7 +151,7 @@ protected:
private:
void update_banks();
u8 m_reg[3];
const int m_board;
const u8 m_board;
};
@ -224,10 +224,10 @@ public:
protected:
// construction/destruction
nes_sglionk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int board);
nes_sglionk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 board);
private:
const int m_board;
const u8 m_board;
};

View File

@ -191,6 +191,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("nina006", NES_NINA006);
device.option_add_internal("bf9093", NES_BF9093);
device.option_add_internal("bf9096", NES_BF9096);
device.option_add_internal("bf9096a", NES_BF9096A);
device.option_add_internal("goldenfive", NES_GOLDEN5);
device.option_add_internal("ade", NES_ALADDIN);
device.option_add_internal("cne_decathl", NES_CNE_DECATHL);

View File

@ -763,10 +763,9 @@ void nes_cart_slot_device::call_load_ines()
m_cart->set_ce(0x03, ce_state);
}
// iNES Mapper 232
else if (mapper == 210 && submapper == 1)
else if (mapper == 232 && submapper == 1)
{
submapper = 0;
logerror("Unimplemented NES 2.0 submapper: CAMERICA-BF9096.\n");
pcb_id = CAMERICA_BF9096_ALT;
}
// 268: SMD133 boards
else if (mapper == 268)
@ -1283,6 +1282,11 @@ const char * nes_cart_slot_device::get_default_card_ines(get_default_card_softwa
{
pcb_id = SOMARI_HUANG2; // Mapper 116 is used for 2 diff boards
}
// iNES Mapper 232
else if (mapper == 232 && submapper == 1)
{
pcb_id = CAMERICA_BF9096_ALT;
}
}
// solve mapper conflicts

View File

@ -102,6 +102,7 @@ static const nes_pcb pcb_list[] =
{ "maxi15", AVE_MAXI15 },
{ "bf9093", CAMERICA_BF9093 },
{ "bf9096", CAMERICA_BF9096 },
{ "bf9096a", CAMERICA_BF9096_ALT },
{ "goldenfive", CAMERICA_GOLDENFIVE },
{ "ade" , CAMERICA_ALADDIN },
{ "cne_decathl", CNE_DECATHLON },

View File

@ -45,8 +45,8 @@ enum
// Caltron
CALTRON_6IN1, CALTRON_9IN1,
// Camerica
CAMERICA_BF9093, CAMERICA_BF9096, CAMERICA_ALADDIN,
CAMERICA_GOLDENFIVE, GG_NROM,
CAMERICA_BF9093, CAMERICA_BF9096, CAMERICA_BF9096_ALT,
CAMERICA_ALADDIN, CAMERICA_GOLDENFIVE, GG_NROM,
// Dreamtech
DREAMTECH_BOARD,
// Irem