Fix Nintento (breaking config change but we've already thoroughly broken compatibility since last release), partially addresses #971
This commit is contained in:
parent
c1ba930e64
commit
eb1d87933b
|
@ -75,7 +75,7 @@ namespace BizHawk.Client.Common
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ControlType == "Nintento 64 Controller")
|
if (ControlType == "Nintendo 64 Controller")
|
||||||
{
|
{
|
||||||
SetN64ControllersAsMnemonic(mnemonic);
|
SetN64ControllersAsMnemonic(mnemonic);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -125,7 +125,7 @@ namespace BizHawk.Client.Common
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Nintento 64 Controller", new Dictionary<string, string>
|
"Nintendo 64 Controller", new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{ "DPad U", "U" }, { "DPad D", "D" }, { "DPad L", "L" }, { "DPad R", "R" },
|
{ "DPad U", "U" }, { "DPad D", "D" }, { "DPad L", "L" }, { "DPad R", "R" },
|
||||||
{ "B", "B" }, { "A", "A" }, { "Z", "Z" }, { "Start", "S" }, { "L", "L" }, { "R", "R" },
|
{ "B", "B" }, { "A", "A" }, { "Z", "Z" }, { "Start", "S" }, { "L", "L" }, { "R", "R" },
|
||||||
|
@ -144,7 +144,7 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public static readonly Dictionary<string, Dictionary<string, string>> Analogs = new Dictionary<string, Dictionary<string, string>>
|
public static readonly Dictionary<string, Dictionary<string, string>> Analogs = new Dictionary<string, Dictionary<string, string>>
|
||||||
{
|
{
|
||||||
{ "Nintento 64 Controller", new Dictionary<string, string> { { "X Axis", "X" }, { "Y Axis", "Y" } } }
|
{ "Nintendo 64 Controller", new Dictionary<string, string> { { "X Axis", "X" }, { "Y Axis", "Y" } } }
|
||||||
};
|
};
|
||||||
|
|
||||||
public static readonly Dictionary<string, Dictionary<string, string>> Commands = new Dictionary<string, Dictionary<string, string>>
|
public static readonly Dictionary<string, Dictionary<string, string>> Commands = new Dictionary<string, Dictionary<string, string>>
|
||||||
|
@ -160,7 +160,7 @@ namespace BizHawk.Client.Common
|
||||||
{ "PC Engine Controller", new Dictionary<string, string>() },
|
{ "PC Engine Controller", new Dictionary<string, string>() },
|
||||||
{ "SMS Controller", new Dictionary<string, string> { { "Pause", "p" }, { "Reset", "r" } } },
|
{ "SMS Controller", new Dictionary<string, string> { { "Pause", "p" }, { "Reset", "r" } } },
|
||||||
{ "TI83 Controller", new Dictionary<string, string>() },
|
{ "TI83 Controller", new Dictionary<string, string>() },
|
||||||
{ "Nintento 64 Controller", new Dictionary<string, string> { { "Power", "P" }, { "Reset", "r" } } },
|
{ "Nintendo 64 Controller", new Dictionary<string, string> { { "Power", "P" }, { "Reset", "r" } } },
|
||||||
{ "Saturn Controller", new Dictionary<string, string> { { "Power", "P" }, { "Reset", "r" } } },
|
{ "Saturn Controller", new Dictionary<string, string> { { "Power", "P" }, { "Reset", "r" } } },
|
||||||
{ "GPGX 3-Button Controller", new Dictionary<string, string> { { "Power", "P" }, { "Reset", "r" } } }
|
{ "GPGX 3-Button Controller", new Dictionary<string, string> { { "Power", "P" }, { "Reset", "r" } } }
|
||||||
};
|
};
|
||||||
|
@ -169,7 +169,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
{ "Gameboy Controller", 1 }, { "GBA Controller", 1 }, { "Genesis 3-Button Controller", 2 }, { "GPGX Genesis Controller", 2 }, { "NES Controller", 4 },
|
{ "Gameboy Controller", 1 }, { "GBA Controller", 1 }, { "Genesis 3-Button Controller", 2 }, { "GPGX Genesis Controller", 2 }, { "NES Controller", 4 },
|
||||||
{ "SNES Controller", 4 }, { "PC Engine Controller", 5 }, { "SMS Controller", 2 }, { "TI83 Controller", 1 }, { "Atari 2600 Basic Controller", 2 }, { "Atari 7800 ProLine Joystick Controller", 2 },
|
{ "SNES Controller", 4 }, { "PC Engine Controller", 5 }, { "SMS Controller", 2 }, { "TI83 Controller", 1 }, { "Atari 2600 Basic Controller", 2 }, { "Atari 7800 ProLine Joystick Controller", 2 },
|
||||||
{ "ColecoVision Basic Controller", 2 }, { "Commodore 64 Controller", 2 }, { "Nintento 64 Controller", 4 }, { "Saturn Controller", 2 },
|
{ "ColecoVision Basic Controller", 2 }, { "Commodore 64 Controller", 2 }, { "Nintendo 64 Controller", 4 }, { "Saturn Controller", 2 },
|
||||||
{ "GPGX 3-Button Controller", 2 }, { "Lynx Controller", 1 }
|
{ "GPGX 3-Button Controller", 2 }, { "Lynx Controller", 1 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
ControllerImages.Add("NES Controller", Properties.Resources.NES_Controller);
|
ControllerImages.Add("NES Controller", Properties.Resources.NES_Controller);
|
||||||
ControllerImages.Add("SNES Controller", Properties.Resources.SNES_Controller);
|
ControllerImages.Add("SNES Controller", Properties.Resources.SNES_Controller);
|
||||||
ControllerImages.Add("Nintento 64 Controller", Properties.Resources.N64);
|
ControllerImages.Add("Nintendo 64 Controller", Properties.Resources.N64);
|
||||||
ControllerImages.Add("Gameboy Controller", Properties.Resources.GBController);
|
ControllerImages.Add("Gameboy Controller", Properties.Resources.GBController);
|
||||||
ControllerImages.Add("Gameboy Controller H", Properties.Resources.GBController);
|
ControllerImages.Add("Gameboy Controller H", Properties.Resources.GBController);
|
||||||
ControllerImages.Add("Gameboy Controller + Tilt", Properties.Resources.GBController);
|
ControllerImages.Add("Gameboy Controller + Tilt", Properties.Resources.GBController);
|
||||||
|
|
|
@ -5,31 +5,25 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
{
|
{
|
||||||
internal class N64Input
|
internal class N64Input
|
||||||
{
|
{
|
||||||
private mupen64plusInputApi api;
|
private readonly mupen64plusInputApi _api;
|
||||||
public CoreComm CoreComm { get; private set; }
|
public CoreComm CoreComm { get; }
|
||||||
public IController Controller { get; set; }
|
public IController Controller { get; set; }
|
||||||
|
|
||||||
public bool LastFrameInputPolled { get; set; }
|
public bool LastFrameInputPolled { get; set; }
|
||||||
public bool ThisFrameInputPolled { get; set; }
|
public bool ThisFrameInputPolled { get; set; }
|
||||||
public ControllerDefinition ControllerDefinition { get { return N64ControllerDefinition; } }
|
public ControllerDefinition ControllerDefinition => N64ControllerDefinition;
|
||||||
|
|
||||||
public static readonly ControllerDefinition N64ControllerDefinition = new ControllerDefinition
|
public static readonly ControllerDefinition N64ControllerDefinition = new ControllerDefinition
|
||||||
{
|
{
|
||||||
Name = "Nintento 64 Controller",
|
Name = "Nintendo 64 Controller",
|
||||||
BoolButtons =
|
BoolButtons =
|
||||||
{
|
{
|
||||||
"P1 A Up", "P1 A Down", "P1 A Left", "P1 A Right", "P1 DPad U", "P1 DPad D", "P1 DPad L", "P1 DPad R", "P1 Start", "P1 Z", "P1 B", "P1 A", "P1 C Up", "P1 C Down", "P1 C Right", "P1 C Left", "P1 L", "P1 R",
|
"P1 A Up", "P1 A Down", "P1 A Left", "P1 A Right", "P1 DPad U", "P1 DPad D", "P1 DPad L", "P1 DPad R", "P1 Start", "P1 Z", "P1 B", "P1 A", "P1 C Up", "P1 C Down", "P1 C Right", "P1 C Left", "P1 L", "P1 R",
|
||||||
//"P2 A Up", "P2 A Down", "P2 A Left", "P2 A Right", "P2 DPad U", "P2 DPad D", "P2 DPad L", "P2 DPad R", "P2 Start", "P2 Z", "P2 B", "P2 A", "P2 C Up", "P2 C Down", "P2 C Right", "P2 C Left", "P2 L", "P2 R",
|
|
||||||
//"P3 A Up", "P3 A Down", "P3 A Left", "P3 A Right", "P3 DPad U", "P3 DPad D", "P3 DPad L", "P3 DPad R", "P3 Start", "P3 Z", "P3 B", "P3 A", "P3 C Up", "P3 C Down", "P3 C Right", "P3 C Left", "P3 L", "P3 R",
|
|
||||||
//"P4 A Up", "P4 A Down", "P4 A Left", "P4 A Right", "P4 DPad U", "P4 DPad D", "P4 DPad L", "P4 DPad R", "P4 Start", "P4 Z", "P4 B", "P4 A", "P4 C Up", "P4 C Down", "P4 C Right", "P4 C Left", "P4 L", "P4 R",
|
|
||||||
"Reset", "Power"
|
"Reset", "Power"
|
||||||
},
|
},
|
||||||
FloatControls =
|
FloatControls =
|
||||||
{
|
{
|
||||||
"P1 X Axis", "P1 Y Axis",
|
"P1 X Axis", "P1 Y Axis",
|
||||||
//"P2 X Axis", "P2 Y Axis",
|
|
||||||
//"P3 X Axis", "P3 Y Axis",
|
|
||||||
//"P4 X Axis", "P4 Y Axis"
|
|
||||||
},
|
},
|
||||||
FloatRanges =
|
FloatRanges =
|
||||||
{
|
{
|
||||||
|
@ -53,10 +47,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
public N64Input(IInputPollable emuCore, mupen64plusApi core, CoreComm comm, N64SyncSettings.N64ControllerSettings[] controllerSettings)
|
public N64Input(IInputPollable emuCore, mupen64plusApi core, CoreComm comm, N64SyncSettings.N64ControllerSettings[] controllerSettings)
|
||||||
{
|
{
|
||||||
_emuCore = emuCore;
|
_emuCore = emuCore;
|
||||||
api = new mupen64plusInputApi(core);
|
_api = new mupen64plusInputApi(core);
|
||||||
CoreComm = comm;
|
CoreComm = comm;
|
||||||
|
|
||||||
api.SetM64PInputCallback(new mupen64plusInputApi.InputCallback(GetControllerInput));
|
_api.SetM64PInputCallback(GetControllerInput);
|
||||||
|
|
||||||
core.VInterrupt += ShiftInputPolledBools;
|
core.VInterrupt += ShiftInputPolledBools;
|
||||||
for (int i = 0; i < controllerSettings.Length; ++i)
|
for (int i = 0; i < controllerSettings.Length; ++i)
|
||||||
|
@ -129,7 +123,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
/// into a form the N64 understands
|
/// into a form the N64 understands
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="num">Number of controller to translate</param>
|
/// <param name="num">Number of controller to translate</param>
|
||||||
/// <returns>Bitlist of pressed buttons</returns>
|
/// <returns>Bit list of pressed buttons</returns>
|
||||||
public int ReadController(int num)
|
public int ReadController(int num)
|
||||||
{
|
{
|
||||||
int buttons = 0;
|
int buttons = 0;
|
||||||
|
@ -159,7 +153,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
/// <param name="type">Type to which the controller pak is set. Currently only NO_PAK and MEMORY_CARD are supported</param>
|
/// <param name="type">Type to which the controller pak is set. Currently only NO_PAK and MEMORY_CARD are supported</param>
|
||||||
public void SetControllerPakType(int controller, N64SyncSettings.N64ControllerSettings.N64ControllerPakType type)
|
public void SetControllerPakType(int controller, N64SyncSettings.N64ControllerSettings.N64ControllerPakType type)
|
||||||
{
|
{
|
||||||
api.SetM64PControllerPakType(controller, type);
|
_api.SetM64PControllerPakType(controller, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -169,7 +163,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
|
||||||
/// <param name="connectionStatus">New status of the controller connection</param>
|
/// <param name="connectionStatus">New status of the controller connection</param>
|
||||||
public void SetControllerConnected(int controller, bool connectionStatus)
|
public void SetControllerConnected(int controller, bool connectionStatus)
|
||||||
{
|
{
|
||||||
api.SetM64PControllerConnected(controller, connectionStatus);
|
_api.SetM64PControllerConnected(controller, connectionStatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,6 +188,7 @@
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Autosave/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Autosave/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=backcolor/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=backcolor/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bezier/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bezier/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bools/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=botting/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=botting/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=bsnes/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=bsnes/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bundler/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bundler/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
|
Loading…
Reference in New Issue