SMS: Sprite Limit and Force Stereo Separation no longer require core reboot
This commit is contained in:
parent
8e0952c494
commit
e4e04e7b9d
|
@ -122,6 +122,8 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
byte Port3E = 0xAF;
|
byte Port3E = 0xAF;
|
||||||
byte Port3F = 0xFF;
|
byte Port3F = 0xFF;
|
||||||
|
|
||||||
|
byte ForceStereoByte = 0xAD;
|
||||||
|
|
||||||
public DisplayType DisplayType { get; set; }
|
public DisplayType DisplayType { get; set; }
|
||||||
public bool DeterministicEmulation { get { return true; } }
|
public bool DeterministicEmulation { get { return true; } }
|
||||||
|
|
||||||
|
@ -173,12 +175,11 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
|
|
||||||
if (this.Settings.ForceStereoSeparation && !IsGameGear)
|
if (this.Settings.ForceStereoSeparation && !IsGameGear)
|
||||||
{
|
{
|
||||||
byte stereoByte = 0xAD;
|
|
||||||
if (game["StereoByte"])
|
if (game["StereoByte"])
|
||||||
{
|
{
|
||||||
stereoByte = byte.Parse(game.OptionValue("StereoByte"));
|
ForceStereoByte = byte.Parse(game.OptionValue("StereoByte"));
|
||||||
}
|
}
|
||||||
PSG.StereoPanning = stereoByte;
|
PSG.StereoPanning = ForceStereoByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.SyncSettings.AllowOverlock && game["OverclockSafe"])
|
if (this.SyncSettings.AllowOverlock && game["OverclockSafe"])
|
||||||
|
@ -246,6 +247,9 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
Frame++;
|
Frame++;
|
||||||
PSG.BeginFrame(Cpu.TotalExecutedCycles);
|
PSG.BeginFrame(Cpu.TotalExecutedCycles);
|
||||||
Cpu.Debug = CoreComm.Tracer.Enabled;
|
Cpu.Debug = CoreComm.Tracer.Enabled;
|
||||||
|
if (!IsGameGear)
|
||||||
|
PSG.StereoPanning = Settings.ForceStereoSeparation ? ForceStereoByte : (byte) 0xFF;
|
||||||
|
|
||||||
if (Cpu.Debug && Cpu.Logger == null) // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first
|
if (Cpu.Debug && Cpu.Logger == null) // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first
|
||||||
{
|
{
|
||||||
Cpu.Logger = (s) => CoreComm.Tracer.Put(s);
|
Cpu.Logger = (s) => CoreComm.Tracer.Put(s);
|
||||||
|
@ -513,7 +517,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
}
|
}
|
||||||
public static bool RebootNeeded(SMSSettings x, SMSSettings y)
|
public static bool RebootNeeded(SMSSettings x, SMSSettings y)
|
||||||
{
|
{
|
||||||
return x.ForceStereoSeparation != y.ForceStereoSeparation || x.SpriteLimit != y.SpriteLimit;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -353,6 +353,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
||||||
public void ExecFrame(bool render)
|
public void ExecFrame(bool render)
|
||||||
{
|
{
|
||||||
int scanlinesPerFrame = DisplayType == DisplayType.NTSC ? 262 : 313;
|
int scanlinesPerFrame = DisplayType == DisplayType.NTSC ? 262 : 313;
|
||||||
|
SpriteLimit = Sms.Settings.SpriteLimit;
|
||||||
for (ScanLine = 0; ScanLine < scanlinesPerFrame; ScanLine++)
|
for (ScanLine = 0; ScanLine < scanlinesPerFrame; ScanLine++)
|
||||||
{
|
{
|
||||||
RenderCurrentScanline(render);
|
RenderCurrentScanline(render);
|
||||||
|
|
Loading…
Reference in New Issue