User Tools

Site Tools


34s:howto_build_emulator

HOWTO: build an WP-34s windows emulator from source

Environment

Intel box running Windows XP SP3.

I do have a Vista laptop and Windows 7 netbook at home, but I haven't tried it on them yet.

Tools

First you need to get and install some tools:

  1. SVN client: I used Silk's subversion client http://www.sliksvn.com/en/download - I did a custom install of only the svn command line tool.
  2. Perl: I used ActivePerl's package for windows http://www.activestate.com/activeperl/downloads
  3. MS Visual C++ Express: thanks to the team's inclusion of libraries, MS's basic free C++ development environment will work - this is the latest 2010 version: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express

Building a windows binary

Bring up a windows console (Start→Run…“cmd”) and change to a directory path that doesn't have any spaces in the name (cd c:\tmp)

  1. Run the subversion command to get the latest software:
svn checkout svn://svn.code.sf.net/p/wp34s/code/trunk wp34s-code
  1. To build from the command line, change to “wp34s-code” directory and run makewin.cmd.
    makewin.cmd is no longer in the repository (as of 17-Dec-2013) so best just to build via the GUI.
  2. To build from the GUI, do the next 3 steps:
    • In windows explorer, find and double click on wp34s-code\windows\wp34s_express.sln to startup Visual C++ Express.
    • Make sure the solution configuration is set to “Release” and not “Debug” in the toolbar drop down menu.
    • In the “Solution Explorer” sub-window, click on wp34s_express and hit “F7” to build.

If all goes well, you should have a new wp34sgui.exe in the wp34s-code\windows\bin directory.

Debugging

Pretty much any changes you make to the code should be done on the emulator first. You should build the debug version of the software. Just select “Debug” from the drop down menu and hit F7 to start the build.

By default, if you start Debugging from the Windows GUI you will get the Windows calculator. Debugging in Visual Studio works pretty much like any other GUI debugger - set breakpoints, step in, around and out etc… Hover the pointer over a variable usually displays it's current value.

To debug the original “curses” text emulator start wp34s_d.exe and select “Attach debugger…” from the Debug menu. Pick out your wp34s process from the list and click on “Attach”. This has it's advantages in that it shows all registers, modes and stack values, but you need the “layout” file to know which keyboard key maps to which calculator key.

34s/howto_build_emulator.txt · Last modified: 2013/12/18 14:48 by bruceh