nes mapper 177:
Shang Gu Shen Jian Xing Zhan Qing Yuan Wang Zi Fu Chou Ji Xing He Zhan Shi Mei Guo Fu Hao
This commit is contained in:
parent
a43d02a422
commit
41d401c60a
|
@ -173,6 +173,7 @@
|
|||
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper164.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper168.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper176.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper177.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper178.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper180.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper193.cs" />
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace BizHawk.Emulation.Consoles.Nintendo
|
||||
{
|
||||
// china
|
||||
// behavior from fceux
|
||||
public class Mapper177 : NES.NESBoardBase
|
||||
{
|
||||
int prg;
|
||||
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
{
|
||||
switch (Cart.board_type)
|
||||
{
|
||||
case "MAPPER177":
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
AssertPrg(1024);
|
||||
SetMirrorType(Cart.pad_h, Cart.pad_v);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void WritePRG(int addr, byte value)
|
||||
{
|
||||
prg = value & 0x1f;
|
||||
|
||||
if ((value & 0x20) != 0)
|
||||
SetMirrorType(EMirrorType.Horizontal);
|
||||
else
|
||||
SetMirrorType(EMirrorType.Vertical);
|
||||
}
|
||||
|
||||
public override byte ReadPRG(int addr)
|
||||
{
|
||||
return ROM[addr | prg << 15];
|
||||
}
|
||||
|
||||
public override void SyncState(Serializer ser)
|
||||
{
|
||||
base.SyncState(ser);
|
||||
ser.Sync("prg", ref prg);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue