mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Fix IBM sector base default; convert the ampro configuration.
This commit is contained in:
@@ -138,7 +138,7 @@ void IbmDecoder::decodeSectorRecord()
|
||||
br.read_8(); /* skip ID byte */
|
||||
_sector->logicalTrack = br.read_8();
|
||||
_sector->logicalSide = br.read_8();
|
||||
_sector->logicalSector = br.read_8() - _config.sector_base();
|
||||
_sector->logicalSector = br.read_8() - _config.sector_id_base();
|
||||
_currentSectorSize = 1 << (br.read_8() + 7);
|
||||
uint16_t wantCrc = br.read_be16();
|
||||
uint16_t gotCrc = crc16(CCITT_POLY, bytes.slice(0, _currentHeaderLength + 5));
|
||||
|
||||
@@ -3,9 +3,12 @@ syntax = "proto2";
|
||||
import "lib/common.proto";
|
||||
|
||||
message IBMInputProto {
|
||||
optional int32 sector_base = 1 [default=0];
|
||||
optional bool ignore_side_byte = 2 [default=false];
|
||||
optional RangeProto required_sectors = 3;
|
||||
optional int32 sector_id_base = 1 [default = 1,
|
||||
(help) = "ID of first sector"];
|
||||
optional bool ignore_side_byte = 2 [default = false,
|
||||
(help) = "ignore side byte in sector header"];
|
||||
optional RangeProto required_sectors = 3 [
|
||||
(help) = "require these sectors to exist for a good read"];
|
||||
}
|
||||
|
||||
message IBMOutputProto {
|
||||
|
||||
@@ -346,6 +346,7 @@ READABLES="\
|
||||
acornadfs \
|
||||
acorndfs \
|
||||
aeslanier \
|
||||
ampro \
|
||||
amiga \
|
||||
brother \
|
||||
c64 \
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#include "globals.h"
|
||||
#include "reader.h"
|
||||
#include "ibm/ibm.h"
|
||||
#include "fmt/format.h"
|
||||
#include "readibm.h"
|
||||
|
||||
int mainReadAmpro(int argc, const char* argv[])
|
||||
{
|
||||
setReaderDefaultSource(":t=0-79:s=0");
|
||||
setReaderDefaultOutput("ampro.adf");
|
||||
setReaderRevolutions(2);
|
||||
sectorIdBase.setDefaultValue(17);
|
||||
return mainReadIBM(argc, argv);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ output {
|
||||
|
||||
decoder {
|
||||
ibm {
|
||||
sector_base: 0
|
||||
sector_id_base: 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ output {
|
||||
|
||||
decoder {
|
||||
ibm {
|
||||
sector_base: 0
|
||||
sector_id_base: 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
30
src/readables/ampro.textpb
Normal file
30
src/readables/ampro.textpb
Normal file
@@ -0,0 +1,30 @@
|
||||
input {
|
||||
disk {
|
||||
drive {}
|
||||
}
|
||||
}
|
||||
|
||||
output {
|
||||
file {
|
||||
filename: "ampro.img"
|
||||
img {}
|
||||
}
|
||||
}
|
||||
|
||||
decoder {
|
||||
ibm {
|
||||
sector_id_base: 17
|
||||
}
|
||||
}
|
||||
|
||||
cylinders {
|
||||
start: 0
|
||||
end: 79
|
||||
}
|
||||
|
||||
heads {
|
||||
start: 0
|
||||
end: 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user