Post Reply 
[HP4x] ROM Disassembly
03-13-2015, 05:36 AM (This post was last modified: 03-13-2015 02:54 PM by Han.)
Post: #21
RE: [HP4x] ROM Disassembly
Edit: I should have added that the control files are specific to ROM R)

Here's my current set of files for sadhp v1.061. The diff file is against the original v1.05 release. A few modifications have been made so that -X now forces SX mode (i.e. GX mode is by default). I've verified up to #40000h although there are still a few gaps here and there.

There are a still few things that I don't like about how sadhp currently handles entry points. I think we could do better with a modified symbols file. I would like to have a separate symbol file for RAM and IO entries (so that they don't clutter up the output or cause name collision when overlapping with covered ROM entries). Perhaps the RAM and IO entries could be identified with the '@' symbol. The label fields for these entries could be suppressed, and perhaps a series of equates could be generated instead. Likewise goes for constants.

The other thing I plan to modify is how the entries are sorted. In version 1.05, local names seem to have higher priority. The problem with this is that entries for libraries are not used. In 1.06 the tilde names are used with the ROMPTR2 token that is supported by Debug4x. I need to figure out a better hierarchy for the symbol sorting.

Download sadhp 1.061 (diff against 1.05)
.zip  sadhp1061.zip (Size: 80.2 KB / Downloads: 22)

Edit: If you're new to this and need a quick tutorial on patching via diff files, see this link on patching. You will need to download the original version 1.05 of sadhp from http://www.hpcalc.org

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-23-2015, 04:11 PM
Post: #22
RE: [HP4x] ROM Disassembly
Slight modifications to sadhp so that disassembling address #80000h and higher don't display RAM entries denoted by '@' in .symbols.gx

I managed to get up to around #60000h (still a number of chunks not completely named, but at least the formats file is correct). I made up a lot of names for entries and tried to stick with the same scheme as used in the HP48SX, though I am sure there are errors. Around #65000h you get into the equation writer, and I have not had much time to reverse engineer this area.

The rom2core program may need to be adjusted (nibble swapping) as some of the ROM files require nibble swapping while others do not.


.zip  sadhp1063.zip (Size: 84.62 KB / Downloads: 15)

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-23-2015, 08:03 PM
Post: #23
RE: [HP4x] ROM Disassembly
HP used to give copies of their original source code (with comments) for the HP 48, to 3rd party software developers who agreed not to disseminate it. For example, I have the commented source code for the S/SX (version E) and for the G/GX (version M), but have never given it to anybody without permission.

Has HP ever released these ancient documents to the public, or given permission for them to be disseminated? If not, they should, because there are lots of goodies in the comments (and in the commented-out sections of code).

Apologies in advance if this topic has already been discussed.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
03-23-2015, 09:10 PM
Post: #24
RE: [HP4x] ROM Disassembly
(03-23-2015 08:03 PM)Joe Horn Wrote:  HP used to give copies of their original source code (with comments) for the HP 48, to 3rd party software developers who agreed not to disseminate it. For example, I have the commented source code for the S/SX (version E) and for the G/GX (version M), but have never given it to anybody without permission.

Has HP ever released these ancient documents to the public, or given permission for them to be disseminated? If not, they should, because there are lots of goodies in the comments (and in the commented-out sections of code).

Apologies in advance if this topic has already been discussed.

Emphasis mine. I too hope they'll give permission to disseminate it. On the one hand, I have already learned quite a bit about the ROMs from my own reverse engineering. On the other hand, it would also save a lot of time for those of us who wish to rewrite some of the ROM. Given that rumors are spreading about the discontinuation of the HP50G, and pretty much all the calculators based off of the HP48 series will essentially fall into the "no longer in production" category, one would think they might eventually.

Then again... I did bring up the subject a while back (comp.sys.hp48 topic) and more recently (MoHPC topic). They don't seem to be allowing any new NDAs... so who knows.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
03-23-2015, 11:14 PM
Post: #25
RE: [HP4x] ROM Disassembly
(03-23-2015 08:03 PM)Joe Horn Wrote:  Has HP ever released these ancient documents to the public, or given permission for them to be disseminated? If not, they should, because there are lots of goodies in the comments (and in the commented-out sections of code).

Some wisdom which may apply here is: "It's better to ask forgiveness than seek permission". HP (correctly) won't grant permission to disseminate IP like this as doing so could be used (e.g. by a competitor or unhappy partner) to demonstrate that they do not rigorously protect their IP.

The trend for effectively "retired" products is to share it with a disclaimer that it's assumed to be OK, but said sharing will stop upon notification to do so by the owner of the IP.

That said, material released under NDA/CDA could have specific terms prohibiting such release, however such agreements almost always have built-in expiration dates and no doubt have long since become void.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 




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