-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathROM Buildfile.event
88 lines (73 loc) · 1.68 KB
/
ROM Buildfile.event
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
//making the header
#define armJump(label) "WORD 0xEA000000 + (((label-currentoffset-8)/4)&0xFFFFFF)"
ORG $0
armJump(romStart) //arm instruction, jump to 0xC0
#incbin "bitmap.bin" //displayed, then checked on bootup, gba hangs without this
BYTE 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 //uppercase ascii, max 12 characters
BYTE 0x20 0x20 0x20 0x20 //uppercase ascii, 4 characters
BYTE 0x20 0x20 //uppercase ascii, 2 characters
BYTE $96 //fixed value
BYTE 0 //main unit, 0 for gba
BYTE 0 //device type
BYTE 0 0 0 0 0 0 0 //some empty bytes
BYTE 0 //software version
BYTE $8F //checksum of bytes A0 to BC, ((0 - each byte) - $19 )&0xFF
SHORT 0 //some empty bytes
//the strings for the header
PUSH; ORG $A0; String(SNEK); POP
PUSH; ORG $AC; String(SNEK); POP
PUSH; ORG $B0; String(00); POP
romStart:
#inctext lyn "ASM\boot.elf" //change to thumb and set the background layers, tiles and palettes up
#include "ASM.event"
#include "Graphics.event"
#include "Sounds.event"
ALIGN 4
bgTilemapsBuffer:
WORD $03000000
WORD $03000800
WORD $03001000
WORD $03001800
ALIGN 4
bgTilemaps:
WORD $0600F800
WORD $0600F000
WORD $0600E800
WORD $0600E000
ALIGN 4
soundCounters:
WORD $02005500
WORD $02005504
WORD $02005508
WORD $0200550C
ALIGN 4
speedTSAs:
POIN slowTSA
POIN normalTSA
POIN fastTSA
POIN tasTSA
ALIGN 4
speedSpeeds:
BYTE 16
BYTE 8
BYTE 4
BYTE 1
ALIGN 4
creditImages:
POIN credits1IMG
POIN credits2IMG
POIN credits3IMG
POIN credits4IMG
POIN credits5IMG
WORD 0
/*
facing directions of the snake:
1
^
|
0 <- o -> 3
|
v
2
*/
//the snake's longest possible length is 540, so I'm going to limit it to that and cause a game over if it's reched (with a win message?)