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

38 lines
908 B
C#
Raw Normal View History

2024-08-05 00:05:15 +08:00
//////////////////////////////////////////////////////////////////////////
// Mapper079 Nina-3 //
//////////////////////////////////////////////////////////////////////////
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 Mapper079 : Mapper
{
public Mapper079(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
if (VROM_1K_SIZE != 0)
{
SetVROM_8K_Bank(0);
}
}
2024-08-05 00:05:15 +08:00
2024-08-16 10:20:00 +08:00
//void Mapper079::WriteLow(WORD addr, BYTE data)
public override void WriteLow(ushort addr, byte data)
{
if ((addr & 0x0100) != 0)
{
SetPROM_32K_Bank((data >> 3) & 0x01);
SetVROM_8K_Bank(data & 0x07);
}
}
2024-08-05 00:05:15 +08:00
2024-08-16 10:20:00 +08:00
}
2024-08-05 00:05:15 +08:00
}