Got my 50g stuck...



#10

Weirdness here. Beyond me, so I appeal to the great unwashed masses who know more than me. :-)

I dug up a HP-48 app I wanted to try on my HP-50g. I stored it into PORT 2 and, other than taking a few seconds to clear, seemed okay. I did the obligatory ON-C and now the calc responds with NOTHING other than "HP49 CAS by Parisse, Heiskanen & Fiechter". No keys work, no reset functions work, etc.

When I try any reboot, it comes back the same way. I have done ON-A-F about a dozen times, trying both not recovering memory and recovering memory, with no success or difference. I've tried the reset button. I've tried taking out the backup battery, normal batteries and leaving it for about 15 minutes, but STILL it comes up this way.

I'm confused. Other than a ROM upgrade, how could my calc have gotten into this state? Why would something stored to PORT 2 have this effect?

More importantly, does anyone have any idea how I can flat out blank out the entire calc?

thanks,
bruce

Edited: 12 Oct 2006, 3:11 p.m.


#11

FINALLY got it out. That new "Definitive Guide to the 50g" book that we saw at HHC 2006 saved my butt. Apparently you can do the ON-A-F, get the "Recover Memory?" screen, and then hold down the <- (backspace) key while you push "No". That caused it to reboot right away, with the memory cleared.

I immediately purged that library (1027 in PORT 2) and things seem back to normal. Whew!

thanks,
bruce


#12

Bruce,

since port 2 is flash memory, it is not affected at all by removing the batteries.

The operating system tries to ATTACH any library on power on. This is a leftover from the 48SX/GX where libs could be stored on ROM or RAM cards which had to be removed/inserted with the calulator turned off. Thus, on each power on, the ports are searched for unattached libraries and the startup code is run. If that code crashes, the calculator does not come up properly. I assume that the BACKSPACE trick should work on every power on, not only in combination with a reset (ON+A+F). So next time, try ON+BACKSPACE if your calc crashes the way you described it.

You should know by now that it is a bad idea to install 48G libraries on a 49g+ or 50g. Many libraries use system code (machine language or sysRPL) which is not generally portable between these two generations. UserRPL code for the 48G should work on the newer systems, if it dosn't use unsupported SYSEVAL calls. In the 48G manual there is a warning about using libraries for the 48S ont the 48G because of incompatibilities.

Marcus


#13

No, on the 49 series, ON doesn't check for new libraries or run library configuration programs or a program in 'STARTUP'; you have to invoke a warmstart for that. Holding down backspace during a normal turn on won't do anything special; it has that special action only during a warmstart.

Holding down ON, pressing and releasing C, releasing ON, and then quickly pressing and holding down backspace until the warmstart was finished would've been enough though; the complete memory clear wasn't necessary.

I'll post something longer on this soon.

Regards,
James


#14

Thanks for the clarification.

If I inderstand you correctly, the 49 series does initialize and ATTACH libraries when you press ON+C in the same way the 48 series does on every power up. It makes sense since there are no physical ports which may have changed contents during power down (except the SD card which cannot hold library objects.)

Marcus


#15

Quote:
Thanks for the clarification.

If I inderstand you correctly, the 49 series does initialize and
ATTACH libraries when you press ON+C in the same way the 48 series
does on every power up.


Yes, the 49 series does initialize and attach all libraries in
ports 0, 1, and 2 when you do an ON+C warmstart, just like the 48
series does for all memory ports. Well, usually it attaches
libraries; a library doesn't have to include a configuration
program that auto-attaches it, in which case you have to ATTACH it
yourself.

But it doesn't check whether anything in the ports has changed and
warmstart if it has when it's turned on, as the 48 series does.

The equation libraries and periodic table library for the 49
series are "special"; they're attached and ready for use as soon
as you store them into port 0, 1, or 2, without doing a warmstart.
I suppose that their configuration programs must do some "on the
fly" rebuilding of system tables. Also, they don't show up when
you press LIB or execute LIBS; press APPS to use them.

The 49g+ and 50g do read the boot record and entire FAT of an MMC
or SD card to determine how much capacity is available on it,
before displaying anything to indicate that you've pressed ON.
This can take a long time, particularly with a card formatted
FAT32 with small clusters. Formatting with larger (and therefore
fewer) clusters decreases the turn-on delay, although this also
means that, typically, more capacity will be wasted in slack
space. Considering the capacities of these cards, I'm not too
concerned about slack space.

For that matter, a 48GX with a large RAM card can take an
appreciable time to check for port changes before the "busy"
annunciator turns off and it's ready to run, and even longer if
something has changed, although at least it does display something
right away.

Another thing that's different about the 49 series is that you
don't have to DETACH a library attached to the home directory
before purging it; I surmise that PURGE includes detaching a
library from the home directory. But it still can't have any other
references to a port object to be purged elsewhere in memory; if
it does, trying to purge it will still error out with "Object In Use".

Quote:
It makes sense since there are no physical ports which may have
changed contents during power down (except the SD card which
cannot hold library objects.)

Exactly, unless one of the ports has become corrupt, in which case
something more than just configuring libraries is called for.

Well, actually, the card can hold a "library file", but only as a
binary transferred file that can't be attached until it's
transferred to port 0, 1, or 2, not as an "RPL object".

When the calculator stores or recalls anything on the card, it
amounts to a binary transfer. The card port can perhaps be best
thought of as much like a built-in floppy drive, and the card as much
like a very large floppy disk (but Kermit "ASCII" transfers with
it aren't built-in). To actually use anything stored on the card,
the calculator has to transfer it first.

Objects on the card can be "EVALed", in which case they're first
transferred to the stack, although not stored in a variable. If
you EVAL a library file, then the library object is simply left on
the stack. EVALing a library command within a library file stored
on the card probably wouldn't be practical. Libraries are expected
to be in normal "RPL ports", with information about them kept in
system tables, and unlike 48 series cards, the 49g+ and 50g cards
are allowed to be inserted or removed without turning the
calculator off, so anything on the card may change while the
calculator is running. Anyway, ports 0, 1, and 2 seem to have
plenty of capacity for storing libraries, so there's no compelling
need for being able to attach a library stored on the card. Also,
the card seems to be a good place for keeping a copy of any
library that you want to be able to use sometimes, but don't want
attached or taking up memory in other ports right now.

Regards,
James

Edited: 13 Oct 2006, 7:06 p.m.

#16

First off, in the "49 series", I'm including the 48gII and 50g as
well as the 49G and 49g+.

I'm glad that you found a solution, but note that clearing all of
user memory and port 0 wasn't really necessary. For the 49 series,
holding down the backspace key while doing a warmstart skips
running any library configuration programs (such as the one for
the library that was causing you a problem), and also skips
running any 'STARTUP' program that you may happen to have. Of
course this gives you a chance to purge any misbehaving library,
or edit or purge 'STARTUP'.

A warmstart can (normally) be invoked by holding down the ON key,
pressing and releasing the C key, and releasing the ON key. If the
keyboard doesn't respond so that this doesn't work, a "hardware
reset" (insert a partially straightened small paper-clip or
something similar straight into the "RESET" hole in the back)
should do it.

On a 48 series, the reset hole is found by removing one of the
upper feet from the back; on the 48G series, it's on your right as
you face the back, but on the 48SX/S, it may be on either the
right or the left, depending on when it was manufactured. It
should have the letter "R" molded in (under the foot) next to it,
but it could be that some were manufactured with a circuit board
with the switch on one side, and a case back with the "R" on the
other side.

A hardware reset also adds an entry to the warmstart log.

Certain system error conditions also invoke a warmstart.

A warmstart is also the first thing that's done by the TTRM (Try
To Recover Memory?) procedure, even before you choose YES or NO.

Much of the rest of this post is plagiarized from Bill Wickes's
HP 48 Insights Part I: Principles and
Programming HP 48G/GX Edition
(available on the Museum DVD / CD-ROM set;
see http://www.hpmuseum.org/cd/cddesc.htm). He refers to a
warmstart as a system halt.

Also, on the 48 series only, a system halt is performed
automatically when you turn the 48 on, if you have stored or
removed any libraries from any ports since the last time the 48 was
turned on, or if you have inserted or removed memory cards, or
changed a RAM card's write-protect switch position. This ensures
that there are no references remaining to library objects that you
may have removed.

A library usually (although it doesn't have to) includes a
configuration program, which usually (possibly along with other
actions) attaches the library automatically. If a library isn't
"auto-attaching", then you'll have to use the ATTACH command with
its library number as the argument before any of its commands can
be used.

On the 49 series only, a warmstart (unless the backspace key is
held down) finishes by executing any program in the reserved
variable 'STARTUP' in the home directory. This would be a good
place to run the ATTACH command for any non-auto-attaching library
that you want attached every time, or for that matter, to run the
DETACH command for any auto-attaching library that you don't want
attached every time, along with anything else that you want done
at every warmstart.

What a system halt does:

  • aborts all current execution;
  • clears the stack, the return stack, all local memories (local
    variables and HALTed procedures), last arguments, the recovery
    stack (last stack or UNDO), the command stack (last command
    lines), and the graphics display (PICT), (and in the 49 series,
    all virtual stacks);
  • turns off user mode (by clearing system flag -62);
  • sets the last error number to zero and the last error message to
    an empty string;
  • detaches all libraries currently attached to the home directory,
    and executes the configuration programs of all libraries in the
    various ports (not including library files stored in the SD card
    port of a 49g+ or 50g);
  • reestablishes the home directory as the current directory;
  • executes the MTH menu (for the 49 series, the TOOL menu instead);
  • (added with the 49 series: executes any program stored in the
    reserved variable 'STARTUP' in the home directory;)
  • (added with the 49 series: if the backspace key is held down,
    executing library configuration programs and the 'STARTUP'
    program is skipped;)
  • leaves global or port variable, alarms, and key assignments
    unchanged. All flags are also left unchanged, except flag -62,
    which is cleared.
The reason for turning off user mode (clearing flag -62) with
every warmstart is that you can lock yourself entirely out of
using the keyboard (even from using it enough to turn off user
mode) with key assignments. This provides a "safety net" for that
situation; with user mode turned off, you now have access to the
"standard" keyboard again, and can change or remove the key
assignments.

On the 49 series, if you prefer to have user mode always on and
want to avoid having it off after a warmstart, then you can
include the sequence -62 SF within a 'STARTUP' program; you'll
still have a "safety net" of skipping execution of 'STARTUP' (thus
leaving user mode turned off) by holding down the backspace key
while warmstarting.

As you can see, a warmstart can be a bit disruptive, but not
nearly so much as a memory clear can be.

What a memory reset does:

A memory reset, for which you press the three
keys ON, A, and F all together (release in the order first F, then
A, and finally ON), starts by executing a system halt. Then the
calculator displays "Try To Recover Memory?" with YES and NO menu
keys.

If you see this display when you turn your calculator on, or at
any other time when you have not deliberately performed a memory
reset, it indicates that the calculator has detected a corruption
of the memory contents such that it can not continue normal
operations without at least a partial memory reset. This
corruption can be caused by a hardware fault, including the
effects of static electricity, by the execution of SYSEVAL with an
incorrect system address (or wrong arguments for a SYSEVAL
sequence, or starting with the 48G series, similar misuse of
LIBEVAL, or with the 49 series, FLASHEVAL), or just defective
built-in or add-in software (which includes a buggy or designed
for a different model SysRPL or assembly language program or
library).

If you choose NO, the calculator performs a complete reset,
deleting all global variables, port 0 variables, key assignments,
and alarms and resetting all flags to their default values. The
calculator displays "Memory Clear" when it is ready to resume
manual operations. (Note that ports 1 and higher are left
unchanged.)

If you choose YES at the "Try To Recover Memory?" prompt, the
calculator attempts to recover or restore as many user memory and
port 0 variables as it can by scanning through memory for
recognizable objects. If it detects a valid user memory, then it
can usually restore it unchanged, except that user key assignments
and alarms are always lost. If it finds invalid objects, it
discards them and rebuilds as much of the user memory structure as
it can. In some cases when the home directory itself is corrupt,
subdirectory objects there can be reconstructed, but they lose
their names. The calculator makes up variable names for these
directories, naming them D.01, D.02, and so forth. When the
automatic reconstruction process is finished, the standard display
is restored. Then you can inspect the VAR menu to determine how
much of user memory is intact. (Note that it might not be able to
recover anything at all.)

During variable reconstruction, the calculator looks for library
objects to try to determine where port 0 begins. Unfortunately,
if it encounters a library that was stored in a global variable,
it takes that as the start of port 0, which means that some part
of user memory will be discarded. For this reason, you should not
keep libraries in user memory for long term storage -- store them
in a port instead.

Oh, regarding your earlier questions, I surmise that you somehow
stored a library designed for a 48 series into port 2 of your 50g.
Normally, a 49 series safely stores a data stream with a 48 series
binary transfer header (or vice versa) as a character string
object, but by modifying the transfer header or other tricks, you
may be able to fool the system. Many supported entry points
changed in the transition from the 48 series to the 49 series, so
as a general rule, don't expect "binary objects" (except perhaps
simple objects that don't include commands) from one series to
work in the other series; if you want to try using them, first
decompile them to source code for the model they were designed for, and then try to compile them to
object code for the model that you want to use them with.

As Marcus mentioned, 48S and 48G series libraries and SysRPL
programs aren't necessarily interchangeable either, because some
supported entry points did change.

If an "unsupported" entry point is used, then it might work only
with the ROM revision that it was written for.

For many UserRPL objects that don't include SYSEVAL, LIBEVAL, or
FLASHEVAL, a library, library data object, minifont, font, or
symbolic vector/matrix, a Kermit "ASCII" or Conn4x "Text" transfer
will accomplish the decompiling and compiling. A 48 series always
compiles the source code of an exact integer as a real number, and
if a 49 series is in exact mode, then the 48 series source code of
a real number that doesn't include a fraction mark is compiled as
an exact integer.

Apparently something in the library was causing the 50g to hang
when the ON-C warmstart tried to run its configuration program. A
TTRM (Try To Recover Memory?) does include at least one warmstart
(which may explain why holding down backspace worked), but even
responding NO to clear all "user memory" and port 0 leaves all
other ports intact, so the library was still in port 2, and the
50g tried to run its configuration program again. Of course a
hardware reset merely invokes another warmstart and adds an entry
to the log, and removing the batteries leaves port 2 (nonvolatile
flash memory) intact.

Regards,
James

Edited: 15 Oct 2006, 6:51 p.m. after one or more responses were posted


#17

Quote:
On the 49 series only, a warmstart (unless the backspace key is held down) finishes by executing any program in the reserved variable 'STARTUP' in the home directory.

Note for Meta-Kernel users: If you're running Meta-Kernel on a 48, it behaves the same way with the STARTUP variable as James described above for the 49 series.

#18

This is great information James! I've printed it out and stuck it my manual as a reference.

Thanks!
bruce


Possibly Related Threads…
Thread Author Replies Views Last Post
  Stuck Omnibook 300 pop-out mouse. Ideas? Gene Wright 5 2,009 07-03-2013, 02:52 PM
Last Post: Bill (Smithville, NJ)
  HP 39gii Stuck Again! Eddie W. Shore 3 1,393 03-06-2013, 07:47 AM
Last Post: Eddie W. Shore
  HP-71B Rom Stuck in Port Jeff Davis 2 1,185 11-26-2011, 10:24 PM
Last Post: Patrice
  Nonpareil stuck Arnaud Amiel 3 1,352 08-05-2011, 10:00 PM
Last Post: Eric Smith
  HP-15C stuck in USER mode Tom Ligon 3 1,356 06-02-2011, 04:45 PM
Last Post: Etienne Victoria
  HP 25 Battery Cover Stuck? M. Pollock (Canada) 7 2,165 04-03-2011, 08:40 AM
Last Post: M. Pollock (Canada)
  15C stuck in user mode Harold Ash 5 1,608 11-07-2008, 11:22 AM
Last Post: Harold Ash
  Stuck/broken keys on HP 48GX... Alex Trzyna 0 680 08-16-2008, 10:34 PM
Last Post: Alex Trzyna
  Help needed NOW (real time) - stuck in a loop John Wasilewski 80 15,359 10-12-2007, 09:08 AM
Last Post: vq
  48GX button is stuck Natan Samuels 8 2,445 04-06-2007, 04:23 PM
Last Post: Randy

Forum Jump: