cleanup some code after removing HardReset from IEmulator API
This commit is contained in:
parent
b5ca2f07de
commit
2ec181e50f
|
@ -51,16 +51,11 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
||||||
{
|
{
|
||||||
Type = type;
|
Type = type;
|
||||||
Controller = NullController.GetNullController();
|
Controller = NullController.GetNullController();
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Init()
|
|
||||||
{
|
|
||||||
Cpu = new HuC6280();
|
Cpu = new HuC6280();
|
||||||
VCE = new VCE();
|
VCE = new VCE();
|
||||||
VDC1 = new VDC(Cpu, VCE);
|
VDC1 = new VDC(Cpu, VCE);
|
||||||
PSG = new HuC6280PSG();
|
PSG = new HuC6280PSG();
|
||||||
|
|
||||||
if (TurboGrafx || TurboCD)
|
if (TurboGrafx || TurboCD)
|
||||||
{
|
{
|
||||||
Ram = new byte[0x2000];
|
Ram = new byte[0x2000];
|
||||||
|
@ -79,7 +74,7 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
||||||
Cpu.WriteVDC = VDC1.WriteVDC;
|
Cpu.WriteVDC = VDC1.WriteVDC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadGame(IGame game)
|
public void LoadGame(IGame game)
|
||||||
{
|
{
|
||||||
if (game.GetRomData().Length == 0x60000)
|
if (game.GetRomData().Length == 0x60000)
|
||||||
|
@ -124,12 +119,6 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
||||||
PSG.EndFrame(Cpu.TotalExecutedCycles);
|
PSG.EndFrame(Cpu.TotalExecutedCycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HardReset()
|
|
||||||
{
|
|
||||||
Init();
|
|
||||||
Cpu.ResetPC();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IVideoProvider VideoProvider
|
public IVideoProvider VideoProvider
|
||||||
{
|
{
|
||||||
get { return (IVideoProvider) VPC ?? VDC1; }
|
get { return (IVideoProvider) VPC ?? VDC1; }
|
||||||
|
|
|
@ -142,11 +142,6 @@ namespace BizHawk.Emulation.Consoles.Sega
|
||||||
public int Frame { get; set; }
|
public int Frame { get; set; }
|
||||||
public bool DeterministicEmulation { get; set; }
|
public bool DeterministicEmulation { get; set; }
|
||||||
|
|
||||||
public void HardReset()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public byte[] SaveRam
|
public byte[] SaveRam
|
||||||
{
|
{
|
||||||
get { throw new NotImplementedException(); }
|
get { throw new NotImplementedException(); }
|
||||||
|
|
|
@ -74,6 +74,7 @@ namespace BizHawk.Emulation.Consoles.Sega
|
||||||
Controller = NullController.GetNullController();
|
Controller = NullController.GetNullController();
|
||||||
|
|
||||||
Cpu = new Z80A();
|
Cpu = new Z80A();
|
||||||
|
Cpu.RegisterSP = 0xDFF0;
|
||||||
Cpu.ReadHardware = ReadPort;
|
Cpu.ReadHardware = ReadPort;
|
||||||
Cpu.WriteHardware = WritePort;
|
Cpu.WriteHardware = WritePort;
|
||||||
|
|
||||||
|
@ -81,28 +82,15 @@ namespace BizHawk.Emulation.Consoles.Sega
|
||||||
PSG = new SN76489();
|
PSG = new SN76489();
|
||||||
YM2413 = new YM2413();
|
YM2413 = new YM2413();
|
||||||
SoundMixer = new SoundMixer(PSG, YM2413);
|
SoundMixer = new SoundMixer(PSG, YM2413);
|
||||||
|
|
||||||
if (HasYM2413 && Options.Contains("WhenFMDisablePSG"))
|
if (HasYM2413 && Options.Contains("WhenFMDisablePSG"))
|
||||||
SoundMixer.DisableSource(PSG);
|
SoundMixer.DisableSource(PSG);
|
||||||
|
|
||||||
ActiveSoundProvider = PSG;
|
ActiveSoundProvider = PSG;
|
||||||
HardReset();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void HardReset()
|
|
||||||
{
|
|
||||||
Cpu.Reset();
|
|
||||||
Cpu.RegisterSP = 0xDFF0;
|
|
||||||
Vdp = new VDP(Cpu, Vdp.VdpMode, DisplayType);
|
|
||||||
PSG.Reset();
|
|
||||||
YM2413.Reset();
|
|
||||||
SystemRam = new byte[0x2000];
|
SystemRam = new byte[0x2000];
|
||||||
|
|
||||||
if (Options.Contains("CMMapper") == false)
|
if (Options.Contains("CMMapper") == false)
|
||||||
InitSegaMapper();
|
InitSegaMapper();
|
||||||
else
|
else
|
||||||
InitCodeMastersMapper();
|
InitCodeMastersMapper();
|
||||||
|
|
||||||
SetupMemoryDomains();
|
SetupMemoryDomains();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue