diff --git a/src/boards/450.c b/src/boards/450.c new file mode 100644 index 0000000..990c651 --- /dev/null +++ b/src/boards/450.c @@ -0,0 +1,38 @@ +/* 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 "vrc2and4.h" + +static void sync () { + VRC24_syncPRG(0x0F, VRC2_pins <<4); + VRC24_syncCHR(0x7F, VRC2_pins <<7); + VRC24_syncMirror(); +} + +void Mapper450_reset(void) { + VRC2_pins =0; + VRC24_Sync(); +} + +void Mapper450_Init (CartInfo *info) { + VRC24_init(info, sync, 0x01, 0x02, 0, 0, 0); + info->Reset =Mapper450_reset; +} diff --git a/src/boards/vrc2and4.c b/src/boards/vrc2and4.c index 721e63e..fa5a0f3 100644 --- a/src/boards/vrc2and4.c +++ b/src/boards/vrc2and4.c @@ -120,8 +120,10 @@ DECLFW(VRC24_wramWrite) { if (WRAMSize) CartBW(((A -0x6000) &(WRAMSize -1)) +0x6000, V); else - if (!VRC24_isVRC4) + if (!VRC24_isVRC4) { VRC2_pins =V; + VRC24_Sync(); + } if (VRC24_WRAMWrite) VRC24_WRAMWrite(A, V); diff --git a/src/ines.c b/src/ines.c index 791d68b..5e034cb 100644 --- a/src/ines.c +++ b/src/ines.c @@ -837,9 +837,10 @@ INES_BOARD_BEGIN() INES_BOARD( "KL-06", 447, Mapper447_Init ) INES_BOARD( "830768C", 448, Mapper448_Init ) INES_BOARD( "22-in-1 King Series", 449, Mapper449_Init ) + INES_BOARD( "晶太 YY841157C", 450, Mapper450_Init ) INES_BOARD( "DS-9-27", 452, Mapper452_Init ) INES_BOARD( "Realtec 8042", 453, Mapper453_Init ) - INES_BOARD( "110-in-1", 454, Mapper454_Init ) + INES_BOARD( "110-in-1", 454, Mapper454_Init ) INES_BOARD( "N625836", 455, Mapper455_Init ) INES_BOARD( "K6C3001A", 456, Mapper456_Init ) INES_BOARD( "810431C", 457, Mapper457_Init ) diff --git a/src/ines.h b/src/ines.h index 314b476..d54c85f 100644 --- a/src/ines.h +++ b/src/ines.h @@ -348,6 +348,7 @@ void Mapper445_Init(CartInfo *); void Mapper447_Init(CartInfo *); void Mapper448_Init(CartInfo *); void Mapper449_Init(CartInfo *); +void Mapper450_Init(CartInfo *); void Mapper452_Init(CartInfo *); void Mapper453_Init(CartInfo *); void Mapper454_Init(CartInfo *);