Add m114.1(boogerman), m281, bmc-80013b. Update m205. Disable kt-008 hack on mmc3. Add a few games to ines-correct.h
- Support for Boogerman (SuperGame) Mapper 114, submapper 1 - Update Mapper 205 based on nesdev, move previous mapper 205 to separate GN-45 mapper with retained support to emulate OK-411 - Use nes-to-unif wrapper for some games which does not have nes 2.0 header. - add unif board BMC-80013-B - add mapper 281 (JY-052) - disable KT-008 hack on mmc3. KT-008 boards should be assigned as Mapper 224. Fixes Final Fantasy X1/X2 - force-assign a few roms using ines-correct.h
This commit is contained in:
77
src/boards/bmc80013b.c
Normal file
77
src/boards/bmc80013b.c
Normal file
@@ -0,0 +1,77 @@
|
||||
/* FCEUmm - NES/Famicom Emulator
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/* NES 2.0 Mapper 274 is used for the 90-in-1 Hwang Shinwei multicart.
|
||||
* Its UNIF board name is BMC-80013-B.
|
||||
* https://wiki.nesdev.com/w/index.php/NES_2.0_Mapper_274 */
|
||||
|
||||
#include "mapinc.h"
|
||||
|
||||
static uint8 regs[2], mode;
|
||||
|
||||
static SFORMAT StateRegs[] =
|
||||
{
|
||||
{ ®s[0], 1, "REG0" },
|
||||
{ ®s[1], 1, "REG1" },
|
||||
{ &mode, 1, "MODE" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static void Sync(void) {
|
||||
if (mode & 0x02)
|
||||
setprg16(0x8000, regs[0] & 0x0F | regs[1] & 0x70);
|
||||
else
|
||||
setprg16r(1, 0x8000, regs[0] & 0x03);
|
||||
setprg16(0xC000, regs[1]);
|
||||
SetupCartMirroring(((regs[0] >> 4) & 1) ^ 1, 1, NULL);
|
||||
}
|
||||
|
||||
static DECLFW(BMC80013BWrite) {
|
||||
uint8 reg = (A >> 13) & 0x03;
|
||||
if (!reg)
|
||||
regs[0] = V & 0x1F;
|
||||
else {
|
||||
regs[1] = V & 0x7F;
|
||||
mode = reg;
|
||||
}
|
||||
Sync();
|
||||
}
|
||||
|
||||
static void BMC80013BPower(void) {
|
||||
Sync();
|
||||
setchr8(0);
|
||||
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
||||
SetWriteHandler(0x8000, 0xFFFF, BMC80013BWrite);
|
||||
}
|
||||
|
||||
static void BMC80013BReset(void) {
|
||||
regs[0] = regs[1] = mode = 0;
|
||||
Sync();
|
||||
}
|
||||
|
||||
static void BMC80013BRestore(int version) {
|
||||
Sync();
|
||||
}
|
||||
|
||||
void BMC80013B_Init(CartInfo *info) {
|
||||
info->Power = BMC80013BPower;
|
||||
info->Reset = BMC80013BReset;
|
||||
GameStateRestore = BMC80013BRestore;
|
||||
AddExState(&StateRegs, ~0, 0, 0);
|
||||
}
|
||||
Reference in New Issue
Block a user