📄 mapper087.c
字号:
#include "..\DLL\d_iNES.h"
static struct
{
u8 Latch;
} Mapper;
static void Sync (void)
{
MP->SetPRG_ROM32(0x8,0);
MP->SetCHR_ROM8(0,(Mapper.Latch & 0x02) >> 1);
}
static void __cdecl SaveMI (Ar128 MI)
{
u8 x = 0;
MI[x++] = Mapper.Latch;
}
static void __cdecl LoadMI (const Ar128 MI)
{
u8 x = 0;
Mapper.Latch = MI[x++];
Sync();
}
static void __cdecl Write (int Bank, int Where, int What)
{
Mapper.Latch = What;
Sync();
}
static void __cdecl UnloadMapper (void)
{
iNES_UnloadROM();
}
static void __cdecl InitMapper (const PMapperParam _MP, int IsHardReset)
{
MP = _MP;
iNES_InitROM();
MP->SetWriteHandler(0x6,Write);
MP->SetWriteHandler(0x7,Write);
Mapper.Latch = 0;
Sync();
}
CTMapperInfo MapperInfo_087 =
{
"Mapper 87",
87,
MS_Full,
32768,
InitMapper,
UnloadMapper,
NULL,
NULL,
SaveMI,
LoadMI,
NULL,
NULL
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -