Closed danielmarschall closed 5 years ago
As far as I remember, only 1 byte needs to be changed in player_a.dat for it work, so that is what should happen in my fix. I think it worked the last time I checked. I don't have a lot of time to get into this, but I'll check your other update a bit later.
Thank you for your answer.
I just found out, that the problem is that during development I ran both, the Classic version and the Retail version. It turns out that the player_a.dat has some kind of different format. So if you run GTA Classic with a player_a.dat which was written by GTA Retail, there will be a corrupted save state.
It seems like your fix works correctly: The files written by GTA Classic will contain the byte 0x06.
However, if you run GTA Retail (which does not contain the player_a.dat fix), you will get a player_a.dat, which will crash GTA Classic, even if the fix is applied.
Attached is a player_a.dat that will crash GTA Classic, even if the patch is applied: player_a.zip
Open questions:
I have found a different approach how to fix the player_a.dat bug.
I have added this fix in my updated file https://misc.daniel-marschall.de/spiele/gta1/widescreen_patch.cpp
Now, GTA will run without GTAFixer.exe
Today, I have debugged the game with IDA, and I actually found the cause of the bug, and I found a way to actually fix the issue!
I have made a technical description here https://misc.daniel-marschall.de/spiele/gta1/player_a_bugfix.txt
In player_a.dat, at the fifth byte, the resolution setting of the previous game session will be saved. The saving works, but during the load procedure, the game will crash because an invalid resolution setting "6" is requested. The issue is very easy to fix. My fix has the big advantage that the resolution setting is now preserved for the next game session, like in the Retail version of the game.
I have updated my file and it is ready to be pulled :-) https://misc.daniel-marschall.de/spiele/gta1/widescreen_patch.cpp
I briefly tested on the files I have, it's working for me, so I pushed the changes to github. Unfortunately at this time that's all I can do, so I suggest you try the dev build and make sure everything is fine, then let me know and I'll reupload it on github.
In the source code comment , there is mentioned that some kind of player_a.dat fix is applied.
But it does not work. The file still gets corrupted and needs to be fixed by running GtaFixer.exe before each start.