mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-22 14:30:29 +00:00
Defaults
can now be private.
This commit is contained in:
parent
e79727d30d
commit
bfd6543067
@ -28,6 +28,50 @@ std::vector<const Sector *> sector_pointers(const std::vector<Sector> §ors)
|
||||
return pointers;
|
||||
}
|
||||
|
||||
template <Density density> struct Defaults;
|
||||
template <> struct Defaults<Density::Single> {
|
||||
static constexpr size_t expected_track_bytes = 6250;
|
||||
|
||||
static constexpr size_t post_index_address_mark_bytes = 26;
|
||||
static constexpr uint8_t post_index_address_mark_value = 0xff;
|
||||
|
||||
static constexpr size_t pre_address_mark_bytes = 6;
|
||||
static constexpr size_t post_address_address_mark_bytes = 11;
|
||||
static constexpr uint8_t post_address_address_mark_value = 0xff;
|
||||
|
||||
static constexpr size_t pre_data_mark_bytes = 6;
|
||||
static constexpr size_t post_data_bytes = 27;
|
||||
static constexpr uint8_t post_data_value = 0xff;
|
||||
};
|
||||
template <> struct Defaults<Density::Double> {
|
||||
static constexpr size_t expected_track_bytes = 12500;
|
||||
|
||||
static constexpr size_t post_index_address_mark_bytes = 50;
|
||||
static constexpr uint8_t post_index_address_mark_value = 0x4e;
|
||||
|
||||
static constexpr size_t pre_address_mark_bytes = 12;
|
||||
static constexpr size_t post_address_address_mark_bytes = 22;
|
||||
static constexpr uint8_t post_address_address_mark_value = 0x4e;
|
||||
|
||||
static constexpr size_t pre_data_mark_bytes = 12;
|
||||
static constexpr size_t post_data_bytes = 54;
|
||||
static constexpr uint8_t post_data_value = 0xff;
|
||||
};
|
||||
template <> struct Defaults<Density::High> {
|
||||
static constexpr size_t expected_track_bytes = 25000;
|
||||
|
||||
static constexpr size_t post_index_address_mark_bytes = 50;
|
||||
static constexpr uint8_t post_index_address_mark_value = 0x4e;
|
||||
|
||||
static constexpr size_t pre_address_mark_bytes = 12;
|
||||
static constexpr size_t post_address_address_mark_bytes = 22;
|
||||
static constexpr uint8_t post_address_address_mark_value = 0x4e;
|
||||
|
||||
static constexpr size_t pre_data_mark_bytes = 12;
|
||||
static constexpr size_t post_data_bytes = 54;
|
||||
static constexpr uint8_t post_data_value = 0xff;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
enum class SurfaceItem {
|
||||
|
@ -21,50 +21,6 @@
|
||||
|
||||
namespace Storage::Encodings::MFM {
|
||||
|
||||
template <Density density> struct Defaults;
|
||||
template <> struct Defaults<Density::Single> {
|
||||
static constexpr size_t expected_track_bytes = 6250;
|
||||
|
||||
static constexpr size_t post_index_address_mark_bytes = 26;
|
||||
static constexpr uint8_t post_index_address_mark_value = 0xff;
|
||||
|
||||
static constexpr size_t pre_address_mark_bytes = 6;
|
||||
static constexpr size_t post_address_address_mark_bytes = 11;
|
||||
static constexpr uint8_t post_address_address_mark_value = 0xff;
|
||||
|
||||
static constexpr size_t pre_data_mark_bytes = 6;
|
||||
static constexpr size_t post_data_bytes = 27;
|
||||
static constexpr uint8_t post_data_value = 0xff;
|
||||
};
|
||||
template <> struct Defaults<Density::Double> {
|
||||
static constexpr size_t expected_track_bytes = 12500;
|
||||
|
||||
static constexpr size_t post_index_address_mark_bytes = 50;
|
||||
static constexpr uint8_t post_index_address_mark_value = 0x4e;
|
||||
|
||||
static constexpr size_t pre_address_mark_bytes = 12;
|
||||
static constexpr size_t post_address_address_mark_bytes = 22;
|
||||
static constexpr uint8_t post_address_address_mark_value = 0x4e;
|
||||
|
||||
static constexpr size_t pre_data_mark_bytes = 12;
|
||||
static constexpr size_t post_data_bytes = 54;
|
||||
static constexpr uint8_t post_data_value = 0xff;
|
||||
};
|
||||
template <> struct Defaults<Density::High> {
|
||||
static constexpr size_t expected_track_bytes = 25000;
|
||||
|
||||
static constexpr size_t post_index_address_mark_bytes = 50;
|
||||
static constexpr uint8_t post_index_address_mark_value = 0x4e;
|
||||
|
||||
static constexpr size_t pre_address_mark_bytes = 12;
|
||||
static constexpr size_t post_address_address_mark_bytes = 22;
|
||||
static constexpr uint8_t post_address_address_mark_value = 0x4e;
|
||||
|
||||
static constexpr size_t pre_data_mark_bytes = 12;
|
||||
static constexpr size_t post_data_bytes = 54;
|
||||
static constexpr uint8_t post_data_value = 0xff;
|
||||
};
|
||||
|
||||
/*!
|
||||
Converts a vector of sectors into a properly-encoded FM or MFM track.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user