WIP implementing TZX support

This commit is contained in:
2026-04-30 17:43:20 +01:00
parent 5c7ccc02ff
commit bf3d7d228a
5 changed files with 101 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Core.Io;
namespace Core.Io
{
@@ -7,6 +8,7 @@ namespace Core.Io
{
private Queue<byte[]> _blocks = new Queue<byte[]>();
private byte[] _currentBlock;
private List<TzxBlock> _tzxBlocks = new List<TzxBlock>();
// State Machine Tracking
private enum TapeState { Idle, Pilot, Sync1, Sync2, Data, Pause }
@@ -204,5 +206,13 @@ namespace Core.Io
_currentBlock = null;
return _blocks.Count > 0 ? _blocks.Dequeue() : null;
}
public void LoadTzxData(List<TzxBlock> blocks)
{
_tzxBlocks = blocks;
// Just to prove it works before we build the State Machine!
System.Diagnostics.Debug.WriteLine($"Successfully loaded {_tzxBlocks.Count} TZX blocks!");
}
}
}