News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Programming help wanted.

Started by Daniel3D, September 15, 2021, 12:38:59 PM

Previous topic - Next topic

Daniel3D

#15
Quote from: llm on September 21, 2021, 02:45:55 PM
Quote from: Daniel3D on September 21, 2021, 02:39:05 PM
I was browsing the assembly code and throwing bits I found his way. He looked it up in the gamefile and directly edited the binary.

are there any code -  or only resource (graphics etc.) changes?
The code changes are only the coordinates of the main menu buttons and the default car (hard coded in several locations) because the countach doesn't belong in a Ferrari lineup.
The rest is resources.

I would like the code changes in the new executables as well. To get a clean Ferrari version.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

Quote from: Daniel3D on September 21, 2021, 03:12:50 PM
I would like the code changes in the new executables as well. To get a clean Ferrari version.

should be easy if the file-offsets are known

building from asm source will only work for the MCGA exe - the other vesions are not reversed currently

Daniel3D

#17
Quote from: llm on September 21, 2021, 03:29:04 PM
Quote from: Daniel3D on September 21, 2021, 03:12:50 PM
I would like the code changes in the new executables as well. To get a clean Ferrari version.

should be easy if the file-offsets are known

building from asm source will only work for the MCGA exe - the other vesions are not reversed currently
The offset of the menu buttons is easy to find.
The default car is a bit more complicated.
CAS created a little program to find them all.
Although I am quite certain that I can find them all.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

The program, I have somewhere if anybody needs it, but the algorithm is very simple:

You give the program a four-letter string. The program looks up the first letter. When it finds it, it tries to find the second letter among the first few bytes after the place where the first letter was found. If it doesn't find it, it continues; if it does find it, it counts how many bytes after the first letter came the second and say that is x; then it checks x bytes beyond and 2x bytes beyond to see if the the third and fourth letters are there. If they are, then the string has been found. If they aren't, then it hasn't. If found, location is printed. The algorithm continues until the end of the file.
Earth is my country. Science is my religion.

llm

First it sounds like an ordinary hex editor search giving the offset of a string, but then i've reread your description and now im not sure... what is the use case?

Cas

Oh, this is the little program I made for the exclusive purpose of finding in the binary the letters "C", "O", "U", "N", to be able to configure the default car. I noticed in the assembly code that they were separated by the same amount, but couldn't be sure of what that amount was. This way, I was able to change the default car for the Ferrari Edition without having to recompile the program.
Earth is my country. Science is my religion.