fluxengine icon indicating copy to clipboard operation
fluxengine copied to clipboard

LIF Formatted Disks

Open iceblu3710 opened this issue 5 years ago • 9 comments

I would like to help out with making LIF disk readable/writeable. This would make my old HP logic analyzer project easier as well.

This page has a good breakdown on the disk formatting.

I just have no idea where to go from there on modifying an existing format file. Currently, if I dump an IBM image I can convert it to LIF via lifutils on Linux but I have no way of writing them back to the disk.

iceblu3710 avatar Jul 29 '19 01:07 iceblu3710

It looks like LIF is a pretty conventional IBM scheme disk --- otherwise you wouldn't be able to read them on PC drives. Currently I don't have any code to write these. It wouldn't be hard to do but right now the write support is rather poorly bodged together (look at https://github.com/davidgiven/fluxengine/blob/master/src/fe-writebrother.cc for an example). This all needs to be cleaned up and abstracted properly.

Also, IBM scheme disks are absurdly flexible. For reading, that's not a problem as all the various parameters can be autodetected. For writing it's harder as these would need to be supplied (sector length, number of sectors, interleave, length of gaps, FM/MFM, etc). Are there any formal specs for the disks or would these need to be reverse engineered?

If you have a FluxEngine (or Kryoflux) and have a flux or stream of a blank LIF disk, that'd be awesome...

davidgiven avatar Jul 29 '19 16:07 davidgiven

Yup, I built my FE this weekend and waiting on some 720k floppies before I can dump a flux.

The dump wouldn't have any programs on the disk but I can do a format of the test equipment and dump the blank disk. I might have to rig up an rs232 connection to transfer an app then see if I can save it to disk.

Getting writing working and abstracted would be a good use of effort. Nowadays getting a physical machine with the disk hardware is becoming difficult and having a unit that can write multiple formats is even better.

I am working on getting a spare 5.25" drive for my TRS-80 model 3. I would want read and write ability for those as well.

On Mon, Jul 29, 2019 at 10:19 AM David Given [email protected] wrote:

It looks like LIF is a pretty conventional IBM scheme disk --- otherwise you wouldn't be able to read them on PC drives. Currently I don't have any code to write these. It wouldn't be hard to do but right now the write support is rather poorly bodged together (look at https://github.com/davidgiven/fluxengine/blob/master/src/fe-writebrother.cc for an example). This all needs to be cleaned up and abstracted properly.

Also, IBM scheme disks are absurdly flexible. For reading, that's not a problem as all the various parameters can be autodetected. For writing it's harder as these would need to be supplied (sector length, number of sectors, interleave, length of gaps, FM/MFM, etc). Are there any formal specs for the disks or would these need to be reverse engineered?

If you have a FluxEngine (or Kryoflux) and have a flux or stream of a blank LIF disk, that'd be awesome...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/davidgiven/fluxengine/issues/81?email_source=notifications&email_token=AABNYAV73D7RDPNYBJZ67S3QB4KCXA5CNFSM4IHN4NW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3BHIWQ#issuecomment-516060250, or mute the thread https://github.com/notifications/unsubscribe-auth/AABNYAUTQGGTCJEPXNEFMILQB4KCXANCNFSM4IHN4NWQ .

iceblu3710 avatar Jul 29 '19 19:07 iceblu3710

What specific command line switch combo do you need for a good dump to work with?

iceblu3710 avatar Jul 30 '19 04:07 iceblu3710

Try:

fluxengine read ibm --just-read --write-flux=lif.flux --revolution=4 --retries=0

That will read four revolutions per track, not attempting to decode them, instead just writing the result to a flux file for later analysis.

davidgiven avatar Jul 30 '19 09:07 davidgiven

I was unable to serial load a program to save onto the disk but the disk does format and read clean on the test equipment.

lif.flux.zip

iceblu3710 avatar Jul 31 '19 04:07 iceblu3710

I see 16 sectors, double sided, 77 tracks, 256 byte sectors for a total of 616kB. Does this seem reasonable?

$ ./fluxengine read ibm -s lif.flux:t=0-76

It's a nice clean read, so reverse engineering the various parameters should be easy. I can't make any promises as to when I'll be able to do the work, though (I have visitors right now).

davidgiven avatar Jul 31 '19 11:07 davidgiven

Sounds right. The test equipment displays "free records" but does have 616k available.

I am going to look into getting serial working again so I can dump a program and have something knowen to compare to.

iceblu3710 avatar Aug 02 '19 00:08 iceblu3710

I don't know if everything is already solved, but since the issue is still open.... In the latest version of fluxengine there is an option --ibm-preset-hp-lif-770 for writing an HP-LIF disk for an HP logic analyzer with a 3.5 inch diskdrive.

wybren1971 avatar May 07 '21 14:05 wybren1971

It seems the disk has to be formatted in the logic_analyzer first because it writes a track 79 with strange sector numbers as copy protection. (Source) if you format the disk first in LIF format on the logic analyzer and then write the 77 track image with fluxengine and choose the format hplif770 the disk will work in your logic analyzer.

wybren1971 avatar Jun 10 '22 11:06 wybren1971