-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake.bat
59 lines (37 loc) · 827 Bytes
/
make.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@echo off
pause 0
:again
del !cd2prev.nes
rename !cd2.nes !cd2prev.nes
cd nas
echo assemble...
dasm bank0.nas -f3 -obank0.bin
dasm bank0.nas -f3 -l!cd2.lst -obank0.bin > !err.log
for %%f in (*.nas) do call :dodasm %%f > NUL
goto :build
:dodasm
dasm %1 -f3 -o%~n1.bin
goto :eof
:build
echo build...
rename hdr.bin !cd2.hdr > NUL
rename chr.bin !cd2.chr > NUL
copy /b bank0.bin+bank1.bin+bank2.bin+bank3.bin+bank4.bin+bank5.bin+bank6.bin+bank7.bin !cd2.prg > NUL
nesimage j !cd2 > NUL
echo cleanup...
for %%f in (*.bin) do del %%f
rem del !err.log
del !cd2.prg
del !cd2.chr
del !cd2.hdr
copy /b !cd2.nes ..\!cd2.nes > NUL
del !cd2.nes
cd ..
echo ===OLD ROM===
if exist !cd2prev.nes nas\m3checksum !cd2prev.nes
echo ===NEW ROM===
if exist !cd2.nes nas\m3checksum !cd2.nes
echo done.
pause 0
goto :again
:eof