build.bat: The 128 byte dilemma

Discussion in 'Discussion and Q&A Archive' started by beanDude, Jun 16, 2009.

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

    beanDude Well-Known Member Member

    Joined:
    Apr 15, 2009
    Messages:
    97
    Location:
    Somewhere in California...
    So, although it was not reccomended, I split a ROM which had been previously edited. Green Hill Zone disregarded, I found the levels intact in the SonEd 2 interface. My problem is simple: I cannot get a built ROM with actual data on it, and it seems that there is little on this topic that goes to point me in the right direction...


    ...In the screenshot, the .asm ending plays no significant role; I've already messed with it, but still 128 bytes in the product...

    /monthly_06_2009/post-729-1245108716_thumb.jpg
     

    Attached Files:

  2. Cinossu

    Cinossu A blend of secret herbs and spices Member

    Joined:
    Aug 14, 2007
    Messages:
    282
    Location:
    London, UK
    Can you paste the contents of your build.bat? I'll edit it for you so instead of just auto-closing after attempting to build, successful or not, it'll pause on error.


    If you use asm68k, I use this..



    Code:
    @echo off
    
    cls
    
    echo ### building... ###
    
    echo --
    
    asm68k /o op+ /o os+ /o ow+ /o oz+ /o oaq+ /o osq+ /o omq+ /p /o ae- sonic1.asm, s1built.bin
    
    IF %ERRORLEVEL% NEQ 0 GOTO error
    
    echo --
    
    echo ### padding... ###
    
    echo --
    
    REM rompad.exe s1built.bin 255 0
    
    fixheadr.exe s1built.bin
    
    goto end
    
    
    
    :error
    
    echo --
    
    echo ### Error!!! ###
    
    echo --
    
    pause
    
    
    
    :end
     
  3. beanDude

    beanDude Well-Known Member Member

    Joined:
    Apr 15, 2009
    Messages:
    97
    Location:
    Somewhere in California...
    Here's the 'build.bat' text:


    ________________________________________________________________________________


    _________________________________________


    @echo off


    include.exe sonic1.asm s1comb.asm


    REM ::: automatic recompression of data - disabled by default because it's slow


    REM ::: remove "REM" from the lines below to re-enable it


    REM derecmp.exe nc artnem_u artnem


    REM derecmp.exe kc artkos_u artkos


    REM derecmp.exe ec mapeni_u mapeni


    REM derecmp.exe ec map16_u map16


    REM derecmp.exe kc map256_u map256


    REM derecmp.exe ec sslay_u sslayout


    snasm68k.exe -emax 0 -p -o ae- s1comb.asm, s1built.bin


    rompad.exe s1built.bin 255 0


    fixheadr.exe s1built.bin


    pause


    ________________________________________________________________________________


    __________________________________________
     
  4. Thorn

    Thorn wroar Member

    Joined:
    Aug 11, 2007
    Messages:
    70
    ^ Now, I can't read Cinossu's mind, but I'm pretty positive that what he wants you to post is the error message you get in the window when you try to build, not the contents of the file. :p The code he gave you was to replace what you posted: you'll usually get a file name and line number along with the cause of the error, and his code'll make the window stay on-screen so that you can see that information.
     
  5. beanDude

    beanDude Well-Known Member Member

    Joined:
    Apr 15, 2009
    Messages:
    97
    Location:
    Somewhere in California...
    Yeah, I realized that after I had posted...


    ...Unfortunately...


    ...I guessed the same thing on his intentions...
     
  6. beanDude

    beanDude Well-Known Member Member

    Joined:
    Apr 15, 2009
    Messages:
    97
    Location:
    Somewhere in California...
    Here's the error:


    *EDIT* New error included:

    /monthly_06_2009/post-729-1245124237_thumb.jpg

    /monthly_06_2009/post-729-1245125849_thumb.jpg
     

    Attached Files:

    Last edited by a moderator: Jun 16, 2009
  7. Oerg866

    Oerg866 Well-Known Member Member

    Joined:
    Aug 29, 2008
    Messages:
    299
    Location:
    Frankfurt, Germany
    The error clearly states that the labels you are referring to in your assembly file don't exist.


    Check the lines the line-numbers refer to in the error.
     
  8. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    @First pic: You are using the SNASM68k version, not ASM68k (which I still recommending you). You can do one of these 2 things:


    1. Rename the file "SNASM68K.EXE" to "ASM68K.EXE"


    2. Edit your build.bat and replace in the line "asm68k /o op+ ...." the asm68k with snasm68k.
     
    Last edited by a moderator: Jun 16, 2009
  9. Oerg866

    Oerg866 Well-Known Member Member

    Joined:
    Aug 29, 2008
    Messages:
    299
    Location:
    Frankfurt, Germany

    No... Just, no. Sorry, no. That's just totally wrong.


    1. and 2. are not possible for him because they don't have the same syntax.


    Sorry. No.


    Also, if he now wants to use ASM68K he has to edit a few bits'n'pieces of his asm file. I don't reccomend doing that if he's still a beginner.


    Also, can you post the part from the first line with an error till the last line? Would make fixing your asm file easier :p
     
    Last edited by a moderator: Jun 16, 2009
  10. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    I don't want to get in another war with Oerg866, so I just say, ignore my post and read his one.


    Anyway, for the second picture, have you modified the Sonic animation script (_anim\Sonic.asm)? Your error means, he can't find the animations for rolling, running etc. There is a code starting at loc_13A9C which checks if you are fast enough to set the animation from walking to running. If you've modified the code, it might can not find the lines, so you got this error.


    Also, your compiler is not SNASM68k v2.53, the one which is included in the ASM68k version. I never worked with any other Split disassemblies so I'm not sure if this has to do something with it.
     
  11. RandomAvatarFan

    RandomAvatarFan Well-Known Member Member

    Joined:
    Apr 10, 2009
    Messages:
    100
    Is there really a difference between SNASM and ASM? I use SNASM, and the only problems I get are the ones that I caused.


    =


    The .asm ending DOES play a significant role because the entire name of that file is "s1.asm.txt." first of all make sure file extensions are visible, (I don't know how to do that in Vista. It's not that important seeing as you have the type of document listing there though)


    What you want to do is open it up, and save as "s1.asm" and have the drop down box select "all files" you want to do the same thing to your s1comb. Now those files (s1 and s1comb) are known as ASM Files instead of text documents.


    Of course if there are any errors in the asm, you'll still get a 128 byte folder.
     
    Last edited by a moderator: Jun 16, 2009
  12. Oerg866

    Oerg866 Well-Known Member Member

    Joined:
    Aug 29, 2008
    Messages:
    299
    Location:
    Frankfurt, Germany
    Uh, yes. SNASM68K and ASM68K are two completely different and unrelated 68K-Assembly Language Compilers.
     
  13. RandomAvatarFan

    RandomAvatarFan Well-Known Member Member

    Joined:
    Apr 10, 2009
    Messages:
    100
    Well in any sense I never had any problems with SNASM besides the ones that I made.


    But beandude, just make sure that you have the right file format, and it should work fine.
     
  14. Shadow Fire

    Shadow Fire Well-Known Member Member

    Joined:
    Aug 6, 2007
    Messages:
    303
    Oerg... I'm getting sick to death of your smart-ass comments. You don't have to act like a complete cunt when disproving someone. Do yourself a favour and drop the whole superiority thing. The whole "Master Race" complex is dated.


    Oh, and before you go calling me racist or anything, do bear in mind that I carry German blood in my veins... so yeah, that won't work on me.


    Now, to return to the topic at hand, I would like to say that I hope the advice given is helpful to you, and that you can continue hacking, beanDude.
     
  15. beanDude

    beanDude Well-Known Member Member

    Joined:
    Apr 15, 2009
    Messages:
    97
    Location:
    Somewhere in California...
    Now I know that this is getting annoying (me asking question after question), but at least I know where the problem is...


    If anyone's good at editing 'asm' scripting, let me know...


    ...Just for a little pointer, I cannot compile ROMs from unedited Sonic 1 data either...


    ...I find that rather important, but while I'm waiting for more advice, I'll do my own share of messing around with the two different disassembly formats.


    *edit* I take what I said back. I think that my re-naming the 'snasm68k' to 'ASM68K' caused a false error. I've done no editing to Sonic's sprite animations, and have a feeling that there's something fishy with Vista's way of recognizing files. After all, I fixed the splitting problem by romoving '.bin' from my ROM's filename. Perhaps I should try a trial-and-error process of changing file extensions.
     
    Last edited by a moderator: Jun 16, 2009
  16. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    That's what I said. The System hides known file extensions (in this case .bin) by default. So your ROM had actually the file name "s1.bin.bin". You should disable the function as I said it above. This makes editing with a split much easier.
     
    Last edited by a moderator: Jun 16, 2009
  17. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    I prefer errors being logged in this way:



    Code:
    snasm68k.exe -emax 0 -p -o ae- s1comb.asm, s1built.bin, error.log
    Before anyone complains, this is what I have in an old disassembly. You can do the same with ASM68K.
     
  18. beanDude

    beanDude Well-Known Member Member

    Joined:
    Apr 15, 2009
    Messages:
    97
    Location:
    Somewhere in California...
    ...WAIT! Does 's1comb.asm' need to have anything in it? My new error message complains that it 'has 0 length'...


    And sorry, Selbi, but Vista's a stubborn customer, and doesn't have an obvious way of showing file extensions...


    ...and with ASM68K: will it work? ...I mean, without all of the crap that 'snasm68k' has given me?


    *EDIT*


    ....WHOA! HOLY, HOLY, MOLEY, HOLY CRAP! YES!


    ...I tried 'ASM68K' (replaced old stuff in folder), and came out with NO errors, and NO cursed 128 bytes!


    Damn it! Why didn't I listen to whoever told me to download that?!


    Anyways, for everyone that helped, thanks for taking the time to read all of my annoying posts, thoughts, errors, etc.


    This is the reason why the site rocks!


    Unless any immediate errors occur when playing the ROM,


    (...Now I feel fully qualified to help others with the same problems in their hacking...)


    Later.
     
    Last edited by a moderator: Jun 17, 2009
  19. amphobius

    amphobius spreader of the pink text Member

    Joined:
    Feb 24, 2008
    Messages:
    970
    Location:
    United Kingdom
Thread Status:
Not open for further replies.