-
Notifications
You must be signed in to change notification settings - Fork 2
/
scene-data.asm
301 lines (236 loc) · 6.71 KB
/
scene-data.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
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
; asmsyntax=ca65
; This should handle all cutscene stuff
; scene dirirection (spleling counts):
; - draw a scene on the background
; - update CHR
; - add/remove sprites
; - set timer for scene changes
; this will all be encoded in some sort of binary format
.enum Dialogue
BreakingNews_1
BreakingNews_2
BreakingNews_3
BreakingNews_4
BreakingNews_5
BreakingNews_6
CyberPiss_1
CyberPiss_2
CyberPiss_3
CyberPiss_4
.endenum
Scene_Index:
.word Scene_Intro
Scene_Intro:
.byte SceneCmd::SetSkippable
.byte SceneCmd::SetExitRoutine
.byte InitIDs::Title
.byte SceneCmd::TurnOffPPU
.byte SceneCmd::LoadChr
.byte $00 | 14 ; dest pattern table (bit 7) & page
.byte 0 ; Dest tile offset
.byte TvTileData_Count; tile count
.word TvTileData ; Source label
.byte SceneCmd::LoadChr
.byte $80 | 14 ; dest pattern table (bit 7) & page
.byte 0 ; Dest tile offset
.byte TvTileDataLower_Count; tile count
.word TvTileDataLower ; Source label
.byte SceneCmd::DrawFullScene
.byte 2 ; page 2
.byte $20 ; dest nametable
;
; This should be the news scene
.byte ScreenIDs::News
.byte SceneCmd::DrawFullScene
.byte 2 ; page 2
.byte $24 ; dest nametable
;
; This should be the news scene
.byte ScreenIDs::TvStatic
.byte SceneCmd::DrawFullScene
.byte 2
.byte $20
.byte ScreenIDs::TextBox
.byte SceneCmd::DrawFullScene
.byte 2
.byte $24
.byte ScreenIDs::TextBox
.byte SceneCmd::PadSprites
.byte SceneCmd::SetPalette
; dest palette.
; 0-3: BG
; 4-7: Sprites
.byte 0
; 4 bytes for the colors
;.byte $0F, $2A, $20, $3A
.byte $0F, $10, $00, $0F
.byte SceneCmd::SetPalette
; dest palette.
; 0-3: BG
; 4-7: Sprites
.byte 1
; 4 bytes for the colors
;.byte $0F, $00, $20, $10
.byte $0F, $17, $37, $17
.byte SceneCmd::SetPalette
.byte 2
.byte $0F, $30, $37, $10
.byte SceneCmd::SetPalette
.byte 3
.byte $0F, $0F, $10, $30
.byte SceneCmd::SetPalette
; dest palette.
; 0-3: BG
; 4-7: Sprites
.byte 4
; 4 bytes for the colors
.byte $0F, $10, $00, $0F
;.byte $0F, $0F, $0F, $0F
.byte SceneCmd::ClearAttr0
.byte SceneCmd::ClearAttr1
;.byte SceneCmd::TvAttr
.byte SceneCmd::RunFunction
.word WriteNewsAttr
;.byte SceneCmd::StaticAttr
.byte SceneCmd::RunFunction
.word WriteStaticAttributes
.byte SceneCmd::PrepareText
.word $22A8 ; NT address
;.word $0820 ; CHR address
.byte 0 ; ID
.byte $90 ; start tile ID
;.byte 16 ; Length
.byte SceneCmd::PrepareText
.word $22C8 ; NT address
;.word $0920 ; CHR address
.byte 1 ; ID
.byte $A0 ; start tile ID
;.byte 16 ; length
.byte SceneCmd::DrawText
;.word $22A9
.byte 0 | $80 ; text area id
.asciiz "lel, welcome to the"
.byte SceneCmd::DrawText
.byte 1 | $80 ; text area id
;.word $22C9
.asciiz "news"
.byte SceneCmd::RunFunction
.word InitStatic
.byte SceneCmd::TurnOnPPU
.byte SceneCmd::WaitSeconds
.byte 3
.byte SceneCmd::DrawTextFromTable
.byte 0 | $80
.byte Dialogue::BreakingNews_1
.byte SceneCmd::DrawTextFromTable
.byte 1 | $80
.byte Dialogue::BreakingNews_2
.byte SceneCmd::WaitSeconds
.byte 3
.byte SceneCmd::DrawTextFromTable
.byte 0 | $80
.byte Dialogue::BreakingNews_3
.byte SceneCmd::DrawTextFromTable
.byte 1 | $80
.byte Dialogue::BreakingNews_4
.byte SceneCmd::WaitSeconds
.byte 3
.byte SceneCmd::DrawTextFromTable
.byte 0 | $80
.byte Dialogue::BreakingNews_5
.byte SceneCmd::DrawTextFromTable
.byte 1 | $80
.byte Dialogue::BreakingNews_6
.byte SceneCmd::WaitSeconds
.byte 3
.byte SceneCmd::SetFramePointer
.word Frame_ScreenTest
.byte SceneCmd::SetNMIPointer
.word NMI_ScreenTest
.byte SceneCmd::WaitSeconds
.byte 3
.byte SceneCmd::SetNametable1
; clear the frame pointer. no more static lines
.byte SceneCmd::SetFramePointer
.word $0000
.byte SceneCmd::WaitSeconds
.byte 2
.byte SceneCmd::TurnOffPPU
; Clear out the text from before
.byte SceneCmd::ClearText
.byte $90 ; start tile ID
.byte $A0 ; start tile ID
.byte SceneCmd::SetNametable0
.byte SceneCmd::DrawFullScene
.byte 2 ; page 2
.byte $20 ; dest nametable
;
; This should be the news scene
.byte ScreenIDs::Hood
; Draw Full Scene, text box
.byte SceneCmd::DrawFullScene
.byte 2
.byte $20
.byte ScreenIDs::TextBox
.byte SceneCmd::SetPalette
.byte 1
.byte $0F, $00, $20, $10
.byte SceneCmd::SetPalette
.byte 2
.byte $0F, $00, $20, $10
.byte SceneCmd::SetFramePointer
.word Frame_ScreenTest
.byte SceneCmd::TurnOnPPU
.byte SceneCmd::WaitSeconds
.byte 2
.byte SceneCmd::SetFramePointer
.word $0000
.byte SceneCmd::PrepareText
.word $22A8 ; NT address
.byte 0 ; ID
.byte $90 ; start tile ID
.byte SceneCmd::PrepareText
.word $22C8 ; NT address
.byte 1 ; ID
.byte $A0 ; start tile ID
.byte SceneCmd::DrawTextFromTable
.byte 0 | $80
.byte Dialogue::CyberPiss_1
.byte SceneCmd::DrawTextFromTable
.byte 1 | $80
.byte Dialogue::CyberPiss_2
.byte SceneCmd::WaitSeconds
.byte 3
.byte SceneCmd::DrawTextFromTable
.byte 0 | $80
.byte Dialogue::CyberPiss_3
.byte SceneCmd::DrawTextFromTable
.byte 1 | $80
.byte Dialogue::CyberPiss_4
.byte SceneCmd::WaitSeconds
.byte 5
.byte SceneCmd::GotoInit
; TODO: figure out where text needs to actually wrap.
DialogueIndex:
.word :+
.word :++
.word :+++
.word :++++
.word :+++++
.word :++++++
.word :+++++++
.word :++++++++
.word :+++++++++
.word :++++++++++
; hard wrap limit .
: .asciiz "Breaking news today!"
: .asciiz "MegaEvilCorp has"
: .asciiz "finally reached a"
: .asciiz "global market cap of"
: .asciiz "99%! Rejoice as our"
: .asciiz "new robot overlords-"
; .
: .asciiz "It's time to cyber-"
: .asciiz "piss in "
: .asciiz "MegaEvilCorp's"
: .asciiz "cheerios. You in?"