@echo off
echo.
echo   Project Based On ArduinoOPL
echo   Uploader Made By Darlington
echo.
echo  ---------------------------------------------
echo   1. DOSBOX ThroughPass (달링톤님 DOSBox 애드립 실기)
echo   2. Midi 동시 6음 + 리듬모드
echo   3. Midi 동시 10음
echo   4. OPL2 Audio Board PassThrough(달링톤님 및 DOSBox-X 애드립 실기, 달링톤님 보드용)
echo   5. OPL2 Audio Board PassThrough(달링톤님 및 DOSBox-X 애드립 실기, OPL2 Audio Board 용)
echo   6. OPL2 Audio Board to OPL3Duo PassThrough(달링통님 및 DOSBox-X 애드립 실기, OPL3Duo용)
echo   7. OPL3Duo PassThrough(DOSBox-X 애드립 실기, OPL3Duo용)
echo   8. OPL3Duo PassThrough(DOSBox-X 애드립 실기, OPL3Duo용, atmega328p old - 전송속도 57600용)
echo  ---------------------------------------------
echo.
set /p main=무엇을 업로드 하시겠습니까? 
echo.
echo 보드의 COM 포트를 사용하는 프로그램을 먼저 종료 하셔야 업로드가 가능합니다. (DOSBox, midiSerial 프로그램)
set /p COM=COM포트 숫자만 입력하세요. 

if "%main%" == "1" goto dosbox
if "%main%" == "2" goto midi6
if "%main%" == "3" goto midi10
if "%main%" == "4" goto dosbox-x
if "%main%" == "5" goto dosbox-x0
if "%main%" == "6" goto dosbox-x1
if "%main%" == "7" goto dosbox-x2
if "%main%" == "8" goto dosbox-x3

:dosbox
avrdude -C avrdude.conf -v -p atmega328p -c arduino -P COM%COM% -b 57600 -D -U flash:w:DosBoxTP.hex":i
pause
exit

:midi6
avrdude -C avrdude.conf -v -p atmega328p -c arduino -P COM%COM% -b 57600 -D -U flash:w:MIDI6.hex":i
pause
exit

:midi10
avrdude -C avrdude.conf -v -p atmega328p -c arduino -P COM%COM% -b 57600 -D -U flash:w:MIDI10.hex":i
pause
exit

:dosbox-x
avrdude -C avrdude.conf -v -p atmega328p -c arduino -P COM%COM% -b 57600 -D -U flash:w:OPL2AudioBoard.hex":i
pause
exit

:dosbox-x0
avrdude -C avrdude.conf -v -p atmega328p -c arduino -P COM%COM% -b 115200 -D -U flash:w:OPL2AudioBoard.hex":i
pause
exit

:dosbox-x1
avrdude -C avrdude.conf -v -p atmega328p -c arduino -P COM%COM% -b 115200 -D -U flash:w:opl2to3board.hex":i
pause
exit

:dosbox-x2
avrdude -C avrdude.conf -v -p atmega328p -c arduino -P COM%COM% -b 115200 -D -U flash:w:opl3duo.hex":i
pause
exit

:dosbox-x3
avrdude -C avrdude.conf -v -p atmega328p -c arduino -P COM%COM% -b 57600 -D -U flash:w:opl3duo.hex":i
pause
exit

