From 1fc60df5413049ca670346928c81339a93020ae2 Mon Sep 17 00:00:00 2001 From: NewRisingSun <8vytz1+dhp372pv94ebg@sharklasers.com> Date: Thu, 11 Sep 2025 23:17:46 +0200 Subject: [PATCH] Add mapper 379. --- src/boards/379.c | 32 ++++++++++++++++++++++++++++++++ src/ines.c | 1 + src/ines.h | 1 + 3 files changed, 34 insertions(+) create mode 100644 src/boards/379.c diff --git a/src/boards/379.c b/src/boards/379.c new file mode 100644 index 0000000..3e798bf --- /dev/null +++ b/src/boards/379.c @@ -0,0 +1,32 @@ +/* FCE Ultra - NES/Famicom Emulator + * + * Copyright notice for this file: + * Copyright (C) 2025 NewRisingSun + * + * 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_latch.h" + +static void sync () { + setprg32(0x8000, Latch_data &0x03); + setchr8(Latch_data >>2); +} + +void Mapper379_Init (CartInfo *info) { + Latch_init(info, sync, 0x8000, 0xFFFF, NULL); + info->Reset = Latch_clear; +} diff --git a/src/ines.c b/src/ines.c index fba0f83..2a02322 100644 --- a/src/ines.c +++ b/src/ines.c @@ -821,6 +821,7 @@ INES_BOARD_BEGIN() INES_BOARD( "YY841155C", 376, Mapper376_Init ) INES_BOARD( "JY-111/JY-112", 377, Mapper377_Init ) INES_BOARD( "8-in-1 AOROM+UNROM", 378, Mapper378_Init ) + INES_BOARD( "35BH-1", 379, Mapper379_Init ) INES_BOARD( "42 to 80,000 (970630C)", 380, Mapper380_Init ) INES_BOARD( "KN-42", 381, Mapper381_Init ) INES_BOARD( "830928C", 382, Mapper382_Init ) diff --git a/src/ines.h b/src/ines.h index 6c78cb4..be3e826 100644 --- a/src/ines.h +++ b/src/ines.h @@ -303,6 +303,7 @@ void Mapper375_Init(CartInfo *); void Mapper376_Init(CartInfo *); void Mapper377_Init(CartInfo *); void Mapper378_Init(CartInfo *); +void Mapper379_Init(CartInfo *); void Mapper380_Init(CartInfo *); void Mapper381_Init(CartInfo *); void Mapper382_Init(CartInfo *);