don't click here

Sonic 1 iPod (Video/5G) Port Analysis

Discussion in 'Engineering & Reverse Engineering' started by evilhamwizard, Apr 5, 2011.

  1. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63
    Decided to make a post for this because maybe someone else who's interested can have a crack at this.

    As some of you know, Sonic 1 was ported to the iPod Video (5G and up I suppose, the click wheel stuff) a few years a go. In comparison to the other "ports" to the GBA and mobile phone platforms, this is the most accurate. The physics are virtually identical to the Megadrive version, all original graphics are present, and the original music and sound effects are used. Now of course, this port still does things differently in comparison to the Megadrive version. But first, let's break down the data files you can find in this port.

    Folders:
    a.) Executables - there are two executables in this folder, both are encrypted and can't be read for strings. You can also find the digital signature file for both executables in here as well
    b.) Resources - the description and instruction pages are kept here in multiple languages

    Every other data file is kept in the root directory of package:

    Files:
    a.) z#a#map.bin files - the mapping files for each act for the six zones, the first # stands for the zone number while the second # stands for the act number.
    b.) rserver.bin - no idea, appears in every iPod game I think.
    c.) Manifest.plist - used for backing up the game in iTunes?
    d.) Manifest.plist.p7b - same as above
    e.) ##.m4a - music files, the ## correspond to the number in the original version's sound test, the zone/special stage plays for 10 minutes, for some reason the 1up bgm isn't here and the emerald get bgm is track number 94, not 93, track 93 is missing all together.
    f.) 8B.mp3 - for some reason the game ending cutscene bgm is the only mp3 file here.
    g.) sonicicon.raw.lcd5 - icon that appears while selecting the game from the iPod menu
    h.)sonic.raw.lcd5 - the load screen, I think
    I.) z#m - no idea what these files are, there's no file extension there's one for each of the six zones, all have the same file size 41kb
    j.) iTunesMetaData - data for iTunes
    k.) iTunesArtwork- artwork for iTunes

    Then the rest are data files that store data like graphics:

    Data files:

    a.) z##tbnk.dat - graphic bank files for the tiles, can be viewed in tile molester, one for all the playable stages (sp = special stages, the 7th "zone" is the final zone and the game ending cutscene, z0 is the title screen)
    b.) z##at.dat - unsure what these are
    c.) z##bgtbnk.dat - graphic bank files for the background in each zone
    d.) sndbnk.dat - sound effects bank, the sound effects are recorded in .wav format, the naming scheme for each file in the bank is similar to the audio banks used for the collections released by digital eclipse.
    e.) logobnk.dat - Sega logo and Sonic Team Presents graphics
    f.) gentbnk.dat - "common" graphics bank, Sonic's sprites, the hud, the rings, tv boxes, etc are here

    Like I said there are differences between this and the original version:

    1.) There are no gameplay demos after the title screen, it just sits at the title screen until you press start.
    2.) The music doesn't speed up if you get the speed shoes.
    3.) Even though the BGM for the end credits exist, I don't remember there being an end credits (yes I played and finished this port).
    4.) There is no parralax scrolling in the backgrounds. The background is just one layer.
    5.) I feel as if Sonic moves a bit fast through the air if he does a normal jump while moving, but it could be just me.
    6.) While the "Sonic Team Presents" graphic is the same as the MD version, the Sega logo doesn't have that light blue wave thing like the original does (but oddly enough the uncompressed Sega sound from the original version is used instead of a higher quality one, the pitch is a little higher too)
    7.) There's a how-to-play screen when you start a new game that shows how to play the game with Sonic in GHZ Act 1.
    8.) Pressing any button on the title screen will move the title screen logo up and display options to start a new game or finish where you left off.
    9.) There are no cheats (confirmed, I asked the original developers of the port and they said that they didn't put any cheats in the game).
    10.) The screen fade effect is different.

    These are the only differences I can think of for the moment.

    Now here's some more interesting things about the port in general.

    All the unused graphics that were present in the original version (the goggles, the monitors, the extra Sonic frames, etc) are present in the graphic banks. The only thing I couldn't find was the "PRESS START BUTTON" graphic for the title screen, but it might be around somewhere. One thing I noticed, as far as the naming scheme for the zone files go, it uses the original zone order that was set in place for the game like the original MD version does (GHZ first, LBZ second, etc). Like I said before, the game says that zone 0 is the title screen and zone 7 is the final zone and ending cutscene. But here's the odd part, z71tbnk.dat is the graphics bank for the Final Zone (which for some reason includes all the tiles used for Scrap Brain instead of just some of them) while z73tbnk.dat is the ending cutscene. Now, where the hell is z72tbnk.dat?! I don't think this is anything too special, but maybe someone with knowledge of the internals of the original game can think of something better than I can.

    Oh, and remember how the mobile phone port included unused tiles such as the planets/ufos in Marble Zone? Well, they're present here as well:

    http://I.imgur.com/qyw32.png (it's the middle of the black circle I drew)

    Another interesting thing I noticed is that the unused wrecking ball is in the Marble Zone graphics bank as well! I checked some of the other zones besides GHZ and it's not there. So maybe they had the wrecking ball in other zones at one point?

    There's probably some other cool stuff as well. But as you can see from the picture above, I can't get the correct palette to show up in Tile Molester. I do have an image of what gentbnk should look like though:

    [​IMG]

    As for the music being recorded to loop for 10 minutes, I think they did this as a way to optimize performance. Whenever the music changes (like for invincibility, etc) the game will hang for like 3 seconds. And then it'll hang again to put the original zone music on again. The same can probably be said as to why the 1UP BGM isn't present, because that could probably make the game way more annoying than it already is with it hanging almost all the time.

    With all that aside, I do know that source code was given to the developers of this port from Sega of Japan. Either the source code was similar to the mobile phone port, I don't know, but either way - they did a pretty good job on it.

    I think I might have more on this, I just have to refresh my memory again. This whole topic was kinda a "last hour" type of thing, so I didn't really organize the content. So I apologize if some things don't really make sense.

    I would like to post the data from this port without the music so people can look at it, but I'm afraid to.
     
  2. Sploit

    Sploit

    Member
    458
    0
    16
    My girlfriend gave me the use of her 3rd gen nano recently...I am sure sonic was released for use on this...
    ...unfortunately I can't find that on the iTunes store...any idea where I could get it and how to get it to work?

    (if this is not appropriate discussion can mods please just delete this post?)

    Thanks
     
  3. Captain L

    Captain L

    The guy who likes Shadow the Hedgehog Member
    2,435
    30
    28
    Waiting for the coming of the Great White Hankerchief
    I played this game to death on my old iPod, so I am quite familiar with its differences. I think you nailed most of them. You just forgot to mention that because you now have unlimited continues, anything that use to give a continue now gives a 1-up. Somehow this port was better than Sonic the Hedgehog Genesis. iPod beat out GBA. One amazing trick is that if you fail a stage (missed the Chaos Emerald, didn't get 50 rings) you could just quit, go back, and try again.
     
  4. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63
    Yep, also - the game starts you off with 5 lives instead of 3. Very nice of them. :P

    Also, I noticed that this unused object is packaged in every graphic bank for act 3, or where the bosses are located for each zone:

    [​IMG]

    Maybe it's an early version of the capsule?

    Also, I can't seem to find Splats anywhere. :\
     
  5. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    What's with that giant monitor in there?
    [​IMG]
     
  6. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63
    Wow, I have no idea. I also noticed a "stoned" Sonic there too.

    Also check this. This looks familiar from something debug related, but does anyone know what it is?

    [​IMG]

    It's the TM stuff I circled in red. It only appears in the graphic bank files for Star Light Zone.
     
  7. D.A. Garden

    D.A. Garden

    Sonic CD's Sound Test Member
    This is what loads when you try to use a breakable solid wall object with sub id 00 or 02 (I.e. the GHZ variants) in Star Light Zone, so maybe it's loading the mappings but not the graphics? I dunno.

    I'm more intrigued by the Scrap Brain/Final Zone small machine on the far right... why on earth would that be there?

    EDIT - And the Final Zone Egg-mobile's legs as well? Very confusing.
     
  8. FraGag

    FraGag

    Tech Member
    Those are most probably the chunks (or metatiles, hence the 'm'). The original game reserved 41 KB of RAM for the chunks, so it's probably the chunk data, uncompressed.
     
  9. Hez

    Hez

    Oldbie
    wait....wtf IS with the giant monitor?
     
  10. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63
    Ah, I see. I checked the files in a hex editor and I noticed that there wasn't any compression, so I'm sure you're right.

    Also, the conveyor belts in Scrap Brain zone never went diagonally, right? I checked the graphics bank for Scrap Brain Act 1 and I noticed there were tiles for the conveyor belt to go diagonally. Not sure if these graphics exist in the final somewhere, but I remembered this being shown in prototype shots and not featured anywhere else in the final game.

    [​IMG]
     
  11. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    ...yes. The diagonal conveyor belt art is in the regular final S1 ROM. They are loaded into the VRAM for the level, just not used at all.

    I believe there were magazine shots that showed extra steep conveyor belts.
     
  12. Travelsonic

    Travelsonic

    Member
    827
    20
    18
  13. AbsoluteG

    AbsoluteG

    disgusted by origins plus Oldbie
    182
    4
    18
    A black Hole
    life and shit..., a sonic 1 remake
    I don't think that many people might know this, but those diagonal "belts" are in fact used in the final game...as these below.
    [​IMG]

    The artwork and tiles you see in there belongs to these escalators in SBZ act 1, which might have in fact replaced the conveyor belts from the Beta version.
     
  14. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,611
    93
    Working on my art!
    Funny looks like Sonic Team never could quite figure out diagonal conveyor belts. They didn't work in Sonic 2 either, and then I think they stopped trying haha.

    But that giant monitor... I don't get that.
     
  15. theocas

    theocas

    Tech Member
    346
    0
    16
    This looks very interesting. Back when I still had my iPod Nano, I was playing around with the executable and the files for the game back during summer. I'm probably gonna poke around the IPA and I'll see.
     
  16. ICEknight

    ICEknight

    Researcher Researcher
    Really old news.

    Oh my god. :O

    Have you guys tried changing the values for the placed objects? Perhaps we'll finally be able to see some of these lost things in action.
     
  17. evilhamwizard

    evilhamwizard

    Researcher
    1,392
    455
    63
    Uh, I know it's very old news. :P

    What's news to me is that it's included with every Act 3 graphics bank, hinting that maybe it's something to do relating to bosses. Before, we said it was an unused object for Star Light Zone - but as you can see, I can find this graphic in every zone.

    Also yeah, about that diagonal conveyor belt. I was just going to say that I remembered a diagonal belt with spinning platforms. But the thing is, I think I also saw the tiles in the Act 2 graphics bank as well. But then again, sometimes it seems that each graphics bank has common tiles it loads regardless even if it's used. The title screen for example, has more tiles for Green Hill Zone (like the flowers and some of the platforms), but of course they aren't used.

    I wish we could view these graphic banks with a proper palette. Some of the smaller tiles look interesting but I can't make them out because the colors are messed up.

    EDIT: Also, the crystals/stalactites in Labyrinth Zone. The only difference between them in the prototype versions is that they were smaller, right? Because if I remember, I think I saw tiles for both the big ones that are used plus smaller ones. It's been so long, so help me out. I have to check the banks for LBZ later.

    EDIT2: Here's LBZ Act 1's bank. You can see the crystals/stalactites starting from the middle to the lower bottom. I can see similar ones from the shots, but I think my eyes are playing tricks on me. But someone may think differently. What do you guys think? Also, do you see anything else that's odd in here?

    Here's a proto shot with some in for comparison.

    [​IMG]
     
  18. Hez

    Hez

    Oldbie
    Those are just the ends of the big ones.
     
  19. SteelBrush

    SteelBrush

    603e Member
    1,194
    0
    0
    the home of spotted dick, Devon
    Tramadol, Tamazepam and finding a reason to exist.
    Could the big monitor once have been used instead of a sign post or a capsule at the end of the level? Or if you popped it with 50 rings it could have taken you to the special stage. It's uses are endless I suppose. These are the 2 things that immediately came to my mind when I saw it. I'm also quite sure that sections of it will appear in debug mode in the MD game.