Basic Questions and Answers Thread

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

  1. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Why I tried ediing the title menu for RHS2 years ago, we never had SonMapED lol. Might give it a try in the near future though =P
     
  2. Sinkdude

    Sinkdude He looked much leaner on TV Member

    Joined:
    May 6, 2008
    Messages:
    41
    Location:
    Michigan
    Hello. I'm trying hard to port the Coconuts and Shellcracker badniks into Sonic 1, but I kinda forgot how to get it right. Can you show me the right way to do badnik porting?
     
  3. SuperSonicX

    SuperSonicX Newcomer In Limbo

    Joined:
    Jun 23, 2011
    Messages:
    19
    I need help looping my spindash sprites, The end of the animation tells it to loop ($FF) but after running the animation once in the game the animation freezes (until I press A again). The reason I edited them is to merge the spindust and the spindash sprites because the dust was being corrupted. Here is my current animation routine:


    Code:
    SonicAni_Spindash: dc.b   0,$58,$59,$5A,$5B,$5C,$5D,$75,$76,$77,$78,$79,$80, $FF
    
    One of my sprites:


    [​IMG]
     
  4. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    IIRC, you have to use FE instead of FF. Try something like $FE, 6
     
  5. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    689
    You really should just relocate the spindash art to somewhere in the VRAM that is not being used, or find out why it is being overwritten.


    Merging the art for Sonic and the dust like that is just kind of hackish and might look odd once in motion.
     
    Last edited by a moderator: Jul 14, 2011
  6. SpirituInsanum

    SpirituInsanum Well-Known Member Member

    Joined:
    Feb 11, 2010
    Messages:
    642
    I agree with Rika, though to answer the question, the problem is most likely related to the sonic_animate subroutine, there's probably a bmi after the sprite number is loaded (in this case, precisely a negative number: $80) which leads directly or indirectly to an RTS. So the routine ends there and the next value isn't loaded, so the animation stops there.
     
  7. StephenUK

    StephenUK Working on a Quackshot disassembly Member

    Joined:
    Aug 5, 2007
    Messages:
    1,026
    FF ends an animation script, FE loops an animation script, and a value after that tells it how many frames to loop back by.


    I.E $78, $79, $80, $FE, $02 will run as $78, $79, $80, $79, $80, $79 etc


    Make sure that there are an even number of bytes as well in the script. The example above would cause all of the code to be thrown to odd addresses. However, adding $0 after the $2 will correct that and keep things even.
     
  8. SuperSonicX

    SuperSonicX Newcomer In Limbo

    Joined:
    Jun 23, 2011
    Messages:
    19
    Okay but what if I want the whole animation to loop again, it is 12 frames (SpinF1 + Dust1, SpinF2 + Dust1, SpinF3+Dust2, etc. so instead of a $02, $0 put a $12, $0. But I did that and my animation still wont loop.
     
  9. StephenUK

    StephenUK Working on a Quackshot disassembly Member

    Joined:
    Aug 5, 2007
    Messages:
    1,026
    It wouldn't be $12, it'd be $C (12 in hex)
     
  10. SuperSonicX

    SuperSonicX Newcomer In Limbo

    Joined:
    Jun 23, 2011
    Messages:
    19
    It still wont loop, maybe should I put a part in my spindash code to replay the animation when It finishes (based of the enemy routine to delete it when it blows up :D ). I have another question, what would I write as a line of asm to test for a negative vertical velocity value im trying to use sonic cd's spring and falling animation. I am also trying to keep it when I walk of a ledge (I know how to do that.).


    Here's my spindash animation again,


    Code:
    SonicAni_Spindash: dc.b   0,$58,$59,$5A,$5B,$5C,$5D,$75,$76,$77,$78,$79,$80,$FE,$C,0
    
    And a video (part 1 is the spindash problem, part 2 is the falling issue.)


    [​IMG]
     
  11. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    The animation script does now allow frames that are negative (80 to FF), it sees any negative value as a flag, where FF, FE and FD are used while the rest are blank and do nothing, that's why your animation won't animate properly.
     
  12. StephenUK

    StephenUK Working on a Quackshot disassembly Member

    Joined:
    Aug 5, 2007
    Messages:
    1,026

    Shouldn't it go $78, $79, $7A? You just from $79 to $80 which is skipping 6 frames. Make it $7A and you'll probably find it'll work. What Markey said is also true, $7F is the highest you can go in frame IDs.
     
  13. SuperSonicX

    SuperSonicX Newcomer In Limbo

    Joined:
    Jun 23, 2011
    Messages:
    19
    THANK YOU SO MUCH I DIDNT NOTICE THAT NOW IT WORKS!!!!!!!!!!
     
  14. TheJeli

    TheJeli Umm... Member

    Joined:
    Jun 20, 2011
    Messages:
    245
    Location:
    West London
    Does anyone know how I can convert MIDI to XM.


    I can't find the XM export on openMT and the only other program I can find isn't compatible with windows 7.


    Any tips would be greatly appreciated.
     
  15. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    If you mean that un4seen's MID2XM converter, you can get it to work with Windows 7 if you have Windows XP Mode Virtual PC installed, although you must have Windows 7 Professional, Enterprise, or Ultimate to run Windows XP Mode. I have Ultimate so I was lucky.


    But even then, I couldn't get that MID2XM converter to work; the converted XM file seem to be empty at all times. But you may have better luck.


    As for OpenMT, I also have this problem; cannot find the option to get it to convert to XM.


    Have you tried ValleyBell's MID2SMPS converter? I've been using this recently and it's quite decent, although I'm still learning with it.
     
  16. TheJeli

    TheJeli Umm... Member

    Joined:
    Jun 20, 2011
    Messages:
    245
    Location:
    West London
    Yeah I did mean that but I wont use it if I can get MIDI to SMPS to work. I'm surprised this wasn't thought of in the first place but I don't know much about MIDI, XM or SMPS so I don't know if XM is easier to convert or what. Thanks for those links RHS!
     
  17. c1owd

    c1owd Previously 'CarrascoZX0' Member

    Joined:
    Dec 13, 2008
    Messages:
    364
    [​IMG]


    ^ Um, you mean this? =)
     
    Last edited by a moderator: Jul 26, 2011
  18. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    How? What? Where's that bit located to? I can't find it whenever I want to save the file or anything. =P


    Anyway, I heard it's bad to use OpenMT to convert to XM as the channels come out of sync or something?
     
  19. c1owd

    c1owd Previously 'CarrascoZX0' Member

    Joined:
    Dec 13, 2008
    Messages:
    364
    [​IMG]


    ^ There you go. =)


    Also, that's why you have to fix the broken tempo. I made a guide on this a while ago. It's not so bad once you get used to it. =)
     
  20. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Nice, I will give this a go at the weekend and see what I can come up with. Thanks for the advice.