Attempt mapper 474
This commit is contained in:
parent
c0eee08ce5
commit
21260aefb8
|
@ -0,0 +1,71 @@
|
|||
/* FCE Ultra - NES/Famicom Emulator
|
||||
*
|
||||
* Copyright notice for this file:
|
||||
* Copyright (C) Akerasoft 2023
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* FDS Conversion
|
||||
*
|
||||
*/
|
||||
|
||||
#include "mapinc.h"
|
||||
|
||||
static DECLFR(M474ReadCart) {
|
||||
return Page[A >> 14][A];
|
||||
}
|
||||
|
||||
static void Sync(void) {
|
||||
setchr8(0);
|
||||
setprg16(0x4000, 0);
|
||||
setprg16(0x8000, 1);
|
||||
setprg16(0xC000, 2);
|
||||
}
|
||||
|
||||
|
||||
static void M474Power(void) {
|
||||
SetupCartCHRMapping(0x00, &PRGptr[0][0xC000], 0x2000, 0);
|
||||
// not modify fceux other code,
|
||||
// fceux load prg is 64k, have 8k chr in 0xC000
|
||||
// fceux load chr is 8k,but 0xFF or 0x00
|
||||
SetReadHandler(0x4020, 0xFFFF, M474ReadCart);
|
||||
Sync();
|
||||
}
|
||||
|
||||
static void M474Power_submapper1(void) {
|
||||
SetupCartCHRMapping(0x00, &PRGptr[0][0xC000], 0x2000, 0);
|
||||
// not modify fceux other code,
|
||||
// fceux load prg is 64k, have 8k chr in 0xC000
|
||||
// fceux load chr is 8k,but 0xFF or 0x00
|
||||
SetReadHandler(0x4800, 0xFFFF, M474ReadCart);
|
||||
Sync();
|
||||
}
|
||||
|
||||
static void StateRestore(int version) {
|
||||
Sync();
|
||||
}
|
||||
|
||||
void Mapper474_Init(CartInfo* info) {
|
||||
if (info->submapper == 1)
|
||||
{
|
||||
info->Power = M474Power_submapper1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// submapper 0
|
||||
info->Power = M474Power;
|
||||
}
|
||||
GameStateRestore = StateRestore;
|
||||
}
|
|
@ -793,6 +793,7 @@ BMAPPINGLocal bmap[] = {
|
|||
|
||||
{"Impact Soft MMC3 Flash Board", 406, Mapper406_Init },
|
||||
{"INX_007T_V01", 470, INX_007T_Init },
|
||||
{"Akerasoft NROM3XX", 474, Mapper474_Init },
|
||||
|
||||
{"KONAMI QTAi Board", 547, QTAi_Init },
|
||||
|
||||
|
|
|
@ -277,6 +277,7 @@ void Mapper254_Init(CartInfo *);
|
|||
void Mapper255_Init(CartInfo *);
|
||||
void Mapper354_Init(CartInfo *);
|
||||
void Mapper406_Init(CartInfo *);
|
||||
void Mapper474_Init(CartInfo*);
|
||||
|
||||
void INX_007T_Init(CartInfo* info);
|
||||
|
||||
|
|
|
@ -445,6 +445,7 @@ xcopy /y /d "$(ProjectDir)\..\src\drivers\win\7z_64.dll" "$(OutDir)"</Command>
|
|||
<ClCompile Include="..\src\boards\42.cpp" />
|
||||
<ClCompile Include="..\src\boards\43.cpp" />
|
||||
<ClCompile Include="..\src\boards\46.cpp" />
|
||||
<ClCompile Include="..\src\boards\474.cpp" />
|
||||
<ClCompile Include="..\src\boards\50.cpp" />
|
||||
<ClCompile Include="..\src\boards\51.cpp" />
|
||||
<ClCompile Include="..\src\boards\57.cpp" />
|
||||
|
@ -1540,4 +1541,4 @@ xcopy /y /d "$(ProjectDir)\..\src\drivers\win\7z_64.dll" "$(OutDir)"</Command>
|
|||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<!-- ================ UNDUPOBJ ================ -->
|
||||
</Project>
|
||||
</Project>
|
|
@ -1121,6 +1121,11 @@
|
|||
<Filter>boards</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\debugsymboltable.cpp" />
|
||||
<ClCompile Include="..\src\utils\mutex.cpp" />
|
||||
<ClCompile Include="..\src\ld65dbg.cpp" />
|
||||
<ClCompile Include="..\src\boards\472.cpp">
|
||||
<Filter>boards</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\drivers\common\args.h">
|
||||
|
@ -1630,6 +1635,9 @@
|
|||
<ClInclude Include="..\src\drivers\win\header_editor.h">
|
||||
<Filter>drivers\win</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\debugsymboltable.h" />
|
||||
<ClInclude Include="..\src\ld65dbg.h" />
|
||||
<ClInclude Include="..\src\utils\mutex.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\src\drivers\win\res.rc">
|
||||
|
|
Loading…
Reference in New Issue