don't click here

Tails in Sonic 2 (8-bit) *!Release!*

Discussion in 'Engineering & Reverse Engineering' started by Hackwrench, May 18, 2020.

  1. Hackwrench

    Hackwrench

    Member
    32
    30
    18
    Here's a video of a little project that I've been working on for quite some time now. It's near completion, and I'm working on a few tweaks before I release it.



    This was actually the first game that I ever owned, and at the time, I always wanted to play as Tails. Now 28 years after it's release, that wish starts to become reality.

    Edit: I have to thank everyone here for helping me to push this project further than I thought that I'd be able to. Unfortunately, I'm throwing in the towel on programming flight, and possibly a spindash into the game and releasing it as is. However, I'm going to include the flying sprites with the release if someone wants to work on it.

    Changes from previous post:
    Two frames of animation added to walk cycle to smooth out.
    Color palette change: dark blue is now dark red. (This also seems to be a fix, possibly a development oversight?)
    A few sprites reworked to take advantage of the dark red change.
    Sonic is now kidnapped and rescued.
    Life icon reworked.
    Hang glider is now red and yellow at all times matching the one on the Sky High zone card.
    Tails' tail's have been added to bubble and edge animations matching the Gimmick Mountain zone card.
    Tails' name has been added to the credits.

    Edit 7/15/20 Seems that I missed a sprite tile, fixed and repuloaded.

    Download Link: https://drive.google.com/file/d/14o6bnl6fRGBmng4H45gS2qUi7Rt0CdmI/view?usp=sharing
     
    Last edited: Jul 16, 2020
  2. SuperSonicRider

    SuperSonicRider

    Member
    200
    64
    28
    This looks so good!!! Nice job :)
     
  3. Really nice! Will we be able to select Sonic or Tails? I wonder how would it be if you implemented a new ending...
     
  4. Rrose80149

    Rrose80149

    Member
    90
    19
    8
    Can Tails Fly? I was thinking Knuckles or Rosy can be Captured. Which one?
    1. Knuckles
    2. Rosy
    I say Knuckles
     
  5. JustAMotobug

    JustAMotobug

    Eggman Robot Member
    98
    17
    8
    United States
    ????
    I shrugged this off at first until I realized Tails wasn't playable in this game period regardless of the fact that he's seen on every zone title card. It'd be cool to have him be interchangeable with Sonic.
     
  6. E-122-Psi

    E-122-Psi

    Member
    2,470
    612
    93
    Now THIS is the character hack that we needed from the start.

    Looking great so far (besides the bad spriting that was part of the original game like that derpy walk, though I get that can't be helped authenticity wise).

    By any chance does Sonic get rescued in the end?
     
  7. Hackwrench

    Hackwrench

    Member
    32
    30
    18
    Thank you to everyone who came to look and comment. I do appreciate both the compliments and critiques.

    Unfortunately, only Tails is playable in this hack. For a Sonic/Tails hack, the size of the ROM would have to be expanded to contain all of the sprite data. I know it's possible, but doing so is beyond my knowledge.

    As for who gets rescued in the end, I wanted to swap Tails for Sonic. But I just can't figure out the compression. Knuckles and Rosy simply didn't exist in 1992, so they were out. Watch the end of the video to see Tails rescue... Tails! :D

    As for extra abilities, it would be a dream come true to see flight and a spindash, but that's way out of my league. If anyone else happens to work on it, I would gladly provide the sprites.

    The bad spriting that was part of the original game was added intentionally as I wanted this mod to be as true to the time as possible. Any time I could use an original sprite, it was used. This is why no Chaos/Triple Trouble sprites were used. For those with a sharp eye who watched the whole video, there's one part where unused sprites can be seen in action. Tails... crying? Hmm... now where could I have snuck that in....?

    The derpy walk is caused by Sonic's walking animation being 6 frames, while Tails only has 4, I had to double up 2 of the 4 frames, but I'm currently working on adding 2 custom frames to clean it up a little.
     
  8. Glitch

    Glitch

    Tech Member
    175
    12
    18
    Nice work! Please make Tails rescue Sonic.

    https://info.sonicretro.org/SCHG_How-to:Relocate_Player_Object_Logic_in_Sonic_2_SMS

    If you want to add new abilities you have to add new states to the player object. That means editing this file:
    https://bitbucket.org/mark_mcs/sonic-2-sms-disassembly/src/master/src/object_logic/logic_sonic.asm

    and then you have to set the correct state from one of the controller input handler functions. For example, to add a flying capability like Sonic 3 you'd probably want to check for a jump button press in this subroutine:
    https://bitbucket.org/mark_mcs/sonic-2-sms-disassembly/src/master/src/s2.asm#lines-5105

    There's an "s2pack" tool in the disassembly repo that will compress/decompress tile art for you.
     
  9. Wafer

    Wafer

    Find me on Twitter instead Member
    255
    75
    28
    Also, since you mentioned that you'd need to expand the ROM to enable two playable characters, here's SMSPower's docs on mappers. Adding extra banks in itself isn't really hard, you just need to change the directives defining the banks near the start of the disasm, and add a bank and org directive for your new bank at the end of the ROM. Then when you need to switch to a bank, just write the appropriate index to the appropriate register for the slot you want to use. Now, hooking it up to the graphics routines is something you'd have to figure out yourself, I know next to nothing about the SMS VDP ¯\_(ツ)_/¯
     
    Last edited: May 20, 2020
  10. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,077
    176
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    Nice to see someone has been working on this! I remember someone on Youtube working on making Tails playable in Sonic 2 SMS a few years back, but I think the person who was working on it got overwhelmed with the project since many people kept asking for a download link so they stopped working on it as far as I know. :S You could port over Tails flight code from Sonic Chaos. :P I've partially done so before, but never finished it. (Plus my Chaos disassembly is far from being complete, and it'll probably never get finished anytime soon. :S) Also curious, you said you couldn't figure out the compression used for Tails' ending sprites? IIRC, they're compressed art so you should be able to edit them just fine in Aspect Edit. (It's been ages since I've hacked Sonic 2 SMS though.) He does have some uncompressed sprites, but even then Aspect Edit can open them.
     
  11. Hackwrench

    Hackwrench

    Member
    32
    30
    18
    I think I just found it. SavyIsJoshoArts? Though all I found was a video saying that it was cancelled. Shame, would've been nice to see what he'd gotten done. I can certainly sympathize with getting overwhelmed, I've stepped away from this hack several times to learn, practice sprite art, or just got busy with things in life. I hate to say it, but I've worked on this on and off for over 8 years now. I first made a proof of concept on March 2, 2012.
    Thanks for sharing Aspect Edit with me, I actually never knew about the program, and started tinkering with it. Up until this point, every edit I've made has been done in Tile and Hex editors.
     
  12. Glitch

    Glitch

    Tech Member
    175
    12
    18
  13. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,077
    176
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    Oof hex? I'd definitely suggest using Glitch's disassembly. You don't even have to start from scratch either, you can rip your sprites from your ROM and add them to each respective folder. It will definitely make assembler edits much easier.
     
  14. Hackwrench

    Hackwrench

    Member
    32
    30
    18
    Hate to sound like a total noob, but how do you do that? I've been using a tile editor that exports sprites to image files to rip, but the disassembly files are in .bin.
    On a side note, I don't see the life icon in the disassembly.

    That's not the first time that I've been told that. I made a FFXI mod a long time ago and my method was considered hard mode then too. I am learning Aspect Edit, but have found it either lacking some features or maybe I haven't found them yet, such as image importng.
    As for Hex Editing, there's two things that I learned from hacking NES games years back, palette and changing tile arrangements. I don't see the "Sonic has passed act" screen in the disassembly either, but that's fine. If I have to do it again, I'll do it in hex. It took me about 20-30 minutes to do the first time if memory serves me, it was one of my first changes.
     
  15. Hackwrench

    Hackwrench

    Member
    32
    30
    18
    Done! Big props to Ravenfreak for pointing me to Aspect Edit.
     
  16. Rrose80149

    Rrose80149

    Member
    90
    19
    8
    Looks like the roles have reversaled!
     
  17. Ravenfreak

    Ravenfreak

    2 Edgy 4 U Tech Member
    3,077
    176
    43
    O'Fallon Mo
    Sonic 1 Game Gear Disassembly
    The life icon is part of icon_numbers.bin and is located in the art/level directory of the disassembly. As for adding your new sprites, ripping them from your previous ROM via a hex editor and saving them as .bin files over Sonic's art should work, given if the tile arrangement is the same. (Which it should be, seeing that the sprites do show up correctly in your hack...) Unfortunately there's no import function in Aspect Edit, so if you were needing to edit Sonic's sprites (or any sprite for that matter) you'd have to manually edit each individual tile. May I ask what tool were you using previously? I generally just curious is all. :P
     
  18. Glitch

    Glitch

    Tech Member
    175
    12
    18
    I'll be the first to admit that Aspect Edit leaves a lot to be desired. It was born out of a need to visualise the resources while I was splitting out the disassembly. So it evolved organically from that standpoint, rather than with the intention of being a fully fledged editor. The biggest problems with it (aside from not being very user friendly) are the lack of image import, the quirky metatile export and the fact it doesn't support editing of screen maps. So, for the screen maps, you'll still need to tweak the bin files by hand. That being said, it does support palettes, tiles and levels with all of the relevant compression formats.

    The "Sonic has passed" screen map will be one of the bin files. Probably in here but don't quote me on that. This is the subroutine that handles what happens after Sonic hits an end of level sign post. It does the fade out, score card drawing, score counting and incrementing to the next act. The screen map file will be referenced somewhere in that flow.
     
  19. Hackwrench

    Hackwrench

    Member
    32
    30
    18
    I have started working on that, and editing every sprite tile by tile. I have quite a few tile editors, but the two that I use the most are Tile Layer Pro, and Master Tile Converter.
    I did find the life icon by the way, and changed it again using Aspect Edit. Before, in MTC, I was restricted to editing it in 3BPP mode, which restricted me to 8 colors. But AE seems to be able to rewrite it in 4BPP mode, so I was able to use all colors. Makes me wonder if it's possible to convert 3BPP ROMs to 4, and make them more colorful.
     
  20. ashthedragon

    ashthedragon

    Sonic Paradise Researcher
    1,428
    73
    28
    Spain
    Sonic Paradise & Sonic Ages
    wow, this is awesome!!!!!!!! Sonic 2 sms is my favourite Sonic game, and Tails is my favourite character. Being able to play as Tails on this game is something I've dreamed about a lot of times...

    hope we can play it soon!!!!
     
    Last edited: Jun 15, 2020