CD Sonic in Sonic 1

Discussion in 'Showroom' started by MemeMaster9000, Jul 5, 2023.

  1. MemeMaster9000

    MemeMaster9000 Newcomer Member

    Joined:
    Feb 12, 2023
    Messages:
    21
    Location:
    Ice Cap Zone
    A small little hack I stopped working on a while back... because I don't know where the disassembly for it is. I'm assuming it's on an old laptop.

    I started working on this hack while vacationing in Quebec. Had the idea, started working on it, got pretty far until, well, I lost it.

    I used BlastEm for the majority of debugging, but in these screenshots I was able to recover a older version of the hack that was fairly complete and emulated it in clownmdemu.

    The main goal for this hack was to make Sonic control accurately to how he does in Sonic CD. Since the codebase for CD was based off of 1, it was fairly easy to do.

    Screenshots:

    upload_2023-7-4_19-50-36.png
    Extended Camera!

    upload_2023-7-4_19-51-21.png
    Super Peel-out!

    upload_2023-7-4_19-52-27.png
    Always make sure to pause your game!

    upload_2023-7-4_19-53-14.png
    In-game credits. Thanks to the people written here!

    Feel free to comment or critique on what you see here. Don't be afraid to ask questions either!

    Since I don't really have plans to work on it right now, I think you guys can have a...
    Download!

    Have fun!
     
    Last edited: Jul 5, 2023
    Dark Shamil Khan and Nik Pi like this.
  2. RobiWanKenobi

    RobiWanKenobi Python Developer and ASM enthusiast Member

    Joined:
    Sep 10, 2022
    Messages:
    84
    Location:
    United States
    Do you have the ROM of the recovered older version, this looks pretty cool from what I can tell.

    If you do, send a response with the uploaded file or use some file sharing service to share it, like dropbox or google drive.
     
  3. MemeMaster9000

    MemeMaster9000 Newcomer Member

    Joined:
    Feb 12, 2023
    Messages:
    21
    Location:
    Ice Cap Zone
    Will do! Here:
    https://www.mediafire.com/file/ouloadpdkr8440v/cdsonicbeta_09-06-22.bin/file

    Keep in mind there are some inaccuracies and bugs. Otherwise, have fun with what's there. I hope you enjoy playing it as much as I did making it!
     
  4. RobiWanKenobi

    RobiWanKenobi Python Developer and ASM enthusiast Member

    Joined:
    Sep 10, 2022
    Messages:
    84
    Location:
    United States
    Bit of a Review.

    Physics feel spot on with Sonic CD, though I think Sonic CD had the roll-jump lock removed, which the roll-jump lock is present here.

    The sprites, I wasn't expecting that the walking animation would be the one from SCD, and that is a bonus for trying to make it accurate to SCD.

    The moves were fairly accurate to SCD with the exception of the sound, now if you are using a disassembly without asm music and sfx, I get it, but if you were, it would've been nice to hear the SCD peel-out/spindash sound in those moves. (The sound is included in a zip here since I can't send asm files)

    I also wasn't expecting the I'm out of here to work, but it does.

    You warned me that there were bugs, and you were right, this bug happens when you spindash next to a monitor, not if you peel-out however
    upload_2023-7-5_7-18-8.png
     

    Attached Files:

    MemeMaster9000 likes this.
  5. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,376
    Location:
    your mom
    This is indeed the case. Sonic CD also removed the ground speed cap, but didn't remove the air speed cap, so when you jump from rolling at a high speed and press left or right, it'll activate the speed cap and mess up your momentum.

    If you want to use the original sounds, then I have them (in ASM format as well) in my disassembly. Sound 9C in Sonic CD is the charge sound, Sound 91 is the release sound, and Sound AB is used to stop the charge sound, since it loops. They don't do anything particularly special, so they should be easy to port over to Sonic 1.

    This has to do with how the monitor handles the pushing flag. The thing with it is that if you are merely just situated right next to it, it will set the pushing flag, even if you're not actually holding left or right. The animation just won't show up until you do, because it only runs if you are in the walking/running animation (via a flag check in its handler).

    The monitor does include a special check for if you are in your rolling animation, because when you're rolling, you're supposed to go right through it.
    Code:
    .normal:    ; 2nd Routine 0
            move.w    #$1A,d1
            move.w    #$F,d2
            bsr.w    Mon_SolidSides
            beq.w    loc_A25C
            tst.w    obVelY(a1)
            bmi.s    loc_A20A
            cmpi.b    #id_Roll,obAnim(a1) ; is Sonic rolling?
            beq.s    loc_A25C    ; if yes, branch
    loc_A25C is the routine that handles when Sonic is not actually standing next to it, or if he is rolling through it. So, that leads us here:

    Code:
    loc_A25C:
            btst    #5,obStatus(a0)
            beq.s    Mon_Animate
            move.w    #1,obAnim(a1)    ; clear obAnim and set obNextAni to 1
    
    loc_A26A:
            bclr    #5,obStatus(a0)
            bclr    #5,obStatus(a1)
    
    Mon_Animate:    ; Routine 6
    This is where the issue lies. It checks if the pushing flag is set, and if it is it sets your animation to the walking/running one while also resetting it to the first frame. I think this is done to prevent some kind of animation problem? Well, the problem here is that this check is applied when you're rolling through the monitor, where the pushing animation isn't gonna be applied at.

    To fix that, go back up to ".normal", and change the branch to "loc_A25C" when checking if rolling to branch to "loc_A26A" instead. This will fix the animation not playing correctly when rolling next to the monitor, and will also fix Sonic's spindash being cancelled out due to that animation reset.
     
    Last edited: Jul 5, 2023
    KCEXE and MemeMaster9000 like this.
  6. RobiWanKenobi

    RobiWanKenobi Python Developer and ASM enthusiast Member

    Joined:
    Sep 10, 2022
    Messages:
    84
    Location:
    United States
    As a
    note with that, you'd have to change the channel it uses from FM1 or FM2 to FM3, FM4, or FM5 because of how the drivers work.
     
    MemeMaster9000, DeltaWooloo and Devon like this.
  7. Devon

    Devon I'm a loser, baby, so why don't you kill me? Member

    Joined:
    Aug 26, 2013
    Messages:
    1,376
    Location:
    your mom
    That is also true. I forgot about that.
     
    MemeMaster9000 likes this.
  8. MemeMaster9000

    MemeMaster9000 Newcomer Member

    Joined:
    Feb 12, 2023
    Messages:
    21
    Location:
    Ice Cap Zone
    Thanks for all your feedback and ways I can improve! Today, I have good news and bad news.

    The good news is: I found a backup disassembly!

    The bad news is: It isn't as complete as the backup build I posted.

    I do have some ideas in mind to make the porting process quicker, but it may take time. Even then, I think I know where the most up-to-date disassembly is, so i'll see if I can retrieve it there before picking up the hack from the backup disasm.

    As for your feedback:
    I did actually work on the hack more after the build I posted was made.

    I believe this was fixed.

    I actually ported over these sounds to the game fairly late, but they were in .bin format from what I remember. No idea how I got them.

    This was an issue I never got around to fixing, unfortunately, but I had an idea as to how I could fix it. This was exactly the idea I had in mind.

    With all that said, I can confirm: work on the hack will continue sometime soon. I appreciate all your feedback and look forward to improving!
     
  9. MemeMaster9000

    MemeMaster9000 Newcomer Member

    Joined:
    Feb 12, 2023
    Messages:
    21
    Location:
    Ice Cap Zone
    Unfortunate news:

    I've checked the old laptop in question and it appears that the files were removed at some point, so unfortunately the most recent disassembly is lost. Unless I can somehow recover the deleted(?) disassembly, I may have to start from scratch, which is the last thing I want to do, but I fear the older backup disassembly will be too difficult to work with.

    I will certainly try to get something close to the backup ROM, but if I can't, i'll start from scratch.

    This is very painful for me to do, as I poured a lot of effort into this hack, but a lot of you were impressed/pleased with the progress presented in the backup ROM, so I want to complete this hack and hopefully get something finished out to the masses.

    I thank you guys again for your feedback and will use it in the future.

    See y'all soon.
     
    astroblema likes this.