GT1 Modding discussion

  • Thread starter Jandarman
  • 38 comments
  • 6,033 views
60
Azerbaijan
Azerbaijan
The thing is that GT1 has it's own magic - it's spirit, I don't know, you name it. But anyway, I think that there must be thread about GT1 modding. And why not to create it? I myself not a programmer, but I'm learning programming right now, and I started from very-very far away (1979 to be clear). I started from Commodore machines, it's BASIC and ASM, and of course 6502 architecture. The reason why I started from this is simple - I wanted to know where and when is all massively known programming has been started and to understand it starting from the basics - its that simple.

Anyway, let's jump up to discussion.

I've come up with a list of things that can be added in GT1. But first things first items from this list need to be investigated for possibility of realisation.

Here is this list:

1) Adding ability to race with 11 opponents (not 5 - as we have by default).

2) Adding to game AI bot that can test cars on tracks for best lap times.

3) Adding to game ability to play with cars from the garage in Arcade mode.

4) Adding to in-race interface new elements - such as player Nickname.

5) Adding ability to play GT1 by 6 players at one time against each other (in future this number can be 11 - if game engine will let it do)

6) Adding to game New Tracks (I'm not talking about replacing existing tracks right now)

7) Adding to game Mileage counter.

8) Adding to game Fuel.

9) Adding to game View from Drivers Perspective (Car Interior view).

10) Adding to game ability to play multiplayer on full-screen for each player (not split-screen as it is in game by default)

11) Adding to game customizable Tournament Table (for GT tournaments)

12) Adding to game ability to consider the aerodynamics of the car.

13) Adding to game Day/Night changing

14) Adding to game ability to change AI difficulty level (for training purposes).

15) Adding to game ability to add custom car liveries on the fly (without recompiling game archives)

16) Adding to game replay controls (for example to change speed, rewind or pause replay on random place) and add free-camera to be able to fly around the track to view race from the angles you want.

17) Adding to game car's wear (based on mileage of car).

18) Adding to game ability to symbolic repair of car (in the future it may be upgraded to more detailed repair)

19) Adding to game "autoparts store" (to replace parts of cars that are in bad condition)

20) Adding to game some kind of weather effects.

21) Adding to game ability to change wheels for cars

22) Adding to game B-Spec mode.

23) Adding to game New Car Manufacturers and cars themselves.

24) Improve physics of cars (may be impossible or near that - it's just an idea for now). In the end if this can be done - then maybe adding option in game to choose between "New physics" or "Vanilla physics".

25) Adding to game Jeeps and their physics (may be impossible or near that).

26) Adding to game ability to choose AI-opponent cars and tune them (for training purposes).

27) Adding to game ability to show trajectory of car path during race in color (different colors for each player)

28) Change Used Cars Dealership in the way where used cars will vary in terms of HP based on their price (more than it is by default right now).

29) Adding to game ability to show Pit-Stop guys when you come to it.

30) Adding to game Drag-Racing racing mode.

31) Adding to game more detailed statistics and ability to choose which components of statistics to take into account and which not.

32) Adding to game Sunflare

33) Adding to game test-tracks (for testing purposes, for example track with different ground surfaces or circle-like track from one of license tests)

34) Adding to game ability to setup race where AI will race against AI.

34-B) Adding ability for player to take control of AI-car during race.

35) Adding to game real car's pollution (not the one that we have by default - where we see no dirt or dust on car even after 1000 races). It can be based on using mask that is dissapearing with use of float-value as CS-GO skins)

36) Adding to game ability to transfer tire's wear from race to race (primarily for Career mode)

37) Change representation of Garage.

38) Adding to game "Winner" scene, where game will show player's car in special place on track.

39) Change car's behaviour from "Race infinetely" after finishing to "Stop engine" (simply stop the car after passing Finish line).

40) Adding to game Replay Cameras from GT2.

41) Adding to game penalty system as in GT7 (if you was riding on grass - then your car's speed will be lowered for couple of seconds) and stuff like that.

42) Adding to game ability to choose "Career mode difficulty". It can be choosed once only when starting Career mode (or not?).

43) Adding to game AI-racers. By that I mean to add some personality to AI-bots, so they not be just noname dummies. They can have some rating in-game too as well.

------------------------------------------------------------------------------------

I'm interested in digging into this. Anyone interested can post their thoughts and ideas too.
 
As cool as this sounds, most of the items simply aren't feasible since the game code would need to be reverse-engineered first. And even then, all the more complex features will be very tough to realize.

For example, day-night cycle is not going to happen unless the game receives an actual lighting model.
 
Yeah, I suspect that too (I mean reverse-engineering the game code), so in the first-place it would be nice to start to investigate game-memory during play for places that store valuable things. I think this should help in rev-engin in the future, cause this way people will have more info about where in-game what lies.
 
Even the modding GT2 has received is very mild and mostly revolves around car models, liveries, and some menu things like Opel being added (I haven't followed GT2 Plus's development)
 
For example this guy in the way of making AI-bot for GT1 and showing interesting results:


One of good examples of games on ps1 that supports more than 6 cars in race is NASCAR 2004 - it can handle 19 cars during race + track itself + Pit-stop crew + Interior View (with different gloves colors + arrows on speedometer and other meters are working realtime) + Sunflare effect + not bad skybox

Nascar 2004 interior view example.JPG

Nascar 2004 interior view example-2.JPG
 
Last edited:
I don't wanna come as a downer or as somebody that wants to dump on someone's ideas, but here's how each of these items in the list sounds or doesn't sound attainble with my current knowledge of GT1, or at the very least, what can be done with GT2. I'm not comparing to later games because i have next to no involvement with what's going on there, but i do know that GT4 is where Polyphony started to really push for modularity. Earlier games hard code pretty much everything that's not accessible assets.

For the sake of not having a wall of text post, i'll put the list under the spoiler.
1: Deliberately hardcoded by PD after the inital testing in GT1 Test Drive. Anything above 5 crashes the game instantly, because none of the memory allocation is modular. The game is hardcoded to use specific amounts of RAM for every specific bits of data it needs to load. That is why cars in GT2 for example have a maximum file size, car parts lists files as well, and more we've hit during the inital phase of learning what could be done to the game.

2. Anything not currently coded in the game will require full decompilation, and especially, full and 100% accurate recompilation in order to be done.
3. see 2.
4. see 2.
5. GT1 doesn't support playing using the PS1's link cable, so yeah, see 2.
6. Technically possible in GT2, except the track file format hasn't been reverse engineered, so yeah. Hypotheticaly speaking, possible in GT2. GT1 however.. i'm not sure. pez2k i believe said he couldn't veen add cars to GT1, because the car list is hardcoded or something like that.
GT1 is extremely non-modular.
7. see 2.
8. see 2.
9. see 2. But less impossible than other suggestions at this time.
10. see 5.
11. No idea what you mean by tournament table, so i can't comment on it.
12. It already sort of does? GT2 at least has a sort of CX value on car bodies data. I assume GT1 does as well. But it's nothing really advanced, and it's likely the PS1 couldn't handle anything better.
13. see 2.
14. In what mode? The only thing that i assume could be done is playing with rubberband values. Actual AI skills means editing their pathing on each track, which means track format reverse engineering... etc. Basically an other see 2.
15. Like a livery editor? imo an extreme case of see 2, because where in ram would you fit all the potential decals, and everything i can't think of that sounds like a big issue to me.
16. would require a complete rewrite how how replays work in GT, because atm they work by replaying recorded player inputs. Replay controls like a Codemasters game would mean recording player and AI coordinates, rotations and much more i assume. Sounds tough to me. Also a see 2.
17. see 2.
18. Would mean adding visual damage, which itself would mean rewriting the game engine, and somehow finding ways to incorporate visual damage to the game (like , in 3D i mean). see 2.
19. see 2.
20. see 2.
21. Was almost a thing, the menu exists in some late demo builds, but isn't functional. As far as i'm aware it's been completely removed from release versions. So an other see 2. Also we have no idea how wheels are made in GT, as they aren't part of any known file formats we can edit at this point in time. As far as i'm aware, they are dynamically generated by the game engine, using values for width, diameter, and sidewall thickness, in GT2 at least.
22. need i say it? see 2. An AI toggle doesn't sound too bad however. That's doable with gameshark cheats, but to make it an actual game feature... yeah.
23. as mentioned at 6., seems hardcoded, so see 2.
24. Too vague, but also i assume whatever you're thinking of would destroy the FPS, as the game's already not having perfect framerates with vanilla calculations. However, being aware of the work of a certain youtube content creator with the Super Mario 64 game engine, enough optimisation and rewrite of the source code (that thing again) could lead to actual physics improvements.
25. Strangely specific (favourtie brand?) But yeah, same as 23 and 6.
26. see 2. because even in GT2, the game can only choose from pre-tuned and existing opponents present in a giant list. So the game would need to be able to edit that list on the fly. Source Code shenanigans.
27. see 2.
28. I don't get that one, cars don't vary in HP in the used car dealerships, they just have a preset price and color in the weekly UCD car lists. see2.
29. see 2.
30. see 2.
31. Don't get that one either, but definitely see 2.
32. see 2.
33. see 6.
34. Basically 22.
35. You mean dirtiness, not pollution. see 2. Also the PS1 barely supports half transparency, i'm not sure you could even make such a type of masking on it.
36. see 2. (i don't see the point though, except in rally)
37. Vague, see 2.
38. see 2.
39. see 2. Behaviour already exists and is used in licenses, so that would be one of the simpler edits i would think, in theory.
40. see 2.
41. see 2.
43. see 2. Would greatly expand the size of the Ai opponents list, so i doubt it'd fit in ram anyways.

Even the modding GT2 has received is very mild and mostly revolves around car models, liveries, and some menu things like Opel being added (I haven't followed GT2 Plus's development)
It's a lot more than that, but nothing that's hardcoded is editable indeed.
At this point in time, the list of editable things in GT2 is longer than the list of what can't, excluding the actual core game code. Most of the accessible files are editable, just not the game's .exe

NDR008's series is great, but he's using an AI that tries to play the game, not actually editing the game itself. Still very intersting stuff to watch, if anything on how this process all works.

As for the NASCAR game, yeah. ToCa games also do similar things as well, but those games are made with those functionalities in mind. GT wasn't.

Tbh, i think you would probably be better off coding your own GT clone on modern game engines than spending years of your time reverse engineering a proprietary source code and deal with the PS1's shortcomings and limitations.
But i cannot and won't fault anybody giving it a try. Anything that progresses what we have so far is welcome as far as i'm aware, so i can only wish the people willing to go through that good luck.
 
Just making patches to the existing code in GT1 is already very difficult as the executables are partially compressed with a custom implementation of LZSS and decompress themselves into memory. I respect the imagination of coming up with such a long list of features, but at this point even just applying a single byte patch to fix one license test that uses the wrong car isn't feasible with current research and tooling.
 
I see. It's good to know fresh sight from those who know GT1 from inside better than others and it gives info on which direction to dig into. So thank you for critics - it is always welcome. I will think about it.

The idea of doing a clone of GT1 is interesting. Even for do this I think one must gather enough info from original game about what car's params is taked into account, e.q. physics (cause car's behaviour is the core of Gt-games imho) and only then start to implement things. And even so, in the end such game must have a "mod" word in it or something that doesn't go against original creators of GT1(Polyphony D.).

Another approach to solve some of those items is to create external utilities that will handle some of described functionality. It will work more like a crutch than a real solution, but for test things out it might be enough.
 
The idea of doing a clone of GT1 is interesting. Even for do this I think one must gather enough info from original game about what car's params is taked into account, e.q. physics (cause car's behaviour is the core of Gt-games imho) and only then start to implement things. And even so, in the end such game must have a "mod" word in it or something that doesn't go against original creators of GT1(Polyphony D.).
If I were to create a modern GT1 or GT2 clone without the limitations that are encountered when modding GT1 or GT2 I wouldn't take anything from the base game except graphical assets. I'd find a modern game engine and start from scratch.

Anything that involves reusing the game engine from GT1 will require reverse engineering the source code, which no one has been able to do as of yet. So the logical option is to create a GT1-like game, using a modern game engine that can natively handle the key functionalities that you want to see modded into GT1.
 
If I were to create a modern GT1 or GT2 clone without the limitations that are encountered when modding GT1 or GT2 I wouldn't take anything from the base game except graphical assets. I'd find a modern game engine and start from scratch.
I have read something about history of GT2-modding on this forum, so yeah I understand why people stay away from modding GT1 and prefer more GT2-modding. (of-course we can shoot in our legs and try to rev GT1, but why we should do this when we have option to use something more user friendly)

So in short words - yes, you wright. It must be made from scratch. One of the main reasons - modern engines are more flexible and give more options for game creation process.
 
Last edited:
Btw - today I was on NDR008 PSX, Cars and Pizza! stream and asked him about the size in MB of Ai-bot data that can be gathered by one car for one track - and he said that it will be roughly around 500mb. So that is huge. With simple calculations we will have next numbers:

20 tracks (10 normal + 10 reverse versions) * ~170 cars = ~3400 Ai data packs.
If every data pack will be around 500mb - then:
3400 * 500 = 1 700 000mb
It is something around 1700gb (near 2tb)

And this numbers just related to storage space on HDD.

If we talk about time that will be needed to teach Ai for really good driving - then on stream MR2 drived only 1 hour to be able to understand how to "straight" drive (not to mention L-turns, S-turns and other stuff).

Let's assume that to teach one car on one track will take 1 day. Then we will come up with something around ~9.5 years of teaching all cars in game to ride on all tracks (I'm scare to think of how much time it will require if it will take more than 1 day to teach one car for one track). So yeah - I regret that I wanted to see such bots in game))

or

maybe main problem in current Ai-learn solutions that present on the market. Maybe future versions of them will be faster and more optimized.
 
Last edited:
Yesterday I saw for the first time Assetto Corsa and I must say that this game is close to what I was described in first post. Never paid attention to this game before - that was my fault. It has huge mod base btw - around 6000 mods 90% of which is cars. Btw - it's on sale now in Steam just for 2$
 
Would it be possible to mod the game to be able to use a more modern wheel set up, i.e. with full wheel rotation, ‘analogue’ brake and accelerator, and stick shifting (with clutch)?
 
Last edited:
Short answer is no, it will never happen.
Longer answer would be that unless we somehow get source code access, which itself will never happen, there's no way to edit such mechanics in any game.
That change would break all kinds of things, like replays, as well. It'd fill up the allocated memory much much quicker than it already does with limited ranges.

It would be easier and quicker to make a game from scratch supporting these features.
 
Last edited:
Thanks. Expected as much. Hopefully in the not too distant future someone will come up with some kind of AI tool that will trivialise the task of reverse engineering old games.
 
Yesterday I saw for the first time Assetto Corsa and I must say that this game is close to what I was described in first post. Never paid attention to this game before - that was my fault. It has huge mod base btw - around 6000 mods 90% of which is cars. Btw - it's on sale now in Steam just for 2$
Assetto corsa has potencial. for recreating the GT feeling.



 
Last edited:
Does anyone have GTDATUnpacker that created by Leo2236?

I'm asking this cause links on his site is dead

I don't know if you're looking for specifically that tool or just something to unpack all of the DAT files, but this is an alternative. I wrote it when I was figuring out how the file format worked, and it'll recursively extract and decompress everything it can (there are DATs inside DATs as the format doesn't support directories).

Advance warning though, GT1 doesn't store filenames, which can make it very hard to find things. I made up a few file extensions based on the magic at the start of certain common files though, and the tool adds them to files of those types. The DAT file extension itself is meaningless too, not every file in the game with that extension is actually an extractable GT-ARC archive.
 
@pez2k Thank you! It helped me a little. Now at least I know what this .dat archives contain (even if that is not all what in them in perfect order). Mind you if I pm you some questions?

ps: sorry for my English if it's not good. I'm trying my best
 
Last edited:
@pez2k Thank you! It helped me a little. Now at least I know what this .dat archives contain (even if that is not all what in them in perfect order). Mind you if I pm you some questions?

Yep, fine by me, or otherwise just post them here in case anyone else has the same questions in future.
 
Ok. So here are them:
1) How much time you spend to recognize how file format works?
2) What should I need to know to do the same in future (if there will be need in that)? What language, tools, etc...?
3) You use Delphi to write your tools or it was @Leo2236 approach to use it?
4) Do you know in which file GT1 source code is located?

Ps: if answers to some questions must be answered by private, then ok.
 
Last edited:
Ok. So here are them:
1) How much time you spend to recognize how file format works?
2) What should I need to know to do the same in future (if there will be need in that)? What language, tools, etc...?
3) You use Delphi to write your tools or it was @Leo2236 approach to use it?
4) Do you know in which file GT1 source code is located?

I didn't figure out the whole GT-ARC format myself, I used the existing BMS script as a guide and worked from there - I think it took a day or so. For other (simpler) file formats I've actually figured out, it can take anything from hours to days, but then there are plenty of more complex formats that I can't figure out and give up on.

Figuring stuff like that out is less about a list of tools and more about experience really - I often just use a hex editor and look for values that seem like offsets inside the file, or look like known values (e.g. a specific car price or something), or are similar to other formats that Polyphony have used. The smart way to do it is using reverse-engineering tools like IDA or Ghidra to inspect how the game handles the file itself, but that's a bit above my level.

I don't use Delphi, no, it's about 15-20 years out of date in my opinion. My tools are written in C# simply because that's what I'm most comfortable with, and the source code for all of them is in the Github repo that I linked to before. The language really doesn't matter though, it's the logic that takes a lot of work.

The source code for GT1 isn't in any of the files, that's confidential and proprietary to Polyphony. The game executable is compiled from the source code into a form that the PS1 can run, so the source code doesn't need to be on the game disc, and companies are very careful to make sure that it isn't. If it was on the disc, it would allow other companies to easily make clones of the game and steal all of the knowledge used to build it, which is very much a bad thing for the company whose game it is. Nobody outside of Polyphony has access to the source code, and there's a good chance that even they don't have the source code any more - there's not really any commercial reason to keep it as they're never going to be developing an update for a project that ended more than 25 years ago.
 
Ok. I get it now. Thanks for reply. Smart move about source code btw. But about IDA and Ghidra: can they help in understanding how game logic works?

I had once opened SCES file of GT1 in Ghidra, but there was only few functions and many "?" signs where the assembly code must be. For me it was like: "go away man, you not suppose to be here". That's why rev-engineer of GT1 is painly process?

And about a GT-engine itself. I think it was evolved from version to version of the game, like Unity or Unreal. Maybe in some versions they decided to write engine from scratch, but even if it was so, then it must be GT5 or GT6, cause they use plenty of new graphic features compared to GT3 or GT4 for example.
 
Last edited:
Ok. I get it now. Thanks for reply. Smart move about source code btw. But about IDA and Ghidra: can they help in understanding how game logic works?

I had once opened SCES file of GT1 in Ghidra, but there was only few functions and many "?" signs where the assembly code must be. For me it was like: "go away man, you not suppose to be here". That's why rev-engineer of GT1 is painly process?

And about a GT-engine itself. I think it was evolved from version to version of the game, like Unity or Unreal. Maybe in some versions they decided to write engine from scratch, but even if it was so, then it must be GT5 or GT6, cause they use plenty of new graphic features compared to GT3 or GT4 for example.

Yeah, that's the main purpose of IDA and Ghidra really, understanding the game logic. The code patches in GT1+ are all done by finding the piece of logic with the bug in among the sea of unnamed functions, then working out which instructions to patch in order to fix it. It's not a quick process!

GT1's executables are compressed on disc, so loading them in Ghidra will just give you a huge chunk of compressed data and the loader function. The loader relocates itself out of the way, then decompresses the data using their modified LZSS algorithm starting from the end and working back towards the start, overwriting the compressed data. Because the decompressed data is larger, the loader starts writing it further 'down' in memory than the end of the compressed data. This means that the decompression write pointer never quite catches up with the compression read pointer, so they can do the whole decompression in just the amount of memory that the decompressed data takes up, plus the size of the loader function. For Ghidra, it's usually easier to use a console memory dump with the code already decompressed and the relevant overlay decompressed and loaded, but it is possible to manually decompress the code by reimplementing the loader outside of the game.

And yes, the GT games very much did evolve into each other - GT2 actually has some data bugs that were introduced in the US version of GT1 for example, and some file formats (especially sound files) stayed the same over multiple games. GT2 to GT3 was probably the biggest update, as almost every file format changed and they took advantage of the new hardware. GT4 also had some major feature changes, with the introduction of Polyphony's 'adhoc' scripting language for a lot of the game logic, which continued to be used until at least GT6.
 
@Jandar-man had some great suggestions in the first post. It would be great to have some of that stuff, hopefully some things are not so difficult to implement. The interior view would be great, the PlayStation version of Need for Speed 1 had very nice interiors and something like this would be great for GT1:



I would also like to see improvements in AI and a more balanced (more competitive) racing grid. Single player expansion with additional tournaments would also improve the game.

EDIT: it would be great if some of the GT2 assets could be imported to GT1, primarily cars. Importing things other than cars could change the unique atmosphere that GT1 has.
 
Last edited:
@Jandar-man had some great suggestions in the first post. It would be great to have some of that stuff, hopefully some things are not so difficult to implement. The interior view would be great, the PlayStation version of Need for Speed 1 had very nice interiors and something like this would be great for GT1:

I would also like to see improvements in AI and a more balanced (more competitive) racing grid. Single player expansion with additional tournaments would also improve the game.

EDIT: it would be great if some of the GT2 assets could be imported to GT1, primarily cars. Importing things other than cars could change the unique atmosphere that GT1 has.

All of these would basically require the full source code of the game and as such are impossible, short of a major team effort over the course of years to decompile the game. Adding features is not feasible, both in GT1 and in the majority of other games.
 
All of these would basically require the full source code of the game and as such are impossible, short of a major team effort over the course of years to decompile the game. Adding features is not feasible, both in GT1 and in the majority of other games.
So sad to hear that, I mean, have you seen GT4 spec II mod?



I mean this has tons of new features! Do you think something like this is impossible for GT1 (in any practical sense)?
 
I mean this has tons of new features! Do you think something like this is impossible for GT1 (in any practical sense)?

GT4 has its game logic implemented in a custom scripting language, which has had a major team effort over the course of years to decompile scripts (and it's still only a portion that's done). GT1 doesn't, so yes, it's practically impossible.

GT1 is by far the least moddable game in the series, to the point where doing something simple like changing the allowed cars for an event would be a serious reverse-engineering effort. GT2 moved a lot of things into data files that can be edited with enough research, then GT4 introduced Polyphony's own scripting language, which is a lot easier to decompile than the native code as the compiled scripts have very detailed symbols even in release builds (although even that required a major reverse-engineering effort from Nenkai to understand the bytecode and write a compiler).
 
So sad to hear that, I mean, have you seen GT4 spec II mod?



I mean this has tons of new features! Do you think something like this is impossible for GT1 (in any practical sense)?

Well, as mentioned already - it's better to write game from scratch than rev-engineer GT1. It's a painly process you know.

Besides that for some unknown reason PSCX Redux doesn't work on my machine. It have nice debugger, but I can't run it.

Maybe I'm wrong, but for success in rev-engineer this game you need at least a team of 4-5 experts in rev-engineering. It's a not one-man job.
 
Last edited:
Back