mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
nes: Add Magic Kid Googoo board.
This commit is contained in:
parent
c84fbdded6
commit
b9209aadbf
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -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 },
|
||||
|
@ -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 },
|
||||
|
@ -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
|
||||
|
85
src/devices/bus/nes/zemina.cpp
Normal file
85
src/devices/bus/nes/zemina.cpp
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
26
src/devices/bus/nes/zemina.h
Normal file
26
src/devices/bus/nes/zemina.h
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user