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

50 lines
1.5 KiB
C#
Raw Normal View History

2024-08-05 00:44:30 +08:00
//////////////////////////////////////////////////////////////////////////
// Mapper062 //
//////////////////////////////////////////////////////////////////////////
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 Mapper062 : Mapper
{
public Mapper062(NES parent) : base(parent)
{
}
2024-08-05 00:44:30 +08:00
2024-08-16 10:20:00 +08:00
public override void Reset()
{
SetPROM_32K_Bank(0);
SetVROM_8K_Bank(0);
}
2024-08-05 00:44:30 +08:00
2024-08-16 10:20:00 +08:00
//void Mapper062::Write(WORD addr, BYTE data)
public override void Write(ushort addr, byte data)
{
switch (addr & 0xFF00)
{
case 0x8100:
SetPROM_8K_Bank(4, data);
SetPROM_8K_Bank(5, data + 1);
break;
case 0x8500:
SetPROM_8K_Bank(4, data);
break;
case 0x8700:
SetPROM_8K_Bank(5, data);
break;
SetVROM_1K_Bank(0, data + 0);
SetVROM_1K_Bank(1, data + 1);
SetVROM_1K_Bank(2, data + 2);
SetVROM_1K_Bank(3, data + 3);
SetVROM_1K_Bank(4, data + 4);
SetVROM_1K_Bank(5, data + 5);
SetVROM_1K_Bank(6, data + 6);
SetVROM_1K_Bank(7, data + 7);
}
}
2024-08-05 00:44:30 +08:00
2024-08-16 10:20:00 +08:00
}
2024-08-05 00:44:30 +08:00
}