Add mapper 378.

This commit is contained in:
NewRisingSun
2025-09-11 23:15:49 +02:00
parent ca898191db
commit 05df68148f
3 changed files with 41 additions and 0 deletions

39
src/boards/378.c Normal file
View File

@@ -0,0 +1,39 @@
/* 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 () {
if (Latch_data &0x20) {
setprg16(0x8000, 0x10 | Latch_data <<1 &0x0E | Latch_data >>3 &0x01);
setprg16(0xC000, 0x10 | Latch_data <<1 &0x0E | 0x07);
setmirror(Latch_data &0x04? MI_H: MI_V);
} else {
setprg32(0x8000, Latch_data &0x07);
setmirror(Latch_data &0x10? MI_1: MI_0);
}
setchr8(0);
}
void Mapper378_Init (CartInfo *info) {
Latch_init(info, sync, 0x8000, 0xFFFF, NULL);
info->Reset = Latch_clear;
}

View File

@@ -820,6 +820,7 @@ INES_BOARD_BEGIN()
INES_BOARD( "135-in-1", 375, Mapper375_Init )
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( "42 to 80,000 (970630C)", 380, Mapper380_Init )
INES_BOARD( "KN-42", 381, Mapper381_Init )
INES_BOARD( "830928C", 382, Mapper382_Init )

View File

@@ -302,6 +302,7 @@ void Mapper374_Init(CartInfo *);
void Mapper375_Init(CartInfo *);
void Mapper376_Init(CartInfo *);
void Mapper377_Init(CartInfo *);
void Mapper378_Init(CartInfo *);
void Mapper380_Init(CartInfo *);
void Mapper381_Init(CartInfo *);
void Mapper382_Init(CartInfo *);