2016-06-21 18:58:22 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Drawing.Imaging;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using Mesen.GUI.Forms;
|
|
|
|
|
using Microsoft.Win32;
|
|
|
|
|
|
|
|
|
|
namespace Mesen.GUI.Config
|
|
|
|
|
{
|
|
|
|
|
public class EmulationInfo
|
|
|
|
|
{
|
|
|
|
|
public bool AllowInvalidInput = false;
|
|
|
|
|
public bool RemoveSpriteLimit = false;
|
2017-02-22 20:41:58 -05:00
|
|
|
|
public bool DisablePpu2004Reads = false;
|
2017-02-24 21:43:42 -05:00
|
|
|
|
public bool DisablePaletteRead = false;
|
|
|
|
|
public bool DisableOamAddrBug = false;
|
2017-02-24 23:06:13 -05:00
|
|
|
|
public bool DisablePpuReset = false;
|
2016-06-21 18:58:22 -04:00
|
|
|
|
|
|
|
|
|
public bool UseAlternativeMmc3Irq = false;
|
|
|
|
|
|
|
|
|
|
public UInt32 OverclockRate = 100;
|
|
|
|
|
public bool OverclockAdjustApu = true;
|
|
|
|
|
|
|
|
|
|
public UInt32 PpuExtraScanlinesBeforeNmi = 0;
|
|
|
|
|
public UInt32 PpuExtraScanlinesAfterNmi = 0;
|
|
|
|
|
|
2016-08-24 20:48:14 -04:00
|
|
|
|
public RamPowerOnState RamPowerOnState;
|
|
|
|
|
|
2016-07-10 18:22:37 -04:00
|
|
|
|
public bool ShowLagCounter = false;
|
|
|
|
|
|
2016-06-21 18:58:22 -04:00
|
|
|
|
public UInt32 EmulationSpeed = 100;
|
2016-09-02 19:36:37 -04:00
|
|
|
|
public UInt32 TurboSpeed = 300;
|
2016-06-21 18:58:22 -04:00
|
|
|
|
|
|
|
|
|
public EmulationInfo()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static public void ApplyConfig()
|
|
|
|
|
{
|
|
|
|
|
EmulationInfo emulationInfo = ConfigManager.Config.EmulationInfo;
|
|
|
|
|
|
|
|
|
|
InteropEmu.SetEmulationSpeed(emulationInfo.EmulationSpeed);
|
2016-09-02 19:36:37 -04:00
|
|
|
|
InteropEmu.SetTurboSpeed(emulationInfo.TurboSpeed);
|
2016-06-21 18:58:22 -04:00
|
|
|
|
|
|
|
|
|
InteropEmu.SetFlag(EmulationFlags.Mmc3IrqAltBehavior, emulationInfo.UseAlternativeMmc3Irq);
|
|
|
|
|
InteropEmu.SetFlag(EmulationFlags.AllowInvalidInput, emulationInfo.AllowInvalidInput);
|
|
|
|
|
InteropEmu.SetFlag(EmulationFlags.RemoveSpriteLimit, emulationInfo.RemoveSpriteLimit);
|
2016-07-10 18:22:37 -04:00
|
|
|
|
InteropEmu.SetFlag(EmulationFlags.ShowLagCounter, emulationInfo.ShowLagCounter);
|
2017-02-22 20:41:58 -05:00
|
|
|
|
InteropEmu.SetFlag(EmulationFlags.DisablePpu2004Reads, emulationInfo.DisablePpu2004Reads);
|
2017-02-24 21:43:42 -05:00
|
|
|
|
InteropEmu.SetFlag(EmulationFlags.DisablePaletteRead, emulationInfo.DisablePaletteRead);
|
|
|
|
|
InteropEmu.SetFlag(EmulationFlags.DisableOamAddrBug, emulationInfo.DisableOamAddrBug);
|
2017-02-24 23:06:13 -05:00
|
|
|
|
InteropEmu.SetFlag(EmulationFlags.DisablePpuReset, emulationInfo.DisablePpuReset);
|
2016-06-21 18:58:22 -04:00
|
|
|
|
|
|
|
|
|
InteropEmu.SetOverclockRate(emulationInfo.OverclockRate, emulationInfo.OverclockAdjustApu);
|
|
|
|
|
InteropEmu.SetPpuNmiConfig(emulationInfo.PpuExtraScanlinesBeforeNmi, emulationInfo.PpuExtraScanlinesAfterNmi);
|
2016-08-24 20:48:14 -04:00
|
|
|
|
|
|
|
|
|
InteropEmu.SetRamPowerOnState(emulationInfo.RamPowerOnState);
|
2016-06-21 18:58:22 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|