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

36 lines
873 B
C#
Raw Normal View History

2024-08-05 00:05:15 +08:00
//////////////////////////////////////////////////////////////////////////
// Mapper077 Irem Early Mapper #0 //
//////////////////////////////////////////////////////////////////////////
using static VirtualNes.MMU;
2024-08-16 10:20:00 +08:00
2024-08-05 00:05:15 +08:00
namespace VirtualNes.Core
{
2024-08-16 10:20:00 +08:00
public class Mapper077 : Mapper
{
public Mapper077(NES parent) : base(parent)
{
}
2024-08-05 00:05:15 +08:00
2024-08-16 10:20:00 +08:00
public override void Reset()
{
SetPROM_32K_Bank(0);
2024-08-05 00:05:15 +08:00
2024-08-16 10:20:00 +08:00
SetVROM_2K_Bank(0, 0);
SetCRAM_2K_Bank(2, 1);
SetCRAM_2K_Bank(4, 2);
SetCRAM_2K_Bank(6, 3);
}
2024-08-05 00:05:15 +08:00
2024-08-16 10:20:00 +08:00
//void Mapper077::Write(WORD addr, BYTE data)
public override void Write(ushort addr, byte data)
{
SetPROM_32K_Bank(data & 0x07);
2024-08-05 00:05:15 +08:00
2024-08-16 10:20:00 +08:00
SetVROM_2K_Bank(0, (data & 0xF0) >> 4);
}
2024-08-05 00:05:15 +08:00
2024-08-16 10:20:00 +08:00
}
2024-08-05 00:05:15 +08:00
}