Sonic and Sega Retro Message Board: Sonic Generations Setup Program Disassembled - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 
Page 1 of 1

Sonic Generations Setup Program Disassembled Code inside!

#1 User is offline SSNTails 

Posted 04 November 2011 - 01:24 PM

  • Posts: 32
  • Joined: 29-April 08
  • Wiki edits:2
The port of the game might be great, but the setup program is a piece of VB.NET crap.

It won't even start on mine, since it faults out with DXInputHelper.dll trying to enumerate my video card.

So I decided to investigate, disassembling the .NET code back into C# and trying to rewrite some bits to make it work.

http://ssntails.srb2...nfigToolSrc.zip

It'd be nice to make the thing entirely managed (I've started using SharpDX).
Users are reporting that this still doesn't quite work for them, I think it generates an invalid config file (might just be off a characte ror two, I haven't looked into it more yet).

If anyone is willing to help out with this, it might be a neat little project.

#2 User is offline Scarred Sun 

Posted 04 November 2011 - 02:32 PM

  • GOTH GOTH GOTH
  • Posts: 3439
  • Joined: 06-February 05
  • Gender:Female
  • Location:San Francisco, CA
  • Project:Conquering the games industry
  • Wiki edits:36,091
Why.

The need for this is basically non-existent. I can think of so many more productive uses of time. Say what you want about VB.NET, but it's the installer. All it does is load the damn files.

#3 User is offline TimmiT 

Posted 04 November 2011 - 03:02 PM

  • Sports tape == toilet paper
  • Posts: 6634
  • Joined: 09-July 08
  • Gender:Male
  • Location:The Netherlands
  • Project:College
  • Wiki edits:8

View PostScarred Sun, on 04 November 2011 - 02:32 PM, said:

Why.

The need for this is basically non-existent. I can think of so many more productive uses of time. Say what you want about VB.NET, but it's the installer. All it does is load the damn files.

Because it seems like it's the reason why people that have laptops that use Optimus are fucked when we try to play the game. Optimus means the laptop switches between a powerful GPU and a less powerful GPU depending on what you're doing. To play the game it's obviously best to use the powerful GPU (in my case, a GeForce GT540M), however the config only detects the less powerful GPU (most of the time an Intel). Because of this, this happens when you try to launch the game:
Posted Image

So the only way to play the game is to use the Intel GPU, which is just barely capable of playing the game at 25fps on 1024 x 768 and low settings.
This post has been edited by TimmiT: 04 November 2011 - 03:03 PM

#4 User is offline SSNTails 

Posted 04 November 2011 - 03:44 PM

  • Posts: 32
  • Joined: 29-April 08
  • Wiki edits:2

View PostScarred Sun, on 04 November 2011 - 02:32 PM, said:

Why.

The need for this is basically non-existent. I can think of so many more productive uses of time. Say what you want about VB.NET, but it's the installer. All it does is load the damn files.


Uh... if you search the Steam forums, there's a lot of people who can't even get the config app to run, including me. Expanding upon this idea may be a solution. Till then the game refuses to run until the config app does it's thing.

#5 User is offline TimmiT 

Posted 04 November 2011 - 04:00 PM

  • Sports tape == toilet paper
  • Posts: 6634
  • Joined: 09-July 08
  • Gender:Male
  • Location:The Netherlands
  • Project:College
  • Wiki edits:8
Or we could just wait until SEGA updates the game.

#6 User is offline sonicblur 

Posted 05 November 2011 - 02:25 PM

  • Posts: 703
  • Joined: 18-February 08
  • Gender:Male
  • Wiki edits:6
I took a look at this, because I'd like to try getting the game running under WINE. I went ahead and back-ported it to .NET 2.0 since that works on WINE and now the tool runs for me on there.

But in the state you released it, it's never going to generate a valid config file. You have DepthFormat in AdapterInfo hardcoded to 24, which is not a valid value. Honestly, I haven't figured out what DepthFormat is though. When I boot into Windows and run the original unmodified utility there, it outputs 1515474505 for DepthFormat which doesn't correspond to anything in the DirectX DepthFormat enumeration. If I generate a config file with your version of the code, then replace DepthFormat manually in a text editor, the game accepts the file. (But that DepthFormat value isn't valid for WINE so the game crashes)

I'll see if I can figure out what DepthFormat is supposed to be. It's kind of funny that they forgot to change the default icon in the corner of the window, so it was very obvious when you opened the program that it was a .NET app.

Edit: It just realized that 1515474505 is ZTNI in ASCII, or INTZ if you reverse the endianness. Could this be some kind of depth buffer setting? Not sure what the possible values are yet.

Edit 2: I think the possible values are INTZ, DF24 and DF16. Obtained these values looking at the DXInputHandler.dll in a hex editor. The game appears to accept these as valid values.

Edit 3: Updated build of the application, this generates valid config files and runs under WINE:
http://www.sappharad...eCompatible.zip

Updated source code with my changes to downgrade to .NET 2.0 and force INTZ depth textures:
http://www.sappharad...Src_Updated.zip

I could have made it detect if cards support INTZ and if not fall back to DF24, but looking at the minimum game requirements all of the minimum supported cards support INTZ except ATI cards older than the 4000 series. DF24 is only supported by older ATI cards, so 90% of users who can run the game will be using INTZ anyway.

Good luck with this. It didn't allow me to run the game in WINE, but maybe it will help some other users who want to try unsupported configurations.
This post has been edited by sonicblur: 05 November 2011 - 04:40 PM

#7 User is offline SSNTails 

Posted 05 November 2011 - 10:28 PM

  • Posts: 32
  • Joined: 29-April 08
  • Wiki edits:2
Hey, sonicblur! Good to see you're still around. :)

View Postsonicblur, on 05 November 2011 - 02:25 PM, said:

But in the state you released it, it's never going to generate a valid config file. When I boot into Windows and run the original unmodified utility there, it outputs 1515474505 for DepthFormat which doesn't correspond to anything in the DirectX DepthFormat enumeration.


Yeah, sorry, I ran short of time, and since the game still doesn't run on my computer (I managed to generate a valid config, but the game crashes out.. I guess I'm seriously not compatible :/ ), it's hard to test the results of the config.

Quote

If I generate a config file with your version of the code, then replace DepthFormat manually in a text editor, the game accepts the file. (But that DepthFormat value isn't valid for WINE so the game crashes)


The modified setup program (MSP) also doesn't properly generate the 2nd to last line -- the registry information for the monitor. The MSP outputs 'nvd3dum.dll' on that line (or whatever your driver's d3d interface dll is), but it's supposed to be, for example, MONITOR\SAM006D\{4d36e96e-e325-11ce-bfc1-08002be10318}\0004, which corresponds to a location under HKEY_LOCAL_MACHINE/CurrentControlSet/Enum/DISPLAY/.

Inside that registry location, the 'ClassGUID' is the GUID that gets put in the config string for the monitor.


But other than the monitor string and the depthformat lines, it should be gold.

I'll see if I can figure out what DepthFormat is supposed to be. It's kind of funny that they forgot to change the default icon in the corner of the window, so it was very obvious when you opened the program that it was a .NET app.

Quote

Edit 3: Updated build of the application, this generates valid config files and runs under WINE:
http://www.sappharad...eCompatible.zip


See above about monitor string.. might be why it's still not running under WINE for you.

#8 User is offline PsychoSk8r 

Posted 09 November 2011 - 07:57 PM

  • HighKnights
  • Posts: 2572
  • Joined: 11-July 07
  • Gender:Male
  • Location:Walsall, UK
  • Project:30 Day Project: Revisited.A New Release!
  • Wiki edits:19

View PostSSNTails, on 05 November 2011 - 10:28 PM, said:

The modified setup program (MSP) also doesn't properly generate the 2nd to last line -- the registry information for the monitor. The MSP outputs 'nvd3dum.dll' on that line (or whatever your driver's d3d interface dll is), but it's supposed to be, for example, MONITOR\SAM006D\{4d36e96e-e325-11ce-bfc1-08002be10318}\0004, which corresponds to a location under HKEY_LOCAL_MACHINE/CurrentControlSet/Enum/DISPLAY/.

Inside that registry location, the 'ClassGUID' is the GUID that gets put in the config string for the monitor.

This worked, thanks. Now I get a nice "Graphics Device Unsupported" on this laptop. Here's hoping my PC does better. =P

#9 User is offline Lobotomy 

Posted 28 May 2012 - 02:26 AM

  • Mesonoxian for no reason other than that it's easier to wake up whenever.
  • Posts: 3715
  • Joined: 22-March 06
  • Gender:Male
  • Location:Traverse City
  • Project:Fixing Generations FOREVER, Project: In Silico, Unleashed PC Beautification.
  • Wiki edits:94
Bumping this due to interest in a working WINE version.

Is there any way to make the Generations Config not come up as a zombie process in WINE? It's literally the only thing keeping me from go fast on Linux.
This post has been edited by Lobotomy: 28 May 2012 - 02:27 AM

#10 User is offline Dark Sonic 

Posted 28 May 2012 - 08:48 AM

  • DYNAMIC SONIC! EXCITING SONIC! STYLISH SONIC! UNBELIEVABLE!
  • Posts: 7686
  • Joined: 21-April 06
  • Gender:Male
  • Project:Making the world know that Lost World 3DS is terrible
  • Wiki edits:10

View PostTimmiT, on 04 November 2011 - 04:00 PM, said:

Or we could just wait until SEGA updates the game.

That's a good joke. You made me giggle.

Sega updating a game you silly joker you.

#11 User is offline sonicblur 

Posted 28 May 2012 - 11:40 AM

  • Posts: 703
  • Joined: 18-February 08
  • Gender:Male
  • Wiki edits:6

View PostLobotomy, on 28 May 2012 - 02:26 AM, said:

Bumping this due to interest in a working WINE version.

Is there any way to make the Generations Config not come up as a zombie process in WINE? It's literally the only thing keeping me from go fast on Linux.

Not necessary. The latest version of WINE (and even CrossOver) can run the game with the original EXE's. I even contributed screenshots to CrossOver's compatibility archive.

With the latest version of WINE, install the modern DirectX and the .NET 3.5 runtime. With .NET 3.5 installed, the setup program works out of the box. The only problem I had was that the config file generated was not accepted by the game. There was an extra character on the line that denotes the registry key of the display to output to. I cleared out that line, and the game launched fine.

Unfortunately, sound doesn't work and Sonic's eyes always have polygons shooting out of them. (Installing Windows Media Player does not fix the missing sound problem)

#12 User is offline Hitaxas 

Posted 29 May 2012 - 07:24 AM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1380
  • Joined: 30-September 07
  • Gender:Male
  • Location:Back in Litchfield,CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
I've tried to play after installing the modified configuration tool, However, it detects my card as a ATI Radeon HD 3200, when it is actually a AMD Radeon HD 6670. It results in the game telling me the configuration does not match the system hardware, and that I need to run the config tool. :(

This is on Ubuntu 12.04 running Wine 1.5.5.

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users