(07-24-2025, 02:20 AM)checkpoint10 Wrote: [ -> ] (07-23-2025, 08:53 PM)sharangad Wrote: [ -> ]How do you save or export an exe once it's been modified? I don't see any option to export patched bytes.
[EDIT] There is an option to save as a PE (EXE) binary but it fails because Ghidra doesn't know how to export to an LE/LX PE.
[EDIT2] Or some way to work out the file offset at the instruction.
I've never tried to modify and save an EXE with Ghidra. I just look for the same hex sequences using HxD and edit it there. It works fine for me since I'm just looking for hardcoded values and changing them, but probably not suitable for anything more complicated.
I guess that's what I'll have to do as well.
(07-24-2025, 03:36 AM)sharangad Wrote: [ -> ] (07-24-2025, 02:20 AM)checkpoint10 Wrote: [ -> ] (07-23-2025, 08:53 PM)sharangad Wrote: [ -> ]How do you save or export an exe once it's been modified? I don't see any option to export patched bytes.
[EDIT] There is an option to save as a PE (EXE) binary but it fails because Ghidra doesn't know how to export to an LE/LX PE.
[EDIT2] Or some way to work out the file offset at the instruction.
I've never tried to modify and save an EXE with Ghidra. I just look for the same hex sequences using HxD and edit it there. It works fine for me since I'm just looking for hardcoded values and changing them, but probably not suitable for anything more complicated.
I guess that's what I'll have to do as well.
What does the mip.cfg file do? The disassembly has references to it. It seems to be a bunch of strings separated by two 0x00s.
(07-24-2025, 08:17 PM)sharangad Wrote: [ -> ]What does the mip.cfg file do? The disassembly has references to it. It seems to be a bunch of strings separated by two 0x00s.
When I open mip.cfg, it looks like references to NASCAR 1 cars. I'm guessing it's not used for ICR2.
As a test case for allowing unmodified tracks and carsets to load, I tried something simple. Trying to get the game to start up with more than 30 tracks. Well it starts up, but only the first 30 are selectable in game and trying to go beyond that causes a lockup (memory access violation). Now I need to track down the memory allocation block and try increasing it. This is problematic because the limit isn't 0x1e (30). It'll be doing all manner of bit shifts and I don't know how many it'll need.
If anyone's interested in playing around with a useless experimental build here it is:
https://nirvtek.com/downloads/ICR2.Start...d30.001.7z
MD5: 741d36052e5a25acfe35d4b039409ef0
The game has never loaded more than 30 tracks. Always seemed like plenty. I', curious; is there a motivating factor beyond just changing stuff?
(07-31-2025, 02:15 AM)CowtownBob Wrote: [ -> ]The game has never loaded more than 30 tracks. Always seemed like plenty. I', curious; is there a motivating factor beyond just changing stuff?
I hit the limit regularly while I'm working on track projects and I'm too lazy to swap tracks in and out. ;-)
Rendition also came with the high-quality versions of certain tracks so unless you deleted the regular tracks, you hit the limit rather quickly.
(07-31-2025, 03:14 AM)checkpoint10 Wrote: [ -> ] (07-31-2025, 02:15 AM)CowtownBob Wrote: [ -> ]The game has never loaded more than 30 tracks. Always seemed like plenty. I', curious; is there a motivating factor beyond just changing stuff?
I hit the limit regularly while I'm working on track projects and I'm too lazy to swap tracks in and out. ;-)
Rendition also came with the high-quality versions of certain tracks so unless you deleted the regular tracks, you hit the limit rather quickly.
That's also my motivation for it and it seemed like low hanging fruit.
Agreed, nothing wrong with trying to remove such a silly limitation. I'm not sure of any other moddable sim that limits the tracks at all, or at least not to such a low number.
I agree it would be great to increase above the 30 track limit. Much less swapping around and changing for me.
It appears to use up to 999 bytes per track record for the track selection list. There're quite a few references to 0x3E7 (999 in hex). Investigating all that is a job for tomorrow I'm afraid.