forked from at67/gigatron-rom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (60 loc) · 1.69 KB
/
Makefile
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
CFLAGS:=-std=c11 -O3 -Wall
ROMv1.rom: Core/* Apps/* Images/* Makefile interface.json
# ROMv1 gets 0x1c. Further numbers to be decided.
env romType="0x1c"\
PYTHONPATH="Core:$(PYTHONPATH)"\
python Core/ROMv1.py\
Apps/Snake.gcl\
Apps/Racer.gcl\
Apps/Mandelbrot.gcl\
Apps/Pictures.gcl\
Apps/Credits.gcl\
Apps/Loader.gcl\
Apps/Screen.gcl\
Apps/Main.gcl\
Core/Reset.gcl
dev: ROMv1x.rom
ROMv1x.rom: Core/* Apps/* Images/* Makefile interface.json
# ROMv1x is development towards ROMv2 (minor changes only)
env romType="0x1c"\
PYTHONPATH="Core:$(PYTHONPATH)"\
python Core/ROMv1x.py\
Apps/Snake_v1x.gcl\
Apps/Racer.gcl\
Apps/Mandelbrot.gcl\
Apps/Pictures.gcl\
Apps/Credits.gcl\
Apps/Loader.gcl\
Apps/Screen.gcl\
Apps/Main_v1x.gcl\
Core/Reset_v1x.gcl
run: gtemu ROMv1.rom
./gtemu
test: gtemu ROMv1x.rom
# Check for hSync errors in first ~30 seconds of emulation
./gtemu | head -999999 | grep \~
compiletest:
# Test compilation
Core/compilegcl.py Apps/HelloWorld.gcl
Core/compilegcl.py Apps/Snake.gcl
Core/compilegcl.py Apps/Mandelbrot.gcl
Core/compilegcl.py Apps/Credits.gcl
time: gtemu ROMv1x.rom
# Run emulation until first sound
./gtemu | grep -m 1 'xout [^0]'
burn: ROMv1x.rom
minipro -p 'AT27C1024 @DIP40' -w ROMv1.rom -y -s
%.h: %.gt1
# Convert GT1 file into header for including as PROGMEM data
od -t x1 < "$<" |\
awk 'BEGIN {print "// Converted from $< by Makefile"}\
{for (i=2; i<=NF; i++) printf "0x%s,\n", $$i}' > "$@"
%.rgb: %.png
# Uses ImageMagick
convert "$<" "$@"
todo:
@git ls-files | sed 's/ /\\ /g' | xargs grep -I -E '(TODO|XXX)'
# Show simplified git log
log:
git log --oneline --decorate --graph --all
# vi: noexpandtab