Changing 41C XROM numbers
01-23-2016, 10:13 PM
Post: #1
 quantalume Member Posts: 101 Joined: Dec 2015
Changing 41C XROM numbers
Is there an easy way, on a PC, to change the XROM number of a ROM, so that two images with the same number can peacefully coexist on the calculator? The only way I know is to load the ROM into HEPAX memory and change it there. Is the ROM file format simple enough that one could change it on a PC with a HEX file editor? Thanks.

David Brunell
Houston, Texas
01-24-2016, 01:01 AM
Post: #2
 derekamos Junior Member Posts: 43 Joined: Jan 2015
RE: Changing 41C XROM numbers
Yes - on a PC you would need a copy of Meindert Kuipers MLDL2K.exe. This is like a PC debug program, but aimed specifically at the HP41 series, and ROM/MOD adjustments.

As long as you have a .ROM or .MOD file that can be loaded on the PC, then there is a host of control header features you could alter, including a roms name & number.

Doing this with a debug PC style program will not allow checksum recalculation, but this program will. It really is the way to go - as the program is excellent.
DA
01-24-2016, 03:40 AM (This post was last modified: 01-24-2016 03:41 AM by Sylvain Cote.)
Post: #3
 Sylvain Cote Senior Member Posts: 1,198 Joined: Dec 2013
RE: Changing 41C XROM numbers
The first 2 bytes of a 8KB ROM file format contains the XROM number, followed by the number of FAT entries, ...

Example:
Code:
XROM: 11 (0x000B) FAT.: 17 (0x0011) entries File: 00 0B 00 11 ...
01-24-2016, 03:43 AM
Post: #4
 quantalume Member Posts: 101 Joined: Dec 2015
RE: Changing 41C XROM numbers
(01-24-2016 01:01 AM)derekamos Wrote:  Yes - on a PC you would need a copy of Meindert Kuipers MLDL2K.exe. This is like a PC debug program, but aimed specifically at the HP41 series, and ROM/MOD adjustments.

As long as you have a .ROM or .MOD file that can be loaded on the PC, then there is a host of control header features you could alter, including a roms name & number.

Doing this with a debug PC style program will not allow checksum recalculation, but this program will. It really is the way to go - as the program is excellent.
DA

I've been using MLDL2K, but I'm at a loss to figure out how to modify the ROMS. I can load ROMs in the "ROM Handler" tab and list the header and FAT and even disassemble them. However, the text window that the information appears in seems like it's just a listing area, and no changes made there actually affect the ROM image. On the other hand, in the "MOD Handler" tab, I can edit all sorts of fields related to the MOD file header, but that doesn't really help me. What am I missing?

No matter though, as I found this information in the MLDL2K manual:
Quote:.ROM file: traditional ROM format, direct image of the ROM without packing. Every 10-bit word is stored in a 16-bit word.

With this in mind, I used a hex editor to open a ROM file, in this case ICEBOX1H.ROM. Here is what the beginning and end of the file looks like:
Code:
0000:0000 | 00 04 00 40  00 00 00 8D  00 05 00 BE  00 05 00 AF | ...@.......¾...¯ 0000:0010 | 00 05 00 43  00 0E 00 50  00 09 00 A4  00 0E 00 61 | ...C...P...¤...a ... 0000:1FF0 | 00 00 00 00  00 00 00 08  00 31 00 02  00 09 00 DB | .........1.....Û

And here is MLDL2K's decoded header:
Code:
------------------hex---dec----------------   XROM          : $004 004 # Functions :$040  064   ROM Name      : ICEBOX 1H   ...   Checksum      : \$0DB  CHECKSUM OK   NOPs Counted  : 202

So, all I did was change the second byte in the file from 04h to another, non-conflicting value. This messed up the checksum, but reloading it into MLDL2K showed me what the checksum should be. Then, I just updated the checksum in the file, which is the very last byte.

David Brunell
Houston, Texas
01-24-2016, 08:02 AM
Post: #5
 Ángel Martin Senior Member Posts: 1,070 Joined: Dec 2013
RE: Changing 41C XROM numbers
Guys, while the XROM id# change is necessary, it may not be sufficient. There may be a need for more changes in the actual code if it has calls to other functions by their XROM id# - those calls will also have to be changed. There could also be MCODE calls that use the function id#, like it's the case with the "function launchers" - so beware!
01-24-2016, 05:51 PM
Post: #6
 quantalume Member Posts: 101 Joined: Dec 2015
RE: Changing 41C XROM numbers
(01-24-2016 08:02 AM)Ángel Martin Wrote:  Guys, while the XROM id# change is necessary, it may not be sufficient. There may be a need for more changes in the actual code if it has calls to other functions by their XROM id# - those calls will also have to be changed. There could also be MCODE calls that use the function id#, like it's the case with the "function launchers" - so beware!

Good point! My original purpose was trying to get the CCD-OSX and JMB Math modules to play nice together. I just need a few FOCAL functions from JMB Math, so I will copy them to memory in the absence of CCD-OSX.

I don't know why HP didn't anticipate that we'd be trying to run 100 modules at once on the 41C 35+ years later...

David Brunell
Houston, Texas
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)