Implemented a load of Z80 OpCodes. Added SimpleIOBus.
This commit is contained in:
20
Core/Io/SimpleIoBus.cs
Normal file
20
Core/Io/SimpleIoBus.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user