mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Overhaul the TPI stuff; now both the drive and the layout have a TPI setting,
which must be set.
This commit is contained in:
114
Makefile
114
Makefile
@@ -1,4 +1,4 @@
|
||||
# Special Windows settings.
|
||||
#Special Windows settings.
|
||||
|
||||
ifeq ($(OS), Windows_NT)
|
||||
MINGWBIN = /mingw32/bin
|
||||
@@ -16,12 +16,12 @@ ifeq ($(OS), Windows_NT)
|
||||
-Wno-deprecated-enum-float-conversion \
|
||||
-Wno-deprecated-enum-enum-conversion
|
||||
|
||||
# Required to get the gcc run-time libraries on the path.
|
||||
#Required to get the gcc run - time libraries on the path.
|
||||
export PATH := $(PATH):$(MINGWBIN)
|
||||
EXT ?= .exe
|
||||
endif
|
||||
|
||||
# Special OSX settings.
|
||||
#Special OSX settings.
|
||||
|
||||
ifeq ($(shell uname),Darwin)
|
||||
PLATFORM = OSX
|
||||
@@ -30,14 +30,14 @@ ifeq ($(shell uname),Darwin)
|
||||
-framework Foundation
|
||||
endif
|
||||
|
||||
# Check the Make version.
|
||||
#Check the Make version.
|
||||
|
||||
|
||||
ifeq ($(findstring 4.,$(MAKE_VERSION)),)
|
||||
$(error You need GNU Make 4.x for this (if you're on OSX, use gmake).)
|
||||
endif
|
||||
|
||||
# Normal settings.
|
||||
#Normal settings.
|
||||
|
||||
OBJDIR ?= .obj
|
||||
CCPREFIX ?=
|
||||
@@ -164,58 +164,58 @@ include tests/build.mk
|
||||
do-encodedecodetest = $(eval $(do-encodedecodetest-impl))
|
||||
define do-encodedecodetest-impl
|
||||
|
||||
tests: $(OBJDIR)/$1$3.flux.encodedecode
|
||||
$(OBJDIR)/$1$3.flux.encodedecode: scripts/encodedecodetest.sh $(FLUXENGINE_BIN) $2
|
||||
tests: $(OBJDIR)/$1$$(subst $$(space),_,$3).flux.encodedecode
|
||||
$(OBJDIR)/$1$$(subst $$(space),_,$3).flux.encodedecode: scripts/encodedecodetest.sh $(FLUXENGINE_BIN) $2
|
||||
@mkdir -p $(dir $$@)
|
||||
@echo ENCODEDECODETEST $1 flux $(FLUXENGINE_BIN) $2 $3
|
||||
@scripts/encodedecodetest.sh $1 flux $(FLUXENGINE_BIN) $2 $3 > $$@
|
||||
|
||||
tests: $(OBJDIR)/$1$3.scp.encodedecode
|
||||
$(OBJDIR)/$1$3.scp.encodedecode: scripts/encodedecodetest.sh $(FLUXENGINE_BIN) $2
|
||||
tests: $(OBJDIR)/$1$$(subst $$(space),_,$3).scp.encodedecode
|
||||
$(OBJDIR)/$1$$(subst $$(space),_,$3).scp.encodedecode: scripts/encodedecodetest.sh $(FLUXENGINE_BIN) $2
|
||||
@mkdir -p $(dir $$@)
|
||||
@echo ENCODEDECODETEST $1 scp $(FLUXENGINE_BIN) $2 $3
|
||||
@scripts/encodedecodetest.sh $1 scp $(FLUXENGINE_BIN) $2 $3 > $$@
|
||||
|
||||
endef
|
||||
|
||||
$(call do-encodedecodetest,agat)
|
||||
$(call do-encodedecodetest,amiga)
|
||||
$(call do-encodedecodetest,apple2,,--140)
|
||||
$(call do-encodedecodetest,atarist,,--360)
|
||||
$(call do-encodedecodetest,atarist,,--370)
|
||||
$(call do-encodedecodetest,atarist,,--400)
|
||||
$(call do-encodedecodetest,atarist,,--410)
|
||||
$(call do-encodedecodetest,atarist,,--720)
|
||||
$(call do-encodedecodetest,atarist,,--740)
|
||||
$(call do-encodedecodetest,atarist,,--800)
|
||||
$(call do-encodedecodetest,atarist,,--820)
|
||||
$(call do-encodedecodetest,agat,,--drive.tpi=96)
|
||||
$(call do-encodedecodetest,amiga,,--drive.tpi=135)
|
||||
$(call do-encodedecodetest,apple2,,--140 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,atarist,,--360 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,atarist,,--370 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,atarist,,--400 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,atarist,,--410 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,atarist,,--720 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,atarist,,--740 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,atarist,,--800 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,atarist,,--820 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,bk)
|
||||
$(call do-encodedecodetest,brother,,--120)
|
||||
$(call do-encodedecodetest,brother,,--240)
|
||||
$(call do-encodedecodetest,commodore,scripts/commodore1541_test.textpb,--171)
|
||||
$(call do-encodedecodetest,commodore,scripts/commodore1541_test.textpb,--192)
|
||||
$(call do-encodedecodetest,commodore,,--800)
|
||||
$(call do-encodedecodetest,commodore,,--1620)
|
||||
$(call do-encodedecodetest,hplif,,--264)
|
||||
$(call do-encodedecodetest,hplif,,--616)
|
||||
$(call do-encodedecodetest,hplif,,--770)
|
||||
$(call do-encodedecodetest,ibm,,--1200)
|
||||
$(call do-encodedecodetest,ibm,,--1232)
|
||||
$(call do-encodedecodetest,ibm,,--1440)
|
||||
$(call do-encodedecodetest,ibm,,--1680)
|
||||
$(call do-encodedecodetest,ibm,,--180)
|
||||
$(call do-encodedecodetest,ibm,,--160)
|
||||
$(call do-encodedecodetest,ibm,,--320)
|
||||
$(call do-encodedecodetest,ibm,,--360)
|
||||
$(call do-encodedecodetest,ibm,,--720_96)
|
||||
$(call do-encodedecodetest,ibm,,--720_135)
|
||||
$(call do-encodedecodetest,mac,scripts/mac400_test.textpb,--400)
|
||||
$(call do-encodedecodetest,mac,scripts/mac800_test.textpb,--800)
|
||||
$(call do-encodedecodetest,n88basic)
|
||||
$(call do-encodedecodetest,rx50)
|
||||
$(call do-encodedecodetest,tids990)
|
||||
$(call do-encodedecodetest,victor9k,,--612)
|
||||
$(call do-encodedecodetest,victor9k,,--1224)
|
||||
$(call do-encodedecodetest,brother,,--120 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,brother,,--240 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,commodore,scripts/commodore1541_test.textpb,--171 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,commodore,scripts/commodore1541_test.textpb,--192 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,commodore,,--800 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,commodore,,--1620 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,hplif,,--264 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,hplif,,--616 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,hplif,,--770 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,ibm,,--1200 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,ibm,,--1232 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,ibm,,--1440 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,ibm,,--1680 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,ibm,,--180 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,ibm,,--160 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,ibm,,--320 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,ibm,,--360 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,ibm,,--720_96 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,ibm,,--720_135 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,mac,scripts/mac400_test.textpb,--400 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,mac,scripts/mac800_test.textpb,--800 --drive.tpi=135)
|
||||
$(call do-encodedecodetest,n88basic,,--drive.tpi=96)
|
||||
$(call do-encodedecodetest,rx50,,--drive.tpi=96)
|
||||
$(call do-encodedecodetest,tids990,,--drive.tpi=48)
|
||||
$(call do-encodedecodetest,victor9k,,--612 --drive.tpi=96)
|
||||
$(call do-encodedecodetest,victor9k,,--1224 --drive.tpi=96)
|
||||
|
||||
do-corpustest = $(eval $(do-corpustest-impl))
|
||||
define do-corpustest-impl
|
||||
@@ -232,20 +232,20 @@ endef
|
||||
|
||||
ifneq ($(wildcard ../fluxengine-testdata/data),)
|
||||
|
||||
$(call do-corpustest,amiga.flux,amiga.adf,amiga)
|
||||
$(call do-corpustest,atarist360.flux,atarist360.st,atarist --360)
|
||||
$(call do-corpustest,atarist720.flux,atarist720.st,atarist --720)
|
||||
$(call do-corpustest,brother120.flux,brother120.img,brother --120)
|
||||
$(call do-corpustest,cmd-fd2000.flux,cmd-fd2000.img,commodore --1620)
|
||||
$(call do-corpustest,ibm1232.flux,ibm1232.img,ibm --1232)
|
||||
$(call do-corpustest,ibm1440.flux,ibm1440.img,ibm --1440)
|
||||
$(call do-corpustest,mac800.flux,mac800.dsk,mac --800)
|
||||
$(call do-corpustest,micropolis315.flux,micropolis315.img,micropolis --315)
|
||||
$(call do-corpustest,amiga.flux,amiga.adf,amiga --drive.tpi=135)
|
||||
$(call do-corpustest,atarist360.flux,atarist360.st,atarist --360 --drive.tpi=135)
|
||||
$(call do-corpustest,atarist720.flux,atarist720.st,atarist --720 --drive.tpi=135)
|
||||
$(call do-corpustest,brother120.flux,brother120.img,brother --120 --drive.tpi=135)
|
||||
$(call do-corpustest,cmd-fd2000.flux,cmd-fd2000.img,commodore --1620 --drive.tpi=135)
|
||||
$(call do-corpustest,ibm1232.flux,ibm1232.img,ibm --1232 --drive.tpi=96)
|
||||
$(call do-corpustest,ibm1440.flux,ibm1440.img,ibm --1440 --drive.tpi=135)
|
||||
$(call do-corpustest,mac800.flux,mac800.dsk,mac --800 --drive.tpi=135)
|
||||
$(call do-corpustest,micropolis315.flux,micropolis315.img,micropolis --315 --drive.tpi=100)
|
||||
$(call do-corpustest,northstar87-synthetic.flux,northstar87-synthetic.nsi,northstar --87 --drive.tpi=48)
|
||||
$(call do-corpustest,northstar175-synthetic.flux,northstar175-synthetic.nsi,northstar --175 --drive.tpi=48)
|
||||
$(call do-corpustest,northstar350-synthetic.flux,northstar350-synthetic.nsi,northstar --350 --drive.tpi=48)
|
||||
$(call do-corpustest,victor9k_ss.flux,victor9k_ss.img,victor9k --612)
|
||||
$(call do-corpustest,victor9k_ds.flux,victor9k_ds.img,victor9k --1224)
|
||||
$(call do-corpustest,victor9k_ss.flux,victor9k_ss.img,victor9k --612 --drive.tpi=96)
|
||||
$(call do-corpustest,victor9k_ds.flux,victor9k_ds.img,victor9k --1224 --drive.tpi=96)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ choices because they can store multiple types of file system.
|
||||
| [`mac`](doc/disk-mac.md) | Macintosh: 400kB/800kB 3.5" GCR | 🦄 | 🦄 | MACHFS |
|
||||
| [`micropolis`](doc/disk-micropolis.md) | Micropolis: 100tpi MetaFloppy disks | 🦄 | 🦄 | |
|
||||
| [`mx`](doc/disk-mx.md) | DVK MX: Soviet-era PDP-11 clone | 🦖 | | |
|
||||
| [`n88basic`](doc/disk-n88basic.md) | N88-BASIC: PC8800/PC98 5.25"/3.5" 77-track 26-sector DSHD | 🦄 | 🦄 | |
|
||||
| [`n88basic`](doc/disk-n88basic.md) | N88-BASIC: PC8800/PC98 5.25" 77-track 26-sector DSHD | 🦄 | 🦄 | |
|
||||
| [`northstar`](doc/disk-northstar.md) | Northstar: 5.25" hard sectored | 🦄 | 🦄 | |
|
||||
| [`psos`](doc/disk-psos.md) | pSOS: 800kB DSDD with PHILE | 🦄 | 🦄 | PHILE |
|
||||
| [`rolandd20`](doc/disk-rolandd20.md) | Roland D20: 3.5" electronic synthesiser disks | 🦖 | | |
|
||||
@@ -260,5 +260,3 @@ __Important:__ Because of all these exceptions, if you distribute the
|
||||
FluxEngine package as a whole, you must comply with the terms of _all_ of the
|
||||
licensing terms. This means that __effectively the FluxEngine package is
|
||||
distributable under the terms of the GPL 2.0__.
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!-- This file is automatically generated. Do not edit. -->
|
||||
# PC8800/PC98 5.25"/3.5" 77-track 26-sector DSHD
|
||||
# PC8800/PC98 5.25" 77-track 26-sector DSHD
|
||||
|
||||
The N88-BASIC disk format is the one used by the operating system of the same
|
||||
name for the Japanese PC8800 and PC98 computers. It is another IBM scheme
|
||||
|
||||
@@ -14,20 +14,20 @@ import "lib/layout.proto";
|
||||
|
||||
enum SupportStatus
|
||||
{
|
||||
UNSUPPORTED = 0;
|
||||
DINOSAUR = 1;
|
||||
UNICORN = 2;
|
||||
UNSUPPORTED = 0;
|
||||
DINOSAUR = 1;
|
||||
UNICORN = 2;
|
||||
}
|
||||
|
||||
// NEXT_TAG: 27
|
||||
message ConfigProto
|
||||
{
|
||||
optional string shortname = 24;
|
||||
optional string shortname = 24;
|
||||
optional string comment = 8;
|
||||
optional bool is_extension = 13;
|
||||
repeated string documentation = 23;
|
||||
optional SupportStatus read_support_status = 25 [ default = UNSUPPORTED ];
|
||||
optional SupportStatus write_support_status = 26 [ default = UNSUPPORTED ];
|
||||
repeated string documentation = 23;
|
||||
optional SupportStatus read_support_status = 25 [ default = UNSUPPORTED ];
|
||||
optional SupportStatus write_support_status = 26 [ default = UNSUPPORTED ];
|
||||
|
||||
optional LayoutProto layout = 18;
|
||||
|
||||
@@ -44,18 +44,17 @@ message ConfigProto
|
||||
|
||||
optional RangeProto tracks = 6;
|
||||
optional RangeProto heads = 7;
|
||||
optional float tpi = 16 [ (help) = "TPI of image; if 0, use TPI of drive" ];
|
||||
|
||||
optional FilesystemProto filesystem = 17;
|
||||
|
||||
repeated OptionProto option = 20;
|
||||
repeated OptionGroupProto option_group = 22;
|
||||
repeated OptionGroupProto option_group = 22;
|
||||
}
|
||||
|
||||
message OptionRequirementProto
|
||||
{
|
||||
optional string key = 1 [ (help) = "path to config value" ];
|
||||
repeated string value = 2 [ (help) = "list of required values" ];
|
||||
optional string key = 1 [ (help) = "path to config value" ];
|
||||
repeated string value = 2 [ (help) = "list of required values" ];
|
||||
}
|
||||
|
||||
// NEXT_TAG: 8
|
||||
@@ -65,12 +64,10 @@ message OptionProto
|
||||
optional string comment = 2 [ (help) = "help text for option" ];
|
||||
optional string message = 3
|
||||
[ (help) = "message to display when option is in use" ];
|
||||
optional bool set_by_default = 6 [
|
||||
(help) = "this option is applied by default",
|
||||
default = false
|
||||
];
|
||||
repeated OptionRequirementProto requires = 7 [
|
||||
(help) = "prerequisites for this option" ];
|
||||
optional bool set_by_default = 6
|
||||
[ (help) = "this option is applied by default", default = false ];
|
||||
repeated OptionRequirementProto requires = 7
|
||||
[ (help) = "prerequisites for this option" ];
|
||||
|
||||
optional ConfigProto config = 4
|
||||
[ (help) = "option data", (recurse) = false ];
|
||||
@@ -78,7 +75,6 @@ message OptionProto
|
||||
|
||||
message OptionGroupProto
|
||||
{
|
||||
optional string comment = 1 [ (help) = "help text for option group" ];
|
||||
repeated OptionProto option = 2;
|
||||
optional string comment = 1 [ (help) = "help text for option group" ];
|
||||
repeated OptionProto option = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
_fileheader.start_track = strackno(minTrack, minSide);
|
||||
_fileheader.end_track = strackno(maxTrack, maxSide);
|
||||
_fileheader.flags = SCP_FLAG_INDEXED;
|
||||
if (config.tpi() != 48)
|
||||
if (config.drive().tpi() != 48)
|
||||
_fileheader.flags |= SCP_FLAG_96TPI;
|
||||
_fileheader.cell_width = 0;
|
||||
if ((minSide == 0) && (maxSide == 0))
|
||||
@@ -65,7 +65,8 @@ public:
|
||||
else
|
||||
_fileheader.heads = 0;
|
||||
|
||||
log("SCP: writing 96 tpi {} file containing {} tracks",
|
||||
log("SCP: writing {} tpi {} file containing {} tracks",
|
||||
(_fileheader.flags & SCP_FLAG_96TPI) ? 96 : 48,
|
||||
(minSide == maxSide) ? "single sided" : "double sided",
|
||||
_fileheader.end_track - _fileheader.start_track + 1);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ public:
|
||||
if (disktype == 1)
|
||||
{
|
||||
/* 5.25" with quarter stepping. */
|
||||
::config.set_tpi(48);
|
||||
::config.mutable_drive()->set_tracks(160);
|
||||
::config.mutable_drive()->set_heads(1);
|
||||
::config.mutable_drive()->set_head_width(4);
|
||||
@@ -86,9 +85,8 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 3.5". 96 is wrong but that's what we use. */
|
||||
::config.set_tpi(96);
|
||||
::config.mutable_drive()->set_tpi(96);
|
||||
/* 3.5". */
|
||||
::config.mutable_drive()->set_tpi(135);
|
||||
}
|
||||
|
||||
Bytes stream = findChunk("STRM");
|
||||
|
||||
@@ -43,7 +43,8 @@ public:
|
||||
error("input not a SCP file");
|
||||
|
||||
int tpi = (_header.flags & SCP_FLAG_96TPI) ? 96 : 48;
|
||||
::config.set_tpi(tpi);
|
||||
if (!::config.drive().has_tpi())
|
||||
::config.mutable_drive()->set_tpi(tpi);
|
||||
|
||||
_resolution = 25 * (_header.resolution + 1);
|
||||
int startSide = (_header.heads == 2) ? 1 : 0;
|
||||
|
||||
@@ -66,14 +66,14 @@ public:
|
||||
{
|
||||
log("D88: forcing high density mode");
|
||||
config.mutable_drive()->set_high_density(true);
|
||||
config.set_tpi(96);
|
||||
config.mutable_layout()->set_tpi(96);
|
||||
}
|
||||
else
|
||||
{
|
||||
log("D88: forcing single/double density mode");
|
||||
clockRate = 300;
|
||||
config.mutable_drive()->set_high_density(false);
|
||||
config.set_tpi(48);
|
||||
config.mutable_layout()->set_tpi(48);
|
||||
}
|
||||
|
||||
auto layout = config.mutable_layout();
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
log("NFD: HD 1.2MB mode");
|
||||
log("NFD: forcing hign density mode");
|
||||
config.mutable_drive()->set_high_density(true);
|
||||
config.set_tpi(96);
|
||||
config.mutable_layout()->set_tpi(96);
|
||||
|
||||
std::unique_ptr<Image> image(new Image);
|
||||
for (int track = 0; track < 163; track++)
|
||||
|
||||
@@ -3,14 +3,32 @@
|
||||
#include "lib/proto.h"
|
||||
#include "lib/environment.h"
|
||||
|
||||
bool approximatelyEqual(float a, float b, float epsilon)
|
||||
{
|
||||
return fabs(a - b) <= ((fabs(a) < fabs(b) ? fabs(b) : fabs(a)) * epsilon);
|
||||
}
|
||||
|
||||
static unsigned getTrackStep()
|
||||
{
|
||||
unsigned track_step =
|
||||
(config.tpi() == 0) ? 1 : (config.drive().tpi() / config.tpi());
|
||||
if (!config.layout().tpi())
|
||||
error("no layout TPI set");
|
||||
if (!config.drive().tpi())
|
||||
error("no drive TPI set");
|
||||
|
||||
if (track_step == 0)
|
||||
error("this drive can't write this image, because the head is too big");
|
||||
return track_step;
|
||||
if (config.layout().tpi() == 0.0)
|
||||
error("layout TPI is zero; this shouldn't happen?");
|
||||
|
||||
float trackStepFactor = config.drive().tpi() / config.layout().tpi();
|
||||
|
||||
if (!approximatelyEqual(trackStepFactor, round(trackStepFactor), 0.001))
|
||||
error(
|
||||
"this drive can't handle this image, because the drive TPI doesn't "
|
||||
"divide neatly into the layout TPI");
|
||||
if (trackStepFactor < 0.999)
|
||||
error(
|
||||
"this drive can't handle this image, because the head is too big");
|
||||
|
||||
return round(trackStepFactor);
|
||||
}
|
||||
|
||||
unsigned Layout::remapTrackPhysicalToLogical(unsigned ptrack)
|
||||
|
||||
@@ -13,7 +13,7 @@ message SectorListProto
|
||||
optional int32 count = 3
|
||||
[ (help) = "number of sectors in a continuous run" ];
|
||||
optional int32 skew = 4
|
||||
[ default = 1, (help) = "apply this skew between sectors" ];
|
||||
[ default = 1, (help) = "apply this skew between sectors" ];
|
||||
}
|
||||
|
||||
message LayoutProto
|
||||
@@ -27,12 +27,16 @@ message LayoutProto
|
||||
|
||||
message LayoutdataProto
|
||||
{
|
||||
optional int32 track = 1
|
||||
[ (help) = "if present, this format only applies to this logical track" ];
|
||||
optional int32 track = 1 [
|
||||
(help) =
|
||||
"if present, this format only applies to this logical track"
|
||||
];
|
||||
optional int32 up_to_track = 5
|
||||
[ (help) = "if present, forms a range with track" ];
|
||||
optional int32 side = 2
|
||||
[ (help) = "if present, this format only applies to this logical side" ];
|
||||
optional int32 side = 2 [
|
||||
(help) =
|
||||
"if present, this format only applies to this logical side"
|
||||
];
|
||||
|
||||
optional int32 sector_size = 3
|
||||
[ default = 512, (help) = "number of bytes per sector" ];
|
||||
@@ -52,5 +56,6 @@ message LayoutProto
|
||||
optional Order order = 4
|
||||
[ default = CHS, (help) = "the order of sectors in the filesystem" ];
|
||||
optional bool swap_sides = 5
|
||||
[ default = false, (help) = "the sides are inverted on this disk" ];
|
||||
[ default = false, (help) = "the sides are inverted on this disk" ];
|
||||
optional float tpi = 6 [ (help) = "TPI of image; if 0, use TPI of drive" ];
|
||||
}
|
||||
|
||||
35
lib/proto.cc
35
lib/proto.cc
@@ -11,13 +11,36 @@ ConfigProto config = []()
|
||||
return config;
|
||||
}();
|
||||
|
||||
static double toFloat(const std::string& value)
|
||||
{
|
||||
try
|
||||
{
|
||||
size_t idx;
|
||||
float f = std::stof(value, &idx);
|
||||
if (value[idx] != '\0')
|
||||
throw std::invalid_argument("trailing garbage");
|
||||
return f;
|
||||
}
|
||||
catch (const std::invalid_argument& e)
|
||||
{
|
||||
error("invalid number '{}'", value);
|
||||
}
|
||||
}
|
||||
|
||||
static double toDouble(const std::string& value)
|
||||
{
|
||||
size_t idx;
|
||||
double d = std::stod(value, &idx);
|
||||
if (value[idx] != '\0')
|
||||
try
|
||||
{
|
||||
size_t idx;
|
||||
double d = std::stod(value, &idx);
|
||||
if (value[idx] != '\0')
|
||||
throw std::invalid_argument("trailing garbage");
|
||||
return d;
|
||||
}
|
||||
catch (const std::invalid_argument& e)
|
||||
{
|
||||
error("invalid number '{}'", value);
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
static int64_t toInt64(const std::string& value)
|
||||
@@ -116,6 +139,10 @@ void setProtoFieldFromString(ProtoField& protoField, const std::string& value)
|
||||
const auto* reflection = message->GetReflection();
|
||||
switch (field->type())
|
||||
{
|
||||
case google::protobuf::FieldDescriptor::TYPE_FLOAT:
|
||||
reflection->SetFloat(message, field, toFloat(value));
|
||||
break;
|
||||
|
||||
case google::protobuf::FieldDescriptor::TYPE_DOUBLE:
|
||||
reflection->SetDouble(message, field, toDouble(value));
|
||||
break;
|
||||
|
||||
@@ -41,8 +41,8 @@ option_group {
|
||||
comment: '160kB 3.5" or 5.25" 40-track SSDD; S format'
|
||||
|
||||
config {
|
||||
tpi: 48
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -61,8 +61,8 @@ option_group {
|
||||
comment: '320kB 3.5" or 5.25" 80-track SSDD; M format'
|
||||
|
||||
config {
|
||||
tpi: 96
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -81,8 +81,8 @@ option_group {
|
||||
comment: '640kB 3.5" or 5.25" 80-track DSDD; L format'
|
||||
|
||||
config {
|
||||
tpi: 96
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -101,8 +101,8 @@ option_group {
|
||||
comment: '800kB 3.5" 80-track DSDD; D and E formats'
|
||||
|
||||
config {
|
||||
tpi: 96
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -122,8 +122,8 @@ option_group {
|
||||
set_by_default: true
|
||||
|
||||
config {
|
||||
tpi: 96
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
|
||||
@@ -78,9 +78,9 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
}
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,9 +91,9 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
}
|
||||
tpi: 96
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ decoder {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 77
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -62,5 +63,4 @@ layout {
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -51,5 +52,4 @@ encoder {
|
||||
agat {}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 135
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -63,7 +64,6 @@ filesystem {
|
||||
type: AMIGAFFS
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
option_group {
|
||||
comment: "Sector size"
|
||||
|
||||
@@ -82,9 +82,9 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
}
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,9 +94,9 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
}
|
||||
tpi: 96
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 35
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -83,7 +84,6 @@ option_group {
|
||||
}
|
||||
}
|
||||
}
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
order: HCS
|
||||
@@ -104,7 +105,6 @@ option_group {
|
||||
}
|
||||
}
|
||||
}
|
||||
tpi: 96
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,9 @@ decoder {
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
layout {
|
||||
tpi: 135
|
||||
}
|
||||
|
||||
option_group {
|
||||
comment: "Format variant"
|
||||
|
||||
@@ -28,6 +28,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -56,5 +57,4 @@ decoder {
|
||||
ibm {}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 67.5
|
||||
tracks: 39
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -168,7 +169,6 @@ option_group {
|
||||
type: BROTHER120
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,6 +178,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 135
|
||||
tracks: 78
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -198,7 +199,6 @@ option_group {
|
||||
type: FATFS
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,8 +76,9 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
sides: 1
|
||||
tpi: 48
|
||||
tracks: 35
|
||||
sides: 1
|
||||
layoutdata {
|
||||
sector_size: 256
|
||||
}
|
||||
@@ -122,8 +123,6 @@ option_group {
|
||||
decoder {
|
||||
c64 {}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,8 +132,9 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
sides: 1
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 1
|
||||
layoutdata {
|
||||
sector_size: 256
|
||||
}
|
||||
@@ -179,17 +179,16 @@ option_group {
|
||||
decoder {
|
||||
c64 {}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
option {
|
||||
name: "800"
|
||||
comment: "800kB 1581"
|
||||
comment: '800kB 3.5" 1581'
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 135
|
||||
tracks: 80
|
||||
sides: 2
|
||||
swap_sides: true
|
||||
@@ -222,17 +221,16 @@ option_group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
}
|
||||
}
|
||||
|
||||
option {
|
||||
name: "1042"
|
||||
comment: "1042kB 8051"
|
||||
comment: '1042kB 5.25" 8051'
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 100
|
||||
sides: 2
|
||||
tracks: 77
|
||||
layoutdata {
|
||||
@@ -271,7 +269,6 @@ option_group {
|
||||
}
|
||||
}
|
||||
}
|
||||
tpi: 100
|
||||
|
||||
decoder {
|
||||
c64 {}
|
||||
@@ -285,6 +282,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 135
|
||||
tracks: 81
|
||||
sides: 2
|
||||
swap_sides: true
|
||||
@@ -314,8 +312,6 @@ option_group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 77
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -87,5 +88,4 @@ filesystem {
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 67.5
|
||||
tracks: 40
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -30,8 +31,6 @@ decoder {
|
||||
ibm {}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
|
||||
filesystem {
|
||||
type: CPMFS
|
||||
cpmfs {
|
||||
|
||||
@@ -50,6 +50,7 @@ decoder {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 77
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -61,5 +62,4 @@ layout {
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ decoder {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 67.5
|
||||
tracks: 40
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -62,4 +63,3 @@ layout {
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
|
||||
@@ -37,7 +37,9 @@ filesystem {
|
||||
type: LIF
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
layout {
|
||||
tpi: 135
|
||||
}
|
||||
|
||||
option_group {
|
||||
comment: "Format family"
|
||||
|
||||
@@ -100,8 +100,6 @@ filesystem {
|
||||
type: FATFS
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
option_group {
|
||||
comment: "Format variant"
|
||||
|
||||
@@ -110,7 +108,11 @@ option_group {
|
||||
comment: 'try to autodetect the format (unreliable)'
|
||||
set_by_default: true
|
||||
|
||||
config {}
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
option {
|
||||
@@ -124,6 +126,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -143,8 +146,6 @@ option_group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +160,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -178,8 +180,6 @@ option_group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,6 +194,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -213,8 +214,6 @@ option_group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,6 +228,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -248,8 +248,6 @@ option_group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,6 +262,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -297,6 +296,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 135
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -330,6 +330,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -363,6 +364,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 77
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -396,6 +398,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 135
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -429,6 +432,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 135
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
|
||||
@@ -15,6 +15,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 35
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -70,5 +71,4 @@ filesystem {
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 135
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -123,8 +124,6 @@ decoder {
|
||||
macintosh {}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
option_group {
|
||||
comment: "Format variant"
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ documentation:
|
||||
|
||||
drive {
|
||||
hard_sector_count: 16
|
||||
tpi: 100
|
||||
}
|
||||
|
||||
image_reader {
|
||||
@@ -130,11 +129,11 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 50
|
||||
tracks: 35
|
||||
sides: 1
|
||||
}
|
||||
|
||||
tpi: 50
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,11 +143,10 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 50
|
||||
tracks: 35
|
||||
sides: 2
|
||||
}
|
||||
|
||||
tpi: 50
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,11 +156,10 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 100
|
||||
tracks: 77
|
||||
sides: 1
|
||||
}
|
||||
|
||||
tpi: 100
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,11 +169,10 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 100
|
||||
tracks: 77
|
||||
sides: 2
|
||||
}
|
||||
|
||||
tpi: 100
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,8 +74,6 @@ decoder {
|
||||
mx {}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
|
||||
option_group {
|
||||
comment: "Format family"
|
||||
|
||||
@@ -85,6 +83,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 1
|
||||
}
|
||||
@@ -97,6 +96,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 2
|
||||
}
|
||||
@@ -109,6 +109,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 1
|
||||
}
|
||||
@@ -122,6 +123,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
shortname: 'N88-BASIC'
|
||||
comment: 'PC8800/PC98 5.25"/3.5" 77-track 26-sector DSHD'
|
||||
comment: 'PC8800/PC98 5.25" 77-track 26-sector DSHD'
|
||||
read_support_status: UNICORN
|
||||
write_support_status: UNICORN
|
||||
|
||||
@@ -28,6 +28,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 77
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -76,5 +77,4 @@ decoder {
|
||||
ibm {}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 48
|
||||
layoutdata {
|
||||
physical {
|
||||
start_sector: 0
|
||||
@@ -65,7 +66,6 @@ decoder {
|
||||
northstar {}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
|
||||
option_group {
|
||||
comment: "Format variant"
|
||||
|
||||
@@ -35,6 +35,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
order: HCS
|
||||
@@ -75,5 +76,4 @@ filesystem {
|
||||
type: PHILE
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 135
|
||||
tracks: 78
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -44,4 +45,3 @@ drive {
|
||||
head_bias: 1
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
@@ -25,6 +25,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -50,4 +51,3 @@ decoder {
|
||||
ibm {}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
@@ -33,6 +33,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 100
|
||||
tracks: 77
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -58,5 +59,4 @@ filesystem {
|
||||
type: SMAKY6
|
||||
}
|
||||
|
||||
tpi: 100
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 77
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -83,4 +84,3 @@ decoder {
|
||||
tids990 {}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
@@ -18,8 +18,6 @@ decoder {
|
||||
ibm {}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
|
||||
option_group {
|
||||
comment: "Format variant"
|
||||
|
||||
@@ -29,6 +27,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -60,6 +59,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -91,6 +91,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 40
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -123,6 +124,7 @@ option_group {
|
||||
|
||||
config {
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -145,8 +147,6 @@ option_group {
|
||||
dir_entries: 128
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ image_writer {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 80
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -310,8 +311,6 @@ decoder {
|
||||
victor9k {}
|
||||
}
|
||||
|
||||
tpi: 96
|
||||
|
||||
option_group {
|
||||
comment: "Format family"
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ decoder {
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 48
|
||||
tracks: 77
|
||||
sides: 1
|
||||
layoutdata {
|
||||
@@ -59,5 +60,4 @@ layout {
|
||||
}
|
||||
}
|
||||
|
||||
tpi: 48
|
||||
|
||||
|
||||
@@ -83,8 +83,8 @@ static void validateConfigWithOptions(std::string baseConfigName,
|
||||
{
|
||||
/* All configs must have a tpi. */
|
||||
|
||||
if (!config.has_tpi())
|
||||
configError("{}{}: no tpi set", baseConfigName, options);
|
||||
if (!config.layout().has_tpi())
|
||||
configError("{}{}: no layout.tpi set", baseConfigName, options);
|
||||
}
|
||||
|
||||
static void validateToplevelConfig(std::string name)
|
||||
|
||||
@@ -116,7 +116,12 @@ int main(void)
|
||||
try
|
||||
{
|
||||
const std::string text = R"M(
|
||||
drive {
|
||||
tpi: 96
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 10
|
||||
sides: 1
|
||||
layoutdata {
|
||||
|
||||
@@ -27,7 +27,12 @@ static void load_config(const std::string s)
|
||||
static void test_physical_sectors()
|
||||
{
|
||||
load_config(R"M(
|
||||
drive {
|
||||
tpi: 96
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 78
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -54,7 +59,12 @@ static void test_physical_sectors()
|
||||
static void test_logical_sectors()
|
||||
{
|
||||
load_config(R"M(
|
||||
drive {
|
||||
tpi: 96
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 78
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -87,7 +97,12 @@ static void test_logical_sectors()
|
||||
static void test_both_sectors()
|
||||
{
|
||||
load_config(R"M(
|
||||
drive {
|
||||
tpi: 96
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 78
|
||||
sides: 2
|
||||
layoutdata {
|
||||
@@ -120,7 +135,12 @@ static void test_both_sectors()
|
||||
static void test_skew()
|
||||
{
|
||||
load_config(R"M(
|
||||
drive {
|
||||
tpi: 96
|
||||
}
|
||||
|
||||
layout {
|
||||
tpi: 96
|
||||
tracks: 78
|
||||
sides: 2
|
||||
layoutdata {
|
||||
|
||||
Reference in New Issue
Block a user