dsda: match button names to dsda

(except for weapon keys since they may mean different thing for non-doom)

tweak doom mnemonics too
and push core submodule
This commit is contained in:
feos 2025-02-23 11:00:01 +03:00
parent 72070a63de
commit 918783126e
7 changed files with 116 additions and 116 deletions

View File

@ -67,7 +67,7 @@ namespace BizHawk.Client.Common
var specialValue = input[i++];
controller[playerPfx + "Fire"] = (specialValue & 0b00000001) is not 0;
controller[playerPfx + "Action"] = (specialValue & 0b00000010) is not 0;
controller[playerPfx + "Use"] = (specialValue & 0b00000010) is not 0;
controller.AcceptNewAxis(playerPfx + "Weapon Select", (specialValue & 0b00011100) >> 2);
controller[playerPfx + "Alt Weapon"] = (specialValue & 0b00100000) is not 0;
}

View File

@ -47,7 +47,7 @@ namespace BizHawk.Client.Common
var specialValue = input[i++];
controller[playerPfx + "Fire"] = (specialValue & 0b00000001) is not 0;
controller[playerPfx + "Action"] = (specialValue & 0b00000010) is not 0;
controller[playerPfx + "Use"] = (specialValue & 0b00000010) is not 0;
controller.AcceptNewAxis(playerPfx + "Weapon Select", (specialValue & 0b00011100) >> 2);
controller[playerPfx + "Alt Weapon"] = (specialValue & 0b00100000) is not 0;

View File

@ -59,7 +59,7 @@ namespace BizHawk.Client.Common
var specialValue = input[i++];
controller[playerPfx + "Fire"] = (specialValue & 0b00000001) is not 0;
controller[playerPfx + "Action"] = (specialValue & 0b00000010) is not 0;
controller[playerPfx + "Use"] = (specialValue & 0b00000010) is not 0;
controller.AcceptNewAxis(playerPfx + "Weapon Select", (specialValue & 0b00011100) >> 2);
controller[playerPfx + "Alt Weapon"] = (specialValue & 0b00100000) is not 0;

View File

@ -819,19 +819,19 @@ namespace BizHawk.Emulation.Common
["RESET"] = 'r',
},
[VSystemID.Raw.Doom] = new()
{
["Action"] = 'A',
["Fire"] = 'F',
["Alt Weapon"] = 'X',
["Jump"] = 'J',
{
["Alt Weapon"] = 'X',
["Backward"] = 'v',
["End Player"] = 'E',
["Forward"] = 'f',
["Backward"] = 'b',
["Fire"] = 'F',
["Forward"] = '^',
["Jump"] = 'J',
["Run"] = 'R',
["Strafe Left"] = '<',
["Strafe Right"] = '>',
["Turn Left"] = 'l',
["Turn Right"] = 'r',
["Strafe Left"] = 'L',
["Strafe Right"] = 'R',
["Shift Run"] = 's',
["Use"] = 'U',
["Weapon Select 1"] = '1',
["Weapon Select 2"] = '2',
["Weapon Select 3"] = '3',

View File

@ -257,14 +257,14 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
[Description("Sets strict mode restrictions, preventing TAS-only inputs.")]
[DefaultValue(true)]
public bool StrictMode { get; set; }
/*
[DisplayName("Auto Run")]
[Description("")]
[DefaultValue(true)]
public bool AutoRun { get; set; }
*/
[DisplayName("Turning Resolution")]
[Description("\"shorttics\" refers to decreased turning resolution used for demos, whereas \"longtics\" refers to the regular turning resolution outside of a demo-recording environment.")]
[Description("\"Shorttics\" refers to decreased turning resolution used for demos. \"Longtics\" refers to the regular turning resolution outside of a demo-recording environment.")]
[DefaultValue(TurningResolution.Longtics)]
public TurningResolution TurningResolution { get; set; }

View File

@ -49,22 +49,22 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
private static readonly string[] BaseDefinition =
[
"Fire",
"Action",
"Use",
"Alt Weapon",
"Key Forward",
"Key Backward",
"Key Turn Left",
"Key Turn Right",
"Key Strafe Left",
"Key Strafe Right",
"Key Shift Run",
"Key Weapon Select 1",
"Key Weapon Select 2",
"Key Weapon Select 3",
"Key Weapon Select 4",
"Key Weapon Select 5",
"Key Weapon Select 6",
"Key Weapon Select 7",
"Forward",
"Backward",
"Turn Left",
"Turn Right",
"Strafe Left",
"Strafe Right",
"Run",
"Weapon Select 1",
"Weapon Select 2",
"Weapon Select 3",
"Weapon Select 4",
"Weapon Select 5",
"Weapon Select 6",
"Weapon Select 7",
];
public byte Read(IController c)
@ -72,7 +72,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
byte result = 0;
if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b0001; }
if (c.IsPressed($"P{PortNum} Action")) { result |= 0b0010; }
if (c.IsPressed($"P{PortNum} Use")) { result |= 0b0010; }
if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b0100; }
return result;
@ -85,55 +85,55 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
// Handling running keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Run Speed")
{
if (c.IsPressed($"P{PortNum} Key Forward"))
if (c.IsPressed($"P{PortNum} Forward"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 50 : 25;
x = c.IsPressed($"P{PortNum} Run") ? 50 : 25;
}
if (c.IsPressed($"P{PortNum} Key Backward"))
if (c.IsPressed($"P{PortNum} Backward"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -50 : -25;
x = c.IsPressed($"P{PortNum} Run") ? -50 : -25;
}
}
// Handling strafing keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Strafing Speed")
{
if (c.IsPressed($"P{PortNum} Key Strafe Right"))
if (c.IsPressed($"P{PortNum} Strafe Right"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 40 : 24;
x = c.IsPressed($"P{PortNum} Run") ? 40 : 24;
}
if (c.IsPressed($"P{PortNum} Key Strafe Left"))
if (c.IsPressed($"P{PortNum} Strafe Left"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -40 : -24;
x = c.IsPressed($"P{PortNum} Run") ? -40 : -24;
}
}
// Handling turning keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Turning Speed")
{
if (c.IsPressed($"P{PortNum} Key Turn Left"))
if (c.IsPressed($"P{PortNum} Turn Left"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 1280 : 320;
x = c.IsPressed($"P{PortNum} Run") ? 1280 : 320;
}
if (c.IsPressed($"P{PortNum} Key Turn Right"))
if (c.IsPressed($"P{PortNum} Turn Right"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -1280 : -320;
x = c.IsPressed($"P{PortNum} Run") ? -1280 : -320;
}
}
// Handling weapon select keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Weapon Select")
{
if (c.IsPressed($"P{PortNum} Key Weapon Select 1")) x = 1;
if (c.IsPressed($"P{PortNum} Key Weapon Select 2")) x = 2;
if (c.IsPressed($"P{PortNum} Key Weapon Select 3")) x = 3;
if (c.IsPressed($"P{PortNum} Key Weapon Select 4")) x = 4;
if (c.IsPressed($"P{PortNum} Key Weapon Select 5")) x = 5;
if (c.IsPressed($"P{PortNum} Key Weapon Select 6")) x = 6;
if (c.IsPressed($"P{PortNum} Key Weapon Select 7")) x = 7;
if (c.IsPressed($"P{PortNum} Weapon Select 1")) x = 1;
if (c.IsPressed($"P{PortNum} Weapon Select 2")) x = 2;
if (c.IsPressed($"P{PortNum} Weapon Select 3")) x = 3;
if (c.IsPressed($"P{PortNum} Weapon Select 4")) x = 4;
if (c.IsPressed($"P{PortNum} Weapon Select 5")) x = 5;
if (c.IsPressed($"P{PortNum} Weapon Select 6")) x = 6;
if (c.IsPressed($"P{PortNum} Weapon Select 7")) x = 7;
}
return x;
@ -168,22 +168,22 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
private static readonly string[] BaseDefinition =
[
"Fire",
"Action",
"Use",
"Alt Weapon",
"Key Forward",
"Key Backward",
"Key Turn Left",
"Key Turn Right",
"Key Strafe Left",
"Key Strafe Right",
"Key Shift Run",
"Key Weapon Select 1",
"Key Weapon Select 2",
"Key Weapon Select 3",
"Key Weapon Select 4",
"Key Weapon Select 5",
"Key Weapon Select 6",
"Key Weapon Select 7",
"Forward",
"Backward",
"Turn Left",
"Turn Right",
"Strafe Left",
"Strafe Right",
"Run",
"Weapon Select 1",
"Weapon Select 2",
"Weapon Select 3",
"Weapon Select 4",
"Weapon Select 5",
"Weapon Select 6",
"Weapon Select 7",
];
public byte Read(IController c)
@ -191,7 +191,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
byte result = 0;
if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b0001; }
if (c.IsPressed($"P{PortNum} Action")) { result |= 0b0010; }
if (c.IsPressed($"P{PortNum} Use")) { result |= 0b0010; }
if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b0100; }
return result;
@ -204,55 +204,55 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
// Handling running keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Run Speed")
{
if (c.IsPressed($"P{PortNum} Key Forward"))
if (c.IsPressed($"P{PortNum} Forward"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 50 : 25;
x = c.IsPressed($"P{PortNum} Run") ? 50 : 25;
}
if (c.IsPressed($"P{PortNum} Key Backward"))
if (c.IsPressed($"P{PortNum} Backward"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -50 : -25;
x = c.IsPressed($"P{PortNum} Run") ? -50 : -25;
}
}
// Handling strafing keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Strafing Speed")
{
if (c.IsPressed($"P{PortNum} Key Strafe Right"))
if (c.IsPressed($"P{PortNum} Strafe Right"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 40 : 24;
x = c.IsPressed($"P{PortNum} Run") ? 40 : 24;
}
if (c.IsPressed($"P{PortNum} Key Strafe Left"))
if (c.IsPressed($"P{PortNum} Strafe Left"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -40 : -24;
x = c.IsPressed($"P{PortNum} Run") ? -40 : -24;
}
}
// Handling turning keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Turning Speed")
{
if (c.IsPressed($"P{PortNum} Key Turn Left"))
if (c.IsPressed($"P{PortNum} Turn Left"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 5 : 2;
x = c.IsPressed($"P{PortNum} Run") ? 5 : 2;
}
if (c.IsPressed($"P{PortNum} Key Turn Right"))
if (c.IsPressed($"P{PortNum} Turn Right"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -5 : -2;
x = c.IsPressed($"P{PortNum} Run") ? -5 : -2;
}
}
// Handling weapon select keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Weapon Select")
{
if (c.IsPressed($"P{PortNum} Key Weapon Select 1")) x = 1;
if (c.IsPressed($"P{PortNum} Key Weapon Select 2")) x = 2;
if (c.IsPressed($"P{PortNum} Key Weapon Select 3")) x = 3;
if (c.IsPressed($"P{PortNum} Key Weapon Select 4")) x = 4;
if (c.IsPressed($"P{PortNum} Key Weapon Select 5")) x = 5;
if (c.IsPressed($"P{PortNum} Key Weapon Select 6")) x = 6;
if (c.IsPressed($"P{PortNum} Key Weapon Select 7")) x = 7;
if (c.IsPressed($"P{PortNum} Weapon Select 1")) x = 1;
if (c.IsPressed($"P{PortNum} Weapon Select 2")) x = 2;
if (c.IsPressed($"P{PortNum} Weapon Select 3")) x = 3;
if (c.IsPressed($"P{PortNum} Weapon Select 4")) x = 4;
if (c.IsPressed($"P{PortNum} Weapon Select 5")) x = 5;
if (c.IsPressed($"P{PortNum} Weapon Select 6")) x = 6;
if (c.IsPressed($"P{PortNum} Weapon Select 7")) x = 7;
}
return x;
@ -287,21 +287,21 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
private static readonly string[] BaseDefinition =
[
"Fire",
"Action",
"Use",
"Alt Weapon",
"Jump",
"End Player",
"Key Forward",
"Key Backward",
"Key Turn Left",
"Key Turn Right",
"Key Strafe Left",
"Key Strafe Right",
"Key Shift Run",
"Key Weapon Select 1",
"Key Weapon Select 2",
"Key Weapon Select 3",
"Key Weapon Select 4"
"Forward",
"Backward",
"Turn Left",
"Turn Right",
"Strafe Left",
"Strafe Right",
"Run",
"Weapon Select 1",
"Weapon Select 2",
"Weapon Select 3",
"Weapon Select 4"
];
public byte Read(IController c)
@ -309,7 +309,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
byte result = 0;
if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b00001; }
if (c.IsPressed($"P{PortNum} Action")) { result |= 0b00010; }
if (c.IsPressed($"P{PortNum} Use")) { result |= 0b00010; }
if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b00100; }
if (c.IsPressed($"P{PortNum} Jump")) { result |= 0b01000; }
if (c.IsPressed($"P{PortNum} End Player")) { result |= 0b10000; }
@ -324,52 +324,52 @@ namespace BizHawk.Emulation.Cores.Computers.Doom
// Handling running keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Run Speed")
{
if (c.IsPressed($"P{PortNum} Key Forward"))
if (c.IsPressed($"P{PortNum} Forward"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 50 : 25;
x = c.IsPressed($"P{PortNum} Run") ? 50 : 25;
}
if (c.IsPressed($"P{PortNum} Key Backward"))
if (c.IsPressed($"P{PortNum} Backward"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -50 : -25;
x = c.IsPressed($"P{PortNum} Run") ? -50 : -25;
}
}
// Handling strafing keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Strafing Speed")
{
if (c.IsPressed($"P{PortNum} Key Strafe Right"))
if (c.IsPressed($"P{PortNum} Strafe Right"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 40 : 24;
x = c.IsPressed($"P{PortNum} Run") ? 40 : 24;
}
if (c.IsPressed($"P{PortNum} Key Strafe Left"))
if (c.IsPressed($"P{PortNum} Strafe Left"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -40 : -24;
x = c.IsPressed($"P{PortNum} Run") ? -40 : -24;
}
}
// Handling turning keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Turning Speed")
{
if (c.IsPressed($"P{PortNum} Key Turn Left"))
if (c.IsPressed($"P{PortNum} Turn Left"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? 5 : 2;
x = c.IsPressed($"P{PortNum} Run") ? 5 : 2;
}
if (c.IsPressed($"P{PortNum} Key Turn Right"))
if (c.IsPressed($"P{PortNum} Turn Right"))
{
x = c.IsPressed($"P{PortNum} Key Shift Run") ? -5 : -2;
x = c.IsPressed($"P{PortNum} Run") ? -5 : -2;
}
}
// Handling weapon select keys overriding axes values
if (Definition.Axes[pot] == $"P{PortNum} Weapon Select")
{
if (c.IsPressed($"P{PortNum} Key Weapon Select 1")) x = 1;
if (c.IsPressed($"P{PortNum} Key Weapon Select 2")) x = 2;
if (c.IsPressed($"P{PortNum} Key Weapon Select 3")) x = 3;
if (c.IsPressed($"P{PortNum} Key Weapon Select 4")) x = 4;
if (c.IsPressed($"P{PortNum} Weapon Select 1")) x = 1;
if (c.IsPressed($"P{PortNum} Weapon Select 2")) x = 2;
if (c.IsPressed($"P{PortNum} Weapon Select 3")) x = 3;
if (c.IsPressed($"P{PortNum} Weapon Select 4")) x = 4;
}
return x;

@ -1 +1 @@
Subproject commit e1a352844f260e61ac0aa75d2a63941b26c4ab0e
Subproject commit f34f64c861dde729e0990153715bef9b0cebc70c