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

30 lines
756 B
C#
Raw Normal View History

//////////////////////////////////////////////////////////////////////////
// Mapper216 //
//////////////////////////////////////////////////////////////////////////
using static VirtualNes.MMU;
2024-08-16 10:20:00 +08:00
namespace VirtualNes.Core
{
2024-08-16 10:20:00 +08:00
public class Mapper216 : Mapper
{
public Mapper216(NES parent) : base(parent)
{
}
2024-08-16 10:20:00 +08:00
public override void Reset()
{
SetVROM_8K_Bank(0);
SetPROM_32K_Bank(0);
}
2024-08-16 10:20:00 +08:00
//void Mapper216::Write(WORD addr, BYTE data)
public override void Write(ushort addr, byte data)
{
SetVROM_8K_Bank((addr & 0x0E) >> 1);
SetPROM_32K_Bank(addr & 1);
}
2024-08-16 10:20:00 +08:00
}
}