diff --git a/Assets/dll/dsda.wbx.zst b/Assets/dll/dsda.wbx.zst index a3f6ad619e..ba0cde3922 100644 Binary files a/Assets/dll/dsda.wbx.zst and b/Assets/dll/dsda.wbx.zst differ diff --git a/src/BizHawk.Client.Common/movie/import/DoomLmpImport.cs b/src/BizHawk.Client.Common/movie/import/DoomLmpImport.cs index 12b2f71f63..883d888b8a 100644 --- a/src/BizHawk.Client.Common/movie/import/DoomLmpImport.cs +++ b/src/BizHawk.Client.Common/movie/import/DoomLmpImport.cs @@ -61,16 +61,15 @@ namespace BizHawk.Client.Common void ParsePlayer(string playerPfx) { controller.AcceptNewAxis(playerPfx + "Run Speed", unchecked((sbyte) input[i++])); - controller.AcceptNewAxis(playerPfx + "Strafing Speed", unchecked((sbyte) input[i++])); - controller.AcceptNewAxis(playerPfx + "Turning Speed", unchecked((sbyte) input[i++])); var specialValue = input[i++]; controller[playerPfx + "Fire"] = (specialValue & 0b00000001) 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; + bool changeWeapon = (specialValue & 0b00000100) is not 0; + int weapon = changeWeapon ? (((specialValue & 0b00111000) >> 3) + 1) : 0; + controller.AcceptNewAxis(playerPfx + "Weapon Select", weapon); } do { diff --git a/src/BizHawk.Client.Common/movie/import/HereticLmpImport.cs b/src/BizHawk.Client.Common/movie/import/HereticLmpImport.cs index 5cdb201bd7..3ad0927bfc 100644 --- a/src/BizHawk.Client.Common/movie/import/HereticLmpImport.cs +++ b/src/BizHawk.Client.Common/movie/import/HereticLmpImport.cs @@ -41,19 +41,15 @@ namespace BizHawk.Client.Common void ParsePlayer(string playerPfx) { controller.AcceptNewAxis(playerPfx + "Run Speed", unchecked((sbyte) input[i++])); - controller.AcceptNewAxis(playerPfx + "Strafing Speed", unchecked((sbyte) input[i++])); - controller.AcceptNewAxis(playerPfx + "Turning Speed", unchecked((sbyte) input[i++])); - var specialValue = input[i++]; controller[playerPfx + "Fire"] = (specialValue & 0b00000001) 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; - + bool changeWeapon = (specialValue & 0b00000100) is not 0; + int weapon = changeWeapon ? (((specialValue & 0b00111000) >> 3) + 1) : 0; + controller.AcceptNewAxis(playerPfx + "Weapon Select", weapon); controller.AcceptNewAxis(playerPfx + "Fly / Look", unchecked((sbyte) input[i++])); - controller.AcceptNewAxis(playerPfx + "Use Artifact", unchecked((sbyte) input[i++])); } do diff --git a/src/BizHawk.Client.Common/movie/import/HexenLmpImport.cs b/src/BizHawk.Client.Common/movie/import/HexenLmpImport.cs index 5341c1d66e..e1c27bc137 100644 --- a/src/BizHawk.Client.Common/movie/import/HexenLmpImport.cs +++ b/src/BizHawk.Client.Common/movie/import/HexenLmpImport.cs @@ -53,19 +53,15 @@ namespace BizHawk.Client.Common void ParsePlayer(string playerPfx) { controller.AcceptNewAxis(playerPfx + "Run Speed", unchecked((sbyte) input[i++])); - controller.AcceptNewAxis(playerPfx + "Strafing Speed", unchecked((sbyte) input[i++])); - controller.AcceptNewAxis(playerPfx + "Turning Speed", unchecked((sbyte) input[i++])); - var specialValue = input[i++]; controller[playerPfx + "Fire"] = (specialValue & 0b00000001) 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; - + bool changeWeapon = (specialValue & 0b00000100) is not 0; + int weapon = changeWeapon ? (((specialValue & 0b00111000) >> 3) + 1) : 0; + controller.AcceptNewAxis(playerPfx + "Weapon Select", weapon); controller.AcceptNewAxis(playerPfx + "Fly / Look", unchecked((sbyte) input[i++])); - var useArtifact = input[i++]; controller.AcceptNewAxis(playerPfx + "Use Artifact", useArtifact & 0b00111111); controller[playerPfx + "End Player"] = (useArtifact & 0b01000000) is not 0; diff --git a/src/BizHawk.Emulation.Common/Base Implementations/Bk2MnemonicLookup.cs b/src/BizHawk.Emulation.Common/Base Implementations/Bk2MnemonicLookup.cs index 2d82bfcf11..89984cc29e 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/Bk2MnemonicLookup.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/Bk2MnemonicLookup.cs @@ -819,8 +819,7 @@ namespace BizHawk.Emulation.Common ["RESET"] = 'r', }, [VSystemID.Raw.Doom] = new() - { - ["Alt Weapon"] = 'X', + { ["Backward"] = 'v', ["End Player"] = 'E', ["Fire"] = 'F', diff --git a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.IEmulator.cs b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.IEmulator.cs index 1a3d9bdb27..e9a5103aa0 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.IEmulator.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDA.IEmulator.cs @@ -93,8 +93,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom var actionsBitfield = portReaders[i](controller); players[i]._Fire = actionsBitfield & 0b00001; players[i]._Action = (actionsBitfield & 0b00010) >> 1; - players[i]._AltWeapon = (actionsBitfield & 0b00100) >> 2; - players[i]._Automap = (actionsBitfield & 0b01000) >> 3; + players[i]._Automap = (actionsBitfield & 0b00100) >> 2; // Raven Games if (_syncSettings.InputFormat is DoomControllerTypes.Heretic or DoomControllerTypes.Hexen) diff --git a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDAControllers.cs b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDAControllers.cs index b6831e8a76..72a17b4732 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Doom/DSDAControllers.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Doom/DSDAControllers.cs @@ -50,7 +50,6 @@ namespace BizHawk.Emulation.Cores.Computers.Doom [ "Fire", "Use", - "Alt Weapon", "Forward", "Backward", "Turn Left", @@ -74,8 +73,7 @@ namespace BizHawk.Emulation.Cores.Computers.Doom if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b0001; } if (c.IsPressed($"P{PortNum} Use")) { result |= 0b0010; } - if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b0100; } - if (c.IsPressed($"P{PortNum} Automap")) { result |= 0b1000; } + if (c.IsPressed($"P{PortNum} Automap")) { result |= 0b0100; } return result; } @@ -129,7 +127,6 @@ namespace BizHawk.Emulation.Cores.Computers.Doom [ "Fire", "Use", - "Alt Weapon", "Forward", "Backward", "Turn Left", @@ -152,7 +149,6 @@ namespace BizHawk.Emulation.Cores.Computers.Doom if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b0001; } if (c.IsPressed($"P{PortNum} Use")) { result |= 0b0010; } - if (c.IsPressed($"P{PortNum} Alt Weapon")) { result |= 0b0100; } return result; } @@ -270,7 +266,6 @@ namespace BizHawk.Emulation.Cores.Computers.Doom if (c.IsPressed($"P{PortNum} Fire")) { result |= 0b00001; } 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; } diff --git a/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs b/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs index 99f39bc02b..9cf32f64b4 100644 --- a/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs +++ b/src/BizHawk.Emulation.Cores/Computers/Doom/LibDSDA.cs @@ -40,7 +40,6 @@ namespace BizHawk.Emulation.Cores.Computers.Doom public int _WeaponSelect; public int _Fire; public int _Action; - public int _AltWeapon; public int _Automap; // Hexen + Heretic (Raven Games) diff --git a/waterbox/dsda/BizhawkInterface.cxx b/waterbox/dsda/BizhawkInterface.cxx index fb4db88eb1..428bb097f9 100644 --- a/waterbox/dsda/BizhawkInterface.cxx +++ b/waterbox/dsda/BizhawkInterface.cxx @@ -50,7 +50,6 @@ ECL_EXPORT void dsda_frame_advance(struct PackedPlayerInput *player1Inputs, stru player1Inputs->_Fire, player1Inputs->_Action, player1Inputs->_WeaponSelect, - player1Inputs->_AltWeapon, player1Inputs->_Automap, player1Inputs->_FlyLook, player1Inputs->_ArtifactUse, @@ -68,7 +67,6 @@ ECL_EXPORT void dsda_frame_advance(struct PackedPlayerInput *player1Inputs, stru player2Inputs->_Fire, player2Inputs->_Action, player2Inputs->_WeaponSelect, - player2Inputs->_AltWeapon, player2Inputs->_Automap, player2Inputs->_FlyLook, player2Inputs->_ArtifactUse, @@ -86,7 +84,6 @@ ECL_EXPORT void dsda_frame_advance(struct PackedPlayerInput *player1Inputs, stru player3Inputs->_Fire, player3Inputs->_Action, player3Inputs->_WeaponSelect, - player3Inputs->_AltWeapon, player3Inputs->_Automap, player3Inputs->_FlyLook, player3Inputs->_ArtifactUse, @@ -104,7 +101,6 @@ ECL_EXPORT void dsda_frame_advance(struct PackedPlayerInput *player1Inputs, stru player4Inputs->_Fire, player4Inputs->_Action, player4Inputs->_WeaponSelect, - player4Inputs->_AltWeapon, player4Inputs->_Automap, player4Inputs->_FlyLook, player4Inputs->_ArtifactUse, diff --git a/waterbox/dsda/BizhawkInterface.hxx b/waterbox/dsda/BizhawkInterface.hxx index e1b4741f2b..8bae6882b9 100644 --- a/waterbox/dsda/BizhawkInterface.hxx +++ b/waterbox/dsda/BizhawkInterface.hxx @@ -20,7 +20,7 @@ extern "C" void headlessRunSingleTick(); void headlessUpdateSounds(void); void headlessClearTickCommand(); - void headlessSetTickCommand(int playerId, int forwardSpeed, int strafingSpeed, int turningSpeed, int fire, int action, int weapon, int altWeapon, int automap, int lookfly, int artifact, int jump, int endPlayer); + void headlessSetTickCommand(int playerId, int forwardSpeed, int strafingSpeed, int turningSpeed, int fire, int action, int weapon, int automap, int lookfly, int artifact, int jump, int endPlayer); // Video-related functions void headlessUpdateVideo(void); @@ -89,7 +89,6 @@ struct PackedPlayerInput int _WeaponSelect; int _Fire; int _Action; - int _AltWeapon; int _Automap; int _FlyLook; int _ArtifactUse; diff --git a/waterbox/dsda/core b/waterbox/dsda/core index 67b2144c76..792aca883a 160000 --- a/waterbox/dsda/core +++ b/waterbox/dsda/core @@ -1 +1 @@ -Subproject commit 67b2144c7605c3d69726afc418abcee0c6c8013c +Subproject commit 792aca883a380d18182545413f6b0fa441fb4524