From 48540245b541ce78a9bf12f95016e0542e67283e Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 20 Nov 2022 10:25:19 +0100 Subject: [PATCH] Convert the imagereader/writer to use proto enums rather than oneofs. --- lib/imagereader/imagereader.cc | 58 +++++++++++++++---------------- lib/imagereader/imagereader.proto | 46 +++++++++++++++--------- lib/imagewriter/imagewriter.cc | 46 ++++++++++++------------ lib/imagewriter/imagewriter.proto | 35 ++++++++++++------- lib/vfs/vfs.cc | 9 ++--- src/formats/_acornadfs32.textpb | 2 +- src/formats/_acornadfs8.textpb | 2 +- src/formats/_micropolis.textpb | 8 ++--- src/formats/_mx.textpb | 2 +- src/formats/_northstar.textpb | 4 +-- src/formats/acorndfs.textpb | 4 +-- src/formats/aeslanier.textpb | 2 +- src/formats/agat840.textpb | 2 +- src/formats/amiga.textpb | 4 +-- src/formats/ampro400.textpb | 2 +- src/formats/ampro800.textpb | 2 +- src/formats/apple2.textpb | 4 +-- src/formats/atarist360.textpb | 4 +-- src/formats/atarist370.textpb | 4 +-- src/formats/atarist400.textpb | 4 +-- src/formats/atarist410.textpb | 4 +-- src/formats/atarist720.textpb | 4 +-- src/formats/atarist740.textpb | 4 +-- src/formats/atarist800.textpb | 4 +-- src/formats/atarist820.textpb | 4 +-- src/formats/bk800.textpb | 4 +-- src/formats/brother120.textpb | 4 +-- src/formats/brother240.textpb | 4 +-- src/formats/cmd_fd2000.textpb | 4 +-- src/formats/commodore1541.textpb | 4 +-- src/formats/commodore1581.textpb | 4 +-- src/formats/eco1.textpb | 2 +- src/formats/epsonpf10.textpb | 2 +- src/formats/f85.textpb | 2 +- src/formats/fb100.textpb | 2 +- src/formats/hp9121.textpb | 2 +- src/formats/hplif770.textpb | 4 +-- src/formats/ibm.textpb | 2 +- src/formats/ibm1200.textpb | 4 +-- src/formats/ibm1232.textpb | 4 +-- src/formats/ibm1440.textpb | 4 +-- src/formats/ibm180.textpb | 4 +-- src/formats/ibm360.textpb | 4 +-- src/formats/ibm720.textpb | 4 +-- src/formats/icl30.textpb | 2 +- src/formats/mac400.textpb | 4 +-- src/formats/mac800.textpb | 4 +-- src/formats/n88basic.textpb | 4 +-- src/formats/rx50.textpb | 4 +-- src/formats/tids990.textpb | 4 +-- src/formats/victor9k_ds.textpb | 4 +-- src/formats/victor9k_ss.textpb | 4 +-- src/formats/zilogmcz.textpb | 2 +- 53 files changed, 191 insertions(+), 169 deletions(-) diff --git a/lib/imagereader/imagereader.cc b/lib/imagereader/imagereader.cc index 0b8fe271..3dcc70b4 100644 --- a/lib/imagereader/imagereader.cc +++ b/lib/imagereader/imagereader.cc @@ -14,39 +14,39 @@ std::unique_ptr ImageReader::create(const ImageReaderProto& config) { - switch (config.format_case()) + switch (config.type()) { - case ImageReaderProto::kDim: + case ImageReaderProto::DIM: return ImageReader::createDimImageReader(config); - case ImageReaderProto::kD88: + case ImageReaderProto::D88: return ImageReader::createD88ImageReader(config); - case ImageReaderProto::kFdi: + case ImageReaderProto::FDI: return ImageReader::createFdiImageReader(config); - case ImageReaderProto::kImd: + case ImageReaderProto::IMD: return ImageReader::createIMDImageReader(config); - case ImageReaderProto::kImg: + case ImageReaderProto::IMG: return ImageReader::createImgImageReader(config); - case ImageReaderProto::kDiskcopy: + case ImageReaderProto::DISKCOPY: return ImageReader::createDiskCopyImageReader(config); - case ImageReaderProto::kJv3: + case ImageReaderProto::JV3: return ImageReader::createJv3ImageReader(config); - case ImageReaderProto::kD64: + case ImageReaderProto::D64: return ImageReader::createD64ImageReader(config); - case ImageReaderProto::kNfd: + case ImageReaderProto::NFD: return ImageReader::createNFDImageReader(config); - case ImageReaderProto::kNsi: + case ImageReaderProto::NSI: return ImageReader::createNsiImageReader(config); - case ImageReaderProto::kTd0: + case ImageReaderProto::TD0: return ImageReader::createTd0ImageReader(config); default: @@ -61,23 +61,23 @@ void ImageReader::updateConfigForFilename( static const std::map> formats = { // clang-format off - {".adf", [](auto* proto) { proto->mutable_img(); }}, - {".d64", [](auto* proto) { proto->mutable_d64(); }}, - {".d81", [](auto* proto) { proto->mutable_img(); }}, - {".d88", [](auto* proto) { proto->mutable_d88(); }}, - {".dim", [](auto* proto) { proto->mutable_dim(); }}, - {".diskcopy", [](auto* proto) { proto->mutable_diskcopy(); }}, - {".dsk", [](auto* proto) { proto->mutable_img(); }}, - {".fdi", [](auto* proto) { proto->mutable_fdi(); }}, - {".imd", [](auto* proto) { proto->mutable_imd(); }}, - {".img", [](auto* proto) { proto->mutable_img(); }}, - {".jv3", [](auto* proto) { proto->mutable_jv3(); }}, - {".nfd", [](auto* proto) { proto->mutable_nfd(); }}, - {".nsi", [](auto* proto) { proto->mutable_nsi(); }}, - {".st", [](auto* proto) { proto->mutable_img(); }}, - {".td0", [](auto* proto) { proto->mutable_td0(); }}, - {".vgi", [](auto* proto) { proto->mutable_img(); }}, - {".xdf", [](auto* proto) { proto->mutable_img(); }}, + {".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); }}, // clang-format on }; diff --git a/lib/imagereader/imagereader.proto b/lib/imagereader/imagereader.proto index a988ee9e..3a9d2f0a 100644 --- a/lib/imagereader/imagereader.proto +++ b/lib/imagereader/imagereader.proto @@ -13,9 +13,9 @@ message Td0InputProto {} message DimInputProto {} message FdiInputProto {} message D88InputProto {} -message NFDInputProto {} +message NfdInputProto {} -// NEXT_TAG: 14 +// NEXT_TAG: 15 message ImageReaderProto { optional string filename = 1 [ (help) = "filename of input sector image" ]; @@ -24,18 +24,32 @@ message ImageReaderProto default = false ]; - oneof format - { - ImgInputOutputProto img = 2; - DiskCopyInputProto diskcopy = 3; - ImdInputProto imd = 4; - Jv3InputProto jv3 = 5; - D64InputProto d64 = 6; - NsiInputProto nsi = 7; - Td0InputProto td0 = 8; - DimInputProto dim = 9; - FdiInputProto fdi = 10; - D88InputProto d88 = 11; - NFDInputProto nfd = 12; - } + 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 ImgInputOutputProto img = 2; + optional DiskCopyInputProto diskcopy = 3; + optional ImdInputProto imd = 4; + optional Jv3InputProto jv3 = 5; + optional D64InputProto d64 = 6; + optional NsiInputProto nsi = 7; + optional Td0InputProto td0 = 8; + optional DimInputProto dim = 9; + optional FdiInputProto fdi = 10; + optional D88InputProto d88 = 11; + optional NfdInputProto nfd = 12; } diff --git a/lib/imagewriter/imagewriter.cc b/lib/imagewriter/imagewriter.cc index a1e9e19f..d37ae10d 100644 --- a/lib/imagewriter/imagewriter.cc +++ b/lib/imagewriter/imagewriter.cc @@ -14,30 +14,30 @@ std::unique_ptr ImageWriter::create(const ImageWriterProto& config) { - switch (config.format_case()) + switch (config.type()) { - case ImageWriterProto::kImg: + case ImageWriterProto::IMG: return ImageWriter::createImgImageWriter(config); - case ImageWriterProto::kD64: + case ImageWriterProto::D64: return ImageWriter::createD64ImageWriter(config); - case ImageWriterProto::kLdbs: + case ImageWriterProto::LDBS: return ImageWriter::createLDBSImageWriter(config); - case ImageWriterProto::kDiskcopy: + case ImageWriterProto::DISKCOPY: return ImageWriter::createDiskCopyImageWriter(config); - case ImageWriterProto::kNsi: + case ImageWriterProto::NSI: return ImageWriter::createNsiImageWriter(config); - case ImageWriterProto::kRaw: + case ImageWriterProto::RAW: return ImageWriter::createRawImageWriter(config); - case ImageWriterProto::kD88: + case ImageWriterProto::D88: return ImageWriter::createD88ImageWriter(config); - case ImageWriterProto::kImd: + case ImageWriterProto::IMD: return ImageWriter::createImdImageWriter(config); default: @@ -52,20 +52,20 @@ void ImageWriter::updateConfigForFilename( static const std::map> formats = { // clang-format off - {".adf", [](auto* proto) { proto->mutable_img(); }}, - {".d64", [](auto* proto) { proto->mutable_d64(); }}, - {".d81", [](auto* proto) { proto->mutable_img(); }}, - {".d88", [](auto* proto) { proto->mutable_d88(); }}, - {".diskcopy", [](auto* proto) { proto->mutable_diskcopy(); }}, - {".dsk", [](auto* proto) { proto->mutable_img(); }}, - {".img", [](auto* proto) { proto->mutable_img(); }}, - {".imd", [](auto* proto) { proto->mutable_imd(); }}, - {".ldbs", [](auto* proto) { proto->mutable_ldbs(); }}, - {".nsi", [](auto* proto) { proto->mutable_nsi(); }}, - {".raw", [](auto* proto) { proto->mutable_raw(); }}, - {".st", [](auto* proto) { proto->mutable_img(); }}, - {".vgi", [](auto* proto) { proto->mutable_img(); }}, - {".xdf", [](auto* proto) { proto->mutable_img(); }}, + {".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); }}, // clang-format on }; diff --git a/lib/imagewriter/imagewriter.proto b/lib/imagewriter/imagewriter.proto index ac786735..38c9ef63 100644 --- a/lib/imagewriter/imagewriter.proto +++ b/lib/imagewriter/imagewriter.proto @@ -63,24 +63,35 @@ message ImdOutputProto optional string comment = 3 [ (help) = "comment to set in IMD file" ]; } -// NEXT_TAG: 11 +// 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 ]; - oneof format - { - ImgInputOutputProto img = 2; - D64OutputProto d64 = 3; - LDBSOutputProto ldbs = 4; - DiskCopyOutputProto diskcopy = 5; - NsiOutputProto nsi = 6; - RawOutputProto raw = 7; - D88OutputProto d88 = 8; - ImdOutputProto imd = 9; - } + optional ImageWriterType type = 11 [ default = NOT_SET, (help) = "image writer type" ]; + + optional ImgInputOutputProto img = 2; + optional D64OutputProto d64 = 3; + optional LDBSOutputProto ldbs = 4; + optional DiskCopyOutputProto diskcopy = 5; + optional NsiOutputProto nsi = 6; + optional RawOutputProto raw = 7; + optional D88OutputProto d88 = 8; + optional ImdOutputProto imd = 9; } diff --git a/lib/vfs/vfs.cc b/lib/vfs/vfs.cc index 41e098df..f0519962 100644 --- a/lib/vfs/vfs.cc +++ b/lib/vfs/vfs.cc @@ -218,8 +218,7 @@ std::unique_ptr Filesystem::createFilesystemFromConfig() std::shared_ptr decoder; std::shared_ptr fluxSink; std::shared_ptr encoder; - if (config.flux_source().type() != - FluxSourceProto::NOT_SET) + if (config.flux_source().type() != FluxSourceProto::NOT_SET) { fluxSource = FluxSource::create(config.flux_source()); decoder = Decoder::create(config.decoder()); @@ -236,11 +235,9 @@ std::unique_ptr Filesystem::createFilesystemFromConfig() { std::shared_ptr reader; std::shared_ptr writer; - if (config.image_reader().format_case() != - ImageReaderProto::FORMAT_NOT_SET) + if (config.image_reader().type() != ImageReaderProto::NOT_SET) reader = ImageReader::create(config.image_reader()); - if (config.image_writer().format_case() != - ImageWriterProto::FORMAT_NOT_SET) + if (config.image_writer().type() != ImageWriterProto::NOT_SET) writer = ImageWriter::create(config.image_writer()); sectorInterface = diff --git a/src/formats/_acornadfs32.textpb b/src/formats/_acornadfs32.textpb index 28428e79..11a65cf8 100644 --- a/src/formats/_acornadfs32.textpb +++ b/src/formats/_acornadfs32.textpb @@ -3,7 +3,7 @@ is_extension: true image_writer { filename: "acornadfs.img" - img {} + type: IMG } layout { diff --git a/src/formats/_acornadfs8.textpb b/src/formats/_acornadfs8.textpb index 4a712402..807a162c 100644 --- a/src/formats/_acornadfs8.textpb +++ b/src/formats/_acornadfs8.textpb @@ -3,7 +3,7 @@ is_extension: true image_writer { filename: "acornadfs.img" - img {} + type: IMG } layout { diff --git a/src/formats/_micropolis.textpb b/src/formats/_micropolis.textpb index d44bc515..ba945f29 100644 --- a/src/formats/_micropolis.textpb +++ b/src/formats/_micropolis.textpb @@ -7,12 +7,12 @@ drive { image_reader { filename: "micropolis.img" - img {} + type: IMG } image_writer { filename: "micropolis.img" - img {} + type: IMG } layout { @@ -41,12 +41,12 @@ option { config { image_reader { filename: "micropolis.vgi" - img {} + type: IMG } image_writer { filename: "micropolis.vgi" - img {} + type: IMG } layout { diff --git a/src/formats/_mx.textpb b/src/formats/_mx.textpb index bb4ebc34..20b269da 100644 --- a/src/formats/_mx.textpb +++ b/src/formats/_mx.textpb @@ -3,7 +3,7 @@ is_extension: true image_writer { filename: "mx.img" - img {} + type: IMG } layout { diff --git a/src/formats/_northstar.textpb b/src/formats/_northstar.textpb index 2d041461..f6adedf0 100644 --- a/src/formats/_northstar.textpb +++ b/src/formats/_northstar.textpb @@ -3,12 +3,12 @@ is_extension: true image_reader { filename: "northstar.nsi" - nsi {} + type: NSI } image_writer { filename: "northstar.nsi" - nsi {} + type: NSI } layout { diff --git a/src/formats/acorndfs.textpb b/src/formats/acorndfs.textpb index f0dd5f2d..cbbd33fa 100644 --- a/src/formats/acorndfs.textpb +++ b/src/formats/acorndfs.textpb @@ -2,12 +2,12 @@ comment: 'Acorn DFS 100kB/200kB 3.5" or 5.25" 40- or 80-track SS (ro)' image_reader { filename: "acorndfs.img" - img {} + type: IMG } image_writer { filename: "acorndfs.img" - img {} + type: IMG } layout { diff --git a/src/formats/aeslanier.textpb b/src/formats/aeslanier.textpb index 98c90e11..2104c36e 100644 --- a/src/formats/aeslanier.textpb +++ b/src/formats/aeslanier.textpb @@ -2,7 +2,7 @@ comment: 'AES Lanier "No Problem" 616kB 5.25" 77-track SSDD hard sectored (ro)' image_writer { filename: "aeslanier.img" - img {} + type: IMG } decoder { diff --git a/src/formats/agat840.textpb b/src/formats/agat840.textpb index 803b4ce9..ab6eba84 100644 --- a/src/formats/agat840.textpb +++ b/src/formats/agat840.textpb @@ -2,7 +2,7 @@ comment: 'Agat 840kB 5.25" 80-track DS (ro)' image_writer { filename: "agat.img" - img {} + type: IMG } layout { diff --git a/src/formats/amiga.textpb b/src/formats/amiga.textpb index d1c7db0e..0097fb4f 100644 --- a/src/formats/amiga.textpb +++ b/src/formats/amiga.textpb @@ -2,12 +2,12 @@ comment: 'Amiga 880kB 3.5" DSDD' image_reader { filename: "amiga.adf" - img {} + type: IMG } image_writer { filename: "amiga.adf" - img {} + type: IMG } layout { diff --git a/src/formats/ampro400.textpb b/src/formats/ampro400.textpb index 6f11fd71..22447bd1 100644 --- a/src/formats/ampro400.textpb +++ b/src/formats/ampro400.textpb @@ -2,7 +2,7 @@ comment: 'Ampro 400kB/800kB 5.25" 40/80 track SSDD/DSDD (ro)' image_writer { filename: "ampro.img" - img {} + type: IMG } layout { diff --git a/src/formats/ampro800.textpb b/src/formats/ampro800.textpb index 02171179..5d18cd40 100644 --- a/src/formats/ampro800.textpb +++ b/src/formats/ampro800.textpb @@ -2,7 +2,7 @@ comment: 'Ampro 400kB/800kB 5.25" 40/80 track SSDD/DSDD (ro)' image_writer { filename: "ampro.img" - img {} + type: IMG } layout { diff --git a/src/formats/apple2.textpb b/src/formats/apple2.textpb index 28aad29c..04441cb1 100644 --- a/src/formats/apple2.textpb +++ b/src/formats/apple2.textpb @@ -2,7 +2,7 @@ comment: 'Apple II 140kB DOS 3.3 5.25" 40 track SSSD' image_reader { filename: "apple2.img" - img {} + type: IMG } layout { @@ -19,7 +19,7 @@ layout { image_writer { filename: "apple2.img" - img {} + type: IMG } decoder { diff --git a/src/formats/atarist360.textpb b/src/formats/atarist360.textpb index e7d9a503..efa26b06 100644 --- a/src/formats/atarist360.textpb +++ b/src/formats/atarist360.textpb @@ -4,12 +4,12 @@ include: '_atari' image_reader { filename: "atarist360.st" - img {} + type: IMG } image_writer { filename: "atarist360.st" - img {} + type: IMG } layout { diff --git a/src/formats/atarist370.textpb b/src/formats/atarist370.textpb index fec73126..e93d56f5 100644 --- a/src/formats/atarist370.textpb +++ b/src/formats/atarist370.textpb @@ -4,12 +4,12 @@ include: '_atari' image_reader { filename: "atarist370.st" - img {} + type: IMG } image_writer { filename: "atarist370.st" - img {} + type: IMG } layout { diff --git a/src/formats/atarist400.textpb b/src/formats/atarist400.textpb index 4af11681..92fd8fa6 100644 --- a/src/formats/atarist400.textpb +++ b/src/formats/atarist400.textpb @@ -4,12 +4,12 @@ include: '_atari' image_reader { filename: "atarist400.st" - img {} + type: IMG } image_writer { filename: "atarist400.st" - img {} + type: IMG } layout { diff --git a/src/formats/atarist410.textpb b/src/formats/atarist410.textpb index b5e0660f..22e82181 100644 --- a/src/formats/atarist410.textpb +++ b/src/formats/atarist410.textpb @@ -4,12 +4,12 @@ include: '_atari' image_reader { filename: "atarist410.st" - img {} + type: IMG } image_writer { filename: "atarist410.st" - img {} + type: IMG } layout { diff --git a/src/formats/atarist720.textpb b/src/formats/atarist720.textpb index be51c4f1..c33a1a95 100644 --- a/src/formats/atarist720.textpb +++ b/src/formats/atarist720.textpb @@ -4,12 +4,12 @@ include: '_atari' image_reader { filename: "atarist720.st" - img {} + type: IMG } image_writer { filename: "atarist720.st" - img {} + type: IMG } layout { diff --git a/src/formats/atarist740.textpb b/src/formats/atarist740.textpb index b31b480a..daf04d90 100644 --- a/src/formats/atarist740.textpb +++ b/src/formats/atarist740.textpb @@ -4,12 +4,12 @@ include: '_atari' image_reader { filename: "atarist740.st" - img {} + type: IMG } image_writer { filename: "atarist740.st" - img {} + type: IMG } layout { diff --git a/src/formats/atarist800.textpb b/src/formats/atarist800.textpb index 6d655b4a..cf7d3f68 100644 --- a/src/formats/atarist800.textpb +++ b/src/formats/atarist800.textpb @@ -4,12 +4,12 @@ include: '_atari' image_reader { filename: "atarist800.st" - img {} + type: IMG } image_writer { filename: "atarist800.st" - img {} + type: IMG } layout { diff --git a/src/formats/atarist820.textpb b/src/formats/atarist820.textpb index f3cd9d82..d5c4f678 100644 --- a/src/formats/atarist820.textpb +++ b/src/formats/atarist820.textpb @@ -4,12 +4,12 @@ include: '_atari' image_reader { filename: "atarist820.st" - img {} + type: IMG } image_writer { filename: "atarist820.st" - img {} + type: IMG } layout { diff --git a/src/formats/bk800.textpb b/src/formats/bk800.textpb index 5d324ff3..9dfd54de 100644 --- a/src/formats/bk800.textpb +++ b/src/formats/bk800.textpb @@ -2,12 +2,12 @@ comment: 'BK 800kB 5.25"/3.5" 80-track 10-sector DSDD' image_reader { filename: "bk800.img" - img {} + type: IMG } image_writer { filename: "bk800.img" - img {} + type: IMG } layout { diff --git a/src/formats/brother120.textpb b/src/formats/brother120.textpb index 882de484..d665c721 100644 --- a/src/formats/brother120.textpb +++ b/src/formats/brother120.textpb @@ -2,12 +2,12 @@ comment: 'Brother 120kB 3.5" 39-track SS GCR' image_reader { filename: "brother120.img" - img {} + type: IMG } image_writer { filename: "brother120.img" - img {} + type: IMG } layout { diff --git a/src/formats/brother240.textpb b/src/formats/brother240.textpb index 0f79ce3e..877aba32 100644 --- a/src/formats/brother240.textpb +++ b/src/formats/brother240.textpb @@ -2,12 +2,12 @@ comment: 'Brother 240kB 3.5" 78-track SS GCR' image_reader { filename: "brother240.img" - img {} + type: IMG } image_writer { filename: "brother240.img" - img {} + type: IMG } layout { diff --git a/src/formats/cmd_fd2000.textpb b/src/formats/cmd_fd2000.textpb index 4563c446..22da4b1c 100644 --- a/src/formats/cmd_fd2000.textpb +++ b/src/formats/cmd_fd2000.textpb @@ -2,12 +2,12 @@ comment: 'CMD FD2000 1620kB 3.5" DSHD' image_reader { filename: "cmd_fd2000.img" - img {} + type: IMG } image_writer { filename: "cmd_fd2000.img" - img {} + type: IMG } layout { diff --git a/src/formats/commodore1541.textpb b/src/formats/commodore1541.textpb index 5e87d9ad..0a8476c5 100644 --- a/src/formats/commodore1541.textpb +++ b/src/formats/commodore1541.textpb @@ -2,12 +2,12 @@ comment: 'Commodore 1541 171kB/192kB 5.25" 35/40-track SS GCR' image_reader { filename: "commodore1541.d64" - d64 {} + type: D64 } image_writer { filename: "commodore1541.d64" - d64 {} + type: D64 } layout { diff --git a/src/formats/commodore1581.textpb b/src/formats/commodore1581.textpb index 11186e6d..38937bfd 100644 --- a/src/formats/commodore1581.textpb +++ b/src/formats/commodore1581.textpb @@ -2,12 +2,12 @@ comment: 'Commodore 1581 800kB 3.5" DSDD' image_reader { filename: "commodore1581.d81" - img {} + type: IMG } image_writer { filename: "commodore1581.d81" - img {} + type: IMG } layout { diff --git a/src/formats/eco1.textpb b/src/formats/eco1.textpb index 9490fb66..1dc99eb5 100644 --- a/src/formats/eco1.textpb +++ b/src/formats/eco1.textpb @@ -2,7 +2,7 @@ comment: 'VDS Eco1 1210kB 77-track mixed format DSHD (ro)' image_writer { filename: "eco1.img" - img {} + type: IMG } layout { diff --git a/src/formats/epsonpf10.textpb b/src/formats/epsonpf10.textpb index 9111d86a..0230c872 100644 --- a/src/formats/epsonpf10.textpb +++ b/src/formats/epsonpf10.textpb @@ -2,7 +2,7 @@ comment: 'Epson PF-10 40-track DS DD (ro)' image_writer { filename: "epsonpf10.img" - img {} + type: IMG } layout { diff --git a/src/formats/f85.textpb b/src/formats/f85.textpb index 10e1c827..adb5d580 100644 --- a/src/formats/f85.textpb +++ b/src/formats/f85.textpb @@ -2,7 +2,7 @@ comment: 'Durango F85 461kB 5.25" 77-track SS (ro)' image_writer { filename: "f85.img" - img {} + type: IMG } decoder { diff --git a/src/formats/fb100.textpb b/src/formats/fb100.textpb index 6362f0c3..a144b54a 100644 --- a/src/formats/fb100.textpb +++ b/src/formats/fb100.textpb @@ -2,7 +2,7 @@ comment: 'Brother FB-100 100kB 3.5" 40-track SS (ro)' image_writer { filename: "fb100.img" - img {} + type: IMG } decoder { diff --git a/src/formats/hp9121.textpb b/src/formats/hp9121.textpb index 8034304f..0c45b2a7 100644 --- a/src/formats/hp9121.textpb +++ b/src/formats/hp9121.textpb @@ -2,7 +2,7 @@ comment: 'Hewlett-Packard 9121 264kB 3.5" SSDD' image_reader { filename: "hp9121.img" - img {} + type: IMG } layout { diff --git a/src/formats/hplif770.textpb b/src/formats/hplif770.textpb index fef1447b..b0a80567 100644 --- a/src/formats/hplif770.textpb +++ b/src/formats/hplif770.textpb @@ -7,12 +7,12 @@ drive { image_reader { filename: "hplif770.img" - img {} + type: IMG } image_writer { filename: "hplif770.img" - img {} + type: IMG } layout { diff --git a/src/formats/ibm.textpb b/src/formats/ibm.textpb index 234906b5..3f229a83 100644 --- a/src/formats/ibm.textpb +++ b/src/formats/ibm.textpb @@ -2,7 +2,7 @@ comment: 'PC 3.5"/5.25" autodetect double sided format' image_writer { filename: "ibm.img" - img {} + type: IMG } decoder { diff --git a/src/formats/ibm1200.textpb b/src/formats/ibm1200.textpb index f4f28af1..95635635 100644 --- a/src/formats/ibm1200.textpb +++ b/src/formats/ibm1200.textpb @@ -2,12 +2,12 @@ comment: 'PC 1200kB 5.25" 80-track 15-sector DSHD' image_reader { filename: "ibm1200.img" - img {} + type: IMG } image_writer { filename: "ibm1200.img" - img {} + type: IMG } layout { diff --git a/src/formats/ibm1232.textpb b/src/formats/ibm1232.textpb index 889f7bf0..35abf252 100644 --- a/src/formats/ibm1232.textpb +++ b/src/formats/ibm1232.textpb @@ -2,12 +2,12 @@ comment: 'Japanese PC 1232kB 5.25"/3.5" 77-track 8-sector DSHD' image_reader { filename: "ibm1232.img" - img {} + type: IMG } image_writer { filename: "ibm1232.img" - img {} + type: IMG } layout { diff --git a/src/formats/ibm1440.textpb b/src/formats/ibm1440.textpb index 0b100ef3..99b38a7f 100644 --- a/src/formats/ibm1440.textpb +++ b/src/formats/ibm1440.textpb @@ -2,12 +2,12 @@ comment: 'PC 1440kB 3.5" 80-track 18-sector DSHD' image_reader { filename: "ibm1440.img" - img {} + type: IMG } image_writer { filename: "ibm1440.img" - img {} + type: IMG } layout { diff --git a/src/formats/ibm180.textpb b/src/formats/ibm180.textpb index 24efb916..d79dee70 100644 --- a/src/formats/ibm180.textpb +++ b/src/formats/ibm180.textpb @@ -2,12 +2,12 @@ comment: 'PC 180kB 5.25" 40-track 9-sector SSDD' image_reader { filename: "ibm180.img" - img {} + type: IMG } image_writer { filename: "ibm180.img" - img {} + type: IMG } layout { diff --git a/src/formats/ibm360.textpb b/src/formats/ibm360.textpb index e4835da3..f2b09486 100644 --- a/src/formats/ibm360.textpb +++ b/src/formats/ibm360.textpb @@ -2,12 +2,12 @@ comment: 'PC 360kB 5.25" 40-track 9-sector DSDD' image_reader { filename: "ibm360.img" - img {} + type: IMG } image_writer { filename: "ibm360.img" - img {} + type: IMG } layout { diff --git a/src/formats/ibm720.textpb b/src/formats/ibm720.textpb index 48cbe05d..b4cd6b57 100644 --- a/src/formats/ibm720.textpb +++ b/src/formats/ibm720.textpb @@ -2,12 +2,12 @@ comment: 'PC 720kB 5.25"/3.5" 80-track 9-sector DSDD' image_reader { filename: "ibm720.img" - img {} + type: IMG } image_writer { filename: "ibm720.img" - img {} + type: IMG } layout { diff --git a/src/formats/icl30.textpb b/src/formats/icl30.textpb index 12bd24fe..66b28ec9 100644 --- a/src/formats/icl30.textpb +++ b/src/formats/icl30.textpb @@ -2,7 +2,7 @@ comment: 'ICL Model 30 263kB 34-track DSSD (ro)' image_writer { filename: "icl30.img" - img {} + type: IMG } layout { diff --git a/src/formats/mac400.textpb b/src/formats/mac400.textpb index 587ffffd..3c3b3141 100644 --- a/src/formats/mac400.textpb +++ b/src/formats/mac400.textpb @@ -2,12 +2,12 @@ comment: 'Macintosh 400kB 3.5" SSDD GCR' image_reader { filename: "mac400.dsk" - img {} + type: IMG } image_writer { filename: "mac400.dsk" - img {} + type: IMG } layout { diff --git a/src/formats/mac800.textpb b/src/formats/mac800.textpb index ce030914..351d5a92 100644 --- a/src/formats/mac800.textpb +++ b/src/formats/mac800.textpb @@ -2,12 +2,12 @@ comment: 'Macintosh 800kB 3.5" DSDD GCR' image_reader { filename: "mac800.dsk" - img {} + type: IMG } image_writer { filename: "mac800.dsk" - img {} + type: IMG } layout { diff --git a/src/formats/n88basic.textpb b/src/formats/n88basic.textpb index 862e3108..382e6e99 100644 --- a/src/formats/n88basic.textpb +++ b/src/formats/n88basic.textpb @@ -6,12 +6,12 @@ drive { image_reader { filename: "n88basic.img" - img {} + type: IMG } image_writer { filename: "n88basic.img" - img {} + type: IMG } layout { diff --git a/src/formats/rx50.textpb b/src/formats/rx50.textpb index a27ecfa3..5df659e8 100644 --- a/src/formats/rx50.textpb +++ b/src/formats/rx50.textpb @@ -6,12 +6,12 @@ drive { image_reader { filename: "rx50.img" - img {} + type: IMG } image_writer { filename: "rx50.img" - img {} + type: IMG } layout { diff --git a/src/formats/tids990.textpb b/src/formats/tids990.textpb index ebb4bf68..0be46c19 100644 --- a/src/formats/tids990.textpb +++ b/src/formats/tids990.textpb @@ -2,12 +2,12 @@ comment: 'Texas Instruments DS990 1126kB 8" DSSD' image_reader { filename: "tids990.img" - img {} + type: IMG } image_writer { filename: "tids990.img" - img {} + type: IMG } layout { diff --git a/src/formats/victor9k_ds.textpb b/src/formats/victor9k_ds.textpb index 28dc8680..f49cf4d3 100644 --- a/src/formats/victor9k_ds.textpb +++ b/src/formats/victor9k_ds.textpb @@ -2,12 +2,12 @@ comment: 'Victor 9000 / Sirius One 1224kB DSHD GCR variable sector)' image_reader { filename: "victor9k_ds.img" - img {} + type: IMG } image_writer { filename: "victor9k_ds.img" - img {} + type: IMG } layout { diff --git a/src/formats/victor9k_ss.textpb b/src/formats/victor9k_ss.textpb index a3471144..9f4e32cb 100644 --- a/src/formats/victor9k_ss.textpb +++ b/src/formats/victor9k_ss.textpb @@ -2,12 +2,12 @@ comment: 'Victor 9000 / Sirius One 612kB SSHD GCR variable sector)' image_reader { filename: "victor9k.img" - img {} + type: IMG } image_writer { filename: "victor9k.img" - img {} + type: IMG } layout { diff --git a/src/formats/zilogmcz.textpb b/src/formats/zilogmcz.textpb index 89dbb9c8..23cc8fa5 100644 --- a/src/formats/zilogmcz.textpb +++ b/src/formats/zilogmcz.textpb @@ -2,7 +2,7 @@ comment: 'Zilog MCZ 320kB 8" 77-track SS hard-sectored (ro)' image_writer { filename: "zilogmcz.img" - img {} + type: IMG } decoder {