Added some undocumented LD IY OpCodes

This commit is contained in:
2026-04-27 21:56:42 +01:00
parent e6cb1facf6
commit 705ac6f153

View File

@@ -1897,6 +1897,9 @@ namespace Core.Cpu
case 0x7C: // LD A, IXH
AF.High = IX.High;
return 8;
case 0x7D: // LD A, IXL
AF.High = IX.Low;
return 8;
case 0x7E: // LD A, (IX+d)
sbyte offset7E = (sbyte)FetchByte();
ushort address7E = (ushort)(IX.Word + offset7E);
@@ -2222,6 +2225,13 @@ namespace Core.Cpu
ushort targetAddr = (ushort)(IY.Word + displacementVal);
HL.Low = ReadMemory(targetAddr);
return 19;
case 0x70: // LD (IY+d), B
{
sbyte offset70 = (sbyte)FetchByte();
ushort address70 = (ushort)(IY.Word + offset70);
WriteMemory(address70, BC.High);
return 19;
}
case 0x71: // LD (IY+d), C
{
sbyte offset71 = (sbyte)FetchByte();
@@ -2332,6 +2342,18 @@ namespace Core.Cpu
case 0x63: IY.High = DE.Low; return 8; // LD IYH, E
case 0x64: return 8; // LD IYH, IYH
case 0x65: IY.High = IY.Low; return 8; // LD IYH, IYL
case 0x67: // LD IYH, A
IY.High = AF.High;
return 8;
case 0x6F: // LD IYL, A
IY.Low = AF.High;
return 8;
case 0x7C: // LD A, IYH
AF.High = IY.High;
return 8;
case 0x7D: // LD A, IYL
AF.High = IY.Low;
return 8;
case 0x68: IY.Low = BC.High; return 8; // LD IYL, B
case 0x69: IY.Low = BC.Low; return 8; // LD IYL, C
case 0x6A: IY.Low = DE.High; return 8; // LD IYL, D