Plus 3A implemented but not running

This commit is contained in:
2026-04-29 23:17:51 +01:00
parent 2767e2220f
commit fc17b16471
5 changed files with 119 additions and 47 deletions

View File

@@ -1,5 +1,6 @@
using Core.Interfaces;
using System.Diagnostics;
using System.Diagnostics;
using Core.Interfaces;
using Core.Memory;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace Core.Io
@@ -11,10 +12,12 @@ namespace Core.Io
public bool BeeperState { get; private set; } = false;
public byte[] KeyboardRows = new byte[8] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
TapManager _tapManager = new TapManager();
MemoryBus _memory;
public IO_Bus(TapManager tapManager)
public IO_Bus(TapManager tapManager, MemoryBus memoryBus)
{
_tapManager = tapManager;
_memory = memoryBus;
}
public byte ReadPort(ushort portAddress)
@@ -64,6 +67,18 @@ namespace Core.Io
// Bit 3 handles the cassette MIC output
}
// 128K Standard Paging Port (0x7FFD)
if ((portAddress & 0x8002) == 0)
{
_memory.HandlePaging(0x7FFD, portValue);
}
// +2A/+3 Extended Paging Port (0x1FFD)
if ((portAddress & 0xF002) == 0x1000)
{
_memory.HandlePaging(0x1FFD, portValue);
}
}
}
}