Installation procedure for HP-41X MicroCode Emulator:

I am not responsible for anything you do with this software. The emulators are not designed to make any (software or hardware) damage but (due to the complexity of the code) if something goes wrong I am not responsible for that.

Again: Use this software at your (and only your) own risk!

Important notice: Features described below refer only to the full version - they could be missing from demo version. The HP-49G version of the emulator was tested on operating system revisions #1.19-5 and #1.19-6 but it will (probably) run fine on older revisions.

It is assumed that a potential user of such software already knows how to transfer files from computer to calculator so this won't be explained here.

In the following sections I will refer any covered port by Port2 for simplicity. In all cases it is up to you to ensure that you have enough free memory in the calculator for the installation procedure to complete succesfully. Needless to say, RAM cards must not be write protected for the emulator to be installed properly.

The emulator works OK on the regular HP-48/49 system but it is not guaranteed to work on the system loaded with take-over libraries e.g. libraries which have tendency to take control over the calculator.

Warning: Before installing a new version, you should delete XM41 variable or clear the whole port memory with CLPM from HP41Z. Otherwise the emulator would freeze. This is because some things regarding port memory management have been changed in the new version.

HP-48GX installation:

The emulator can be executed from Port1 or from a covered port (2..33). In order to use the emulator, you must have at least one 128K (writeable) RAM card in Port1. Before installation, make shure that Port0 and Port1 are empty. If needed, initialize them with PINIT and clear everything from them. Then, use MERGE1 to merge Port1 with the main memory. This is necessary because the size of some librares is nearly 128K. If you want to use HP41Z library (and have second >=128K RAM card) then it must be received from the computer now. Store it to some covered port because there isn't much sense of storing it to Port1 (covered port must be empty, of course). Press ON+C to reboot the calculator. If you don't want to use it or you doesn't have any (free) covered ports then simply skip previous three steps. After doing this, receive the HP41X library from the computer. If you want to install the emulator to Port1 then execute the following instructions: 0 STO { :0: 1052 } FREE1. If you want to install it to a covered port then simply store it to that port (port must be empty before storing) with something like 2 STO and free Port1 with {} FREE1. It is very important to free Port1 because emulator will not start if Port1 remains merged ('Port Not Available' error will be generated). Press ON+C to (automatically) attach the HP41X library to the HOME directory and the emulator is ready to be started with XQ41 library command.

Warning: Don't store the emulator to the Port1 and covered port at the same time because it will crash!

It is very important to free Port1 on HP-48GX because emulator will not start if Port1 remains merged ('Port Not Available' error will be generated).

HP-41X was tested with Meta Kernel in Port1 and it worked just fine.

Extremly important: Due to the very serious bug on HP-48GX ROM versions L and M, Port 1 could be corrupted after storing an object to Port >1. To avoid this, store everything what had to be stored to Port >1 first. If you got 'Invalid Card Data' warning after ON+C you have to execute PINIT. After this, you can store the remaining object(s) to Port 1.

HP-49G installation:

The emulator can be executed from Port1 only (ERAM) because there is no way to map the bank from Port2 (FLASH) to the address #00000 (this is needed in order to install emulators own interrupt system). Before installation, Port1 must be empty. If needed, initialize it with PINIT and clear everything from it. First, you have to transfer the file called HP41X from the computer to the calculator and store it to the Port1 with 1 STO. Press ON+C to perform a warm start and the HP41X library will be automatically attached to the HOME directory. Next, the optional HP41Z library had to be transferred to the calculator (only if you want to load modules from the external library). There are two versions of the library: HP41Z1 which must be stored to Port1 and HP41Z2 which must be stored to Port2. Which one do you want to transfer is up to you. One more ON+C and the emulator is ready to be started with XQ41 library command.

Keyboard mapping for HP-48GX and HP-49G:
(one HP-41C key can be assigned to more-than-one HP-48/49 keys)

 HP-41C

 HP-48GX

 HP-49G

 ON

 ON

 ON

 OFF

 MTH

 HIST

 USER

 CST

 MODE

 PRGM

 PRG

 APPS

 ALPHA

 Alpha

 ALPHA

 Sigma+

 A, Y^X

 F1 (A), Y^X

 1/X

 B, 1/X

 F2 (B), 1/X

 SQRT

 C, SQRT

 F3 (C), SQRT

 LOG

 D

 F4 (D), EQW

 LN

 E

 F5 (E), SYMB

 X<>Y

 F, LeftArrow

 F6 (F), LeftArrow

 RDN

 DownArrow

 DownArrow

 SIN

 SIN

 SIN

 COS

 COS

 COS

 TAN

 TAN

 TAN

 SHIFT

 LeftShift, RightShift, UpArrow 

 LeftShift, RightShift, UpArrow 

 XEQ

 '

 CAT, TOOL

 STO

 STO

 STO

 RCL

 EVAL, VAR

 VAR

 SST

 NXT, RightArrow

 NXT, RightArrow

 ENTER^

 ENTER

 ENTER, X

 CHS

 +/-

 +/-

 EEX

 EEX

 EEX

 <−

 DEL, <−

 <−

 +

 +

 +

 -

 -

 -

 *

 *

 *

 /

 /

 /

 0

 0

 0

 1

 1

 1

 2

 2

 2

 3

 3

 3

 4

 4

 4

 5

 5

 5

 6

 6

 6

 7

 7

 7

 8

 8

 8

 9

 9

 9

 .

 .

 .

 R/S

 SPC

 SPC

Other keys used by the emulator:
(mostly ON&key combinations)

<−: MEMORY LOST (if pressed immediately after ON).

ON: Suspends the execution of the emulator until released.

ON&A: Turn Enhanced Alpha Mode On.
ON&B: Turn Enhanced Alpha Mode Off.
ON&Alpha: Activate Temporary Alpha Mode.
ON&O: Toggle CCD ROM lowercase mode.

ON&C: Break the execution and restart (reset) the emulator.
ON&D: Restart (reset) the emulator with different display font.

ON&F: Return to the HP-48/49 operating system.
ON&RightShift: Turn off the emulator immediately.
ON&<−: Warm start (GOVLNG #00000).
ON&T: Activate MEMORY LOST protection.
ON&U: Deactivate MEMORY LOST protection.

ON&S: Activate deep-sleep mode.
ON&H: Activate hibernation mode.
ON&G: Turn goose movement off/on in order to increase execution speed.
ON&L: Activate card loading (outside PRGM) or saving (inside PRGM).

ON&*: Load and activate Time Module (page 5).
ON&/: Load and activate XF/XM Module (page 5).

Loading/activating Time and XF/XM modules isn't possible if the card containing the emulator is write-protected.

ON&+ and ON&-: Change display contrast.

ON&0: Activate printing to LCD only.
ON&1: Printer mode MAN.
ON&2: Printer mode NORM.
ON&3: Printer mode TRACE.
ON&4: Activate PRINTing via IR LED (RedEye) mode.
ON&5: Activate PRINTing via IR serial mode (baud rate default to 2400).
ON&6: Activate PRINTing via RS-232 (Wire) serial mode (baud rate default to 9600).
ON&.: Printer ADV button.
ON&SPC: Turn printer ON/OFF.

Note: ON&4 and ON&5 act as ON&6 on HP-49G.

ON&6 must be used when printing directly to HP-82143A Helios Thermal Printer Emulator.

ON&LeftArrow: Scroll the display one column to the left.
ON&RightArrow: Scroll the display one column to the right.

ON&7: Activate searching of low modules (3..7).
ON&8: Activate searching of high modules (8..15).
ON&9: Activate searching of all modules (3..15).

Enhanced Alpha Mode:

In the Enhanced Alpha Mode keys A..Z of the emulator correspond to keys A..Z of the standard calculator Alpha keyboard. This makes character input very simple and fast, especially for sequences like XEQ ALPHA something ALPHA. Other keys (0..9,.,+,-,*,/,R/S) are unchanged (it means also that you enter numbers with SHIFT like on the real one).

The following special keys have different mapping in Enhanced Alpha Mode:

 HP-41C

 HP-48GX

 HP-49G

 USER

 DEL

 LeftArrow

 PRGM

 n/a

 DownArrow

Similar to Enhanced Alpha Mode is Automatic Temporary Alpha Mode. This mode is very helpful when keying instructions like RCL Y, STO Z, etc. because keys act like the emulator is in the Alpha mode even if it is outside the Alpha mode. Temporary Alpha Mode can also be activated by ON&Alpha combination and, in this case, it is active for the next keystroke only.

Memory loading and saving:

The whole memory is automatically loaded from the XM41 variable. If it doesn't exist in the current path then it will be created in the current directory. XM41 can be sent between calculators in order to exchange data, programs and modules. The size of XM41 is around 100K which leaves about 25K of free memory on HP-48GX for other purposes. But, when you don't need the emulator you can simply store this variable to a free port and delete it from memory.

Card loading and saving:

Card loading can be activated by ON&L key combination while the emulator is outside PRGM mode. Before starting the emulator, the card file must be placed on the calculator stack. Card saving can be activated by ON&L key combination while the emulator is inside PRGM mode. All cards will be placed on the stack automatically (in the form of a single character string object). Of course, card loading and saving can be activated by the dedicated instruction like WALL, WSTS, RDTA, ... Cards can be sent between calculators in order to exchange data and programs. They can be stored to a port for backup purposes, too.

External modules loading:

The HP41Z library contains few modules which can be dynamically loaded into the emulator memory. The procedure for loading a module is as follows: enter the number of the page (8..15) in which you want to load the module and execute the appropriate module command from the library. For example, if you want to load PPC ROM to pages 12 and 13, you simply type 12 PPC. After restarting the emulator, the module will be visible with CAT 2 and can be used just like built-in ones. There is also an ability to load modules which aren't part of the library. First, the module must be placed on the stack. Second, page number must be entered followed with LDRM. The format of such modules will be sent at a request. Some modules can be loaded to fixed pages only (Advantage to pages 12 and 13, Card Reader to page 14). Double-page modules cannot be loaded to page 15. If you want to remove the module from the memory you have to enter the page number and execute CLRM. In the case of double-page modules like PPC ROM you have to execute CLRM manually for both pages.

Few other commands dealing with the XM41 variable are present in the HP41Z library:

CLAM: Clear all (both main and extended) memory.
CLXM: Clear the extended memory.
CLMM: Clear the main memory (not included into HP41Z2).
CLPM: Clear the whole port memory (not included into HP41Z2).

Of course, you have to exit the emulator before doing all this.

Known bugs/issues:

(*) Cold start with ON&F after hibernation mode on HP-48GX.
(*) HP41X library cannot be DETACHed and PURGEd on HP-48GX.

I am not sure if these bugs are caused by a faulty RAM card or by HP-48GX. More tests have to be done. No problems with HP-49G.

Tips and tricks:

(*) Activate ALPHA mode, execute CLA, press SHIFT K (APPEND) and enter few characters ... this is, in fact, a bug - but interesting (and perhaps useful) one.

(*) Set an HP-48/49 alarm, start HP-41X and turn it OFF: when the alarm comes due it will wake up the emulator (if you set flag 11, the HP-41C program will be executed automatically). You can acknowledge the alarm after exiting to the operating system with ON&F. This trick doesn't work in the hibernation mode (because it isn't needed in this mode) and cannot be used with demo version.