-
Notifications
You must be signed in to change notification settings - Fork 0
/
symbols.asm
112 lines (89 loc) · 3.5 KB
/
symbols.asm
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
101
102
103
104
105
106
107
108
109
110
111
112
macro sym
if \2 < $4000 && \1 == 0
section "\3", rom0[\2]
elif \2 < $8000
section "\3", romx[\2], bank[\1]
elif \2 < $a000
section "\3", vram[\2], bank[\1]
elif \2 < $c000
section "\3", sram[\2], bank[\1]
elif \2 < $d000 && \1 == 0
section "\3", wram0[\2]
elif \2 < $e000
section "\3", wramx[\2], bank[\1]
else
section "\3", hram[\2]
endc
\3::
endm
; Gets absolute location in the VRAM tilemap (At least, I think)
; b = x coord, c = y coord
; hl = result
sym $00, $0ed4, Vram_TilemapCoord
; Copies b palettes from hl into wPals, starting with palette a
; a = palette start, b = palette count, hl = palette source
sym $00, $06bc, Vram_SetPals
; Same as Vram_SetPals but with a bank argument
; a = palette start, b = palette count, c = source bank, hl = palette source
sym $00, $06d9, Vram_SetFarPals
; not sure
sym $00, $06f2, Vram_ApplyPals
; Called during screen blanking, uploads palettes depending on paramters in wram
sym $00, $071b, Vram_UpdatePalsVBlank
; Copies b palettes from wPals into palette RAM, starting with palette a
; a = palette start, b = palette count
sym $00, $0789, Vram_UploadPals
; Writes data into VRAM, while keeping in mind whether the LCD is on or not
; a = data, hl = address
sym $00, $0f1c, Vram_Put
; Writes data during vblank or hblank
; a = data, hl = address
sym $00, $0f2d, Vram_PutWaitBlank
; Places text at a specific coordinate in the tilemap inmediately
; This function interprets newlines in the main charmap
; b = x coord, c = y coord, hl = text location
sym $00, $2b38, TextPrint
; Places text at a specific coordinate in the tilemap
; Uses the VBlank FIFO to delay blitting until vblank
; b = x coord, c = y coord, hl = text location
sym $00, $3353, TextPut
; Places text at a coordinate embedded in the data, using the coord_text macro
; Uses the VBlank FIFO to delay blitting until vblank
; hl = data location
sym $00, $336e, CoordTextPut
; Writes a byte to the VBlank FIFO, to be later picked up during VBlank
; This function waits until there's enough space available
; a = byte to write
sym $00, $34d8, VBlankFIFO_Write
; Copies b bytes from hl into de in vram
; b = count, de = destination, hl = source
sym $00, $350f, VBlankFIFO_Queue
; Processes the next command in the VBlank FIFO
sym $00, $3537, VBlankFIFO_Process
; Calls function in a different bank
; Operates on the three bytes following the "rst $28": bank, addr lo, addr hi
sym $00, $3b06, Farcall
sym $00, $3b46, Farcall_Jump
; bc = count, de = source, hl = destination
sym $00, $3b50, Memcpy
; Draws a single tile with attributes at $dc6d and increments the address
; a = tile, b = attributes, hl = address
sym $10, $6acf, NameInput_PlaceTile
; Clears a horizontal line in the name confirmation dialog
sym $10, $6a80, NameInput_ConfirmDialog_Horiz
; Fill an area in the tilemap with a tile
; a = tile, b = x coord, c = y coord, d = width, e = height
sym $15, $6ad3, Gfx_TilemapFill
; 256 fifo buffer
sym $00, $c300, wVBlankFIFO
; Current screen palettes
sym $00, $c4e0, wPals
; Palette upload parameters
sym $00, $c560, wPalsVBlankParam1
sym $00, $c561, wPalsVBlankParam2
sym $00, $c562, wPalsVBlankParam3
; Head and tail pointers for the VBlank FIFO
sym $00, $ffc8, hVBlankFIFO_Head
sym $00, $ffc9, hVBlankFIFO_Tail
sym $00, $ffca, hVBlankFIFO_Count ; Amount of commands in the fifo
sym $00, $ffcb, hVBlankFIFO_Bank ; Bank to copy data to