Track representation
Tracks expose encoded bytes, meaningful bit lengths, index positions and feature flags. AlignTracksToWord = false retains exact bit lengths; its default is true.
Amiga disk-image library
A .NET 10 library for ADF, extended ADF, ADZ, DMS, IPF and SCP images. The managed SPS/CAPS IPF decoder exposes encoded track data and a best-effort AmigaDOS sector view for emulator hosts and disk tools.
IpfDecoder.Decode returns an IpfDiskImage containing individual IpfTrack objects. It supports CAPS/SPS container encoders, MFM/raw track blocks and stored IPF gap streams. Encoded track access retains nonstandard disk layouts that cannot be represented by ordinary sector ADF images.
Tracks expose encoded bytes, meaningful bit lengths, index positions and feature flags. AlignTracksToWord = false retains exact bit lengths; its default is true.
AmigaDiskLoader returns IAmigaSectorDiskMedia with encoded track access and decoded AmigaDOS sectors. IpfDecoder provides the IPF-specific model directly.
The implementation is managed C#, targets .NET 10 and has no external runtime dependencies. A native CAPS library is not required.
| Property | Type | Meaning |
|---|---|---|
EncodedData | ReadOnlyMemory<byte> | View over the encoded track bytes. |
BitLength | int | Number of meaningful bits in the byte buffer. |
StartBit | int | Index bit position in the decoded stream. |
Features | AmigaTrackFeatures | Preserved-track, weak-data and other stream flags. |
Regions | IReadOnlyList<AmigaTrackRegion> | Feature-marked spans, with start and length expressed in bits. |
Use the .NET 10 SDK. The stable 3.0.0 package includes the IPF decoder and density timing metadata.
dotnet add package CopperDisk --version 3.0.0
Source code and the API guide are maintained in the CopperScreen repository.
using CopperDisk;
var image = IpfDecoder.Decode(
File.ReadAllBytes("disk.ipf"),
new IpfDecodeOptions
{
AlignTracksToWord = false,
StartAtIndex = true
});
foreach (var track in image.Tracks)
{
Console.WriteLine(
$"{track.Cylinder}/{track.Head}: {track.BitLength} bits");
}
AmigaDiskLoader.Load("disk.ipf") loads file-backed media; FromIpfBytes accepts in-memory data. Both accept optional IpfDecodeOptions. ZIP loading accepts an archive containing exactly one supported disk image.
The common media API supports sector images, preserved tracks and Amiga DD flux captures.
| Format | Support | Access |
|---|---|---|
| IPF | SPS/CAPS encoded tracks | Read-only |
| ADF | Standard 880 KiB sectors | Read / write |
| Extended ADF | Modern UAE-1ADF tracks | Read-only |
| ADZ | Gzip-compressed ADF | Read-only |
| DMS | Unencrypted standard DD images | Read-only |
| SCP | Amiga DD flux captures | Read-only |
| ZIP | Exactly one supported image | Matches image |
IPF loading is read-only. The decoder supports the SPS/CAPS stream forms used by CopperScreen; unknown encoders and malformed streams fail explicitly.
Weak-data bytes are materialized deterministically and marked as approximate. Emulator hosts must handle weak-region variation and controller timing. Successful decoding alone does not guarantee that every copy-protection scheme will work.
The AmigaDOS sector view is best-effort: unreadable sectors are zero-filled. Check HasCompleteDecodedSectorData before treating it as a complete sector image.