@REM THIS SETTING SHOULD BE ALL YOU NEED TO CHANGE
@set CC65_HOME=c:\cc65

@path=%path%;%CC65_HOME%\bin
@set LINK_OPTIONS=-C %CC65_HOME%\lib\nes_chr-ram.cfg %CC65_HOME%\modifiedneslib\crt0_chr-ram.o %CC65_HOME%\lib\rNES.o %CC65_HOME%\modifiedneslib\nes.lib

@REM Clean
@del *.nes

@REM Compile, assemble, and link
cc65 -t nes main.c
ca65 -t nes -l main.s
ld65 -o main.nes main.o %LINK_OPTIONS% 

@REM Run
@REM "C:\Documents and Settings\User\Desktop\nesterJ\nesterJ.exe" .\main.nes
run