From 42768bf169b71f9080bd77700b2eb31ddb24fb8c Mon Sep 17 00:00:00 2001 From: Rebecca Wallander Date: Fri, 7 Jul 2023 23:00:39 +0200 Subject: [PATCH] Add A2R flux format support --- Interfaces/IFluxImage.cs | 9 +++++++++ Interfaces/IWritableFluxImage.cs | 11 ++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Interfaces/IFluxImage.cs b/Interfaces/IFluxImage.cs index 21a5e12..341f62f 100644 --- a/Interfaces/IFluxImage.cs +++ b/Interfaces/IFluxImage.cs @@ -115,4 +115,13 @@ public interface IFluxImage : IBaseImage /// Which capture to read. See also /// Buffer to store the data in ErrorNumber ReadFluxDataCapture(uint head, ushort track, byte subTrack, uint captureIndex, out byte[] buffer); + + /// + /// An image may have tracks split into sub-steps. This returns the highest sub-step index for the track. + /// + /// Error number + /// Physical head (0-based) + /// Physical track (position of the heads over the floppy media, 0-based) + /// The number of captures + ErrorNumber SubTrackLength(uint head, ushort track, out byte length); } \ No newline at end of file diff --git a/Interfaces/IWritableFluxImage.cs b/Interfaces/IWritableFluxImage.cs index 6b8da1e..0ad95ce 100644 --- a/Interfaces/IWritableFluxImage.cs +++ b/Interfaces/IWritableFluxImage.cs @@ -46,15 +46,16 @@ public interface IWritableFluxImage : IFluxImage, IWritableImage { /// Writes a flux capture. /// Error number - /// The capture's resolution (sample rate) in picoseconds - /// Flux representation of the index signal - /// Flux representation of the data signal + /// The index capture's resolution (sample rate) in picoseconds + /// The capture's resolution (sample rate) in picoseconds + /// Flux representation of the index signal + /// Flux representation of the data signal /// Physical head (0-based) /// Physical track (position of the heads over the floppy media, 0-based) /// Physical sub-step of track (e.g. half-track) /// Which capture slot to write to. See also - ErrorNumber WriteFluxCapture(ulong resolution, byte[] index, byte[] data, uint head, ushort track, byte subTrack, - uint captureIndex); + ErrorNumber WriteFluxCapture(ulong indexResolution, ulong dataResolution, byte[] indexBuffer, byte[] dataBuffer, + uint head, ushort track, byte subTrack, uint captureIndex); /// Writes a capture's index stream. /// Error number