mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +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_ID_address_mark() { output_short(FMIDAddressMark); }
|
||||
void add_data_address_mark() { output_short(FMDataAddressMark); }
|
||||
void add_deleted_data_address_mark() { output_short(FMDeletedDataAddressMark); }
|
||||
void add_index_address_mark()
|
||||
{
|
||||
crc_generator_.reset();
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user