public void WriteLSN(int lsn, byte[] data) { if (lsn == 0) { DiskImage.WriteSector(0, 0, 1, data); } else { int track = lsn / (LogicalSectors * LogicalHeads); int head = (lsn / LogicalSectors) % LogicalHeads; int sector = (lsn % LogicalSectors) + 1; DiskImage.WriteSector(track, head, sector, data); } }
public void WriteSector(int track, int head, int sector, byte[] data) { DiskImage.WriteSector(track, head, sector, data); }