mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Hopefully get the imagereader/imagewriter and IBM encoder/decoders using sector
IDs.
This commit is contained in:
@@ -140,7 +140,7 @@ public:
|
||||
br.read_8(); /* skip ID byte */
|
||||
_sector->logicalTrack = br.read_8();
|
||||
_sector->logicalSide = br.read_8();
|
||||
_sector->logicalSector = br.read_8() - _config.sector_id_base();
|
||||
_sector->logicalSector = br.read_8();
|
||||
_currentSectorSize = 1 << (br.read_8() + 7);
|
||||
uint16_t wantCrc = br.read_be16();
|
||||
uint16_t gotCrc = crc16(CCITT_POLY, bytes.slice(0, _currentHeaderLength + 5));
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
bw.write_8(idamUnencoded);
|
||||
bw.write_8(sectorData->logicalTrack);
|
||||
bw.write_8(sectorData->logicalSide);
|
||||
bw.write_8(sectorData->logicalSector + trackdata.start_sector_id());
|
||||
bw.write_8(sectorData->logicalSector);
|
||||
bw.write_8(sectorSize);
|
||||
uint16_t crc = crc16(CCITT_POLY, header);
|
||||
bw.write_be16(crc);
|
||||
|
||||
@@ -8,7 +8,6 @@ message IbmDecoderProto {
|
||||
repeated int32 sector = 1 [(help) = "require these sectors to exist for a good read"];
|
||||
}
|
||||
|
||||
optional int32 sector_id_base = 1 [default = 1, (help) = "ID of first sector"];
|
||||
optional bool ignore_side_byte = 2 [default = false, (help) = "ignore side byte in sector header"];
|
||||
optional bool swap_sides = 4 [default = false, (help) = "swap side bytes when reading"];
|
||||
optional SectorsProto sectors = 5 [(help) = "require these sectors to exist for a good read"];
|
||||
@@ -27,7 +26,6 @@ message IbmEncoderProto {
|
||||
optional double track_length_ms = 1 [(help) = "length of track"];
|
||||
optional int32 sector_size = 2 [default=512, (help) = "number of bytes per sector"];
|
||||
optional bool emit_iam = 3 [default=true, (help) = "whether to emit an IAM record"];
|
||||
optional int32 start_sector_id = 4 [default=1, (help) = "ID of first sector"];
|
||||
optional double clock_rate_khz = 5 [(help) = "data clock rate"];
|
||||
optional bool use_fm = 6 [default=false, (help) = "whether to use FM encoding rather than MFM"];
|
||||
optional int32 idam_byte = 7 [default=0x5554, (help) = "16-bit raw bit pattern of IDAM byte"];
|
||||
|
||||
Reference in New Issue
Block a user