Post Reply 
Help needed with the Arduino HP-IL mass storage and 41c
04-19-2023, 09:55 AM
Post: #1
Help needed with the Arduino HP-IL mass storage and 41c
Hi everyone,

I just finished building Tobie's Arduino HP-IL device, but I'm having some trouble with the mass storage part. The printer part seems to work fine.

I have a 512MB sd card, on which I create a LIF file using lifutils command:
lifinit -m cass LIF1.DAT 64

I take the card from the PC, and put it in the Arduino device, and it seems to start up ok.
SD Card init ok
PIL Box is alive <-- my debug line,
Drive:1
Numbers of LIF files: 1
Current LIF file: LIF1.DAT
Drive:2
Numbers of LIF files: 1
Current LIF file: LIF1.DAT
Init PIL ok
Free SRAM: 3770

I am using a halfnut 41cx with 2 xmemory modules installed.
I try the FINDID with HDRIVE1 in alpha register, and nothing much seems to happen.
I try the WRTP a small program with the program name in the alpha register, but nothing seems to happen.
Looking at the LIF file on the PC again, using lifdir, I get:
Volume : , formatted : 19/04/23 18:00:00
Tracks: 2 Surfaces: 1 Blocks/Track: 256 Total size: 512 Blocks, 131072 Bytes
0 files (64 max), last block used: 0 of 512
So, nothing, no file written.

Can anyone suggest what I might be doing wrong ? Any help appreciated.

Thanks
John
Find all posts by this user
Quote this message in a reply
04-19-2023, 11:30 AM
Post: #2
RE: Help needed with the Arduino HP-IL mass storage and 41c
Hello John,
have you seen my Thread "Arduino IL Drive Sim read good write bad"
https://www.hpmuseum.org/forum/thread-14041.html

Have you replace FILE_WRITE in the file ildrive.cpp with O_RDWR at two places?

If yes, better try too read an existing LIF-file first. Maybe HDRIVE1.DAT from the folder "with Ilper on PC and HP-41CX" in the file "read good write bad.zip" at Post: #1 of my thread. It contains the program MEM, a little game for the HP-41. Copy this HDRIVE1.DAT as the only file to the sd-card an try to read MEM into yout HP-41cx.
Best Regards
Klaus
Find all posts by this user
Quote this message in a reply
04-19-2023, 11:48 AM
Post: #3
RE: Help needed with the Arduino HP-IL mass storage and 41c
Yes !! Thanks Klaus, that fixed it !!.

I remember reading your post a while back, but forgot about it !

Thanks so much for the reminder.

Cheers,
John
Find all posts by this user
Quote this message in a reply
04-19-2023, 05:24 PM
Post: #4
RE: Help needed with the Arduino HP-IL mass storage and 41c
Congratulations for the successful build of an Arduino HP-IL Drive. If you ever store more than two LIF files with the extension *.dat on an SD card, there is a surprising behavior: The order in which the files are selected is not alphabetical but depends only on the order in which they were copied to the SD card. The one copied first is assigned to hdrive1 after power on and the one copied after that to hdrive2. The next LIF file selected with DDL16 is the *.dat file copied to the SD card third. The file name of the LIF files has no influence on this order.
Find all posts by this user
Quote this message in a reply
04-19-2023, 10:37 PM
Post: #5
RE: Help needed with the Arduino HP-IL mass storage and 41c
Thanks Klaus, it's good to know about the LIF file order issue, is there a fix to make it behave more like it's expected to ?

Cheers,
John
Find all posts by this user
Quote this message in a reply
04-20-2023, 06:10 AM
Post: #6
RE: Help needed with the Arduino HP-IL mass storage and 41c
Hi John, congratulations!
It's great to see another Arduino IL Drive user.
Best regards,
Tobie
Find all posts by this user
Quote this message in a reply
04-20-2023, 10:42 AM
Post: #7
RE: Help needed with the Arduino HP-IL mass storage and 41c
Thanks Tobie, it's your great project !

Now I can sell my tape drive :-)

I have a HP-IL printer which has a paper feed issue, it probably needs a new roller, but i was thinking about removing the printer mechanism and housing the Arduino Mass storage device in the printer case, giving me the IL connectors, and maybe I can use the power supply as well !!

Cheers,
John
Find all posts by this user
Quote this message in a reply
04-20-2023, 12:47 PM
Post: #8
RE: Help needed with the Arduino HP-IL mass storage and 41c
Please check this.. :-)

https://www.hpmuseum.org/forum/thread-2407.html

almost 10 years ago... time flies by
Find all posts by this user
Quote this message in a reply
04-20-2023, 04:23 PM
Post: #9
RE: Help needed with the Arduino HP-IL mass storage and 41c
No, there is no fix, this behavior used to be normal, only today it is unexpected.

Nowadays file names are always displayed in sorted lists. When I first copied several LIF files to an SD card with my Windows PC, then they were always seen sorted alphabetically. This easily leads to the misconception that the Arduino SD card drive sees it the same way. But the drive sees it like the old DIR command from MS-DOS times. With the help of the command prompt you can try DIR even today. It lists the filenames as they are in the file allocation table FAT without any special sorting in the order they were stored.
Find all posts by this user
Quote this message in a reply
04-20-2023, 11:28 PM
Post: #10
RE: Help needed with the Arduino HP-IL mass storage and 41c
(04-20-2023 12:47 PM)charger73 Wrote:  Please check this.. :-)

https://www.hpmuseum.org/forum/thread-2407.html

almost 10 years ago... time flies by

That is cool Tobie !! My tape drive is working, so I won't sacrifice it as they seem quite expensive now, but I am happy to sacrifice the faulty printer I have . Did you keep the same 82033 battery, charging circuitry, and power on switch ?

Cheers,
John
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)