This commit is contained in:
parent
a066d6e03d
commit
54f6492fcc
BizHawk.Emulation/Consoles/Nintendo/NES
|
@ -33,6 +33,16 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
[INESBoardImpl]
|
||||
public abstract class NESBoardBase : INESBoard
|
||||
{
|
||||
/// <summary>
|
||||
/// These are used by SetMirroring() to provide the base class nametable mirroring service.
|
||||
/// Apparently, these are not used for internal build configuration logics
|
||||
/// </summary>
|
||||
public enum EMirrorType
|
||||
{
|
||||
Vertical, Horizontal,
|
||||
OneScreenA, OneScreenB,
|
||||
}
|
||||
|
||||
public virtual void Create(NES nes)
|
||||
{
|
||||
this.NES = nes;
|
||||
|
|
|
@ -65,9 +65,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
if (ROM != null && bus_conflict) value = HandleNormalPRGConflict(addr,value);
|
||||
prg = (value*2) & prg_mask;
|
||||
if ((value & 0x10) == 0)
|
||||
SetMirrorType(NES.EMirrorType.OneScreenA);
|
||||
SetMirrorType(NES.NESBoardBase.EMirrorType.OneScreenA);
|
||||
else
|
||||
SetMirrorType(NES.EMirrorType.OneScreenB);
|
||||
SetMirrorType(NES.NESBoardBase.EMirrorType.OneScreenB);
|
||||
}
|
||||
|
||||
public override byte ReadPPU(int addr)
|
||||
|
|
|
@ -25,7 +25,10 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
return false;
|
||||
}
|
||||
|
||||
SetMirrorType(NES.EMirrorType.Vertical);
|
||||
//TODO - assert that mirror type is vertical?
|
||||
//set it in the cart?
|
||||
|
||||
SetMirrorType(NES.NESBoardBase.EMirrorType.Vertical);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -22,14 +22,6 @@ mirroring - both
|
|||
{
|
||||
int prg, mirror;
|
||||
|
||||
public enum EMirrorType
|
||||
{
|
||||
Vertical, Horizontal,
|
||||
OneScreenA, OneScreenB,
|
||||
//unknown or controlled by the board
|
||||
External
|
||||
}
|
||||
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
{
|
||||
//configure
|
||||
|
@ -45,11 +37,6 @@ mirroring - both
|
|||
|
||||
public override byte ReadPPU(int addr)
|
||||
{
|
||||
if (mirror == 0)
|
||||
SetMirrorType(0, 1);
|
||||
else
|
||||
SetMirrorType(1, 0);
|
||||
SetMirrorType(Cart.pad_h, Cart.pad_v);
|
||||
return base.ReadPPU(addr);
|
||||
}
|
||||
|
||||
|
@ -62,7 +49,8 @@ mirroring - both
|
|||
{
|
||||
int mirror = (addr & 0x01);
|
||||
prg = (addr & 0x7F) >> 3;
|
||||
base.WriteWRAM(addr, value);
|
||||
if (mirror == 1) SetMirrorType(NES.NESBoardBase.EMirrorType.Horizontal);
|
||||
else SetMirrorType(NES.NESBoardBase.EMirrorType.Vertical);
|
||||
}
|
||||
|
||||
public override void SyncState(Serializer ser)
|
||||
|
|
|
@ -59,8 +59,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
public int chr_mode;
|
||||
public int prg_mode;
|
||||
public int prg_slot; //complicated
|
||||
public NES.EMirrorType mirror;
|
||||
static NES.EMirrorType[] _mirrorTypes = new NES.EMirrorType[] { NES.EMirrorType.OneScreenA, NES.EMirrorType.OneScreenB, NES.EMirrorType.Vertical, NES.EMirrorType.Horizontal };
|
||||
public NES.NESBoardBase.EMirrorType mirror;
|
||||
static NES.NESBoardBase.EMirrorType[] _mirrorTypes = new NES.NESBoardBase.EMirrorType[] { NES.NESBoardBase.EMirrorType.OneScreenA, NES.NESBoardBase.EMirrorType.OneScreenB, NES.NESBoardBase.EMirrorType.Vertical, NES.NESBoardBase.EMirrorType.Horizontal };
|
||||
|
||||
//register 1,2:
|
||||
int chr_0, chr_1;
|
||||
|
|
|
@ -109,14 +109,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
NESWatch[] watches;
|
||||
}
|
||||
|
||||
public enum EMirrorType
|
||||
{
|
||||
Vertical, Horizontal,
|
||||
OneScreenA, OneScreenB,
|
||||
//unknown or controlled by the board
|
||||
External
|
||||
}
|
||||
|
||||
class MyVideoProvider : IVideoProvider
|
||||
{
|
||||
NES emu;
|
||||
|
|
Loading…
Reference in New Issue