Actions

SCHG How-to

Difference between revisions of "How to port paralax plouds to the Nick Arcade prototype"

From Sonic Retro

m (Fixed multiple errors with grammar.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Hello everyone shadow05 here and today i'm going to show you how to port the scrolling clouds to the nick arcade prototype
+
Hello everyone, Shadow05 here and today I'm going to show you how to port the scrolling clouds to the Nick Arcade prototype.
  
First of all get the text nick arcade disassembly and the esrael assembler and then replace the entire routine with this
+
First of all, get the Text Sonic 2 Nick Arcade disassembly and the Esrael Assembler and then replace everything from Deform_HTZ: to the end of loc_63CC:  with this.
  
 
<syntaxhighlight lang="asm">
 
<syntaxhighlight lang="asm">
Line 132: Line 132:
 
         move.w  d3,d4
 
         move.w  d3,d4
 
         move.w  #$F,d1
 
         move.w  #$F,d1
 
 
  
 
loc_621E:
 
loc_621E:
Line 187: Line 185:
 
         rts
 
         rts
 
          
 
          
        loc_62B4:
+
loc_62B4:
 
         move.w  ($FFFFEEB0).w,d4
 
         move.w  ($FFFFEEB0).w,d4
 
         ext.l  d4
 
         ext.l  d4
Line 206: Line 204:
 
         neg.w  d0
 
         neg.w  d0
 
          
 
          
        loc_62F4:
+
loc_62F4:
 
         move.l  d0,(a1)+
 
         move.l  d0,(a1)+
 
         dbra    d1, loc_62F4
 
         dbra    d1, loc_62F4
Line 227: Line 225:
 
         neg.w  d0
 
         neg.w  d0
 
          
 
          
        loc_633C:
+
loc_633C:
 
         move.l  d0,(a1)+
 
         move.l  d0,(a1)+
 
         dbra    d1, loc_633C
 
         dbra    d1, loc_633C
Line 233: Line 231:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
that's it!
+
That's it! Now you have ported the paralax clouds in Hill Top Zone to the Sonic 2 Nick Arcade prototype.
 
 
Note by shadow05 i'm going to make a guide on how to port beta 4's background deformation system into the nick arcade prototype soon
 
  
 
{{S2BHowtos}}
 
{{S2BHowtos}}
[[Category:SCHG How-tos|Port parallax clouds to the nick arcade prototype]]
+
[[Category:SCHG How-tos|Port parallax clouds to the Nick Arcade prototype]]

Latest revision as of 10:53, 13 February 2019

Hello everyone, Shadow05 here and today I'm going to show you how to port the scrolling clouds to the Nick Arcade prototype.

First of all, get the Text Sonic 2 Nick Arcade disassembly and the Esrael Assembler and then replace everything from Deform_HTZ: to the end of loc_63CC: with this.

Deform_HTZ:				; DATA XREF: ROM:Deform_Index�o 
        tst.w   ($FFFFFFD8).w
        bne     loc_62B4
        tst.b   ($FFFFEEBC).w
        bne     loc_6236
        move.w  ($FFFFEE0C).w,($FFFFF618).w
        lea     ($FFFFE000).w,a1
        move.w  ($FFFFEE00).w,d0
        neg.w   d0
        move.w  d0,d2
        swap.w  d0
        move.w  d2,d0
        asr.w   #$3,d0
        move.w  #$7F,d1
loc_6134:
        move.l  d0,(a1)+
        dbra    d1, loc_6134
        move.l  d0,d4
        move.w  ($FFFFA822).w,d0
        addq.w  #$4,($FFFFA822).w
        sub.w   d0,d2
        move.w  d2,d0
        move.w  d0,d1
        asr.w   #$1,d0
        asr.w   #$4,d1
        sub.w   d1,d0
        ext.l   d0
        asl.l   #$8,d0
        divs.w  #$70,d0
        ext.l   d0
        asl.l   #$8,d0
        lea     ($FFFFA800).w,a2
        moveq	#0,d3
        move.w  d1,d3
        swap.w  d3
        add.l   d0,d3
        swap.w  d3
        move.w  d3,(a2)+
        swap.w  d3
        add.l   d0,d3
        swap.w  d3
        move.w  d3,(a2)+
        swap.w  d3
        add.l   d0,d3
        swap.w  d3
        move.w  d3,(a2)+
        move.w  d3,(a2)+
        swap.w  d3
        add.l   d0,d3
        add.l   d0,d3
        swap.w  d3
        moveq   #$3,d1

loc_642C:				; CODE XREF: ROM:0000642E�j
        move.w  d3,(a2)+
        move.w  d3,(a2)+
        move.w  d3,(a2)+
        swap.w  d3
        add.l   d0,d3
        add.l   d0,d3
        add.l   d0,d3
        swap.w  d3
        dbra    d1, loc_642C
        add.l   d0,d0
        add.l   d0,d0
        move.w  d3,d4
        move.l  d4,(a1)+
        move.l  d4,(a1)+
        move.l  d4,(a1)+
        swap.w  d3
        add.l   d0,d3
        swap.w  d3
        move.w  d3,d4
        move.l  d4,(a1)+
        move.l  d4,(a1)+
        move.l  d4,(a1)+
        move.l  d4,(a1)+
        move.l  d4,(a1)+
        swap.w  d3
        add.l   d0,d3
        swap.w  d3
        move.w  d3,d4
        move.w  #$6,d1

loc_61C6:
        move.l  d4,(a1)+
        dbra    d1, loc_61C6
        swap.w  d3
        add.l   d0,d3
        add.l   d0,d3
        swap.w  d3
        move.w  d3,d4
        move.w  #$7,d1

loc_61DA:
        move.l  d4,(a1)+
        dbra    d1, loc_61DA
        swap.w  d3
        add.l   d0,d3
        add.l   d0,d3
        swap.w  d3
        move.w  d3,d4
        move.w  #$9,d1

loc_61EE:
        move.l  d4,(a1)+
        dbra    d1, loc_61EE
        swap.w  d3
        add.l   d0,d3
        add.l   d0,d3
        add.l   d0,d3
        swap.w  d3
        move.w  d3,d4
        move.w  #$E,d1

loc_6204:
        move.l  d4,(a1)+
        dbra    d1, loc_6204
        swap.w  d3
        add.l   d0,d3
        add.l   d0,d3
        add.l   d0,d3
        swap.w  d3
        move.w  #$2,d2

loc_6218:
        move.w  d3,d4
        move.w  #$F,d1

loc_621E:
        move.l  d4,(a1)+
        dbra    d1, loc_621E
        swap.w  d3
        add.l   d0,d3
        add.l   d0,d3
        add.l   d0,d3
        add.l   d0,d3
        swap.w  d3
        dbra    d2, loc_6218 
        rts
        loc_6236:
        move.w  ($FFFFEEB4).w,d4
        ext.l   d4
        lsl.l   #$8,d4
        moveq   #$2,d6
        move.w  ($FFFFEEB6).w,d5
        ext.l   d5
        lsl.l   #$8,d5
        moveq	#0,d6
        move.w  ($FFFFEE0C).w,($FFFFF618).w
        move.w  ($FFFFEE04).w,($FFFFF616).w
        move.w  ($FFFFEE0C).w,($FFFFF618).w
        moveq	#0,d2
        tst.b   ($FFFFEEBD).w
        beq.s   loc_6292
        move.w  ($FFFFFE04).w,d0
        andi.w  #$3F,d0
 
        lea     $00(a1,d0), a1
        moveq	#0,d0
        move.b  (a1)+, d0
        add.w   d0,($FFFFF616).w
        add.w   d0,($FFFFF618).w
        add.w   d0,($FFFFEEF4).w
        move.b  (a1)+,d2
        add.w   d2,($FFFFEEF0).w
loc_6292:
        lea     ($FFFFE000).w,a1
        move.w  #$DF,d1
        move.w  ($FFFFEE00).w,d0
        add.w   d2,d0
        neg.w   d0
        swap.w  d0
        move.w  ($FFFFEE08).w,d0
        add.w   d2,d0
        neg.w   d0
loc_62AB:
        move.l  d0,(a1)+
        dbra    d1, loc_62AB
        rts
        
loc_62B4:
        move.w  ($FFFFEEB0).w,d4
        ext.l   d4
        asl.l   #$6,d4
        move.w  ($FFFFEEB2).w,d5
        ext.l   d5
        asl.l   #$2,d5
        moveq	#0,d5
        move.b  #$00,($FFFFEE52).w
        move.w  ($FFFFEE0C).w,($FFFFF618).w
        andi.l  #$FFFEFFFE,($FFFFF616).w
        lea     ($FFFFE000).w,a1
        move.w  #$6F,d1
        move.w  ($FFFFEE00).w,d0
        neg.w   d0
        swap.w  d0
        move.w  ($FFFFEE08).w,d0
        neg.w   d0
        
loc_62F4:
        move.l  d0,(a1)+
        dbra    d1, loc_62F4
        move.w  ($FFFFEEB8).w,d4
        ext.l   d4
        asl.l   #$6,d4
        add.l   d4,($FFFFEE28).w
        moveq	#0,d0
        move.w  d0,($FFFFF620).w
        subi.w  #$E0,($FFFFF620).w
        move.w  ($FFFFEE24).w,($FFFFF61E).w
        subi.w  #$E0,($FFFFF61E).w
        andi.l  #$FFFEFFFE,($FFFFF61E).w
        lea     ($FFFFE1B0).w,a1
        move.w  #$73,d1
        move.w  ($FFFFEE20).w,d0
        neg.w   d0
        swap.w  d0
        move.w  ($FFFFEE28).w,d0
        neg.w   d0
        
loc_633C:
        move.l  d0,(a1)+
        dbra    d1, loc_633C
        rts

That's it! Now you have ported the paralax clouds in Hill Top Zone to the Sonic 2 Nick Arcade prototype.

SCHG How-To Guide: Sonic 2 Beta (16-bit)
Design Choices
Add final spindash to Sonic 2 Beta | SCHG How-to:How to port paralax plouds to the Nick Arcade prototype