davidgiven / fluxengine

PSOC5 floppy disk imaging interface
MIT License
349 stars 67 forks source link

fluxengine .scp files don't work with g64conv #431

Open jepler opened 2 years ago

jepler commented 2 years ago

I'm using fluxengine together with a greaseweazel v4 (though I also see a similar problem with adafruit's prototype floppy interface) working together with https://github.com/markusC64/g64conv

Using gw + g64conv, I can get a working g64 image of copy protected software -- my test is Archon. Using

$ gw read filename.scp --tracks h=0
$ g64conv filename.scp filename.g64 r1
Reading raw track 0
   Using rotation 0: 32565..65129 for track 1
   Using speed zone 3 for track 1
...
Reading raw track 162
   Using rotation 0: 64642..129495 for track 41.5
   Warning: Speed zone not sure
   Using speed zone 3 for track 41.5

I get a working disk. However, if I use fluxengine to get the scp,

$ fluxengine rawread -h 0 -d filename.scp
$ g64conv filename.scp filename.g64 r1
Reading raw track 0
   Using speed zone  for track 1
...
Reading raw track 158
   Using speed zone  for track 40.5
Illegal modulus zero at g64conv.pl line 2253, <$file> line 6.

I investigated some within g64conv but couldn't determine exactly where the problem arose.

jepler commented 2 years ago

I don't know for sure whether the bug lies in fluxengine or g64conv, and so I arbitrarily filed a bug here first since I do have scp files that work from another piece of software.

markusC64 commented 2 years ago

As the author of g64conv, I'll give an educated guess: The .scp file does not contain at least 3 rotations. .scp files with 2 rotations or less are creating the mentioned error, that is known.

Edit: To be pricise: It needs 3 consecutive revolutions. Parameter "v2..4000" might help make it working with 2 revolutions (untested), but with only 1 revolution, that parameter will produce garbage. If you know that the .scp image contains exactly one revolution and the tracks on the disk happen to be index aligned (usually 1541 disks aren't index aligned), then the undocumented parameter "rs" might help. g64conv td1541.fluxengine.scp 1.txt 1 rs,ad1,sstd

jepler commented 2 years ago

I'll try again with 3 revolutions and let you know, thanks!

markusC64 commented 2 years ago

In case you're sucessfull, please let us know the fluxengine command needed. I haven't been suvessfull with fluxengine storing multiple revolutions inside the .scp file.