Amiga disks can now optionally emit the metadata.

This commit is contained in:
David Given
2019-08-09 21:04:48 +02:00
parent 112377f885
commit 54edff9b94
3 changed files with 15 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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
-----------------

View File

@@ -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);