ASM68K Symbol Undefined Errors for Existing Routines

Discussion in 'Discussion and Q&A Archive' started by theocas, Jul 15, 2010.

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

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    So, I try building my Disasm today, but I'm greeted to this instead:



    Code:
    Onion:Collab tristan$ /Applications/Wine.app/Contents/MacOS/startwine asm68k /o op+ /o os+ /o ow+ /o oz+ /o oaq+ /o osq+ /o omq+ /p /o ae- sonic1.asm, s1built.bin
    
    
    
    SN 68k version 2.53
    
    
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(30) : Error : Symbol 'endofrom' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(212) : Error : Symbol 'segascreen' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(214) : Error : Symbol 'titlescreen' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(216) : Error : Symbol 'level' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(218) : Error : Symbol 'level' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(220) : Error : Symbol 'specialstage' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(222) : Error : Symbol 'continuescreen' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(224) : Error : Symbol 'endingsequence' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(226) : Error : Symbol 'credits' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(449) : Error : Symbol 'sub_71b4c' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(530) : Error : Symbol 'sub_6886' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(615) : Error : Symbol 'loadtilesasyoumove' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(616) : Error : Symbol 'aniart_load' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(617) : Error : Symbol 'hudupdate' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(658) : Error : Symbol 'palcycle_ss' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(724) : Error : Symbol 'loadtilesasyoumove' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(725) : Error : Symbol 'aniart_load' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(726) : Error : Symbol 'hudupdate' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(894) : Error : Symbol 'sub_71b4c' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(1072) : Error : Symbol 'kos_z80' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(1075) : Error : Symbol 'segapcm' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(1501) : Error : Symbol 'artloadcues' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(1534) : Error : Symbol 'artloadcues' not defined
    
    Z:\USERS\TRISTAN\COLLAB\SONIC1.ASM(1690) : Error : Symbol 'artloadcues' not defined
    
    
    
    Assembly completed.
    
    24 error(s) from 3149 lines in 0.8 seconds
    
    Onion:Collab tristan$
    When I saw that I'm like what the hell? These symbols all exist in the code. Before you ask - I'm on Mac OS X, but following this tutorial (works for any OS with Wine btw) tutorial I got it to build in the first place. What could cause this? I'm absolutely confused why this happens. I hope this is enough info, and if not please just tell me because I really want this solved. Also what confuses me is that it says there's only 3150 lines, but there is actually 42,252 lines of code. Thanks.


    Edit: If anyone needs source, PM me because I do not want to give it out to the public.


    Edit2: Before anyone asks, this is line 3148 to 3150:




    beq.s Sega_GotoTitle


    andi.b #$80,($FFFFF605).w ; is Start button pressed?


    beq.s Sega_WaitEnd ; if not, branch
     
    Last edited by a moderator: Jul 15, 2010
  2. hfdshdgfhgn

    hfdshdgfhgn fdsgfdgfhgfds Member

    Joined:
    Dec 28, 2009
    Messages:
    89
    Oh looky, same here!



    Code:
    SN 68k version 2.53
    
    
    
    H:\SONIC1.ASM(2334) : Error : Op-code not recognised
    
    include 'h:\_inc\sbz pallet script 1.asm'
    
    H:\SONIC1.ASM(2337) : Error : Op-code not recognised
    
    include 'h:\_inc\sbz pallet script 2.asm'
    
    H:\SONIC1.ASM(2912) : Error : Op-code not recognised
    
    include 'h:\_inc\pallet pointers.asm'
    
    Errors during pass 1 - pass 2 aborted
    
    Assembly completed.
    
    4 error(s) from 3035 lines in 0.12 seconds

    FYI, we're working on the same hack. I tried to build it on my computer (running Ubuntu) and got this.
     
    Last edited by a moderator: Jul 15, 2010
  3. Malevolence

    Malevolence Well-Known Member Member

    Joined:
    Jul 29, 2008
    Messages:
    97
    For the first post: It means you don't have those routines or anything defined. You may have a "bsr.w endofrom" but you do not have a "endofrom:" with code following.


    For the second poster: I'm guessing you just didn't add a tab to the include ie you have it like:


    include 'h:\_inc\sbz pallet script 1.asm'


    And not


    include 'h:\_inc\sbz pallet script 1.asm'


    Let me know if you have any more concerns or if this is not the case
     
  4. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    Those happened to me once, write some crap in sonic1.asm and then remove them and save.
     
  5. hfdshdgfhgn

    hfdshdgfhgn fdsgfdgfhgfds Member

    Joined:
    Dec 28, 2009
    Messages:
    89
    What do you mean?
     
  6. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    No idea what Hanoch was talking about either, but as Malevolence stated, you probably didn't put a Tab or Space before the line. Look at this:



    include 'h:\_inc\sbz pallet script 1.asm'


    This should like this:

    Code:
    	include 'h:\_inc\sbz pallet script 1.asm'
    

    If a line starts without a tab or space, the assemblier recognizes it as something else.
     
  7. hfdshdgfhgn

    hfdshdgfhgn fdsgfdgfhgfds Member

    Joined:
    Dec 28, 2009
    Messages:
    89
    Ok, I got it fixed, but now...



    Code:
    SN 68k version 2.53
    
    
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(44) : Error : Symbol 'endofrom' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(221) : Error : Symbol 'segascreen' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(223) : Error : Symbol 'titlescreen' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(225) : Error : Symbol 'level' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(227) : Error : Symbol 'level' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(229) : Error : Symbol 'specialstage' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(231) : Error : Symbol 'continuescreen' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(233) : Error : Symbol 'endingsequence' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(235) : Error : Symbol 'credits' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(458) : Error : Symbol 'sub_71b4c' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(539) : Error : Symbol 'sub_6886' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(624) : Error : Symbol 'loadtilesasyoumove' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(625) : Error : Symbol 'aniart_load' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(626) : Error : Symbol 'hudupdate' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(667) : Error : Symbol 'palcycle_ss' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(733) : Error : Symbol 'loadtilesasyoumove' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(734) : Error : Symbol 'aniart_load' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(735) : Error : Symbol 'hudupdate' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(903) : Error : Symbol 'sub_71b4c' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(1081) : Error : Symbol 'kos_z80' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(1084) : Error : Symbol 'segapcm' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(1510) : Error : Symbol 'artloadcues' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(1543) : Error : Symbol 'artloadcues' not defined
    
    E:\MYHAX\COLLAB\COLLAB\SONIC1.ASM(1699) : Error : Symbol 'artloadcues' not defined
    
    
    
    Assembly completed.
    
    24 error(s) from 3159 lines in 0.2 seconds

    What.
     
  8. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    What I meant was that sonic1.asm didn't save correctly. Write some stuff, maybe a ; and then save.
     
  9. Malevolence

    Malevolence Well-Known Member Member

    Joined:
    Jul 29, 2008
    Messages:
    97
    Did you happen to see what I posted above?
     
  10. hfdshdgfhgn

    hfdshdgfhgn fdsgfdgfhgfds Member

    Joined:
    Dec 28, 2009
    Messages:
    89
    I DO have Endofrom and those other routines though.
     
  11. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Try searching for the word "END" on it's own. If that word exists in your source, then anything after it will be ignored by the assembler.


    If this is the case then moving that word to the very end of the source would be your solution.
     
    Last edited by a moderator: Jul 16, 2010
  12. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    I did do a search for it, and it only occurs at the end of my source. The only other place it is in is in comments, but those should be ignored by the assembler, right? I even tried re-saving sonic1.asm in multiple encoding, but no dice. I even tried looking at the file in a HEX editor, but all that I see there are the CRLF signs. And the assembler doesn't accept UTF-8 files for strange reasons so I have to save it in the Western (Windows Latin 1) encoding, with line breaks set to CRLF. The assembler starts cutting off the file right in the middle of this method:



    Sega_WaitEnd:
    move.b #2,($FFFFF62A).w


    bsr.w DelayProgram


    tst.w ($FFFFF614).w


    beq.s Sega_GotoTitle


    andi.b #$80,($FFFFF605).w ; is Start button pressed? <-- it thinks this is the end of the file


    beq.s Sega_WaitEnd ; if not, branch
     
    Last edited by a moderator: Jul 15, 2010
  13. theocas

    theocas #! Member

    Joined:
    Apr 10, 2010
    Messages:
    375
    OK, so I got this figured out. The file had some garbage between those two lines. All I had to do is re-write it using a different editor and all worked. Thanks for everyones help!
     
Thread Status:
Not open for further replies.