Suggestion for an Emulator/Simulator


Instead of a emulator or a simulator of a real HP calc I think what would be very useful is a software calculator. I know there are many of them out there. My idea is one that has the capabilities based on the 48, 49 and 50G. It won't be as powerful and expensive like Mathematica. It would have all the functions of say a 50G but taking the advantage of large display, large keyboard and large memory of a PC. For example, the plotting capabilities of the 50G is quite good but the screen is too small to be of much use, a large screen on a PC would make it much more useful. The calculator would be able to display large equation with the equation writer withou scrolling. It would be able to display many levels of stack. We can simply have pull down menu, computer style, instead of the kind of menu we have on a hand held calc. I would be willing to pay the price of a 50G for such a software package. Another nice thing is that now I can pick nice hardware to run it on or if I don't care I can run it on a cheap PC.
What do you think?


this is the kind of thing ive been working on. basically make a virtual calculator and host it anywhere, like on the 50g platform for example.

ive been showing people the idea of a virtual calculator running on a real calculator and they think i'm cookoo. but it makes sense because all the buttons are there.

insofar as a programming language i thought that rather than adding a programming language to a software calculator, i'd add a software calculator to a programming language! i have extended LUA to have a expression evaluating command line and to have a choice of number systems for different purposes. i have some graphic demos too, but they're not finished right now.

i'm going to talk more on these ideas at this years HHC/HPCC conferences.



ive been showing people the idea of a virtual calculator running on a real calculator and they think i'm cookoo. but it makes sense because all the buttons are there.

I don't think you are 'cookoo'.




hi howard,

i'm interested to know if there's a way to call out to the built in functions of the 50g. if this were possible, then it would automatically give all the functions of the 50g plus a new programming language.

someone somewhere must know how to call parts of the rom from cold. since luacalc works in decimal it would be easy to convert to and from my internal number format without a big overhead.

then you would have your calculator.


What you need are hooks into System RPL from your implementation, right? I assume your LUA interpreter is compiled with hpgcc. The libraries that come with that package aren't enough? The folks that wrote the libraries might be interested in what you are doing. Their hplib documentation states that it contains "[a]n exposed interface to the underlying KOS operating system calls (for advanced users only)." I assume that means the ARM based kernel. From there you would have to access the Saturn emulator. It sounds like it might be difficult to do, but you probably wouldn't have to go it alone.



A quick perusal of that documentation shows me that they have gone at least part way down the path to a general interface to the Saturn emulator. They have stack manipulation pretty well nailed, and data type conversions too. Finally, there's a Saturn file system header file. I see they also have a basic math library. I wonder if that's a reimplementation, or calls the on-board math stuff? The advantage for the latter approach would be compatibility with native HP50g results. The former would be better for speed, of course.



yes there is stuff to manipulate the RPN stack and get to the file system, but AFAIK nothing to call builtin functions. I can push onto the stack, but i can't call anything. i need some help on this.

the math library is a softfloat ieee754. i'm not using the hpgcc math lib. instead i have my own BCD code in there.


Mr. Steers,

I am wondering if you caught this very recent thread at comp.sys.hp48. It seems two programmers over there are getting serious about Lua on the hp 50g, so I thought I would let you know, as I thought you might be interested.

The thread has grown quite a bit, and there is some bickering about using some "ancient" languages to program for the hp 50g (Ada and Fortran were mentioned!), but if you weed through those posts, later in the thread you will find two people, "Claudio" and "manjo" discussing Lua.

There is the thread:

I hope this helps somehow.



thanks! they are refering to my 50g hplua port. i've made a lot of changes since the last release and these are not yet on sourceforge mainly because i need to do a proper tidy up before checking it all in.

i've rehosted hplua in a new graphical front end which is capable of international characters, greek etc and also general graphics, lines pictures etc. right now i have to tweak the fonts somewhat. but basically there is unicode coverage. later i hope to display formulae.


Ok, I saw your response to the thread c.s.hp48. Good deal. I suspected from the thread they were aware of your port and were not discussing starting from scratch..

I am a fan of Lua as well, having written several programs in Plua (Palm OS port). I have not tried your port yet, but have been keeping an eye on it. I have school, work, and kids, thus little time.

Can you tell me what you mean by "rehosted" hplua? Have you moved from a console interface to a frame-buffered graphical application interface (which can print text or graphics)?



Have you moved from a console interface to a frame-buffered graphical application interface


i've integrated my 2D graphics library and render into a window. unfortunately, the window is currently full sized to make max use of the screen. later i'll be adding some decoration.


Actually my idea was for a program that run on the PC and has the mathematical capabilities of the 50G with the exception of a very large screen, large keyboard and lots of memory. I found that the 50G has sufficient capabilities in both numerical and symbolic as well as graphing except that its screen is too small to be very useful especially in graphic. Data entry is also slower because it doesn't have a good keyboard nor a mouse.


i agree with you about the screen size - and what kind of wombats make a screen with an ODD width!

the 131x80 screen is pretty pathetic for graphing and display of any kind of interesting formulae. its also slow and not in colour. if i try to display any movement, i get a horrible blur a bit like looking into a bowl of hot porrage (due to the bogus dithering).

im trying to make the best of it tho' :-)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Prime Connectivity Kit Suggestion toml_12953 1 651 12-06-2013, 10:41 PM
Last Post: Michael de Estrada
  HP-70 simulator updated Willy R. Kunz 3 745 11-26-2013, 08:20 PM
Last Post: BShoring
  HP Prime suggestion to avoid Numeric/Symbolic confusion Chris Pem10 4 799 11-19-2013, 05:49 AM
Last Post: bluesun08
  HP Prime - Revision Suggestion - Setting the Clock Bill Triplett 5 919 11-15-2013, 12:36 AM
Last Post: Joe Horn
  HP Prime - Cross product suggestion bluesun08 13 1,846 11-08-2013, 01:49 AM
Last Post: Patrice
  where can I get the HP Prime simulator? John Ioannidis 4 800 09-27-2013, 12:28 PM
Last Post: John Ioannidis
  HP Prime Emulator/Conn. kit suggestion Han 2 714 09-27-2013, 11:23 AM
Last Post: Han
  OT: EDSAC simulator Mike (Stgt) 2 603 08-20-2013, 07:27 AM
Last Post: Mike (Stgt)
  Yet another simulator Mike T. 3 703 08-05-2013, 07:10 AM
Last Post: Namir
  HP-16C simulator fhub 12 1,488 06-30-2013, 10:14 PM
Last Post: Robert Prosperi

Forum Jump: