N64hawk - Expansion slot toggle, expansion being off by default, note: this is a sync setting
This commit is contained in:
parent
53ccb63e18
commit
88daf797db
|
@ -372,6 +372,7 @@
|
||||||
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.ClearSRAMContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
|
this.ShowMenuContextMenuSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.ShowMenuContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.N64ExpansionSlotMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.MainformMenu.SuspendLayout();
|
this.MainformMenu.SuspendLayout();
|
||||||
this.MainStatusBar.SuspendLayout();
|
this.MainStatusBar.SuspendLayout();
|
||||||
this.MainFormContextMenu.SuspendLayout();
|
this.MainFormContextMenu.SuspendLayout();
|
||||||
|
@ -2506,7 +2507,8 @@
|
||||||
this.N64ControllerSettingsMenuItem,
|
this.N64ControllerSettingsMenuItem,
|
||||||
this.toolStripSeparator23,
|
this.toolStripSeparator23,
|
||||||
this.N64CircularAnalogRangeMenuItem,
|
this.N64CircularAnalogRangeMenuItem,
|
||||||
this.MupenStyleLagMenuItem});
|
this.MupenStyleLagMenuItem,
|
||||||
|
this.N64ExpansionSlotMenuItem});
|
||||||
this.N64SubMenu.Name = "N64SubMenu";
|
this.N64SubMenu.Name = "N64SubMenu";
|
||||||
this.N64SubMenu.Size = new System.Drawing.Size(40, 19);
|
this.N64SubMenu.Size = new System.Drawing.Size(40, 19);
|
||||||
this.N64SubMenu.Text = "N64";
|
this.N64SubMenu.Text = "N64";
|
||||||
|
@ -3270,6 +3272,13 @@
|
||||||
this.ShowMenuContextMenuItem.Text = "Show Menu";
|
this.ShowMenuContextMenuItem.Text = "Show Menu";
|
||||||
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
|
this.ShowMenuContextMenuItem.Click += new System.EventHandler(this.ShowMenuContextMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// N64ExpansionSlotMenuItem
|
||||||
|
//
|
||||||
|
this.N64ExpansionSlotMenuItem.Name = "N64ExpansionSlotMenuItem";
|
||||||
|
this.N64ExpansionSlotMenuItem.Size = new System.Drawing.Size(192, 22);
|
||||||
|
this.N64ExpansionSlotMenuItem.Text = "&Use Expansion Slot";
|
||||||
|
this.N64ExpansionSlotMenuItem.Click += new System.EventHandler(this.N64ExpansionSlotMenuItem_Click);
|
||||||
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
|
||||||
|
@ -3653,6 +3662,7 @@
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator33;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator33;
|
||||||
private System.Windows.Forms.ToolStripMenuItem GBAcoresettingsToolStripMenuItem1;
|
private System.Windows.Forms.ToolStripMenuItem GBAcoresettingsToolStripMenuItem1;
|
||||||
private System.Windows.Forms.ToolStripStatusLabel LinkConnectStatusBarButton;
|
private System.Windows.Forms.ToolStripStatusLabel LinkConnectStatusBarButton;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem N64ExpansionSlotMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1789,12 +1789,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
N64PluginSettingsMenuItem.Enabled =
|
N64PluginSettingsMenuItem.Enabled =
|
||||||
N64ControllerSettingsMenuItem.Enabled =
|
N64ControllerSettingsMenuItem.Enabled =
|
||||||
|
N64ExpansionSlotMenuItem.Enabled =
|
||||||
!Global.MovieSession.Movie.IsActive;
|
!Global.MovieSession.Movie.IsActive;
|
||||||
|
|
||||||
N64CircularAnalogRangeMenuItem.Checked = Global.Config.N64UseCircularAnalogConstraint;
|
N64CircularAnalogRangeMenuItem.Checked = Global.Config.N64UseCircularAnalogConstraint;
|
||||||
|
|
||||||
var s = (N64Settings)Global.Emulator.GetSettings();
|
var s = (N64Settings)Global.Emulator.GetSettings();
|
||||||
MupenStyleLagMenuItem.Checked = s.UseMupenStyleLag;
|
MupenStyleLagMenuItem.Checked = s.UseMupenStyleLag;
|
||||||
|
|
||||||
|
var ss = (N64SyncSettings)Global.Emulator.GetSyncSettings();
|
||||||
|
N64ExpansionSlotMenuItem.Checked = ss.DisableExpansionSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void N64PluginSettingsMenuItem_Click(object sender, EventArgs e)
|
private void N64PluginSettingsMenuItem_Click(object sender, EventArgs e)
|
||||||
|
@ -1841,6 +1845,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Global.Emulator.PutSettings(s);
|
Global.Emulator.PutSettings(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void N64ExpansionSlotMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var ss = (N64SyncSettings)Global.Emulator.GetSyncSettings();
|
||||||
|
ss.DisableExpansionSlot ^= true;
|
||||||
|
Global.Emulator.PutSyncSettings(ss);
|
||||||
|
FlagNeedsReboot();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Saturn
|
#region Saturn
|
||||||
|
|
|
@ -121,28 +121,6 @@
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="DisplayConfigMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
|
||||||
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NC
|
|
||||||
NwAAAaRJREFUOE+dk0FLAlEUhd9/kgwFMUQMhMEIhJLIhVCRDIRhAznEIEYtlBiQYApBSGQw2xhBlhLE
|
|
||||||
zCLQTa3bt2nd8tR5pFTaLLxwuJd7vgNv3syIv+Xz+fA9TpSX96s0TZsAp+0862fAM3xpN5DNZpHL5VAo
|
|
||||||
FFAqlVCpVFCtVsEgxZk7emTIMsOsyGQyGAwGM4lZkU6n4bouVg4aCO1cQDGusXbyiA1rIMWZO3pkyEYi
|
|
||||||
EdmZFalUCr1eD3Nb5/jiPUWGrOM4sjMrkskkOp0O5rdrOLp7h+l8TBU9MmR5AnZmRSKRQLPZRFCtQ62/
|
|
||||||
YPNsCK31iuLNmxRn7uiRIdvtdmVnVsTjcViWJZ9x3XQQ1VpTRY8MWZ6AnVkRjUZRLpexsNtE5vQJq+WH
|
|
||||||
qaJHhmy73ZadWREOh2EYBiJ5e3zz/4kM2ZGYFcFgEPl8Hkt7NSzuX8lXtnx4i+TxvRRn7uiRITsSs8Lv
|
|
||||||
90NVVei6DtM0Yds2+v3++GPhzB09MmRHYlYUDV0OgUAAoVBIXlAsFpMXpCiKFGfu6JEhywyz8n94HrqY
|
|
||||||
RUII8QnYkDBq2GMFXwAAAABJRU5ErkJggg==
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="FirmwaresMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
|
||||||
YQUAAAAJcEhZcwAAEEoAABBKATXIp58AAABwSURBVDhPzZDhCgAhCIN99HvzTgNj6k6i/lzwaW3DKJFH
|
|
||||||
xhVMtMU6xYraIDR4BqlCQ87OfBEacnbmtfzsCYr/eu4UK+EJH2hyUjw82CAkeDsDjrDit/nNjofyOUDF
|
|
||||||
BA4ow9YGzBIimaWheQQVt5HxAoOkokovUz91AAAAAElFTkSuQmCC
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="N64PluginSettingsMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="N64PluginSettingsMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
@ -537,6 +515,28 @@
|
||||||
tm3H9wcOHPx9Vlb2B0VFRdfKysqOFxQUHE1LS9sBuEGo57ZxcXHj8Bp6BAUF/Ve8nL/XXtXr8Tc5EJn/
|
tm3H9wcOHPx9Vlb2B0VFRdfKysqOFxQUHE1LS9sBuEGo57ZxcXHj8Bp6BAUF/Ve8nL/XXtXr8Tc5EJn/
|
||||||
GeXlp01NTb1OnTo3vKnpvEVDw8n5ubkVgXH7EkK2bNm6bfXqtduWLl25ZfnytQGbN2+23rdv30jtR7PS
|
GeXlp01NTb1OnTo3vKnpvEVDw8n5ubkVgXH7EkK2bNm6bfXqtduWLl25ZfnytQGbN2+23rdv30jtR7PS
|
||||||
X0fw6/F6vB6vx+vxerwer8fr8Xq8Hq/H6/HvY/zd3/1PwYVaiXD0CjUAAAAASUVORK5CYII=
|
X0fw6/F6vB6vx+vxerwer8fr8Xq8Hq/H6/HvY/zd3/1PwYVaiXD0CjUAAAAASUVORK5CYII=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="DisplayConfigMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjExR/NC
|
||||||
|
NwAAAaRJREFUOE+dk0FLAlEUhd9/kgwFMUQMhMEIhJLIhVCRDIRhAznEIEYtlBiQYApBSGQw2xhBlhLE
|
||||||
|
zCLQTa3bt2nd8tR5pFTaLLxwuJd7vgNv3syIv+Xz+fA9TpSX96s0TZsAp+0862fAM3xpN5DNZpHL5VAo
|
||||||
|
FFAqlVCpVFCtVsEgxZk7emTIMsOsyGQyGAwGM4lZkU6n4bouVg4aCO1cQDGusXbyiA1rIMWZO3pkyEYi
|
||||||
|
EdmZFalUCr1eD3Nb5/jiPUWGrOM4sjMrkskkOp0O5rdrOLp7h+l8TBU9MmR5AnZmRSKRQLPZRFCtQ62/
|
||||||
|
YPNsCK31iuLNmxRn7uiRIdvtdmVnVsTjcViWJZ9x3XQQ1VpTRY8MWZ6AnVkRjUZRLpexsNtE5vQJq+WH
|
||||||
|
qaJHhmy73ZadWREOh2EYBiJ5e3zz/4kM2ZGYFcFgEPl8Hkt7NSzuX8lXtnx4i+TxvRRn7uiRITsSs8Lv
|
||||||
|
90NVVei6DtM0Yds2+v3++GPhzB09MmRHYlYUDV0OgUAAoVBIXlAsFpMXpCiKFGfu6JEhywyz8n94HrqY
|
||||||
|
RUII8QnYkDBq2GMFXwAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="FirmwaresMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAAEEoAABBKATXIp58AAABwSURBVDhPzZDhCgAhCIN99HvzTgNj6k6i/lzwaW3DKJFH
|
||||||
|
xhVMtMU6xYraIDR4BqlCQ87OfBEacnbmtfzsCYr/eu4UK+EJH2hyUjw82CAkeDsDjrDit/nNjofyOUDF
|
||||||
|
BA4ow9YGzBIimaWheQQVt5HxAoOkokovUz91AAAAAElFTkSuQmCC
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="MainStatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="MainStatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
|
|
@ -106,7 +106,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
//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...
|
//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...
|
||||||
RunThreadAction(() =>
|
RunThreadAction(() =>
|
||||||
{
|
{
|
||||||
api = new mupen64plusApi(this, rom, videosettings, SaveType, (int)coreType);
|
api = new mupen64plusApi(this, rom, videosettings, SaveType, (int)coreType, _syncSettings.DisableExpansionSlot);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Order is important because the register with the mupen core
|
// Order is important because the register with the mupen core
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
VideoPlugin = PluginType.Rice;
|
VideoPlugin = PluginType.Rice;
|
||||||
Core = CoreType.Dynarec;
|
Core = CoreType.Dynarec;
|
||||||
Rsp = RspType.Rsp_Hle;
|
Rsp = RspType.Rsp_Hle;
|
||||||
|
DisableExpansionSlot = true;
|
||||||
|
|
||||||
Controllers = new []
|
Controllers = new []
|
||||||
{
|
{
|
||||||
|
@ -33,6 +34,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
public RspType Rsp { get; set; }
|
public RspType Rsp { get; set; }
|
||||||
public PluginType VideoPlugin { get; set; }
|
public PluginType VideoPlugin { get; set; }
|
||||||
|
|
||||||
|
public bool DisableExpansionSlot { get; set; }
|
||||||
|
|
||||||
public N64ControllerSettings[] Controllers { get; private set; }
|
public N64ControllerSettings[] Controllers { get; private set; }
|
||||||
|
|
||||||
public N64RicePluginSettings RicePlugin { get; private set; }
|
public N64RicePluginSettings RicePlugin { get; private set; }
|
||||||
|
@ -47,6 +50,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
Core = Core,
|
Core = Core,
|
||||||
Rsp = Rsp,
|
Rsp = Rsp,
|
||||||
VideoPlugin = VideoPlugin,
|
VideoPlugin = VideoPlugin,
|
||||||
|
DisableExpansionSlot = DisableExpansionSlot,
|
||||||
RicePlugin = RicePlugin.Clone(),
|
RicePlugin = RicePlugin.Clone(),
|
||||||
GlidePlugin = GlidePlugin.Clone(),
|
GlidePlugin = GlidePlugin.Clone(),
|
||||||
Glide64mk2Plugin = Glide64mk2Plugin.Clone(),
|
Glide64mk2Plugin = Glide64mk2Plugin.Clone(),
|
||||||
|
|
|
@ -348,7 +348,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi
|
||||||
// DLL handles
|
// DLL handles
|
||||||
public IntPtr CoreDll { get; private set; }
|
public IntPtr CoreDll { get; private set; }
|
||||||
|
|
||||||
public mupen64plusApi(N64 bizhawkCore, byte[] rom, VideoPluginSettings video_settings, int SaveType, int CoreType)
|
public mupen64plusApi(N64 bizhawkCore, byte[] rom, VideoPluginSettings video_settings, int SaveType, int CoreType, bool DisableExpansionSlot)
|
||||||
{
|
{
|
||||||
// There can only be one core (otherwise breaks mupen64plus)
|
// There can only be one core (otherwise breaks mupen64plus)
|
||||||
if (AttachedCore != null)
|
if (AttachedCore != null)
|
||||||
|
@ -368,6 +368,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64.NativeApi
|
||||||
m64p_error result = m64pCoreStartup(0x20001, "", "", "Core",
|
m64p_error result = m64pCoreStartup(0x20001, "", "", "Core",
|
||||||
null, "", IntPtr.Zero);
|
null, "", IntPtr.Zero);
|
||||||
|
|
||||||
|
// Set the savetype if needed
|
||||||
|
if (DisableExpansionSlot)
|
||||||
|
{
|
||||||
|
IntPtr core_section = IntPtr.Zero;
|
||||||
|
int disable = 1;
|
||||||
|
m64pConfigOpenSection("Core", ref core_section);
|
||||||
|
m64pConfigSetParameter(core_section, "DisableExtraMem", m64p_type.M64TYPE_INT, ref disable);
|
||||||
|
}
|
||||||
|
|
||||||
// Set the savetype if needed
|
// Set the savetype if needed
|
||||||
if (SaveType != 0)
|
if (SaveType != 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue