Added acanline rendering. Fixed interrupts. Added XInput support
This commit is contained in:
@@ -9,8 +9,9 @@ namespace Core.Io
|
||||
// public Psg AudioProcessor { get; set; }
|
||||
|
||||
// Joypad State (0xFF means no buttons pressed - the SMS uses Active-Low logic!)
|
||||
public byte Joypad1State { get; set; } = 0xFF;
|
||||
public byte Joypad2State { get; set; } = 0xFF;
|
||||
public byte Joypad1Keyboard = 0xFF;
|
||||
public byte Joypad1Gamepad = 0xFF;
|
||||
public byte Joypad2State = 0xFF;
|
||||
|
||||
public byte ReadPort(ushort port)
|
||||
{
|
||||
@@ -30,16 +31,9 @@ namespace Core.Io
|
||||
if ((lowerPort & 0x01) == 0) return VideoProcessor.ReadDataPort();
|
||||
else return VideoProcessor.ReadControlPort();
|
||||
}
|
||||
if (lowerPort == 0xDC)
|
||||
{
|
||||
// Port 0xDC: Player 1 (Up, Down, Left, Right, 1, 2) + Player 2 (Up, Down)
|
||||
return Joypad1State;
|
||||
}
|
||||
if (lowerPort == 0xDD)
|
||||
{
|
||||
// Port 0xDD: Player 2 (Left, Right, 1, 2) + Reset Button
|
||||
return Joypad2State;
|
||||
}
|
||||
if (lowerPort == 0xDC) return (byte)(Joypad1Keyboard & Joypad1Gamepad);
|
||||
|
||||
if (lowerPort == 0xDD) return Joypad2State;
|
||||
|
||||
return 0xFF; // Floating bus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user