SoniCPort (Sonic 1 C Port)

Discussion in 'Engineering & Reverse Engineering' started by CuckyDev, Feb 17, 2021.

Tags:
  1. CuckyDev

    CuckyDev

    Member
    6
    18
    3
    SoniCPort
    sonicport0.png
    SoniCPort, as the title of this thread would imply, a C port of Sonic 1.

    About the Project
    I started this project about a month ago, mainly because I wanted to do a C port of Sonic 1. That's about it.
    In order to do this, I would have to read all the game's code, and translate it by hand to C, then make sure everything's working properly and the same as the original.

    It's still pretty early in development, so there may be some incredibly obscure inaccuracies I've missed, so if you do find any, be sure to report them. Preferably as an issue on the GitHub repository, which can be found below.
    There's also no audio yet, and the backend is generally incomplete.

    GitHub repository: https://github.com/cuckydev/SoniCPort

    Credits
    Sonic Team - Original game
    Sonic Retro - Sonic 1 Disassembly
    MarkeyJester - SSRG splash screen
    Clownacy - Additional porting (decompression routines)

    Screenshots
    sonicport0.png sonicport1.png sonicport2.png sonicport3.png
     

    Attached Files:

  2. Alex Field

    Alex Field

    Tails is a girl, apparently. Member
    104
    62
    28
    Downunda, Mobius
    Sonic the Hedgehog 2+, Sonic the Hedgehog 3+
    Impressive! Too bad it doesn't work on my PC.
     
  3. CuckyDev

    CuckyDev

    Member
    6
    18
    3
    Huh? What's the issue?
     
  4. Hez

    Hez

    Asshole Oldbie
    3,169
    144
    43
    Hell
    Your mother
    I'm actually super interested in where this goes.
     
  5. Alex Field

    Alex Field

    Tails is a girl, apparently. Member
    104
    62
    28
    Downunda, Mobius
    Sonic the Hedgehog 2+, Sonic the Hedgehog 3+
    Just loads a white screen.
     
  6. CuckyDev

    CuckyDev

    Member
    6
    18
    3
    I'm not sure why this could be. Maybe your gpu or drivers don't support whatever SDL_LockTexture is doing.
     
  7. Vangar

    Vangar

    Member
    Awesome. Found one thing that i don't think happens in sonic 1 - if you jump and land on this ramp with speed going downward, sonic will lose his momentum:

    [​IMG]
     
  8. CuckyDev

    CuckyDev

    Member
    6
    18
    3
    This is actually the same behaviour as the original. Yeah, Sonic 1 has a lot more issues with how slopes are handled depending on if they're facing left or right than even just Sonic 2.
     
  9. Blastfrog

    Blastfrog

    Frog blast the vent core! Member
    This is pretty awesome, but I am curious about the scope of the project. It sounds like your goal is to make a straight port to C with no extra frills, but the fact that this is widescreen makes me curious how you intend to handle that feature or if you're considering any other enhancements such as bug-fixes. Will there be an option to run in 320x224? Will boss arenas be modified to accommodate?

    I'm also curious what your position on others forking the code is. Since it's open to the public on Github, I'd imagine you're pretty okay with it (obviously as long as the project and its participants are properly credited), but I just wanted to clarify.
     
  10. CuckyDev

    CuckyDev

    Member
    6
    18
    3
    There already is. The attached "SoniCPort_320.zip" file contains a 320x224 executable. On top of that, the source on GitHub is set to 320x224 by default (src/Constants.h).

    I'm perfectly fine with it. Hell, heyjoeway's already done it, and I imagine I don't have to say what for.
     
  11. Billy

    Billy

    RIP Oderus Urungus Member
    1,947
    50
    28
    Colorado, USA
    Indie games
    This is awesome. I wish I had something to contribute. I'm curious how you're thinking of porting the sound code over. I imagine it's a choice between emulate the chips, play recordings, or go all S&KC and port the songs to MIDI. Or maybe you've thought of something I haven't.