GBHawk: Initialize cartRAM to 0xFF
Fixes Initial D Gaiden
This commit is contained in:
parent
8972c8d57f
commit
e7a4bd3bab
|
@ -76,7 +76,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
|||
}
|
||||
|
||||
[DisplayName("RTC Initial Time")]
|
||||
[Description("Set the initial RTC time in terms of elapsed seconds. Only used when RealTimeRTC is false.")]
|
||||
[Description("Set the initial RTC time in terms of elapsed seconds.")]
|
||||
[DefaultValue(0)]
|
||||
public int RTCInitialTime
|
||||
{
|
||||
|
@ -84,6 +84,12 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
|||
set { _RTCInitialTime = Math.Max(0, Math.Min(1024 * 24 * 60 * 60, value)); }
|
||||
}
|
||||
|
||||
[DisplayName("Use Existing SaveRAM")]
|
||||
[Description("When true, existing SaveRAM will be loaded at boot up")]
|
||||
[DefaultValue(false)]
|
||||
public bool Use_SRAM { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
private int _RTCInitialTime;
|
||||
|
||||
|
|
|
@ -262,9 +262,27 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
|||
cart_RAM = new byte[0x200];
|
||||
}
|
||||
|
||||
Console.Write("RAM: ");Console.WriteLine(cart_RAM.Length);
|
||||
|
||||
mapper.Core = this;
|
||||
mapper.Initialize();
|
||||
|
||||
if (cart_RAM != null)
|
||||
{
|
||||
if (_syncSettings.Use_SRAM)
|
||||
{
|
||||
// load cartRAM here
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < cart_RAM.Length; i++)
|
||||
{
|
||||
cart_RAM[i] = 0xFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Extra RTC initialization for mbc3
|
||||
if (mppr == "MBC3")
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
return 0xFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue