conversion .mod file to RAW

General discussion about calculators, SwissMicros or otherwise
Ancient Sailor
Posts: 7
Joined: Thu Feb 15, 2018 8:27 pm
Location: Enkhuizen, The Netherlands

conversion .mod file to RAW

Post by Ancient Sailor »

Hi all,

This week arrived my new DM 42
Its my second calculator from Swiss Micro.
The first calcualtor that i orderd was the DM15, now to day this is my daily use calculator.
The DM 42 is the replacement for my old HP 41 CX . This calculator have a heavy life at sea, and have some issues due to capilar corrosion,
I identified (as listed on the SMicro website) the Free42 manual and the HP42s manuals and I am reading that the HP42s is the successor of the HP41CX.

Background :
I never used a HP42s before .
Alway’s use the HP 41 CX and the 48GX calculator for navigation and celestical calculation at sea .
Software the HP Navigation navigation module (XRom 14) and the HP48GX with the Sparcom Celestial pack.

My question is it possible to to translate the HP navigation rom into a RAW file what the DM42 can read.
I have a Xrom 14 dump in a .mod file

Thanks in advance.

Sincerely,
Rupert van Swol
Enkhuizen, The Netherlands
DM42 SN:00449, DM15L SN #01134, DM41X sn#1008
Old HP Gear; HP-15 , HP-41CX, HP-48GX ,HP-50G, HP-Prime.
rprosperi
Posts: 1698
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: conversion .mod file to RAW

Post by rprosperi »

Ancient Sailor wrote:
Thu Feb 15, 2018 8:35 pm
My question is it possible to to translate the HP navigation rom into a RAW file what the DM42 can read.
I have a Xrom 14 dump in a .mod file
You cannot move an HP-41 .mod file to the DM42, they are not compatible.

Looking at the CAT 2 listing of the ROM in the Synthetic QRG, it appears that all programs in this ROM are FOCAL and not MCODE (machine language), so you should be able to port this by simply entering the programs into the DM42. Note that this is an 8K ROM, which means there is a LOT of code to enter, unless you only use a few of the programs. From the CAT 2 list, many of the ROM functions have names that begin with an asterisk, which are often subroutines, so you may have to copy some of these as well as the main programs you run by name.

To see the code, you will have to copy the ROM programs to 41 RAM, see p. 8 in the ROM manual.

The HP-42S includes some commands that could be more efficient than some in the 41C, but the DM42 is MUCH faster than the -41 or -42, so you can easily just port the programs written as-is. That said, you could find some code that does not work, because the ROM programs may have been written making assumptions about the accuracy of the -41, whereas the DM-42 is far more accurate. As you proceed with entering the programs, ask questions about things that seem to not be working properly.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken »

Ancient Sailor wrote:
Thu Feb 15, 2018 8:35 pm
My question is it possible to to translate the HP navigation rom into a RAW file what the DM42 can read.
Waarschijnlijk wel. Kijk eens naar het programma rom2raw op mijn website.
Mocht je er niet uitkomen, stuur me dan een mailtje.
rprosperi
Posts: 1698
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: conversion .mod file to RAW

Post by rprosperi »

Thomas Okken wrote:
Fri Feb 16, 2018 3:06 am
Waarschijnlijk wel. Kijk eens naar het programma rom2raw op mijn website.
Mocht je er niet uitkomen, stuur me dan een mailtje.
Well I'll be damned... and stand corrected!

@Thomas - Must have felt good to have this answer when someone asked for something so exactly made for that purpose.

What does rom2raw do with MCODE routines it encounters?

Sorry for the bad advice Rupert, though it appears this tool has been around for nearly a year, I had totally forgotten about it.

Please do comment on how this works, it should be interesting.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken »

rprosperi wrote:
Fri Feb 16, 2018 4:01 pm
What does rom2raw do with MCODE routines it encounters?
It prints a warning. It also warns about things that it *can* translate but which won't work on the HP-42S, that is, synthetic instructions and non-42S XROMs.

I wrote an announcement on the MoHPC forum way back when, but the only thorough documentation is the code itself.
rprosperi
Posts: 1698
Joined: Mon Apr 24, 2017 7:48 pm
Location: New York

Re: conversion .mod file to RAW

Post by rprosperi »

Thomas Okken wrote:
Fri Feb 16, 2018 5:03 pm
It prints a warning. It also warns about things that it *can* translate but which won't work on the HP-42S, that is, synthetic instructions and non-42S XROMs.

I wrote an announcement on the MoHPC forum way back when, but the only thorough documentation is the code itself.
Yes, the code was useful to understand command-line usage, arguments, etc. but I am not good enough at reading lots of C code to understand processing the content.

This should prove quite handy for folks that are dependent on 41 ROMs wanting to migrate to the DM42. I'm truly sorry I forgot about it and gave poor advice in this area.

As a reminder to the community of the value of this tool, maybe it would be helpful to add a post on MoHPC that walks through the entire process of installing and using this tool to convert a ROM image, use SM's web-tool to convert the .raw file to text to examine and verify the content, then download the .raw file (or portions thereof) to a DM42.
--bob p

DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken »

rprosperi wrote:
Sat Feb 17, 2018 1:15 am
As a reminder to the community of the value of this tool, maybe it would be helpful to add a post on MoHPC that walks through the entire process of installing and using this tool to convert a ROM image, [...]
There's not much to explain about running rom2raw. There are only a few command-line options. Here's the built-in help message:

Code: Select all

Usage: rom2raw [-o outputfile] [-s] [-l] [-h] inputfiles...
    All input files are concatenated and treated as a single ROM image,
     to facilitate working with multi-page ROMs. To process multiple ROMs,
     you must run rom2raw once for each ROM.
    If the -o option is omitted, the ROM name from the image will be used.
    The -s option disables HP-41 => HP-42S character code translation.
    The -l option turns on user code listings, to help you find problematic
     XROMs and synthetic instructions.
    The -h option shows this message.
But I agree that an end-to-end walkthrough would be nice to have. It should also mention using Warren Furlow's MODFile program, from hp41.org, to extract ROM images from MOD files.
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: conversion .mod file to RAW

Post by dlachieze »

I tried the rom2raw utility with Navigation Pac 1B. I didn't used the MOD conversion utility as I started directly from the ROM files provided with the Clonix-41 utility software.
I noticed that the raw file generated by rom2raw cannot be imported correctly in the DM42 online encoder/decoder. However I was able to import it in Free42, export all programs to a new raw file that was correctly recognized by the DM42 encoder/decoder.
DM42: 00425 - DM41X: β00066 - WP43: 00042
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken »

Which lines did the DM42 decoder not like? I only took a quick glance at the listing and the only thing I noticed that might be problematic were a few numbers that start with a period -- Free42 accepts those, but, like the real 42S, it always displays such numbers with a zero before the decimal. Could be the DM42 decoder doesn't handle that.
grsbanks
Posts: 1122
Joined: Tue Apr 25, 2017 11:23 am
Location: Preston, Lancs, UK
Contact:

Re: conversion .mod file to RAW

Post by grsbanks »

And if so that's my responsibility.

Can you point me to the .raw file in question and I'll investigate.
There are only 10 kinds of people in the world: those who understand binary and those who do not.
Post Reply