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:
goyuken 2014-01-21 22:22:24 +00:00
parent a441a02494
commit 3889d687d1
2 changed files with 22 additions and 0 deletions

View File

@ -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;
}
}
} }
} }

View File

@ -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;
}
} }
} }