Post Reply 
How to make a custom HP-41 rom for the rest of us
08-04-2016, 08:10 PM
Post: #9
RE: How to make a custom HP-41 rom for the rest of us
(08-04-2016 11:36 AM)Gene Wrote:  What makes the card reader functions harder ? Total ignorance here. :-)

I'm sure most of us would have a list of dream rom functionality and they would all be different. I totally understand that.

I am curious how it could be done by an average Joe. Perhaps the next time someone makes a rom they video themselves doing it? :-)

The card reader has calls inside that rely on being in page E. Ordinary modules are written to execute from any page. The long call/goto mechanism is different. It means you need to rearrange more and understand what is happening in the code at a deeper level than otherwise. You need to translate the code to be page independent. I do not know if this problem applies to the functions you list, perhaps not as they should be rather free-standing.

Piecing together your own module is easiest to do on a computer using some kind of tools. Here is just an idea of a process (using tools that contain an assembler among other things):
  1. Get your RPN programs as .raw files, either by transfer from the HP41 (somehow), or use a tool to extract then from suitable modules.
  2. For the MCODE parts you need to either disassemble the ROM to transform it to source code, or work on the binary image. I prefer the source code route as it is more flexible and can handle arbitrary complex scenarios. (For small hacks, working at the binary level might do.)
  3. With the source code (of the whole module), take a function at a time. They can be located from the FAT. Look at how it is implemented, what calls does it makes. Then use a text editor to lift the relevant code out and put these is in your own module source file (or files).
  4. Repeat 3 until done.
  5. Clean up your own module source, fix dependencies (RPN function calling other functions in the ROM), add suitable headers, FAT and the (probably empty) poll vectors and identification at the end.
  6. The tool I use need a couple of small support files to tie it all together. Then let the tools chew on it and out comes a module image. Test it and go back to fix any issues.

You need some understanding of MCODE to do step 3 and be able to use a text editor. You need to understand the module layout, XROM entries and the tools you are using to do step 5 and 6.

This is for a rather plain module. If you want to play with MCODE tricks, you need to work more as well as understand MCODE at a deeper level.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to make a custom HP-41 rom for the rest of us - hth - 08-04-2016 08:10 PM



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