Eliminate the broken tpi system for a simple drive/format type field.

This commit is contained in:
David Given
2023-10-29 21:10:14 +01:00
parent ff1fb761f2
commit 533b217c8f
86 changed files with 1831 additions and 798 deletions

View File

@@ -80,13 +80,14 @@ public:
/* 5.25" with quarter stepping. */
_extraConfig.mutable_drive()->set_tracks(160);
_extraConfig.mutable_drive()->set_heads(1);
_extraConfig.mutable_drive()->set_head_width(4);
_extraConfig.mutable_drive()->set_tpi(48 * 4);
_extraConfig.mutable_drive()->set_drive_type(
DRIVETYPE_APPLE2);
}
else
{
/* 3.5". */
_extraConfig.mutable_drive()->set_tpi(135);
_extraConfig.mutable_drive()->set_drive_type(
DRIVETYPE_80TRACK);
}
Bytes stream = findChunk("STRM");

View File

@@ -39,8 +39,8 @@ public:
_extraConfig.mutable_drive()->set_rotational_period_ms(
_proto.rotational_period_ms());
if (_proto.has_tpi())
_extraConfig.mutable_drive()->set_tpi(_proto.tpi());
if (_proto.has_drive_type())
_extraConfig.mutable_drive()->set_drive_type(_proto.drive_type());
}
public:

View File

@@ -42,8 +42,9 @@ public:
(_header.file_id[2] != 'P'))
error("input not a SCP file");
int tpi = (_header.flags & SCP_FLAG_96TPI) ? 96 : 48;
_extraConfig.mutable_drive()->set_tpi(tpi);
_extraConfig.mutable_drive()->set_drive_type(
(_header.flags & SCP_FLAG_96TPI) ? DRIVETYPE_80TRACK
: DRIVETYPE_40TRACK);
_resolution = 25 * (_header.resolution + 1);
int startSide = (_header.heads == 2) ? 1 : 0;