puae mnemonics

This commit is contained in:
feos 2024-11-24 11:39:48 +03:00
parent c9666a5647
commit f7b6703ad2
5 changed files with 41 additions and 26 deletions

View File

@ -363,6 +363,10 @@ namespace BizHawk.Client.EmuHawk
|| c.Name == "Light Sensor" || c.Name == "Light Sensor"
|| c.Name == "Disc Select" || c.Name == "Disc Select"
|| c.Name == "Disk Index" || c.Name == "Disk Index"
|| c.Name == "Next Drive"
|| c.Name == "Next Slot"
|| c.Name == "Insert Disk"
|| c.Name == "Eject Disk"
|| c.Name.StartsWithOrdinal("Tilt") || c.Name.StartsWithOrdinal("Tilt")
|| c.Name.StartsWithOrdinal("Key ") || c.Name.StartsWithOrdinal("Key ")
|| c.Name.StartsWithOrdinal("Open") || c.Name.StartsWithOrdinal("Open")

View File

@ -763,7 +763,7 @@ namespace BizHawk.Emulation.Common
["Less"] = '<', ["Less"] = '<',
["Minus"] = '-', ["Minus"] = '-',
["Number Sign"] = '#', ["Number Sign"] = '#',
["Period"] = '.', ["Period"] = 'p',
["Quote"] = '\"', ["Quote"] = '\"',
["Return"] = 'r', ["Return"] = 'r',
["Right"] = 'R', ["Right"] = 'R',
@ -783,11 +783,22 @@ namespace BizHawk.Emulation.Common
["Joystick Down"] = 'D', ["Joystick Down"] = 'D',
["Joystick Left"] = 'L', ["Joystick Left"] = 'L',
["Joystick Right"] = 'R', ["Joystick Right"] = 'R',
["CD32 pad Up"] = 'U',
["CD32 pad Down"] = 'D',
["CD32 pad Left"] = 'L',
["CD32 pad Right"] = 'R',
["CD32 pad Play"] = '>',
["CD32 pad Rewind"] = '{',
["CD32 pad Forward"] = '}',
["CD32 pad Green"] = 'g',
["CD32 pad Yellow"] = 'y',
["CD32 pad Red"] = 'r',
["CD32 pad Blue"] = 'b',
["Mouse Left Button"] = 'l', ["Mouse Left Button"] = 'l',
["Mouse Middle Button"] = 'm', ["Mouse Middle Button"] = 'm',
["Mouse Right Button"] = 'r', ["Mouse Right Button"] = 'r',
["Eject"] = '^', ["Eject Disk"] = '^',
["Insert"] = 'v', ["Insert Disk"] = 'v',
["Next Drive"] = '}', ["Next Drive"] = '}',
["Next Slot"] = '>', ["Next Slot"] = '>',
}, },

View File

@ -30,17 +30,17 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
public const int KEY_COUNT = 0x68; public const int KEY_COUNT = 0x68;
public const byte MouseButtonsMask = public const byte MouseButtonsMask =
(byte)(AllButtons.Button1 (byte)(AllButtons.Button_1
| AllButtons.Button2 | AllButtons.Button_2
| AllButtons.Button3); | AllButtons.Button_3);
public const byte JoystickMask = public const byte JoystickMask =
(byte)(AllButtons.Up (byte)(AllButtons.Up
| AllButtons.Down | AllButtons.Down
| AllButtons.Left | AllButtons.Left
| AllButtons.Right | AllButtons.Right
| AllButtons.Button1 | AllButtons.Button_1
| AllButtons.Button2 | AllButtons.Button_2
| AllButtons.Button3); | AllButtons.Button_3);
public const short Cd32padMask = public const short Cd32padMask =
(short)(AllButtons.Up (short)(AllButtons.Up
| AllButtons.Down | AllButtons.Down
@ -96,8 +96,8 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
public enum DriveAction : int public enum DriveAction : int
{ {
None, None,
Eject, EjectDisk,
Insert InsertDisk
} }
[Flags] [Flags]
@ -107,9 +107,9 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
Down = 0b0000000000000010, Down = 0b0000000000000010,
Left = 0b0000000000000100, Left = 0b0000000000000100,
Right = 0b0000000000001000, Right = 0b0000000000001000,
Button1 = 0b0000000000010000, Button_1 = 0b0000000000010000,
Button2 = 0b0000000000100000, Button_2 = 0b0000000000100000,
Button3 = 0b0000000001000000, Button_3 = 0b0000000001000000,
Play = 0b0000000010000000, Play = 0b0000000010000000,
Rewind = 0b0000000100000000, Rewind = 0b0000000100000000,
Forward = 0b0000001000000000, Forward = 0b0000001000000000,

View File

@ -102,7 +102,7 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
controller.BoolButtons.AddRange( controller.BoolButtons.AddRange(
[ [
Inputs.NextDrive, Inputs.NextSlot, Inputs.Insert, Inputs.Eject Inputs.NextDrive, Inputs.NextSlot, Inputs.InsertDisk, Inputs.EjectDisk
]); ]);
foreach (var (name, _) in _keyboardMap) foreach (var (name, _) in _keyboardMap)
@ -123,8 +123,8 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
public const string MouseMiddleButton = "Mouse Middle Button"; public const string MouseMiddleButton = "Mouse Middle Button";
public const string MouseX = "Mouse X"; public const string MouseX = "Mouse X";
public const string MouseY = "Mouse Y"; public const string MouseY = "Mouse Y";
public const string Eject = "Eject"; public const string EjectDisk = "Eject Disk";
public const string Insert = "Insert"; public const string InsertDisk = "Insert Disk";
public const string NextDrive = "Next Drive"; public const string NextDrive = "Next Drive";
public const string NextSlot = "Next Slot"; public const string NextSlot = "Next Slot";
} }

View File

@ -168,17 +168,17 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
{ {
if (controller.IsPressed($"P{port} {Inputs.MouseLeftButton}")) if (controller.IsPressed($"P{port} {Inputs.MouseLeftButton}"))
{ {
currentPort.Buttons |= LibPUAE.AllButtons.Button1; currentPort.Buttons |= LibPUAE.AllButtons.Button_1;
} }
if (controller.IsPressed($"P{port} {Inputs.MouseRightButton}")) if (controller.IsPressed($"P{port} {Inputs.MouseRightButton}"))
{ {
currentPort.Buttons |= LibPUAE.AllButtons.Button2; currentPort.Buttons |= LibPUAE.AllButtons.Button_2;
} }
if (controller.IsPressed($"P{port} {Inputs.MouseMiddleButton}")) if (controller.IsPressed($"P{port} {Inputs.MouseMiddleButton}"))
{ {
currentPort.Buttons |= LibPUAE.AllButtons.Button3; currentPort.Buttons |= LibPUAE.AllButtons.Button_3;
} }
currentPort.MouseX = controller.AxisValue($"P{port} {Inputs.MouseX}"); currentPort.MouseX = controller.AxisValue($"P{port} {Inputs.MouseX}");
@ -188,18 +188,18 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
} }
} }
if (controller.IsPressed(Inputs.Eject)) if (controller.IsPressed(Inputs.EjectDisk))
{ {
if (!_ejectPressed) if (!_ejectPressed)
{ {
fi.Action = LibPUAE.DriveAction.Eject; fi.Action = LibPUAE.DriveAction.EjectDisk;
} }
} }
else if (controller.IsPressed(Inputs.Insert)) else if (controller.IsPressed(Inputs.InsertDisk))
{ {
if (!_insertPressed) if (!_insertPressed)
{ {
fi.Action = LibPUAE.DriveAction.Insert; fi.Action = LibPUAE.DriveAction.InsertDisk;
unsafe unsafe
{ {
var str = FileNames.FD + _currentSlot; var str = FileNames.FD + _currentSlot;
@ -235,8 +235,8 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
} }
} }
_ejectPressed = controller.IsPressed(Inputs.Eject); _ejectPressed = controller.IsPressed(Inputs.EjectDisk);
_insertPressed = controller.IsPressed(Inputs.Insert); _insertPressed = controller.IsPressed(Inputs.InsertDisk);
_nextSlotPressed = controller.IsPressed(Inputs.NextSlot); _nextSlotPressed = controller.IsPressed(Inputs.NextSlot);
_nextDrivePressed = controller.IsPressed(Inputs.NextDrive); _nextDrivePressed = controller.IsPressed(Inputs.NextDrive);
fi.CurrentDrive = _currentDrive; fi.CurrentDrive = _currentDrive;