don't click here

Sonic 2: S3 Edition

Discussion in 'Engineering & Reverse Engineering' started by Alriightyman, May 26, 2008.

Thread Status:
Not open for further replies.
  1. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    EDIT: For Up to date features refer to my sig. or go here.
    Ok, this is a hack of Sonic 2, obviously, that I've been working on for around a month or so. I wanted to see if I could do this and, for the most part, got it to work. First off I want to say it's a WIP, it's more of a demo if anything. There are many graphical glitches I'm aware of, as well as a starpost bug. Emerald Hill Zone acts 1 & 2 are the only levels that work right now.
    Anyway what's include in this is..... ACT transitions! Nothing more. A few things that I haven't got to work yet include the title cards loading for act 2, the background scroll, and the starpost working properly.
    If you notice anything else feel free to let me know about it.

    Current Release

    EDIT: I forgot to mention that I disabled the titlecard artwork
     
  2. JcFerggy

    JcFerggy

    Do you want to taco 'bout it? Member
    1,364
    58
    28
    Nova Scotia, Canada
    GoldenEye: Source, Other Stuff
    Could you post a few screens? I'm one of the few on Dial-up now a-days, and I don't usually download anything without a few screens.
     
  3. Ambil

    Ambil

    I want that heinous hedgehog hammered! Member
    Keep rings between levels = instant pwn.

    That's something I've been waiting for all my life.
     
  4. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    Because it totally hasn't been done before!
     
  5. Ambil

    Ambil

    I want that heinous hedgehog hammered! Member
    Sorry sir, I didn't notice that in your hack. In most circumstances, I usually close my emulator when I find out a hack doesn't have any level art/layout changes at all. :(
     
  6. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    Pretty cool stuff! Did you do the transitions from scratch, or did you port them from S3K?
     
  7. Quite cool, although of course there are a lot of bugs which need sorting, but you mentioned that in your first post. The only problem I have is that Sonic 3k sprites don't really look that great with the palette you're using IMO. In case it helps you, when I was planning to put Sonic 3k sprites in Sonic 2, I did a comparison of the main palette lines in Sonic 2 and Sonic 3, and came up with a conversion scheme that would allow Sonic 3k stuff to look perfect while not disrupting original Sonic 2 artwork too badly. The document can be seen here, the parts you'd probably be interested in are the last two sections. Basically, if you replace the colours mentioned in Sonic 2's main palette, and then use Nineko's colour swapping tool according to the palette index correspondence, all Sonic 3k sprites which use the primary palette line come out looking perfect. The only problem with it is that since one shade of black is replaced by green, some sprites look quite weird, but if you sacrifice that green (since I believe it's only used by Super Sonic), most Sonic 2 things look almost perfect.
     
  8. HighFrictionZone

    HighFrictionZone

    Hi. Member
    855
    0
    16
    Katy, Texas
    Nothing
    Seems pretty sweet. I will note one thing. The timer. I don't know if it resets and starts counting over without updating the timer at all or if it merely freezes the time where it was and never resumes, well, timing. Either way, the time display did not change once I completed Act 1.
     
  9. Shadow Fire

    Shadow Fire

    Ultimate victory! Member
    1,557
    0
    16
    The Land of Darkness
    Sonic: The Lost Land (Series), The GCN (site)
    It was done in my hack too. Thank you very much, Puto. :)
     
  10. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    I would've, but I didn't see the point in doing so because it waas just showcasing the act transitions. However, I will post pics when I update this later on.

    There are mostly ported from S3K. I had to add a lot of extra things to it to make it work with Sonic 2 though.

    I just tossed those sprites in there last minute, but forgot to update the palette. That document is pretty cool, but that's pretty much what I did minus the green.
    No it's on pause. I set it up to clear it, but it conflicts with the signpost at the beginning of the level, so I disabled it for now. A lot of these will be fixed in the future, but for now I'm mostly concentrating on the transitions.

    I'll release another after I've got a few more levels working, plus a few extras including a working instashield.
     
  11. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    Ok, I come into a problem. I need the level layouts to be uncompressed, but when I do that to all of the layouts, I get this error:
    [​IMG]
    First off, what is range overflow?
    Second I tried to fix it by changing
    Code (Text):
    1. Off_Level:
    2.     dc.w Level_EHZ1-Off_Level
    3.     dc.w Level_EHZ2-Off_Level; 1
    4.     dc.w Level_EHZ1-Off_Level; 2
    5.     dc.w Level_EHZ1-Off_Level; 3
    6.     dc.w Level_CPZ1-Off_Level; 4
    7.     dc.w Level_CPZ2-Off_Level; 5
    8.     dc.w Level_EHZ1-Off_Level; 6
    9.     dc.w Level_EHZ1-Off_Level; 7
    10.     dc.w Level_MTZ1-Off_Level; 8
    11.     dc.w Level_MTZ2-Off_Level; 9
    12.     dc.w Level_MTZ3-Off_Level; 10
    To this:
    Code (Text):
    1. Off_Level:
    2.     dc.l Level_EHZ1-Off_Level
    3.     dc.l Level_EHZ2-Off_Level; 1
    4.     dc.l Level_EHZ1-Off_Level; 2
    5.     dc.l Level_EHZ1-Off_Level; 3
    6.     dc.l Level_CPZ1-Off_Level; 4
    7.     dc.l Level_CPZ2-Off_Level; 5
    8.     dc.l Level_EHZ1-Off_Level; 6
    9.     dc.l Level_EHZ1-Off_Level; 7
    10.     dc.l Level_MTZ1-Off_Level; 8
    11.     dc.l Level_MTZ2-Off_Level; 9
    12.     dc.l Level_MTZ3-Off_Level; 10
    Now it will build, but the layouts will be all screwed up. I have no idea what to do with it now. Any help?
     
  12. MoDule

    MoDule

    Tech Member
    327
    24
    18
    Procrastinating from writing bug-fix guides
    Are you still decompressing the layouts at the beginning of the level?
     
  13. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    No They are by default decompressed
     
  14. SMTP

    SMTP

    Tech Member
    Yes, the layouts need to use the dc.w instruction or it'll be corupt ingame. One way to work around this, as sloppy was it may be, is to make 2 seperate tables.

    One table for zones 0-9, another table for zones A-10.

    You'll have to modify the zone loading code of course.
     
  15. You have:
    Code (ASM):
    1. loadLevelLayout:
    2.     moveq    #0,d0
    3.     move.w    (Current_ZoneAndAct).w,d0
    4.     ror.b    #1,d0
    5.     lsr.w    #6,d0
    6.     lea    (Off_Level).l,a0
    Change it to:
    Code (ASM):
    1. loadLevelLayout:
    2.     moveq    #0,d0
    3.     move.w    (Current_ZoneAndAct).w,d0
    4.     ror.b    #1,d0
    5.     lsr.w    #5,d0
    6.     lea    (Off_Level).l,a0
    What this does is changes how much the game shifts the overall word by to calculate the correct offset. The simplest way to understand it is think in terms of bits. After the move.w (Current_ZoneAndAct).w,d0, d0, in bits, looks like:
    Code (Text):
    1. XXXXXXXX 0000000Y
    where XXXXXXXX is the zone and Y the act (0 or 1). After the ror.b #1,d0, it looks like:
    Code (Text):
    1. XXXXXXXX Y0000000
    Now the game needs to calculate how much space each entry takes. The act currently occupies bit 7. If you want to have 2 bytes per act, you need to get the act in bit 1 (since 2^1 = 2), so you right-shift by (7 - 1) = 6. If you want to have 4 bytes per act, however, you need to get the act in bit 2 (since 2^2 = 4), so you only right-shift by (7 - 2) = 5. If you wanted to have 8 bytes per act, you'd right shift by 4, and if you only had a byte per act, you'd right shift by 7, and so on and so forth.
     
  16. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    I tried that and it seems to work. Although I did it a little differently. Thanks SMTP.

    I tried shobiz's idea but it didn't work. Also, thanks for explaining what those comands actually do as I never really knew what they did.
     
  17. Oops, didn't notice this yesterday. This should be:
    Code (Text):
    1. Off_Level:
    2.      dc.l Level_EHZ1
    3.      dc.l Level_EHZ2; 1
    4.      dc.l Level_EHZ1; 2
    5.      ...
    That along with the lsr.w change should definitely work.

    EDIT: Whoops, I'm not thinking clearly right now. You'll have to change both that and this:
    Code (ASM):
    1. loadLevelLayout:
    2.     moveq   #0,d0
    3.     move.w  (Current_ZoneAndAct).w,d0
    4.     ror.b   #1,d0
    5.     lsr.w   #6,d0
    6.     lea (Off_Level).l,a0
    7.     move.w  (a0,d0.w),d0
    8.     lea (a0,d0.l),a0
    to
    Code (ASM):
    1. loadLevelLayout:
    2.     moveq   #0,d0
    3.     move.w  (Current_ZoneAndAct).w,d0
    4.     ror.b   #1,d0
    5.     lsr.w   #5,d0
    6.     lea (Off_Level).l,a0
    7.     movea.l (a0,d0.w),a0
     
  18. Alriightyman

    Alriightyman

    I am back... from the dead! Tech Member
    357
    11
    18
    Somewhere in hot, death Florida
    0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
    UPDATE:
    Ok, time for an updated release! I've decided to name it Sonic 2: S3 Edition, however I may still change its name.
    What's New:
    1) Act transitions in all levels. Excluding sky chase, wing fortress, and death egg.
    2) Fully functional InstaShield (Even extends sonic's attack radius)
    3) Tails can fly and swim.
    4) Using S3K ring management system (Thanks to Shobiz)
    5) Backgrounds scroll (Didn't scroll in previous release)
    6) Slight changes to level design (makes transitions flow better)
    7) 2 player mode removed (goes to options if selected)
    8) Timer and rings reset at start of act 2.
    9) Double Jump to change into Super Sonic

    Current Known Bugs:
    1) No act 2 or 3 title cards as of right now.
    2) After playing Special Stages, start at begining of level.
    3) No sound effect for tails' flying animations
    4) Tails' swim animation is buggy, sometimes crashes.
    5) Sonic's balance animations are not correct.
    Click for Current Release
    Let me know what you all think and of any other bugs that are found.
    Thanks to anyone who helped me with anything, and to anyone who made any utility used in this hack.
    Enjoy!
     
  19. Hmmm, the Title cards are broken :D

    Well, this hack seems to go pretty cool though :thumbsup:
     
  20. Dracula

    Dracula

    Oldbie
    605
    0
    16
    I'm watching you!
    Converting NES Mappers to MMC5
    Awesome!
     
Thread Status:
Not open for further replies.