From: "Detlef Mueller" <I.h8.spam@dont.even.try>
Newsgroups: comp.sys.hp48
Subject: Re: Bad HP48GX ??? ( ON-D MTH test ) - ESD (0/1)
Date: Sun, 11 Apr 1999 02:23:52 +0300 (CDT)
Organization: Ministry of Information Retrieval
Lines: 98
Distribution: World
Message-ID: <qrgyrscebivqr.fa0hrs2.pminews@news.hamburg.pop.de>
Reply-To: "Detlef Mueller" <I.h8.spam@dont.even.try>
NNTP-Posting-Host: dmueller.hh.provi.de
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Newsreader: PMINews 2.00.1205 For OS/2
Xref: republic.btigate.com comp.sys.hp48:23719

On Sat, 10 Apr 1999 17:24:26 +0100, James MacDonald wrote:

> In message <19990409223500.29590.00000878@ng41.aol.com>
>           tinywanda@aol.com.ReMvThs (TinyWanda) wrote:
> [..ESD test..]
> On my calc, this prints
> 
> ESD  210V  210V
> for a very short time, followed by
> 
> ESD 00BCB

If you look closely, you'll probably see at least two small
bars in the line below the "ESD 210V...". You may have a G
(w/ or w/out RAM extension) or a GX w/ no or one card inserted
or you've a low bat condition.

> [,,]                                         The calc's a 48G with Weidatec
> (Cynox?) 256K RAM upgrade.

:-)

> [..strange ESD test behavior..]

I checked the test w/ some calcs (including '38Gs -- same code
in their ROM), all behaive strange so I tracked the tests bits
and found a bug that seems to be in there for nearly 10 years...

Let's start w/ the intended operation of the test. If it's started,
the test clears the LCD, draws the "ESD 210V 210V" line and then
calculates a CRC for the built-in RAM, leaving out the lowest 2k.
After that a loop is started in which the calc is using more power
than during normal operation (w/o enabling the SIO). The following
steps are done during one loop cycle:

    - a beep is generated
    - the register #108 is read and for each "1" bit a bar is drawn
      below the 1st "210V", corresponding to the cahrs position
    - the reg. #108 is logical ORed to an intial empty register.
      The resulting value is mapped below the 2nd "210V" chars as
      bars
    - the RAM CRC is recalculated and compared to the initialy
      calculated value -- if they differ, ie. the RAM contens
      has changed, the loop exits w/ an error message showing
      the most recent CRC.
    - the keyboard is checked for a key held down -- if so, the
      test loop is terminated

As said before, this is the _intended_ operation. In the HPs ROM,
the routine doing the RAM CRC is hardwired to check 30k, starting
at RAM-start + 2k. The 1st problem is that there're machines w/
128k built-in RAM (GX), the second problem is that the display GROBs
location is very likely > RAM-start + 2k (eg. on my '48 it starts
currently at #80EC8 and is #784n in size, the RAM beeing CRCed starts
at #81000...). If there's bar drawn due an low bat condition, the CRC
changes and the loop errors out.

I played a while w/ JAZZ, you'll find the result attached to this
article. It's a standalone ESD test, just download and run it. It
takes care about different RAM sizes and calculates the CRC starting
at GDISP.

During operation, the display lloks like:

         +----------- Current test result
         |     +----- All test results ORed
         |     |
         v     v
    ESD  210V  210V
         | |   |||

         ^^^^
         |||+-------- Very low AAA bats condition
         ||+--------- Low AAA bats condition
         |+---------- Low port 1 bat condition
         +----------- Low port 2 bat condition

Here eg. is no card in port 2 or its bat is low (during normal
operation the ((*)) announciator would be on then), port 1 has
a bat close to low and the AAAs are low.

To exit the test, press and hold a key until it stops beeping,
leaving w/ the last loop result.  Press a key to return to the
stack display.

If it fails, well you've a problem in any case. A fail means
that some RAM contens changed -- why this happened, well, Dave ?

Bye,
	Detlef
--
`Let's get some cards and play Magic'                     Detlef Mueller
 -- Gex                                               detlef (@) provi (.) de
                                                    http://www.provi.de/~detlef

         !!! ATTN !!! To reach my via e-mail, do _NOT_ auto-reply !!!

