unif F-15 - new mapper for "150-in-1 Unchained FIGHT ver"
This commit is contained in:
parent
d4c495ca39
commit
c73cf9eb63
|
@ -0,0 +1,62 @@
|
|||
/* FCE Ultra - NES/Famicom Emulator
|
||||
*
|
||||
* Copyright notice for this file:
|
||||
* Copyright (C) 2015 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
|
||||
*
|
||||
* BMC F-15 PCB (256+266 MMC3 based, with 16/32Kb banking discrete logic)
|
||||
* 150-in-1 Unchaied Melody FIGHT version with system test (START+SELECT)
|
||||
*
|
||||
* CHR - MMC3 stock regs
|
||||
* PRG - MMC3 regs disabled, area 6000-7FFF used instead
|
||||
* 011xxxxxxxxxxxxx addr mask,
|
||||
* ----APPp reg bits mask
|
||||
* A - higher 128K PRG bank select/32K bank mode override
|
||||
* PP - bank number in 32K mode
|
||||
* PPp - bank number in 16K mode
|
||||
* initial state of extra regs is undefined, A001 enables/disables the 6000 area
|
||||
*/
|
||||
|
||||
#include "mapinc.h"
|
||||
#include "mmc3.h"
|
||||
|
||||
static void BMCF15PW(uint32 A, uint8 V) {
|
||||
uint32 bank = EXPREGS[0] & 0xF;
|
||||
uint32 mode = (EXPREGS[0] & 8) >> 3;
|
||||
uint32 mask = ~(mode);
|
||||
setprg16(0x8000, (bank & mask));
|
||||
setprg16(0xC000, (bank & mask) | mode);
|
||||
}
|
||||
|
||||
static DECLFW(BMCF15Write) {
|
||||
if (A001B & 0x80) {
|
||||
EXPREGS[0] = V & 0xF;
|
||||
FixMMC3PRG(MMC3_cmd);
|
||||
}
|
||||
}
|
||||
|
||||
static void BMCF15Power(void) {
|
||||
GenMMC3Power();
|
||||
SetWriteHandler(0x6000, 0x7FFF, BMCF15Write);
|
||||
SetWriteHandler(0x6000, 0x7FFF, BMCF15Write);
|
||||
}
|
||||
|
||||
void BMCF15_Init(CartInfo *info) {
|
||||
GenMMC3_Init(info, 256, 256, 0, 0);
|
||||
pwrap = BMCF15PW;
|
||||
info->Power = BMCF15Power;
|
||||
AddExState(EXPREGS, 1, 0, "EXPR");
|
||||
}
|
|
@ -1039,8 +1039,8 @@ static DECLFW(Mapper196Write) {
|
|||
}
|
||||
|
||||
static DECLFW(Mapper196WriteLo) {
|
||||
EXPREGS[0] = 1;
|
||||
EXPREGS[1] = (V & 0xf) | (V >> 4);
|
||||
EXPREGS[0] = 1; // hacky
|
||||
EXPREGS[1] = (V & 0xf) | (V >> 4); // this is the same as 189 mapper, but with addr permutations
|
||||
FixMMC3PRG(MMC3_cmd);
|
||||
}
|
||||
|
||||
|
|
|
@ -266,5 +266,6 @@
|
|||
{0x8d51a23b, 257|0x1000,-1}, /* [KeWang] Chao Ji Wu Bi Han Ka (C) V1 */
|
||||
{0x25c76773, 257|0x1000,-1}, /* [KeWang] Chao Ji Wu Bi Han Ka (C) V2 */
|
||||
{0x1ca9c322, 258|0x1000,-1}, /* Blood Of Jurassic (GD-98)(Unl) */
|
||||
{0x2469c1ae, 259|0x1000,-1}, /* 150-in-1 Unchained FIGHT version */
|
||||
|
||||
{0x00000000, -1, -1}
|
||||
|
|
|
@ -719,6 +719,7 @@ static BMAPPINGLocal bmap[] = {
|
|||
{"ONE-BUS Systems", 256, UNLOneBus_Init},
|
||||
{"PEC-586 Computer", 257, UNLPEC586Init},
|
||||
{"158B Prot Board", 258, UNL158B_Init},
|
||||
{"F-15 MMC3 Based", 259, BMCF15_Init},
|
||||
|
||||
{"", 0, NULL}
|
||||
};
|
||||
|
|
|
@ -463,6 +463,7 @@ static BMAPPING bmap[] = {
|
|||
{ "DRAGONFIGHTER", UNLBMW8544_Init, 0 },
|
||||
{ "EH8813A", UNLEH8813A_Init, 0 },
|
||||
{ "HP898F", BMCHP898F_Init, 0 },
|
||||
{ "F-15", BMCF15_Init, 0 },
|
||||
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
|
|
@ -151,6 +151,7 @@ void UNL158B_Init(CartInfo *info);
|
|||
void UNLBMW8544_Init(CartInfo *info);
|
||||
void UNLEH8813A_Init(CartInfo *info);
|
||||
void BMCHP898F_Init(CartInfo *info);
|
||||
void BMCF15_Init(CartInfo *info);
|
||||
|
||||
extern uint8 *UNIFchrrama; // Meh. So I can stop CHR RAM
|
||||
// bank switcherooing with certain boards...
|
||||
|
|
|
@ -319,6 +319,7 @@
|
|||
<ClCompile Include="..\src\boards\dance2000.cpp" />
|
||||
<ClCompile Include="..\src\boards\eh8813a.cpp" />
|
||||
<ClCompile Include="..\src\boards\et-100.cpp" />
|
||||
<ClCompile Include="..\src\boards\F-15.cpp" />
|
||||
<ClCompile Include="..\src\boards\famicombox.cpp" />
|
||||
<ClCompile Include="..\src\boards\ffe.cpp" />
|
||||
<ClCompile Include="..\src\boards\hp898f.cpp" />
|
||||
|
|
|
@ -1063,6 +1063,9 @@
|
|||
<ClCompile Include="..\src\boards\hp898f.cpp">
|
||||
<Filter>boards</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\boards\F-15.cpp">
|
||||
<Filter>boards</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\drivers\common\args.h">
|
||||
|
|
Loading…
Reference in New Issue