Jump Dash Problems

Discussion in 'Discussion and Q&A Archive' started by Hanoch, Aug 8, 2008.

Thread Status:
Not open for further replies.
  1. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    I am trying to make Homing Attack in Sonic 1, so for now i'm trying to make jump dash and then the enemy calculates etc.


    Anyway, here's the code:


    *Deleted by the user*


    And the ROM doesn't build well, it gives me that error:



    Code:
    Include ASM Combiner written by Hivebrain
    
    There were 0 errors.
    
    SNASM68K, version 2.1D, Dec 06 1995, 11:55:16, DOS4G PRO
    
    (c) 1993-95 Cross Products Ltd. All Rights Reserved
    
    s1comb.asm(28157) : Error 06060 : Branch offset 0 is not allowed
    
    
    
    1 error encountered processing file 's1comb.asm'
    
    37263 source statements in 47834 lines processed in 0.5 seconds
    
    Lightning's ROM Padder
    
    
    
    Reported Size:		0 Reported Checksum:	0
    
     Size applied:	   7F  Checksum Applied:	0
    
    Press any key to continue . . .
    Anyone can help me?
     
    Last edited by a moderator: Aug 8, 2008
  2. Sephiroth

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    Your main problem is that you are asking it to branch to the next line. Your best bet would be to have a bne command, branching to a different label, with a simple rts command, and that should fix your problem.
     
  3. Aka Mekon

    Aka Mekon is back Member

    Joined:
    Aug 11, 2007
    Messages:
    41
    Location:
    France
    Don't want to sound like a bitch, but can you remove the code now ?


    Anyway, like Sephiroth said, change the last bne.s by bne.w, and the "Branch offset 0 is not allowed" problem should be gone.
     
    Last edited by a moderator: Aug 8, 2008
  4. Sephiroth

    Sephiroth WHY SO CURIOUS?!? Member

    Joined:
    Aug 11, 2007
    Messages:
    507
    Location:
    Qatar, M.E.
    Yeah, you could just change the beq.s to bne.s and change the location to locret3_12345, as that would branch to the rts command that is already there, unless it is followed by more of the code, then make one at the end of the segment of code, and change it to do that.
     
  5. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    Well, now im at my father's house and i don't have the disassembly right now, but when i get home i will try to fix this. Thank you.


    EDIT: Here's the ROM just keep running and release the left/right button and see what happens...


    * Its not the complete hack! I just downloaded Pu7o/Lightning's source code and added the jump dash code, the original hack is in progress.


    *DELETED*
     
    Last edited by a moderator: Aug 9, 2008
Thread Status:
Not open for further replies.