summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2021-11-19 15:34:51 -0900
committer GitHub <noreply@github.com>2021-11-19 19:34:51 -0500
commitf0d98df48769ffaa92155137aa5733eeabe90f93 (patch)
tree5e63709fb206d24377e110322991957944add473 /src/devices
parentbbc2ba650b6ad0065ac766588e9f41a8c0aa0cde (diff)
bus/nes: Added partial code for unlicensed game Dragon Fighter. (#8833)
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/bus/nes/mmc3_clones.cpp59
-rw-r--r--src/devices/bus/nes/mmc3_clones.h25
-rw-r--r--src/devices/bus/nes/nes_carts.cpp1
-rw-r--r--src/devices/bus/nes/nes_ines.hxx4
-rw-r--r--src/devices/bus/nes/nes_pcb.hxx2
-rw-r--r--src/devices/bus/nes/nes_slot.h2
6 files changed, 89 insertions, 4 deletions
diff --git a/src/devices/bus/nes/mmc3_clones.cpp b/src/devices/bus/nes/mmc3_clones.cpp
index 5bf01d9f6a8..1f289cf3899 100644
--- a/src/devices/bus/nes/mmc3_clones.cpp
+++ b/src/devices/bus/nes/mmc3_clones.cpp
@@ -29,6 +29,7 @@
//-------------------------------------------------
DEFINE_DEVICE_TYPE(NES_NITRA, nes_nitra_device, "nes_nitra", "NES Cart Nitra PCB")
+DEFINE_DEVICE_TYPE(NES_BMW8544, nes_bmw8544_device, "nes_bmw8544", "NES Cart BMW8544 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 Splash Bomb PCB")
@@ -128,6 +129,11 @@ nes_nitra_device::nes_nitra_device(const machine_config &mconfig, const char *ta
{
}
+nes_bmw8544_device::nes_bmw8544_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : nes_txrom_device(mconfig, NES_BMW8544, tag, owner, clock), m_reg(0)
+{
+}
+
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)
{
@@ -437,6 +443,23 @@ nes_coolboy_device::nes_coolboy_device(const machine_config &mconfig, const char
{
}
+
+
+
+void nes_bmw8544_device::device_start()
+{
+ mmc3_start();
+ save_item(NAME(m_reg));
+}
+
+void nes_bmw8544_device::pcb_reset()
+{
+ m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
+
+ m_reg = 0;
+ mmc3_common_initialize(0x0f, 0xff, 0);
+}
+
void nes_family4646_device::device_start()
{
mmc3_start();
@@ -1032,6 +1055,42 @@ void nes_nitra_device::write_h(offs_t offset, uint8_t data)
/*-------------------------------------------------
+ Board BMW8544
+
+ Games: Dragon Fighter (Flying Star)
+
+ MMC3 clone with poorly understood PRG/CHR banking.
+
+ NES 2.0: mapper 292
+
+ In MAME: Not supported.
+
+ -------------------------------------------------*/
+
+void nes_bmw8544_device::set_prg(int prg_base, int prg_mask)
+{
+ nes_txrom_device::set_prg(prg_base, prg_mask);
+ prg8_89(m_reg);
+}
+
+u8 nes_bmw8544_device::read_m(offs_t offset)
+{
+// LOG_MMC(("bmw8544 read_m, offset: %04x\n", offset));
+
+ // CHR banking may be done by reads in this address range
+
+ return nes_txrom_device::read_m(offset);
+}
+
+void nes_bmw8544_device::write_m(offs_t offset, u8 data)
+{
+ LOG_MMC(("bmw8544 write_m, offset: %04x, data: %02x\n", offset, data));
+ m_reg = data;
+ prg8_89(data);
+}
+
+/*-------------------------------------------------
+
Board UNL-FS6
Games: Street Fighter VI / Fight Street VI
diff --git a/src/devices/bus/nes/mmc3_clones.h b/src/devices/bus/nes/mmc3_clones.h
index 31b80c5cb18..faeacccb091 100644
--- a/src/devices/bus/nes/mmc3_clones.h
+++ b/src/devices/bus/nes/mmc3_clones.h
@@ -21,6 +21,30 @@ public:
};
+// ======================> nes_bmw8544_device
+
+class nes_bmw8544_device : public nes_txrom_device
+{
+public:
+ // construction/destruction
+ nes_bmw8544_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 pcb_reset() override;
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+
+ virtual void set_prg(int prg_base, int prg_mask) override;
+
+private:
+ u8 m_reg;
+};
+
+
// ======================> nes_fs6_device
class nes_fs6_device : public nes_txrom_device
@@ -1119,6 +1143,7 @@ private:
// device type definition
DECLARE_DEVICE_TYPE(NES_NITRA, nes_nitra_device)
+DECLARE_DEVICE_TYPE(NES_BMW8544, nes_bmw8544_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)
diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp
index b5da813c390..c7911546d70 100644
--- a/src/devices/bus/nes/nes_carts.cpp
+++ b/src/devices/bus/nes/nes_carts.cpp
@@ -343,6 +343,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("somari", NES_SOMARI); // mapper 116
device.option_add_internal("huang2", NES_HUANG2); // mapper 116 also
device.option_add_internal("nitra", NES_NITRA);
+ device.option_add_internal("bmw8544", NES_BMW8544);
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
diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx
index 61cb9fc1fb2..7ebaf16f0c9 100644
--- a/src/devices/bus/nes/nes_ines.hxx
+++ b/src/devices/bus/nes/nes_ines.hxx
@@ -327,9 +327,9 @@ static const nes_mmc mmc_list[] =
{ 289, BMC_60311C },
{ 290, BMC_NTD_03 },
{ 291, BMC_NT639 },
- // { 292, UNL_DRAGONFIGHTER }, in nes.xml, not emulated yet
+ { 292, UNL_BMW8544 }, // Dragon Fighter by Flying Star
// 293 NewStar multicarts, do we have these in nes.xml?
- { 294, BMC_FAMILY_4646 }, // FIXME: is this really exactly the same as mapper 134?
+ { 294, BMC_FAMILY_4646 }, // FIXME: is this really exactly the same as mapper 134?
// 295 JY multicarts not yet in nes.xml
// 296 VT3x handhelds
{ 297, TXC_22110 }, // 2-in-1 Uzi Lightgun
diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx
index 4d05211c4d2..2d1c0214955 100644
--- a/src/devices/bus/nes/nes_pcb.hxx
+++ b/src/devices/bus/nes/nes_pcb.hxx
@@ -229,6 +229,7 @@ static const nes_pcb pcb_list[] =
{ "somari", SOMARI_SL12 }, // mapper 116
{ "huang2", SOMARI_HUANG2 }, // mapper 116 also
{ "nitra", NITRA_TDA },
+ { "bmw8544", UNL_BMW8544 },
{ "fs6", UNL_FS6 }, // mapper 196 alt? (for Street Fighter VI / Fight Street VI },
{ "sbros11", BTL_SBROS11 },
{ "family4646", BMC_FAMILY_4646 },
@@ -396,7 +397,6 @@ static const nes_pcb pcb_list[] =
{ "onebus", UNSUPPORTED_BOARD },
{ "coolboy", UNSUPPORTED_BOARD },
{ "pec586", UNSUPPORTED_BOARD },
- { "unl_drgnfgt", UNSUPPORTED_BOARD }, // Dragon Fighter by Flying Star
{ "test", TEST_BOARD },
{ "unknown", UNKNOWN_BOARD } // a few pirate dumps uses the wrong mapper...
};
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index 9c01f4f126b..8509e2a74c2 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -116,7 +116,7 @@ enum
UNL_SF3, UNL_RACERMATE, UNL_EDU2K,
UNL_STUDYNGAME, UNL_603_5052, UNL_H2288, UNL_158B, UNL_2708,
UNL_MALISB, UNL_AC08, UNL_A9746, UNL_43272, UNL_TF1201, UNL_TH21311,
- UNL_CITYFIGHT, UNL_NINJARYU, UNL_EH8813A, UNL_RT01,
+ UNL_BMW8544, UNL_CITYFIGHT, UNL_NINJARYU, UNL_EH8813A, UNL_RT01,
// Bootleg boards
BTL_0353, BTL_09034A, BTL_2YUDB, BTL_900218, BTL_AISENSHINICOL,
BTL_BATMANFS, BTL_CONTRAJ, BTL_DRAGONNINJA, BTL_L001, BTL_MARIOBABY,