bus/nes: add support for Gyruss FDS conversion (#8234)

This commit is contained in:
0kmg 2021-06-29 06:20:11 -08:00 committed by GitHub
parent 413d8ea70a
commit 49ffc02583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 121 additions and 29 deletions

View File

@ -66705,7 +66705,7 @@ Also notice that VRAM & WRAM are probably incorrect for some of these sets, at t
<publisher>Kaiser</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="ks7057" />
<feature name="pcb" value="UNL-KS7057" />
<feature name="pcb" value="KAISER-KS7057" />
<dataarea name="prg" size="131072">
<rom name="gyruss (kaiser)(fds conversion) (unl)[u].prg" size="131072" crc="d0fd4140" sha1="45dba74fdb7f666d82bed159511ed5019acae82d" offset="00000" status="baddump" />
</dataarea>
@ -75441,18 +75441,14 @@ be better to redump them properly. -->
<year>1993</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="ks7057" />
<feature name="pcb" value="UNL-KS7057" />
<feature name="slot" value="fs6" />
<feature name="pcb" value="UNL-FS6" />
<dataarea name="chr" size="262144">
<rom name="street fighter vi 16 peoples (unl).chr" size="262144" crc="4a9153a9" sha1="b74a042c77666033b29d949b9c51f1e475b23fe9" offset="00000" status="baddump" />
</dataarea>
<dataarea name="prg" size="131072">
<rom name="street fighter vi 16 peoples (unl).prg" size="131072" crc="f7b93e43" sha1="462780b4cbb84364a107b1b37a6a5278eefc6cbf" offset="00000" status="baddump" />
</dataarea>
<!-- 8k WRAM on cartridge, battery backed up -->
<dataarea name="bwram" size="8192">
<rom value="0x00" size="8192" offset="0" loadflag="fill" />
</dataarea>
</part>
</software>
@ -75461,8 +75457,8 @@ be better to redump them properly. -->
<year>1993</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="ks7057" />
<feature name="pcb" value="UNL-KS7057" />
<feature name="slot" value="fs6" />
<feature name="pcb" value="UNL-FS6" />
<dataarea name="chr" size="262144">
<rom name="street fighter vi (8 peoples)(unl).chr" size="262144" crc="4a9153a9" sha1="b74a042c77666033b29d949b9c51f1e475b23fe9" offset="00000" status="baddump" />
</dataarea>

View File

@ -17,11 +17,9 @@
* Kaiser KS7031
* Kaiser KS7032
* Kaiser KS7037
* Kaiser KS7057
* Kaiser KS7058
The Kaiser KS7057 bootleg board is emulated in nes_mmc3_clones.cpp
TODO:
- FCEUmm lists more Kaiser PCBs:
* KS7030 (for Yume Koujou Doki Doki Panic by Kaiser?)
@ -57,6 +55,7 @@ DEFINE_DEVICE_TYPE(NES_KS7013B, nes_ks7013b_device, "nes_ks7013b", "NES Cart Kai
DEFINE_DEVICE_TYPE(NES_KS7031, nes_ks7031_device, "nes_ks7031", "NES Cart Kaiser KS-7031 PCB")
DEFINE_DEVICE_TYPE(NES_KS7016, nes_ks7016_device, "nes_ks7016", "NES Cart Kaiser KS-7016 PCB")
DEFINE_DEVICE_TYPE(NES_KS7037, nes_ks7037_device, "nes_ks7037", "NES Cart Kaiser KS-7037 PCB")
DEFINE_DEVICE_TYPE(NES_KS7057, nes_ks7057_device, "nes_ks7057", "NES Cart Kaiser KS-7057 PCB")
nes_ks7058_device::nes_ks7058_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
@ -114,6 +113,11 @@ nes_ks7037_device::nes_ks7037_device(const machine_config &mconfig, const char *
{
}
nes_ks7057_device::nes_ks7057_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_KS7057, tag, owner, clock)
{
}
@ -274,6 +278,21 @@ void nes_ks7037_device::pcb_reset()
m_latch = 0;
}
void nes_ks7057_device::device_start()
{
common_start();
save_item(NAME(m_reg));
}
void nes_ks7057_device::pcb_reset()
{
prg8_ab(0x0d);
prg16_cdef(0x07);
chr8(0, CHRRAM);
std::fill(std::begin(m_reg), std::end(m_reg), 0x00);
}
/*-------------------------------------------------
@ -739,3 +758,54 @@ void nes_ks7037_device::write_h(offs_t offset, uint8_t data)
}
}
}
/*-------------------------------------------------
Kaiser Board KS7057
Games: Gyruss
This PCB has fixed banks after 0xa000 and 8x2K
swappable banks in 0x6000-0x9fff. Pairs of nibble
registers (we store joined as bytes) control the banks,
with $B000/$B001, $B002/$B003, $C000/$C001, $C002/$C003
selecting 4 banks in 0x8000-0x9fff, and $D000/$D001,
$D002/$D003, $E000/$E001, $E002/$E003 selecting the
remaining 4 banks in 0x6000-0x7fff.
NES 2.0: mapper 302
In MAME: Supported.
-------------------------------------------------*/
u8 nes_ks7057_device::read_m(offs_t offset)
{
// LOG_MMC(("ks7057 read_m, offset: %04x\n", offset));
return m_prg[0x800 * m_reg[((offset >> 11) & 0x03) + 4] + (offset & 0x7ff)];
}
u8 nes_ks7057_device::read_h(offs_t offset)
{
// LOG_MMC(("ks7057 read_h, offset: %04x\n", offset));
if (offset < 0x2000)
return m_prg[0x800 * m_reg[(offset >> 11) & 0x03] + (offset & 0x7ff)];
return hi_access_rom(offset);
}
void nes_ks7057_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("ks7057 write_h, offset: %04x, data: %02x\n", offset, data));
if (offset < 0x2000)
set_nt_mirroring(BIT(data, 0) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ);
else if (offset >= 0x3000 && offset < 0x6004)
{
u8 reg = (((offset >> 11) & 0x0e) | BIT(offset, 1)) - 6;
if (BIT(offset, 0))
m_reg[reg] = (m_reg[reg] & 0x0f) | ((data & 0x03) << 4);
else
m_reg[reg] = (m_reg[reg] & 0xf0) | (data & 0x0f);
}
}

View File

@ -233,6 +233,29 @@ private:
};
// ======================> nes_ks7057_device
class nes_ks7057_device : public nes_nrom_device
{
public:
// construction/destruction
nes_ks7057_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual u8 read_m(offs_t offset) override;
virtual u8 read_h(offs_t offset) override;
virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
protected:
// device-level overrides
virtual void device_start() override;
private:
u8 m_reg[8];
};
// device type definition
DECLARE_DEVICE_TYPE(NES_KS7058, nes_ks7058_device)
DECLARE_DEVICE_TYPE(NES_KS7022, nes_ks7022_device)
@ -244,5 +267,6 @@ DECLARE_DEVICE_TYPE(NES_KS7013B, nes_ks7013b_device)
DECLARE_DEVICE_TYPE(NES_KS7031, nes_ks7031_device)
DECLARE_DEVICE_TYPE(NES_KS7016, nes_ks7016_device)
DECLARE_DEVICE_TYPE(NES_KS7037, nes_ks7037_device)
DECLARE_DEVICE_TYPE(NES_KS7057, nes_ks7057_device)
#endif // MAME_BUS_NES_KAISER_H

View File

@ -29,7 +29,7 @@
//-------------------------------------------------
DEFINE_DEVICE_TYPE(NES_NITRA, nes_nitra_device, "nes_nitra", "NES Cart Nitra PCB")
DEFINE_DEVICE_TYPE(NES_KS7057, nes_ks7057_device, "nes_ks7057", "NES Cart KS-7057 PCB")
DEFINE_DEVICE_TYPE(NES_FS6, nes_fs6_device, "nes_fs6", "NES Cart Fight Street VI PCB")
DEFINE_DEVICE_TYPE(NES_SBROS11, nes_sbros11_device, "nes_smb11", "NES Cart SMB 11 PCB")
DEFINE_DEVICE_TYPE(NES_MALISB, nes_malisb_device, "nes_malisb", "NES Cart Mali Spash Bomb PCB")
DEFINE_DEVICE_TYPE(NES_FAMILY4646, nes_family4646_device, "nes_family4646", "NES Cart BMC-FAMILY04646 PCB")
@ -71,8 +71,8 @@ nes_nitra_device::nes_nitra_device(const machine_config &mconfig, const char *ta
{
}
nes_ks7057_device::nes_ks7057_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_txrom_device(mconfig, NES_KS7057, tag, owner, clock)
nes_fs6_device::nes_fs6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_txrom_device(mconfig, NES_FS6, tag, owner, clock)
{
}
@ -646,21 +646,21 @@ void nes_nitra_device::write_h(offs_t offset, uint8_t data)
/*-------------------------------------------------
Board UNL-KS7057
Board UNL-FS6
Games: Street Fighter VI / Fight Street VI
MMC3 clone (identical, but for switched address lines)
NES 2.0: mapper 302
iNES: mapper 196 alt?
In MAME: Supported.
-------------------------------------------------*/
void nes_ks7057_device::write_h(offs_t offset, uint8_t data)
void nes_fs6_device::write_h(offs_t offset, uint8_t data)
{
LOG_MMC(("ks7057 write_h, offset: %04x, data: %02x\n", offset, data));
LOG_MMC(("fs6 write_h, offset: %04x, data: %02x\n", offset, data));
offset = (BIT(offset, 0) << 1) | BIT(offset, 1) | (offset & ~0x03);
txrom_write(offset, data);

View File

@ -21,13 +21,13 @@ public:
};
// ======================> nes_ks7057_device
// ======================> nes_fs6_device
class nes_ks7057_device : public nes_txrom_device
class nes_fs6_device : public nes_txrom_device
{
public:
// construction/destruction
nes_ks7057_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
nes_fs6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device-level overrides
virtual void write_h(offs_t offset, uint8_t data) override;
@ -718,7 +718,7 @@ private:
// device type definition
DECLARE_DEVICE_TYPE(NES_NITRA, nes_nitra_device)
DECLARE_DEVICE_TYPE(NES_KS7057, nes_ks7057_device)
DECLARE_DEVICE_TYPE(NES_FS6, nes_fs6_device)
DECLARE_DEVICE_TYPE(NES_SBROS11, nes_sbros11_device)
DECLARE_DEVICE_TYPE(NES_MALISB, nes_malisb_device)
DECLARE_DEVICE_TYPE(NES_FAMILY4646, nes_family4646_device)

View File

@ -259,6 +259,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("ks7031", NES_KS7031); // used in Dracula II (FDS Conversion);
device.option_add_internal("ks7016", NES_KS7016); // used in Exciting Basket (FDS Conversion);
device.option_add_internal("ks7037", NES_KS7037); // used in Metroid (FDS Conversion);
device.option_add_internal("ks7057", NES_KS7057); // used in Gyruss (FDS Conversion);
device.option_add_internal("gs2015", NES_GS2015);
device.option_add_internal("gs2004", NES_GS2004);
device.option_add_internal("gs2013", NES_GS2013);
@ -311,7 +312,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("sl1632", NES_REX_SL1632);
device.option_add_internal("somari", NES_SOMARI); // mapper 116
device.option_add_internal("nitra", NES_NITRA);
device.option_add_internal("ks7057", NES_KS7057); // mapper 196 alt (for Street Fighter VI / Fight Street VI);
device.option_add_internal("fs6", NES_FS6); // mapper 196 alt? (for Street Fighter VI / Fight Street VI);
device.option_add_internal("sbros11", NES_SBROS11);
device.option_add_internal("unl_malisb", NES_MALISB); // used by Super Mali Splash Bomb
device.option_add_internal("family4646", NES_FAMILY4646);

View File

@ -171,6 +171,7 @@ static const nes_pcb pcb_list[] =
{ "ks7013b", KAISER_KS7013B }, // used in Highway Star (FDS Conversion)
{ "ks7016", KAISER_KS7016 }, // used in Exciting Basketball (FDS Conversion)
{ "ks7037", KAISER_KS7037 }, // Metroid FDS Chinese
{ "ks7057", KAISER_KS7057 }, // Gyruss (FDS Conversion)
{ "gs2015", RCM_GS2015 },
{ "gs2004", RCM_GS2004 },
{ "gs2013", RCM_GS2013 },
@ -209,7 +210,7 @@ static const nes_pcb pcb_list[] =
{ "sl1632", REXSOFT_SL1632 },
{ "somari", SOMARI_SL12 }, // mapper 116
{ "nitra", NITRA_TDA },
{ "ks7057", UNL_KS7057 }, // mapper 196 alt (for Street Fighter VI / Fight Street VI },
{ "fs6", UNL_FS6 }, // mapper 196 alt? (for Street Fighter VI / Fight Street VI },
{ "sbros11", BTL_SBROS11 },
{ "family4646", BMC_FAMILY_4646 },
{ "pikay2k", BTL_PIKACHUY2K }, // mapper 254

View File

@ -101,9 +101,9 @@ enum
BMC_411120C, BMC_GOLD150, BMC_GOLD260, BMC_CH001, BMC_SUPER22,
BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET,
/* Unlicensed */
UNL_8237, UNL_CC21, UNL_AX5705, UNL_KOF97, UNL_KS7057,
UNL_8237, UNL_CC21, UNL_AX5705, UNL_KOF97,
UNL_N625092, UNL_SC127, UNL_SMB2J, UNL_T230, UNL_MMALEE,
UNL_UXROM, UNL_MK2, UNL_XIAOZY, UNL_KOF96,
UNL_UXROM, UNL_MK2, UNL_XIAOZY, UNL_KOF96, UNL_FS6,
UNL_SF3, UNL_RACERMATE, UNL_EDU2K, UNL_LH53, UNL_LH32, UNL_LH10,
UNL_STUDYNGAME, UNL_603_5052, UNL_H2288, UNL_2708,
UNL_MALISB, UNL_BB, UNL_AC08, UNL_A9746, UNL_WORLDHERO,
@ -118,7 +118,7 @@ enum
HENGG_SRICH, HENGG_XHZS, HENGG_SHJY3, SUBOR_TYPE0, SUBOR_TYPE1, SUBOR_TYPE2,
KAISER_KS7058, KAISER_KS7032, KAISER_KS7022, KAISER_KS7017,
KAISER_KS7012, KAISER_KS7013B, KAISER_KS202, KAISER_KS7031,
KAISER_KS7016, KAISER_KS7037,
KAISER_KS7016, KAISER_KS7037, KAISER_KS7057,
CNE_DECATHLON, CNE_FSB, CNE_SHLZ, CONY_BOARD, YOKO_BOARD,
RCM_GS2015, RCM_GS2004, RCM_GS2013, RCM_TF9IN1, RCM_3DBLOCK,
WAIXING_TYPE_A, WAIXING_TYPE_A1, WAIXING_TYPE_B, WAIXING_TYPE_C, WAIXING_TYPE_D,

View File

@ -73,7 +73,7 @@ void nes_state::machine_start()
if (m_cartslot->get_pcb_id() == STD_EXROM || m_cartslot->get_pcb_id() == STD_NROM368 || m_cartslot->get_pcb_id() == STD_DISKSYS
|| m_cartslot->get_pcb_id() == GG_NROM || m_cartslot->get_pcb_id() == CAMERICA_ALADDIN || m_cartslot->get_pcb_id() == SUNSOFT_DCS
|| m_cartslot->get_pcb_id() == BANDAI_DATACH || m_cartslot->get_pcb_id() == BANDAI_KARAOKE || m_cartslot->get_pcb_id() == UNL_2A03PURITANS || m_cartslot->get_pcb_id() == AVE_MAXI15
|| m_cartslot->get_pcb_id() == KAISER_KS7022 || m_cartslot->get_pcb_id() == KAISER_KS7031 || m_cartslot->get_pcb_id() == KAISER_KS7037 || m_cartslot->get_pcb_id() == BMC_VT5201
|| m_cartslot->get_pcb_id() == KAISER_KS7022 || m_cartslot->get_pcb_id() == KAISER_KS7031 || m_cartslot->get_pcb_id() == KAISER_KS7037 || m_cartslot->get_pcb_id() == KAISER_KS7057 || m_cartslot->get_pcb_id() == BMC_VT5201
|| m_cartslot->get_pcb_id() == UNL_LH32 || m_cartslot->get_pcb_id() == UNL_LH10 || m_cartslot->get_pcb_id() == UNL_2708 || m_cartslot->get_pcb_id() == UNL_RT01
|| m_cartslot->get_pcb_id() == UNL_43272 || m_cartslot->get_pcb_id() == BMC_G63IN1 || m_cartslot->get_pcb_id() == BMC_8157
|| m_cartslot->get_pcb_id() == BMC_GOLD150 || m_cartslot->get_pcb_id() == BMC_CH001