I don't need a tool to do that. |
No comment.
I guess you have a problem of terminology. |
I know, it is confusing. When talking about emulators/simulations it is essential to discern the two levels, the real machine vs the virtual. Again, the devices offered by SwissMicros are ARM machines that run a program which simulates (or may be even emulates) the CPU once used by HP for the HP-41C (also -CV and -CX) and "Voyager" series (HP-10C, -11C, -12C, -15C, and -16C). This virtual CPU executes the original firmware from HP. Within the original calculators this firmware is stored in ROMs (physical devices). In the emulated/simulated/virtual case, the content of those ROMs is saved in files or data structures. To avoid the lengthy term "saved ROM content" I say "ROM" for it, what may be confusing short.
A .obj file is not a ROM, it's an object file; the result of compiling a single source file. |
Correct, regarding ROM as a physical device. The .obj file contains the data to build the ROMs, or in this case, the data copied from the existent ROMs. Sorry if I used the term 'ROM' for both, the .obj file and its content.
These .hex files don't contain ROMs, they are the ROMs. |
Wrong. Two times wrong (Ok, 1.5 times only):
i) as just said before, ROMs are physical devices, in contrast a .hex file is a file containing data for the loader to put part of the content to a flash-ROM. This is the program for the ARM machine. For details please follow the helpful link from Grey Wolf:
http://www.cplusplus.com/forum/general/252083/#msg1109768
ii) the CPU-simulation (running on the ARM machine) comes with the original firmware of the emulated/simulated pocket calculator. With the a. m. abbreviation 'ROM' for 'copy of the ROM content', the loader file contains two ROMs, one for the ARM platform and one for the virtual CPU it builds. (I assume, confusion is now complete.)
What is 074E7038EE and A116084041? What are these numbers supposed to be, and where did you get them from? |
Short: see your top 2.
Long: Have a look at the 12c.obj you find in here:
https://www.hpcalc.org/details/2813 and here:
https://www.hpcalc.org/details/2814 After some comments it shows the ROM (a copy of the data ... you know it):
0000:107
0001:04e
0002:270
0003:238
0004:2ee
0005:14f
0006:1e5
0007:000
0008:04e
0009:2e0
000a:06e
000b:014
000c:06b
000d:0a9
000e:000
000f:13b
0010:118
0011:060
0012:0ec
0013:111
...
The first four colums contain the address, the fifth a colon. These are not part of the original ROM, only column 6..8: this are the 10-bit words making up the firmware of the original HP-12C. Now look at the pattern in top 2, I write it here with the first four words (hex value in brackets):
01 0000 0111 (107)
00 0100 1110 (04e)
10 0111 0000 (270)
10 0011 1000 (238)
Re-arranged according the pattern, first part (LSB): 0000 0111 01000 1110 0111 0000 0011 1000 (074E7038...), second part (bits 8 and 9): 1010 0001 ... (A1...). Without colours for emphasizing I assumed to denote the single parts with letters would make it clearer.
Why 6144 bytes later? That seems rather arbitrary. |
The last line in 12c.obj is tagged with address 17FF, so there are 6144 words in this ROM.
3. It sounds like you're only trying to extract the .obj files from the ROM without trying to understand the ROM's structure. |
That is correct, if you mean with "ROM" the one of the ARM platform. No, I did not try to analyse the ARM code, I once attempted to dig into it, but gave up.
4. You say there are several methods to encode 10-bit bytes into 8-bit bytes. Did you try reading the ROM using any of those other methods? |
Yes, with no success.
[...] or they might even have changed to using 8-bit bytes. |
No, this would also require another CPU.
As said in the OP, I am looking for C++ tools to analyse such files tel quel. The deductive way would be disassembling the ARM code.