-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexile.6502
13751 lines (13411 loc) · 450 KB
/
exile.6502
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
; -*- indent-tabs-mode:nil; -*-
; these values aren't tweakable yet...
load_address=$1200
base_address=$100
screen_width=64
IF SRAM
screen_size_pages=$40
ELSE
screen_size_pages=$20
ENDIF
IF screen_size_pages=$20:latch_b4=1:latch_b5=0
ELIF screen_size_pages=$28:latch_b4=0:latch_b5=1
ELIF screen_size_pages=$40:latch_b4=0:latch_b5=0
ELIF screen_size_pages=$50:latch_b4=1:latch_b5=1
ELSE:ERROR "bad screen size"
ENDIF
IF (screen_size_pages*256) MOD (screen_width*8)<>0:ERROR "bad screen width":ENDIF
screen_height=(screen_size_pages*256)/(screen_width*8)
PRINT "screen height:",screen_height
screen_base_page=$80-screen_size_pages
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Zero page locations
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
square_is_mapped_data=&00
intro_one=&01 ; also used in plotting
intro_two=&02 ; also used in plotting
intro_three=&03
npc_speed=&04
something_about_player_angle=&05
current_object_rotator=&06
current_object_rotator_low=&07
square_sprite=&08
square_orientation=&09
held_object_x_low=&0A
held_object_x=&0B
held_object_y_low=&0C
held_object_y=&0D
this_object_target_object=&0E
f3_xy=&0F
f2_xy=&10 ; also used in plotting
this_object_extra=&11 ; also used in plotting
this_object_timer=&12
this_object_timer_old=&13
this_object_tx=&14
this_object_energy=&15
this_object_ty=&16
object_onscreen=&17
wall_collision_bottom_minus_top=&18
any_collision_top_bottom=&19
wall_collision_top_minus_bottom=&1A
wall_collision_top_or_bottom=&1B
wall_collision_angle=&1C
wall_collision_frict_y_vel=&1D
wall_collision_post_angle=&1E
underwater=&1F
this_object_water_level=&20 ; also used in plotting
npc_fed=&21
npc_type=&22 ; also used in plotting
used_in_sound=&23
object_static=&24
bells_to_sound=&25
copy_of_stack_pointer=&26
whistle1_played=&27
sucking_damage=&28
sucking_angle_modifier=&29
screen_background_flash_counter=&2A
object_is_invisible=&2B
object_affected_by_gravity=&2C
background_processing_flag=&2D
objects_to_reserve=&2E
objects_two_reserve=&2F
child_created=&30
player_crawling=&31
gun_aim_value=&32
gun_aim_velocity=&33
firing_angle=&34
sucking_distance=&35
player_bullet=&36
this_object_angle=&37
this_object_weight=&38
this_object_flags_lefted=&39
this_object_width=&3A
this_object_supporting=&3B
this_object_height=&3C
this_object_data_pointer=&3D
this_object_target=&3E
this_object_target_old=&3F
acceleration_x=&40
this_object_type=&41
acceleration_y=&42
this_object_vel_x=&43
this_object_vel_x_old=&44
this_object_vel_y=&45
this_object_vel_y_old=&46
this_object_x_max_low=&47
this_object_x_max=&48
this_object_y_max_low=&49
this_object_y_max=&4A
this_sprite_width=&4B
this_sprite_width_old=&4C
this_sprite_height=&4D
this_sprite_height_old=&4E
this_object_x_low=&4F
this_object_x_low_old=&50
this_object_y_low=&51
this_object_y_low_old=&52
this_object_x=&53
this_object_x_old=&54
this_object_y=&55
this_object_y_old=&56
this_object_screen_x_low=&57
this_object_screen_x_low_old=&58
this_object_screen_y_low=&59
this_object_screen_y_low_old=&5A
this_object_screen_x=&5B
this_object_screen_x_old=&5C
this_object_screen_y=&5D
this_object_screen_y_old=&5E
this_sprite_a=&5F
this_sprite_a_old=&60
this_sprite_b=&61
this_sprite_b_old=&62
this_sprite_flipping_flags=&63
this_sprite_flipping_flags_old=&64
this_sprite_partflip=&65
this_sprite_vertflip_old=&66
something_plot_var=&67
some_other_plot_var=&68
bytes_per_line_in_sprite=&69
copy_of_stack_pointer_6a=&6A
bytes_per_line_on_screen=&6B
lines_in_sprite=&6C
skip_sprite_calculation_flags=&6E
this_object_flags=&6F
this_object_flags_old=&70
this_object_flipping_flags=&71
this_object_flipping_flags_old=&72
this_object_palette=&73
this_object_palette_old=&74
this_object_sprite=&75
this_object_sprite_old=&76
wall_collision_count_left=&77
wall_collision_count_top=&78
wall_collision_count_right=&79
wall_collision_count_bottom=&7A
support_delta_x_low=&7B
support_delta_x_OR_wall_y_start_lookup_pointer=&7C
support_delta_y_low_OR_wall_y_start_lookup_pointer_h_4=&7D
support_delta_y_OR_wall_y_start_base=&7E
support_overlap_x_low_OR_wall_sprite=&7F
support_overlap_x_OR_wall_y_start_lookup_pointer_4=&80
support_overlap_y_low_OR_wall_y_start_lookup_pointer_h_4=&81
support_overlap_y_OR_wall_y_start_base_4=&82
distance_OR_wall_sprite_4=&83
this_object_y_low_bumped_OR_some_kind_of_velocity_copy_OR_distance_left=&84
this_object_y_max_low_bumped=&85
this_object_x_centre_low_OR_particle_x_low=&87
stack_object_x_centre_low=&88
this_object_y_centre_low_OR_particle_y_low=&89
stack_object_y_centre_low=&8A
this_object_x_centre_OR_particle_x=&8B
stack_object_x_centre=&8C
this_object_y_centre_OR_particle_y=&8D
stack_object_y_centre=&8E
screen_address=&8F
other_object_weight_OR_support_weight_delta=&90
pixel_x_low=&91
pixel_x=&92
pixel_y_low=$93:screen_address_two=$93
pixel_y=$94:screen_address_two_h=$94
square_x=&95
square_y=&97
temp_a_OR_supporting_object_xy=&98
velocity_signs_OR_pixel_colour=&99
zp_various_9a=&9A
zp_various_9b=&9B
zp_various_9c=&9C
scroll_width=zp_various_9c
sprite_row_byte_offset=$9c
zp_various_9d=&9D
zp_various_9e=&9E
number_particles_OR_this_object_gravity_flags=&9F
zp_various_a0=&A0
sprite_initial_dest_offset=zp_various_a0
scroll_height=zp_various_a0
find_carry=&A1
sprite_dest_offset=find_carry
zp_various_a2=&A2
zp_various_a3=&A3
map_address=&A4
map_address_high=&A5
current_object=&AA
other_object_minus_10_OR_this_object_width_divided_32=&AB
key_number=&AC
plotter_x=&AE
strip_length=&AF
screen_offset=&B0
screen_offset_h=&B1
screen_start_square_x_low_copy=&B2
some_screen_address_offset=&B3
velocity_x=&B4
angle=&B5
velocity_y=&B6
some_kind_of_velocity=&B7
delta_magnitude=&B8
something_player_collision_value=&B9
player_immobility_daze=&BA
player_nothrust_daze=&BB
this_object_data=&BC
new_object_data_pointer=&BD
new_object_type_pointer=&BE
this_object_offscreen=&BF
loop_counter=&C0
loop_counter_every_40=&C1
loop_counter_every_20=&C2
loop_counter_every_10=&C3
loop_counter_every_08=&C4
loop_counter_every_04=&C5
loop_counter_every_02=&C6
screen_start_square_x_low=&C7
screen_start_square_x=&C8
screen_start_square_y_low=&C9
screen_start_square_y=&CA
scroll_square_x_velocity_low=&CB
scroll_square_x_velocity_high=&CC
scroll_square_y_velocity_low=&CD
scroll_square_y_velocity_high=&CE
scroll_x_direction=&CF
scroll_y_direction=&D1
something_x_acc=&D2
gun_aim_acceleration=&D3
something_y_acc=&D4
timer_1=&D9
timer_2=&DA
timer_3=&DB
timer_4=&DC
object_held=&DD
player_angle=&DE
player_facing=&DF
org base_address
IF SRAM
.sram_ram_begin
ENDIF
.main_begin
.wall_base_y_lookup
equb $00,$00,$00,$00,$00,$00,$00,$00
equb $00,$08,$10,$18,$20,$28,$30,$38
equb $00,$10,$20,$30,$40,$50,$60,$70
equb $08,$28,$48,$68,$88,$A8,$C8,$E8
equb $FF,$FF,$00,$00,$00,$00,$00,$00
equb $60,$98,$B8,$D0,$E0,$F0,$FF,$FF
equb $00,$00,$08,$18,$28,$40,$60,$98
equb $00,$00,$FF,$FF,$FF,$FF,$FF,$FF
equb $38,$30,$28,$20,$18,$10,$08,$00
equb $70,$60,$50,$40,$30,$20,$10,$00
equb $E8,$C8,$A8,$88,$68,$48,$28,$08
equb $00,$00,$00,$00,$00,$00,$FF,$FF
equb $FF,$FF,$F0,$E0,$D0,$B8,$98,$60
equb $98,$60,$40,$28,$18,$08,$00,$00
equb $FF,$FF,$FF,$FF,$FF,$FF,$00,$00
equb $40,$40,$00,$00,$00,$00,$00,$00
equb $00,$00,$00,$00,$00,$00,$40,$40
equb $00,$00,$FF,$FF,$FF,$FF,$00,$00
equb $40,$40,$00,$00,$00,$00,$40,$40
equb $80,$68,$48,$10,$00,$00,$00,$00
equb $00,$00,$00,$00,$10,$48,$68,$80
.process_keys
LDX #num_keys-1
STX key_number
.L01AC
LDX key_number ; index
LDA keys_pressed,X ; bit 7 = pressed now
BPL not_pressed ; taken if not pressed now
CMP #%11000000 ; C set if held; C clear if newly
; pressed
LDA function_table_h,X ; get routine pointer MSB (plus
; flag... see table)
ROR A ; put held flag into bit 7; put table
; flag into C
BPL L01BF ; branch taken if newly pressed
BCS not_pressed ; if held, and table flag set, skip it
AND #$7F ; clear out bit 7
.L01BF
JSR call_function
.not_pressed
DEC key_number
.L01C4
BPL L01AC
INC keys_processed
RTS
.call_function
PHA
LDA function_table,X
PHA
RTS
.intro2
CLI
LDA #screen_base_page
STA screen_address+1
LDA #$00
STA screen_address
TAY
.L01DA
STA (screen_address),Y ; screen_address
INY
BNE L01DA
INC screen_address+1
BPL L01DA
LDA #$01
LDX #screen_width
STA $FE00 ; write to video controller (register number)
STX $FE01 ; write to video controller (register value)
JMP main_loop
;; &01ff and descending is the 6502 stack
.unused_stack
equb $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA
.unused_USERV
equb $AA,$AA
.unused_BRKV
equb $AA,$AA
IF P%<>$204:ERROR "IRQ1V in wrong place":ENDIF
;; IRQ1V - Main interrupt vector
equw irq_routine
;; tables used in particle generation
;;
;; &0206 = particle_life_randomness_table
;; &0207 = particle_life_table
;; &0208 = particle_velocity_randomness_table
;; &0209 = particle_velocity_table
;; &020a = particle_colour_table
;; &020b = particle_colour_randomness_table
;; &020c = particle_flags_table
;; &80 = set angle based on velocity or acceleration
;; &40 = set angle based on velocity
;; &20 = use object x/y
;; &020d = particle_x_randomness_table
;; &020e = particle_y_randomness_table
;; &020f = particle_x_velocity_randomness_table
;; &0210 = particle_y_velocity_randomness_table
;; 6 7 8 9 a b c d e f 0
;; life vel col f x y xv yv
;; r r r r r r r
.particle_tables
equb $0F,$1E,$0F,$0A,$91,$02,$A0,$1F,$1F,$03,$03; + &00 # plasma ball
equb $0F,$03,$0F,$18,$86,$01,$ED,$00,$00,$03,$03; + &0b # jetpack thrust
equb $FF,$00,$00,$00,$91,$46,$2A,$00,$00,$2F,$2F; + &16 # explosion
equb $07,$05,$07,$0A,$81,$02,$20,$7F,$3F,$00,$00; + &21 # fireball
equb $07,$02,$0F,$03,$82,$01,$2A,$00,$00,$03,$03; + &2c # icer
equb $0F,$14,$0F,$1E,$81,$42,$00,$00,$00,$0F,$03; + &37 # engine thruster
equb $03,$10,$01,$3F,$A8,$07,$2D,$00,$00,$00,$01; + &42 # gun aim
equb $1C,$08,$00,$00,$88,$47,$00,$FF,$FF,$00,$00; + &4d # stars / mushroom ball
equb $0F,$14,$07,$0A,$97,$41,$22,$00,$00,$03,$03; + &58 # flask
equb $07,$0A,$03,$06,$97,$41,$01,$00,$00,$0F,$03; + &63 # water splashes
equb $07,$0A,$0F,$28,$97,$41,$00,$FF,$FF,$03,$03; + &6e # wind
equb $00,$00,$00,$00,$00,$00,$00,$00,$4C
IF SRAM
equb $F4
ELSE
equb $DF
ENDIF
equb $14 ; + &79 # (unused)
particle_life_randomness_table=particle_tables+0
particle_life_table=particle_tables+1
particle_velocity_randomness_table=particle_tables+2
particle_velocity_table=particle_tables+3
particle_colour_table=particle_tables+4
particle_colour_randomness_table=particle_tables+5
particle_flags_table=particle_tables+6
particle_x_randomness_table=particle_tables+7
particle_y_randomness_table=particle_tables+8
particle_x_velocity_randomness_table=particle_tables+9
particle_y_velocity_randomness_table=particle_tables+10
particles_plasma_ball=0*11
particles_jetpack_thrust=1*11
particles_explosion=2*11
particles_fireball=3*11
particles_icer=4*11
particles_engine_thruster=5*11
particles_gun_aim=6*11
particles_stars=7*11
particles_flask=8*11
particles_wind=9*11
particles_unused=10*11
;; ##############################################################################
;;
;; Object handlers
;; ===============
;; background objects:
;; no l h addr name object created 80 40 20 10
;; &00 &d7 &20 3ef2 handle_background_invisible_switch - - + -
;; &01 &c8 &b0 3ee3 handle_background_teleport_beam teleport beam + - + +
;; &02 &a4 &91 3fbf handle_background_object_from_data (use object_data & &7f) + - - +
;; &03 &7d &f0 3e98 handle_background_door door + + + +
;; &04 &7a &f0 3e95 handle_background_stone_door stone door + + + +
;; &05 &9c &b1 3fb7 handle_background_object_from_type (use object_type) + - + +
;; &06 &9c &b1 3fb7 handle_background_object_from_type (use object_type) + - + +
;; &07 &9c &b1 3fb7 handle_background_object_from_type (use object_type) + - + +
;; &08 &b2 &b1 3fcd handle_background_switch switch + - + +
;; &09 &00 &b0 3e1b handle_background_object_emerging (use object_type) + - + +
;; &0a &00 &b0 3e1b handle_background_object_emerging (use object_type) + - + +
;; &0b &26 &31 3f41 handle_background_object_fixed_wind - - + +
;; &0c &6f &90 3e8a handle_background_engine_thruster engine thruster + - - +
;; &0d &88 &31 3fa3 handle_background_object_water - - + +
;; &0e &fd &30 3f18 handle_background_object_random_wind - - + +
;; &0f &b7 &31 3fd2 handle_background_mushrooms mushroom ball - - + +
;; &10 &7b &02 4096 handle_explosion_type_00
;; &11 &a3 &02 40be handle_explosion_type_40
;; &12 &a0 &02 40bb handle_explosion_type_80
;; &13 &aa &02 40c5 handle_explosion_type_c0
;;
;; stack objects:
;; r no l h addr name object
;; 0:&00 &f6 &0b &4a11 handle_player_object player
;; &01 &bc &0a &48d7 handle_chatter_active active chatter
;; &02 &d5 &88 &46f0 handle_crew_member pericles crew member
;; &03 &6d &84 &4288 handle_fluffy fluffy
;; 1:&04 &94 &cd &4baf handle_nest small nest
;; &05 &94 &cd &4baf handle_nest big nest
;; 2:&06 &48 &86 &4463 handle_frogman_red red frogman
;; &07 &5c &86 &4477 handle_frogman_green green frogman
;; &08 &5a &86 &4475 handle_frogman_cyan cyan frogman
;; &09 &ae &09 &47c9 handle_red_slime red slime
;; &0a &0f &04 &422a handle_green_slime green slime
;; &0b &4b &04 &4266 handle_yellow_ball yellow ball
;; &0c &6e &09 &4789 handle_sucker sucker
;; &0d &d2 &0f &4ded handle_sucker_deadly deadly sucker
;; &0e &46 &89 &4761 handle_big_fish big fish
;; 3:&0f &ef &83 &420a handle_worm worm
;; &10 &06 &d1 &4f21 handle_nest_dweller pirahna
;; &11 &06 &91 &4f21 handle_nest_dweller wasp
;; 4:&12 &dc &c4 &42f7 handle_grenade_active active grenade
;; &13 &a4 &c8 &46bf handle_icer_bullet icer bullet
;; &14 &f9 &c7 &4614 handle_tracer_bullet tracer bullet
;; &15 &0b &c5 &4326 handle_cannonball cannonball
;; &16 &17 &c5 &4332 handle_death_ball_blue blue death ball
;; &17 &2f &c5 &434a handle_red_bullet red bullet
;; &18 &00 &c6 &441b handle_pistol_bullet pistol bullet
;; &19 &6d &8c &4a88 handle_plasma_ball plasma ball
;; &1a &cc &45 &43e7 handle_hover_ball hover ball
;; &1b &d0 &45 &43eb handle_hover_ball_invisible invisible hover ball
;; 5:&1c &c3 &50 &4ede handle_robot magenta robot
;; &1d &c3 &50 &4ede handle_robot red robot
;; &1e &c7 &50 &4ee2 handle_robot_blue blue robot
;; &1f &bd &50 &4ed8 handle_turret green/white turret
;; &20 &bd &50 &4ed8 handle_turret cyan/red turret
;; &21 &e9 &49 &4804 handle_hovering_robot hovering robot
;; 6:&22 &04 &4a &481f handle_clawed_robot magenta clawed robot
;; &23 &04 &4a &481f handle_clawed_robot cyan clawed robot
;; &24 &04 &4a &481f handle_clawed_robot green clawed robot
;; &25 &04 &4a &481f handle_clawed_robot red clawed robot
;; &26 &e9 &08 &4704 handle_triax triax
;; &27 &37 &90 &4e52 handle_maggot maggot
;; &28 &55 &c3 &4170 handle_gargoyle gargoyle
;; &29 &d4 &86 &44ef handle_imp red/magenta imp
;; &2a &d4 &86 &44ef handle_imp red/yellow imp
;; &2b &d4 &86 &44ef handle_imp blue/cyan imp
;; &2c &d4 &86 &44ef handle_imp cyan/yellow imp
;; &2d &d4 &86 &44ef handle_imp red/cyan imp
;; &2e &16 &88 &4631 handle_bird green/yellow bird
;; &2f &16 &88 &4631 handle_bird white/yellow bird
;; &30 &06 &88 &4621 handle_bird_red red/magenta bird
;; &31 &10 &88 &462b handle_bird_invisible invisible bird
;; 7:&32 &e6 &02 &4000 handle_lightning lightning
;; &33 &7d &08 &4698 handle_mushroom_ball red mushroom ball
;; &34 &7d &08 &4698 handle_mushroom_ball blue mushroom ball
;; &35 &76 &09 &4791 handle_engine_fire engine fire
;; &36 &7e &c9 &4799 handle_red_drop red drop
;; &37 &bb &0c &4ad6 handle_fireball fireball
;; 8:&38 &a6 &0a &48c1 handle_chatter_inactive inactive chatter
;; &39 &0b &0d &4b26 handle_moving_fireball moving fireball
;; &3a &81 &05 &439c handle_giant_wall giant wall
;; &3b &fa &0d &4c15 handle_engine_thruster engine thruster
;; &3c &68 &ce &4c83 handle_door horizontal door
;; &3d &68 &ce &4c83 handle_door vertical door
;; &3e &68 &ce &4c83 handle_door horizontal stone door
;; &3f &68 &ce &4c83 handle_door vertical stone door
;; &40 &8e &0d &4ba9 handle_bush bush
;; &41 &6b &0f &4d86 handle_teleport_beam teleport beam
;; &42 &82 &cb &499d handle_switch switch
;; &43 &92 &05 &43ad (null function) chest
;; &44 &81 &11 &4f9c handle_explosion explosion
;; &45 &92 &05 &43ad (null function) rock
;; &46 &d3 &02 &40ee handle_cannon cannon
;; &47 &fb &43 &4216 handle_mysterious_weapon mysterious weapon
;; &48 &84 &03 &419f handle_maggot_machine maggot machine
;; &49 &49 &0d &4b64 handle_placeholder placeholder
;; 9:&4a &59 &05 &4374 handle_destinator destinator
;; &4b &45 &85 &4360 handle_energy_capsule energy capsule
;; &4c &8c &05 &43a7 handle_flask empty flask
;; &4d &93 &05 &43ae handle_flask_full full flask
;; &4e &36 &05 &4351 handle_remote_control remote control device
;; &4f &36 &05 &4351 handle_remote_control cannon control device
;; &50 &3d &c3 &4158 handle_grenade_inactive inactive grenade
;; &51 &6d &0d &4b88 handle_collectable cyan/yellow/green key
;; &52 &6d &0d &4b88 handle_collectable red/yellow/green key
;; &53 &6d &0d &4b88 handle_collectable green/yellow/red key
;; &54 &6d &0d &4b88 handle_collectable yellow/white/red key
;; &55 &af &03 &41ca handle_coronium_boulder coronium boulder
;; &56 &6d &0d &4b88 handle_collectable red/magenta/red key
;; &57 &6d &0d &4b88 handle_collectable blue/cyan/green key
;; &58 &a7 &03 &41c2 handle_coronium_crystal coronium crystal
;; &59 &6d &0d &4b88 handle_collectable jetpack booster
;; &5a &6d &0d &4b88 handle_collectable pistol
;; &5b &6d &0d &4b88 handle_collectable icer
;; &5c &6d &0d &4b88 handle_collectable discharge device
;; &5d &6d &0d &4b88 handle_collectable plasma gun
;; &5e &6d &0d &4b88 handle_collectable protection suit
;; &5f &6d &0d &4b88 handle_collectable fire immunity device
;; &60 &6d &0d &4b88 handle_collectable mushroom immunity pull
;; &61 &6d &0d &4b88 handle_collectable whistle 1
;; &62 &6d &0d &4b88 handle_collectable whistle 2
;; &63 &6d &0d &4b88 handle_collectable radiation immunity pull
;; &64 &92 &05 &43ad (null function) ?
;;
;; ##############################################################################
.object_sprite_lookup
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
equb $04,$14,$04,$75,$1E,$1B,$10,$10,$10,$1C,$1C,$20,$70,$70,$61,$52; 00
equb $72,$4F,$21,$08,$08,$21,$21,$08,$08,$21,$78,$78,$13,$13,$13,$5E; 10
equb $5E,$15,$16,$16,$16,$16,$04,$52,$45,$64,$64,$64,$64,$64,$59,$59; 20
equb $59,$59,$6D,$63,$63,$0B,$0F,$17,$14,$17,$39,$17,$4A,$4B,$3C,$41; 30
equb $1A,$71,$2E,$5D,$17,$20,$56,$57,$47,$22,$60,$7B,$76,$76,$58,$58; 40
equb $21,$4D,$4D,$4D,$4D,$20,$4D,$4D,$22,$6B,$6C,$6C,$79,$6C,$04,$7A; 50
equb $63,$7C,$7C,$79,$77; 60
.object_palette_lookup
;; & &80 = can be picked up
;; & &7f = palette
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
equb $3E,$1B,$2E,$F2,$32,$32,$53,$05,$0F,$14,$29,$BC,$65,$65,$F7,$97; 00
equb $D3,$C7,$EF,$7E,$5F,$3C,$5A,$11,$2D,$34,$E1,$80,$55,$1B,$4C,$59; 10
equb $23,$72,$2E,$7B,$77,$33,$39,$8B,$44,$51,$0D,$46,$2B,$53,$35,$3C; 20
equb $02,$01,$70,$9C,$CF,$00,$14,$10,$4B,$10,$0C,$34,$6B,$6B,$42,$42; 30
equb $31,$6F,$15,$2E,$12,$CB,$33,$B1,$62,$00,$DB,$9F,$8F,$CF,$E5,$8E; 40
equb $EF,$AB,$AD,$95,$9C,$91,$92,$A6,$91,$B1,$8E,$E0,$A2,$B5,$B3,$E3; 50
equb $D5,$E3,$D7,$F0,$F1; 60
.object_gravity_flags
;; & &80 = doesn't collide with other objects
;; & &07 = weight; 01 = light, 06 = heavy, 07 = static
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
equb $03,$23,$23,$22,$77,$77,$26,$6D,$6E,$F7,$6E,$25,$F7,$F7,$25,$69; 00
equb $6B,$68,$04,$63,$66,$66,$65,$66,$62,$64,$69,$69,$24,$25,$26,$77; 10
equb $77,$23,$05,$05,$05,$05,$04,$68,$77,$6A,$6C,$6B,$6B,$6C,$6C,$6C; 20
equb $6D,$6D,$E5,$61,$61,$E4,$E5,$E8,$24,$EC,$26,$D7,$57,$57,$57,$57; 30
equb $D6,$D7,$57,$25,$82,$26,$25,$24,$77,$74,$24,$02,$22,$24,$22,$22; 40
equb $24,$23,$23,$23,$23,$25,$23,$23,$02,$26,$23,$23,$23,$23,$26,$25; 50
equb $22,$22,$22,$25,$E7; 60
.object_handler_table
;; for background objects / explosions
equb LO(handle_background_invisible_switch-handlers_start) ;
equb LO(handle_background_teleport_beam-handlers_start) ;
equb LO(handle_background_object_from_data-handlers_start) ;
equb LO(handle_background_door-handlers_start) ;
equb LO(handle_background_stone_door-handlers_start) ;
equb LO(handle_background_object_from_type-handlers_start) ;
equb LO(handle_background_object_from_type-handlers_start) ;
equb LO(handle_background_object_from_type-handlers_start) ;
equb LO(handle_background_switch-handlers_start) ;
equb LO(handlers_start-handlers_start) ;
equb LO(handlers_start-handlers_start) ;
equb LO(handle_background_object_fixed_wind-handlers_start) ;
equb LO(handle_background_engine_thruster-handlers_start) ;
equb LO(handle_background_object_water-handlers_start) ;
equb LO(handle_background_object_random_wind-handlers_start) ;
equb LO(handle_background_mushrooms-handlers_start) ;
equb LO(handle_explosion_type_00-handlers_start)
equb LO(handle_explosion_type_40-handlers_start)
equb LO(handle_explosion_type_80-handlers_start)
equb LO(handle_explosion_type_c0-handlers_start)
equb LO(handle_player_object-handlers_start)
equb LO(handle_chatter_active-handlers_start)
equb LO(handle_crew_member-handlers_start)
equb LO(handle_fluffy-handlers_start)
equb LO(handle_nest-handlers_start)
equb LO(handle_nest-handlers_start)
equb LO(handle_frogman_red-handlers_start)
equb LO(handle_frogman_green-handlers_start)
equb LO(handle_frogman_cyan-handlers_start)
equb LO(handle_red_slime-handlers_start)
equb LO(handle_green_slime-handlers_start)
equb LO(handle_yellow_ball-handlers_start)
equb LO(handle_sucker-handlers_start)
equb LO(handle_sucker_deadly-handlers_start)
equb LO(handle_big_fish-handlers_start)
equb LO(handle_worm-handlers_start)
equb LO(handle_nest_dweller-handlers_start)
equb LO(handle_nest_dweller-handlers_start)
equb LO(handle_active_grenade-handlers_start)
equb LO(handle_icer_bullet-handlers_start)
equb LO(handle_tracer_bullet-handlers_start)
equb LO(handle_cannonball-handlers_start)
equb LO(handle_death_ball_blue-handlers_start)
equb LO(handle_red_bullet-handlers_start)
equb LO(handle_pistol_bullet-handlers_start)
equb LO(handle_plasma_ball-handlers_start)
equb LO(handle_hover_ball-handlers_start)
equb LO(handle_hover_ball_invisible-handlers_start)
equb LO(handle_robot-handlers_start)
equb LO(handle_robot-handlers_start)
equb LO(handle_robot_blue-handlers_start)
equb LO(handle_turret-handlers_start)
equb LO(handle_turret-handlers_start)
equb LO(handle_hovering_robot-handlers_start)
equb LO(handle_clawed_robot-handlers_start)
equb LO(handle_clawed_robot-handlers_start)
equb LO(handle_clawed_robot-handlers_start)
equb LO(handle_clawed_robot-handlers_start)
equb LO(handle_triax-handlers_start)
equb LO(handle_maggot-handlers_start)
equb LO(handle_gargoyle-handlers_start)
equb LO(handle_imp-handlers_start)
equb LO(handle_imp-handlers_start)
equb LO(handle_imp-handlers_start)
equb LO(handle_imp-handlers_start)
equb LO(handle_imp-handlers_start)
equb LO(handle_bird-handlers_start)
equb LO(handle_bird-handlers_start)
equb LO(handle_bird_red-handlers_start)
equb LO(handle_bird_invisible-handlers_start)
equb LO(unused_object_handler-handlers_start)
equb LO(handle_mushroom_ball-handlers_start)
equb LO(handle_mushroom_ball-handlers_start)
equb LO(handle_engine_fire-handlers_start)
equb LO(handle_red_drop-handlers_start)
equb LO(handle_fireball-handlers_start)
equb LO(handle_chatter_inactive-handlers_start)
equb LO(handle_moving_fireball-handlers_start)
equb LO(handle_giant_wall-handlers_start)
equb LO(handle_engine_thruster-handlers_start)
equb LO(handle_door-handlers_start)
equb LO(handle_door-handlers_start)
equb LO(handle_door-handlers_start)
equb LO(handle_door-handlers_start)
equb LO(handle_bush-handlers_start)
equb LO(handle_teleport_beam-handlers_start)
equb LO(handle_switch-handlers_start)
equb LO(L43AD-handlers_start)
equb LO(handle_explosion-handlers_start)
equb LO(L43AD-handlers_start)
equb LO(handle_cannon-handlers_start)
equb LO(handle_mysterious_weapon-handlers_start)
equb LO(handle_maggot_machine-handlers_start)
equb LO(handle_placeholder-handlers_start)
equb LO(handle_destinator-handlers_start)
equb LO(handle_energy_capsule-handlers_start)
equb LO(handle_flask-handlers_start)
equb LO(handle_flask_full-handlers_start)
equb LO(handle_remote_control-handlers_start)
equb LO(handle_remote_control-handlers_start)
equb LO(handle_grenade_inactive-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_coronium_boulder-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_coronium_crystal-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(handle_collectable-handlers_start)
equb LO(L43AD-handlers_start)
.object_handler_table_h
;; & &c0 = how the object explodes
;; for background objects / explosions
equb HI(handle_background_invisible_switch-handlers_start) OR (1<<5)
equb HI(handle_background_teleport_beam-handlers_start) OR (1<<7) OR (1<<5) OR (1<<4)
equb HI(handle_background_object_from_data-handlers_start) OR (1<<7) OR (1<<4)
equb HI(handle_background_door-handlers_start) OR (1<<7) OR (1<<6) OR (1<<5) OR (1<<4)
equb HI(handle_background_stone_door-handlers_start) OR (1<<7) OR (1<<6) OR (1<<5) OR (1<<4)
equb HI(handle_background_object_from_type-handlers_start) OR (1<<7) OR (1<<5) OR (1<<4)
equb HI(handle_background_object_from_type-handlers_start) OR (1<<7) OR (1<<5) OR (1<<4)
equb HI(handle_background_object_from_type-handlers_start) OR (1<<7) OR (1<<5) OR (1<<4)
equb HI(handle_background_switch-handlers_start) OR (1<<7) OR (1<<5) OR (1<<4)
equb HI(handlers_start-handlers_start) OR (1<<7) OR (1<<5) OR (1<<4)
equb HI(handlers_start-handlers_start) OR (1<<7) OR (1<<5) OR (1<<4)
equb HI(handle_background_object_fixed_wind-handlers_start) OR (1<<5) OR (1<<4)
equb HI(handle_background_engine_thruster-handlers_start) OR (1<<7) OR (1<<4)
equb HI(handle_background_object_water-handlers_start) OR (1<<5) OR (1<<4)
equb HI(handle_background_object_random_wind-handlers_start) OR (1<<5) OR (1<<4)
equb HI(handle_background_mushrooms-handlers_start) OR (1<<5) OR (1<<4)
equb HI(handle_explosion_type_00-handlers_start)
equb HI(handle_explosion_type_40-handlers_start)
equb HI(handle_explosion_type_80-handlers_start)
equb HI(handle_explosion_type_c0-handlers_start)
equb HI(handle_player_object-handlers_start)
equb HI(handle_chatter_active-handlers_start)
equb HI(handle_crew_member-handlers_start) OR (1<<7)
equb HI(handle_fluffy-handlers_start) OR (1<<7)
equb HI(handle_nest-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_nest-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_frogman_red-handlers_start) OR (1<<7)
equb HI(handle_frogman_green-handlers_start) OR (1<<7)
equb HI(handle_frogman_cyan-handlers_start) OR (1<<7)
equb HI(handle_red_slime-handlers_start)
equb HI(handle_green_slime-handlers_start)
equb HI(handle_yellow_ball-handlers_start)
equb HI(handle_sucker-handlers_start)
equb HI(handle_sucker_deadly-handlers_start)
equb HI(handle_big_fish-handlers_start) OR (1<<7)
equb HI(handle_worm-handlers_start) OR (1<<7)
equb HI(handle_nest_dweller-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_nest_dweller-handlers_start) OR (1<<7)
equb HI(handle_active_grenade-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_icer_bullet-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_tracer_bullet-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_cannonball-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_death_ball_blue-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_red_bullet-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_pistol_bullet-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_plasma_ball-handlers_start) OR (1<<7)
equb HI(handle_hover_ball-handlers_start) OR (1<<6)
equb HI(handle_hover_ball_invisible-handlers_start) OR (1<<6)
equb HI(handle_robot-handlers_start) OR (1<<6)
equb HI(handle_robot-handlers_start) OR (1<<6)
equb HI(handle_robot_blue-handlers_start) OR (1<<6)
equb HI(handle_turret-handlers_start) OR (1<<6)
equb HI(handle_turret-handlers_start) OR (1<<6)
equb HI(handle_hovering_robot-handlers_start) OR (1<<6)
equb HI(handle_clawed_robot-handlers_start) OR (1<<6)
equb HI(handle_clawed_robot-handlers_start) OR (1<<6)
equb HI(handle_clawed_robot-handlers_start) OR (1<<6)
equb HI(handle_clawed_robot-handlers_start) OR (1<<6)
equb HI(handle_triax-handlers_start)
equb HI(handle_maggot-handlers_start) OR (1<<7)
equb HI(handle_gargoyle-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_imp-handlers_start) OR (1<<7)
equb HI(handle_imp-handlers_start) OR (1<<7)
equb HI(handle_imp-handlers_start) OR (1<<7)
equb HI(handle_imp-handlers_start) OR (1<<7)
equb HI(handle_imp-handlers_start) OR (1<<7)
equb HI(handle_bird-handlers_start) OR (1<<7)
equb HI(handle_bird-handlers_start) OR (1<<7)
equb HI(handle_bird_red-handlers_start) OR (1<<7)
equb HI(handle_bird_invisible-handlers_start) OR (1<<7)
equb HI(unused_object_handler-handlers_start)
equb HI(handle_mushroom_ball-handlers_start)
equb HI(handle_mushroom_ball-handlers_start)
equb HI(handle_engine_fire-handlers_start)
equb HI(handle_red_drop-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_fireball-handlers_start)
equb HI(handle_chatter_inactive-handlers_start)
equb HI(handle_moving_fireball-handlers_start)
equb HI(handle_giant_wall-handlers_start)
equb HI(handle_engine_thruster-handlers_start)
equb HI(handle_door-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_door-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_door-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_door-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_bush-handlers_start)
equb HI(handle_teleport_beam-handlers_start)
equb HI(handle_switch-handlers_start) OR (1<<7) OR (1<<6)
equb HI(L43AD-handlers_start)
equb HI(handle_explosion-handlers_start)
equb HI(L43AD-handlers_start)
equb HI(handle_cannon-handlers_start)
equb HI(handle_mysterious_weapon-handlers_start) OR (1<<6)
equb HI(handle_maggot_machine-handlers_start)
equb HI(handle_placeholder-handlers_start)
equb HI(handle_destinator-handlers_start)
equb HI(handle_energy_capsule-handlers_start) OR (1<<7)
equb HI(handle_flask-handlers_start)
equb HI(handle_flask_full-handlers_start)
equb HI(handle_remote_control-handlers_start)
equb HI(handle_remote_control-handlers_start)
equb HI(handle_grenade_inactive-handlers_start) OR (1<<7) OR (1<<6)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_coronium_boulder-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_coronium_crystal-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(handle_collectable-handlers_start)
equb HI(L43AD-handlers_start)
;; ##############################################################################
;;
;; Background sprites
;; ==================
;;
;; 00 = bottom left, unflipped
;; 40 = top left, vertical flip
;; 80 = bottom right, horizontal flip
;; c0 = top right, vertical & horizontal flip
;;
;; 00 = bush
;; 01 = stone \ wall, filled in bottom left
;; 02 = turret, top, facing left
;; 03 = door, horizontal, top
;; 04 = brick wall, solid
;; 05 = brick wall, 3/4 full, \, filled in bottom left
;; 06 = brick wall, \, starting top left, ending middle right
;; 07 = stone wall, bottom edging
;; 08 = nothing ?
;; 09 = sucker, bottom
;; 0a = big pipe entrance, bottom
;; 0b = wind
;; 0c = engine exhaust, \ filled in bottom left
;; 0d = water
;; 0e = mushrooms, bottom right corner
;; 0f = mushrooms, bottom
;; 10 = green stone wall, bottom edging
;; 11 = green leaf, bottom left corner
;; 12 = brick wall, solid
;; 13 = brick wall, \, starting top middle, ending middle right, 3/4 full
;; 14 = spaceship pipework
;; 15 = thin spaceship wall, left side
;; 16 = thick spaceship wall, bottom edge
;; 17 = thin spacewship wall, bottom edge
;; 18 = flag? left side
;; 19 = nothing ?
;; 1a = half a bush, bottom left corner
;; 1b = bush, bottom left corner
;; 1c = spaceship tiny corner piece, bottom left
;; 1d = spaceship 3/4 corner piece, bottom left
;; 1e = brick wall, solid
;; 1f = brick wall, bottom half
;; 20 = horizontal brick door
;; 21 = pillar, left edge
;; 22 = green leaf, bottom left corner
;; 23 = brick \ wall, filled in bottom left
;; 24 = brick wall, \, starting top left, ending middle right
;; 25 = brick wall, \, starting middle left, ending bottom right
;; 26 = spaceship wall, \, starting top left, ending half top right
;; 27 = spaceship wall, \, starting half top left, ending middle right
;; 28 = spaceship wall, \, starting middle left, ending half bottom right
;; 29 = spaceship wall, \, starting half bottom left, ending bottom left
;; 2a = brick wall, \, very steep down
;; 2b = couple of pixels of stone edging strip, bottom
;; 2c = stone edge, bottom
;; 2d = stone wall, solid
;; 2e = stone \ wall, filled in bottom left
;; 2f = stone \ wall, starting top left, ending middle right
;; 30 = stone \ wall, starting middle left, ending bottom right
;; 31 = stone - wall, filled bottom
;; 32 = spaceship corner with pipes, filled
;; 33 = pipe, bottom
;; 34 = pipe, bottom left corner
;; 35 = pipe, left
;; 36 = spaceship - wall, filled bottom
;; 37 = spaceship corner with pipes, filled
;; 38 = spaceship pipes, half, filled bottom
;; 39 = vertical brick door
;; 3a = gargoyle, bottom left
;; 3b = brick wall, 3/4 filled bottom
;; 3c = big pipe entrance, bottom
;; 3d = spaceship support
;; 3e = computer console, bottom left
;; 3f = hydraulic leg
;;
;; ##############################################################################
.background_sprite_lookup
;; & &7f = sprite
;; & &80 = vertically flipped
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
equb $C6,$CE,$C6,$C6,$C6,$BB,$C6,$18,$2D,$70,$6A,$C6,$23,$39,$C6,$62 ; 0
equb $C0,$8E,$39,$44,$47,$26,$48,$49,$DF,$C6,$99,$9A,$25,$2B,$39,$3B ; 1
equb $3C,$55,$8E,$43,$34,$35,$27,$28,$29,$2A,$42,$BF,$40,$3D,$38,$36 ; 2
equb $37,$3E,$33,$31,$2F,$30,$2C,$24,$32,$41,$45,$3A,$6A,$23,$60,$CC ; 3
.background_y_offset_lookup
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
equb $00,$00,$00,$00,$00,$00,$00,$D0,$C5,$B0,$C7,$00,$06,$00,$00,$C0 ; 0
equb $B0,$A0,$07,$08,$00,$04,$80,$C0,$70,$00,$B0,$80,$99,$08,$00,$80 ; 1
equb $C0,$00,$A0,$03,$02,$82,$01,$41,$81,$C1,$04,$F0,$B0,$00,$03,$02 ; 2
equb $82,$70,$06,$C0,$C5,$04,$80,$06,$80,$04,$99,$30,$C7,$06,$A9,$00 ; 3
.background_palette_lookup
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
equb $80,$02,$91,$91,$91,$00,$91,$A8,$DC,$B8,$8C,$80,$C9,$4A,$80,$06 ; 0
equb $88,$05,$04,$00,$02,$02,$02,$02,$02,$91,$03,$03,$02,$02,$00,$00 ; 1
equb $00,$BC,$B1,$00,$00,$00,$01,$01,$01,$01,$00,$04,$04,$04,$04,$04 ; 2
equb $04,$04,$02,$01,$01,$01,$02,$02,$02,$00,$00,$00,$82,$02,$64,$EE ; 3
.background_wall_y_start_base_lookup
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
equb $0F,$3A,$0F,$0F,$0F,$77,$0F,$F0,$B0,$F0,$C0,$0F,$00,$F0,$0F,$F0 ; 0
equb $0F,$0F,$00,$06,$0F,$00,$77,$B3,$0F,$0F,$0F,$0F,$90,$06,$0F,$77 ; 1
equb $B3,$F0,$0F,$10,$07,$70,$0B,$37,$73,$B0,$00,$0F,$B3,$0F,$10,$07 ; 2
equb $70,$77,$00,$B3,$B0,$00,$77,$00,$77,$00,$90,$2C,$C0,$00,$90,$0F ; 3
.background_wall_y_start_lookup
;; Add &100 to get address in wall_base_y_lookup
;; -- -V H- HV
equb $00,$00,$00,$00
equb $08,$40,$40,$08
equb $10,$48,$48,$10
equb $18,$50,$50,$18
equb $38,$20,$70,$58
equb $38,$78,$70,$80
equb $30,$60,$68,$28
equb $88,$90,$88,$90
equb $A0,$50,$98,$18
equb $18,$98,$50,$A0
.background_objects_range_minus_one
equb $00
.background_objects_range
;; [TOM background_objects_range 1d was 19]
equb $1D,$39,$57,$7A,$9E,$BC,$D8,$F6,$FE
.background_objects_data_offset
; +1 -2 -5 -6 -8 -11 -11 -13 -13
equb $01,$FE,$FB,$FA,$F8,$F5,$F5,$F3,$F3
.background_objects_type_offset
equb $00,$F5,$E9,$DE,$CE,$BE,$B1,$A1,$98
.background_objects_x_lookup
; 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c
equb $FF,$FF,$B0,$EC,$77,$64,$9A,$AF,$DA,$C6,$36,$9F,$2E,$A9,$9C,$83,$88,$5F,$57,$BF,$9D,$4D,$45,$81,$B3,$3F,$CB,$40,$4C
; 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38
equb $CA,$2F,$A7,$56,$34,$E3,$3B,$E4,$80,$E0,$64,$37,$47,$9F,$9C,$AA,$9B,$9A,$5E,$C7,$8A,$60,$9D,$A2,$B2,$98,$A9,$DB
; 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56
equb $28,$29,$3C,$98,$63,$CB,$61,$A3,$CE,$E9,$80,$2E,$4F,$79,$87,$B6,$97,$2D,$D6,$5C,$A0,$74,$6A,$A1,$9F,$89,$85,$6B,$AE,$65
; 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79
equb $E2,$ED,$80,$CD,$A8,$2B,$AB,$9D,$62,$E5,$70,$EC,$83,$C1,$C6,$67,$EB,$2D,$98,$AA,$CC,$A5,$9E,$A2,$D7,$E6,$E7,$94,$7C,$E3,$45,$9B,$9F,$C2,$71
; 7a 7b 7c 7d 7e 7f 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d
equb $67,$4F,$CF,$D2,$E2,$7A,$62,$DA,$76,$B2,$66,$D7,$83,$84,$80,$87,$9B,$50,$AE,$64,$A3,$63,$B8,$7F,$82,$E0,$9C,$61,$9D,$29,$46,$9F,$9A,$74,$75,$77
; 9e 9f a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb
equb $B2,$E4,$62,$63,$82,$61,$D4,$D3,$77,$2E,$64,$86,$A5,$A0,$D1,$B4,$7F,$A3,$9F,$99,$80,$67,$DA,$89,$95,$8B,$AB,$C4,$9D,$AA
; bc bd be bf c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 d1 d2 d3 d4 d5 d6 d7
equb $BB,$47,$8A,$A7,$61,$9E,$2E,$D6,$7E,$DA,$AA,$AB,$45,$67,$D4,$29,$B8,$6B,$69,$9D,$94,$63,$B4,$A1,$9F,$A0,$57,$E1
; d8 d9 da db dc dd de df e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 f5
equb $7F,$A6,$B4,$53,$61,$D4,$82,$E3,$75,$C3,$84,$9E,$C6,$64,$A2,$28,$29,$9D,$83,$A8,$80,$AA,$D5,$A0,$9F,$D6,$62,$69,$2C,$A5
; f6 f7 f8 f9 fa fb fc fd
equb $B8,$B9,$D9,$59,$79,$39,$48,$E8
; fe
equb $03
.background_objects_handler_lookup
equb $89,$89,$89,$89,$89,$8A,$46,$C6,$06,$06,$46,$05,$05,$00,$C3,$04
equb $83,$84,$84,$83,$88,$48,$02,$02,$42,$02,$7B,$22,$1E,$06,$06,$C6
equb $06,$46,$46,$85,$85,$87,$89,$89,$C7,$0A,$8C,$03,$84,$83,$43,$84
equb $84,$02,$01,$41,$01,$01,$2E,$1E,$3B,$46,$46,$06,$C6,$06,$06,$06
equb $46,$06,$09,$C9,$89,$CA,$8A,$8A,$0A,$4A,$8A,$04,$44,$41,$01,$C8
equb $48,$CC,$82,$02,$02,$02,$1E,$89,$09,$0A,$4A,$CA,$4A,$86,$46,$46
equb $46,$86,$45,$47,$00,$00,$00,$00,$84,$C3,$44,$43,$43,$43,$44,$84
equb $44,$04,$01,$08,$08,$02,$02,$82,$1E,$2D,$46,$46,$45,$46,$C6,$89
equb $C9,$49,$89,$CA,$CA,$8A,$8A,$8A,$0A,$00,$00,$C4,$43,$04,$43,$84
equb $44,$04,$44,$84,$41,$01,$01,$01,$C8,$42,$82,$3B,$11,$3B,$89,$C9
equb $CA,$8A,$C6,$06,$C6,$C6,$06,$06,$85,$47,$4A,$CA,$8A,$00,$00,$44
equb $43,$C3,$44,$44,$04,$41,$C8,$88,$C8,$C8,$02,$8C,$49,$89,$0A,$0A
equb $8A,$C6,$06,$06,$47,$87,$CC,$41,$01,$08,$08,$08,$08,$C4,$84,$43
equb $43,$84,$04,$83,$82,$82,$0D,$0D,$46,$06,$06,$06,$06,$45,$45,$45
equb $06,$07,$89,$09,$8A,$4A,$4A,$CA,$CA,$4A,$00,$00,$00,$48,$08,$82
equb $82,$82,$02,$C4,$C4,$0B,$0B,$0B,$D1,$91,$D1,$D1,$91,$91,$0D
.background_strip_cache_orientation
equb $2E,$2E,$2E,$2E,$2E,$2E,$2E,$2E,$2E
.background_strip_cache_sprite
; 7f6
equb $2E,$2E,$2E,$2E,$2E,$2E,$2E,$2E,$2E
;; 07f8 is where the game state data starts copying from
;; 07f8 - 07fe : copy of &d9 - &df when saving position
.game_time
equb $00,$00,$00,$00
.player_deaths
equb $00,$00,$00
.keys_collected
equb $00; cyan/yellow/green key
equb $00; red/yellow/green key
equb $00; green/yellow/red key
equb $00; yellow/white/red key
equb $00; (unused)
equb $00; red/magenta/red key