Manual version: 1.0
April 8, 2003
Power48 is a PalmOS based emulator for the Hewlett-Packard 48SX, 48GX and 49G series of calculators. It provides a fairly complete emulation of the Saturn CPU upon which these calculators are based and is able to run a majority of the programs available for them. It emulates one instance each of the 48SX, 48GX and 49G, and maintains complete and separate state information for each allowing the user to quickly switch between either one.
Power48 is based primarily on Emu48 originally written by Sebastien Carlier and now maintained and updated by Christoph Gießelink. It is important to note however that Power48 is not 100% equivalent to Emu48, as state and port files generated by Emu48 are not compatible with Power48 and vice-versa. Additionally, the core emulation code has been almost completely rewritten and optimized for the Palm platform in an attempt to squeeze in every ounce of performance possible.
Note: The HP48/49 ROM images distributed with this
emulator are the property of and copyrighted by Hewlett-Packard. Their
inclusion in this package is for the convenience of the end-user only. If you
(the end-user) are not legally permitted to use a particular ROM image you must
not install that ROM image to the VFS storage mechanism.
v Robust Saturn CPU emulation
v Supports 48SX, 48GX, and 49G ROM images
v Ability to load/save objects to/from stack level 1
v Supports MetaKernel shell replacement
v Support for merge-able 128K expansion card in port 1
v Supports Sony Hi-Res and Hi-Res+ displays
v Supports screen zooming in 320x320 mode
v Virtual LCD display support including contrast adjustment and alternate colors
v Virtual keyboard support
v Full state and memory saving for quick resume
v Support for mapping PalmOS internal real time clock to HP48 clock
v Beep support through Makebeep patch
v Supports Sony keyboard, graffiti, and jog dial input
v
ARM native emulation core
faster than real calculator!
v
Small memory footprint on Sony
OS5 devices with large heap space
v
Support for background images
on calculator display
v
Support for pixel color cycling
effect
Table of Contents:
Hi-Res or Double Density GUI mode:
Special button layout (Sony Hi-Res+ mode):
Special Button Layout (Sony Hi-Res or PalmOS Double
Density Mode):
Display area function key support:
User Guides and Supplementary Info
Power48 has the following minimum hardware requirements for correct operation:
v Sony Clié with at least 320x320 color display support
v 16-bit display color depth
v 33 MHz CPU
v 8MB internal memory
v Memory stick with enough free space to store RAM and ROM images.
v Double density screen (i.e. at least 320x320 resolution)
v 16-bit display color depth
v ARM CPU
v 16MB internal memory
v Memory stick, SD card, or other VFS compatible external storage device with enough free space to store RAM and ROM images.
Current OS5 device compatibility (as of
In order to keep internal memory usage to a minimum, Power48 saves most session data (RAM and ROM images) in the external storage device (memory stick or SD card), and only saves the CPU state data file (approx 0.6 Kilobytes) in internal memory. The following table lists the sizes of all stored elements:
External VFS Storage requirements per target:
HP48SX |
HP48GX |
HP49G |
ROM image: 256 KB RAM image: 32 KB PORT1 image: 128 KB (optional) |
ROM image: 512 KB RAM image: 128 KB PORT1 image: 128 KB (optional) |
ROM image: 1024 KB IRAM image: 256 KB ERAM image: 256 KB |
Internal program store
requirements per target:
§ ~580 KB for Power48 executable
§ 0.6 KB for HP48SX state file
§ 0.6 KB for HP48GX state file
§ 0.6 KB for HP49G state file
Runtime memory requirements per target:
HP48SX |
HP48GX |
HP49G |
ROM image: 512 KB RAM image: 64 KB PORT1 image: 256 KB (optional) |
ROM image: 1024 KB RAM image: 256 KB PORT1 image: 256 KB (optional) |
ROM image: 2048 KB IRAM image: 512 KB ERAM image: 512 KB |
Total: 832 KB |
Total: 1536 KB |
Total: 3072 KB |
Note that the runtime requirements only apply when running in that particular mode. Also, the PORT1 usage is optional depending on whether or not a 128K expansion card is desired for PORT1. The user is not required to have ROM/RAM files for all of the targets – the user can limit the operation of the emulator to specific target(s) and save the external storage space used by the other target(s).
Note regarding runtime memory allocation:
In most cases Power48 allocates the large chunks of memory it needs to hold the ROM/RAM images out of the pool of memory used for program storage. This is the same pool whose current Free Space is shown by the Palm launcher. With this in mind, and referencing the above table, the user should have at lease 3 MB of free space available to run the 49G target. The other targets all use progressively less memory.
There is an exception to this in the case of recent Sony Cliés, specifically the NX and NZ series. These PDAs have a very large (~4 MB) dynamic memory area that is reserved and separate from the main storage pool. When Power48 runs on one of these devices, it will allocate its runtime memory exclusively out of this dynamic area, leaving the main storage area untouched. This effectively removes the runtime memory requirement for these PDAs.
After downloading and uncompressing the .zip file containing the Power48 release, the user should be presented with the following files:
Power48.prc -
Main executable
Power48 Manual.doc -
This document!
GPL.txt -
Copy of the GNU General Public License
Power48/ -
Directory
HP48GXRomfile.bin - 48GX ROM image
HP48SXRomfile.bin - 48SX ROM image
HP49GRomfile.bin - 49G ROM image
Objects/ - Directory (empty)
Unlike most PalmOS programs, Power48 cannot be installed solely through use of the hotsync facility. The requirement that some files reside on VFS storage media prevent this. Instead, installing Power48 is a two-part process:
Step 1: Hotsync the file Power48.prc
The file Power48.prc is the main executable for Power48 and should be hotsynced to the device via the normal program installation method. It can be stored in main memory or run from external storage via any launcher program that supports execution from external devices. Power48 absolutely requires the rom files listed above to run properly, so it will start up in “Dry Run Mode” until you complete step 2.
Step 2: Copy the Power48 folder to the VFS media (memory
stick, SD card, etc...)
In this step the Power48 folder shown above should be copied directly to the resident VFS storage device, be it memory stick, SD card, or any other type of flash media. The Power48 directory should be copied to the following location on the external storage device:
/PALM/PROGRAMS/
In doing so this will create the following directory structure on the external storage device:
/PALM/PROGRAMS/Power48/ - Storage area for RAM/ROM/PORT1 images
/PALM/PROGRAMS/Power48/Objects/ - Storage area for object loading/saving
If the user desires not to use all of the targets (48SX, 48GX or 49G), then the unused ROM file(s) for the unused target(s) may then be deleted.
Copying the Power48 folder to the VFS media can be accomplished in two different ways. One, the flash media card can be inserted into an external flash media reader on a Macintosh or Windows personal computer. This will cause the flash media device to be mounted on the desktop as a removable drive. The user should navigate to the /PALM/PROGRAMS/ directory on the removable drive. The Power48 folder can then be copied to the flash media by dragging it from the installation folder to the removable drive.
Two, if the user has a Windows PC then the VFS media can be mounted without the use of an external flash reader. Sony Cliés have the ability to mount the memory stick as a removable drive in windows via the MSImport / MSExport software that is included with all Cliés. The user simply installs MSExport on the PC and then places the Clié in the cradle and executes the MSImport program. This causes the memory stick to appear as a removable drive, and the instructions above can be used to copy the Power48 folder.
For devices other than Sony Cliés, the software necessary to mount the VFS media may or may not be included with the device. For example, the Palm Tungsten T does not include this capability. There is a third-party program from Softick that accomplishes this task neatly. It is called Card Export and it is available from PalmGear, or directly from Softick (http://www.softick.com/cardexport/). It comes with a free 21-day trial usage period.
At this point the emulator is now installed correctly and is ready to run for the first time.
Click on the Power48.prc icon to start the emulator.
If for some reason the ROM images weren’t installed, or they were installed in the wrong place, the user will be presented with the following display:
After clicking OK, the screen will revert to the following:
Dry run mode indicates that the emulator is running without having loaded a ROM image. In this state the user may access and modify the preferences screen, as well as display the “about” screen and even switch targets, but that is all. The user must quit the emulator, rectify the problem with the ROM images, and then restart the emulator.
Once the ROM images have been installed correctly, the emulator will then proceed with loading the ROM, RAM and PORT1 images. Since this will be the first time the emulator is run, there will be no RAM or PORT1 image. The emulator will then display the following message:
This screen simply indicates that no RAM image was found, which is to be expected wince this is the first time the emulator has been run. Click OK to acknowledge this screen.
After several messages indicating startup status scroll by, the user should be rewarded with the following screen:
Click the soft key “F” to indicate that no memory recovery should be attempted.
And now the emulator is fully up and running…
Note that in the preceding steps the 48GX target was shown. The examples all apply equally to the 48SX and the 49G. The first time the emulator has been run it will attempt to load the 48GX target. If it can’t find the 48GX Rom file, it will automatically attempt to load the 48SX target instead, and so on for the 49G. If it can’t find the 49G ROM file either, it will start in dry run mode. Each subsequent time the emulator is run it will attempt to start in whichever mode was last active.
These are the virtual screens representing the 48SX, 48GX and 49G calculators in Sony Hi-Res+ (320x480) GUI mode. The virtual key layout is identical to the real machines. This emulator will start up in this mode by default on machines that are capable of it, and will be unavailable for those that aren’t.
These are the virtual screens representing the 48SX, 48GX and 49G calculators in Hi-Res (320x320) mode. The virtual key layout differs slightly from the real thing. Unfortunately, this was necessary in order to accommodate the “squareness” of the palm display. This mode differs from the Hi-Res+ mode in two key areas:
One, because the soft keys are not directly under the screen labels, the labels are reproduced on top of the soft keys:
Two, the screen can be zoomed to twice its size for increased readability. Tapping the screen or pressing the jog dial back button will toggle between the two modes, and most of the keys are still usable in the zoomed mode:
There are several additional buttons present on the virtual screen that perform functions external to the emulated calculator. These buttons are in the same location on all targets. In Sony Hi-Res+ mode (320 x 480) they are laid out as follows:
In Sony Hi-Res or PalmOS Double Density mode (320 x 320) the special buttons are laid out as follows:
Power48 emulates the soft function keys (the A-F keys) like all of the rest of the keys found on a 48 or 49 series calculator by using a visual representation of the calculator’s soft key buttons. Additionally, it provides support for pressing the LCD labels representing the keys as a substitute for pressing the soft key button. This is most helpful when in the reduced 320x320 mode, and the LCD is in large or zoomed mode and is covering up the soft key buttons. The layout is as shown:
Several aspects of the emulator’s operation can be modified through the preferences screen. The screen is tabbed with three separate pages: the “General” page which contains options applicable to the emulator as a whole, and the “48GX” and “48SX” pages which contain options specific to each target.
Pressing the menu button brings up the preferences screen,
“General” page. The other pages “48GX”, “48SX” and “49G” can be accessed simply
by clicking on the appropriate tab.
Dynamic heap space: This is not user adjustable. It simply displays the remaining dynamic heap space in the PalmOS.
Volume: Use the arrows to adjust the volume of the calculator beep up or down.
Allow CPU doze on calculator shutdown: Checking this option causes the emulator to return complete control to the PalmOS every time the emulator enters a SHUTDOWN state, which it will do any time it is waiting for user input. Otherwise, if the option is not checked, the emulator runs full bore all the time. To save battery life, it is recommended that you check this option. The emulator will still be responsive as the PalmOS will return control to the emulator any time a user presses a button or taps anywhere on the screen.
Use Sony Hi-Res+ interface: Checking this option causes the emulator to use the Sony Hi-Res+ (320x480) GUI if available. This option will be grayed out if the capability is not available.
Verbose startup messaging: Checking this option causes the emulator to display certain status messages on the virtual LCD during bootup. Select a scroll speed of Slow or Fast to control how fast the messages scroll on the screen. Turning verbose messaging off makes the emulator startup as fast as possible.
Color: Pressing this button will exit the preferences screen and bring up a color selection dialog that will allow the user to pick custom colors for the pixels and background of the virtual LCD display for the currently active target. See the section titled “Virtual LCD Color Selection” for more information.
Reset: Pressing this button will bring up a dialog
box asking the user if they would like to simulate pushing the reset pin of the
currently active target. This is generally only necessary if the calculator
locks up for some reason. It is usually a memory-safe process, but not always.
Cancel: Pressing this button exits the preferences
screen without accepting any of the changes.
OK: Pressing this button exits the preferences screen and activates all changes.
These options apply only to the 48GX target.
Use background image file for LCD screen background: Selecting
this option will enable the user to display a custom background image for the
virtual LCD display instead of a single color backdrop. See the section titled
“Virtual LCD Background Image” for more information. NOTE: This option is
only available with PalmOS 5 or greater – the option will be grayed-out
otherwise.
Animate pixel color cycling: Checking this option will cause the color of the pixels in the virtual LCD display to slowly change colors in a cyclic pattern. The background will stay the same color. NOTE: This option is only available with PalmOS 5 or greater – the option will be grayed-out otherwise.
Insert 128K expansion card in port 1: Checking or unchecking this option controls the insertion or removal of a virtual 128K expansion card in port 1 of the emulator. If the 48GX is not the active target, the emulator will simply remember the setting and load or not load the PORT1 file when the 48GX is made active again. If the 48GX is currently the active target, this operation will be denied unless the calculator is in a powered-off state.
Once the calculator is off, the card can be inserted or removed at will. Inserting the card by checking the option will cause the emulator to allocate an additional 256KB of internal memory for the PORT1 image and look for a PORT1 file to load it with. If it doesn’t find one an alert box will be presented and the calculator will create a blank file.
Removing the card causes the emulator to deallocate the PORT1 internal memory, but DOES NOT delete the PORT1 file, so the user can go back to it if desired simply by reinserting the card.
Note: This card is not shared with the card for the 48SX. The emulator maintains to separate PORT1 cards.
Active: If the 48GX is not the active target,
checking this option will make it active once the user presses OK.
Cancel: Pressing this button exits the preferences screen without accepting any of the changes.
OK: Pressing this button exits the preferences screen and activates all changes.
These options apply only to the 48SX target.
Use background image file for LCD screen background: Selecting
this option will enable the user to display a custom background image for the
virtual LCD display instead of a single color backdrop. See the section titled
“Virtual LCD Background Image” for more information. NOTE: This option is
only available with PalmOS 5 or greater – the option will be grayed-out
otherwise.
Animate pixel color cycling: Checking this option will cause the color of the pixels in the virtual LCD display to slowly change colors in a cyclic pattern. The background will stay the same color. NOTE: This option is only available with PalmOS 5 or greater – the option will be grayed-out otherwise.
Insert 128K expansion card in port 1: Checking or unchecking this option controls the insertion or removal of a virtual 128K expansion card in port 1 of the emulator. If the 48SX is not the active target, the emulator will simply remember the setting and load or not load the PORT1 file when the 48SX is made active again. If the 48SX is currently the active target, this operation will be denied unless the calculator is in a powered-off state.
Once the calculator is off, the card can be inserted or removed at will. Inserting the card by checking the option will cause the emulator to allocate an additional 256KB of internal memory for the PORT1 image and look for a PORT1 file to load it with. If it doesn’t find one an alert box will be presented and the calculator will create a blank file.
Removing the card causes the emulator to deallocate the PORT1 internal memory, but DOES NOT delete the PORT1 file, so the user can go back to it if desired simply by reinserting the card.
Note: This card is not shared with the card for the 48GX. The emulator maintains to separate PORT1 cards.
Active: If the 48SX is not the active target,
checking this option will make it active once the user presses OK.
Cancel: Pressing this button exits the preferences screen without accepting any of the changes.
OK: Pressing this button exits the preferences screen and activates all changes.
These options apply only to the 48SX target.
Use background image file for LCD screen background: Selecting
this option will enable the user to display a custom background image for the
virtual LCD display instead of a single color backdrop. See the section titled
“Virtual LCD Background Image” for more information. NOTE: This option is
only available with PalmOS 5 or greater – the option will be grayed-out
otherwise.
Animate pixel color cycling: Checking this option will cause the color of the pixels in the virtual LCD display to slowly change colors in a cyclic pattern. The background will stay the same color. NOTE: This option is only available with PalmOS 5 or greater – the option will be grayed-out otherwise.
Active: If the 49G is not the active target, checking
this option will make it active once the user presses OK.
Cancel: Pressing this button exits the preferences screen without accepting any of the changes.
OK: Pressing this button exits the preferences screen and activates all changes.
Power48 has the ability to load HP48 object files directly onto the stack at level 1, and conversely to save objects at stack level 1 into binary object files. Object files are loaded from or stored to the object file directory on the external storage device. The object file directory is:
/PALM/PROGRAMS/Power48/Objects/
This directory should have been created during the installation procedure. If not, attempting to load or save objects will not work until the directory is created. Note that the emulator does no support nested directories within the object file directory.
The object loading and saving screen is accessed by pressing the object load/save button (the white two-headed arrow.)
Pressing the object load / save button brings up the object loading screen. The object saving screen can be accessed simply by pressing the “save” tab. It takes a moment for the object loading screen to come up fully as it is enumerating the object file directory and getting information on all files stored in that directory.
To load an object file simply click on the file name and press OK. Use the arrow buttons to scroll up and down the list. The Avail stack mem window shows the amount of HP48 stack space available for loading the object. The object file size cannot exceed this amount. If the emulator is able to detect that the object file contains a binary object, the object will be loaded as such. Otherwise the object file is loaded as a string.
Warning: loading an object file while the calculator is
busy is a good way to corrupt the calculator image. Only load objects when the
calculator is in an idle state.
Pressing the “Save” tab brings up the object saving screen.
The object at stack level 1 can be saved via this screen. Simply input the file name and press “OK” and the level 1 object will be encoded and saved in the object file directory.
The Stack object descriptions give a brief indication of the type of object currently at the first four stack levels of the current target.
Note that to save time the emulator will provide the basic names Object0.p48 through Object99.p48 automatically in the entry box as a shortcut. It will always suggest the next available from 0 (i.e. if Object0.p48 exists already, it will suggest Object1.p48, and so on up to 99.) These names are just suggestions; the name can be anything and doesn’t have to follow any specific convention.
Pressing the “Color” button in the general tab of the preferences screen will exit the preferences screen and bring up the following color selection screen that will allow the user to pick custom colors for the pixels and background of the virtual LCD display for the currently active target.
Users change the color of the background and/or the pixels by tapping with the stylus in the red, green and blue color bar areas to adjust the relative amount of each respective color. The color bars will adjust themselves to the position of the stylus, and the user will receive immediate feedback as the virtual LCD display is updated to match the color specified by the color bars. The colors can be changed for each individual target.
Note: If the “animate pixel color cycling” is checked for the active target, changing the pixel color will have no effect. Also, if the user is displaying a custom background image on the virtual LCD screen, changing the background color will have no effect.
Cancel: Pressing this button exits the color selection screen without accepting any of the changes.
Default: Pressing this button causes the colors for the active target to be set back to their default settings.
OK: Pressing this button exits the color selection screen and activates the color changes.
Note: This feature is only available on PalmOS 5 or
greater devices.
The user may desire to have a custom background image for each individual target rather than the static single color background. Power48 has the ability to load and display a 24-bit Windows formatted bitmap as the background in place of the background color. Individual backgrounds can be displayed for each target, as well as for each of the two screen zoom levels.
The image files must be stored on the VFS device (memory stick, SD card, etc…) at the following location:
/PALM/PROGRAMS/Power48
The files must be uncompressed 24-bit Windows formatted bitmaps, with resolutions of 262 x 142 for the large LCD display size, and 148 x 64 for the small LCD display size. The files must have the following names for each respective target and display size:
HP48SXBackImage2x2.bmp
HP48SXBackImage1x1.bmp
HP48GXBackImage2x2.bmp
HP48GXBackImage1x1.bmp
HP49GBackImage2x2.bmp
HP49GBackImage1x1.bmp
Any deviation from the above requirements will cause the
background image not to be displayed. In those instances, a simple, default
tiled background image will be displayed.
Large
LCD display background image example:
Small
LCD display background example:
The ON-hold key, located immediately to the right of the ON
button, acts as a chording start and stop key. Pressing it the first time
automatically holds down the ON key. The user can then press up to four
subsequent keys which will all be held down together. Pressing the ON-hold
button the second time releases all the held keys. This is the method whereby
the user can generate ON-C and
Power48 includes supports for alphanumeric entry via the PalmOS Graffiti area and via an external keyboard. Additionally, those keyboard keys that are logically equivalent to certain calculator buttons, like the ‘+’ and ‘-‘ keys, are mapped to the equivalent calculator button.
There is no need to press the ‘alpha’ key to enter alphabetic characters via keyboard or graffiti. The emulator takes care of this automatically.
Power48 supports limited use of the Sony Jog Dial. Jog Dial actions are mapped as follows:
Jog Dial Up = HP48 UP Arrow
Jog Dial Down = HP48 Down Arrow
Jog Dial Push = HP48 ENTER
Jog Dial Back = Toggle LCD in
Hi-Res mode
Q1: Do you currently support, or have plans to support other devices?
A1: The reason Power48 supports only Sony Cliés is that at the moment they are the only ones that have the necessary processing power, high-resolution screens, and high-resolution API’s. As of this writing no other Palm device has all of these three items. There doesn’t seem to be any reasonable way to provide an HP48 button interface on a screen with 160x160 resolution. You, however, are certainly welcome to try! If you can come up with a way to do it that doesn’t involve massive scrolling, then perhaps Power48 can be updated for this class of device.
Q2: Do you plan to support OS 5?
A2: And how, baby! The core of Power48 is a major candidate for conversion to ARM native code, and when that happens the speed of Power48 should easily exceed the real thing. Since OS5 includes a native high-resolution API, it satisfies my conditions from Q1 above.
Q3: My PDA shows enough memory left to run Power48, but it still complains about not enough memory and starts up in dry-run mode – what’s the deal?
A3: In most cases Power48 has to allocate memory for running Power48 out of the internal memory area normally utilized for storing programs. This area can get fragmented in the course of normal usage. To solve this problem, simply press the reset button on the back of the unit. This will cause the unit to perform a compaction of the program memory area and should solve the problem.
The documentation included with Power48 is concerned solely with the operation of the emulator itself. For information on the use of HP calculators and the RPM entry method, please consult the HP calculator user guides available at the following links (at the time of this writing):
HP48 User Guide:
English: http://www.owlnet.rice.edu/~rechlin/hpcalc/hp48gug.zip
Spanish: http://www.hp.com/cposupport/manindex/hp48gcalcu20676_sp_man.html
Portuguese: http://www.hp.com/cposupport/manindex/hp48gcalcu20676_pr_man.html
HP49 User Guide:
English: http://www.hp.com/cposupport/manindex/hp49ggraph24252_eng_man.html
Spanish: http://www.hp.com/cposupport/manindex/hp49ggraph24252_sp_man.html
Portuguese: http://www.hp.com/cposupport/manindex/hp49ggraph24252_pr_man.html
HP calculator software and other information:
The following websites contain large amounts of information and software for HP calculators:
For all Power48 support issues...
email: support@power48.mobilevoodoo.com
website: http://power48.mobilevoodoo.com/
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free Software Foundation,
Inc.,
In the credit where credit is due department…
v All original Power48 code and graphic layout by: Robert Hildinger
v Emu48 code originally programmed by: Sebastien Carlier
v Emu48 code maintained and updated by: Christoph Gießelink
v 48SX graphic representation based on work of: Jeff Breadner
v 48GX graphic representation based on work of: Jeffery L. McMahan
v 49G graphic representation based on work of: Eric Rechlin
HP48/49 ROM images are the property of and copyrighted by
Hewlett-Packard.