conversion .mod file to RAW

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

conversion .mod file to RAW

Post by Ancient Sailor » Thu Feb 15, 2018 7:35 pm

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
Old HP Gear; HP-11, HP-15 , HP-41CX, HP-48GX and HP-50G, HP-Prime.

rprosperi
Posts: 379
Joined: Mon Apr 24, 2017 5:48 pm
Location: New York

Re: conversion .mod file to RAW

Post by rprosperi » Thu Feb 15, 2018 8:56 pm

Ancient Sailor wrote:
Thu Feb 15, 2018 7: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

Thomas Okken
Posts: 492
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken » Fri Feb 16, 2018 2:06 am

Ancient Sailor wrote:
Thu Feb 15, 2018 7: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: 379
Joined: Mon Apr 24, 2017 5:48 pm
Location: New York

Re: conversion .mod file to RAW

Post by rprosperi » Fri Feb 16, 2018 3:01 pm

Thomas Okken wrote:
Fri Feb 16, 2018 2: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

Thomas Okken
Posts: 492
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken » Fri Feb 16, 2018 4:03 pm

rprosperi wrote:
Fri Feb 16, 2018 3: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: 379
Joined: Mon Apr 24, 2017 5:48 pm
Location: New York

Re: conversion .mod file to RAW

Post by rprosperi » Sat Feb 17, 2018 12:15 am

Thomas Okken wrote:
Fri Feb 16, 2018 4: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

Thomas Okken
Posts: 492
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken » Sat Feb 17, 2018 5:24 pm

rprosperi wrote:
Sat Feb 17, 2018 12: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: 143
Joined: Thu May 04, 2017 10:20 am
Location: France

Re: conversion .mod file to RAW

Post by dlachieze » Sat Feb 17, 2018 8:25 pm

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 SN: 00425

Thomas Okken
Posts: 492
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: conversion .mod file to RAW

Post by Thomas Okken » Sat Feb 17, 2018 9:58 pm

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: 712
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: conversion .mod file to RAW

Post by grsbanks » Sat Feb 17, 2018 10:10 pm

And if so that's my responsibility.

Can you point me to the .raw file in question and I'll investigate.
Not SwissMicros staff, just an enthusiast.

Post Reply