Post Reply 
Changing the XROM Number of a ROM
04-12-2024, 01:22 AM
Post: #1
Changing the XROM Number of a ROM
I am in the process of getting everything all setup for when my NoV-64D arrives and I have encountered a small problem.

Some of the ROMs that I have selected share XROM Numbers:

NOV CHAP and ZENROM both share XROM #5.
AMX_OX/X+ and HP-16C Emulator both share XROM #16.

I was able to find the source for the NOV CHAP ROM in .XLS for, once I figure out how to compile an XLS I will be able to change the XROM umber for that. I could also change the XROM number for the ZENROM if I could find the source and if I decided to put it in the NoV-64D flash space instead of the actual ZENROM that I am currently using.

I was unable to find the source for either the AMC_OS/X+ or HP-16C Emulator ROMS.

Does anyone know where I can find the source for those?

Does anyone have a utility that can change the XROM numbers of a binary or .ROM file without having to disassemble and reassemble it?

Thank you,

Mike
Find all posts by this user
Quote this message in a reply
04-12-2024, 05:20 AM (This post was last modified: 04-12-2024 05:22 AM by Sylvain Cote.)
Post: #2
RE: Changing the XROM Number of a ROM
The first 10-bit word of a ROM is the XROM value.
In the 16-bit ROM format each 10-bit instruction takes 16-bit.
So, in the ZENROM.ROM file, the first two bytes is in hex: 00 05
Directly change in the ROM file the 05 value to what you want.
The checksum value at the end of the ROM file will no longer be valid but the ROM will still works because the 41OS does not validate the checksum.
WARNING: changing the XROM value of a ROM image will render your programs in compiled mode (raw file) incompatible with the outside world.

Sylvain Côté
Find all posts by this user
Quote this message in a reply
04-12-2024, 05:31 AM
Post: #3
RE: Changing the XROM Number of a ROM
Sylvain,

Thank you.

Would any internal calls in the ROM to other functions within the ROM need to be changed?

Whether M-Code or Focal?

Thank you again,

Mike
Find all posts by this user
Quote this message in a reply
04-12-2024, 12:00 PM (This post was last modified: 04-12-2024 02:49 PM by Sylvain Cote.)
Post: #4
RE: Changing the XROM Number of a ROM
(04-12-2024 05:31 AM)BitWiz Wrote:  Would any internal calls in the ROM to other functions within the ROM need to be changed?
Whether M-Code or Focal?
AFAIK the XROM ID is a FOCAL issue, more precisely it is related to a XEQ function call that has been converted to a XROM function call to a global label in ROM. If it is a MCode only ROM, you should be ok, if the ROM has FOCAL code, you must patch all the XROM instructions that calls one of the ROM global label or one of the module function. I will double check on my side and come back if I found anything else.4

edit 1: Of course changing a XROM ID of a ROM has a direct impact in a FOCAL program.
A XEQ that calls a ROM global label or MCode function that is inserted in a program is converted into a XROM call.

edit 2: 1st paragraph update.

Sylvain Côté
Find all posts by this user
Quote this message in a reply
04-13-2024, 08:33 PM
Post: #5
RE: Changing the XROM Number of a ROM
One last question on this subject.

In banked ROMS (like the HEPAX or OSX ROMS) do I need to change the XROM number in the first word of each bank?

Thank again,

Mike
Find all posts by this user
Quote this message in a reply
04-13-2024, 09:44 PM (This post was last modified: 04-13-2024 09:46 PM by ThomasF.)
Post: #6
RE: Changing the XROM Number of a ROM
(04-13-2024 08:33 PM)BitWiz Wrote:  One last question on this subject.

In banked ROMS (like the HEPAX or OSX ROMS) do I need to change the XROM number in the first word of each bank?

Thank again,

Mike

Hi Mike,

No, in a bank switched module, only the first bank contains the XROM ID.
None of the other banks are "visible" (to the OS) so it is only the first bank that contains the ID and the FAT table for all included functions.
Typical the first two words are zero in the other banks.

Cheers,
Thomas

[35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X]
Find all posts by this user
Quote this message in a reply
04-14-2024, 06:29 AM
Post: #7
RE: Changing the XROM Number of a ROM
(04-12-2024 05:31 AM)BitWiz Wrote:  Would any internal calls in the ROM to other functions within the ROM need to be changed?
Whether M-Code or Focal?

The answer to that is - it depends on the actual MCODE. Sometimes the XROM# is used for housekeeping or for advanced features, so changing it does have a vital impact (negative). This is the case with many of my ROMS, and yes this also rules for the auxiliary banks in bank-switched configurations.

So assume the answer is always YES to avoid issues down the road.

Cheers,
ÁM

"To live or die by your own sword one must first learn to wield it aptly."
Find all posts by this user
Quote this message in a reply
Post Reply 




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