summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/src/bus.lua2
-rw-r--r--src/devices/bus/nes/nes_carts.cpp1
-rw-r--r--src/devices/bus/nes/nes_carts.h1
-rw-r--r--src/devices/bus/nes/nes_ines.hxx2
-rw-r--r--src/devices/bus/nes/nes_pcb.hxx1
-rw-r--r--src/devices/bus/nes/nes_slot.h2
-rw-r--r--src/devices/bus/nes/zemina.cpp85
-rw-r--r--src/devices/bus/nes/zemina.h26
8 files changed, 118 insertions, 2 deletions
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index c7a03a45d26..5782c9e27f5 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -1921,6 +1921,8 @@ if (BUSES["NES"]~=null) then
MAME_DIR .. "src/devices/bus/nes/txc.h",
MAME_DIR .. "src/devices/bus/nes/waixing.cpp",
MAME_DIR .. "src/devices/bus/nes/waixing.h",
+ MAME_DIR .. "src/devices/bus/nes/zemina.cpp",
+ MAME_DIR .. "src/devices/bus/nes/zemina.h",
}
end
diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp
index 5ff59c73339..c3c561c9f90 100644
--- a/src/devices/bus/nes/nes_carts.cpp
+++ b/src/devices/bus/nes/nes_carts.cpp
@@ -224,6 +224,7 @@ SLOT_INTERFACE_START(nes_cart)
SLOT_INTERFACE_INTERNAL("unl_43272", NES_43272) // used in Gaau Hok Gwong Cheung
SLOT_INTERFACE_INTERNAL("tf1201", NES_TF1201)
SLOT_INTERFACE_INTERNAL("unl_cfight", NES_CITYFIGHT) // used by City Fighter IV
+ SLOT_INTERFACE_INTERNAL("zemina", NES_ZEMINA) // mapper 190 - Magic Kid Googoo, etc.
// misc bootleg boards
SLOT_INTERFACE_INTERNAL("ax5705", NES_AX5705)
SLOT_INTERFACE_INTERNAL("sc127", NES_SC127)
diff --git a/src/devices/bus/nes/nes_carts.h b/src/devices/bus/nes/nes_carts.h
index 144d7aa0a8e..f99d18bd688 100644
--- a/src/devices/bus/nes/nes_carts.h
+++ b/src/devices/bus/nes/nes_carts.h
@@ -59,6 +59,7 @@
#include "tengen.h"
#include "txc.h"
#include "waixing.h"
+#include "zemina.h"
// misc unlicensed/bootleg/pirate PCBs
#include "bootleg.h"
#include "multigame.h"
diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx
index 0d053cd9e12..760fa9b130e 100644
--- a/src/devices/bus/nes/nes_ines.hxx
+++ b/src/devices/bus/nes/nes_ines.hxx
@@ -221,7 +221,7 @@ static const nes_mmc mmc_list[] =
{ 187, UNL_KOF96 },
{ 188, BANDAI_KARAOKE },
{ 189, TXC_TW },
- // 190 Unused
+ { 190, ZEMINA_BOARD },
{ 191, WAIXING_TYPE_B },
{ 192, WAIXING_TYPE_C },
{ 193, NTDEC_FIGHTINGHERO },
diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx
index 49a2e234b81..5496c7e2e0f 100644
--- a/src/devices/bus/nes/nes_pcb.hxx
+++ b/src/devices/bus/nes/nes_pcb.hxx
@@ -190,6 +190,7 @@ static const nes_pcb pcb_list[] =
{ "edu2k", UNL_EDU2K },
{ "t230", UNL_T230 },
{ "mk2", UNL_MK2 },
+ { "zemina", ZEMINA_BOARD },
// misc bootleg boards
{ "ax5705", UNL_AX5705 },
{ "sc127", UNL_SC127 },
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index 94b54c9542b..a3e493d381f 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -125,7 +125,7 @@ enum
WAIXING_SGZLZ, WAIXING_SGZ, WAIXING_WXZS, WAIXING_SECURITY, WAIXING_SH2,
WAIXING_DQ8, WAIXING_FFV, WAIXING_WXZS2, SUPERGAME_LIONKING, SUPERGAME_BOOGERMAN,
KAY_BOARD, HOSENKAN_BOARD, NITRA_TDA, GOUDER_37017, NANJING_BOARD,
- WHIRLWIND_2706,
+ WHIRLWIND_2706, ZEMINA_BOARD,
NOCASH_NOCHR, // homebrew PCB design which uses NTRAM for CHRRAM
BTL_ACTION53, // homebrew PCB for homebrew multicarts
BTL_2A03_PURITANS, // homebrew PCB
diff --git a/src/devices/bus/nes/zemina.cpp b/src/devices/bus/nes/zemina.cpp
new file mode 100644
index 00000000000..e6b42f88dbe
--- /dev/null
+++ b/src/devices/bus/nes/zemina.cpp
@@ -0,0 +1,85 @@
+// license:BSD-3-Clause
+// copyright-holders:Kaz
+/***********************************************************************************************************
+
+ NES/Famicom cartridge emulation for Zemina PCBs
+
+ ***********************************************************************************************************/
+
+#include "emu.h"
+#include "zemina.h"
+
+#ifdef NES_PCB_DEBUG
+#define VERBOSE 1
+#else
+#define VERBOSE 0
+#endif
+
+#define LOG_MMC(x) do { if (VERBOSE) logerror x; } while (0)
+
+//-------------------------------------------------
+// constructor
+//-------------------------------------------------
+
+const device_type NES_ZEMINA = &device_creator<nes_zemina_device>;
+
+nes_zemina_device::nes_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : nes_nrom_device(mconfig, NES_ZEMINA, "NES Cart Zemina PCB", tag, owner, clock, "nes_zemina", __FILE__)
+{
+}
+
+void nes_zemina_device::device_start()
+{
+ common_start();
+}
+
+void nes_zemina_device::pcb_reset()
+{
+ set_nt_mirroring(PPU_MIRROR_VERT);
+ chr2_0(0, CHRROM);
+ chr2_2(0, CHRROM);
+ chr2_4(0, CHRROM);
+ chr2_6(0, CHRROM);
+ prg16_89ab(0);
+ prg16_cdef(0);
+}
+
+/*-------------------------------------------------
+ mapper specific handlers
+ -------------------------------------------------*/
+
+/*-------------------------------------------------
+
+ Zemina board emulation
+
+ Currently, this board is only known to be used
+ by one game: Magic Kid Googoo.
+
+ Info from kevtris at NESDev, who dumped the game:
+ https://wiki.nesdev.com/w/index.php/INES_Mapper_190
+
+ -------------------------------------------------*/
+
+WRITE8_MEMBER(nes_zemina_device::write_h)
+{
+ LOG_MMC(("zemina write_h, offset: %04x, data: %02x\n", offset, data));
+
+ if (offset >= 0x0000 && offset <= 0x1FFF)
+ {
+ prg16_89ab(data & 0x07);
+ }
+ else if (offset >= 0x4000 && offset <= 0x5FFF)
+ {
+ prg16_89ab((data & 0x07) | 0x08);
+ }
+ else if ((offset & 0x2000) == 0x2000) // 2K CHR banks
+ {
+ switch (offset & 0x03) // only A0, A1, A13, A14, and A15 are used to select the CHR bank
+ {
+ case 0x00: chr2_0(data, CHRROM); break;
+ case 0x01: chr2_2(data, CHRROM); break;
+ case 0x02: chr2_4(data, CHRROM); break;
+ case 0x03: chr2_6(data, CHRROM); break;
+ }
+ }
+} \ No newline at end of file
diff --git a/src/devices/bus/nes/zemina.h b/src/devices/bus/nes/zemina.h
new file mode 100644
index 00000000000..f217183058a
--- /dev/null
+++ b/src/devices/bus/nes/zemina.h
@@ -0,0 +1,26 @@
+// license:BSD-3-Clause
+// copyright-holders:Kaz
+#ifndef __NES_ZEMINA_H
+#define __NES_ZEMINA_H
+
+#include "nxrom.h"
+
+// ======================> nes_zemina_device
+
+class nes_zemina_device : public nes_nrom_device
+{
+public:
+ // construction/destruction
+ nes_zemina_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ // device-level overrides
+ virtual void device_start() override;
+ virtual DECLARE_WRITE8_MEMBER(write_h) override;
+
+ virtual void pcb_reset() override;
+};
+
+// device type definition
+extern const device_type NES_ZEMINA;
+
+#endif \ No newline at end of file