using System.Diagnostics; using Core.Interfaces; namespace Core.Io { public class SimpleIoBus : IIoBus { public byte Read(ushort port) { // If the CPU reads an unconnected port, the Z80 usually sees 0xFF return 0xFF; } public void Write(ushort port, byte value) { // For now, let's just log it to the Visual Studio Output window Debug.WriteLine($"Hardware I/O Write -> Port: 0x{port:X4}, Value: 0x{value:X2}"); } } }