How to restore "S" monitor of Sonic 1

Discussion in 'Tutorials' started by rafit_000, Jul 17, 2020.

  1. rafit_000

    rafit_000 Newcomer In Limbo

    Joined:
    Jul 10, 2018
    Messages:
    10
    Location:
    Brazil
    Everyone knows that in the classic 16-bit video game Sonic The Hedgehog for Mega Drive, it has many unused elements, including power-up monitors. There is the Eggman monitor that hurts you, there is also the goggle monitor that gives you infinite air in the water that even today, I don’t know how to add their sprites, and the monitor with an "S" that I think means "Super". He would gives invincibility and super speed. But the Eggman monitor was restored by Nineko, Goggle monitor by Theocas and Where's the "Super" Monitor"? That's what we're going to find out today! Today you gonna learn How to Restore "S" Monitor at the Hivebrain Disassembly! Hajimemashou!

    First of all you need to go to this line:

    Code:
    Obj2E_ChkS:
            cmpi.b    #7,d0        ; does monitor contain 'S'
            bne    Obj2E_End
            nop
    
    Obj2E_ChkEnd:
            rts            ; 'S' and goggles monitors do nothing
    I'm using the Disassembly of Sega CD version by HCKTROX.

    You need to delete, comment out or copy over "nop". Now, add this line

    Code:
            move.w    #$4B0,($FFFFD032).w ; time limit for the power-up
            move.b    #1,($FFFF8E2D).w ; make    Sonic invincible
            move.w    #$C00,($FFFFF760).w ; change Sonic's top speed
            move.w    #$18,($FFFFF762).w
            move.w    #$80,($FFFFF764).w
            bset    #1,($0FF8034).l
    And copy every thing from "Invinc" and "Shoes". Now it will be like that:

    Code:
    Obj2E_ChkS:
            cmpi.b    #7,d0        ; does monitor contain 'S'
            bne    Obj2E_ChkGoggles
            move.w    #$4B0,($FFFFD032).w ; time limit for the power-up
            move.b    #1,($FFFF8E2D).w ; make    Sonic invincible
            move.w    #$C00,($FFFFF760).w ; change Sonic's top speed
            move.w    #$18,($FFFFF762).w
            move.w    #$80,($FFFFF764).w
            bset    #1,($0FF8034).l
            bset    #2,($0FF8034).l
            bset    #3,($0FF8034).l
            move.b    #$38,($FFFFD200).w ; load stars    object ($3801)
            move.b    #1,($FFFFD21C).w
            move.b    #$38,($FFFFD240).w ; load stars    object ($3802)
            move.b    #2,($FFFFD25C).w
            move.b    #$38,($FFFFD280).w ; load stars    object ($3803)
            move.b    #3,($FFFFD29C).w
            move.b    #$38,($FFFFD2C0).w ; load stars    object ($3804)
            move.b    #4,($FFFFD2DC).w
            tst.b    ($FFFFF7AA).w    ; is boss mode on?
            bne    Obj2E_NoMusic    ; if yes, branch
        ;    move.w    #$87,d0
        ;    jmp    (PlaySound).l    ; play invincibility music
    Have fun with your "S" monitor!
     
  2. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    Yeah, I somehow got credited for that guide only because I pasted a snippet of code in a topic on Sonic Retro in 2008, but I actually wasn't the original author of such code, it probably was Puto or Tweaker, I don't really remember. Ironically, I did write my own code when I implemented the "S" monitor in my hack.

    edit: fixed a typo
     
    Last edited: Jan 2, 2021
  3. rafit_000

    rafit_000 Newcomer In Limbo

    Joined:
    Jul 10, 2018
    Messages:
    10
    Location:
    Brazil
    Yeah, I already tried to find the tutorials and I hadn’t found anything, so I improvised and succeeded! All the work I had to restore the disused monitors, I was very excited, in fact, when I saw SoniNeko and played, I was very impressed, because there were a lot of new monitors, new zone, great and big music slot. But with the goggle monitor. I can not add the sprites to Sonic when I broken the monitor. I even used a Hex Editor to use the Goggle Sprite and "mission failed"! And just for the record, I restored the goggle monitor thanks to Theocas.
     
    nineko likes this.
  4. Ronald Rose

    Ronald Rose Newcomer In Limbo

    Joined:
    Feb 7, 2016
    Messages:
    10
    The goggles aren't working for me in the Hivebrain version. What should I do to get the goggles working?