WIP implementing TZX support
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user