HP Forums
HP20b repurposing - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: HP20b repurposing (/thread-158103.html)

HP20b repurposing - hugh steers - 10-20-2009

Extreme folly,

5254 ENTER gives,

ok, how do i make the wire, anyone?

Re: HP20b repurposing - Tim Wessman - 10-21-2009

Send 10 UPCs from the boxes, 5.95SH fee, a small chocolate cake and the deed to your house to cyrile's email address. Then ask nicely.


Re: HP20b repurposing - hugh steers - 10-21-2009

hmm. there's a bit of a shortage of chocolate cakes around here. most of them are only chocolate flavoured cakes. the real ones are hard to come by.

i see that no one else has figured out the meaning of my original posting. anyway, i need to DL the proper dev tools to build a proper binary beforehand anyway. i think im good for the cut down version. my code is well under 32k.

are there any docs on how arrange the RAM sections so that i can put some vars in the 2K battery backed up memory and the rest in the volatile memory.

also, how do i beat the dog?


Re: HP20b repurposing - Tim Wessman - 10-21-2009

With a stick?

Cyrille will have to help with that stuff as he is familiar with it and I am not yet.


Re: HP20b repurposing - Bruce Bergman - 10-22-2009

I think if some of us understood what the HECK you were talking about, we could probably help. Certainly, I wish I could...both help and understand. But until someone explains it to me in more simple terms, for this simple mind, I'm afraid I'm not going to be much help.

That being said, I've created a wiki (http://www.wiki4hp.com) with the intent primarily to help folks develop on the 20b. If there are things that are missing, please let me know and I'll see what I can do to add them. If there is useful information for you there, then that would be even better.


Re: HP20b repurposing - cyrille de Brébisson - 10-22-2009


I have updated the SDK, but it is not yet online... send me an email and I will send you the latest version which is a whole lot easier to work with.

to beat the dog, use the Watchdog() or the watchdog function (one is inlined, one is a function call).

if that is not defined in your version of the SDK, here is the code that I am using. It even answers 2 of your questions!:

#ifdef _ARM_
#include "board.h"
TMyApplication *const MyApplication= (TMyApplication*)0x300000;
// restart the watchdog
inline void Watchdog() { AT91C_BASE_WDTC->WDTC_WDCR= 0xA5000001; }
void watchdog(); // same function as above, but not inlined...
extern TMyApplication MYAPPLICATION;
TMyApplication *const MyApplication= &MYAPPLICATION;
inline void Watchdog() { }

do not forget to define MYAPPLICATION in the windows only part of the code somewhere...

the backup RAM is at address 300000. there is a way to create a section for the linker and then to tell the linker to place variables there, but I found it easier to create a structure (TMyApplication) that contains all the data that needs to be backed up and then to put that structure at 0x300000. It also makes is a whole lot easier to check that the structure is less than 2KB (sizeof)... as a matter of fact, in the test menu, the number under the copyright message is just that, the size of TMyApplication in order for me to check at each build if I did not mess up!

regards, cyrille

Re: HP20b repurposing - hugh steers - 10-22-2009

Hi Bruce,

Yes it's time for me to 'fess up.

I'm going to have a go at running chess on the 20b. 5254 is E2-E4 and the response is d7-d5 (4745). A bit silly i know.

I have a very small chess program which i wrote for the uWatch. it will easily fit into the 20b and Im hoping the 20b will be able to play quite well. firstly, the 4k of move stack will be quite good and also the 30Mhz arm will enable a quick response.

My next step is to build an actual hp20 binary, after that i'll have to hassle those with wires to let me have one - even if it means sending chocolate cakes!

when i get it working, i'll make the source code and binaries available.

Re: HP20b repurposing - Bruce Bergman - 10-22-2009

Thanks Cyrille! I've added this information to the wiki.