mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 15:31:09 +00:00
Attempted to ensure proper CRC generation for FM-format input.
This commit is contained in:
parent
8cd1575891
commit
720b1e5802
@ -89,10 +89,33 @@ class FMEncoder: public Encoder {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_index_address_mark() { output_short(FMIndexAddressMark); }
|
void add_index_address_mark()
|
||||||
void add_ID_address_mark() { output_short(FMIDAddressMark); }
|
{
|
||||||
void add_data_address_mark() { output_short(FMDataAddressMark); }
|
crc_generator_.reset();
|
||||||
void add_deleted_data_address_mark() { output_short(FMDeletedDataAddressMark); }
|
crc_generator_.add(MFMIndexAddressByte);
|
||||||
|
output_short(FMIndexAddressMark);
|
||||||
|
}
|
||||||
|
|
||||||
|
void add_ID_address_mark()
|
||||||
|
{
|
||||||
|
crc_generator_.reset();
|
||||||
|
crc_generator_.add(MFMIDAddressByte);
|
||||||
|
output_short(FMIDAddressMark);
|
||||||
|
}
|
||||||
|
|
||||||
|
void add_data_address_mark()
|
||||||
|
{
|
||||||
|
crc_generator_.reset();
|
||||||
|
crc_generator_.add(MFMDataAddressByte);
|
||||||
|
output_short(FMDataAddressMark);
|
||||||
|
}
|
||||||
|
|
||||||
|
void add_deleted_data_address_mark()
|
||||||
|
{
|
||||||
|
crc_generator_.reset();
|
||||||
|
crc_generator_.add(MFMDeletedDataAddressByte);
|
||||||
|
output_short(FMDeletedDataAddressMark);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint8_t logarithmic_size_for_size(size_t size)
|
static uint8_t logarithmic_size_for_size(size_t size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user