gromrelocate - v20110422

Screenshot 

Click here to download:   gromrelocate.zip

This is a very simple, and not entirely complete tool, that may aid in the relocation of a GROM cartridge file from one address to another. I used it to relocate the Editor/Assembler cartridge from >6000 to >2000 successfully.

To use it, you WILL need knowledge of GPL and C, as you WILL need to modify and rebuild the converter tool. You SHOULD have a GPL dissassembly of the target program - it will make life easier.

The main things you need to change:

// there are some hard-coded assumptions about this relocation range!
int nSrc = 0x6000;         // source offset
int nDest = 0x2000;        // dest offset
```

This may need changing for whatever your needs are.

In handle_call(int &offset) is the real meat, though. This function needs to know about all CALL'd subroutines that require data after the call, so that it doesn't try to interpret the data as GPL. Right now, it has the ones that the Editor/Assembler cart uses, other carts may use other calls!

Likely, converting like this is trial and error. You will try, and if it does succeed, run the GROM and try to exercise any code path. When it crashes, then you have to try and figure out what the program missed.

The program attempts to follow all execution paths, but it can be confused. I had to make some concessions. For instance, it assumes that all CALLs will return, and that they clear the condition bit. This is not necessarily so!

At any rate, it will emit what it figures out as it goes. It expects a cartridge image, with the first byte 0xAA, and then parses the standard header to find the entry points.

To run, just pass the source file, and the destination file (the rest of the settings are hard coded as noted above.)

gromrelocate inputG.bin outputG.bin

Windows project and EXE included, but it should port with minimal effort.

I don't intend to give a lot of support to this program, it's a hacky little tool. But it may be useful to others! So it's released. Enjoy!



Click here to view repository on Github
Click here to view commit history on Github



Title:gromrelocate
Repo Created:2022-02-27
Last Update:2022-02-27

Back to Software Menu



Babble Software Text Dolphin Info Image Gallery Forums HOME

This page belongs to tursi#at#harmlesslion.com
Email addresses are provided for personal contact only. The operator of this website will not give, sell, or otherwise transfer email addresses maintained by or for this website to any other party for the purposes of initiating, or enabling others to initiate, unsolicited electronic mail messages. This site does not make use of targetted advertising nor does it store cookies on your device nor does it use unique identifiers to track you. It serves you data and walks away. Only the sole system administrator has access to that data, which consists of your IP address and the data you requested. These logs are automatically deleted whether they have been reviewed or not, and are not used for any further purpose.