Skip to content

Commit e496733

Browse files
authored
Merge pull request #823 from davidgiven/cleanup
Do some cleanup since the last changes.
2 parents 83432be + 07ebed8 commit e496733

File tree

11 files changed

+29
-253
lines changed

11 files changed

+29
-253
lines changed

doc/disk-40track_drive.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

doc/disk-apple2_drive.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

doc/disk-shugart_drive.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

doc/drives.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,35 +36,17 @@ Forty track formats on a forty track drive
3636
------------------------------------------
3737

3838
If you actually have a forty track drive, you need to tell FluxEngine. This is
39-
done by adding the special profile `40track_drive`:
39+
done by adding `--drivetype=40`:
4040

4141
```
42-
fluxengine write ibm --360 40track_drive -i image.img -d drive:0
42+
fluxengine write -c ibm --360 --drivetype=40 -i image.img -d drive:0
4343
```
4444

4545
It should then Just Work. This is supported by both FluxEngine and Greaseweazle
4646
hardware.
4747

4848
Obviously you can't write an eighty-track format using a forty-track drive!
4949

50-
Apple II drives
51-
---------------
52-
53-
The Apple II had special drives which supported microstepping: when commanded
54-
to move the head, then instead of moving in single-track steps as is done in
55-
most other drives, the Apple II drive would move in quarter-track steps. This
56-
allowed much less precise head alignment, as small errors could be corrected in
57-
software. (The Brother word processor drives were similar.) The bus interface
58-
is different from normal PC drives.
59-
60-
The FluxEngine client supports these with the `apple2_drive` profile:
61-
62-
```
63-
fluxengine write apple2 apple2_drive -i image.img -d drive:0
64-
```
65-
66-
This is supported only by Greaseweazle hardware.
67-
6850
Shugart drives
6951
--------------
7052

@@ -77,14 +59,32 @@ the drives must be jumpered to configure them. This was mostly used by older
7759
3.5" drives, such as those on the Atari ST. [the How It Works
7860
page](technical.md) for the pinout.
7961

80-
The FluxEngine client supports these with the `shugart_drive` profile:
62+
The FluxEngine client supports these with `--bus=shugart`:
8163

8264
```
83-
fluxengine write atarist720 shugart_drive -i image.img -d drive:0
65+
fluxengine write -c atarist720 --bus=shugart -i image.img -d drive:0
8466
```
8567

86-
(If you have a 40-track Shugart drive, use _both_ `shugart_drive` and
87-
`40track_drive`.)
68+
(If you have a 40-track Shugart drive, use _both_ `--bus=shugart` and
69+
`--drivetype=40`.)
70+
71+
This is supported only by Greaseweazle hardware.
72+
73+
Apple II drives
74+
---------------
75+
76+
The Apple II had special drives which supported microstepping: when commanded
77+
to move the head, then instead of moving in single-track steps as is done in
78+
most other drives, the Apple II drive would move in quarter-track steps. This
79+
allowed much less precise head alignment, as small errors could be corrected in
80+
software. (The Brother word processor drives were similar.) The bus interface
81+
is different from normal PC drives.
82+
83+
The FluxEngine client supports these with `--drivetype=160 --bus=appleii`.
84+
85+
```
86+
fluxengine write -c apple2 --drivetype=160 --bus=appleii -i image.img -d drive:0
87+
```
8888

8989
This is supported only by Greaseweazle hardware.
9090

doc/using.md

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ encoder {
108108
}
109109
}
110110
}
111-
$ fluxengine write ibm --1440 config.textpb -i image.img
111+
$ fluxengine write -c ibm --1440 -c config.textpb -i image.img
112112
```
113113

114114
...or you can specify them on the command line:
115115

116116
```
117-
$ fluxengine write ibm --1440 -i image.img --encoder.ibm.trackdata.emit_iam=false
117+
$ fluxengine write -c ibm --1440 -i image.img --encoder.ibm.trackdata.emit_iam=false
118118
```
119119

120120
Both the above invocations are equivalent. The text files use [Google's
@@ -128,7 +128,7 @@ files as you wish; they are all merged left to right. You can see all these
128128
settings by doing:
129129

130130
```
131-
$ fluxengine write ibm --1440 --config
131+
$ fluxengine write -c ibm --1440 --show-config
132132
```
133133

134134
The `--config` option will cause the current configuration to be dumped to the
@@ -159,27 +159,13 @@ more common tools.
159159
disk). `<profile>` is a reference to an internal output configuration file
160160
describing the format.
161161

162-
- `fluxengine rawread -s <flux source> -d <flux destination>`
163-
164-
Reads flux (possibly from a disk) and writes it to a flux file without doing
165-
any decoding. You can specify a profile if you want to read a subset of the
166-
disk.
167-
168162
- `fluxengine rawwrite -s <flux source> -d <flux destination>`
169163

170164
Reads flux from a file and writes it (possibly to a disk) without doing any
171165
encoding. You can specify a profile if you want to write a subset of the
172166
disk.
173167

174-
- `fluxengine merge -s <fluxfile> -s <fluxfile...> -d <fluxfile`
175-
176-
Merges data from multiple flux files together. This is useful if you have
177-
several reads from an unreliable disk where each read has a different set
178-
of good sectors. By merging the flux files, you get to combine all the
179-
data. Don't use this on reads of different disks, for obvious results! Note
180-
that this works on flux files, not on flux sources.
181-
182-
- `fluxengine inspect -s <flux source> -c <cylinder> -h <head> -B`
168+
- `fluxengine inspect -s <flux source> -t <track> -h <head> -B`
183169

184170
Reads flux (possibly from a disk) and does various analyses of it to try and
185171
detect the clock rate, display raw flux information, examine the underlying
@@ -198,14 +184,8 @@ more common tools.
198184

199185
There are other tools; try `fluxengine --help`.
200186

201-
**Important note on `rawread` and `rawwrite`:** You can't use these tools to
187+
**Important note on `rawwrite`:** You can't use theis tool to
202188
copy disks, in most circumstances. See [the FAQ](faq.md) for more information.
203-
Also, `rawread` is not guaranteed to read correctly. Floppy disks are
204-
fundamentally unreliable, and random bit errors may occur at any time; these
205-
can only be detected by performing a decode and verifying the checksums on the
206-
sectors. To perform a correct read, it's recommended to do `fluxengine read`
207-
with the `--copy-flux-to` option, to perform a decode to a filesystem image
208-
while also writing to a flux file.
209189

210190
### Flux sources and destinations
211191

lib/algorithms/readerwriter.cc

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -741,38 +741,3 @@ void readDiskCommand(
741741
*diskflux->image, globalConfig()->decoder().write_csv_to());
742742
writer.writeImage(*diskflux->image);
743743
}
744-
745-
void rawReadDiskCommand(FluxSource& fluxsource, FluxSink& fluxsink)
746-
{
747-
log(BeginOperationLogMessage{"Performing raw read of disk"});
748-
749-
if (fluxsource.isHardware() || fluxsink.isHardware())
750-
measureDiskRotation();
751-
auto physicalLocations = Layout::computePhysicalLocations();
752-
unsigned index = 0;
753-
for (const auto& physicalLocation : physicalLocations)
754-
{
755-
log(OperationProgressLogMessage{
756-
index * 100 / (int)physicalLocations.size()});
757-
index++;
758-
759-
testForEmergencyStop();
760-
auto trackInfo = Layout::getLayoutOfTrackPhysical(
761-
physicalLocation.cylinder, physicalLocation.head);
762-
auto fluxSourceIterator = fluxsource.readFlux(
763-
trackInfo->physicalTrack, trackInfo->physicalSide);
764-
765-
log(BeginReadOperationLogMessage{
766-
trackInfo->physicalTrack, trackInfo->physicalSide});
767-
auto fluxmap = fluxSourceIterator->next();
768-
log(EndReadOperationLogMessage());
769-
log("{0} ms in {1} bytes",
770-
(int)(fluxmap->duration() / 1e6),
771-
fluxmap->bytes());
772-
773-
fluxsink.writeFlux(
774-
trackInfo->physicalTrack, trackInfo->physicalSide, *fluxmap);
775-
}
776-
777-
log(EndOperationLogMessage{"Raw read complete"});
778-
}

lib/algorithms/readerwriter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,5 @@ extern std::shared_ptr<const DiskFlux> readDiskCommand(
111111
FluxSource& fluxsource, Decoder& decoder);
112112
extern void readDiskCommand(
113113
FluxSource& source, Decoder& decoder, ImageWriter& writer);
114-
extern void rawReadDiskCommand(FluxSource& source, FluxSink& sink);
115114

116115
#endif

src/build.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@
1919
"./fe-getfileinfo.cc",
2020
"./fe-inspect.cc",
2121
"./fe-ls.cc",
22-
"./fe-merge.cc",
2322
"./fe-mkdir.cc",
2423
"./fe-mv.cc",
2524
"./fe-putfile.cc",
26-
"./fe-rawread.cc",
2725
"./fe-rawwrite.cc",
2826
"./fe-read.cc",
2927
"./fe-rm.cc",

src/fe-merge.cc

Lines changed: 0 additions & 64 deletions
This file was deleted.

src/fe-rawread.cc

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)