Porting the rev 01 deformation effects

Discussion in 'Discussion and Q&A Archive' started by sonic, Aug 5, 2008.

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

    sonic Well-Known Member Member

    Joined:
    Mar 27, 2008
    Messages:
    62
    Location:
    Michigan
    When I try to build the Sonic 1 rom, it displays two error messages about the s1comb.asm file. It says a negative numbered offset is out of range at address 0. I don't know what to do at all.
     
  2. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Have ever heard about ASM68k?
     
  3. sonic

    sonic Well-Known Member Member

    Joined:
    Mar 27, 2008
    Messages:
    62
    Location:
    Michigan
    Yes, but it doesn't work with certain disassemblies. I haven't tried it with Sonic 1, though.


    Now it says:


    Error : Label 'deform_ghz' multiply defined deform_ghz:


    Error : Label 'deform_lz' multiply defined deform_lz:
     
    Last edited by a moderator: Aug 5, 2008
  4. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    You´ve copyed them, but I don´t what to do! Sorry!
     
  5. sonic

    sonic Well-Known Member Member

    Joined:
    Mar 27, 2008
    Messages:
    62
    Location:
    Michigan
    It's confusing.
     
    Last edited by a moderator: Aug 5, 2008
  6. MKAmeX

    MKAmeX Newcomer Member

    Joined:
    May 11, 2008
    Messages:
    4
    When it say "multiply defined *something*" it means you have more than one of that same code in your file. Remove both deform_ghz and deform_lz once to fix this.
     
  7. sonic

    sonic Well-Known Member Member

    Joined:
    Mar 27, 2008
    Messages:
    62
    Location:
    Michigan
    Thanks. They should fix the code in the guide. It's their fault it didn't work. I could've had the rev 01 background effects ported a long time ago.
     
  8. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    Considering it's probably been used by hundreds of other people and I believe none of them have reported a similar problem, I'm more inclined to believe it's your fault not the guide's.
     
  9. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    I´ve also a problem with those rev01 effects:



    Code:
    C&#58;\Hacking\Sonic 1\sonic1.asm<6071> &#58; Error &#58; Branch <34362 bytes> is out of range
    
    C&#58;\Hacking\Sonic 1\sonic1.asm<6084> &#58; Error &#58; Branch <34336 bytes> is out of range
    What´s wrong?


    Edit:

    I guess, It was my fault, too! But I don´t know, what I´ve made wrong!
     
    Last edited by a moderator: Aug 5, 2008
  10. sonic

    sonic Well-Known Member Member

    Joined:
    Mar 27, 2008
    Messages:
    62
    Location:
    Michigan
    I've run into that same problem now...
     
    Last edited by a moderator: Aug 5, 2008
  11. M3k

    M3k h4x Member

    Joined:
    Jul 28, 2008
    Messages:
    37
    Haha, interestingly enough, I've had just the same errors. Just create a JmpTo subroutine, like this:


    Routine1:


    [yadda yadda]


    bsr.w JmpToRoutine2


    JmpToRoutine2:


    jmp Routine2
     
  12. shobiz

    shobiz Well-Known Member Member

    Joined:
    Aug 11, 2007
    Messages:
    198
    Location:
    Karachi, Pakistan
    Actually, if it's a BSR or BRA that's out of range it's best to replace it with a JSR or JMP (respectively), otherwise do what Master3k said.
     
  13. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    I´ve got it to work (thank you Master3k ^^)! This is my Routine:



    Code:
    		addi.w	#$10,8&#40;a0&#41;&#59; move object to the right
    
    		bsr.w	JmpToRoutine1
    
    
    
    JmpToRoutine1&#58;
    
    		jmp	DisplaySprite
    
    ; ===========================================================================
    
    
    
    Obj89_Delay&#58;			&#59; XREF&#58; Obj89_Move
    
    		addq.b	#2,$24&#40;a0&#41;
    
    		move.w	#120,$30&#40;a0&#41;&#59; set duration for delay &#40;2 seconds&#41;
    
    
    
    Obj89_GotoCredits&#58;		&#59; XREF&#58; Obj89_Index
    
    		subq.w	#1,$30&#40;a0&#41;&#59; subtract 1 from duration
    
    		bpl.s	Obj89_Display
    
    		move.b	#$1C,&#40;$FFFFF600&#41;.w&#59; exit to credits
    
    
    
    Obj89_Display&#58;
    
    		bsr.w	JmpToRoutine2
    
    
    
    JmpToRoutine2&#58;
    
    		jmp	DisplaySprite
    
    ; ===========================================================================
    
    ; ---------------------------------------------------------------------------
    
    ; Sprite mappings - Sonic on the ending	sequence

    But there are some Broken Point´s (see Attachment)!

    /monthly_08_2008/post-469-1218045625.png
     
  14. M3k

    M3k h4x Member

    Joined:
    Jul 28, 2008
    Messages:
    37
    That's a art error, not a programation error, if you're refering to the clouds.


    But if you're refering to Sonic, then I don't know.
     
  15. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Shit!
     
  16. SeanieB

    SeanieB Dude! Root Admin

    Joined:
    Jul 19, 2008
    Messages:
    230
    Location:
    San Diego, CA
    I see nothing wrong with the picture...


    or is that a fixed picture or something? What's supposed to be wrong?
     
  17. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    Please don't make irrelavent one-word posts.
     
  18. hyper

    hyper Newcomer Trialist

    Joined:
    Aug 25, 2008
    Messages:
    5
    Location:
    France, near Paris
    Last edited by a moderator: Feb 27, 2009
Thread Status:
Not open for further replies.