Guest User

My nooby Sonic ASM code (causes freezing)

a guest
Nov 7th, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. SpecialStageHPZ_CheckActivation:
  2. move.w ($FFFFFAEC).w,d1 ;move subtype to d1
  3. cmp.w #0,d1 ;check if d1=0
  4. bne.s SpecialStageHPZ_CheckActivation1 ;if subtype is different, branch to next check
  5. move.w #1,($FFFFFAF2).w ;write to emerald specific ram to delete
  6. bra.s HPZemeralddeleteend
  7.  
  8. SpecialStageHPZ_CheckActivation1:
  9. cmp.w #1,d1 ;check if d1=1
  10. bne.s SpecialStageHPZ_CheckActivation2 ;if subtype is different, branch to next check
  11. move.w #1,($FFFFFAF4).w ;write to emerald specific ram to delete
  12. bra.s HPZemeralddeleteend
  13.  
  14. SpecialStageHPZ_CheckActivation2:
  15. cmp.w #2,d1 ;check if d1=2
  16. bne.s SpecialStageHPZ_CheckActivation3 ;if subtype is different, branch to next check
  17. move.w #1,($FFFFFAF6).w ;write to emerald specific ram to delete
  18. bra.s HPZemeralddeleteend
  19.  
  20. SpecialStageHPZ_CheckActivation3:
  21. cmp.w #3,d1 ;check if d1=3
  22. bne.s SpecialStageHPZ_CheckActivation4 ;if subtype is different, branch to next check
  23. move.w #1,($FFFFFAF8).w ;write to emerald specific ram to delete
  24. bra.s HPZemeralddeleteend
  25.  
  26. SpecialStageHPZ_CheckActivation4:
  27. cmp.w #4,d1 ;check if d1=4
  28. bne.s SpecialStageHPZ_CheckActivation4 ;if subtype is different, branch to next check
  29. move.w #1,($FFFFFAFA).w ;write to emerald specific ram to delete
  30. bra.s HPZemeralddeleteend
  31.  
  32. SpecialStageHPZ_CheckActivation5:
  33. cmp.w #5,d1 ;check if d1=5
  34. bne.s SpecialStageHPZ_CheckActivation4 ;if subtype is different, branch to next check
  35. move.w #1,($FFFFFAFC).w ;write to emerald specific ram to delete
  36. bra.s HPZemeralddeleteend
  37.  
  38. SpecialStageHPZ_CheckActivation6:
  39. cmp.w #6,d1 ;check if d1=6
  40. bne.s SpecialStageHPZ_CheckActivation4 ;if subtype is different, branch to next check
  41. move.w #1,($FFFFFAFE).w ;write to emerald specific ram to delete
  42.  
  43. HPZemeralddeleteend:
Add Comment
Please, Sign In to add comment