Sonic and Sega Retro Message Board: Sonic CD for Android Save Game Hacking Guide 1.0 - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

Sonic CD for Android Save Game Hacking Guide 1.0

#1 User is offline BiafraRepublic 

Posted 22 December 2011 - 04:16 AM

  • SSR DJ, longtime TSS staffer, and all-around nice/lazy guy...
  • Posts: 29
  • Joined: 22-October 08
  • Gender:Male
  • Location:Unincorporated Galveston County, TX, USA
  • Project:A/V Hijack: Mondays 6-8PM GMT/BST on SSR - http://u.nu/59id
  • Wiki edits:11
SONIC CD FOR ANDROID SAVE HACKING GUIDE 1.0
by BiafraRepublic
biafra.republic-at-gmail.com

--{This is a line to make sure this falls within the 79-character limit.}--
12345678901234567890123456789012345678901234567890123456789012345678901234567
---------------------------------------------------------------------------

WARNING: IF YOU FIND THIS GUIDE ON ANOTHER DOMAIN BESIDES THOSE LISTED BELOW,
THEN IT WAS POSTED WITHOUT MY PERMISSION. PLEASE REPORT SUCH SITES BY
EMAILING ME AT THE ADDRESS ABOVE.

The following domains have permission to host my guide, and will have the
latest (read: whenever I get to it) updates:

forums.sonicretro.org
gamefaqs.com
gamespot.com
biafrarepublic.me

VERSION HISTORY
---------------------
1.0 4/13/13
---
* Added info for the bit used to Unlock Tails. Thanks John McCoy!

0.5 12/24/11
---
* Added Selected Character info for each slots
* Formatted Guide for GameFAQs & GameSpot submission

0.4 12/23/11
---
* Added info for remaining slots

0.3 12/23/11
---
* Added Info for game settings

0.2 12/23/11
---
* Added Time Attack Settings

0.1 12/22/11
---
* Initial Post on forums.sonicretro.org

INFO
------
So far, delving into the save game file for the newly-released Android port
of Sonic CD with a hex editor (I've been using HxD myself. YMMV on this)
has yielded interesting results. The save game file, SGame.bin for Sonic CD
for Android is located on your device's external storage area(where it
copies all the files to when you clock "Move to SD" in Manage Applications),
making it easy to access using USB Storage or ADB. The Starting addresses
are as follows(all input order is little-endian unless otherwise noted)...:

This save file can be found in the com.sega.soniccd/files wherever your
external storage is located.

For Android 2.1-4.1 devices:
/mnt/sdcard/Android/data

For Android 4.2 devices (where [x] is a given user's number, sans brackets):
/storage/emulated/[x]/Android/data





0x00: Character for Slot 1 (See "Characters" below)
0x04: Number of Lives for Slot 1
0x08: Score for Slot 1, stored as a 32-bit unsigned integer
0x0C: Zone/Act for Slot 1 (see "Acts" below)
0x10: Timestones collected variable for slot 1 (see "Timestones" below)
0x20: Character for Slot 2 (See "Characters" below)
0x24: Number of Lives for Slot 2
0x28: Score for Slot 2, stored as a 32-bit unsigned integer
0x2C: Zone/Act for Slot 2 (see "Acts" below)
0x30: Timestones collected variable for slot 2 (see "Timestones" below))
0x40: Character for Slot 3 (See "Characters" below)
0x44: Number of Lives for Slot 3
0x48: Score for Slot 3, stored as a 32-bit unsigned integer
0x4C: Zone/Act for Slot 3 (see "Acts" below)
0x50: Timestones collected variable for slot 3 (see "Timestones" below)
0x60: Character for Slot 4 (See "Characters" below)
0x64: Number of Lives for Slot 4
0x68: Score for Slot 4, stored as a 32-bit unsigned integer
0x6C: Zone/Act for Slot 4 (see "Acts" below)
0x70: Timestones collected variable for slot 4 (see "Timestones" below)
0x84: Music Volume: Minimum Level=00h=0, Maximum level=64h=100
0x88: Sound Effect Volume: Minimum Level=00h=0, Maximum level=64h=100
0x8C: Spin Dash setting: 00h=Genesis style, 01h=Original style
0x90: Unlock Tails when selecting a New Game bit: 00h=No 01h=Yes
0x98: Soundtrack setting: 00h=JP, 01h=US
0xC0: Time Attack times in 1/100 of a second for each time attack level.
These are in 32-bit unsigned integers as well. Handy for unlocking
D.A. Garden, Visual Test, Sound Test, and Level Select, which are
unlocked based the sum of these variables being less than a given
value.

CHARACTERS: 00h=Sonic, 01h=Tails

ACTS: Apparently, the game treats each place in time (Past, Present,
Good Future, Bad Future) as an act/level proper, so there are 10
Zone/Act Variables for each zone, (4 each for acts 1 and 2, and
2 for act 3)

TIMESTONES: The variable is the hexadecimal representation of a binary
array of which Timestones Sonic has. Example:

G=Green, O=Orange, Y=Yellow, I=Dark Blue, B=Light Blue, P=Purple, R=Red

+-+-+-+-+-+-+-+
|R|P|B|I|Y|O|G|
+-+-+-+-+-+-+-+
|6|3|1| | | | |
|4|2|6|8|4|2|1|
+-+-+-+-+-+-+-+
|0|1|0|1|0|1|1|=43=2Bh
+-+-+-+-+-+-+-+



Anyways, have fun, and remember to back up before you tinker...

CREDITS
-------
SEGA West, for creating this game
Christopher "Taxman" Whitehead, for porting to Android
Maël Hörz, for HxD
John McCoy, for finding the Unlock Tails bit.
Sonic Retro, for hosting this
Dr. Pepper Snapple Group, for the caffeine
YOU, for reading this
This post has been edited by BiafraRepublic: 13 April 2013 - 07:45 AM

#2 User is offline Aerosol 

Posted 22 December 2011 - 12:29 PM

  • FML and FU2
  • Posts: 6984
  • Joined: 27-April 08
  • Gender:Male
  • Location:Not where I want to be.
  • Project:Sonic (?): Coming summer of 2055...?
Isn't there a leaderboard on the Android version? This is going to wreck havoc on it.

#3 User is offline BiafraRepublic 

Posted 22 December 2011 - 01:31 PM

  • SSR DJ, longtime TSS staffer, and all-around nice/lazy guy...
  • Posts: 29
  • Joined: 22-October 08
  • Gender:Male
  • Location:Unincorporated Galveston County, TX, USA
  • Project:A/V Hijack: Mondays 6-8PM GMT/BST on SSR - http://u.nu/59id
  • Wiki edits:11
As far as I can determine, there is no native leaderboard on Sonic CD for Android, nor are there any external leaderboard libraries such as OpenFeint or ScoreLoop.

#4 User is offline Aerosol 

Posted 22 December 2011 - 01:32 PM

  • FML and FU2
  • Posts: 6984
  • Joined: 27-April 08
  • Gender:Male
  • Location:Not where I want to be.
  • Project:Sonic (?): Coming summer of 2055...?
Ah, alright then.

#5 User is offline BiafraRepublic 

Posted 22 December 2011 - 08:59 PM

  • SSR DJ, longtime TSS staffer, and all-around nice/lazy guy...
  • Posts: 29
  • Joined: 22-October 08
  • Gender:Male
  • Location:Unincorporated Galveston County, TX, USA
  • Project:A/V Hijack: Mondays 6-8PM GMT/BST on SSR - http://u.nu/59id
  • Wiki edits:11
A quick update has been posted to add in the addresses for the other save slots. Enjoy.

#6 User is offline BiafraRepublic 

Posted 13 April 2013 - 07:47 AM

  • SSR DJ, longtime TSS staffer, and all-around nice/lazy guy...
  • Posts: 29
  • Joined: 22-October 08
  • Gender:Male
  • Location:Unincorporated Galveston County, TX, USA
  • Project:A/V Hijack: Mondays 6-8PM GMT/BST on SSR - http://u.nu/59id
  • Wiki edits:11
Updated guide to show new address for Unlocking Tails. Thank you John McCoy (johnmccoy1991 -at- gmail -dot- com) for this! :D

#7 User is offline Covarr 

Posted 13 April 2013 - 02:15 PM

  • Sentient Cash Register
  • Posts: 2890
  • Joined: 05-February 07
  • Gender:Male
  • Location:Over there
  • Wiki edits:1

View PostBiafraRepublic, on 22 December 2011 - 04:16 AM, said:

Christopher "Taxman" Whitehead, for porting to Android

Nope, try again. Christian Whitehead.

I might make a GUI tool based on this research, if I ever stop being lazy. If I do, it'll be Windows only, because it's easier and I'm lazy. Strong chance that I'll forget about it before I get around to doing anything, though, because I'm lazy.

#8 User is offline KingofHarts 

Posted 18 April 2013 - 10:50 AM

  • Amigo
  • Posts: 1380
  • Joined: 07-August 10
  • Gender:Male
  • Location:CHICAGO, IL
  • Project:Finding a job, Sonic Triad Studio, Sonic 1 REV C
  • Wiki edits:1
A lot of this seems eerily familiar... almost as if I've seen much of it before... HERE (albeit on a different platform)
I'd advise taking a look at mine, as you'll notice some missing info regarding Machines and Holograms, and other things.
Good guide, though missing some items that my guide can fill in some of the blanks for. Easy enough considering its the same game, therefore the SGame.bin's are similar enough for both.

#9 User is offline BiafraRepublic 

Posted 21 April 2013 - 11:15 AM

  • SSR DJ, longtime TSS staffer, and all-around nice/lazy guy...
  • Posts: 29
  • Joined: 22-October 08
  • Gender:Male
  • Location:Unincorporated Galveston County, TX, USA
  • Project:A/V Hijack: Mondays 6-8PM GMT/BST on SSR - http://u.nu/59id
  • Wiki edits:11

View PostKingofHarts, on 18 April 2013 - 10:50 AM, said:

A lot of this seems eerily familiar... almost as if I've seen much of it before... HERE (albeit on a different platform)
I'd advise taking a look at mine, as you'll notice some missing info regarding Machines and Holograms, and other things.
Good guide, though missing some items that my guide can fill in some of the blanks for. Easy enough considering its the same game, therefore the SGame.bin's are similar enough for both.


To be fair, mine was earlier than yours. Check the opening post date above.

Also, there are differences between the iOS and Android guides (No known achievement system on Android, mine has the addresses of all FOUR save slots, etc.)

#10 User is offline KingofHarts 

Posted 21 April 2013 - 09:13 PM

  • Amigo
  • Posts: 1380
  • Joined: 07-August 10
  • Gender:Male
  • Location:CHICAGO, IL
  • Project:Finding a job, Sonic Triad Studio, Sonic 1 REV C
  • Wiki edits:1
Yes I am aware. Just pointing it out as the files in question ARE very similar... I would've thought they wouldn't be quite the same, as they are different platforms... but maybe that has nothing to do with it... On a side note though, I'm surprised I never noticed this guide when it came out then...

I did notice had some differences in offsets, some missing from each. (A couple of which you pointed out due to the Android not having an Achievements function) And mine also does have all 4 slots. Maybe my way of wording the stuff wasn't that great. I noted it before going into the offsets.

Quote

MAIN GAME DATA
Look at offsets 00-19. These offsets are the data for Game Save 1. 20-39 are for #2. 40-59 are for #3, and 60-79 are for 4. They all contain the same information, so I will only go over the offsets for editing game #1. You can use your logic and math skills to figure out the offsets for #2-4 based on what I will tell you.


I did this to save writing time... Also were you able to figure out how Special Stages work with this offset?

Quote

Offset 0C - Current Level. Runs through each act in order of Level Select. (Present/Past/G.Future/B.Future) (01-04: PP1, 05-08: PP2, 09-0A: PP3)
NOTE (SPECIAL STAGE): Special Stages work differently. I don't know how exactly these work yet. I have figured out that each number listed below dictates the Special Stage AND the following level. (Ex. 55-SS1 to PP2 66-SS2->TT1 Past) It seems that after the Special Stage, it subtracts $50 to get the next level... I dunno if that assumption is accurate or not though.

This post has been edited by KingofHarts: 22 April 2013 - 02:27 AM

Page 1 of 1
    Locked
    Locked Forum

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