nes-fix a pretty big systematic error that wouldve made lots of savefiles not get generated
This commit is contained in:
parent
d2aba72502
commit
ebbe60c009
|
@ -166,7 +166,15 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual byte[] SaveRam { get { return null; } }
|
public virtual byte[] SaveRam
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!Cart.wram_battery) return null;
|
||||||
|
return WRAM;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public byte[] WRAM { get { return wram; } set { wram = value; } }
|
public byte[] WRAM { get { return wram; } set { wram = value; } }
|
||||||
public byte[] VRAM { get { return vram; } set { vram = value; } }
|
public byte[] VRAM { get { return vram; } set { vram = value; } }
|
||||||
public byte[] ROM { get; set; }
|
public byte[] ROM { get; set; }
|
||||||
|
@ -191,6 +199,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
Assert(false, "unhandled {0} size of {1}", name,value);
|
Assert(false, "unhandled {0} size of {1}", name,value);
|
||||||
}
|
}
|
||||||
protected void AssertBattery(bool has_bat) { Assert(Cart.wram_battery == has_bat); }
|
protected void AssertBattery(bool has_bat) { Assert(Cart.wram_battery == has_bat); }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//this will be used to track classes that implement boards
|
//this will be used to track classes that implement boards
|
||||||
|
|
|
@ -257,15 +257,6 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
WRAM[addr & wram_mask] = value;
|
WRAM[addr & wram_mask] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] SaveRam
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (!Cart.wram_battery) return null;
|
|
||||||
return WRAM;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SyncState(Serializer ser)
|
public override void SyncState(Serializer ser)
|
||||||
{
|
{
|
||||||
base.SyncState(ser);
|
base.SyncState(ser);
|
||||||
|
|
Loading…
Reference in New Issue