Mini-tutorials Thread

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

Tags:
  1. Devon

    Devon pfp by @litchui on Twitter Member

    Joined:
    Aug 26, 2013
    Messages:
    1,479
    Location:
    your mom
    v_player = $FFFFD000
     
    PeanutNoceda likes this.
  2. TheSunsetHacker

    TheSunsetHacker Newcomer Trialist

    Joined:
    Feb 13, 2024
    Messages:
    24
    Location:
    Emerald Coast
    HOW TO GET A SONIC 3 ESQUE TITLE CARD BANNER IN SONIC 1 HIVEBRAIN

    *Quick note :This is simple to put into Github's disassembly aswell (Update coming Soon).

    So first you need to find "Map_obj34", It should look like this

    Code:
    Map_obj34:    dc.w byte_C9FE-Map_obj34
            dc.w byte_CA2C-Map_obj34
            dc.w byte_CA5A-Map_obj34
            dc.w byte_CA7A-Map_obj34
            dc.w byte_CAA8-Map_obj34
            dc.w byte_CADC-Map_obj34
            dc.w byte_CB10-Map_obj34
            dc.w byte_CB26-Map_obj34
            dc.w byte_CB31-Map_obj34
            dc.w byte_CB3C-Map_obj34
            dc.w byte_CB47-Map_obj34  ; byte_CB47 is the Oval
            dc.w byte_CB8A-Map_obj34
    And obviously marked byte_CB47, is the Oval. So just paste this code into "byte_CB47"

    Code:
    byte_CB47:    dc.b $30
            dc.b $A0, 5, 0, $7C, $F8
            dc.b $A0, 5, 0, $7C, 8
            dc.b $B0, 5, 0, $7C, $F8
            dc.b $B0, 5, 0, $7C, 8
            dc.b $A0, 5, 0, $7C, $18
            dc.b $B0, 5, 0, $7C, $18
            dc.b $C0, 5, 0, $7C, $F8
            dc.b $C0, 5, 0, $7C, 8
            dc.b $C0, 5, 0, $7C, $18
            dc.b $D0, 5, 0, $7C, $F8
            dc.b $E0, 5, 0, $7C, $F8
            dc.b $F0, 5, 0, $7C, $F8
            dc.b 0, 5, 0, $7C, $F8
            dc.b $10, 5, 0, $7C, $F8
            dc.b $10, 5, 0, $7C, 8
            dc.b $10, 5, 0, $7C, $18
            dc.b 0, 5, 0, $7C, 8
            dc.b 0, 5, 0, $7C, $18
            dc.b $F0, 5, 0, $7C, 8
            dc.b $F0, 5, 0, $7C, $18
            dc.b $D0, 5, 0, $7C, 8
            dc.b $D0, 5, 0, $7C, $18
            dc.b $E0, 5, 0, $7C, 8
            dc.b $E0, 5, 0, $7C, $18
            dc.b $20, 5, 0, $7C, $F8
            dc.b $30, 5, 0, $7C, $F8
            dc.b $20, 5, 0, $7C, 8
            dc.b $30, 5, 0, $7C, 8
            dc.b $20, 5, 0, $7C, $18
            dc.b $30, 5, 0, $7C, $18
            dc.b $30, 5, 0, $7C, $E8
            dc.b $20, 5, 0, $7C, $E8
            dc.b $10, 5, 0, $7C, $E8
            dc.b 0, 5, 0, $7C, $E8
            dc.b $F0, 5, 0, $7C, $E8
            dc.b $E0, 5, 0, $7C, $E8
            dc.b $D0, 5, 0, $7C, $E8
            dc.b $C0, 5, 0, $7C, $E8
            dc.b $B0, 5, 0, $7C, $E8
            dc.b $A0, 5, 0, $7C, $E8
            dc.b $40, 5, 0, $7C, $E8
            dc.b $40, 5, 0, $7C, $F8
            dc.b $40, 5, 0, $7C, 8
            dc.b $40, 5, 0, $7C, $18
            dc.b $50, 5, 0, $7C, $E8
            dc.b $50, 5, 0, $7C, $F8
            dc.b $50, 5, 0, $7C, 8
            dc.b $50, 5, 0, $7C, $18
    
    And you should result in in having a Sonic 3 Esque Title Card Banner, like this

    *Edit 12:14 AM 3/30/2025: The Banner will only change color if Sonic's palette is altered (Cuz The blue is his blue).
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
    Blue Gamer and PeanutNoceda like this.
  3. Blue Gamer

    Blue Gamer Autistic Member Member

    Joined:
    Aug 16, 2024
    Messages:
    183
    Location:
    Mysterious Marble Zone, Bird Hill Island
    Sorry to break the news to you, but the s3 title card banner is on the left and the color of it is red, although the different color could be a cool idea to show off different characters.
     
  4. PeanutNoceda

    PeanutNoceda The last classic, is the one I join Member

    Joined:
    Sep 26, 2024
    Messages:
    251
    Location:
    Carnival Night, Angel Island
    2 Questions:
    1. Why Sonic disappears when the title card appears?
    blastem_20250330_092821.png
    2. Uhhh... What?
    blastem_20250330_092931.png
     
  5. Devon

    Devon pfp by @litchui on Twitter Member

    Joined:
    Aug 26, 2013
    Messages:
    1,479
    Location:
    your mom
    That banner uses an absurd number of small little sprite pieces (48!!). The maximum number of sprites that can be displayed in one state is 80 sprites (when the horizontal resolution is 320px, 64 for 256px mode). That leaves very little space in the sprite table in VRAM for the other sprites, and as such, once space runs out, whatever sprites that won't fit just will not be displayed. It would be better to expand the blue tiles from 4 to 16 tiles, and use 32x32 sprite pieces instead of 16x16. It would cut the number of pieces down to just 12.
     
  6. TheSunsetHacker

    TheSunsetHacker Newcomer Trialist

    Joined:
    Feb 13, 2024
    Messages:
    24
    Location:
    Emerald Coast
    I know its not fully accurate to Sonic 3 but thats the banner Some hacks use, this can be fixed by just changing the X-Position.
     
    IAmAShad0 likes this.
  7. PeanutNoceda

    PeanutNoceda The last classic, is the one I join Member

    Joined:
    Sep 26, 2024
    Messages:
    251
    Location:
    Carnival Night, Angel Island
    (Original guide by Tweaker And Puto in Sonic Retro)
    If you played Sonic 1, maybe you remember thhe speed cap, if not, heres a example.
    ezgif-337c68dc19abb6.gif
    Already saying this, lets go to action!
    Go to "_IncObj/Sonic Move.asm" And go to Sonic_MoveLeft, you will find this:
    Code:
    [/SIZE]
    ; ||||||||||||||| S U B    R O U T    I N E |||||||||||||||||||||||||||||||||||||||
    Sonic_MoveLeft:
           move.w    obInertia(a0),d0
           beq.s    loc_13086
           bpl.s    loc_130B2
    loc_13086:
           bset    #0,obStatus(a0)
           bne.s    loc_1309A
           bclr    #5,obStatus(a0)
           move.b    #id_Run,obPrevAni(a0) ; restart Sonic's animation
    loc_1309A:
           sub.w    d5,d0
           move.w    d6,d1
           neg.w    d1
           cmp.w    d1,d0
           bgt.s    loc_130A6
           move.w    d1,d0
    loc_130A6:
           move.w    d0,obInertia(a0)
           move.b    #id_Walk,obAnim(a0) ; use walking animation
           rts 
    ; ===========================================================================
    loc_130B2:
           sub.w    d4,d0
           bcc.s    loc_130BA
           move.w    #-$80,d0
    loc_130BA:
           move.w    d0,obInertia(a0)
           move.b    obAngle(a0),d0
           addi.b    #$20,d0
           andi.b    #$C0,d0
           bne.s    locret_130E8
           cmpi.w    #$400,d0
           blt.s    locret_130E8
           move.b    #id_Stop,obAnim(a0) ; use "stopping" animation
           bclr    #0,obStatus(a0)
           move.w    #sfx_Skid,d0
           jsr    (PlaySound_Special).l    ; play stopping sound
    locret_130E8:
           rts 
    ; End of function Sonic_MoveLeft
    ; ||||||||||||||| S U B    R O U T    I N E |||||||||||||||||||||||||||||||||||||||
    Sonic_MoveRight:
           move.w    obInertia(a0),d0
           bmi.s    loc_13118
           bclr    #0,obStatus(a0)
           beq.s    loc_13104
           bclr    #5,obStatus(a0)
           move.b    #id_Run,obPrevAni(a0) ; restart Sonic's animation
    loc_13104:
           add.w    d5,d0
           cmp.w    d6,d0
           blt.s    loc_1310C
           move.w    d6,d0
    loc_1310C:
           move.w    d0,obInertia(a0)
           move.b    #id_Walk,obAni
    m(a0) ; use walking animation
           rts 
    ; ===========================================================================
    loc_13118:
           add.w    d4,d0
           bcc.s    loc_13120
           move.w    #$80,d0
    loc_13120:
           move.w    d0,obInertia(a0)
           move.b    obAngle(a0),d0
           addi.b    #$20,d0
           andi.b    #$C0,d0
           bne.s    locret_1314E
           cmpi.w    #-$400,d0
           bgt.s    locret_1314E
           move.b    #id_Stop,obAnim(a0) ; use "stopping" animation
           bset    #0,obStatus(a0)
           move.w    #sfx_Skid,d0
           jsr    (PlaySound_Special).l    ; play stopping sound
    locret_1314E:
           rts 
    ; End of function Sonic_MoveRight
    
    
    And replace it with this one:
    Code:
    ; ||||||||||||||| S U B    R O U T    I N E |||||||||||||||||||||||||||||||||||||||
    Sonic_MoveLeft:           ; XREF: Sonic_Move
           move.w    $14(a0),d0
           beq.s    loc_13086
           bpl.s    loc_130B2
    loc_13086:
           bset    #0,$22(a0)
           bne.s    loc_1309A
           bclr    #5,$22(a0)
           move.b    #1,$1D(a0)
    loc_1309A:
           sub.w    d5,d0
           move.w    d6,d1
           neg.w    d1
           cmp.w    d1,d0
           bgt.s    loc_130A6
           add.w    d5,d0
           cmp.w    d1,d0
           ble.s    loc_130A6
           move.w    d1,d0
    loc_130A6:
           move.w    d0,obInertia(a0)
           move.b    #id_Walk,obAnim(a0) ; use walking animation
           rts
    ; ===========================================================================
    loc_130B2:
           sub.w    d4,d0
           bcc.s    loc_130BA
           move.w    #-$80,d0
    loc_130BA:
           move.w    d0,obInertia(a0)
           move.b    obAngle(a0),d0
           addi.b    #$20,d0
           andi.b    #$C0,d0
           bne.s    locret_130E8
           cmpi.w    #$400,d0
           blt.s    locret_130E8
           move.b    #id_Stop,obAnim(a0) ; use "stopping" animation
           bclr    #0,obStatus(a0)
           move.w    #sfx_Skid,d0
           jsr    (PlaySound_Special).l    ; play stopping sound
    locret_130E8:
           rts 
    ; End of function Sonic_MoveLeft
    ; ||||||||||||||| S U B    R O U T    I N E |||||||||||||||||||||||||||||||||||||||
    Sonic_MoveRight:       ; XREF: Sonic_Move
           move.w    $14(a0),d0
           bmi.s    loc_13118
           bclr    #0,$22(a0)
           beq.s    loc_13104
           bclr    #5,$22(a0)
           move.b    #1,$1D(a0)
    loc_13104:
           add.w    d5,d0
           cmp.w    d6,d0
           blt.s    loc_1310C
           sub.w    d5,d0
           cmp.w    d6,d0
           bge.s    loc_1310C
           move.w    d6,d0
    loc_1310C:
           move.w    d0,obInertia(a0)
           move.b    #id_Walk,obAnim(a0) ; use walking animation
           rts
    ; ===========================================================================
    loc_13118:
           add.w    d4,d0
           bcc.s    loc_13120
           move.w    #$80,d0
    loc_13120:
           move.w    d0,obInertia(a0)
           move.b    obAngle(a0),d0
           addi.b    #$20,d0
           andi.b    #$C0,d0
           bne.s    locret_1314E
           cmpi.w    #-$400,d0
           bgt.s    locret_1314E
           move.b    #id_Stop,obAnim(a0) ; use "stopping" animation
           bset    #0,obStatus(a0)
           move.w    #sfx_Skid,d0
           jsr    (PlaySound_Special).l    ; play stopping sound
           move.b  #6,($FFFFD1E4).w    ; set the spin dash dust routine to skid dust
           move.b  #$15,($FFFFD1DA).w
    locret_1314E:
           rts 
    ; End of function Sonic_MoveRight
    
    Now go to "_IncObj/ Sonic JumpDirection.asm" And replace all the code with this:
    Code:
    ; ---------------------------------------------------------------------------
    ; Subroutine to    change Sonic's direction while jumping
    ; ---------------------------------------------------------------------------
    ; ||||||||||||||| S U B    R O U T    I N E |||||||||||||||||||||||||||||||||||||||
    Sonic_JumpDirection:
           move.w    (v_sonspeedmax).w,d6
           move.w    (v_sonspeedacc).w,d5
           asl.w    #1,d5
           btst    #4,obStatus(a0)
           bne.s    Obj01_ResetScr2
           move.w    obVelX(a0),d0
           btst    #bitL,(v_jpadhold2).w ; is left being pressed?
           beq.s    loc_13278    ; if not, branch
           bset    #0,obStatus(a0)
           sub.w    d5,d0
           move.w    d6,d1
           neg.w    d1
           cmp.w    d1,d0
           bgt.s    loc_13278
           add.w    d5,d0        ; +++ remove this frame's acceleration change
           cmp.w    d1,d0        ; +++ compare speed with top speed
           ble.s    loc_13278    ; +++ if speed was already greater than the maximum, branch
           move.w    d1,d0
    loc_13278:
           btst    #bitR,(v_jpadhold2).w ; is right being pressed?
           beq.s    Obj01_JumpMove    ; if not, branch
           bclr    #0,obStatus(a0)
           add.w    d5,d0
           cmp.w    d6,d0
           blt.s    Obj01_JumpMove
           sub.w    d5,d0        ; +++ remove this frame's acceleration change
           cmp.w    d6,d0        ; +++ compare speed with top speed
           bge.s    Obj01_JumpMove    ; +++ if speed was already greater than the maximum, branch
           move.w    d6,d0
    Obj01_JumpMove:
           move.w    d0,obVelX(a0)    ; change Sonic's horizontal speed
    Obj01_ResetScr2:
           cmpi.w    #$60,(v_lookshift).w ; is the screen in its default position?
           beq.s    loc_132A4    ; if yes, branch
           bcc.s    loc_132A0
           addq.w    #4,(v_lookshift).w
    loc_132A0:
           subq.w    #2,(v_lookshift).w
    loc_132A4:
           cmpi.w    #-$400,obVelY(a0) ; is Sonic moving faster than -$400 upwards?
           bcs.s    locret_132D2    ; if yes, branch
           move.w    obVelX(a0),d0
           move.w    d0,d1
           asr.w    #5,d1
           beq.s    locret_132D2
           bmi.s    loc_132C6
           sub.w    d1,d0
           bcc.s    loc_132C0
           move.w    #0,d0
    loc_132C0:
           move.w    d0,obVelX(a0)
           rts 
    ; ===========================================================================
    loc_132C6:
           sub.w    d1,d0
           bcs.s    loc_132CE
           move.w    #0,d0
    loc_132CE:
           move.w    d0,obVelX(a0)
    locret_132D2:
           rts 
    ; End of function Sonic_JumpDirection
    
    The result should be something like this:
    ezgif-55adaea3440498.gif
    I hope this helped! Thank you!
     
    Blue Gamer likes this.
  8. SGAMERXD547

    SGAMERXD547 Newcomer Trialist

    Joined:
    Apr 1, 2025
    Messages:
    21
    HOW TO EDIT THE TIME DELAY ON END OF ACT BEFORE SCORES GETTING ADDED ON SONIC 1


    Note:this is designed for hivebrain's 2005 disassembler.Github users won't have a hard time making it work on their disassembler.

    Another note:This is my first tutorial so if there are errors,tell me in the comments

    First,go to loc_C61A(loc_C86C for special stage) and you should see something like this:

    Code:
    loc_C61A:                ; XREF: Obj3A_ChkPos
            cmpi.b    #$E,($FFFFD724).w
            beq.s    loc_C610
            cmpi.b    #4,$1A(a0)
            bne.s    loc_C5FE
            addq.b    #2,$24(a0)
            move.w    #180,$1E(a0)    ; set time delay to 3 seconds
    and special stages code:
    Code:
    loc_C86C:                ; XREF: Obj7E_ChkPos
            cmpi.b    #2,$1A(a0)
            bne.s    loc_C85A
            addq.b    #2,$24(a0)
            move.w    #180,$1E(a0)    ; set time delay to 3 seconds
            move.b    #$7F,($FFFFD800).w ; load chaos    emerald    object
    take a look at this code:
    Code:
    move.w    #180,$1E(a0)    ; set time delay to 3 seconds
    You see the 180 number?It works like fps aka frames per second,a second is 60 frame per second
    For example:if i want points to get added to score 1 second after the sign stops,i must replace 180 with 60.
    another example:if i want the points get added to score 10 seconds after sign stops,i must replace 60 with 600.
    a second:60
    two seconds:120
    three seconds:180
    .
    .
    .
    It goes 60 by 60
    you get the idea

    Bonus:HOWEVER if you want points gets added to score AFTER music stops instantly,do these two steps

    1st:For GHZ,MZ,SYZ,LZ,SLZ and SBZ
    Go to loc_C61A and change
    Code:
    move.w    #180,$1E(a0)    ; set time delay to 3 seconds
    to:
    Code:
    move.w    #270,$1E(a0)    ; set time delay to 4,5 seconds


    2nd:For Special Stages
    go to loc_C86C and change
    Code:
    move.w    #180,$1E(a0)    ; set time delay to 3 seconds
    to:
    Code:
    move.w    #320,$1E(a0)    ; set time delay to 5 seconds
    there you have it!

    A little note to the developers who changed the end of act music:This tutorial is very useful if you can't figure out how to change the time delay

    edit:Sorry for bad english
     
    Last edited: Jun 13, 2025 at 10:37 PM
  9. PeanutNoceda

    PeanutNoceda The last classic, is the one I join Member

    Joined:
    Sep 26, 2024
    Messages:
    251
    Location:
    Carnival Night, Angel Island
    HOW TO DISABLE (And enable) PALETTE CYCLES IN SONIC 1
    This guide is for sonic 1 github users.
    So, you want to disable or enable palette cycle?
    This mini-guide is for you.
    First of all, go to _Inc/PaletteCycle and go to any pal cycle of the level you want, for example:
    PalCycle_MZ ; Marble Zone

    For this tutorial im going to use MZ and GHZ as main examples.
    We start with enable them, one thing I do to do it, Is that I copy the code and I adapt it for the another level.
    If you dont know what Im talking about, here is what im trying to say:
    Code:
    PalCycle_MZ:
            lea    (Pal_MZCyc).l,a0
    PCycMZ_Go:
            subq.w    #2,(v_pcyc_time).w ; decrement timer
            bpl.s    PCycMZ_Skip    ; if time remains, branch
            move.w    #5,(v_pcyc_time).w ; reset timer to 5 frames
            move.w    (v_pcyc_num).w,d0 ; get cycle number
            addq.w    #1,(v_pcyc_num).w ; increment cycle number
            andi.w    #3,d0        ; if cycle > 3, reset to 0
            lsl.w    #3,d0
            lea    (v_palette+$50).w,a1
            move.l    (a0,d0.w),(a1)+
            move.l    4(a0,d0.w),(a1)    ; copy palette data to RAM
    PCycMZ_Skip:
            rts  
    ; End of function PalCycle_MZ
    
    And now, lets try it in game:
    blastem_20250526_163521.png
    It works!
    But... now how I can disable one?
    Easy, delete the whole code of the cycle routine and just add an rts under the main line, something like this:
    Code:
    PalCycle_GHZ:
            rts   
    
    And taraaa!
    blastem_20250526_163945.png
    You disabled it!
    This guide works if you want new stuff for the game, specially new game art, because a problem I haved is that when I port the palette of an level, it was confusing with the pal cycle, thats why I decided to do the guide lol.

    Anyway, see ya another time!
    I hope this helped.
     
  10. RobiWanKenobi

    RobiWanKenobi The one with the dog Member

    Joined:
    Sep 10, 2022
    Messages:
    151
    Location:
    Idaho

    This is a very odd way of doing this.

    Code:
    PalCycle_Index:    dc.w PalCycle_GHZ-PalCycle_Index
            dc.w PalCycle_LZ-PalCycle_Index
            dc.w PalCycle_MZ-PalCycle_Index
            dc.w PalCycle_SLZ-PalCycle_Index
            dc.w PalCycle_SYZ-PalCycle_Index
            dc.w PalCycle_SBZ-PalCycle_Index
            zonewarning PalCycle_Index,2
            dc.w PalCycle_GHZ-PalCycle_Index    ; Ending
    
    
    You could make a blank routine (or just use marble zone's stock routine), and make these calls jump there instead of destroying the entire palette cycle code.
     
  11. Yang

    Yang Newcomer Trialist

    Joined:
    Jan 14, 2025
    Messages:
    9
    This is the first tutorial, which is to
    put a code to select the stage with one movement
    It is very easy. Follow along with me. Put any movement you want. It is easy. Go to Sonic.asm and search for this LevSelCode_J

    Code
    LevSelCode_J: if Revision=0
    dc.b btnUp,btnDn,btnL,btnR,0,$FF
    else
    dc.b btnUp,btnDn,btnDn,btnDn,btnL,btnR,0,$FF
    endc
    even

    LevSelCode_US: dc.b btnUp,btnDn,btnL,btnR,0,$FF
    even

    Did you know that btndown is the code that gives you a level selection and all we have to do now is delete the buttons and leave only one button, otherwise it will not work. USA was not used. As for those who use JP, they do the same thing like this.

    Code
    LevSelCode_J: if Revision=0
    dc.b btnUp,0,$FF
    else
    dc.b btnUp,0,$FF
    endc
    even

    LevSelCode_US: dc.b btnUp,0,$FF
    even

    This lesson is short if you follow all of this it will work for you correctly
     
    Last edited: Jun 5, 2025
  12. Ronald Rose

    Ronald Rose Newcomer Trialist

    Joined:
    Feb 7, 2016
    Messages:
    21
    Try to type the following shown below.
    Code:
    LevSelCode_J:    if Revision=0
            dc.b btnUp,btnDn,btnL,btnR,0,$FF
            else
            dc.b btnUp,btnDn,btnDn,btnDn,btnL,btnR,0,$FF
            endif
            even
    
    LevSelCode_US:    dc.b btnUp,btnDn,btnL,btnR,0,$FF
            even
    
    Code:
    LevSelCode_J:    if Revision=0
            dc.b btnUp,0,$FF
            else
            dc.b btnUp,0,$FF
            endif
            even
    
    LevSelCode_US:    dc.b btnUp,0,$FF
            even
    
    And no double-posting, please?
     
  13. DeltaW

    DeltaW The noob next door Staff

    Joined:
    Aug 7, 2019
    Messages:
    476
    Another backseat mod situation in one day?

    I need to remind everyone that if you have an issue with someone's message, you can be helpful by reporting it, which will be resolved by a staff member.
     
  14. PeanutNoceda

    PeanutNoceda The last classic, is the one I join Member

    Joined:
    Sep 26, 2024
    Messages:
    251
    Location:
    Carnival Night, Angel Island
    So... hi again...
    What's up?
    I remembed, these questions about this error:
    223795C7-D41E-4580-8D96-AA33DC56B554.jpeg
    This is going to use the DMA showed in the Spindash guide, so, thanks to Puto and JGMR, withouth them, this can't be possible.
    So lets start.
    Create a new asm file in _Inc folder, you can put any name, for this tutorial, we are going to name the file as "DMA Queue", and in it, paste this:
    Code:
    DMA_68KtoVRAM:                ; CODE XREF: LoadSonicDynPLC+48?p
                       ; LoadTailsDynPLC+48?p ...
           movea.l    ($FFFFD3EE).w,a1
           cmpa.w    #$D3EE,a1
           beq.s    DMA_68KtoVRAM_NoDMA
           move.w    #$9300,d0
           move.b    d3,d0
           move.w    d0,(a1)+
           move.w    #$9400,d0
           lsr.w    #8,d3
           move.b    d3,d0
           move.w    d0,(a1)+
           move.w    #$9500,d0
           lsr.l    #1,d1
           move.b    d1,d0
           move.w    d0,(a1)+
           move.w    #$9600,d0
           lsr.l    #8,d1
           move.b    d1,d0
           move.w    d0,(a1)+
           move.w    #$9700,d0
           lsr.l    #8,d1
           move.b    d1,d0
           move.w    d0,(a1)+
           andi.l    #$FFFF,d2
           lsl.l    #2,d2
           lsr.w    #2,d2
           swap    d2
           ori.l    #$40000080,d2
           move.l    d2,(a1)+
           move.l    a1,($FFFFD3EE).w
           cmpa.w    #$D3EE,a1
           beq.s    DMA_68KtoVRAM_NoDMA
           move.w    #0,(a1)
    
    DMA_68KtoVRAM_NoDMA:            ; CODE XREF: DMA_68KtoVRAM+8?j
                       ; DMA_68KtoVRAM+56?j
           rts
    ; End of function DMA_68KtoVRAM
    
    
    ; ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ S U B    R O U T    I N E ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
    
    
    Process_DMA:                ; CODE XREF: ROM:00000D9C?p
                       ; ROM:00000E84?p ...
           lea    ($C00004).l,a5
           lea    ($FFFFD3C2).w,a1
    
    Process_DMA_Loop:            ; CODE XREF: Process_DMA+20?j
           move.w    (a1)+,d0
           beq.s    Process_DMA_End
           move.w    d0,(a5)
           move.w    (a1)+,(a5)
           move.w    (a1)+,(a5)
           move.w    (a1)+,(a5)
           move.w    (a1)+,(a5)
           move.w    (a1)+,(a5)
           move.w    (a1)+,(a5)
           cmpa.w    #$D3EE,a1
           bne.s    Process_DMA_Loop
    
    Process_DMA_End:            ; CODE XREF: Process_DMA+C?j
           move.w    #0,($FFFFD3C2).w
           move.l    #$FFFFD3C2,($FFFFD3EE).w
           rts
    ; End of function Process_DMA
    
    Thanks to Puto and JGMR for the code
    Now, go to "sonic.asm" and paste it below TilemapToVRAM and above include "_inc/Nemesis Decompression.asm", include the file:
    Code:
    ; End of function TilemapToVRAM
    
           include    "_inc/DMA Queue.asm"    ; <-- add this line!
           include    "_inc/Nemesis Decompression.asm"
    
    Now, go to .nochg located under the VBla_08 routine, and add these two lines at the beginning:
    Code:
           move.w    #$83,(v_vdp_buffer2).w
           jsr    (Process_DMA).l¨
    
    The queue should now be working.
    Thats all for now!
    If I forgot to do something on this tutorial, let me know to update it.

    PeanutNoceda: The guide
    Really Special Thanks to: Puto and JGMR