GP2Lap Source Code Released!! :)

Here you can post questions about GP2, your favourite GP2 things and errorreports/problems!
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: GP2Lap Source Code Released!! :)

Post by rremedio »

Well, there's a lot that can be done with this source. But like with any source code, knowledge is required for it to be of any use. In this case: C and Assembly knowledge as well as some understanding of the MS-DOS inner workings.
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
eky78
GP2 Gamer
Posts: 181
Joined: 05.02.2012, 12:15
Contact:

Re: GP2Lap Source Code Released!! :)

Post by eky78 »

Well...maybe a little off topic...but...what about the Free Hex Editor?

From what I know it's useful only to change the maximum number of laps during qualifying but there are a lot of numbers in the editor.

So, have they ever been tested? Do you know whether they can change something in GP2 or not or if nobody tried to test it?
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: GP2Lap Source Code Released!! :)

Post by rremedio »

It's something like that: every file in your computer is made of bits and bytes and that stuff. The Hex Editors read and display every byte off a file and can change them as the user wish.

Bytes are not a very readable sort of information but sometimes you can find what a byte (or sequence of byte means) and get a desired effect by changing them. The "old" (90ies) GP2 patchers used debugging tools to learn what specific values in the exe were used to. I have no good debugging skills, so I rely on info left from those guys and the programs they've build. All my programs work the same way a Hex Editor would do, they just automate the tasks you could do with the hex editor.

You can try and change all those numbers on the screen, but just a few of them are actually values that will change something useful (like number of laps). Most of them are used by the system to understand the program, they are actually the program itself. So changing them may corrupt and brake the game.

Something I did when creating the physics editor was to patch the game with GP2Edit (keeping a copy of the unpatched game), changing just one value (like Player Grip, in the Car Settings screen) and then using a hex editor to compare the two files. That way I've found where it changed the Player Grip in the exe and then I've tested the values that were around it. Some of them were useful and became the factors that you can change in the Physics Editor. It was a long and boring job, but it worked.
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
User avatar
RacerBG
GP2 Pro
Posts: 999
Joined: 09.08.2010, 17:57
Location: Bulgaria

Re: GP2Lap Source Code Released!! :)

Post by RacerBG »

Thinking a while and I came to this solution: we should really start messing aroind with this! Editing the game furthermore without HEX editing the whole .exe is not possible. Our only hope is to make GP2Lap like GPxPatch but for DOS/GP2.

Any suggestions for tutorials, programs used, etc...? At least we have the source now.
User avatar
Michael82
GP2 Racer
Posts: 321
Joined: 16.10.2008, 15:20
Location: France
Contact:

Re: GP2Lap Source Code Released!! :)

Post by Michael82 »

Hi all!
Have you news for gp2lap and his code?
User avatar
rremedio
GP2 Legend
Posts: 1559
Joined: 14.01.2007, 15:05

Re: GP2Lap Source Code Released!! :)

Post by rremedio »

I haven't touched the code for many months now and to fair, it seems out of my reach to make sense of it. It is really advanced old school programming that requires knowledge of C, Assembly and MS-DOS low level workings, the later being much rare today. I guess if you understand Assembly, the MS-DOS part can be easy to learn since there are reference file available and the code itself will be a lot clearer. I once was willing to learn such things but I don't have the time and motivation required.

It would be nice if we had a real coder in the community. I can make simple programs and hacks but I'm no real coder. I just mimic things lol
"The Fox provides for himself. but God provides for the Lion"
Image
Early 90s F1 forever!
User avatar
Michael82
GP2 Racer
Posts: 321
Joined: 16.10.2008, 15:20
Location: France
Contact:

Re: GP2Lap Source Code Released!! :)

Post by Michael82 »

Thank you for your answer Roberto. it's very difficult to find a real C coder today.. perhaps one day..
Post Reply