Hands on the 20b SDK
#1

I'm willing to help bring forward the 20b/30b repurposing efforts and am taking the first few steps in this direction.

Firstly, my cable has arrived and works fine. (I have a spare, which I can offer to someone here in Germany for free.) After downloading SAM-BA from atmel.com, I was able to erase the flash of my 20b and reprogram it with the image provided in the SDK. The little machine is up and running its original software again. So technically, I'm able to put any software on it.

The following step was getting the sample application in the simulator to compile and run. My old MSC compiler does not support the long long data type (it's there but differently named). Some changes to the sources helped me out. One function is missing from the MFC libraries coming with my compiler. I've got the software running but without support for multiple skins.

To overcome these problems, I decided to upgrade to Visual Studio C++ Express which you can download from Microsoft for free. You'll need some spare space on your hard disk though. The install has just finished. I'll report back, if the SDK example application will compile with this version.

The next step would be to compile WP-34s for the simulator. If I can get this to work, a big step is taken towards a "real" port. On SourceFourge.net I can only find the documentation for download. What do I need to get to the sources? I guess an SVN client is necessary.

I had asked IAR for a price quote for the full development environment from them. In short, I'm not willing to pay over 2000 € for a hobbyist project. I'll be getting the kickstart edition to play around with the SDK but I plan to make GCC an alternative. OK, no debugging in the foreseeable future...

EDIT: The IAR compiler was able to create a working flash image of the number guessing game. I did some code changes to get rid of any compiler warnings and I had to change the project settings: The kickstart version does not allow assembly listings being generated from C/C++ code and the library options were set to "none" which lead to linker errors (missing symbols.)


Edited: 9 Feb 2011, 12:45 p.m. after one or more responses were posted

#2

Hallo Marcus,

you'll get the necessary most recent files (or access to them) from Pauli, plus optimum advice what to do with them. Please note the layout has changed a bit compared with v1.12. I'm working on v1.13 but it's not ready to be published yet.

Walter

#3

Thanks Walter!

I'll have to streamline the SDK files a bit first before I want to do work on the simulator or GCC.

I had some sucess with the IAR compiler (see first posting). :)

Edited: 9 Feb 2011, 12:46 p.m.

#4

Hi Marcus,

I'm willing to help with compiling SDK.

I got my cables yesterday and tried to compile the SDK emulator on my PC, but had issues. I tested Visual C++ 2003. It is compiling about some missing files, but Tim recommended we can take them out. so I'm going to try again.

Does Visual C++ Express have the MFC libraries?

Thanks,
erturk

#5

I have yet to check the latter. Be patient.

#6

The sources and latest documentation are available via subversion from the site. The command is mentioned on the sourceforge page but it is buried a bit:

        svn co https://wp34s.svn.sourceforge.net/svnroot/wp34s wp34s 


- Pauli

#7

Thanks Pauli,

I'm going to do some work on the SDK before I turn to your sources. It will take its time.

I need a recent version of the keyboard, in case it is different from what is outlined in the PDF, in order to create an emulator skin. The result should be a working executable for windows with your software in it.

#8

Your svn command has worked perfectly. Do you think, I can compile it on Mac OS?

Edited: 10 Feb 2011, 12:58 p.m.

#9

Quote:
Does Visual C++ Express have the MFC libraries?

I fear not. :(

I will have to hunt for a replacement. My VC6 setup is just lacking a single function...

Edit: I'm just downloading the Professional Edition of Visual Studio 10.0.

Edited: 10 Feb 2011, 12:50 p.m.

#10

The most recent version of the keyboard looks like this:

I'm pretty confident that's it now, but I've been so several times before d:-)

#11

I've been building on MacOS X for ages. You'll need to do it in a terminal window and you'll have to have the ncurses library installed too.

- Pauli

#12

OK, now I've several options:

Setup Visual Studio C++ Professional and build a windows emulator version.

Build the terminal (ncurses) version on my Mac.

Port it to gcc-arm...

My next step will be the VC++ way because I've just shelled out a few hundred bucks for the compiler. :)

For those who are not willing to pay for the Professional VC++ (because of the MFC libraries), I'm planning to put the GUI part in a separate precompiled module that may be added to a VC++ Express project.

Please stand by...

#13

Looks very nice and useable to me.

However, here are some ideas that might even improve it.

Here's a quote from the WP-34s manual:

Quote:
We baptized it 34S in honour of one of the most powerful LED
pocket calculators, the HP-34C

The 34C was my first HP back in 1980. One of the features I liked most was the MANT function, displaying the full 10-digit mantissa.
On today's calculators this function is called SHOW, and it's also present on the 34s. But where did you hide it? In the lower left corner! Walter! Remember the 34C! This function MUST be placed on the big ENTER key! That's where it belongs. Even the 35S designers
knew that! ;-)

Second, wouldn't it be nice if if VIEW was not on Shift-STO but Shift-RCL?

Finally, here are two suggestions for the function set:

  1. I really like the idea of four different logarithms, including
    a base-2 log (although I would have chosen ld instead of lb) and
    a general log function with variable base. Currently this function
    is implemented as base-y log of x. I would definitely prefer it the
    other way round, i.e. the base-x log of y. It's simply more
    intuitive and faster to use: In real life you usually first
    calculate a value and then you take the base-x log of it, where x
    often is a constant. For a base-8 log you'd simply type [8] [logxY].

    For the same reason other calculators have a function for the
    x-th root of y, and not the other way round.

  2. I also like a suggestion in the last HP Solve issue concerning the delta-% function. What if it returned not just one, but two results? In other words: both delta%(x,y) and delta%(y,x), so that the user can see both results with a simple X<>Y.

Dieter

#14

LBL & RTN would be better bound to XEQ.
I think binary logarithm/antilog could go to menu, if calc runs in BCD mode.

#15

Quote:
LBL & RTN would be better bound to XEQ.

Sorry, I disagree. Neither LBL nor RTN have anything to do with XEQ. LBL is used exclusively in programming, where's the habitat of RTN as well. This was the reason for placing them next to other commands for this mode.

Though used in programming as well, XEQ is mainly employed for calling routines from the keyboard or for picking items from the catalogs. Thus, XEQ, arrow up and down, and EXIT are placed in one column next to each other.

Please see the doc file.

#16

Hallo Dieter,

Quote:
The 34C was my first HP back in 1980. One of the features I liked most was the MANT function, displaying the full 10-digit mantissa. On today's calculators this function is called SHOW, and it's also present on the 34s. But where did you hide it? In the lower left corner! Walter! Remember the 34C! This function MUST be placed on the big ENTER key! That's where it belongs. Even the 35S designers knew that! ;-)

I admit I was influenced by the layout of the 42S, where SHOW lives in bottom row. And CONST needs more space than SHOW. And you can ENTER a CONSTant and EXIT a SHOW, but not the other way d;-)

Quote:
Second, wouldn't it be nice if if VIEW was not on Shift-STO but Shift-RCL?

Sure. But STO TIME would have been misleading. Since most people know what VIEW does, I decided to give the place below of RCL to TIME. YMMV.

Quote:
Currently this function is implemented as base-y log of x. I would definitely prefer it the other way round, i.e. the base-x log of y.

The inverse of y^x is log[base y](x). And the x'th root of y is another cup of tea - it's simply y^(1/x).

About Delta%: I tried to keep existing calculator commands as they are known, for sake of consistency. We have a small number of deviations from this principle. You find them highlighted in the documentation. 90% of these deviations are due to a more flexible addressing paradigm. Please see the documentation.

#17

I've had some success with compiling the emulator with VC++ Express. :)

You'll find an updated copy of the SDK files here. I've split the application in a Windows/MFC part which I've put in a library together with all its dependencies, and an application part which does not include any Windows specific stuff that might miss from VC++ Express. Use HP20b_Express.sln or HP20b_Full.sln as your starting point, depending on the compiler you're using. You can even debug with Express but you need to set a breakpoint in application.cpp in advance. Don't mind the linker warnings about missing PDB symbol files for the library, they need to be ignored.

Happy emulating.

I'll probably start porting wp34s to the emulator soon.



Possibly Related Threads…
Thread Author Replies Views Last Post
  HP's thinking behind the 20b/30b? John Ioannidis 3 1,624 09-07-2013, 10:21 AM
Last Post: Tim Wessman
  A hands-on review of the HP Prime Adrien Bertrand 7 2,263 08-14-2013, 03:45 AM
Last Post: Juergen Keller
  HP Prime SDK Chris Smith 0 786 07-21-2013, 02:46 PM
Last Post: Chris Smith
  20b, 30b not in HP's web store Eric Smith 3 1,440 02-08-2013, 11:52 AM
Last Post: Walter B
  A non 20b/30b 34S Matt Agajanian 22 5,089 08-20-2012, 01:06 AM
Last Post: Reth
  [WP-34s] IR conversion of 20b Alexander Oestert 3 1,503 05-18-2012, 05:38 PM
Last Post: Harald
  Why hp-20b more expensive than 30b? Masaki Adachi 9 2,852 10-14-2011, 12:08 PM
Last Post: megarat
  missing segments on 20b running 34s db (martinez, ca.) 4 1,613 10-05-2011, 01:27 AM
Last Post: Walter B
  Flashing HP 20b for WP 34S Steve Brenton 10 2,635 09-30-2011, 09:03 AM
Last Post: Marcus von Cube, Germany
  Case for 20b/30b/34S? David Hayden 1 946 09-29-2011, 03:41 PM
Last Post: Walter B

Forum Jump: