diff --git a/arch/amiga/decoder.cc b/arch/amiga/decoder.cc index 0895c224..8ae3b896 100644 --- a/arch/amiga/decoder.cc +++ b/arch/amiga/decoder.cc @@ -92,6 +92,8 @@ void AmigaDecoder::decodeSectorRecord() uint32_t wanteddatachecksum = deinterleave(ptr, 4).reader().read_be32(); uint32_t gotdatachecksum = checksum(rawbytes.slice(62, 1024)); - _sector->data = deinterleave(ptr, 512); + + _sector->data.clear(); + _sector->data.writer().append(deinterleave(ptr, 512)).append(recoveryinfo); _sector->status = (gotdatachecksum == wanteddatachecksum) ? Sector::OK : Sector::BAD_CHECKSUM; } diff --git a/doc/disk-amiga.md b/doc/disk-amiga.md index 1c551bd0..b3edbe3b 100644 --- a/doc/disk-amiga.md +++ b/doc/disk-amiga.md @@ -23,6 +23,17 @@ You should end up with an `amiga.adf` which is 901120 bytes long (for a normal DD disk) --- it ought to be a perfectly normal ADF file which you can use in an emulator. +If you want the metadata as well, specify a 528 byte sector size for the +output image: + +``` +fluxengine read amiga -o amiga.adf:b=528 +``` + +You will end up with a 929280 byte long image which you probably _can't_ use +in an emulator; each sector will contain the 512 bytes of user payload +followed by the 16 bytes of metadata. + Useful references ----------------- diff --git a/src/fe-readamiga.cc b/src/fe-readamiga.cc index aa4cab7c..c4e8ecf9 100644 --- a/src/fe-readamiga.cc +++ b/src/fe-readamiga.cc @@ -16,7 +16,7 @@ static FlagGroup flags { &readerFlags }; int mainReadAmiga(int argc, const char* argv[]) { setReaderDefaultSource(":t=0-79:s=0-1"); - setReaderDefaultOutput("amiga.adf"); + setReaderDefaultOutput("amiga.adf:c=80:h=2:s=11:b=512"); setReaderRevolutions(2); flags.parseFlags(argc, argv);