Mini-tutorials Thread

Discussion in 'Tutorials' started by DeltaWooloo, Feb 16, 2021.

Tags:
  1. DeltaWooloo

    DeltaWooloo The noob next door Member

    Joined:
    Aug 7, 2019
    Messages:
    360
    I updated the first mini-tutorial guide thanks to djohe. just remove the subq.b command. Including this is necessary as it can cancel the speed shoes while you gain invincibility and that wears off.

    Although, one alternative solution djohe suggested is to have Sonic flash while he still has stars so there wouldn't be an extension to Sonic's invincibility. While I'm yet to test it as of writing, once I attempt to add it successfully, I'll update the post.
     
    Last edited: Jan 26, 2023
  2. JGamer2151

    JGamer2151 Well-Known Member/Lurker Member

    Joined:
    Dec 1, 2020
    Messages:
    63
    (bump; sorry)
    This is more of a personal preference, but the other method that I did was putting the music loader under "Title_ChkLevSel" after the checks for the level select code and when button A is pressed. This was based on a method that was done in the Sonic 2 Simon Wai beta.

    For reference:
    Code:
    Title_ChkLevSel:
            tst.b    ($FFFFFFE0).w    ; check    if level select    code is    on
            beq.w    PlayLevel    ; if not, play level
            btst    #6,($FFFFF604).w ; check if A is pressed
            beq.w    PlayLevel    ; if not, play level
            move.b  #$XX,d0    ; "XX" is the ID number of the music you want to play
            bsr.w   PlaySound   ; play music
            moveq    #2,d0
            bsr.w    PalLoad2    ; load level select pallet
            lea    ($FFFFCC00).w,a1
            moveq    #0,d0
            move.w    #$DF,d1
    
    But yes, any of those you've mentioned above will also work.
     
    Dark Shamil Khan and EddyTF like this.
  3. EddyTF

    EddyTF #romhacker Member

    Joined:
    Jan 9, 2022
    Messages:
    65
    Location:
    Russia
    JGamer2151 likes this.
  4. JGamer2151

    JGamer2151 Well-Known Member/Lurker Member

    Joined:
    Dec 1, 2020
    Messages:
    63
    @EddyTF True. The location is up to the individual, anywhere near the level select code.
     
  5. ThDuckMaster

    ThDuckMaster Newcomer Trialist

    Joined:
    Feb 15, 2023
    Messages:
    1
    HOW TO MAKE THE LEVEL SELECT APPEAR WITHOUT THE CODE
    well to make this go to Tit_ChkLevSel
    Code:
    Tit_ChkLevSel:
            tst.b    (f_levselcheat).w ; delete this
            beq.w    PlayLevel    ; delete this
            btst    #bitA,(v_jpadhold1).w ; delete this
            beq.w    PlayLevel    ; delete this
            jmp Level_Select_Menu ; add this if you followed this guide: https://info.sonicretro.org/SCHG_How-to:Port_Sonic_2_Level_Select_to_Sonic_1
            moveq    #palid_LevelSel,d0
            bsr.w    PalLoad2    ; load level select palette
            lea    (v_hscrolltablebuffer).w,a1
            moveq    #0,d0
            move.w    #$DF,d1

    and done well its a really short tutorial but i didint see people making tutorials about this and is a little bit difficult to know how to not mess up every thing so uh well bye!
     
  6. newbegaplayer

    newbegaplayer Newcomer Prospect

    Joined:
    Feb 9, 2023
    Messages:
    10
    can you give me the dissasembly link?
     
  7. DeltaWooloo

    DeltaWooloo The noob next door Member

    Joined:
    Aug 7, 2019
    Messages:
    360
    It would've been helpful if you just do a Google search on "sonic 1 disassembly" and saw a GitHub repo or a link redirecting you to a list of disassemblies on Retro. Seeing as you asked nicely, click me to access the disassembly

    However, next time, it would've been better to do your research before immediately jumping to conclusions as it would've saved a lot of time on your end. :)
     
    EddyTF likes this.
  8. newbegaplayer

    newbegaplayer Newcomer Prospect

    Joined:
    Feb 9, 2023
    Messages:
    10
    no. i tried every sonic 2 beta 4 dissasembly but i couldnt find the labels. please give me the dissasembly you used;)
     
  9. newbegaplayer

    newbegaplayer Newcomer Prospect

    Joined:
    Feb 9, 2023
    Messages:
    10
    hey. when i tried to to the a button tutorial. i get an error at line 32792. its the blocks that pick eggman up.
     
  10. DeltaWooloo

    DeltaWooloo The noob next door Member

    Joined:
    Aug 7, 2019
    Messages:
    360
    You don't need to use another disassembly in order to implement this behaviour. Heck, I didn't even look at S2B4's disassembly to implement said behaviour. It was just luck after playing around with Sonic 1's code.

    It's only commenting out a few lines, you don't need to go through a barely documented disassembly in order to implement it. I clearly stated if you want to implement that feature in Sonic 1 implying that you should use a Sonic 1 disassembly like the link I sent you. Please re-read what I said next time and stop making things complicated for yourself.

    EDIT:
    It would be helpful if you show us the line specifically which will make things easier for us to lend you a hand.
     
    Last edited: Mar 19, 2023
  11. newbegaplayer

    newbegaplayer Newcomer Prospect

    Joined:
    Feb 9, 2023
    Messages:
    10
    oh! i see. sorry:confused:

    also.i thought this was the tutorial to fix the camera.
     
    Last edited by a moderator: Mar 19, 2023
  12. Giovanni

    Giovanni It's Joe-vanni, not Geo-vanni. Member

    Joined:
    Apr 16, 2015
    Messages:
    297
    Location:
    Italy
    This doesn't give us sufficient information to help you. Once you regain posting privileges, I'd appreciate knowing in more detail what error(s) you're getting when assembling. Please provide the contents of your errors log.
     
    Inferno and DeltaWooloo like this.
  13. Grosy

    Grosy Newcomer Trialist

    Joined:
    Dec 30, 2021
    Messages:
    19
    How to change sonics top speed (Sonic 1 github)
    THIS DOESNT WORK ON HIVEBRAIN ONLY ON GITHUB!

    Okay so lets begin first in the root of the disasembly open the file named "Sonic.asm" in a program like notepad (I will use notepad++ for this though).Now that you have opened the disasm you will search for the following code:

    *move.w #$600,(v_sonspeedmax).w ; Sonic's top speed
    Now that you have found the code change #$600 to for example to 800.
    Now build and congrats! You have changed the speed of sonic!


    NOTE:This does work on sonic 2 github and sonic 3 github but there are diffrent labels
    I also have provided a download for a disasembly that alredy has changed speed so if you are lazy to do it yourself here then and a rom is provided too for people who want to play it (even though its just a speed change). Also no need to credit me.
     

    Attached Files:

  14. Dark Shamil Khan

    Dark Shamil Khan TASer lol Member

    Joined:
    Nov 7, 2021
    Messages:
    80
    Location:
    Pakistan
    Umm. It also works on hivebrain Disassembly as well. You just need to find the right equivalent line. Here, v_sonspeedmax is a named variable for Sonic's max speed basically. It's basically equals to $FFFFF760.
    So, it'll be looking like this.
    move.w #$600,($FFFFF760).w ;Sonic's Top Speed
    But yeah, you can do it in hivebrain as well. Just need to know what ram is it equating to.
     
  15. Hame

    Hame Newcomer Trialist

    Joined:
    Jan 12, 2021
    Messages:
    16
    Location:
    Spain

    You can also change the acceleration and deceleration
     
  16. EddyTF

    EddyTF #romhacker Member

    Joined:
    Jan 9, 2022
    Messages:
    65
    Location:
    Russia
    @Grosy perhaps you haven't told me everything. In addition to the basic speed, you can change the speed of speed shoes. I will take GitHub as a basis. So, you need to open 2E Monitor Content Power-Up in _incObj folder. Find Pow_ChkShoes and there you can see this line:

    Code:
    move.w    #$C00,(v_sonspeedmax).w ; change Sonic's top speed
    And you can set any speed. For example, #$300 and you will get slow shoes lol

    But wait! After the expiration of the Speed Shoes time, you will get the previous speed of 600, out of order. We need to correct this misunderstanding.

    Go in Sonic Display (incObj folder :p) and we need to find it:

    Code:
    move.w    #$600,(v_sonspeedmax).w ; restore Sonic's speed
    You need to replace this with your speed.

    And I haven't told you everything yet. Next, figure it out for yourself.
     
  17. Grosy

    Grosy Newcomer Trialist

    Joined:
    Dec 30, 2021
    Messages:
    19
    Ok so i didnt know that until right now
     
  18. B.T.H Yeehaw!

    B.T.H Yeehaw! Newcomer Prospect

    Joined:
    Jun 20, 2020
    Messages:
    10
    Location:
    City Streets Zone
    How to disable Time Overs on the Sonic 1 GitHub Disassembly!

    It's actually a really simplistic thing to do, too! All you need to do is comment out three lines found in /_inc/HUD Update.asm on the TimeOver label!

    Code:
    TimeOver:
            clr.b    (f_timecount).w
    ;        lea    (v_player).w,a0 ;Comment out the following lines...
    ;        movea.l    a0,a2
    ;        bsr.w    KillSonic
    ;        move.b    #1,(f_timeover).w ;Until the move.b the sets the timeover flag. --B.T.H (Keep the rts, though.)
            rts    


    Now you can explore levels for more than 10 minutes at a time, because you've essentially removed the function that kills Sonic upon the 10 minute mark!
     
    Mega De Glitcher likes this.