HP Forums

Full Version: invalid card data at my hp48g
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Every time i switch on my hp 48 g , i get the warning "invalid card data ".
I tried all kind of memory and hardware tests and everything was all right.
what could i do ? Is that a hardware problem and how could i solve this problem!

Try typing PINIT and see if the problem goes away.

Thanx for your help ! i solve the problem !

You're welcome. The problem occurs because the 48 series calcs' memory is organized into 128K ports. The expandable models (the SX and GX) can have RAM cards inserted that add additional ports. A little information (such as the amount of memory available in each port) is stored at the beginning of each port. When a new RAM card is installed, this little bit of information may be missing or corrupted. The PINIT command scans all the ports and (re)writes this info in them. (It doesn't erase or otherwise affect any files already stored in the ports.) The "invalid card data" message just means that at least one port's header information has become corrupted and needs to be rebuilt with PINIT. Since the 48 treats all memory the same, including the built-in memory, it's possible even for a model without expansion cards to get this error.

This is somewhat inaccurate. There is no "header" stored at the beginning of each port. All a port consists of is a sequence of library and/or backup objects --each one being immediately followed by its 4-nibble CRC-- which is then terminated by a 5 nibble zero value. The "available memory" of a port is not stored anywhere, but is indirectly determined by a 5-nibble pointer in the PORTnEOS "end of sequence" table. This pointer indicates where the previously described library/backup object sequence ends when the port has been uncovered and is located at address C0000 . Note that this can also be determined by the aforementioned zero value, but the table allows faster access.


When the calculator "boots up" it scans all the ports, while recording the locations of any library objects and also checking the CRC of each backup/library object encountered. If a corrupt object is found, then an "Invalid Card Data" error is generated and the associated PORTnEOS pointer is set to point immediately after the last valid object. When you store something to a port, the corresponding PORTnEOS pointer is used to determine where to place the object. If the port in question is corrupted, then the start of the corrupted portion will be overwritten with a valid object and the PORTnEOS pointer will be updated to point past the new object. So, you can see the second advantage of the PORTnEOS table. PINIT makes use of this fact by storing and then purging a small valid backup object in each port. As just explained, if there is any corruption, it will be overwritten with valid data.


Note that the above doesn't apply to port 0, at least without some modification. While port 0 does have an entry in the PORTnEOS table (the first entry), it is treated differently. Like the other ports, it is scanned at startup, and if a corrupt object is detected, then its PORT0EOS entry is modified, but in this case it has a different meaning to the code that is responsible for storing objects. Unlike the other ports, when an object is stored it is *prepended* to the start of the object sequence and the PORT0EOS pointer is *not* updated. PORT0EOS usually points to address BFFFB or FFFF6, depending on whether port 1 is unmerged or merged respectively. If a corrupt object is detected upon booting up, then PORT0EOS is set to point to the start of the corruption as in the other ports, but unlike in those cases a new 5 zero nibble sentinel is written at the PORT0EOS address --effectively an automatic port 0 "PINIT". This has the effect of silencing the "Invalid Card Data" errors, but at the price of the space between the "logical" end (PORT0EOS) and the actual end of port 0 being left in limbo. So, you effectively have a "memory leak". This is the cause for all the questions about lost or missing memory that you see every so often on various forums. Since the 48 series has no built in mechanism to reset the PORT0EOS pointer, then a normal user would be SOL. This seems to be a design flaw in the 48 operating system. Fortunately, there is a user written program that can do this, and possibly even recover lost data. See http://www.hpcalc.org/details.php?id=2454 .

Hope this helps...


-----------------------------------------------------------------

Jonathan Busby - jdb@SNMAPOhouston.rr.com

Remove the random permutation of "NOSPAM" before replying.

Hi,


Thanks for your timely post. Just minutes earlier, I saw "invalid card data" and having the 128 card merged to sysram, I lost access to the object I had stored to port zere, and as you mentioned, the memory is "missing". Thanks again for your timely post.


Regards,


Bill Platt

If I understand you correctly, the PORTnEOS table is stored in the calculator and not in the card. Why is it, then, that removing the card's battery to erase it causes the "invalid card data" error? Does it involve the CRC you mentioned? It seems to me that something (in addition to the user's files) must be stored in the ports and is lost when the battery is removed. I've also seen cases where a card is only partially inserted and gives the "invalid card data" error, then the error goes away when the card is fully seated (without using PINIT). Are the port CRCs actually stored in the card itself?

You wrote:

"If I understand you correctly, the PORTnEOS table is stored in the calculator and not in the card"

Yes. Internal ram (IRAM) to be exact, and it consists of a contiguous series of 33 5-nibble pointers starting at address 80536 hex on the G series.

"Why is it, then, that removing the card's battery to erase it causes the "invalid card data" error? Does it involve the CRC you mentioned? It seems to me that something (in addition to the user's files) must be stored in the ports and is lost when the battery is removed."

Yes, it could be the CRC, but that is unlikely (see below). As stated in my previous post, a port consists of a contiguous sequence of lib/bak-object , 16-bit CRC pairs. Obviously loss of power will invalidate the CRCs. There are also other criteria under which a port is judged to be "corrupted" though. Specifically, if an object other than a library or backup is found in the sequence, if an object's structure is invalid, if the end-of-sequence marker (the 5 zero nibbles mentioned in the last post) is absent, or if an unknown object type is encountered (ie. corrupted or invalid object prologue), which is probably the most common case after a power loss.

"I've also seen cases where a card is only partially inserted and gives the "invalid card data" error, then the error goes away when the card is fully seated (without using PINIT)."

Obviously in this case the data read from the card would be garbled, which would cause it to be deemed corrupted by the OS under the conditions listed above.

"Are the port CRCs actually stored in the card itself?"

Yes, as stated above.


Regards,

Jonathan


-----------------------------------------------------------------

Jonathan Busby - jdb@SNMAPOhouston.rr.com

Remove the random permutation of "NOSPAM" before replying.

OK, thanks for the detailed explanation. It's a lot clearer to me now.

Many of the Ram card "died" after you take the 2025 out of them. The problem sometimes is that the card has a complete RAM chipset... Even the format is on the RAM, by taking the battery out some times the format goes out with it. It you have a HP 95lx and plug a "dead" card with a new battery, it shows << I/O ERROR. press ESC to exit>>, in that case you have to grab the HP 100lx or the 200lx and formatt the card. PINIT is the formatting command for the HP 48GX, by executing that command you can plug the formatt and bring the card back to "live".
You can also reformatt the card with any computer with PCMCIA ports.
That should work. you are using the HP cards right?

regards

Andy

HP-48 ram cards will not fit in a pcmcia slot.

rdb.

Edited: 8 Oct 2003, 7:18 p.m.

Quote:
You can also reformatt the card with any computer with PCMCIA ports. That
should work. you are using the HP cards right?
I have one HP card and three Klotz cards. None of them are PCMCIA cards. (They're the same size as PCMCIA, but have very different connectors.) But PINIT works fine, so that's all I need.

Did I said that!!!!!. Sorry I follow the example of the HP palmtops. They USE the PCMCIA cards. The HP 48GX has different connectors... Well sorry about that..., Just USE the PINIT...

Regards

Andy