summaryrefslogtreecommitdiff
path: root/hram.asm
blob: 4acfbfa488668883cf613e39951e4819cc5cf668 (plain)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
SECTION "HRAM", HRAM

hOAMDMA::
	ds 10

	ds 3 ; TODO

hRTCHours:: db
hRTCMinutes:: db
hRTCSeconds:: db
hRTCDays:: db
	ds 2 ; TODO
hRTCStatusFlags:: db
	ds 3 ; TODO

hVBlankCounter::
	db

hROMBank::
	db


hVBlank::
	db

hMapEntryMethod::
	db

hStartmenuCloseAndSelectHookEnable:: db

hStartmenuCloseAndSelectHookTemp:: db

hJoypadUp:: db
; Raw Joypad Up Event
; A pressed key was released
hJoypadDown:: db
; Raw Joypad Down Event
; An unpressed key was pressed
hJoypadState:: db
; Raw Joypad State
; State of all keys during current frame
hJoypadSum:: db
; Raw Joypad State Sum
; Sum of all keys that were pressed
; since hJoypadSum was last cleared

	ds 1; TODO
hJoyDown:: db
hJoyState:: db
hJoySum:: db

hJoyDebounceSrc:: db
; hJoySum will be updated from
; 00 - hJoyDown
; <> - hJoyState
; See GetJoypadDebounced

hJoypadState2:: db

	ds 6 ; TODO
hGraphicStartTile:: db
hMoveMon:: db

UNION

hTextBoxCursorBlinkInterval:: ds 2

NEXTU
hEventCollisionException:: db
hEventID:: db

NEXTU

hSpriteWidth::
hSpriteInterlaceCounter::
	db
hSpriteHeight::
	db

NEXTU

hConnectionStripLength:: db
hConnectedMapWidth:: db

NEXTU

hMapObjectIndexBuffer:: db
hObjectStructIndexBuffer:: db

ENDU

hSpriteOffset::
	db

	db ; TODO

UNION

hProduct::
hDividend::
	; ds 4
	db

hMultiplicand::
hQuotient::
	ds 3

hMultiplier::
hDivisor::
hRemainder::
	db

hMathBuffer::
	ds 5

NEXTU

hPrintNumLeadingDigit:: db ; digit one place-value up
hPrintNumDividend:: ds 3 ; big-endian
hPrintNumDivisor:: ds 3 ; big-endian
hPrintNumTemp:: ds 3 ; big-endian

ENDU

	ds 3 ; TODO

hFFC0:: ds 1

	ds 6

hFFC7:: db
hFFC8:: db
hFFC9:: db
hFFCA:: db
hFFCB:: db
hFFCC:: db

	ds 3 ; TODO

hLCDCPointer::
	db

hLYOverrideStart:: db
hLYOverrideEnd:: db
	ds 1 ; TODO


hSerialReceived::
	db

hLinkPlayerNumber::
	db

hSerialIgnoringInitialData::
	db


hSerialSend::
	db
hSerialReceive::
	db


hSCX:: db
hSCY:: db
hWX:: db
hWY:: db

hOverworldFlashlightEffect:: db
; Influences draw distance of map around HIRO
; Meant to go from 0 --> to desired distance
; or else graphical errors will occur.
; 0 - regular distance
; 1 - 14x14 tile block
; 2 - 10x10 tile block
; 3 -  6x 6 tile block
; 4 -  2x 2 tile block

hBGMapMode::
	db

hBGMapTransferPosition::
	db

hBGMapAddress::
	dw
	db ; TODO

hSPTemp::
	dw

hRedrawRowOrColumnMode:: db
; Used for redrawing BG in small updates
; instead of once completely for faster
; scrolling on overworld etc.
; Valid values:
; $00 - no redraw
; $01 - column redraw (move horizontally)
; $02 - row redraw    (move vertically)
; $03 - flashlight row redraw 0 (move up)
; $04 - flashlight row redraw 0 (move down)
; $05 - flashlight column redraw 0 (move left)
; $06 - flashlight column redraw 0 (move right)
; $07 - flashlight row redraw 1 (move up)
; $08 - flashlight row redraw 1 (move down)
; $09 - flashlight column redraw 1 (move left)
; $0A - flashlight column redraw 1 (move right)
; $0B - flashlight row redraw 2 (move up)
; $0C - flashlight row redraw 2 (move down)
; $0D - flashlight column redraw 2 (move left)
; $0E - flashlight column redraw 2 (move right)
; $0F - flashlight row redraw 3 (move up)
; $10 - flashlight row redraw 3 (move down)
; $11 - flashlight column redraw 3 (move left)
; $12 - flashlight column redraw 3 (move right)

hRedrawRowOrColumnDest:: ds 2

hMapAnims::
	db

hTileAnimFrame::
	db

hFFEA::
	db

hFFEB:: db
hFFEC:: db
hFFED:: db

hFFEE::
	db

hRandomAdd:: db
hRandomSub:: db
hRTCRandom:: db

hBattleTurn:: db

hCurMapTextSubroutinePtr:: dw

	; TODO