-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild_debug.sh
More file actions
executable file
·52 lines (41 loc) · 1.33 KB
/
build_debug.sh
File metadata and controls
executable file
·52 lines (41 loc) · 1.33 KB
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
#!/bin/bash
# Delete some intermediate assembler output just in case
rm -f S3CE.debug.gen
rm -f S3CE.debug.p
rm -f S3CE.debug.h
rm -f S3CE.debug.log
# Run the assembler:
AS_MSGPATH=Tools/AS/Linux
USEANSI=n
# Allow the user to choose to print error messages out by supplying the -pe parameter
${AS_MSGPATH}/asl @Tools/AS/Linux/asflags_debug Engine/Includes.asm
test -f S3CE.debug.log && cat S3CE.debug.log
if [ ! -f S3CE.debug.p ]; then
echo "Assembler did not produce S3CE.debug.p"
exit 1
fi
# Convert the assembled file to binary
${AS_MSGPATH}/p2bin -p=FF -z=0,kosinskiplus,Size_of_DAC_driver_guess,after S3CE.debug.p S3CE.debug.gen S3CE.debug.h
# Delete temporary files
rm -f S3CE.debug.p
rm -f S3CE.debug.h
# Generate debug information
${AS_MSGPATH}/convsym S3CE.debug.lst S3CE.debug.gen -input as_lst -range 0 FFFFFF -exclude -filter \"z[A-Z].+\" -a
${AS_MSGPATH}/convsym S3CE.debug.lst "Engine/_RAM.debug.lst" -in as_lst -out asm -range FF0000 FFFFFF
# Make ROM padding (commented out as in the original)
#${AS_MSGPATH}/rompad S3CE.debug.gen 255 0
# Fix the ROM header
${AS_MSGPATH}/fixheader S3CE.debug.gen
# Copy rom to CD folder
if [ -f "S3CE.debug.gen" ]; then
cp S3CE.debug.gen _CD/
if [ $? -ne 0 ]; then
echo "Failed to copy S3CE.debug.gen"
exit 1
fi
fi
if test -f S3CE.debug.gen
then
exit 0
fi
exit 1