BMC 80013-B unif mapper added for "90-in-1 Hwang Shinwey" dump
This commit is contained in:
parent
77c7b0fded
commit
2841bb9374
|
@ -0,0 +1,76 @@
|
|||
/* FCE Ultra - NES/Famicom Emulator
|
||||
*
|
||||
* Copyright notice for this file:
|
||||
* Copyright (C) 2017 CaH4e3
|
||||
*
|
||||
* 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"
|
||||
|
||||
static uint8 bios_prg, rom_prg, rom_mode, mirror;
|
||||
|
||||
static SFORMAT StateRegs[] =
|
||||
{
|
||||
{ &bios_prg, 1, "BREG" },
|
||||
{ &rom_prg, 1, "RREG" },
|
||||
{ &rom_mode, 1, "RMODE" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static void Sync(void) {
|
||||
setchr8(0);
|
||||
if(rom_mode&2) {
|
||||
setprg16r(0,0x8000,(bios_prg&0xF)|(rom_prg&0x70));
|
||||
} else {
|
||||
setprg16r(1,0x8000,bios_prg&3);
|
||||
}
|
||||
setprg16r(0,0xC000,rom_prg&0x7F);
|
||||
setmirror(((bios_prg>>4)&1)^1);
|
||||
}
|
||||
|
||||
static DECLFW(BMC80013BWrite) {
|
||||
uint8 reg = (A>>13)&3;
|
||||
if(reg == 0) {
|
||||
bios_prg = V;
|
||||
} else {
|
||||
rom_prg = V;
|
||||
rom_mode = reg;
|
||||
}
|
||||
Sync();
|
||||
}
|
||||
|
||||
static void BMC80013BPower(void) {
|
||||
bios_prg=rom_prg=rom_mode=mirror=0;
|
||||
Sync();
|
||||
SetReadHandler(0x8000, 0xFFFF, CartBR);
|
||||
SetWriteHandler(0x8000, 0xFFFF, BMC80013BWrite);
|
||||
}
|
||||
|
||||
static void BMC80013BReset(void) {
|
||||
bios_prg=rom_prg=rom_mode=mirror=0;
|
||||
Sync();
|
||||
}
|
||||
|
||||
static void StateRestore(int version) {
|
||||
Sync();
|
||||
}
|
||||
|
||||
void BMC80013B_Init(CartInfo *info) {
|
||||
info->Reset = BMC80013BReset;
|
||||
info->Power = BMC80013BPower;
|
||||
GameStateRestore = StateRestore;
|
||||
AddExState(&StateRegs, ~0, 0, 0);
|
||||
}
|
|
@ -468,6 +468,7 @@ static BMAPPING bmap[] = {
|
|||
{ "RT-01", UNLRT01_Init, 0 },
|
||||
{ "81-01-31-C", BMC810131C_Init, 0 },
|
||||
{ "8-IN-1", BMC8IN1_Init, 0 },
|
||||
{ "80013-B", BMC80013B_Init, 0 },
|
||||
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
|
|
@ -156,6 +156,7 @@ void BMCF15_Init(CartInfo *info);
|
|||
void UNLRT01_Init(CartInfo *info);
|
||||
void BMC810131C_Init(CartInfo *info);
|
||||
void BMC8IN1_Init(CartInfo *info);
|
||||
void BMC80013B_Init(CartInfo *info);
|
||||
|
||||
extern uint8 *UNIFchrrama; // Meh. So I can stop CHR RAM
|
||||
// bank switcherooing with certain boards...
|
||||
|
|
|
@ -412,6 +412,7 @@
|
|||
<ClCompile Include="..\src\boards\77.cpp" />
|
||||
<ClCompile Include="..\src\boards\79.cpp" />
|
||||
<ClCompile Include="..\src\boards\80.cpp" />
|
||||
<ClCompile Include="..\src\boards\80013-B.cpp" />
|
||||
<ClCompile Include="..\src\boards\8157.cpp" />
|
||||
<ClCompile Include="..\src\boards\82.cpp" />
|
||||
<ClCompile Include="..\src\boards\8237.cpp" />
|
||||
|
|
|
@ -1087,6 +1087,9 @@
|
|||
<ClCompile Include="..\src\boards\190.cpp">
|
||||
<Filter>boards</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\boards\80013-B.cpp">
|
||||
<Filter>boards</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\drivers\common\args.h">
|
||||
|
|
Loading…
Reference in New Issue