AxibugEmuOnline/AxibugEmuOnline.Client.PSVita/Assets/VirtualNes.Core/Mapper/Mapper097.cs

44 lines
963 B
C#
Raw Normal View History

2024-12-08 21:50:52 +08:00
//////////////////////////////////////////////////////////////////////////
// Mapper097 Irem 74161 //
//////////////////////////////////////////////////////////////////////////
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 Mapper097 : Mapper
{
public Mapper097(NES parent) : base(parent)
{
}
public override void Reset()
{
SetPROM_32K_Bank(PROM_8K_SIZE - 2, PROM_8K_SIZE - 1, 0, 1);
if (VROM_8K_SIZE != 0)
{
SetVROM_8K_Bank(0);
}
}
//void Mapper097::Write(WORD addr, BYTE data)
public override void Write(ushort addr, byte data)
{
if (addr < 0xC000)
{
SetPROM_16K_Bank(6, data & 0x0F);
if ((data & 0x80) != 0) SetVRAM_Mirror(VRAM_VMIRROR);
else SetVRAM_Mirror(VRAM_HMIRROR);
}
}
}
}