diff options
author | 0kmg <9137159+0kmg@users.noreply.github.com> | 2022-04-01 18:00:33 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 22:00:33 -0400 |
commit | 2aa80b9d070dbcabac358ab35bfcbeb82f2e4e2d (patch) | |
tree | 70ed34a8552b8fb588197f5523aae9a35d032bc3 /src/devices/bus/nes | |
parent | 976ec5da2807deb976478d10d40f6ad51b39d02b (diff) |
bus/nes: Added support for K-3071, S-009, and TH2348 boards. (#9498)
New working software list additions (nes.xml)
-----------------------------------
Chāozhí Gāo K Jīnkǎ 110 in 1 [Consolethinks]
8 in 1 (0801) [Consolethinks]
Golden 8 in 1 [Consolethinks]
Diffstat (limited to 'src/devices/bus/nes')
-rw-r--r-- | src/devices/bus/nes/multigame.cpp | 156 | ||||
-rw-r--r-- | src/devices/bus/nes/multigame.h | 61 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_carts.cpp | 3 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_ines.hxx | 20 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_pcb.hxx | 3 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_slot.h | 5 |
6 files changed, 238 insertions, 10 deletions
diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp index 8c8b289b084..bbfae735e59 100644 --- a/src/devices/bus/nes/multigame.cpp +++ b/src/devices/bus/nes/multigame.cpp @@ -8,9 +8,9 @@ Here we emulate several PCBs used in multigame pirate carts (not MMC-3 based) - TODO: Investigate further Gunsmoke on mc_8et40 and mc_2gn91. Both exhibit the - same bug where enemies/barrels don't appear until they are halfway down the - screen. They are both almost the same minor hack of the US release. + TODO: Investigate further Gunsmoke on mc_8et40, mc_2gn91, mc_8x801. All have + the same bug where enemies/barrels don't appear until they are halfway down + the screeen. They all seem to be a minor hack of the US release. ***********************************************************************************************************/ @@ -65,8 +65,11 @@ DEFINE_DEVICE_TYPE(NES_BMC_HP898F, nes_bmc_hp898f_device, "nes_bmc_hp898 DEFINE_DEVICE_TYPE(NES_BMC_K1029, nes_bmc_k1029_device, "nes_bmc_k1029", "NES Cart BMC K-1029 PCB") DEFINE_DEVICE_TYPE(NES_BMC_K3036, nes_bmc_k3036_device, "nes_bmc_k3036", "NES Cart BMC K-3036 PCB") DEFINE_DEVICE_TYPE(NES_BMC_K3046, nes_bmc_k3046_device, "nes_bmc_k3046", "NES Cart BMC K-3046 PCB") +DEFINE_DEVICE_TYPE(NES_BMC_K3071, nes_bmc_k3071_device, "nes_bmc_k3071", "NES Cart BMC K-3071 PCB") +DEFINE_DEVICE_TYPE(NES_BMC_S009, nes_bmc_s009_device, "nes_bmc_s009", "NES Cart BMC S-009 PCB") DEFINE_DEVICE_TYPE(NES_BMC_SA005A, nes_bmc_sa005a_device, "nes_bmc_sa005a", "NES Cart BMC SA005-A PCB") DEFINE_DEVICE_TYPE(NES_BMC_TF2740, nes_bmc_tf2740_device, "nes_bmc_tf2740", "NES Cart BMC TF2740 PCB") +DEFINE_DEVICE_TYPE(NES_BMC_TH2348, nes_bmc_th2348_device, "nes_bmc_th2348", "NES Cart BMC TH2348 PCB") DEFINE_DEVICE_TYPE(NES_BMC_TJ03, nes_bmc_tj03_device, "nes_bmc_tj03", "NES Cart BMC TJ-03 PCB") DEFINE_DEVICE_TYPE(NES_BMC_WS, nes_bmc_ws_device, "nes_bmc_ws", "NES Cart BMC WS PCB") DEFINE_DEVICE_TYPE(NES_BMC_11160, nes_bmc_11160_device, "nes_bmc_1160", "NES Cart BMC-1160 PCB") @@ -272,6 +275,16 @@ nes_bmc_k3046_device::nes_bmc_k3046_device(const machine_config &mconfig, const { } +nes_bmc_k3071_device::nes_bmc_k3071_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_nrom_device(mconfig, NES_BMC_K3071, tag, owner, clock) +{ +} + +nes_bmc_s009_device::nes_bmc_s009_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_nrom_device(mconfig, NES_BMC_S009, tag, owner, clock), m_reg(0) +{ +} + nes_bmc_sa005a_device::nes_bmc_sa005a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_BMC_SA005A, tag, owner, clock) { @@ -282,6 +295,11 @@ nes_bmc_tf2740_device::nes_bmc_tf2740_device(const machine_config &mconfig, cons { } +nes_bmc_th2348_device::nes_bmc_th2348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_nrom_device(mconfig, NES_BMC_TH2348, tag, owner, clock), m_latch(0) +{ +} + nes_bmc_tj03_device::nes_bmc_tj03_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_BMC_TJ03, tag, owner, clock) { @@ -834,6 +852,28 @@ void nes_bmc_k3046_device::pcb_reset() chr8(0, CHRRAM); } +void nes_bmc_k3071_device::pcb_reset() +{ + prg16_89ab(0); + prg16_cdef(0); + chr8(0, CHRROM); +} + +void nes_bmc_s009_device::device_start() +{ + common_start(); + save_item(NAME(m_reg)); +} + +void nes_bmc_s009_device::pcb_reset() +{ + prg16_89ab(0); + prg16_cdef(7); + chr8(0, CHRRAM); + + m_reg = 0; +} + void nes_bmc_sa005a_device::pcb_reset() { prg16_89ab(0); @@ -857,6 +897,21 @@ void nes_bmc_tf2740_device::pcb_reset() m_reg[0] = m_reg[1] = m_reg[2] = 0; } +void nes_bmc_th2348_device::device_start() +{ + common_start(); + save_item(NAME(m_latch)); +} + +void nes_bmc_th2348_device::pcb_reset() +{ + prg16_89ab(0); + prg16_cdef(7); + chr8(0, CHRRAM); + + m_latch = 0; +} + void nes_bmc_ws_device::device_start() { common_start(); @@ -2116,6 +2171,64 @@ void nes_bmc_k3046_device::write_h(offs_t offset, u8 data) /*------------------------------------------------- + BMC-K-3071 + + Games: 110 in 1 + + NES 2.0: mapper 438 + + In MAME: Supported. + + -------------------------------------------------*/ + +void nes_bmc_k3071_device::write_h(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_k3071 write_h, offset: %04x, data: %02x\n", offset, data)); + + u8 bank = BIT(offset, 1, 5); + u8 mode = BIT(offset, 0); + prg16_89ab(bank & ~mode); + prg16_cdef(bank | mode); + + chr8(BIT(data, 1, 5), CHRROM); + set_nt_mirroring(BIT(data, 0) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); +} + +/*------------------------------------------------- + + BMC-S-009 + + Games: 8 in 1 + + NES 2.0: mapper 434 + + In MAME: Supported. + + -------------------------------------------------*/ + +void nes_bmc_s009_device::write_m(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_s009 write_m, offset: %04x, data: %02x\n", offset, data)); + + m_reg = (data & 0x07) << 3; + prg16_89ab(m_reg); + prg16_cdef(m_reg | 0x07); + + set_nt_mirroring(BIT(data, 5) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ); +} + +void nes_bmc_s009_device::write_h(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_s009 write_h, offset: %04x, data: %02x\n", offset, data)); + + // this pcb is subject to bus conflict + data = account_bus_conflict(offset, data); + + prg16_89ab(m_reg | (data & 0x07)); +} + +/*------------------------------------------------- + BMC-SA005-A Games: 16 in 1 @@ -2192,6 +2305,43 @@ u8 nes_bmc_tf2740_device::read_m(offs_t offset) /*------------------------------------------------- + BMC-TH2348 + + Games: Golden 8 in 1 + + NES 2.0: mapper 437 + + In MAME: Supported. + + -------------------------------------------------*/ + +void nes_bmc_th2348_device::write_l(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_th2348 write_l, offset: %04x, data: %02x\n", offset, data)); + + offset += 0x100; + if (offset >= 0x1000) + { + m_latch = (offset & 0x07) << 3; + prg16_89ab(m_latch); + prg16_cdef(m_latch | 0x07); + + set_nt_mirroring(BIT(offset, 3) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); + } +} + +void nes_bmc_th2348_device::write_h(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_th2348 write_h, offset: %04x, data: %02x\n", offset, data)); + + // this pcb is subject to bus conflict + data = account_bus_conflict(offset, data); + + prg16_89ab(m_latch | (data & 0x07)); +} + +/*------------------------------------------------- + BMC-TJ-03 Games: 4 in 1 diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h index ee40ecf4591..ca167fa609a 100644 --- a/src/devices/bus/nes/multigame.h +++ b/src/devices/bus/nes/multigame.h @@ -527,6 +527,42 @@ public: }; +// ======================> nes_bmc_k3071_device + +class nes_bmc_k3071_device : public nes_nrom_device +{ +public: + // construction/destruction + nes_bmc_k3071_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual void write_h(offs_t offset, u8 data) override; + + virtual void pcb_reset() override; +}; + + +// ======================> nes_bmc_s009_device + +class nes_bmc_s009_device : public nes_nrom_device +{ +public: + // construction/destruction + nes_bmc_s009_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 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 = 0; +}; + + // ======================> nes_bmc_sa005a_device class nes_bmc_sa005a_device : public nes_nrom_device @@ -566,6 +602,28 @@ private: }; +// ======================> nes_bmc_th2348_device + +class nes_bmc_th2348_device : public nes_nrom_device +{ +public: + // construction/destruction + nes_bmc_th2348_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual void write_l(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_latch = 0; +}; + + // ======================> nes_bmc_tj03_device class nes_bmc_tj03_device : public nes_nrom_device @@ -1335,8 +1393,11 @@ DECLARE_DEVICE_TYPE(NES_BMC_HP898F, nes_bmc_hp898f_device) DECLARE_DEVICE_TYPE(NES_BMC_K1029, nes_bmc_k1029_device) DECLARE_DEVICE_TYPE(NES_BMC_K3036, nes_bmc_k3036_device) DECLARE_DEVICE_TYPE(NES_BMC_K3046, nes_bmc_k3046_device) +DECLARE_DEVICE_TYPE(NES_BMC_K3071, nes_bmc_k3071_device) +DECLARE_DEVICE_TYPE(NES_BMC_S009, nes_bmc_s009_device) DECLARE_DEVICE_TYPE(NES_BMC_SA005A, nes_bmc_sa005a_device) DECLARE_DEVICE_TYPE(NES_BMC_TF2740, nes_bmc_tf2740_device) +DECLARE_DEVICE_TYPE(NES_BMC_TH2348, nes_bmc_th2348_device) DECLARE_DEVICE_TYPE(NES_BMC_TJ03, nes_bmc_tj03_device) DECLARE_DEVICE_TYPE(NES_BMC_WS, nes_bmc_ws_device) DECLARE_DEVICE_TYPE(NES_BMC_11160, nes_bmc_11160_device) diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp index 35cac97f6fb..4cf827fc544 100644 --- a/src/devices/bus/nes/nes_carts.cpp +++ b/src/devices/bus/nes/nes_carts.cpp @@ -409,8 +409,11 @@ void nes_cart(device_slot_interface &device) device.option_add_internal("bmc_k3033", NES_BMC_K3033); device.option_add_internal("bmc_k3036", NES_BMC_K3036); device.option_add_internal("bmc_k3046", NES_BMC_K3046); + device.option_add_internal("bmc_k3071", NES_BMC_K3071); + device.option_add_internal("bmc_s009", NES_BMC_S009); device.option_add_internal("bmc_sa005a", NES_BMC_SA005A); device.option_add_internal("bmc_tf2740", NES_BMC_TF2740); + device.option_add_internal("bmc_th2348", NES_BMC_TH2348); device.option_add_internal("bmc_tj03", NES_BMC_TJ03); device.option_add_internal("bmc_ws", NES_BMC_WS); device.option_add_internal("bmc_g146", NES_BMC_G146); diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx index cefbd4259e9..e5d909ef8c9 100644 --- a/src/devices/bus/nes/nes_ines.hxx +++ b/src/devices/bus/nes/nes_ines.hxx @@ -464,16 +464,26 @@ static const nes_mmc mmc_list[] = // 426 PnP // 427 PnP { 428, BMC_TF2740 }, - // 429 Unused - // 430 Unused + // 429 Milowork FCFC1 flash cartridge + // 430 MMC3-based 831031C/T-308 multicart { 431, BMC_GN91B }, // 432 Realtec 8090 { 433, BMC_NC20MB }, - // 434 S-009 - // 435...442 Unused + { 434, BMC_S009 }, + // 435 F-1002 multicart + // 436 VT02 PnP + { 437, BMC_TH2348 }, + { 438, BMC_K3071 }, + // 439 YS2309 multicart + // 440 Dongda Sonic REC-9388 educational computer + // 441 841026C and 850335C multicarts + // 442 "Golden Key" educational computer // 443 NC3000M multicart // 444 NC7000M multicart - // 445...511 Unused + // 445 DG574B MMC3-compatible multicart + // 446 Mindkids SMD172B_FPGA board + // 447 VRC4-based KL-06 multicart + // 448...511 Unused // 512 probably the correct MMC3 clone for chuugokt in nes.xml { 513, SACHEN_SA9602B }, // 514 seems to be for skaraok, currently set to UNKNOWN in nes.xml diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx index 9a1dd1d99f6..f09348a9824 100644 --- a/src/devices/bus/nes/nes_pcb.hxx +++ b/src/devices/bus/nes/nes_pcb.hxx @@ -289,8 +289,11 @@ static const nes_pcb pcb_list[] = { "bmc_k3033", BMC_K3033 }, { "bmc_k3036", BMC_K3036 }, { "bmc_k3046", BMC_K3046 }, + { "bmc_k3071", BMC_K3071 }, + { "bmc_s009", BMC_S009 }, { "bmc_sa005a", BMC_SA005A }, { "bmc_tf2740", BMC_TF2740 }, + { "bmc_th2348", BMC_TH2348 }, { "bmc_tj03", BMC_TJ03 }, { "bmc_ws", BMC_WS }, { "bmc_hik300", BMC_SUPERHIK_300IN1 }, diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index b666ec38bb4..c5fd2021eef 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -101,13 +101,14 @@ enum BMC_830425C, BMC_830506C, BMC_830928C, BMC_850437C, BMC_891227, BMC_970630C, BMC_N32_4IN1, BMC_NC20MB, BMC_NT639, BMC_NTD_03, BMC_SRPG_5IN1, BMC_EL860947C, BMC_EL861121C, BMC_FAM250, BMC_FK23C, BMC_FK23CA, - BMC_JY012005, BMC_JY820845C, BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146, + BMC_JY012005, BMC_JY820845C, BMC_PJOY84, + 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_GOLD150, BMC_GOLD260, BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET, BMC_LITTLECOM160, - BMC_K1029, BMC_K3006, BMC_K3033, BMC_K3036, BMC_K3046, BMC_SA005A, + BMC_K1029, BMC_K3006, BMC_K3033, BMC_K3036, BMC_K3046, BMC_K3071, BMC_SA005A, BMC_TF2740, BMC_TJ03, BMC_RESETSXROM, BMC_RESETTXROM, BMC_TECHLINE9IN1, // Unlicensed UNL_8237, UNL_8237A, UNL_CC21, UNL_AX40G, UNL_AX5705, UNL_KN42, |