Files
ci-libretro-fceumm/src/boards/364.c
NRS-NewRisingSun 8e5651a1fa More mapper updates (#607)
* M061: Add CHR-ROM variant.

* M227: Make DIP switch change only apply to submapper 1

* M242: Only assume DIP/solder pad read when A0-A7 are zero, corrects ET-187 and Xing-2462. Initialize M227's and M242's DIP switch setting on Hard Reset.

* M052: Support CHR-RAM-less variant of submapper 14.

* M364: Correct the outer bank register's address mask, for LT-953 multicart.

* M047: Supprt larger-sized multicarts using a compatible PCB. Reset to menu.

* M360: Add submapper 1.

* M221: Rewrite, add submapper 1 variant.

* M288: Remove bank masks to allow for already-existing larger cartridges.

* M411: Add submappers.

* M417: Add submapper 1.

* M115: Add multicart functionalities.

* M201: Simplify and correct the power-on value. CF-043, mentioned in the source code comment, needs no submapper; just a correct header with Horizontal mirroring.

* M200: Correct the power-on value.

* M432: Add submappers to distinguish three variants.

* Add mapper 412.

---------

Co-authored-by: NewRisingSun <8vytz1+dhp372pv94ebg@sharklasers.com>
2024-06-03 16:51:29 -07:00

54 lines
1.5 KiB
C

/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
* Copyright (C) 2022
*
* 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
*
*/
#include "mapinc.h"
#include "mmc3.h"
static void M364CW(uint32 A, uint8 V) {
V &= (EXPREGS[0] & 0x20) ? 0x7F : 0xFF;
setchr1(A, V | ((EXPREGS[0] << 4) & 0x100));
}
static void M364PW(uint32 A, uint8 V) {
V &= (EXPREGS[0] & 0x20) ? 0x0F : 0x1F;
setprg8(A, V | ((EXPREGS[0] >> 1) & 0x20));
}
static DECLFW(M364Write) {
EXPREGS[0] = V;
FixMMC3PRG(MMC3_cmd);
FixMMC3CHR(MMC3_cmd);
}
static void M364Power(void) {
EXPREGS[0] = 0;
GenMMC3Power();
SetWriteHandler(0x6000, 0x7FFF, M364Write);
}
void Mapper364_Init(CartInfo *info) {
GenMMC3_Init(info, 512, 512, 8, 0);
pwrap = M364PW;
cwrap = M364CW;
info->Power = M364Power;
AddExState(EXPREGS, 1, 0, "EXPR");
}