Add the ability to fake the index pulse source, allowing old drives to be used

with FluxEngine.
This commit is contained in:
David Given
2020-01-12 01:23:47 +01:00
parent 4ed1fb6bac
commit d77841c3b7
15 changed files with 471 additions and 341 deletions

View File

@@ -4,8 +4,15 @@
#include "usb.h"
#include "fluxsink/fluxsink.h"
FlagGroup hardwareFluxSinkFlags;
static bool high_density = false;
static IntFlag indexMode(
{ "--write-index-mode" },
"index pulse source (0=drive, 1=300 RPM fake source, 2=360 RPM fake source",
0);
void setHardwareFluxSinkDensity(bool high_density)
{
::high_density = high_density;
@@ -26,7 +33,7 @@ public:
public:
void writeFlux(int track, int side, Fluxmap& fluxmap)
{
usbSetDrive(_drive, high_density);
usbSetDrive(_drive, high_density, indexMode);
usbSeek(track);
Bytes crunched = fluxmap.rawBytes().crunch();