summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2021-06-30 09:23:44 -0800
committer GitHub <noreply@github.com>2021-06-30 13:23:44 -0400
commit7216fe6a99d90c2a67b1b8140c37fb755b1b86e0 (patch)
tree7fa51df13b78caaf6e30229a7e76d9a19715ecb1 /src/devices/bus
parentb9325a1e1152910b04545c42bf286fdb1ede2d84 (diff)
bus/nes: add support for 2 more FDS conversions (#8238)
* add KS7010 PCB device unique to akumafds * add KS7030 PCB device unique to dokidokia * do some sorting and tidying of Kaiser board tags New working software list additions ----------------------------------- Akumajou Dracula (Asia, FDS conversion) [Kevtris] Doki Doki Panic (Asia, FDS conversion, alt PCB) [famiac]
Diffstat (limited to 'src/devices/bus')
-rw-r--r--src/devices/bus/nes/kaiser.cpp162
-rw-r--r--src/devices/bus/nes/kaiser.h60
-rw-r--r--src/devices/bus/nes/nes_carts.cpp20
-rw-r--r--src/devices/bus/nes/nes_pcb.hxx18
-rw-r--r--src/devices/bus/nes/nes_slot.h8
5 files changed, 233 insertions, 35 deletions
diff --git a/src/devices/bus/nes/kaiser.cpp b/src/devices/bus/nes/kaiser.cpp
index be1e728c74e..177a322b4b7 100644
--- a/src/devices/bus/nes/kaiser.cpp
+++ b/src/devices/bus/nes/kaiser.cpp
@@ -9,22 +9,19 @@
Here we emulate the following Kaiser bootleg PCBs
* Kaiser KS202
+ * Kaiser KS7010
* Kaiser KS7012
* Kaiser KS7013B
* Kaiser KS7016
* Kaiser KS7017
* Kaiser KS7022
+ * Kaiser KS7030
* Kaiser KS7031
* Kaiser KS7032
* Kaiser KS7037
* Kaiser KS7057
* Kaiser KS7058
- TODO:
- - FCEUmm lists more Kaiser PCBs:
- * KS7030 (for Yume Koujou Doki Doki Panic by Kaiser?)
- but there seem to be no available dumps...
-
***********************************************************************************************************/
@@ -50,8 +47,10 @@ DEFINE_DEVICE_TYPE(NES_KS7022, nes_ks7022_device, "nes_ks7022", "NES Cart Kai
DEFINE_DEVICE_TYPE(NES_KS7032, nes_ks7032_device, "nes_ks7032", "NES Cart Kaiser KS-7032 PCB")
DEFINE_DEVICE_TYPE(NES_KS202, nes_ks202_device, "nes_ks202", "NES Cart Kaiser KS-202 PCB")
DEFINE_DEVICE_TYPE(NES_KS7017, nes_ks7017_device, "nes_ks7017", "NES Cart Kaiser KS-7017 PCB")
+DEFINE_DEVICE_TYPE(NES_KS7010, nes_ks7010_device, "nes_ks7010", "NES Cart Kaiser KS-7010 PCB")
DEFINE_DEVICE_TYPE(NES_KS7012, nes_ks7012_device, "nes_ks7012", "NES Cart Kaiser KS-7012 PCB")
DEFINE_DEVICE_TYPE(NES_KS7013B, nes_ks7013b_device, "nes_ks7013b", "NES Cart Kaiser KS-7013B PCB")
+DEFINE_DEVICE_TYPE(NES_KS7030, nes_ks7030_device, "nes_ks7030", "NES Cart Kaiser KS-7030 PCB")
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")
@@ -88,6 +87,11 @@ nes_ks7017_device::nes_ks7017_device(const machine_config &mconfig, const char *
{
}
+nes_ks7010_device::nes_ks7010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : nes_nrom_device(mconfig, NES_KS7010, tag, owner, clock), m_latch(0)
+{
+}
+
nes_ks7012_device::nes_ks7012_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, NES_KS7012, tag, owner, clock)
{
@@ -98,6 +102,11 @@ nes_ks7013b_device::nes_ks7013b_device(const machine_config &mconfig, const char
{
}
+nes_ks7030_device::nes_ks7030_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : nes_nrom_device(mconfig, NES_KS7030, tag, owner, clock)
+{
+}
+
nes_ks7031_device::nes_ks7031_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, NES_KS7031, tag, owner, clock)
{
@@ -200,6 +209,22 @@ void nes_ks7017_device::pcb_reset()
m_irq_status = 0;
}
+void nes_ks7010_device::device_start()
+{
+ common_start();
+ save_item(NAME(m_latch));
+}
+
+void nes_ks7010_device::pcb_reset()
+{
+ prg16_89ab(0x05); // all upper banks are fixed
+ prg16_cdef(0x03);
+ chr8(0, CHRROM);
+ set_nt_mirroring(PPU_MIRROR_VERT);
+
+ m_latch = 0;
+}
+
void nes_ks7012_device::device_start()
{
common_start();
@@ -225,6 +250,21 @@ void nes_ks7013b_device::pcb_reset()
chr8(0, m_chr_source);
}
+void nes_ks7030_device::device_start()
+{
+ common_start();
+ save_item(NAME(m_reg));
+}
+
+void nes_ks7030_device::pcb_reset()
+{
+ prg32((m_prg_chunks >> 1) - 1); // not really used...
+ chr8(0, CHRRAM);
+ set_nt_mirroring(PPU_MIRROR_VERT);
+
+ m_reg[0] = m_reg[1] = 0;
+}
+
void nes_ks7031_device::device_start()
{
common_start();
@@ -457,7 +497,6 @@ uint8_t nes_ks7032_device::read_m(offs_t offset)
-------------------------------------------------*/
-
void nes_ks202_device::write_h(offs_t offset, uint8_t data)
{
LOG_MMC(("ks202 write_h, offset: %04x, data: %02x\n", offset, data));
@@ -567,6 +606,42 @@ uint8_t nes_ks7017_device::read_ex(offs_t offset)
/*-------------------------------------------------
+ Kaiser Board KS7010
+
+ Games: Akumajo Dracula FDS Conversion
+
+ This board has fixed PRG banks in 0x8000-0xffff.
+ 0x6000-0x7fff is an 8K swappable PRG bank. This bank
+ and the CHR bank are BOTH set by the same latch.
+ Moreover, the latch is set by READING certain
+ addresses and the exact mask is still unknown...
+
+ NES 2.0: mapper 554
+
+ In MAME: Supported.
+
+ -------------------------------------------------*/
+
+u8 nes_ks7010_device::read_m(offs_t offset)
+{
+// LOG_MMC(("ks7010 read_m, offset: %04x, data: %02x\n", offset, data));
+ return m_prg[m_latch * 0x2000 + offset];
+}
+
+u8 nes_ks7010_device::read_h(offs_t offset)
+{
+// LOG_MMC(("ks7010 read_h, offset: %04x, data: %02x\n", offset, data));
+ if ((offset >= 0x4ab6 && offset <= 0x4ad6) || offset == 0x6be2 || offset == 0x6be3 || offset == 0x6e32 || offset == 0x7ffc) // HACK! FIXME
+ {
+ m_latch = (offset >> 2) & 0x0f;
+ chr8(m_latch, CHRROM);
+ }
+
+ return hi_access_rom(offset);
+}
+
+/*-------------------------------------------------
+
Kaiser Board KS7012
Games: Zanac FDS Conversion
@@ -587,7 +662,6 @@ void nes_ks7012_device::write_h(offs_t offset, uint8_t data)
prg32(1);
}
-
/*-------------------------------------------------
Kaiser Board KS7013B
@@ -612,6 +686,77 @@ void nes_ks7013b_device::write_h(offs_t offset, uint8_t data)
set_nt_mirroring((data & 1) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
}
+/*-------------------------------------------------
+
+ Kaiser Board KS7030
+
+ Games: Doki Doki Panic (FDS conversion)
+
+ This board has a complicated memory layout. The last
+ 32k of the mask ROM is fixed into 0x8000-0xffff, but
+ 8k of WRAM and 8k of bankable PRG (in two 4k banks)
+ are adjacent and overlaid. The ranges are as follows.
+
+ WRAM: PRG:
+ - 3k, 0x6000-0x6bff - 1k, 0x6c00-0x6fff (reg 1, last 1k)
+ - 2k, 0xb800-0xbfff - 4k, 0x7000-0x7fff (reg 0)
+ - 3k, 0xcc00-0xd7ff - 3k, 0xc000-0xcc00 (reg 1, initial 3k)
+
+ The two registers latch part of the address in writes
+ to 0x8000-0x8fff and 0x9000-0x9fff respectively.
+
+ NES 2.0: mapper 347
+
+ In MAME: Supported.
+
+ -------------------------------------------------*/
+
+u8 nes_ks7030_device::read_m(offs_t offset)
+{
+// LOG_MMC(("ks7030 read_m, offset: %04x\n", offset));
+ if (offset < 0x0c00) // first of 3k WRAM
+ return m_prgram[offset];
+ else if (offset < 0x1000) // last 1k of 4k PRG bank
+ return m_prg[m_reg[1] * 0x1000 + offset];
+ else // 4k PRG
+ return m_prg[0x10000 + m_reg[0] * 0x1000 + (offset & 0x0fff)];
+}
+
+void nes_ks7030_device::write_m(offs_t offset, u8 data)
+{
+ LOG_MMC(("ks7030 write_m, offset: %04x\n", offset));
+ if (offset < 0x0c00) // first 3k of WRAM
+ m_prgram[offset] = data;
+}
+
+u8 nes_ks7030_device::read_h(offs_t offset)
+{
+// LOG_MMC(("ks7030 read_h, offset: %04x\n", offset));
+ if (offset < 0x3800 || offset >= 0x5800) // fixed 32k PRG, split 14k and 10k windows
+ return m_prg[0x18000 + (offset & 0x7fff)];
+ else if (offset < 0x4000) // middle 2k of WRAM
+ return m_prgram[offset - 0x2c00];
+ else if (offset < 0x4c00) // first 3k of 4k PRG bank
+ return m_prg[m_reg[1] * 0x1000 + (offset & 0x0fff)];
+ else // last 3k of WRAM
+ return m_prgram[offset - 0x3800];
+}
+
+void nes_ks7030_device::write_h(offs_t offset, u8 data)
+{
+ LOG_MMC(("ks7030 write_h, offset: %04x\n", offset));
+ if (offset < 0x1000)
+ {
+ set_nt_mirroring(BIT(offset, 3) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
+ m_reg[0] = offset & 0x07;
+ }
+ else if (offset < 0x2000)
+ m_reg[1] = offset & 0x0f;
+ else if (offset >= 0x3800 && offset < 0x4000) // middle 2k of WRAM
+ m_prgram[offset - 0x2c00] = data;
+ else if (offset >= 0x4c00 && offset < 0x5800) // last 3k of WRAM
+ m_prgram[offset - 0x3800] = data;
+}
/*-------------------------------------------------
@@ -652,8 +797,6 @@ void nes_ks7031_device::write_h(offs_t offset, uint8_t data)
m_reg[(offset >> 11) & 3] = data & 0x3f;
}
-
-
/*-------------------------------------------------
Kaiser Board KS7016
@@ -682,7 +825,6 @@ void nes_ks7016_device::write_h(offs_t offset, uint8_t data)
m_reg = (mask != 0x30) ? 0xb : (((offset >> 2) & 0x0f) << 1);
}
-
/*-------------------------------------------------
Kaiser Board KS7037
diff --git a/src/devices/bus/nes/kaiser.h b/src/devices/bus/nes/kaiser.h
index 8b57957e501..0b71e59cb51 100644
--- a/src/devices/bus/nes/kaiser.h
+++ b/src/devices/bus/nes/kaiser.h
@@ -127,6 +127,28 @@ private:
};
+// ======================> nes_ks7010_device
+
+class nes_ks7010_device : public nes_nrom_device
+{
+public:
+ // construction/destruction
+ nes_ks7010_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 pcb_reset() override;
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+
+private:
+ u8 m_latch;
+};
+
+
// ======================> nes_ks7012_device
class nes_ks7012_device : public nes_nrom_device
@@ -144,6 +166,7 @@ protected:
virtual void device_start() override;
};
+
// ======================> nes_ks7013b_device
class nes_ks7013b_device : public nes_nrom_device
@@ -163,6 +186,30 @@ protected:
};
+// ======================> nes_ks7030_device
+
+class nes_ks7030_device : public nes_nrom_device
+{
+public:
+ // construction/destruction
+ nes_ks7030_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_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[2];
+};
+
+
// ======================> nes_ks7031_device
class nes_ks7031_device : public nes_nrom_device
@@ -207,6 +254,7 @@ private:
uint8_t m_reg;
};
+
// ======================> nes_ks7037_device
class nes_ks7037_device : public nes_nrom_device
@@ -257,16 +305,18 @@ private:
// device type definition
-DECLARE_DEVICE_TYPE(NES_KS7058, nes_ks7058_device)
-DECLARE_DEVICE_TYPE(NES_KS7022, nes_ks7022_device)
-DECLARE_DEVICE_TYPE(NES_KS7032, nes_ks7032_device)
DECLARE_DEVICE_TYPE(NES_KS202, nes_ks202_device)
-DECLARE_DEVICE_TYPE(NES_KS7017, nes_ks7017_device)
+DECLARE_DEVICE_TYPE(NES_KS7010, nes_ks7010_device)
DECLARE_DEVICE_TYPE(NES_KS7012, nes_ks7012_device)
+DECLARE_DEVICE_TYPE(NES_KS7016, nes_ks7016_device)
+DECLARE_DEVICE_TYPE(NES_KS7017, nes_ks7017_device)
DECLARE_DEVICE_TYPE(NES_KS7013B, nes_ks7013b_device)
+DECLARE_DEVICE_TYPE(NES_KS7022, nes_ks7022_device)
+DECLARE_DEVICE_TYPE(NES_KS7030, nes_ks7030_device)
DECLARE_DEVICE_TYPE(NES_KS7031, nes_ks7031_device)
-DECLARE_DEVICE_TYPE(NES_KS7016, nes_ks7016_device)
+DECLARE_DEVICE_TYPE(NES_KS7032, nes_ks7032_device)
DECLARE_DEVICE_TYPE(NES_KS7037, nes_ks7037_device)
DECLARE_DEVICE_TYPE(NES_KS7057, nes_ks7057_device)
+DECLARE_DEVICE_TYPE(NES_KS7058, nes_ks7058_device)
#endif // MAME_BUS_NES_KAISER_H
diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp
index 0f12e24391c..b74804e13d4 100644
--- a/src/devices/bus/nes/nes_carts.cpp
+++ b/src/devices/bus/nes/nes_carts.cpp
@@ -249,17 +249,19 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("hengg_shjy3", NES_HENGG_SHJY3); // mapper 253
device.option_add_internal("hes", NES_HES);
device.option_add_internal("hosenkan", NES_HOSENKAN);
- device.option_add_internal("ks7058", NES_KS7058);
device.option_add_internal("ks202", NES_KS202); // mapper 56
- device.option_add_internal("ks7022", NES_KS7022); // mapper 175
+ device.option_add_internal("ks7010", NES_KS7010); // used in Akumajo Dracula (FDS Conversion)
+ device.option_add_internal("ks7012", NES_KS7012); // used in Zanac (FDS Conversion)
+ device.option_add_internal("ks7013b", NES_KS7013B); // used in Highway Star (FDS Conversion)
+ device.option_add_internal("ks7016", NES_KS7016); // used in Exciting Basket (FDS Conversion)
device.option_add_internal("ks7017", NES_KS7017);
- device.option_add_internal("ks7032", NES_KS7032); // mapper 142
- device.option_add_internal("ks7012", NES_KS7012); // used in Zanac (FDS Conversion);
- device.option_add_internal("ks7013b", NES_KS7013B); // used in Highway Star (FDS Conversion);
- 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("ks7022", NES_KS7022); // mapper 175
+ device.option_add_internal("ks7030", NES_KS7030); // used in Doki Doki Panic alt (FDS Conversion)
+ device.option_add_internal("ks7031", NES_KS7031); // used in Dracula II (FDS Conversion)
+ device.option_add_internal("ks7032", NES_KS7032); // mapper 142
+ 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("ks7058", NES_KS7058);
device.option_add_internal("gs2015", NES_GS2015);
device.option_add_internal("gs2004", NES_GS2004);
device.option_add_internal("gs2013", NES_GS2013);
diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx
index 17493d35370..d1cc3b5f3b0 100644
--- a/src/devices/bus/nes/nes_pcb.hxx
+++ b/src/devices/bus/nes/nes_pcb.hxx
@@ -161,17 +161,19 @@ static const nes_pcb pcb_list[] =
{ "hengg_shjy3", HENGG_SHJY3 }, // mapper 253
{ "hes", HES_BOARD },
{ "hosenkan", HOSENKAN_BOARD },
- { "ks7058", KAISER_KS7058 },
{ "ks202", KAISER_KS202 }, // mapper 56
- { "ks7022", KAISER_KS7022 }, // mapper 175
- { "ks7017", KAISER_KS7017 },
- { "ks7032", KAISER_KS7032 }, // mapper 142
- { "ks7031", KAISER_KS7031 }, // used in Dracula II (FDS Conversion)
- { "ks7012", KAISER_KS7012 }, // used in Zanac (FDS Conversion)
- { "ks7013b", KAISER_KS7013B }, // used in Highway Star (FDS Conversion)
+ { "ks7010", KAISER_KS7010 }, // used in Akumajo Dracula (FDS Conversion)
+ { "ks7012", KAISER_KS7012 }, // used in Zanac (FDS Conversion)
+ { "ks7013b", KAISER_KS7013B }, // used in Highway Star (FDS Conversion)
{ "ks7016", KAISER_KS7016 }, // used in Exciting Basketball (FDS Conversion)
- { "ks7037", KAISER_KS7037 }, // Metroid FDS Chinese
+ { "ks7017", KAISER_KS7017 },
+ { "ks7022", KAISER_KS7022 }, // mapper 175
+ { "ks7030", KAISER_KS7030 }, // used in Doki Doki Panic alt (FDS Conversion)
+ { "ks7031", KAISER_KS7031 }, // used in Dracula II (FDS Conversion)
+ { "ks7032", KAISER_KS7032 }, // mapper 142
+ { "ks7037", KAISER_KS7037 }, // Metroid (FDS Conversion)
{ "ks7057", KAISER_KS7057 }, // Gyruss (FDS Conversion)
+ { "ks7058", KAISER_KS7058 },
{ "gs2015", RCM_GS2015 },
{ "gs2004", RCM_GS2004 },
{ "gs2013", RCM_GS2013 },
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index 7cc5f1b247b..017caac802e 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -112,13 +112,15 @@ enum
BTL_SMB2JA, BTL_MARIOBABY, BTL_AISENSHINICOL, BTL_TOBIDASE,
BTL_SMB2JB, BTL_09034A, BTL_SMB3, BTL_SBROS11, BTL_DRAGONNINJA,
BTL_PIKACHUY2K, BTL_SHUIGUAN,
+ /* Kaiser */
+ KAISER_KS202, KAISER_KS7010, KAISER_KS7012, KAISER_KS7013B,
+ KAISER_KS7016, KAISER_KS7017, KAISER_KS7022, KAISER_KS7030,
+ KAISER_KS7031, KAISER_KS7032, KAISER_KS7037, KAISER_KS7057,
+ KAISER_KS7058,
/* Misc: these are needed to convert mappers to boards, I will sort them later */
OPENCORP_DAOU306, HES_BOARD, SVISION16_BOARD, RUMBLESTATION_BOARD, JYCOMPANY_A, JYCOMPANY_B, JYCOMPANY_C,
MAGICSERIES_MD, KASING_BOARD, FUTUREMEDIA_BOARD, FUKUTAKE_BOARD, SOMARI_SL12,
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_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,