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 == "Disc Select"
|| 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("Key ")
|| c.Name.StartsWithOrdinal("Open")

View File

@ -763,7 +763,7 @@ namespace BizHawk.Emulation.Common
["Less"] = '<',
["Minus"] = '-',
["Number Sign"] = '#',
["Period"] = '.',
["Period"] = 'p',
["Quote"] = '\"',
["Return"] = 'r',
["Right"] = 'R',
@ -783,11 +783,22 @@ namespace BizHawk.Emulation.Common
["Joystick Down"] = 'D',
["Joystick Left"] = 'L',
["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 Middle Button"] = 'm',
["Mouse Right Button"] = 'r',
["Eject"] = '^',
["Insert"] = 'v',
["Eject Disk"] = '^',
["Insert Disk"] = 'v',
["Next Drive"] = '}',
["Next Slot"] = '>',
},

View File

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

View File

@ -102,7 +102,7 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
controller.BoolButtons.AddRange(
[
Inputs.NextDrive, Inputs.NextSlot, Inputs.Insert, Inputs.Eject
Inputs.NextDrive, Inputs.NextSlot, Inputs.InsertDisk, Inputs.EjectDisk
]);
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 MouseX = "Mouse X";
public const string MouseY = "Mouse Y";
public const string Eject = "Eject";
public const string Insert = "Insert";
public const string EjectDisk = "Eject Disk";
public const string InsertDisk = "Insert Disk";
public const string NextDrive = "Next Drive";
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}"))
{
currentPort.Buttons |= LibPUAE.AllButtons.Button1;
currentPort.Buttons |= LibPUAE.AllButtons.Button_1;
}
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}"))
{
currentPort.Buttons |= LibPUAE.AllButtons.Button3;
currentPort.Buttons |= LibPUAE.AllButtons.Button_3;
}
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)
{
fi.Action = LibPUAE.DriveAction.Eject;
fi.Action = LibPUAE.DriveAction.EjectDisk;
}
}
else if (controller.IsPressed(Inputs.Insert))
else if (controller.IsPressed(Inputs.InsertDisk))
{
if (!_insertPressed)
{
fi.Action = LibPUAE.DriveAction.Insert;
fi.Action = LibPUAE.DriveAction.InsertDisk;
unsafe
{
var str = FileNames.FD + _currentSlot;
@ -235,8 +235,8 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
}
}
_ejectPressed = controller.IsPressed(Inputs.Eject);
_insertPressed = controller.IsPressed(Inputs.Insert);
_ejectPressed = controller.IsPressed(Inputs.EjectDisk);
_insertPressed = controller.IsPressed(Inputs.InsertDisk);
_nextSlotPressed = controller.IsPressed(Inputs.NextSlot);
_nextDrivePressed = controller.IsPressed(Inputs.NextDrive);
fi.CurrentDrive = _currentDrive;