-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBank01.asm
16393 lines (9972 loc) · 360 KB
/
Bank01.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
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
; Bank 0x01 - a giant pain in the ass of a bank, imo
org $018000
; ==============================================================================
; $8000-$81FF DATA
pool Dungeon_LoadType1Object:
{
.subtype_1_params
dw $03D8, $02E8, $02F8, $0328, $0338, $0400, $0410, $0388
dw $0390, $0420, $042A, $0434, $043E, $0448, $0452, $045C
dw $0466, $0470, $047A, $0484, $048E, $0498, $04A2, $04AC
dw $04B6, $04C0, $04CA, $04D4, $04DE, $04E8, $04F2, $04FC
dw $0506, $0598, $0600, $063C, $063C, $063C, $063C, $063C
dw $0642, $064C, $0652, $0658, $065E, $0664, $066A, $0688
dw $0694, $06A8, $06A8, $06A8, $06C8, $0000, $078A, $07AA
dw $0E26, $084A, $086A, $0882, $08CA, $085A, $08FA, $091A
dw $0920, $092A, $0930, $0936, $093C, $0942, $0948, $094E
dw $096C, $097E, $098E, $0902, $099E, $09D8, $09D8, $09D8
dw $09FA, $156C, $1590, $1D86, $0000, $0A14, $0A24, $0A54
dw $0A54, $0A84, $0A84, $14DC, $1500, $061E, $0E52, $0600
dw $03D8, $02C8, $02D8, $0308, $0318, $03E0, $03F0, $0378
dw $0380, $05FA, $0648, $064A, $0670, $067C, $06A8, $06A8
dw $06A8, $06C8, $0000, $07AA, $07CA, $084A, $089A, $08B2
dw $090A, $0926, $0928, $0912, $09F8, $1D7E, $0000, $0A34
dw $0A44, $0A54, $0A6C, $0A84, $0A9C, $1524, $1548, $085A
dw $0606, $0E52, $05FA, $06A0, $06A2, $0B12, $0B14, $09B0
dw $0B46, $0B56, $1F52, $1F5A, $0288, $0E82, $1DF2, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $03D8, $03D8, $03D8, $03D8, $05AA, $05B2, $05B2, $05B2
dw $05B2, $00E0, $00E0, $00E0, $00E0, $0110, $0000, $0000
dw $06A4, $06A6, $0AE6, $0B06, $0B0C, $0B16, $0B26, $0B36
dw $1F52, $1F5A, $0288, $0EBA, $0E82, $1DF2, $0000, $0000
dw $03D8, $0510, $05AA, $05AA, $0000, $0168, $00E0, $0158 ; c7
dw $0100, $0110, $0178, $072A, $072A, $072A, $075A, $0670 ; cf
dw $0670, $0130, $0148, $072A, $072A, $072A, $075A, $00E0 ; d7
dw $0110, $00F0, $0110, $0000, $0AB4, $08DA, $0ADE, $0188 ; df
dw $01A0, $01B0, $01C0, $01D0, $01E0, $01F0, $0200, $0120 ; e7
dw $02A8, $0000, $0000, $0000, $0000, $0000, $0000, $0000 ; ef
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 ; f7
; \unused
; This last row is not used, because there are only 0xf8 subtype 1
; scripts in actuality. Hackers can use this for whatever they want.
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000 ; ff
}
; ==============================================================================
; $8200-$83EF JUMP TABLE
pool Dungeon_LoadType1Object:
{
.subtype_1_params
; Subtype 1 objects (0xF8 distinct object types)
; 0x00
dw Object_Draw2x2s_AdvanceRight_from_1_to_15_or_32
dw Object_Draw4x2s_AdvanceRight_from_1_to_15_or_26
dw Object_Draw4x2s_AdvanceRight_from_1_to_15_or_26
dw Object_Draw4x2s_AdvanceRight_from_1_to_16_BothBgs
dw Object_Draw4x2s_AdvanceRight_from_1_to_16_BothBgs
dw $8C37 ; = $8C37
dw $8C37 ; = $8C37
dw $8B79 ; = $8B79
; 0x08
dw $8B79 ; = $8B79
dw $8C58 ; = $8C58
dw $8C61 ; = $8C61
dw $8C61 ; = $8C61
dw $8C58 ; = $8C58
dw $8C58 ; = $8C58
dw $8C61 ; = $8C61
dw $8C61 ; = $8C61
; 0x10
dw $8C58 ; = $8C58
dw $8C58 ; = $8C58
dw $8C61 ; = $8C61
dw $8C61 ; = $8C61
dw $8C58 ; = $8C58
dw $8C6A ; = $8C6A
dw $8CB9 ; = $8CB9
dw $8CB9 ; = $8CB9
; 0x18
dw $8C6A ; = $8C6A
dw $8C6A ; = $8C6A
dw $8CB9 ; = $8CB9
dw $8CB9 ; = $8CB9
dw $8C6A ; = $8C6A
dw $8C6A ; = $8C6A
dw $8CB9 ; = $8CB9
dw $8CB9 ; = $8CB9
; 0x20
dw $8C6A ; = $8C6A
dw $8D5D ; = $8D5D ; mini staircase (just slows you down)
dw Object_HorizontalRail_short ; = $8EF0
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
; 0x28
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $8FBD ; = $8FBD
; 0x30
dw $9001 ; = $9001
dw $90F8 ; = $90F8 ; Unused object
dw $90F8 ; = $90F8 ; Unused object
dw $9111 ; = $9111
dw $9136 ; = $9136 ; 34
dw $913F ; = $913F ; 35? (HM says unused)
dw $92FB ; = $92FB ; Curtains in Agahnim's room (horizontal)
dw $92FB ; = $92FB ; Curtains in Agahnim's room (vertical, but not really useful b/c it tiles horizontally)
; 0x38
dw $9323 ; = $9323
dw $936F ; = $936F
dw $9387 ; = $9387
dw $9387 ; = $9387
dw $93B7 ; = $93B7
dw $936F ; = $936F
dw $9456 ; = $9456
dw $8F62 ; = $8F62
; 0x40
dw $8F62 ; = $8F62 ; outline for water pools
dw $8F62 ; = $8F62 ; outline for water pools
dw $8F62 ; = $8F62 ; outline for water pools
dw $8F62 ; = $8F62 ; outline for water pools
dw $8F62 ; = $8F62 ; outline for water pools
dw $8F62 ; = $8F62 ; outline for water pools
dw $8F62 ; = $8F62 ; outline for water pools
dw $9466 ; = $9466 ; Thin waterfall (not used!)
; 0x48
dw $9488 ; = $9488 ; Variable width waterfall (also unused)
dw $94B4 ; = $94B4
dw $94B4 ; = $94B4
dw $9456 ; = $9456
dw $94BD ; = $94BD
dw $94DF ; = $94DF ; Interesting that these three objects are identical and so are their parameters...
dw $94DF ; = $94DF
dw $94DF ; = $94DF
; 0x50
dw $96DC ; = $96DC
dw $9CC6 ; = $9CC6
dw $9CC6 ; = $9CC6
dw $8B79 ; = $8B79
dw $8AA3 ; = $8AA3 ; unused object
dw $96F9 ; = $96F9
dw $96F9 ; = $96F9
dw $971A ; = $971A
; 0x58
dw $971A ; = $971A
dw $971A ; = $971A
dw $971A ; = $971A
dw $9CC6 ; = $9CC6
dw $9CC6 ; = $9CC6
dw $8F36 ; = $8F36
dw $9338 ; = $9338
dw Object_HorizontalRail_long
; 0x60
dw Object_Draw2x2sDownVariableOrFull
dw $8A89 ; = $8A89
dw $8A89 ; = $8A89
dw $8AA4 ; = $8AA4
dw $8AA4 ; = $8AA4
dw $8C4F ; = $8C4F
dw $8C4F ; = $8C4F
dw $8B74 ; = $8B74
; 0x68
dw $8B74 ; = $8B74
dw $8EC3 ; = $8EC3
dw $8F8A ; = $8F8A
dw $8F8A ; = $8F8A
dw $9045 ; = $9045
dw $908F ; = $908F
dw $90F8 ; = $90F8 ; Unused object?
dw $90F8 ; = $90F8 ; Unused object?
; 0x70
dw $90F9 ; = $90F9
dw $9120 ; = $9120
dw $8AA3 ; = $8AA3
dw $930E ; = $930E
dw $930E ; = $930E
dw $9357 ; = $9357
dw $939F ; = $939F
dw $939F ; = $939F
; 0x78
dw $9446 ; = $9446
dw $8F8A ; = $8F8A
dw $8F8A ; = $8F8A
dw $9446 ; = $9446
dw $96E4 ; = $96E4
dw $8B74 ; = $8B74
dw $8AA3 ; = $8AA3
dw $9702 ; = $9702
; 0x80
dw $9702 ; = $9702
dw $971B ; = $971B
dw $971B ; = $971B
dw $971B ; = $971B
dw $971B ; = $971B
dw $9CEB ; = $9CEB
dw $9CEB ; = $9CEB
dw $9357 ; = $9357
; 0x88
dw $8F0C ; = $8F0C
dw $9347 ; = $9347
dw $8EBE ; = $8EBE
dw $90E2 ; = $90E2
dw $90E2 ; = $90E2
dw $8F8A ; = $8F8A
dw $8F8A ; = $8F8A
dw $97B5 ; = $97B5
; 0x90
dw $8A89 ; = $8A89
dw $8A89 ; = $8A89
dw Object_Draw2x2sDownVariableOrFull ; Blue block switch (vertical)
dw Object_Draw2x2sDownVariableOrFull ; Orange block switch (vertical)
dw $90F9 ; = $90F9 ; Partially see through floor
dw $B381 ; = $B381 ; Vertical line of pots
dw $B47F ; = $B47F ; Vertical Line of moles
dw $8AA3 ; = $8AA3
; 0x98
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
; 0xA0
dw $8BE0 ; = $8BE0
dw $8BF4 ; = $8BF4
dw $8C0E ; = $8C0E
dw $8C22 ; = $8C22
dw Object_Hole
dw $8E67 ; = $8E67
dw $8E7B ; = $8E7B
dw $8E95 ; = $8E95
; 0xA8
dw $8EA9 ; = $8EA9
dw $8E67 ; = $8E67
dw $8E7B ; = $8E7B
dw $8E95 ; = $8E95
dw $8EA9 ; = $8EA9
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
; 0xB0
dw $90D9 ; = $90D9
dw $90D9 ; = $90D9
dw $9111 ; = $9111
dw $8F62 ; = $8F62
dw $8F62 ; = $8F62
dw $97DC ; = $97DC ; Fortune teller curtain
dw Object_Draw4x2s_AdvanceRight.from_1_to_15_or_26
dw Object_Draw4x2s_AdvanceRight.from_1_to_15_or_26
; 0xB8
dw Object_Draw2x2s_AdvanceRight.from_1_to_15_or_32 ; Blue switch block (horizontal)
dw Object_Draw2x2s_AdvanceRight.from_1_to_15_or_32 ; Orange switch block (horizontal)
dw $9111 ; = $9111
dw $9338 ; = $9338
dw $B376 ; = $B376 ; Horizontal line of pots
dw $B474 ; = $B474 ; Horizontal line of moles
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
; 0xC0
dw Object_DrawRectOf1x1s
dw $8CC7 ; = $8CC7*
dw Object_DrawRectOf1x1s
dw $8D9E ; = $8D9E
dw $8FA2 ; = $8FA2
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
; 0xC8
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $918F ; = $918F ; Undefined object
dw $918F ; = $918F ; Undefined object
dw Object_HiddenWallRight
dw Object_HiddenWallLeft
dw $8FBC ; = $8FBC
; 0xD0
dw $8FBC ; = $8FBC
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $9298 ; = $9298*
dw $9298 ; = $9298*
dw $9298 ; = $9298*
dw $9298 ; = $9298*
dw $8D9E ; = $8D9E
; 0xD8
dw Object_Water ; Water
dw $8FA5 ; = $8FA5 ; Large black space
dw $95EF ; = $95EF* ; Water 2?
dw $8F9D ; = $8F9D
dw $9733 ; = $9733 ; Staircase platform
dw $93DC ; = $93DC* ; Large rock formation in caves / variable sized table
dw $9429 ; = $9429* ; Spike block groups
dw $8FA5 ; = $8FA5
; 0xE0
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
dw $8FA5 ; = $8FA5
; 0xE8
dw $8FA5 ; = $8FA5
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
; 0xF0
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
dw $8AA3 ; = $8AA3
}
; ==============================================================================
; $83F0-$846F DATA
Subtype2Params:
{
dw $0B66, $0B86, $0BA6, $0BC6, $0C66, $0C86, $0CA6, $0CC6
dw $0BE6, $0C06, $0C26, $0C46, $0CE6, $0D06, $0D26, $0D46
dw $0D66, $0D7E, $0D96, $0DAE, $0DC6, $0DDE, $0DF6, $0E0E
dw $0398, $03A0, $03A8, $03B0, $0E32, $0E26, $0EA2, $0E9A
dw $0ECA, $0ED2, $0EDE, $0EDE, $0F1E, $0F3E, $0F5E, $0F6A
dw $0EF6, $0F72, $0F92, $0FA2, $0FA2, $1088, $10A8, $10A8
dw $10C8, $10C8, $10C8, $10C8, $0E52, $1108, $1108, $12A8
dw $1148, $1160, $1178, $1190, $1458, $1488, $2062, $2086
}
; ==============================================================================
; $8470-$84EF JUMP TABLE
Subtype2Routines:
{
; Subtype 2 objects (0x40 distinct object types)
; 0x00
dw Object_Draw4x4
dw Object_Draw4x4
dw Object_Draw4x4
dw Object_Draw4x4
dw Object_Draw4x4
dw Object_Draw4x4
dw Object_Draw4x4
dw Object_Draw4x4
; 0x08
dw Object_Draw4x4_BothBgs
dw Object_Draw4x4_BothBgs
dw Object_Draw4x4_BothBgs
dw Object_Draw4x4_BothBgs
dw Object_Draw4x4_BothBgs
dw Object_Draw4x4_BothBgs
dw Object_Draw4x4_BothBgs
dw Object_Draw4x4_BothBgs
; 0x10
dw Object_Draw4x3_BothBgs
dw Object_Draw4x3_BothBgs
dw Object_Draw4x3_BothBgs
dw Object_Draw4x3_BothBgs
dw Object_Draw3x4_BothBgs
dw Object_Draw3x4_BothBgs
dw Object_Draw3x4_BothBgs
dw Object_Draw3x4_BothBgs
; 0x18
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw4x4
dw Object_Draw3x2
dw Object_StarTile_disabled
dw Object_StarTile
; 0x20
dw $9892 ; = $9892* ; lit torch (distinct from the main torch type. one usage of note is in ganon's room)
dw Object_Draw3x2
dw Object_Draw5x4 ; mangled bed?...
dw Object_Draw3x4
dw Object_Draw4x4
dw Object_Draw4x4
dw Object_Draw3x2
dw Object_Draw2x2
; 0x28
dw Object_Draw5x4 ; bed
dw Object_Draw4x4
dw Object_Draw2x4
dw Object_Draw2x2
dw Object_Draw3x6_Alternate
dw $A41B ; = $A41B* ; inter-room in-room up-north staircase
dw $A458 ; = $A458* ; inter-room in-room down-south staircase
dw $A486 ; = $A486* ; inter-room in-room down-north staircase (subtype obscured by hidden wall)
; 0x30
dw $A25D ; = $A25D* ; seems identical to next object, but unused in the original game
dw $A26D ; = $A26D* ; inter-bg in-room up-north staircase
dw $A2C7 ; = $A2C7* ; inter-psuedo bg in-room up-north staircase
dw $A2DF ; = $A2DF* ; inter-bg in-room up-north staircase (subtype used in water rooms like in Swamp Palace)
dw Object_Draw2x2 ; single block
dw Object_WaterLadder ; Swamp Palace activated ladder
dw Object_InactiveWaterLadder ; Swamp Palace deactivated ladder
dw Object_Watergate
; 0x38
dw $A4B4 ; = $A4B4* ; wall up-north spiral staircase
dw $A533 ; = $A533* ; wall down-north spiral staircase
dw $A4F5 ; = $A4F5* ; wall up-north spiral staircase
dw $A584 ; = $A584* ; wall down-north spiral staircase
dw Object_SanctuaryMantle
dw Object_Draw3x4
dw Object_Draw3x6
dw Object_Draw7x8 ; Quick note: Hyrule Magic doesn't appear to display this properly. (What does it look like when used properly?)
}
; ==============================================================================
; $84F0-$85EF DATA
Subtype3Params:
{
dw $1614, $162C, $1654, $0A0E, $0A0C, $09FC, $09FE, $0A00
dw $0A02, $0A04, $0A06, $0A08, $0A0A, $0000, $0A10, $0A12
dw $1DDA, $1DE2, $1DD6, $1DEA, $15FC, $1DFA, $1DF2, $1488
dw $1494, $149C, $14A4, $10E8, $10E8, $10E8, $11A8, $11C8
dw $11E8, $1208, $03B8, $03C0, $03C8, $03D0, $1228, $1248
dw $1268, $1288, $0000, $0E5A, $0E62, $0000, $0000, $0E82
dw $0E8A, $14AC, $14C4, $10E8, $1614, $1614, $1614, $1614
dw $1614, $1614, $1CBE, $1CEE, $1D1E, $1D4E, $1D8E, $1D96
dw $1D9E, $1DA6, $1DAE, $1DB6, $1DBE, $1DC6, $1DCE, $0220
dw $0260, $0280, $1F3A, $1F62, $1F92, $1FF2, $2016, $1F42
dw $0EAA, $1F4A, $1F52, $1F5A, $202E, $2062, $09B8, $09C0
dw $09C8, $09D0, $0FA2, $0FB2, $0FC4, $0FF4, $1018, $1020
dw $15B4, $15D8, $20F6, $0EBA, $22E6, $22EE, $05DA, $281E
dw $2AE0, $2D2A, $2F2A, $22F6, $2316, $232E, $2346, $235E
dw $2376, $23B6, $1E9A, $0000, $2436, $149C, $24B6, $24E6
dw $2516, $1028, $1040, $1060, $1070, $1078, $1080, $0000
}
; ==============================================================================
; $85F0-$86EF JUMP TABLE
Subtype3Routines:
{
; Subtype 3 Objects (0x80 disinct object types)
; 0x00
dw $9D29 ; = $9D29*
dw $9D5D ; = $9D5D*
dw $9D67 ; = $9D67*
dw $9C3B ; = $9C3B*
dw Object_Draw1x1
dw Object_Draw1x1
dw Object_Draw1x1
dw Object_Draw1x1
; 0x08
dw Object_Draw1x1
dw Object_Draw1x1
dw Object_Draw1x1
dw Object_Draw1x1
dw Object_Draw1x1
dw Object_PrisonBars ; Set of prison bars with slot (unused?)
dw $9C3B ; = $9C3B*
dw Object_Draw1x1
; 0x10
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Rupees
dw Object_Draw2x2 ; Telepathic tiles (Zelda, Sahasralah)
dw Object_Draw3x4
dw Object_KholdstareShell ; Kholdstare's shell
dw Object_Mole ; (single mole)
dw Object_PrisonBars ; Set of prison bars with slot (used)
; 0x18
dw Object_BigKeyLock ; = $98AE*
dw Object_Chest ; = $98D0* ; Normal Chest
dw Object_Chest_startsOpen ; = $99B8*
dw $A30C ; = $A30C* ; In-room up-south staircase
dw $A31C ; = $A31C* ; In-room up-south staircase
dw $A36E ; = $A36E* ; In-room up-south staircase
dw $A5D2 ; = $A5D2* ; Wall up-north straight staircase
dw $A5F4 ; = $A5F4* ; Wall down-north straight staircase
; 0x20
dw $A607 ; = $A607* ; Wall up-south straight staircase
dw $A626 ; = $A626* ; Wall down-south straight staircase
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw $A664 ; = $A664* ; Wall up-north straight staircase
dw $A695 ; = $A695* ; Wall down-north straight staircase
; 0x28
dw $A71C ; = $A71C* ; Wall up-south straight staircase
dw $A74A ; = $A74A* ; Wall down-south straight staircase
dw Object_LanternLayer
dw $B306 ; = $B306* ; Heavy (unfinished) throwable pot?
dw Object_LargeLiftableBlock
dw Object_AgahnimAltar
dw Object_AgahnimRoomFrame
dw Object_Pot ;* Pots and Skulls in dungeons
; 0x30
dw $B30B ; = $B30B* ; Other liftable object (graphics messed up)
dw Object_BigChest ; = $99BB* ; Big Chest
dw Object_OpenedBigChest_fake
dw $A380 ; = $A380* ; in room staircase (facing up)
dw Object_Draw2x3
dw Object_Draw2x3
dw Object_Draw3x6_Alternate
dw Object_Draw3x6_Alternate
; 0x38
dw Object_Draw2x3
dw Object_Draw2x3
dw Object_Draw6x4 ; Up facing Turle Rock tube opening
dw Object_Draw6x4 ; Down facing Turtle Rock tube opening
dw Object_Draw4x6 ; Left facing Turtle Rock tube opening
dw Object_Draw4x6 ; Right facing Turtle Rock tube opening
dw Object_Draw2x2
dw Object_Draw2x2
; 0x40
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_BombableFloor
; 0x48
dw Object_Draw4x4 ; Fake cracked floor (2x2)
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw3x8
dw Object_Draw8x6
dw Object_Draw3x6
dw Object_Draw3x4
dw Object_Draw2x2
; 0x50
dw Object_StarTile_disabled
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_FortuneTellerTemplate
dw $A194 ; = $A194*
dw Object_Draw2x2
dw Object_Draw2x2
; 0x58
dw Object_Draw2x2
dw Object_Draw2x2
dw $9D6C ; = $9D6C*
dw $A194 ; = $A194*
dw Object_Draw4x6 ; Bookcase
dw Object_Draw3x6
dw Object_Draw2x2
dw Object_Draw2x2
; 0x60
dw Object_Draw6x3
dw Object_Draw6x3
dw $A1D1 ; = $A1D1*
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw4x4
dw Object_Draw3x4
; 0x68
dw Object_Draw3x4
dw Object_Draw4x3
dw Object_Draw4x3
dw Object_Draw4x4
dw Object_Draw3x4
dw Object_Draw3x4
dw Object_Draw4x3
dw Object_Draw4x3
; 0x70
dw Object_Stacked4x4s
dw Object_BlindLight
dw Object_TrinexxShell ; Trinexx shell
dw Object_EntireFloorIsPit ; Whatever BG you're on, this will cover it with pit tiles.
dw Object_Draw8x8
dw Object_Draw2x2 ; Minigame chest
dw Object_Draw3x8
dw Object_Draw3x8
; 0x78
dw Object_Triforce
dw Object_Draw3x4
dw Object_Draw4x4
dw Object_Draw10x20_With4x4
dw Object_Draw2x2
dw Object_Draw2x2
dw Object_Draw2x2
dw $8AA3 ; = $8AA3
}
; ==============================================================================
; $86F0-$86F7 JUMP TABLE
DoorObjectRoutines:
{
; A = type
; X = position (0, 2, 4, ..., 24)
; $02 = position (0, 2, 4, ..., 24)
; $04 = type
; $0A = type
dw Door_Up ; $A81C* ; Up
dw Door_Down ; $A984* ; Down
dw Door_Left ; $AAD7* ; Left
dw Door_Right ; $AB99* ; Right?
}
; ==============================================================================
; $86F8 - $8739 DATA
Dungeon_DrawObjectOffsets:
{
.BG2
; $BF, $C2, $C5, $C8
; $CB, $CE, $D1, $D4
; $D7
; $DA
; $DD
dl $7E2000, $7E2002, $7E2004, $7E2006
dl $7E2080, $7E2082, $7E2084, $7E2086
dl $7E2100
dl $7E2180
dl $7E2200
.BG1
dl $7E4000, $7E4002, $7E4004, $7E4006
dl $7E4080, $7E4082, $7E4084, $7E4086
dl $7E4100
dl $7E4180
dl $7E4200
}
; ==============================================================================
; *$873A-$88E3 LONG
Dungeon_LoadRoom:
{
; Loads dungeon room from start to finish.
JSR Dungeon_LoadHeader
STZ $03F4
REP #$30
LDX $0110
; Get pointer to object data
LDA $1F8001, X : STA $B8
LDA $1F8000, X : STA $B7
; Not sure.
LDA $AD : STA $0428
LDA.w #$FF30 : STA $041C
STZ $041A : STZ $0420
STZ $0312 : STZ $0310
STZ $0422 : STZ $0424
LDA.w #$FFFF : STA $0436
STZ $0452 : STZ $0454 : STZ $0456
STZ $068A
STZ $044E : STZ $0450
STZ $FC
STZ $045C
STZ $0438 : STZ $043A : STZ $043C : STZ $043E
STZ $0440 : STZ $0442 : STZ $0444 : STZ $0446
STZ $0448
STZ $049A : STZ $049C : STZ $049E : STZ $04AE
STZ $047E : STZ $0480 : STZ $0482 : STZ $0484
STZ $04A2 : STZ $04A4 : STZ $04A6 : STZ $04A8
STZ $19E2 : STZ $19E4 : STZ $19E6 : STZ $19E8
STZ $19E0
STZ $0430 : STZ $0432
; Used in some of the graphics routines for determining tile types.
STZ $042C
STZ $042E
STZ $0496 : STZ $0498
STZ $04B0
LDX.w #$001E
STZ $0460
.initObjectBuffers
STZ $19A0, X : STZ $1980, X : STZ $19C0, X
STZ $04F0, X
STZ $0500, X : STZ $0520, X : STZ $0540, X
DEX #2 : BPL .initObjectBuffers
STZ $BA
JSR Dungeon_DrawFloors
LDY $BA : PHY
; Y is always 1 here. Contains layout info as well as starting quadrant info.
LDA [$B7], Y : AND.w #$00FF : STA $040E
; X = 3 * $00
LSR #2 : STA $00 : ASL A : ADD $00 : TAX
; The offset to the pointers for each layout.
LDA .layout_ptrs + 1, X : STA $B8
LDA .layout_ptrs + 0, X : STA $B7
STZ $BA
JSR Dungeon_DrawObjects ; Load the "layout" objects.
; Y = 2
PLY : INY : STY $BA
; Get room index * 3.
LDX $0110
LDA $1F8001, X : STA $B8
LDA $1F8000, X : STA $B7
; Draw Layer 1 objects to BG2
JSR Dungeon_DrawObjects
INC $BA : INC $BA
LDX.w #$001E
.setupLayer2
; These objects are drawn onto BG1
LDA Dungeon_DrawObjectOffsets_BG1+1, X : STA $C0, X
DEX #3 : BPL .setupLayer2
; Draw Layer 2 objects to BG1
JSR Dungeon_DrawObjects
INC $BA : INC $BA
LDX.w #$001E
.setupLayer3
; These objects are drawn onto BG1
LDA Dungeon_DrawObjectOffsets_BG2+1, X : STA $C0, X
DEX #3 : BPL .setupLayer3
; Draw layer 3 objects to BG1
JSR Dungeon_DrawObjects
STZ $BA
.next_block
LDX $BA
; If the block's room matches the current room, load.
LDA $7EF940, X : CMP $A0 : BNE .notInThisRoom
; Load the block's location
LDA $7EF942, X : STA $08 : TAY
JSR Dungeon_LoadBlock
.notInThisRoom
; Move to the next block entry
LDA $BA : ADD.w #$0004 : STA $BA
; There are 99 (decimal) blocks in the game
CMP.w #$018C : BNE .next_block
REP #$20
LDA $042C : STA $042E : STA $0478
; Next load torches
STZ $BA
.notEndOfTorches
LDX $BA
LDA $7EFB40, X : CMP $A0 : BEQ .torchInThisRoom
INX #2
.nextTorch
LDA $7EFB40, X
INX #2 : STX $BA
CMP.w #$FFFF : BNE .nextTorch
CPX.w #$0120 : BNE .notEndOfTorches
BRA .return
.torchInThisroom
INX #2
.nextTorchInRoom
; get tilemap position
LDA $7EFB40, X : STA $08
INX #2 : STX $BA
JSR Dungeon_LoadTorch
LDX $BA
LDA $7EFB40, X : CMP.w #$FFFF : BNE .nextTorchInRoom
SEP #$30
.return
RTL
}
; ==============================================================================
; *$88E4-$8915 LOCAL
Dungeon_DrawObjects:
{
; Loads Level data?
.nextType1
STZ $B2
STZ $B4
LDY $BA
LDA [$B7], Y : CMP.w #$FFFF : BEQ .return
STA $00 : CMP.w #$FFF0 : BEQ .enteredType2Section
JSR Dungeon_LoadType1Object
BRA .nextType1
.return
RTS
.enteredType2Section
; After a #$FFF0 move to the next object.
INC $BA : INC $BA
.nextType2
LDY $BA
; Still stop if it's an #$FFFF object.
LDA [$B7], Y : CMP.w #$FFFF : BEQ .return
; Store the object's information at $00.
STA $00
JSR Dungeon_LoadType2Object
INC $BA : INC $BA
BRA .nextType2
}
; ==============================================================================
; *$8916-$893B LOCAL
Dungeon_LoadType2Object:
{
; This apparently loads doors...
; more generally loads 2 byte objects >_>
AND.w #$00F0 : LSR #3 : STA $02
LDA $00 : XBA : AND.w #$00FF : STA $0A : STA $04
; X will be even and at most 6.
LDA $00 : AND.w #$0003 : ASL A : TAX
LDA DoorObjectRoutines, X : STA $0E
LDX $02
LDA $04