mirror of
https://github.com/holub/mame
synced 2025-06-04 03:46:29 +03:00
bus/nes: Added support for KL-06 and 831128C boards. (#9552)
- Made VRC4 base class extendable for CHR banking, as was done to PRG banking. New working software list additions (nes.xml) ----------------------------------- 1993 New 860 in 1 Over-Valued Golden Version Games [Consolethinks] 1995 New Series Super 2 in 1 (Asia) [anonymous]
This commit is contained in:
parent
88b9d73061
commit
44630c5da1
40
hash/nes.xml
40
hash/nes.xml
@ -63396,6 +63396,27 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="2rugby">
|
||||
<description>1995 New Series Super 2 in 1 (Asia)</description>
|
||||
<year>1995</year>
|
||||
<publisher><pirate></publisher>
|
||||
<info name="alt_title" value="Rugby 2 in 1"/>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="bmc_831128c" />
|
||||
<feature name="pcb_model" value="831128C" />
|
||||
<dataarea name="prg" size="393216">
|
||||
<rom name="1995 new series super 2-in-1.prg" size="393216" crc="327f2ba1" sha1="a3c3f2f9699be3a61b77dc0101957f7fd8ef46b1" />
|
||||
</dataarea>
|
||||
<dataarea name="chr" size="524288">
|
||||
<rom name="1995 new series super 2-in-1.chr" size="524288" crc="74dd59d8" sha1="f61ca4d902d83fdd3af4da57d615c17764dd47b9" />
|
||||
</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>
|
||||
|
||||
<software name="2s5ej3" supported="no">
|
||||
<description>2 in 1 - Sonic 5 + Earthworm Jim 3 (Asia)</description>
|
||||
<year>19??</year>
|
||||
@ -84356,6 +84377,25 @@ be better to redump them properly. -->
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="mc_860">
|
||||
<description>1993 New 860 in 1 Over-Valued Golden Version Games</description>
|
||||
<year>1993</year>
|
||||
<publisher><pirate></publisher>
|
||||
<part name="cart" interface="nes_cart">
|
||||
<feature name="slot" value="bmc_kl06" />
|
||||
<feature name="pcb_model" value="KL-06" />
|
||||
<dataarea name="prg" size="524288">
|
||||
<rom name="1993 new 860-in-1 over-valued golden version games.prg" size="524288" crc="8a929147" sha1="ad5354d3e52f1f3547a05f2fdb20c8058d66860c" />
|
||||
</dataarea>
|
||||
<dataarea name="chr" size="524288">
|
||||
<rom name="1993 new 860-in-1 over-valued golden version games.chr" size="524288" crc="79d28c56" sha1="fb08a82db2fd7dacb61d8cc2a18323f860c079a9" />
|
||||
</dataarea>
|
||||
<!-- 2k WRAM on cartridge -->
|
||||
<dataarea name="wram" size="2048">
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- All games work except Journey to the West which has the same issues as the set jwest -->
|
||||
<software name="mc_9jw" supported="partial">
|
||||
<description>9 in 1 (Journey to the West)</description>
|
||||
|
@ -168,9 +168,6 @@ void nes_konami_vrc4_device::device_start()
|
||||
|
||||
void nes_konami_vrc4_device::pcb_reset()
|
||||
{
|
||||
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
|
||||
chr8(0, m_chr_source);
|
||||
|
||||
m_irq_mode = 0;
|
||||
m_irq_prescale = 0;
|
||||
m_irq_enable = 0;
|
||||
@ -183,7 +180,10 @@ void nes_konami_vrc4_device::pcb_reset()
|
||||
m_mmc_prg_bank[0] = 0;
|
||||
m_mmc_prg_bank[1] = 0;
|
||||
set_prg();
|
||||
std::fill(std::begin(m_mmc_vrom_bank), std::end(m_mmc_vrom_bank), 0x00);
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
m_mmc_vrom_bank[i] = i;
|
||||
set_chr();
|
||||
}
|
||||
|
||||
void nes_konami_vrc7_device::pcb_reset()
|
||||
@ -454,6 +454,12 @@ void nes_konami_vrc4_device::set_prg(int prg_base, int prg_mask)
|
||||
prg8_x(3, prg_base | prg_mask);
|
||||
}
|
||||
|
||||
void nes_konami_vrc4_device::set_chr(int chr_base, int chr_mask)
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
chr1_x(i, chr_base | (m_mmc_vrom_bank[i] & chr_mask), m_chr_source);
|
||||
}
|
||||
|
||||
u8 nes_konami_vrc4_device::read_m(offs_t offset)
|
||||
{
|
||||
LOG_MMC(("VRC-4 read_m, offset: %04x\n", offset));
|
||||
@ -504,7 +510,7 @@ void nes_konami_vrc4_device::write_h(offs_t offset, u8 data)
|
||||
int shift = BIT(addr_lines, 0) * 4;
|
||||
int mask = shift ? 0x1f0 : 0x0f;
|
||||
m_mmc_vrom_bank[bank] = (m_mmc_vrom_bank[bank] & ~mask) | ((data << shift) & mask);
|
||||
chr1_x(bank, m_mmc_vrom_bank[bank], m_chr_source);
|
||||
set_chr();
|
||||
break;
|
||||
}
|
||||
case 0x7000:
|
||||
|
@ -109,7 +109,10 @@ protected:
|
||||
|
||||
void set_mirror(u8 data);
|
||||
void set_prg(int prg_base, int prg_mask);
|
||||
void set_chr(int chr_base, int chr_mask);
|
||||
virtual void set_prg() { set_prg(0x00, 0x1f); }
|
||||
virtual void set_chr() { set_chr(0x00, 0x1ff); }
|
||||
|
||||
u16 m_mmc_vrom_bank[8];
|
||||
u8 m_mmc_prg_bank[2];
|
||||
u8 m_prg_flip;
|
||||
|
@ -242,7 +242,6 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("waixing_h1", NES_WAIXING_H1); // FIXME: Made up boards the different WRAM protect banks (see Shen Mi Jin San Jiao)
|
||||
device.option_add_internal("waixing_i", NES_WAIXING_I);
|
||||
device.option_add_internal("waixing_j", NES_WAIXING_J);
|
||||
device.option_add_internal("waixing_sgz", NES_WAIXING_SGZ);
|
||||
device.option_add_internal("waixing_sgzlz", NES_WAIXING_SGZLZ);
|
||||
device.option_add_internal("waixing_sec", NES_WAIXING_SEC);
|
||||
device.option_add_internal("waixing_ffv", NES_WAIXING_FFV);
|
||||
@ -256,7 +255,6 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("yoko", NES_YOKO);
|
||||
device.option_add_internal("hengg_srich", NES_HENGG_SRICH);
|
||||
device.option_add_internal("hengg_xhzs", NES_HENGG_XHZS);
|
||||
device.option_add_internal("hengg_shjy3", NES_HENGG_SHJY3); // mapper 253
|
||||
device.option_add_internal("hes", NES_HES);
|
||||
device.option_add_internal("ks106c", NES_KS106C); // mapper 352
|
||||
device.option_add_internal("ks202", NES_KS202); // mapper 56
|
||||
@ -293,18 +291,12 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("cc21", NES_CC21);
|
||||
device.option_add_internal("xiaozy", NES_XIAOZY);
|
||||
device.option_add_internal("edu2k", NES_EDU2K);
|
||||
device.option_add_internal("t230", NES_T230);
|
||||
device.option_add_internal("jy830623c", NES_JY830623C);
|
||||
device.option_add_internal("unl_43272", NES_43272); // used in Gaau Hok Gwong Cheung
|
||||
device.option_add_internal("tf1201", NES_TF1201);
|
||||
device.option_add_internal("th21311", NES_TH21311);
|
||||
device.option_add_internal("unl_cfight", NES_CITYFIGHT); // used by City Fighter IV
|
||||
device.option_add_internal("ninjaryu", NES_NINJARYU); // used by Ninja Ryukenden Chinese
|
||||
device.option_add_internal("unl_eh8813a", NES_EH8813A); // used by Dr. Mario II
|
||||
device.option_add_internal("zemina", NES_ZEMINA); // mapper 190 - Magic Kid GooGoo
|
||||
// misc bootleg boards
|
||||
device.option_add_internal("ax40g", NES_AX40G);
|
||||
device.option_add_internal("ax5705", NES_AX5705);
|
||||
device.option_add_internal("sc127", NES_SC127);
|
||||
device.option_add_internal("mariobaby", NES_MARIOBABY);
|
||||
device.option_add_internal("asnicol", NES_ASN);
|
||||
@ -316,8 +308,6 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("smb2jb", NES_SMB2JB);
|
||||
device.option_add_internal("yung08", NES_YUNG08);
|
||||
device.option_add_internal("btl_0353", NES_0353); // used by Lucky (Roger) Rabbit FDS conversion
|
||||
device.option_add_internal("btl_2yudb", NES_2YUDB);
|
||||
device.option_add_internal("btl_900218", NES_900218);
|
||||
device.option_add_internal("09034a", NES_09034A);
|
||||
device.option_add_internal("l001", NES_L001);
|
||||
device.option_add_internal("batmanfs", NES_BATMANFS);
|
||||
@ -336,7 +326,6 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("unl_lh51", NES_LH51); // used in Ai Senshi Nicol alt FDS conversion
|
||||
device.option_add_internal("unl_lh53", NES_LH53); // used in Nazo no Murasamejou (FDS Conversion)
|
||||
device.option_add_internal("unl_ac08", NES_AC08); // used by Green Beret FDS conversion
|
||||
device.option_add_internal("sgpipe", NES_SHUIGUAN); // mapper 183
|
||||
device.option_add_internal("rt01", NES_RT01);
|
||||
// misc MMC3 clone boards
|
||||
device.option_add_internal("dbz5", NES_REX_DBZ5);
|
||||
@ -367,6 +356,21 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("sachen_shero", NES_SACHEN_SHERO);
|
||||
device.option_add_internal("sachen_zgdh", NES_SACHEN_ZGDH);
|
||||
device.option_add_internal("a9746", NES_A9746); // mapper 219
|
||||
// misc VRC clone boards
|
||||
device.option_add_internal("btl_2yudb", NES_2YUDB);
|
||||
device.option_add_internal("btl_900218", NES_900218);
|
||||
device.option_add_internal("ax40g", NES_AX40G);
|
||||
device.option_add_internal("ax5705", NES_AX5705);
|
||||
device.option_add_internal("bmc_830506c", NES_BMC_830506C);
|
||||
device.option_add_internal("bmc_831128c", NES_BMC_831128C);
|
||||
device.option_add_internal("bmc_kl06", NES_BMC_KL06);
|
||||
device.option_add_internal("unl_cfight", NES_CITYFIGHT); // used by City Fighter IV
|
||||
device.option_add_internal("hengg_shjy3", NES_HENGG_SHJY3); // mapper 253
|
||||
device.option_add_internal("sgpipe", NES_SHUIGUAN); // mapper 183
|
||||
device.option_add_internal("t230", NES_T230);
|
||||
device.option_add_internal("tf1201", NES_TF1201);
|
||||
device.option_add_internal("th21311", NES_TH21311);
|
||||
device.option_add_internal("waixing_sgz", NES_WAIXING_SGZ);
|
||||
// misc multigame cart boards
|
||||
device.option_add_internal("benshieng", NES_BENSHIENG);
|
||||
device.option_add_internal("action52", NES_ACTION52);
|
||||
@ -387,7 +391,6 @@ void nes_cart(device_slot_interface &device)
|
||||
device.option_add_internal("bmc_810544c", NES_BMC_810544C);
|
||||
device.option_add_internal("bmc_82ab", NES_BMC_82AB);
|
||||
device.option_add_internal("bmc_830425c", NES_BMC_830425C);
|
||||
device.option_add_internal("bmc_830506c", NES_BMC_830506C);
|
||||
device.option_add_internal("bmc_830928c", NES_BMC_830928C);
|
||||
device.option_add_internal("bmc_850437c", NES_BMC_850437C);
|
||||
device.option_add_internal("bmc_891227", NES_BMC_891227);
|
||||
|
@ -482,7 +482,7 @@ static const nes_mmc mmc_list[] =
|
||||
// 444 NC7000M multicart
|
||||
// 445 DG574B MMC3-compatible multicart
|
||||
// 446 Mindkids SMD172B_FPGA board
|
||||
// 447 VRC4-based KL-06 multicart
|
||||
{ 447, BMC_KL06 },
|
||||
// 448 VRC4-based 830768C multicart
|
||||
// 449 Super Games King multicart
|
||||
// 450 VRC2-based YY841157C multicart
|
||||
@ -506,7 +506,7 @@ static const nes_mmc mmc_list[] =
|
||||
{ 525, KAISER_KS7021A }, // GetsuFumaDen pirate (and maybe a Contra?)
|
||||
// 526 sangochu clone not yet in nes.xml?
|
||||
{ 527, UNL_AX40G }, // Fudou Myouou Den pirate
|
||||
// 528 1995 New Series Super 2-in-1 multicart not in nes.xml
|
||||
{ 528, BMC_831128C }, // 1995 New Series Super 2-in-1
|
||||
{ 529, UNL_T230 }, // Datach Dragon Ball Z IV bootleg
|
||||
{ 530, UNL_AX5705 }, // Super Mario Bros Pocker Mali
|
||||
// 531 Used by Asder PC-95 Famicom clone built into a keyboard
|
||||
|
@ -150,7 +150,6 @@ static const nes_pcb pcb_list[] =
|
||||
{ "waixing_h1", WAIXING_TYPE_H1 },
|
||||
{ "waixing_i", WAIXING_TYPE_I },
|
||||
{ "waixing_j", WAIXING_TYPE_J },
|
||||
{ "waixing_sgz", WAIXING_SGZ },
|
||||
{ "waixing_sgzlz", WAIXING_SGZLZ },
|
||||
{ "waixing_sec", WAIXING_SECURITY },
|
||||
{ "waixing_ffv", WAIXING_FFV },
|
||||
@ -164,7 +163,6 @@ static const nes_pcb pcb_list[] =
|
||||
{ "yoko", YOKO_BOARD },
|
||||
{ "hengg_srich", HENGG_SRICH },
|
||||
{ "hengg_xhzs", HENGG_XHZS },
|
||||
{ "hengg_shjy3", HENGG_SHJY3 }, // mapper 253
|
||||
{ "hes", HES_BOARD },
|
||||
{ "ks106c", KAISER_KS106C }, // mapper 352
|
||||
{ "ks202", KAISER_KS202 }, // mapper 56
|
||||
@ -201,12 +199,24 @@ static const nes_pcb pcb_list[] =
|
||||
{ "cc21", UNL_CC21 },
|
||||
{ "xiaozy", UNL_XIAOZY },
|
||||
{ "edu2k", UNL_EDU2K },
|
||||
{ "t230", UNL_T230 },
|
||||
{ "jy830623c", UNL_JY830623C },
|
||||
{ "zemina", ZEMINA_BOARD },
|
||||
// misc bootleg boards
|
||||
// misc VRC clone boards
|
||||
{ "btl_2yudb", BTL_2YUDB },
|
||||
{ "btl_900218", BTL_900218 }, // pirate The Lord of King
|
||||
{ "ax40g", UNL_AX40G },
|
||||
{ "ax5705", UNL_AX5705 },
|
||||
{ "bmc_830506c", BMC_830506C },
|
||||
{ "bmc_831128c", BMC_831128C },
|
||||
{ "bmc_kl06", BMC_KL06 },
|
||||
{ "unl_cfight", UNL_CITYFIGHT },
|
||||
{ "hengg_shjy3", HENGG_SHJY3 }, // mapper 253
|
||||
{ "sgpipe", BTL_SHUIGUAN },
|
||||
{ "t230", UNL_T230 },
|
||||
{ "tf1201", UNL_TF1201 },
|
||||
{ "th21311", UNL_TH21311 },
|
||||
{ "waixing_sgz", WAIXING_SGZ },
|
||||
// misc bootleg boards
|
||||
{ "sc127", UNL_SC127 },
|
||||
{ "mariobaby", BTL_MARIOBABY },
|
||||
{ "asnicol", BTL_AISENSHINICOL },
|
||||
@ -218,8 +228,6 @@ static const nes_pcb pcb_list[] =
|
||||
{ "smb2jb", BTL_SMB2JB },
|
||||
{ "yung08", BTL_YUNG08 },
|
||||
{ "btl_0353", BTL_0353 },
|
||||
{ "btl_2yudb", BTL_2YUDB },
|
||||
{ "btl_900218", BTL_900218 }, // pirate The Lord of King
|
||||
{ "09034a", BTL_09034A },
|
||||
{ "l001", BTL_L001 },
|
||||
{ "batmanfs", BTL_BATMANFS },
|
||||
@ -266,7 +274,6 @@ static const nes_pcb pcb_list[] =
|
||||
{ "bmc_810544c", BMC_810544C },
|
||||
{ "bmc_82ab", BMC_82AB },
|
||||
{ "bmc_830425c", BMC_830425C },
|
||||
{ "bmc_830506c", BMC_830506C },
|
||||
{ "bmc_830928c", BMC_830928C },
|
||||
{ "bmc_850437c", BMC_850437C },
|
||||
{ "bmc_891227", BMC_891227 },
|
||||
@ -386,12 +393,8 @@ static const nes_pcb pcb_list[] =
|
||||
{ "unl_lh53", UNL_LH53 },
|
||||
{ "unl_ac08", UNL_AC08 },
|
||||
{ "unl_malisb", UNL_MALISB },
|
||||
{ "sgpipe", BTL_SHUIGUAN },
|
||||
{ "rt01", UNL_RT01 }, // Russian Test Cart
|
||||
{ "unl_43272", UNL_43272 },
|
||||
{ "tf1201", UNL_TF1201 },
|
||||
{ "th21311", UNL_TH21311 },
|
||||
{ "unl_cfight", UNL_CITYFIGHT },
|
||||
{ "ninjaryu", UNL_NINJARYU },
|
||||
{ "unl_eh8813a", UNL_EH8813A }, // Dr. Mario II
|
||||
{ "nocash_nochr", NOCASH_NOCHR },
|
||||
|
@ -86,7 +86,7 @@ enum
|
||||
TXC_MJBLOCK, TXC_STRIKEW, TXC_TW,
|
||||
// Multigame Carts
|
||||
BMC_64IN1NR, BMC_190IN1, BMC_A65AS, BMC_A88S1, BMC_F15, BMC_F600, BMC_L6IN1,
|
||||
BMC_GN45, BMC_HIK8IN1, BMC_SFC12, BMC_JY208, BMC_JY302, BMC_KC885,
|
||||
BMC_GN45, BMC_HIK8IN1, BMC_SFC12, BMC_JY208, BMC_JY302, BMC_KC885, BMC_KL06,
|
||||
BMC_S24IN1SC03, BMC_T262, BMC_TELETUBBIES,
|
||||
BMC_WS, BMC_SUPERBIG_7IN1, BMC_SUPERHIK_4IN1, BMC_BALLGAMES_11IN1,
|
||||
BMC_MARIOPARTY_7IN1, BMC_GOLD_7IN1, BMC_SUPER_700IN1, BMC_FAMILY_4646,
|
||||
@ -105,7 +105,7 @@ enum
|
||||
BMC_S009, BMC_TH22913, BMC_TH2348, BMC_11160, BMC_G146,
|
||||
BMC_2751, BMC_8157, BMC_00202650,
|
||||
BMC_411120C, BMC_810305C, BMC_820720C, BMC_830118C,
|
||||
BMC_830832C, BMC_YY841101C, BMC_YY841155C,
|
||||
BMC_830832C, BMC_831128C, BMC_YY841101C, BMC_YY841155C,
|
||||
BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET, BMC_LITTLECOM160,
|
||||
BMC_K1029, BMC_K3006, BMC_K3033, BMC_K3036, BMC_K3046, BMC_K3071, BMC_SA005A,
|
||||
BMC_TF2740, BMC_TJ03, BMC_RESETSXROM, BMC_RESETTXROM, BMC_TECHLINE9IN1,
|
||||
|
@ -33,6 +33,8 @@ DEFINE_DEVICE_TYPE(NES_900218, nes_900218_device, "nes_900218", "
|
||||
DEFINE_DEVICE_TYPE(NES_AX40G, nes_ax40g_device, "nes_ax40g", "NES Cart UNL-AX-40G PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_AX5705, nes_ax5705_device, "nes_ax5705", "NES Cart AX5705 PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_830506C, nes_bmc_830506c_device, "nes_bmc_830506c", "NES Cart BMC 830506C PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_831128C, nes_bmc_831128c_device, "nes_bmc_831128c", "NES Cart BMC 831128C PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_BMC_KL06, nes_bmc_kl06_device, "nes_bmc_kl06", "NES Cart BMC KL-06 PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_CITYFIGHT, nes_cityfight_device, "nes_cityfight", "NES Cart City Fighter PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_SHUIGUAN, nes_shuiguan_device, "nes_shuiguan", "NES Cart Shui Guan Pipe Pirate PCB")
|
||||
DEFINE_DEVICE_TYPE(NES_T230, nes_t230_device, "nes_t230", "NES Cart T-230 PCB")
|
||||
@ -67,6 +69,16 @@ nes_bmc_830506c_device::nes_bmc_830506c_device(const machine_config &mconfig, co
|
||||
{
|
||||
}
|
||||
|
||||
nes_bmc_831128c_device::nes_bmc_831128c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_konami_vrc4_device(mconfig, NES_BMC_831128C, tag, owner, clock), m_reg(0)
|
||||
{
|
||||
}
|
||||
|
||||
nes_bmc_kl06_device::nes_bmc_kl06_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_konami_vrc4_device(mconfig, NES_BMC_KL06, tag, owner, clock), m_reg(0)
|
||||
{
|
||||
}
|
||||
|
||||
nes_cityfight_device::nes_cityfight_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: nes_konami_vrc4_device(mconfig, NES_CITYFIGHT, tag, owner, clock)
|
||||
{
|
||||
@ -180,6 +192,36 @@ void nes_bmc_830506c_device::pcb_reset()
|
||||
nes_konami_vrc4_device::pcb_reset();
|
||||
}
|
||||
|
||||
void nes_bmc_831128c_device::device_start()
|
||||
{
|
||||
nes_konami_vrc4_device::device_start();
|
||||
save_item(NAME(m_reg));
|
||||
}
|
||||
|
||||
void nes_bmc_831128c_device::pcb_reset()
|
||||
{
|
||||
nes_konami_vrc4_device::pcb_reset();
|
||||
|
||||
m_reg = 0;
|
||||
prg32((m_prg_chunks >> 1) - 1);
|
||||
}
|
||||
|
||||
void nes_bmc_kl06_device::device_start()
|
||||
{
|
||||
nes_konami_vrc4_device::device_start();
|
||||
save_item(NAME(m_reg));
|
||||
|
||||
// VRC4 pins 3 and 4
|
||||
m_vrc_ls_prg_a = 3; // A1
|
||||
m_vrc_ls_prg_b = 2; // A0
|
||||
}
|
||||
|
||||
void nes_bmc_kl06_device::pcb_reset()
|
||||
{
|
||||
m_reg = 0;
|
||||
nes_konami_vrc4_device::pcb_reset();
|
||||
}
|
||||
|
||||
void nes_cityfight_device::device_start()
|
||||
{
|
||||
nes_konami_vrc4_device::device_start();
|
||||
@ -697,3 +739,128 @@ void nes_bmc_830506c_device::write_h(offs_t offset, u8 data)
|
||||
set_prg();
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
Board BMC-831128C
|
||||
|
||||
Games: 1995 New Series Super 2 in 1
|
||||
|
||||
Weird clone that seems to be part Konami VRC4 (IRQ),
|
||||
and part Sunsoft FME-7 (banking/mirroring).
|
||||
|
||||
NES 2.0: mapper 528
|
||||
|
||||
In MAME: Supported.
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
|
||||
u8 nes_bmc_831128c_device::read_m(offs_t offset)
|
||||
{
|
||||
// LOG_MMC(("bmc_831128c read_m, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
if (m_reg == 1)
|
||||
return device_nes_cart_interface::read_m(offset);
|
||||
else
|
||||
return m_prg[(m_reg * 0x2000 + offset) & (m_prg_size - 1)];
|
||||
}
|
||||
|
||||
void nes_bmc_831128c_device::write_m(offs_t offset, u8 data)
|
||||
{
|
||||
// LOG_MMC(("bmc_831128c write_m, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
if (m_reg == 1)
|
||||
device_nes_cart_interface::write_m(offset, data);
|
||||
}
|
||||
|
||||
void nes_bmc_831128c_device::write_h(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("bmc_831128c write_h, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
u8 page = offset >> 12;
|
||||
if (page != 2 && page != 4) // ignore writes except $Axxx and $Cxxx
|
||||
return;
|
||||
|
||||
int outer = BIT(offset, 14) << 4;
|
||||
prg16_cdef(outer ? m_prg_chunks - 1 : 7);
|
||||
|
||||
u8 reg = offset & 0x0f;
|
||||
switch (reg)
|
||||
{
|
||||
case 0x0: case 0x1: case 0x2: case 0x3:
|
||||
case 0x4: case 0x5: case 0x6: case 0x7:
|
||||
chr1_x(reg, (outer << 4) | data, m_chr_source);
|
||||
break;
|
||||
case 0x8:
|
||||
m_reg = data;
|
||||
break;
|
||||
case 0x9:
|
||||
case 0xa:
|
||||
prg8_x(reg - 9, outer + (data & (outer | 0x0f)));
|
||||
break;
|
||||
// case 0xb: do nothing
|
||||
case 0xc:
|
||||
set_mirror(data);
|
||||
break;
|
||||
case 0xd:
|
||||
irq_ctrl_w(data);
|
||||
break;
|
||||
case 0xe:
|
||||
irq_ack_w();
|
||||
break;
|
||||
case 0xf:
|
||||
m_irq_count_latch = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
Board BMC-KL-06
|
||||
|
||||
Games: 1993 New 860 in 1 Over-Valued Golden Version Games
|
||||
|
||||
VRC4 clone with banking for multicart menu.
|
||||
|
||||
NES 2.0: mapper 447
|
||||
|
||||
In MAME: Supported.
|
||||
|
||||
TODO: There must be jumper settings since this is
|
||||
showing up as a 1650 in 1.
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
void nes_bmc_kl06_device::set_prg()
|
||||
{
|
||||
u8 outer = (m_reg & 0x03) << 4;
|
||||
|
||||
if (BIT(m_reg, 2))
|
||||
{
|
||||
u8 bank_lo = outer | m_mmc_prg_bank[0];
|
||||
u8 bank_hi = outer | m_mmc_prg_bank[1];
|
||||
u8 mode = ~m_reg & 0x02;
|
||||
prg8_89(bank_lo & ~mode);
|
||||
prg8_ab(bank_hi & ~mode);
|
||||
prg8_cd(bank_lo | mode);
|
||||
prg8_ef(bank_hi | mode);
|
||||
}
|
||||
else
|
||||
nes_konami_vrc4_device::set_prg(outer, 0x0f);
|
||||
}
|
||||
|
||||
void nes_bmc_kl06_device::write_m(offs_t offset, u8 data)
|
||||
{
|
||||
LOG_MMC(("bmc_kl06 write_m, offset: %04x, data: %02x\n", offset, data));
|
||||
|
||||
// 2K RAM for Crisis Force overlays control register
|
||||
nes_konami_vrc4_device::write_m(offset, data);
|
||||
|
||||
if (!(m_reg & 1)) // lock bit
|
||||
{
|
||||
m_reg = offset;
|
||||
set_prg();
|
||||
set_chr();
|
||||
}
|
||||
}
|
||||
|
@ -113,6 +113,53 @@ private:
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_bmc_831128c_device
|
||||
|
||||
class nes_bmc_831128c_device : public nes_konami_vrc4_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_bmc_831128c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
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;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
private:
|
||||
u8 m_reg;
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_bmc_kl06_device
|
||||
|
||||
class nes_bmc_kl06_device : public nes_konami_vrc4_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nes_bmc_kl06_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
virtual void write_m(offs_t offset, u8 data) override;
|
||||
|
||||
virtual void pcb_reset() override;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
virtual void set_prg() override;
|
||||
virtual void set_chr() override { nes_konami_vrc4_device::set_chr((m_reg & 0x03) << 7, 0x7f); }
|
||||
|
||||
private:
|
||||
u8 m_reg;
|
||||
};
|
||||
|
||||
|
||||
// ======================> nes_cityfight_device
|
||||
|
||||
class nes_cityfight_device : public nes_konami_vrc4_device
|
||||
@ -249,6 +296,8 @@ DECLARE_DEVICE_TYPE(NES_900218, nes_900218_device)
|
||||
DECLARE_DEVICE_TYPE(NES_AX40G, nes_ax40g_device)
|
||||
DECLARE_DEVICE_TYPE(NES_AX5705, nes_ax5705_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_830506C, nes_bmc_830506c_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_831128C, nes_bmc_831128c_device)
|
||||
DECLARE_DEVICE_TYPE(NES_BMC_KL06, nes_bmc_kl06_device)
|
||||
DECLARE_DEVICE_TYPE(NES_CITYFIGHT, nes_cityfight_device)
|
||||
DECLARE_DEVICE_TYPE(NES_HENGG_SHJY3, nes_hengg_shjy3_device)
|
||||
DECLARE_DEVICE_TYPE(NES_SHUIGUAN, nes_shuiguan_device)
|
||||
|
Loading…
Reference in New Issue
Block a user