|HP-IL mass storage - opinions needed|
Message #1 Posted by Pavel Korensky on 20 Nov 2003, 3:57 p.m.
during last couple of days (or, better to say, couple of nights), I coded the basic layer of the modern mass storage, which I am building from parts saved from old HP-IL cassette drive.
Situation is as follows. The microcontroller react to most HP-IL commands and succesfully mimic the HP-IL mass storage on the HP-IL bus (it is possible to format it with NEWM and write/read data for example with WRTP).
Of course, there are some minor bugs and everything is not yet implemented.
Mainly, the mass storage itself is not implemented (I am using the 64KB external RAM of the microcontroller for testing).
I already got the 64MB MMC card which will be used as a permanent mass storage. When I will start to write the software for MMC card, I must make one basic decision.
To FAT or not to FAT, it is a question. :-)
Normally, the MMC cards are preformatted as a DOS/Win harddisk, with partition table and FAT system. This mean, that they are normally readable/writable by a PC, if the card reader is attached to the system (USB, CF adapter etc.)
For HP-IL compatible storage, it is possible to create 500 DOS files, each 128KB long and implement the LIF file system inside each file. The file without LIF file system will behave like empty, unformatted tape.
Or, there is a second option. Discard the original format of the MMC card and read/write/erase the card on block/sector base.
Each approach has its pros and cons.
FAT system Pros: "tapes" are normally readable and writable by PC and it should be simple to write some PC software which will decode the LIF file system inside those files.
FAT system Cons: the software in the microcontroller must be very complex, because it will be necessary to implement the whole FAT system inside the microcontroller. It is not a trivial task, especially for memory cards (a lot of caching is necessary, because it is not possible to simply rewrite the sector on the card here and there).
Sector use Pros: simple implementation, probably much faster access.
Sector use Cons: it is not possible to read/write card in PC without special driver. Someone must write the driver for the Windows and/or Linux.
Which implementation I should use ? Let's discuss about it.