Sonic and Sega Retro Message Board: Sonic 06 (Xbox 360) - Reverse Engineering - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

Sonic 06 (Xbox 360) - Reverse Engineering My finds so far. (hopefully stuff that hasn't been documented)

#1 User is offline codenamegamma 

Posted 28 June 2018 - 08:31 PM

  • Posts: 71
  • Joined: 29-August 17
Hi,
For the past few days I have been hacking around with Sonic 06 using my RGH console it seems like there's not too much information out there on the EXE or the how the game actually works side of things so here is what I got and what I learned so far.

So first thing i did was dump the xex to my PC and using an old guide, i managed to get it converted and open in IDA for further research. the first thing i did was dump a list of floats and start going down the list poking them, Here is the full list of floats. https://docs.google....dit?usp=sharing the first thing did was start working down the list and managed to do 150 so far out of 1200+ here's the interesting stuff i found.

Speed (In Game) DEF: 0.01666667
0x82000B88

Changes Game Rendering Mode? DEF: 0
0x82000DD8

Changed Rendering Scale? DEF: 0.5 - Don't go above that.
0x82000DDC

Image Strech X DEF: 2
0x820013A0

Graphics Changes - Falling Peds DEF: 0.0099999998
0x82001418

Messes up graphics - Image Scaling? DEF: -1
0x82001530

Fog? DEF: 2
0x82001594

Mini-Map Placement- DEF: 0.25
0x82001930

Skybox Distace? DEF: 20000
0x82001B60

Sound Effects Buffer Volume. DEF: 0.001
0x82001F88

Peds Shake? DEF: 0.01745329
0x82001FE0

Mini-Map Icon Size DEF: 200
0x82002038

Camera Distance DEF: -0.7853982
0x82002230

Camera - Causes it to spin out if set to 1.
0x820022B8

Funky Spinning Models if modified
0x82002370


TOD / Lighting?
0x8200246C

Load Sound FX sometimes?
0x82004514

Spin for Picked up Objects.
0x82007D94

Infinite Time? - Breaks Stage Timer.
0x82008230

I've been using Ascensions Advanced poker to change them, The first one that I tried effects the timescale the game is running at, this is also the case for the E3 (XBL) Demo of the game, where I also did the same process and dumped those floats as well. where there are 1093 of them, a few less than the full release.

There are references to debug mode and I've been trying to get it enabled but my limited knowledge of PPC Assembly is preventing me from getting it enabled, but nothing I've seen in the code of the game so far makes me think that it's not possible to one day enable it. below is a link to a screenshot of ida with the code itself, so if you know please let me know.
https://i.imgur.com/ZSrSjN6.png


PS Sorry about the new thread on something so old, as far as i can tell information on this is sparse and extremely old so rather than bumping a 10 year old thread I wanted to opt for something new as with the rise of Xenia modding the core code of the game will probably be increasingly more important as time goes on and more people start running this game on emulators.

#2 User is offline biggestsonicfan 

Posted 28 June 2018 - 11:12 PM

  • Model2wannaB
  • Posts: 831
  • Joined: 09-May 07
  • Gender:Male
  • Project:Formerly Sonic the Fighters
Well, the game used unencrypted LUA scripts, wouldn't the values just.... be in those, or are these constants from the engine itself?
This post has been edited by biggestsonicfan: 29 June 2018 - 05:07 AM

#3 User is offline codenamegamma 

Posted 29 June 2018 - 09:00 AM

  • Posts: 71
  • Joined: 29-August 17

View Postbiggestsonicfan, on 28 June 2018 - 11:12 PM, said:

Well, the game used unencrypted LUA scripts, wouldn't the values just.... be in those, or are these constants from the engine itself?

I think stuff like Sonic's Speed for example, might be in those Lua scripts. but at least for something like GameSpeed since those are hard coded they're in the xex

#4 User is offline Irixion 

Posted 29 June 2018 - 03:26 PM

  • Posts: 1526
  • Joined: 30-December 04
  • Gender:Male
  • Location:Ontario, Canada
  • Project:Life
  • Wiki edits:152
Information on this is indeed very sparse. I've seen a few videos lying around on YouTube of changed hard coded values. Is it possible to recompile the .xex?

For the record I'm a junkie for this game. DM me if you'd like to discuss. Though I won't be much good with IDA.
This post has been edited by Irixion: 29 June 2018 - 03:27 PM

#5 User is offline codenamegamma 

Posted 29 June 2018 - 04:45 PM

  • Posts: 71
  • Joined: 29-August 17

View PostIrixion, on 29 June 2018 - 03:26 PM, said:

Information on this is indeed very sparse. I've seen a few videos lying around on YouTube of changed hard coded values. Is it possible to recompile the .xex?

For the record I'm a junkie for this game. DM me if you'd like to discuss. Though I won't be much good with IDA.

well right now if i could find someone whos good with xbox 360 hacking or ppc assembly that would be ideal. as to get debug mode working i think I'm going to have to figure out what that code does then change it in memory as the game is running, or hex edit the exe. as far as recompiling idk.... but at least ida can tell what it is so thats a start.

#6 User is offline Irixion 

Posted 29 June 2018 - 05:25 PM

  • Posts: 1526
  • Joined: 30-December 04
  • Gender:Male
  • Location:Ontario, Canada
  • Project:Life
  • Wiki edits:152
Have you tried looking at the PS3 executable? What about the demo? As far as debug, the flag for it can be set, but it looks like something overwrites the lua variables, as some variables don't seem to do anything when changed at all. I'm assuming this is because of the hard coded values in the executable.

#7 User is offline codenamegamma 

Posted 29 June 2018 - 07:56 PM

  • Posts: 71
  • Joined: 29-August 17

View PostIrixion, on 29 June 2018 - 05:25 PM, said:

Have you tried looking at the PS3 executable? What about the demo? As far as debug, the flag for it can be set, but it looks like something overwrites the lua variables, as some variables don't seem to do anything when changed at all. I'm assuming this is because of the hard coded values in the executable.

the debug code seems diffrent in the demo. as far as debug theres a no-clip kinda mod in the lua that i know about but nothing that will give us a menu.

#8 User is offline Irixion 

Posted 18 July 2018 - 09:49 PM

  • Posts: 1526
  • Joined: 30-December 04
  • Gender:Male
  • Location:Ontario, Canada
  • Project:Life
  • Wiki edits:152

View Postcodenamegamma, on 29 June 2018 - 07:56 PM, said:

View PostIrixion, on 29 June 2018 - 05:25 PM, said:

Have you tried looking at the PS3 executable? What about the demo? As far as debug, the flag for it can be set, but it looks like something overwrites the lua variables, as some variables don't seem to do anything when changed at all. I'm assuming this is because of the hard coded values in the executable.

the debug code seems diffrent in the demo. as far as debug theres a no-clip kinda mod in the lua that i know about but nothing that will give us a menu.



It's probably overridden by the .xex then...like much of the other stuff. I'll disassemble it and have a look myself. I may not be excellent at IDA but I have to start somewhere :v

#9 User is offline HyperPolygon64 

Posted 25 December 2018 - 01:19 PM

  • Blast Processing
  • Posts: 20
  • Joined: 29-October 15
  • Gender:Male
  • Location:Cheshire, England
  • Project:Sonic '06 ARC Editor

View Postcodenamegamma, on 29 June 2018 - 09:00 AM, said:

View Postbiggestsonicfan, on 28 June 2018 - 11:12 PM, said:

Well, the game used unencrypted LUA scripts, wouldn't the values just.... be in those, or are these constants from the engine itself?

I think stuff like Sonic's Speed for example, might be in those Lua scripts. but at least for something like GameSpeed since those are hard coded they're in the xex

The configurations for all of the characters' speeds are located in the player.arc file. You'll have to decode the LUB files first and you should be good to go to change the values.
This post has been edited by HyperPolygon64: 25 January 2019 - 05:01 PM

#10 User is offline HyperPolygon64 

Posted 25 January 2019 - 06:11 PM

  • Blast Processing
  • Posts: 20
  • Joined: 29-October 15
  • Gender:Male
  • Location:Cheshire, England
  • Project:Sonic '06 ARC Editor
To keep this thread going somewhat, here's a finding of our own at Lost Legacy Team...

► Sonic's Action Gauge was attempting to read values from missing variables, so the variables provided weren't named correctly.
File (xenon): player.arc\xenon\player\sonic_new.lub
File (ps3): player.arc\ps3\player\sonic_new.lub

Code (original):
c_gauge_max = 100 * point
c_gauge_green = 10 * point
c_gauge_red = 10 * point
c_gauge_blue = 10 * point
c_gauge_white = 10 * point
c_gauge_sky = 10 * point
c_gauge_yellow = 10 * point
c_gauge_purple = 10 * point
c_gauge_super = 10 * point
c_gauge_heal = 50 * (point / sec)
c_gauge_heal_delay = 0.5 * sec

Code (fixed):
c_gauge_max = 100 * point
c_green = 100 * point --Values increased from 10 to decrease the Action Gauge evenly so it can deplete correctly.
c_red = 25 * point
c_blue = 100 * point --Blue Gem seems to work as intended with this set to 100, as when the Action Gauge replenishes fully from zero, the Blue Gem expires.
c_white = 25 * point
c_sky = 100 * point
c_yellow = 25 * point
c_purple = 25 * point
c_super = 100 * point
c_gauge_heal = 10 * (point / sec)
c_gauge_heal_delay = 0 * sec --Delay set to zero to actually replenish the Action Gauge.

There are many other oddities with this game, but they're all at the back of my mind, so I'll probably reply with them after I jog my memory a bit.
This post has been edited by HyperPolygon64: 25 January 2019 - 06:13 PM

#11 User is offline XRick 

Posted 04 February 2019 - 02:43 PM

  • Posts: 93
  • Joined: 17-September 08
  • Gender:Male
  • Location:Portugal
  • Wiki edits:2
I'm not sure if this is the best thread to bring up this matter, but I'll try anyway.
I've seen a video on Youtube about a guy trying the Demo and Retail Versions, and on the comments someone stated that the Demo seemed to be a later version of development of the game than the Retail Version.
Is this actually for real? If so...dear goodness...
This post has been edited by XRick: 04 February 2019 - 02:44 PM

#12 User is offline TheBdude 

Posted 04 February 2019 - 04:04 PM

  • What do you mean, "your eMachine can't play Mania"?
  • Posts: 33
  • Joined: 16-May 13
  • Gender:Male
  • Location:Press Garden
I've played the demo on my 360 a few years back, and I can confirm that there were quite a few improvements in the demo compared to the final product. Whether that's indicative of the build used I don't really know.

#13 User is offline grap3fruitman 

Posted 04 February 2019 - 06:09 PM

  • Posts: 3112
  • Joined: 19-February 08
  • Gender:Male
  • Wiki edits:5
What's the final/demo build dates?

Edit:

The demo has a build date of Sat Sep 16 04:34:53 2006: https://textuploader.com/1a3hn
The final has a build date of Sun Oct 22 14:01:13 2006: https://textuploader.com/1a3h2

Quote

sonic2006demo
XexTool v6.6 - xorloser 2006-2013 (Build Mon Sep 23 14:56:21 2013)
Reading and parsing input xex file...

Basefile Info
Xex Name: SONIC THE HEDGEHOG
Original PE Name: marathon.exe
Load Address: 82000000
Entry Point: 824AC7C0
Image Size: D40000
Page Size: 10000
Checksum: 00CA7FAD
Filetime: 450BD34D - Sat Sep 16 04:34:53 2006
Stack Size: 80000

Regions
All Regions

Allowed Media
Live Signed Package ("LIVE")
Xbox Package ("PIRS")

Media Id
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Encryption Key
F6 4D 3C FA FD 0D E5 B3 BC DD 1A 17 B6 7D 64 CA

LAN Key
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

TLS Info
Number of Slots: 64
Data Size: 0
Raw Data Address: 00000000
Raw Data Size: 0

Execution Id
Media Id: 611B6E03
Title Id: 534587EA (SE-34794)
Savegame Id: 00000000
Version: v0.0.1.1
Base Version: v0.0.1.1
Platform: 0
Executable Type: 0
Disc Number: 0
Number of Discs: 0


Quote

sonic2006final
XexTool v6.6 - xorloser 2006-2013 (Build Mon Sep 23 14:56:21 2013)
Reading and parsing input xex file...


Basefile Info
Xex Name: SONIC THE HEDGEHOG
Original PE Name: marathon.exe
Load Address: 82000000
Entry Point: 82537AE0
Image Size: DA0000
Page Size: 10000
Checksum: 00DCAB1B
Filetime: 453BCE09 - Sun Oct 22 14:01:13 2006
Stack Size: 80000

Regions
North America
Australia / New Zealand
Rest of Europe

Allowed Media
DVD-XGD2 (Xbox360 Original Disc)

Media Id
F3 88 50 A6 54 33 1F 57 DB 09 B6 F0 77 09 C3 E8

Encryption Key
E7 73 B8 61 B8 44 62 8E 4D E6 10 56 FC 1B AE E1

LAN Key
5B AC 6D 17 E9 EB C4 0C 67 C5 97 1D 2C 3C 3B 1B

TLS Info
Number of Slots: 64
Data Size: 0
Raw Data Address: 00000000
Raw Data Size: 0

Execution Id
Media Id: 7709C3E8
Title Id: 534507D6 (SE-2006)
Savegame Id: 00000000
Version: v0.0.0.1
Base Version: v0.0.0.1
Platform: 0
Executable Type: 0
Disc Number: 1
Number of Discs: 1

This post has been edited by grap3fruitman: 05 February 2019 - 01:59 PM

#14 User is offline HyperPolygon64 

Posted 05 February 2019 - 02:53 AM

  • Blast Processing
  • Posts: 20
  • Joined: 29-October 15
  • Gender:Male
  • Location:Cheshire, England
  • Project:Sonic '06 ARC Editor

View PostXRick, on 04 February 2019 - 02:43 PM, said:

someone stated that the Demo seemed to be a later version of development of the game than the Retail Version.

That's just speculation since the demo has more polished features than the retail game. Most notably, the demo has rotation physics, whilst the retail game doesn't, so player movement seems very choppy when walking across rigid geometry. There's also stuff with the Action Gauge in the demo, like the maturity meter which is just nonexistent in the retail version. The demo also has a poor use of anisotropic filtering, which I'm pretty sure they just removed in retail.

#15 User is offline Blue Spikeball 

Posted 05 February 2019 - 08:11 PM

  • Posts: 424
  • Joined: 29-October 16
  • Gender:Male
Have people attempted to "port" some of the improvements from the demo to the final game?

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

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