The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

HP-IL mass storage, progress report
Message #1 Posted by Pavel Korensky on 27 Nov 2003, 7:05 p.m.

Hello,

During past days, I made some progress.

The MMC card is attached to the ATMega microcontroller, low level routines are working.

After reading the answers to my last question (To FAT or not to FAT), I decided to FAT.

The mass storage will accept the MMC cards with FAT filesystem. In the first version, it will accept the first file in the directory, which will contain the LIF file system. This file can be either 128KB long or 640KB long. With this file, the unit will mimic the HP-IL mass storage.

Currently, the whole system is able to scan files in the root directory, check them if they contain the LIF file system and "mount" the file system.

I suppose that during the weekend, I will implement the LIF file system parsing, reading of files and sending them via HP-IL. After that, the mass storage should be able to react normally to comands like "DIR" or various read commands.

After that, I will concentrate to management of caching and I will try to implement the write (better to say, read-erase-write) functions.

In the last stage (during Dec2003 or Jan2004) I will rewrite the IL routines and the unit will simulate several HP-IL peripherals. Something like 5 disk units and 3 tape units. I will see, how much RAM memory I will have available for various buffers and structures.

After that, I will concentrate on the hardware design (PCB, batteries etc.), I will make some PCBs and I will need couple of beta testers :-)

      
Re: HP-IL mass storage, progress report
Message #2 Posted by Raymond Del Tondo on 27 Nov 2003, 11:22 p.m.,
in response to message #1 by Pavel Korensky

Hi Pavel,

WOW !

This sounds fantastic!

I'd like to be a beta tester, of course.

Regards,

Raymond

      
Re: HP-IL mass storage, progress report
Message #3 Posted by Vasilis Prevelakis on 28 Nov 2003, 12:24 a.m.,
in response to message #1 by Pavel Korensky

Having a LIF filesystem in a file in the MMC may be a bit inelegant. How about using separate files in the FAT volume.

Each file will have the swap-disk file format (i.e. a header with the LIF-specific info). Thus each file will be separate and have two names: the FAT name and the LIF name (in the header inside the file). Requests for directory info will report the information in each file header.

In this way you can just drop a swap-disk file in the MMC card and it will be instantly recognised by the computer on the HP-IL side.

**vp

      
Re: HP-IL mass storage, progress report
Message #4 Posted by J-F Garnier on 28 Nov 2003, 6:49 a.m.,
in response to message #1 by Pavel Korensky

Hi Pavel,

Do you plan to be able to create new LIF volume with NEWM, or just access already created LIF image file?

J-F

(I would be happy to test it ...)

            
Re: HP-IL mass storage, progress report
Message #5 Posted by Pavel Korensky on 28 Nov 2003, 8:56 a.m.,
in response to message #4 by J-F Garnier

I plan that NEWM will access only previously created LIF image in the FAT file.

There is a reason for this. I do not want to mess with FAT filesystem, because it needs a lot of caching and internal data structures and the microcontroller RAM (even the external 64KB) is limited.

So, there will be several FAT files on the MMC. Inside each file, there will be a LIF structure. Files can be either empty or they can already contain the LIF files (like the swap files, which can be downloaded from hpmuseum.org).

After power-up, the microcontroller scan the FAT directory, check the first sector of each file and if it is the LIF image, it will "mount" it - prepare it for future use via HP-IL. This means that for the each of those files, there will be the internal structure in RAM, which will contain pointers to all clusters where this file is. For each 616KB file it is array of 308 pointers.

All subsequent communication with MMC is based on sector basis inside the clusters pointed by the above mentioned array.

With this approach, it is only necessary to access the FAT once and after that, all previously allocated dynamic structures used for decoding the FAT system can be discarded and the RAM space can be used for buffers etc.

I suppose that the system will "mount" ten files and everything will behave like 10 independent mass storage units on HP-IL.

Of course, the capacity of 64MB MMC card allows to have much more files on the card, so I suppose that I will implement some device dependent command for "media exchange". This means that one mounted file will be released and the unit will mount a FAT file with different name.

                  
[VPN] Re: HP-IL mass storage, progress report
Message #6 Posted by Veli-Pekka Nousiainen on 28 Nov 2003, 10:37 a.m.,
in response to message #5 by Pavel Korensky

Would it be feasible to use FAT directories so that each directory should have maximum 10 LIF files? Or better yet use subdirectories... In a PC a user can create the directories for different things like math, science, etc. You could have as many subdirectories as FAT16 allows, sometimes you may need several similar subdirectories, for example math1, math2, math3, because of eg. 24 math LIF files need 3 subdirectories? Is this too complicated?

I have my MMC for the hp 49g+ arranged something like that, never exeeding 32 files for a subdirectory to make it easier for the filer to read file types (which seems to take forever or about # A000h ticks) [VPN]

                        
Re: [VPN] Re: HP-IL mass storage, progress report
Message #7 Posted by Pavel Korensky on 28 Nov 2003, 11:17 a.m.,
in response to message #6 by Veli-Pekka Nousiainen

I do not fully understand your question. All files with LIF images will be in the root directory. The HP-IL controllers (like HP-41C) will not see the FAT structure. The controller will see a mass storage medium with capacity either 128KB (tape) or 616KB (disk).

When you put the MMC card to the PC reader, you will see in the root directory files like TAPE001.LIF TAPE002.LIF DISK001.LIF etc.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall