From 7a06acbacb8040a110692f302b677bfb39ed6426 Mon Sep 17 00:00:00 2001 From: NewRisingSun <8vytz1+dhp372pv94ebg@sharklasers.com> Date: Thu, 11 Sep 2025 23:21:34 +0200 Subject: [PATCH] Add mapper 418. --- src/boards/418.c | 34 ++++++++++++++++++++++++++++++++++ src/ines.c | 1 + src/ines.h | 1 + 3 files changed, 36 insertions(+) create mode 100644 src/boards/418.c diff --git a/src/boards/418.c b/src/boards/418.c new file mode 100644 index 0000000..26a5996 --- /dev/null +++ b/src/boards/418.c @@ -0,0 +1,34 @@ +/* FCEUmm - NES/Famicom Emulator + * + * Copyright notice for this file: + * Copyright (C) 2020 + * + * 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 "asic_n118.h" + +static void sync () { + N118_syncPRG(0x0F, 0x00); + setchr8(0); + setmirror(N118_getCHRBank(7) &0x01? MI_H: MI_V); +} + +void Mapper418_Init (CartInfo *info) { + N118_init(info, sync, NULL, NULL); +} diff --git a/src/ines.c b/src/ines.c index 2a02322..5f86258 100644 --- a/src/ines.c +++ b/src/ines.c @@ -857,6 +857,7 @@ INES_BOARD_BEGIN() INES_BOARD( "0353", 415, Mapper415_Init ) INES_BOARD( "4-in-1/N-32", 416, Mapper416_Init ) INES_BOARD( "", 417, Mapper417_Init ) + INES_BOARD( "820106-C/821007C", 418, Mapper418_Init ) INES_BOARD( "A971210", 420, Mapper420_Init ) INES_BOARD( "SC871115C", 421, Mapper421_Init ) INES_BOARD( "BS-400R/BS-4040", 422, Mapper422_Init ) diff --git a/src/ines.h b/src/ines.h index be3e826..36f1d25 100644 --- a/src/ines.h +++ b/src/ines.h @@ -338,6 +338,7 @@ void Mapper414_Init(CartInfo *); void Mapper415_Init(CartInfo *); void Mapper416_Init(CartInfo *); void Mapper417_Init(CartInfo *); +void Mapper418_Init(CartInfo *); void Mapper420_Init(CartInfo *); void Mapper421_Init(CartInfo *); void Mapper422_Init(CartInfo *);