Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. TheFurryFox

    TheFurryFox http://vyrissthevixen.deviantart.com/ Member

    Joined:
    Mar 19, 2011
    Messages:
    29
    I've noticed some Sonic 1 ROM hacks with Sonic 3's full walking animation, so I wanted to do the same.


    I have found out Sonic 1 has only 6 walking frames on separate angles


    and Sonic 3 has 8 walking frames on separate angles.


    [​IMG]


    So I decided to try to put Sonic 3's walking animation in Sonic 1.


    I tweaked the walking animation and this is what I get when I walk on slopes/hills.


    [​IMG]


    2 walking animation on ground and 4 on hills...


    I know that Sonic 1 only reads 6 walking animations per angle, and the game thinks the slope/hill walking animation should start right after the 6th of


    Sonic's walking on-ground animation.


    Any suggestions? :\
     
  2. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    689
    You need to edit his animation script.


    Edit: going from that shot, his walking script should be $6, $7, $8, $9, $A, $B, $C, $D


    You will probably have to edit most if not all of his animation script.
     
    Last edited by a moderator: Nov 30, 2011
  3. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    Actually, I do. But first tell me, do you have ANY other issues as far as any other animation? Seems Rika_Chou beat me to the stick on this one. Out of curiosity, did you take out the last 2 frames of the walking sprite? If not, then your hack is bound to fuck up.
     
  4. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    loc_13A9C:
    lea (SonAni_Run).l,a1 ; use running animation


    cmpi.w #$600,d2 ; is Sonic at running speed?


    bcc.s loc_13AB4 ; if yes, branch


    lea (SonAni_Walk).l,a1 ; use walking animation


    move.b d0,d1


    lsr.b #1,d1


    add.b d1,d0


    loc_13AB4:



    I may also strongly recommend you replace the above code with:



    loc_13A9C:
    lea (SonAni_Run).l,a1 ; use running animation


    cmpi.w #$600,d2 ; is Sonic at running speed?


    bcc.s loc_13AB4 ; if yes, branch


    lea (SonAni_Walk).l,a1 ; use walking animation


    add.b d0,d0 ; x4


    add.b d0,d0 ; x8


    loc_13AB4:



    If you are in need of all 8 frames on all angles, then this will ensure that the angle will advance multiples of 8 frames instead of multiples of 6.
     
  5. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    But if he were to do that, he would also need to go and add in those 2 frames on all versions of the sprite that shows up, then he would have to sit there for bout an hour just to get his shit straight, assuming he didn't do anything else. Hmm.... I think there is a different way of doing this, let me check....


    edit: you know what, I just did a little test....except I ported the whole S2NA animation script in. Anyways, seems that you are correct my good sir. That is the easiest way to fix it. So if he decides to do it, let him go for it.
     
    Last edited by a moderator: Nov 30, 2011
  6. TheFurryFox

    TheFurryFox http://vyrissthevixen.deviantart.com/ Member

    Joined:
    Mar 19, 2011
    Messages:
    29
    All of my walking sprites have 8 frames per angle. I already fixed my other animations.

    This is going somewhere, although the walking (except for ground) animations are playing in different orders. I'll try to figure this out.
     
    Last edited by a moderator: Nov 30, 2011
  7. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    ....you could get the S2B4 disam and port it over into your game. Seems both S2 and S3 have the same amount of walking sprites. It would make life easier for later.
     
  8. TheFurryFox

    TheFurryFox http://vyrissthevixen.deviantart.com/ Member

    Joined:
    Mar 19, 2011
    Messages:
    29
    I finally got it working just by one edit.



    loc_13A9C:
    lea (SonAni_Run).l,a1 ; use running animation


    cmpi.w #$600,d2 ; is Sonic at running speed?


    bcc.s loc_13AB4 ; if yes, branch


    lea (SonAni_Walk).l,a1 ; use walking animation


    add.b d0,d1 ; x4


    add.b d0,d0 ; x8


    loc_13AB4:



    Simply changed "add.b d0,d0" to "add.b d0,d1"


    Thanks, Markey. :D


    Hopefully I don't run into other problems just by one simple edit. :


    EDIT: and I ran into a problem. Actually a problem I had and still have before Markey shared the code...


    EDIT2: I'm just going to stick with 6 frame walking animations for now... Since I can't figure out what's going on.
     
    Last edited by a moderator: Nov 30, 2011
  9. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
  10. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    689
    That will look kinda hackish. It would really be better to try and figure out how to fix it to use all 8 frames. It's not hard once you understand what you're doing.
     
  11. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    How do I add Stages to Sonic 2's Stage Select? I just finished building a "corrupt" stage (Corrupt EHZ as a Null Hill Zone without messing up EHZ) and i'm wanting to add it to the stage select.


    Also I'm wanting to add a stage card with the stage. Everytime I try adding one it goes corrupt. I go without it reads as EMERALD HILL ZONE.
     
  12. TheFurryFox

    TheFurryFox http://vyrissthevixen.deviantart.com/ Member

    Joined:
    Mar 19, 2011
    Messages:
    29
    [​IMG]


    Ok, so I finished parts of my new title Sonic, saved mappings and art, changed animation...and this is what I get when I build.


    [​IMG]


    My new mappings are causing this, but I'm not sure why.
     
  13. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
  14. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Oh damn, I didn't even see you appear spiritulinsanum, you beat me to it while I was typing. Never mind, just follow the link above.
     
  15. TheFurryFox

    TheFurryFox http://vyrissthevixen.deviantart.com/ Member

    Joined:
    Mar 19, 2011
    Messages:
    29
    I did nothing to my asm. Just saved mappings and art, and this came along. Not to sound like an idiot, but in honest, I do not know how to start off with the guide.
     
    Last edited by a moderator: Dec 5, 2011
  16. Guest

    If I were you, I would recommend getting context. it makes fixing errors like that lots more easier as you can actually search for the line were the error is (the number in parenthesis after s1comb.asm).
     
  17. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    My bad, that tutorial deals with more complex cases, sorry.


    Though changing mappings and art is far from being nothing for your disassembly. Every little byte you add pushes all the data following it.


    So, anyway, I wrote about it there instead:http://sonicresearch.org/forums/index.php?showtopic=2288&st=0#entry21808 read part "3.2 Assembly general fixes"
     
  18. TheFurryFox

    TheFurryFox http://vyrissthevixen.deviantart.com/ Member

    Joined:
    Mar 19, 2011
    Messages:
    29
    loc_FA58:


    move.w d4,d2


    bsr.w MvSonicOnPtfm <-- Line 22098


    moveq #0,d4


    rts


    Do I have to change the bsr.w to something else, or is it more complex than that? Ehh, of course it is.
     
    Last edited by a moderator: Dec 3, 2011
  19. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Change it from bsr.w to jsr. Here's a little map of the instructions you use should they be out of range:


    bsr.s -> bsr.w -> jsr


    bra.s -> bra.w -> jmp


    With bra.s/bsr.s being the smallest to jmp/jsr being the largest.
     
  20. TheFurryFox

    TheFurryFox http://vyrissthevixen.deviantart.com/ Member

    Joined:
    Mar 19, 2011
    Messages:
    29
    I changed bsr.w to jsr, though nothing is happening. Do I have to do anything in the MvSonicOnPtfm routine?