NES: correctly treat audio ram on Namco 163 as battery backed when the board has a battery and there's no WRAM. fixes King of Kings saving, amongst others.
This commit is contained in:
parent
a441a02494
commit
3889d687d1
|
@ -317,5 +317,20 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override byte[] SaveRam
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Cart.wram_battery)
|
||||||
|
{
|
||||||
|
if (WRAM != null)
|
||||||
|
return WRAM;
|
||||||
|
else if (audio != null)
|
||||||
|
return audio.GetSaveRam();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -113,5 +113,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
{
|
{
|
||||||
this.enqueuer = enqueuer;
|
this.enqueuer = enqueuer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the sound ram can be uesd for arbitrary load\store of data,
|
||||||
|
// and can be batteryed, and some games actually did this
|
||||||
|
public byte[] GetSaveRam()
|
||||||
|
{
|
||||||
|
return ram;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue