TZX support fully supported added batman.tzx

This commit is contained in:
2026-05-01 13:31:56 +01:00
parent bf3d7d228a
commit 8efcf00286
5 changed files with 214 additions and 50 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
namespace Core.Io
{
@@ -21,4 +22,34 @@ namespace Core.Io
// The actual tape bytes
public byte[] Data { get; set; } = Array.Empty<byte>();
}
// ID 0x32: Archive Info Block (Metadata)
public class ArchiveInfoBlock : TzxBlock
{
public override int BlockId => 0x32;
// Key: Text ID (e.g., 0 = Full Title, 1 = Software House, 2 = Publisher, 4 = Year)
// Value: The actual text string
public Dictionary<byte, string> Metadata { get; set; } = new Dictionary<byte, string>();
}
// ID 0x11: Turbo Speed Data Block
public class TurboSpeedBlock : TzxBlock
{
public override int BlockId => 0x11;
public ushort PilotPulseLength { get; set; }
public ushort SyncFirstPulseLength { get; set; }
public ushort SyncSecondPulseLength { get; set; }
public ushort ZeroBitPulseLength { get; set; }
public ushort OneBitPulseLength { get; set; }
public ushort PilotToneLength { get; set; }
public byte UsedBitsInLastByte { get; set; }
public ushort PauseAfterMs { get; set; }
// This is a 24-bit integer in the file, so we store it in a standard 32-bit int
public int DataLength { get; set; }
public byte[] Data { get; set; } = Array.Empty<byte>();
}
}