Vectrex: Input fix
This commit is contained in:
parent
fb9ac2f3af
commit
ff2e91722d
|
@ -152,8 +152,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex
|
|||
|
||||
value &= 0xFF;
|
||||
|
||||
Register[port_sel] = value;
|
||||
|
||||
// do not write to input ports, controller input is directly assigned seperately
|
||||
if (port_sel < 14) { Register[port_sel] = value; }
|
||||
|
||||
sync_psg_state();
|
||||
|
||||
if (port_sel == 13)
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex
|
|||
_islag = true;
|
||||
|
||||
// button inputs go to port 14 in the audio registers
|
||||
audio.Register[14] = _controllerDeck.ReadPort1(controller);
|
||||
audio.Register[14] = (byte)(_controllerDeck.ReadPort1(controller) & 0xF);
|
||||
audio.Register[14] |= (byte)(_controllerDeck.ReadPort2(controller) << 4);
|
||||
|
||||
do_frame();
|
||||
|
|
|
@ -45,12 +45,12 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex
|
|||
|
||||
public byte Read(IController c)
|
||||
{
|
||||
byte result = 0x0;
|
||||
byte result = 0xFF;
|
||||
|
||||
if (c.IsPressed($"P{PortNum} Button 1")) { result |= 0x1; }
|
||||
if (c.IsPressed($"P{PortNum} Button 2")) { result |= 0x2; }
|
||||
if (c.IsPressed($"P{PortNum} Button 3")) { result |= 0x4; }
|
||||
if (c.IsPressed($"P{PortNum} Button 4")) { result |= 0x8; }
|
||||
if (c.IsPressed($"P{PortNum} Button 1")) { result &= 0xFE; }
|
||||
if (c.IsPressed($"P{PortNum} Button 2")) { result &= 0xFD; }
|
||||
if (c.IsPressed($"P{PortNum} Button 3")) { result &= 0xFB; }
|
||||
if (c.IsPressed($"P{PortNum} Button 4")) { result &= 0xF7; }
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue