diff options
author | 0kmg <9137159+0kmg@users.noreply.github.com> | 2021-09-21 03:52:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-21 07:52:46 -0400 |
commit | 3408a5c4e2cace2ece3c1e23c605456f46c606c2 (patch) | |
tree | d00b904ff1b585c2bc9e715a92a4e3afc4bcbfa3 /src/devices/bus/nes | |
parent | a48be35e14eeb47825a0d02e6cd204f454c72079 (diff) |
bus/nes: Added support for Donkey Kong 8 in 1. (#8603)
- Also, corrected previous related PCB name.
- Separately, set correct board type for Grandia games.
New working software list additions (nes.xml)
-----------------------------------
Donkey Kong 8 in 1 (JY-041) [anonymous]
Diffstat (limited to 'src/devices/bus/nes')
-rw-r--r-- | src/devices/bus/nes/mmc3_clones.cpp | 72 | ||||
-rw-r--r-- | src/devices/bus/nes/mmc3_clones.h | 30 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_carts.cpp | 3 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_ines.hxx | 4 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_pcb.hxx | 3 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_slot.h | 2 |
6 files changed, 98 insertions, 16 deletions
diff --git a/src/devices/bus/nes/mmc3_clones.cpp b/src/devices/bus/nes/mmc3_clones.cpp index 7f272e15828..322d35bdacd 100644 --- a/src/devices/bus/nes/mmc3_clones.cpp +++ b/src/devices/bus/nes/mmc3_clones.cpp @@ -77,7 +77,8 @@ DEFINE_DEVICE_TYPE(NES_BMC_411120C, nes_bmc_411120c_device, "nes_bmc_411120c DEFINE_DEVICE_TYPE(NES_BMC_820720C, nes_bmc_820720c_device, "nes_bmc_820720c", "NES Cart BMC 820720C PCB") DEFINE_DEVICE_TYPE(NES_BMC_830118C, nes_bmc_830118c_device, "nes_bmc_830118c", "NES Cart BMC 830118C PCB") DEFINE_DEVICE_TYPE(NES_BMC_830832C, nes_bmc_830832c_device, "nes_bmc_830832c", "NES Cart BMC 830832C PCB") -DEFINE_DEVICE_TYPE(NES_BMC_841101C, nes_bmc_841101c_device, "nes_bmc_841101c", "NES Cart BMC 841101C PCB") +DEFINE_DEVICE_TYPE(NES_BMC_YY841101C, nes_bmc_yy841101c_device, "nes_bmc_yy841101c", "NES Cart BMC YY841101C PCB") +DEFINE_DEVICE_TYPE(NES_BMC_YY841155C, nes_bmc_yy841155c_device, "nes_bmc_yy841155c", "NES Cart BMC YY841155C PCB") DEFINE_DEVICE_TYPE(NES_PJOY84, nes_pjoy84_device, "nes_pjoy84", "NES Cart Powerjoy 84 PCB") DEFINE_DEVICE_TYPE(NES_COOLBOY, nes_coolboy_device, "nes_coolboy", "NES Cart CoolBoy PCB") @@ -347,8 +348,13 @@ nes_bmc_830832c_device::nes_bmc_830832c_device(const machine_config &mconfig, co { } -nes_bmc_841101c_device::nes_bmc_841101c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : nes_txrom_device(mconfig, NES_BMC_841101C, tag, owner, clock) +nes_bmc_yy841101c_device::nes_bmc_yy841101c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_txrom_device(mconfig, NES_BMC_YY841101C, tag, owner, clock) +{ +} + +nes_bmc_yy841155c_device::nes_bmc_yy841155c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_txrom_device(mconfig, NES_BMC_YY841155C, tag, owner, clock) { } @@ -816,12 +822,26 @@ void nes_bmc_830832c_device::pcb_reset() mmc3_common_initialize(0x1f, 0xff, 0); } -void nes_bmc_841101c_device::pcb_reset() +void nes_bmc_yy841101c_device::pcb_reset() { m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; mmc3_common_initialize(0x0f, 0x7f, 0); } +void nes_bmc_yy841155c_device::device_start() +{ + mmc3_start(); + save_item(NAME(m_reg)); +} + +void nes_bmc_yy841155c_device::pcb_reset() +{ + m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; + + m_reg[0] = m_reg[1]; + mmc3_common_initialize(0x0f, 0x7f, 0); +} + void nes_pjoy84_device::device_start() { mmc3_start(); @@ -2871,7 +2891,7 @@ void nes_bmc_830832c_device::write_m(offs_t offset, u8 data) /*------------------------------------------------- - BMC-841101C + BMC-YY841101C Games: 4 in 1 (OK-411, JY-009, JY-018, JY-019, JY-020) @@ -2883,9 +2903,9 @@ void nes_bmc_830832c_device::write_m(offs_t offset, u8 data) -------------------------------------------------*/ -void nes_bmc_841101c_device::write_m(offs_t offset, u8 data) +void nes_bmc_yy841101c_device::write_m(offs_t offset, u8 data) { - LOG_MMC(("bmc_841101c write_m, offset: %04x, data: %02x\n", offset, data)); + LOG_MMC(("bmc_yy841101c write_m, offset: %04x, data: %02x\n", offset, data)); if (offset & 0x1000) // games only write 0x7000, this mask is a guess { m_prg_base = data & 0xf0; @@ -2897,6 +2917,44 @@ void nes_bmc_841101c_device::write_m(offs_t offset, u8 data) /*------------------------------------------------- + BMC-YY841155C + + Games: Donkey Kong 8 in 1 (JY-041) + + MMC3 clone with banking for multigame menu. + + NES 2.0: mapper 376 + + In MAME: Supported. + + -------------------------------------------------*/ + +void nes_bmc_yy841155c_device::write_m(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_yy841155c write_m, offset: %04x, data: %02x\n", offset, data)); + + if (offset >= 0x1000) + { + m_reg[offset & 1] = data; + + m_prg_base = (m_reg[1] & 0x01) << 5 | (m_reg[0] & 0x40) >> 2; + if (BIT(m_reg[0], 7)) // NROM mode + { + u8 bank = m_prg_base >> 1 | (m_reg[0] & 0x07); + u8 mode = BIT(m_reg[0], 5); + prg16_89ab(bank & ~mode); + prg16_cdef(bank | mode); + } + else // MMC3 mode + set_prg(m_prg_base, m_prg_mask); + + m_chr_base = m_prg_base << 3; + set_chr(m_chr_source, m_chr_base, m_chr_mask); + } +} + +/*------------------------------------------------- + BMC-POWERJOY -------------------------------------------------*/ diff --git a/src/devices/bus/nes/mmc3_clones.h b/src/devices/bus/nes/mmc3_clones.h index ba86ed4ab2d..201c82efca7 100644 --- a/src/devices/bus/nes/mmc3_clones.h +++ b/src/devices/bus/nes/mmc3_clones.h @@ -919,13 +919,13 @@ public: }; -// ======================> nes_bmc_841101c_device +// ======================> nes_bmc_yy841101c_device -class nes_bmc_841101c_device : public nes_txrom_device +class nes_bmc_yy841101c_device : public nes_txrom_device { public: // construction/destruction - nes_bmc_841101c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + nes_bmc_yy841101c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void write_m(offs_t offset, u8 data) override; @@ -933,6 +933,27 @@ public: }; +// ======================> nes_bmc_yy841155c_device + +class nes_bmc_yy841155c_device : public nes_txrom_device +{ +public: + // construction/destruction + nes_bmc_yy841155c_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; + +private: + u8 m_reg[2]; +}; + + // ======================> nes_pjoy84_device class nes_pjoy84_device : public nes_txrom_device @@ -1026,7 +1047,8 @@ DECLARE_DEVICE_TYPE(NES_BMC_411120C, nes_bmc_411120c_device) DECLARE_DEVICE_TYPE(NES_BMC_820720C, nes_bmc_820720c_device) DECLARE_DEVICE_TYPE(NES_BMC_830118C, nes_bmc_830118c_device) DECLARE_DEVICE_TYPE(NES_BMC_830832C, nes_bmc_830832c_device) -DECLARE_DEVICE_TYPE(NES_BMC_841101C, nes_bmc_841101c_device) +DECLARE_DEVICE_TYPE(NES_BMC_YY841101C, nes_bmc_yy841101c_device) +DECLARE_DEVICE_TYPE(NES_BMC_YY841155C, nes_bmc_yy841155c_device) DECLARE_DEVICE_TYPE(NES_PJOY84, nes_pjoy84_device) DECLARE_DEVICE_TYPE(NES_COOLBOY, nes_coolboy_device) diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp index b5ccf2c1db6..7dea84ea444 100644 --- a/src/devices/bus/nes/nes_carts.cpp +++ b/src/devices/bus/nes/nes_carts.cpp @@ -448,7 +448,8 @@ void nes_cart(device_slot_interface &device) device.option_add_internal("bmc_820720c", NES_BMC_820720C); device.option_add_internal("bmc_830118c", NES_BMC_830118C); device.option_add_internal("bmc_830832c", NES_BMC_830832C); - device.option_add_internal("bmc_841101c", NES_BMC_841101C); + device.option_add_internal("bmc_yy841101c", NES_BMC_YY841101C); + device.option_add_internal("bmc_yy841155c", NES_BMC_YY841155C); device.option_add_internal("pjoy84", NES_PJOY84); device.option_add_internal("nocash_nochr", NES_NOCHR); device.option_add_internal("action53", NES_ACTION53); diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx index 0438a023b2c..74e3360f742 100644 --- a/src/devices/bus/nes/nes_ines.hxx +++ b/src/devices/bus/nes/nes_ines.hxx @@ -396,7 +396,7 @@ static const nes_mmc mmc_list[] = // 358 JY multicarts, variant of mapper 282 // 359 BMC-SB-5013 multicarts // 360 Bit Corp 31-in-1 (ID 3150) (has five accessible DIP switches!) - { 361, BMC_841101C }, + { 361, BMC_YY841101C }, // 362 JY-005 multicart // 363 variant of mapper 358? { 364, BMC_830832C }, @@ -411,7 +411,7 @@ static const nes_mmc mmc_list[] = // 373 Super 4-in-1, not in nes.xml? { 374, BMC_RESETSXROM }, // 375 135-in-1 2MB multicart - // 376 JY-041 multicart + { 376, BMC_YY841155C }, // 377 JY-111 multicart, similar to mapper 367 // 378 8-in-1 multicart, which one? // 379 35-in-1 multicart, similar to mapper 38 diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx index 54a40eda102..410fb6197f1 100644 --- a/src/devices/bus/nes/nes_pcb.hxx +++ b/src/devices/bus/nes/nes_pcb.hxx @@ -323,7 +323,8 @@ static const nes_pcb pcb_list[] = { "bmc_820720c", BMC_820720C }, { "bmc_830118c", BMC_830118C }, { "bmc_830832c", BMC_830832C }, - { "bmc_841101c", BMC_841101C }, + { "bmc_yy841101c", BMC_YY841101C }, + { "bmc_yy841155c", BMC_YY841155C }, { "pjoy84", BMC_PJOY84 }, { "bmc_gold150", BMC_GOLD150 }, { "bmc_gold260", BMC_GOLD260 }, diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index d57beff1760..f634c7c1dc7 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -101,7 +101,7 @@ enum BMC_FCGENJIN_8IN1, BMC_FK23C, BMC_FK23CA, BMC_JY820845C, BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146, BMC_2751, BMC_8157, BMC_00202650, - BMC_820720C, BMC_830118C, BMC_830832C, BMC_841101C, + BMC_820720C, BMC_830118C, BMC_830832C, BMC_YY841101C, BMC_YY841155C, BMC_411120C, BMC_GOLD150, BMC_GOLD260, BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET, BMC_LITTLECOM160, BMC_CTC09, BMC_K1029, BMC_K3006, BMC_K3036, BMC_K3046, BMC_SA005A, BMC_TJ03, |