Making a LIF image file under DOS?



#14

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


#15

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.

#16

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


#17

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


#18

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'


#19

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

#20

Thanks,

I'll try this.

Regards,
John

#21

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.


#22

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


#23

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


#24

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


#25

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

#26

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.


Possibly Related Threads...
Thread Author Replies Views Last Post
  How to add image to HP Forum Posting Harold A Climer 2 716 11-20-2013, 02:28 PM
Last Post: Han
  Cannot delete file Les Koller 4 935 11-07-2013, 12:17 AM
Last Post: Les Koller
  File Format: hpprgm Thomas Chrapkiewicz 6 1,293 10-30-2013, 09:32 PM
Last Post: Thomas Chrapkiewicz
  HP-Prime File extension Paul D. Fox 6 1,035 10-07-2013, 01:45 AM
Last Post: cyrille de Brébisson
  go71b 'lexs' or 'raws' file format? Christoph Giesselink 2 720 08-21-2013, 02:53 AM
Last Post: Christoph Giesselink
  WP-34S Overlay - making it a bit more permanent? Marcel Samek 1 556 07-05-2013, 09:02 PM
Last Post: htom trites jr
  How to use XnView to create .gro4 file as in OpenFire? arturfeghali 2 641 06-27-2013, 05:57 PM
Last Post: jerome ibanes
  41CL :TROUBLE IN FILE TRANsFER aurelio 22 2,910 06-18-2013, 03:44 PM
Last Post: aurelio
  How much would making a one-off calculator cost? KoenDV 17 2,369 06-03-2013, 05:35 AM
Last Post: Nick_S
  How to save WP34s programs to a file? Harald 9 1,486 04-26-2013, 01:44 PM
Last Post: Walter B

Forum Jump: