The Museum of HP Calculators

HP Forum Archive 16

[ Return to Index | Top of Index ]

Making a LIF image file under DOS?
Message #1 Posted by John on 18 May 2006, 6:18 a.m.

Hi,
Can anyone advise please how to copy a LIF formatted floppy into a LIF image file? I normally use LIFUTIL.EXE for DOS, this has a a facility to copy a LIF disk to a hex extract but this is ASCII text, but not a binary file.

I've downloaded the LIF utils for Linux which have this ability, but I don't have a Linux box at home.
http://www.hpcc.org/datafile/hpil/lif_utils.html
Any advise for a PC/DOS user appreciated!

Regards,
John

      
Re: Making a LIF image file under DOS?
Message #2 Posted by Tony Duell on 18 May 2006, 7:16 a.m.,
in response to message #1 by John

Is the format of the hex image file documented anywhere? It might be possible to write a program to convert that to a binary image.

      
Re: Making a LIF image file under DOS?
Message #3 Posted by Olivier De Smet on 18 May 2006, 9:00 a.m.,
in response to message #1 by John

Here is a python program to do that

import string

f=file('MATH.OUT','rb') g=file('D700.LIF','wb')

print f.readline() for l in f: a=string.split(l) for k in range(16): g.write(chr(eval('0x%s' % a[k+1])))

f.close() g.close() print 'done'

Olivier

            
Re: Making a LIF image file under DOS?
Message #4 Posted by Vassilis Prevelakis on 19 May 2006, 7:56 p.m.,
in response to message #3 by Olivier De Smet

I don't know much about Python, but is this program merely producing a hex dump of the binary input file?

In this case why is the output file declared as a binary file ('wb')?

**vp

                  
Re: Making a LIF image file under DOS?
Message #5 Posted by Olivier De Smet on 22 May 2006, 2:07 a.m.,
in response to message #4 by Vassilis Prevelakis

No it's the reverse, it produce a binary translation of an hex dump :

import string % import string library

f=file('MATH.OUT','rb') % input file MATH.OUT could be oppened with 'r' as text file too g=file('D700.LIF','wb') % output file, binary translation D700.LIF

print f.readline() % display the first line of the input file and skip it (header) for l in f: % iterate over every line of the input file a=string.split(l) % split each line as words with 'space' separator for k in range(16): % iterate for 16 words g.write(chr(eval('0x%s' % a[k+1]))) % write the n+1th word as a byte

% loops are closed by 'indentation' see www.python.org

f.close() % close input file g.close() % close output file print 'done'

                        
Re: Making a LIF image file under DOS?
Message #6 Posted by John on 22 May 2006, 2:00 p.m.,
in response to message #5 by Olivier De Smet

Hi,

Thanks very much Olivier, this little program worked fine! It created an image file of about 264k bytes which loaded into your emulator without any problems.

A solution for us DOS users!

BTW I found a Linux machine (Xeon 3G or somesuch), I ran the 'make' for the Linux lifutils, these compiled OK but the machine / software didn't recognise the LIF floppy.

lifdir gave the error: This is not a LIF disk lifimage gve the errot: Error reading cylinder 0 head 0 sector 16

I think the machine needs to be compatible with single density floppies. LIFUTIL makes a lot of strange disk access noises when starting up, seems to calibrate the drive perhaps?

Anyway, I can read the floppy fine with DOS and LIFUTIL though so I'm happy.

Regards, John

            
Re: Making a LIF image file under DOS?
Message #7 Posted by john on 20 May 2006, 12:12 p.m.,
in response to message #3 by Olivier De Smet

Thanks,

I'll try this.

Regards,
John

      
Re: Making a LIF image file under DOS?
Message #8 Posted by Mike on 18 May 2006, 10:55 a.m.,
in response to message #1 by John

I'm not sure what you are asking? Can you be more specific. I know that LifUtil can do the following:

1) Take a program or image of a ROM, on an HP-IL device, and transfer it to a 9114B floppy, that LifUtil can then transfer it to DOS file.

2) You can also use LifUtil to copy that DOS file back to 9114B that is accessible by HP-IL computer.

Is that what you are asking? I'm a bit confused about your use of the term "image". Can you give a step by step description of what you want to do, and what you hope to have, when done? Why do you need a binary file on a DOS computer?

Edited: 18 May 2006, 10:56 a.m.

            
Re: Making a LIF image file under DOS?
Message #9 Posted by John on 20 May 2006, 12:10 p.m.,
in response to message #8 by Mike

Hi,

Step-by-step I would like to take a physical floppy disk, in LIF format, containing programs and data files (in this case for an HP-85).

I would then put the floppy into a DOS PC, run an extract utility to create one file containing an image of the whole floppy. I would save this file and use it from within an HP-85 emulator, such as Olivier's:

http://olivier.2.smet.googlepages.com/hpseries80

As per original message, there is a Linux utility for this (lifimage.c, part of lifutils.tar) but no DOS utility.

Regards,
John

                  
Re: Making a LIF image file under DOS?
Message #10 Posted by Vassilis Prevelakis on 21 May 2006, 7:07 a.m.,
in response to message #9 by John

Ok, now its a bit more clear.

First let me say that I do not have an exact answer for what you want, I avoid DOS/Windows because I do not like them.

So I'll describe (or point to) a bunch of alternative techniques here:

a) Why not use your Series 80 computer to read the floppy and xfer the entire floppy image to your PC over the serial link (http://www.series80.org/Articles/uploading-disk-images.html)

b) Read the HOWTO "Transfer data from HP85 to DOS or UNIX" by Greg Goebel (http://www.series80.org/Articles/xfer-to-dos.txt)

c) Assuming you have an old 720kb drive for your PC (or can get one on eBay) check the programs mentioned in http://www.series80.org/Articles/downloading-disk-images.html

d) Use another HP computer that can connect to both Ethernet and HP-IB (I use an HP9000 Model 300/345 running OpenBSD).

**vp

                        
Re: Making a LIF image file under DOS?
Message #11 Posted by John on 22 May 2006, 2:08 p.m.,
in response to message #10 by Vassilis Prevelakis

Hi vp,

Thanks for your response.

Quote:

a) Why not use your Series 80 computer to read the floppy and xfer the entire floppy image to your PC over the serial link (http://www.series80.org/Articles/uploading-disk-images.html)


Because it is slow and fiddly to set up.

Quote:
c) Assuming you have an old 720kb drive for your PC (or can get one on eBay) check the programs mentioned in http://www.series80.org/Articles/downloading-disk-images.html

Thanks, I tried the fdimage utility but that was unsucessful. I think LIFUTIL must perform some additional commands before reading data to somehow prepare the disk drive and controller.

Quote:
d) Use another HP computer that can connect to both Ethernet and HP-IB (I use an HP9000 Model 300/345 running OpenBSD).

**vp


Thanks, hadn't thought of this one. Yes a HP9000 Model 300 is on my wish list, so if anyone in the UK wants to sell / donate one please get in touch!

(I didn't know they ran OpenBSD BTW, I was looking for just the RM Basic version).

Lastly vp, some of your links are broken: http://www.series80.org/Articles/xfer.html is 404, should this be http://www.series80.org/Articles/uploading-disk-images.html or http://www.series80.org/Articles/xfer-to-dos.txt?

Regards,
John

                              
Re: Making a LIF image file under DOS?
Message #12 Posted by John on 22 May 2006, 2:37 p.m.,
in response to message #11 by John

Quote:
Thanks, hadn't thought of this one. Yes a HP9000 Model 300 is on my wish list, so if anyone in the UK wants to sell / donate one please get in touch!


Strangely enough there are a load of these on eBay:

http://search.ebay.com/_W0QQfgtpZ1QQfrppZ50QQsassZbobarQQssPageNameZDBQ3aOtherItems

but in the US of course!

Regards,
John

                              
Re: Making a LIF image file under DOS?
Message #13 Posted by Vassilis Prevelakis on 22 May 2006, 9:20 p.m.,
in response to message #11 by John

John wrote:
> > a) Why not use your Series 80 computer to read the floppy and xfer the entire floppy image
> >    to your PC over the serial link
> Because it is slow and fiddly to set up.
slow is an understatement, it takes forever, but then who cares, you start the process and go to the pub. If you have multiple disks, and you have multiple drives (e.g. most 9121s have two drives) you can set up the program to switch to the next drive until you run out of drives. The "fast" version (that does compression) is signigficantly faster, though it needs more RAM.

> > Assuming you have an old 720kb drive for your PC [...]
> I think LIFUTIL must perform some additional commands [...]

This is the setup I used to prepare all my Integral PC floppies (though these are double sided, i.e. require the built-in Integral PC floppy drive or an external 9122 drive).

> Yes a HP9000 Model 300 is on my wish list [...]
> (I didn't know they ran OpenBSD BTW, I was looking for just the RM Basic version).

I have both (one is a standard 9000 Model 300/345, while the other is a 19 inch rack mountable monster with built-in CRT, HD, floppy, and a keyboard that folds to cover the screen). I haven't managed to do a lot with the RM Basic one, though (you can spend hours trying to do the simplest tranfer. The OpenBSD is much easier to use, but this may be because I use OpenBSD for my everyday work.

Do note, however, that OpenBSD does NOT support the 68010 models of the 300 range (IMHO the 310), and some Apollo ones.

**vp

PS thanks for the briken links tip, the site is down at the moment, but I'll fix them as soon as it comes back up (tomorrow hopefully).

Edited: 22 May 2006, 9:23 p.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall