OpenGTA2?
Re: OpenGTA2?
Mm okay, good point. I'll try to to see in slow motion
Re: OpenGTA2?
Welcome to the forum. Are you just curious or are you creating something? Why did you post in this topic?
Re: OpenGTA2?
Thanks

Actually i'm creating my own remake of gta1 entirely from scratch (but it currently on very very early stage) and now collecting some info which i believe might be helpful.
I didn't want to create new topic for this tiny question, so I wrote here, sorry )
Re: OpenGTA2?
SEKTOR
I attached the screenshot. The nr 1 in red box is the wasted.wav I havent yet digged so deeply into this, this function is choosing what audio is played:
What is the "nicked"?
Fried should be played when ped is torched? I guess.
Have to dig deeper to find out why is wasted always called.
I looked into GTA2.exe, it seems it always calls wasted.wav for dying or something. Its hardcoded.Sektor wrote: ↑09 Feb 2017, 01:42Likely way outside the scope of this project but are you able to debug audio? I want the shocking.wav to play when you die on train tracks, it displays the "shocking!" text but instead plays wasted.wav. Other sounds aren't played either like toasted and game over. Shocking.wav will actually play if it's your last life although in that case you'd think gameover.wav should play.
I attached the screenshot. The nr 1 in red box is the wasted.wav I havent yet digged so deeply into this, this function is choosing what audio is played:
Code: Select all
char * __fastcall FUN_00564430(int param_1)
{
switch(*(undefined4 *)(param_1 + 0x44)) {
case 0:
case 1:
return s_wasted_0061aed4;
case 2:
return s_fried_0061aecc;
case 3:
return s_nicked_0061aec4;
case 4:
return s_shocked_0061aebc;
default:
return (char *)0;
}
}
Fried should be played when ped is torched? I guess.
Have to dig deeper to find out why is wasted always called.
Always wear safety glasses while programming.
Re: OpenGTA2?
I wonder if anyone would be interested in fully reversing GTA2 original exe?
This would mean:
1. Disassemble the game to asm source.
2. Re-assemble and patch any time stamps in the PE header/debug info so it produces exactly the same original exe file.
3. Re-create the MSVC6 build environment.
4. Replace each asm function 1 by 1 with C/C++ code that produces exactly the same assembly instructions as the original function.
This would mean:
1. Disassemble the game to asm source.
2. Re-assemble and patch any time stamps in the PE header/debug info so it produces exactly the same original exe file.
3. Re-create the MSVC6 build environment.
4. Replace each asm function 1 by 1 with C/C++ code that produces exactly the same assembly instructions as the original function.
Re: OpenGTA2?
this is a huge undertaking and very difficult to automate. however there are some new approaches for disassemblers that use machine learning which look very promising. i think effort is best spent in improving those tools and adapting it to the build environment gta2 was made with. decompiling will probably never be fully automated but my vision for the perfect decompile would be one that is able to take a bunch of user input like the memory addresses that the community found including descriptions and any other known variables and then let the ai work backwards from there giving the internal objects proper names and groupings based on the provided information
yur sa'nok ngeyä
Re: OpenGTA2?
Yep I fully expect this would be a multi person multi year project. Also agree that it can't really be automated. It would be manual work on around 5-6k functions.
I wouldn't do this alone if but we had say 5-10 people working on it then it could be possible to do within a few years.
I wouldn't do this alone if but we had say 5-10 people working on it then it could be possible to do within a few years.
Re: OpenGTA2?
- Im willing to join.
- I love GTA2
- I have "worked" previously as cr@cker and reverse engineered many exes/apps
It's 20 years old game.
In 2002 or 2004 they recompiled the sources of GTA1 and GTA2 and released the classics (now unavailable).
It means they have the sourcecode.
Even Microsoft is releasing lots of source lately. Why R* cant just release this messy old 20 years old code, put it on GitHub or something with specific license and let it be.
GTA1 is even older but also interesting to have with sources.
So many ports and mods could be made for both GTA1 and GTA2.
Always wear safety glasses while programming.
Re: OpenGTA2?
I think the first thing to be done is to collect all known versions of GTA2 for cross comparison and hope of any symbol leaks or debug compiled versions.
I know of these versions:
-PS1 release
-PC demo
-PC retail
-PC "rockstar classics"
I know of these versions:
-PS1 release
-PC demo
-PC retail
-PC "rockstar classics"
Re: OpenGTA2?
there were also some special releases for some language regions and multiple official patches
yur sa'nok ngeyä
Re: OpenGTA2?
Really?
I have original, the 9.6F, Playstation and demo version.
I know there is a russian version also.
Dunno about others.
I have demo and PS version on dvds somewhere.
Have to dig out
I have original, the 9.6F, Playstation and demo version.
I know there is a russian version also.
Dunno about others.
I have demo and PS version on dvds somewhere.
Have to dig out
Always wear safety glasses while programming.
Re: OpenGTA2?
there was a japanese version as well. i collected some additional versions in the game pakx.
yur sa'nok ngeyä
Re: OpenGTA2?
Nice.
It would be great to find these all.
I doubt that they were compiled differently but who knows..
BTW: here are all the known .cpp files from GTA2.EXE, the original ones that were actually in source tree. Maybe 1-2 missing, dunno, but i will add them once i find them.

It would be great to find these all.
I doubt that they were compiled differently but who knows..
BTW: here are all the known .cpp files from GTA2.EXE, the original ones that were actually in source tree. Maybe 1-2 missing, dunno, but i will add them once i find them.
Always wear safety glasses while programming.
Re: OpenGTA2?
i was searching for releases quite thorowly back then but i dont remember any details anymore. if you want to find every release i suggest researching what once existed and then if you cannot find downloads anymore to ask on retro forums and subreddits
yur sa'nok ngeyä
Re: OpenGTA2?
https://github.com/paulsapps/GTA2Hax
"Reimplementation of DmaVideo.dll and d3ddll.dll for GTA2"
Someone did this a few years ago.
"Reimplementation of DmaVideo.dll and d3ddll.dll for GTA2"
Someone did this a few years ago.
Re: OpenGTA2?
There's the freeloader version but that also has no debug symbols. The exe is larger than 9.6f. It was officially licensed and recompiled but the freeloader company went out of business.
I included their original installers and manuals but all you really want to look at is gta2freeloader.exe
http://gtamp.com/GTA2/gta2freeloader.7z , it's v10.5
I included their original installers and manuals but all you really want to look at is gta2freeloader.exe
http://gtamp.com/GTA2/gta2freeloader.7z , it's v10.5
Re: OpenGTA2?
So it means freeloader had sourcecode?
Why they bought the source anyway?
Whats the point. Same game. No changes.
I wonder if the guys from freeloader still have the sourcecode.
Why they bought the source anyway?
Whats the point. Same game. No changes.
I wonder if the guys from freeloader still have the sourcecode.
Always wear safety glasses while programming.