mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Amiga disks can now optionally emit the metadata.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
-----------------
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user