Merge pull request #267 from retro-wertz/mappers

m224 and game additions to ines-correct
This commit is contained in:
Twinaphex
2019-05-29 13:17:19 +02:00
committed by GitHub
5 changed files with 62 additions and 1 deletions

50
src/boards/224.c Normal file
View File

@@ -0,0 +1,50 @@
/* FCEUmm - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2019 Libretro Team
*
* This program 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.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* 2019-05-29 - Mapper 224, KT-008
* iNES Mapper 224 is used for the 晶科泰 (Jncota) KT-008 PCB.
* It's an MMC3 clone that supports 1024 KiB of PRG-ROM through an additional
* outer bank register at $5000.
* http://wiki.nesdev.com/w/index.php/INES_Mapper_224 */
#include "mapinc.h"
#include "mmc3.h"
static void M224PW(uint32 A, uint8 V) {
setprg8(A, V & 0x3f | (EXPREGS[0] << 4) & 0x40);
}
static DECLFW(Mapper224Write) {
EXPREGS[0] = V;
FixMMC3PRG(MMC3_cmd);
}
static void M224Power(void) {
EXPREGS[0] = 0;
GenMMC3Power();
SetWriteHandler(0x5000, 0x5000, Mapper224Write);
}
void Mapper224_Init(CartInfo *info) {
GenMMC3_Init(info, 1024, 0, 8, 0);
pwrap = M224PW;
info->Power = M224Power;
AddExState(EXPREGS, 1, 0, "EXPR");
}

View File

@@ -318,6 +318,12 @@
{0x345ee51a, 245, -1}, /* DQ4c */
{0x57514c6c, 245, -1}, /* Yong Zhe Dou E Long - Dragon Quest VI (Ch) */
{0xdb9d71b7, 114, -1}, /* Super Donkey Kong (Unl) [o1] */
{0x61fc4d20, 224, 0}, /* Pokemon HeartGold (KT-008 PCB)(Ch)[!] */
{0x4d735cb1, 224, 0}, /* Pokemon Platinum (KT-008 PCB)(Ch)[!] */
{0x4f427110, 224, 0}, /* Pokemon Platinum Alt title 1 (KT-008 PCB)(Ch)[!] */
{0xe001de16, 224, 0}, /* Pokemon Platinum Alt title 2 (KT-008 PCB)(Ch)[!] */
{0x00000000, -1, -1}
#endif

View File

@@ -613,7 +613,7 @@ static BMAPPINGLocal bmap[] = {
{(uint8_t*)"UNLN625092", 221, UNLN625092_Init},
{(uint8_t*)"", 222, Mapper222_Init},
/* {(uint8_t*)"", 223, Mapper223_Init}, */
/* {(uint8_t*)"", 224, Mapper224_Init}, */
{(uint8_t*)"KT-008", 224, Mapper224_Init},
{(uint8_t*)"", 225, Mapper225_Init},
{(uint8_t*)"BMC 22+20-in-1", 226, Mapper226_Init},
{(uint8_t*)"", 227, Mapper227_Init},

View File

@@ -201,6 +201,7 @@ void Mapper216_Init(CartInfo *);
void Mapper217_Init(CartInfo *);
void Mapper220_Init(CartInfo *);
void Mapper222_Init(CartInfo *);
void Mapper224_Init(CartInfo *);
void Mapper225_Init(CartInfo *);
void Mapper226_Init(CartInfo *);
void Mapper227_Init(CartInfo *);

View File

@@ -468,6 +468,10 @@ static BMAPPING bmap[] = {
{ "WS", BMCWS_Init, 0 },
{ "HPxx", BMCHPxx_Init, 0 },
{ "CHINA_ER_SAN2", Mapper19_Init, 0 }, /* http://forums.nesdev.com/viewtopic.php?t=16465&p=216531 */
{ "WAIXING-FW01", Mapper227_Init, 0 }, /* https://wiki.nesdev.com/w/index.php/Talk:INES_Mapper_242 */
{ "WAIXING-FS005", BMCFK23C_Init, 0 }, /* https://wiki.nesdev.com/w/index.php/INES_Mapper_176 */
#ifdef COPYFAMI
{ "COPYFAMI_MMC3", MapperCopyFamiMMC3_Init, 0 },
{ "COPYFAMI", MapperCopyFami_Init, 0 },