2017-09-25 02:41:16 +00:00
|
|
|
//
|
|
|
|
// SegmentParser.hpp
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 24/09/2017.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2017 Thomas Harte. All rights reserved.
|
2017-09-25 02:41:16 +00:00
|
|
|
//
|
|
|
|
|
2024-01-17 04:34:46 +00:00
|
|
|
#pragma once
|
2017-09-25 02:41:16 +00:00
|
|
|
|
2023-12-11 03:17:23 +00:00
|
|
|
#include "Constants.hpp"
|
2017-09-25 02:41:16 +00:00
|
|
|
#include "Sector.hpp"
|
|
|
|
#include "../../Track/PCMSegment.hpp"
|
|
|
|
#include <map>
|
|
|
|
|
2023-05-10 21:02:18 +00:00
|
|
|
namespace Storage::Encodings::MFM {
|
2017-09-25 02:41:16 +00:00
|
|
|
|
2023-11-29 20:55:37 +00:00
|
|
|
using SectorMap = std::map<std::size_t, Sector>;
|
|
|
|
|
2017-09-25 23:57:11 +00:00
|
|
|
/*!
|
|
|
|
Scans @c segment for all included sectors, returning a set that maps from location within
|
2018-05-05 03:11:12 +00:00
|
|
|
the segment (counted in bits from the beginning and pointing to the location the disk
|
|
|
|
had reached upon detection of the ID mark) to sector.
|
2017-09-25 23:57:11 +00:00
|
|
|
*/
|
2023-12-11 03:17:23 +00:00
|
|
|
SectorMap sectors_from_segment(const Disk::PCMSegment &segment, Density density);
|
2017-09-25 02:41:16 +00:00
|
|
|
|
|
|
|
}
|