Sonic and Sega Retro Message Board: Sonic CD data extraction - Sonic and Sega Retro Message Board

Jump to content

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

Sonic CD data extraction Levels + SonED2 files, some object data

#1 User is offline qiuu 

Posted 09 February 2009 - 04:21 PM

  • Posts: 134
  • Joined: 05-February 08
  • Gender:Not Telling
  • Project:Blue Ball & Blocks
  • Wiki edits:13
After disassembling and analysing Metallic Madness 3 Good Future just out of interest, I used the found patterns to extract various data from all of Sonic CD's level specific files by writing an autoanalysis tool.
Content includes all complete levels and SonED2 project files so levels can be viewed via SonED2. Notably due to the fact that the levels contain more chunks than Sonic 1 & 2 can handle, the removal of some is required first to make the levels work in Genesis Sonic 1. As there is only 1 byte per chunk in the level layout information, it was not possible to restore the level layout for Sonic 2 as well, however chunks have been converted to its format.
The archive contains furthermore extraced object art, code pointers as well as some mappings and animation scripts found in the respective files.

Perhaps this data can be of use to somebody...

Download link

Read Info.txt for more detailed information.

EDIT 2015-01-05: Some information from flamewing:

Quote

The object placement files are the same for all time zones of any given zone, even on the original SCD. The additional two bytes per entry consist of one bitfield and one padding byte; the bit field uses only the top 3 bits as flags: it is cba0 0000, where c = 1 if the object spawns on future (good or bad), b = 1 if object spawns on present and a = 1 if object spawns on past.
So the object layout files in the folder for each individual times zone actually contain the objects from all time zones (if you want to call them like that), and for each time zone the file is the same. You can use those bits to distinguish between which object belongs in which time zone.
This post has been edited by qiuu: 05 January 2015 - 10:54 AM

#2 User is offline Thorn 

Posted 09 February 2009 - 04:47 PM

  • Posts: 307
  • Joined: 26-February 07
  • Gender:Male
  • Location:Home
  • Project:Sonic 2 Retro Remix
  • Wiki edits:33
I will most certainly be finding use for this, even if all I can use in Sonic 2 is a slimmed selection of chunks. The fact that the Plane 0 collision is all correct makes it all the more awesome. I'm guessing people who've got their S1 disassemblies to support 7F chunks are all set, though, save having to use an S1 object set in each level?

Now if somebody would recreate some music to match (and some's already out there, I know) this could be an S1 hack of win.

#3 User is offline Spanner 

Posted 09 February 2009 - 05:06 PM

  • Not much I can do on here nowadays...
  • Posts: 2873
  • Joined: 02-June 07
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic the Hedgehog Hacking Contest, Other Stuff
  • Wiki edits:2,193
Awesome work! Regardless of the limitations, I can find a good use for this. =P

#4 User is offline Anthall 

Posted 09 February 2009 - 05:18 PM

  • Spambot
  • Posts: 235
  • Joined: 21-August 08
  • Gender:Male
  • Location:Leicester, UK
  • Project:Sonic the Hedgehog - The Final Showdown
  • Wiki edits:60
Holy fuck, that is awesome! I'll be playing with this tommorrow.

#5 User is offline Iron Sonic 

Posted 09 February 2009 - 05:41 PM

  • The roaming, rambling researcher.
  • Posts: 136
  • Joined: 11-October 07
  • Gender:Male
  • Location:Somewhere under a pile of documentation...
  • Project:Too Many to list.
  • Wiki edits:16
Now that we have this, has anyone ever tried to completely disassemble Sonic CD? I'm pretty sure that it would be somewhat impractical to hack, but it would be nice to see how Sega programmed it and have the code readable so that some things could be ported from Sonic CD into other games (like Time Travel, although it would have to be downsized for Mega Drive use). If no one has completely disassembled Sonic CD yet, what would it entail to do so?

Just curious.

#6 User is offline Puto 

Posted 09 February 2009 - 10:09 PM

  • Shin'ichi Kudō, detective.
  • Posts: 2007
  • Joined: 31-July 05
  • Gender:Male
  • Location:Portugal, Oeiras
  • Project:Part of Team Megamix, but haven't done any actual work in ages.
  • Wiki edits:51

View Postqiuu, on Feb 9 2009, 09:21 PM, said:

Notably due to the fact that the levels contain more chunks than Sonic 1 & 2 can handle, the removal of some is required first to make the levels work in Genesis Sonic 1.

Or you can just modify Sonic 1 to use uncompressed chunks, thereby removing the "$52 chunk limitation".

#7 User is offline PsychoSk8r 

Posted 10 February 2009 - 05:31 AM

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

View PostPuto, on Feb 10 2009, 03:09 AM, said:

View Postqiuu, on Feb 9 2009, 09:21 PM, said:

Notably due to the fact that the levels contain more chunks than Sonic 1 & 2 can handle, the removal of some is required first to make the levels work in Genesis Sonic 1.

Or you can just modify Sonic 1 to use uncompressed chunks, thereby removing the "$52 chunk limitation".

Would the only downside from this be the increase in the size of the ROM?

#8 User is offline roxahris 

Posted 10 February 2009 - 05:48 AM

  • Everyone's a hypocrite. Take my word for it.
  • Posts: 1221
  • Joined: 24-January 07
  • Gender:Male
  • Project:Doing anything at all
  • Wiki edits:30
Hell yeah! I can't wait to try and use some of this in my hack. Many thanks, qiuu. Or however that saying goes...

#9 User is offline Diablohead 

Posted 10 February 2009 - 05:54 AM

  • iDevice developer
  • Posts: 1636
  • Joined: 19-October 08
  • Gender:Male
  • Location:Near London
  • Project:games
  • Wiki edits:16
So is this route like the start of Sonic CD megadrive? that would be so amazing to see complete.

#10 User is offline Tweaker 

Posted 10 February 2009 - 09:29 AM

  • Posts: 12389
  • Joined: 27-June 04
  • Gender:Male

View PostIron Sonic, on Feb 9 2009, 05:41 PM, said:

Now that we have this, has anyone ever tried to completely disassemble Sonic CD?

A fair few people have privately disassembled a few MMD files here and there, but as of yet there hasn't been a complete disassembly to my knowledge. Keep in mind that every single MMD program is its own individual program, all with 256kb of code to sift through. While it's true that a lot of it will be the same, a lot of it will differ to the point where it's impractical to try and automate the process.

That said, great work, qiuu! It'd be interesting to see people take these resources and work out their own custom levels in Sonic CD. It'd be about time, anyway! :)

View PostDiablohead, on Feb 10 2009, 05:54 AM, said:

So is this route like the start of Sonic CD megadrive? that would be so amazing to see complete.

You're thinking of Sonic CD+ by Stealth, which features Palmtree Panic Act 1 Present on the Mega Drive with Tails and Knuckles as playable characters. It's not entirely complete, but a bare-bones conversion would be theoretically possible with some bankswitching and careful data management.

#11 User is offline qiuu 

Posted 10 February 2009 - 04:17 PM

  • Posts: 134
  • Joined: 05-February 08
  • Gender:Not Telling
  • Project:Blue Ball & Blocks
  • Wiki edits:13

View PostThorn, on Feb 9 2009, 10:47 PM, said:

I will most certainly be finding use for this, even if all I can use in Sonic 2 is a slimmed selection of chunks. The fact that the Plane 0 collision is all correct makes it all the more awesome. [...]
Is this an indication at what we might be seeing in the next release of Retro Remix? :(
I enjoyed playing it very much already, and your edited art fits together very well.

View PostPuto, on Feb 10 2009, 04:09 AM, said:

Or you can just modify Sonic 1 to use uncompressed chunks, thereby removing the "$52 chunk limitation".
Hmm, perhaps I kept the post a bit too short...at least I mentioned this in the info file. :D
Though it seems that not too much of the RAM that is freed that way is actually used in SCD though.

View PostTweaker, on Feb 10 2009, 03:29 PM, said:

A fair few people have privately disassembled a few MMD files here and there, but as of yet there hasn't been a complete disassembly to my knowledge. Keep in mind that every single MMD program is its own individual program, all with 256kb of code to sift through. While it's true that a lot of it will be the same, a lot of it will differ to the point where it's impractical to try and automate the process.
Yeah, automation can only find the commonly used routines, but I doubt anyone would be willing to manually dig through all the redundant and re-appearing code to find the unique parts to make a complete disassembly. Disassembling one of the files already gives a good insight about how things work (and reading some more docs would help me understand better how communication with the MegaCD works, at least it gave me the hint that I should disassemble with the start address 0x200000). A lot of things is very similar to Sonic 1; though interestingly enough the palette cycle system is more advanced than in Sonic 1 & 2 (I.e. a single routine processing palette cycle data, though for the performance point of view likely a little less effective), and some stuff I suspected being objects is apparently special terrain interaction, like the breakable spheres in CCZ or the workbench.

Oh, and just to note, I have no intension of creating something along the lines of Sonic CD MD...
Just did this out of interest, and perhaps to see what others can do with that.

#12 User is offline Master Emerald 

Posted 10 February 2009 - 05:10 PM

  • Posts: 2874
  • Joined: 14-December 07
  • Gender:Male
  • Location:Rio de Janeiro - Brazil
  • Project:College
  • Wiki edits:22
A friend of mine, Erik JS, did a little program that could extract data from CD Sonic Beta 510:

CD Sonic Hacking Guide (Translated to English)

CD Sonic Hacking Guide (Original in portuguese)

#13 User is offline synchronizer 

Posted 10 February 2009 - 06:19 PM

  • Posts: 1656
  • Joined: 20-August 08
  • Gender:Male
  • Wiki edits:19

View PostTweaker, on Feb 10 2009, 09:29 AM, said:

That said, great work, qiuu! It'd be interesting to see people take these resources and work out their own custom levels in Sonic CD. It'd be about time, anyway! :(


It would be nice if someone could try inserting their own take on the supposed missing R2 level.

#14 User is offline Iron Sonic 

Posted 10 February 2009 - 08:57 PM

  • The roaming, rambling researcher.
  • Posts: 136
  • Joined: 11-October 07
  • Gender:Male
  • Location:Somewhere under a pile of documentation...
  • Project:Too Many to list.
  • Wiki edits:16

View PostTweaker, on Feb 10 2009, 08:29 AM, said:

View PostIron Sonic, on Feb 9 2009, 05:41 PM, said:

Now that we have this, has anyone ever tried to completely disassemble Sonic CD?

A fair few people have privately disassembled a few MMD files here and there, but as of yet there hasn't been a complete disassembly to my knowledge. Keep in mind that every single MMD program is its own individual program, all with 256kb of code to sift through. While it's true that a lot of it will be the same, a lot of it will differ to the point where it's impractical to try and automate the process.

I noticed that while playing around with 68kd about a month ago. I'm actually toying with the idea of trying to disassemble at least some of Sonic CD after I'm done working on my current project. I'm going to have to find a better disassember, though. 68kd doesn't work very well for me.

#15 User is offline Cinossu 

Posted 11 February 2009 - 05:27 PM

  • inverted with love~
  • Posts: 2718
  • Joined: 21-June 04
  • Gender:Male
  • Location:London, UK
  • Project:Sonic the Hedgehog Extended Edition
  • Wiki edits:474
180
Posted Image :v:
This post has been edited by Cinossu: 11 February 2009 - 05:27 PM

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

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