n64: support new settings system. regression: n64 video plugin settings are no longer stored in movie 1.0 files nor read from them
This commit is contained in:
parent
9fe0525746
commit
2171d4cd00
|
@ -111,73 +111,6 @@ namespace BizHawk.Client.Common
|
|||
|
||||
#endregion
|
||||
|
||||
#region N64 specific stuff - clean up or move elsewhere
|
||||
|
||||
private static VideoPluginSettings N64GenerateVideoSettings(GameInfo game, bool hasmovie)
|
||||
{
|
||||
var pluginToUse = String.Empty;
|
||||
|
||||
if (hasmovie && Global.MovieSession.Movie.Header[HeaderKeys.PLATFORM] == "N64" && Global.MovieSession.Movie.Header.ContainsKey(HeaderKeys.VIDEOPLUGIN))
|
||||
{
|
||||
pluginToUse = Global.MovieSession.Movie.Header[HeaderKeys.VIDEOPLUGIN];
|
||||
}
|
||||
|
||||
if (pluginToUse == string.Empty || (pluginToUse != "Rice" && pluginToUse != "Glide64"))
|
||||
{
|
||||
pluginToUse = Global.Config.N64VidPlugin;
|
||||
}
|
||||
|
||||
var video_settings = new VideoPluginSettings(pluginToUse, Global.Config.N64VideoSizeX, Global.Config.N64VideoSizeY);
|
||||
|
||||
if (pluginToUse == "Rice")
|
||||
{
|
||||
Global.Config.RicePlugin.FillPerGameHacks(game);
|
||||
video_settings.Parameters = Global.Config.RicePlugin.GetPluginSettings();
|
||||
}
|
||||
else if (pluginToUse == "Glide64")
|
||||
{
|
||||
Global.Config.GlidePlugin.FillPerGameHacks(game);
|
||||
video_settings.Parameters = Global.Config.GlidePlugin.GetPluginSettings();
|
||||
}
|
||||
else if (pluginToUse == "Glide64mk2")
|
||||
{
|
||||
Global.Config.Glide64mk2Plugin.FillPerGameHacks(game);
|
||||
video_settings.Parameters = Global.Config.Glide64mk2Plugin.GetPluginSettings();
|
||||
}
|
||||
|
||||
if (hasmovie && Global.MovieSession.Movie.Header[HeaderKeys.PLATFORM] == "N64" && Global.MovieSession.Movie.Header.ContainsKey(HeaderKeys.VIDEOPLUGIN))
|
||||
{
|
||||
var settings = new List<string>(video_settings.Parameters.Keys);
|
||||
foreach (var setting in settings)
|
||||
{
|
||||
if (Global.MovieSession.Movie.Header.ContainsKey(setting))
|
||||
{
|
||||
var Value = Global.MovieSession.Movie.Header[setting];
|
||||
if (video_settings.Parameters[setting] is bool)
|
||||
{
|
||||
try
|
||||
{
|
||||
video_settings.Parameters[setting] = bool.Parse(Value);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
else if (video_settings.Parameters[setting] is int)
|
||||
{
|
||||
try
|
||||
{
|
||||
video_settings.Parameters[setting] = int.Parse(Value);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return video_settings;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public RomLoader()
|
||||
{
|
||||
Deterministic = true;
|
||||
|
@ -583,13 +516,7 @@ namespace BizHawk.Client.Common
|
|||
break;
|
||||
case "N64":
|
||||
Global.Game = game;
|
||||
var video_settings = N64GenerateVideoSettings(game, hasmovie);
|
||||
int SaveType = 0;
|
||||
if (game.OptionValue("SaveType") == "EEPROM_16K")
|
||||
{
|
||||
SaveType = 1;
|
||||
}
|
||||
nextEmulator = new N64(nextComm, game, rom.RomData, video_settings, SaveType);
|
||||
nextEmulator = new N64(nextComm, game, rom.RomData, GetCoreSyncSettings<N64>());
|
||||
break;
|
||||
|
||||
case "DEBUG":
|
||||
|
|
|
@ -45,15 +45,6 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public string FFMpegPath = "%exe%/dll/ffmpeg.exe";
|
||||
|
||||
//N64 Config Settings
|
||||
public string N64VidPlugin = "Rice";
|
||||
public int N64VideoSizeX = 320;
|
||||
public int N64VideoSizeY = 240;
|
||||
|
||||
public N64RicePluginSettings RicePlugin = new N64RicePluginSettings();
|
||||
public N64GlidePluginSettings GlidePlugin = new N64GlidePluginSettings();
|
||||
public N64Glide64mk2PluginSettings Glide64mk2Plugin = new N64Glide64mk2PluginSettings();
|
||||
|
||||
// General Client Settings
|
||||
public int Input_Hotkey_OverrideOptions = 0;
|
||||
public bool StackOSDMessages = true;
|
||||
|
@ -384,19 +375,6 @@ namespace BizHawk.Client.Common
|
|||
public int NESNameTableWndy = -1;
|
||||
public int NESNameTableRefreshRate = 4;
|
||||
|
||||
// NES Graphics settings
|
||||
//public bool NESAllowMoreThanEightSprites = false;
|
||||
//public bool NESClipLeftAndRight = false;
|
||||
//public bool NESAutoLoadPalette = true;
|
||||
//public bool NESDispBackground = true;
|
||||
//public bool NESDispSprites = true;
|
||||
//public int NESBackgroundColor = 0;
|
||||
//public string NESPaletteFile = "";
|
||||
//public int NTSC_NESTopLine = 8;
|
||||
//public int NTSC_NESBottomLine = 231;
|
||||
//public int PAL_NESTopLine = 8;
|
||||
//public int PAL_NESBottomLine = 231;
|
||||
|
||||
// gb gpu view settings
|
||||
public bool AutoLoadGBGPUView = false;
|
||||
public bool GBGPUViewSaveWindowPosition = true;
|
||||
|
@ -438,12 +416,6 @@ namespace BizHawk.Client.Common
|
|||
public int SaturnGLW = 640;
|
||||
public int SaturnGLH = 480;
|
||||
|
||||
// PCE Graphics settings
|
||||
//public bool PCEDispBG1 = true;
|
||||
//public bool PCEDispOBJ1 = true;
|
||||
//public bool PCEDispBG2 = true;
|
||||
//public bool PCEDispOBJ2 = true;
|
||||
|
||||
// PCE BG Viewer settings
|
||||
public bool PCEBGViewerSaveWIndowPosition = true;
|
||||
public bool PCEBGViewerAutoload = false;
|
||||
|
@ -459,7 +431,8 @@ namespace BizHawk.Client.Common
|
|||
public bool GBDebuggerSaveWindowPosition = true;
|
||||
public bool GameBoySkipBIOS = true;
|
||||
|
||||
// Cheats Dialog
|
||||
#region Cheats Dialog
|
||||
|
||||
public bool Cheats_ValuesAsHex = true;
|
||||
public bool CheatsSaveWindowPosition = true;
|
||||
public bool DisableCheatsOnLoad = false;
|
||||
|
@ -523,6 +496,8 @@ namespace BizHawk.Client.Common
|
|||
{ "DisplayTypeColumn", false },
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
// TAStudio Dialog
|
||||
public bool TAStudioSaveWindowPosition = true;
|
||||
public bool AutoloadTAStudio = false;
|
||||
|
@ -595,19 +570,6 @@ namespace BizHawk.Client.Common
|
|||
public int Analog_LargeChange = 10;
|
||||
public int Analog_SmallChange = 1;
|
||||
|
||||
// NES Sound settings
|
||||
//public int NESSquare1 = 376;
|
||||
//public int NESSquare2 = 376;
|
||||
//public int NESTriangle = 426;
|
||||
//public int NESNoise = 247;
|
||||
//public int NESDMC = 167;
|
||||
|
||||
//public const int NESSquare1Max = 376;
|
||||
//public const int NESSquare2Max = 376;
|
||||
//public const int NESTriangleMax = 426;
|
||||
//public const int NESNoiseMax = 247;
|
||||
//public const int NESDMCMax = 167;
|
||||
|
||||
public struct AnalogBind
|
||||
{
|
||||
/// <summary>the physical stick that we're bound to</summary>
|
||||
|
@ -629,37 +591,6 @@ namespace BizHawk.Client.Common
|
|||
public Dictionary<string, Dictionary<string, string>> AllTrollersAutoFire = new Dictionary<string, Dictionary<string, string>>();
|
||||
public Dictionary<string, Dictionary<string, AnalogBind>> AllTrollersAnalog = new Dictionary<string, Dictionary<string, AnalogBind>>();
|
||||
|
||||
// SMS / GameGear Settings
|
||||
//public bool SmsEnableFM = true;
|
||||
//public bool SmsAllowOverlock = false;
|
||||
//public bool SmsForceStereoSeparation = false;
|
||||
//public bool SmsSpriteLimit = false;
|
||||
//public bool GGShowClippedRegions = false;
|
||||
//public bool GGHighlightActiveDisplayRegion = false;
|
||||
// SMS Graphics settings
|
||||
//public bool SMSDispBG = true;
|
||||
//public bool SMSDispOBJ = true;
|
||||
|
||||
// PCEngine Settings
|
||||
//public bool PceSpriteLimit = false;
|
||||
//public bool PceEqualizeVolume = false;
|
||||
//public bool PceArcadeCardRewindHack = true;
|
||||
|
||||
// Genesis Settings
|
||||
|
||||
//Atari 2600 Settings
|
||||
//public bool Atari2600_BW = false;
|
||||
//public bool Atari2600_LeftDifficulty = true;
|
||||
//public bool Atari2600_RightDifficulty = true;
|
||||
|
||||
//Atari 7800 Settings
|
||||
|
||||
//ColecoVision
|
||||
|
||||
//Intellivision
|
||||
|
||||
//NES settings
|
||||
|
||||
//SNES settings
|
||||
public string SNESProfile = "Compatibility";
|
||||
public bool SNESUseRingBuffer = true;
|
||||
|
@ -677,14 +608,6 @@ namespace BizHawk.Client.Common
|
|||
public bool GB_AsSGB = false;
|
||||
//public GBColors.ColorType CGBColors = GBColors.ColorType.gambatte;
|
||||
|
||||
//Dual Gb
|
||||
|
||||
//GBA settings
|
||||
|
||||
//Saturn
|
||||
|
||||
//Commodore 64 Settings
|
||||
|
||||
//GIF Animator Settings
|
||||
public int GifAnimatorNumFrames;
|
||||
public int GifAnimatorFrameSkip;
|
||||
|
@ -712,15 +635,6 @@ namespace BizHawk.Client.Common
|
|||
public string LuaWriterFont = "Courier New";
|
||||
public float LuaWriterZoom = 1;
|
||||
public bool LuaWriterStartEmpty = false;
|
||||
|
||||
//Atari 2600 Settings
|
||||
//public bool Atari2600_ShowBG = true;
|
||||
//public bool Atari2600_ShowPlayer1 = true;
|
||||
//public bool Atari2600_ShowPlayer2 = true;
|
||||
//public bool Atari2600_ShowMissle1 = true;
|
||||
//public bool Atari2600_ShowMissle2 = true;
|
||||
//public bool Atari2600_ShowBall = true;
|
||||
//public bool Atari2600_ShowPlayfield = true;
|
||||
}
|
||||
|
||||
#region Sub-classes TODO - it is about time to port these to separate files
|
||||
|
@ -732,363 +646,7 @@ namespace BizHawk.Client.Common
|
|||
public Dictionary<string, Dictionary<string, Config.AnalogBind>> AllTrollersAnalog = new Dictionary<string, Dictionary<string, Config.AnalogBind>>();
|
||||
}
|
||||
|
||||
|
||||
public enum PLUGINTYPE { RICE, GLIDE, GLIDE64MK2 };
|
||||
|
||||
public interface IPluginSettings
|
||||
{
|
||||
PLUGINTYPE PluginType { get; }
|
||||
Dictionary<string, object> GetPluginSettings();
|
||||
}
|
||||
|
||||
public class N64RicePluginSettings : IPluginSettings
|
||||
{
|
||||
public PLUGINTYPE PluginType
|
||||
{
|
||||
get { return PLUGINTYPE.RICE; }
|
||||
}
|
||||
|
||||
public void FillPerGameHacks(GameInfo game)
|
||||
{
|
||||
if (Global.Config.RicePlugin.UseDefaultHacks)
|
||||
{
|
||||
DisableTextureCRC = game.GetBool("RiceDisableTextureCRC", false);
|
||||
DisableCulling = game.GetBool("RiceDisableCulling", false);
|
||||
IncTexRectEdge = game.GetBool("RiceIncTexRectEdge", false);
|
||||
ZHack = game.GetBool("RiceZHack", false);
|
||||
TextureScaleHack = game.GetBool("RiceTextureScaleHack", false);
|
||||
PrimaryDepthHack = game.GetBool("RicePrimaryDepthHack", false);
|
||||
Texture1Hack = game.GetBool("RiceTexture1Hack", false);
|
||||
FastLoadTile = game.GetBool("RiceFastLoadTile", false);
|
||||
UseSmallerTexture = game.GetBool("RiceUseSmallerTexture", false);
|
||||
VIWidth = game.GetInt("RiceVIWidth", -1);
|
||||
VIHeight = game.GetInt("RiceVIHeight", -1);
|
||||
UseCIWidthAndRatio = game.GetInt("RiceUseCIWidthAndRatio", 0);
|
||||
FullTMEM = game.GetInt("RiceFullTMEM", 0);
|
||||
TxtSizeMethod2 = game.GetBool("RiceTxtSizeMethod2", false);
|
||||
EnableTxtLOD = game.GetBool("RiceEnableTxtLOD", false);
|
||||
FastTextureCRC = game.GetInt("RiceFastTextureCRC", 0);
|
||||
EmulateClear = game.GetBool("RiceEmulateClear", false);
|
||||
ForceScreenClear = game.GetBool("RiceForceScreenClear", false);
|
||||
AccurateTextureMappingHack = game.GetInt("RiceAccurateTextureMappingHack", 0);
|
||||
NormalBlender = game.GetInt("RiceNormalBlender", 0);
|
||||
DisableBlender = game.GetBool("RiceDisableBlender", false);
|
||||
ForceDepthBuffer = game.GetBool("RiceForceDepthBuffer", false);
|
||||
DisableObjBG = game.GetBool("RiceDisableObjBG", false);
|
||||
FrameBufferOption = game.GetInt("RiceFrameBufferOption", 0);
|
||||
RenderToTextureOption = game.GetInt("RiceRenderToTextureOption", 0);
|
||||
ScreenUpdateSettingHack = game.GetInt("RiceScreenUpdateSettingHack", 0);
|
||||
EnableHacksForGame = game.GetInt("RiceEnableHacksForGame", 0);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, object> GetPluginSettings()
|
||||
{
|
||||
//TODO: deal witn the game depedent settings
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
System.Reflection.FieldInfo[] members = Global.Config.RicePlugin.GetType().GetFields();
|
||||
foreach (System.Reflection.FieldInfo member in members)
|
||||
{
|
||||
object field = Global.Config.RicePlugin.GetType().GetField(member.Name).GetValue(Global.Config.RicePlugin);
|
||||
dictionary.Add(member.Name, field);
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public int FrameBufferSetting = 0;
|
||||
public int FrameBufferWriteBackControl = 0;
|
||||
public int RenderToTexture = 0;
|
||||
public int ScreenUpdateSetting = 4;
|
||||
public int Mipmapping = 2;
|
||||
public int FogMethod = 0;
|
||||
public int ForceTextureFilter = 0;
|
||||
public int TextureEnhancement = 0;
|
||||
public int TextureEnhancementControl = 0;
|
||||
public int TextureQuality = 0;
|
||||
public int OpenGLDepthBufferSetting = 16;
|
||||
public int MultiSampling = 0;
|
||||
public int ColorQuality = 0;
|
||||
public int OpenGLRenderSetting = 0;
|
||||
public int AnisotropicFiltering = 0;
|
||||
|
||||
|
||||
public bool NormalAlphaBlender = false;
|
||||
public bool FastTextureLoading = false;
|
||||
public bool AccurateTextureMapping = true;
|
||||
public bool InN64Resolution = false;
|
||||
public bool SaveVRAM = false;
|
||||
public bool DoubleSizeForSmallTxtrBuf = false;
|
||||
public bool DefaultCombinerDisable = false;
|
||||
public bool EnableHacks = true;
|
||||
public bool WinFrameMode = false;
|
||||
public bool FullTMEMEmulation = false;
|
||||
public bool OpenGLVertexClipper = false;
|
||||
public bool EnableSSE = true;
|
||||
public bool EnableVertexShader = false;
|
||||
public bool SkipFrame = false;
|
||||
public bool TexRectOnly = false;
|
||||
public bool SmallTextureOnly = false;
|
||||
public bool LoadHiResCRCOnly = true;
|
||||
public bool LoadHiResTextures = false;
|
||||
public bool DumpTexturesToFiles = false;
|
||||
|
||||
public bool UseDefaultHacks = true;
|
||||
public bool DisableTextureCRC = false;
|
||||
public bool DisableCulling = false;
|
||||
public bool IncTexRectEdge = false;
|
||||
public bool ZHack = false;
|
||||
public bool TextureScaleHack = false;
|
||||
public bool PrimaryDepthHack = false;
|
||||
public bool Texture1Hack = false;
|
||||
public bool FastLoadTile = false;
|
||||
public bool UseSmallerTexture = false;
|
||||
public int VIWidth = -1;
|
||||
public int VIHeight = -1;
|
||||
public int UseCIWidthAndRatio = 0;
|
||||
public int FullTMEM = 0;
|
||||
public bool TxtSizeMethod2 = false;
|
||||
public bool EnableTxtLOD = false;
|
||||
public int FastTextureCRC = 0;
|
||||
public bool EmulateClear = false;
|
||||
public bool ForceScreenClear = false;
|
||||
public int AccurateTextureMappingHack = 0;
|
||||
public int NormalBlender = 0;
|
||||
public bool DisableBlender = false;
|
||||
public bool ForceDepthBuffer = false;
|
||||
public bool DisableObjBG = false;
|
||||
public int FrameBufferOption = 0;
|
||||
public int RenderToTextureOption = 0;
|
||||
public int ScreenUpdateSettingHack = 0;
|
||||
public int EnableHacksForGame = 0;
|
||||
}
|
||||
|
||||
public class N64GlidePluginSettings : IPluginSettings
|
||||
{
|
||||
public PLUGINTYPE PluginType
|
||||
{
|
||||
get { return PLUGINTYPE.GLIDE; }
|
||||
}
|
||||
|
||||
public void FillPerGameHacks(GameInfo game)
|
||||
{
|
||||
if (Global.Config.GlidePlugin.UseDefaultHacks)
|
||||
{
|
||||
alt_tex_size = Global.Game.GetBool("Glide_alt_tex_size", false);
|
||||
buff_clear = Global.Game.GetBool("Glide_buff_clear", true);
|
||||
decrease_fillrect_edge = Global.Game.GetBool("Glide_decrease_fillrect_edge", false);
|
||||
detect_cpu_write = Global.Game.GetBool("Glide_detect_cpu_write", false);
|
||||
fb_clear = Global.Game.GetBool("Glide_fb_clear", false);
|
||||
fb_hires = Global.Game.GetBool("Glide_fb_clear", true);
|
||||
fb_read_alpha = Global.Game.GetBool("Glide_fb_read_alpha", false);
|
||||
fb_smart = Global.Game.GetBool("Glide_fb_smart", false);
|
||||
fillcolor_fix = Global.Game.GetBool("Glide_fillcolor_fix", false);
|
||||
fog = Global.Game.GetBool("Glide_fog", true);
|
||||
force_depth_compare = Global.Game.GetBool("Glide_force_depth_compare", false);
|
||||
force_microcheck = Global.Game.GetBool("Glide_force_microcheck", false);
|
||||
fb_hires_buf_clear = Global.Game.GetBool("Glide_fb_hires_buf_clear", true);
|
||||
fb_ignore_aux_copy = Global.Game.GetBool("Glide_fb_ignore_aux_copy", false);
|
||||
fb_ignore_previous = Global.Game.GetBool("Glide_fb_ignore_previous", false);
|
||||
increase_primdepth = Global.Game.GetBool("Glide_increase_primdepth", false);
|
||||
increase_texrect_edge = Global.Game.GetBool("Glide_increase_texrect_edge", false);
|
||||
fb_optimize_texrect = Global.Game.GetBool("Glide_fb_optimize_texrect", true);
|
||||
fb_optimize_write = Global.Game.GetBool("Glide_fb_optimize_write", false);
|
||||
PPL = Global.Game.GetBool("Glide_PPL", false);
|
||||
soft_depth_compare = Global.Game.GetBool("Glide_soft_depth_compare", false);
|
||||
use_sts1_only = Global.Game.GetBool("Glide_use_sts1_only", false);
|
||||
wrap_big_tex = Global.Game.GetBool("Glide_wrap_big_tex", false);
|
||||
|
||||
depth_bias = Global.Game.GetInt("Glide_depth_bias", 20);
|
||||
filtering = Global.Game.GetInt("Glide_filtering", 1);
|
||||
fix_tex_coord = Global.Game.GetInt("Glide_fix_tex_coord", 0);
|
||||
lodmode = Global.Game.GetInt("Glide_lodmode", 0);
|
||||
|
||||
stipple_mode = Global.Game.GetInt("Glide_stipple_mode", 2);
|
||||
stipple_pattern = Global.Game.GetInt("Glide_stipple_pattern", 1041204192);
|
||||
swapmode = Global.Game.GetInt("Glide_swapmode", 1);
|
||||
enable_hacks_for_game = Global.Game.GetInt("Glide_enable_hacks_for_game", 0);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, object> GetPluginSettings()
|
||||
{
|
||||
//TODO: deal witn the game depedent settings
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
System.Reflection.FieldInfo[] members = Global.Config.GlidePlugin.GetType().GetFields();
|
||||
foreach (System.Reflection.FieldInfo member in members)
|
||||
{
|
||||
object field = Global.Config.GlidePlugin.GetType().GetField(member.Name).GetValue(Global.Config.GlidePlugin);
|
||||
dictionary.Add(member.Name, field);
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public int wfmode = 1;
|
||||
public bool wireframe = false;
|
||||
public int card_id = 0;
|
||||
public bool flame_corona = false;
|
||||
public int ucode = 2;
|
||||
public bool autodetect_ucode = true;
|
||||
public bool motionblur = false;
|
||||
public bool fb_read_always = false;
|
||||
public bool unk_as_red = false;
|
||||
public bool filter_cache = false;
|
||||
public bool fast_crc = false;
|
||||
public bool disable_auxbuf = false;
|
||||
public bool fbo = false;
|
||||
public bool noglsl = true;
|
||||
public bool noditheredalpha = true;
|
||||
public int tex_filter = 0;
|
||||
public bool fb_render = false;
|
||||
public bool wrap_big_tex = false;
|
||||
public bool use_sts1_only = false;
|
||||
public bool soft_depth_compare = false;
|
||||
public bool PPL = false;
|
||||
public bool fb_optimize_write = false;
|
||||
public bool fb_optimize_texrect = true;
|
||||
public bool increase_texrect_edge = false;
|
||||
public bool increase_primdepth = false;
|
||||
public bool fb_ignore_previous = false;
|
||||
public bool fb_ignore_aux_copy = false;
|
||||
public bool fb_hires_buf_clear = true;
|
||||
public bool force_microcheck = false;
|
||||
public bool force_depth_compare = false;
|
||||
public bool fog = true;
|
||||
public bool fillcolor_fix = false;
|
||||
public bool fb_smart = false;
|
||||
public bool fb_read_alpha = false;
|
||||
public bool fb_get_info = false;
|
||||
public bool fb_hires = true;
|
||||
public bool fb_clear = false;
|
||||
public bool detect_cpu_write = false;
|
||||
public bool decrease_fillrect_edge = false;
|
||||
public bool buff_clear = true;
|
||||
public bool alt_tex_size = false;
|
||||
public bool UseDefaultHacks = true;
|
||||
public int enable_hacks_for_game = 0;
|
||||
public int swapmode = 1;
|
||||
public int stipple_pattern = 1041204192;
|
||||
public int stipple_mode = 2;
|
||||
public int scale_y = 100000;
|
||||
public int scale_x = 100000;
|
||||
public int offset_y = 0;
|
||||
public int offset_x = 0;
|
||||
public int lodmode = 0;
|
||||
public int fix_tex_coord = 0;
|
||||
public int filtering = 1;
|
||||
public int depth_bias = 20;
|
||||
}
|
||||
|
||||
public class N64Glide64mk2PluginSettings : IPluginSettings
|
||||
{
|
||||
public PLUGINTYPE PluginType
|
||||
{
|
||||
get { return PLUGINTYPE.GLIDE64MK2; }
|
||||
}
|
||||
|
||||
public void FillPerGameHacks(GameInfo game)
|
||||
{
|
||||
if (Global.Config.Glide64mk2Plugin.UseDefaultHacks)
|
||||
{
|
||||
use_sts1_only = Global.Game.GetBool("Glide64mk2_use_sts1_only", false);
|
||||
optimize_texrect = Global.Game.GetBool("Glide64mk2_optimize_texrect", true);
|
||||
increase_texrect_edge = Global.Game.GetBool("Glide64mk2_increase_texrect_edge", false);
|
||||
ignore_aux_copy = Global.Game.GetBool("Glide64mk2_ignore_aux_copy", false);
|
||||
hires_buf_clear = Global.Game.GetBool("Glide64mk2_hires_buf_clear", true);
|
||||
force_microcheck = Global.Game.GetBool("Glide64mk2_force_microcheck", false);
|
||||
fog = Global.Game.GetBool("Glide64mk2_fog", true);
|
||||
fb_smart = Global.Game.GetBool("Glide64mk2_fb_smart", false);
|
||||
fb_read_alpha = Global.Game.GetBool("Glide64mk2_fb_read_alpha", false);
|
||||
fb_hires = Global.Game.GetBool("Glide64mk2_fb_hires", true);
|
||||
detect_cpu_write = Global.Game.GetBool("Glide64mk2_detect_cpu_write", false);
|
||||
decrease_fillrect_edge = Global.Game.GetBool("Glide64mk2_decrease_fillrect_edge", false);
|
||||
buff_clear = Global.Game.GetBool("Glide64mk2_buff_clear", true);
|
||||
alt_tex_size = Global.Game.GetBool("Glide64mk2_alt_tex_size", true);
|
||||
swapmode = Global.Game.GetInt("Glide64mk2_swapmode", 1);
|
||||
stipple_pattern = Global.Game.GetInt("Glide64mk2_stipple_pattern", 1041204192);
|
||||
stipple_mode = Global.Game.GetInt("Glide64mk2_stipple_mode", 2);
|
||||
lodmode = Global.Game.GetInt("Glide64mk2_lodmode", 0);
|
||||
filtering = Global.Game.GetInt("Glide64mk2_filtering", 0);
|
||||
correct_viewport = Global.Game.GetBool("Glide64mk2_correct_viewport", false);
|
||||
force_calc_sphere = Global.Game.GetBool("Glide64mk2_force_calc_sphere", false);
|
||||
pal230 = Global.Game.GetBool("Glide64mk2_pal230", false);
|
||||
texture_correction = Global.Game.GetBool("Glide64mk2_texture_correction", true);
|
||||
n64_z_scale = Global.Game.GetBool("Glide64mk2_n64_z_scale", false);
|
||||
old_style_adither = Global.Game.GetBool("Glide64mk2_old_style_adither", false);
|
||||
zmode_compare_less = Global.Game.GetBool("Glide64mk2_zmode_compare_less", false);
|
||||
adjust_aspect = Global.Game.GetBool("Glide64mk2_adjust_aspect", true);
|
||||
clip_zmax = Global.Game.GetBool("Glide64mk2_clip_zmax", true);
|
||||
clip_zmin = Global.Game.GetBool("Glide64mk2_clip_zmin", false);
|
||||
force_quad3d = Global.Game.GetBool("Glide64mk2_force_quad3d", false);
|
||||
useless_is_useless = Global.Game.GetBool("Glide64mk2_useless_is_useless", false);
|
||||
fb_read_always = Global.Game.GetBool("Glide64mk2_fb_read_always", false);
|
||||
aspectmode = Global.Game.GetInt("Glide64mk2_aspectmode", 0);
|
||||
fb_crc_mode = Global.Game.GetInt("Glide64mk2_fb_crc_mode", 1);
|
||||
enable_hacks_for_game = Global.Game.GetInt("Glide64mk2_enable_hacks_for_game", 0);
|
||||
read_back_to_screen = Global.Game.GetInt("Glide64mk2_read_back_to_screen", 0);
|
||||
fast_crc = Global.Game.GetBool("Glide64mk2_fast_crc", true);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, object> GetPluginSettings()
|
||||
{
|
||||
//TODO: deal witn the game depedent settings
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
System.Reflection.FieldInfo[] members = Global.Config.Glide64mk2Plugin.GetType().GetFields();
|
||||
foreach (System.Reflection.FieldInfo member in members)
|
||||
{
|
||||
object field = Global.Config.Glide64mk2Plugin.GetType().GetField(member.Name).GetValue(Global.Config.Glide64mk2Plugin);
|
||||
dictionary.Add(member.Name, field);
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public bool wrpFBO = true;
|
||||
public int card_id = 0;
|
||||
public bool use_sts1_only = false;
|
||||
public bool optimize_texrect = true;
|
||||
public bool increase_texrect_edge = false;
|
||||
public bool ignore_aux_copy = false;
|
||||
public bool hires_buf_clear = true;
|
||||
public bool force_microcheck = false;
|
||||
public bool fog = true;
|
||||
public bool fb_smart = false;
|
||||
public bool fb_read_alpha = false;
|
||||
public bool fb_hires = true;
|
||||
public bool detect_cpu_write = false;
|
||||
public bool decrease_fillrect_edge = false;
|
||||
public bool buff_clear = true;
|
||||
public bool alt_tex_size = false;
|
||||
public int swapmode = 1;
|
||||
public int stipple_pattern = 1041204192;
|
||||
public int stipple_mode = 2;
|
||||
public int lodmode = 0;
|
||||
public int filtering = 0;
|
||||
public bool wrpAnisotropic = false;
|
||||
public bool correct_viewport = false;
|
||||
public bool force_calc_sphere = false;
|
||||
public bool pal230 = false;
|
||||
public bool texture_correction = true;
|
||||
public bool n64_z_scale = false;
|
||||
public bool old_style_adither = false;
|
||||
public bool zmode_compare_less = false;
|
||||
public bool adjust_aspect = true;
|
||||
public bool clip_zmax = true;
|
||||
public bool clip_zmin = false;
|
||||
public bool force_quad3d = false;
|
||||
public bool useless_is_useless = false;
|
||||
public bool fb_read_always = false;
|
||||
public bool fb_get_info = false;
|
||||
public bool fb_render = true;
|
||||
public int aspectmode = 0;
|
||||
public int fb_crc_mode = 1;
|
||||
public bool fast_crc = true;
|
||||
public bool UseDefaultHacks = true;
|
||||
public int enable_hacks_for_game = 0;
|
||||
public int read_back_to_screen = 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
|
@ -199,24 +199,6 @@ namespace BizHawk.Client.Common
|
|||
{
|
||||
return false;
|
||||
}
|
||||
else if (ContainsKey(HeaderKeys.PLATFORM) && this[HeaderKeys.PLATFORM] == "N64"
|
||||
&& ContainsKey(HeaderKeys.VIDEOPLUGIN))
|
||||
{
|
||||
if (this[HeaderKeys.VIDEOPLUGIN] == "Rice")
|
||||
{
|
||||
if (Global.Config.RicePlugin.GetPluginSettings().Keys.Any(line.Contains))
|
||||
{
|
||||
Add(splitLine[0], splitLine[1]);
|
||||
}
|
||||
}
|
||||
else if (this[HeaderKeys.VIDEOPLUGIN] == "Glide64")
|
||||
{
|
||||
if (Global.Config.GlidePlugin.GetPluginSettings().Keys.Any(line.Contains))
|
||||
{
|
||||
Add(splitLine[0], splitLine[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Emulation.Cores.Consoles.Nintendo.N64;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
|
@ -28,280 +29,293 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void SaveSettings()
|
||||
{
|
||||
var s = (N64SyncSettings)Global.Emulator.GetSyncSettings();
|
||||
//Global
|
||||
var video_settings = VideoResolutionComboBox.SelectedItem.ToString();
|
||||
var strArr = video_settings.Split('x');
|
||||
Global.Config.N64VideoSizeX = Int32.Parse(strArr[0].Trim());
|
||||
Global.Config.N64VideoSizeY = Int32.Parse(strArr[1].Trim());
|
||||
Global.Config.N64VidPlugin = PluginComboBox.Text;
|
||||
s.VideoSizeX = Int32.Parse(strArr[0].Trim());
|
||||
s.VideoSizeY = Int32.Parse(strArr[1].Trim());
|
||||
switch (PluginComboBox.Text)
|
||||
{
|
||||
case "Rice": s.VidPlugin = PLUGINTYPE.RICE; break;
|
||||
case "Glide64": s.VidPlugin = PLUGINTYPE.GLIDE; break;
|
||||
case "Glide64mk2": s.VidPlugin = PLUGINTYPE.GLIDE64MK2; break;
|
||||
}
|
||||
|
||||
//Rice
|
||||
Global.Config.RicePlugin.NormalAlphaBlender = RiceNormalAlphaBlender_CB.Checked;
|
||||
Global.Config.RicePlugin.FastTextureLoading = RiceFastTextureLoading_CB.Checked;
|
||||
Global.Config.RicePlugin.AccurateTextureMapping = RiceAccurateTextureMapping_CB.Checked;
|
||||
Global.Config.RicePlugin.InN64Resolution = RiceInN64Resolution_CB.Checked;
|
||||
Global.Config.RicePlugin.SaveVRAM = RiceSaveVRAM_CB.Checked;
|
||||
Global.Config.RicePlugin.DoubleSizeForSmallTxtrBuf = RiceDoubleSizeForSmallTxtrBuf_CB.Checked;
|
||||
Global.Config.RicePlugin.DefaultCombinerDisable = RiceDefaultCombinerDisable_CB.Checked;
|
||||
Global.Config.RicePlugin.EnableHacks = RiceEnableHacks_CB.Checked;
|
||||
Global.Config.RicePlugin.WinFrameMode = RiceWinFrameMode_CB.Checked;
|
||||
Global.Config.RicePlugin.FullTMEMEmulation = RiceFullTMEMEmulation_CB.Checked;
|
||||
Global.Config.RicePlugin.OpenGLVertexClipper = RiceOpenGLVertexClipper_CB.Checked;
|
||||
Global.Config.RicePlugin.EnableSSE = RiceEnableSSE_CB.Checked;
|
||||
Global.Config.RicePlugin.EnableVertexShader = RiceEnableVertexShader_CB.Checked;
|
||||
Global.Config.RicePlugin.SkipFrame = RiceSkipFrame_CB.Checked;
|
||||
Global.Config.RicePlugin.TexRectOnly = RiceTexRectOnly_CB.Checked;
|
||||
Global.Config.RicePlugin.SmallTextureOnly = RiceSmallTextureOnly_CB.Checked;
|
||||
Global.Config.RicePlugin.LoadHiResCRCOnly = RiceLoadHiResCRCOnly_CB.Checked;
|
||||
Global.Config.RicePlugin.LoadHiResTextures = RiceLoadHiResTextures_CB.Checked;
|
||||
Global.Config.RicePlugin.DumpTexturesToFiles = RiceDumpTexturesToFiles_CB.Checked;
|
||||
s.RicePlugin.NormalAlphaBlender = RiceNormalAlphaBlender_CB.Checked;
|
||||
s.RicePlugin.FastTextureLoading = RiceFastTextureLoading_CB.Checked;
|
||||
s.RicePlugin.AccurateTextureMapping = RiceAccurateTextureMapping_CB.Checked;
|
||||
s.RicePlugin.InN64Resolution = RiceInN64Resolution_CB.Checked;
|
||||
s.RicePlugin.SaveVRAM = RiceSaveVRAM_CB.Checked;
|
||||
s.RicePlugin.DoubleSizeForSmallTxtrBuf = RiceDoubleSizeForSmallTxtrBuf_CB.Checked;
|
||||
s.RicePlugin.DefaultCombinerDisable = RiceDefaultCombinerDisable_CB.Checked;
|
||||
s.RicePlugin.EnableHacks = RiceEnableHacks_CB.Checked;
|
||||
s.RicePlugin.WinFrameMode = RiceWinFrameMode_CB.Checked;
|
||||
s.RicePlugin.FullTMEMEmulation = RiceFullTMEMEmulation_CB.Checked;
|
||||
s.RicePlugin.OpenGLVertexClipper = RiceOpenGLVertexClipper_CB.Checked;
|
||||
s.RicePlugin.EnableSSE = RiceEnableSSE_CB.Checked;
|
||||
s.RicePlugin.EnableVertexShader = RiceEnableVertexShader_CB.Checked;
|
||||
s.RicePlugin.SkipFrame = RiceSkipFrame_CB.Checked;
|
||||
s.RicePlugin.TexRectOnly = RiceTexRectOnly_CB.Checked;
|
||||
s.RicePlugin.SmallTextureOnly = RiceSmallTextureOnly_CB.Checked;
|
||||
s.RicePlugin.LoadHiResCRCOnly = RiceLoadHiResCRCOnly_CB.Checked;
|
||||
s.RicePlugin.LoadHiResTextures = RiceLoadHiResTextures_CB.Checked;
|
||||
s.RicePlugin.DumpTexturesToFiles = RiceDumpTexturesToFiles_CB.Checked;
|
||||
|
||||
Global.Config.RicePlugin.FrameBufferSetting = RiceFrameBufferSetting_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.FrameBufferWriteBackControl = RiceFrameBufferWriteBackControl_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.RenderToTexture = RiceRenderToTexture_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.ScreenUpdateSetting = RiceScreenUpdateSetting_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.Mipmapping = RiceMipmapping_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.FogMethod = RiceFogMethod_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.ForceTextureFilter = RiceForceTextureFilter_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.TextureEnhancement = RiceTextureEnhancement_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.TextureEnhancementControl = RiceTextureEnhancementControl_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.TextureQuality = RiceTextureQuality_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.OpenGLDepthBufferSetting = (RiceOpenGLDepthBufferSetting_Combo.SelectedIndex + 1) * 16;
|
||||
s.RicePlugin.FrameBufferSetting = RiceFrameBufferSetting_Combo.SelectedIndex;
|
||||
s.RicePlugin.FrameBufferWriteBackControl = RiceFrameBufferWriteBackControl_Combo.SelectedIndex;
|
||||
s.RicePlugin.RenderToTexture = RiceRenderToTexture_Combo.SelectedIndex;
|
||||
s.RicePlugin.ScreenUpdateSetting = RiceScreenUpdateSetting_Combo.SelectedIndex;
|
||||
s.RicePlugin.Mipmapping = RiceMipmapping_Combo.SelectedIndex;
|
||||
s.RicePlugin.FogMethod = RiceFogMethod_Combo.SelectedIndex;
|
||||
s.RicePlugin.ForceTextureFilter = RiceForceTextureFilter_Combo.SelectedIndex;
|
||||
s.RicePlugin.TextureEnhancement = RiceTextureEnhancement_Combo.SelectedIndex;
|
||||
s.RicePlugin.TextureEnhancementControl = RiceTextureEnhancementControl_Combo.SelectedIndex;
|
||||
s.RicePlugin.TextureQuality = RiceTextureQuality_Combo.SelectedIndex;
|
||||
s.RicePlugin.OpenGLDepthBufferSetting = (RiceOpenGLDepthBufferSetting_Combo.SelectedIndex + 1) * 16;
|
||||
switch (RiceMultiSampling_Combo.SelectedIndex)
|
||||
{
|
||||
case 0: Global.Config.RicePlugin.MultiSampling = 0; break;
|
||||
case 1: Global.Config.RicePlugin.MultiSampling = 2; break;
|
||||
case 2: Global.Config.RicePlugin.MultiSampling = 4; break;
|
||||
case 3: Global.Config.RicePlugin.MultiSampling = 8; break;
|
||||
case 4: Global.Config.RicePlugin.MultiSampling = 16; break;
|
||||
default: Global.Config.RicePlugin.MultiSampling = 0; break;
|
||||
case 0: s.RicePlugin.MultiSampling = 0; break;
|
||||
case 1: s.RicePlugin.MultiSampling = 2; break;
|
||||
case 2: s.RicePlugin.MultiSampling = 4; break;
|
||||
case 3: s.RicePlugin.MultiSampling = 8; break;
|
||||
case 4: s.RicePlugin.MultiSampling = 16; break;
|
||||
default: s.RicePlugin.MultiSampling = 0; break;
|
||||
}
|
||||
Global.Config.RicePlugin.ColorQuality = RiceColorQuality_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.OpenGLRenderSetting = RiceOpenGLRenderSetting_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.AnisotropicFiltering = RiceAnisotropicFiltering_TB.Value;
|
||||
s.RicePlugin.ColorQuality = RiceColorQuality_Combo.SelectedIndex;
|
||||
s.RicePlugin.OpenGLRenderSetting = RiceOpenGLRenderSetting_Combo.SelectedIndex;
|
||||
s.RicePlugin.AnisotropicFiltering = RiceAnisotropicFiltering_TB.Value;
|
||||
|
||||
Global.Config.RicePlugin.UseDefaultHacks = RiceUseDefaultHacks_CB.Checked;
|
||||
Global.Config.RicePlugin.DisableTextureCRC = RiceDisableTextureCRC_CB.Checked;
|
||||
Global.Config.RicePlugin.DisableCulling = RiceDisableCulling_CB.Checked;
|
||||
Global.Config.RicePlugin.IncTexRectEdge = RiceIncTexRectEdge_CB.Checked;
|
||||
Global.Config.RicePlugin.ZHack = RiceZHack_CB.Checked;
|
||||
Global.Config.RicePlugin.TextureScaleHack = RiceTextureScaleHack_CB.Checked;
|
||||
Global.Config.RicePlugin.PrimaryDepthHack = RicePrimaryDepthHack_CB.Checked;
|
||||
Global.Config.RicePlugin.Texture1Hack = RiceTexture1Hack_CB.Checked;
|
||||
Global.Config.RicePlugin.FastLoadTile = RiceFastLoadTile_CB.Checked;
|
||||
Global.Config.RicePlugin.UseSmallerTexture = RiceUseSmallerTexture_CB.Checked;
|
||||
s.RicePlugin.UseDefaultHacks = RiceUseDefaultHacks_CB.Checked;
|
||||
s.RicePlugin.DisableTextureCRC = RiceDisableTextureCRC_CB.Checked;
|
||||
s.RicePlugin.DisableCulling = RiceDisableCulling_CB.Checked;
|
||||
s.RicePlugin.IncTexRectEdge = RiceIncTexRectEdge_CB.Checked;
|
||||
s.RicePlugin.ZHack = RiceZHack_CB.Checked;
|
||||
s.RicePlugin.TextureScaleHack = RiceTextureScaleHack_CB.Checked;
|
||||
s.RicePlugin.PrimaryDepthHack = RicePrimaryDepthHack_CB.Checked;
|
||||
s.RicePlugin.Texture1Hack = RiceTexture1Hack_CB.Checked;
|
||||
s.RicePlugin.FastLoadTile = RiceFastLoadTile_CB.Checked;
|
||||
s.RicePlugin.UseSmallerTexture = RiceUseSmallerTexture_CB.Checked;
|
||||
|
||||
if (InputValidate.IsValidSignedNumber(RiceVIWidth_Text.Text))
|
||||
Global.Config.RicePlugin.VIWidth = int.Parse(RiceVIWidth_Text.Text);
|
||||
s.RicePlugin.VIWidth = int.Parse(RiceVIWidth_Text.Text);
|
||||
else
|
||||
Global.Config.RicePlugin.VIWidth = -1;
|
||||
s.RicePlugin.VIWidth = -1;
|
||||
|
||||
if (InputValidate.IsValidSignedNumber(RiceVIHeight_Text.Text))
|
||||
Global.Config.RicePlugin.VIHeight = int.Parse(RiceVIHeight_Text.Text);
|
||||
s.RicePlugin.VIHeight = int.Parse(RiceVIHeight_Text.Text);
|
||||
else
|
||||
Global.Config.RicePlugin.VIHeight = -1;
|
||||
s.RicePlugin.VIHeight = -1;
|
||||
|
||||
Global.Config.RicePlugin.UseCIWidthAndRatio = RiceUseCIWidthAndRatio_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.FullTMEM = RiceFullTMEM_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.TxtSizeMethod2 = RiceTxtSizeMethod2_CB.Checked;
|
||||
Global.Config.RicePlugin.EnableTxtLOD = RiceEnableTxtLOD_CB.Checked;
|
||||
Global.Config.RicePlugin.FastTextureCRC = RiceFastTextureCRC_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.EmulateClear = RiceEmulateClear_CB.Checked;
|
||||
Global.Config.RicePlugin.ForceScreenClear = RiceForceScreenClear_CB.Checked;
|
||||
Global.Config.RicePlugin.AccurateTextureMappingHack = RiceAccurateTextureMappingHack_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.NormalBlender = RiceNormalBlender_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.DisableBlender = RiceDisableBlender_CB.Checked;
|
||||
Global.Config.RicePlugin.ForceDepthBuffer = RiceForceDepthBuffer_CB.Checked;
|
||||
Global.Config.RicePlugin.DisableObjBG = RiceDisableObjBG_CB.Checked;
|
||||
Global.Config.RicePlugin.FrameBufferOption = RiceFrameBufferOption_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.RenderToTextureOption = RiceRenderToTextureOption_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.ScreenUpdateSettingHack = RiceScreenUpdateSettingHack_Combo.SelectedIndex;
|
||||
Global.Config.RicePlugin.EnableHacksForGame = RiceEnableHacksForGame_Combo.SelectedIndex;
|
||||
s.RicePlugin.UseCIWidthAndRatio = RiceUseCIWidthAndRatio_Combo.SelectedIndex;
|
||||
s.RicePlugin.FullTMEM = RiceFullTMEM_Combo.SelectedIndex;
|
||||
s.RicePlugin.TxtSizeMethod2 = RiceTxtSizeMethod2_CB.Checked;
|
||||
s.RicePlugin.EnableTxtLOD = RiceEnableTxtLOD_CB.Checked;
|
||||
s.RicePlugin.FastTextureCRC = RiceFastTextureCRC_Combo.SelectedIndex;
|
||||
s.RicePlugin.EmulateClear = RiceEmulateClear_CB.Checked;
|
||||
s.RicePlugin.ForceScreenClear = RiceForceScreenClear_CB.Checked;
|
||||
s.RicePlugin.AccurateTextureMappingHack = RiceAccurateTextureMappingHack_Combo.SelectedIndex;
|
||||
s.RicePlugin.NormalBlender = RiceNormalBlender_Combo.SelectedIndex;
|
||||
s.RicePlugin.DisableBlender = RiceDisableBlender_CB.Checked;
|
||||
s.RicePlugin.ForceDepthBuffer = RiceForceDepthBuffer_CB.Checked;
|
||||
s.RicePlugin.DisableObjBG = RiceDisableObjBG_CB.Checked;
|
||||
s.RicePlugin.FrameBufferOption = RiceFrameBufferOption_Combo.SelectedIndex;
|
||||
s.RicePlugin.RenderToTextureOption = RiceRenderToTextureOption_Combo.SelectedIndex;
|
||||
s.RicePlugin.ScreenUpdateSettingHack = RiceScreenUpdateSettingHack_Combo.SelectedIndex;
|
||||
s.RicePlugin.EnableHacksForGame = RiceEnableHacksForGame_Combo.SelectedIndex;
|
||||
|
||||
Global.Config.GlidePlugin.autodetect_ucode = Glide_autodetect_ucode.Checked;
|
||||
Global.Config.GlidePlugin.ucode = Glide_ucode.SelectedIndex;
|
||||
Global.Config.GlidePlugin.flame_corona = Glide_flame_corona.Checked;
|
||||
Global.Config.GlidePlugin.card_id = Glide_card_id.SelectedIndex;
|
||||
Global.Config.GlidePlugin.tex_filter = Glide_tex_filter.SelectedIndex;
|
||||
Global.Config.GlidePlugin.wireframe = Glide_wireframe.Checked;
|
||||
Global.Config.GlidePlugin.wfmode = Glide_wfmode.SelectedIndex;
|
||||
Global.Config.GlidePlugin.fast_crc = Glide_fast_crc.Checked;
|
||||
Global.Config.GlidePlugin.filter_cache = Glide_filter_cache.Checked;
|
||||
Global.Config.GlidePlugin.unk_as_red = Glide_unk_as_red.Checked;
|
||||
Global.Config.GlidePlugin.fb_read_always = Glide_fb_read_always.Checked;
|
||||
Global.Config.GlidePlugin.motionblur = Glide_motionblur.Checked;
|
||||
Global.Config.GlidePlugin.fb_render = Glide_fb_render.Checked;
|
||||
Global.Config.GlidePlugin.noditheredalpha = Glide_noditheredalpha.Checked;
|
||||
Global.Config.GlidePlugin.noglsl = Glide_noglsl.Checked;
|
||||
Global.Config.GlidePlugin.fbo = Glide_fbo.Checked;
|
||||
Global.Config.GlidePlugin.disable_auxbuf = Glide_disable_auxbuf.Checked;
|
||||
Global.Config.GlidePlugin.fb_get_info = Glide_fb_get_info.Checked;
|
||||
s.GlidePlugin.autodetect_ucode = Glide_autodetect_ucode.Checked;
|
||||
s.GlidePlugin.ucode = Glide_ucode.SelectedIndex;
|
||||
s.GlidePlugin.flame_corona = Glide_flame_corona.Checked;
|
||||
s.GlidePlugin.card_id = Glide_card_id.SelectedIndex;
|
||||
s.GlidePlugin.tex_filter = Glide_tex_filter.SelectedIndex;
|
||||
s.GlidePlugin.wireframe = Glide_wireframe.Checked;
|
||||
s.GlidePlugin.wfmode = Glide_wfmode.SelectedIndex;
|
||||
s.GlidePlugin.fast_crc = Glide_fast_crc.Checked;
|
||||
s.GlidePlugin.filter_cache = Glide_filter_cache.Checked;
|
||||
s.GlidePlugin.unk_as_red = Glide_unk_as_red.Checked;
|
||||
s.GlidePlugin.fb_read_always = Glide_fb_read_always.Checked;
|
||||
s.GlidePlugin.motionblur = Glide_motionblur.Checked;
|
||||
s.GlidePlugin.fb_render = Glide_fb_render.Checked;
|
||||
s.GlidePlugin.noditheredalpha = Glide_noditheredalpha.Checked;
|
||||
s.GlidePlugin.noglsl = Glide_noglsl.Checked;
|
||||
s.GlidePlugin.fbo = Glide_fbo.Checked;
|
||||
s.GlidePlugin.disable_auxbuf = Glide_disable_auxbuf.Checked;
|
||||
s.GlidePlugin.fb_get_info = Glide_fb_get_info.Checked;
|
||||
|
||||
Global.Config.GlidePlugin.offset_x =
|
||||
s.GlidePlugin.offset_x =
|
||||
InputValidate.IsValidSignedNumber(Glide_offset_x.Text) ?
|
||||
int.Parse(Glide_offset_x.Text) : 0;
|
||||
|
||||
Global.Config.GlidePlugin.offset_y =
|
||||
s.GlidePlugin.offset_y =
|
||||
InputValidate.IsValidSignedNumber(Glide_offset_y.Text) ?
|
||||
int.Parse(Glide_offset_y.Text) : 0;
|
||||
|
||||
Global.Config.GlidePlugin.scale_x =
|
||||
s.GlidePlugin.scale_x =
|
||||
InputValidate.IsValidSignedNumber(Glide_scale_x.Text) ?
|
||||
int.Parse(Glide_scale_x.Text) : 100000;
|
||||
|
||||
Global.Config.GlidePlugin.scale_y =
|
||||
s.GlidePlugin.scale_y =
|
||||
InputValidate.IsValidSignedNumber(Glide_scale_y.Text) ?
|
||||
int.Parse(Glide_scale_y.Text) : 100000;
|
||||
|
||||
Global.Config.GlidePlugin.UseDefaultHacks = GlideUseDefaultHacks1.Checked || GlideUseDefaultHacks2.Checked;
|
||||
Global.Config.GlidePlugin.alt_tex_size = Glide_alt_tex_size.Checked;
|
||||
Global.Config.GlidePlugin.buff_clear = Glide_buff_clear.Checked;
|
||||
Global.Config.GlidePlugin.decrease_fillrect_edge = Glide_decrease_fillrect_edge.Checked;
|
||||
Global.Config.GlidePlugin.detect_cpu_write = Glide_detect_cpu_write.Checked;
|
||||
Global.Config.GlidePlugin.fb_clear = Glide_fb_clear.Checked;
|
||||
Global.Config.GlidePlugin.fb_hires = Glide_fb_hires.Checked;
|
||||
Global.Config.GlidePlugin.fb_read_alpha = Glide_fb_read_alpha.Checked;
|
||||
Global.Config.GlidePlugin.fb_smart = Glide_fb_smart.Checked;
|
||||
Global.Config.GlidePlugin.fillcolor_fix = Glide_fillcolor_fix.Checked;
|
||||
Global.Config.GlidePlugin.fog = Glide_fog.Checked;
|
||||
Global.Config.GlidePlugin.force_depth_compare = Glide_force_depth_compare.Checked;
|
||||
Global.Config.GlidePlugin.force_microcheck = Glide_force_microcheck.Checked;
|
||||
Global.Config.GlidePlugin.fb_hires_buf_clear = Glide_fb_hires_buf_clear.Checked;
|
||||
Global.Config.GlidePlugin.fb_ignore_aux_copy = Glide_fb_ignore_aux_copy.Checked;
|
||||
Global.Config.GlidePlugin.fb_ignore_previous = Glide_fb_ignore_previous.Checked;
|
||||
Global.Config.GlidePlugin.increase_primdepth = Glide_increase_primdepth.Checked;
|
||||
Global.Config.GlidePlugin.increase_texrect_edge = Glide_increase_texrect_edge.Checked;
|
||||
Global.Config.GlidePlugin.fb_optimize_texrect = Glide_fb_optimize_texrect.Checked;
|
||||
Global.Config.GlidePlugin.fb_optimize_write = Glide_fb_optimize_write.Checked;
|
||||
Global.Config.GlidePlugin.PPL = Glide_PPL.Checked;
|
||||
Global.Config.GlidePlugin.soft_depth_compare = Glide_soft_depth_compare.Checked;
|
||||
Global.Config.GlidePlugin.use_sts1_only = Glide_use_sts1_only.Checked;
|
||||
Global.Config.GlidePlugin.wrap_big_tex = Glide_wrap_big_tex.Checked;
|
||||
s.GlidePlugin.UseDefaultHacks = GlideUseDefaultHacks1.Checked || GlideUseDefaultHacks2.Checked;
|
||||
s.GlidePlugin.alt_tex_size = Glide_alt_tex_size.Checked;
|
||||
s.GlidePlugin.buff_clear = Glide_buff_clear.Checked;
|
||||
s.GlidePlugin.decrease_fillrect_edge = Glide_decrease_fillrect_edge.Checked;
|
||||
s.GlidePlugin.detect_cpu_write = Glide_detect_cpu_write.Checked;
|
||||
s.GlidePlugin.fb_clear = Glide_fb_clear.Checked;
|
||||
s.GlidePlugin.fb_hires = Glide_fb_hires.Checked;
|
||||
s.GlidePlugin.fb_read_alpha = Glide_fb_read_alpha.Checked;
|
||||
s.GlidePlugin.fb_smart = Glide_fb_smart.Checked;
|
||||
s.GlidePlugin.fillcolor_fix = Glide_fillcolor_fix.Checked;
|
||||
s.GlidePlugin.fog = Glide_fog.Checked;
|
||||
s.GlidePlugin.force_depth_compare = Glide_force_depth_compare.Checked;
|
||||
s.GlidePlugin.force_microcheck = Glide_force_microcheck.Checked;
|
||||
s.GlidePlugin.fb_hires_buf_clear = Glide_fb_hires_buf_clear.Checked;
|
||||
s.GlidePlugin.fb_ignore_aux_copy = Glide_fb_ignore_aux_copy.Checked;
|
||||
s.GlidePlugin.fb_ignore_previous = Glide_fb_ignore_previous.Checked;
|
||||
s.GlidePlugin.increase_primdepth = Glide_increase_primdepth.Checked;
|
||||
s.GlidePlugin.increase_texrect_edge = Glide_increase_texrect_edge.Checked;
|
||||
s.GlidePlugin.fb_optimize_texrect = Glide_fb_optimize_texrect.Checked;
|
||||
s.GlidePlugin.fb_optimize_write = Glide_fb_optimize_write.Checked;
|
||||
s.GlidePlugin.PPL = Glide_PPL.Checked;
|
||||
s.GlidePlugin.soft_depth_compare = Glide_soft_depth_compare.Checked;
|
||||
s.GlidePlugin.use_sts1_only = Glide_use_sts1_only.Checked;
|
||||
s.GlidePlugin.wrap_big_tex = Glide_wrap_big_tex.Checked;
|
||||
|
||||
Global.Config.GlidePlugin.depth_bias =
|
||||
s.GlidePlugin.depth_bias =
|
||||
InputValidate.IsValidSignedNumber(Glide_depth_bias.Text) ?
|
||||
int.Parse(Glide_depth_bias.Text) : 20;
|
||||
|
||||
Global.Config.GlidePlugin.filtering = Glide_filtering.SelectedIndex;
|
||||
s.GlidePlugin.filtering = Glide_filtering.SelectedIndex;
|
||||
|
||||
Global.Config.GlidePlugin.fix_tex_coord = InputValidate.IsValidSignedNumber(Glide_fix_tex_coord.Text) ?
|
||||
s.GlidePlugin.fix_tex_coord = InputValidate.IsValidSignedNumber(Glide_fix_tex_coord.Text) ?
|
||||
int.Parse(Glide_fix_tex_coord.Text) : 0;
|
||||
|
||||
Global.Config.GlidePlugin.lodmode = Glide_lodmode.SelectedIndex;
|
||||
s.GlidePlugin.lodmode = Glide_lodmode.SelectedIndex;
|
||||
|
||||
Global.Config.GlidePlugin.stipple_mode =
|
||||
s.GlidePlugin.stipple_mode =
|
||||
InputValidate.IsValidSignedNumber(Glide_stipple_mode.Text) ?
|
||||
int.Parse(Glide_stipple_mode.Text) : 2;
|
||||
|
||||
Global.Config.GlidePlugin.stipple_pattern =
|
||||
s.GlidePlugin.stipple_pattern =
|
||||
InputValidate.IsValidSignedNumber(Glide_stipple_pattern.Text) ?
|
||||
int.Parse(Glide_stipple_pattern.Text) : 1041204192;
|
||||
|
||||
Global.Config.GlidePlugin.swapmode = Glide_swapmode.SelectedIndex;
|
||||
Global.Config.GlidePlugin.enable_hacks_for_game = Glide_enable_hacks_for_game.SelectedIndex;
|
||||
s.GlidePlugin.swapmode = Glide_swapmode.SelectedIndex;
|
||||
s.GlidePlugin.enable_hacks_for_game = Glide_enable_hacks_for_game.SelectedIndex;
|
||||
|
||||
Global.Config.Glide64mk2Plugin.card_id = Glide64mk2_card_id.SelectedIndex;
|
||||
Global.Config.Glide64mk2Plugin.wrpFBO = Glide64mk2_wrpFBO.Checked;
|
||||
Global.Config.Glide64mk2Plugin.wrpAnisotropic = Glide64mk2_wrpAnisotropic.Checked;
|
||||
Global.Config.Glide64mk2Plugin.fb_get_info = Glide64mk2_fb_get_info.Checked;
|
||||
Global.Config.Glide64mk2Plugin.fb_render = Glide64mk2_fb_render.Checked;
|
||||
s.Glide64mk2Plugin.card_id = Glide64mk2_card_id.SelectedIndex;
|
||||
s.Glide64mk2Plugin.wrpFBO = Glide64mk2_wrpFBO.Checked;
|
||||
s.Glide64mk2Plugin.wrpAnisotropic = Glide64mk2_wrpAnisotropic.Checked;
|
||||
s.Glide64mk2Plugin.fb_get_info = Glide64mk2_fb_get_info.Checked;
|
||||
s.Glide64mk2Plugin.fb_render = Glide64mk2_fb_render.Checked;
|
||||
|
||||
Global.Config.Glide64mk2Plugin.UseDefaultHacks = Glide64mk2_UseDefaultHacks1.Checked || Glide64mk2_UseDefaultHacks2.Checked;
|
||||
s.Glide64mk2Plugin.UseDefaultHacks = Glide64mk2_UseDefaultHacks1.Checked || Glide64mk2_UseDefaultHacks2.Checked;
|
||||
|
||||
Global.Config.Glide64mk2Plugin.use_sts1_only = Glide64mk2_use_sts1_only.Checked;
|
||||
Global.Config.Glide64mk2Plugin.optimize_texrect = Glide64mk2_optimize_texrect.Checked;
|
||||
Global.Config.Glide64mk2Plugin.increase_texrect_edge = Glide64mk2_increase_texrect_edge.Checked;
|
||||
Global.Config.Glide64mk2Plugin.ignore_aux_copy = Glide64mk2_ignore_aux_copy.Checked;
|
||||
Global.Config.Glide64mk2Plugin.hires_buf_clear = Glide64mk2_hires_buf_clear.Checked;
|
||||
Global.Config.Glide64mk2Plugin.force_microcheck = Glide64mk2_force_microcheck.Checked;
|
||||
Global.Config.Glide64mk2Plugin.fog = Glide64mk2_fog.Checked;
|
||||
Global.Config.Glide64mk2Plugin.fb_smart = Glide64mk2_fb_smart.Checked;
|
||||
Global.Config.Glide64mk2Plugin.fb_read_alpha = Glide64mk2_fb_read_alpha.Checked;
|
||||
Global.Config.Glide64mk2Plugin.fb_hires = Glide64mk2_fb_hires.Checked;
|
||||
Global.Config.Glide64mk2Plugin.detect_cpu_write = Glide64mk2_detect_cpu_write.Checked;
|
||||
Global.Config.Glide64mk2Plugin.decrease_fillrect_edge = Glide64mk2_decrease_fillrect_edge.Checked;
|
||||
Global.Config.Glide64mk2Plugin.buff_clear = Glide64mk2_buff_clear.Checked;
|
||||
Global.Config.Glide64mk2Plugin.alt_tex_size = Glide64mk2_alt_tex_size.Checked;
|
||||
Global.Config.Glide64mk2Plugin.swapmode = Glide64mk2_swapmode.SelectedIndex;
|
||||
s.Glide64mk2Plugin.use_sts1_only = Glide64mk2_use_sts1_only.Checked;
|
||||
s.Glide64mk2Plugin.optimize_texrect = Glide64mk2_optimize_texrect.Checked;
|
||||
s.Glide64mk2Plugin.increase_texrect_edge = Glide64mk2_increase_texrect_edge.Checked;
|
||||
s.Glide64mk2Plugin.ignore_aux_copy = Glide64mk2_ignore_aux_copy.Checked;
|
||||
s.Glide64mk2Plugin.hires_buf_clear = Glide64mk2_hires_buf_clear.Checked;
|
||||
s.Glide64mk2Plugin.force_microcheck = Glide64mk2_force_microcheck.Checked;
|
||||
s.Glide64mk2Plugin.fog = Glide64mk2_fog.Checked;
|
||||
s.Glide64mk2Plugin.fb_smart = Glide64mk2_fb_smart.Checked;
|
||||
s.Glide64mk2Plugin.fb_read_alpha = Glide64mk2_fb_read_alpha.Checked;
|
||||
s.Glide64mk2Plugin.fb_hires = Glide64mk2_fb_hires.Checked;
|
||||
s.Glide64mk2Plugin.detect_cpu_write = Glide64mk2_detect_cpu_write.Checked;
|
||||
s.Glide64mk2Plugin.decrease_fillrect_edge = Glide64mk2_decrease_fillrect_edge.Checked;
|
||||
s.Glide64mk2Plugin.buff_clear = Glide64mk2_buff_clear.Checked;
|
||||
s.Glide64mk2Plugin.alt_tex_size = Glide64mk2_alt_tex_size.Checked;
|
||||
s.Glide64mk2Plugin.swapmode = Glide64mk2_swapmode.SelectedIndex;
|
||||
|
||||
Global.Config.Glide64mk2Plugin.stipple_pattern =
|
||||
s.Glide64mk2Plugin.stipple_pattern =
|
||||
InputValidate.IsValidSignedNumber(Glide64mk2_stipple_pattern.Text) ?
|
||||
int.Parse(Glide64mk2_stipple_pattern.Text) : 1041204192;
|
||||
|
||||
Global.Config.Glide64mk2Plugin.stipple_mode =
|
||||
s.Glide64mk2Plugin.stipple_mode =
|
||||
InputValidate.IsValidSignedNumber(Glide64mk2_stipple_mode.Text) ?
|
||||
int.Parse(Glide64mk2_stipple_mode.Text) : 2;
|
||||
|
||||
Global.Config.Glide64mk2Plugin.lodmode = Glide64mk2_lodmode.SelectedIndex;
|
||||
Global.Config.Glide64mk2Plugin.filtering = Glide64mk2_filtering.SelectedIndex;
|
||||
Global.Config.Glide64mk2Plugin.correct_viewport = Glide64mk2_correct_viewport.Checked;
|
||||
Global.Config.Glide64mk2Plugin.force_calc_sphere = Glide64mk2_force_calc_sphere.Checked;
|
||||
Global.Config.Glide64mk2Plugin.pal230 = Glide64mk2_pal230.Checked;
|
||||
Global.Config.Glide64mk2Plugin.texture_correction = Glide64mk2_texture_correction.Checked;
|
||||
Global.Config.Glide64mk2Plugin.n64_z_scale = Glide64mk2_n64_z_scale.Checked;
|
||||
Global.Config.Glide64mk2Plugin.old_style_adither = Glide64mk2_old_style_adither.Checked;
|
||||
Global.Config.Glide64mk2Plugin.zmode_compare_less = Glide64mk2_zmode_compare_less.Checked;
|
||||
Global.Config.Glide64mk2Plugin.adjust_aspect = Glide64mk2_adjust_aspect.Checked;
|
||||
Global.Config.Glide64mk2Plugin.clip_zmax = Glide64mk2_clip_zmax.Checked;
|
||||
Global.Config.Glide64mk2Plugin.clip_zmin = Glide64mk2_clip_zmin.Checked;
|
||||
Global.Config.Glide64mk2Plugin.force_quad3d = Glide64mk2_force_quad3d.Checked;
|
||||
Global.Config.Glide64mk2Plugin.useless_is_useless = Glide64mk2_useless_is_useless.Checked;
|
||||
Global.Config.Glide64mk2Plugin.fb_read_always = Glide64mk2_fb_read_always.Checked;
|
||||
Global.Config.Glide64mk2Plugin.aspectmode = Glide64mk2_aspectmode.SelectedIndex;
|
||||
Global.Config.Glide64mk2Plugin.fb_crc_mode = Glide64mk2_fb_crc_mode.SelectedIndex;
|
||||
Global.Config.Glide64mk2Plugin.enable_hacks_for_game = Glide64mk2_enable_hacks_for_game.SelectedIndex;
|
||||
Global.Config.Glide64mk2Plugin.read_back_to_screen = Glide64mk2_read_back_to_screen.SelectedIndex;
|
||||
Global.Config.Glide64mk2Plugin.fast_crc = Glide64mk2_fast_crc.Checked;
|
||||
s.Glide64mk2Plugin.lodmode = Glide64mk2_lodmode.SelectedIndex;
|
||||
s.Glide64mk2Plugin.filtering = Glide64mk2_filtering.SelectedIndex;
|
||||
s.Glide64mk2Plugin.correct_viewport = Glide64mk2_correct_viewport.Checked;
|
||||
s.Glide64mk2Plugin.force_calc_sphere = Glide64mk2_force_calc_sphere.Checked;
|
||||
s.Glide64mk2Plugin.pal230 = Glide64mk2_pal230.Checked;
|
||||
s.Glide64mk2Plugin.texture_correction = Glide64mk2_texture_correction.Checked;
|
||||
s.Glide64mk2Plugin.n64_z_scale = Glide64mk2_n64_z_scale.Checked;
|
||||
s.Glide64mk2Plugin.old_style_adither = Glide64mk2_old_style_adither.Checked;
|
||||
s.Glide64mk2Plugin.zmode_compare_less = Glide64mk2_zmode_compare_less.Checked;
|
||||
s.Glide64mk2Plugin.adjust_aspect = Glide64mk2_adjust_aspect.Checked;
|
||||
s.Glide64mk2Plugin.clip_zmax = Glide64mk2_clip_zmax.Checked;
|
||||
s.Glide64mk2Plugin.clip_zmin = Glide64mk2_clip_zmin.Checked;
|
||||
s.Glide64mk2Plugin.force_quad3d = Glide64mk2_force_quad3d.Checked;
|
||||
s.Glide64mk2Plugin.useless_is_useless = Glide64mk2_useless_is_useless.Checked;
|
||||
s.Glide64mk2Plugin.fb_read_always = Glide64mk2_fb_read_always.Checked;
|
||||
s.Glide64mk2Plugin.aspectmode = Glide64mk2_aspectmode.SelectedIndex;
|
||||
s.Glide64mk2Plugin.fb_crc_mode = Glide64mk2_fb_crc_mode.SelectedIndex;
|
||||
s.Glide64mk2Plugin.enable_hacks_for_game = Glide64mk2_enable_hacks_for_game.SelectedIndex;
|
||||
s.Glide64mk2Plugin.read_back_to_screen = Glide64mk2_read_back_to_screen.SelectedIndex;
|
||||
s.Glide64mk2Plugin.fast_crc = Glide64mk2_fast_crc.Checked;
|
||||
}
|
||||
|
||||
private void N64VideoPluginconfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
var s = (N64SyncSettings)Global.Emulator.GetSyncSettings();
|
||||
|
||||
//Load Variables
|
||||
//Global
|
||||
var video_setting = Global.Config.N64VideoSizeX
|
||||
var video_setting = s.VideoSizeX
|
||||
+ " x "
|
||||
+ Global.Config.N64VideoSizeY;
|
||||
+ s.VideoSizeY;
|
||||
|
||||
var index = VideoResolutionComboBox.Items.IndexOf(video_setting);
|
||||
if (index >= 0)
|
||||
{
|
||||
VideoResolutionComboBox.SelectedIndex = index;
|
||||
}
|
||||
PluginComboBox.Text = Global.Config.N64VidPlugin;
|
||||
switch (s.VidPlugin)
|
||||
{
|
||||
case PLUGINTYPE.GLIDE: PluginComboBox.Text = "Glide64mk2"; break;
|
||||
case PLUGINTYPE.GLIDE64MK2: PluginComboBox.Text = "Glide64"; break;
|
||||
case PLUGINTYPE.RICE: PluginComboBox.Text = "Rice"; break;
|
||||
}
|
||||
|
||||
//Rice
|
||||
RiceNormalAlphaBlender_CB.Checked = Global.Config.RicePlugin.NormalAlphaBlender;
|
||||
RiceFastTextureLoading_CB.Checked = Global.Config.RicePlugin.FastTextureLoading;
|
||||
RiceAccurateTextureMapping_CB.Checked = Global.Config.RicePlugin.AccurateTextureMapping;
|
||||
RiceInN64Resolution_CB.Checked = Global.Config.RicePlugin.InN64Resolution;
|
||||
RiceSaveVRAM_CB.Checked = Global.Config.RicePlugin.SaveVRAM;
|
||||
RiceDoubleSizeForSmallTxtrBuf_CB.Checked = Global.Config.RicePlugin.DoubleSizeForSmallTxtrBuf;
|
||||
RiceDefaultCombinerDisable_CB.Checked = Global.Config.RicePlugin.DefaultCombinerDisable;
|
||||
RiceEnableHacks_CB.Checked = Global.Config.RicePlugin.EnableHacks;
|
||||
RiceWinFrameMode_CB.Checked = Global.Config.RicePlugin.WinFrameMode;
|
||||
RiceFullTMEMEmulation_CB.Checked = Global.Config.RicePlugin.FullTMEMEmulation;
|
||||
RiceOpenGLVertexClipper_CB.Checked = Global.Config.RicePlugin.OpenGLVertexClipper;
|
||||
RiceEnableSSE_CB.Checked = Global.Config.RicePlugin.EnableSSE;
|
||||
RiceEnableVertexShader_CB.Checked = Global.Config.RicePlugin.EnableVertexShader;
|
||||
RiceSkipFrame_CB.Checked = Global.Config.RicePlugin.SkipFrame;
|
||||
RiceTexRectOnly_CB.Checked = Global.Config.RicePlugin.TexRectOnly;
|
||||
RiceSmallTextureOnly_CB.Checked = Global.Config.RicePlugin.SmallTextureOnly;
|
||||
RiceLoadHiResCRCOnly_CB.Checked = Global.Config.RicePlugin.LoadHiResCRCOnly;
|
||||
RiceLoadHiResTextures_CB.Checked = Global.Config.RicePlugin.LoadHiResTextures;
|
||||
RiceDumpTexturesToFiles_CB.Checked = Global.Config.RicePlugin.DumpTexturesToFiles;
|
||||
RiceNormalAlphaBlender_CB.Checked = s.RicePlugin.NormalAlphaBlender;
|
||||
RiceFastTextureLoading_CB.Checked = s.RicePlugin.FastTextureLoading;
|
||||
RiceAccurateTextureMapping_CB.Checked = s.RicePlugin.AccurateTextureMapping;
|
||||
RiceInN64Resolution_CB.Checked = s.RicePlugin.InN64Resolution;
|
||||
RiceSaveVRAM_CB.Checked = s.RicePlugin.SaveVRAM;
|
||||
RiceDoubleSizeForSmallTxtrBuf_CB.Checked = s.RicePlugin.DoubleSizeForSmallTxtrBuf;
|
||||
RiceDefaultCombinerDisable_CB.Checked = s.RicePlugin.DefaultCombinerDisable;
|
||||
RiceEnableHacks_CB.Checked = s.RicePlugin.EnableHacks;
|
||||
RiceWinFrameMode_CB.Checked = s.RicePlugin.WinFrameMode;
|
||||
RiceFullTMEMEmulation_CB.Checked = s.RicePlugin.FullTMEMEmulation;
|
||||
RiceOpenGLVertexClipper_CB.Checked = s.RicePlugin.OpenGLVertexClipper;
|
||||
RiceEnableSSE_CB.Checked = s.RicePlugin.EnableSSE;
|
||||
RiceEnableVertexShader_CB.Checked = s.RicePlugin.EnableVertexShader;
|
||||
RiceSkipFrame_CB.Checked = s.RicePlugin.SkipFrame;
|
||||
RiceTexRectOnly_CB.Checked = s.RicePlugin.TexRectOnly;
|
||||
RiceSmallTextureOnly_CB.Checked = s.RicePlugin.SmallTextureOnly;
|
||||
RiceLoadHiResCRCOnly_CB.Checked = s.RicePlugin.LoadHiResCRCOnly;
|
||||
RiceLoadHiResTextures_CB.Checked = s.RicePlugin.LoadHiResTextures;
|
||||
RiceDumpTexturesToFiles_CB.Checked = s.RicePlugin.DumpTexturesToFiles;
|
||||
|
||||
RiceFrameBufferSetting_Combo.SelectedIndex = Global.Config.RicePlugin.FrameBufferSetting;
|
||||
RiceFrameBufferWriteBackControl_Combo.SelectedIndex = Global.Config.RicePlugin.FrameBufferWriteBackControl;
|
||||
RiceRenderToTexture_Combo.SelectedIndex = Global.Config.RicePlugin.RenderToTexture;
|
||||
RiceScreenUpdateSetting_Combo.SelectedIndex = Global.Config.RicePlugin.ScreenUpdateSetting;
|
||||
RiceMipmapping_Combo.SelectedIndex = Global.Config.RicePlugin.Mipmapping;
|
||||
RiceFogMethod_Combo.SelectedIndex = Global.Config.RicePlugin.FogMethod;
|
||||
RiceForceTextureFilter_Combo.SelectedIndex = Global.Config.RicePlugin.ForceTextureFilter;
|
||||
RiceTextureEnhancement_Combo.SelectedIndex = Global.Config.RicePlugin.TextureEnhancement;
|
||||
RiceTextureEnhancementControl_Combo.SelectedIndex = Global.Config.RicePlugin.TextureEnhancementControl;
|
||||
RiceTextureQuality_Combo.SelectedIndex = Global.Config.RicePlugin.TextureQuality;
|
||||
RiceOpenGLDepthBufferSetting_Combo.SelectedIndex = (Global.Config.RicePlugin.OpenGLDepthBufferSetting / 16) - 1;
|
||||
switch (Global.Config.RicePlugin.MultiSampling)
|
||||
RiceFrameBufferSetting_Combo.SelectedIndex = s.RicePlugin.FrameBufferSetting;
|
||||
RiceFrameBufferWriteBackControl_Combo.SelectedIndex = s.RicePlugin.FrameBufferWriteBackControl;
|
||||
RiceRenderToTexture_Combo.SelectedIndex = s.RicePlugin.RenderToTexture;
|
||||
RiceScreenUpdateSetting_Combo.SelectedIndex = s.RicePlugin.ScreenUpdateSetting;
|
||||
RiceMipmapping_Combo.SelectedIndex = s.RicePlugin.Mipmapping;
|
||||
RiceFogMethod_Combo.SelectedIndex = s.RicePlugin.FogMethod;
|
||||
RiceForceTextureFilter_Combo.SelectedIndex = s.RicePlugin.ForceTextureFilter;
|
||||
RiceTextureEnhancement_Combo.SelectedIndex = s.RicePlugin.TextureEnhancement;
|
||||
RiceTextureEnhancementControl_Combo.SelectedIndex = s.RicePlugin.TextureEnhancementControl;
|
||||
RiceTextureQuality_Combo.SelectedIndex = s.RicePlugin.TextureQuality;
|
||||
RiceOpenGLDepthBufferSetting_Combo.SelectedIndex = (s.RicePlugin.OpenGLDepthBufferSetting / 16) - 1;
|
||||
switch (s.RicePlugin.MultiSampling)
|
||||
{
|
||||
case 0: RiceMultiSampling_Combo.SelectedIndex = 0; break;
|
||||
case 2: RiceMultiSampling_Combo.SelectedIndex = 1; break;
|
||||
|
@ -310,160 +324,160 @@ namespace BizHawk.Client.EmuHawk
|
|||
case 16: RiceMultiSampling_Combo.SelectedIndex = 4; break;
|
||||
default: RiceMultiSampling_Combo.SelectedIndex = 0; break;
|
||||
}
|
||||
RiceColorQuality_Combo.SelectedIndex = Global.Config.RicePlugin.ColorQuality;
|
||||
RiceOpenGLRenderSetting_Combo.SelectedIndex = Global.Config.RicePlugin.OpenGLRenderSetting;
|
||||
RiceAnisotropicFiltering_TB.Value = Global.Config.RicePlugin.AnisotropicFiltering;
|
||||
RiceColorQuality_Combo.SelectedIndex = s.RicePlugin.ColorQuality;
|
||||
RiceOpenGLRenderSetting_Combo.SelectedIndex = s.RicePlugin.OpenGLRenderSetting;
|
||||
RiceAnisotropicFiltering_TB.Value = s.RicePlugin.AnisotropicFiltering;
|
||||
AnisotropicFiltering_LB.Text = "Anisotropic Filtering: " + RiceAnisotropicFiltering_TB.Value;
|
||||
|
||||
RiceUseDefaultHacks_CB.Checked = Global.Config.RicePlugin.UseDefaultHacks;
|
||||
RiceUseDefaultHacks_CB.Checked = s.RicePlugin.UseDefaultHacks;
|
||||
|
||||
UpdateRiceHacksSection();
|
||||
if (!Global.Config.RicePlugin.UseDefaultHacks)
|
||||
if (!s.RicePlugin.UseDefaultHacks)
|
||||
{
|
||||
RiceTexture1Hack_CB.Checked = Global.Config.RicePlugin.Texture1Hack;
|
||||
RiceTexture1Hack_CB.Checked = s.RicePlugin.Texture1Hack;
|
||||
|
||||
RiceDisableTextureCRC_CB.Checked = Global.Config.RicePlugin.DisableTextureCRC;
|
||||
RiceDisableCulling_CB.Checked = Global.Config.RicePlugin.DisableCulling;
|
||||
RiceIncTexRectEdge_CB.Checked = Global.Config.RicePlugin.IncTexRectEdge;
|
||||
RiceZHack_CB.Checked = Global.Config.RicePlugin.ZHack;
|
||||
RiceTextureScaleHack_CB.Checked = Global.Config.RicePlugin.TextureScaleHack;
|
||||
RicePrimaryDepthHack_CB.Checked = Global.Config.RicePlugin.PrimaryDepthHack;
|
||||
RiceTexture1Hack_CB.Checked = Global.Config.RicePlugin.Texture1Hack;
|
||||
RiceFastLoadTile_CB.Checked = Global.Config.RicePlugin.FastLoadTile;
|
||||
RiceUseSmallerTexture_CB.Checked = Global.Config.RicePlugin.UseSmallerTexture;
|
||||
RiceVIWidth_Text.Text = Global.Config.RicePlugin.VIWidth.ToString();
|
||||
RiceVIHeight_Text.Text = Global.Config.RicePlugin.VIHeight.ToString();
|
||||
RiceUseCIWidthAndRatio_Combo.SelectedIndex = Global.Config.RicePlugin.UseCIWidthAndRatio;
|
||||
RiceFullTMEM_Combo.SelectedIndex = Global.Config.RicePlugin.FullTMEM;
|
||||
RiceTxtSizeMethod2_CB.Checked = Global.Config.RicePlugin.TxtSizeMethod2;
|
||||
RiceEnableTxtLOD_CB.Checked = Global.Config.RicePlugin.EnableTxtLOD;
|
||||
RiceFastTextureCRC_Combo.SelectedIndex = Global.Config.RicePlugin.FastTextureCRC;
|
||||
RiceEmulateClear_CB.Checked = Global.Config.RicePlugin.EmulateClear;
|
||||
RiceForceScreenClear_CB.Checked = Global.Config.RicePlugin.ForceScreenClear;
|
||||
RiceAccurateTextureMappingHack_Combo.SelectedIndex = Global.Config.RicePlugin.AccurateTextureMappingHack;
|
||||
RiceNormalBlender_Combo.SelectedIndex = Global.Config.RicePlugin.NormalBlender;
|
||||
RiceDisableBlender_CB.Checked = Global.Config.RicePlugin.DisableBlender;
|
||||
RiceForceDepthBuffer_CB.Checked = Global.Config.RicePlugin.ForceDepthBuffer;
|
||||
RiceDisableObjBG_CB.Checked = Global.Config.RicePlugin.DisableObjBG;
|
||||
RiceFrameBufferOption_Combo.SelectedIndex = Global.Config.RicePlugin.FrameBufferOption;
|
||||
RiceRenderToTextureOption_Combo.SelectedIndex = Global.Config.RicePlugin.RenderToTextureOption;
|
||||
RiceScreenUpdateSettingHack_Combo.SelectedIndex = Global.Config.RicePlugin.ScreenUpdateSettingHack;
|
||||
RiceEnableHacksForGame_Combo.SelectedIndex = Global.Config.RicePlugin.EnableHacksForGame;
|
||||
RiceDisableTextureCRC_CB.Checked = s.RicePlugin.DisableTextureCRC;
|
||||
RiceDisableCulling_CB.Checked = s.RicePlugin.DisableCulling;
|
||||
RiceIncTexRectEdge_CB.Checked = s.RicePlugin.IncTexRectEdge;
|
||||
RiceZHack_CB.Checked = s.RicePlugin.ZHack;
|
||||
RiceTextureScaleHack_CB.Checked = s.RicePlugin.TextureScaleHack;
|
||||
RicePrimaryDepthHack_CB.Checked = s.RicePlugin.PrimaryDepthHack;
|
||||
RiceTexture1Hack_CB.Checked = s.RicePlugin.Texture1Hack;
|
||||
RiceFastLoadTile_CB.Checked = s.RicePlugin.FastLoadTile;
|
||||
RiceUseSmallerTexture_CB.Checked = s.RicePlugin.UseSmallerTexture;
|
||||
RiceVIWidth_Text.Text = s.RicePlugin.VIWidth.ToString();
|
||||
RiceVIHeight_Text.Text = s.RicePlugin.VIHeight.ToString();
|
||||
RiceUseCIWidthAndRatio_Combo.SelectedIndex = s.RicePlugin.UseCIWidthAndRatio;
|
||||
RiceFullTMEM_Combo.SelectedIndex = s.RicePlugin.FullTMEM;
|
||||
RiceTxtSizeMethod2_CB.Checked = s.RicePlugin.TxtSizeMethod2;
|
||||
RiceEnableTxtLOD_CB.Checked = s.RicePlugin.EnableTxtLOD;
|
||||
RiceFastTextureCRC_Combo.SelectedIndex = s.RicePlugin.FastTextureCRC;
|
||||
RiceEmulateClear_CB.Checked = s.RicePlugin.EmulateClear;
|
||||
RiceForceScreenClear_CB.Checked = s.RicePlugin.ForceScreenClear;
|
||||
RiceAccurateTextureMappingHack_Combo.SelectedIndex = s.RicePlugin.AccurateTextureMappingHack;
|
||||
RiceNormalBlender_Combo.SelectedIndex = s.RicePlugin.NormalBlender;
|
||||
RiceDisableBlender_CB.Checked = s.RicePlugin.DisableBlender;
|
||||
RiceForceDepthBuffer_CB.Checked = s.RicePlugin.ForceDepthBuffer;
|
||||
RiceDisableObjBG_CB.Checked = s.RicePlugin.DisableObjBG;
|
||||
RiceFrameBufferOption_Combo.SelectedIndex = s.RicePlugin.FrameBufferOption;
|
||||
RiceRenderToTextureOption_Combo.SelectedIndex = s.RicePlugin.RenderToTextureOption;
|
||||
RiceScreenUpdateSettingHack_Combo.SelectedIndex = s.RicePlugin.ScreenUpdateSettingHack;
|
||||
RiceEnableHacksForGame_Combo.SelectedIndex = s.RicePlugin.EnableHacksForGame;
|
||||
}
|
||||
|
||||
Glide_autodetect_ucode.Checked = Global.Config.GlidePlugin.autodetect_ucode;
|
||||
Glide_ucode.SelectedIndex = Global.Config.GlidePlugin.ucode;
|
||||
Glide_flame_corona.Checked = Global.Config.GlidePlugin.flame_corona;
|
||||
Glide_card_id.SelectedIndex = Global.Config.GlidePlugin.card_id;
|
||||
Glide_tex_filter.SelectedIndex = Global.Config.GlidePlugin.tex_filter;
|
||||
Glide_wireframe.Checked = Global.Config.GlidePlugin.wireframe;
|
||||
Glide_wfmode.SelectedIndex = Global.Config.GlidePlugin.wfmode;
|
||||
Glide_fast_crc.Checked = Global.Config.GlidePlugin.fast_crc;
|
||||
Glide_filter_cache.Checked = Global.Config.GlidePlugin.filter_cache;
|
||||
Glide_unk_as_red.Checked = Global.Config.GlidePlugin.unk_as_red;
|
||||
Glide_fb_read_always.Checked = Global.Config.GlidePlugin.fb_read_always;
|
||||
Glide_motionblur.Checked = Global.Config.GlidePlugin.motionblur;
|
||||
Glide_fb_render.Checked = Global.Config.GlidePlugin.fb_render;
|
||||
Glide_noditheredalpha.Checked = Global.Config.GlidePlugin.noditheredalpha;
|
||||
Glide_noglsl.Checked = Global.Config.GlidePlugin.noglsl;
|
||||
Glide_fbo.Checked = Global.Config.GlidePlugin.fbo;
|
||||
Glide_disable_auxbuf.Checked = Global.Config.GlidePlugin.disable_auxbuf;
|
||||
Glide_fb_get_info.Checked = Global.Config.GlidePlugin.fb_get_info;
|
||||
Glide_offset_x.Text = Global.Config.GlidePlugin.offset_x.ToString();
|
||||
Glide_offset_y.Text = Global.Config.GlidePlugin.offset_y.ToString();
|
||||
Glide_scale_x.Text = Global.Config.GlidePlugin.scale_x.ToString();
|
||||
Glide_scale_y.Text = Global.Config.GlidePlugin.scale_y.ToString();
|
||||
Glide_autodetect_ucode.Checked = s.GlidePlugin.autodetect_ucode;
|
||||
Glide_ucode.SelectedIndex = s.GlidePlugin.ucode;
|
||||
Glide_flame_corona.Checked = s.GlidePlugin.flame_corona;
|
||||
Glide_card_id.SelectedIndex = s.GlidePlugin.card_id;
|
||||
Glide_tex_filter.SelectedIndex = s.GlidePlugin.tex_filter;
|
||||
Glide_wireframe.Checked = s.GlidePlugin.wireframe;
|
||||
Glide_wfmode.SelectedIndex = s.GlidePlugin.wfmode;
|
||||
Glide_fast_crc.Checked = s.GlidePlugin.fast_crc;
|
||||
Glide_filter_cache.Checked = s.GlidePlugin.filter_cache;
|
||||
Glide_unk_as_red.Checked = s.GlidePlugin.unk_as_red;
|
||||
Glide_fb_read_always.Checked = s.GlidePlugin.fb_read_always;
|
||||
Glide_motionblur.Checked = s.GlidePlugin.motionblur;
|
||||
Glide_fb_render.Checked = s.GlidePlugin.fb_render;
|
||||
Glide_noditheredalpha.Checked = s.GlidePlugin.noditheredalpha;
|
||||
Glide_noglsl.Checked = s.GlidePlugin.noglsl;
|
||||
Glide_fbo.Checked = s.GlidePlugin.fbo;
|
||||
Glide_disable_auxbuf.Checked = s.GlidePlugin.disable_auxbuf;
|
||||
Glide_fb_get_info.Checked = s.GlidePlugin.fb_get_info;
|
||||
Glide_offset_x.Text = s.GlidePlugin.offset_x.ToString();
|
||||
Glide_offset_y.Text = s.GlidePlugin.offset_y.ToString();
|
||||
Glide_scale_x.Text = s.GlidePlugin.scale_x.ToString();
|
||||
Glide_scale_y.Text = s.GlidePlugin.scale_y.ToString();
|
||||
|
||||
|
||||
GlideUseDefaultHacks1.Checked = Global.Config.GlidePlugin.UseDefaultHacks;
|
||||
GlideUseDefaultHacks2.Checked = Global.Config.GlidePlugin.UseDefaultHacks;
|
||||
GlideUseDefaultHacks1.Checked = s.GlidePlugin.UseDefaultHacks;
|
||||
GlideUseDefaultHacks2.Checked = s.GlidePlugin.UseDefaultHacks;
|
||||
|
||||
UpdateGlideHacksSection();
|
||||
if (!Global.Config.GlidePlugin.UseDefaultHacks)
|
||||
if (!s.GlidePlugin.UseDefaultHacks)
|
||||
{
|
||||
Glide_alt_tex_size.Checked = Global.Config.GlidePlugin.alt_tex_size;
|
||||
Glide_buff_clear.Checked = Global.Config.GlidePlugin.buff_clear;
|
||||
Glide_decrease_fillrect_edge.Checked = Global.Config.GlidePlugin.decrease_fillrect_edge;
|
||||
Glide_detect_cpu_write.Checked = Global.Config.GlidePlugin.detect_cpu_write;
|
||||
Glide_fb_clear.Checked = Global.Config.GlidePlugin.fb_clear;
|
||||
Glide_fb_hires.Checked = Global.Config.GlidePlugin.fb_hires;
|
||||
Glide_fb_read_alpha.Checked = Global.Config.GlidePlugin.fb_read_alpha;
|
||||
Glide_fb_smart.Checked = Global.Config.GlidePlugin.fb_smart;
|
||||
Glide_fillcolor_fix.Checked = Global.Config.GlidePlugin.fillcolor_fix;
|
||||
Glide_fog.Checked = Global.Config.GlidePlugin.fog;
|
||||
Glide_force_depth_compare.Checked = Global.Config.GlidePlugin.force_depth_compare;
|
||||
Glide_force_microcheck.Checked = Global.Config.GlidePlugin.force_microcheck;
|
||||
Glide_fb_hires_buf_clear.Checked = Global.Config.GlidePlugin.fb_hires_buf_clear;
|
||||
Glide_fb_ignore_aux_copy.Checked = Global.Config.GlidePlugin.fb_ignore_aux_copy;
|
||||
Glide_fb_ignore_previous.Checked = Global.Config.GlidePlugin.fb_ignore_previous;
|
||||
Glide_increase_primdepth.Checked = Global.Config.GlidePlugin.increase_primdepth;
|
||||
Glide_increase_texrect_edge.Checked = Global.Config.GlidePlugin.increase_texrect_edge;
|
||||
Glide_fb_optimize_texrect.Checked = Global.Config.GlidePlugin.fb_optimize_texrect;
|
||||
Glide_fb_optimize_write.Checked = Global.Config.GlidePlugin.fb_optimize_write;
|
||||
Glide_PPL.Checked = Global.Config.GlidePlugin.PPL;
|
||||
Glide_soft_depth_compare.Checked = Global.Config.GlidePlugin.soft_depth_compare;
|
||||
Glide_use_sts1_only.Checked = Global.Config.GlidePlugin.use_sts1_only;
|
||||
Glide_wrap_big_tex.Checked = Global.Config.GlidePlugin.wrap_big_tex;
|
||||
Glide_alt_tex_size.Checked = s.GlidePlugin.alt_tex_size;
|
||||
Glide_buff_clear.Checked = s.GlidePlugin.buff_clear;
|
||||
Glide_decrease_fillrect_edge.Checked = s.GlidePlugin.decrease_fillrect_edge;
|
||||
Glide_detect_cpu_write.Checked = s.GlidePlugin.detect_cpu_write;
|
||||
Glide_fb_clear.Checked = s.GlidePlugin.fb_clear;
|
||||
Glide_fb_hires.Checked = s.GlidePlugin.fb_hires;
|
||||
Glide_fb_read_alpha.Checked = s.GlidePlugin.fb_read_alpha;
|
||||
Glide_fb_smart.Checked = s.GlidePlugin.fb_smart;
|
||||
Glide_fillcolor_fix.Checked = s.GlidePlugin.fillcolor_fix;
|
||||
Glide_fog.Checked = s.GlidePlugin.fog;
|
||||
Glide_force_depth_compare.Checked = s.GlidePlugin.force_depth_compare;
|
||||
Glide_force_microcheck.Checked = s.GlidePlugin.force_microcheck;
|
||||
Glide_fb_hires_buf_clear.Checked = s.GlidePlugin.fb_hires_buf_clear;
|
||||
Glide_fb_ignore_aux_copy.Checked = s.GlidePlugin.fb_ignore_aux_copy;
|
||||
Glide_fb_ignore_previous.Checked = s.GlidePlugin.fb_ignore_previous;
|
||||
Glide_increase_primdepth.Checked = s.GlidePlugin.increase_primdepth;
|
||||
Glide_increase_texrect_edge.Checked = s.GlidePlugin.increase_texrect_edge;
|
||||
Glide_fb_optimize_texrect.Checked = s.GlidePlugin.fb_optimize_texrect;
|
||||
Glide_fb_optimize_write.Checked = s.GlidePlugin.fb_optimize_write;
|
||||
Glide_PPL.Checked = s.GlidePlugin.PPL;
|
||||
Glide_soft_depth_compare.Checked = s.GlidePlugin.soft_depth_compare;
|
||||
Glide_use_sts1_only.Checked = s.GlidePlugin.use_sts1_only;
|
||||
Glide_wrap_big_tex.Checked = s.GlidePlugin.wrap_big_tex;
|
||||
|
||||
Glide_depth_bias.Text = Global.Config.GlidePlugin.depth_bias.ToString();
|
||||
Glide_filtering.SelectedIndex = Global.Config.GlidePlugin.filtering;
|
||||
Glide_fix_tex_coord.Text = Global.Config.GlidePlugin.fix_tex_coord.ToString();
|
||||
Glide_lodmode.SelectedIndex = Global.Config.GlidePlugin.lodmode;
|
||||
Glide_stipple_mode.Text = Global.Config.GlidePlugin.stipple_mode.ToString();
|
||||
Glide_stipple_pattern.Text = Global.Config.GlidePlugin.stipple_pattern.ToString();
|
||||
Glide_swapmode.SelectedIndex = Global.Config.GlidePlugin.swapmode;
|
||||
Glide_enable_hacks_for_game.SelectedIndex = Global.Config.GlidePlugin.enable_hacks_for_game;
|
||||
Glide_depth_bias.Text = s.GlidePlugin.depth_bias.ToString();
|
||||
Glide_filtering.SelectedIndex = s.GlidePlugin.filtering;
|
||||
Glide_fix_tex_coord.Text = s.GlidePlugin.fix_tex_coord.ToString();
|
||||
Glide_lodmode.SelectedIndex = s.GlidePlugin.lodmode;
|
||||
Glide_stipple_mode.Text = s.GlidePlugin.stipple_mode.ToString();
|
||||
Glide_stipple_pattern.Text = s.GlidePlugin.stipple_pattern.ToString();
|
||||
Glide_swapmode.SelectedIndex = s.GlidePlugin.swapmode;
|
||||
Glide_enable_hacks_for_game.SelectedIndex = s.GlidePlugin.enable_hacks_for_game;
|
||||
}
|
||||
|
||||
Glide64mk2_card_id.SelectedIndex = Global.Config.Glide64mk2Plugin.card_id;
|
||||
Glide64mk2_wrpFBO.Checked = Global.Config.Glide64mk2Plugin.wrpFBO;
|
||||
Glide64mk2_wrpAnisotropic.Checked = Global.Config.Glide64mk2Plugin.wrpAnisotropic;
|
||||
Glide64mk2_fb_get_info.Checked = Global.Config.Glide64mk2Plugin.fb_get_info;
|
||||
Glide64mk2_fb_render.Checked = Global.Config.Glide64mk2Plugin.fb_render;
|
||||
Glide64mk2_card_id.SelectedIndex = s.Glide64mk2Plugin.card_id;
|
||||
Glide64mk2_wrpFBO.Checked = s.Glide64mk2Plugin.wrpFBO;
|
||||
Glide64mk2_wrpAnisotropic.Checked = s.Glide64mk2Plugin.wrpAnisotropic;
|
||||
Glide64mk2_fb_get_info.Checked = s.Glide64mk2Plugin.fb_get_info;
|
||||
Glide64mk2_fb_render.Checked = s.Glide64mk2Plugin.fb_render;
|
||||
|
||||
Glide64mk2_UseDefaultHacks1.Checked = Global.Config.Glide64mk2Plugin.UseDefaultHacks;
|
||||
Glide64mk2_UseDefaultHacks2.Checked = Global.Config.Glide64mk2Plugin.UseDefaultHacks;
|
||||
Glide64mk2_UseDefaultHacks1.Checked = s.Glide64mk2Plugin.UseDefaultHacks;
|
||||
Glide64mk2_UseDefaultHacks2.Checked = s.Glide64mk2Plugin.UseDefaultHacks;
|
||||
|
||||
UpdateGlide64mk2HacksSection();
|
||||
if (!Global.Config.Glide64mk2Plugin.UseDefaultHacks)
|
||||
if (!s.Glide64mk2Plugin.UseDefaultHacks)
|
||||
{
|
||||
Glide64mk2_use_sts1_only.Checked = Global.Config.Glide64mk2Plugin.use_sts1_only;
|
||||
Glide64mk2_optimize_texrect.Checked = Global.Config.Glide64mk2Plugin.optimize_texrect;
|
||||
Glide64mk2_increase_texrect_edge.Checked = Global.Config.Glide64mk2Plugin.increase_texrect_edge;
|
||||
Glide64mk2_ignore_aux_copy.Checked = Global.Config.Glide64mk2Plugin.ignore_aux_copy;
|
||||
Glide64mk2_hires_buf_clear.Checked = Global.Config.Glide64mk2Plugin.hires_buf_clear;
|
||||
Glide64mk2_force_microcheck.Checked = Global.Config.Glide64mk2Plugin.force_microcheck;
|
||||
Glide64mk2_fog.Checked = Global.Config.Glide64mk2Plugin.fog;
|
||||
Glide64mk2_fb_smart.Checked = Global.Config.Glide64mk2Plugin.fb_smart;
|
||||
Glide64mk2_fb_read_alpha.Checked = Global.Config.Glide64mk2Plugin.fb_read_alpha;
|
||||
Glide64mk2_fb_hires.Checked = Global.Config.Glide64mk2Plugin.fb_hires;
|
||||
Glide64mk2_detect_cpu_write.Checked = Global.Config.Glide64mk2Plugin.detect_cpu_write;
|
||||
Glide64mk2_decrease_fillrect_edge.Checked = Global.Config.Glide64mk2Plugin.decrease_fillrect_edge;
|
||||
Glide64mk2_buff_clear.Checked = Global.Config.Glide64mk2Plugin.buff_clear;
|
||||
Glide64mk2_alt_tex_size.Checked = Global.Config.Glide64mk2Plugin.alt_tex_size;
|
||||
Glide64mk2_swapmode.SelectedIndex = Global.Config.Glide64mk2Plugin.swapmode;
|
||||
Glide64mk2_stipple_pattern.Text = Global.Config.Glide64mk2Plugin.stipple_pattern.ToString();
|
||||
Glide64mk2_stipple_mode.Text = Global.Config.Glide64mk2Plugin.stipple_mode.ToString();
|
||||
Glide64mk2_lodmode.SelectedIndex = Global.Config.Glide64mk2Plugin.lodmode;
|
||||
Glide64mk2_filtering.SelectedIndex = Global.Config.Glide64mk2Plugin.filtering;
|
||||
Glide64mk2_correct_viewport.Checked = Global.Config.Glide64mk2Plugin.correct_viewport;
|
||||
Glide64mk2_force_calc_sphere.Checked = Global.Config.Glide64mk2Plugin.force_calc_sphere;
|
||||
Glide64mk2_pal230.Checked = Global.Config.Glide64mk2Plugin.pal230;
|
||||
Glide64mk2_texture_correction.Checked = Global.Config.Glide64mk2Plugin.texture_correction;
|
||||
Glide64mk2_n64_z_scale.Checked = Global.Config.Glide64mk2Plugin.n64_z_scale;
|
||||
Glide64mk2_old_style_adither.Checked = Global.Config.Glide64mk2Plugin.old_style_adither;
|
||||
Glide64mk2_zmode_compare_less.Checked = Global.Config.Glide64mk2Plugin.zmode_compare_less;
|
||||
Glide64mk2_adjust_aspect.Checked = Global.Config.Glide64mk2Plugin.adjust_aspect;
|
||||
Glide64mk2_clip_zmax.Checked = Global.Config.Glide64mk2Plugin.clip_zmax;
|
||||
Glide64mk2_clip_zmin.Checked = Global.Config.Glide64mk2Plugin.clip_zmin;
|
||||
Glide64mk2_force_quad3d.Checked = Global.Config.Glide64mk2Plugin.force_quad3d;
|
||||
Glide64mk2_useless_is_useless.Checked = Global.Config.Glide64mk2Plugin.useless_is_useless;
|
||||
Glide64mk2_fb_read_always.Checked = Global.Config.Glide64mk2Plugin.fb_read_always;
|
||||
Glide64mk2_aspectmode.SelectedIndex = Global.Config.Glide64mk2Plugin.aspectmode;
|
||||
Glide64mk2_fb_crc_mode.SelectedIndex = Global.Config.Glide64mk2Plugin.fb_crc_mode;
|
||||
Glide64mk2_enable_hacks_for_game.SelectedIndex = Global.Config.Glide64mk2Plugin.enable_hacks_for_game;
|
||||
Glide64mk2_read_back_to_screen.SelectedIndex = Global.Config.Glide64mk2Plugin.read_back_to_screen;
|
||||
Glide64mk2_fast_crc.Checked = Global.Config.Glide64mk2Plugin.fast_crc;
|
||||
Glide64mk2_use_sts1_only.Checked = s.Glide64mk2Plugin.use_sts1_only;
|
||||
Glide64mk2_optimize_texrect.Checked = s.Glide64mk2Plugin.optimize_texrect;
|
||||
Glide64mk2_increase_texrect_edge.Checked = s.Glide64mk2Plugin.increase_texrect_edge;
|
||||
Glide64mk2_ignore_aux_copy.Checked = s.Glide64mk2Plugin.ignore_aux_copy;
|
||||
Glide64mk2_hires_buf_clear.Checked = s.Glide64mk2Plugin.hires_buf_clear;
|
||||
Glide64mk2_force_microcheck.Checked = s.Glide64mk2Plugin.force_microcheck;
|
||||
Glide64mk2_fog.Checked = s.Glide64mk2Plugin.fog;
|
||||
Glide64mk2_fb_smart.Checked = s.Glide64mk2Plugin.fb_smart;
|
||||
Glide64mk2_fb_read_alpha.Checked = s.Glide64mk2Plugin.fb_read_alpha;
|
||||
Glide64mk2_fb_hires.Checked = s.Glide64mk2Plugin.fb_hires;
|
||||
Glide64mk2_detect_cpu_write.Checked = s.Glide64mk2Plugin.detect_cpu_write;
|
||||
Glide64mk2_decrease_fillrect_edge.Checked = s.Glide64mk2Plugin.decrease_fillrect_edge;
|
||||
Glide64mk2_buff_clear.Checked = s.Glide64mk2Plugin.buff_clear;
|
||||
Glide64mk2_alt_tex_size.Checked = s.Glide64mk2Plugin.alt_tex_size;
|
||||
Glide64mk2_swapmode.SelectedIndex = s.Glide64mk2Plugin.swapmode;
|
||||
Glide64mk2_stipple_pattern.Text = s.Glide64mk2Plugin.stipple_pattern.ToString();
|
||||
Glide64mk2_stipple_mode.Text = s.Glide64mk2Plugin.stipple_mode.ToString();
|
||||
Glide64mk2_lodmode.SelectedIndex = s.Glide64mk2Plugin.lodmode;
|
||||
Glide64mk2_filtering.SelectedIndex = s.Glide64mk2Plugin.filtering;
|
||||
Glide64mk2_correct_viewport.Checked = s.Glide64mk2Plugin.correct_viewport;
|
||||
Glide64mk2_force_calc_sphere.Checked = s.Glide64mk2Plugin.force_calc_sphere;
|
||||
Glide64mk2_pal230.Checked = s.Glide64mk2Plugin.pal230;
|
||||
Glide64mk2_texture_correction.Checked = s.Glide64mk2Plugin.texture_correction;
|
||||
Glide64mk2_n64_z_scale.Checked = s.Glide64mk2Plugin.n64_z_scale;
|
||||
Glide64mk2_old_style_adither.Checked = s.Glide64mk2Plugin.old_style_adither;
|
||||
Glide64mk2_zmode_compare_less.Checked = s.Glide64mk2Plugin.zmode_compare_less;
|
||||
Glide64mk2_adjust_aspect.Checked = s.Glide64mk2Plugin.adjust_aspect;
|
||||
Glide64mk2_clip_zmax.Checked = s.Glide64mk2Plugin.clip_zmax;
|
||||
Glide64mk2_clip_zmin.Checked = s.Glide64mk2Plugin.clip_zmin;
|
||||
Glide64mk2_force_quad3d.Checked = s.Glide64mk2Plugin.force_quad3d;
|
||||
Glide64mk2_useless_is_useless.Checked = s.Glide64mk2Plugin.useless_is_useless;
|
||||
Glide64mk2_fb_read_always.Checked = s.Glide64mk2Plugin.fb_read_always;
|
||||
Glide64mk2_aspectmode.SelectedIndex = s.Glide64mk2Plugin.aspectmode;
|
||||
Glide64mk2_fb_crc_mode.SelectedIndex = s.Glide64mk2Plugin.fb_crc_mode;
|
||||
Glide64mk2_enable_hacks_for_game.SelectedIndex = s.Glide64mk2Plugin.enable_hacks_for_game;
|
||||
Glide64mk2_read_back_to_screen.SelectedIndex = s.Glide64mk2Plugin.read_back_to_screen;
|
||||
Glide64mk2_fast_crc.Checked = s.Glide64mk2Plugin.fast_crc;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -164,25 +164,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else if (Global.Emulator is N64)
|
||||
{
|
||||
_movieToRecord.Header[HeaderKeys.VIDEOPLUGIN] = Global.Config.N64VidPlugin;
|
||||
|
||||
if (Global.Config.N64VidPlugin == "Rice")
|
||||
{
|
||||
var rice_settings = Global.Config.RicePlugin.GetPluginSettings();
|
||||
foreach (var setting in rice_settings)
|
||||
{
|
||||
_movieToRecord.Header[setting.Key] = setting.Value.ToString();
|
||||
}
|
||||
}
|
||||
else if (Global.Config.N64VidPlugin == "Glide64")
|
||||
{
|
||||
var glide_settings = Global.Config.GlidePlugin.GetPluginSettings();
|
||||
foreach (var setting in glide_settings)
|
||||
{
|
||||
_movieToRecord.Header[setting.Key] = setting.Value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
if ((Global.Emulator as N64).DisplayType == DisplayType.PAL)
|
||||
{
|
||||
_movieToRecord.Header[HeaderKeys.PAL] = "1";
|
||||
|
|
|
@ -225,6 +225,7 @@
|
|||
<Compile Include="Consoles\Nintendo\GBA\Meteor.cs" />
|
||||
<Compile Include="Consoles\Nintendo\N64\mupen64plusApi.cs" />
|
||||
<Compile Include="Consoles\Nintendo\N64\N64.cs" />
|
||||
<Compile Include="Consoles\Nintendo\N64\N64SyncSettings.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\APU.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\BoardSystem.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\AVE-NINA.cs" />
|
||||
|
|
|
@ -6,6 +6,7 @@ using System.Threading;
|
|||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Consoles.Nintendo.N64;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||
{
|
||||
|
@ -398,12 +399,18 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
|
||||
mupen64plusApi api;
|
||||
|
||||
public N64(CoreComm comm, GameInfo game, byte[] rom, VideoPluginSettings video_settings, int SaveType)
|
||||
public N64(CoreComm comm, GameInfo game, byte[] rom, object SyncSettings)
|
||||
{
|
||||
int SaveType = 0;
|
||||
if (game.OptionValue("SaveType") == "EEPROM_16K")
|
||||
SaveType = 1;
|
||||
|
||||
CoreComm = comm;
|
||||
this.rom = rom;
|
||||
this.game = game;
|
||||
|
||||
this.SyncSettings = (N64SyncSettings)SyncSettings ?? new N64SyncSettings();
|
||||
|
||||
byte country_code = rom[0x3E];
|
||||
switch (country_code)
|
||||
{
|
||||
|
@ -429,15 +436,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
break;
|
||||
}
|
||||
|
||||
api = new mupen64plusApi(this, rom, video_settings, SaveType);
|
||||
api = new mupen64plusApi(this, rom, this.SyncSettings.GetVPS(game), SaveType);
|
||||
api.SetM64PInputCallback(new mupen64plusApi.InputCallback(setControllers));
|
||||
|
||||
InitMemoryDomains();
|
||||
}
|
||||
|
||||
N64SyncSettings SyncSettings;
|
||||
|
||||
public object GetSettings() { return null; }
|
||||
public object GetSyncSettings() { return null; }
|
||||
public object GetSyncSettings() { return SyncSettings.Clone(); }
|
||||
public bool PutSettings(object o) { return false; }
|
||||
public bool PutSyncSettings(object o) { return false; }
|
||||
public bool PutSyncSettings(object o) { SyncSettings = (N64SyncSettings)o; return true; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,426 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Nintendo.N64;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Consoles.Nintendo.N64
|
||||
{
|
||||
public class N64SyncSettings
|
||||
{
|
||||
public PLUGINTYPE VidPlugin = PLUGINTYPE.RICE;
|
||||
public int VideoSizeX = 320;
|
||||
public int VideoSizeY = 240;
|
||||
|
||||
public N64RicePluginSettings RicePlugin = new N64RicePluginSettings();
|
||||
public N64GlidePluginSettings GlidePlugin = new N64GlidePluginSettings();
|
||||
public N64Glide64mk2PluginSettings Glide64mk2Plugin = new N64Glide64mk2PluginSettings();
|
||||
|
||||
public N64SyncSettings Clone()
|
||||
{
|
||||
return new N64SyncSettings
|
||||
{
|
||||
VidPlugin = VidPlugin,
|
||||
VideoSizeX = VideoSizeX,
|
||||
VideoSizeY = VideoSizeY,
|
||||
RicePlugin = RicePlugin.Clone(),
|
||||
GlidePlugin = GlidePlugin.Clone(),
|
||||
Glide64mk2Plugin = Glide64mk2Plugin.Clone()
|
||||
};
|
||||
}
|
||||
|
||||
// get mupenapi internal object
|
||||
public VideoPluginSettings GetVPS(GameInfo game)
|
||||
{
|
||||
var ret = new VideoPluginSettings(VidPlugin, VideoSizeX, VideoSizeY);
|
||||
IPluginSettings ips = null;
|
||||
switch (VidPlugin)
|
||||
{
|
||||
// clone so per game hacks don't overwrite our settings object
|
||||
case PLUGINTYPE.GLIDE: ips = GlidePlugin.Clone(); break;
|
||||
case PLUGINTYPE.GLIDE64MK2: ips = Glide64mk2Plugin.Clone(); break;
|
||||
case PLUGINTYPE.RICE: ips = RicePlugin.Clone(); break;
|
||||
}
|
||||
ips.FillPerGameHacks(game);
|
||||
ret.Parameters = ips.GetPluginSettings();
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public enum PLUGINTYPE { RICE, GLIDE, GLIDE64MK2 };
|
||||
|
||||
public interface IPluginSettings
|
||||
{
|
||||
PLUGINTYPE PluginType { get; }
|
||||
Dictionary<string, object> GetPluginSettings();
|
||||
void FillPerGameHacks(GameInfo game);
|
||||
}
|
||||
|
||||
public class N64RicePluginSettings : IPluginSettings
|
||||
{
|
||||
[JsonIgnore]
|
||||
public PLUGINTYPE PluginType
|
||||
{
|
||||
get { return PLUGINTYPE.RICE; }
|
||||
}
|
||||
|
||||
public void FillPerGameHacks(GameInfo game)
|
||||
{
|
||||
if (UseDefaultHacks)
|
||||
{
|
||||
DisableTextureCRC = game.GetBool("RiceDisableTextureCRC", false);
|
||||
DisableCulling = game.GetBool("RiceDisableCulling", false);
|
||||
IncTexRectEdge = game.GetBool("RiceIncTexRectEdge", false);
|
||||
ZHack = game.GetBool("RiceZHack", false);
|
||||
TextureScaleHack = game.GetBool("RiceTextureScaleHack", false);
|
||||
PrimaryDepthHack = game.GetBool("RicePrimaryDepthHack", false);
|
||||
Texture1Hack = game.GetBool("RiceTexture1Hack", false);
|
||||
FastLoadTile = game.GetBool("RiceFastLoadTile", false);
|
||||
UseSmallerTexture = game.GetBool("RiceUseSmallerTexture", false);
|
||||
VIWidth = game.GetInt("RiceVIWidth", -1);
|
||||
VIHeight = game.GetInt("RiceVIHeight", -1);
|
||||
UseCIWidthAndRatio = game.GetInt("RiceUseCIWidthAndRatio", 0);
|
||||
FullTMEM = game.GetInt("RiceFullTMEM", 0);
|
||||
TxtSizeMethod2 = game.GetBool("RiceTxtSizeMethod2", false);
|
||||
EnableTxtLOD = game.GetBool("RiceEnableTxtLOD", false);
|
||||
FastTextureCRC = game.GetInt("RiceFastTextureCRC", 0);
|
||||
EmulateClear = game.GetBool("RiceEmulateClear", false);
|
||||
ForceScreenClear = game.GetBool("RiceForceScreenClear", false);
|
||||
AccurateTextureMappingHack = game.GetInt("RiceAccurateTextureMappingHack", 0);
|
||||
NormalBlender = game.GetInt("RiceNormalBlender", 0);
|
||||
DisableBlender = game.GetBool("RiceDisableBlender", false);
|
||||
ForceDepthBuffer = game.GetBool("RiceForceDepthBuffer", false);
|
||||
DisableObjBG = game.GetBool("RiceDisableObjBG", false);
|
||||
FrameBufferOption = game.GetInt("RiceFrameBufferOption", 0);
|
||||
RenderToTextureOption = game.GetInt("RiceRenderToTextureOption", 0);
|
||||
ScreenUpdateSettingHack = game.GetInt("RiceScreenUpdateSettingHack", 0);
|
||||
EnableHacksForGame = game.GetInt("RiceEnableHacksForGame", 0);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, object> GetPluginSettings()
|
||||
{
|
||||
//TODO: deal witn the game depedent settings
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
System.Reflection.FieldInfo[] members = this.GetType().GetFields();
|
||||
foreach (System.Reflection.FieldInfo member in members)
|
||||
{
|
||||
object field = this.GetType().GetField(member.Name).GetValue(this);
|
||||
dictionary.Add(member.Name, field);
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public int FrameBufferSetting = 0;
|
||||
public int FrameBufferWriteBackControl = 0;
|
||||
public int RenderToTexture = 0;
|
||||
public int ScreenUpdateSetting = 4;
|
||||
public int Mipmapping = 2;
|
||||
public int FogMethod = 0;
|
||||
public int ForceTextureFilter = 0;
|
||||
public int TextureEnhancement = 0;
|
||||
public int TextureEnhancementControl = 0;
|
||||
public int TextureQuality = 0;
|
||||
public int OpenGLDepthBufferSetting = 16;
|
||||
public int MultiSampling = 0;
|
||||
public int ColorQuality = 0;
|
||||
public int OpenGLRenderSetting = 0;
|
||||
public int AnisotropicFiltering = 0;
|
||||
|
||||
public bool NormalAlphaBlender = false;
|
||||
public bool FastTextureLoading = false;
|
||||
public bool AccurateTextureMapping = true;
|
||||
public bool InN64Resolution = false;
|
||||
public bool SaveVRAM = false;
|
||||
public bool DoubleSizeForSmallTxtrBuf = false;
|
||||
public bool DefaultCombinerDisable = false;
|
||||
public bool EnableHacks = true;
|
||||
public bool WinFrameMode = false;
|
||||
public bool FullTMEMEmulation = false;
|
||||
public bool OpenGLVertexClipper = false;
|
||||
public bool EnableSSE = true;
|
||||
public bool EnableVertexShader = false;
|
||||
public bool SkipFrame = false;
|
||||
public bool TexRectOnly = false;
|
||||
public bool SmallTextureOnly = false;
|
||||
public bool LoadHiResCRCOnly = true;
|
||||
public bool LoadHiResTextures = false;
|
||||
public bool DumpTexturesToFiles = false;
|
||||
|
||||
public bool UseDefaultHacks = true;
|
||||
public bool DisableTextureCRC = false;
|
||||
public bool DisableCulling = false;
|
||||
public bool IncTexRectEdge = false;
|
||||
public bool ZHack = false;
|
||||
public bool TextureScaleHack = false;
|
||||
public bool PrimaryDepthHack = false;
|
||||
public bool Texture1Hack = false;
|
||||
public bool FastLoadTile = false;
|
||||
public bool UseSmallerTexture = false;
|
||||
public int VIWidth = -1;
|
||||
public int VIHeight = -1;
|
||||
public int UseCIWidthAndRatio = 0;
|
||||
public int FullTMEM = 0;
|
||||
public bool TxtSizeMethod2 = false;
|
||||
public bool EnableTxtLOD = false;
|
||||
public int FastTextureCRC = 0;
|
||||
public bool EmulateClear = false;
|
||||
public bool ForceScreenClear = false;
|
||||
public int AccurateTextureMappingHack = 0;
|
||||
public int NormalBlender = 0;
|
||||
public bool DisableBlender = false;
|
||||
public bool ForceDepthBuffer = false;
|
||||
public bool DisableObjBG = false;
|
||||
public int FrameBufferOption = 0;
|
||||
public int RenderToTextureOption = 0;
|
||||
public int ScreenUpdateSettingHack = 0;
|
||||
public int EnableHacksForGame = 0;
|
||||
|
||||
public N64RicePluginSettings Clone()
|
||||
{
|
||||
return (N64RicePluginSettings)MemberwiseClone();
|
||||
}
|
||||
}
|
||||
|
||||
public class N64GlidePluginSettings : IPluginSettings
|
||||
{
|
||||
[JsonIgnore]
|
||||
public PLUGINTYPE PluginType
|
||||
{
|
||||
get { return PLUGINTYPE.GLIDE; }
|
||||
}
|
||||
|
||||
public void FillPerGameHacks(GameInfo game)
|
||||
{
|
||||
if (UseDefaultHacks)
|
||||
{
|
||||
alt_tex_size = game.GetBool("Glide_alt_tex_size", false);
|
||||
buff_clear = game.GetBool("Glide_buff_clear", true);
|
||||
decrease_fillrect_edge = game.GetBool("Glide_decrease_fillrect_edge", false);
|
||||
detect_cpu_write = game.GetBool("Glide_detect_cpu_write", false);
|
||||
fb_clear = game.GetBool("Glide_fb_clear", false);
|
||||
fb_hires = game.GetBool("Glide_fb_clear", true);
|
||||
fb_read_alpha = game.GetBool("Glide_fb_read_alpha", false);
|
||||
fb_smart = game.GetBool("Glide_fb_smart", false);
|
||||
fillcolor_fix = game.GetBool("Glide_fillcolor_fix", false);
|
||||
fog = game.GetBool("Glide_fog", true);
|
||||
force_depth_compare = game.GetBool("Glide_force_depth_compare", false);
|
||||
force_microcheck = game.GetBool("Glide_force_microcheck", false);
|
||||
fb_hires_buf_clear = game.GetBool("Glide_fb_hires_buf_clear", true);
|
||||
fb_ignore_aux_copy = game.GetBool("Glide_fb_ignore_aux_copy", false);
|
||||
fb_ignore_previous = game.GetBool("Glide_fb_ignore_previous", false);
|
||||
increase_primdepth = game.GetBool("Glide_increase_primdepth", false);
|
||||
increase_texrect_edge = game.GetBool("Glide_increase_texrect_edge", false);
|
||||
fb_optimize_texrect = game.GetBool("Glide_fb_optimize_texrect", true);
|
||||
fb_optimize_write = game.GetBool("Glide_fb_optimize_write", false);
|
||||
PPL = game.GetBool("Glide_PPL", false);
|
||||
soft_depth_compare = game.GetBool("Glide_soft_depth_compare", false);
|
||||
use_sts1_only = game.GetBool("Glide_use_sts1_only", false);
|
||||
wrap_big_tex = game.GetBool("Glide_wrap_big_tex", false);
|
||||
|
||||
depth_bias = game.GetInt("Glide_depth_bias", 20);
|
||||
filtering = game.GetInt("Glide_filtering", 1);
|
||||
fix_tex_coord = game.GetInt("Glide_fix_tex_coord", 0);
|
||||
lodmode = game.GetInt("Glide_lodmode", 0);
|
||||
|
||||
stipple_mode = game.GetInt("Glide_stipple_mode", 2);
|
||||
stipple_pattern = game.GetInt("Glide_stipple_pattern", 1041204192);
|
||||
swapmode = game.GetInt("Glide_swapmode", 1);
|
||||
enable_hacks_for_game = game.GetInt("Glide_enable_hacks_for_game", 0);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, object> GetPluginSettings()
|
||||
{
|
||||
//TODO: deal witn the game depedent settings
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
System.Reflection.FieldInfo[] members = this.GetType().GetFields();
|
||||
foreach (System.Reflection.FieldInfo member in members)
|
||||
{
|
||||
object field = this.GetType().GetField(member.Name).GetValue(this);
|
||||
dictionary.Add(member.Name, field);
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public int wfmode = 1;
|
||||
public bool wireframe = false;
|
||||
public int card_id = 0;
|
||||
public bool flame_corona = false;
|
||||
public int ucode = 2;
|
||||
public bool autodetect_ucode = true;
|
||||
public bool motionblur = false;
|
||||
public bool fb_read_always = false;
|
||||
public bool unk_as_red = false;
|
||||
public bool filter_cache = false;
|
||||
public bool fast_crc = false;
|
||||
public bool disable_auxbuf = false;
|
||||
public bool fbo = false;
|
||||
public bool noglsl = true;
|
||||
public bool noditheredalpha = true;
|
||||
public int tex_filter = 0;
|
||||
public bool fb_render = false;
|
||||
public bool wrap_big_tex = false;
|
||||
public bool use_sts1_only = false;
|
||||
public bool soft_depth_compare = false;
|
||||
public bool PPL = false;
|
||||
public bool fb_optimize_write = false;
|
||||
public bool fb_optimize_texrect = true;
|
||||
public bool increase_texrect_edge = false;
|
||||
public bool increase_primdepth = false;
|
||||
public bool fb_ignore_previous = false;
|
||||
public bool fb_ignore_aux_copy = false;
|
||||
public bool fb_hires_buf_clear = true;
|
||||
public bool force_microcheck = false;
|
||||
public bool force_depth_compare = false;
|
||||
public bool fog = true;
|
||||
public bool fillcolor_fix = false;
|
||||
public bool fb_smart = false;
|
||||
public bool fb_read_alpha = false;
|
||||
public bool fb_get_info = false;
|
||||
public bool fb_hires = true;
|
||||
public bool fb_clear = false;
|
||||
public bool detect_cpu_write = false;
|
||||
public bool decrease_fillrect_edge = false;
|
||||
public bool buff_clear = true;
|
||||
public bool alt_tex_size = false;
|
||||
public bool UseDefaultHacks = true;
|
||||
public int enable_hacks_for_game = 0;
|
||||
public int swapmode = 1;
|
||||
public int stipple_pattern = 1041204192;
|
||||
public int stipple_mode = 2;
|
||||
public int scale_y = 100000;
|
||||
public int scale_x = 100000;
|
||||
public int offset_y = 0;
|
||||
public int offset_x = 0;
|
||||
public int lodmode = 0;
|
||||
public int fix_tex_coord = 0;
|
||||
public int filtering = 1;
|
||||
public int depth_bias = 20;
|
||||
|
||||
public N64GlidePluginSettings Clone()
|
||||
{
|
||||
return (N64GlidePluginSettings)MemberwiseClone();
|
||||
}
|
||||
}
|
||||
|
||||
public class N64Glide64mk2PluginSettings : IPluginSettings
|
||||
{
|
||||
[JsonIgnore]
|
||||
public PLUGINTYPE PluginType
|
||||
{
|
||||
get { return PLUGINTYPE.GLIDE64MK2; }
|
||||
}
|
||||
|
||||
public void FillPerGameHacks(GameInfo game)
|
||||
{
|
||||
if (UseDefaultHacks)
|
||||
{
|
||||
use_sts1_only = game.GetBool("Glide64mk2_use_sts1_only", false);
|
||||
optimize_texrect = game.GetBool("Glide64mk2_optimize_texrect", true);
|
||||
increase_texrect_edge = game.GetBool("Glide64mk2_increase_texrect_edge", false);
|
||||
ignore_aux_copy = game.GetBool("Glide64mk2_ignore_aux_copy", false);
|
||||
hires_buf_clear = game.GetBool("Glide64mk2_hires_buf_clear", true);
|
||||
force_microcheck = game.GetBool("Glide64mk2_force_microcheck", false);
|
||||
fog = game.GetBool("Glide64mk2_fog", true);
|
||||
fb_smart = game.GetBool("Glide64mk2_fb_smart", false);
|
||||
fb_read_alpha = game.GetBool("Glide64mk2_fb_read_alpha", false);
|
||||
fb_hires = game.GetBool("Glide64mk2_fb_hires", true);
|
||||
detect_cpu_write = game.GetBool("Glide64mk2_detect_cpu_write", false);
|
||||
decrease_fillrect_edge = game.GetBool("Glide64mk2_decrease_fillrect_edge", false);
|
||||
buff_clear = game.GetBool("Glide64mk2_buff_clear", true);
|
||||
alt_tex_size = game.GetBool("Glide64mk2_alt_tex_size", true);
|
||||
swapmode = game.GetInt("Glide64mk2_swapmode", 1);
|
||||
stipple_pattern = game.GetInt("Glide64mk2_stipple_pattern", 1041204192);
|
||||
stipple_mode = game.GetInt("Glide64mk2_stipple_mode", 2);
|
||||
lodmode = game.GetInt("Glide64mk2_lodmode", 0);
|
||||
filtering = game.GetInt("Glide64mk2_filtering", 0);
|
||||
correct_viewport = game.GetBool("Glide64mk2_correct_viewport", false);
|
||||
force_calc_sphere = game.GetBool("Glide64mk2_force_calc_sphere", false);
|
||||
pal230 = game.GetBool("Glide64mk2_pal230", false);
|
||||
texture_correction = game.GetBool("Glide64mk2_texture_correction", true);
|
||||
n64_z_scale = game.GetBool("Glide64mk2_n64_z_scale", false);
|
||||
old_style_adither = game.GetBool("Glide64mk2_old_style_adither", false);
|
||||
zmode_compare_less = game.GetBool("Glide64mk2_zmode_compare_less", false);
|
||||
adjust_aspect = game.GetBool("Glide64mk2_adjust_aspect", true);
|
||||
clip_zmax = game.GetBool("Glide64mk2_clip_zmax", true);
|
||||
clip_zmin = game.GetBool("Glide64mk2_clip_zmin", false);
|
||||
force_quad3d = game.GetBool("Glide64mk2_force_quad3d", false);
|
||||
useless_is_useless = game.GetBool("Glide64mk2_useless_is_useless", false);
|
||||
fb_read_always = game.GetBool("Glide64mk2_fb_read_always", false);
|
||||
aspectmode = game.GetInt("Glide64mk2_aspectmode", 0);
|
||||
fb_crc_mode = game.GetInt("Glide64mk2_fb_crc_mode", 1);
|
||||
enable_hacks_for_game = game.GetInt("Glide64mk2_enable_hacks_for_game", 0);
|
||||
read_back_to_screen = game.GetInt("Glide64mk2_read_back_to_screen", 0);
|
||||
fast_crc = game.GetBool("Glide64mk2_fast_crc", true);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, object> GetPluginSettings()
|
||||
{
|
||||
//TODO: deal witn the game depedent settings
|
||||
Dictionary<string, object> dictionary = new Dictionary<string, object>();
|
||||
System.Reflection.FieldInfo[] members = this.GetType().GetFields();
|
||||
foreach (System.Reflection.FieldInfo member in members)
|
||||
{
|
||||
object field = this.GetType().GetField(member.Name).GetValue(this);
|
||||
dictionary.Add(member.Name, field);
|
||||
}
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
public bool wrpFBO = true;
|
||||
public int card_id = 0;
|
||||
public bool use_sts1_only = false;
|
||||
public bool optimize_texrect = true;
|
||||
public bool increase_texrect_edge = false;
|
||||
public bool ignore_aux_copy = false;
|
||||
public bool hires_buf_clear = true;
|
||||
public bool force_microcheck = false;
|
||||
public bool fog = true;
|
||||
public bool fb_smart = false;
|
||||
public bool fb_read_alpha = false;
|
||||
public bool fb_hires = true;
|
||||
public bool detect_cpu_write = false;
|
||||
public bool decrease_fillrect_edge = false;
|
||||
public bool buff_clear = true;
|
||||
public bool alt_tex_size = false;
|
||||
public int swapmode = 1;
|
||||
public int stipple_pattern = 1041204192;
|
||||
public int stipple_mode = 2;
|
||||
public int lodmode = 0;
|
||||
public int filtering = 0;
|
||||
public bool wrpAnisotropic = false;
|
||||
public bool correct_viewport = false;
|
||||
public bool force_calc_sphere = false;
|
||||
public bool pal230 = false;
|
||||
public bool texture_correction = true;
|
||||
public bool n64_z_scale = false;
|
||||
public bool old_style_adither = false;
|
||||
public bool zmode_compare_less = false;
|
||||
public bool adjust_aspect = true;
|
||||
public bool clip_zmax = true;
|
||||
public bool clip_zmin = false;
|
||||
public bool force_quad3d = false;
|
||||
public bool useless_is_useless = false;
|
||||
public bool fb_read_always = false;
|
||||
public bool fb_get_info = false;
|
||||
public bool fb_render = true;
|
||||
public int aspectmode = 0;
|
||||
public int fb_crc_mode = 1;
|
||||
public bool fast_crc = true;
|
||||
public bool UseDefaultHacks = true;
|
||||
public int enable_hacks_for_game = 0;
|
||||
public int read_back_to_screen = 0;
|
||||
|
||||
public N64Glide64mk2PluginSettings Clone()
|
||||
{
|
||||
return (N64Glide64mk2PluginSettings)MemberwiseClone();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -6,6 +6,7 @@ using System.Text;
|
|||
using System.Threading;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
using BizHawk.Emulation.Cores.Consoles.Nintendo.N64;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||
{
|
||||
|
@ -447,21 +448,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
this.bizhawkCore = bizhawkCore;
|
||||
|
||||
string VidDllName;
|
||||
if (video_settings.PluginName == "Rice")
|
||||
if (video_settings.Plugin == PLUGINTYPE.RICE)
|
||||
{
|
||||
VidDllName = "mupen64plus-video-rice.dll";
|
||||
}
|
||||
else if (video_settings.PluginName == "Glide64")
|
||||
else if (video_settings.Plugin == PLUGINTYPE.GLIDE)
|
||||
{
|
||||
VidDllName = "mupen64plus-video-glide64.dll";
|
||||
}
|
||||
else if (video_settings.PluginName == "Glide64mk2")
|
||||
else if (video_settings.Plugin == PLUGINTYPE.GLIDE64MK2)
|
||||
{
|
||||
VidDllName = "mupen64plus-video-glide64mk2.dll";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException(string.Format("Unknown plugin \"" + video_settings.PluginName));
|
||||
throw new InvalidOperationException(string.Format("Unknown plugin {0}", video_settings.Plugin));
|
||||
}
|
||||
|
||||
// Load each of the DLLs
|
||||
|
@ -623,15 +624,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
public void set_video_parameters(VideoPluginSettings video_settings)
|
||||
{
|
||||
IntPtr video_plugin_section = IntPtr.Zero;
|
||||
if (video_settings.PluginName == "Rice")
|
||||
if (video_settings.Plugin == PLUGINTYPE.RICE)
|
||||
{
|
||||
m64pConfigOpenSection("Video-Rice", ref video_plugin_section);
|
||||
}
|
||||
else if (video_settings.PluginName == "Glide64")
|
||||
else if (video_settings.Plugin == PLUGINTYPE.GLIDE)
|
||||
{
|
||||
m64pConfigOpenSection("Video-Glide64", ref video_plugin_section);
|
||||
}
|
||||
else if (video_settings.PluginName == "Glide64mk2")
|
||||
else if (video_settings.Plugin == PLUGINTYPE.GLIDE64MK2)
|
||||
{
|
||||
m64pConfigOpenSection("Video-Glide64mk2", ref video_plugin_section);
|
||||
}
|
||||
|
@ -881,7 +882,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
|
||||
public class VideoPluginSettings
|
||||
{
|
||||
public string PluginName;
|
||||
public PLUGINTYPE Plugin;
|
||||
//public Dictionary<string, int> IntParameters = new Dictionary<string,int>();
|
||||
//public Dictionary<string, string> StringParameters = new Dictionary<string,string>();
|
||||
|
||||
|
@ -889,9 +890,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
public int Height;
|
||||
public int Width;
|
||||
|
||||
public VideoPluginSettings (string Name, int Width, int Height)
|
||||
public VideoPluginSettings (PLUGINTYPE Plugin, int Width, int Height)
|
||||
{
|
||||
this.PluginName = Name;
|
||||
this.Plugin = Plugin;
|
||||
this.Width = Width;
|
||||
this.Height = Height;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue