Syncron disassembly =================== Syncron was written by Gary Partis, and was published by Superior Software for the BBC Micro in 1988. It is a vertically scrolling shooter. The following disassembly was created by reverse engineering binary images, without access to any source code. It is nevertheless reasonably complete, allowing the technical approaches used to be understood. The author of this disassembly imposes no additional copyright restrictions beyond those already present on the game itself. It is provided for educational purposes only, and it is hoped that the original authors will accept it in the good faith it was intended - as a tribute to their skills. Interesting pokes ================= &0959 = &a2, &095a = &0f skip to any stage &0f84 = &a9 infinite lives &11cb = &a9, &14b8 = &a9 invulnerability Game disassembly ================ ; SYNC ; 00001F00 00007400 5800 # &1f00 - &73ff is decrypted to &0300 - &57ff at &7436 ; plot_character &0300 08 PHP ; processor status &0301 48 PHA ; tmp_a &0302 8a TXA &0303 48 PHA ; tmp_x &0304 98 TYA &0305 48 PHA ; tmp_y &0306 ba TSX &0307 bd 03 01 LDA &0103,X ; stack + 3 # Get tmp_a from stack &030a 38 SEC &030b e9 30 SBC #&30 ; "0" &030d 30 3f BMI &034e ; skip_plotting &030f c9 0a CMP #&0a &0311 90 02 BCC &0315 ; not_letter &0313 e9 07 SBC #&07 # Skip ASCII values &3a - &40 (between "9" and "A") ; not_letter &0315 a8 TAY &0316 a9 f6 LDA #&f6 ; &18f6 = font_data - &23 &0318 85 50 STA &50 ; font_address_low &031a a9 18 LDA #&18 &031c 85 51 STA &51 ; font_address_high ; calculate_font_address_loop &031e a5 50 LDA &50 ; font_address_low &0320 18 CLC &0321 69 23 ADC #&23 # &23 bytes of font data per character &0323 85 50 STA &50 ; font_address_low &0325 a5 51 LDA &51 ; font_address_high &0327 69 00 ADC #&00 &0329 85 51 STA &51 ; font_address_high &032b 88 DEY &032c 10 f0 BPL &031e ; calculate_font_address_loop &032e c8 INY ; 0 &032f 84 be STY &be ; character_data_bits_offset &0331 84 bf STY &bf ; character_data_byte_offset &0333 a0 22 LDY #&22 ; copy_character_data_loop &0335 b1 50 LDA (&50),Y ; font_address &0337 99 00 01 STA &0100,Y ; character_chunks_data &033a 88 DEY &033b 10 f8 BPL &0335 ; copy_character_data_loop &033d a0 00 LDY #&00 ; plot_character_row_loop &033f a2 00 LDX #&00 ; plot_character_column_loop &0341 20 5f 03 JSR &035f ; plot_chunk_of_character # stored as 8 * 7 five-bit chunks &0344 e8 INX &0345 e0 08 CPX #&08 &0347 d0 f8 BNE &0341 ; plot_character_column_loop &0349 c8 INY &034a c0 07 CPY #&07 &034c d0 f1 BNE &033f ; plot_character_row_loop ; skip_plotting &034e a5 e0 LDA &e0 ; text_x &0350 18 CLC &0351 69 04 ADC #&04 # Move right a character &0353 85 e0 STA &e0 ; text_x &0355 20 19 06 JSR &0619 ; calculate_text_screen_address &0358 68 PLA ; tmp_y &0359 a8 TAY &035a 68 PLA ; tmp_x &035b aa TAX &035c 68 PLA ; tmp_a &035d 28 PLP ; processor status &035e 60 RTS ; plot_chunk_of_character &035f 86 50 STX &50 ; chunk_x &0361 84 51 STY &51 ; chunk_y &0363 20 cf 03 JSR &03cf ; get_next_chunk_of_font_data &0366 a5 bc LDA &bc ; chunk_type &0368 f0 60 BEQ &03ca ; leave_after_restoring_registers # Chunk zero has nothing to plot &036a a5 50 LDA &50 ; chunk_x &036c 4a LSR A &036d 0a ASL A &036e 0a ASL A &036f 0a ASL A &0370 18 CLC &0371 65 da ADC &da ; text_screen_address_low &0373 85 52 STA &52 ; screen_address_low &0375 a5 db LDA &db ; text_screen_address_high &0377 69 00 ADC #&00 &0379 85 53 STA &53 ; screen_address_high &037b a5 51 LDA &51 ; chunk_y &037d 4a LSR A &037e a8 TAY &037f f0 10 BEQ &0391 ; skip_adding_groups ; add_groups_loop &0381 a5 52 LDA &52 ; screen_address_low &0383 18 CLC &0384 69 40 ADC #&40 ; &0140 # Move down a group &0386 85 52 STA &52 ; screen_address_low &0388 a5 53 LDA &53 ; screen_address_high &038a 69 01 ADC #&01 &038c 85 53 STA &53 ; screen_address_high &038e 88 DEY &038f d0 f0 BNE &0381 ; add_groups_loop ; skip_adding_groups &0391 a5 51 LDA &51 ; chunk_y &0393 29 01 AND #&01 &0395 f0 07 BEQ &039e ; is_even &0397 a5 52 LDA &52 ; screen_address_low &0399 18 CLC &039a 69 04 ADC #&04 # Move down half a group &039c 85 52 STA &52 ; screen_address_low ; is_even &039e a5 bc LDA &bc ; chunk_type &03a0 0a ASL A &03a1 0a ASL A &03a2 69 28 ADC #&28 ; &1e28 = font_chunks_sprite_data &03a4 85 54 STA &54 ; font_chunks_sprite_data_low &03a6 a9 1e LDA #&1e &03a8 69 00 ADC #&00 &03aa 85 55 STA &55 ; font_chunks_sprite_data_high &03ac a5 50 LDA &50 ; chunk_x &03ae 29 01 AND #&01 &03b0 85 56 STA &56 ; shift &03b2 a5 53 LDA &53 ; screen_address_high &03b4 20 4b 06 JSR &064b ; keep_screen_high_within_screen_memory &03b7 85 53 STA &53 ; screen_address_high &03b9 a0 03 LDY #&03 ; plot_chunk_of_character_loop &03bb b1 54 LDA (&54),Y ; font_chunks_sprite_data &03bd a6 56 LDX &56 ; shift &03bf f0 02 BEQ &03c3 ; skip_shift &03c1 4a LSR A # Shift right two pixels &03c2 4a LSR A ; skip_shift &03c3 11 52 ORA (&52),Y ; screen_address &03c5 91 52 STA (&52),Y ; screen_address &03c7 88 DEY &03c8 10 f1 BPL &03bb ; plot_chunk_of_character_loop ; leave_after_restoring_registers &03ca a6 50 LDX &50 ; chunk_x &03cc a4 51 LDY &51 ; chunk_y &03ce 60 RTS ; get_next_chunk_of_font_data # Get next five bits of font data &03cf a6 bf LDX &bf ; character_data_byte_offset &03d1 bd 00 01 LDA &0100,X ; character_chunks_data &03d4 85 bc STA &bc ; chunk_type &03d6 bd 01 01 LDA &0101,X ; character_chunks_data + 1 &03d9 85 bd STA &bd ; tmp &03db a6 be LDX &be ; character_data_bits_offset &03dd ca DEX ; shift_bits_loop &03de 30 07 BMI &03e7 ; skip_shifting_bits &03e0 46 bd LSR &bd ; tmp &03e2 66 bc ROR &bc ; chunk_type &03e4 4c dd 03 JMP &03dd ; shift_bits_loop ; skip_shifting_bits &03e7 a5 bc LDA &bc ; chunk_type &03e9 29 1f AND #&1f &03eb 85 bc STA &bc ; chunk_type &03ed a5 be LDA &be ; character_data_bits_offset &03ef 18 CLC &03f0 69 05 ADC #&05 &03f2 c9 08 CMP #&08 &03f4 90 04 BCC &03fa ; not_next_byte &03f6 e9 08 SBC #&08 &03f8 e6 bf INC &bf ; character_data_byte_offset ; not_next_byte &03fa 85 be STA &be ; character_data_bits_offset &03fc 60 RTS ; palette_data &03fd 07 17 47 57 # Set colour 0 to black &0401 23 33 63 73 # Set colour 1 to blue &0405 82 92 c2 d2 # Set colour 2 to magenta &0409 a4 b4 e4 f4 # Set colour 3 to yellow ; initialise_screen &040d 20 09 07 JSR &0709 ; hide_screen &0410 a2 0f LDX #&0f ; write_palette_data_loop &0412 bd fd 03 LDA &03fd,X ; palette_data &0415 8d 21 fe STA &fe21 ; video ULA palette register &0418 ca DEX &0419 10 f7 BPL &0412 ; write_palette_data_loop &041b 20 98 07 JSR &0798 ; initialise_sound &041e a0 00 LDY #&00 &0420 84 a0 STY &a0 ; screen_start_address_low &0422 84 a2 STY &a2 ; crtc_start_address_low &0424 84 02 STY &02 ; wipe_address_low &0426 a2 0d LDX #&0d ; R13: Displayed screen start address register (low) &0428 98 TYA &0429 20 1c 07 JSR &071c ; set_video_register &042c a2 0c LDX #&0c ; R12: Displayed screen start address register (high) &042e a9 0b LDA #&0b # Set screen start address to &5800 &0430 85 a3 STA &a3 ; crtc_start_address_high &0432 20 1c 07 JSR &071c ; set_video_register &0435 a9 58 LDA #&58 &0437 85 a1 STA &a1 ; screen_start_address_high &0439 85 03 STA &03 ; wipe_address_high &043b 98 TYA ; wipe_screen_loop # Wipe &5800 - &7fff (screen memory) &043c 91 02 STA (&02),Y ; wipe_address &043e c8 INY &043f d0 fb BNE &043c ; wipe_screen_loop &0441 e6 03 INC &03 &0443 10 f7 BPL &043c ; wipe_screen_loop &0445 a2 00 LDX #&00 &0447 a0 00 LDY #&00 &0449 4c 15 06 JMP &0615 ; calculate_text_screen_address_from_X_Y ; is_vsync_interrupt &044c a9 ff LDA #&ff # Clear all interrupts &044e 8d 4d fe STA &fe4d ; System VIA interrupt flag register &0451 a9 46 LDA #&46 &0453 8d 44 fe STA &fe44 ; System VIA timer 1 counter LSB &0456 8d 45 fe STA &fe45 ; System VIA timer 1 counter MSB &0459 a5 fc LDA &fc ; irq_accumulator &045b 40 RTI ; irq1_handler &045c ad 4d fe LDA &fe4d ; System VIA interrupt flag register &045f 29 02 AND #&02 # &02 set if interrupt caused by a v-sync &0461 d0 e9 BNE &044c ; is_vsync_interrupt &0463 86 8d STX &8d ; tmp_x &0465 84 8e STY &8e ; tmp_y &0467 e6 ff INC &ff ; frame_counter &0469 a5 ad LDA &ad ; rnd_state &046b 18 CLC &046c 69 25 ADC #&25 &046e 85 ad STA &ad ; rnd_state &0470 20 42 05 JSR &0542 ; update_sounds &0473 a9 ff LDA #&ff # Set all bits to output &0475 8d 43 fe STA &fe43 ; System VIA data direction register A &0478 a9 0b LDA #&0b # Enable keyboard auto scan &047a 8d 40 fe STA &fe40 ; System VIA port B input/output register &047d 24 e2 BIT &e2 ; sound_muted # Non-zero if sound muted &047f 30 3f BMI &04c0 ; skip_updating_sounds &0481 a5 1d LDA &1d ; channels_volume_byte_to_write &0483 f0 08 BEQ &048d ; skip_channel_zero &0485 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &0488 a5 1e LDA &1e ; channels_frequency_low_byte_to_write &048a 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip ; skip_channel_zero &048d a5 2d LDA &2d ; channels_volume_byte_to_write + &10 &048f f0 0d BEQ &049e ; skip_channel_one &0491 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &0494 a5 2e LDA &2e ; channels_frequency_low_byte_to_write + &10 &0496 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &0499 a5 2f LDA &2f ; channels_frequency_high_byte_to_write + &10 &049b 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip ; skip_channel_one &049e a5 3d LDA &3d ; channels_volume_byte_to_write + &20 &04a0 f0 0d BEQ &04af ; skip_channel_two &04a2 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &04a5 a5 3e LDA &3e ; channels_frequency_low_byte_to_write + &20 &04a7 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &04aa a5 3f LDA &3f ; channels_frequency_high_byte_to_write + &20 &04ac 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip ; skip_channel_two &04af a5 4d LDA &4d ; channels_volume_byte_to_write + &30 &04b1 f0 0d BEQ &04c0 ; skip_channel_three &04b3 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &04b6 a5 4e LDA &4e ; channels_frequency_low_byte_to_write + &30 &04b8 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &04bb a5 4f LDA &4f ; channels_frequency_high_byte_to_write + &30 &04bd 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip ; skip_channel_three ; skip_updating_sounds &04c0 a5 61 LDA &61 ; timeout_low &04c2 05 62 ORA &62 ; timeout_high &04c4 f0 06 BEQ &04cc ; skip_timeout &04c6 e6 61 INC &61 ; timeout_low &04c8 d0 02 BNE &04cc ; skip_timeout &04ca e6 62 INC &62 ; timeout_high ; skip_timeout &04cc a9 03 LDA #&03 # Disable keyboard auto scan &04ce 8d 40 fe STA &fe40 ; System VIA port B input/output register &04d1 a9 7f LDA #&7f # Set top bit as input, low seven bits as output &04d3 8d 43 fe STA &fe43 ; System VIA data direction register A &04d6 a9 ff LDA #&ff # Clear all interrupts &04d8 8d 4d fe STA &fe4d ; System VIA interrupt flag register &04db a6 8d LDX &8d ; tmp_x &04dd a4 8e LDY &8e ; tmp_y &04df a5 fc LDA &fc ; irq_accumulator &04e1 40 RTI ; write_byte_to_sound_chip &04e2 8d 4f fe STA &fe4f ; System VIA input/output register A &04e5 a9 00 LDA #&00 # Set sound chip write pin low &04e7 8d 40 fe STA &fe40 ; System VIA port B input/output register &04ea a2 04 LDX #&04 ; delay_loop &04ec ca DEX &04ed d0 fd BNE &04ec ; delay_loop &04ef a9 08 LDA #&08 # Set sound chip write pin high &04f1 8d 40 fe STA &fe40 ; System VIA port B input/output register &04f4 60 RTS ; play_sound_on_channel_one &04f5 a9 01 LDA #&01 ; play_sound # Called with A = channel, XY = frequency &04f7 85 72 STA &72 ; channel &04f9 68 PLA # Parameters for sound follow call &04fa 85 70 STA &70 ; parameters_address_low &04fc 68 PLA &04fd 85 71 STA &71 ; parameters_address_high &04ff 08 PHP ; processor status &0500 86 73 STX &73 ; frequency_low &0502 84 74 STY &74 ; frequency_high &0504 a5 72 LDA &72 ; channel &0506 0a ASL A &0507 0a ASL A &0508 0a ASL A &0509 0a ASL A &050a 48 PHA ; channel * 16 &050b aa TAX &050c a0 01 LDY #&01 &050e 78 SEI ; copy_sound_parameters_loop &050f b1 70 LDA (&70),Y ; parameters_address &0511 95 12 STA &12,X ; channels_parameters &0513 c8 INY &0514 e8 INX &0515 c0 09 CPY #&09 &0517 d0 f6 BNE &050f ; copy_sound_parameters_loop &0519 68 PLA ; channel * 16 &051a aa TAX &051b a5 73 LDA &73 ; frequency_low &051d 95 10 STA &10,X ; channels_frequency_low &051f a5 74 LDA &74 ; frequency_high &0521 95 11 STA &11,X ; channels_frequency_high &0523 94 1a STY &1a,X ; channels_active # Set to non-zero to indicate channel active &0525 b5 14 LDA &14,X ; channels_volume_cooldown &0527 95 1b STA &1b,X ; channels_volume_maximum_cooldown &0529 b5 18 LDA &18,X ; channels_frequency_cooldown &052b 95 1c STA &1c,X ; channels_frequency_maximum_cooldown &052d a5 70 LDA &70 ; parameters_address_low &052f 18 CLC &0530 69 09 ADC #&09 # Return after eight bytes of parameters &0532 85 70 STA &70 ; parameters_address_low &0534 a5 71 LDA &71 ; parameters_address_high &0536 69 00 ADC #&00 &0538 85 71 STA &71 ; parameters_address_high &053a a9 01 LDA #&01 &053c 95 14 STA &14,X ; channels_volume_cooldown &053e 28 PLP ; processor status &053f 6c 70 00 JMP (&0070) ; parameters_address # Continue execution after parameters ; update_sounds &0542 a2 00 LDX #&00 &0544 86 16 STX &16 ; channels_updated # Set to zero to indicate channel not updated &0546 a9 e0 LDA #&e0 ; channel 0 control &0548 20 63 05 JSR &0563 ; update_channel &054b a5 16 LDA &16 ; channels_updated # Non-zero if channel was updated &054d d0 02 BNE &0551 ; still_active &054f 85 1d STA &1d ; channels_volume_byte_to_write # Set to zero to suppress sending bytes for channel zero ; still_active &0551 a2 10 LDX #&10 &0553 a9 c0 LDA #&c0 ; channel 1 frequency &0555 20 63 05 JSR &0563 ; update_channel &0558 a2 20 LDX #&20 &055a a9 a0 LDA #&a0 ; channel 2 frequency &055c 20 63 05 JSR &0563 ; update_channel &055f a2 30 LDX #&30 &0561 a9 80 LDA #&80 ; channel 3 frequency ; update_channel &0563 85 9f STA &9f ; channel_register &0565 b5 1a LDA &1a,X ; channels_active # Zero if channel not active &0567 f0 68 BEQ &05d1 ; leave &0569 b5 15 LDA &15,X ; channels_volume_steps_remaining &056b 15 19 ORA &19,X ; channels_frequency_steps_remaining &056d d0 08 BNE &0577 ; not_end_of_sound &056f 95 1a STA &1a,X ; channels_active # Set to zero to indicate channel no longer active &0571 a9 0f LDA #&0f &0573 95 12 STA &12,X ; channels_volume &0575 d0 36 BNE &05ad ; skip_changing_frequency # Always branches ; not_end_of_sound &0577 b5 15 LDA &15,X ; channels_volume_steps_remaining &0579 f0 15 BEQ &0590 ; skip_changing_volume &057b d6 14 DEC &14,X ; channels_volume_cooldown &057d d0 11 BNE &0590 ; skip_changing_volume &057f e6 16 INC &16 ; channels_updated # Set to non-zero to indicate channel updated &0581 b5 1b LDA &1b,X ; channels_volume_maximum_cooldown &0583 95 14 STA &14,X ; channels_volume_cooldown &0585 d6 15 DEC &15,X ; channels_volume_steps_remaining &0587 b5 12 LDA &12,X ; channels_volume &0589 18 CLC &058a 75 13 ADC &13,X ; channels_volume_delta &058c 29 0f AND #&0f &058e 95 12 STA &12,X ; channels_volume ; skip_changing_volume &0590 b5 19 LDA &19,X ; channels_frequency_steps_remaining &0592 f0 19 BEQ &05ad ; skip_changing_frequency &0594 d6 18 DEC &18,X ; channels_frequency_cooldown &0596 d0 15 BNE &05ad ; skip_changing_frequency &0598 b5 1c LDA &1c,X ; channels_frequency_maximum_cooldown &059a 95 18 STA &18,X ; channels_frequency_cooldown &059c d6 19 DEC &19,X ; channels_frequency_steps_remaining &059e b5 10 LDA &10,X ; channels_frequency_low &05a0 18 CLC &05a1 75 16 ADC &16,X ; channels_pitch_delta_low &05a3 95 10 STA &10,X ; channels_frequency_low &05a5 b5 11 LDA &11,X ; channels_frequency_high &05a7 75 17 ADC &17,X ; channels_pitch_delta_high &05a9 29 03 AND #&03 &05ab 95 11 STA &11,X ; channels_frequency_high ; skip_changing_frequency &05ad a5 9f LDA &9f ; channel_register &05af 09 10 ORA #&10 # Use channel volume &05b1 15 12 ORA &12,X ; channels_volume &05b3 95 1d STA &1d,X ; channels_volume_byte_to_write &05b5 b5 10 LDA &10,X ; channels_frequency_low &05b7 29 0f AND #&0f &05b9 05 9f ORA &9f ; channel_register &05bb 95 1e STA &1e,X ; channels_frequency_low_byte_to_write &05bd b5 10 LDA &10,X ; channels_frequency_low &05bf 85 e4 STA &e4 ; frequency_low &05c1 b5 11 LDA &11,X ; channels_frequency_high &05c3 06 e4 ASL &e4 ; frequency_low &05c5 2a ROL A &05c6 06 e4 ASL &e4 ; frequency_low &05c8 2a ROL A &05c9 06 e4 ASL &e4 ; frequency_low &05cb 2a ROL A &05cc 06 e4 ASL &e4 ; frequency_low &05ce 2a ROL A &05cf 95 1f STA &1f,X ; channels_frequency_high_byte_to_write ; leave &05d1 60 RTS ; plot_text &05d2 68 PLA # Text follows call &05d3 85 00 STA &00 ; text_address_low &05d5 68 PLA &05d6 85 01 STA &01 ; text_address_high &05d8 a0 00 LDY #&00 ; plot_text_loop &05da 20 fd 05 JSR &05fd ; get_next_byte_of_text &05dd f0 27 BEQ &0606 ; end_of_text # &00 indicates end of text &05df c9 40 CMP #&40 ; "@" # &40 ("@") sets text position &05e1 f0 0a BEQ &05ed ; set_text_position &05e3 c9 23 CMP #&23 ; "#" # &23 ("#") clears screen &05e5 f0 28 BEQ &060f ; to_initialise_screen &05e7 20 00 03 JSR &0300 ; plot_character &05ea 4c da 05 JMP &05da ; plot_text_loop ; set_text_position &05ed 20 fd 05 JSR &05fd ; get_next_byte_of_text &05f0 85 e0 STA &e0 ; text_x &05f2 20 fd 05 JSR &05fd ; get_next_byte_of_text &05f5 85 e1 STA &e1 ; text_y &05f7 20 19 06 JSR &0619 ; calculate_text_screen_address &05fa 4c da 05 JMP &05da ; plot_text_loop ; get_next_byte_of_text &05fd e6 00 INC &00 ; text_address_low &05ff d0 02 BNE &0603 ; skip_page &0601 e6 01 INC &01 ; text_address_high ; skip_page &0603 b1 00 LDA (&00),Y ; text_address &0605 60 RTS ; end_of_text &0606 e6 00 INC &00 ; text_address_low &0608 d0 02 BNE &060c ; skip_page &060a e6 01 INC &01 ; text_address_high ; skip_page &060c 6c 00 00 JMP (&0000) ; text_address # Continue execution after text ; to_initialise_screen &060f 20 0d 04 JSR &040d ; initialise_screen &0612 4c da 05 JMP &05da ; plot_text_loop ; calculate_text_screen_address_from_X_Y &0615 86 e0 STX &e0 ; text_x &0617 84 e1 STY &e1 ; text_y ; calculate_text_screen_address &0619 a5 e1 LDA &e1 ; text_y &061b 0a ASL A &061c aa TAX &061d bd 57 06 LDA &0657,X ; group_offsets_table &0620 85 da STA &da ; text_screen_address_low &0622 bd 58 06 LDA &0658,X ; group_offsets_table + 1 &0625 85 db STA &db ; text_screen_address_high &0627 a5 e0 LDA &e0 ; text_x &0629 0a ASL A &062a aa TAX &062b bd 97 06 LDA &0697,X ; column_offsets_table &062e 18 CLC &062f 65 da ADC &da ; text_screen_address_low &0631 85 da STA &da ; text_screen_address_low &0633 bd 98 06 LDA &0698,X ; column_offsets_table + 1 &0636 65 db ADC &db ; text_screen_address_high &0638 85 db STA &db ; text_screen_address_high &063a a5 da LDA &da ; text_screen_address_low &063c 18 CLC &063d 65 a0 ADC &a0 ; screen_start_address_low &063f 85 da STA &da ; text_screen_address_low &0641 a5 db LDA &db ; text_screen_address_high &0643 65 a1 ADC &a1 ; screen_start_address_high &0645 20 4b 06 JSR &064b ; keep_screen_high_within_screen_memory &0648 85 db STA &db ; text_screen_address_high &064a 60 RTS ; keep_screen_high_within_screen_memory &064b 10 03 BPL &0650 ; skip_overflow &064d e9 27 SBC #&27 &064f 60 RTS ; skip_overflow &0650 c9 58 CMP #&58 &0652 b0 02 BCS &0656 ; skip_underflow &0654 69 28 ADC #&28 ; skip_underflow &0656 60 RTS ; group_offsets_table &0657 00 00 &0659 40 01 &065b 80 02 &065d c0 03 &065f 00 05 &0661 40 06 &0663 80 07 &0665 c0 08 &0667 00 0a &0669 40 0b &066b 80 0c &066d c0 0d &066f 00 0f &0671 40 10 &0673 80 11 &0675 c0 12 &0677 00 14 &0679 40 15 &067b 80 16 &067d c0 17 &067f 00 19 &0681 40 1a &0683 80 1b &0685 c0 1c &0687 00 1e &0689 40 1f &068b 80 20 &068d c0 21 &068f 00 23 &0691 40 24 &0693 80 25 &0695 c0 26 ; column_offsets_table &0697 00 00 &0699 08 00 &069b 10 00 &069d 18 00 &069f 20 00 &06a1 28 00 &06a3 30 00 &06a5 38 00 &06a7 40 00 &06a9 48 00 &06ab 50 00 &06ad 58 00 &06af 60 00 &06b1 68 00 &06b3 70 00 &06b5 78 00 &06b7 80 00 &06b9 88 00 &06bb 90 00 &06bd 98 00 &06bf a0 00 &06c1 a8 00 &06c3 b0 00 &06c5 b8 00 &06c7 c0 00 &06c9 c8 00 &06cb d0 00 &06cd d8 00 &06cf e0 00 &06d1 e8 00 &06d3 f0 00 &06d5 f8 00 &06d7 00 01 &06d9 08 01 &06db 10 01 &06dd 18 01 &06df 20 01 &06e1 28 01 &06e3 30 01 &06e5 38 01 ; set_suppress_space &06e7 85 ac STA &ac ; suppress_space &06e9 60 RTS ; check_for_space_pressed &06ea a9 62 LDA #&62 ; SPACE &06ec 20 fc 06 JSR &06fc ; check_for_keypress &06ef 29 80 AND #&80 &06f1 10 f4 BPL &06e7 ; set_suppress_space &06f3 a5 ac LDA &ac ; suppress_space # Non-zero to suppress SPACE &06f5 d0 f0 BNE &06e7 ; set_suppress_space &06f7 e6 ac INC &ac ; suppress_space # Set to non-zero to ignore SPACE subsequently &06f9 a9 ff LDA #&ff # Leave with negative to indicate SPACE was pressed &06fb 60 RTS ; check_for_keypress &06fc 78 SEI &06fd 8d 4f fe STA &fe4f ; System VIA input/output register A &0700 ad 4f fe LDA &fe4f ; System VIA input/output register A &0703 58 CLI &0704 60 RTS ; unhide_screen &0705 a9 28 LDA #&28 &0707 d0 02 BNE &070b ; set_number_of_characters_per_line # Always branches ; hide_screen &0709 a9 00 LDA #&00 ; set_number_of_characters_per_line &070b 48 PHA ; characters &070c 20 c4 09 JSR &09c4 ; wait_for_vsync &070f a9 ff LDA #&ff &0711 8d 45 fe STA &fe45 ; System VIA timer 1 counter MSB ; wait_for_timer &0714 ad 45 fe LDA &fe45 ; System VIA timer 1 counter MSB &0717 30 fb BMI &0714 ; wait_for_timer &0719 68 PLA ; characters &071a a2 01 LDX #&01 ; R1: Number of characters per line ; set_video_register &071c 8e 00 fe STX &fe00 ; video register number &071f 8d 01 fe STA &fe01 ; video register value &0722 60 RTS ; play_level_completion_sound &0723 85 02 STA &02 ; maximum_frequency_high &0725 20 05 07 JSR &0705 ; unhide_screen &0728 24 e2 BIT &e2 ; sound_muted # Non-zero if sound muted &072a 10 03 BPL &072f ; not_muted &072c 4c a8 09 JMP &09a8 ; wait_for_80_or_space ; not_muted &072f 78 SEI &0730 a9 0b LDA #&0b # Enable keyboard auto scan &0732 8d 40 fe STA &fe40 ; System VIA port B input/output register &0735 a9 ff LDA #&ff # Set all bits to output &0737 8d 43 fe STA &fe43 ; System VIA data direction register A &073a a9 00 LDA #&00 &073c 85 00 STA &00 ; frequency_low &073e 85 01 STA &01 ; frequency_high ; play_level_completion_sound_loop &0740 a9 80 LDA #&80 # Set channel 3 frequency &0742 05 00 ORA &00 ; frequency_low &0744 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &0747 a5 01 LDA &01 ; frequency_high &0749 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &074c a9 94 LDA #&94 # Set channel 3 volume to 11 &074e 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &0751 a9 a0 LDA #&a0 # Set channel 2 frequency &0753 05 00 ORA &00 ; frequency_low &0755 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &0758 a5 01 LDA &01 ; frequency_high &075a 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &075d a9 b4 LDA #&b4 # Set channel 2 volume to 11 &075f 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &0762 a9 c0 LDA #&c0 # Set channel 1 frequency &0764 05 00 ORA &00 ; frequency_low &0766 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &0769 a5 01 LDA &01 ; frequency_high &076b 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &076e a9 d4 LDA #&d # Set channel 1 volume to 11 &0770 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &0773 e6 00 INC &00 ; frequency_low &0775 a5 00 LDA &00 ; frequency_low &0777 c9 10 CMP #&10 &0779 d0 c5 BNE &0740 ; play_level_completion_sound_loop &077b a9 00 LDA #&00 &077d 85 00 STA &00 ; frequency_low &077f e6 01 INC &01 ; frequency_high &0781 a5 01 LDA &01 ; frequency_high &0783 c5 02 CMP &02 ; maximum_frequency_high &0785 d0 b9 BNE &0740 ; play_level_completion_sound_loop &0787 a9 00 LDA #&00 &0789 85 01 STA &01 ; frequency_high &078b 88 DEY &078c 10 b2 BPL &0740 ; play_level_completion_sound_loop &078e a9 7f LDA #&7f # Set top bit as input, low seven bits as output &0790 8d 43 fe STA &fe43 ; System VIA data direction register A &0793 a9 03 LDA #&03 # Disable keyboard auto scan &0795 8d 40 fe STA &fe40 ; System VIA port B input/output register ; initialise_sound &0798 78 SEI &0799 a9 00 LDA #&00 &079b a2 3f LDX #&3f ; initialise_channels_loop &079d 95 10 STA &10,X ; channels_data # Wipe &0010 - &004f &079f ca DEX &07a0 10 fb BPL &079d ; initialise_channels_loop &07a2 a9 0b LDA #&0b # Enable keyboard auto scan &07a4 8d 40 fe STA &fe40 ; System VIA port B input/output register &07a7 a9 ff LDA #&ff # Set all bits to output &07a9 8d 43 fe STA &fe43 ; System VIA data direction register A &07ac a9 9f LDA #&9f # Set channel 3 volume to 0 (silence) &07ae 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &07b1 a9 bf LDA #&bf # Set channel 2 volume to 0 (silence) &07b3 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &07b6 a9 df LDA #&df # Set channel 1 volume to 0 (silence) &07b8 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &07bb a9 ff LDA #&ff # Set channel 0 volume to 0 (silence) &07bd 20 e2 04 JSR &04e2 ; write_byte_to_sound_chip &07c0 a9 7f LDA #&7f # Set top bit as input, low seven bits as output &07c2 8d 43 fe STA &fe43 ; System VIA data direction register A &07c5 a9 03 LDA #&03 # Disable keyboard auto scan &07c7 8d 40 fe STA &fe40 ; System VIA port B input/output register &07ca 58 CLI &07cb 60 RTS ; convert_number_to_digits &07cc 86 fa STX &fa ; number_low &07ce 84 fb STY &fb ; number_high &07d0 a9 30 LDA #&30 ; "0" &07d2 a2 04 LDX #&04 ; initialise_digits_loop &07d4 95 f5 STA &f5,X ; digits &07d6 ca DEX &07d7 10 fb BPL &07d4 ; initialise_digits_loop &07d9 e8 INX ; 0 ; convert_number_to_digits_digit_loop &07da a0 10 LDY #&10 &07dc a9 00 LDA #&00 ; convert_number_to_digits_count_loop &07de 06 fa ASL &fa ; number_low &07e0 26 fb ROL &fb ; number_high &07e2 2a ROL A &07e3 c9 0a CMP #&0a &07e5 90 04 BCC &07eb ; skip_overflow &07e7 e9 0a SBC #&0a &07e9 e6 fa INC &fa ; number_low ; skip_overflow &07eb 88 DEY &07ec d0 f0 BNE &07de ; convert_number_to_digits_count_loop &07ee 18 CLC &07ef 69 30 ADC #&30 ; "0" &07f1 95 f5 STA &f5,X ; digits &07f3 e8 INX &07f4 a5 fa LDA &fa ; number_low &07f6 05 fb ORA &fb ; number_high &07f8 d0 e0 BNE &07da ; convert_number_to_digits_digit_loop &07fa 60 RTS ; plot_number # Called with A = number of digits &07fb 48 PHA ; number of digits &07fc 20 cc 07 JSR &07cc ; convert_number_to_digits &07ff 68 PLA ; number of digits &0800 aa TAX ; plot_number_loop &0801 b5 f5 LDA &f5,X ; digits &0803 20 00 03 JSR &0300 ; plot_character &0806 ca DEX &0807 10 f8 BPL &0801 ; plot_number_loop &0809 60 RTS ; update_tune_channel # Called with X = channel, Y = channel offset &080a 86 0b STX &0b ; channel &080c b9 29 00 LDA &0029,Y ; channels_frequency_steps_remaining + &10 &080f d0 3d BNE &084e ; leave &0811 8a TXA &0812 0a ASL A &0813 aa TAX &0814 b5 05 LDA &05,X ; tune_address_low &0816 85 00 STA &00 ; note_address_low &0818 b5 06 LDA &06,X ; tune_address_high &081a 85 01 STA &01 ; note_address_high &081c b5 05 LDA &05,X ; tune_address_low &081e 18 CLC &081f 69 02 ADC #&02 &0821 95 05 STA &05,X ; tune_address_low &0823 b5 06 LDA &06,X ; tune_address_high &0825 69 00 ADC #&00 &0827 95 06 STA &06,X ; tune_address_high &0829 a0 01 LDY #&01 &082b b1 00 LDA (&00),Y ; note_address # Second byte of tune data sets duration &082d 8d 4d 08 STA &084d ; tune_sound_block + 7 (pitch steps) &0830 88 DEY ; 0 &0831 b1 00 LDA (&00),Y ; note_address # First byte of tune data sets pitch &0833 20 47 0a JSR &0a47 ; convert_pitch_to_frequency &0836 8a TXA &0837 18 CLC &0838 65 0b ADC &0b ; channel &083a aa TAX &083b 98 TYA &083c 69 00 ADC #&00 &083e a8 TAY &083f e6 0b INC &0b ; channel &0841 a5 0b LDA &0b ; channel &0843 20 f7 04 JSR &04f7 ; play_sound # Play sound for tune ; tune_sound_block ; v vd vc vs pd pc ps &0846 04 01 04 0b 00 00 01 00 ; leave &084e 60 RTS ; letter_keycodes &084f 41 ; A &0850 64 ; B &0851 52 ; C &0852 32 ; D &0853 22 ; E &0854 43 ; F &0855 53 ; G &0856 54 ; H &0857 25 ; I &0858 45 ; J &0859 46 ; K &085a 56 ; L &085b 65 ; M &085c 55 ; N &085d 36 ; O &085e 37 ; P ; title_screen &085f a2 ff LDX #&ff &0861 86 bb STX &bb ; levels_jumped # Set to non-zero to indicate levels were jumped &0863 86 88 STX &88 ; demo_mode # Set to negative to indicate demo mode &0865 9a TXS &0866 58 CLI &0867 20 8a 0a JSR &0a8a ; plot_score # Plot score &086a 20 d2 05 JSR &05d2 ; plot_text &086d 40 06 00 ; move to (&06, &00) &0870 53 59 4e 43 52 4f 4e ; "SYNCRON" &0877 40 02 1c ; move to (&02, &1c) &087a 48 49 54 20 53 50 41 43 45 ; "HIT SPACE" &0883 40 04 13 ; move to (&04, &13) &0886 48 49 20 53 43 4f 52 45 ; "HI SCORE" &088e 40 08 17 ; move to (&08, &17) &0891 00 ; end of text &0892 a6 ae LDX &ae ; high_score_low &0894 a4 af LDY &af ; high_score_high &0896 a9 04 LDA #&04 &0898 20 fb 07 JSR &07fb ; plot_number # Plot high score &089b a9 30 LDA #&30 ; "0" &089d 20 00 03 JSR &0300 ; plot_character &08a0 20 05 07 JSR &0705 ; unhide_screen &08a3 a9 80 LDA #&80 ; &2480 = tune_channel_1_data &08a5 85 05 STA &05 ; tune_address_low &08a7 a9 24 LDA #&24 &08a9 85 06 STA &06 ; tune_address_high &08ab a9 ae LDA #&ae ; &25ae = tune_channel_2_data &08ad 85 07 STA &07 ; tune_address_low + 2 &08af a9 25 LDA #&25 &08b1 85 08 STA &08 ; tune_address_high + 2 ; title_screen_loop &08b3 a9 47 LDA #&47 ; \ &08b5 20 fc 06 JSR &06fc ; check_for_keypress &08b8 30 22 BMI &08dc ; start_demo &08ba 20 c4 09 JSR &09c4 ; wait_for_vsync &08bd a2 00 LDX #&00 # Update channel 1 &08bf a0 00 LDY #&00 &08c1 20 0a 08 JSR &080a ; update_tune_channel &08c4 a2 01 LDX #&01 # Update channel 2 &08c6 a0 10 LDY #&10 &08c8 20 0a 08 JSR &080a ; update_tune_channel &08cb a5 07 LDA &07 ; tune_address_low + 2 &08cd c9 fe CMP #&fe ; &26fe = end_of_tune_data &08cf d0 e2 BNE &08b3 ; title_screen_loop &08d1 a5 08 LDA &08 ; tune_address_high + 2 &08d3 c9 26 CMP #&26 &08d5 d0 dc BNE &08b3 ; title_screen_loop &08d7 a0 32 LDY #&32 &08d9 20 aa 09 JSR &09aa ; wait_for_Y_or_space ; start_demo &08dc 20 d2 05 JSR &05d2 ; plot_text &08df 23 ; clear screen &08e0 40 02 0e ; move to (&02, &0e) &08e3 41 55 54 4f 20 44 45 4d 4f ; "AUTO DEMO" &08ec 00 ; end of text &08ed 20 a8 09 JSR &09a8 ; wait_for_80_or_space &08f0 20 36 0e JSR &0e36 ; play_game &08f3 4c 5f 08 JMP &085f ; title_screen ; level_select_screen &08f6 a5 ab LDA &ab ; maximum_level_reached &08f8 18 CLC &08f9 69 41 ADC #&41 ; "A" &08fb 8d 53 09 STA &0953 ; level_select_text + &52 &08fe 20 d2 05 JSR &05d2 ; plot_text ; level_select_text &0901 23 ; clear screen &0902 40 02 00 ; move to (&02, &00) &0905 48 49 54 20 53 50 41 43 45 ; "HIT SPACE &090e 40 06 04 ; move to (&06, &04) &0911 54 4f 20 50 4c 41 59 ; "TO PLAY &0918 40 00 08 ; move to (&00, &08) &091b 4f 52 20 54 48 45 20 4b 45 59 ; "OR THE KEY &0925 40 00 0c ; move to (&00, &0c) &0928 49 4e 44 49 43 41 54 49 4e 47 ; "INDICATING &0932 40 02 10 ; move to (&02, &10) &0935 54 48 45 20 53 54 41 52 54 ; "THE START &093e 40 08 14 ; move to (&08, &14) &0941 53 43 52 45 45 4e ; "SCREEN" &0947 40 00 1c ; move to (&00, &1c) &094a 4c 45 56 45 4c 53 20 41 5b 41 ; "LEVELS A[A" # Last byte modified &0954 29 ; ")" # Not plotted &0955 00 ; end of text &0956 20 05 07 JSR &0705 ; unhide_screen ; wait_for_letter_or_space &0959 a6 ab LDX &ab ; maximum_level_reached ; check_for_letters_loop &095b bd 4f 08 LDA &084f,X ; letter_keycodes &095e 20 fc 06 JSR &06fc ; check_for_keypress &0961 30 0f BMI &0972 ; set_level &0963 ca DEX &0964 10 f5 BPL &095b ; check_for_letters_loop &0966 20 e9 09 JSR &09e9 ; check_for_escape &0969 20 ea 06 JSR &06ea ; check_for_space_pressed &096c 10 eb BPL &0959 ; wait_for_letter_or_space &096e a2 00 LDX #&00 &0970 e6 bb INC &bb ; levels_jumped # Set to zero to indicate no levels jumped ; set_level &0972 86 60 STX &60 ; level &0974 a2 ff LDX #&ff &0976 9a TXS &0977 a9 00 LDA #&00 &0979 85 88 STA &88 ; demo_mode # Set to positive to indicate not demo mode &097b 20 36 0e JSR &0e36 ; play_game &097e 20 d2 05 JSR &05d2 ; plot_text &0981 23 ; clear screen &0982 40 02 0e ; move to (&02, &0e) &0985 47 41 4d 45 20 4f 56 45 52 ; "GAME OVER" &098e 00 ; end of text &098f 20 a8 09 JSR &09a8 ; wait_for_80_or_space &0992 a5 58 LDA &58 ; score_low &0994 38 SEC &0995 e5 ae SBC &ae ; high_score_low &0997 a5 59 LDA &59 ; score_high &0999 e5 af SBC &af ; high_score_high &099b 90 08 BCC &09a5 ; not_new_high_score &099d a5 58 LDA &58 ; score_low &099f 85 ae STA &ae ; high_score_low &09a1 a5 59 LDA &59 ; score_high &09a3 85 af STA &af ; high_score_high ; not_new_high_score &09a5 4c 5f 08 JMP &085f ; title_screen ; wait_for_80_or_space &09a8 a0 80 LDY #&80 ; wait_for_Y_or_space &09aa 20 05 07 JSR &0705 ; unhide_screen &09ad a5 6e LDA &6e ; suppress_player_input # Non-zero if player input suppressed &09af d0 03 BNE &09b4 ; skip_checking_for_space &09b1 20 b8 09 JSR &09b8 ; leave_parent_function_if_space_pressed ; skip_checking_for_space &09b4 88 DEY &09b5 d0 f3 BNE &09aa ; wait_for_Y_or_space &09b7 60 RTS ; leave_parent_function_if_space_pressed &09b8 a5 88 LDA &88 ; demo_mode # Negative if demo mode &09ba 30 07 BMI &09c3 ; leave &09bc 20 ea 06 JSR &06ea ; check_for_space_pressed &09bf 10 02 BPL &09c3 ; leave &09c1 68 PLA # Leave parent function on next return &09c2 68 PLA ; leave &09c3 60 RTS ; wait_for_vsync &09c4 a6 ff LDX &ff ; frame_counter ; wait_for_vsync_loop &09c6 8a TXA &09c7 48 PHA ; frame_counter &09c8 20 d2 09 JSR &09d2 ; check_for_game_or_demo_keys &09cb 68 PLA ; frame_counter &09cc aa TAX &09cd e4 ff CPX &ff ; frame_counter &09cf f0 f5 BEQ &09c6 ; wait_for_vsync_loop &09d1 60 RTS ; check_for_game_or_demo_keys &09d2 20 17 0a JSR &0a17 ; check_for_sound_keypresses &09d5 a5 88 LDA &88 ; demo_mode # Negative if demo mode &09d7 f0 09 BEQ &09e2 ; check_for_pause_and_escape &09d9 20 ea 06 JSR &06ea ; check_for_space_pressed &09dc 30 01 BMI &09df ; to_level_select_screen &09de 60 RTS ; to_level_select_screen &09df 4c f6 08 JMP &08f6 ; level_select_screen ; check_for_pause_and_escape &09e2 a9 69 LDA #&69 ; COPY &09e4 20 fc 06 JSR &06fc ; check_for_keypress &09e7 30 0b BMI &09f4 ; pause_game ; check_for_escape &09e9 a9 70 LDA #&70 ; ESCAPE &09eb 20 fc 06 JSR &06fc ; check_for_keypress &09ee 30 01 BMI &09f1 ; to_title_screen &09f0 60 RTS ; to_title_screen &09f1 4c 5f 08 JMP &085f ; title_screen ; pause_game &09f4 a9 80 LDA #&80 # Enable cassette motor &09f6 a2 06 LDX #&06 # Enable Caps Lock LED &09f8 a0 07 LDY #&07 # Enable Shift Lock LED &09fa 20 0d 0a JSR &0a0d ; set_leds_and_motor_state &09fd 20 17 0a JSR &0a17 ; check_for_sound_keypresses &0a00 a9 59 LDA #&59 ; DELETE &0a02 20 fc 06 JSR &06fc ; check_for_keypress &0a05 10 ed BPL &09f4 ; pause_game &0a07 a9 00 LDA #&00 # Disable cassette motor &0a09 a2 0e LDX #&0e # Disable Caps Lock LED &0a0b a0 0f LDY #&0f # Disable Shift Lock LED ; set_leds_and_motor_state &0a0d 8d 10 fe STA &fe10 ; Serial ULA control register &0a10 8e 40 fe STX &fe40 ; System VIA port B input/output register &0a13 8c 40 fe STY &fe40 ; System VIA port B input/output register &0a16 60 RTS ; check_for_sound_keypresses &0a17 a9 10 LDA #&10 ; Q &0a19 20 fc 06 JSR &06fc ; check_for_keypress &0a1c 10 05 BPL &0a23 ; q_not_pressed &0a1e 85 e2 STA &e2 ; sound_muted # Set to non-zero to indicate sound muted &0a20 20 98 07 JSR &0798 ; initialise_sound ; q_not_pressed &0a23 a9 51 LDA #&51 ; S &0a25 20 fc 06 JSR &06fc ; check_for_keypress &0a28 10 04 BPL &0a2e ; s_not_pressed &0a2a a9 00 LDA #&00 &0a2c 85 e2 STA &e2 ; sound_muted # Set to zero to indicate sound not muted ; s_not_pressed &0a2e 60 RTS ; frequencies_low_table &0a2f f0 b7 82 4f 20 f3 c8 a0 7b 57 35 16 ; frequencies_high_table &0a3b 03 03 03 03 03 02 02 02 02 02 02 02 ; convert_pitch_to_frequency # Called with A = pitch &0a47 a2 00 LDX #&00 ; divide_by_forty_eight_loop &0a49 c9 30 CMP #&30 &0a4b 90 06 BCC &0a53 ; finished_division &0a4d e8 INX # X = pitch DIV 48 &0a4e e9 30 SBC #&30 &0a50 4c 49 0a JMP &0a49 ; divide_by_forty_eight_loop ; finished_division &0a53 4a LSR A &0a54 4a LSR A &0a55 a8 TAY # Y = (pitch MOD 48) / 4 &0a56 b9 2f 0a LDA &0a2f,Y ; frequencies_low_table &0a59 85 fb STA &fb ; frequency_low &0a5b b9 3b 0a LDA &0a3b,Y ; frequencies_high_table # Use Y to lookup frequency in table ; divide_by_power_of_two_loop &0a5e ca DEX &0a5f 30 06 BMI &0a67 ; leave_with_frequency &0a61 4a LSR A &0a62 66 fb ROR &fb ; frequency_low # frequency = frequency / 2 ^ (pitch DIV 48) &0a64 4c 5e 0a JMP &0a5e ; divide_by_power_of_two_loop ; leave_with_frequency &0a67 a6 fb LDX &fb ; frequency_low &0a69 a8 TAY # Leave with XY = frequency &0a6a 60 RTS ; status_screen &0a6b 20 a8 0a JSR &0aa8 ; plot_status &0a6e 20 d2 05 JSR &05d2 ; plot_text &0a71 40 06 00 ; move to (&06, &00) &0a74 43 55 52 52 45 4e 54 ; "CURRENT" &0a7b 40 08 04 ; move to (&08, &04) &0a7e 53 54 41 54 55 53 ; "STATUS" &0a84 00 ; end of text &0a85 a0 fa LDY #&fa &0a87 4c aa 09 JMP &09aa ; wait_for_Y_or_space ; plot_score &0a8a 20 d2 05 JSR &05d2 ; plot_text &0a8d 23 ; clear screen &0a8e 40 0a 0b ; move to (&0a, &0b) &0a91 53 43 4f 52 45 ; "SCORE" &0a96 40 08 0f ; move to (&08, &0f) &0a99 00 ; end of text &0a9a a6 58 LDX &58 ; score_low &0a9c a4 59 LDY &59 ; score_high &0a9e a9 04 LDA #&04 &0aa0 20 fb 07 JSR &07fb ; plot_number &0aa3 a9 30 LDA #&30 ; "0" &0aa5 4c 00 03 JMP &0300 ; plot_character ; plot_status &0aa8 20 8a 0a JSR &0a8a ; plot_score # Plot score &0aab 20 d2 05 JSR &05d2 ; plot_text &0aae 40 00 18 ; move to (&00, &18) &0ab1 43 52 41 46 54 20 4f 52 42 53 ; "CRAFT ORBS" &0abb 40 06 1c ; move to (&06, &1c) &0abe 00 ; end of text &0abf a6 5a LDX &5a ; lives &0ac1 20 cd 0a JSR &0acd ; plot_two_digit_number_from_X # Plot lives &0ac4 a2 1c LDX #&1c &0ac6 a0 1c LDY #&1c &0ac8 20 15 06 JSR &0615 ; calculate_text_screen_address_from_X_Y &0acb a6 5b LDX &5b ; orbs ; plot_two_digit_number_from_X &0acd a0 00 LDY #&00 &0acf a9 01 LDA #&01 &0ad1 4c fb 07 JMP &07fb ; plot_number # Plot orbs ; initialise_game &0ad4 a9 00 LDA #&00 &0ad6 85 6e STA &6e ; suppress_player_input # Set to zero to permit player input &0ad8 85 87 STA &87 ; round &0ada 85 58 STA &58 ; score_low &0adc 85 59 STA &59 ; score_high &0ade a9 03 LDA #&03 &0ae0 85 5a STA &5a ; lives &0ae2 a9 13 LDA #&13 &0ae4 85 c2 STA &c2 ; enemies_for_extra_life &0ae6 60 RTS ; set_initial_player_position &0ae7 a5 5d LDA &5d ; player_x &0ae9 85 a6 STA &a6 ; initial_player_x &0aeb a5 b8 LDA &b8 ; player_y_low &0aed 85 a7 STA &a7 ; initial_player_y_low &0aef a5 b9 LDA &b9 ; player_y_high &0af1 85 a8 STA &a8 ; initial_player_y_high &0af3 60 RTS ; initialise_level_data &0af4 a2 0b LDX #&0b # Player starts at x = &0b &0af6 a5 60 LDA &60 ; level &0af8 29 08 AND #&08 ; FLIPPED_HORIZONTALLY * 4 # if level flipped horizontally &0afa d0 02 BNE &0afe ; set_player_x &0afc a2 13 LDX #&13 # otherwise at x = &13 ; set_player_x &0afe 86 5d STX &5d ; player_x &0b00 a9 00 LDA #&00 &0b02 85 b8 STA &b8 ; player_y_low &0b04 85 b9 STA &b9 ; player_y_high &0b06 20 e7 0a JSR &0ae7 ; set_initial_player_position &0b09 a5 60 LDA &60 ; level &0b0b 4a LSR A &0b0c 4a LSR A &0b0d 4d 69 0d EOR &0d69 ; level_flipped &0b10 4a LSR A # Carry set if level needs to be flipped vertically &0b11 48 PHA ; flip &0b12 90 03 BCC &0b17 ; skip_flipping_vertically &0b14 20 2b 0c JSR &0c2b ; flip_level_vertically ; skip__flipping_vertically &0b17 68 PLA ; flip &0b18 4a LSR A # Carry set if level needs to be flipped horizontally &0b19 90 03 BCC &0b1e ; skip_flipping_horizontally &0b1b 20 7f 0c JSR &0c7f ; flip_level_horizontally ; skip_flipping_horizontally &0b1e a2 10 LDX #&10 # 24 orbs required if not first round &0b20 a5 87 LDA &87 ; round &0b22 d0 02 BNE &0b26 ; not_first_round &0b24 a6 60 LDX &60 ; level # otherwise, (level + 8) orbs required ; not_first_round &0b26 8a TXA &0b27 18 CLC &0b28 69 08 ADC #&08 &0b2a 85 5b STA &5b ; orbs ; reset_level_data &0b2c a0 00 LDY #&00 &0b2e 84 00 STY &00 ; level_data_address_low &0b30 a9 27 LDA #&27 ; &2700 = level_data &0b32 85 01 STA &01 ; level_data_address_high ; reset_level_data_loop &0b34 b1 00 LDA (&00),Y ; level_data &0b36 29 7f AND #&7f # Clear top bit to indicate tile not destroyed &0b38 c9 26 CMP #&26 ; TILE_EXPOSED_ORB &0b3a d0 02 BNE &0b3e ; not_open_orb &0b3c a9 17 LDA #&17 ; TILE_COVERED_ORB ; not_open_orb &0b3e 91 00 STA (&00),Y ; level_data &0b40 c8 INY &0b41 d0 f1 BNE &0b34 ; reset_level_data_loop &0b43 e6 01 INC &01 ; level_data_address_high &0b45 a5 01 LDA &01 ; level_data_address_high &0b47 c9 47 CMP #&47 ; &4700 = end_of_level_data &0b49 d0 e9 BNE &0b34 ; reset_level_data_loop &0b4b 60 RTS ; process_data # Called with A = size to process, XY = routine to call &0b4c 85 04 STA &04 ; size &0b4e 86 05 STX &05 ; routine_address_low &0b50 84 06 STY &06 ; routine_address_high &0b52 a9 00 LDA #&00 ; process_data_loop &0b54 85 00 STA &00 ; data_address_low &0b56 a0 00 LDY #&00 ; copy_section_to_buffer_loop &0b58 b1 00 LDA (&00),Y ; level_data_address &0b5a 99 00 01 STA &0100,Y ; buffer &0b5d c8 INY &0b5e c4 04 CPY &04 ; size &0b60 d0 f6 BNE &0b58 ; copy_section_to_buffer_loop &0b62 20 87 0b JSR &0b87 ; call_routine &0b65 a0 00 LDY #&00 ; copy_buffer_to_section_loop &0b67 b9 00 01 LDA &0100,Y ; buffer &0b6a 91 00 STA (&00),Y ; level_data_address &0b6c c8 INY &0b6d c4 04 CPY &04 ; size &0b6f d0 f6 BNE &0b67 ; copy_buffer_to_section_loop &0b71 a5 00 LDA &00 ; data_address_low &0b73 18 CLC &0b74 65 04 ADC &04 ; size &0b76 85 00 STA &00 ; data_address_low &0b78 a5 01 LDA &01 ; data_address_high &0b7a 69 00 ADC #&00 &0b7c 85 01 STA &01 ; data_address_high &0b7e c5 03 CMP &03 ; end_address_high &0b80 d0 d4 BNE &0b56 ; process_data_loop &0b82 a5 00 LDA &00 ; data_address_low &0b84 d0 d0 BNE &0b56 ; process_data_loop &0b86 60 RTS ; call_routine &0b87 6c 05 00 JMP (&0005) ; routine_address ; flip_order_of_bytes &0b8a a2 00 LDX #&00 &0b8c a5 04 LDA &04 ; size &0b8e a8 TAY &0b8f 88 DEY &0b90 4a LSR A &0b91 85 02 STA &02 ; end ; flip_order_of_bytes_loop &0b93 b9 00 01 LDA &0100,Y ; buffer &0b96 48 PHA &0b97 bd 00 01 LDA &0100,X ; buffer &0b9a 99 00 01 STA &0100,Y ; buffer &0b9d 68 PLA &0b9e 9d 00 01 STA &0100,X ; buffer &0ba1 88 DEY &0ba2 e8 INX &0ba3 e4 02 CPX &02 ; end &0ba5 d0 ec BNE &0b93 ; flip_order_of_bytes_loop &0ba7 60 RTS ; flip_tile_chunks_vertically &0ba8 a2 07 LDX #&07 ; flip_tile_chunks_vertically_loop &0baa 86 02 STX &02 ; chunk_x &0bac a9 00 LDA #&00 # Swap first and fourth rows &0bae a0 18 LDY #&18 &0bb0 20 c0 0b JSR &0bc0 ; swap_chunks &0bb3 a9 08 LDA #&08 # Swap second and third rows &0bb5 a0 10 LDY #&10 &0bb7 20 c0 0b JSR &0bc0 ; swap_chunks &0bba a6 02 LDX &02 ; chunk_x &0bbc ca DEX &0bbd 10 eb BPL &0baa ; flip_tile_chunks_vertically_loop &0bbf 60 RTS ; swap_chunks &0bc0 85 07 STA &07 ; first_offset &0bc2 86 08 STX &08 ; second_offset &0bc4 8a TXA &0bc5 18 CLC &0bc6 65 07 ADC &07 ; first_offset &0bc8 aa TAX &0bc9 98 TYA &0bca 65 08 ADC &08 ; second_offset &0bcc a8 TAY &0bcd bd 00 01 LDA &0100,X ; buffer &0bd0 48 PHA &0bd1 b9 00 01 LDA &0100,Y ; buffer &0bd4 9d 00 01 STA &0100,X ; buffer &0bd7 68 PLA &0bd8 99 00 01 STA &0100,Y ; buffer &0bdb 60 RTS ; invert_order_of_pixels &0bdc a2 07 LDX #&07 ; invert_order_of_pixels_loop &0bde bd 00 01 LDA &0100,X ; buffer &0be1 29 0f AND #&0f # Extract bits for colour 1 &0be3 20 ff 0b JSR &0bff ; flip_pixel_order &0be6 85 02 STA &02 ; tmp &0be8 bd 00 01 LDA &0100,X ; buffer &0beb 4a LSR A # Extract bits for colour 2 &0bec 4a LSR A &0bed 4a LSR A &0bee 4a LSR A &0bef 20 ff 0b JSR &0bff ; flip_pixel_order &0bf2 0a ASL A &0bf3 0a ASL A &0bf4 0a ASL A &0bf5 0a ASL A &0bf6 05 02 ORA &02 ; tmp # Combine results &0bf8 9d 00 01 STA &0100,X ; buffer &0bfb ca DEX &0bfc 10 e0 BPL &0bde ; invert_order_of_pixels_loop &0bfe 60 RTS ; flip_pixel_order &0bff 85 07 STA &07 ; byte &0c01 a9 00 LDA #&00 &0c03 a0 03 LDY #&03 ; flip_pixel_order_loop &0c05 46 07 LSR &07 ; byte &0c07 2a ROL A &0c08 88 DEY &0c09 10 fa BPL &0c05 ; flip_pixel_order_loop &0c0b 60 RTS ; swap_tiles_vertically &0c0c a5 0a LDA &0a ; target_address_low &0c0e 38 SEC &0c0f e9 04 SBC #&04 &0c11 85 0a STA &0a ; target_address_low &0c13 a5 0b LDA &0b ; target_address_high &0c15 e9 00 SBC #&00 &0c17 85 0b STA &0b ; target_address_high &0c19 a0 03 LDY #&03 ; swap_tiles_vertically_loop &0c1b b9 00 01 LDA &0100,Y ; buffer &0c1e 48 PHA &0c1f b1 0a LDA (&0a),Y ; target_address &0c21 99 00 01 STA &0100,Y ; buffer &0c24 68 PLA &0c25 91 0a STA (&0a),Y ; target_address &0c27 88 DEY &0c28 10 f1 BPL &0c1b ; swap_tiles_vertically_loop &0c2a 60 RTS ; flip_level_vertically &0c2b ad 69 0d LDA &0d69 ; level_flipped &0c2e 49 01 EOR #&01 ; FLIPPED_VERTICALLY &0c30 8d 69 0d STA &0d69 ; level_flipped &0c33 a9 50 LDA #&50 ; &5000 = chunk_data # Process &5000 - &57ff (chunk_data) &0c35 85 01 STA &01 ; data_address_high &0c37 a9 58 LDA #&58 ; &5800 = end_of_chunk_data &0c39 85 03 STA &03 ; end_address_high &0c3b a9 08 LDA #&08 # in 8 byte sections &0c3d a2 8a LDX #&8a ; &0b8a = flip_order_of_bytes # to flip chunks vertically &0c3f a0 0b LDY #&0b &0c41 20 4c 0b JSR &0b4c ; process_data &0c44 a9 47 LDA #&47 ; &4700 = tile_chunks_data # Process &4700 - &4fff (tile_chunks_data) &0c46 85 01 STA &01 ; data_address_high &0c48 a9 50 LDA #&50 ; &5000 = end_of_tile_chunks_data &0c4a 85 03 STA &03 ; end_address_high &0c4c a9 20 LDA #&20 # in 20 byte sections &0c4e a2 a8 LDX #&a8 ; &0ba8 = flip_tile_chunks_vertically # to flip tiles vertically &0c50 a0 0b LDY #&0b &0c52 20 4c 0b JSR &0b4c ; process_data &0c55 a9 27 LDA #&27 ; &2700 = level_data &0c57 85 09 STA &09 ; source_address_high &0c59 a2 03 LDX #&03 ; flip_level_vertically_loop # For each level, &0c5b 8a TXA &0c5c 48 PHA ; level &0c5d a5 09 LDA &09 ; source_address_high &0c5f 85 01 STA &01 ; data_address_high &0c61 18 CLC &0c62 69 04 ADC #&04 &0c64 85 03 STA &03 ; end_address_high &0c66 69 04 ADC #&04 # Process 1024 bytes of level_data &0c68 85 09 STA &09 ; source_address_high &0c6a 85 0b STA &0b ; target_address_high &0c6c a9 00 LDA #&00 &0c6e 85 0a STA &0a ; target_address_low &0c70 a9 04 LDA #&04 # in 4 byte sections &0c72 a2 0c LDX #&0c ; &0c0c = swap_tiles_vertically # to flip level vertically &0c74 a0 0c LDY #&0c &0c76 20 4c 0b JSR &0b4c ; process_data &0c79 68 PLA ; level &0c7a aa TAX &0c7b ca DEX &0c7c 10 dd BPL &0c5b ; flip_level_vertically_loop &0c7e 60 RTS ; flip_level_horizontally &0c7f ad 69 0d LDA &0d69 ; level_flipped &0c82 49 02 EOR #&02 : FLIPPED_HORIZONTALLY &0c84 8d 69 0d STA &0d69 ; level_flipped &0c87 a9 50 LDA #&50 ; &5000 = chunk_data # Process &5000 - &57ff (chunk_data) &0c89 85 01 STA &01 ; data_address_high &0c8b a9 58 LDA #&58 ; &5800 = end_of_chunk_data &0c8d 85 03 STA &03 ; end_address_high &0c8f a9 08 LDA #&08 # in 8 byte sections &0c91 a2 dc LDX #&dc ; &0bdc = invert_order_of_pixels # to flip chunks horizontally &0c93 a0 0b LDY #&0b &0c95 20 4c 0b JSR &0b4c ; process_data &0c98 a9 47 LDA #&47 ; &4700 = tile_chunks_data # Process &4700 - &4fff (tile_chunks_data) &0c9a 85 01 STA &01 ; data_address_high &0c9c a9 50 LDA #&50 ; &5000 = end_of_tile_chunks_data &0c9e 85 03 STA &03 ; end_address_high &0ca0 a9 08 LDA #&08 # in 8 byte sections &0ca2 a2 8a LDX #&8a ; &0b8a = flip_order_of_bytes # to flip tiles horizontally &0ca4 a0 0b LDY #&0b &0ca6 20 4c 0b JSR &0b4c ; process_data &0ca9 a9 27 LDA #&27 ; &2700 = level_data # Process &2700 - &46ff (level_data) &0cab 85 01 STA &01 ; data_address_high &0cad a9 47 LDA #&47 ; &4700 = end_of_level_data &0caf 85 03 STA &03 ; end_address_high &0cb1 a9 04 LDA #&04 # in 4 byte sections &0cb3 a2 8a LDX #&8a ; &0b8a = flip_order_of_bytes # to flip landscape horizontally &0cb5 a0 0b LDY #&0b &0cb7 4c 4c 0b JMP &0b4c ; process_data ; plot_level_name # Called with A = text_y &0cba 48 PHA ; text_y &0cbb a6 60 LDX &60 ; level &0cbd a0 00 LDY #&00 ; find_start_of_name_loop &0cbf b9 e4 0c LDA &0ce4,Y ; level_names &0cc2 c9 41 CMP #&41 ; "A" &0cc4 b0 03 BCS &0cc9 ; not_start_of_name &0cc6 ca DEX &0cc7 30 03 BMI &0ccc ; found_start_of_name ; not_start_of_name &0cc9 c8 INY &0cca d0 f3 BNE &0cbf ; find_start_of_name_loop ; found_start_of_name &0ccc 84 00 STY &00 ; offset &0cce aa TAX # First byte sets x position &0ccf 68 PLA ; text_y &0cd0 a8 TAY &0cd1 20 15 06 JSR &0615 ; calculate_text_screen_address_from_X_Y &0cd4 a4 00 LDY &00 ; offset ; plot_level_name_loop &0cd6 c8 INY &0cd7 b9 e4 0c LDA &0ce4,Y ; level_names &0cda c9 41 CMP #&41 ; "A" &0cdc 90 05 BCC &0ce3 ; leave &0cde 20 00 03 JSR &0300 ; plot_character &0ce1 b0 f3 BCS &0cd6 ; plot_level_name_loop ; leave &0ce3 60 RTS ; level_names &0ce4 08 41 4c 50 48 49 41 ; "ALPHIA" &0ceb 04 4d 45 47 41 54 52 4f 4e ; "MEGATRON" &0cf4 00 43 4f 4d 4d 4f 44 4f 52 49 41 ; "COMMODORIA" &0cff 08 43 59 43 4c 49 41 ; "CYCLIA" &0d06 08 4c 41 4d 42 44 41 ; "LAMBDA" &0d0d 06 41 54 4f 4d 49 43 41 ; "ATOMICA" &0d15 06 51 55 41 52 4b 49 41 ; "QUARKIA" &0d1d 08 43 48 52 4f 4d 41 ; "CHROMA" &0d24 06 42 45 54 41 52 4f 4e ; "BETARON" &0d2c 0a 44 45 4c 54 41 ; "DETA" &0d32 00 53 59 4e 43 4c 41 49 52 49 41 ; "SYNCLAIRIA" &0d3d 02 51 55 41 44 52 41 56 4f 58 ; "QUADRAVOX" &0d47 04 50 4c 41 54 49 4e 55 4d ; "PLATINUM" &0d50 0a 4f 52 49 43 41 ; "ORICA" &0d56 04 53 48 4f 54 4f 4b 49 41 ; "SHOTOKIA" &0d5f 04 50 41 52 54 49 53 49 41 20 ; "PARTISIA " ; level_flipped &0d69 00 # Between 0 and 3, also used as end of level name ; commence_attack_screen &0d6a 20 d2 05 JSR &05d2 ; plot_text &0d6d 23 ; clear screen &0d6e 40 04 06 ; move to (&04, &06) &0d71 43 4f 4d 4d 45 4e 43 45 ; "COMMENCE" &0d79 40 02 0e ; move to (&02, &0e) &0d7c 41 54 54 41 43 4b 20 4f 4e ; "ATTACK ON" &0d85 00 ; end of text &0d86 a9 16 LDA #&16 ; text_y &0d88 20 ba 0c JSR &0cba ; plot_level_name &0d8b 20 05 07 JSR &0705 ; unhide_screen &0d8e a9 18 LDA #&18 ; &7c18 = &8000 - 1000 # Require 10000 points to finish level &0d90 85 c0 STA &c0 ; missing_score_low &0d92 a9 7c LDA #&7c &0d94 85 c1 STA &c1 ; missing_score_high &0d96 a2 be LDX #&be ; &ffbe # Wait 66 frames before starting game &0d98 a0 ff LDY #&ff &0d9a 20 bb 0d JSR &0dbb ; set_timeout &0d9d 20 f4 0a JSR &0af4 ; initialise_level_data &0da0 a5 60 LDA &60 ; level &0da2 a6 87 LDX &87 ; round &0da4 f0 02 BEQ &0da8 ; is_first_round &0da6 a9 10 LDA #&10 # Treat level as level 16 if not first round ; is_first_round &0da8 18 CLC &0da9 69 01 ADC #&01 # Probability of adding enemy is ((level + 1) * 2) / 256 &0dab 0a ASL A &0dac 85 86 STA &86 ; probability_of_adding_enemy ; wait_for_timeout &0dae 20 e2 09 JSR &09e2 ; check_for_pause_and_escape &0db1 20 b8 09 JSR &09b8 ; leave_parent_function_if_space_pressed &0db4 a5 61 LDA &61 ; timeout_low &0db6 05 62 ORA &62 ; timeout_high &0db8 d0 f4 BNE &0dae ; wait_for_timeout &0dba 60 RTS ; set_timeout &0dbb 78 SEI &0dbc 86 61 STX &61 ; timeout_low &0dbe 84 62 STY &62 ; timeout_high &0dc0 58 CLI &0dc1 60 RTS ; unused &0dc2 58 49 4c 54 44 4e 20 54 68 65 20 4e 6f 74 20 53 ; "XILTDN The Not S" &0dd2 6f 20 4d 65 67 61 20 42 65 69 6e 67 2e 2e 2e 20 ; "o Mega Being... " &0de2 44 65 64 69 63 61 74 65 64 20 74 6f 20 74 68 65 ; "Dedicated to the" &0df2 20 6d 65 6d 6f 72 79 20 6f 66 20 54 72 61 63 65 ; " memory of Trace" &0e02 79 20 44 69 61 6e 6e 65 20 4e 69 63 68 6f 6c 73 ; "y Dianne Nichols" &0e12 6f 6e 2e 2e 2e 20 4d 61 79 62 65 20 6f 6e 65 20 ; "on... Maybe one " &0e22 64 61 79 20 77 65 20 6d 61 79 20 67 65 74 20 62 ; "day we may get b" &0e32 61 2e 2e 2e 20 d4 0a 20 6a 0d a9 0a aa a8 85 ad ; "a..." ; play_game &0e36 20 d4 0a JSR &0ad4 ; initialise_game ; new_level &0e39 20 6a 0d JSR &0d6a ; commence_attack_screen &0e3c a9 0a LDA #&0a &0e3e aa TAX # Unnecessary code &0e3f a8 TAY # Unnecessary code &0e40 85 ad STA &ad ; rnd_state &0e42 85 ff STA &ff ; frame_counter ; new_life &0e44 20 f7 0f JSR &0ff7 ; play_level # Returns negative if player killed &0e47 10 03 BPL &0e4c ; level_completed &0e49 4c 48 0f JMP &0f48 ; kill_player ; level_completed &0e4c 20 dd 10 JSR &10dd ; unplot_missiles &0e4f 20 98 07 JSR &0798 ; initialise_sound &0e52 a2 03 LDX #&03 ; play_level_completion_chord_loop &0e54 8a TXA &0e55 48 PHA ; channel &0e56 a0 02 LDY #&02 &0e58 20 f7 04 JSR &04f7 ; play_sound # Play sound for level completion ; v vd vc vs pd pc ps &0e5b 00 00 00 00 fc ff 01 c8 &0e63 a0 17 LDY #&17 &0e65 20 aa 09 JSR &09aa ; wait_for_Y_or_space &0e68 68 PLA ; channel &0e69 aa TAX &0e6a ca DEX &0e6b d0 e7 BNE &0e54 ; play_level_completion_chord_loop &0e6d a0 37 LDY #&37 &0e6f 20 aa 09 JSR &09aa ; wait_for_Y_or_space &0e72 20 98 07 JSR &0798 ; initialise_sound &0e75 20 8c 0f JSR &0f8c ; play_sound_for_explosion &0e78 a2 78 LDX #&78 ; level_completed_loop &0e7a 8a TXA &0e7b 48 PHA ; count &0e7c 29 01 AND #&01 &0e7e 38 SEC &0e7f e9 01 SBC #&01 &0e81 85 63 STA &63 ; vertical_direction # Shudder screen &0e83 20 8e 16 JSR &168e ; scroll_screen &0e86 20 5f 10 JSR &105f ; rnd &0e89 4d 44 fe EOR &fe44 ; System VIA timer 1 counter LSB &0e8c 4d 45 fe EOR &fe45 ; System VIA timer 1 counter MSB &0e8f 48 PHA ; random &0e90 20 c4 09 JSR &09c4 ; wait_for_vsync &0e93 68 PLA ; random &0e94 8d 21 fe STA &fe21 ; video ULA palette register # Set random palette &0e97 68 PLA ; count &0e98 aa TAX &0e99 ca DEX &0e9a d0 de BNE &0e7a ; level_completed_loop &0e9c 20 d2 05 JSR &05d2 ; plot_text &0e9f 23 ; clear screen &0ea0 40 02 06 ; move to (&02, &06) &0ea3 41 54 54 41 43 4b 20 4f 4e ; "ATTACK ON" &0eac 40 04 16 ; move to (&04, &16) &0eaf 43 4f 4d 50 4c 45 54 45 ; "COMPLETE" &0eb7 00 ; end of text &0eb8 a9 0e LDA #&0e ; text_y &0eba 20 ba 0c JSR &0cba ; plot_level_name &0ebd a2 03 LDX #&03 ; play_level_completion_sound_loop &0ebf 8a TXA &0ec0 48 PHA ; maximum_frequency_high &0ec1 a0 01 LDY #&01 &0ec3 20 23 07 JSR &0723 ; play_level_completion_sound &0ec6 68 PLA ; maximum_frequency_high &0ec7 18 CLC &0ec8 69 03 ADC #&03 &0eca aa TAX &0ecb e0 28 CPX #&28 &0ecd 90 f0 BCC &0ebf ; play_level_completion_sound_loop &0ecf 20 a8 09 JSR &09a8 ; wait_for_80_or_space &0ed2 e6 60 INC &60 ; level &0ed4 a5 60 LDA &60 ; level &0ed6 48 PHA ; level without wraparound &0ed7 29 0f AND #&0f &0ed9 85 60 STA &60 ; level &0edb 68 PLA ; level without wraparound &0edc 29 10 AND #&10 # Sixteen levels per round &0ede f0 62 BEQ &0f42 ; not_end_of_levels &0ee0 a5 bb LDA &bb ; levels_jumped # Non-zero if levels were jumped &0ee2 d0 29 BNE &0f0d ; now_do_it_without_jumping &0ee4 20 d2 05 JSR &05d2 ; plot_text &0ee7 23 ; clear screen &0ee8 40 08 06 57 48 41 54 20 41 ; "WHAT A &0ef1 40 00 0e ; move to (&00, &0e) &0ef4 47 52 45 41 54 20 53 48 4f 57 ; "GREAT SHOW &0efe 40 02 16 ; move to (&02, &16) &0f01 53 4d 41 52 54 20 47 55 59 ; "SMART GUY &0f0a 00 ; end of text &0f0b d0 25 BNE &0f32 ; play_game_completed_sound # Always branches ; now_do_it_without_jumping &0f0d 20 d2 05 JSR &05d2 ; plot_text &0f10 23 ; clear screen &0f11 40 02 06 ; move to (&02, &06) &0f14 4e 4f 57 20 44 4f 20 49 54 ; "NOW DO IT &0f1d 40 06 0e ; move to (&06, &0e) &0f20 57 49 54 48 4f 55 54 ; "WITHOUT &0f27 40 06 16 ; move to (&06, &16) &0f2a 4a 55 4d 50 49 4e 47 ; "JUMPING" &0f31 00 ; end of text ; play_game_completed_sound &0f32 20 f5 04 JSR &04f5 ; play_sound_on_channel_one # Play sound for game completion ; v vd vc vs pd pc ps &0f35 04 00 00 00 9c ff 01 ff &0f3d 20 a8 09 JSR &09a8 ; wait_for_80_or_space &0f40 e6 87 INC &87 ; round ; not_end_of_levels &0f42 20 6b 0a JSR &0a6b ; status_screen &0f45 4c 39 0e JMP &0e39 ; new_level ; kill_player &0f48 20 8c 0f JSR &0f8c ; play_sound_for_explosion &0f4b 85 6e STA &6e ; suppress_player_input # Set to non-zero to suppress player input &0f4d 20 d2 15 JSR &15d2 ; plot_or_unplot_player # Unplot player ; kill_player_loop ; get_random_explosion_loop &0f50 20 5f 10 JSR &105f ; rnd &0f53 29 03 AND #&03 &0f55 c5 5c CMP &5c ; player_killed # Used as type of explosion sprite &0f57 f0 f7 BEQ &0f50 ; get_random_explosion_loop &0f59 85 5c STA &5c ; player_killed &0f5b 18 CLC &0f5c 69 0b ADC #&0b # Used as offset into player_sprites_table &0f5e 85 65 STA &65 ; player_sprite &0f60 20 d2 15 JSR &15d2 ; plot_or_unplot_player # Plot explosion &0f63 a0 06 LDY #&06 &0f65 20 aa 09 JSR &09aa ; wait_for_Y_or_space &0f68 20 d2 15 JSR &15d2 ; plot_or_unplot_player # Unplot explosion &0f6b a5 2a LDA &2a ; channels_active + &10 &0f6d d0 e1 BNE &0f50 ; kill_player_loop # Continue explosion until channel 1 sound finished &0f6f 20 98 07 JSR &0798 ; initialise_sound &0f72 20 dd 10 JSR &10dd ; unplot_missiles &0f75 a0 32 LDY #&32 &0f77 20 aa 09 JSR &09aa ; wait_for_Y_or_space &0f7a 20 7a 15 JSR &157a ; reset_carrying_orb &0f7d 20 cf 0f JSR &0fcf ; initialise_level_variables &0f80 a5 88 LDA &88 ; demo_mode # Negative if demo mode &0f82 30 07 BMI &0f8b ; leave &0f84 c6 5a DEC &5a ; lives &0f86 f0 03 BEQ &0f8b ; leave &0f88 4c 44 0e JMP &0e44 ; new_life ; leave &0f8b 60 RTS ; play_sound_for_explosion &0f8c a9 00 LDA #&00 &0f8e a8 TAY &0f8f a2 07 LDX #&07 &0f91 20 f7 04 JSR &04f7 ; play_sound ; v vd vc vs pd pc ps &0f94 04 01 ff ff 00 00 00 00 &0f9c a9 01 LDA #&01 &0f9e 85 14 STA &14 ; channels_volume_cooldown &0fa0 a2 00 LDX #&00 &0fa2 a0 00 LDY #&00 &0fa4 20 f5 04 JSR &04f5 ; play_sound_on_channel_one ; v vd vc vs pd pc ps &0fa7 04 00 04 00 05 00 01 78 &0faf 60 RTS ; add_to_score &0fb0 8a TXA &0fb1 18 CLC &0fb2 65 58 ADC &58 ; score_low &0fb4 85 58 STA &58 ; score_low &0fb6 a9 00 LDA #&00 &0fb8 65 59 ADC &59 ; score_high &0fba 85 59 STA &59 ; score_high &0fbc 8a TXA &0fbd 18 CLC &0fbe 65 c0 ADC &c0 ; missing_score_low &0fc0 85 c0 STA &c0 ; missing_score_low &0fc2 a9 00 LDA #&00 &0fc4 65 c1 ADC &c1 ; missing_score_high &0fc6 85 c1 STA &c1 ; missing_score_high &0fc8 10 04 BPL &0fce ; leave &0fca a9 80 LDA #&80 # Set top bit to indicate required score achieved &0fcc 85 c1 STA &c1 ; missing_score_high ; leave &0fce 60 RTS ; initialise_level_variables &0fcf a5 a6 LDA &a6 ; initial_player_x &0fd1 85 5d STA &5d ; player_x &0fd3 a5 a7 LDA &a7 ; initial_player_y_low &0fd5 85 5e STA &5e ; screen_edge_y_low &0fd7 a5 a8 LDA &a8 ; initial_player_y_high &0fd9 85 5f STA &5f ; screen_edge_y_high &0fdb a9 00 LDA #&00 &0fdd 85 6c STA &6c ; carrying_orb # Set to zero to indicate player not carrying orb &0fdf 85 64 STA &64 ; turn_direction # Set to zero to indicate player not turning &0fe1 85 65 STA &65 ; player_sprite &0fe3 85 67 STA &67 ; turn_cooldown &0fe5 a9 ff LDA #&ff &0fe7 85 63 STA &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &0fe9 a5 60 LDA &60 ; level &0feb 29 03 AND #&03 # Four sets of level data, each &800 in size &0fed 0a ASL A &0fee 0a ASL A &0fef 0a ASL A &0ff0 85 6b STA &6b ; level_data_offset_high &0ff2 a9 f8 LDA #&f8 &0ff4 85 ba STA &ba ; player_y_offset_from_screen_edge &0ff6 60 RTS ; play_level &0ff7 20 cf 0f JSR &0fcf ; initialise_level_variables &0ffa 20 25 13 JSR &1325 ; calculate_player_y &0ffd a9 00 LDA #&00 &0fff 85 5c STA &5c ; player_killed # Set to zero to indicate neither killed nor completed &1001 20 c8 15 JSR &15c8 ; take_off_runway &1004 a5 60 LDA &60 ; level &1006 c5 ab CMP &ab ; maximum_level_reached &1008 90 02 BCC &100c ; not_new_maximum &100a 85 ab STA &ab ; maximum_level_reached ; not_new_maximum ; main_game_loop &100c a5 ff LDA &ff ; frame_counter &100e c5 a5 CMP &a5 ; previous_frame_counter &1010 f0 fa BEQ &100c ; main_game_loop # Wait for frame &1012 85 a5 STA &a5 ; previous_frame_counter &1014 e6 90 INC &90 ; missile_frame_counter &1016 20 39 13 JSR &1339 ; update_player &1019 20 c9 17 JSR &17c9 ; update_enemies &101c 20 ea 11 JSR &11ea ; update_missiles &101f 20 7b 12 JSR &127b ; consider_adding_new_player_missile &1022 20 b9 12 JSR &12b9 ; consider_adding_new_enemy_missile_from_ground &1025 20 8e 14 JSR &148e ; check_for_player_collision_with_landscape &1028 20 d2 09 JSR &09d2 ; check_for_game_or_demo_keys &102b a5 5c LDA &5c ; player_killed # Negative if player killed, non-zero if level completed &102d f0 01 BEQ &1030 ; not_end_of_life_or_level &102f 60 RTS ; not_end_of_life_or_level &1030 a9 54 LDA #&54 ; H &1032 20 fc 06 JSR &06fc ; check_for_keypress &1035 10 25 BPL &105c ; not_hyperspace &1037 20 0d 04 JSR &040d ; initialise_screen ; wait_for_release &103a a9 54 LDA #&54 ; H &103c 20 fc 06 JSR &06fc ; check_for_keypress &103f 30 f9 BMI &103a ; wait_for_release &1041 20 5f 10 JSR &105f ; rnd &1044 85 5e STA &5e ; screen_edge_y_low &1046 29 0f AND #&0f &1048 69 07 ADC #&07 &104a 85 5d STA &5d ; player_x &104c 29 07 AND #&07 &104e 85 5f STA &5f ; screen_edge_y_high &1050 a2 00 LDX #&00 # Zero to indicate player not killed ; not_hyperspace &1052 29 03 AND #&03 &1054 d0 01 BNE &1057 ; set_player_killed # 1 in 4 chance of killing player when hyperspacing &1056 ca DEX # Set to negative to kill player ; set_player_killed &1057 86 5c STX &5c ; player_killed &1059 20 8e 15 JSR &158e ; plot_level &105c 4c 0c 10 JMP &100c ; main_game_loop ; rnd &105f a5 ad LDA &ad ; rnd_state &1061 38 SEC &1062 e9 1b SBC #&1b &1064 85 ad STA &ad ; rnd_state &1066 45 ff EOR &ff ; frame_counter &1068 5d 19 19 EOR &1919,X ; font_data &106b 59 80 24 EOR &2480,Y ; tune_channel_1_data ; leave &106e 60 RTS ; check_for_player_firing &106f a5 6e LDA &6e ; suppress_player_input # Non-zero if player input suppressed &1071 d0 fb BNE &106e ; leave &1073 a5 88 LDA &88 ; demo_mode # Negative if demo mode &1075 30 05 BMI &107c ; consider_firing_in_demo &1077 a9 49 LDA #&49 ; ENTER &1079 4c fc 06 JMP &06fc ; check_for_keypress ; consider_firing_in_demo &107c a9 d2 LDA #&d2 # 46 in 256 chance of firing in demo &107e d0 2b BNE &10ab ; consider_taking_demo_action # Always branches ; check_for_player_moving_left &1080 a5 6e LDA &6e ; suppress_player_input # Non-zero if player input suppressed &1082 d0 ea BNE &106e ; leave &1084 a5 88 LDA &88 ; demo_mode # Negative if demo mode &1086 30 12 BMI &109a ; consider_moving_in_demo &1088 a9 61 LDA #&61 ; Z &108a 4c fc 06 JMP &06fc ; check_for_keypress ; check_for_player_moving_right &108d a5 6e LDA &6e ; suppress_player_input # Non-zero if player input suppressed &108f d0 dd BNE &106e ; leave &1091 a5 88 LDA &88 ; demo_mode # Negative if demo mode &1093 30 05 BMI &109a ; consider_moving_in_demo &1095 a9 42 LDA #&42 ; X &1097 4c fc 06 JMP &06fc ; check_for_keypress ; consider_moving_in_demo &109a a9 8c LDA #&8c # 116 in 256 chance of moving in demo &109c d0 0d BNE &10ab ; consider_taking_demo_action # Always branches ; check_for_player_turning &109e a5 6e LDA &6e ; suppress_player_input # Non-zero if player input suppressed &10a0 d0 cc BNE &106e ; leave &10a2 a5 88 LDA &88 ; demo_mode # Negative if demo mode &10a4 30 03 BMI &10a9 ; consider_turning_in_demo &10a6 4c ea 06 JMP &06ea ; check_for_space_pressed ; consider_turning_in_demo &10a9 a9 fe LDA #&fe # 2 in 256 chance of turning in demo ; consider_taking_demo_action &10ab 85 00 STA &00 ; threshold &10ad 20 5f 10 JSR &105f ; rnd &10b0 c5 00 CMP &00 ; threshold &10b2 a9 00 LDA #&00 &10b4 6a ROR A # Leave with negative if rnd > threshold &10b5 60 RTS ; check_for_player_firing_suppressing_autorepeat &10b6 20 6f 10 JSR &106f ; check_for_player_firing &10b9 10 09 BPL &10c4 ; clear_suppress_fire &10bb a5 8b LDA &8b ; suppress_fire &10bd d0 09 BNE &10c8 ; leave_with_zero &10bf a9 ff LDA #&ff &10c1 85 8b STA &8b ; suppress_fire # Set to negative to ignore firing subsequently &10c3 60 RTS ; clear_suppress_fire &10c4 a9 00 LDA #&00 &10c6 85 8b STA &8b ; suppress_fire # Set to positive to permit firing subsequently ; leave_with_zero &10c8 a9 00 LDA #&00 &10ca 60 RTS ; remove_missile &10cb a6 a4 LDX &a4 ; missile_to_update &10cd a9 00 LDA #&00 &10cf 9d 63 01 STA &0163,X ; missiles_direction # Set to zero to indicate no missile in slot &10d2 a5 b5 LDA &b5 ; missile_type &10d4 10 04 BPL &10da ; is_enemy_missile &10d6 c6 8a DEC &8a ; number_of_player_missiles_present &10d8 10 02 BPL &10dc ; leave ; is_enemy_missile &10da c6 89 DEC &89 ; number_of_enemy_missiles_present ; leave &10dc 60 RTS ; unplot_missiles &10dd a2 07 LDX #&07 ; unplot_missiles_loop &10df bd 63 01 LDA &0163,X ; missiles_direction # Zero if no missile in slot &10e2 f0 0d BEQ &10f1 ; consider_next_missile &10e4 bd 53 01 LDA &0153,X ; missiles_screen_address_low &10e7 85 00 STA &00 ; screen_address_low &10e9 bd 5b 01 LDA &015b,X ; missiles_screen_address_high &10ec 85 01 STA &01 ; screen_address_high &10ee 20 63 12 JSR &1263 ; plot_or_unplot_missile ; consider_next_missile &10f1 ca DEX &10f2 10 eb BPL &10df ; unplot_missiles_loop &10f4 60 RTS ; player_missile_hit_enemy_headquarters &10f5 a5 5b LDA &5b ; orbs &10f7 d0 08 BNE &1101 ; to_consider_moving_missile # Can't complete level if insufficient orbs collected &10f9 a5 c1 LDA &c1 ; missing_score_high &10fb 10 04 BPL &1101 ; to_consider_moving_missile # Can't complete level if insufficient points scored &10fd a9 64 LDA #&64 &10ff 85 5c STA &5c ; player_killed # Set to positive non-zero to indicate level completed ; to_consider_moving_missile &1101 4c cd 11 JMP &11cd ; consider_moving_missile ; check_for_collision_with_missile &1104 a5 b5 LDA &b5 ; missile_type # Negative if player missile &1106 30 03 BMI &110b ; check_for_collision_with_player_missile &1108 4c b3 11 JMP &11b3 ; check_for_collision_with_enemy_missile ; check_for_collision_with_player_missile &110b a5 b0 LDA &b0 ; missile_x &110d 85 00 STA &00 ; x &110f a5 5e LDA &5e ; screen_edge_y_low &1111 18 CLC &1112 65 b1 ADC &b1 ; missile_y &1114 85 01 STA &01 ; y_low &1116 a5 5f LDA &5f ; screen_edge_y_high &1118 69 00 ADC #&00 &111a 85 02 STA &02 ; y_high &111c a5 01 LDA &01 ; y_low &111e 38 SEC &111f e9 10 SBC #&10 &1121 85 01 STA &01 ; y_low &1123 a5 02 LDA &02 ; y_high &1125 e9 00 SBC #&00 &1127 85 02 STA &02 ; y_high &1129 20 a0 13 JSR &13a0 ; get_tile_and_chunk # Returns carry clear if not collidable chunk &112c 90 31 BCC &115f ; no_collision &112e 20 cb 10 JSR &10cb ; remove_missile &1131 a6 0f LDX &0f ; tile &1133 e0 27 CPX #&27 ; TILE_HQ_TOP_LEFT &1135 f0 be BEQ &10f5 ; player_missile_hit_enemy_headquarters &1137 e0 28 CPX #&28 ; TILE_HQ_BOTTOM_LEFT &1139 f0 ba BEQ &10f5 ; player_missile_hit_enemy_headquarters &113b e0 29 CPX #&29 ; TILE_HQ_RIGHT &113d f0 b6 BEQ &10f5 ; player_missile_hit_enemy_headquarters &113f e0 26 CPX #&26 ; TILE_EXPOSED_ORB &1141 f0 07 BEQ &114a ; missile_hit_tile &1143 bd 20 24 LDA &2420,X ; destroyed_tiles_table &1146 c9 40 CMP #&40 ; TILE_COLLECTED_ORB &1148 f0 15 BEQ &115f ; skip_destroying_tile ; missile_hit_tile &114a 20 d7 13 JSR &13d7 ; destroy_tile &114d a2 07 LDX #&07 &114f 20 b0 0f JSR &0fb0 ; add_to_score # Score 70 points for destroying tile &1152 a9 03 LDA #&03 &1154 20 f7 04 JSR &04f7 ; play_sound # Play sound for destroying tile ; v vd vc vs pd pc ps &1157 04 00 00 00 32 00 01 0f ; skip_destroying_tile ; no_collision &115f a2 03 LDX #&03 ; check_for_player_missile_collision_with_enemies_loop &1161 bd 3f 01 LDA &013f,X ; enemies_explosion_sprite # Non-zero if enemy is exploding &1164 d0 1c BNE &1182 ; consider_next_enemy &1166 a5 b1 LDA &b1 ; missile_y &1168 dd 27 01 CMP &0127,X ; enemies_y &116b 90 15 BCC &1182 ; consider_next_enemy &116d e9 03 SBC #&03 &116f dd 27 01 CMP &0127,X ; enemies_y &1172 b0 0e BCS &1182 ; consider_next_enemy &1174 a5 b0 LDA &b0 ; missile_x &1176 dd 23 01 CMP &0123,X ; enemies_x &1179 90 07 BCC &1182 ; consider_next_enemy &117b e9 03 SBC #&03 &117d dd 23 01 CMP &0123,X ; enemies_x &1180 90 05 BCC &1187 ; missile_hit_enemy ; consider_next_enemy &1182 ca DEX &1183 10 dc BPL &1161 ; check_for_player_missile_collision_with_enemies_loop &1185 30 46 BMI &11cd ; consider_moving_missile # Always branches ; missile_hit_enemy &1187 a9 01 LDA #&01 # Set to non-zero to indicate enemy is exploding &1189 9d 3f 01 STA &013f,X ; enemies_explosion_sprite &118c bd 2b 01 LDA &012b,X ; enemies_sprite &118f 0a ASL A &1190 0a ASL A &1191 69 09 ADC #&09 # Score 90 - 290 points for destroying enemy &1193 aa TAX &1194 20 b0 0f JSR &0fb0 ; add_to_score &1197 a9 03 LDA #&03 &1199 aa TAX &119a a8 TAY &119b 20 f7 04 JSR &04f7 ; play_sound # Play sound for destroying enemy ; v vd vc vs pd pc ps &119e 04 00 00 00 fa 00 01 14 &11a6 c6 c2 DEC &c2 ; enemies_for_extra_life &11a8 10 06 BPL &11b0 ; skip_extra_life &11aa a9 13 LDA #&13 # Extra life every 20 enemies destroyed &11ac 85 c2 STA &c2 ; enemies_for_extra_life &11ae e6 5a INC &5a ; lives ; skip_extra_life &11b0 4c cd 11 JMP &11cd ; consider_moving_missile ; check_for_collision_with_enemy_missile &11b3 a9 11 LDA #&11 &11b5 18 CLC &11b6 65 ba ADC &ba ; player_y_offset_from_screen_edge &11b8 c5 b1 CMP &b1 ; missile_y &11ba d0 11 BNE &11cd ; consider_moving_missile &11bc a5 b0 LDA &b0 ; missile_x &11be c5 5d CMP &5d ; player_x &11c0 90 0b BCC &11cd ; consider_moving_missile &11c2 e9 03 SBC #&03 &11c4 c5 5d CMP &5d ; player_x &11c6 b0 05 BCS &11cd ; consider_moving_missile &11c8 20 cb 10 JSR &10cb ; remove_missile &11cb c6 5c DEC &5c ; player_killed # Set to negative to indicate player killed (enemy missile) ; consider_moving_missile &11cd a5 b5 LDA &b5 ; missile_type # Negative if player missile &11cf 30 06 BMI &11d7 ; move_missile # Always move player missiles &11d1 a5 90 LDA &90 ; missile_frame_counter &11d3 29 01 AND #&01 &11d5 d0 12 BNE &11e9 ; leave # Move enemy missiles one update in two ; move_missile &11d7 a5 b4 LDA &b4 ; missile_direction &11d9 18 CLC &11da 65 b1 ADC &b1 ; missile_y &11dc 85 b1 STA &b1 ; missile_y &11de c9 02 CMP #&02 &11e0 f0 04 BEQ &11e6 ; to_remove_missile # Remove missile at top &11e2 c9 1d CMP #&1d &11e4 d0 03 BNE &11e9 ; leave # or bottom of screen ; to_remove_missile &11e6 20 cb 10 JSR &10cb ; remove_missile ; leave &11e9 60 RTS ; update_missiles &11ea a2 07 LDX #&07 ; update_missiles_loop &11ec bd 63 01 LDA &0163,X ; missiles_direction # Zero if no missile in slot &11ef f0 43 BEQ &1234 ; consider_next_missile &11f1 85 b4 STA &b4 ; missile_direction &11f3 86 a4 STX &a4 ; missile_to_update &11f5 bd 43 01 LDA &0143,X ; missiles_x &11f8 85 b0 STA &b0 ; missile_x &11fa bd 4b 01 LDA &014b,X ; missiles_y_and_type &11fd 85 b5 STA &b5 ; missile_type &11ff 29 7f AND #&7f &1201 85 b1 STA &b1 ; missile_y &1203 bd 53 01 LDA &0153,X ; missiles_screen_address_low &1206 85 00 STA &00 ; screen_address_low &1208 bd 5b 01 LDA &015b,X ; missiles_screen_address_high &120b 85 01 STA &01 ; screen_address_high &120d 20 63 12 JSR &1263 ; plot_or_unplot_missile # Unplot missile &1210 20 04 11 JSR &1104 ; check_for_collision_with_missile &1213 20 6f 12 JSR &126f ; update_missile &1216 a6 a4 LDX &a4 ; missile_to_update &1218 bd 63 01 LDA &0163,X ; missiles_direction # Zero if missile has been removed &121b f0 03 BEQ &1220 ; skip_plotting_missile &121d 20 63 12 JSR &1263 ; plot_or_unplot_missile # Plot missile ; skip_plotting_missile &1220 bd 4b 01 LDA &014b,X ; missiles_y_and_type &1223 29 80 AND #&80 # Top bit is type, set for player, unset for enemy &1225 05 b1 ORA &b1 ; missile_y &1227 9d 4b 01 STA &014b,X ; missiles_y_and_type &122a a5 00 LDA &00 ; screen_address_low &122c 9d 53 01 STA &0153,X ; missiles_screen_address_low &122f a5 01 LDA &01 ; screen_address_high &1231 9d 5b 01 STA &015b,X ; missiles_screen_address_high ; consider_next_missile &1234 ca DEX &1235 10 b5 BPL &11ec ; update_missiles_loop &1237 60 RTS ; add_new_missile &1238 85 b4 STA &b4 ; missile_direction &123a a2 07 LDX #&07 ; find_free_slot_loop &123c bd 63 01 LDA &0163,X ; missiles_direction # Zero if no missile in slot &123f f0 04 BEQ &1245 ; found_free_slot &1241 ca DEX &1242 10 f8 BPL &123c ; find_free_slot_loop &1244 60 RTS ; found_free_slot &1245 a5 b0 LDA &b0 ; missile_x &1247 9d 43 01 STA &0143,X ; missiles_x &124a a5 b1 LDA &b1 ; missile_y &124c 05 b5 ORA &b5 ; missile_type &124e 9d 4b 01 STA &014b,X ; missiles_y_and_type &1251 a5 b4 LDA &b4 ; missile_direction &1253 9d 63 01 STA &0163,X ; missiles_direction &1256 20 6f 12 JSR &126f ; update_missile &1259 a5 00 LDA &00 ; screen_address_low &125b 9d 53 01 STA &0153,X ; missiles_screen_address_low &125e a5 01 LDA &01 ; screen_address_high &1260 9d 5b 01 STA &015b,X ; missiles_screen_address_high ; plot_or_unplot_missile &1263 a0 07 LDY #&07 ; plot_or_unplot_missile_loop &1265 b1 00 LDA (&00),Y ; screen_address &1267 49 06 EOR #&06 ; 0110 &1269 91 00 STA (&00),Y ; screen_address &126b 88 DEY &126c 10 f7 BPL &1265 ; plot_or_unplot_missile_loop &126e 60 RTS ; update_missile &126f a5 b0 LDA &b0 ; missile_x &1271 85 07 STA &07 ; sprite_x &1273 a5 b1 LDA &b1 ; missile_y &1275 18 CLC &1276 69 10 ADC #&10 # Position missiles relative to vertical centre of screen &1278 4c 54 16 JMP &1654 ; calculate_sprite_screen_address ; consider_adding_new_player_missile &127b a5 64 LDA &64 ; turn_direction &127d d0 39 BNE &12b8 ; leave # Can't fire when turning &127f 20 b6 10 JSR &10b6 ; check_for_player_firing_suppressing_autorepeat &1282 10 34 BPL &12b8 ; leave &1284 a5 8a LDA &8a ; number_of_player_missiles_present &1286 c9 04 CMP #&04 # Can't fire if too many player missiles present &1288 f0 2e BEQ &12b8 ; leave &128a a2 00 LDX #&00 &128c a0 03 LDY #&03 &128e 20 f5 04 JSR &04f5 ; play_sound_on_channel_one # Play sound for firing ; v vd vc vs pd pc ps &1291 04 00 00 00 d8 ff 01 0d &1299 a6 5d LDX &5d ; player_x &129b e8 INX &129c 86 b0 STX &b0 ; missile_x &129e a9 0f LDA #&0f &12a0 a6 63 LDX &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &12a2 10 02 BPL &12a6 ; set_offset &12a4 a9 13 LDA #&13 ; set_offset &12a6 18 CLC &12a7 65 ba ADC &ba ; player_y_offset_from_screen_edge &12a9 85 b1 STA &b1 ; missile_y &12ab a9 80 LDA #&80 # Negative to indicate player missile &12ad 85 b5 STA &b5 ; missile_type &12af a5 63 LDA &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &12b1 49 fe EOR #&fe # Positive if moving down, negative if moving up &12b3 20 38 12 JSR &1238 ; add_new_missile &12b6 e6 8a INC &8a ; number_of_player_missiles_present ; leave &12b8 60 RTS ; consider_adding_new_enemy_missile_from_ground &12b9 20 5f 10 JSR &105f ; rnd &12bc 29 03 AND #&03 # Pick a column of tiles at random &12be 85 0f STA &0f ; column &12c0 0a ASL A &12c1 0a ASL A &12c2 0a ASL A &12c3 69 04 ADC #&04 &12c5 85 80 STA &80 ; enemy_x &12c7 a5 5e LDA &5e ; screen_edge_y_low # Consider the tile in that column on the screen edge &12c9 85 02 STA &02 ; y_low &12cb a5 5f LDA &5f ; screen_edge_y_high &12cd 85 03 STA &03 ; y_high &12cf 20 90 17 JSR &1790 ; calculate_level_data_address_and_offset &12d2 a4 0f LDY &0f ; column &12d4 b1 02 LDA (&02),Y ; level_data_address &12d6 c9 24 CMP #&24 ; TILE_LAUNCHER # Is it a launcher? &12d8 d0 4a BNE &1324 ; leave &12da a9 0e LDA #&0e # Use edge of screen &12dc d0 19 BNE &12f7 ; add_new_enemy_missile # Always branches ; consider_adding_new_enemy_missile_from_enemy &12de a5 8c LDA &8c ; enemy_explosion_sprite &12e0 d0 42 BNE &1324 ; leave &12e2 a5 60 LDA &60 ; level &12e4 f0 3e BEQ &1324 ; leave # Enemies don't fire missiles on first level &12e6 20 5f 10 JSR &105f ; rnd &12e9 29 1f AND #&1f &12eb d0 37 BNE &1324 ; leave # 1 in 32 chance that an enemy fires a missile &12ed a5 81 LDA &81 ; enemy_y &12ef c9 0d CMP #&0d # if not too close to the top &12f1 90 31 BCC &1324 ; leave &12f3 c9 13 CMP #&13 # or the bottom of the screen &12f5 b0 2d BCS &1324 ; leave ; add_new_enemy_missile &12f7 a6 63 LDX &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &12f9 10 02 BPL &12fd ; set_missile_y &12fb 69 02 ADC #&02 ; set_missile_y &12fd 85 b1 STA &b1 ; missile_y &12ff a5 80 LDA &80 ; enemy_x &1301 85 b0 STA &b0 ; missile_x &1303 a9 00 LDA #&00 # Positive to indicate enemy missile &1305 85 b5 STA &b5 ; missile_type &1307 a5 89 LDA &89 ; number_of_enemy_missiles_present &1309 c9 04 CMP #&04 # Don't fire if too many enemy missiles present &130b f0 17 BEQ &1324 ; leave &130d 8a TXA ; missile_direction &130e 20 38 12 JSR &1238 ; add_new_missile &1311 e6 89 INC &89 ; number_of_enemy_missiles_present &1313 a9 02 LDA #&02 &1315 a2 00 LDX #&00 &1317 a0 00 LDY #&00 &1319 20 f5 04 JSR &04f5 ; play_sound_on_channel_one # Play sound for firing enemy missile ; v vd vc vs pd pc ps &131c 04 00 00 00 03 00 01 0a ; leave &1324 60 RTS ; calculate_player_y &1325 a2 00 LDX #&00 &1327 a5 ba LDA &ba ; player_y_offset_from_screen_edge &1329 10 01 BPL &132c ; set_sign &132b ca DEX ; set_sign &132c 18 CLC &132d 65 5e ADC &5e ; screen_edge_y_low &132f 85 b8 STA &b8 ; player_y_low &1331 8a TXA &1332 65 5f ADC &5f ; screen_edge_y_high &1334 29 07 AND #&07 &1336 85 b9 STA &b9 ; player_y_high &1338 60 RTS ; update_player &1339 20 d2 15 JSR &15d2 ; plot_or_unplot_player # Unplot player &133c 20 8e 16 JSR &168e ; scroll_screen &133f 20 25 13 JSR &1325 ; calculate_player_y &1342 20 80 10 JSR &1080 ; check_for_player_moving_left &1345 10 06 BPL &134d ; not_moving_left &1347 a5 5d LDA &5d ; player_x &1349 f0 02 BEQ &134d ; not_moving_left # Can't move beyond left edge of screen &134b c6 5d DEC &5d ; player_x ; not_moving_left &134d 20 8d 10 JSR &108d ; check_for_player_moving_right &1350 10 08 BPL &135a ; not_moving_right &1352 a5 5d LDA &5d ; player_x &1354 c9 1d CMP #&1d &1356 f0 02 BEQ &135a ; not_moving_right # Can't move beyond right edge of screen &1358 e6 5d INC &5d ; player_x ; not_moving_right &135a a5 64 LDA &64 ; turn_direction # Non-zero if player is turning &135c d0 0d BNE &136b ; update_turning_player &135e 20 9e 10 JSR &109e ; check_for_player_turning &1361 10 3a BPL &139d ; to_plot_or_unplot_player &1363 a5 63 LDA &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &1365 49 fe EOR #&fe &1367 85 64 STA &64 ; turn_direction &1369 d0 32 BNE &139d ; to_plot_or_unplot_player # Always branches ; update_turning_player &136b a5 65 LDA &65 ; player_sprite &136d c9 01 CMP #&01 &136f f0 0b BEQ &137c ; not_first_or_last_stage_of_turn &1371 c9 09 CMP #&09 &1373 f0 07 BEQ &137c ; not_first_or_last_stage_of_turn &1375 a5 ba LDA &ba ; player_y_offset_from_screen_edge &1377 18 CLC &1378 65 64 ADC &64 ; turn_direction &137a 85 ba STA &ba ; player_y_offset_from_screen_edge &137c c6 67 DEC &67 ; turn_cooldown &137e 10 1d BPL &139d ; to_plot_or_unplot_player &1380 a9 01 LDA #&01 &1382 85 67 STA &67 ; turn_cooldown &1384 a5 65 LDA &65 ; player_sprite &1386 c9 05 CMP #&05 # Is this the midpoint of the turn? &1388 d0 04 BNE &138e ; skip_changing_direction &138a a6 64 LDX &64 ; turn_direction &138c 86 63 STX &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up ; skip_changing_direction &138e 18 CLC &138f 65 64 ADC &64 ; turn_direction &1391 85 65 STA &65 ; player_sprite &1393 f0 04 BEQ &1399 ; end_turn # Is the end of the turn? &1395 c9 0a CMP #&0a &1397 d0 04 BNE &139d ; to_plot_or_unplot_player ; end_turn &1399 a9 00 LDA #&00 &139b 85 64 STA &64 ; turn_direction # Set to zero to indicate player not turning ; to_plot_or_unplot_player &139d 4c d2 15 JMP &15d2 ; plot_or_unplot_player # Plot player ; get_tile_and_chunk &13a0 a5 00 LDA &00 ; x &13a2 4a LSR A &13a3 4a LSR A &13a4 4a LSR A &13a5 85 03 STA &03 ; tile_offset &13a7 a5 01 LDA &01 ; y_low &13a9 29 fc AND #&fc &13ab 05 03 ORA &03 ; tile_offset &13ad 85 08 STA &08 ; tile_address_low &13af a5 02 LDA &02 ; y_high &13b1 18 CLC &13b2 69 27 ADC #&27 ; &2700 = level_data &13b4 65 6b ADC &6b ; level_data_offset_high &13b6 85 09 STA &09 ; tile_address_high &13b8 a0 00 LDY #&00 &13ba b1 08 LDA (&08),Y ; tile_address &13bc 85 0f STA &0f ; tile &13be 20 a9 17 JSR &17a9 ; calculate_tile_chunks_data_address &13c1 a5 01 LDA &01 ; y_low &13c3 29 03 AND #&03 &13c5 0a ASL A &13c6 0a ASL A &13c7 0a ASL A &13c8 85 07 STA &07 ; chunk_offset &13ca a5 00 LDA &00 ; x &13cc 29 07 AND #&07 &13ce 05 07 ORA &07 ; chunk_offset &13d0 a8 TAY &13d1 b1 04 LDA (&04),Y ; chunks_data_address &13d3 cd fe 26 CMP &26fe ; first_collidable_chunk &13d6 60 RTS ; destroy_tile &13d7 a5 08 LDA &08 ; tile_address_low &13d9 85 0a STA &0a ; destroyed_tile_address_low &13db a5 09 LDA &09 ; tile_address_high &13dd 85 0b STA &0b ; destroyed_tile_address_high &13df a5 00 LDA &00 ; x &13e1 29 18 AND #&18 &13e3 85 07 STA &07 ; sprite_x &13e5 a5 01 LDA &01 ; y_low &13e7 29 fc AND #&fc &13e9 85 08 STA &08 ; sprite_y &13eb 20 4f 16 JSR &164f ; calculate_sprite_screen_address_subtracting_screen_edge &13ee a5 0f LDA &0f ; tile &13f0 20 a9 17 JSR &17a9 ; calculate_tile_chunks_data_address &13f3 a5 04 LDA &04 ; chunks_data_address_low &13f5 85 06 STA &06 ; old_chunks_data_address_low &13f7 a5 05 LDA &05 ; chunks_data_address_high &13f9 85 07 STA &07 ; old_chunks_data_address_high &13fb a5 0f LDA &0f ; tile &13fd a0 00 LDY #&00 &13ff 84 08 STY &08 ; chunk_offset &1401 c9 17 CMP #&17 ; TILE_COVERED_ORB &1403 d0 04 BNE &1409 ; mark_tile_as_destroyed &1405 a9 26 LDA #&26 ; TILE_EXPOSED_ORB &1407 d0 02 BNE &140b ; set_new_tile # Always branches ; mark_tile_as_destroyed &1409 49 80 EOR #&80 # Set top bit to indicate tile is destroyed ; set_new_tile &140b 91 0a STA (&0a),Y ; destroyed_tile_address &140d 20 a9 17 JSR &17a9 ; calculate_tile_chunks_data_address &1410 a2 03 LDX #&03 ; replot_destroyed_tile_group_loop &1412 86 0e STX &0e ; groups &1414 a2 07 LDX #&07 ; replot_destroyed_tile_chunk_loop &1416 a4 08 LDY &08 ; chunk_offset &1418 e6 08 INC &08 ; chunk_offset &141a b1 04 LDA (&04),Y ; chunks_data_address &141c d1 06 CMP (&06),Y ; old_chunks_data_address &141e f0 31 BEQ &1451 ; skip_replotting_chunk &1420 85 f5 STA &f5 ; sprite_address_low &1422 a9 00 LDA #&00 &1424 06 f5 ASL &f5 ; sprite_address_low &1426 2a ROL A &1427 06 f5 ASL &f5 ; sprite_address_low &1429 2a ROL A &142a 06 f5 ASL &f5 ; sprite_address_low &142c 2a ROL A &142d 69 50 ADC #&50 ; &5000 = chunk_data &142f 85 f6 STA &f6 ; sprite_address_high &1431 b1 06 LDA (&06),Y ; old_chunks_data_address &1433 85 f7 STA &f7 ; old_sprite_address_low &1435 a9 00 LDA #&00 &1437 06 f7 ASL &f7 ; old_sprite_address_low &1439 2a ROL A &143a 06 f7 ASL &f7 ; old_sprite_address_low &143c 2a ROL A &143d 06 f7 ASL &f7 ; old_sprite_address_low &143f 2a ROL A &1440 69 50 ADC #&50 ; &5000 = chunk_data &1442 85 f8 STA &f8 ; old_sprite_address_high &1444 a0 07 LDY #&07 ; replot_destroyed_tile_byte_loop &1446 b1 00 LDA (&00),Y ; screen_address &1448 51 f5 EOR (&f5),Y ; sprite_address &144a 51 f7 EOR (&f7),Y ; old_sprite_address &144c 91 00 STA (&00),Y ; screen_address &144e 88 DEY &144f 10 f5 BPL &1446 ; replot_destroyed_tile_byte_loop ; skip_replotting_chunk &1451 a5 00 LDA &00 ; screen_address_low &1453 18 CLC &1454 69 08 ADC #&08 &1456 85 00 STA &00 ; screen_address_low &1458 a5 01 LDA &01 ; screen_address_high &145a 69 00 ADC #&00 &145c 85 01 STA &01 ; screen_address_high &145e ca DEX &145f 10 b5 BPL &1416 ; replot_destroyed_tile_chunk_loop &1461 a5 01 LDA &01 ; screen_address_high &1463 18 CLC &1464 69 01 ADC #&01 &1466 20 4b 06 JSR &064b ; keep_screen_high_within_screen_memory &1469 85 01 STA &01 ; screen_address_high &146b a6 0e LDX &0e ; groups &146d ca DEX &146e 10 a2 BPL &1412 ; replot_destroyed_tile_group_loop &1470 60 RTS ; consider_collecting_orb &1471 a5 6c LDA &6c ; carrying_orb # Non-zero if carrying orb &1473 d0 30 BNE &14a5 ; leave # Can't collect orb if already carrying orb &1475 a9 03 LDA #&03 &1477 20 f7 04 JSR &04f7 ; play_sound # Play sound for collecting orb ; v vd vc vs pd pc ps &147a 04 00 00 00 ff 01 01 0c &1482 a2 0c LDX #&0c # Score 120 points for collecting orb &1484 20 b0 0f JSR &0fb0 ; add_to_score &1487 a9 01 LDA #&01 &1489 85 6c STA &6c ; carrying_orb # Set to non-zero to indicate carrying orb &148b 4c d7 13 JMP &13d7 ; destroy_tile ; check_for_player_collision_with_landscape &148e a6 5d LDX &5d ; player_x &1490 e8 INX &1491 86 00 STX &00 ; x &1493 a5 b8 LDA &b8 ; player_y_low &1495 18 CLC &1496 69 01 ADC #&01 &1498 85 01 STA &01 ; y_low &149a a5 b9 LDA &b9 ; player_y_high &149c 69 00 ADC #&00 &149e 85 02 STA &02 ; y_high &14a0 20 a0 13 JSR &13a0 ; get_tile_and_chunk # Returns carry clear if not collidable chunk &14a3 b0 01 BCS &14a6 ; is_collidable_chunk ; leave &14a5 60 RTS ; is_collidable_chunk &14a6 a5 0f LDA &0f ; tile &14a8 c9 04 CMP #&04 ; TILE_RUNWAY_BOTTOM + 1 &14aa 90 0f BCC &14bb ; consider_landing_on_runway &14ac c9 26 CMP #&26 ; TILE_OPEN_ORB &14ae f0 c1 BEQ &1471 ; consider_collecting_orb &14b0 aa TAX &14b1 bd 20 24 LDA &2420,X ; destroyed_tiles_table &14b4 c9 40 CMP #&40 ; TILE_COLLECTED_ORB # &40 in destroyed_tiles_table indicates obstacle &14b6 d0 ed BNE &14a5 ; leave &14b8 c6 5c DEC &5c ; player_killed # Set to negative to kill player (collision with obstacle) &14ba 60 RTS ; consider_landing_on_runway &14bb 48 PHA ; tile &14bc ad 69 0d LDA &0d69 ; level_flipped &14bf 4a LSR A # Carry set if level flipped vertically &14c0 68 PLA ; tile &14c1 90 02 BCC &14c5 ; not_flipped_vertically &14c3 49 01 EOR #&01 ; TILE_RUNWAY_BOTTOM ^ TILE_RUNWAY_TOP ; not_flipped_vertically &14c5 c9 03 CMP #&03 ; TILE_RUNWAY_BOTTOM &14c7 d0 04 BNE &14cd ; not_bottom_of_runway &14c9 24 63 BIT &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &14cb 10 09 BPL &14d6 ; is_on_runway # Can land if moving up onto bottom of runway ; not_bottom_of_runway &14cd c9 02 CMP #&02 ; TILE_RUNWAY_TOP &14cf d0 04 BNE &14d5 ; not_top_of_runway &14d1 24 63 BIT &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &14d3 30 01 BMI &14d6 ; is_on_runway # Can land if moving down onto top of runway ; not_top_of_runway &14d5 60 RTS ; is_on_runway &14d6 a5 64 LDA &64 ; turn_direction # Non-zero if player turning &14d8 f0 01 BEQ &14db ; land_on_runway # Can't land if turning &14da 60 RTS ; land_on_runway &14db a2 00 LDX #&00 ; initial delay &14dd a9 01 LDA #&01 # Positive to indicate landing &14df 20 07 15 JSR &1507 ; animate_taking_off_or_landing_on_runway &14e2 20 6b 15 JSR &156b ; consider_depositing_orb &14e5 20 dd 10 JSR &10dd ; unplot_missiles ; runway_loop &14e8 20 e9 09 JSR &09e9 ; check_for_escape &14eb 20 ea 06 JSR &06ea ; check_for_space_pressed &14ee 30 0a BMI &14fa ; start_take_off &14f0 a9 01 LDA #&01 ; CTRL &14f2 20 fc 06 JSR &06fc ; check_for_keypress &14f5 10 f1 BPL &14e8 ; runway_loop &14f7 20 6b 0a JSR &0a6b ; status_screen ; start_take_off &14fa 20 e7 0a JSR &0ae7 ; set_initial_player_position &14fd a5 5c LDA &5c ; player_killed # Positive non-zero if player has completed level &14ff 30 02 BMI &1503 ; to_take_off_runway &1501 d0 03 BNE &1506 ; leave ; to_take_off_runway &1503 4c c8 15 JMP &15c8 ; take_off_runway ; leave &1506 60 RTS ; animate_taking_off_or_landing_on_runway # Called with X = initial delay &1507 85 69 STA &69 ; taking_off_or_landing # Positive if landing, negative if taking off &1509 a9 01 LDA #&01 &150b 85 6e STA &6e ; suppress_player_input # Set to non-zero to suppress player input &150d 8a TXA &150e 48 PHA ; delay &150f a2 04 LDX #&04 ; &0004 &1511 a0 00 LDY #&00 &1513 a5 69 LDA &69 ; taking_off_or_landing &1515 10 04 BPL &151b ; set_frequency_delta &1517 a2 fc LDX #&fc ; &fffc = -4 &1519 a0 ff LDY #&ff ; set_frequency_delta &151b 8e 33 15 STX &1533 ; runway_sound_block + 4 (frequency delta low) &151e 8c 34 15 STY &1534 ; runway_sound_block + 5 (frequency delta high) &1521 08 PHP ; taking off or landing &1522 a2 00 LDX #&00 ; &0000 &1524 a0 00 LDY #&00 &1526 28 PLP ; off taking off or landing &1527 10 03 BPL &152c ; set_frequency &1529 a2 5a LDX #&5a ; &015a &152b c8 INY ; set_frequency &152c 20 f5 04 JSR &04f5 ; play_sound_on_channel_one # Play sound for taking off or landing on runway ; runway_sound_block ; v vd vc vs pd pc ps &152f 04 00 00 00 00 00 01 ff &1537 a5 5c LDA &5c ; player_killed &1539 85 a9 STA &a9 ; previous_player_killed &153b 68 PLA ; delay ; animate_taking_off_or_landing_on_runway_loop &153c 48 PHA ; delay &153d a8 TAY &153e c8 INY ; animate_taking_off_or_landing_on_runway_frame_loop &153f 98 TYA &1540 48 PHA ; frames_remaining &1541 20 c4 09 JSR &09c4 ; wait_for_vsync &1544 20 ea 11 JSR &11ea ; update_player_missiles &1547 68 PLA ; frames_remaining &1548 a8 TAY &1549 88 DEY &154a 10 f3 BPL &153f ; animate_taking_off_or_landing_on_runway_frame_loop &154c a9 00 LDA #&00 &154e 85 67 STA &67 ; turn_cooldown &1550 20 39 13 JSR &1339 ; update_player &1553 20 c9 17 JSR &17c9 ; update_enemies &1556 68 PLA ; delay &1557 18 CLC &1558 65 69 ADC &69 ; taking_off_or_landing &155a f0 04 BEQ &1560 ; finished_taking_off_or_landing &155c c9 0a CMP #&0a &155e d0 dc BNE &153c ; animate_taking_off_or_landing_on_runway_loop ; finished_taking_off_or_landing &1560 a9 00 LDA #&00 &1562 85 6e STA &6e ; suppress_player_input # Set to zero to permit player input &1564 a5 a9 LDA &a9 ; previous_player_killed &1566 85 5c STA &5c ; player_killed # Player can't be killed while taking off or landing &1568 4c 98 07 JMP &0798 ; initialise_sound ; consider_depositing_orb &156b a5 6c LDA &6c ; carrying_orb &156d f0 0b BEQ &157a ; reset_carrying_orb &156f a2 0c LDX #&0c # Score 120 points for depositing orb &1571 20 b0 0f JSR &0fb0 ; add_to_score &1574 a5 5b LDA &5b ; orbs &1576 f0 02 BEQ &157a ; reset_carrying_orb &1578 c6 5b DEC &5b ; orbs ; reset_carrying_orb &157a a9 00 LDA #&00 &157c 85 6c STA &6c ; carrying_orb # Set to zero to indicate not carrying orb &157e 60 RTS ; player_sprites_table &157f 00 ; &00 : SPRITE_PLAYER_DOWN &1580 01 ; &01 : SPRITE_PLAYER_TURNING_ONE &1581 02 ; &02 : SPRITE_PLAYER_TURNING_TWO &1582 03 ; &03 : SPRITE_PLAYER_TURNING_THREE &1583 04 ; &04 : SPRITE_PLAYER_TURNING_FOUR &1584 05 ; &05 : SPRITE_PLAYER_TURNING_FIVE &1585 06 ; &06 : SPRITE_PLAYER_TURNING_SIX &1586 03 ; &07 : SPRITE_PLAYER_TURNING_THREE &1587 07 ; &08 : SPRITE_PLAYER_TURNING_SEVEN &1588 08 ; &09 : SPRITE_PLAYER_TURNING_EIGHT &1589 09 ; &0a : SPRITE_PLAYER_UP &158a 10 ; &0b : SPRITE_EXPLOSION_ONE &158b 11 ; &0c : SPRITE_EXPLOSION_TWO &158c 12 ; &0d : SPRITE_EXPLOSION_THREE &158d 13 ; &0e : SPRITE_EXPLOSION_FOUR ; plot_level &158e 20 0d 04 JSR &040d ; initialise_screen &1591 a5 5e LDA &5e ; screen_edge_y_low &1593 38 SEC &1594 e9 20 SBC #&20 &1596 85 5e STA &5e ; screen_edge_y_low &1598 a5 5f LDA &5f ; screen_edge_y_high &159a e9 00 SBC #&00 &159c 85 5f STA &5f ; screen_edge_y_high &159e a9 ff LDA #&ff &15a0 a2 03 LDX #&03 ; initialise_enemies_loop &15a2 9d 27 01 STA &0127,X ; enemies_y # Set to negative to indicate no enemy in slot &15a5 ca DEX &15a6 10 fa BPL &15a2 ; initialise_enemies_loop &15a8 a9 00 LDA #&00 &15aa 85 89 STA &89 ; number_of_enemy_missiles_present &15ac 85 8a STA &8a ; number_of_player_missiles_present &15ae a2 07 LDX #&07 ; initialise_missiles_loop &15b0 9d 63 01 STA &0163,X ; missiles_direction # Set to zero to indicate no missile in slot &15b3 ca DEX &15b4 10 fa BPL &15b0 ; initialise_missiles_loop &15b6 a2 1f LDX #&1f ; scroll_into_level_loop &15b8 8a TXA &15b9 48 PHA ; count &15ba 20 e1 16 JSR &16e1 ; scroll_screen_down &15bd 68 PLA ; count &15be aa TAX &15bf ca DEX &15c0 10 f6 BPL &15b8 ; scroll_into_level_loop &15c2 20 05 07 JSR &0705 ; unhide_screen &15c5 4c d2 15 JMP &15d2 ; plot_or_unplot_player ; take_off_runway &15c8 20 8e 15 JSR &158e ; plot_level &15cb a2 0a LDX #&0a ; initial delay &15cd a9 ff LDA #&ff # Negative to indicate taking off &15cf 4c 07 15 JMP &1507 ; animate_taking_off_or_landing_on_runway ; plot_or_unplot_player &15d2 a5 5d LDA &5d ; player_x &15d4 85 07 STA &07 ; sprite_x &15d6 a5 b8 LDA &b8 ; player_y_low &15d8 85 08 STA &08 ; sprite_y &15da a6 65 LDX &65 ; player_sprite &15dc bd 7f 15 LDA &157f,X ; player_sprites_table ; plot_or_unplot_sprite &15df 85 0e STA &0e ; sprite_address_low &15e1 a9 00 LDA #&00 &15e3 85 0f STA &0f ; sprite_address_high &15e5 06 0e ASL &0e ; sprite_address_low &15e7 26 0f ROL &0f ; sprite_address_high &15e9 06 0e ASL &0e ; sprite_address_low &15eb 26 0f ROL &0f ; sprite_address_high &15ed 06 0e ASL &0e ; sprite_address_low &15ef 26 0f ROL &0f ; sprite_address_high &15f1 a5 0e LDA &0e ; sprite_address_low &15f3 85 0c STA &0c ; tmp_low # tmp = sprite * 8 &15f5 a5 0f LDA &0f ; sprite_address_high &15f7 85 0d STA &0d ; tmp_high &15f9 06 0e ASL &0e ; sprite_address_low &15fb 26 0f ROL &0f ; sprite_address_high &15fd 06 0e ASL &0e ; sprite_address_low &15ff 26 0f ROL &0f ; sprite_address_high &1601 06 0e ASL &0e ; sprite_address_low # sprite * 64 &1603 26 0f ROL &0f ; sprite_address_high &1605 a5 0e LDA &0e ; sprite_address_low &1607 18 CLC &1608 65 0c ADC &0c ; tmp_low &160a 85 0e STA &0e ; sprite_address_low &160c a5 0f LDA &0f ; sprite_address_high &160e 65 0d ADC &0d ; tmp_high &1610 85 0f STA &0f ; sprite_address_high &1612 a5 0e LDA &0e ; sprite_address_low # sprite_address = &1e80 + sprite * 72 &1614 69 80 ADC #&80 ; &1e80 = sprite_data &1616 85 0e STA &0e ; sprite_address_low &1618 a5 0f LDA &0f ; sprite_address_high &161a 69 1e ADC #&1e &161c 85 0f STA &0f ; sprite_address_high &161e 20 4f 16 JSR &164f ; calculate_sprite_screen_address_subtracting_screen_edge &1621 a2 02 LDX #&02 ; plot_sprite_group_loop &1623 a0 17 LDY #&17 ; plot_sprite_byte_loop &1625 b1 00 LDA (&00),Y ; screen_address &1627 51 0e EOR (&0e),Y ; sprite_address &1629 91 00 STA (&00),Y ; screen_address &162b 88 DEY &162c 10 f7 BPL &1625 ; plot_sprite_byte_loop &162e a5 00 LDA &00 ; screen_address_low &1630 18 CLC &1631 69 40 ADC #&40 # Move down a group &1633 85 00 STA &00 ; screen_address_low &1635 a5 01 LDA &01 ; screen_address_high &1637 69 01 ADC #&01 &1639 20 4b 06 JSR &064b ; keep_screen_high_within_screen_memory &163c 85 01 STA &01 ; screen_address_high &163e a5 0e LDA &0e ; sprite_address_low &1640 18 CLC &1641 69 18 ADC #&18 &1643 85 0e STA &0e ; sprite_address_low &1645 a5 0f LDA &0f ; sprite_address_high &1647 69 00 ADC #&00 &1649 85 0f STA &0f ; sprite_address_high &164b ca DEX &164c 10 d5 BPL &1623 ; plot_sprite_group_loop &164e 60 RTS ; calculate_sprite_screen_address_subtracting_screen_edge &164f a5 08 LDA &08 ; sprite_y &1651 38 SEC &1652 e5 5e SBC &5e ; screen_edge_y_low ; calculate_sprite_screen_address &1654 29 1f AND #&1f &1656 0a ASL A &1657 a8 TAY &1658 b9 57 06 LDA &0657,Y ; group_offsets_table &165b 18 CLC &165c 65 a0 ADC &a0 ; screen_start_address_low &165e 85 00 STA &00 ; screen_address_low &1660 b9 58 06 LDA &0658,Y ; group_offsets_table + 1 &1663 65 a1 ADC &a1 ; screen_start_address_high &1665 20 4b 06 JSR &064b ; keep_screen_high_within_screen_memory &1668 85 01 STA &01 ; screen_address_high &166a a5 07 LDA &07 ; sprite_x &166c 0a ASL A &166d a8 TAY &166e a5 00 LDA &00 ; screen_address_low &1670 18 CLC &1671 79 97 06 ADC &0697,Y ; column_offsets_table &1674 85 00 STA &00 ; screen_address_low &1676 a5 01 LDA &01 ; screen_address_high &1678 79 98 06 ADC &0698,Y ; column_offsets_table + 1 &167b 85 01 STA &01 ; screen_address_high &167d a5 00 LDA &00 ; screen_address_low &167f 18 CLC &1680 69 e0 ADC #&e0 ; &12e0 = &0140 * 15 + &20 &1682 85 00 STA &00 ; screen_address_low &1684 a5 01 LDA &01 ; screen_address_high &1686 69 12 ADC #&12 &1688 20 4b 06 JSR &064b ; keep_screen_high_within_screen_memory &168b 85 01 STA &01 ; screen_address_high &168d 60 RTS ; scroll_screen &168e a5 63 LDA &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &1690 30 4f BMI &16e1 ; scroll_screen_down ; scroll_screen_up &1692 a5 a0 LDA &a0 ; screen_start_address_low &1694 38 SEC &1695 e9 40 SBC #&40 # Scroll up a group &1697 85 a0 STA &a0 ; screen_start_address_low &1699 a5 a1 LDA &a1 ; screen_start_address_high &169b e9 01 SBC #&01 &169d 20 4b 06 JSR &064b ; keep_screen_high_within_screen_memory &16a0 85 a1 STA &a1 ; screen_start_address_high &16a2 a5 a0 LDA &a0 ; screen_start_address_low &16a4 18 CLC &16a5 69 20 ADC #&20 # Move right 16 pixels for left screen border &16a7 85 00 STA &00 ; screen_address_low &16a9 a5 a1 LDA &a1 ; screen_start_address_high &16ab 85 01 STA &01 ; screen_address_high &16ad a5 a2 LDA &a2 ; crtc_start_address_low &16af 38 SEC &16b0 e9 28 SBC #&28 &16b2 85 a2 STA &a2 ; crtc_start_address_low &16b4 a5 a3 LDA &a3 ; crtc_start_address_high &16b6 e9 00 SBC #&00 &16b8 c9 0a CMP #&0a &16ba d0 02 BNE &16be ; skip_underflow &16bc 69 04 ADC #&04 ; skip_underflow &16be 85 a3 STA &a3 ; crtc_start_address_high &16c0 a5 5e LDA &5e ; screen_edge_y_low &16c2 38 SEC &16c3 e9 10 SBC #&10 &16c5 85 02 STA &02 ; level_data_address_low &16c7 a5 5f LDA &5f ; screen_edge_y_high &16c9 e9 00 SBC #&00 &16cb 29 07 AND #&07 &16cd 85 03 STA &03 ; level_data_address_high &16cf a5 5e LDA &5e ; screen_edge_y_low &16d1 38 SEC &16d2 e9 01 SBC #&01 &16d4 85 5e STA &5e ; screen_edge_y_low &16d6 a5 5f LDA &5f ; screen_edge_y_high &16d8 e9 00 SBC #&00 &16da 29 07 AND #&07 &16dc 85 5f STA &5f ; screen_edge_y_high &16de 4c 32 17 JMP &1732 ; plot_landscape_strip ; scroll_screen_down &16e1 a5 a0 LDA &a0 ; screen_start_address_low &16e3 18 CLC &16e4 69 40 ADC #&40 # Scroll down a group &16e6 85 a0 STA &a0 ; screen_start_address_low &16e8 a5 a1 LDA &a1 ; screen_start_address_high &16ea 69 01 ADC #&01 &16ec 20 4b 06 JSR &064b ; keep_screen_high_within_screen_memory &16ef 85 a1 STA &a1 ; screen_start_address_high &16f1 a5 a0 LDA &a0 ; screen_start_address_low &16f3 18 CLC &16f4 69 e0 ADC #&e0 ; &26e0 = &0140 * 31 + &20 # Move right 16 pixels for left screen border &16f6 85 00 STA &00 ; screen_address_low &16f8 a5 a1 LDA &a1 ; screen_start_address_high &16fa 69 26 ADC #&26 &16fc 20 4b 06 JSR &064b ; keep_screen_high_within_screen_memory &16ff 85 01 STA &01 ; screen_address_high &1701 a5 a2 LDA &a2 ; crtc_start_address_low &1703 18 CLC &1704 69 28 ADC #&28 &1706 85 a2 STA &a2 ; crtc_start_address_low &1708 a5 a3 LDA &a3 ; crtc_start_address_high &170a 69 00 ADC #&00 &170c c9 10 CMP #&10 &170e d0 02 BNE &1712 ; skip_overflow &1710 e9 05 SBC #&05 ; skip_overflow &1712 85 a3 STA &a3 ; crtc_start_address_high &1714 a5 5e LDA &5e ; screen_edge_y_low &1716 18 CLC &1717 69 11 ADC #&11 &1719 85 02 STA &02 ; level_data_address_low &171b a5 5f LDA &5f ; screen_edge_y_high &171d 69 00 ADC #&00 &171f 29 07 AND #&07 &1721 85 03 STA &03 ; level_data_address_high &1723 a5 5e LDA &5e ; screen_edge_y_low &1725 18 CLC &1726 69 01 ADC #&01 &1728 85 5e STA &5e ; screen_edge_y_low &172a a5 5f LDA &5f ; screen_edge_y_high &172c 69 00 ADC #&00 &172e 29 07 AND #&07 &1730 85 5f STA &5f ; screen_edge_y_high ; plot_strip &1732 20 90 17 JSR &1790 ; calculate_level_data_address_and_offset &1735 a9 0d LDA #&0d ; Displayed screen start address register (low) &1737 8d 00 fe STA &fe00 ; video register number &173a a5 a2 LDA &a2 ; crtc_start_address_low &173c 8d 01 fe STA &fe01 ; video register value &173f a9 0c LDA #&0c ; Displayed screen start address register (high) &1741 8d 00 fe STA &fe00 ; video register number &1744 a5 a3 LDA &a3 ; crtc_start_address_high &1746 8d 01 fe STA &fe01 ; video register value &1749 a0 00 LDY #&00 ; plot_strip_tile_loop &174b 98 TYA &174c 48 PHA ; tile &174d b1 02 LDA (&02),Y ; level_data_address &174f 20 a9 17 JSR &17a9 ; calculate_tile_chunks_data_address &1752 a5 08 LDA &08 ; landscape_chunk_offset &1754 85 09 STA &09 ; chunk_offset &1756 a2 07 LDX #&07 ; plot_strip_chunk_loop &1758 a4 09 LDY &09 ; chunk_offset &175a e6 09 INC &09 ; chunk_offset &175c b1 04 LDA (&04),Y ; chunks_data_address &175e 85 06 STA &06 ; sprite_address_low &1760 a9 00 LDA #&00 &1762 06 06 ASL &06 ; sprite_address_low &1764 2a ROL A &1765 06 06 ASL &06 ; sprite_address_low &1767 2a ROL A &1768 06 06 ASL &06 ; sprite_address_low &176a 2a ROL A &176b 69 50 ADC #&50 ; &5000 = chunk_data &176d 85 07 STA &07 ; sprite_address_high &176f a0 07 LDY #&07 ; plot_strip_byte_loop &1771 b1 06 LDA (&06),Y ; sprite_address_low &1773 91 00 STA (&00),Y ; screen_address &1775 88 DEY &1776 10 f9 BPL &1771 ; plot_strip_byte_loop &1778 a5 00 LDA &00 ; screen_address_low &177a 18 CLC &177b 69 08 ADC #&08 # Move right a column &177d 85 00 STA &00 ; screen_address_low &177f a5 01 LDA &01 ; screen_address_high &1781 69 00 ADC #&00 &1783 85 01 STA &01 ; screen_address_high &1785 ca DEX &1786 10 d0 BPL &1758 ; plot_strip_chunk_loop &1788 68 PLA ; tile &1789 a8 TAY &178a c8 INY &178b c0 04 CPY #&04 &178d d0 bc BNE &174b ; plot_strip_tile_loop &178f 60 RTS ; calculate_level_data_address_and_offset &1790 a5 02 LDA &02 ; y_low &1792 29 03 AND #&03 &1794 0a ASL A &1795 0a ASL A &1796 0a ASL A &1797 85 08 STA &08 ; landscape_chunk_offset &1799 a5 02 LDA &02 ; y_low &179b 29 fc AND #&fc &179d 85 02 STA &02 ; level_data_address_low &179f a5 6b LDA &6b ; level_data_offset_high &17a1 18 CLC &17a2 65 03 ADC &03 ; y_high &17a4 69 27 ADC #&27 ; &2700 = level_data &17a6 85 03 STA &03 ; level_data_address_high &17a8 60 RTS ; calculate_tile_chunks_data_address &17a9 c9 80 CMP #&80 # Top bit set if tile destroyed &17ab 90 04 BCC &17b1 ; not_destroyed &17ad aa TAX &17ae bd a0 23 LDA &23a0,X ; destroyed_tiles_table - &80 ; not_destroyed &17b1 85 04 STA &04 ; chunks_data_address_low &17b3 a9 00 LDA #&00 &17b5 06 04 ASL &04 ; chunks_data_address_low &17b7 2a ROL A &17b8 06 04 ASL &04 ; chunks_data_address_low &17ba 2a ROL A &17bb 06 04 ASL &04 ; chunks_data_address_low &17bd 2a ROL A &17be 06 04 ASL &04 ; chunks_data_address_low &17c0 2a ROL A &17c1 06 04 ASL &04 ; chunks_data_address_low &17c3 2a ROL A &17c4 69 47 ADC #&47 ; &4700 = tile_chunks_data &17c6 85 05 STA &05 ; chunks_data_address_high &17c8 60 RTS ; update_enemies &17c9 a2 01 LDX #&01 &17cb a0 1b LDY #&1b &17cd 24 63 BIT &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &17cf 30 04 BMI &17d5 ; set_top_and_bottom_y &17d1 a2 03 LDX #&03 &17d3 a0 1d LDY #&1d ; set_top_and_bottom_y &17d5 86 50 STX &50 ; top_y_for_enemies &17d7 84 51 STY &51 ; bottom_y_for_enemies &17d9 a2 03 LDX #&03 ; update_enemies_loop &17db bd 27 01 LDA &0127,X ; enemies_y # Negative if no enemy in slot &17de 30 5d BMI &183d ; consider_next_enemy &17e0 85 81 STA &81 ; enemy_y &17e2 bd 23 01 LDA &0123,X ; enemies_x &17e5 85 80 STA &80 ; enemy_x &17e7 bd 2b 01 LDA &012b,X ; enemies_sprite &17ea 85 82 STA &82 ; enemy_sprite &17ec bd 33 01 LDA &0133,X ; enemies_x_direction &17ef 85 83 STA &83 ; enemy_x_direction &17f1 bd 2f 01 LDA &012f,X ; enemies_direction &17f4 85 84 STA &84 ; enemy_direction &17f6 bd 3b 01 LDA &013b,X ; enemies_previous_y &17f9 85 85 STA &85 ; enemy_previous_y &17fb bd 3f 01 LDA &013f,X ; enemies_explosion_sprite &17fe 85 8c STA &8c ; enemy_explosion_sprite &1800 86 6f STX &6f ; enemy_to_update &1802 a5 84 LDA &84 ; enemy_direction &1804 c5 63 CMP &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &1806 d0 0c BNE &1814 ; not_moving_in_same_direction_as_player &1808 49 fe EOR #&fe # Positive if moving down, negative if moving up &180a 85 84 STA &84 ; enemy_direction &180c a9 01 LDA #&01 &180e 85 50 STA &50 ; top_y_for_enemies &1810 a9 1d LDA #&1d &1812 85 51 STA &51 ; bottom_y_for_enemies ; not_moving_in_same_direction_as_player &1814 a5 85 LDA &85 ; enemy_previous_y &1816 c5 50 CMP &50 ; top_y_for_enemies &1818 90 07 BCC &1821 ; skip_unplotting &181a c5 51 CMP &51 ; bottom_y_for_enemies &181c b0 03 BCS &1821 ; skip_unplotting &181e 20 b5 18 JSR &18b5 ; plot_or_unplot_enemy # Unplot enemy ; skip_unplotting &1821 a5 81 LDA &81 ; enemy_y &1823 85 85 STA &85 ; enemy_previous_y &1825 20 c9 18 JSR &18c9 ; update_enemy &1828 a5 81 LDA &81 ; enemy_y &182a c9 02 CMP #&02 &182c 90 0a BCC &1838 ; skip_plotting &182e c9 1c CMP #&1c &1830 b0 06 BCS &1838 ; skip_plotting &1832 20 b5 18 JSR &18b5 ; plot_or_unplot_enemy # Plot enemy &1835 20 de 12 JSR &12de ; consider_adding_new_enemy_missile_from_enemy ; skip_plotting &1838 a6 6f LDX &6f ; enemy_to_update &183a 20 8d 18 JSR &188d ; update_enemy_variables ; consider_next_enemy &183d ca DEX &183e 10 9b BPL &17db ; update_enemies_loop &1840 20 5f 10 JSR &105f ; rnd &1843 c5 86 CMP &86 ; probability_of_adding_enemy &1845 90 01 BCC &1848 ; add_new_enemy &1847 60 RTS ; add_new_enemy &1848 a2 03 LDX #&03 ; find_free_slot_loop &184a bd 27 01 LDA &0127,X ; enemies_y # Negative if no enemy in slot &184d 30 04 BMI &1853 ; found_free_slot &184f ca DEX &1850 10 f8 BPL &184a ; find_free_slot_loop &1852 60 RTS ; found_free_slot &1853 a0 00 LDY #&00 &1855 a5 63 LDA &63 ; vertical_direction # Negative if scrolling down, positive if scrolling up &1857 10 01 BPL &185a ; get_enemy_y &1859 c8 INY ; get_enemy_y &185a b9 b1 18 LDA &18b1,Y ; new_enemies_y &185d 85 81 STA &81 ; enemy_y # Set y position for enemy from direction of scrolling &185f 85 85 STA &85 ; enemy_previous_y &1861 b9 b3 18 LDA &18b3,Y ; new_enemies_direction # Set y direction for enemy from direction of scrolling &1864 85 84 STA &84 ; enemy_direction &1866 20 5f 10 JSR &105f ; rnd # Set random x direction for enemy &1869 29 01 AND #&01 &186b a8 TAY &186c b9 b3 18 LDA &18b3,Y ; new_enemies_direction &186f 85 83 STA &83 ; enemy_x_direction ; get_random_enemy_x &1871 20 5f 10 JSR &105f ; rnd # Set random x position for enemy &1874 29 1f AND #&1f &1876 f0 f9 BEQ &1871 ; get_random_enemy_x &1878 c9 1d CMP #&1d &187a b0 f5 BCS &1871 ; get_random_enemy_x &187c 85 80 STA &80 ; enemy_x ; get_random_enemy_sprite &187e 20 5f 10 JSR &105f ; rnd # Set random sprite for enemy &1881 29 07 AND #&07 &1883 c9 06 CMP #&06 &1885 b0 f7 BCS &187e ; get_random_enemy_sprite &1887 85 82 STA &82 ; enemy_sprite &1889 a9 00 LDA #&00 &188b 85 8c STA &8c ; enemy_explosion_sprite # Set to zero to indicate enemy not exploding ; update_enemy_variables &188d a5 80 LDA &80 ; enemy_x &188f 9d 23 01 STA &0123,X ; enemies_x &1892 a5 81 LDA &81 ; enemy_y &1894 9d 27 01 STA &0127,X ; enemies_y &1897 a5 82 LDA &82 ; enemy_sprite &1899 9d 2b 01 STA &012b,X ; enemies_sprite &189c a5 83 LDA &83 ; enemy_x_direction &189e 9d 33 01 STA &0133,X ; enemies_x_direction &18a1 a5 84 LDA &84 ; enemy_direction &18a3 9d 2f 01 STA &012f,X ; enemies_direction &18a6 a5 85 LDA &85 ; enemy_previous_y &18a8 9d 3b 01 STA &013b,X ; enemies_previous_y &18ab a5 8c LDA &8c ; enemy_explosion_sprite &18ad 9d 3f 01 STA &013f,X ; enemies_explosion_sprite &18b0 60 RTS ; new_enemies_y ; u d &18b1 1f 00 ; new_enemies_direction ; u d &18b3 ff 01 ; plot_or_unplot_enemy &18b5 69 10 ADC #&10 # Position enemies relative to vertical centre of screen &18b6 65 5e ADC &5e ; screen_edge_y_low &18b8 29 1f AND #&1f &18bb 85 08 STA &08 ; sprite_y &18bd a5 80 LDA &80 ; enemy_x &18bf 85 07 STA &07 ; sprite_x &18c1 a5 82 LDA &82 ; enemy_sprite &18c3 18 CLC &18c4 69 0a ADC #&0a ; SPRITE_ENEMY_ONE &18c6 4c df 15 JMP &15df ; plot_or_unplot_sprite ; update_enemy &18c9 a5 8c LDA &8c ; enemy_explosion_sprite # Non-zero if enemy is exploding &18cb d0 2c BNE &18f9 ; is_exploding ; not_exploding &18cd a5 84 LDA &84 ; enemy_direction &18cf 18 CLC &18d0 65 81 ADC &81 ; enemy_y &18d2 f0 04 BEQ &18d8 ; remove_enemy # Remove enemy at top &18d4 c9 20 CMP #&20 &18d6 d0 02 BNE &18da ; set_enemy_y # and bottom of screen ; remove_enemy &18d8 a9 ff LDA #&ff # Set to negative to remove enemy ; set_enemy_y &18da 85 81 STA &81 ; enemy_y &18dc a5 80 LDA &80 ; enemy_x &18de 18 CLC &18df 65 83 ADC &83 ; enemy_x_direction &18e1 85 80 STA &80 ; enemy_x &18e3 f0 04 BEQ &18e9 ; flip_enemy_x_direction # Flip enemy x direction at left &18e5 c9 1d CMP #&1d &18e7 d0 08 BNE &18f1 ; consider_flipping_enemy_x_direction # and right edges of screen ; flip_enemy_x_direction &18e9 a5 83 LDA &83 ; enemy_x_direction &18eb 49 fe EOR #&fe &18ed 85 83 STA &83 ; enemy_x_direction &18ef d0 07 BNE &18f8 ; leave # Always branches ; consider_flipping_enemy_x_direction &18f1 20 5f 10 JSR &105f ; rnd &18f4 c9 08 CMP #&08 &18f6 90 f1 BCC &18e9 ; flip_enemy_x_direction # 1 in 32 chance of flipping enemy x direction otherwise &18f8 60 RTS ; leave ; is_exploding ; get_random_explosion_sprite &18f9 20 5f 10 JSR &105f ; rnd &18fc 29 03 AND #&03 &18fe 18 CLC &18ff 69 06 ADC #&06 ; SPRITE_EXPLOSION_ONE - SPRITE_ENEMY_ONE &1901 c5 8c CMP &8c ; enemy_explosion_sprite &1903 f0 f4 BEQ &18f9 ; get_random_explosion_sprite &1905 85 8c STA &8c ; enemy_explosion_sprite &1907 85 82 STA &82 ; enemy_sprite &1909 a5 84 LDA &84 ; enemy_direction &190b 18 CLC &190c 65 81 ADC &81 ; enemy_y &190e f0 04 BEQ &1914 ; remove_exploding_enemy &1910 c9 20 CMP #&20 &1912 d0 02 BNE &1916 ; set_exploding_enemy_y ; remove_exploding_enemy &1914 a9 ff LDA #&ff ; set_exploding_enemy_y &1916 85 81 STA &81 ; enemy_y &1918 60 RTS ; font_data # Stored as a series of five bit chunk types &1919 40 20 88 10 01 e0 28 20 8c 02 e0 18 61 8c 02 e0 18 63 8c 02 e0 18 53 8c 02 e0 98 02 8e 02 60 38 07 5d 01 ; "0" &193c 00 08 c4 00 00 00 3c a3 00 00 00 80 a3 00 00 00 80 a3 00 00 00 80 a3 00 00 00 80 a3 00 00 20 42 e7 20 05 ; "1" &195f 40 20 08 11 01 e0 49 00 8e 02 00 00 20 8c 02 00 00 61 4c 01 00 08 63 0a 00 40 18 53 00 00 e0 39 e7 20 05 ; "2" &1982 40 20 08 11 01 e0 49 00 8e 02 00 00 00 4e 01 00 80 08 15 00 00 00 00 0e 01 20 31 00 8e 02 60 38 08 5d 01 ; "3" &19a5 00 00 81 18 00 00 08 63 14 00 40 18 67 14 00 e0 28 70 14 00 e0 39 68 0c 05 00 00 70 14 00 00 00 f0 24 00 ; "4" &19c8 20 21 08 21 05 e0 28 00 00 00 e0 39 08 11 01 00 00 00 8e 02 00 00 00 8e 02 20 31 00 8e 02 60 38 08 5d 01 ; "5" &19eb 00 08 84 28 00 40 18 53 00 00 e0 98 02 00 00 e0 18 07 11 01 e0 28 00 8e 02 e0 28 00 8e 02 60 38 08 5d 01 ; "6" &1a0e 20 42 88 10 03 00 00 20 8c 02 00 00 61 4c 01 00 08 63 0a 00 00 1c 53 00 00 00 1c 05 00 00 00 3c 09 00 00 ; "7" &1a31 40 20 08 11 01 e0 28 00 8e 02 60 28 00 4e 01 00 1c 08 15 00 40 28 00 0e 01 e0 28 00 8e 02 60 38 08 5d 01 ; "8" &1a54 40 20 08 11 01 e0 28 00 8e 02 e0 28 00 8e 02 60 38 88 8c 02 00 00 20 8c 02 00 00 61 4c 01 00 44 e7 0a 00 ; "9" &1a77 40 20 08 11 01 e0 28 00 8e 02 e0 28 00 8e 02 e0 18 08 8d 02 e0 28 00 8e 02 e0 28 00 8e 02 e0 49 00 9e 04 ; "A" &1a9a 20 21 08 11 01 e0 28 00 8e 02 e0 28 00 4e 01 e0 18 08 15 00 e0 28 00 0e 01 e0 28 00 8e 02 e0 39 08 5d 01 ; "B" &1abd 40 20 08 11 01 e0 28 00 9e 04 e0 28 00 00 00 e0 28 00 00 00 e0 28 00 00 00 e0 28 00 12 03 60 38 08 5d 01 ; "C" &1ae0 20 21 84 08 00 e0 98 61 0c 01 e0 28 30 8c 02 e0 28 00 8e 02 e0 28 20 8c 02 e0 18 61 4c 01 e0 39 e7 0a 00 ; "D" &1b03 20 21 08 21 05 e0 28 00 00 00 e0 28 00 00 00 e0 18 08 29 00 e0 28 00 00 00 e0 28 00 00 00 e0 39 08 21 05 ; "E" &1b26 20 21 08 21 05 e0 28 00 00 00 e0 28 00 00 00 e0 18 08 29 00 e0 28 00 00 00 e0 28 00 00 00 e0 49 00 00 00 ; "F" &1b49 40 20 08 11 01 e0 28 00 9e 04 e0 28 00 00 00 e0 28 10 11 03 e0 28 00 8e 02 e0 28 00 8e 02 60 38 08 5d 01 ; "G" &1b6c 20 31 00 12 03 e0 28 00 8e 02 e0 28 00 8e 02 e0 18 08 8d 02 e0 28 00 8e 02 e0 28 00 8e 02 e0 49 00 9e 04 ; "H" &1b8f 20 42 84 20 05 00 80 a3 00 00 00 80 a3 00 00 00 80 a3 00 00 00 80 a3 00 00 00 80 a3 00 00 20 42 e7 20 05 ; "I" &1bb2 00 44 88 10 05 00 00 70 14 00 00 00 70 14 00 00 00 70 14 00 00 00 70 14 00 20 31 70 14 00 60 38 e8 0a 00 ; "J" &1bd5 20 31 20 10 03 e0 18 61 4c 01 e0 18 63 0a 00 e0 18 a3 00 00 e0 18 63 08 00 e0 98 61 0c 01 e0 49 30 9c 04 ; "K" &1bf8 20 31 00 00 00 e0 28 00 00 00 e0 28 00 00 00 e0 28 00 00 00 e0 28 00 00 00 e0 28 00 00 00 e0 39 08 21 05 ; "L" &1c1b 20 21 02 04 62 e0 18 05 8e 51 e0 18 87 9c 51 e0 28 b0 c0 51 e0 28 30 c1 51 e0 28 00 c0 51 e0 49 00 c0 93 ; "M" &1c3e 20 31 00 12 03 e0 18 02 8e 02 e0 18 43 8c 02 e0 18 63 8c 02 e0 98 61 8c 02 e0 28 30 8c 02 e0 49 00 9e 04 ; "N" &1c61 40 20 08 11 01 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 00 8e 02 60 38 08 5d 01 ; "O" &1c84 20 21 08 11 01 e0 28 00 8e 02 e0 28 00 8e 02 e0 18 08 5d 01 e0 28 00 00 00 e0 28 00 00 00 e0 49 00 00 00 ; "P" &1ca7 40 20 08 11 01 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 20 4c 01 e0 28 70 14 00 60 38 e8 1c 05 ; "Q" &1cca 20 21 08 11 01 e0 28 00 8e 02 e0 28 00 4e 01 e0 18 84 14 00 e0 98 61 14 00 e0 28 30 0c 01 e0 49 00 9e 04 ; "R" &1ced 40 20 08 11 01 e0 28 00 9e 04 e0 28 00 00 00 60 38 08 11 01 00 00 00 8e 02 20 31 00 8e 02 60 38 08 5d 01 ; "S" &1d10 20 42 84 20 05 00 80 a3 00 00 00 80 a3 00 00 00 80 a3 00 00 00 80 a3 00 00 00 80 a3 00 00 00 80 27 01 00 ; "T" &1d33 20 31 00 12 03 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 00 8e 02 60 38 08 5d 01 ; "U" &1d56 20 31 00 12 03 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 00 8e 02 e0 28 00 8e 02 60 18 84 4c 01 00 0c e7 0a 00 ; "V" &1d79 20 31 00 40 62 e0 28 00 c0 51 e0 28 d0 c0 51 e0 28 b0 c0 51 e0 18 e4 90 51 e0 18 05 8e 51 e0 b9 02 86 93 ; "W" &1d9c 20 31 00 12 03 e0 28 00 8e 02 60 38 84 5c 01 00 80 a3 00 00 40 20 e7 10 01 e0 28 00 8e 02 e0 49 00 9e 04 ; "X" &1dbf 20 31 00 12 03 e0 28 00 8e 02 e0 28 00 8e 02 60 18 84 4c 01 00 0c 63 0a 00 00 80 a3 00 00 00 80 27 01 00 ; "Y" &1de2 20 42 88 10 03 00 00 20 8c 02 00 00 61 4c 01 00 08 63 0a 00 40 18 53 00 00 e0 98 02 00 00 e0 39 07 21 05 ; "Z" &1e05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 21 84 10 03 e0 39 e7 9c 04 00 00 00 00 00 00 00 00 00 00 ; "[" (actually "-") ; font_chunks_sprite_data # Left two pixels of each byte &1e28 00 00 00 00 ; &00 &1e2c c0 c0 c0 c0 ; &00 &1e30 44 44 c8 c8 ; &00 &1e34 c0 c0 40 40 ; &00 &1e38 80 80 c0 c0 ; &00 &1e3c 84 84 08 08 ; &00 &1e40 c0 c0 c0 c0 ; &00 &1e44 c8 c8 c8 c8 ; &00 &1e48 cc cc c0 c0 ; &00 &1e4c cc cc c8 c8 ; &00 &1e50 84 84 84 84 ; &00 &1e54 8c 8c 8c 8c ; &00 &1e58 cc cc 84 84 ; &00 &1e5c cc cc 8c 8c ; &00 &1e60 c0 c0 0c 0c ; &00 &1e64 c8 c8 8c 8c ; &00 &1e68 cc cc 0c 0c ; &00 &1e6c cc cc 8c 8c ; &00 &1e70 84 84 0c 0c ; &00 &1e74 8c 8c 8c 8c ; &00 &1e78 cc cc 0c 0c ; &00 &1e7c cc cc 8c 8c ; &00 ; sprite_data ; sprite_00 (SPRITE_PLAYER_DOWN) &1e80 02 03 07 25 2d 78 78 78 00 00 00 09 09 0f f0 0f &1e90 04 0c 0e 4a 4b e1 e1 e1 69 69 69 69 69 0f 17 77 &1ea0 6f f9 f9 f9 f9 f9 f9 60 69 69 69 69 69 0f 8e ee &1eb0 33 22 22 00 00 00 00 00 60 60 60 60 60 60 60 60 &1ec0 cc 44 44 00 00 00 00 00 ; sprite_01 (SPRITE_PLAYER_TURNING_ONE) &1ec8 00 00 00 02 03 07 25 2d 00 00 00 00 00 00 09 09 &1ed8 00 00 00 04 0c 0e 4a 4b 69 78 69 69 2d 25 07 33 &1ee8 0f f0 0f 6f f9 f9 60 60 69 e1 69 69 4b 4a 0e cc &1ef8 22 22 00 00 00 00 00 00 60 60 60 60 60 00 00 00 &1f08 44 44 00 00 00 00 00 00 ; sprite_02 (SPRITE_PLAYER_TURNING_TWO) &1f10 00 00 00 00 00 00 02 03 00 00 00 00 00 00 00 00 &1f20 00 00 00 00 00 00 04 0c 07 25 3c 3c 25 07 03 22 &1f30 00 09 0f 0f 6f 60 60 60 0e 4a c3 c3 4a 0e 0c 44 &1f40 00 00 00 00 00 00 00 00 60 60 00 00 00 00 00 00 &1f50 00 00 00 00 00 00 00 00 ; sprite_03 (SPRITE_PLAYER_TURNING_THREE) &1f58 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00 &1f68 00 00 00 00 00 00 00 0c 25 2d 3e 3e 2d 25 03 00 &1f78 09 09 69 69 09 09 00 00 4a 4b c7 c7 4b 4a 0c 00 &1f88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &1f98 00 00 00 00 00 00 00 00 ; sprite_04 (SPRITE_PLAYER_TURNING_FOUR) &1fa0 00 00 00 06 1e 3c 7b f3 00 00 00 00 00 08 08 08 &1fb0 00 00 00 00 00 00 00 00 87 07 03 00 00 00 00 00 &1fc0 08 08 48 68 61 21 01 01 00 00 00 00 00 0c 0e de &1fd0 00 00 00 00 00 00 00 00 01 01 01 00 00 00 00 00 &1fe0 fc 69 c3 87 06 00 00 00 ; sprite_05 (SPRITE_PLAYER_TURNING_FIVE) &1fe8 00 00 00 00 01 01 01 01 00 00 0f 0f f6 f6 69 69 &1ff8 00 00 00 00 08 08 08 08 00 00 00 00 00 00 00 00 &2008 0f 0f 60 60 60 60 0f 0f 00 00 00 00 00 00 00 00 &2018 01 01 01 01 00 00 00 00 69 69 f6 f6 0f 0f 00 00 &2028 08 08 08 08 00 00 00 00 ; sprite_06 (SPRITE_PLAYER_TURNING_SIX) &2030 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 01 &2040 00 00 00 06 87 c3 ed fc 00 00 00 00 00 03 07 b7 &2050 01 01 21 61 68 48 08 08 1e 0e 0c 00 00 00 00 00 &2060 f3 69 3c 1e 06 00 00 00 08 08 08 00 00 00 00 00 &2070 00 00 00 00 00 00 00 00 ; sprite_07 (SPRITE_PLAYER_TURNING_SEVEN) &2078 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 60 &2088 00 00 00 00 00 00 00 00 22 03 07 25 3c 3c 25 07 &2098 60 60 60 6f 0f 0f 09 00 44 0c 0e 4a c3 c3 4a 0e &20a8 03 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &20b8 0c 04 00 00 00 00 00 00 ; sprite_08 (SPRITE_PLAYER_TURNING_EIGHT) &20c0 00 00 00 00 00 00 22 22 00 00 00 60 60 60 60 60 &20d0 00 00 00 00 00 00 44 44 33 07 25 2d 69 69 78 69 &20e0 60 60 f9 f9 6f 0f f0 0f cc 0e 4a 4b 69 69 e1 69 &20f0 2d 25 07 03 02 00 00 00 09 09 00 00 00 00 00 00 &2100 4b 4a 0e 0c 04 00 00 00 ; sprite_09 (SPRITE_PLAYER_UP) &2108 00 00 00 00 00 22 22 33 60 60 60 60 60 60 60 60 &2118 00 00 00 00 00 44 44 cc 77 17 0f 69 69 69 69 69 &2128 60 f9 f9 f9 f9 f9 f9 6f ee 8e 0f 69 69 69 69 69 &2138 78 78 78 2d 25 07 03 02 0f f0 0f 09 09 00 00 00 &2148 e1 e1 e1 4b 4a 0e 0c 04 ; sprite_0a (SPRITE_ENEMY_ONE) &2150 00 00 00 00 00 11 32 74 66 e9 e9 e9 e9 f0 f0 ff &2160 00 00 00 00 00 08 84 c2 f9 fa fa fa fa fa fa e9 &2170 f0 f6 e9 e9 e9 e9 96 f0 69 a5 a5 a5 a5 a5 a5 69 &2180 34 12 01 00 00 00 00 00 0f f0 f0 e9 e9 e9 e9 06 &2190 c2 84 08 00 00 00 00 00 ; sprite_0b (SPRITE_ENEMY_TWO) &2198 11 11 32 32 74 74 f8 0f 99 19 19 19 19 19 f0 e1 &21a8 88 08 84 84 c2 c2 e1 0f 00 11 32 74 12 01 00 ff &21b8 ca e1 fe da 9e e1 ca f1 00 00 08 84 08 00 00 ef &21c8 f8 f8 34 34 12 12 01 01 f0 19 19 19 19 19 19 09 &21d8 e1 e1 c2 c2 84 84 08 08 ; sprite_0c (SPRITE_ENEMY_THREE) &21e0 66 e9 f8 f8 34 12 01 00 00 00 19 f6 f0 f0 f0 69 &21f0 66 e9 e1 e1 c2 84 08 00 11 32 74 f9 e9 34 12 01 &2200 f0 f6 e9 f6 d6 69 96 f0 88 c4 e2 69 69 c2 84 08 &2210 00 11 32 74 f8 f8 e9 06 69 f0 f0 f0 96 09 00 00 &2220 00 88 c4 e2 e1 e1 69 06 ; sprite_0d (SPRITE_ENEMY_FOUR) &2228 00 00 11 32 74 f8 78 34 00 66 f9 f0 f6 e9 e9 e9 &2238 00 00 88 84 c2 e1 e1 c2 32 32 74 f8 f8 78 34 32 &2248 e9 e9 e9 96 f0 f6 e9 e9 84 84 e2 f1 e1 e1 c2 84 &2258 32 74 f8 f8 34 12 01 00 e9 e9 e9 e9 96 f0 69 06 &2268 84 e2 f1 e1 c2 84 08 00 ; sprite_0e (SPRITE_ENEMY_FIVE) &2270 44 ca e9 74 32 11 dd 9d 00 00 00 19 f6 f0 f6 d6 &2280 22 65 e9 c2 84 08 3b 2b 9d 9d bf f8 f8 9f 9d 9d &2290 d6 d6 d6 d6 d6 d6 d6 d6 2b 2b 6f e1 e1 0f 2b 2b &22a0 9d 9d 11 32 74 e9 ca 04 d6 d6 f0 96 09 00 00 00 &22b0 2b 2b 08 84 c2 69 25 02 ; sprite_0f (SPRITE_ENEMY_SIX) &22b8 00 11 76 f8 f8 34 12 11 ff f0 f0 ff e9 8f f0 f0 &22c8 00 08 86 e1 e1 c2 84 08 11 11 11 11 11 11 11 11 &22d8 f6 d6 d6 d6 d6 d6 d6 d6 08 08 08 08 08 08 08 08 &22e8 11 32 74 f8 f8 16 01 00 f0 f0 ff e9 8f f0 f0 0f &22f8 08 84 c2 e1 e1 86 08 00 ; sprite_10 (SPRITE_EXPLOSION_ONE) &2300 00 40 60 30 30 f0 61 e1 00 40 f0 f0 87 2f 6f 6f &2310 00 c0 e0 f0 f0 48 48 48 70 70 30 61 43 c3 e1 43 &2320 2f 0f 0f 2f ef ef ef 6f 68 c0 80 c0 68 c0 68 68 &2330 61 30 30 70 f0 e0 a0 00 2f 0f 87 d2 f0 70 20 00 &2340 48 48 e0 e0 c0 80 c0 60 ; sprite_11 (SPRITE_EXPLOSION_TWO) &2348 00 c0 60 70 30 21 61 61 10 40 f0 f0 3c 0f ff ef &2358 80 80 d0 f0 48 48 68 68 30 70 10 00 10 30 70 30 &2368 6f a7 a7 b7 b7 6f 5e 4f c0 c0 68 68 68 48 80 80 &2378 21 61 30 30 10 10 30 20 4f 6f 0f 87 f0 b0 00 00 &2388 c0 80 c0 48 c0 00 00 00 ; sprite_12 (SPRITE_EXPLOSION_THREE) &2390 00 70 f0 43 61 21 21 21 00 00 c0 78 78 0f cf de &23a0 00 00 40 c0 80 80 80 80 61 70 30 10 30 70 70 21 &23b0 5e 6f a7 3f 6f 6f 6f 7f e0 e0 48 48 48 f0 f0 48 &23c0 21 21 61 30 10 10 50 70 ff 8f 3c f0 e0 80 00 00 &23d0 68 48 48 e0 e0 a0 30 10 ; sprite_13 (SPRITE_EXPLOSION_FOUR) &23d8 00 00 10 10 30 e1 70 30 00 e0 e0 b4 0f 6f 6f 2f &23e8 00 00 00 80 80 80 c0 c0 10 30 f0 50 10 10 30 70 &23f8 a7 3f 6f 6f 2f a7 2f 6f 78 2c 68 e0 48 48 68 c0 &2408 e1 a1 21 21 61 30 10 00 4f de 0f 4b 78 f0 a0 00 &2418 80 c0 e0 e0 a0 80 00 00 ; destroyed_tiles_table ; 0 1 2 3 4 5 6 7 8 9 a b c d e f &2420 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 ; &00 &2430 40 40 40 40 40 40 40 47 40 41 40 40 42 40 40 40 ; &10 &2440 40 40 40 40 43 44 40 40 40 40 40 40 40 45 40 40 ; &20 &2450 46 40 40 40 40 40 47 40 40 40 40 40 40 40 40 40 ; &30 &2460 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 ; &40 # Bytes &40 - &4f are unused &2470 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 ; &50 ; tune_channel_1_data &2480 71 0c &2482 71 0c &2484 71 0c &2486 71 0c &2488 71 0c &248a 71 0c &248c 79 06 &248e 71 06 &2490 6d 06 &2492 71 06 &2494 8d 0c &2496 8d 0c &2498 8d 0c &249a 8d 0c &249c 8d 0c &249e 8d 0c &24a0 95 06 &24a2 8d 06 &24a4 89 06 &24a6 8d 06 &24a8 81 0c &24aa 81 0c &24ac 95 0c &24ae 95 0c &24b0 79 0c &24b2 79 0c &24b4 8d 0c &24b6 8d 0c &24b8 81 0c &24ba 81 0c &24bc 95 0c &24be 95 0c &24c0 79 0c &24c2 79 0c &24c4 8d 0c &24c6 8d 0c &24c8 8d 0c &24ca 8d 0c &24cc 8d 0c &24ce 8d 0c &24d0 8d 0c &24d2 8d 0c &24d4 95 06 &24d6 8d 06 &24d8 89 06 &24da 8d 06 &24dc a1 0c &24de a1 0c &24e0 a1 0c &24e2 a1 0c &24e4 a1 0c &24e6 a1 0c &24e8 a9 06 &24ea a1 06 &24ec 9d 06 &24ee a1 06 &24f0 9d 0c &24f2 9d 0c &24f4 b1 0c &24f6 b1 0c &24f8 95 0c &24fa 95 0c &24fc a9 0c &24fe a9 0c &2500 9d 0c &2502 9d 0c &2504 b1 0c &2506 b1 0c &2508 95 0c &250a 95 0c &250c a9 0c &250e a9 0c &2510 9d 0c &2512 9d 0c &2514 bd 30 &2516 b5 18 &2518 9d 18 &251a b5 30 &251c b1 18 &251e a9 18 &2520 9d 18 &2522 9d 0c &2524 95 0c &2526 8d 0c &2528 85 0c &252a 81 18 &252c 8d 18 &252e a1 30 &2530 a1 18 &2532 9d 0c &2534 95 0c &2536 8d 0c &2538 85 0c &253a 81 0c &253c 79 0c &253e 71 0c &2540 9d 0c &2542 a1 30 &2544 9d 18 &2546 8d 18 &2548 a1 30 &254a 9d 18 &254c a1 0c &254e a1 0c &2550 95 0c &2552 95 0c &2554 a9 0c &2556 a9 0c &2558 9d 0c &255a 9d 0c &255c b1 0c &255e b1 0c &2560 9d 0c &2562 9d 0c &2564 95 0c &2566 95 0c &2568 95 0c &256a 95 0c &256c 8d 18 &256e 9d 30 &2570 9d 18 &2572 95 18 &2574 89 0c &2576 8d 0c &2578 85 30 &257a 8d 0c &257c 9d 0c &257e 9d 0c &2580 95 06 &2582 9d 06 &2584 a1 0c &2586 a1 0c &2588 95 0c &258a 95 0c &258c a9 0c &258e a9 0c &2590 9d 0c &2592 95 06 &2594 9d 06 &2596 a1 0c &2598 a1 0c &259a 95 0c &259c 95 0c &259e 9d 0c &25a0 9d 0c &25a2 b1 0c &25a4 b1 0c &25a6 95 0c &25a8 95 0c &25aa a9 0c &25ac a9 0c ; tune_channel_2_data &25ae 71 0c &25b0 71 0c &25b2 71 0c &25b4 71 0c &25b6 71 0c &25b8 71 0c &25ba 79 06 &25bc 71 06 &25be 6d 06 &25c0 79 06 &25c2 8d 0c &25c4 8d 0c &25c6 8d 0c &25c8 8d 0c &25ca 8d 0c &25cc 8d 0c &25ce 95 06 &25d0 8d 06 &25d2 89 06 &25d4 8d 06 &25d6 81 0c &25d8 81 0c &25da 95 0c &25dc 95 0c &25de 79 0c &25e0 79 0c &25e2 8d 0c &25e4 8d 0c &25e6 81 0c &25e8 81 0c &25ea 95 0c &25ec 95 0c &25ee 79 0c &25f0 79 0c &25f2 8d 0c &25f4 8d 0c &25f6 81 0c &25f8 85 0c &25fa 81 0c &25fc 79 0c &25fe 71 0c &2600 79 0c &2602 71 0c &2604 6d 0c &2606 65 0c &2608 6d 0c &260a 71 0c &260c 79 0c &260e 7d 0c &2610 81 0c &2612 85 0c &2614 89 0c &2616 8d 0c &2618 9d 0c &261a 8d 30 &261c 89 18 &261e 8d 0c &2620 9d 0c &2622 8d 30 &2624 89 18 &2626 8d 0c &2628 8d 0c &262a b1 0c &262c b1 0c &262e 95 0c &2630 95 0c &2632 a9 0c &2634 a9 0c &2636 9d 0c &2638 9d 0c &263a a9 0c &263c a9 0c &263e 8d 0c &2640 8d 0c &2642 a1 0c &2644 a1 0c &2646 a1 18 &2648 9d 0c &264a 95 0c &264c 8d 0c &264e 85 0c &2650 81 0c &2652 79 0c &2654 41 0c &2656 41 0c &2658 41 0c &265a 41 0c &265c 41 0c &265e 41 0c &2660 49 06 &2662 41 06 &2664 3d 06 &2666 41 06 &2668 5d 0c &266a 5d 0c &266c 5d 0c &266e 5d 0c &2670 5d 0c &2672 5d 0c &2674 65 06 &2676 5d 06 &2678 59 06 &267a 5d 06 &267c 51 0c &267e 51 0c &2680 65 0c &2682 65 0c &2684 49 0c &2686 49 0c &2688 5d 0c &268a 5d 0c &268c 51 0c &268e 51 0c &2690 65 0c &2692 65 0c &2694 49 0c &2696 49 0c &2698 5d 0c &269a 5d 0c &269c 41 0c &269e 41 0c &26a0 49 0c &26a2 49 0c &26a4 3d 0c &26a6 3d 0c &26a8 51 0c &26aa 51 0c &26ac 41 0c &26ae 3d 0c &26b0 5d 30 &26b2 59 18 &26b4 2d 0c &26b6 2d 0c &26b8 2d 0c &26ba 2d 0c &26bc 2d 0c &26be 2d 0c &26c0 35 06 &26c2 2d 06 &26c4 29 06 &26c6 2d 06 &26c8 49 0c &26ca 49 0c &26cc 49 0c &26ce 49 0c &26d0 49 0c &26d2 49 0c &26d4 51 06 &26d6 49 06 &26d8 45 06 &26da 49 06 &26dc 3d 0c &26de 3d 0c &26e0 51 0c &26e2 51 0c &26e4 35 0c &26e6 35 0c &26e8 49 0c &26ea 49 0c &26ec 3d 0c &26ee 3d 0c &26f0 51 0c &26f2 51 0c &26f4 35 0c &26f6 35 0c &26f8 49 0c &26fa 49 0c &26fc 5d 60 ; end_of_tune_data ; first_collidable_chunk &26fe cc ; unused &26ff 00 ; level_data ; level_0_data &2700 04 00 01 00 04 00 03 05 04 00 04 00 0b 0c 04 12 &2710 06 09 04 00 08 04 04 00 07 0b 08 2a 0c 0a 09 00 &2720 09 17 04 00 0b 0c 04 00 06 09 04 00 04 0b 08 17 &2730 04 06 07 00 04 04 2b 3a 04 04 2e 35 04 04 2f 36 &2740 04 0b 2e 3d 04 0a 2f 36 04 12 2e 36 04 17 2f 3d &2750 0b 0c 2e 36 0a 09 33 32 22 0b 0c 00 00 06 09 24 &2760 00 04 0b 0c 00 04 0a 09 24 04 00 0b 00 04 3c 0a &2770 00 04 00 24 00 2b 2c 00 00 33 32 12 1d 1e 1d 1e &2780 1f 3c 1f 1f 1f 1f 1f 3c 14 1f 1f 1f 20 21 20 21 &2790 05 39 3a 0c 0c 33 32 09 09 00 0d 08 0b 0c 06 07 &27a0 0a 09 04 05 00 04 04 00 17 0b 08 00 2a 06 07 12 &27b0 00 04 18 00 00 04 2a 00 00 04 00 17 00 04 00 00 &27c0 39 3b 3a 00 2e 25 35 22 2d 1b 36 00 2f 1b 3d 00 &27d0 34 1c 36 24 2d 16 3d 00 2d 02 36 00 2d 01 3d 00 &27e0 2d 01 36 24 2d 01 3d 00 2d 03 36 00 2d 16 2e 0f &27f0 34 19 19 10 33 37 37 32 04 04 04 04 04 04 04 04 &2800 04 04 04 04 04 04 0b 08 04 04 06 09 04 0b 08 04 &2810 04 06 07 04 2b 3a 0c 04 2e 35 09 04 2f 36 04 04 &2820 33 32 04 04 04 17 04 04 0b 02 08 04 0a 01 07 04 &2830 22 01 12 04 00 01 00 04 23 03 00 04 00 00 22 04 &2840 00 39 3b 3a 00 34 19 30 00 34 19 30 17 34 19 30 &2850 00 34 19 30 00 2f 1a 35 00 2d 1b 36 17 2f 1b 3d &2860 39 38 19 36 2d 1c 1b 3d 34 1c 19 36 34 1c 1b 3d &2870 34 1c 1b 36 2d 19 19 3d 2e 25 19 36 2d 19 19 3d &2880 2f 19 25 36 2e 19 19 3d 2f 25 19 36 2d 19 19 3d &2890 2e 19 25 36 2d 19 19 3d 2f 25 19 36 2e 19 19 3d &28a0 2f 19 25 36 2d 19 19 3d 2e 25 19 36 2d 19 19 3d &28b0 2f 19 25 36 2e 19 19 3d 2f 25 19 36 2d 19 19 3d &28c0 2e 19 25 36 2d 19 19 3d 2f 25 19 36 2e 19 19 3d &28d0 2f 19 25 36 2d 19 19 3d 2e 25 19 36 2d 19 19 3d &28e0 2f 19 25 36 2e 19 19 3d 2f 25 19 36 2d 19 19 3d &28f0 2e 19 25 36 2d 19 19 3d 2f 1a 19 36 2e 1c 1c 36 &2900 33 37 37 32 00 00 00 00 12 2b 3a 00 00 2e 13 00 &2910 00 2e 13 17 39 38 30 00 2f 02 30 00 2e 01 35 00 &2920 2d 01 19 3a 2d 01 19 35 33 03 37 32 00 04 00 00 &2930 2a 04 00 17 00 04 00 00 00 02 00 24 00 01 0c 00 &2940 24 01 09 00 23 01 0b 0c 00 03 0a 09 0c 00 24 0b &2950 09 05 00 0a 0b 0c 00 00 0a 09 12 05 00 0b 0c 00 &2960 18 06 09 00 00 04 0b 0c 00 04 0a 09 2a 04 00 04 &2970 00 04 17 04 00 04 00 04 00 04 2a 04 18 04 00 04 &2980 00 04 0d 08 12 04 06 09 00 0b 08 04 00 06 09 04 &2990 17 04 04 04 00 04 04 04 00 04 04 04 18 04 04 04 &29a0 00 04 04 04 00 0b 08 04 2a 06 07 04 00 0b 0c 04 &29b0 00 0a 09 04 00 3c 0b 08 05 17 0a 09 00 00 00 0b &29c0 00 3c 00 0a 00 17 00 05 00 00 00 00 00 3c 00 2b &29d0 00 17 00 2d 05 00 00 2f 00 00 12 2d 24 39 3b 38 &29e0 00 34 02 38 00 2f 01 2e 2a 2f 01 38 00 2f 01 2e &29f0 00 34 03 38 00 2d 1c 1c 18 2e 25 25 17 2d 25 25 &2a00 00 2e 25 25 2b 38 1c 1c 2d 1c 1c 1c 34 1c 1c 1c &2a10 2d 1c 1c 1c 34 1c 1c 1c 2d 1c 1c 1c 34 1c 1c 1c &2a20 2f 1a 1a 1a 2d 1b 1b 1b 2d 1b 1b 1b 2d 1b 1b 1b &2a30 34 1c 1c 1c 33 37 37 32 00 04 2a 04 0d 08 0d 08 &2a40 06 07 06 07 04 22 04 00 04 00 04 00 04 00 04 22 &2a50 04 17 04 00 08 0d 08 00 07 06 07 00 00 04 00 17 &2a60 24 04 00 00 00 04 24 00 00 3c 00 24 1e 1d 1e 1d &2a70 1f 2b 3a 1f 1f 2f 35 14 1f 33 32 1f 21 20 21 20 &2a80 18 00 02 0c 00 0d 01 09 00 06 01 0b 00 04 01 0a &2a90 17 04 03 12 00 04 04 00 2a 0b 08 18 00 06 09 00 &2aa0 00 04 0b 0c 00 04 0a 09 0d 08 22 04 06 07 00 04 &2ab0 08 39 3a 04 07 34 30 04 24 34 30 04 00 34 30 04 &2ac0 17 2f 35 04 24 33 32 04 00 00 00 04 2a 00 24 04 &2ad0 00 00 00 04 05 00 2a 04 00 00 00 04 00 24 00 04 &2ae0 00 00 00 04 00 05 00 04 00 00 00 04 2b 2c 24 04 &2af0 2d 13 00 04 2d 13 05 04 2d 16 0f 04 2d 27 16 0f &2b00 2d 28 29 13 2f 16 16 13 2d 2a 2a 13 2d 1c 1c 10 &2b10 33 37 32 04 00 00 00 04 00 00 00 02 23 23 23 01 &2b20 00 00 00 01 00 24 00 01 00 2a 00 03 24 00 00 00 &2b30 2a 00 00 00 00 00 24 00 00 00 00 00 00 24 00 00 &2b40 00 00 00 00 00 2a 00 24 00 00 00 00 24 00 00 00 &2b50 00 00 24 00 12 00 00 2a 00 24 00 00 00 00 00 24 &2b60 00 2a 00 00 00 00 24 00 00 00 00 00 1e 1d 1e 1d &2b70 14 1f 3c 1f 1f 1f 1f 1f 1f 3c 1f 1f 1f 1f 1f 1f &2b80 1f 14 1f 1f 1f 1f 1f 3c 20 21 20 21 22 17 22 22 &2b90 1e 1d 1e 1d 1f 1f 14 1f 3c 1f 1f 1f 1f 1f 1f 1f &2ba0 1f 1f 3c 1f 14 1f 1f 1f 1f 1f 1f 3c 1f 14 1f 1f &2bb0 1f 1f 3c 1f 1f 1f 1f 1f 1f 1f 1f 14 1f 3c 1f 1f &2bc0 1f 1f 1f 1f 20 21 20 21 18 00 00 2a 00 00 18 00 &2bd0 2b 2c 23 23 2d 13 00 00 2e 13 12 00 2f 13 0d 02 &2be0 34 30 06 01 34 30 08 01 34 30 07 01 34 30 00 03 &2bf0 2e 35 0d 08 33 32 06 07 00 0d 08 00 12 06 07 00 &2c00 00 04 00 17 18 04 00 00 00 04 00 00 23 3c 23 2a &2c10 2a 04 3c 23 04 3c 04 3c 3c 23 2a 04 04 3c 23 3c &2c20 2a 04 3c 00 0d 08 00 00 06 07 00 22 04 00 00 00 &2c30 04 00 17 00 04 2a 00 00 04 00 00 2b 04 00 00 2d &2c40 04 22 39 38 04 00 2f 1c 04 00 2f 1c 04 12 2e 1c &2c50 04 00 2d 1c 04 00 33 37 04 0d 08 00 04 06 09 2a &2c60 0b 08 04 00 06 07 04 05 04 00 04 00 04 00 02 00 &2c70 04 05 01 00 04 00 01 12 0b 0c 01 0c 0a 09 03 09 &2c80 00 0b 0c 04 18 0a 09 04 00 17 0b 08 24 00 0a 09 &2c90 00 00 24 04 00 24 00 04 24 00 24 04 00 00 00 04 &2ca0 00 24 00 04 00 00 17 04 1d 1e 1d 3e 14 1f 1f 3f &2cb0 1f 1f 1f 3f 1f 1f 14 3f 1f 1f 1f 3f 1f 14 1f 3f &2cc0 20 21 20 11 05 00 05 04 00 2a 0d 08 00 00 06 07 &2cd0 00 24 04 00 00 00 04 00 00 05 04 24 12 00 04 00 &2ce0 00 00 04 00 24 00 04 00 00 00 04 00 00 24 04 17 &2cf0 00 00 04 00 00 00 04 00 24 00 04 24 00 24 04 00 &2d00 00 00 04 00 00 17 04 24 24 00 04 00 00 24 04 00 &2d10 00 00 04 00 00 00 2b 2c 17 00 2d 35 00 00 2d 36 &2d20 00 00 2d 3d 00 18 33 32 2a 0d 08 00 00 06 09 00 &2d30 00 04 0b 0c 00 04 0a 09 02 08 3c 04 01 07 00 04 &2d40 01 05 05 04 01 0c 00 04 03 09 00 04 00 04 17 04 &2d50 3c 04 00 04 00 04 00 04 00 04 3c 04 0d 08 00 04 &2d60 06 07 2a 04 08 24 00 04 07 00 00 04 00 00 24 04 &2d70 1d 1e 1d 3e 3c 1f 14 3f 20 21 20 11 00 00 00 04 &2d80 2b 2c 0d 08 33 32 06 07 04 0d 08 00 04 06 07 12 &2d90 04 0b 02 00 04 06 01 05 0b 08 01 00 0a 09 01 00 &2da0 17 04 03 00 00 04 00 00 00 04 00 22 00 0b 0c 00 &2db0 12 0a 09 00 00 00 04 24 18 00 04 00 00 24 04 00 &2dc0 00 00 04 24 00 00 04 00 00 18 04 00 00 00 04 00 &2dd0 24 0d 08 24 00 06 07 00 0d 08 00 00 06 07 24 00 &2de0 04 00 00 00 04 00 00 00 04 39 3b 3a 04 34 1c 35 &2df0 04 34 1c 36 04 34 1c 36 04 2f 16 3d 04 2d 19 3d &2e00 04 33 37 32 04 00 04 00 04 0d 08 00 04 06 07 17 &2e10 0b 08 18 00 06 07 00 00 04 00 24 00 04 00 00 24 &2e20 04 24 17 00 04 00 00 00 04 05 24 00 04 00 00 00 &2e30 04 2a 00 24 04 00 00 00 04 00 00 00 02 00 24 05 &2e40 01 0c 00 00 01 09 00 12 01 0b 0c 00 03 06 09 24 &2e50 00 04 04 00 24 04 04 17 00 04 04 00 00 04 0b 0c &2e60 24 04 2b 2c 00 04 2d 35 00 04 2d 36 2a 04 2d 36 &2e70 00 04 2d 36 00 04 2d 36 00 04 33 32 17 0b 0c 18 &2e80 00 0a 09 00 00 00 0b 0c 00 22 0a 09 1e 1d 1e 3e &2e90 1f 1f 1f 3f 1f 2b 3a 3f 1f 2f 35 3f 1f 33 32 3f &2ea0 1f 1f 3f 3f 1f 1f 3f 3f 2b 31 2c 3f 34 1c 30 3f &2eb0 33 38 30 3f 3f 2d 35 3f 3f 2e 36 3f 3f 2f 3d 3f &2ec0 3f 33 32 3f 3f 1f 3f 3f 3f 1f 3f 3f 39 3b 3a 3f &2ed0 34 19 13 3f 34 19 35 3f 33 37 32 3f 21 20 21 11 &2ee0 00 12 00 04 00 00 0d 08 00 00 06 07 2a 0d 08 00 &2ef0 00 06 07 2a 0d 08 02 00 06 07 01 23 04 00 01 00 ; level_1_data &2f00 00 00 01 24 00 00 03 2a 00 00 04 00 00 00 04 00 &2f10 00 12 0b 0c 22 00 0a 09 00 00 2a 0b 00 00 00 0a &2f20 24 00 00 00 00 24 24 12 00 00 00 00 17 24 00 24 &2f30 00 00 00 00 00 00 24 00 24 00 12 00 22 00 00 24 &2f40 00 00 24 00 00 24 22 00 00 00 17 00 24 00 00 24 &2f50 00 00 24 00 00 24 00 00 24 22 00 24 00 24 00 22 &2f60 00 00 17 00 24 00 00 24 22 00 24 00 00 00 00 24 &2f70 00 24 22 00 00 00 00 12 39 3a 23 23 2f 35 0c 0d &2f80 33 32 09 06 04 04 04 04 04 04 04 04 04 04 04 04 &2f90 04 04 04 04 0b 08 0b 08 0a 09 06 07 17 0b 08 12 &2fa0 00 06 09 00 0d 08 04 00 06 07 04 17 04 00 0b 0c &2fb0 04 22 0a 09 04 00 00 0b 04 00 17 0a 3e 1d 1e 1d &2fc0 15 1f 14 1f 15 14 1f 1f 15 1f 1f 14 11 21 20 21 &2fd0 04 39 3b 3a 04 34 1c 35 04 34 1c 36 0b 34 1c 36 &2fe0 06 34 1c 36 04 34 1c 36 04 34 1c 36 04 34 1c 36 &2ff0 04 34 1c 36 04 34 1c 36 04 34 1c 36 0b 34 1c 36 &3000 06 34 1c 36 04 34 1c 36 04 33 37 32 0b 0c 0d 08 &3010 0a 09 06 07 24 0b 08 05 05 06 09 00 0d 08 0b 0c &3020 06 07 06 09 04 00 04 04 04 24 04 04 04 00 04 04 &3030 04 2b 2c 04 04 2d 13 04 04 2d 13 08 2b 38 30 09 &3040 2d 1c 35 04 2e 25 36 04 2d 25 36 04 2f 25 36 04 &3050 2d 25 36 04 2e 25 36 04 2d 25 36 04 2f 1c 3d 04 &3060 33 37 32 04 0b 0c 00 04 0a 09 05 04 00 0b 0c 04 &3070 05 06 09 04 0d 08 0b 08 06 07 06 09 08 0d 08 04 &3080 07 06 07 04 00 04 24 04 00 04 00 04 24 04 12 04 &3090 00 04 00 04 00 39 3b 3a 2b 38 19 35 33 38 1c 36 &30a0 24 34 1c 36 39 38 19 32 33 38 30 22 00 34 2a 3a &30b0 2b 38 19 0e 33 38 30 00 24 34 19 2c 39 38 2a 0e &30c0 33 38 30 00 00 34 2a 3a 2b 38 19 0e 33 38 30 22 &30d0 24 34 19 2c 39 38 2a 0e 33 38 30 00 00 34 2a 3a &30e0 2b 38 19 0e 33 38 30 18 24 34 19 2c 39 38 2a 0e &30f0 33 38 30 00 00 34 2a 3a 2b 38 19 0e 33 38 30 17 &3100 24 34 19 2c 39 38 2a 0e 33 38 30 00 00 34 2a 3a &3110 2b 38 19 0e 33 38 30 00 24 34 19 2c 39 38 2a 0e &3120 33 38 30 17 00 34 2a 3a 2b 38 19 0e 33 38 30 00 &3130 24 2f 2a 2c 00 33 37 0e 00 00 00 04 05 00 0d 08 &3140 00 00 06 07 00 12 04 05 0c 00 04 00 09 05 04 00 &3150 0b 0c 04 17 0a 09 04 00 00 0b 08 00 17 0a 09 00 &3160 00 00 04 00 1e 1d 3e 1d 3c 1f 15 14 1f 1f 3f 1f &3170 1f 1f 15 3c 1f 3c 3f 1f 1f 1f 15 3c 14 1f 3f 1f &3180 1f 3c 15 14 1f 1f 3f 1f 20 21 11 20 00 00 04 00 &3190 05 0d 08 17 00 06 09 00 12 04 04 00 00 04 04 00 &31a0 00 04 04 05 24 04 04 00 0d 08 0b 0c 06 07 06 09 &31b0 08 24 04 0b 07 00 04 0a 00 00 04 18 00 22 04 00 &31c0 2b 2c 04 39 2e 35 04 2f 2f 36 04 2f 2e 36 04 34 &31d0 2f 19 3b 38 34 1c 1b 1a 2d 25 1b 1c 2d 25 1b 1a &31e0 2d 25 1b 1c 2d 1c 1b 1a 33 38 2a 1c 00 33 2a 1a &31f0 00 00 2a 1c 05 00 33 37 00 00 04 00 12 00 04 00 &3200 00 05 04 00 02 0d 08 17 01 06 07 00 01 08 22 00 &3210 01 09 00 00 03 0b 0c 24 00 0a 09 00 00 24 04 00 &3220 00 00 04 00 23 23 2a 23 00 00 04 00 0c 18 04 00 &3230 09 00 04 00 0b 0c 04 18 0a 09 04 00 24 0b 08 00 &3240 00 0a 09 00 00 24 04 17 00 00 04 00 00 00 04 00 &3250 24 00 04 12 00 00 04 00 00 24 04 22 00 0d 08 00 &3260 22 06 07 00 0d 08 00 00 06 07 22 00 04 12 00 00 &3270 04 00 00 2a 04 2a 00 00 04 00 00 00 04 00 2a 00 &3280 04 00 00 00 3e 1d 1e 1d 3f 1f 14 1f 39 3b 3a 1f &3290 34 1c 30 1f 33 37 0e 1f 3f 1f 3f 1f 3f 1f 3f 14 &32a0 3f 1f 3f 1f 3f 14 3f 1f 3f 2b 31 2c 3f 33 38 30 &32b0 3f 3f 33 32 3f 2a 1f 1f 2a 3f 1f 1f 3f 2a 1f 1f &32c0 2a 3f 14 1f 3f 2a 1f 14 2a 3f 1f 1f 11 11 21 20 &32d0 04 04 22 00 04 04 00 00 04 04 00 22 0b 08 00 00 &32e0 06 07 17 00 0b 0c 00 12 0a 09 02 00 00 0b 01 00 &32f0 00 06 01 00 0d 08 01 24 06 07 03 00 04 00 00 00 &3300 04 05 00 00 04 00 24 00 04 12 00 22 0b 0c 18 00 &3310 0a 09 00 00 22 0b 0c 00 00 0a 09 05 00 00 0b 0c &3320 2b 2c 0a 09 2e 19 3a 04 34 1c 30 08 2d 27 16 0f &3330 34 28 29 13 2f 19 16 10 34 1c 30 08 2d 19 30 09 &3340 34 1c 30 08 2f 19 30 09 34 1c 30 08 2d 19 35 09 &3350 33 37 32 04 0a 09 04 04 24 0b 08 04 00 0a 09 04 &3360 22 24 0b 08 00 00 0a 09 00 22 24 04 17 00 00 04 &3370 00 00 22 04 00 02 0d 08 23 01 06 07 00 01 08 17 &3380 23 01 09 00 0c 03 0b 02 09 04 06 01 04 0b 08 01 &3390 04 06 09 01 04 04 04 03 0b 08 0b 08 06 07 06 07 &33a0 08 22 04 00 07 00 04 24 24 00 04 00 00 00 04 24 &33b0 00 24 04 00 00 00 04 00 39 3a 04 2b 2e 35 04 2d &33c0 34 36 04 2e 2d 36 04 2d 34 36 04 2e 2d 36 04 2d &33d0 34 36 04 2e 2d 19 3b 38 33 37 19 19 04 24 34 1c &33e0 0b 0c 2f 19 0a 09 34 1c 17 0b 2f 19 00 06 34 1c &33f0 0d 08 2f 19 06 07 34 1c 04 24 33 37 0b 0c 04 00 &3400 0a 09 04 24 22 0b 08 00 00 06 07 00 0d 08 22 00 &3410 06 07 00 00 04 12 00 22 3e 1d 1e 1d 2b 31 2c 1f &3420 34 3c 19 3a 34 19 3c 35 34 3c 19 36 34 19 3c 36 &3430 33 37 37 32 11 20 20 20 04 22 17 22 3e 1e 1e 1e &3440 15 14 1f 1f 3f 1f 1f 1f 15 1f 14 1f 3f 14 1f 1f &3450 15 1f 1f 14 3f 1f 1f 1f 11 20 21 20 0b 0c 00 22 &3460 0a 09 12 00 22 0b 0c 00 00 0a 09 00 00 22 04 22 &3470 00 00 04 00 22 00 02 18 00 12 01 00 00 00 01 00 &3480 00 00 01 00 12 00 03 00 00 00 00 22 00 22 17 00 &3490 22 00 00 00 00 00 02 00 00 22 01 00 22 00 01 22 &34a0 00 00 01 00 00 22 03 00 00 00 00 22 22 00 17 00 &34b0 00 00 00 00 00 00 02 00 00 00 01 00 22 00 01 22 &34c0 00 00 01 00 00 00 03 00 00 24 00 22 12 00 05 00 &34d0 00 00 00 00 05 00 0d 02 00 17 06 01 00 00 04 01 &34e0 24 00 04 01 00 00 04 03 00 24 0b 08 24 00 0a 09 &34f0 00 00 24 04 00 24 00 04 00 00 24 04 24 00 00 04 &3500 00 24 12 04 17 00 24 04 00 00 00 04 2b 31 2c 04 &3510 2f 19 0e 3e 2e 36 1f 15 2d 36 1f 3f 2e 36 14 15 &3520 2f 36 1f 3f 2d 36 1f 15 2d 36 20 11 33 32 0d 08 &3530 00 17 06 09 3c 0d 08 04 04 3c 07 04 3c 04 3c 04 &3540 04 3c 04 04 3c 04 3c 04 04 3c 04 04 3c 04 3c 04 &3550 04 3c 04 04 3c 04 0b 08 04 04 06 07 04 04 04 02 &3560 04 0b 08 01 04 06 07 01 04 04 0d 01 0b 08 06 03 &3570 06 09 04 00 04 04 04 12 04 0b 08 00 04 0a 09 22 &3580 04 17 04 00 0b 0c 04 24 0a 09 04 00 24 04 04 00 &3590 00 0b 08 24 24 0a 09 00 00 24 04 17 0c 00 04 24 &35a0 09 24 04 00 0b 0c 04 00 0a 09 02 00 24 0b 01 23 &35b0 00 0a 01 00 23 23 01 00 22 22 03 22 00 0d 08 24 &35c0 24 06 07 00 0d 08 24 00 06 07 17 24 04 24 00 00 &35d0 04 00 24 00 3e 1e 1d 1e 15 1f 39 3a 15 39 38 30 &35e0 15 2f 1c 30 15 2e 1a 13 15 2f 1a 13 15 2d 1a 13 &35f0 15 2e 1a 13 11 34 1c 35 04 33 37 32 04 00 00 00 &3600 04 22 00 17 04 00 00 00 04 12 22 00 0b 0c 00 00 &3610 06 09 17 22 04 0b 0c 00 04 0a 09 24 04 24 04 00 &3620 0b 0c 04 00 0a 09 04 22 00 0b 08 00 22 06 07 24 &3630 0d 08 22 00 06 07 02 00 04 17 01 23 0b 0c 01 24 &3640 0a 09 01 23 22 0b 03 00 17 06 09 00 0d 08 04 00 &3650 06 09 04 22 04 04 04 00 04 0b 08 12 04 06 09 00 &3660 0b 08 04 24 06 09 04 00 04 0b 08 24 04 06 07 00 &3670 0b 08 24 00 06 07 00 00 04 24 00 24 04 00 24 00 &3680 04 24 00 00 04 00 00 24 04 00 18 00 04 17 00 00 &3690 04 00 00 05 04 00 00 00 04 00 18 00 04 05 00 17 &36a0 04 00 00 00 04 02 17 00 0b 01 00 00 06 01 23 23 &36b0 3e 01 1e 1d 15 03 1f 3c 3f 1f 1f 1f 15 3c 1f 1f &36c0 3f 1f 3c 1f 15 1f 1f 1f 3f 1f 1f 3c 11 20 21 20 &36d0 04 00 00 00 04 17 00 24 04 00 12 00 04 24 00 00 &36e0 08 00 00 00 07 00 00 00 05 00 05 00 00 2a 00 00 &36f0 00 00 00 00 00 00 02 22 00 00 01 24 00 00 01 24 ; level_2_data &3700 00 00 01 0d 00 00 03 06 00 00 0b 08 2a 00 06 07 &3710 00 0d 08 12 00 06 07 00 0d 08 39 3a 06 07 2d 13 &3720 04 22 2e 35 04 2b 19 3d 04 2d 19 36 04 33 19 3d &3730 0b 0c 34 36 0a 09 33 32 00 0b 0c 00 00 0a 09 2a &3740 17 00 0b 0c 00 00 0a 09 00 05 00 04 2a 00 12 04 &3750 00 17 00 04 00 00 18 04 2b 3b 31 3a 2e 1a 1b 35 &3760 34 19 1b 3d 2e 19 1b 3d 2d 19 1b 36 2f 1a 1b 3d &3770 2d 19 1b 3d 2e 19 1b 36 34 19 1b 3d 2e 1a 1b 3d &3780 2d 1c 1b 36 34 1c 1b 3d 33 19 16 3d 0c 2d 1c 36 &3790 09 34 19 3d 04 34 19 3d 04 2e 1c 36 2b 1c 25 3d &37a0 2d 19 25 3d 34 1c 25 36 33 37 19 3d 00 00 2d 3d &37b0 02 00 2e 36 01 0c 34 3d 01 09 2d 3d 01 04 34 36 &37c0 03 04 2e 3d 00 04 2d 3d 05 04 2e 36 00 04 34 36 &37d0 2a 04 33 32 00 04 00 04 17 04 05 04 00 04 00 04 &37e0 05 04 0d 08 00 04 06 07 00 39 2c 00 00 33 32 00 &37f0 12 00 04 00 00 00 04 12 00 3c 04 00 00 00 04 2a &3800 05 00 04 00 00 00 0b 0c 00 2a 0a 09 17 00 00 0b &3810 0c 00 05 0a 09 00 00 00 0b 0c 12 00 0a 09 00 3c &3820 00 0b 0c 00 00 0a 09 00 00 18 04 00 17 00 04 00 &3830 00 00 02 0c 05 0d 01 09 00 06 01 04 0d 08 01 04 &3840 06 07 03 04 08 17 00 04 07 00 18 04 22 00 00 04 &3850 00 00 2a 04 00 00 00 04 00 05 00 04 24 00 12 04 &3860 00 00 00 04 2a 00 3c 04 00 00 00 04 22 00 05 04 &3870 00 00 00 04 00 17 00 04 00 00 00 04 00 22 12 04 &3880 00 00 00 04 05 00 00 04 00 00 2a 04 00 00 00 04 &3890 00 17 00 04 00 00 0d 08 3c 00 06 07 00 00 04 2b &38a0 17 00 04 2d 00 05 04 2e 00 00 04 34 00 00 04 2e &38b0 00 17 04 34 00 00 04 33 18 00 04 04 00 00 02 08 &38c0 00 00 01 07 17 00 01 0c 00 00 01 09 00 00 03 0b &38d0 00 05 00 0a 00 12 00 00 22 00 00 18 17 2a 00 00 &38e0 00 00 00 00 00 39 3b 2c 0c 2e 02 35 09 2d 01 3d &38f0 0b 2e 01 3d 0a 2d 01 3d 00 2e 03 3d 00 34 19 3d &3900 00 33 37 32 00 00 04 00 00 3c 04 00 00 00 04 00 &3910 00 0d 08 17 00 06 07 00 0d 08 2a 00 06 07 00 00 &3920 08 2b 31 2c 07 2d 16 10 17 2e 35 00 2b 38 36 18 &3930 34 19 3d 00 33 37 32 00 00 00 00 00 05 00 00 00 &3940 00 00 24 00 12 00 2b 3b 02 0c 2f 02 01 09 2d 01 &3950 01 0b 2e 01 01 0a 2d 01 03 0d 2e 03 04 06 33 37 &3960 04 04 00 0d 04 04 17 06 04 04 0d 08 04 04 06 07 &3970 04 04 04 00 04 0b 08 12 04 06 07 00 04 04 00 17 &3980 04 04 00 00 04 04 00 05 04 04 00 00 04 04 17 00 &3990 04 04 00 00 04 0b 0c 3c 04 0a 09 00 04 05 04 00 &39a0 04 0d 08 05 04 06 07 00 04 04 18 00 0b 08 00 00 &39b0 0a 09 00 17 00 04 00 00 17 04 05 00 00 04 00 00 &39c0 00 04 00 2a 0d 08 00 00 06 07 00 05 08 18 00 00 &39d0 07 00 3c 00 00 00 00 00 00 05 00 00 00 00 00 17 &39e0 00 00 2a 00 1d 1e 1d 1e 1f 1f 1f 14 2b 2c 1f 1f &39f0 2d 13 1f 3c 2e 13 1f 1f 2d 2b 3a 1f 2e 19 30 1f &3a00 2d 19 30 14 2e 19 30 1f 2d 19 35 1f 33 37 32 1f &3a10 1f 1f 1f 1f 1f 14 1f 1f 1f 39 3b 2c 1f 2d 1b 35 &3a20 1f 2e 1b 36 1f 2e 1b 3d 14 2d 1b 36 1f 2d 1b 3d &3a30 1f 33 38 36 1f 1f 2d 3d 14 1f 2e 36 1f 1f 2d 3d &3a40 3c 1f 2f 36 1f 1f 33 32 1f 14 1f 1f 20 21 20 21 &3a50 00 00 00 00 02 0c 17 00 01 09 00 2a 01 0b 0c 00 &3a60 01 0a 09 00 03 05 04 12 04 00 04 00 04 0d 08 05 &3a70 04 06 07 00 04 04 00 00 04 04 17 00 0b 08 00 00 &3a80 06 09 00 05 04 0b 0c 00 04 0a 09 00 04 05 04 3c &3a90 04 00 04 00 04 00 0b 0c 04 3c 0a 09 04 00 17 04 &3aa0 04 18 00 04 04 00 00 04 04 00 05 04 04 2a 0d 08 &3ab0 04 00 06 09 04 00 04 04 04 05 04 04 04 0d 08 04 &3ac0 04 06 07 04 04 04 00 04 04 04 00 04 04 04 05 04 &3ad0 0b 08 0d 08 06 07 06 07 08 00 04 2a 07 00 04 00 &3ae0 00 05 04 00 00 00 04 18 17 00 04 00 00 00 0b 0c &3af0 00 00 06 09 05 0d 08 0b 00 06 07 0a 00 04 00 00 &3b00 17 04 00 05 00 04 00 00 00 04 00 12 00 04 05 00 &3b10 00 0b 0c 00 00 0a 09 17 05 00 0b 0c 00 00 0a 09 &3b20 00 18 00 0b 00 00 00 0a 2a 00 05 00 1e 1d 1e 1d &3b30 1f 1f 14 1f 3c 1f 1f 1f 1f 27 1f 1f 1f 28 29 1f &3b40 1f 1f 1f 1f 1f 3c 14 1f 20 21 20 21 22 22 00 22 &3b50 00 00 00 00 00 2a 00 00 00 00 00 00 22 00 22 22 &3b60 00 00 00 00 2a 00 12 00 00 00 00 00 22 22 00 22 &3b70 00 00 00 00 02 0c 00 00 01 09 05 00 01 0b 0c 00 &3b80 01 0a 09 2a 03 00 04 00 00 00 04 00 22 22 04 22 &3b90 00 00 04 00 00 00 04 00 00 39 3b 2c 23 2d 1c 35 &3ba0 00 2e 1c 3d 00 33 37 32 00 00 0b 0c 22 00 0a 09 &3bb0 00 22 00 0b 00 00 22 0a 23 23 23 23 2b 3a 00 0d &3bc0 33 32 00 06 0a 09 0d 08 17 04 06 09 22 0b 08 04 &3bd0 17 06 09 04 0d 08 04 04 06 09 04 04 04 04 04 04 &3be0 04 04 04 04 04 04 04 04 04 04 0b 08 04 04 06 07 &3bf0 04 0b 08 00 04 06 07 24 0b 08 00 00 06 07 24 00 &3c00 04 00 00 00 04 18 00 24 04 00 17 00 02 00 24 18 &3c10 01 00 00 00 01 23 23 23 01 00 00 00 03 24 22 00 &3c20 00 00 00 24 22 00 00 00 00 2a 24 00 00 00 00 00 &3c30 24 00 22 12 00 00 00 00 24 3c 24 00 00 00 00 22 &3c40 00 00 2a 00 00 24 00 00 1e 1d 1e 1d 1f 1f 1f 14 &3c50 1f 3c 1f 1f 1f 1f 14 1f 1f 1f 1f 1f 1f 14 1f 3c &3c60 1f 1f 1f 1f 1f 1f 1f 14 14 1f 3c 1f 1f 1f 1f 1f &3c70 3c 14 1f 1f 1f 1f 1f 3c 20 21 20 21 00 00 00 00 &3c80 39 31 3b 3a 2e 1a 1a 35 2e 19 19 36 2e 1c 1c 3d &3c90 2e 1c 1c 36 2e 1a 1a 3d 2e 19 19 36 33 37 37 32 &3ca0 00 00 00 00 1e 1d 1e 1d 1f 39 2c 1f 1f 2d 35 14 &3cb0 1f 2f 36 1f 14 33 32 1f 21 20 21 20 00 22 22 00 &3cc0 00 00 00 00 22 00 00 22 00 05 00 00 00 00 2a 17 &3cd0 00 02 00 00 12 01 23 23 00 01 0c 00 23 01 09 00 &3ce0 00 03 0b 0c 00 00 0a 09 00 05 00 04 00 00 00 04 &3cf0 00 12 0d 08 22 00 06 07 00 0d 08 00 00 06 07 00 &3d00 00 04 00 22 00 04 00 00 00 04 2a 00 00 04 00 00 &3d10 22 04 22 00 00 04 00 3c 00 04 00 00 39 3b 3a 00 &3d20 2d 19 35 17 2e 1a 36 00 2f 02 3d 00 2d 01 36 00 &3d30 2f 01 36 00 2e 01 3d 12 2d 03 36 00 2e 1a 36 00 &3d40 2f 1b 3d 00 2d 1b 36 00 2f 1b 36 00 2e 1c 3d 00 &3d50 2d 1c 36 00 33 37 36 17 00 00 2f 0f 00 22 2e 35 &3d60 23 23 2f 36 00 00 2e 3d 22 00 2f 3d 0c 00 2e 36 &3d70 09 2b 38 3d 0b 2d 19 3d 0a 2e 25 36 00 2e 25 3d &3d80 0c 2d 19 36 09 33 37 32 0b 0c 00 00 06 09 18 00 &3d90 04 04 00 00 04 04 00 18 04 04 24 00 08 0b 0c 00 &3da0 07 0a 09 00 00 24 04 00 00 00 04 24 00 2a 04 00 &3db0 24 00 02 00 3c 00 01 00 00 00 01 23 24 00 01 00 &3dc0 00 00 03 00 00 00 00 24 22 00 00 00 00 24 22 00 &3dd0 00 00 00 24 00 22 00 00 24 12 00 22 00 00 00 3c &3de0 2b 2c 00 00 2d 19 2c 00 2e 1b 19 2c 2d 1b 19 30 &3df0 33 19 19 30 00 33 19 30 00 24 2f 35 00 2b 38 36 &3e00 24 2f 1c 36 00 33 37 32 00 00 00 00 00 24 00 00 &3e10 05 00 00 12 00 2a 00 24 24 00 24 00 00 00 00 00 &3e20 00 24 00 00 00 05 00 24 00 00 00 00 00 00 24 05 &3e30 24 00 00 00 00 00 2a 00 00 24 00 24 00 05 00 00 &3e40 24 00 24 00 00 00 00 24 24 00 00 00 05 17 05 00 &3e50 00 00 00 00 00 22 00 22 00 00 00 00 22 00 22 00 &3e60 00 2a 00 00 00 00 00 22 22 00 22 00 00 00 00 00 &3e70 00 22 00 24 24 00 00 00 00 00 17 00 24 00 24 00 &3e80 00 3c 00 00 00 00 00 24 00 24 00 00 00 00 00 00 &3e90 2b 3b 31 3a 2f 19 1a 35 2d 1c 1c 36 2f 19 19 3d &3ea0 33 37 37 32 1e 1d 1e 1d 1f 39 2c 1f 1f 2f 35 14 &3eb0 1f 2e 36 1f 1f 2d 3d 1f 1f 2f 36 1f 1f 2d 3d 1f &3ec0 14 2e 36 1f 1f 2f 3d 1f 1f 2e 36 14 1f 2d 3d 1f &3ed0 1f 33 32 14 21 20 21 20 00 00 00 00 00 00 05 00 &3ee0 3c 00 00 00 00 00 2a 00 00 00 00 00 00 18 00 05 &3ef0 00 00 00 00 00 00 02 00 00 00 01 00 00 00 01 00 ; level_3_data &3f00 1f 1f 01 1f 1f 1f 03 1f 1f 1f 15 14 21 20 11 20 &3f10 05 05 04 05 00 00 04 00 00 3c 04 24 24 04 04 00 &3f20 00 0b 08 12 00 06 09 00 24 0b 08 00 00 06 09 24 &3f30 00 04 0b 0c 24 04 0a 09 0d 08 24 04 06 07 00 04 &3f40 08 24 00 0b 07 00 12 0a 00 22 24 00 00 00 00 24 &3f50 24 00 00 00 00 00 22 00 00 12 00 00 00 00 00 24 &3f60 00 22 00 00 00 00 12 00 00 00 00 00 22 2a 2a 22 &3f70 1d 3e 3e 1e 14 15 15 1f 1f 3f 3f 1f 1f 15 39 3a &3f80 1f 3f 2f 35 1f 15 2d 36 1f 3f 2f 36 1f 15 2d 36 &3f90 14 3f 2f 36 1f 15 2d 36 1f 3f 33 32 1f 15 15 1f &3fa0 1f 3f 3f 14 20 11 11 21 00 2a 2a 00 12 0b 08 00 &3fb0 00 06 09 17 00 02 04 00 23 01 04 00 00 01 04 00 &3fc0 23 01 04 22 00 03 04 00 0d 08 04 00 06 07 04 12 &3fd0 04 22 04 00 04 00 04 24 04 00 04 00 2b 2c 04 00 &3fe0 2d 35 04 24 2d 36 04 00 2d 36 04 00 33 32 04 24 &3ff0 00 0b 08 00 24 0a 09 00 17 24 04 24 3c 24 04 00 &4000 24 17 04 00 3c 24 04 24 00 00 04 00 12 00 04 24 &4010 00 24 04 00 24 00 04 17 00 24 04 00 00 00 04 00 &4020 24 00 04 24 00 12 04 00 00 2a 04 24 00 00 04 00 &4030 00 00 04 2a 2a 00 04 00 00 00 04 00 00 0d 08 00 &4040 22 06 09 22 00 04 02 00 24 04 01 23 00 04 01 00 &4050 00 0b 01 24 17 06 03 23 00 0b 08 00 05 06 07 05 &4060 1e 3e 1e 1d 1f 2b 2c 1f 14 2d 35 1f 1f 2d 36 1f &4070 1f 33 32 14 20 11 20 21 05 04 05 05 00 0b 0c 00 &4080 00 06 09 24 24 04 0b 0c 00 04 06 09 00 04 04 0b &4090 24 04 04 0a 00 04 04 24 24 04 04 00 00 0b 08 00 &40a0 24 0a 09 24 00 24 04 00 00 00 04 24 24 12 04 00 &40b0 05 0d 08 05 00 06 07 00 0d 08 05 00 06 07 00 24 &40c0 04 05 24 00 04 00 00 24 04 24 00 00 0b 0c 24 00 &40d0 06 09 00 00 04 39 31 3a 04 2d 1b 35 04 2e 25 36 &40e0 04 2d 1b 36 0b 2e 25 36 06 2d 1b 36 04 2e 25 36 &40f0 04 2d 1b 36 04 2e 25 36 04 2d 1b 36 04 2e 25 36 &4100 04 2d 1b 36 04 2e 25 36 04 2d 1b 36 04 2f 25 36 &4110 04 34 1c 36 04 33 37 32 04 00 04 00 04 0d 08 00 &4120 04 06 09 22 0b 08 0b 0c 0a 09 0a 09 22 04 24 04 &4130 00 04 00 0b 24 02 22 0a 00 01 23 23 00 01 00 00 &4140 23 01 24 00 00 03 00 22 24 04 00 00 00 04 00 24 &4150 17 04 00 00 00 04 24 00 1e 3e 1e 1d 14 15 1f 14 &4160 1f 3f 1f 1f 1f 15 14 1f 1f 3f 1f 14 14 15 1f 1f &4170 1f 3f 14 1f 1f 15 1f 1f 1f 3f 1f 1f 14 15 14 1f &4180 1f 3f 1f 1f 20 11 20 21 00 04 17 00 18 04 00 24 &4190 00 04 00 00 00 04 18 00 24 04 00 00 00 04 24 00 &41a0 00 04 00 17 00 04 2b 2c 22 04 2d 35 00 04 2d 36 &41b0 17 04 2d 36 00 04 2d 36 2b 31 38 36 34 2a 1c 36 &41c0 34 1c 2a 36 34 2a 1c 36 34 1c 2a 36 34 2a 1c 36 &41d0 34 1c 2a 36 34 2a 1c 36 33 37 37 32 00 0b 0c 0b &41e0 24 0a 09 0a 00 0d 08 24 17 06 09 00 00 0b 08 00 &41f0 00 0a 09 24 24 0d 08 00 00 06 07 17 00 04 24 00 &4200 24 04 00 22 00 04 00 00 00 04 22 00 00 0b 0c 00 &4210 22 06 09 17 00 04 0b 0c 00 04 0a 09 05 04 05 04 &4220 00 0b 0c 04 17 06 09 04 00 04 04 04 00 04 04 04 &4230 12 04 04 04 00 04 04 04 00 04 02 04 17 0b 01 08 &4240 00 0a 01 07 00 12 01 00 00 00 03 24 24 00 04 00 &4250 00 24 04 00 00 00 04 05 05 05 0b 0c 00 00 06 09 &4260 24 0d 08 04 00 06 07 04 00 02 17 04 12 01 00 04 &4270 00 01 24 04 23 01 00 04 00 03 17 04 00 0b 0c 04 &4280 00 0a 09 04 00 12 04 04 00 00 04 04 12 00 04 04 &4290 00 00 04 04 00 18 04 04 00 00 39 3a 00 00 34 36 &42a0 17 00 2f 2a 00 00 34 36 00 00 2f 2a 00 24 34 36 &42b0 00 00 2f 2a 00 00 34 36 39 3b 38 2a 34 19 1c 3d &42c0 2f 1a 1b 36 34 19 1b 3d 2e 1a 1b 36 34 19 1b 3d &42d0 2f 1a 1b 36 34 19 1b 3d 2e 1a 1b 36 34 19 1b 3d &42e0 2f 1a 1b 36 34 19 1b 3d 2e 27 1b 36 34 28 29 3d &42f0 33 37 37 32 00 04 00 00 17 04 00 00 1e 3e 1d 1e &4300 20 02 21 20 00 01 17 00 05 01 00 05 1e 01 1d 1e &4310 14 03 1f 14 1f 1f 14 1f 21 20 21 20 0c 00 17 00 &4320 09 00 00 00 04 05 00 05 04 00 00 00 04 00 24 00 &4330 04 24 00 00 04 00 00 24 0b 0c 00 00 0a 09 24 00 &4340 05 0b 0c 05 00 0a 09 00 00 24 04 00 00 00 04 24 &4350 24 02 04 00 23 01 08 22 00 01 07 00 00 01 23 23 &4360 00 03 00 00 00 04 00 00 22 04 22 24 00 0b 0c 00 &4370 24 06 09 00 00 04 04 24 0d 08 0b 0c 06 09 0a 09 &4380 04 04 17 04 3e 3e 1e 3e 3f 3f 1f 3f 3f 3f 1f 3f &4390 3f 3f 14 3f 3f 3f 1f 3f 3f 3f 1f 3f 3f 3f 1f 3f &43a0 3f 3f 1f 3f 3f 3f 14 3f 11 11 20 11 04 04 17 04 &43b0 04 04 0d 08 04 04 06 07 0b 08 04 17 06 09 0b 0c &43c0 04 04 06 09 04 0b 08 04 04 06 09 04 04 04 04 04 &43d0 04 04 04 04 04 04 0b 08 0b 08 06 07 0a 09 04 24 &43e0 00 0b 08 00 24 06 09 00 00 04 04 00 00 04 3c 00 &43f0 05 04 00 24 00 04 17 00 17 04 00 05 1d 3e 1d 1e &4400 1f 15 3c 1f 1f 3f 1f 1f 1f 15 1f 3c 3c 3f 1f 1f &4410 1f 15 1f 1f 1f 3f 1f 1f 1f 15 3c 1f 1f 3f 1f 3c &4420 3c 15 1f 1f 1f 3f 3c 1f 1f 15 1f 1f 2b 3b 31 3a &4430 2f 2a 3c 30 2e 3c 2a 30 34 2a 3c 30 34 3c 2a 35 &4440 33 37 38 36 1f 3f 34 36 1f 15 34 36 1f 3f 34 36 &4450 1f 15 34 36 1f 3f 33 32 14 15 1f 14 1f 3f 1f 1f &4460 1f 15 14 1f 1f 3f 1f 14 14 15 1f 1f 1f 3f 14 1f &4470 14 15 1f 1f 1f 3f 1f 1f 1f 15 14 1f 14 3f 1f 1f &4480 1f 15 1f 14 1f 3f 1f 1f 14 15 14 1f 1f 3f 1f 14 &4490 1f 15 1f 1f 1f 02 14 1f 14 01 1f 1f 1f 01 1f 1f &44a0 1f 01 1f 14 1f 03 1f 1f 21 11 21 20 24 04 00 00 &44b0 00 04 00 24 00 04 00 00 00 04 24 00 24 04 00 17 &44c0 00 04 00 24 0d 08 17 00 06 07 24 00 08 17 00 00 &44d0 07 24 00 24 17 00 24 00 00 24 00 00 2b 31 3b 3a &44e0 34 2a 2a 30 34 2a 2a 30 34 2a 2a 35 33 2a 2a 32 &44f0 0b 2d 3d 04 06 2e 36 04 04 2f 3d 08 04 2d 36 09 &4500 04 2e 3d 04 0b 2f 36 04 06 2d 3d 08 04 2e 36 09 &4510 04 2f 3d 04 04 2d 36 04 04 2e 3d 08 04 2f 36 09 &4520 04 2d 3d 04 04 2e 36 04 0b 2f 3d 04 06 2d 36 04 &4530 04 2e 3d 04 04 2f 36 04 04 2d 3d 04 04 2e 36 08 &4540 04 2f 3d 09 04 2d 36 04 0b 2e 3d 04 06 2f 36 04 &4550 04 2d 3d 04 04 2e 36 08 04 2f 3d 09 04 2d 36 04 &4560 04 33 32 04 0b 08 0b 08 0a 09 06 07 00 0b 08 00 &4570 00 06 07 00 00 04 00 00 00 04 05 0d 05 04 00 06 &4580 1d 3e 1d 3e 14 15 1f 3f 1f 3f 14 15 14 15 1f 3f &4590 21 11 21 11 00 04 24 04 24 04 00 04 0d 08 24 04 &45a0 06 09 00 04 04 04 00 04 02 04 00 04 01 04 24 04 &45b0 01 04 0d 08 01 04 06 09 03 0b 08 04 04 06 07 04 &45c0 0b 08 17 04 0a 09 00 04 17 04 18 04 0d 08 0d 08 &45d0 06 07 06 07 04 22 04 22 04 0d 08 00 04 06 09 12 &45e0 0b 08 04 00 06 09 04 17 04 0b 08 00 04 0a 09 00 &45f0 3e 1d 3e 1d 3f 1f 15 1f 15 14 3f 1f 3f 1f 15 14 &4600 15 1f 3f 1f 3f 1f 15 1f 15 14 3f 1f 11 21 11 21 &4610 39 3b 3b 3a 2d 1c 1a 13 2e 1b 1c 30 34 1c 1a 13 &4620 2d 1b 1c 30 34 1c 1a 13 2e 1b 1c 30 34 1c 1a 13 &4630 2d 1b 1c 30 34 1c 1a 13 2e 1b 1c 30 2d 1c 1a 13 &4640 2e 1b 1c 30 34 1c 1a 13 2d 1b 1c 30 34 1c 1a 13 &4650 2e 1b 1c 30 2d 1c 1a 13 2e 1b 1c 30 34 1c 1a 13 &4660 2d 1b 1c 30 33 38 1c 30 00 33 38 35 12 00 33 32 &4670 0c 00 04 0d 09 24 04 06 0b 0c 0b 08 06 09 06 07 &4680 04 0b 08 00 04 06 09 24 04 02 04 00 04 01 04 2a &4690 08 01 0b 2a 07 01 06 2a 24 03 08 2a 00 0a 09 2a &46a0 00 24 0b 2a 00 12 0a 2a 24 00 00 04 00 00 24 04 &46b0 24 17 0d 08 00 00 06 09 00 00 02 04 00 18 01 04 &46c0 24 22 01 04 00 00 01 0b 18 00 03 06 00 00 0b 08 &46d0 00 24 06 07 17 00 04 00 00 00 04 22 1d 1e 3e 1e &46e0 1f 1f 15 3c 3c 1f 15 1f 1f 1f 15 14 1f 3c 15 1f &46f0 1f 1f 15 1f 20 20 02 21 00 00 01 22 1d 1e 01 1d ; end_of_level_data ; tile_chunks_data # O indicates collidable chunk ; tile_00 # Sea &4700 00 01 01 01 01 00 01 ; ....... &4708 01 01 00 01 01 01 01 ; ....... &4710 01 01 01 00 01 01 01 ; ....... &4718 01 00 01 01 01 01 00 ; ....... ; tile_01 # Runway &4720 02 03 04 03 03 03 04 ; ....... &4728 02 03 04 03 03 03 04 ; ....... &4730 02 03 04 03 03 03 04 ; ....... &4738 02 03 04 03 03 03 04 ; ....... ; tile_02 (TILE_RUNWAY_TOP) # Runway top &4740 06 07 07 07 07 07 07 ; ....... &4748 02 03 cc cd cd cd 04 ; ..OOOO. &4750 02 03 04 03 03 03 04 ; ....... &4758 02 03 04 03 03 03 04 ; ....... ; tile_03 (TILE_RUNWAY_BOTTOM) # Runway bottom &4760 02 03 04 03 03 03 04 ; ....... &4768 02 03 04 03 03 03 04 ; ....... &4770 02 03 cc cd cd cd 04 ; ..OOOO. &4778 09 0a 0a 0a 0a 0a 0a ; ....... ; tile_04 # | channel &4780 00 01 0c 03 03 0c 01 ; ....... &4788 01 01 0c 03 03 0c 01 ; ....... &4790 01 01 0c 03 03 0c 01 ; ....... &4798 01 00 0c 03 03 0c 00 ; ....... ; tile_05 # Posts &47a0 ce 0d ce 0d ce 0d ce ; O.O.O.O &47a8 0e 0f 0e 0f 0e 0f 0e ; ....... &47b0 01 ce 0d ce 0d ce 0d ; .O.O.O. &47b8 01 0e 0f 0e 0f 0e 0f ; ....... ; tile_06 # / channel bottom right &47c0 00 01 01 01 01 10 11 ; ....... &47c8 01 01 00 01 10 11 03 ; ....... &47d0 01 01 01 10 11 03 12 ; ....... &47d8 01 00 10 11 03 12 13 ; ....... ; tile_07 # / channel top left &47e0 12 13 01 01 01 00 01 ; ....... &47e8 13 01 00 01 01 01 01 ; ....... &47f0 01 01 01 00 01 01 01 ; ....... &47f8 01 00 01 01 01 01 00 ; ....... ; tile_08 # / channel left &4800 00 10 11 03 12 13 01 ; ....... &4808 10 11 03 12 13 01 01 ; ....... &4810 11 03 12 13 01 01 01 ; ....... &4818 03 12 13 01 01 01 00 ; ....... ; tile_09 # \ channel left &4820 03 14 15 01 01 00 01 ; ....... &4828 16 03 14 15 01 01 01 ; ....... &4830 17 16 03 14 15 01 01 ; ....... &4838 01 17 16 03 14 15 00 ; ....... ; tile_0a # \ channel top right &4840 00 01 01 01 01 00 17 ; ....... &4848 01 01 00 01 01 01 01 ; ....... &4850 01 01 01 00 01 01 01 ; ....... &4858 01 00 01 01 01 01 00 ; ....... ; tile_0b # \ channel bottom right &4860 00 01 17 16 03 14 15 ; ....... &4868 01 01 00 17 16 03 14 ; ....... &4870 01 01 01 00 17 16 03 ; ....... &4878 01 00 01 01 01 17 16 ; ....... ; tile_0c # \ channel bottom left &4880 00 01 01 01 01 00 01 ; ....... &4888 01 01 00 01 01 01 01 ; ....... &4890 15 01 01 00 01 01 01 ; ....... &4898 14 15 01 01 01 01 00 ; ....... ; tile_0d # / channel bottom right &48a0 00 01 01 01 01 00 01 ; ....... &48a8 01 01 00 01 01 01 01 ; ....... &48b0 01 01 01 00 01 01 01 ; ....... &48b8 01 00 01 01 01 01 10 ; ....... ; tile_0e # Strip and lumps right &48c0 03 03 03 03 03 03 03 ; ....... &48c8 18 19 03 18 19 03 1a ; ....... &48d0 03 1c 03 03 1c 03 1d ; ....... &48d8 1e 1f 1e 1e 1f 1e 20 ; ....... ; tile_0f # Magenta top &48e0 07 07 07 07 07 07 07 ; ....... &48e8 03 03 03 03 03 03 03 ; ....... &48f0 03 03 03 03 03 03 03 ; ....... &48f8 03 03 03 03 03 03 03 ; ....... ; tile_10 # Magenta bottom &4900 03 03 03 03 03 03 03 ; ....... &4908 03 03 03 03 03 03 03 ; ....... &4910 03 03 03 03 03 03 03 ; ....... &4918 0a 0a 0a 0a 0a 0a 0a ; ....... ; tile_11 # Channel over sea edge bottom &4920 21 21 0c 03 03 0c 21 ; ....... &4928 22 21 0c 03 03 0c 21 ; ....... &4930 23 24 0c 03 03 0c 25 ; ....... &4938 01 01 0c 03 03 0c 01 ; ....... ; tile_12 # Building in sea &4940 00 01 01 01 01 00 01 ; ....... &4948 01 01 27 28 28 29 01 ; ....... &4950 01 01 2a 2b 2b 2c 01 ; ....... &4958 01 00 01 01 01 01 00 ; ....... ; tile_13 # Magenta &4960 03 03 03 03 03 03 03 ; ....... &4968 03 03 03 03 03 03 03 ; ....... &4970 03 03 03 03 03 03 03 ; ....... &4978 03 03 03 03 03 03 03 ; ....... ; tile_14 # Building in desert &4980 21 21 21 21 21 21 21 ; ....... &4988 21 21 27 28 28 2d 21 ; ....... &4990 21 21 2e 2b 2b 2c 22 ; ....... &4998 21 22 21 21 21 21 21 ; ....... ; tile_15 # Channel over desert &49a0 21 21 0c 03 03 0c 21 ; ....... &49a8 21 06 2f 03 03 30 08 ; ....... &49b0 21 09 31 03 03 32 0b ; ....... &49b8 21 22 0c 03 03 0c 21 ; ....... ; tile_16 # Magenta &49c0 03 03 03 03 03 03 03 ; ....... &49c8 03 03 03 03 03 03 03 ; ....... &49d0 03 03 03 03 03 03 03 ; ....... &49d8 03 03 03 03 03 03 03 ; ....... ; tile_17 (TILE_COVERED_ORB) # Covered orb in sea &49e0 00 27 28 28 28 28 2d ; ....... &49e8 01 33 cf d0 d0 d1 34 ; ..OOOO. &49f0 01 33 d2 d3 d3 d4 34 ; ..OOOO. &49f8 01 2a 2b 2b 2b 2b 2c ; ....... ; tile_18 # Two small buildings in sea &4a00 27 2d 01 01 01 00 01 ; ....... &4a08 2a 2c 00 01 01 27 2d ; ....... &4a10 01 01 01 00 01 2a 2c ; ....... &4a18 01 00 01 01 01 01 00 ; ....... ; tile_19 # Building in small buildings &4a20 35 35 35 35 35 35 35 ; ....... &4a28 35 35 cf d0 d0 d1 35 ; ..OOOO. &4a30 35 35 d2 d3 d3 d4 35 ; ..OOOO. &4a38 35 35 35 35 35 35 35 ; ....... ; tile_1a # Magenta with lake &4a40 03 03 03 03 03 03 03 ; ....... &4a48 03 36 37 37 37 37 38 ; ....... &4a50 03 39 3a 3a 3a 3a 3b ; ....... &4a58 03 03 03 03 03 03 03 ; ....... ; tile_1b # Magenta with blue and black &4a60 03 03 3c 3d 3e 3f 03 ; ....... &4a68 03 03 40 41 42 43 03 ; ....... &4a70 03 03 36 44 3c 3d 03 ; ....... &4a78 03 03 42 43 40 41 03 ; ....... ; tile_1c # Two large buildings and connector &4a80 27 d0 d0 d1 cf d0 d0 ; .OOOOOO &4a88 33 d5 d6 d7 d8 d5 d6 ; .OOOOOO &4a90 2a d3 d3 d4 d2 d3 d3 ; .OOOOOO &4a98 03 45 46 47 47 48 49 ; ....... ; tile_1d # Sea edge top &4aa0 01 01 01 01 01 01 01 ; ....... &4aa8 4a 4b 4c 4d 4e 4f 50 ; ....... &4ab0 21 21 21 21 21 22 21 ; ....... &4ab8 21 22 21 21 21 21 21 ; ....... ; tile_1e # Sea edge top &4ac0 01 01 01 01 01 01 01 ; ....... &4ac8 52 53 54 55 56 57 58 ; ....... &4ad0 21 21 21 21 21 22 21 ; ....... &4ad8 21 22 21 21 21 21 21 ; ....... ; tile_1f # Desert &4ae0 21 21 21 21 21 21 21 ; ....... &4ae8 21 21 21 22 21 21 21 ; ....... &4af0 21 21 21 21 21 21 22 ; ....... &4af8 21 22 21 21 21 21 21 ; ....... ; tile_20 # Sea edge bottom &4b00 21 21 22 21 21 21 21 ; ....... &4b08 22 21 21 21 21 21 21 ; ....... &4b10 5a 5b 5c 5d 5e 5f 60 ; ....... &4b18 01 01 01 01 01 01 01 ; ....... ; tile_21 # Sea edge bottom &4b20 21 21 22 21 21 21 21 ; ....... &4b28 22 21 21 21 21 21 21 ; ....... &4b30 23 24 62 63 64 65 25 ; ....... &4b38 01 01 01 01 01 01 01 ; ....... ; tile_22 # Barrier in sea &4b40 00 d9 da da da da 66 ; .OOOOO. &4b48 01 db dc dc dc dc 3c ; .OOOOO. &4b50 01 67 68 3c 3c 3c 3c ; ....... &4b58 01 00 01 01 01 01 00 ; ....... ; tile_23 # - channel on sea &4b60 69 69 69 69 69 69 69 ; ....... &4b68 6a 6a 6a 6a 6a 6a 6a ; ....... &4b70 6b 6b 6b 6b 6b 6b 6b ; ....... &4b78 6c 6c 6c 6c 6c 6c 6c ; ....... ; tile_24 (TILE_LAUNCHER) # Launcher on sea &4b80 00 01 01 01 01 00 01 ; ....... &4b88 01 01 dd de df e0 01 ; ..OOOO. &4b90 01 01 e1 e2 e3 e4 01 ; ..OOOO. &4b98 01 00 01 01 01 01 00 ; ....... ; tile_25 # Reservoir &4ba0 03 6d 6e 6f 70 6e 71 ; ....... &4ba8 03 72 e5 e6 e7 e8 73 ; ..OOOO. &4bb0 03 74 e9 ea eb ec 75 ; ..OOOO. &4bb8 03 76 6e 77 78 6e 79 ; ....... ; tile_26 (TILE_EXPOSED_ORB) # Orb on magenta &4bc0 00 06 07 07 07 07 08 ; ....... &4bc8 01 02 7a ed ee 7b 05 ; ...OO.. &4bd0 01 02 09 ef f0 7c 05 ; ...OO.. &4bd8 01 09 0a 0a 0a 0a 0b ; ....... ; tile_27 (TILE_HQ_TOP_LEFT) # HQ top left &4be0 06 07 07 07 07 07 07 ; ....... &4be8 02 f1 f2 f2 f2 f2 f2 ; .OOOOOO &4bf0 02 f3 7e f4 7e f4 f4 ; .O.O.OO &4bf8 02 f3 f5 7f f6 80 f4 ; .OO.O.O ; tile_28 (TILE_HQ_BOTTOM_LEFT) # HQ bottom left &4c00 02 f3 7e f4 7e f4 f4 ; .O.O.OO &4c08 02 f3 f4 7e f4 7e f4 ; .OO.O.O &4c10 02 f3 f4 f4 f4 f4 f4 ; .OOOOOO &4c18 09 81 82 3c 3c 3c 3c ; ....... ; tile_29 (TILE_HQ_RIGHT) # HQ right &4c20 07 07 07 07 07 07 07 ; ....... &4c28 f2 f2 f2 f2 f2 f2 f2 ; OOOOOOO &4c30 f4 f4 f4 f4 f4 f4 f4 ; OOOOOOO &4c38 3c 3c 3c 3c 3c 3c 3c ; ....... ; tile_2a # Lake &4c40 83 84 84 84 84 84 84 ; ....... &4c48 1c 01 00 01 01 00 01 ; ....... &4c50 1c 01 01 00 01 01 01 ; ....... &4c58 86 87 87 87 87 87 87 ; ....... ; tile_2b # Strip and lumps left &4c60 06 07 07 07 07 07 07 ; ....... &4c68 89 19 18 19 18 19 03 ; ....... &4c70 02 1c 03 1c 03 1c 03 ; ....... &4c78 02 8a 84 8b 8c 8b 84 ; ....... ; tile_2c # Strip and lumps right &4c80 07 07 07 07 07 07 07 ; ....... &4c88 18 19 03 03 18 19 03 ; ....... &4c90 03 1c 18 19 03 1c 03 ; ....... &4c98 84 8d 84 8d 84 8e 03 ; ....... ; tile_2d # Lumps &4ca0 02 03 03 03 1c 03 03 ; ....... &4ca8 02 03 f7 f8 8f f9 fa ; ..OO.OO &4cb0 02 03 fb fc 90 fd fe ; ..OO.OO &4cb8 02 03 03 03 1c 03 03 ; ....... ; tile_2e # Strips and lump &4cc0 02 03 03 03 1c 03 03 ; ....... &4cc8 02 91 84 84 8e 18 19 ; ....... &4cd0 02 92 87 87 93 87 94 ; ....... &4cd8 02 03 03 03 1c 03 03 ; ....... ; tile_2f # Strips and lump &4ce0 02 91 84 84 8d 84 95 ; ....... &4ce8 02 1c 03 03 03 06 08 ; ....... &4cf0 02 1c 03 03 03 09 0b ; ....... &4cf8 02 8a 84 84 96 03 03 ; ....... ; tile_30 # Building on strip &4d00 03 03 03 03 03 03 03 ; ....... &4d08 03 cf d0 d0 d0 d1 03 ; .OOOOO. &4d10 84 d2 d3 d3 d3 d4 03 ; .OOOOO. &4d18 03 03 03 03 03 03 03 ; ....... ; tile_31 # Indented strip &4d20 07 07 07 07 07 07 07 ; ....... &4d28 03 97 98 98 98 98 99 ; ....... &4d30 03 9a 9b 98 98 98 9c ; ....... &4d38 84 84 8d 84 84 84 84 ; ....... ; tile_32 # Strip and lumps &4d40 03 03 03 03 1c 03 03 ; ....... &4d48 18 19 03 03 1c 03 1a ; ....... &4d50 03 1c 03 03 1c 03 1d ; ....... &4d58 1e 1f 1e 1e 1f 1e 20 ; ....... ; tile_33 # Strip and lump &4d60 02 03 03 03 1c 03 03 ; ....... &4d68 02 91 84 84 8e 18 19 ; ....... &4d70 02 1c 03 03 03 03 1c ; ....... &4d78 09 9d 1e 1e 1e 1e 1f ; ....... ; tile_34 # Strip grid &4d80 02 03 03 03 1c 03 03 ; ....... &4d88 02 03 03 03 1c 03 03 ; ....... &4d90 02 03 03 03 9e 84 84 ; ....... &4d98 02 03 03 03 1c 03 03 ; ....... ; tile_35 # Strip end &4da0 03 03 03 03 03 03 03 ; ....... &4da8 03 03 03 03 03 03 03 ; ....... &4db0 03 03 03 18 19 03 03 ; ....... &4db8 03 03 03 03 1c 03 03 ; ....... ; tile_36 # Building on strip &4dc0 cf d0 d0 d1 1c 03 03 ; OOOO... &4dc8 d8 d5 d6 d7 9f 03 03 ; OOOO... &4dd0 d2 d3 d3 d4 1c 03 03 ; OOOO... &4dd8 03 03 03 03 1c 03 03 ; ....... ; tile_37 # Strip grid &4de0 03 03 03 03 1c 03 03 ; ....... &4de8 03 03 03 03 1c 03 03 ; ....... &4df0 03 03 03 03 1c 03 03 ; ....... &4df8 1e 1e 1e 1e 1f 1e 1e ; ....... ; tile_38 # Strip grid &4e00 03 03 03 03 1c 03 03 ; ....... &4e08 03 03 03 03 1c 03 03 ; ....... &4e10 03 03 03 03 a0 84 84 ; ....... &4e18 84 84 84 84 9f 03 03 ; ....... ; tile_39 # Strip and lump &4e20 06 07 07 07 a1 28 a2 ; ....... &4e28 02 91 84 84 09 0a a3 ; ....... &4e30 02 1c 03 03 03 03 03 ; ....... &4e38 02 8a 84 84 8c 84 84 ; ....... ; tile_3a # Strip circle &4e40 07 07 07 07 07 07 07 ; ....... &4e48 03 a4 84 84 84 95 03 ; ....... &4e50 03 1c 03 03 03 1c 03 ; ....... &4e58 84 8d 84 84 84 8e 03 ; ....... ; tile_3b # Strip and indented building &4e60 07 07 07 07 07 07 07 ; ....... &4e68 03 91 a5 a5 a5 a6 95 ; ....... &4e70 03 1c a7 a8 a8 a9 1c ; ....... &4e78 84 8d 84 84 84 84 8d ; ....... ; tile_3c # Buildings &4e80 06 07 07 07 07 07 07 ; ....... &4e88 02 27 aa 07 07 a1 2d ; ....... &4e90 02 2a ab 0a 0a ac 2c ; ....... &4e98 09 0a 0a 0a 0a 0a 0a ; ....... ; tile_3d # Strip and lumps &4ea0 03 03 03 03 a0 84 ad ; ....... &4ea8 03 03 ae 03 1c 03 1d ; ....... &4eb0 03 03 1c 03 1c 03 af ; ....... &4eb8 03 03 8a 84 9f 03 03 ; ....... ; tile_3e # Channel over sea edge top &4ec0 01 01 0c 03 03 0c 01 ; ....... &4ec8 4a 4b 0c 03 03 0c 50 ; ....... &4ed0 21 21 0c 03 03 0c 21 ; ....... &4ed8 21 22 0c 03 03 0c 21 ; ....... ; tile_3f # Channel over desert &4ee0 21 21 0c 03 03 0c 21 ; ....... &4ee8 21 21 0c 03 03 0c 21 ; ....... &4ef0 21 21 0c 03 03 0c 22 ; ....... &4ef8 21 22 0c 03 03 0c 21 ; ....... ; tile_40 (TILE_COLLECTED_ORB) # Collected orb on magenta &4f00 00 06 07 07 07 07 08 ; ....... &4f08 01 02 7a b0 b1 7b 05 ; ....... &4f10 01 02 09 b2 b3 0b 05 ; ....... &4f18 01 09 0a 0a 0a 0a 0b ; ....... ; tile_41 # Destroyed building in small buildings &4f20 35 35 35 35 35 35 35 ; ....... &4f28 35 35 b4 b5 b5 b6 35 ; ....... &4f30 35 35 b7 b8 b8 b9 35 ; ....... &4f38 35 35 35 35 35 35 35 ; ....... ; tile_42 # Destroyed two large buildings and connector &4f40 27 28 28 2d 27 28 28 ; ....... &4f48 33 ba bb 34 33 ba bb ; ....... &4f50 2a 2b 2b 2c 2a 2b 2b ; ....... &4f58 03 45 46 47 47 48 49 ; ....... ; tile_43 # Destroyed launcher on sea &4f60 00 01 01 01 01 00 01 ; ....... &4f68 01 01 bc bd be bf 01 ; ....... &4f70 01 01 c0 c1 c2 c3 01 ; ....... &4f78 01 00 01 01 01 01 00 ; ....... ; tile_44 # Collected orb on magenta &4f80 03 6d 6e 6f 70 6e 71 ; ....... &4f88 03 72 c4 c5 c6 c7 73 ; ....... &4f90 03 74 c8 c9 ca cb 75 ; ....... &4f98 03 76 6e 77 78 6e 79 ; ....... ; tile_45 # Destroyed building on strip &4fa0 02 03 03 03 1c 03 03 ; ....... &4fa8 02 03 b4 b5 b5 b5 b6 ; ....... &4fb0 02 03 b7 b8 b8 b8 b9 ; ....... &4fb8 02 03 03 03 1c 03 03 ; ....... ; tile_46 # Destroyed building on strip &4fc0 03 03 03 03 03 03 03 ; ....... &4fc8 03 b4 b5 b5 b5 b6 03 ; ....... &4fd0 84 b7 b8 b8 b8 b9 03 ; ....... &4fd8 03 03 03 03 03 03 03 ; ....... ; tile_47 # Destroyed building on strip &4fe0 27 28 28 2d 1c 03 03 ; ....... &4fe8 33 ba bb 34 9f 03 03 ; ....... &4ff0 2a 2b 2b 2c 1c 03 03 ; ....... &4ff8 03 03 03 03 1c 03 03 ; ....... ; end_of_tile_chunks_data ; chunk_data &5000 0f 0f 0f 0f 0f 3f 2e 0f ; CHUNK_00 &5008 0f 0f 0f 0f 0f 0f 0f 0f ; CHUNK_01 &5010 f8 f8 f8 f8 f8 f8 f8 f8 ; CHUNK_02 &5018 f0 f0 f0 f0 f0 f0 f0 f0 ; CHUNK_03 &5020 f8 f8 f8 f8 f8 f8 f0 f0 ; CHUNK_04 &5028 e0 e0 e0 e0 e0 e0 e0 e0 ; CHUNK_05 &5030 ff ff f8 f8 f8 f8 f8 f8 ; CHUNK_06 &5038 ff ff f0 f0 f0 f0 f0 f0 ; CHUNK_07 &5040 ff ee e0 e0 e0 e0 e0 e0 ; CHUNK_08 &5048 f8 f8 f8 f8 f8 f8 88 88 ; CHUNK_09 &5050 f0 f0 f0 f0 f0 f0 00 00 ; CHUNK_0a &5058 e0 e0 e0 e0 e0 e0 00 00 ; CHUNK_0b &5060 e8 e8 e8 e8 e8 e8 e8 e8 ; CHUNK_0c &5068 0f 0f 0f 07 03 01 00 00 ; CHUNK_0d &5070 0e 0f 0f 0f 0f 0f 0f 0f ; CHUNK_0e &5078 00 00 08 0f 0f 0f 0f 0f ; CHUNK_0f &5080 1f 1f 3e 3e 7c 7c e8 e8 ; CHUNK_10 &5088 d0 d0 b0 b0 70 70 f0 f0 ; CHUNK_11 &5090 f1 f1 f2 f2 f4 f4 e8 e8 ; CHUNK_12 &5098 c1 c1 83 83 07 07 0f 0f ; CHUNK_13 &50a0 f4 f4 f2 f2 f1 f1 f0 f0 ; CHUNK_14 &50a8 07 07 83 83 c1 c1 e8 e8 ; CHUNK_15 &50b0 70 70 b0 b0 d0 d0 e8 e8 ; CHUNK_16 &50b8 7c 7c 3e 3e 1f 1f 0f 0f ; CHUNK_17 &50c0 f0 f1 f1 f1 f1 f1 f1 f1 ; CHUNK_18 &50c8 fe ee e0 e0 e0 e0 e0 40 ; CHUNK_19 &50d0 f7 ff f8 f8 f8 f8 f8 a8 ; CHUNK_1a &50d8 e0 60 60 60 60 60 60 60 ; CHUNK_1b (unused) &50e0 d8 d8 d8 d8 d8 d8 d8 d8 ; CHUNK_1c &50e8 e4 e4 e4 e4 e4 e4 e4 e4 ; CHUNK_1d &50f0 ff ff f0 f0 00 00 00 00 ; CHUNK_1e &50f8 fb f1 f0 f0 00 00 00 00 ; CHUNK_1f &5100 ec e8 e0 e0 00 10 00 00 ; CHUNK_20 &5108 ff ff ff ff ff ff ff ff ; CHUNK_21 &5110 ff ff f9 db ff ff ff ff ; CHUNK_22 &5118 ff ff ff ef cf 8f 8f 0f ; CHUNK_23 &5120 ff ff ff 77 0a 0f 0f 0f ; CHUNK_24 &5128 ff ff 77 3b 1d 0e 0e 0f ; CHUNK_25 &5130 ff ff ff ef 8f 8f 0f 0f ; CHUNK_26 (unused) &5138 ff ff f8 f8 fb fb fa fa ; CHUNK_27 &5140 ff ff f0 f0 ff ff f0 f0 ; CHUNK_28 &5148 ff ee e0 e0 ec ec a0 a0 ; CHUNK_29 &5150 fa fa ea ea f8 f8 88 88 ; CHUNK_2a &5158 f0 f0 00 00 f0 f0 00 00 ; CHUNK_2b &5160 a0 a0 20 20 e0 e0 00 00 ; CHUNK_2c &5168 ff ee e0 e0 ec a8 a0 a0 ; CHUNK_2d &5170 fa fa c8 c8 f8 f8 88 88 ; CHUNK_2e &5178 e8 e8 e0 e0 e0 e0 e0 e0 ; CHUNK_2f &5180 e8 e8 f8 f8 f8 f8 f8 f8 ; CHUNK_30 &5188 e0 e0 e0 e0 e0 e0 e8 e8 ; CHUNK_31 &5190 f8 f8 f8 f8 f8 f8 e8 e8 ; CHUNK_32 &5198 fa fa fa fa fa fa fa fa ; CHUNK_33 &51a0 a0 a0 a0 a0 a0 a0 a0 a0 ; CHUNK_34 &51a8 fe dc d8 d8 d8 98 98 f0 ; CHUNK_35 &51b0 00 00 07 07 07 07 07 07 ; CHUNK_36 &51b8 00 00 0f 0f 0f 0f 0f 0f ; CHUNK_37 &51c0 00 11 1f 1f 1f 1f 1f 1f ; CHUNK_38 &51c8 07 07 07 07 07 07 77 77 ; CHUNK_39 &51d0 0f 0f 0f 0f 0f 0f ff ff ; CHUNK_3a &51d8 1f 1f 1f 1f 1f 1f ff ff ; CHUNK_3b &51e0 00 00 00 00 00 00 00 00 ; CHUNK_3c &51e8 10 32 32 32 32 32 32 32 ; CHUNK_3d &51f0 00 07 07 07 07 07 07 07 ; CHUNK_3e &51f8 10 3e 3e 3e 3e 3e 3e 3e ; CHUNK_3f &5200 00 00 00 00 00 77 77 f0 ; CHUNK_40 &5208 32 32 32 32 32 fe fe f0 ; CHUNK_41 &5210 07 07 07 07 07 77 77 f0 ; CHUNK_42 &5218 3e 3e 3e 3e 3e fe fe f0 ; CHUNK_43 &5220 10 32 3e 3e 3e 3e 3e 3e ; CHUNK_44 &5228 f4 f4 f4 f4 f4 c4 c4 f0 ; CHUNK_45 &5230 70 77 77 f0 f0 00 00 f0 ; CHUNK_46 &5238 f0 ff ff f0 f0 00 00 f0 ; CHUNK_47 &5240 f1 ff ff f0 f0 00 00 f0 ; CHUNK_48 &5248 d0 d0 d0 d0 d0 10 10 f0 ; CHUNK_49 &5250 0f 09 71 db ff ff ff ff ; CHUNK_4a &5258 0f 0f 0e 9d bb ff ff ff ; CHUNK_4b &5260 07 47 ef ee ff ff ff ff ; CHUNK_4c &5268 0d 2b 2b 77 ff ff ff ff ; CHUNK_4d &5270 0f 0f 0e 0e 1d 33 ff ff ; CHUNK_4e &5278 0f 07 8f 88 ff ff ff ff ; CHUNK_4f &5280 0d 2b 77 ff ff ff ff ff ; CHUNK_50 &5288 0f 0e 1d 1d 33 ff ff ff ; CHUNK_51 (unused) &5290 0f 0f 0f 0f 04 bb ff ff ; CHUNK_52 &5298 0f 0e 1d 33 ff ff ff ff ; CHUNK_53 &52a0 0f 07 ce dd ff ff ff ff ; CHUNK_54 &52a8 0f 0b 67 ee ff ff ff ff ; CHUNK_55 &52b0 0f 0f 0e 11 ff ff ff ff ; CHUNK_56 &52b8 0d 33 ff ff ff ff ff ff ; CHUNK_57 &52c0 0f 0f 8f cf cf ef ee ff ; CHUNK_58 &52c8 0e 1d 1d 3b 3b 77 ff ff ; CHUNK_59 (unused) &52d0 ff cf cf 8f 0f 0f 0f 0f ; CHUNK_5a &52d8 3b 3b 3b 1d 0e 0f 0f 0f ; CHUNK_5b &52e0 ff ff ce 8f 0f 0f 0f 0f ; CHUNK_5c &52e8 ff ff ff 77 3b 1d 1d 0e ; CHUNK_5d &52f0 ff ff ff ff ff ce 8e 0f ; CHUNK_5e &52f8 ff ff f9 db ff ce 0b 0f ; CHUNK_5f &5300 ff ef cf cf 8f 8f 07 0f ; CHUNK_60 &5308 ff 77 3b 1d 1d 1d 1f 0f ; CHUNK_61 (unused) &5310 ff ff ff ff ff 47 0b 0f ; CHUNK_62 &5318 ce 8f 8f 8f 0f 0f 0f 0f ; CHUNK_63 &5320 ff 77 3b 1d 0f 0f 0f 0f ; CHUNK_64 &5328 ff ce 8f 0f 0f 0f 0f 0f ; CHUNK_65 &5330 07 07 03 03 01 01 00 00 ; CHUNK_66 &5338 00 08 0c 0e 0f 0f 0f 0f ; CHUNK_67 &5340 00 00 00 00 00 08 0c 0e ; CHUNK_68 &5348 0f 0f 0f ff ff f0 f0 f0 ; CHUNK_69 &5350 00 00 f0 f0 f0 f0 f0 f0 ; CHUNK_6a &5358 f0 f0 f0 f0 f0 f0 ff ff ; CHUNK_6b &5360 f0 f0 f0 00 00 0f 0f 0f ; CHUNK_6c &5368 f0 f0 ff f8 f8 c8 d8 d8 ; CHUNK_6d &5370 f0 f0 ff f0 f0 00 f0 f0 ; CHUNK_6e &5378 f0 f0 ff f0 f0 32 f2 f2 ; CHUNK_6f &5380 f0 f0 ff f0 f0 c0 d0 d0 ; CHUNK_70 &5388 f0 f0 ff e0 e0 64 e4 e4 ; CHUNK_71 &5390 d8 d8 d8 d8 d8 d8 d9 f8 ; CHUNK_72 &5398 e4 e4 e4 e4 e4 e4 ec e0 ; CHUNK_73 &53a0 f8 c8 d8 d8 d8 d8 d8 d8 ; CHUNK_74 &53a8 e0 20 e4 e4 e4 e4 e4 e4 ; CHUNK_75 &53b0 d8 d8 d9 f8 f8 88 f0 f0 ; CHUNK_76 &53b8 f2 f2 fe f0 f0 00 f0 f0 ; CHUNK_77 &53c0 d0 d0 f3 f0 f0 00 f0 f0 ; CHUNK_78 &53c8 e4 e4 ec e0 e0 00 f0 f0 ; CHUNK_79 &53d0 f0 ff ff f8 f8 f8 f8 f8 ; CHUNK_7a &53d8 f0 ff ee e0 e0 e0 e0 e0 ; CHUNK_7b &53e0 e0 e0 e0 e0 e0 60 00 00 ; CHUNK_7c &53e8 60 60 20 20 00 00 00 00 ; CHUNK_7d (unused) &53f0 3c 3c c3 c3 3c 3c c3 c3 ; CHUNK_7e &53f8 7e 7e e7 ef fe 7e e7 e7 ; CHUNK_7f &5400 fc fe e7 e7 fe fe ff ff ; CHUNK_80 &5408 00 80 c0 e0 f0 f0 00 00 ; CHUNK_81 &5410 00 00 00 00 00 80 00 00 ; CHUNK_82 &5418 ff ff f8 f8 c8 c8 d8 d8 ; CHUNK_83 &5420 ff ff f0 f0 00 00 f0 f0 ; CHUNK_84 &5428 ff ee e0 e0 20 64 e4 e4 ; CHUNK_85 (unused) &5430 d8 d8 d9 d9 f8 f8 88 88 ; CHUNK_86 &5438 f0 f0 ff ff f0 f0 00 00 ; CHUNK_87 &5440 e4 e4 ec ec e0 e0 00 00 ; CHUNK_88 (unused) &5448 f8 f9 f9 f9 f9 f9 f9 f9 ; CHUNK_89 &5450 d9 f9 f8 f8 88 80 f0 f0 ; CHUNK_8a &5458 d9 f1 f0 f0 00 00 f0 f0 ; CHUNK_8b &5460 ff ff f0 f0 e0 c8 d8 d8 ; CHUNK_8c &5468 fb f1 f0 f0 00 00 f0 f0 ; CHUNK_8d &5470 d8 d0 d0 d0 10 30 f0 f0 ; CHUNK_8e &5478 ff ff f0 f0 00 71 71 71 ; CHUNK_8f &5480 71 71 71 77 f0 f0 00 00 ; CHUNK_90 &5488 f7 ff f8 f8 e8 c8 d8 d8 ; CHUNK_91 &5490 d8 d8 d9 f9 f8 f8 88 80 ; CHUNK_92 &5498 f0 f0 ff ff f0 f0 e0 c8 ; CHUNK_93 &54a0 d8 d8 d8 d0 d0 d0 10 30 ; CHUNK_94 &54a8 fc dc d0 d0 d0 d8 d8 d8 ; CHUNK_95 &54b0 fc fe d0 d0 d0 d8 d8 d8 ; CHUNK_96 &54b8 00 00 70 70 73 73 72 72 ; CHUNK_97 &54c0 00 00 f0 f0 ff ff f0 f0 ; CHUNK_98 &54c8 00 11 f1 f1 fd b9 b1 b1 ; CHUNK_99 &54d0 62 62 70 70 77 ff f0 f0 ; CHUNK_9a &54d8 00 00 f0 f0 ff fb d8 d8 ; CHUNK_9b &54e0 31 31 f1 f1 ff ff f0 f0 ; CHUNK_9c &54e8 d9 f9 f8 f8 88 80 00 00 ; CHUNK_9d &54f0 d9 f9 f8 f8 e8 c8 d8 d8 ; CHUNK_9e &54f8 d8 d0 d0 d0 d0 d8 d8 d8 ; CHUNK_9f &5500 fb f9 f8 f8 e8 c8 d8 d8 ; CHUNK_a0 &5508 ff ff f0 f0 ff ff f8 f8 ; CHUNK_a1 &5510 ff ff f0 f0 f8 70 70 70 ; CHUNK_a2 &5518 70 70 70 70 70 70 70 70 ; CHUNK_a3 &5520 f7 ff f8 f8 c8 c8 d8 d8 ; CHUNK_a4 &5528 ff ff f0 f0 00 00 f0 00 ; CHUNK_a5 &5530 ff ff f0 f0 00 00 f0 10 ; CHUNK_a6 &5538 70 40 50 50 51 70 77 f0 ; CHUNK_a7 &5540 f0 00 f0 f0 ff f0 ff f0 ; CHUNK_a8 &5548 f2 72 fa fa fa f2 fe f0 ; CHUNK_a9 &5550 ff ff f0 f0 ff ee e0 e0 ; CHUNK_aa &5558 e0 e0 00 00 f0 f0 00 00 ; CHUNK_ab &5560 f8 f8 88 88 f0 f0 00 00 ; CHUNK_ac &5568 fe ee e0 e0 60 64 e4 e4 ; CHUNK_ad &5570 ff e8 e8 e8 e8 e8 e8 c8 ; CHUNK_ae &5578 ec e8 e8 e8 e8 e8 e8 88 ; CHUNK_af &5580 f0 ff ff f0 f0 e0 d0 b0 ; CHUNK_b0 &5588 f0 ff ff f0 f0 70 f4 f2 ; CHUNK_b1 &5590 b0 b0 f2 f1 f0 f0 00 00 ; CHUNK_b2 &5598 f2 f2 f4 f8 f0 f0 00 00 ; CHUNK_b3 &55a0 f0 f0 d0 80 80 c0 c0 e0 ; CHUNK_b4 &55a8 f0 d0 d0 80 00 00 00 00 ; CHUNK_b5 &55b0 b0 10 10 30 10 70 30 10 ; CHUNK_b6 &55b8 c0 80 80 00 80 80 d0 f0 ; CHUNK_b7 &55c0 00 00 80 a0 b0 f0 f0 f0 ; CHUNK_b8 &55c8 00 10 30 10 10 90 f0 f0 ; CHUNK_b9 &55d0 b0 90 90 00 00 00 90 b0 ; CHUNK_ba &55d8 e0 40 00 00 10 10 00 d0 ; CHUNK_bb &55e0 0f 0f 1f 3e 7c 7c f8 e8 ; CHUNK_bc &55e8 7f f8 80 c0 c0 00 00 00 ; CHUNK_bd &55f0 ef 71 70 10 00 00 00 00 ; CHUNK_be &55f8 0f 0f 8f 83 c1 c1 60 60 ; CHUNK_bf &5600 e8 f8 7c 7c 1c 0e 0f 0f ; CHUNK_c0 &5608 00 00 00 a0 f0 f0 70 08 ; CHUNK_c1 &5610 00 00 00 30 30 f0 e0 01 ; CHUNK_c2 &5618 60 60 c1 c1 83 07 0f 0f ; CHUNK_c3 &5620 f0 f0 f1 e3 c7 c7 9f 8e ; CHUNK_c4 &5628 f7 8f 0c 0c 08 88 00 00 ; CHUNK_c5 &5630 fe 1f 0f 47 01 00 00 00 ; CHUNK_c6 &5638 f0 f0 f8 38 1c 1c 06 06 ; CHUNK_c7 &5640 8e 9f c7 c7 c1 e0 f0 f0 ; CHUNK_c8 &5648 00 00 88 08 0c 0e 07 80 ; CHUNK_c9 &5650 00 00 00 01 01 07 0e 10 ; CHUNK_ca &5658 02 06 1c 1c 38 70 f0 f0 ; CHUNK_cb &5660 f8 f8 f8 f8 f8 f8 f0 f0 ; CHUNK_cc &5668 f0 f0 f0 f0 f0 f0 f0 f0 ; CHUNK_cd &5670 0f 7f 6c 6c 6c 4c 0c 0c ; CHUNK_ce &5678 ff ff f8 f8 fb fb fa fa ; CHUNK_cf &5680 ff ff f0 f0 ff ff f0 f0 ; CHUNK_d0 &5688 ff ee e0 e0 ec a8 a0 a0 ; CHUNK_d1 &5690 fa fa ea ea f8 f8 88 88 ; CHUNK_d2 &5698 f0 f0 00 00 f0 f0 00 00 ; CHUNK_d3 &56a0 a0 a0 20 20 e0 e0 00 00 ; CHUNK_d4 &56a8 ff ff f8 f8 f8 f8 88 88 ; CHUNK_d5 &56b0 ff ee e0 e0 e0 e0 00 00 ; CHUNK_d6 &56b8 a0 a0 a0 a0 a0 a0 a0 a0 ; CHUNK_d7 &56c0 fa fa fa fa fa fa fa fa ; CHUNK_d8 &56c8 ff ff aa dd aa dd aa dd ; CHUNK_d9 &56d0 ff ff aa 55 aa 55 aa 55 ; CHUNK_da &56d8 aa dd aa dd aa dd aa dd ; CHUNK_db &56e0 aa 55 aa 55 aa 55 aa 55 ; CHUNK_dc &56e8 0f 0f 1f 3e 7c 7c f9 f9 ; CHUNK_dd &56f0 7f f8 f0 f3 f4 f8 f1 f2 ; CHUNK_de &56f8 ef f1 f0 fc f2 e0 f8 b0 ; CHUNK_df &5700 0f 0f 8f 83 c1 c1 60 60 ; CHUNK_e0 &5708 f9 f9 7c 7c 1c 0e 0f 0f ; CHUNK_e1 &5710 f2 e0 f8 b0 c0 f0 70 08 ; CHUNK_e2 &5718 b0 70 e0 d0 30 f0 e0 01 ; CHUNK_e3 &5720 60 60 c1 c1 83 07 0f 0f ; CHUNK_e4 &5728 f0 f0 f1 e3 c7 c7 9f 9f ; CHUNK_e5 &5730 f7 8f 0f 3f 4f 8f 1f 2f ; CHUNK_e6 &5738 fe 1f 0f cf 2f 0e 8f 0b ; CHUNK_e7 &5740 f0 f0 f8 38 1c 1c 06 06 ; CHUNK_e8 &5748 9f 9f c7 c7 c1 e0 f0 f0 ; CHUNK_e9 &5750 2f 0e 8f 0b 0c 0f 07 80 ; CHUNK_ea &5758 0b 07 0e 0d 03 0f 0e 10 ; CHUNK_eb &5760 06 06 1c 1c 38 70 f0 f0 ; CHUNK_ec &5768 f0 ff ff f0 f0 f1 e3 d6 ; CHUNK_ed &5770 f0 ff ff f0 f0 f8 b0 58 ; CHUNK_ee &5778 e5 d6 c1 e0 e0 f0 00 00 ; CHUNK_ef &5780 94 58 80 00 00 00 00 00 ; CHUNK_f0 &5788 ff ff cb cb bc bc cb cb ; CHUNK_f1 &5790 ff ff c3 c3 3c 3c c3 c3 ; CHUNK_f2 &5798 bc bc cb cb bc bc cb cb ; CHUNK_f3 &57a0 3c 3c c3 c3 3c 3c c3 c3 ; CHUNK_f4 &57a8 7e 7e e7 f7 7f 7e e7 e7 ; CHUNK_f5 &57b0 3f 7f e7 e7 7e 7e f7 f3 ; CHUNK_f6 &57b8 ff ff f8 f8 fb fb fb fb ; CHUNK_f7 &57c0 ff ff f0 f0 fe d8 50 50 ; CHUNK_f8 &57c8 ff ff f0 f0 f7 f7 e6 e6 ; CHUNK_f9 &57d0 ff ee e0 e0 ec a0 a0 a0 ; CHUNK_fa &57d8 fb fb fa ea f8 f8 88 88 ; CHUNK_fb &57e0 50 50 d0 10 f0 f0 00 00 ; CHUNK_fc &57e8 e6 e6 f4 c4 f0 f0 00 00 ; CHUNK_fd &57f0 a0 a0 a0 20 e0 e0 00 00 ; CHUNK_fe &57f8 00 00 00 00 00 00 00 00 ; CHUNK_ff (unused) ; end_of_chunk_data ; entry_point &7400 a9 c8 LDA #&c8 ; Read/Write BREAK/ESCAPE effect &7402 a2 03 LDX #&03 ; Clear memory on next reset &7404 a0 00 LDY #&00 &7406 20 f4 ff JSR &fff4 ; OSBYTE &7409 78 SEI &740a a2 ff LDX #&ff &740c 9a TXS &740d a2 24 LDX #&24 ; set_all_vectors_to_reset_loop &740f ad fc ff LDA &fffc ; os_reset_address_low &7412 9d 00 02 STA &0200,X ; os_vector_table &7415 ad fd ff LDA &fffd ; os_reset_address_high &7418 9d 01 02 STA &0201,X ; os_vector_table + 1 &741b ca DEX &741c ca DEX &741d 10 f0 BPL &740f ; set_all_vectors_to_reset_loop &741f ad 44 fe LDA &fe44 ; System VIA timer 1 counter LSB &7422 cd 44 fe CMP &fe44 ; System VIA timer 1 counter LSB &7425 d0 01 BNE &7428 ; skip_break &7427 00 BRK # Reset system if system not as expected ; skip_break &7428 a0 00 LDY #&00 &742a 84 00 STY &00 ; target_address_low &742c 84 02 STY &02 ; source_address_low &742e a9 03 LDA #&03 &7430 85 01 STA &01 ; target_address_high &7432 a9 1f LDA #&1f &7434 85 03 STA &03 ; source_address_high ; decrypt_1f00_to_73ff_loop # Decrypt and move &1f00 - &73ff to &0300 - &57ff &7436 b1 02 LDA (&02),Y ; source_address &7438 20 bd 74 JSR &74bd ; decrypt_byte &743b 91 00 STA (&00),Y ; target_address &743d a9 00 LDA #&00 &743f 91 02 STA (&02),Y ; source_address &7441 c8 INY &7442 d0 f2 BNE &7436 ; decrypt_1f00_to_73ff_loop &7444 e6 01 INC &01 ; target_address_high &7446 e6 03 INC &03 ; source_address_high &7448 a5 03 LDA &03 ; source_address_high &744a c9 74 CMP #&74 &744c d0 e8 BNE &7436 ; decrypt_1f00_to_73ff_loop &744e a2 0d LDX #&0d ; initialise_video_registers_loop &7450 bd ad 74 LDA &74ad,X ; video_register_data &7453 8e 00 fe STX &fe00 ; video register number &7456 8d 01 fe STA &fe01 ; video register value &7459 ca DEX &745a 10 f4 BPL &7450 ; initialise_video_registers_loop &745c a9 c4 LDA #&c4 # Change to MODE 5 &745e 8d 20 fe STA &fe20 ; video ULA control register &7461 a2 0f LDX #&0f # Set PB0-3 as outputs, PB4-7 as input (OS defaults) &7463 8e 42 fe STX &fe42 ; System VIA data direction register B &7466 8e 40 fe STX &fe40 ; System VIA port B input/output register # Disable Shift Lock LED &7469 ca DEX ; &e &746a 8e 40 fe STX &fe40 ; System VIA port B input/output register # Disable Caps Lock LED &746d a9 03 LDA #&03 &746f 8d 40 fe STA &fe40 ; System VIA port B input/output register # Disable keyboard auto-scan &7472 a9 0c LDA #&0c &7474 8d 40 fe STA &fe40 ; System VIA port B input/output register # Set addressable latch B4 to 1 &7477 a9 0d LDA #&0d &7479 8d 40 fe STA &fe40 ; System VIA port B input/output register # Set addressable latch B5 to 1, i.e. scroll from &5800 &747c a9 5c LDA #&5c ; &045c = irq1_handler &747e 8d 04 02 STA &0204 ; irq1_vector_low &7481 a9 04 LDA #&04 &7483 8d 05 02 STA &0205 ; irq1_vector_high &7486 a9 3d LDA #&3d # Disable all interrupts except Timer 1 and CA1 (v-sync) &7488 8d 4e fe STA &fe4e ; System VIA interrupt enable register &748b a9 7f LDA #&7f # Disable all interrupts &748d 8d 6e fe STA &fe6e ; User VIA interrupt enable register &7490 8d 43 fe STA &fe43 ; System VIA data direction register A # Set top bit as input, low seven bits as output &7493 a9 00 LDA #&00 &7495 8d 4b fe STA &fe4b ; System VIA auxiliary control register # Set timers to generate interrupts &7498 8d 08 fe STA &fe08 ; Cassette ACIA control register # Disable interrupts &749b 2c 18 fe BIT &fe18 ; ADC conversion status on Master &749e aa TAX ; 0 ; wipe_0000_to_01ff_loop # Wipe &0000 - &01ff &749f 95 00 STA &00,X &74a1 9d 00 01 STA &0100,X &74a4 e8 INX &74a5 d0 f8 BNE &749f ; wipe_0000_to_01ff_loop &74a7 20 d4 0a JSR &0ad4 ; initialise_game &74aa 4c 5f 08 JMP &085f ; title_screen ; video_register_data &74ad 3f ; R0: Horizontal total register &74ae 00 ; R1: Number of characters per line &74af 31 ; R2: Horizontal sync position register &74b0 24 ; R3: Sync width register &74b1 26 ; R4: Vertical total register &74b2 00 ; R5: Vertical total adjust register &74b3 20 ; R6: Vertical displayed register &74b4 22 ; R7: Vertical sync position &74b5 01 ; R8: Interlace and delay register &74b6 07 ; R9: Scan lines per character register &74b7 20 ; R10: Cursor start register &74b8 00 ; R11: Cursor end register &74b9 0b ; R12: Displayed screen start address register (high) # Screen starts at &5800 &74ba 00 ; R13: Displayed screen start address register (low) ; unused &74bb 0b 00 ; decrypt_byte &74bd 59 c7 74 EOR &74c7,Y ; decryption_key &74c0 49 aa EOR #&aa &74c2 84 70 STY &70 ; eor &74c4 45 70 EOR &70 ; eor &74c6 60 RTS ; decryption_key &74c7 48 69 2c 20 77 65 6c 6c 20 74 68 69 73 20 6d 75 ; "Hi, well this mu" &74d7 73 74 20 62 65 20 6d 79 20 66 69 72 73 74 20 67 ; "st be my first g" &74e7 61 6d 65 20 65 76 65 72 20 77 68 69 63 68 20 69 ; "ame ever which i" &74f7 73 20 6e 6f 74 20 64 65 64 69 63 61 74 65 64 20 ; "s not dedicated " &7507 74 6f 20 54 72 61 63 65 79 20 44 69 61 6e 6e 65 ; "to Tracey Dianne" &7517 20 4e 69 63 68 6f 6c 73 6f 6e 2e 20 4e 6f 20 64 ; " Nicholson. No d" &7527 6f 75 62 74 20 69 74 20 77 69 6c 6c 20 6e 6f 74 ; "oubt it will not" &7537 20 62 65 20 74 68 65 20 6c 61 73 74 2e 20 4d 61 ; " be the last. Ma" &7547 79 20 62 65 20 6f 6e 65 20 64 61 79 20 74 68 65 ; "y be one day the" &7557 72 65 20 6d 61 79 20 62 65 20 61 20 67 61 6d 65 ; "re may be a game" &7567 20 77 68 69 63 68 20 63 6f 6e 74 61 69 6e 73 20 ; " which contains " &7577 74 68 65 20 6c 65 67 65 6e 64 61 72 79 20 28 21 ; "the legendary (!" &7587 21 21 29 20 27 49 4c 54 44 4e 27 20 6e 61 6d 65 ; "!!) 'ILTDN' name" &7597 2c 20 62 75 74 20 61 73 20 79 65 74 20 49 20 63 ; ", but as yet I c" &75a7 61 6e 20 73 65 65 20 6e 6f 20 63 68 61 6e 63 65 ; "an see no chance" &75b7 20 6f 66 20 73 75 63 68 20 61 6e 20 6f 63 63 75 ; " of such an occu" ; unused &75c7 72 61 6e 63 65 2e 20 49 6e 73 74 65 61 64 20 74 ; "rance. Instead t" &75d7 68 69 73 20 67 61 6d 65 20 69 73 20 64 65 64 69 ; "his game is dedi" &75e7 63 61 74 65 64 20 74 6f 20 66 6f 75 72 20 61 6e ; "cated to four an" &75f7 64 20 61 20 68 61 6c 66 20 79 65 61 72 73 20 6f ; "d a half years o" &7607 66 20 61 6e 20 69 6e 74 69 6d 61 74 65 20 72 65 ; "f an intimate re" &7617 6c 61 74 69 6f 6e 73 68 69 70 2c 20 61 6e 64 20 ; "lationship, and " &7627 6f 6e 65 20 79 65 61 72 20 6f 66 20 62 65 69 6e ; "one year of bein" &7637 67 20 65 6e 67 61 67 65 64 20 74 6f 20 62 65 20 ; "g engaged to be " &7647 6d 61 72 72 69 65 64 2e 20 49 74 20 64 69 64 20 ; "married. It did " &7657 6e 6f 74 20 77 6f 72 6b 20 6f 75 74 20 2d 20 62 ; "not work out - b" &7667 75 74 20 70 6c 61 6e 6e 65 64 20 65 76 65 6e 74 ; "ut planned event" &7677 73 20 72 61 72 65 6c 79 20 64 6f 2e 2e 2e 20 49 ; "s rarely do... I" &7687 20 73 75 70 70 6f 73 65 20 49 20 61 6d 20 61 6e ; " suppose I am an" &7697 20 6f 6c 64 20 72 6f 6d 61 6e 74 69 63 20 61 74 ; " old romantic at" &76a7 20 68 65 61 72 74 2c 20 77 65 20 61 72 65 20 61 ; " heart, we are a" &76b7 20 64 79 69 6e 67 20 62 72 65 65 64 2c 20 64 6f ; " dying breed, do" &76c7 20 6e 6f 74 20 6c 65 74 20 6d 6f 64 65 72 6e 20 ; " not let modern " &76d7 63 68 61 72 61 63 74 6f 72 69 73 74 69 63 73 20 ; "charactoristics " &76e7 63 6f 6e 74 61 6d 69 6e 61 74 65 20 74 68 65 20 ; "contaminate the " &76f7 6f 6c 64 20 66 61 73 68 69 ; "old fashi"