Added window scaling

This commit is contained in:
2026-05-16 00:49:55 +01:00
parent ec40e04ff3
commit aa9cc552e6
6 changed files with 71 additions and 13 deletions

View File

@@ -1303,6 +1303,35 @@ namespace Core.Cpu
switch (extendedOpcode)
{
case 0x40: // IN B, (C)
{
byte inVal40 = ReadPort(BC.Word);
BC.High = inVal40;
byte flags40 = (byte)(AF.Low & 0x01); // Preserve Carry
if ((inVal40 & 0x80) != 0) flags40 |= 0x80; // S
if (inVal40 == 0) flags40 |= 0x40; // Z
flags40 |= ParityTable[inVal40]; // P/V
flags40 |= (byte)(inVal40 & 0x28); // Undocumented bits 3 and 5
AF.Low = flags40;
return 12;
}
case 0x50: // IN D, (C)
{
byte inVal50 = ReadPort(BC.Word);
DE.High = inVal50;
byte flags50 = (byte)(AF.Low & 0x01); // Preserve Carry
if ((inVal50 & 0x80) != 0) flags50 |= 0x80; // S
if (inVal50 == 0) flags50 |= 0x40; // Z
flags50 |= ParityTable[inVal50]; // P/V
flags50 |= (byte)(inVal50 & 0x28); // Undocumented bits 3 and 5
AF.Low = flags50;
return 12;
}
case 0x41: // OUT (C), B
_simpleIoBus.WritePort(BC.Word, BC.High);
return 12;