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

39 lines
965 B
C#
Raw Normal View History

2024-08-04 23:37:02 +08:00
//////////////////////////////////////////////////////////////////////////
// Mapper101 Jaleco(Urusei Yatsura) //
//////////////////////////////////////////////////////////////////////////
using static VirtualNes.MMU;
2024-08-16 10:20:00 +08:00
2024-08-04 23:37:02 +08:00
namespace VirtualNes.Core
{
2024-08-16 10:20:00 +08:00
public class Mapper101 : Mapper
{
public Mapper101(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, 2, 3);
SetVROM_8K_Bank(0);
}
2024-08-04 23:37:02 +08:00
2024-08-16 10:20:00 +08:00
//void Mapper101::WriteLow(WORD addr, BYTE data)
public override void WriteLow(ushort addr, byte data)
{
if (addr >= 0x6000)
{
SetVROM_8K_Bank(data & 0x03);
}
}
2024-08-04 23:37:02 +08:00
2024-08-16 10:20:00 +08:00
//void Mapper101::Write(WORD addr, BYTE data)
public override void Write(ushort addr, byte data)
{
SetVROM_8K_Bank(data & 0x03);
}
2024-08-04 23:37:02 +08:00
2024-08-16 10:20:00 +08:00
}
2024-08-04 23:37:02 +08:00
}