Sound fixed and complete. More OpCodes to implement

This commit is contained in:
2026-04-21 17:12:42 +01:00
parent b6eb77318d
commit a63152b04d
4 changed files with 69 additions and 5 deletions

View File

@@ -2181,6 +2181,28 @@ namespace Core.Cpu
// 3. Read the byte from memory and drop it into the L register (Low byte of HL)
HL.Low = ReadMemory(address6E);
return 19;
case 0x70: // LD (IX+d), B
// 1. Fetch the displacement byte and cast it to a signed sbyte
sbyte offset70 = (sbyte)FetchByte();
// 2. Calculate the exact memory address (IX + offset)
ushort address70 = (ushort)(IX.Word + offset70);
// 3. Write the B register (High byte of BC) into memory
WriteMemory(address70, BC.High);
return 19;
case 0x71: // LD (IX+d), C
// 1. Fetch the displacement byte and cast it to a signed sbyte
sbyte offset71 = (sbyte)FetchByte();
// 2. Calculate the exact memory address (IX + offset)
ushort address71 = (ushort)(IX.Word + offset71);
// 3. Write the C register (Low byte of BC) into memory
WriteMemory(address71, BC.Low);
return 19;
case 0x72: // LD (IX+d), D
// 1. Fetch the displacement byte and cast to a signed sbyte
@@ -2508,7 +2530,17 @@ namespace Core.Cpu
// 3. Write the contents of the D register (High byte of DE) into memory
WriteMemory(address72, DE.High);
return 19; // 19 T-States
return 19;
case 0x73: // LD (IY+d), E
// 1. Fetch the displacement byte and cast it to a signed sbyte
sbyte offset73 = (sbyte)FetchByte();
// 2. Calculate the exact memory address (IY + offset)
ushort address73 = (ushort)(IY.Word + offset73);
// 3. Write the contents of the E register (Low byte of DE) into memory
WriteMemory(address73, DE.Low);
return 19;
case 0x74: // LD (IY+d), H
// 1. Fetch the displacement byte and cast it to a signed sbyte
sbyte offset74 = (sbyte)FetchByte();