AxibugEmuOnline/AxibugEmuOnline.Client/Assets/VirtualNes.Core/Mapper/Mapper066.cs

45 lines
1.2 KiB
C#
Raw Normal View History

2024-08-05 00:44:30 +08:00
//////////////////////////////////////////////////////////////////////////
// Mapper066 Bandai 74161 //
//////////////////////////////////////////////////////////////////////////
using static VirtualNes.MMU;
2024-08-16 10:20:00 +08:00
2024-08-05 00:44:30 +08:00
namespace VirtualNes.Core
{
2024-08-16 10:20:00 +08:00
public class Mapper066 : Mapper
{
public Mapper066(NES parent) : base(parent)
{
}
public override void Reset()
{
SetPROM_32K_Bank(0, 1, PROM_8K_SIZE - 2, PROM_8K_SIZE - 1);
SetVROM_8K_Bank(0);
// if( nes->rom->GetPROM_CRC() == 0xe30552db ) { // Paris-Dakar Rally Special
// nes->SetFrameIRQmode( FALSE );
// }
}
//void Mapper066::WriteLow(WORD addr, BYTE data)
public override void WriteLow(ushort addr, byte data)
{
if (addr >= 0x6000)
{
SetPROM_32K_Bank((data & 0xF0) >> 4);
SetVROM_8K_Bank(data & 0x0F);
}
}
//void Mapper066::Write(WORD addr, BYTE data)
public override void Write(ushort addr, byte data)
{
SetPROM_32K_Bank((data & 0xF0) >> 4);
SetVROM_8K_Bank(data & 0x0F);
}
}
2024-08-05 00:44:30 +08:00
}