mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Rename all the flux and image types to prefix the enums, due to them being in
the global namespace now.
This commit is contained in:
@@ -20,18 +20,35 @@ enum IndexMode {
|
||||
}
|
||||
|
||||
enum FluxSourceSinkType {
|
||||
NOT_SET = 0;
|
||||
A2R = 1;
|
||||
AU = 2;
|
||||
CWF = 3;
|
||||
DRIVE = 4;
|
||||
ERASE = 5;
|
||||
FLUX = 6;
|
||||
FLX = 7;
|
||||
KRYOFLUX = 8;
|
||||
SCP = 9;
|
||||
TEST_PATTERN = 10;
|
||||
VCD = 11;
|
||||
FLUXTYPE_NOT_SET = 0;
|
||||
FLUXTYPE_A2R = 1;
|
||||
FLUXTYPE_AU = 2;
|
||||
FLUXTYPE_CWF = 3;
|
||||
FLUXTYPE_DRIVE = 4;
|
||||
FLUXTYPE_ERASE = 5;
|
||||
FLUXTYPE_FLUX = 6;
|
||||
FLUXTYPE_FLX = 7;
|
||||
FLUXTYPE_KRYOFLUX = 8;
|
||||
FLUXTYPE_SCP = 9;
|
||||
FLUXTYPE_TEST_PATTERN = 10;
|
||||
FLUXTYPE_VCD = 11;
|
||||
}
|
||||
|
||||
enum ImageReaderWriterType {
|
||||
IMAGETYPE_NOT_SET = 0;
|
||||
IMAGETYPE_D64 = 1;
|
||||
IMAGETYPE_D88 = 2;
|
||||
IMAGETYPE_DIM = 3;
|
||||
IMAGETYPE_DISKCOPY = 4;
|
||||
IMAGETYPE_FDI = 5;
|
||||
IMAGETYPE_IMD = 6;
|
||||
IMAGETYPE_IMG = 7;
|
||||
IMAGETYPE_JV3 = 8;
|
||||
IMAGETYPE_LDBS = 9;
|
||||
IMAGETYPE_NFD = 10;
|
||||
IMAGETYPE_NSI = 11;
|
||||
IMAGETYPE_RAW = 12;
|
||||
IMAGETYPE_TD0 = 13;
|
||||
}
|
||||
|
||||
|
||||
|
||||
102
lib/config.cc
102
lib/config.cc
@@ -27,12 +27,12 @@ static const std::vector<FluxConstructor> fluxConstructors = {
|
||||
.source =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::FLUX);
|
||||
proto->set_type(FLUXTYPE_FLUX);
|
||||
proto->mutable_fl2()->set_filename(s);
|
||||
}, .sink =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::FLUX);
|
||||
proto->set_type(FLUXTYPE_FLUX);
|
||||
proto->mutable_fl2()->set_filename(s);
|
||||
}},
|
||||
{
|
||||
@@ -40,63 +40,63 @@ static const std::vector<FluxConstructor> fluxConstructors = {
|
||||
.source =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::SCP);
|
||||
proto->set_type(FLUXTYPE_SCP);
|
||||
proto->mutable_scp()->set_filename(s);
|
||||
}, .sink =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::SCP);
|
||||
proto->set_type(FLUXTYPE_SCP);
|
||||
proto->mutable_scp()->set_filename(s);
|
||||
}, },
|
||||
{.pattern = std::regex("^(.*\\.a2r)$"),
|
||||
.source =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::A2R);
|
||||
proto->set_type(FLUXTYPE_A2R);
|
||||
proto->mutable_a2r()->set_filename(s);
|
||||
}, .sink =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::A2R);
|
||||
proto->set_type(FLUXTYPE_A2R);
|
||||
proto->mutable_a2r()->set_filename(s);
|
||||
}},
|
||||
{.pattern = std::regex("^(.*\\.cwf)$"),
|
||||
.source =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::CWF);
|
||||
proto->set_type(FLUXTYPE_CWF);
|
||||
proto->mutable_cwf()->set_filename(s);
|
||||
}},
|
||||
{.pattern = std::regex("^erase:$"),
|
||||
.source =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::ERASE);
|
||||
proto->set_type(FLUXTYPE_ERASE);
|
||||
}},
|
||||
{.pattern = std::regex("^kryoflux:(.*)$"),
|
||||
.source =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::KRYOFLUX);
|
||||
proto->set_type(FLUXTYPE_KRYOFLUX);
|
||||
proto->mutable_kryoflux()->set_directory(s);
|
||||
}},
|
||||
{.pattern = std::regex("^testpattern:(.*)"),
|
||||
.source =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::TEST_PATTERN);
|
||||
proto->set_type(FLUXTYPE_TEST_PATTERN);
|
||||
}},
|
||||
{.pattern = std::regex("^drive:(.*)"),
|
||||
.source =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::DRIVE);
|
||||
proto->set_type(FLUXTYPE_DRIVE);
|
||||
globalConfig().overrides()->mutable_drive()->set_drive(
|
||||
std::stoi(s));
|
||||
}, .sink =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::DRIVE);
|
||||
proto->set_type(FLUXTYPE_DRIVE);
|
||||
globalConfig().overrides()->mutable_drive()->set_drive(
|
||||
std::stoi(s));
|
||||
}},
|
||||
@@ -104,21 +104,21 @@ static const std::vector<FluxConstructor> fluxConstructors = {
|
||||
.source =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::FLX);
|
||||
proto->set_type(FLUXTYPE_FLX);
|
||||
proto->mutable_flx()->set_directory(s);
|
||||
}},
|
||||
{.pattern = std::regex("^vcd:(.*)$"),
|
||||
.sink =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::VCD);
|
||||
proto->set_type(FLUXTYPE_VCD);
|
||||
proto->mutable_vcd()->set_directory(s);
|
||||
}},
|
||||
{.pattern = std::regex("^au:(.*)$"),
|
||||
.sink =
|
||||
[](auto& s, auto* proto)
|
||||
{
|
||||
proto->set_type(FluxSourceSinkType::AU);
|
||||
proto->set_type(FLUXTYPE_AU);
|
||||
proto->mutable_au()->set_directory(s);
|
||||
}},
|
||||
};
|
||||
@@ -502,23 +502,23 @@ void Config::setImageReader(std::string filename)
|
||||
static const std::map<std::string, std::function<void(ImageReaderProto*)>>
|
||||
formats = {
|
||||
// clang-format off
|
||||
{".adf", [](auto* proto) { proto->set_type(ImageReaderProto::IMG); }},
|
||||
{".d64", [](auto* proto) { proto->set_type(ImageReaderProto::D64); }},
|
||||
{".d81", [](auto* proto) { proto->set_type(ImageReaderProto::IMG); }},
|
||||
{".d88", [](auto* proto) { proto->set_type(ImageReaderProto::D88); }},
|
||||
{".dim", [](auto* proto) { proto->set_type(ImageReaderProto::DIM); }},
|
||||
{".diskcopy", [](auto* proto) { proto->set_type(ImageReaderProto::DISKCOPY); }},
|
||||
{".dsk", [](auto* proto) { proto->set_type(ImageReaderProto::IMG); }},
|
||||
{".fdi", [](auto* proto) { proto->set_type(ImageReaderProto::FDI); }},
|
||||
{".imd", [](auto* proto) { proto->set_type(ImageReaderProto::IMD); }},
|
||||
{".img", [](auto* proto) { proto->set_type(ImageReaderProto::IMG); }},
|
||||
{".jv3", [](auto* proto) { proto->set_type(ImageReaderProto::JV3); }},
|
||||
{".nfd", [](auto* proto) { proto->set_type(ImageReaderProto::NFD); }},
|
||||
{".nsi", [](auto* proto) { proto->set_type(ImageReaderProto::NSI); }},
|
||||
{".st", [](auto* proto) { proto->set_type(ImageReaderProto::IMG); }},
|
||||
{".td0", [](auto* proto) { proto->set_type(ImageReaderProto::TD0); }},
|
||||
{".vgi", [](auto* proto) { proto->set_type(ImageReaderProto::IMG); }},
|
||||
{".xdf", [](auto* proto) { proto->set_type(ImageReaderProto::IMG); }},
|
||||
{".adf", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".d64", [](auto* proto) { proto->set_type(IMAGETYPE_D64); }},
|
||||
{".d81", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".d88", [](auto* proto) { proto->set_type(IMAGETYPE_D88); }},
|
||||
{".dim", [](auto* proto) { proto->set_type(IMAGETYPE_DIM); }},
|
||||
{".diskcopy", [](auto* proto) { proto->set_type(IMAGETYPE_DISKCOPY); }},
|
||||
{".dsk", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".fdi", [](auto* proto) { proto->set_type(IMAGETYPE_FDI); }},
|
||||
{".imd", [](auto* proto) { proto->set_type(IMAGETYPE_IMD); }},
|
||||
{".img", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".jv3", [](auto* proto) { proto->set_type(IMAGETYPE_JV3); }},
|
||||
{".nfd", [](auto* proto) { proto->set_type(IMAGETYPE_NFD); }},
|
||||
{".nsi", [](auto* proto) { proto->set_type(IMAGETYPE_NSI); }},
|
||||
{".st", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".td0", [](auto* proto) { proto->set_type(IMAGETYPE_TD0); }},
|
||||
{".vgi", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".xdf", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -540,20 +540,20 @@ void Config::setImageWriter(std::string filename)
|
||||
static const std::map<std::string, std::function<void(ImageWriterProto*)>>
|
||||
formats = {
|
||||
// clang-format off
|
||||
{".adf", [](auto* proto) { proto->set_type(ImageWriterProto::IMG); }},
|
||||
{".d64", [](auto* proto) { proto->set_type(ImageWriterProto::D64); }},
|
||||
{".d81", [](auto* proto) { proto->set_type(ImageWriterProto::IMG); }},
|
||||
{".d88", [](auto* proto) { proto->set_type(ImageWriterProto::D88); }},
|
||||
{".diskcopy", [](auto* proto) { proto->set_type(ImageWriterProto::DISKCOPY); }},
|
||||
{".dsk", [](auto* proto) { proto->set_type(ImageWriterProto::IMG); }},
|
||||
{".img", [](auto* proto) { proto->set_type(ImageWriterProto::IMG); }},
|
||||
{".imd", [](auto* proto) { proto->set_type(ImageWriterProto::IMD); }},
|
||||
{".ldbs", [](auto* proto) { proto->set_type(ImageWriterProto::LDBS); }},
|
||||
{".nsi", [](auto* proto) { proto->set_type(ImageWriterProto::NSI); }},
|
||||
{".raw", [](auto* proto) { proto->set_type(ImageWriterProto::RAW); }},
|
||||
{".st", [](auto* proto) { proto->set_type(ImageWriterProto::IMG); }},
|
||||
{".vgi", [](auto* proto) { proto->set_type(ImageWriterProto::IMG); }},
|
||||
{".xdf", [](auto* proto) { proto->set_type(ImageWriterProto::IMG); }},
|
||||
{".adf", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".d64", [](auto* proto) { proto->set_type(IMAGETYPE_D64); }},
|
||||
{".d81", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".d88", [](auto* proto) { proto->set_type(IMAGETYPE_D88); }},
|
||||
{".diskcopy", [](auto* proto) { proto->set_type(IMAGETYPE_DISKCOPY); }},
|
||||
{".dsk", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".img", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".imd", [](auto* proto) { proto->set_type(IMAGETYPE_IMD); }},
|
||||
{".ldbs", [](auto* proto) { proto->set_type(IMAGETYPE_LDBS); }},
|
||||
{".nsi", [](auto* proto) { proto->set_type(IMAGETYPE_NSI); }},
|
||||
{".raw", [](auto* proto) { proto->set_type(IMAGETYPE_RAW); }},
|
||||
{".st", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".vgi", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
{".xdf", [](auto* proto) { proto->set_type(IMAGETYPE_IMG); }},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -572,7 +572,7 @@ void Config::setImageWriter(std::string filename)
|
||||
|
||||
bool Config::hasFluxSource()
|
||||
{
|
||||
return (*this)->flux_source().type() != FluxSourceSinkType::NOT_SET;
|
||||
return (*this)->flux_source().type() != FLUXTYPE_NOT_SET;
|
||||
}
|
||||
|
||||
std::shared_ptr<FluxSource>& Config::getFluxSource()
|
||||
@@ -590,7 +590,7 @@ std::shared_ptr<FluxSource>& Config::getFluxSource()
|
||||
|
||||
bool Config::hasVerificationFluxSource() const
|
||||
{
|
||||
return _verificationFluxSourceProto.type() != FluxSourceSinkType::NOT_SET;
|
||||
return _verificationFluxSourceProto.type() != FLUXTYPE_NOT_SET;
|
||||
}
|
||||
|
||||
std::shared_ptr<FluxSource>& Config::getVerificationFluxSource()
|
||||
@@ -608,7 +608,7 @@ std::shared_ptr<FluxSource>& Config::getVerificationFluxSource()
|
||||
|
||||
bool Config::hasImageReader()
|
||||
{
|
||||
return (*this)->image_reader().type() != ImageReaderProto::NOT_SET;
|
||||
return (*this)->image_reader().type() != IMAGETYPE_NOT_SET;
|
||||
}
|
||||
|
||||
std::shared_ptr<ImageReader>& Config::getImageReader()
|
||||
@@ -626,7 +626,7 @@ std::shared_ptr<ImageReader>& Config::getImageReader()
|
||||
|
||||
bool Config::hasFluxSink()
|
||||
{
|
||||
return (*this)->flux_sink().type() != FluxSourceSinkType::NOT_SET;
|
||||
return (*this)->flux_sink().type() != FLUXTYPE_NOT_SET;
|
||||
}
|
||||
|
||||
std::unique_ptr<FluxSink> Config::getFluxSink()
|
||||
@@ -639,7 +639,7 @@ std::unique_ptr<FluxSink> Config::getFluxSink()
|
||||
|
||||
bool Config::hasImageWriter()
|
||||
{
|
||||
return (*this)->image_writer().type() != ImageWriterProto::NOT_SET;
|
||||
return (*this)->image_writer().type() != IMAGETYPE_NOT_SET;
|
||||
}
|
||||
|
||||
std::unique_ptr<ImageWriter> Config::getImageWriter()
|
||||
|
||||
@@ -10,22 +10,22 @@ std::unique_ptr<FluxSink> FluxSink::create(const FluxSinkProto& config)
|
||||
{
|
||||
switch (config.type())
|
||||
{
|
||||
case FluxSourceSinkType::DRIVE:
|
||||
case FLUXTYPE_DRIVE:
|
||||
return createHardwareFluxSink(config.drive());
|
||||
|
||||
case FluxSourceSinkType::A2R:
|
||||
case FLUXTYPE_A2R:
|
||||
return createA2RFluxSink(config.a2r());
|
||||
|
||||
case FluxSourceSinkType::AU:
|
||||
case FLUXTYPE_AU:
|
||||
return createAuFluxSink(config.au());
|
||||
|
||||
case FluxSourceSinkType::VCD:
|
||||
case FLUXTYPE_VCD:
|
||||
return createVcdFluxSink(config.vcd());
|
||||
|
||||
case FluxSourceSinkType::SCP:
|
||||
case FLUXTYPE_SCP:
|
||||
return createScpFluxSink(config.scp());
|
||||
|
||||
case FluxSourceSinkType::FLUX:
|
||||
case FLUXTYPE_FLUX:
|
||||
return createFl2FluxSink(config.fl2());
|
||||
|
||||
default:
|
||||
|
||||
@@ -29,7 +29,8 @@ message Fl2FluxSinkProto {
|
||||
|
||||
// Next: 10
|
||||
message FluxSinkProto {
|
||||
optional FluxSourceSinkType type = 9 [default = NOT_SET, (help) = "flux sink type"];
|
||||
optional FluxSourceSinkType type = 9
|
||||
[default = FLUXTYPE_NOT_SET, (help) = "flux sink type"];
|
||||
|
||||
optional HardwareFluxSinkProto drive = 2;
|
||||
optional A2RFluxSinkProto a2r = 8;
|
||||
|
||||
@@ -10,31 +10,31 @@ std::unique_ptr<FluxSource> FluxSource::create(const FluxSourceProto& config)
|
||||
{
|
||||
switch (config.type())
|
||||
{
|
||||
case FluxSourceSinkType::DRIVE:
|
||||
case FLUXTYPE_DRIVE:
|
||||
return createHardwareFluxSource(config.drive());
|
||||
|
||||
case FluxSourceSinkType::ERASE:
|
||||
case FLUXTYPE_ERASE:
|
||||
return createEraseFluxSource(config.erase());
|
||||
|
||||
case FluxSourceSinkType::KRYOFLUX:
|
||||
case FLUXTYPE_KRYOFLUX:
|
||||
return createKryofluxFluxSource(config.kryoflux());
|
||||
|
||||
case FluxSourceSinkType::TEST_PATTERN:
|
||||
case FLUXTYPE_TEST_PATTERN:
|
||||
return createTestPatternFluxSource(config.test_pattern());
|
||||
|
||||
case FluxSourceSinkType::SCP:
|
||||
case FLUXTYPE_SCP:
|
||||
return createScpFluxSource(config.scp());
|
||||
|
||||
case FluxSourceSinkType::A2R:
|
||||
case FLUXTYPE_A2R:
|
||||
return createA2rFluxSource(config.a2r());
|
||||
|
||||
case FluxSourceSinkType::CWF:
|
||||
case FLUXTYPE_CWF:
|
||||
return createCwfFluxSource(config.cwf());
|
||||
|
||||
case FluxSourceSinkType::FLUX:
|
||||
case FLUXTYPE_FLUX:
|
||||
return createFl2FluxSource(config.fl2());
|
||||
|
||||
case FluxSourceSinkType::FLX:
|
||||
case FLUXTYPE_FLX:
|
||||
return createFlxFluxSource(config.flx());
|
||||
|
||||
default:
|
||||
|
||||
@@ -41,7 +41,8 @@ message FlxFluxSourceProto {
|
||||
|
||||
// NEXT: 12
|
||||
message FluxSourceProto {
|
||||
optional FluxSourceSinkType type = 9 [default = NOT_SET, (help) = "flux source type"];
|
||||
optional FluxSourceSinkType type = 9
|
||||
[default = FLUXTYPE_NOT_SET, (help) = "flux source type"];
|
||||
|
||||
optional A2rFluxSourceProto a2r = 11;
|
||||
optional CwfFluxSourceProto cwf = 7;
|
||||
|
||||
@@ -15,37 +15,37 @@ std::unique_ptr<ImageReader> ImageReader::create(const ImageReaderProto& config)
|
||||
{
|
||||
switch (config.type())
|
||||
{
|
||||
case ImageReaderProto::DIM:
|
||||
case IMAGETYPE_DIM:
|
||||
return ImageReader::createDimImageReader(config);
|
||||
|
||||
case ImageReaderProto::D88:
|
||||
case IMAGETYPE_D88:
|
||||
return ImageReader::createD88ImageReader(config);
|
||||
|
||||
case ImageReaderProto::FDI:
|
||||
case IMAGETYPE_FDI:
|
||||
return ImageReader::createFdiImageReader(config);
|
||||
|
||||
case ImageReaderProto::IMD:
|
||||
case IMAGETYPE_IMD:
|
||||
return ImageReader::createIMDImageReader(config);
|
||||
|
||||
case ImageReaderProto::IMG:
|
||||
case IMAGETYPE_IMG:
|
||||
return ImageReader::createImgImageReader(config);
|
||||
|
||||
case ImageReaderProto::DISKCOPY:
|
||||
case IMAGETYPE_DISKCOPY:
|
||||
return ImageReader::createDiskCopyImageReader(config);
|
||||
|
||||
case ImageReaderProto::JV3:
|
||||
case IMAGETYPE_JV3:
|
||||
return ImageReader::createJv3ImageReader(config);
|
||||
|
||||
case ImageReaderProto::D64:
|
||||
case IMAGETYPE_D64:
|
||||
return ImageReader::createD64ImageReader(config);
|
||||
|
||||
case ImageReaderProto::NFD:
|
||||
case IMAGETYPE_NFD:
|
||||
return ImageReader::createNFDImageReader(config);
|
||||
|
||||
case ImageReaderProto::NSI:
|
||||
case IMAGETYPE_NSI:
|
||||
return ImageReader::createNsiImageReader(config);
|
||||
|
||||
case ImageReaderProto::TD0:
|
||||
case IMAGETYPE_TD0:
|
||||
return ImageReader::createTd0ImageReader(config);
|
||||
|
||||
default:
|
||||
|
||||
@@ -24,22 +24,8 @@ message ImageReaderProto
|
||||
default = false
|
||||
];
|
||||
|
||||
enum ImageReaderType {
|
||||
NOT_SET = 0;
|
||||
IMG = 1;
|
||||
DISKCOPY = 2;
|
||||
IMD = 3;
|
||||
JV3 = 4;
|
||||
D64 = 5;
|
||||
NSI = 6;
|
||||
TD0 = 7;
|
||||
DIM = 8;
|
||||
FDI = 9;
|
||||
D88 = 10;
|
||||
NFD = 11;
|
||||
}
|
||||
|
||||
optional ImageReaderType type = 14 [default = NOT_SET, (help) = "input image type"];
|
||||
optional ImageReaderWriterType type = 14
|
||||
[default = IMAGETYPE_NOT_SET, (help) = "input image type"];
|
||||
|
||||
optional ImgInputOutputProto img = 2;
|
||||
optional DiskCopyInputProto diskcopy = 3;
|
||||
|
||||
@@ -15,28 +15,28 @@ std::unique_ptr<ImageWriter> ImageWriter::create(const ImageWriterProto& config)
|
||||
{
|
||||
switch (config.type())
|
||||
{
|
||||
case ImageWriterProto::IMG:
|
||||
case IMAGETYPE_IMG:
|
||||
return ImageWriter::createImgImageWriter(config);
|
||||
|
||||
case ImageWriterProto::D64:
|
||||
case IMAGETYPE_D64:
|
||||
return ImageWriter::createD64ImageWriter(config);
|
||||
|
||||
case ImageWriterProto::LDBS:
|
||||
case IMAGETYPE_LDBS:
|
||||
return ImageWriter::createLDBSImageWriter(config);
|
||||
|
||||
case ImageWriterProto::DISKCOPY:
|
||||
case IMAGETYPE_DISKCOPY:
|
||||
return ImageWriter::createDiskCopyImageWriter(config);
|
||||
|
||||
case ImageWriterProto::NSI:
|
||||
case IMAGETYPE_NSI:
|
||||
return ImageWriter::createNsiImageWriter(config);
|
||||
|
||||
case ImageWriterProto::RAW:
|
||||
case IMAGETYPE_RAW:
|
||||
return ImageWriter::createRawImageWriter(config);
|
||||
|
||||
case ImageWriterProto::D88:
|
||||
case IMAGETYPE_D88:
|
||||
return ImageWriter::createD88ImageWriter(config);
|
||||
|
||||
case ImageWriterProto::IMD:
|
||||
case IMAGETYPE_IMD:
|
||||
return ImageWriter::createImdImageWriter(config);
|
||||
|
||||
default:
|
||||
|
||||
@@ -66,25 +66,14 @@ message ImdOutputProto
|
||||
// NEXT_TAG: 12
|
||||
message ImageWriterProto
|
||||
{
|
||||
enum ImageWriterType {
|
||||
NOT_SET = 0;
|
||||
IMG = 1;
|
||||
D64 = 2;
|
||||
LDBS = 3;
|
||||
DISKCOPY = 4;
|
||||
NSI = 5;
|
||||
RAW = 6;
|
||||
D88 = 7;
|
||||
IMD = 8;
|
||||
}
|
||||
|
||||
optional string filename = 1 [ (help) = "filename of output sector image" ];
|
||||
optional bool filesystem_sector_order = 10 [
|
||||
(help) = "read/write sector image in filesystem order",
|
||||
default = false
|
||||
];
|
||||
|
||||
optional ImageWriterType type = 11 [ default = NOT_SET, (help) = "image writer type" ];
|
||||
optional ImageReaderWriterType type = 11
|
||||
[ default = IMAGETYPE_NOT_SET, (help) = "image writer type" ];
|
||||
|
||||
optional ImgInputOutputProto img = 2;
|
||||
optional D64OutputProto d64 = 3;
|
||||
|
||||
@@ -236,7 +236,7 @@ std::unique_ptr<Filesystem> Filesystem::createFilesystemFromConfig()
|
||||
fluxSource = globalConfig().getFluxSource();
|
||||
decoder = globalConfig().getDecoder();
|
||||
}
|
||||
if (globalConfig()->flux_sink().type() == FluxSourceSinkType::DRIVE)
|
||||
if (globalConfig()->flux_sink().type() == FLUXTYPE_DRIVE)
|
||||
{
|
||||
fluxSink = globalConfig().getFluxSink();
|
||||
encoder = globalConfig().getEncoder();
|
||||
|
||||
@@ -247,10 +247,10 @@ static void draw_x_graticules(Agg2D& painter,
|
||||
int mainAnalyseDriveResponse(int argc, const char* argv[])
|
||||
{
|
||||
globalConfig().overrides()->mutable_flux_source()->set_type(
|
||||
FluxSourceSinkType::DRIVE);
|
||||
FLUXTYPE_DRIVE);
|
||||
flags.parseFlagsWithConfigFiles(argc, argv, {});
|
||||
|
||||
if (globalConfig()->flux_sink().type() != FluxSourceSinkType::DRIVE)
|
||||
if (globalConfig()->flux_sink().type() != FLUXTYPE_DRIVE)
|
||||
error("this only makes sense with a real disk drive");
|
||||
|
||||
usbSetDrive(globalConfig()->drive().drive(),
|
||||
|
||||
@@ -132,7 +132,7 @@ static nanoseconds_t guessClock(const Fluxmap& fluxmap)
|
||||
int mainInspect(int argc, const char* argv[])
|
||||
{
|
||||
globalConfig().overrides()->mutable_flux_source()->set_type(
|
||||
FluxSourceSinkType::DRIVE);
|
||||
FLUXTYPE_DRIVE);
|
||||
flags.parseFlagsWithConfigFiles(argc, argv, {});
|
||||
|
||||
auto& fluxSource = globalConfig().getFluxSource();
|
||||
|
||||
@@ -57,10 +57,10 @@ int mainRawRead(int argc, const char* argv[])
|
||||
if (argc == 1)
|
||||
showProfiles("rawread", formats);
|
||||
globalConfig().overrides()->mutable_flux_source()->set_type(
|
||||
FluxSourceSinkType::DRIVE);
|
||||
FLUXTYPE_DRIVE);
|
||||
flags.parseFlagsWithConfigFiles(argc, argv, formats);
|
||||
|
||||
if (globalConfig()->flux_sink().type() == FluxSourceSinkType::DRIVE)
|
||||
if (globalConfig()->flux_sink().type() == FLUXTYPE_DRIVE)
|
||||
error("you can't use rawread to write to hardware");
|
||||
|
||||
std::shared_ptr<FluxSource> fluxSource = globalConfig().getFluxSource();
|
||||
|
||||
@@ -49,7 +49,7 @@ static ActionFlag eraseFlag({"--erase"},
|
||||
[]()
|
||||
{
|
||||
globalConfig().overrides()->mutable_flux_source()->set_type(
|
||||
FluxSourceSinkType::ERASE);
|
||||
FLUXTYPE_ERASE);
|
||||
});
|
||||
|
||||
int mainRawWrite(int argc, const char* argv[])
|
||||
@@ -60,10 +60,10 @@ int mainRawWrite(int argc, const char* argv[])
|
||||
if (argc == 1)
|
||||
showProfiles("rawwrite", formats);
|
||||
globalConfig().overrides()->mutable_flux_sink()->set_type(
|
||||
FluxSourceSinkType::DRIVE);
|
||||
FLUXTYPE_DRIVE);
|
||||
flags.parseFlagsWithConfigFiles(argc, argv, formats);
|
||||
|
||||
if (globalConfig()->flux_source().type() == FluxSourceSinkType::DRIVE)
|
||||
if (globalConfig()->flux_source().type() == FLUXTYPE_DRIVE)
|
||||
error("you can't use rawwrite to read from hardware");
|
||||
|
||||
auto& fluxSource = globalConfig().getFluxSource();
|
||||
|
||||
@@ -61,10 +61,10 @@ int mainRead(int argc, const char* argv[])
|
||||
{
|
||||
if (argc == 1)
|
||||
showProfiles("read", formats);
|
||||
globalConfig().set("flux_source.type", "DRIVE");
|
||||
globalConfig().set("flux_source.type", "FLUXTYPE_DRIVE");
|
||||
flags.parseFlagsWithConfigFiles(argc, argv, formats);
|
||||
|
||||
if (globalConfig()->decoder().copy_flux_to().type() == FluxSourceSinkType::DRIVE)
|
||||
if (globalConfig()->decoder().copy_flux_to().type() == FLUXTYPE_DRIVE)
|
||||
error("you cannot copy flux to a hardware device");
|
||||
|
||||
auto& fluxSource = globalConfig().getFluxSource();
|
||||
|
||||
@@ -19,7 +19,7 @@ int mainRpm(int argc, const char* argv[])
|
||||
{
|
||||
flags.parseFlagsWithConfigFiles(argc, argv, {});
|
||||
|
||||
if (globalConfig()->flux_source().type() != FluxSourceSinkType::DRIVE)
|
||||
if (globalConfig()->flux_source().type() != FLUXTYPE_DRIVE)
|
||||
error("this only makes sense with a real disk drive");
|
||||
|
||||
usbSetDrive(globalConfig()->drive().drive(),
|
||||
|
||||
@@ -23,7 +23,7 @@ int mainSeek(int argc, const char* argv[])
|
||||
{
|
||||
flags.parseFlagsWithConfigFiles(argc, argv, {});
|
||||
|
||||
if (globalConfig()->flux_source().type() != FluxSourceSinkType::DRIVE)
|
||||
if (globalConfig()->flux_source().type() != FLUXTYPE_DRIVE)
|
||||
error("this only makes sense with a real disk drive");
|
||||
|
||||
usbSetDrive(globalConfig()->drive().drive(),
|
||||
|
||||
@@ -22,7 +22,7 @@ they might require nudging as the side order can't be reliably autodetected.
|
||||
|
||||
image_writer {
|
||||
filename: "acornadfs.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
decoder {
|
||||
|
||||
@@ -25,12 +25,12 @@ documentation:
|
||||
|
||||
image_reader {
|
||||
filename: "acorndfs.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "acorndfs.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -43,7 +43,7 @@ documentation:
|
||||
|
||||
image_writer {
|
||||
filename: "aeslanier.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
decoder {
|
||||
|
||||
@@ -28,7 +28,7 @@ documentation:
|
||||
|
||||
image_writer {
|
||||
filename: "agat.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -31,12 +31,12 @@ documentation:
|
||||
|
||||
image_reader {
|
||||
filename: "amiga.adf"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "amiga.adf"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -44,7 +44,7 @@ documentation:
|
||||
|
||||
image_writer {
|
||||
filename: "ampro.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -19,12 +19,12 @@ on what was available at the time, with the same format on both.
|
||||
|
||||
image_reader {
|
||||
filename: "bk800.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "bk800.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -116,12 +116,12 @@ file system supports this.
|
||||
|
||||
image_reader {
|
||||
filename: "brother.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "brother.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
encoder {
|
||||
|
||||
@@ -54,12 +54,12 @@ documentation:
|
||||
|
||||
image_reader {
|
||||
filename: "commodore.d64"
|
||||
type: D64
|
||||
type: IMAGETYPE_D64
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "commodore.d64"
|
||||
type: D64
|
||||
type: IMAGETYPE_D64
|
||||
}
|
||||
|
||||
filesystem {
|
||||
|
||||
@@ -37,7 +37,7 @@ documentation:
|
||||
|
||||
image_writer {
|
||||
filename: "eco1.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -11,7 +11,7 @@ format itself is yet another IBM scheme variant.
|
||||
|
||||
image_writer {
|
||||
filename: "epsonpf10.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -42,7 +42,7 @@ There's amazingly little information about these things.
|
||||
|
||||
image_writer {
|
||||
filename: "f85.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
decoder {
|
||||
|
||||
@@ -43,7 +43,7 @@ documentation:
|
||||
|
||||
image_writer {
|
||||
filename: "fb100.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
decoder {
|
||||
|
||||
@@ -20,12 +20,12 @@ drive {
|
||||
|
||||
image_reader {
|
||||
filename: "hplif.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "hplif.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
decoder {
|
||||
|
||||
@@ -84,12 +84,12 @@ versa, so it shouldn't matter.
|
||||
|
||||
image_reader {
|
||||
filename: "ibm.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "ibm.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
decoder {
|
||||
|
||||
@@ -11,7 +11,7 @@ track! Other than that it's another IBM scheme variation.
|
||||
|
||||
image_writer {
|
||||
filename: "icl30.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -61,12 +61,12 @@ documentation:
|
||||
|
||||
image_reader {
|
||||
filename: "mac.dsk"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "mac.dsk"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -67,12 +67,12 @@ drive {
|
||||
|
||||
image_reader {
|
||||
filename: "micropolis.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "micropolis.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
@@ -100,12 +100,12 @@ option {
|
||||
config {
|
||||
image_reader {
|
||||
filename: "micropolis.vgi"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "micropolis.vgi"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -57,7 +57,7 @@ documentation:
|
||||
|
||||
image_writer {
|
||||
filename: "mx.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -19,12 +19,12 @@ drive {
|
||||
|
||||
image_reader {
|
||||
filename: "n88basic.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "n88basic.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -35,12 +35,12 @@ documentation:
|
||||
|
||||
image_reader {
|
||||
filename: "northstar.nsi"
|
||||
type: NSI
|
||||
type: IMAGETYPE_NSI
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "northstar.nsi"
|
||||
type: NSI
|
||||
type: IMAGETYPE_NSI
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -26,12 +26,12 @@ drive {
|
||||
|
||||
image_reader {
|
||||
filename: "pme.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "pme.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -20,7 +20,7 @@ you know anything about it.
|
||||
|
||||
image_writer {
|
||||
filename: "rolandd20.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -16,12 +16,12 @@ drive {
|
||||
|
||||
image_reader {
|
||||
filename: "rx50.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "rx50.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -29,7 +29,7 @@ documentation:
|
||||
|
||||
image_writer {
|
||||
filename: "smaky6.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -31,12 +31,12 @@ documentation:
|
||||
|
||||
image_reader {
|
||||
filename: "tids990.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "tids990.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -11,7 +11,7 @@ on the precise format.
|
||||
|
||||
image_writer {
|
||||
filename: "tiki.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
decoder {
|
||||
|
||||
@@ -50,12 +50,12 @@ documentation:
|
||||
|
||||
image_reader {
|
||||
filename: "victor9k.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
image_writer {
|
||||
filename: "victor9k.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
layout {
|
||||
|
||||
@@ -40,7 +40,7 @@ documentation:
|
||||
|
||||
image_writer {
|
||||
filename: "zilogmcz.img"
|
||||
type: IMG
|
||||
type: IMAGETYPE_IMG
|
||||
}
|
||||
|
||||
decoder {
|
||||
|
||||
Reference in New Issue
Block a user