mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Added: write_id_data_joiner
can now be instructed not to write the first portion of gap. Which makes more sense as an option, to avoiding splicing errors.
This commit is contained in:
parent
9d77f33611
commit
944222eba4
@ -199,15 +199,15 @@ void MFMController::write_id_joiner() {
|
||||
}
|
||||
}
|
||||
|
||||
void MFMController::write_id_data_joiner(bool is_deleted) {
|
||||
void MFMController::write_id_data_joiner(bool is_deleted, bool skip_first_gap) {
|
||||
if(get_is_double_density()) {
|
||||
write_n_bytes(22, 0x4e);
|
||||
if(!skip_first_gap) write_n_bytes(22, 0x4e);
|
||||
write_n_bytes(12, 0x00);
|
||||
for(int c = 0; c < 3; c++) write_raw_short(Storage::Encodings::MFM::MFMSync);
|
||||
get_crc_generator().set_value(Storage::Encodings::MFM::MFMPostSyncCRCValue);
|
||||
write_byte(is_deleted ? Storage::Encodings::MFM::DeletedDataAddressByte : Storage::Encodings::MFM::DataAddressByte);
|
||||
} else {
|
||||
write_n_bytes(11, 0xff);
|
||||
if(!skip_first_gap) write_n_bytes(11, 0xff);
|
||||
write_n_bytes(6, 0x00);
|
||||
get_crc_generator().reset();
|
||||
get_crc_generator().add(is_deleted ? Storage::Encodings::MFM::DeletedDataAddressByte : Storage::Encodings::MFM::DataAddressByte);
|
||||
@ -227,7 +227,7 @@ void MFMController::write_start_of_track() {
|
||||
if(get_is_double_density()) {
|
||||
write_n_bytes(80, 0x4e);
|
||||
write_n_bytes(12, 0x00);
|
||||
for(int c = 0; c < 3; c++) write_raw_short(Storage::Encodings::MFM::MFMIndexSync);
|
||||
for(int c = 0; c < 3; c++) write_raw_short(Storage::Encodings::MFM::MFMIndexSync);
|
||||
write_byte(Storage::Encodings::MFM::IndexAddressByte);
|
||||
write_n_bytes(50, 0x4e);
|
||||
} else {
|
||||
|
@ -125,11 +125,12 @@ class MFMController: public Controller {
|
||||
void write_id_joiner();
|
||||
|
||||
/*!
|
||||
Writes everything that should, per the spec, appear after the ID's CRC, up to and
|
||||
Writes at most what should, per the spec, appear after the ID's CRC, up to and
|
||||
including the mark that indicates the beginning of data, appropriately seeding
|
||||
the CRC generator.
|
||||
the CRC generator; if @c skip_first_gap is set then the initial gap after the
|
||||
CRC isn't written.
|
||||
*/
|
||||
void write_id_data_joiner(bool is_deleted);
|
||||
void write_id_data_joiner(bool is_deleted, bool skip_first_gap);
|
||||
|
||||
/*!
|
||||
Writes the gap expected after a sector's data CRC and before the beginning of the
|
||||
|
Loading…
Reference in New Issue
Block a user