Post Reply 
HP 50g & SD Cards: Performance, Format, Notes
08-29-2016, 01:17 AM
Post: #61
RE: HP 50g & SD Cards: Performance, Format, Notes
Bob,

Thank you for your reply.

But the SD card in question has never been partitioned, ever. I am speaking about my 256MB SD card. And as I said in my previous post, I used a Win8 PC today to format it, but still when I insert it into the 50g, I cannot delete things off it, nor can I format it via the 50g.

But for the sake of formatting it again on my Mac, I opened the Terminal and typed the following:

diskutil partitiondisk /dev/disk3 1 MBR "MS-DOS FAT16" "NONAME" 0B

That formats it FAT16 with no partitioning at all. But again, when I put the card into my 50g, I can view the hidden file content, but I cannot PURGE any of those files, nor can I FORMAT the card within the 50g.

So I then went back to the Terminal and used the following line to format it FAT32 (instead of FAT16):

diskutil partitiondisk /dev/disk3 1 MBR "MS-DOS FAT32" "NNN" 0B

But I still cannot PURGE files or FORMAT the card when that SD is placed in my 50g.

I then put tape on both sides of my SD to make absolutely sure all indentations in the card are covered. Still, I cannot PURGE or FORMAT.

I'm going out of my mind!!!
Find all posts by this user
Quote this message in a reply
08-29-2016, 01:37 AM
Post: #62
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-29-2016 12:53 AM)rprosperi Wrote:  There are simple to follow instructions (for a Windows PC) here.

I knew it probably wouldn't work, but I tried those exact steps anyway (deleting the single partition, then reformatting it on the Win8 PC). Sure enough, it DOES NOT fix the problem. I still cannot use the 50g to PURGE files nor FORMAT the SD.

But again, I can read off the SD using the 50g. And I know the SD card is NOT a bad card.

What do I do now?
Find all posts by this user
Quote this message in a reply
08-29-2016, 02:19 AM
Post: #63
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-29-2016 01:37 AM)JDW Wrote:  I knew it probably wouldn't work, but I tried those exact steps anyway (deleting the single partition, then reformatting it on the Win8 PC). Sure enough, it DOES NOT fix the problem. I still cannot use the 50g to PURGE files nor FORMAT the SD.

Try repeating the procedure, but do not format the new partition on the PC, try formatting in the 50g with the fresh (empty) partition.

If these steps don't work, I would suspect the drive itself has issues.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
08-29-2016, 02:41 AM (This post was last modified: 08-29-2016 02:44 AM by JDW.)
Post: #64
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-29-2016 02:19 AM)rprosperi Wrote:  Try repeating the procedure, but do not format the new partition on the PC, try formatting in the 50g with the fresh (empty) partition.

If these steps don't work, I would suspect the drive itself has issues.

The SD card does not have issues insofar as I can read/write to it just fine using any Mac or WinPC.

Per your advice, I ran "diskpart" at an elevated Command Prompt on my Win8 PC. The last two steps I performed were these:

delete partition
create partition primary

And per your direction, I subsequently did NOT format the SD card on the PC. Instead I merely removed it from the PC and put it in my 50g, and then brought up File Manager. But the SD card is no where to be found in the file tree.

So I removed the SD card and then put it back in the PC where I formatted it, but this time with the default 4k allocation size. I put it back in the 50g, and now it appears as Port 3 in File Manager. But I still cannot format it in the 50g. I cannot use STO to save anything on it either.

And like I said, I have another partitioned SD card, but it has the same issue. I can copy files to it using a PC or Mac and then read off those libraries and files and save them to the 50g. But I cannot FORMAT or PURGE or STO to the SD card.

I am totally and utterly baffled and confounded.
Find all posts by this user
Quote this message in a reply
08-29-2016, 02:51 AM (This post was last modified: 08-29-2016 02:52 AM by JDW.)
Post: #65
RE: HP 50g & SD Cards: Performance, Format, Notes
I refuse to give up. There simply MUST be a logical explanation.

It all seems to be tied to the "WRITE PROTECTED" errors the 50g gives me. That would explain why the 50g can READ but not WRITE from my SD cards. But like I said, I know my cards are NOT locked, and I even used tape on both sides of the card to prove it.

So what could cause the 50g to believe an inserted SD card is write protected? And how do I fix that?

Thanks.
Find all posts by this user
Quote this message in a reply
08-29-2016, 03:28 AM
Post: #66
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-29-2016 02:51 AM)JDW Wrote:  I refuse to give up. There simply MUST be a logical explanation.

It all seems to be tied to the "WRITE PROTECTED" errors the 50g gives me. That would explain why the 50g can READ but not WRITE from my SD cards. But like I said, I know my cards are NOT locked, and I even used tape on both sides of the card to prove it.

So what could cause the 50g to believe an inserted SD card is write protected? And how do I fix that?

Thanks.

There's 2 different ways to write-protect a card:
a) The mechanical switch in the card, which is a piece of plastic that does nothing. It's not connected to the card, but the host has to sense the position and respect the wishes of the user.
b) Internal write protection. This is done via special SD card commands sent to the card. I don't have the docs to try to unlock this, but unless somebody maliciously locked the card, this should never happen.

My best bet is on a). What if the sensor on your 50g got dirty or damaged?
Try other cards: if absolutely all cards report write protected, then most likely your 50g has this issue. You could try to open it and clean the sd card socket in the area of the switch and see if something is bent/broken there.

If it's only that one card, then there's a more remote possibility that it got software-locked somehow, or that the card is drawing much more power than usual for some reason during write and the 50g can't supply it (old batteries?). Insufficient current could make the card report an error during a write. The OS is quite primitive, so I wouldn't be surprised if it reports write protect just because it's the most common cause of a write error.

Another thing to try: newRPL ignores the write protect switch, so if the problem is a), then newRPL should be able to write to your card normally.
Find all posts by this user
Quote this message in a reply
08-29-2016, 04:33 AM (This post was last modified: 08-29-2016 05:51 AM by JDW.)
Post: #67
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-29-2016 03:28 AM)Claudio L. Wrote:  What if the sensor on your 50g got dirty or damaged?

Another thing to try: newRPL ignores the write protect switch, so if the problem is a), then newRPL should be able to write to your card normally.

I purchased this 50g a month ago. It was a refurbished unit but arrived looking brand new. Not even a single scratch. Apparently, these refurbs are certified by HP. Anyway, I've not used the 50g a whole lot, and certainly not enough to get gunk inside the SD card slot. The 50g sits inside its protective case most of the time too.

Opening the 50g looks a little troublesome in that you have to use a suction cup to yank off the LCD screen cover to access screws beneath.

What I can say is that if I shine a flashlight into the SD slot, with the buttons facing up and looking in, I can see on the right a brass colored metal protruding piece that seems to be where the SD Lock sider switch should be. I've marked that protruding metal piece with a red arrow in the following photo:

https://cl.ly/0g080K3H0U2d

So even if I did open the 50g, I wouldn't be able to say more than that.



I was about to try your newRPL, per your request just now, but I see the date stamp is back in 2014:

http://hpgcc3.org/projects/newrpl/downloads

I'm quite sure you updated the bin file this year, right? If so, where is the download page for the newest bin file?
Find all posts by this user
Quote this message in a reply
08-29-2016, 01:09 PM
Post: #68
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-29-2016 04:33 AM)JDW Wrote:  I was about to try your newRPL, per your request just now, but I see the date stamp is back in 2014:

http://hpgcc3.org/projects/newrpl/downloads

I'm quite sure you updated the bin file this year, right? If so, where is the download page for the newest bin file?

The download page was created in 2014, but the link points to latest firmware, always.
Find all posts by this user
Quote this message in a reply
08-29-2016, 01:45 PM
Post: #69
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-29-2016 04:33 AM)JDW Wrote:  https://cl.ly/0g080K3H0U2d

So even if I did open the 50g, I wouldn't be able to say more than that.

If you look in the picture, there's an actuator piece that pushes onto that contact or not depending on the switch position. At least you'd be able to tell if that actuator is broken, bent or stuck.
But if newRPL works, that proves that actuator is broken without opening the 50g. The stock firmware added support for that write protect pin later on, it wasn't supported at first, so you could also use an older stock firmware to test. I can't find any reference to which GPIO pin that is, otherwise I could perhaps give you a a couple of POKE's to try to force the firmware to bypass it.
Find all posts by this user
Quote this message in a reply
08-30-2016, 12:01 AM
Post: #70
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-29-2016 01:45 PM)Claudio L. Wrote:  The stock firmware added support for that write protect pin later on, it wasn't supported at first, so you could also use an older stock firmware to test. I can't find any reference to which GPIO pin that is, otherwise I could perhaps give you a a couple of POKE's to try to force the firmware to bypass it.

That was going to be my next question: "Can't there be a "hack" to make the latest version of the stock firmware ignore the LOCK slider on SD cards?" But as you said, it would be necessary to find which GPIO pin handles that task first.

I've never flashed a 50g before, but I'll download newRPL right now, test it with my SD card, then report back here.
Find all posts by this user
Quote this message in a reply
08-30-2016, 12:37 AM
Post: #71
RE: HP 50g & SD Cards: Performance, Format, Notes
I successfully flashed my 50g with newRPL. At the end of flashing it said "WAIT RESET" and gave me the option to press the ENTER key, which I pressed. But then the screen said the following:

-- EXCEPTION --
install will wipe out RAM

Cont

I pressed the F1 button which corresponds to Cont.

It then said "Memory Cleared."

Now at the bottom of my screen, where the soft menus normally appear, I see 3 rows used, which kind of looks like an Excel spreadsheet. At right I see "SD" in gray. And in the top right of my 50g screen, I see a little arrow pointing right which blinks and blinks forever.

I typed 5 and ENTER and then ENTER and + to confirm addition is working, which it is. Now the "SD" which once appeared in the bottom right corner in gray is gone. But that right-arrow in the top right corner of the screen continues to blink endlessly.

Sadly, when I press the white Left-Arrow key and then the APPS button, to bring up the File Manager, nothing happens. In fact, pressing the APPS key alone does nothing at all. Ditto for the MODE and TOOL buttons. Ditto for VAR, STO and NXT. And when I type a number, I see a black flashing cursor that has a "D" inside it, which is very odd.

I can't bring up NUM.SLV or S.SLV or USER or FINANCE or CONVERT. And when I press the HIST key, the calc tells me:

STO Error:
Expected an identifier

When I press the Orange right-arrow button, I see the icon in the upper left of the screen display in gray, and it flickers for some reason.

At least I can turn the calc OFF and then ON again. But this newRPL is very confusing to me, I must say.

All said, I don't understand how to test my SD card within newRPL now that File Manger is dead. It would be appreciated if you could please offer me guidance.

Thank you,

James W.
Find all posts by this user
Quote this message in a reply
08-30-2016, 01:12 PM
Post: #72
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-30-2016 12:37 AM)JDW Wrote:  I successfully flashed my 50g with newRPL. At the end of flashing it said "WAIT RESET" and gave me the option to press the ENTER key, which I pressed. But then the screen said the following:

-- EXCEPTION --
install will wipe out RAM

Cont

I pressed the F1 button which corresponds to Cont.

It then said "Memory Cleared."

Now at the bottom of my screen, where the soft menus normally appear, I see 3 rows used, which kind of looks like an Excel spreadsheet. At right I see "SD" in gray. And in the top right of my 50g screen, I see a little arrow pointing right which blinks and blinks forever.

I typed 5 and ENTER and then ENTER and + to confirm addition is working, which it is. Now the "SD" which once appeared in the bottom right corner in gray is gone. But that right-arrow in the top right corner of the screen continues to blink endlessly.
That's normal, it's a "heartbeat" useful only during the debug phase.

(08-30-2016 12:37 AM)JDW Wrote:  Sadly, when I press the white Left-Arrow key and then the APPS button, to bring up the File Manager, nothing happens. In fact, pressing the APPS key alone does nothing at all. Ditto for the MODE and TOOL buttons. Ditto for VAR, STO and NXT. And when I type a number, I see a black flashing cursor that has a "D" inside it, which is very odd.
There's no File Manager yet. MODE, TOOL, VAR, STO and NXT are now used for the second soft menu (VARS).
The letter in the cursor indicates the input mode:
"D" = Direct evaluation (execution).
"A" = Algebraic mode
"C" or "L" = Alpha Uppercase (C) or lowercase (L)
"P" = Programming mode

(08-30-2016 12:37 AM)JDW Wrote:  I can't bring up NUM.SLV or S.SLV or USER or FINANCE or CONVERT. And when I press the HIST key, the calc tells me:

STO Error:
Expected an identifier

When I press the Orange right-arrow button, I see the icon in the upper left of the screen display in gray, and it flickers for some reason.

Menus are not active yet (many of them are defined and can be used "manually" but will only be activated when final to avoid confusion and things moving around).
The HIST key is STO/RCL.

(08-30-2016 12:37 AM)JDW Wrote:  At least I can turn the calc OFF and then ON again. But this newRPL is very confusing to me, I must say.

All said, I don't understand how to test my SD card within newRPL now that File Manger is dead. It would be appreciated if you could please offer me guidance.

Thank you,

James W.

On and Off is a good start, newRPL is a new platform after all. I would tell you to read the manual, if there was one.
But to your current problem:
simply put a number on the stack:
1.2345
'SOMENAME'
SDSTO

If it doesn't give an error, you can pull the SD card and see on a PC if a file called 'SOMENAME' exists. Of course another way is:

'SOMENAME'
SDRCL

If you get back the number 1.2345 then your card was written and read correctly, confirming the write lock detection mechanism is broken on your 50g.

Hint: To type SDSTO, press Alpha only once to enter alpha mode, the cursor will turn into a C, indicating you have "Caps Lock" activated.

A quick program to list your SD card directory from the calc:
Code:

<<
"." SDOPENDIR
'HAN' LSTO
WHILE
    IFERR HAN SDNEXTFILE THEN HAN SDCLOSE 0 ELSE 1 END
REPEAT
   DROP DROP DROP DROP
END
>>

This will leave your stack full of strings with the names of all files in the current directory.

Once you confirm if the mechanism is broken or not, then you can happily flash back the stock ROM, like nothing ever happened.
Find all posts by this user
Quote this message in a reply
08-31-2016, 12:15 AM (This post was last modified: 08-31-2016 01:03 AM by JDW.)
Post: #73
RE: HP 50g & SD Cards: Performance, Format, Notes
Claudio,

Thank you for the detailed information.

I was able to STO data on the SD per your advice. I could RCL the data on the calc and I verified the file was there using my iMac too. So this proves that there is a hardware problem with my 50g (drat refurbished units!) with regard to the SD card lock detector mechanism.

I think newRPL is very exciting in that the aim of the project is to rewrite the OS to be native on ARM and therefore significantly faster for many operations. But for practical use right now, I really do need to move back to the normal firmware 2.15.

So the question at this point is, does anyone have a code hack for 50g firmware 2.15 that would cause it to ignore the SD card Lock detector? Surely there must be some means of accomplishing that feat?

Now, what appears to be a NEW PROBLEM...

Previously, I had the 3 main libraries stored in Flash (EQNDATA.LIB, EQNLIB.LIB, and PRTBL.LIB). I then flashed my 50g with newRPL and then today I flashed it back to the stock 2.15 firmware. Now nothing appears when I press the ORG Rt-Arrow button and 2 (to call up Libraries). That was to be expected, but in File Manager, I see Port 2 (the FLASH) to be 510k. That is not right. It should be 766k (from what I have read in HP's "hp50g ROM Upgrade.pdf"). And yet, when I view Port 2 in File Manager, it is blank. When I copy L226, L227 & L229 back to Port 2 (FLASH) using my SD card, the size of Port 2 (FLASH) is 415k. Is this right? If not, how do I fix it?
Find all posts by this user
Quote this message in a reply
08-31-2016, 01:06 PM
Post: #74
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-31-2016 12:15 AM)JDW Wrote:  Now, what appears to be a NEW PROBLEM...

Previously, I had the 3 main libraries stored in Flash (EQNDATA.LIB, EQNLIB.LIB, and PRTBL.LIB). I then flashed my 50g with newRPL and then today I flashed it back to the stock 2.15 firmware. Now nothing appears when I press the ORG Rt-Arrow button and 2 (to call up Libraries). That was to be expected, but in File Manager, I see Port 2 (the FLASH) to be 510k. That is not right. It should be 766k (from what I have read in HP's "hp50g ROM Upgrade.pdf"). And yet, when I view Port 2 in File Manager, it is blank. When I copy L226, L227 & L229 back to Port 2 (FLASH) using my SD card, the size of Port 2 (FLASH) is 415k. Is this right? If not, how do I fix it?

Not really a problem. The stock ROM you flashed is smaller than the total Flash size, so that it doesn't erase Port2 when you flash an update. In the same package, there's a zip file called 2MB fix or similar. It contains a ROM that will erase the entire ROM, to completely clean and repair Port 2 as well. You need to flash that one when you go back from newRPL, any other updates need to use the normal ROM so you don't lose your installed libraries in Port2.
Find all posts by this user
Quote this message in a reply
08-31-2016, 01:29 PM
Post: #75
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-31-2016 12:15 AM)JDW Wrote:  So the question at this point is, does anyone have a code hack for 50g firmware 2.15 that would cause it to ignore the SD card Lock detector? Surely there must be some means of accomplishing that feat?

It would take a lot more effort than you buying a new 50g, they are cheap these days.
Find all posts by this user
Quote this message in a reply
09-01-2016, 12:04 AM
Post: #76
RE: HP 50g & SD Cards: Performance, Format, Notes
(08-31-2016 01:06 PM)Claudio L. Wrote:  ...it doesn't erase Port2 when you flash an update. In the same package, there's a zip file called 2MB fix or similar. It contains a ROM that will erase the entire ROM, to completely clean and repair Port 2 as well. You need to flash that one when you go back from newRPL, any other updates need to use the normal ROM so you don't lose your installed libraries in Port2.

That restored the FLASH to 671k, and the 3 libraries were not deleted in the process either. THANK YOU!


(08-31-2016 01:29 PM)Claudio L. Wrote:  It would take a lot more effort than you buying a new 50g, they are cheap these days.

I don't consider the cost of yet another 50g to be pocket change, especially since I live in Japan and shipping from the US is outrageous. Besides, it's a waste. No need to contribute to a landfill when there should be an engineering solution to the problem. Regardless of the effort involved, could guide me on how to resolve the problem myself?

Once again, the problem is that my 50g thinks the SD card write protect LOCK switch is set to LOCK when in fact it is not. What, other than buying another 50g, is the best solution?

Thank you.
Find all posts by this user
Quote this message in a reply
09-01-2016, 12:36 AM
Post: #77
RE: HP 50g & SD Cards: Performance, Format, Notes
(09-01-2016 12:04 AM)JDW Wrote:  Once again, the problem is that my 50g thinks the SD card write protect LOCK switch is set to LOCK when in fact it is not. What, other than buying another 50g, is the best solution?

Open your 50g and clean, bend or adjust the feeler/contact back to normal.

Hacking the 50g ROM is something only about 5 people on earth have ever done, after years of learning SysRPL, Assembler, ARM Assembler, etc. Even HP stopped patching the 50g ROM because it is so complex and full that even the tiniest change wreaked havoc and lead to many more problems. It simply isn't something one could explain through a Forum discussion.

Maybe have a friend in the US buy a 50g and mail it to you, it's likely less than $100 total. If the h/w tweak doesn't work, it's really your only option.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
09-01-2016, 12:41 AM (This post was last modified: 09-01-2016 01:46 AM by JDW.)
Post: #78
RE: HP 50g & SD Cards: Performance, Format, Notes
(09-01-2016 12:36 AM)rprosperi Wrote:  Open your 50g and clean, bend or adjust the feeler/contact back to normal.

But doing so is non-trivial insofar as, from what I have read, I would need to use a strong suction cup to forcibly yank off the plastic LCD screen cover and then hope the 2-sided tape used to hold it in place is still strong enough to hold it back in place when I put it back on.

Beside that, are there any other serious caveats to opening the 50g myself?

Thanks.

UPDATE: A kind individual sent me a PM to say that removing the clear LCD cover on his 49G broke a "dust seal" that is in place by the 2-sided tape to keep the dust out. So I must assume that removing the cover on the 50g would be the same, and knowing how 2-sided tape usually works, it probably would not be as precise a seal going back on as it was prior to removal.
Find all posts by this user
Quote this message in a reply
09-01-2016, 08:10 PM
Post: #79
RE: HP 50g & SD Cards: Performance, Format, Notes
(09-01-2016 12:04 AM)JDW Wrote:  I don't consider the cost of yet another 50g to be pocket change, especially since I live in Japan and shipping from the US is outrageous. Besides, it's a waste. No need to contribute to a landfill when there should be an engineering solution to the problem.

Getting a replacement *is* the most economic engineering solution. To hack the ROM to do what you want, I estimate 20 to 40 hours of work at least from a competent person, so the cost of labor would be quite high, many times higher than the cost of buying a new 50g, even if that competent person is yourself.
Regarding environmental concerns: all 50g's in the world were already manufactured. Whether you buy one or not, the amount of 50g's that will end in the landfill is fixed, so the environmental impact of you getting a new one is effectively zero.
Find all posts by this user
Quote this message in a reply
09-02-2016, 12:08 AM
Post: #80
RE: HP 50g & SD Cards: Performance, Format, Notes
(09-01-2016 08:10 PM)Claudio L. Wrote:  Getting a replacement *is* the most economic engineering solution.

Really? More economical than opening the 50g and attempting a hardware repair, which is technically an "engineering" solution? :-)

Clearly not.

So I will bite the bullet and yank off the LCD screen cover, unscrew the 50g, and attempt the repair, which will cost me nothing and perhaps take less than 1 hour in total.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: