-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.bat
40 lines (30 loc) · 901 Bytes
/
build.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
@ECHO OFF
IF EXIST s2.o DEL s2.o
IF EXIST s2.sym DEL s2.sym
IF EXIST s2.sms DEL s2.sms
ECHO Assembling...
wla_dx_binaries_latest\wla-z80 -vo src\s2.asm s2.o > build_report.txt
IF %ERRORLEVEL% NEQ 0 GOTO assemble_fail
IF NOT EXIST s2.o GOTO assemble_fail
ECHO Linking...
wla_dx_binaries_latest\wlalink -rs link.txt s2.sms
IF %ERRORLEVEL% NEQ 0 GOTO link_fail
ECHO ==========================
ECHO Build Success.
ECHO ==========================
REM Use fcomp to compare with original ROM
REM ECHO Comparing with original:
fcomp s2.sms "Sonic the Hedgehog 2 (UE) [!].sms" > compare.txt
REM fcomp s2.sms "Sonic the Hedgehog 2 (UE) (V2.2).sms" > compare.txt
GOTO end
:assemble_fail
ECHO Error while assembling.
GOTO fail
:link_fail
ECHO Error while linking.
:fail
ECHO ==========================
ECHO Build failure.
ECHO ==========================
:end
PAUSE