The Museum of HP Calculators

HP Forum Archive 15

[ Return to Index | Top of Index ]

HP-41 ROM image to HP-42S "raw" converter
Message #1 Posted by Thomas Okken on 8 Feb 2006, 3:50 p.m.

I wrote a little program that reads HP-41 ROM images, extracts the user code from them, and converts it to *.raw files you can import into Free42 or Emu42 (or HP-42X, I expect, or even into any HP-41 emulator).
It converts XROMs that point to user code within the same ROM to corresponding XEQ commands; it converts strings from HP-41 to 42S encoding; it emits warnings about XROMs that point to machine code functions, and about XROMs that are not local to the ROM in question and do not match HP-42S instructions either; and finally, it warns when it finds any synthetic code (most of which won't work on the 42S, at least not the really neat stuff).
The ROM image must be in *.ROM format, meaning: each 10-bit word is encoded by a byte which has bits 9-8 in its bits 1-0, followed by a byte containing bits 7-0. A normal 4k-word ROM thus comes in an 8kbyte file. If you have only *.MOD format images, Warren Furlow has a program called MODFile on his site (TOS) that extracts the *.ROM files from a *.MOD file.
It's called rom2raw and you can download it from my web site. The download is a zip file that includes the source code and a Windows console executable. Enjoy!

- Thomas

Edited: 8 Feb 2006, 5:04 p.m.

      
Re: HP-41 ROM image to HP-42S "raw" converter
Message #2 Posted by Thomas Okken on 9 Feb 2006, 2:19 p.m.,
in response to message #1 by Thomas Okken

I posted an updated version, which has an additional command-line option to generate annotated listings of the extracted user code. With those listings, you can easily locate the instructions that an HP-42S would have problems with (unimplemented XROMs, synthetic functions).

            
Re: HP-41 ROM image to HP-42S "raw" converter
Message #3 Posted by Howard Owen on 9 Feb 2006, 2:29 p.m.,
in response to message #2 by Thomas Okken

Thanks, Thomas!

Regards
Howard

            
Re: HP-41 ROM image to HP-42S "raw" converter
Message #4 Posted by Namir on 9 Feb 2006, 3:55 p.m.,
in response to message #2 by Thomas Okken

Good job man! I was able to import the .rw files baed on the Stat and Games ROM. Cool work!!!

Namir

            
Re: HP-41 ROM image to HP-42S "raw" converter
Message #5 Posted by Thomas Okken on 14 Feb 2006, 9:47 a.m.,
in response to message #2 by Thomas Okken

I posted yet another update -- the previous version didn't handle XROM xx,00 properly: it assumed that that entry was always just a dummy used for the ROM name, while in fact there are ROMs that have user code there. This version treats XROM xx,00 like all the others, and it is smarter about recognizing "dummy" entries (it looks for machine code entry points that point right at a Return instruction).


[ Return to Index | Top of Index ]

Go back to the main exhibit hall