ASM to Sega Genesis Platform

Would you like to react to this message? Create an account in a few clicks or log in to continue.
ASM to Sega Genesis Platform

All about assembly programming in the Sega Genesis console.


+5
drumberboy1122
Kiki
Karate Cat
FRKPO
German15
9 posters

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    German15
    German15


    Mensagens : 51
    Data de inscrição : 2011-05-29
    Localização : Argentina
    Current Project : Sonic the Hedgehog MegaRetro

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  German15 Sun May 29, 2011 9:11 pm

    hello friends. Does anyone know how to add the three shields in sonic 1?. and I try but it did not. thanks Very Happy
    avatar
    FRKPO


    Mensagens : 46
    Data de inscrição : 2011-05-29

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  FRKPO Sun May 29, 2011 9:20 pm

    EHBJDFSGBTH


    Last edited by FRKPO on Fri Jul 29, 2011 12:24 am; edited 1 time in total
    Karate Cat
    Karate Cat


    Mensagens : 83
    Data de inscrição : 2011-04-22

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Karate Cat Sun May 29, 2011 9:42 pm

    There is a Sonic 1 Megamix disassembly, that has some of the sourcecode for the elemental shields. Theres also a tutorial on how to make rings come out of badniks instead of flickies. Smile
    avatar
    FRKPO


    Mensagens : 46
    Data de inscrição : 2011-05-29

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  FRKPO Sun May 29, 2011 9:45 pm

    EFWHPCOQIUWERCF


    Last edited by FRKPO on Fri Jul 29, 2011 12:23 am; edited 1 time in total
    avatar
    Kiki


    Mensagens : 21
    Data de inscrição : 2011-05-21

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Kiki Mon May 30, 2011 11:55 am

    Adding the Elemental Shields is a pain to do. I can't even get it right.
    German15
    German15


    Mensagens : 51
    Data de inscrição : 2011-05-29
    Localização : Argentina
    Current Project : Sonic the Hedgehog MegaRetro

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  German15 Mon May 30, 2011 12:36 pm

    if someone makes the code please upload it Very Happy
    Karate Cat
    Karate Cat


    Mensagens : 83
    Data de inscrição : 2011-04-22

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Karate Cat Mon May 30, 2011 2:45 pm

    Well, there's a quide to add the magnetic shield, you have to modify the original shield, it's simply replacing the normal shield. Here's the guide anyways. Wink

    Step 1:

    Looking for Obj25_Animate and after that line insert the following:

    Code:
    jsr Magnetize_Rings

    Step 2:

    Looking for...

    Code:
    ; End of function CollectRing

    and after it is inserted...

    Code:
    Magnetize_Rings:
      tst.b ($FFFFF7AA).w 
      beq.s Magnet_Normal 
      bne.s Magnet_Start
    Magnet_Normal:
      cmpi.b #1,($FFFFFE2C).w ; check Sonic has The shield
      bne Magnet_Ignore ; If yes goto magnetize_rings code
      beq Magnet_Start
    Magnet_Start:

      move.w ($FFFFD008).w,d0 ; load sonic's X possision
      sub.w $8(a0),d0 ; minus Ring's X possision
      move.w ($FFFFD00C).w,d1 ; load sonic's Y possision
      sub.w $C(a0),d1 ; minus Ring's Y possision
      btst #0,$2F(a0) ; has Ring been magnetized?
      bne.s MR_CheckRemove ; if so, branch
      bra.w MR_CheckMagnet ; check ring's distance

    Magnet_Ignore:
      rts ; return

    ; ===========================================================================
    ; Check Ring For Magnetize
    ; ===========================================================================

    MR_CheckMagnet:
      cmp.w #$60,d0 ; is ring out of range by 60 pixels on the left?
      bge.w MR_Resume_Rings ; if so, resume Ring's normal function
      cmp.w #-$60,d0 ; is ring out of range by 60 pixels on the Right?
      ble.w MR_Resume_Rings ; if so, resume Ring's normal function
      cmp.w #$60,d1 ; is ring out of range by 60 pixels Below?
      bge.w MR_Resume_Rings ; if so, resume Ring's normal function
      cmp.w #-$60,d1 ; is ring out of range by 60 pixels Above?
      ble.w MR_Resume_Rings ; if so, resume Ring's normal function

      bset #0,$2F(a0) ; set Ring as magnetized
      bclr #1,$2F(a0)
      bra.s SetRing_MoveLR 

    ; ===========================================================================
    ; Check Ring For Demagnetize
    ; ===========================================================================

    MR_CheckRemove:
      cmp.w #$C0,d0 ; is ring out of range by C0 pixels on the left? 
      bge.w MR_DemagetizeRing ; if so, spawn Ring
      cmp.w #-$C0,d0 ; is ring out of range by C0 pixels on the Right?
      ble.w MR_DemagetizeRing ; if so, spawn Ring
      cmp.w #$C0,d1 ; is ring out of range by C0 pixels Below?
      bge.w MR_DemagetizeRing ; if so, spawn Ring
      cmp.w #-$C0,d1 ; is ring out of range by C0 pixels Above?
      ble.w MR_DemagetizeRing ; if so, spawn Ring

      bclr #1,$2F(a0)
      bra.s SetRing_MoveLR

    ; ===========================================================================
    ; Set Ring Delete
    ; ===========================================================================

    MR_DemagetizeRing:
      jsr (DeleteObject).l ; delete Ring
      bset #1,$2F(a0)

    ; ===========================================================================
    ; Magnetize Ring Left/Right
    ; ===========================================================================

    SetRing_MoveLR:
      move.w #$0080,d3 ; set ring speed increase
      tst.w d0 ; is the ring to the left of sonic?
      blt.s MoveRing_Right1 ; if so, branch

    ; ===========================================================================
    ; Left

    MoveRing_Left1:
      tst.w $10(a0) ; is ring moving left?
      bgt.s MoveRing_Left2 ; if so, branch
      move.w #$00A0,d3 ; if not, set new speed increase

    MoveRing_Left2: 
      add.w d3,$10(a0) ; move ring left
      bra.s SetRing_MoveUD ; start Up and Down functions

    ; ===========================================================================
    ; Right

    MoveRing_Right1: 
      tst.w $10(a0) ; is ring moving right?
      blt.s MoveRing_Right2 ; if so, branch
      move.w #$00A0,d3 ; if not, set new speed increase

    MoveRing_Right2: 
      sub.w d3,$10(a0) ; move ring Right

    ; ===========================================================================
    ; Magnetize Ring Up/Down
    ; ===========================================================================

    SetRing_MoveUD:
      move.w #$0080,d3 ; set ring speed increase
      tst.w d1 ; is the ring above sonic?
      blt.s MoveRing_Up1 ; if so, branch

    ; ===========================================================================
    ; Down

    MoveRing_Down1:
      tst.w $12(a0) ; is ring moving down?
      bgt.s MoveRing_Down2 ; if so, branch
      move.w #$00A0,d3 ; if not, set new speed increase

    MoveRing_Down2: 
      add.w d3,$12(a0) ; move ring down
      jmp SpeedToPos ; start Possision Update

    ; ===========================================================================
    ; Up

    MoveRing_Up1:
      tst.w $12(a0) ; is ring moving Up?
      blt.s MoveRing_Up2 ; if so, branch
      move.w #$00A0,d3 ; if not, set new speed increase
     
    MoveRing_Up2:
      sub.w d3,$12(a0) ; move ring Up
      jmp SpeedToPos ; start Possision Update

    ; ===========================================================================
    ; Finish Ring
    ; ===========================================================================

    MR_Resume_Rings:
      btst #0,$2F(a0) ; has Ring been magnetized?
      beq.s MR_FinishRing ; if not, branch
      move.b #-1,($FFFFFEC6).w ; set ring frame rate
      bset #1,$2F(a0)
      bra.w Obj37_Bounce ; set ring to bounce
     
    MR_FinishRing: 
      bset #1,$2F(a0)
      rts

    That's it! Compile and verify. Original guide by Tails-Doll, translated to english by me, Karate Cat.
    German15
    German15


    Mensagens : 51
    Data de inscrição : 2011-05-29
    Localização : Argentina
    Current Project : Sonic the Hedgehog MegaRetro

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  German15 Mon May 30, 2011 3:27 pm

    THANKS! Smile
    Karate Cat
    Karate Cat


    Mensagens : 83
    Data de inscrição : 2011-04-22

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Karate Cat Mon May 30, 2011 3:46 pm

    YOU...ARE...WELCOME! Very Happy
    avatar
    FRKPO


    Mensagens : 46
    Data de inscrição : 2011-05-29

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  FRKPO Thu Jun 16, 2011 9:01 pm

    HTRSFG
    drumberboy1122
    drumberboy1122


    Mensagens : 20
    Data de inscrição : 2012-05-20

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  drumberboy1122 Fri May 25, 2012 10:01 pm

    Karate Cat wrote:Well, there's a quide to add the magnetic shield, you have to modify the original shield, it's simply replacing the normal shield. Here's the guide anyways. Wink

    Step 1:

    Looking for Obj25_Animate and after that line insert the following:

    Code:
    jsr Magnetize_Rings

    Step 2:

    Looking for...

    Code:
    ; End of function CollectRing


    When I apply this I get two errors for bsr.w MvSonicOnPtfm
    and after it is inserted...

    Code:
    Magnetize_Rings:
      tst.b ($FFFFF7AA).w 
      beq.s Magnet_Normal 
      bne.s Magnet_Start
    Magnet_Normal:
      cmpi.b #1,($FFFFFE2C).w ; check Sonic has The shield
      bne Magnet_Ignore ; If yes goto magnetize_rings code
      beq Magnet_Start
    Magnet_Start:

      move.w ($FFFFD008).w,d0 ; load sonic's X possision
      sub.w $8(a0),d0 ; minus Ring's X possision
      move.w ($FFFFD00C).w,d1 ; load sonic's Y possision
      sub.w $C(a0),d1 ; minus Ring's Y possision
      btst #0,$2F(a0) ; has Ring been magnetized?
      bne.s MR_CheckRemove ; if so, branch
      bra.w MR_CheckMagnet ; check ring's distance

    Magnet_Ignore:
      rts ; return

    ; ===========================================================================
    ; Check Ring For Magnetize
    ; ===========================================================================

    MR_CheckMagnet:
      cmp.w #$60,d0 ; is ring out of range by 60 pixels on the left?
      bge.w MR_Resume_Rings ; if so, resume Ring's normal function
      cmp.w #-$60,d0 ; is ring out of range by 60 pixels on the Right?
      ble.w MR_Resume_Rings ; if so, resume Ring's normal function
      cmp.w #$60,d1 ; is ring out of range by 60 pixels Below?
      bge.w MR_Resume_Rings ; if so, resume Ring's normal function
      cmp.w #-$60,d1 ; is ring out of range by 60 pixels Above?
      ble.w MR_Resume_Rings ; if so, resume Ring's normal function

      bset #0,$2F(a0) ; set Ring as magnetized
      bclr #1,$2F(a0)
      bra.s SetRing_MoveLR 

    ; ===========================================================================
    ; Check Ring For Demagnetize
    ; ===========================================================================

    MR_CheckRemove:
      cmp.w #$C0,d0 ; is ring out of range by C0 pixels on the left? 
      bge.w MR_DemagetizeRing ; if so, spawn Ring
      cmp.w #-$C0,d0 ; is ring out of range by C0 pixels on the Right?
      ble.w MR_DemagetizeRing ; if so, spawn Ring
      cmp.w #$C0,d1 ; is ring out of range by C0 pixels Below?
      bge.w MR_DemagetizeRing ; if so, spawn Ring
      cmp.w #-$C0,d1 ; is ring out of range by C0 pixels Above?
      ble.w MR_DemagetizeRing ; if so, spawn Ring

      bclr #1,$2F(a0)
      bra.s SetRing_MoveLR

    ; ===========================================================================
    ; Set Ring Delete
    ; ===========================================================================

    MR_DemagetizeRing:
      jsr (DeleteObject).l ; delete Ring
      bset #1,$2F(a0)

    ; ===========================================================================
    ; Magnetize Ring Left/Right
    ; ===========================================================================

    SetRing_MoveLR:
      move.w #$0080,d3 ; set ring speed increase
      tst.w d0 ; is the ring to the left of sonic?
      blt.s MoveRing_Right1 ; if so, branch

    ; ===========================================================================
    ; Left

    MoveRing_Left1:
      tst.w $10(a0) ; is ring moving left?
      bgt.s MoveRing_Left2 ; if so, branch
      move.w #$00A0,d3 ; if not, set new speed increase

    MoveRing_Left2: 
      add.w d3,$10(a0) ; move ring left
      bra.s SetRing_MoveUD ; start Up and Down functions

    ; ===========================================================================
    ; Right

    MoveRing_Right1: 
      tst.w $10(a0) ; is ring moving right?
      blt.s MoveRing_Right2 ; if so, branch
      move.w #$00A0,d3 ; if not, set new speed increase

    MoveRing_Right2: 
      sub.w d3,$10(a0) ; move ring Right

    ; ===========================================================================
    ; Magnetize Ring Up/Down
    ; ===========================================================================

    SetRing_MoveUD:
      move.w #$0080,d3 ; set ring speed increase
      tst.w d1 ; is the ring above sonic?
      blt.s MoveRing_Up1 ; if so, branch

    ; ===========================================================================
    ; Down

    MoveRing_Down1:
      tst.w $12(a0) ; is ring moving down?
      bgt.s MoveRing_Down2 ; if so, branch
      move.w #$00A0,d3 ; if not, set new speed increase

    MoveRing_Down2: 
      add.w d3,$12(a0) ; move ring down
      jmp SpeedToPos ; start Possision Update

    ; ===========================================================================
    ; Up

    MoveRing_Up1:
      tst.w $12(a0) ; is ring moving Up?
      blt.s MoveRing_Up2 ; if so, branch
      move.w #$00A0,d3 ; if not, set new speed increase
     
    MoveRing_Up2:
      sub.w d3,$12(a0) ; move ring Up
      jmp SpeedToPos ; start Possision Update

    ; ===========================================================================
    ; Finish Ring
    ; ===========================================================================

    MR_Resume_Rings:
      btst #0,$2F(a0) ; has Ring been magnetized?
      beq.s MR_FinishRing ; if not, branch
      move.b #-1,($FFFFFEC6).w ; set ring frame rate
      bset #1,$2F(a0)
      bra.w Obj37_Bounce ; set ring to bounce
     
    MR_FinishRing: 
      bset #1,$2F(a0)
      rts

    That's it! Compile and verify. Original guide by Tails-Doll, translated to english by me, Karate Cat.
    avatar
    Squidward Tentacles


    Mensagens : 1320
    Data de inscrição : 2013-09-17
    Localização : Undisclosed.
    Current Project : All is within.

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Squidward Tentacles Mon Oct 07, 2013 5:26 pm

    FRKPO wrote:EFWHPCOQIUWERCF
    What was the point of editing your post? :s
    avatar
    Squidward Tentacles


    Mensagens : 1320
    Data de inscrição : 2013-09-17
    Localização : Undisclosed.
    Current Project : All is within.

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Squidward Tentacles Wed Oct 23, 2013 9:30 pm

    German15 wrote:hello friends. Does anyone know how to add the three shields in sonic 1?. and I try but it did not. thanks Very Happy
    You don't tongue tongue tongue tongue tongue tongue 
    Green Snake
    Green Snake


    Mensagens : 2185
    Data de inscrição : 2012-04-07
    Localização : I do not even know
    Current Project : nope

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Green Snake Thu Oct 24, 2013 3:35 am

    I know! And I'm not sharing it!
    avatar
    Squidward Tentacles


    Mensagens : 1320
    Data de inscrição : 2013-09-17
    Localização : Undisclosed.
    Current Project : All is within.

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Squidward Tentacles Thu Oct 24, 2013 5:00 am

    Green Snake wrote:I know! And I'm not sharing it!
    cheers
    hacker___
    hacker___


    Mensagens : 1974
    Data de inscrição : 2013-05-06
    Localização : 41.383863, 108.866009
    Current Project : Breathing nitrogen

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  hacker___ Thu Oct 24, 2013 8:21 am

    Port the shields from S3K it worked for me
    avatar
    Squidward Tentacles


    Mensagens : 1320
    Data de inscrição : 2013-09-17
    Localização : Undisclosed.
    Current Project : All is within.

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Squidward Tentacles Sat Jan 18, 2014 5:35 pm

    Yes the post above is the answer
    avatar
    JoshDP


    Mensagens : 1682
    Data de inscrição : 2014-10-05

    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  JoshDP Thu Dec 27, 2018 9:12 am

    Just an annual year bump! Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy bounce bounce bounce bounce bounce affraid Basketball cheers bom drunken Basketball cheers bom drunken cherry sunny Sleep

    Sponsored content


    help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1? Empty Re: help. How to add the three shield (bubble shield, fire shield and magnetic shield) in sonic 1?

    Post  Sponsored content


      Current date/time is Thu Mar 28, 2024 4:27 am