Sonic and Sega Retro Message Board: Troubleshoot Your Builds - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Page 1 of 1
    Locked
    Locked Forum

Troubleshoot Your Builds How to modify build.bat

#1 User is offline Armada 

  Posted 20 June 2009 - 04:09 PM

  • Sometimes I do things
  • Posts: 338
  • Joined: 05-January 07
  • Gender:Male
  • Wiki edits:12
So, I got pissed about how batch files close on resolution in XP (does it do it on Vista too). Finally, I was bothered to modify build.bat to log all the builds for troubleshooting at a later date. Since it has a bit of finicky code, it's worth the guide.

First, add this after all the comments (REM) that recompress all the data:

CODE
REM Troubleshooting log
REM Stores date and output

@FOR /F "tokens=*" %%A IN ('DATE/T') DO FOR %%B IN (%%A) DO SET Today=%%B
@FOR /F %%A IN ('TIME/T') DO SET Now=%%A

ECHO ====================================================== >>output.txt
ECHO Built on %Today% at %Now% >> output.txt

That bit parses the time and date and logs it in a file called "output.txt". Rename it as you like.

This code is specific to your build tools, so here's the general form, place it after the date and time snippet and before your build command lines:
CODE
REM !!!COPY YOUR COMMAND FOR BUILDING INTO THIS LINE AND REMOVE "REM"!!! >> output.txt
rompad.exe s1built.bin 255 0 >>output.txt

fixheadr.exe s1built.bin >>output.txt

Finally add "PAUSE" to the end of your batch if you wish to see the output before closing. If all is successful, you should get the contents of the build in "output.txt". The batch is also up for download here if you're using ASM68K.

#2 User is offline SMTP 

Posted 20 June 2009 - 05:03 PM

  • Posts: 2145
  • Joined: 27-April 04
  • Gender:Male
  • Location:Ohio
  • Wiki edits:59
Or you could simply open a command window in the folder and use Build....

#3 User is offline Sik 

Posted 20 June 2009 - 05:33 PM

  • Sik is pronounced as "seek", not as "sick".
  • Posts: 6719
  • Joined: 17-March 06
  • Gender:Male
  • Project:being an asshole =P
  • Wiki edits:11
Or add "PAUSE" at the end if what annoys you is that you can't see the messages...

In fact, the batch file I use for building my ROMs right now looks like this:
CODE
@echo off
asm68k /p <input.asm>, <output.bin> > log.txt
if errorlevel 1 start log.txt

If something goes wrong, Notepad opens showing the log contents, otherwise nothing happens because everything is OK =]

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users