Basic Questions & Answers thread

Discussion in 'Engineering & Reverse Engineering' started by Tweaker, May 29, 2008.

  1. Trance

    Trance

    The man with the plan Member
    19
    0
    1
    The actual charging animation isn't showing. I have the right sonic.bin for it. It has the Peelout sprites in it.
     
  2. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    What does the line for setting the animation ID in the code look like?
     
  3. Trance

    Trance

    The man with the plan Member
    19
    0
    1
    Let me have a look. I'll see what I can do.

    So, apparently, it was set to 0.

    Heres the peice of code:
    Code (Text):
    1. move.b #0,$1C (a0) ; launches here (peelout sprites)
     
    Last edited by a moderator: Jun 30, 2020
  4. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    Now lemme ask. How exactly does your peelout work? Does it gradually increment the ground velocity/inertia as it charges, or does it have a dedicated peelout charging animation?

    EDIT: Actually, looking at that line you provided. I know exactly where that's from. I'm pretty sure that's from the modified ReadySonic peelout that LuigiXHero and I did. Did you also make sure to look through the rest of the disassembly you got that from that does peelout stuff? Particularly Sonic_Animate and Sonic_Move.

    Just an FYI, it's generally best if you don't make posts like "I'll see what I can do", and then make a double post with the information you wanted to relay (or just double post within a short period of time in general). It's best that you just wait until you get the information to post it.
     
    Last edited: Jun 30, 2020
  5. Trance

    Trance

    The man with the plan Member
    19
    0
    1

    Yep! This is my first time adding anything without a guide so, yeah. I will go take a look and see what I'm missing.






    EDIT: 1 I looked through both the CD disasem, and my disasem. I didn't find anything in the CD asm other than the Peelout things needed.
     
    Last edited: Jun 30, 2020
  6. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    Does your Sonic_Animate routine not have a reference to "SonAni_3rdRun"?
     
  7. Trance

    Trance

    The man with the plan Member
    19
    0
    1
    No, it does not have that.
     
  8. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    Look at the disassembly you got the peelout from and take a look. Also search for peelout comments in Sonic_Move if you haven't.
     
    Last edited: Jun 30, 2020
  9. Trance

    Trance

    The man with the plan Member
    19
    0
    1
    I already made a search for peelout in the disassembly and got everything copied. The peelout works just fine, its just the tiles won't load when using the peelout.
     
  10. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    Can you show what charging up the peelout is like, then? Because, I'm not quite too sure what you mean by that. You mentioned that your version of Sonic_Animate doesn't have SonAni_3rdRun, so did you copy that over, too?
     
  11. Trance

    Trance

    The man with the plan Member
    19
    0
    1
    SonAni_3rdRun isn't in either disasem. And, when you charge up the Peelout, it's just the normal run sped up.
     
  12. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    Okay, so we are clear, what I was referring to is this. The line of code you showed matched up with that, so that's what I assumed you were using, no? Unless there's something else out there that I'm not exactly aware of. The original ReadySonic didn't really say "(peelout sprites)" when I took a look, so I assume it was based off the modified version that I helped out with to make it more accurate to how it works in Sonic CD.

    Regardless, you need to set up using the peelout sprites in the running animation handler. Normally, it only handles the walking and running sprites. It should be using the peelout sprites when your ground speed is at least $A00.
     
    Last edited: Jun 30, 2020
  13. Trance

    Trance

    The man with the plan Member
    19
    0
    1
    Yes. I was porting the Peelout from LuigixHeroes, to my disasem. That's why it says (peelout sprites). Also, what do you mean by "running animation handler"?
     
  14. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    Sonic_Animate has special code for handling how the running sprites are displayed. The speed of animation is based on Sonic's ground speed and it checks his speed to determine which animation to use.

    Code (Text):
    1.         lea    (SonAni_Run).l,a1 ; use    running    animation
    2.         cmpi.w    #$600,d2    ; is Sonic at running speed?
    3.         bcc.s    loc_13AB4    ; if yes, branch
    4.         lea    (SonAni_Walk).l,a1 ; use walking animation

    The disassembly adds this before that:
    Code (Text):
    1.         lea (SonAni_3rdRun).l,a1
    2.         cmpi.w #$A00,d2 ; is Sonic at super speed?
    3.         bcc.s loc_13AB4 ; if yes, branch
     
  15. Trance

    Trance

    The man with the plan Member
    19
    0
    1
    Okay, so when I got that code in, it crashed when the sprites loaded in.
    SonAni_3rdRun wasn't in the code.
     
  16. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    Yes it was, you have to scroll down further into SAnim_WalkRun, which is part of Sonic_Animate.

    As for the crash, did you also make sure to copy over the mappings (_maps/Sonic.asm) and the DPLCs (_inc/Sonic dynamic pattern load cues.asm)?
     
  17. Trance

    Trance

    The man with the plan Member
    19
    0
    1
    The mappings, yes. And, the dynamics, no. I have the artnuc for Sonic.

    Thank you so much, you've helped me out alot!! I can't thank you enough. When I completely finish the Peelout, can I make a guide for it on here?
     
    Last edited: Jun 30, 2020
  18. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    In my opinion, I would be careful when making a guide. While I don't really care what you do with the code, I'm more concerned with the quality of the guide. Just make sure it isn't poorly written, is properly explained (and isn't just a copy and paste guide), and take into account things like if the user already has other sprites in their hack (basically, don't make them overwrite their sprite files, show them how to add the peelout sprites to their existing sprite set).
     
  19. Trance

    Trance

    The man with the plan Member
    19
    0
    1
    Alright. But, is Luigi in Sonic Retro as, I would like to talk to him.
     
  20. Ralakimus

    Ralakimus

    i don't care anymore Tech Member
    550
    156
    43
    Hell
    @LuigiXHero's DMs should be open. Reason I said I don't care what you do with the code is because I contributed a good chunk of the current code to it, too, but I understand why you'd wanna get his two cents, too.