view mmltonsf.bat @ 40:2aa9614cb39a

flake8
author Paper <mrpapersonic@gmail.com>
date Mon, 21 Jun 2021 15:16:15 -0400
parents 002a5dbce627
children 37f231f85a67
line wrap: on
line source

@echo off

if "%1" == "" (
echo usage: compile.bat ^<input^>
exit /b
)

REM - Compile MML
del /f effect.h
ppmckc.exe -i "%1"
if not exist "effect.h" (
echo ppmckc ERROR
exit /b
)

REM - Assemble
del /f ppmck.nes
nesasm -s -raw ppmck.asm
if not exist "ppmck.nes" (
echo nesasm ERROR
del /f "%~n1" effect.h define.inc
exit /b
)

REM - Move files and such
move /y ppmck.nes "%~n1.nsf"
echo %~n1.nsf written

REM - Cleanup
del /f "%~n1".h effect.h define.inc