Skip to content

Commit f7b6703

Browse files
committed
puae mnemonics
1 parent c9666a5 commit f7b6703

File tree

5 files changed

+41
-26
lines changed

5 files changed

+41
-26
lines changed

src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ private void SetUpColumns()
363363
|| c.Name == "Light Sensor"
364364
|| c.Name == "Disc Select"
365365
|| c.Name == "Disk Index"
366+
|| c.Name == "Next Drive"
367+
|| c.Name == "Next Slot"
368+
|| c.Name == "Insert Disk"
369+
|| c.Name == "Eject Disk"
366370
|| c.Name.StartsWithOrdinal("Tilt")
367371
|| c.Name.StartsWithOrdinal("Key ")
368372
|| c.Name.StartsWithOrdinal("Open")

src/BizHawk.Emulation.Common/Base Implementations/Bk2MnemonicLookup.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ public static string LookupAxis(string button, string systemId)
763763
["Less"] = '<',
764764
["Minus"] = '-',
765765
["Number Sign"] = '#',
766-
["Period"] = '.',
766+
["Period"] = 'p',
767767
["Quote"] = '\"',
768768
["Return"] = 'r',
769769
["Right"] = 'R',
@@ -783,11 +783,22 @@ public static string LookupAxis(string button, string systemId)
783783
["Joystick Down"] = 'D',
784784
["Joystick Left"] = 'L',
785785
["Joystick Right"] = 'R',
786+
["CD32 pad Up"] = 'U',
787+
["CD32 pad Down"] = 'D',
788+
["CD32 pad Left"] = 'L',
789+
["CD32 pad Right"] = 'R',
790+
["CD32 pad Play"] = '>',
791+
["CD32 pad Rewind"] = '{',
792+
["CD32 pad Forward"] = '}',
793+
["CD32 pad Green"] = 'g',
794+
["CD32 pad Yellow"] = 'y',
795+
["CD32 pad Red"] = 'r',
796+
["CD32 pad Blue"] = 'b',
786797
["Mouse Left Button"] = 'l',
787798
["Mouse Middle Button"] = 'm',
788799
["Mouse Right Button"] = 'r',
789-
["Eject"] = '^',
790-
["Insert"] = 'v',
800+
["Eject Disk"] = '^',
801+
["Insert Disk"] = 'v',
791802
["Next Drive"] = '}',
792803
["Next Slot"] = '>',
793804
},

src/BizHawk.Emulation.Cores/Computers/Amiga/LibPUAE.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ public abstract class LibPUAE : LibWaterboxCore
3030
public const int KEY_COUNT = 0x68;
3131

3232
public const byte MouseButtonsMask =
33-
(byte)(AllButtons.Button1
34-
| AllButtons.Button2
35-
| AllButtons.Button3);
33+
(byte)(AllButtons.Button_1
34+
| AllButtons.Button_2
35+
| AllButtons.Button_3);
3636
public const byte JoystickMask =
3737
(byte)(AllButtons.Up
3838
| AllButtons.Down
3939
| AllButtons.Left
4040
| AllButtons.Right
41-
| AllButtons.Button1
42-
| AllButtons.Button2
43-
| AllButtons.Button3);
41+
| AllButtons.Button_1
42+
| AllButtons.Button_2
43+
| AllButtons.Button_3);
4444
public const short Cd32padMask =
4545
(short)(AllButtons.Up
4646
| AllButtons.Down
@@ -96,8 +96,8 @@ public enum ControllerType : int
9696
public enum DriveAction : int
9797
{
9898
None,
99-
Eject,
100-
Insert
99+
EjectDisk,
100+
InsertDisk
101101
}
102102

103103
[Flags]
@@ -107,9 +107,9 @@ public enum AllButtons : short
107107
Down = 0b0000000000000010,
108108
Left = 0b0000000000000100,
109109
Right = 0b0000000000001000,
110-
Button1 = 0b0000000000010000,
111-
Button2 = 0b0000000000100000,
112-
Button3 = 0b0000000001000000,
110+
Button_1 = 0b0000000000010000,
111+
Button_2 = 0b0000000000100000,
112+
Button_3 = 0b0000000001000000,
113113
Play = 0b0000000010000000,
114114
Rewind = 0b0000000100000000,
115115
Forward = 0b0000001000000000,

src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.Controllers.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private static ControllerDefinition CreateControllerDefinition(PUAESyncSettings
102102

103103
controller.BoolButtons.AddRange(
104104
[
105-
Inputs.NextDrive, Inputs.NextSlot, Inputs.Insert, Inputs.Eject
105+
Inputs.NextDrive, Inputs.NextSlot, Inputs.InsertDisk, Inputs.EjectDisk
106106
]);
107107

108108
foreach (var (name, _) in _keyboardMap)
@@ -123,8 +123,8 @@ private static class Inputs
123123
public const string MouseMiddleButton = "Mouse Middle Button";
124124
public const string MouseX = "Mouse X";
125125
public const string MouseY = "Mouse Y";
126-
public const string Eject = "Eject";
127-
public const string Insert = "Insert";
126+
public const string EjectDisk = "Eject Disk";
127+
public const string InsertDisk = "Insert Disk";
128128
public const string NextDrive = "Next Drive";
129129
public const string NextSlot = "Next Slot";
130130
}

src/BizHawk.Emulation.Cores/Computers/Amiga/PUAE.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,17 @@ protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController contro
168168
{
169169
if (controller.IsPressed($"P{port} {Inputs.MouseLeftButton}"))
170170
{
171-
currentPort.Buttons |= LibPUAE.AllButtons.Button1;
171+
currentPort.Buttons |= LibPUAE.AllButtons.Button_1;
172172
}
173173

174174
if (controller.IsPressed($"P{port} {Inputs.MouseRightButton}"))
175175
{
176-
currentPort.Buttons |= LibPUAE.AllButtons.Button2;
176+
currentPort.Buttons |= LibPUAE.AllButtons.Button_2;
177177
}
178178

179179
if (controller.IsPressed($"P{port} {Inputs.MouseMiddleButton}"))
180180
{
181-
currentPort.Buttons |= LibPUAE.AllButtons.Button3;
181+
currentPort.Buttons |= LibPUAE.AllButtons.Button_3;
182182
}
183183

184184
currentPort.MouseX = controller.AxisValue($"P{port} {Inputs.MouseX}");
@@ -188,18 +188,18 @@ protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController contro
188188
}
189189
}
190190

191-
if (controller.IsPressed(Inputs.Eject))
191+
if (controller.IsPressed(Inputs.EjectDisk))
192192
{
193193
if (!_ejectPressed)
194194
{
195-
fi.Action = LibPUAE.DriveAction.Eject;
195+
fi.Action = LibPUAE.DriveAction.EjectDisk;
196196
}
197197
}
198-
else if (controller.IsPressed(Inputs.Insert))
198+
else if (controller.IsPressed(Inputs.InsertDisk))
199199
{
200200
if (!_insertPressed)
201201
{
202-
fi.Action = LibPUAE.DriveAction.Insert;
202+
fi.Action = LibPUAE.DriveAction.InsertDisk;
203203
unsafe
204204
{
205205
var str = FileNames.FD + _currentSlot;
@@ -235,8 +235,8 @@ protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController contro
235235
}
236236
}
237237

238-
_ejectPressed = controller.IsPressed(Inputs.Eject);
239-
_insertPressed = controller.IsPressed(Inputs.Insert);
238+
_ejectPressed = controller.IsPressed(Inputs.EjectDisk);
239+
_insertPressed = controller.IsPressed(Inputs.InsertDisk);
240240
_nextSlotPressed = controller.IsPressed(Inputs.NextSlot);
241241
_nextDrivePressed = controller.IsPressed(Inputs.NextDrive);
242242
fi.CurrentDrive = _currentDrive;

0 commit comments

Comments
 (0)