summaryrefslogtreecommitdiff
path: root/engine/credits.asm
blob: a68f7ceb03a1f7321b552c42aede7785085260bb (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
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
INCLUDE "includes.asm"


SECTION "Credits", ROMX, BANK[CREDITS]

	const_def
	const SATOSHI_TAJIRI
	const JUNICHI_MASUDA
	const TETSUYA_WATANABE
	const SHIGEKI_MORIMOTO
	const SOUSUKE_TAMADA
	const TAKENORI_OOTA
	const KEN_SUGIMORI
	const MOTOFUMI_FUJIWARA
	const ATSUKO_NISHIDA
	const MUNEO_SAITO
	const SATOSHI_OOTA
	const RENA_YOSHIKAWA
	const JUN_OKUTANI
	const HIRONOBU_YOSHIDA
	const ASUKA_IWASHITA
	const GO_ICHINOSE
	const MORIKAZU_AOKI
	const KOHJI_NISHINO
	const KENJI_MATSUSHIMA
	const TOSHINOBU_MATSUMIYA
	const SATORU_IWATA
	const NOBUHIRO_SEYA
	const KAZUHITO_SEKINE
	const TETSUJI_OOTA
	const NCL_SUPER_MARIO_CLUB
	const SARUGAKUCHO
	const AKITO_MORI
	const TAKAHIRO_HARADA
	const TOHRU_HASHIMOTO
	const NOBORU_MATSUMOTO
	const TAKEHIRO_IZUSHI
	const TAKASHI_KAWAGUCHI
	const TSUNEKAZU_ISHIHARA
	const HIROSHI_YAMAUCHI
	const KENJI_SAIKI
	const ATSUSHI_TADA
	const NAOKO_KAWAKAMI
	const HIROYUKI_ZINNAI
	const KUNIMI_KAWAMURA
	const HISASHI_SOGABE
	const KEITA_KAGAYA
	const YOSHINORI_MATSUDA
	const HITOMI_SATO
	const TORU_OSAWA
	const TAKAO_OHARA
	const YUICHIRO_ITO
	const TAKAO_SHIMIZU
	const PLANNING
	const KEITA_NAKAMURA
	const HIROTAKA_UEMURA
	const HIROAKI_TAMURA
	const NORIAKI_SAKAGUCHI
	const MIYUKI_SATO
	const GAKUZI_NOMOTO
	const AI_MASHIMA
	const MIKIHIRO_ISHIKAWA
	const HIDEYUKI_HASHIMOTO
	const SATOSHI_YAMATO
	const SHIGERU_MIYAMOTO
	const GAIL_TILDEN
	const NOB_OGASAWARA
	const SETH_MCMAHILL
	const HIROTO_ALEXANDER
	const TERESA_LILLYGREN
	const THOMAS_HERTZOG
	const ERIK_JOHNSON
	const HIRO_NAKAMURA
	const TERUKI_MURAKAWA
	const KAZUYOSHI_OSAWA
	const KIMIKO_NAKAMICHI
	const CREDIT_END
	const CREDIT_UNKNOWN
	const STAFF
	const DIRECTOR
	const CODIRECTOR
	const PROGRAMMERS
	const GRAPHICS_DIRECTOR
	const MONSTER_DESIGN
	const GRAPHICS_DESIGN
	const CREDIT_MUSIC
	const CREDIT_SOUND_EFFECTS
	const GAME_DESIGN
	const GAME_SCENARIO
	const TOOL_PROGRAMMING
	const PARAMETRIC_DESIGN
	const SCRIPT_DESIGN
	const MAP_DATA_DESIGN
	const MAP_DESIGN
	const PRODUCT_TESTING
	const SPECIAL_THANKS
	const PRODUCERS
	const EXECUTIVE_PRODUCER
	const POKEMON_ANIMATION
	const POKEDEX_TEXT
	const MOBILE_PRJ_LEADER
	const MOBILE_SYSTEM_AD
	const MOBILE_STADIUM_DIR
	const COORDINATION
	const COPYRIGHT
	const US_VERSION_STAFF
	const US_COORDINATION
	const TEXT_TRANSLATION
	const PAAD_TESTING

const_value SET -7
	const CREDITS_THEEND
	const CREDITS_WAIT2
	const CREDITS_MUSIC
	const CREDITS_CLEAR
	const CREDITS_SCENE
	const CREDITS_WAIT
	const CREDITS_END


Function109847:: ; 109847
	bit 6, b
	ld a, $0
	jr z, .asm_10984f
	ld a, $40
.asm_10984f
	ld [$cf63], a

	ld a, [rSVBK]
	push af
	ld a, $5
	ld [rSVBK], a

	call WhiteBGMap
	call ClearTileMap
	call ClearSprites

	ld hl, $ca00
	ld c, $80
	ld de, $ff00

.asm_10986a
	ld a, e
	ld [hli], a
	ld a, d
	ld [hli], a
	dec c
	jr nz, .asm_10986a

	ld de, CreditsBorderGFX
	ld hl, $9200
	lb bc, BANK(CreditsBorderGFX), $09
	call Request2bpp

	ld de, CopyrightGFX
	ld hl, $9600
	lb bc, BANK(CopyrightGFX), $1d
	call Request2bpp

	ld de, TheEndGFX
	ld hl, $9400
	lb bc, BANK(TheEndGFX), $10
	call Request2bpp

	ld a, $ff
	ld [$cf64], a
	xor a
	ld [$cf65], a

	call Function109bca
	ld e, l
	ld d, h
	ld hl, VTiles2
	lb bc, BANK(CreditsMonsGFX), $10
	call Request2bpp

	call Function109a95
	xor a
	ld [$cf66], a

	ld hl, LYOverrides
	ld bc, $100
	xor a
	call ByteFill

	ld a, rSCX & $ff
	ld [hLCDStatCustom], a

	call GetCreditsPalette
	call Function32f9
	ld a, [$ff9e]
	push af
	ld a, $5
	ld [$ff9e], a
	ld a, $1
	ld [$ffaa], a
	xor a
	ld [hBGMapMode], a
	ld [CreditsPos], a
	ld [$cd21], a
	ld [CreditsTimer], a

.asm_1098de
	call Function109908
	call Function1098fd
	jr nz, .asm_1098ee

	call Function109926
	call DelayFrame
	jr .asm_1098de

.asm_1098ee
	call WhiteBGMap
	xor a
	ld [hLCDStatCustom], a
	ld [hBGMapAddress], a
	pop af
	ld [$ff9e], a
	pop af
	ld [rSVBK], a
	ret
; 1098fd

Function1098fd: ; 1098fd
	ld a, [hJoypadDown]
	and $1
	ret z
	ld a, [$cf63]
	bit 7, a
	ret
; 109908

Function109908: ; 109908
	ld a, [hJoypadDown]
	and $2
	ret z
	ld a, [$cf63]
	bit 6, a
	ret z
	ld hl, CreditsPos
	ld a, [hli]
	cp $d
	jr nc, .asm_10991e
	ld a, [hli]
	and a
	ret z

.asm_10991e
	ld hl, CreditsTimer
	ld a, [hl]
	and a
	ret z
	dec [hl]
	ret
; 109926

Function109926: ; 109926
	ld a, [$cf63]
	and $f
	ld e, a
	ld d, $0
	ld hl, $5937
	add hl, de
	add hl, de
	ld a, [hli]
	ld h, [hl]
	ld l, a
	jp [hl]
; 109937


; no known jump sources
Jumptable_109937: ; 109937 (42:5937)
	dw ParseCredits
	dw Function109951
	dw Function109951
	dw Function10995e
	dw Function109964
	dw Function10997b
	dw Function109986
	dw Function109951
	dw Function109951
	dw Function109951
	dw Function109964
	dw Function10997b
	dw Function109956


; known jump sources: 109961 (42:5961), 109983 (42:5983), 1099a0 (42:59a0), 109a62 (42:5a62)
Function109951: ; 109951 (42:5951)
	ld hl, $cf63
	inc [hl]
	ret

; no known jump sources
Function109956: ; 109956 (42:5956)
	ld hl, $cf63
	ld a, [hl]
	and $f0
	ld [hl], a
	ret

; no known jump sources
Function10995e: ; 10995e (42:595e)
	xor a
	ld [hBGMapMode], a ; $ff00+$d4
	jp Function109951

; no known jump sources
Function109964: ; 109964 (42:5964)
	call Function109bca
	ld a, l
	ld [$cf68], a
	ld a, h
	ld [$cf69], a
	ld a, $0
	ld [$cf6a], a
	ld a, $90
	ld [$cf6b], a
	jr Function10997b

; known jump sources: 109979 (42:5979)
Function10997b: ; 10997b (42:597b)
	xor a
	ld [hBGMapMode], a ; $ff00+$d4
	ld a, $8
	ld [$cf67], a
	jp Function109951

; known jump sources: 10998a (42:598a)
Function109986: ; 109986 (42:5986)
	ld a, [rLY] ; $ff00+$44
	cp $30
	jr c, Function109986
	ld a, [$cf66]
	dec a
	dec a
	ld [$cf66], a
	ld hl, $d11f
	call Function1099a3
	ld hl, $d187
	call Function1099a3
	jp Function109951

; known jump sources: 109997 (42:5997), 10999d (42:599d)
Function1099a3: ; 1099a3 (42:59a3)
	ld c, $8
.asm_1099a5
	ld [hli], a
	dec c
	jr nz, .asm_1099a5
	ret
; 1099aa


ParseCredits: ; 1099aa
	ld hl, $cf63
	bit 7, [hl]
	jp nz, .done
	
; Wait until the timer has run out to parse the next command.
	ld hl, CreditsTimer
	ld a, [hl]
	and a
	jr z, .parse
	
; One tick has passed.
	dec [hl]
	jp .done
	
.parse
; First, let's clear the current text display,
; starting from line 5.
	xor a
	ld [$ffd4], a
	hlcoord 0, 5
	ld bc, 20 * 12
	ld a, " "
	call ByteFill
	
; Then read the script.
	
.loop
	call .get
	
; Commands:
	cp CREDITS_END
	jp z, .end
	cp CREDITS_WAIT
	jr z, .wait
	cp CREDITS_SCENE
	jr z, .scene
	cp CREDITS_CLEAR
	jr z, .clear
	cp CREDITS_MUSIC
	jr z, .music
	cp CREDITS_WAIT2
	jr z, .wait2
	cp CREDITS_THEEND
	jr z, .theend
	
; If it's not a command, it's a string identifier.
	
	push af
	ld e, a
	ld d, 0
	ld hl, CreditsStrings
	add hl, de
	add hl, de
	ld a, [hli]
	ld d, [hl]
	ld e, a
	pop af
	
; Strings spanning multiple lines have special cases.
	
	cp COPYRIGHT
	jr z, .copyright
	
	cp STAFF
	jr c, .staff
	
; The rest start from line 6.

	hlcoord 0, 6
	jr .print
	
.copyright
	hlcoord 2, 6
	jr .print
	
.staff
	hlcoord 0, 6
	
.print
; Print strings spaced every two lines.
	call .get
	ld bc, 20 * 2
	call AddNTimes
	call PlaceString
	jr .loop
	
.theend
; Display "The End" graphic.
	call Function109c11
	jr .loop
	
.scene
; Update the scene number and corresponding palette.
	call .get
	ld [$cf65], a ; scene
	xor a
	ld [$cf64], a ; frame
	call GetCreditsPalette
	call $32f9 ; update hw pal registers
	jr .loop
	
.clear
; Clear the banner.
	ld a, $ff
	ld [$cf64], a ; frame
	jr .loop
	
.music
; Play the credits music.
	ld de, MUSIC_CREDITS
	push de
	ld de, MUSIC_NONE
	call PlayMusic
	call DelayFrame
	pop de
	call PlayMusic
	jp .loop
	
.wait2
; Wait for some amount of ticks.
	call .get
	ld [CreditsTimer], a
	jr .done
	
.wait
; Wait for some amount of ticks, and do something else.
	call .get
	ld [CreditsTimer], a
	
	xor a
	ld [$ffd5], a
	ld a, 1
	ld [$ffd4], a
	
.done
	jp $5951
	
.end
; Stop execution.
	ld hl, $cf63
	set 7, [hl]
	ld a, $20
	ld [$c2a7], a
	ld a, $5c
	ld [$c2a9], a
	ld a, $00
	ld [$c2aa], a
	ret

.get
; Get byte CreditsPos from CreditsScript
	push hl
	push de
	ld a, [CreditsPos]
	ld e, a
	ld a, [CreditsPos+1]
	ld d, a
	ld hl, CreditsScript
	add hl, de
	
	inc de
	ld a, e
	ld [CreditsPos], a
	ld a, d
	ld [CreditsPos+1], a
	ld a, [hl]
	pop de
	pop hl
	ret
; 109a95


; known jump sources: 1098ac (42:58ac)
Function109a95: ; 109a95 (42:5a95)
	xor a
	ld [hBGMapMode], a ; $ff00+$d4
	ld a, $c
	ld [hBGMapAddress], a ; $ff00+$d6
	ld a, $28
	ld hl, TileMap ; $c4a0 (aliases: SpritesEnd)
	ld bc, $168
	call ByteFill
	ld a, $7f
	ld hl, $c4f0
	ld bc, $118
	call ByteFill
	ld hl, $c4f0
	ld a, $24
	call Function109b1d
	ld hl, $c5f4
	ld a, $20
	call Function109b1d
	ld hl, AttrMap ; $cdd9
	ld bc, $50
	xor a
	call ByteFill
	ld hl, $ce29
	ld bc, $14
	ld a, $1
	call ByteFill
	ld hl, $ce3d
	ld bc, $f0
	ld a, $2
	call ByteFill
	ld hl, $cf2d
	ld bc, $14
	ld a, $1
	call ByteFill
	call Function3200
	xor a
	ld [hBGMapMode], a ; $ff00+$d4
	ld [hBGMapAddress], a ; $ff00+$d6
	ld hl, TileMap ; $c4a0 (aliases: SpritesEnd)
	call Function109aff
	call Function3200
	ret

; known jump sources: 109af8 (42:5af8)
Function109aff: ; 109aff (42:5aff)
	ld b, $5
.asm_109b01
	push hl
	ld de, $11
	ld c, $4
	xor a
.asm_109b08
	ld [hli], a
	inc a
	ld [hli], a
	inc a
	ld [hli], a
	inc a
	ld [hl], a
	inc a
	add hl, de
	dec c
	jr nz, .asm_109b08
	pop hl
	inc hl
	inc hl
	inc hl
	inc hl
	dec b
	jr nz, .asm_109b01
	ret

; known jump sources: 109ab7 (42:5ab7), 109abf (42:5abf)
Function109b1d: ; 109b1d (42:5b1d)
	ld c, $5
.asm_109b1f
	push af
	ld [hli], a
	inc a
	ld [hli], a
	inc a
	ld [hli], a
	inc a
	ld [hli], a
	pop af
	dec c
	jr nz, .asm_109b1f
	ret

GetCreditsPalette: ; 109b2c
	call .GetPalAddress
	
	push hl
	ld a, 0
	call .UpdatePals
	pop hl
	ret
	
.GetPalAddress
; Each set of palette data is 24 bytes long.
	ld a, [$cf65] ; scene
	and 3
	add a
	add a ; * 8
	add a
	ld e, a
	ld d, 0
	ld hl, CreditsPalettes
	add hl, de
	add hl, de ; * 3
	add hl, de
	ret
	
.UpdatePals
; Update the first three colors in both palette buffers.
	
	push af
	push hl
	add $d000 % $100
	ld e, a
	ld a, 0
	adc $d000 / $100
	ld d, a
	ld bc, 24
	call CopyBytes
	
	pop hl
	pop af
	add $d080 % $100
	ld e, a
	ld a, 0
	adc $d080 / $100
	ld d, a
	ld bc, 24
	call CopyBytes
	ret


CreditsPalettes:

; Pichu
	RGB 31, 00, 31
	RGB 31, 25, 00
	RGB 11, 14, 31
	RGB 07, 07, 07

	RGB 31, 05, 05
	RGB 11, 14, 31
	RGB 11, 14, 31
	RGB 31, 31, 31

	RGB 31, 05, 05
	RGB 00, 00, 00
	RGB 31, 31, 31
	RGB 31, 31, 31

; Smoochum
	RGB 31, 31, 31
	RGB 31, 27, 00
	RGB 26, 06, 31
	RGB 07, 07, 07

	RGB 03, 13, 31
	RGB 20, 00, 24
	RGB 26, 06, 31
	RGB 31, 31, 31

	RGB 03, 13, 31
	RGB 00, 00, 00
	RGB 31, 31, 31
	RGB 31, 31, 31

; Ditto
	RGB 31, 31, 31
	RGB 23, 12, 28
	RGB 31, 22, 00
	RGB 07, 07, 07

	RGB 03, 20, 00
	RGB 31, 22, 00
	RGB 31, 22, 00
	RGB 31, 31, 31

	RGB 03, 20, 00
	RGB 00, 00, 00
	RGB 31, 31, 31
	RGB 31, 31, 31

; Igglybuff
	RGB 31, 31, 31
	RGB 31, 10, 31
	RGB 31, 00, 09
	RGB 07, 07, 07

	RGB 31, 14, 00
	RGB 31, 00, 09
	RGB 31, 00, 09
	RGB 31, 31, 31

	RGB 31, 14, 00
	RGB 31, 31, 31
	RGB 31, 31, 31
	RGB 31, 31, 31
; 109bca

; known jump sources: 10989e (42:589e), 109964 (42:5964)
Function109bca: ; 109bca (42:5bca)
	ld hl, $cf64
	ld a, [hl]
	cp $ff
	jr z, .asm_109bed

	and 3
	ld e, a
	inc a
	and 3
	ld [hl], a
	ld a, [$cf65]
	and 3
	add a
	add a
	add e
	add a
	ld e, a
	ld d, 0
	ld hl, CreditsMonsFrames
	add hl, de
	ld a, [hli]
	ld h, [hl]
	ld l, a
	ret

.asm_109bed
	ld hl, $ca00
	ret
; 109bf1 (42:5bf1)

CreditsMonsFrames: ; 109bf1
	dw CreditsPichuGFX
	dw CreditsPichuGFX     + $100
	dw CreditsPichuGFX     + $200
	dw CreditsPichuGFX     + $300
	dw CreditsSmoochumGFX
	dw CreditsSmoochumGFX  + $100
	dw CreditsSmoochumGFX  + $200
	dw CreditsSmoochumGFX  + $300
	dw CreditsDittoGFX
	dw CreditsDittoGFX     + $100
	dw CreditsDittoGFX     + $200
	dw CreditsDittoGFX     + $300
	dw CreditsIgglybuffGFX
	dw CreditsIgglybuffGFX + $100
	dw CreditsIgglybuffGFX + $200
	dw CreditsIgglybuffGFX + $300
; 109c11

; known jump sources: 109a1b (42:5a1b)
Function109c11: ; 109c11 (42:5c11)
	ld a, $40
	ld hl, $c55a
	call Function109c1c
	ld hl, $c56e

; known jump sources: 109c16 (42:5c16)
Function109c1c: ; 109c1c (42:5c1c)
	ld c, $8
.asm_109c1e
	ld [hli], a
	inc a
	dec c
	jr nz, .asm_109c1e
	ret
; 109c24 (42:5c24)


CreditsBorderGFX:    INCBIN "gfx/credits/border.w72.2bpp"

CreditsMonsGFX:
CreditsPichuGFX:     INCBIN "gfx/credits/pichu.w32.2bpp"
CreditsSmoochumGFX:  INCBIN "gfx/credits/smoochum.w32.2bpp"
CreditsDittoGFX:     INCBIN "gfx/credits/ditto.w32.2bpp"
CreditsIgglybuffGFX: INCBIN "gfx/credits/igglybuff.w32.2bpp"


CreditsScript: ; 10acb4

; Clear the banner.
	db CREDITS_CLEAR

; Pokemon Crystal Version Staff
	db                STAFF, 1

	db CREDITS_WAIT, 8

; Play the credits music.
	db CREDITS_MUSIC

	db CREDITS_WAIT2, 10

	db CREDITS_WAIT, 1

; Update the banner.
	db CREDITS_SCENE, 0 ; Pichu

	db             DIRECTOR, 1
	db       SATOSHI_TAJIRI, 2

	db CREDITS_WAIT, 12

	db           CODIRECTOR, 1
	db       JUNICHI_MASUDA, 2

	db CREDITS_WAIT, 12

	db          PROGRAMMERS, 0
	db       SOUSUKE_TAMADA, 1
	db       HISASHI_SOGABE, 2
	db         KEITA_KAGAYA, 3
	db    YOSHINORI_MATSUDA, 4

	db CREDITS_WAIT, 12

	db          PROGRAMMERS, 0
	db     SHIGEKI_MORIMOTO, 1
	db     TETSUYA_WATANABE, 2
	db        TAKENORI_OOTA, 3

	db CREDITS_WAIT, 12

	db    GRAPHICS_DIRECTOR, 1
	db         KEN_SUGIMORI, 2

	db CREDITS_WAIT, 12

	db       MONSTER_DESIGN, 0
	db         KEN_SUGIMORI, 1
	db    MOTOFUMI_FUJIWARA, 2
	db     SHIGEKI_MORIMOTO, 3
	db     HIRONOBU_YOSHIDA, 4
	db         SATOSHI_OOTA, 5

	db CREDITS_WAIT, 12

	db       MONSTER_DESIGN, 0
	db       ATSUKO_NISHIDA, 1
	db          MUNEO_SAITO, 2
	db       RENA_YOSHIKAWA, 3

	db CREDITS_WAIT, 12

	db    POKEMON_ANIMATION, 1
	db     HIRONOBU_YOSHIDA, 2
	db          JUN_OKUTANI, 3

	db CREDITS_WAIT, 12

; Clear the banner.
	db CREDITS_CLEAR

	db CREDITS_WAIT, 1

; Update the banner.
	db CREDITS_SCENE, 1 ; Smoochum

	db      GRAPHICS_DESIGN, 0
	db     HIRONOBU_YOSHIDA, 1
	db          JUN_OKUTANI, 2
	db       ASUKA_IWASHITA, 3
	db     TETSUYA_WATANABE, 4

	db CREDITS_WAIT, 12

	db         CREDIT_MUSIC, 0
	db       JUNICHI_MASUDA, 1
	db        MORIKAZU_AOKI, 2
	db          GO_ICHINOSE, 3

	db CREDITS_WAIT, 12

	db CREDIT_SOUND_EFFECTS, 0
	db        MORIKAZU_AOKI, 1
	db       JUNICHI_MASUDA, 2
	db     TETSUYA_WATANABE, 3

	db CREDITS_WAIT, 12

	db          GAME_DESIGN, 0
	db       JUNICHI_MASUDA, 1
	db     SHIGEKI_MORIMOTO, 2
	db        KOHJI_NISHINO, 3

	db CREDITS_WAIT, 12

	db          GAME_DESIGN, 0
	db         TETSUJI_OOTA, 1
	db          HITOMI_SATO, 2
	db     KENJI_MATSUSHIMA, 3

	db CREDITS_WAIT, 12

	db        GAME_SCENARIO, 0
	db       JUNICHI_MASUDA, 1
	db        KOHJI_NISHINO, 2
	db  TOSHINOBU_MATSUMIYA, 3
	db     KENJI_MATSUSHIMA, 4

	db CREDITS_WAIT, 12

	db         POKEDEX_TEXT, 1
	db  TOSHINOBU_MATSUMIYA, 2

	db CREDITS_WAIT, 12

	db     TOOL_PROGRAMMING, 1
	db       SOUSUKE_TAMADA, 2
	db        TAKENORI_OOTA, 3

	db CREDITS_WAIT, 12

	db    PARAMETRIC_DESIGN, 1
	db        KOHJI_NISHINO, 2

	db CREDITS_WAIT, 12

; Clear the banner.
	db CREDITS_CLEAR

	db CREDITS_WAIT, 1

; Update the banner.
	db CREDITS_SCENE, 2 ; Ditto

	db        SCRIPT_DESIGN, 1
	db         TETSUJI_OOTA, 2
	db        NOBUHIRO_SEYA, 3

	db CREDITS_WAIT, 12

	db      MAP_DATA_DESIGN, 1
	db         TETSUJI_OOTA, 2
	db      KAZUHITO_SEKINE, 3

	db CREDITS_WAIT, 12

	db           MAP_DESIGN, 0
	db         TETSUJI_OOTA, 1
	db        KOHJI_NISHINO, 2
	db        NOBUHIRO_SEYA, 3

	db CREDITS_WAIT, 12

	db         COORDINATION, 1
	db      HIROYUKI_ZINNAI, 2

	db CREDITS_WAIT, 12

	db            PRODUCERS, 0
	db         SATORU_IWATA, 1
	db       SATOSHI_YAMATO, 2
	db     SHIGERU_MIYAMOTO, 3

	db CREDITS_WAIT, 12

	db            PRODUCERS, 1
	db   TSUNEKAZU_ISHIHARA, 2

	db CREDITS_WAIT, 12

; Clear the banner.
	db CREDITS_CLEAR

	db CREDITS_WAIT, 1

; Update the banner.
	db CREDITS_SCENE, 3 ; Igglybuff

	db     US_VERSION_STAFF, 2

	db CREDITS_WAIT, 9

	db      US_COORDINATION, 1
	db          GAIL_TILDEN, 2
	db        HIRO_NAKAMURA, 3

	db CREDITS_WAIT, 12

	db      US_COORDINATION, 1
	db       JUNICHI_MASUDA, 2
	db        SETH_MCMAHILL, 3

	db CREDITS_WAIT, 12

	db      US_COORDINATION, 1
	db     HIROTO_ALEXANDER, 2
	db     TERESA_LILLYGREN, 3

	db CREDITS_WAIT, 12

	db     TEXT_TRANSLATION, 1
	db        NOB_OGASAWARA, 2

	db CREDITS_WAIT, 12

	db          PROGRAMMERS, 1
	db      TERUKI_MURAKAWA, 2
	db      KAZUYOSHI_OSAWA, 3

	db CREDITS_WAIT, 12

	db         PAAD_TESTING, 1
	db       THOMAS_HERTZOG, 2
	db         ERIK_JOHNSON, 3

	db CREDITS_WAIT, 12

	db      PRODUCT_TESTING, 0
	db             PLANNING, 1

	db CREDITS_WAIT, 12

	db      PRODUCT_TESTING, 0
	db       KEITA_NAKAMURA, 1
	db      HIROTAKA_UEMURA, 2
	db       HIROAKI_TAMURA, 3
	db    NORIAKI_SAKAGUCHI, 4

	db CREDITS_WAIT, 12

	db      PRODUCT_TESTING, 0
	db NCL_SUPER_MARIO_CLUB, 1
	db          KENJI_SAIKI, 2
	db         ATSUSHI_TADA, 3
	db          MIYUKI_SATO, 4

	db CREDITS_WAIT, 12

	db       SPECIAL_THANKS, 0
	db     KIMIKO_NAKAMICHI, 1
	db           AKITO_MORI, 2

	db CREDITS_WAIT, 12

	db       SPECIAL_THANKS, 0
	db        GAKUZI_NOMOTO, 1
	db           AI_MASHIMA, 2
	db      KUNIMI_KAWAMURA, 3

	db CREDITS_WAIT, 12

	db       SPECIAL_THANKS, 0
	db    MIKIHIRO_ISHIKAWA, 1
	db   HIDEYUKI_HASHIMOTO, 2

	db CREDITS_WAIT, 12

	db   EXECUTIVE_PRODUCER, 1
	db     HIROSHI_YAMAUCHI, 2

	db CREDITS_WAIT, 12

	db            COPYRIGHT, 1

	db CREDITS_WAIT, 9

; Display "The End" graphic.
	db CREDITS_THEEND

	db CREDITS_WAIT, 20

	db CREDITS_END
; 10ae13


CreditsStrings:
	dw .SatoshiTajiri
	dw .JunichiMasuda
	dw .TetsuyaWatanabe
	dw .ShigekiMorimoto
	dw .SousukeTamada
	dw .TakenoriOota
	dw .KenSugimori
	dw .MotofumiFujiwara
	dw .AtsukoNishida
	dw .MuneoSaito
	dw .SatoshiOota
	dw .RenaYoshikawa
	dw .JunOkutani
	dw .HironobuYoshida
	dw .AsukaIwashita
	dw .GoIchinose
	dw .MorikazuAoki
	dw .KohjiNishino
	dw .KenjiMatsushima
	dw .ToshinobuMatsumiya
	dw .SatoruIwata
	dw .NobuhiroSeya
	dw .KazuhitoSekine
	dw .TetsujiOota
	dw .NclSuperMarioClub
	dw .Sarugakucho
	dw .AkitoMori
	dw .TakahiroHarada
	dw .TohruHashimoto
	dw .NoboruMatsumoto
	dw .TakehiroIzushi
	dw .TakashiKawaguchi
	dw .TsunekazuIshihara
	dw .HiroshiYamauchi
	dw .KenjiSaiki
	dw .AtsushiTada
	dw .NaokoKawakami
	dw .HiroyukiZinnai
	dw .KunimiKawamura
	dw .HisashiSogabe
	dw .KeitaKagaya
	dw .YoshinoriMatsuda
	dw .HitomiSato
	dw .ToruOsawa
	dw .TakaoOhara
	dw .YuichiroIto
	dw .TakaoShimizu
	dw .Planning
	dw .KeitaNakamura
	dw .HirotakaUemura
	dw .HiroakiTamura
	dw .NoriakiSakaguchi
	dw .MiyukiSato
	dw .GakuziNomoto
	dw .AiMashima
	dw .MikihiroIshikawa
	dw .HideyukiHashimoto
	dw .SatoshiYamato
	dw .ShigeruMiyamoto
	dw .GailTilden
	dw .NobOgasawara
	dw .SethMcMahill
	dw .HirotoAlexander
	dw .TeresaLillygren
	dw .ThomasHertzog
	dw .ErikJohnson
	dw .HiroNakamura
	dw .TerukiMurakawa
	dw .KazuyoshiOsawa
	dw .KimikoNakamichi
	dw .End
	dw .Unknown
	dw .Staff
	dw .Director
	dw .CoDirector
	dw .Programmers
	dw .GraphicsDirector
	dw .MonsterDesign
	dw .GraphicsDesign
	dw .Music
	dw .SoundEffects
	dw .GameDesign
	dw .GameScenario
	dw .ToolProgramming
	dw .ParametricDesign
	dw .ScriptDesign
	dw .MapDataDesign
	dw .MapDesign
	dw .ProductTesting
	dw .SpecialThanks
	dw .Producers
	dw .ExecutiveProducer
	dw .PokemonAnimation
	dw .PokedexText
	dw .MobilePrjLeader
	dw .MobileSystemAd
	dw .MobileStadiumDir
	dw .Coordination
	dw .Copyright
	dw .UsVersionStaff
	dw .UsCoordination
	dw .TextTranslation
	dw .PaadTesting

.SatoshiTajiri:       db "   SATOSHI TAJIRI@"         ; "たじり さとし@"
.JunichiMasuda:       db "   JUNICHI MASUDA@"         ; "ますだ じゅんいち@"
.TetsuyaWatanabe:     db "  TETSUYA WATANABE@"        ; "わたなべ てつや@"
.ShigekiMorimoto:     db "  SHIGEKI MORIMOTO@"        ; "もりもと しげき@"
.SousukeTamada:       db "   SOUSUKE TAMADA@"         ; "たまだ そうすけ@"
.TakenoriOota:        db "   TAKENORI OOTA@"          ; "おおた たけのり@"
.KenSugimori:         db "    KEN SUGIMORI@"          ; "すぎもり けん@"
.MotofumiFujiwara:    db " MOTOFUMI FUJIWARA@"        ; "ふじわら もとふみ@"
.AtsukoNishida:       db "   ATSUKO NISHIDA@"         ; "にしだ あつこ@"
.MuneoSaito:          db "    MUNEO SAITO@"           ; "さいとう むねお@"
.SatoshiOota:         db "    SATOSHI OOTA@"          ; "おおた さとし@"
.RenaYoshikawa:       db "   RENA YOSHIKAWA@"         ; "よしかわ れな@"
.JunOkutani:          db "    JUN OKUTANI@"           ; "おくたに じゅん@"
.HironobuYoshida:     db "  HIRONOBU YOSHIDA@"        ; "よしだ ひろのぶ@"
.AsukaIwashita:       db "   ASUKA IWASHITA@"         ; "いわした あすか@"
.GoIchinose:          db "    GO ICHINOSE@"           ; "いちのせ ごう@"
.MorikazuAoki:        db "   MORIKAZU AOKI@"          ; "あおき もりかず@"
.KohjiNishino:        db "   KOHJI NISHINO@"          ; "にしの こうじ@"
.KenjiMatsushima:     db "  KENJI MATSUSHIMA@"        ; "まつしま けんじ@"
.ToshinobuMatsumiya:  db "TOSHINOBU MATSUMIYA@"       ; "まつみや としのぶ@"
.SatoruIwata:         db "    SATORU IWATA@"          ; "いわた さとる@"
.NobuhiroSeya:        db "   NOBUHIRO SEYA@"          ; "せや のぶひろ@"
.KazuhitoSekine:      db "  KAZUHITO SEKINE@"         ; "せきね かずひと@"
.TetsujiOota:         db "    TETSUJI OOTA@"          ; "おおた てつじ@"
.NclSuperMarioClub:   db "NCL SUPER MARIO CLUB@"      ; "スーパーマりォクラブ@"
.Sarugakucho:         db "    SARUGAKUCHO@"           ; "さるがくちょう@"
.AkitoMori:           db "     AKITO MORI@"           ; "もり あきと@"
.TakahiroHarada:      db "  TAKAHIRO HARADA@"         ; "はらだ たかひろ@"
.TohruHashimoto:      db "  TOHRU HASHIMOTO@"         ; "はしもと とおる@"
.NoboruMatsumoto:     db "  NOBORU MATSUMOTO@"        ; "まつもと のぼる@"
.TakehiroIzushi:      db "  TAKEHIRO IZUSHI@"         ; "いずし たけひろ@"
.TakashiKawaguchi:    db " TAKASHI KAWAGUCHI@"        ; "かわぐち たかし@"
.TsunekazuIshihara:   db " TSUNEKAZU ISHIHARA@"       ; "いしはら つねかず@"
.HiroshiYamauchi:     db "  HIROSHI YAMAUCHI@"        ; "やまうち ひろし@"
.KenjiSaiki:          db "    KENJI SAIKI@"           ; "さいき けんじ@"
.AtsushiTada:         db "    ATSUSHI TADA@"          ; "ただ あつし@"
.NaokoKawakami:       db "   NAOKO KAWAKAMI@"         ; "かわかみ なおこ@"
.HiroyukiZinnai:      db "  HIROYUKI ZINNAI@"         ; "じんない ひろゆき@"
.KunimiKawamura:      db "  KUNIMI KAWAMURA@"         ; "かわむら くにみ@"
.HisashiSogabe:       db "   HISASHI SOGABE@"         ; "そがべ ひさし@"
.KeitaKagaya:         db "    KEITA KAGAYA@"          ; "かがや けいた@"
.YoshinoriMatsuda:    db " YOSHINORI MATSUDA@"        ; "まつだ よしのり@"
.HitomiSato:          db "    HITOMI SATO@"           ; "さとう ひとみ@"
.ToruOsawa:           db "     TORU OSAWA@"           ; "おおさわ とおる@"
.TakaoOhara:          db "    TAKAO OHARA@"           ; "おおはら たかお@"
.YuichiroIto:         db "    YUICHIRO ITO@"          ; "いとう ゆういちろう@"
.TakaoShimizu:        db "   TAKAO SHIMIZU@"          ; "しみず たかお@"
.Planning:            db " SPECIAL PRODUCTION", $4e
                      db "      PLANNING", $4e        ; "きかくかいはつぶ@"
                      db " & DEVELOPMENT DEPT.@"
.KeitaNakamura:       db "   KEITA NAKAMURA@"         ; "なかむら けいた@"
.HirotakaUemura:      db "  HIROTAKA UEMURA@"         ; "うえむら ひろたか@"
.HiroakiTamura:       db "   HIROAKI TAMURA@"         ; "たむら ひろあき@"
.NoriakiSakaguchi:    db " NORIAKI SAKAGUCHI@"        ; "さかぐち のりあき@"
.MiyukiSato:          db "    MIYUKI SATO@"           ; "さとう みゆき@"
.GakuziNomoto:        db "   GAKUZI NOMOTO@"          ; "のもと がくじ@"
.AiMashima:           db "     AI MASHIMA@"           ; "ましま あい@"
.MikihiroIshikawa:    db " MIKIHIRO ISHIKAWA@"        ; "いしかわ みきひろ@"
.HideyukiHashimoto:   db " HIDEYUKI HASHIMOTO@"       ; "はしもと ひでゆき@"
.SatoshiYamato:       db "   SATOSHI YAMATO@"         ; "やまと さとし@"
.ShigeruMiyamoto:     db "  SHIGERU MIYAMOTO@"        ; "みやもと しげる@"
.End:                 db "        END@"               ; "おしまい@"
.Unknown:             db "      ????????@"            ; "????????@"
.GailTilden:          db "    GAIL TILDEN@"
.NobOgasawara:        db "   NOB OGASAWARA@"
.SethMcMahill:        db "   SETH McMAHILL@"
.HirotoAlexander:     db "  HIROTO ALEXANDER@"
.TeresaLillygren:     db "  TERESA LILLYGREN@"
.ThomasHertzog:       db "   THOMAS HERTZOG@"
.ErikJohnson:         db "    ERIK JOHNSON@"
.HiroNakamura:        db "   HIRO NAKAMURA@"
.TerukiMurakawa:      db "  TERUKI MURAKAWA@"
.KazuyoshiOsawa:      db "  KAZUYOSHI OSAWA@"
.KimikoNakamichi:     db "  KIMIKO NAKAMICHI@"
.Staff:               db "      #MON", $4e            ; "ポケットモンスター", $4e
                      db "  CRYSTAL VERSION", $4e     ; "  クりスタル バージョン", $4e
                      db "       STAFF@"              ; "    スタッフ@"
.Director:            db "      DIRECTOR@"            ; "エグゼクティブ ディレクター@"
.CoDirector:          db "    CO-DIRECTOR@"           ; "ディレクター@"
.Programmers:         db "    PROGRAMMERS@"           ; "プログラム@"
.GraphicsDirector:    db " GRAPHICS DIRECTOR@"        ; "グラフィック ディレクター@"
.MonsterDesign:       db "   MONSTER DESIGN@"         ; "# デザイン@"
.GraphicsDesign:      db "  GRAPHICS DESIGN@"         ; "グラフィック デザイン@"
.Music:               db "       MUSIC@"              ; "おんがく@"
.SoundEffects:        db "   SOUND EFFECTS@"          ; "サウンド エフ→クト@"
.GameDesign:          db "    GAME DESIGN@"           ; "ゲームデザイン@"
.GameScenario:        db "   GAME SCENARIO@"          ; "シナりォ@"
.ToolProgramming:     db "  TOOL PROGRAMMING@"        ; "ツール プログラム@"
.ParametricDesign:    db " PARAMETRIC DESIGN@"        ; "パラメーター せってい@"
.ScriptDesign:        db "   SCRIPT DESIGN@"          ; "スクりプト せってい@"
.MapDataDesign:       db "  MAP DATA DESIGN@"         ; "マップデータ せってい@"
.MapDesign:           db "     MAP DESIGN@"           ; "マップ デザイン@"
.ProductTesting:      db "  PRODUCT TESTING@"         ; "デバッグプレイ@"
.SpecialThanks:       db "   SPECIAL THANKS@"         ; "スぺシャルサンクス@"
.Producers:           db "     PRODUCERS@"            ; "プロデューサー@"
.ExecutiveProducer:   db " EXECUTIVE PRODUCER@"       ; "エグゼクティブ プロデューサー@"
.PokemonAnimation:    db " #MON ANIMATION@"           ; "# アニメーション@"
.PokedexText:         db "    #DEX TEXT@"             ; "ずかん テキスト@"
.MobilePrjLeader:     db " MOBILE PRJ. LEADER@"       ; "モバイルプロジ→クト りーダー@"
.MobileSystemAd:      db " MOBILE SYSTEM AD.@"        ; "モバイル システムアドバイザー@"
.MobileStadiumDir:    db "MOBILE STADIUM DIR.@"       ; "モバイルスタジアム ディレクター@"
.Coordination:        db "    COORDINATION@"          ; "コーディネーター@"
.UsVersionStaff:      db "  US VERSION STAFF@"
.UsCoordination:      db "  US COORDINATION@"
.TextTranslation:     db "  TEXT TRANSLATION@"
.PaadTesting:         db "    PAAD TESTING@"

.Copyright:
;  (C) 1  9  9  5 - 2  0  0  1     N  i  n  t  e  n  d  o
db $60,$61,$62,$63,$64,$65,$66, $67, $68, $69, $6a, $6b, $6c, $4e
;  (C) 1  9  9  5 - 2  0  0  1    C  r  e  a  t  u  r  e  s      i  n  c .
db $60,$61,$62,$63,$64,$65,$66, $6d, $6e, $6f, $70, $71, $72,  $7a, $7b, $7c, $4e
;  (C) 1  9  9  5 - 2  0  0  1  G   A   M   E   F   R   E   A   K     i  n  c .
db $60,$61,$62,$63,$64,$65,$66, $73, $74, $75, $76, $77, $78, $79,  $7a, $7b, $7c, "@"