Post Reply 
04-28-2018, 01:54 PM
Post: #1
I've been following this site for a long time and I figure I might as well take the plunge to introduce myself. The caliber of the people here far surpass most other forums, and more importantly you are a very generous group with your time so that learning someting new is far easier.

A good example was the recent help given to a college student and his electrical project. That was impressive. Even theory is expanded on so that others may learn - like a small stack exchange without all of the BS.

I am semi-retired, having moved to the Philippines, I married, and now have a son. I lived life in reverse and I am happy with the results. I take in no new clients and only still support my two largest accounts stateside.

When I was a senior in high school (1978) , I scraped up enough money to buy a TI SR56 as I could not afford a 29C. I went to college to earn a CS degree and at the end of the first year, I had a few math classes and computer classes under my belt - knowing assembly and FORTRAN on a IBM 1130 and a PDP 11/70. I was hoping to trade up to a 58 or 59 with my summer savings. I was lucky and landed a summer job with NL. My job was to develop in Fortran and assembly language code to be embedded and fit into a drill bit for offshore oil drilling and realtime monitoring.

At the end of summer, I wanted to stay and continue work - the money was great. Fortunately my Dad pointed out the folly in that and I returned to college. My bank account was very impressive for a 19 year old college student.

With my new largess, I bought that HP29C, and was blown away by it. Like the PDP 11, I wanted to learn everything about it. I think I was the only kid to have a programmable calculator. None of my professors knew what kind of device I had and what it was capable of. A lot of my math was in theory and at that point, my answers were symbolic and as such, the calculator couldn't help too much there.

After graduating, into work I went. What a time to be a young man with a computer science degree!

I eventually ended up in the embedded world with a heavy leaning towards cryptography and signal processing. I bought a HP41CV and by the time the 41CX came out, I bought two because it was so critical to my work, I couldn't afford to be without one. I still use that 41 to this day, and the other 41 is still in the box.

When the 42S came out, I bought one. Later I increased its memory. I remember looking at the design and build quality of the 42 and thinking that HP had embraced planned obsolescence and joined our throw away society. That made me a bit sad.

Several years ago, after playing around with Bob Supnik's SimH, I thought I would do something similar but with calculators. So I made the framework to handle and communicate with whatever CPU you wanted to simulate. The tedious work of designing and implementing the GUI and the back end saving state as well as debugging and single stepping is gone.

Of course the first CPU I emulated was the nut. I now have the following calculators finished: hp65, hp67, hp29c, 34, 15, 16, 41, 42, 48gx, and 49g+. The emulator is written in C and in ARM and x86 assembly, both 32 and 64 bits. I am currently working on implementing a TI59 (yes, I am a heathen.)

For each calculator the framework allows two modes: emulate and simulate. I've only implemented the 41 in both modes. In emulate mode the 41 is identical to the original with configurable speed. The rest of this post is about simulate mode.

Build targets are smart phones (Android and IOS) and linux. In simulate mode, on either the phone or linux desktop, the calculator becomes an arbitrary precision calculator. The 41 can be programmed by keystroke, RPL, assembly, and or PPL - even mixed. The code editor, compiler, assembler, linker, and disassembler are all built in and pop up as an IDE. PPL, RPL, Nut assembly and of course keystroke programming, are reduced to an intermediate form and then assembled and linked. This version of RPL is of course tied in to use the functions available on the 41. This is why I reduce everythig to an intermediate form before generating code. To implement a different calculator, all you need to do is to just generate the intermediate code from the lexical parse, and the framework will handle the rest ala clang. Now you can implement an algorithm in basic, and instantly see the assembly language equivalent. With appropriate cables and a minor little piece of hardware, the 41 will be right at home on a HPIL loop.

I've designed this as an educational tool as well so I included PPL to open this platform up to as many people as possible, recognizing that assembly and RPL are an entry barrier. So now with phone in hand, you can write, compile, debug, and assemble. The framework will build the image and you can run it right away without all the middle steps - you do not need to download any other program to program in any of the above languages. This also lowers the barrier. There is a multitude of ways to import and export data of any kind.

Oh, did I mention how fast it is? You need to see it to believe it. It fully takes advantage of any core or cores you assign it. The increased speed is well integrated though. Pauses and intermediate displays as well as printer listings are consistent with user defined time intervals. No more missed catalogs because they scrolled by too fast.

I'm most proud of the touch screen interface - you can choose any combination of feedback including visual, haptic, and audio. With the right profile set up, I have better accuracy than working on the original! Just play around with the settings on the practice pad or use the wizard. You will change your mind about touch screens. I use it professionally every day.

Other notable features besides arbitrary precision, is that the 41 is now a multitasker! Why your program is running, you could be calculating your new loan payments all the while printing out your last program you entered earlier. All processes are launched with their own colored and numbered display so as not confuse where the focus is. The display size of the simulate mode 41 is user definable. Programs can now be written to take advantage of that.

Every view is skinable so if you like large buttons and high contrast colors you can have that; do you like photo realism? You can have that also. In fact one can design and implement a completely new calculator. The framework makes it much much simpler. Last but not least, if you do not like where the enter or other keys are, Change it to fit your taste. Of course everyone knows that the enter and arithmetic keys belong on the left...

Now that I have free time (first time ever - honestly), I am refactoring the code now for release. I have a list of all additional software used - quite a bit actually, and I am composing courtesy letters to give the other developers a heads up so to speak. The licensing has passed legal muster. I initially was going to sell it. I changed my mind because I think it is important to make this available to everyone who wants to learn and explore all of these engineering marvels.

The final intent of all this of course is to provide a lifetime tool that is as accurate as anything on the planet. A tribute to my 41.

I'm sorry, I have written way too much. I am excited to be releasing this - it has taken years.

I collect only programables and it is more like a library than a collection - they all get use except that 41cx in a box. There is one exception to that, I do have a hp35.

Find all posts by this user
Quote this message in a reply
04-28-2018, 02:43 PM
Post: #2
RE: Introduction
First: welcome!

Second: thanks for sharing!

Third: what you describe seems quite a work!

Fourth: please don't hesitate to contribute in forum posts, especially with technical posts. The more, the better.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
04-28-2018, 04:24 PM (This post was last modified: 04-28-2018 04:24 PM by Graham D. Wilson.)
Post: #3
RE: Introduction
Welcome JW

Thanks for the interesting introduction. The 29C was my first HP too, bought in 1978. It's still my favourite of all the HPs I own.

The project you've been working on looks intriguing and thanks for making it available. Looking forward to its release.
Find all posts by this user
Quote this message in a reply
Post Reply 

User(s) browsing this thread: 1 Guest(s)