Atari 2600 - vritual pad and mnemonics for paddles
This commit is contained in:
parent
82d03dc3e9
commit
f5cb35a862
|
@ -79,6 +79,8 @@ namespace BizHawk.Client.Common
|
|||
["R3"] = '>',
|
||||
|
||||
["Button"] = 'B',
|
||||
["Button 1"] = '1',
|
||||
["Button 2"] = '2',
|
||||
["B1"] = '1',
|
||||
["B2"] = '2',
|
||||
|
||||
|
|
|
@ -101,17 +101,44 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
DisplayName = "Player " + controller,
|
||||
IsConsole = false,
|
||||
DefaultSize = new Size(174, 74),
|
||||
MaxSize = new Size(174, 74),
|
||||
DefaultSize = new Size(334, 94),
|
||||
MaxSize = new Size(334, 94),
|
||||
Buttons = new[]
|
||||
{
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Button",
|
||||
DisplayName = "B",
|
||||
Location = new Point(124, 24),
|
||||
Name = "P" + controller + " Button 1",
|
||||
DisplayName = "B1",
|
||||
Location = new Point(5, 24),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
}
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Button 2",
|
||||
DisplayName = "B2",
|
||||
Location = new Point(5, 48),
|
||||
Type = PadSchema.PadInputType.Boolean
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Paddle X 1",
|
||||
DisplayName = "Paddle X 1",
|
||||
Location = new Point(55, 17),
|
||||
Type = PadSchema.PadInputType.FloatSingle,
|
||||
TargetSize = new Size(128, 69),
|
||||
MaxValue = 16266,
|
||||
MinValue = 0
|
||||
},
|
||||
new PadSchema.ButtonSchema
|
||||
{
|
||||
Name = "P" + controller + " Paddle X 2",
|
||||
DisplayName = "Paddle X 2",
|
||||
Location = new Point(193, 17),
|
||||
Type = PadSchema.PadInputType.FloatSingle,
|
||||
TargetSize = new Size(128, 69),
|
||||
MaxValue = 16266,
|
||||
MinValue = 0
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -134,16 +134,16 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
|
||||
private static readonly string[] BaseDefinition =
|
||||
{
|
||||
"Button 0",
|
||||
"Button 1"
|
||||
"Button 1",
|
||||
"Button 2"
|
||||
};
|
||||
|
||||
public byte Read(IController c)
|
||||
{
|
||||
byte result = 0xF0;
|
||||
|
||||
if (c.IsPressed($"P{PortNum} Button 0")) { result &= 0x70; }
|
||||
if (c.IsPressed($"P{PortNum} Button 1")) { result &= 0xB0; }
|
||||
if (c.IsPressed($"P{PortNum} Button 1")) { result &= 0x70; }
|
||||
if (c.IsPressed($"P{PortNum} Button 2")) { result &= 0xB0; }
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue