N64 sync settings - clean up some stuff and fix the plugin type being a read-only proprty in the new config dialog
This commit is contained in:
parent
1342dae39d
commit
6819459292
|
@ -96,10 +96,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
s.VideoSizeY = Int32.Parse(strArr[1].Trim());
|
||||
switch (PluginComboBox.Text)
|
||||
{
|
||||
case "Rice": ss.VidPlugin = PluginType.RICE; break;
|
||||
case "Glide64": ss.VidPlugin = PluginType.GLIDE; break;
|
||||
case "Glide64mk2": ss.VidPlugin = PluginType.GLIDE64MK2; break;
|
||||
case "Jabo 1.6.1": ss.VidPlugin = PluginType.JABO; break;
|
||||
case "Rice": ss.VidPlugin = PluginType.Rice; break;
|
||||
case "Glide64": ss.VidPlugin = PluginType.Glide; break;
|
||||
case "Glide64mk2": ss.VidPlugin = PluginType.GlideMk2; break;
|
||||
case "Jabo 1.6.1": ss.VidPlugin = PluginType.Jabo; break;
|
||||
}
|
||||
|
||||
//Rice
|
||||
|
@ -321,13 +321,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
ss.Glide64mk2Plugin.fast_crc = Glide64mk2_fast_crc.Checked;
|
||||
|
||||
|
||||
ss.CoreType = CoreTypeDropdown.SelectedItem
|
||||
ss.Core = CoreTypeDropdown.SelectedItem
|
||||
.ToString()
|
||||
.GetEnumFromDescription<N64SyncSettings.CORETYPE>();
|
||||
.GetEnumFromDescription<N64SyncSettings.CoreType>();
|
||||
|
||||
ss.RspType = RspTypeDropdown.SelectedItem
|
||||
ss.Rsp = RspTypeDropdown.SelectedItem
|
||||
.ToString()
|
||||
.GetEnumFromDescription<N64SyncSettings.RSPTYPE>();
|
||||
.GetEnumFromDescription<N64SyncSettings.RspType>();
|
||||
|
||||
PutSettings(s);
|
||||
PutSyncSettings(ss);
|
||||
|
@ -338,8 +338,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
var s = GetSettings();
|
||||
var ss = GetSyncSettings();
|
||||
|
||||
CoreTypeDropdown.PopulateFromEnum<N64SyncSettings.CORETYPE>(ss.CoreType);
|
||||
RspTypeDropdown.PopulateFromEnum<N64SyncSettings.RSPTYPE>(ss.RspType);
|
||||
CoreTypeDropdown.PopulateFromEnum<N64SyncSettings.CoreType>(ss.Core);
|
||||
RspTypeDropdown.PopulateFromEnum<N64SyncSettings.RspType>(ss.Rsp);
|
||||
|
||||
//Load Variables
|
||||
//Global
|
||||
|
@ -354,10 +354,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
switch (ss.VidPlugin)
|
||||
{
|
||||
case PluginType.GLIDE64MK2: PluginComboBox.Text = "Glide64mk2"; break;
|
||||
case PluginType.GLIDE: PluginComboBox.Text = "Glide64"; break;
|
||||
case PluginType.RICE: PluginComboBox.Text = "Rice"; break;
|
||||
case PluginType.JABO: PluginComboBox.Text = "Jabo 1.6.1"; break;
|
||||
case PluginType.GlideMk2: PluginComboBox.Text = "Glide64mk2"; break;
|
||||
case PluginType.Glide: PluginComboBox.Text = "Glide64"; break;
|
||||
case PluginType.Rice: PluginComboBox.Text = "Rice"; break;
|
||||
case PluginType.Jabo: PluginComboBox.Text = "Jabo 1.6.1"; break;
|
||||
}
|
||||
|
||||
//Rice
|
||||
|
|
|
@ -35,13 +35,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
s.VideoSizeX = int.Parse(strArr[0].Trim());
|
||||
s.VideoSizeY = int.Parse(strArr[1].Trim());
|
||||
|
||||
ss.CoreType = CoreTypeDropdown.SelectedItem
|
||||
ss.Core = CoreTypeDropdown.SelectedItem
|
||||
.ToString()
|
||||
.GetEnumFromDescription<N64SyncSettings.CORETYPE>();
|
||||
.GetEnumFromDescription<N64SyncSettings.CoreType>();
|
||||
|
||||
ss.RspType = RspTypeDropdown.SelectedItem
|
||||
ss.Rsp = RspTypeDropdown.SelectedItem
|
||||
.ToString()
|
||||
.GetEnumFromDescription<N64SyncSettings.RSPTYPE>();
|
||||
.GetEnumFromDescription<N64SyncSettings.RspType>();
|
||||
|
||||
ss.VidPlugin = PluginComboBox.SelectedItem
|
||||
.ToString()
|
||||
|
@ -59,8 +59,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
s = GetSettings();
|
||||
ss = GetSyncSettings();
|
||||
|
||||
CoreTypeDropdown.PopulateFromEnum<N64SyncSettings.CORETYPE>(ss.CoreType);
|
||||
RspTypeDropdown.PopulateFromEnum<N64SyncSettings.RSPTYPE>(ss.RspType);
|
||||
CoreTypeDropdown.PopulateFromEnum<N64SyncSettings.CoreType>(ss.Core);
|
||||
RspTypeDropdown.PopulateFromEnum<N64SyncSettings.RspType>(ss.Rsp);
|
||||
PluginComboBox.PopulateFromEnum<PluginType>(ss.VidPlugin);
|
||||
|
||||
var video_setting = s.VideoSizeX
|
||||
|
|
|
@ -61,8 +61,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
// N64
|
||||
var n64Settings = GetSyncSettings<N64, N64SyncSettings>();
|
||||
n64Settings.RspType = N64SyncSettings.RSPTYPE.Rsp_Hle;
|
||||
n64Settings.CoreType = N64SyncSettings.CORETYPE.Dynarec;
|
||||
n64Settings.Rsp = N64SyncSettings.RspType.Rsp_Hle;
|
||||
n64Settings.Core = N64SyncSettings.CoreType.Dynarec;
|
||||
Global.Config.N64UseCircularAnalogConstraint = true;
|
||||
PutSyncSettings<N64>(n64Settings);
|
||||
|
||||
|
@ -115,8 +115,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
// N64
|
||||
var n64Settings = GetSyncSettings<N64, N64SyncSettings>();
|
||||
n64Settings.RspType = N64SyncSettings.RSPTYPE.Rsp_Z64_hlevideo;
|
||||
n64Settings.CoreType = N64SyncSettings.CORETYPE.Pure_Interpret;
|
||||
n64Settings.Rsp = N64SyncSettings.RspType.Rsp_Z64_hlevideo;
|
||||
n64Settings.Core = N64SyncSettings.CoreType.Pure_Interpret;
|
||||
Global.Config.N64UseCircularAnalogConstraint = true;
|
||||
PutSyncSettings<N64>(n64Settings);
|
||||
|
||||
|
@ -172,8 +172,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
// N64
|
||||
var n64Settings = GetSyncSettings<N64, N64SyncSettings>();
|
||||
n64Settings.RspType = N64SyncSettings.RSPTYPE.Rsp_Z64_hlevideo;
|
||||
n64Settings.CoreType = N64SyncSettings.CORETYPE.Pure_Interpret;
|
||||
n64Settings.Rsp = N64SyncSettings.RspType.Rsp_Z64_hlevideo;
|
||||
n64Settings.Core = N64SyncSettings.CoreType.Pure_Interpret;
|
||||
Global.Config.N64UseCircularAnalogConstraint = false;
|
||||
PutSyncSettings<N64>(n64Settings);
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
StartThreadLoop();
|
||||
|
||||
var videosettings = _syncSettings.GetVPS(game, _settings.VideoSizeX, _settings.VideoSizeY);
|
||||
var coreType = _syncSettings.CoreType;
|
||||
var coreType = _syncSettings.Core;
|
||||
|
||||
//zero 19-apr-2014 - added this to solve problem with SDL initialization corrupting the main thread (I think) and breaking subsequent emulators (for example, NES)
|
||||
//not sure why this works... if we put the plugin initializations in here, we get deadlocks in some SDL initialization. doesnt make sense to me...
|
||||
|
@ -114,7 +114,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
_inputProvider = new N64Input(api, comm, this._syncSettings.Controllers);
|
||||
|
||||
|
||||
string rsp = _syncSettings.RspType == N64SyncSettings.RSPTYPE.Rsp_Hle ?
|
||||
string rsp = _syncSettings.Rsp == N64SyncSettings.RspType.Rsp_Hle ?
|
||||
"mupen64plus-rsp-hle.dll" :
|
||||
"mupen64plus-rsp-z64-hlevideo.dll";
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using Newtonsoft.Json;
|
||||
using System.Reflection;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
using System.Reflection;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||
{
|
||||
|
@ -69,13 +68,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
depth_bias = 20;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
[Description("Plugin Type")]
|
||||
public PluginType PluginType
|
||||
{
|
||||
get { return PluginType.GLIDE; }
|
||||
}
|
||||
|
||||
[DefaultValue(1)]
|
||||
[DisplayName("Wire Frame Mode")]
|
||||
[Description("0=Normal colors, 1=Vertex colors, 2=Red only")]
|
||||
|
@ -342,6 +334,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
}
|
||||
}
|
||||
|
||||
public PluginType GetPluginType()
|
||||
{
|
||||
return PluginType.Glide;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> GetPluginSettings()
|
||||
{
|
||||
//TODO: deal witn the game depedent settings
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
using System.Reflection;
|
||||
|
@ -58,13 +57,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
read_back_to_screen = 0;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
[DisplayName("Plugin Type")]
|
||||
public PluginType PluginType
|
||||
{
|
||||
get { return PluginType.GLIDE64MK2; }
|
||||
}
|
||||
|
||||
[DefaultValue(true)]
|
||||
[DisplayName("Wrapper FBO")]
|
||||
public bool wrpFBO { get; set; }
|
||||
|
@ -286,6 +278,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
}
|
||||
}
|
||||
|
||||
public PluginType GetPluginType()
|
||||
{
|
||||
return PluginType.GlideMk2;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> GetPluginSettings()
|
||||
{
|
||||
//TODO: deal witn the game depedent settings
|
||||
|
|
|
@ -29,10 +29,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
clear_mode = DIRECT3D_CLEAR_MODE.def;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public PluginType PluginType
|
||||
public PluginType GetPluginType()
|
||||
{
|
||||
get { return PluginType.JABO; }
|
||||
return PluginType.Jabo;
|
||||
}
|
||||
|
||||
public void FillPerGameHacks(GameInfo game)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using BizHawk.Emulation.Common;
|
||||
using System.Reflection;
|
||||
|
@ -79,13 +78,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
EnableHacksForGame = 0;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
[Description("Plugin Type")]
|
||||
public PluginType PluginType
|
||||
{
|
||||
get { return PluginType.RICE; }
|
||||
}
|
||||
|
||||
[DefaultValue(0)]
|
||||
[DisplayName("Frame Buffer Emulation")]
|
||||
[Description("0=ROM default, 1=disable")]
|
||||
|
@ -403,6 +395,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
}
|
||||
}
|
||||
|
||||
public PluginType GetPluginType()
|
||||
{
|
||||
return PluginType.Rice;
|
||||
}
|
||||
|
||||
public Dictionary<string, object> GetPluginSettings()
|
||||
{
|
||||
//TODO: deal witn the game depedent settings
|
||||
|
|
|
@ -8,9 +8,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
{
|
||||
public partial class N64SyncSettings
|
||||
{
|
||||
public CORETYPE CoreType = CORETYPE.Dynarec;
|
||||
public CoreType Core = CoreType.Dynarec;
|
||||
|
||||
public enum CORETYPE
|
||||
public enum CoreType
|
||||
{
|
||||
[Description("Pure Interpreter")]
|
||||
Pure_Interpret = 0,
|
||||
|
@ -22,9 +22,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
Dynarec = 2,
|
||||
}
|
||||
|
||||
public RSPTYPE RspType = RSPTYPE.Rsp_Hle;
|
||||
|
||||
public enum RSPTYPE
|
||||
public enum RspType
|
||||
{
|
||||
[Description("Hle")]
|
||||
Rsp_Hle = 0,
|
||||
|
@ -33,7 +31,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
Rsp_Z64_hlevideo = 1
|
||||
}
|
||||
|
||||
public PluginType VidPlugin = PluginType.RICE;
|
||||
public PluginType VidPlugin = PluginType.Rice;
|
||||
public RspType Rsp = RspType.Rsp_Hle;
|
||||
|
||||
public N64ControllerSettings[] Controllers =
|
||||
{
|
||||
|
@ -52,8 +51,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
{
|
||||
return new N64SyncSettings
|
||||
{
|
||||
CoreType = CoreType,
|
||||
RspType = RspType,
|
||||
Core = Core,
|
||||
Rsp = Rsp,
|
||||
VidPlugin = VidPlugin,
|
||||
RicePlugin = RicePlugin.Clone(),
|
||||
GlidePlugin = GlidePlugin.Clone(),
|
||||
|
@ -71,10 +70,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
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;
|
||||
case PluginType.JABO: ips = JaboPlugin.Clone(); break;
|
||||
case PluginType.Glide: ips = GlidePlugin.Clone(); break;
|
||||
case PluginType.GlideMk2: ips = Glide64mk2Plugin.Clone(); break;
|
||||
case PluginType.Rice: ips = RicePlugin.Clone(); break;
|
||||
case PluginType.Jabo: ips = JaboPlugin.Clone(); break;
|
||||
}
|
||||
ips.FillPerGameHacks(game);
|
||||
ret.Parameters = ips.GetPluginSettings();
|
||||
|
@ -85,21 +84,21 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
|||
public enum PluginType
|
||||
{
|
||||
[Description("Rice")]
|
||||
RICE,
|
||||
Rice,
|
||||
|
||||
[Description("Glide64")]
|
||||
GLIDE,
|
||||
Glide,
|
||||
|
||||
[Description("Glide64 mk2")]
|
||||
GLIDE64MK2,
|
||||
GlideMk2,
|
||||
|
||||
[Description("Jabo")]
|
||||
JABO
|
||||
Jabo
|
||||
}
|
||||
|
||||
public interface IPluginSettings
|
||||
{
|
||||
PluginType PluginType { get; }
|
||||
PluginType GetPluginType();
|
||||
Dictionary<string, object> GetPluginSettings();
|
||||
void FillPerGameHacks(GameInfo game);
|
||||
}
|
||||
|
|
|
@ -475,19 +475,19 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi
|
|||
public void set_video_parameters(VideoPluginSettings video_settings)
|
||||
{
|
||||
IntPtr video_plugin_section = IntPtr.Zero;
|
||||
if (video_settings.Plugin == PluginType.RICE)
|
||||
if (video_settings.Plugin == PluginType.Rice)
|
||||
{
|
||||
m64pConfigOpenSection("Video-Rice", ref video_plugin_section);
|
||||
}
|
||||
else if (video_settings.Plugin == PluginType.GLIDE)
|
||||
else if (video_settings.Plugin == PluginType.Glide)
|
||||
{
|
||||
m64pConfigOpenSection("Video-Glide64", ref video_plugin_section);
|
||||
}
|
||||
else if (video_settings.Plugin == PluginType.GLIDE64MK2)
|
||||
else if (video_settings.Plugin == PluginType.GlideMk2)
|
||||
{
|
||||
m64pConfigOpenSection("Video-Glide64mk2", ref video_plugin_section);
|
||||
}
|
||||
else if (video_settings.Plugin == PluginType.JABO)
|
||||
else if (video_settings.Plugin == PluginType.Jabo)
|
||||
{
|
||||
m64pConfigOpenSection("Video-Jabo", ref video_plugin_section);
|
||||
}
|
||||
|
|
|
@ -47,16 +47,16 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi
|
|||
switch (settings.Plugin)
|
||||
{
|
||||
default:
|
||||
case PluginType.RICE:
|
||||
case PluginType.Rice:
|
||||
videoplugin = "mupen64plus-video-rice.dll";
|
||||
break;
|
||||
case PluginType.GLIDE:
|
||||
case PluginType.Glide:
|
||||
videoplugin = "mupen64plus-video-glide64.dll";
|
||||
break;
|
||||
case PluginType.GLIDE64MK2:
|
||||
case PluginType.GlideMk2:
|
||||
videoplugin = "mupen64plus-video-glide64mk2.dll";
|
||||
break;
|
||||
case PluginType.JABO:
|
||||
case PluginType.Jabo:
|
||||
videoplugin = "mupen64plus-video-jabo.dll";
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue