Force density setting for D88/NFD.

This fixes #560 (partially).

I do not understand how the protobuf parsing stuff works enough
to make it detect optional fields.
This commit is contained in:
Thomas Daede
2022-10-01 18:21:05 -07:00
parent 2f4f2083ba
commit 69c60c4026
2 changed files with 5 additions and 8 deletions

View File

@@ -65,19 +65,15 @@ public:
int clockRate = 500;
if (mediaFlag == 0x20)
{
Logger() << "D88: high density mode";
if (!config.drive().has_drive())
Logger() << "D88: forcing high density mode";
config.mutable_drive()->set_high_density(true);
if (!config.has_tpi())
config.set_tpi(96);
}
else
{
Logger() << "D88: single/double density mode";
Logger() << "D88: forcing single/double density mode";
clockRate = 300;
if (!config.drive().has_drive())
config.mutable_drive()->set_high_density(false);
if (!config.has_tpi())
config.set_tpi(48);
}

View File

@@ -57,8 +57,9 @@ public:
auto ibm = config.mutable_encoder()->mutable_ibm();
auto layout = config.mutable_layout();
Logger() << "NFD: HD 1.2MB mode";
if (!config.drive().has_drive())
config.mutable_drive()->set_high_density(true);
Logger() << "NFD: forcing hign density mode";
config.mutable_drive()->set_high_density(true);
config.set_tpi(96);
std::unique_ptr<Image> image(new Image);
for (int track = 0; track < 163; track++)