mirror of
https://github.com/0ldsk00l/nestopia.git
synced 2025-04-02 10:31:51 -04:00
Add support for Magic Kid Googoo dump (Mapper190)
This commit is contained in:
parent
45497ad2c8
commit
8e9dfe5d0c
6 changed files with 132 additions and 0 deletions
|
@ -547,6 +547,7 @@ nestopia_SOURCES = \
|
|||
source/core/board/NstBoardBmcFamily4646B.cpp \
|
||||
source/core/board/NstBoardBtlT230.cpp \
|
||||
source/core/board/NstBoardBmc1200in1.hpp \
|
||||
source/core/board/NstBoardMagicKidGoogoo.cpp \
|
||||
source/core/board/NstBoardMagicSeries.cpp \
|
||||
source/core/board/NstBoardSunsoft2.hpp \
|
||||
source/core/board/NstBoardBmcGoldenCard6in1.hpp \
|
||||
|
|
|
@ -190,6 +190,7 @@ SOURCES_CXX += $(CORE_DIR)/source/core/board/NstBoardKonamiVrc4.cpp
|
|||
SOURCES_CXX += $(CORE_DIR)/source/core/board/NstBoardKonamiVrc6.cpp
|
||||
SOURCES_CXX += $(CORE_DIR)/source/core/board/NstBoardKonamiVrc7.cpp
|
||||
SOURCES_CXX += $(CORE_DIR)/source/core/board/NstBoardKonamiVsSystem.cpp
|
||||
SOURCES_CXX += $(CORE_DIR)/source/core/board/NstBoardMagicKidGoogoo.cpp
|
||||
SOURCES_CXX += $(CORE_DIR)/source/core/board/NstBoardMagicSeries.cpp
|
||||
SOURCES_CXX += $(CORE_DIR)/source/core/board/NstBoardMmc1.cpp
|
||||
SOURCES_CXX += $(CORE_DIR)/source/core/board/NstBoardMmc2.cpp
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
#include "NstBoardKasing.hpp"
|
||||
#include "NstBoardKay.hpp"
|
||||
#include "NstBoardKonami.hpp"
|
||||
#include "NstBoardMagicKidGoogoo.hpp"
|
||||
#include "NstBoardMagicSeries.hpp"
|
||||
#include "NstBoardNanjing.hpp"
|
||||
#include "NstBoardNihon.hpp"
|
||||
|
@ -2880,6 +2881,12 @@ namespace Nes
|
|||
id = Type::TXC_TW;
|
||||
break;
|
||||
|
||||
case 190:
|
||||
|
||||
name = "MAGICKIDGOOGOO";
|
||||
id = Type::MAGICKIDGOOGOO;
|
||||
break;
|
||||
|
||||
case 191:
|
||||
|
||||
name = "WAIXING (b)";
|
||||
|
@ -3579,6 +3586,7 @@ namespace Nes
|
|||
case Type::KONAMI_VRC7_0 :
|
||||
case Type::KONAMI_VRC7_1 : return new Konami::Vrc7(c);
|
||||
case Type::KONAMI_VSSYSTEM : return new Konami::VsSystem(c);
|
||||
case Type::MAGICKIDGOOGOO : return new MagicKidGoogoo(c);
|
||||
case Type::MAGICSERIES_MAGICDRAGON : return new MagicSeries::MagicDragon(c);
|
||||
case Type::NAMCOT_3425 : return new Namcot::N3425(c);
|
||||
case Type::NAMCOT_3433 : return new Namcot::N3433(c);
|
||||
|
|
|
@ -433,6 +433,8 @@ namespace Nes
|
|||
KONAMI_VRC7_0 = MakeId< 85, 512, 256, 0, 0, CRM_0, NMT_V, 0 >::ID,
|
||||
KONAMI_VRC7_1 = MakeId< 85, 512, 256, 8, 0, CRM_0, NMT_V, 0 >::ID,
|
||||
KONAMI_VSSYSTEM = MakeId< 151, 64, 64, 0, 0, CRM_0, NMT_4, 0 >::ID,
|
||||
//Magic Kid Googoo
|
||||
MAGICKIDGOOGOO = MakeId< 190, 256, 128, 8, 0, CRM_0, NMT_V, 0 >::ID,
|
||||
// Magic Series
|
||||
MAGICSERIES_MAGICDRAGON = MakeId< 107, 128, 64, 0, 0, CRM_0, NMT_X, 0 >::ID,
|
||||
// Namcot
|
||||
|
|
65
source/core/board/NstBoardMagicKidGoogoo.cpp
Normal file
65
source/core/board/NstBoardMagicKidGoogoo.cpp
Normal file
|
@ -0,0 +1,65 @@
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Nestopia - NES/Famicom emulator written in C++
|
||||
//
|
||||
// Copyright (C) 2003-2008 Martin Freij
|
||||
//
|
||||
// This file is part of Nestopia.
|
||||
//
|
||||
// Nestopia is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Nestopia is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Nestopia; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "NstBoard.hpp"
|
||||
#include "NstBoardMagicKidGoogoo.hpp"
|
||||
|
||||
namespace Nes
|
||||
{
|
||||
namespace Core
|
||||
{
|
||||
namespace Boards
|
||||
{
|
||||
#ifdef NST_MSVC_OPTIMIZE
|
||||
#pragma optimize("s", on)
|
||||
#endif
|
||||
|
||||
void MagicKidGoogoo::SubReset(const bool hard)
|
||||
{
|
||||
Map( 0x8000U, 0x9FFFU, &MagicKidGoogoo::Poke_8000 );
|
||||
Map( 0xC000U, 0xDFFFU, &MagicKidGoogoo::Poke_8000 );
|
||||
|
||||
for (uint i=0x0000; i < 0x2000; i += 0x04)
|
||||
{
|
||||
Map( 0xA000U + i, CHR_SWAP_2K_0 );
|
||||
Map( 0xA001U + i, CHR_SWAP_2K_1 );
|
||||
Map( 0xA002U + i, CHR_SWAP_2K_2 );
|
||||
Map( 0xA003U + i, CHR_SWAP_2K_3 );
|
||||
}
|
||||
|
||||
if (hard)
|
||||
prg.SwapBank<SIZE_16K, 0x4000>(0);
|
||||
}
|
||||
|
||||
#ifdef NST_MSVC_OPTIMIZE
|
||||
#pragma optimize("", on)
|
||||
#endif
|
||||
|
||||
NES_POKE_AD(MagicKidGoogoo, 8000)
|
||||
{
|
||||
prg.SwapBank<SIZE_16K, 0x0000>( (address >> 11) | (data & 0x07) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
55
source/core/board/NstBoardMagicKidGoogoo.hpp
Normal file
55
source/core/board/NstBoardMagicKidGoogoo.hpp
Normal file
|
@ -0,0 +1,55 @@
|
|||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Nestopia - NES/Famicom emulator written in C++
|
||||
//
|
||||
// Copyright (C) 2003-2008 Martin Freij
|
||||
//
|
||||
// This file is part of Nestopia.
|
||||
//
|
||||
// Nestopia is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Nestopia is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Nestopia; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef NST_BOARD_MAGICKIDGOOGOO_H
|
||||
#define NST_BOARD_MAGICKIDGOOGOO_H
|
||||
|
||||
#ifdef NST_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
namespace Nes
|
||||
{
|
||||
namespace Core
|
||||
{
|
||||
namespace Boards
|
||||
{
|
||||
class MagicKidGoogoo : public Board
|
||||
{
|
||||
public:
|
||||
|
||||
explicit MagicKidGoogoo(const Context& c)
|
||||
: Board(c) {}
|
||||
|
||||
private:
|
||||
|
||||
void SubReset(bool);
|
||||
|
||||
NES_DECL_POKE( 8000 );
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue