Skip to content

Commit

Permalink
Allow overriding number of tracks to capture
Browse files Browse the repository at this point in the history
  • Loading branch information
picosonic committed Oct 31, 2018
1 parent 6eb5821 commit 3ff33ac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tools/README.md
Expand Up @@ -11,7 +11,7 @@ Also output to **.dfi** (DiscFerret flux dump) is possible (not tested).

## Syntax :

`[-i input_rfi_file] [[-c] | [-o output_file]] [-spidiv spi_divider] [[-ss]|[-ds]] [-r retries] [-sort] [-summary] [-v]`
`[-i input_rfi_file] [[-c] | [-o output_file]] [-spidiv spi_divider] [[-ss]|[-ds]] [-r retries] [-sort] [-summary] [-tmax maxtracks] [-v]`

## Where :

Expand All @@ -24,6 +24,7 @@ Also output to **.dfi** (DiscFerret flux dump) is possible (not tested).
* `-ds` Force double-sided capture (unless output is to .ssd)
* `-sort` Sort sectors in diskstore prior to writing image
* `-summary` Present a summary of operations once complete
* `-tmax` Specify the maximum track number you wish to try stepping to
* `-v` Verbose

## Return codes :
Expand Down
13 changes: 12 additions & 1 deletion tools/bbcfdc.c
Expand Up @@ -121,7 +121,7 @@ void showargs(const char *exename)
#ifdef NOPI
fprintf(stderr, "[-i input_rfi_file] ");
#endif
fprintf(stderr, "[[-c] | [-o output_file]] [-spidiv spi_divider] [[-ss]|[-ds]] [-r retries] [-sort] [-summary] [-v]\n");
fprintf(stderr, "[[-c] | [-o output_file]] [-spidiv spi_divider] [[-ss]|[-ds]] [-r retries] [-sort] [-summary] [-tmax maxtracks] [-v]\n");
}

int main(int argc,char **argv)
Expand Down Expand Up @@ -203,6 +203,17 @@ int main(int argc,char **argv)
retries=retval;
}
else
if ((strcmp(argv[argn], "-tmax")==0) && ((argn+1)<argc))
{
int retval;

++argn;

// Override the maximum number of drive tracks
if (sscanf(argv[argn], "%3d", &retval)==1)
hw_setmaxtracks(retval);
}
else
if ((strcmp(argv[argn], "-spidiv")==0) && ((argn+1)<argc))
{
int retval;
Expand Down

0 comments on commit 3ff33ac

Please sign in to comment.