-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
executable file
·100 lines (78 loc) · 2.66 KB
/
build.sh
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/env bash
# Set up program locations (change these if they are not aleady in the path)
beebasm="beebasm"
c1541="c1541"
python="python"
# Create an empty work folder
rm -fr work
mkdir work
# Get the current date for the build filename
CURRENTDATE=`date +%Y-%m-%d`
# First, we build the NTSC version
cd work
# Create an empty file for the build number
touch empty.txt
# Create the readme file for flicker-free ships
$beebasm -i ../src/elite-flicker-free-readme.asm
# Extract the files from the original disk image
$c1541 -attach "../original-disks/elite[firebird_1986](ntsc)(v060186)(!).g64" \
-extract
# Assemble the additional code required for flicker-free ships
$beebasm -i ../src/elite-flicker-free.asm -v > compile.txt
# Modify the main game code
$python ../src/elite-modify.py ntsc
# Rebuild the game disk
$c1541 \
-format "no-flicker elite,1" \
d64 \
../flicker-free-disks/c64-elite-flicker-free-ntsc.d64 \
-attach ../flicker-free-disks/c64-elite-flicker-free-ntsc.d64 \
-write firebird \
-write gma1.modified gma1 \
-write gma3 \
-write gma4.encrypted gma4 \
-write gma5.encrypted gma5 \
-write gma6.encrypted gma6 \
-write readme64.txt "readme,s" \
-write empty.txt "build ${CURRENTDATE},s"
# Report checksums
cd ..
$python src/crc32.py reference-binaries/ntsc work
# Next, we build the PAL version
cd work
# Extract the files from the original disk image
$c1541 -attach "../original-disks/elite[firebird_1986](pal)(v040486).g64" \
-extract
# Assemble the additional code required for flicker-free ships
$beebasm -i ../src/elite-flicker-free.asm -v >> compile.txt
# Modify the main game code
$python ../src/elite-modify.py pal
# Rebuild the game disk
$c1541 \
-format "no-flicker elite,1" \
d64 \
../flicker-free-disks/c64-elite-flicker-free-pal.d64 \
-attach ../flicker-free-disks/c64-elite-flicker-free-pal.d64 \
-write firebird \
-write byebyejulie \
-write gma1.modified gma1 \
-write gma3 \
-write gma4.encrypted gma4 \
-write gma5.encrypted gma5 \
-write gma6.encrypted gma6 \
-write readme64.txt "readme,s" \
-write empty.txt "build ${CURRENTDATE},s"
# Report checksums
cd ..
$python src/crc32.py reference-binaries/pal work
# And finally we modify the Plus/4 version
cd work
# Copy the decrypted PRG to the work folder
cp ../original-disks/elite_+4_unpacked.prg .
# Assemble the additional code required for flicker-free ships
$beebasm -i ../src/elite-flicker-free-plus4.asm -v >> compile.txt
# Modify the main game code
$python ../src/elite-modify-plus4.py
# Report checksums
cd ..
$python src/crc32.py reference-binaries/plus4 work