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

35 lines
888 B
C#
Raw Normal View History

2024-08-03 22:26:53 +08:00
//////////////////////////////////////////////////////////////////////////
// Mapper242 Wai Xing Zhan Shi //
//////////////////////////////////////////////////////////////////////////
using static VirtualNes.MMU;
using static VirtualNes.Core.CPU;
using INT = System.Int32;
using BYTE = System.Byte;
using System;
using Codice.CM.Client.Differences;
namespace VirtualNes.Core
{
public class Mapper242 : Mapper
{
public Mapper242(NES parent) : base(parent)
{
}
public override void Reset()
{
SetPROM_32K_Bank(0);
}
//void Mapper242::Write(WORD addr, BYTE data)
public override void Write(ushort addr, byte data)
{
if ((addr & 0x01) != 0)
{
SetPROM_32K_Bank((addr & 0xF8) >> 3);
}
}
}
}