OpenGTA2?

Anything to do with GTA1/GTA2 that isn't covered by the other forums
User avatar
jericho
Mugger
Mugger
Posts: 12
Joined: 09 Sep 2019, 20:03

Re: OpenGTA2?

Post by jericho » 11 Sep 2019, 14:33

Mm okay, good point. I'll try to to see in slow motion

User avatar
Sektor
Boss
Boss
Posts: 1369
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: OpenGTA2?

Post by Sektor » 11 Sep 2019, 14:47

Welcome to the forum. Are you just curious or are you creating something? Why did you post in this topic?

User avatar
jericho
Mugger
Mugger
Posts: 12
Joined: 09 Sep 2019, 20:03

Re: OpenGTA2?

Post by jericho » 11 Sep 2019, 15:57

Sektor wrote:
11 Sep 2019, 14:47
Welcome to the forum. Are you just curious or are you creating something? Why did you post in this topic?
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 )

User avatar
B-$hep
Immortal
Posts: 531
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: Estonia - Finland

Re: OpenGTA2?

Post by B-$hep » 26 Sep 2019, 18:20

SEKTOR
Sektor wrote:
09 Feb 2017, 01:42
Likely 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 looked into GTA2.exe, it seems it always calls wasted.wav for dying or something. Its hardcoded.
I attached the screenshot. The nr 1 in red box is the wasted.wav
Untitled.png
Untitled.png (23.39 KiB) Viewed 1273 times
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;
  }
}
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.
Always wear safety glasses while programming.

paul
Mugger
Mugger
Posts: 14
Joined: 31 Mar 2016, 12:32
GH nick: paul

Re: OpenGTA2?

Post by paul » 26 Sep 2019, 18:58

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.

User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: OpenGTA2?

Post by elypter » 27 Sep 2019, 11:10

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ä

paul
Mugger
Mugger
Posts: 14
Joined: 31 Mar 2016, 12:32
GH nick: paul

Re: OpenGTA2?

Post by paul » 27 Sep 2019, 20:35

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.

User avatar
B-$hep
Immortal
Posts: 531
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: Estonia - Finland

Re: OpenGTA2?

Post by B-$hep » 29 Sep 2019, 19:37

  • Im willing to join.
  • I love GTA2
  • I have "worked" previously as cr@cker and reverse engineered many exes/apps
I really wish that somebody/somewhere got a real face to face contact with some "huge boss" in R* and ask them about the possibility to make GTA2, editor and all dlls open source.
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.

paul
Mugger
Mugger
Posts: 14
Joined: 31 Mar 2016, 12:32
GH nick: paul

Re: OpenGTA2?

Post by paul » 30 Sep 2019, 21:11

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"

User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: OpenGTA2?

Post by elypter » 01 Oct 2019, 21:47

there were also some special releases for some language regions and multiple official patches
yur sa'nok ngeyä

User avatar
B-$hep
Immortal
Posts: 531
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: Estonia - Finland

Re: OpenGTA2?

Post by B-$hep » 02 Oct 2019, 09:06

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
Always wear safety glasses while programming.

User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: OpenGTA2?

Post by elypter » 02 Oct 2019, 12:45

there was a japanese version as well. i collected some additional versions in the game pakx.
yur sa'nok ngeyä

User avatar
B-$hep
Immortal
Posts: 531
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: Estonia - Finland

Re: OpenGTA2?

Post by B-$hep » 02 Oct 2019, 14:37

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.
Image
Always wear safety glasses while programming.

User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: OpenGTA2?

Post by elypter » 02 Oct 2019, 16:04

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ä

User avatar
JernejL
Psycho
Psycho
Posts: 94
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: OpenGTA2?

Post by JernejL » 17 Oct 2019, 22:19

https://github.com/paulsapps/GTA2Hax

"Reimplementation of DmaVideo.dll and d3ddll.dll for GTA2"

Someone did this a few years ago.

User avatar
Sektor
Boss
Boss
Posts: 1369
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: OpenGTA2?

Post by Sektor » 17 Oct 2019, 22:33

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

User avatar
B-$hep
Immortal
Posts: 531
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: Estonia - Finland

Re: OpenGTA2?

Post by B-$hep » 19 Oct 2019, 12:44

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.
Always wear safety glasses while programming.

Post Reply