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

30 lines
798 B
C#
Raw Normal View History

2024-08-04 23:37:02 +08:00
//////////////////////////////////////////////////////////////////////////
// Mapper107 Magic Dragon Mapper //
//////////////////////////////////////////////////////////////////////////
using static VirtualNes.MMU;
namespace VirtualNes.Core
{
2024-08-16 10:20:00 +08:00
public class Mapper107 : Mapper
{
public Mapper107(NES parent) : base(parent)
{
}
2024-08-04 23:37:02 +08:00
2024-08-16 10:20:00 +08:00
public override void Reset()
{
SetPROM_32K_Bank(0, 1, PROM_8K_SIZE - 2, PROM_8K_SIZE - 1);
SetVROM_8K_Bank(0);
}
2024-08-04 23:37:02 +08:00
2024-08-16 10:20:00 +08:00
//void Mapper107::Write(WORD addr, BYTE data)
public override void Write(ushort addr, byte data)
{
SetPROM_32K_Bank((data >> 1) & 0x03);
SetVROM_8K_Bank(data & 0x07);
}
2024-08-04 23:37:02 +08:00
2024-08-16 10:20:00 +08:00
}
2024-08-04 23:37:02 +08:00
}