[Easy] Centering Sonic 1's Title Screen

Discussion in 'Tutorials' started by Kilo, Feb 6, 2020.

  1. Kilo

    Kilo Foxy Fren Exiled

    Joined:
    Oct 9, 2017
    Messages:
    391
    Location:
    A warm and lovely place~
    While it is difficult to notice without actually comparing the distances, you can find that Sonic 1's title screen is actually off center by 16 or so pixels.
    Off center.png
    Fixing this issue is actually quite easy, it's simply changing about 4 values.
    Emblem
    Fixing the emblem is a bit more difficult than Sonic, the Press Start Button message, and TM, as it is a tilemap instead of an object. To fix it, go to Title_LoadText: and locate
    Code:
            move.l    #$42060003,d0
            moveq    #$21,d1
            moveq    #$15,d2
    This handles the information relating to the tilemap, including it's X position. Simply change #$42060003 to #$42080003. That will center the "Sonic the Hedgehog" emblem, and Sega copyright.
    TileCenteredSpritesOff.png
    Oh dear, now all the objects are off-centered by a great amount. Fixing these will be a lot easier

    Sonic
    Compared to the emblem, getting Sonic's position down will be a lot easier. This is because the X position value isn't bunched together with other information. Simply go to Obj0E: and find this
    Code:
            move.w    #$F0,8(a0)

    $F0 is the position of the object, and 8(a0) is the X-position variable. All you need to do is add 8 to the position. This will shift Sonic to the right by, obviously, 8 pixels.
    Press Start Button & TM
    Just like Sonic, this is just adding 8 pixels to the X position.
    Find Obj0F: and this time, find 2 lines.

    Code:
            move.w    #$D0,8(a0)

    and
    Code:
            move.w    #$170,8(a0)
    As described, add 8 to the position values. (That's $D8 and $178 for those of you who can't count.)

    With everything done, it should result in this!
    Centered.png
     
  2. Ronald Rose

    Ronald Rose Newcomer In Limbo

    Joined:
    Feb 7, 2016
    Messages:
    10
    Thanks, Now I don't have to worry about the off centered mumbo jumbo. It really helps alot.
     
  3. paranoimia

    paranoimia Newcomer Trialist

    Joined:
    Feb 19, 2021
    Messages:
    2
    SVN/GitHub users, refer here:

    Emblem

    Go to sonic.asm, and find this bit of code under Tit_LoadText:
    Code:
    copyTilemap $FF0000,$C206,$21,$15
    
    Simply change $C206 to $C208.


    Sonic

    Go to 0E Title Screen Sonic.asm and go to the second line of TSon_Main:
    Code:
    move.w #$F0,obX(a0)
    
    Change #$F0 to #$F8.


    Press Start Button & TM

    Go to 0F Press Start and TM.asm and find these two lines:
    Code:
    move.w #$D0,obX(a0)
    and
    Code:
    move.w #$170,obX(a0)
    change #$D0 to #$D8 and change #170 to #178.
     
    EddyTF, DeltaWooloo and JGamer2151 like this.