The Way of the Exploding Fist disassembly ========================================= Published by Melbourne House in 1985, The Way of the Exploding Fist was converted to the BBC Micro by Michael Simpson. It is a one or two-player fighting game, in which points are scored for striking the opponent. 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. Technical notes =============== This disassembly analyses the second version of the game, which alternates between two backgrounds, and has improved key handling in the demo screen. A VIA-based decryption routine in the loader conceals the load and execution addresses of the main binary. Interesting pokes ================= &203f = (dan * 2) set initial skill level of opponent in one-player game &0919 = &df, &0949 = &df computer player can never win round Loader disassembly ================== ; FIST ; 00002500 00002500 0430 &2500 a9 03 LDA #&03 # Enable ESCAPE, clear memory on BREAK &2502 8d 58 02 STA &0258 ; ESCAPE/BREAK effect &2505 a2 00 LDX #&00 ; initialise_screen_loop &2507 bd 36 25 LDA &2536,X ; initialise_screen_text &250a 20 ee ff JSR &ffee ; OSWRCH &250d e8 INX &250e e0 07 CPX #&07 &2510 90 f5 BCC &2507 ; initialise_screen_loop &2512 a2 00 LDX #&00 ; copy_title_screen_loop &2514 bd 48 25 LDA &2548,X ; title_screen &2517 9d 00 7c STA &7c00,X ; screen_memory &251a bd 48 26 LDA &2648,X ; title_screen &251d 9d 00 7d STA &7d00,X ; screen_memory &2520 bd 48 27 LDA &2748,X ; title_screen &2523 9d 00 7e STA &7e00,X ; screen_memory &2526 bd 48 28 LDA &2848,X ; title_screen &2529 9d 00 7f STA &7f00,X ; screen_memory &252c ca DEX &252d d0 e5 BNE &2514 ; copy_title_screen_loop &252f a2 3d LDX #&3d ; &253d = run_loader_command &2531 a0 25 LDY #&25 &2533 4c f7 ff JMP &fff7 ; OSCLI ; initialise_screen_text &2536 16 07 ; change to MODE 7 &2538 1c 18 13 27 0f ; define text window x:(&18, &27), y:(&0f, &13) ; run_loader_command &253d 52 55 4e 20 4c 4f 41 44 45 52 0d ; "RUN LOADER" ; title_screen &2548 20 9d 20 91 20 20 00 60 20 20 60 20 60 70 20 60 ; " . . .` ` `p ` ` p0 pp `pp 0` pp .V2" &2558 20 60 20 20 20 70 30 20 70 70 20 60 70 70 20 30 ; ".. . .j 4j up5*0: j j u0 j uz u0 " &2568 60 20 70 70 20 81 56 32 97 9d 20 91 20 20 00 6a ; ".. . .*pe: 5 5 j *p: 5 j 5j up " &2578 20 34 6a 20 75 70 35 2a 30 3a 20 20 6a 20 6a 20 ; ".. . . .<, 4 4h,0h 8,0h,0 4h0h 8,0 " &2588 75 30 20 20 6a 20 20 75 7a 20 75 30 20 20 20 20 ; ".. . ...=$ bf j,!j 5 5j j 5j*z 5(4 " &2598 97 9d 20 91 20 20 00 2a 70 65 3a 20 35 20 35 20 ; ".. ......-, % %* *,$),!*,! %* + ),! " &25a8 6a 20 20 20 2a 70 3a 20 35 20 20 20 6a 20 20 35 ; ".. .. `,,,0. .7# 5h#) #7! " &25b8 6a 20 75 70 20 20 20 20 97 9d 20 91 20 20 00 20 ; ".. . x9;/q~ ppx<,####i.7! 5`#i 5 " &25c8 00 3c 2c 20 34 20 34 68 2c 30 68 20 20 38 2c 30 ; ".. ..&jj!l$~`|.....t8,##-..! ! #! ! " &25d8 68 2c 30 20 34 68 30 68 20 38 2c 30 20 20 20 20 ; ".. .. *p% |j...;o./-% " &25e8 97 9d 20 91 20 20 00 00 00 3d 24 20 62 66 20 6a ; ".. .. `z4,x&+....|ppx||||||ppx|,t " &25f8 2c 21 6a 20 20 35 20 35 6a 20 6a 20 35 6a 2a 7a ; ".. .. ~..||~......j........5 pp 5 " &2608 20 35 28 34 20 20 20 20 97 9d 20 91 00 00 00 00 ; ".. .. ..w/......? /y~..?////' "##! " &2618 00 2d 2c 20 25 20 25 2a 20 20 2a 2c 24 29 2c 21 ; ".. .. ....#+//.?e#...# " &2628 2a 2c 21 20 25 2a 20 2b 20 29 2c 21 20 20 20 20 ; ".. .. "o.')0 j~.|k.% . " &2638 97 9d 20 94 94 20 20 60 2c 2c 2c 30 91 20 20 20 ; ".. .. #)0",0 k...7 . " &2648 20 20 20 20 20 20 20 20 20 20 00 37 23 20 35 68 ; ".. .. "i f%j...5 . " &2658 23 29 20 23 37 21 20 20 97 9d 20 20 94 20 78 39 ; ".. .. ). j...u . " &2668 3b 2f 71 7e 20 20 20 20 70 70 78 3c 2c 23 23 23 ; ".. .. k...0 . " &2678 23 69 91 37 21 20 35 60 23 69 20 20 35 20 20 20 ; ".. .. *...5 . " &2688 97 9d 20 94 94 26 6a 6a 21 6c 24 7e 60 7c 7f 7f ; ".. .. yg>yo *yg>yg>yg>yg< " &26a8 23 21 20 20 21 20 20 20 97 9d 20 94 94 20 2a 70 ; ".. .. "kqpx? "!#" " &26b8 25 20 7c 6a 7f 7f 7f 3b 6f 7f 2f 2d 25 20 20 20 ; ".. .Adapted for the BBC Micro " &26c8 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ; " .. by Michael Simpson. (C)1985. " &26d8 97 9d 20 94 94 20 60 7a 34 2c 78 26 2b 7f 7f 7f ; &26e8 7f 7c 70 70 78 7c 7c 7c 7c 7c 7c 70 70 78 7c 2c ; &26f8 74 20 20 20 20 20 20 20 97 9d 20 94 94 20 7e 7f ; &2708 7f 7c 7c 7e 7f 7f 7f 7f 7f 7f 6a 7f 7f 7f 7f 7f ; &2718 7f 7f 7f 35 20 70 70 20 20 35 20 20 20 20 20 20 &2728 97 9d 20 94 94 20 7f 7f 77 2f 7f 7f 7f 7f 7f 7f &2738 3f 20 2f 79 7e 7f 7f 3f 2f 2f 2f 2f 27 20 22 23 &2748 23 21 20 20 20 20 20 20 97 9d 20 94 94 20 7f 7f &2758 7f 7f 23 2b 2f 2f 7f 3f 65 23 7f 7f 7f 23 20 20 &2768 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 &2778 97 9d 20 94 94 20 22 6f 7f 27 29 30 20 20 6a 7e &2788 7f 7c 6b 7f 25 20 20 85 20 20 20 20 20 20 20 20 &2798 20 20 20 20 20 20 20 20 97 9d 20 94 94 20 20 20 &27a8 23 29 30 22 2c 30 20 6b 7f 7f 7f 37 20 20 20 85 &27b8 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 &27c8 97 9d 20 94 94 20 20 20 20 20 22 69 20 66 25 6a &27d8 7f 7f 7f 35 20 20 20 85 20 20 20 20 20 20 20 20 &27e8 20 20 20 20 20 20 20 20 97 9d 20 94 94 20 20 20 &27f8 20 20 20 20 29 2e 20 6a 7f 7f 7f 75 20 20 20 85 &2808 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 &2818 97 9d 20 94 94 20 20 20 20 20 20 20 20 20 20 20 &2828 6b 7f 7f 7f 30 20 20 85 20 20 20 20 20 20 20 20 &2838 20 20 20 20 20 20 20 20 97 9d 20 94 94 20 20 20 &2848 20 20 20 20 20 20 20 20 2a 7f 7f 7f 35 20 20 85 &2858 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 &2868 97 9d 20 94 94 20 3c 78 64 30 70 60 30 70 60 30 &2878 70 2f 7f 3f 35 20 20 85 20 20 20 20 20 20 20 20 &2888 20 20 20 20 20 20 20 20 97 9d 20 94 94 20 20 20 &2898 23 2e 79 67 3e 79 67 3e 79 6f 20 20 2a 79 67 3e &28a8 79 67 3e 79 67 3e 79 67 3c 20 20 20 20 20 20 20 &28b8 97 9d 20 94 94 20 20 20 20 20 20 20 20 20 20 22 &28c8 6b 71 70 78 3f 20 20 20 20 20 20 20 20 22 21 23 &28d8 22 20 20 20 20 20 20 20 97 9d 20 81 41 64 61 70 &28e8 74 65 64 20 66 6f 72 20 74 68 65 20 42 42 43 20 &28f8 4d 69 63 72 6f 20 20 20 20 20 20 20 20 20 20 20 &2908 20 9d 81 20 20 20 20 20 20 20 62 79 20 4d 69 63 &2918 68 61 65 6c 20 53 69 6d 70 73 6f 6e 2e 20 28 43 &2928 29 31 39 38 35 2e 20 20 ; LOADER ; 00002E67 00002E85 00C3 &2e67 50 72 6f 74 65 63 74 69 6f 6e 20 62 79 20 4d 69 ; "Protection by Michael Simpson" &2e77 63 68 61 65 6c 20 53 69 6d 70 73 6f 6e 2e ; entry_point ; via_decryption_code &2e85 a9 0f LDA #&0f ; Flush all buffers &2e87 a2 00 LDX #&00 &2e89 20 f4 ff JSR &fff4 ; OSBYTE &2e8c 78 SEI &2e8d a9 df LDA #&df # Set User VIA timer 2 to one-shot mode &2e8f 2d 6b fe AND &fe6b ; User VIA auxiliary control register &2e92 8d 6b fe STA &fe6b ; User VIA auxiliary control register &2e95 a9 ff LDA #&ff &2e97 8d 68 fe STA &fe68 ; User VIA timer 2 counter LSB &2e9a 8d 69 fe STA &fe69 ; User VIA timer 2 counter MSB &2e9d a2 00 LDX #&00 # actually LDX via_decryption_offset ; via_decryption_loop &2e9f bd 00 2f LDA &2f00,X ; payload &2ea2 4d 68 fe EOR &fe68 ; User VIA timer 2 counter LSB &2ea5 ee 68 fe INC &fe68 ; User VIA timer 2 counter LSB &2ea8 2e 69 fe ROL &fe69 ; User VIA timer 2 counter MSB &2eab ee 9e 2e INC &2e9e ; via_decryption_offset &2eae 49 ff EOR #&ff # actually EOR via_decryption_eor &2eb0 a0 00 LDY #&00 ; checksum_loop &2eb2 4d 69 fe EOR &fe69 ; User VIA timer 2 counter MSB &2eb5 4d 68 fe EOR &fe68 ; User VIA timer 2 counter LSB &2eb8 59 85 2e EOR &2e85,Y ; via_decryption_code # Runs over &2e85 - &2eff &2ebb c8 INY &2ebc c0 7b CPY #&7b &2ebe 90 f2 BCC &2eb2 ; checksum_loop &2ec0 ac 69 fe LDY &fe69 ; User VIA timer 2 counter MSB ; eor_loop &2ec3 4d 68 fe EOR &fe68 ; User VIA timer 2 counter LSB &2ec6 88 DEY &2ec7 d0 fa BNE &2ec3 ; eor_loop &2ec9 6e 68 fe ROR &fe68 ; User VIA timer 2 counter LSB &2ecc ce 69 fe DEC &fe69 ; User VIA timer 2 counter MSB &2ecf 90 03 BCC &2ed4 ; skip_decrement &2ed1 ce af 2e DEC &2eaf ; via_decryption_eor ; skip_decrement &2ed4 9d 00 2f STA &2f00,X ; payload &2ed7 a9 03 LDA #&03 # Enable ESCAPE, clear memory on BREAK &2ed9 8d 58 02 STA &0258 ; ESCAPE/BREAK effect &2edc ad b7 ff LDA &ffb7 ; os_rom_default_vector_table_address_low &2edf 85 70 STA &70 ; default_vector_table_address_low &2ee1 ad b8 ff LDA &ffb8 ; os_rom_default_vector_table_address_high &2ee4 85 71 STA &71 ; default_vector_table_address_high &2ee6 ac b6 ff LDY &ffb6 ; os_rom_vector_table_length ; reset_vector_table_loop &2ee9 b1 70 LDA (&70),Y ; default_vector_table_address &2eeb 99 00 02 STA &0200,Y ; os_vector_table # Reset vectors &2eee 88 DEY &2eef 10 f8 BPL &2ee9 ; reset_vector_table_loop &2ef1 a0 0f LDY #&0f &2ef3 a9 00 LDA #&00 ; remove_roms_loop &2ef5 99 a1 02 STA &02a1,Y ; os_paged_rom_type_table # Remove paged ROMs from ROM information table &2ef8 88 DEY &2ef9 10 fa BPL &2ef5 ; remove_roms_loop &2efb e8 INX &2efc e0 2a CPX #&2a &2efe 90 9f BCC &2e9f ; via_decryption_loop # &2f1a - &2f29 is decrypted at &2ed4 ; payload &2f00 a9 00 LDA #&00 &2f02 85 70 STA &70 ; unused &2f04 a9 04 LDA #&04 &2f06 85 71 STA &71 ; unused &2f08 a9 2b LDA #&2b &2f0a 85 72 STA &72 ; unused &2f0c 78 SEI &2f0d a2 ff LDX #&ff &2f0f 9a TXS &2f10 a2 1a LDX #&1a ; &1a2f = load_game1_command &2f12 a0 2f LDY #&2f &2f14 20 f7 ff JSR &fff7 ; OSCLI &2f17 4c 00 2d JMP &2d00 ; main_binary_entry_point ; load_game1_command &2f1a 4c 4f 41 44 20 47 41 4d 45 31 20 34 30 30 0d ; "LOAD GAME1 400" Game disassembly ================ ; GAME1 ; 00000000 00000000 2A1F ; check_for_move # called with A = &bf for player one, &c8 for player two &0400 bc fc 0d LDY &0dfc,X ; players_type # Positive if human, negative if computer &0403 10 03 BPL &0408 ; check_for_human_move &0405 4c d1 04 JMP &04d1 ; check_for_computer_move ; check_for_human_move &0408 bc fe 0d LDY &0dfe,X ; players_input_type # Zero for keyboard, non-zero for joystick &040b 86 e2 STX &e2 ; player &040d f0 47 BEQ &0456 ; check_keyboard ; check_joystick &040f a2 00 LDX #&00 ; Joystick buttons &0411 86 80 STX &80 ; move &0413 a9 80 LDA #&80 ; Read I/O device or buffer status &0415 20 f4 ff JSR &fff4 ; OSBYTE &0418 8a TXA &0419 4a LSR A &041a a6 e2 LDX &e2 ; player &041c f0 01 BEQ &041f ; is_player_one &041e 4a LSR A ; is_player_one &041f 26 80 ROL &80 ; move # Set bit if fire pressed (will be rotated) &0421 a2 01 LDX #&01 ; First joystick left/right &0423 a4 e2 LDY &e2 ; player &0425 f0 02 BEQ &0429 ; check_joystick_left_right &0427 a2 03 LDX #&03 ; Second joystick left/right ; check_joystick_left_right &0429 a9 80 LDA #&80 ; Read I/O device or buffer status &042b 20 f4 ff JSR &fff4 ; OSBYTE &042e c0 bf CPY #&bf &0430 26 80 ROL &80 ; move # Set &08 if joystick left (will be rotated) &0432 98 TYA &0433 48 PHA ; joystick x &0434 a2 02 LDX #&02 ; First joystick up/down &0436 a4 e2 LDY &e2 ; player &0438 f0 02 BEQ &043c ; check_joystick_up_down &043a a2 04 LDX #&04 ; Second joystick up/down ; check_joystick_up_down &043c a9 80 LDA #&80 ; Read I/O device or buffer status &043e 20 f4 ff JSR &fff4 ; OSBYTE &0441 c0 40 CPY #&40 &0443 26 80 ROL &80 ; move # Set &04 if joystick not down (will be rotated) &0445 68 PLA ; joystick x &0446 aa TAX &0447 e0 40 CPX #&40 &0449 26 80 ROL &80 ; move # Set &02 if joystick not right (will be rotated) &044b c0 bf CPY #&bf &044d 26 80 ROL &80 ; move # Set &01 if joystick up &044f a5 80 LDA &80 ; move &0451 49 06 EOR #&06 ; MOVE_WALK_FORWARDS | MOVE_CROUCH # Set &04 and &02 if joystick down or right &0453 4c 9d 04 JMP &049d ; consider_flipping_move_direction ; check_keyboard &0456 8d 64 04 STA &0464 ; first_key_low &0459 18 CLC &045a 69 08 ADC #&08 &045c 8d 8f 04 STA &048f ; fire_key_low &045f a2 07 LDX #&07 ; check_for_direction_keys_loop &0461 8a TXA &0462 48 PHA ; key offset &0463 bd bf 04 LDA &04bf,X ; player_one_keys # also LDA &04c8,X ; player_two_keys # actually LDA first_key,X &0466 aa TAX &0467 a9 79 LDA #&79 ; Keyboard scan # Y = 0 here (see &0400) &0469 20 f4 ff JSR &fff4 ; OSBYTE # Returns top bit set if key pressed &046c 8a TXA &046d 0a ASL A &046e 26 80 ROL &80 ; keys_pressed &0470 68 PLA ; key offset &0471 aa TAX &0472 ca DEX &0473 10 ec BPL &0461 ; check_for_direction_keys_loop &0475 a5 80 LDA &80 ; keys_pressed &0477 c9 10 CMP #&10 &0479 90 12 BCC &048d ; not_diagonal_movement # Has a diagonal key been pressed? &047b 29 f0 AND #&f0 # If so, convert to a combination of two keys &047d 4a LSR A &047e 4a LSR A &047f 4a LSR A # 8421.... -> ...8421. &0480 85 80 STA &80 ; keys_pressed &0482 4a LSR A # ....8421 &0483 05 80 ORA &80 ; keys_pressed &0485 c9 10 CMP #&10 &0487 90 04 BCC &048d ; not_diagonal_movement # Branch unless up-left was pressed &0489 29 0f AND #&0f # Keep left bit &048b 09 01 ORA #&01 ; MOVE_JUMP # Add up bit ; not_diagonal_movement &048d 48 PHA ; move &048e ae c7 04 LDX &04c7 ; player_one_keys + 8 # also LDX &04d0 ; player_two_keys + 8 # actually LDX fire_key &0491 a9 79 LDA #&79 ; Keyboard scan &0493 20 f4 ff JSR &fff4 ; OSBYTE # Returns top bit set if key pressed &0496 8a TXA &0497 0a ASL A &0498 68 PLA ; move &0499 90 02 BCC &049d ; fire_not_pressed &049b 09 10 ORA #&10 ; fire_not_pressed ; consider_flipping_move_direction &049d a8 TAY &049e ad 7e 01 LDA &017e ; players_flip_for_movement_purposes &04a1 4a LSR A # Set carry if player one facing left for movement purposes &04a2 a6 e2 LDX &e2 ; player &04a4 f0 01 BEQ &04a7 ; not_player_two &04a6 4a LSR A # Set carry if player two facing left for movement purposes ; not_player_two &04a7 90 15 BCC &04be ; leave # Leave if player is facing right &04a9 c0 20 CPY #&20 &04ab b0 11 BCS &04be ; leave # Leave if not regular move &04ad 98 TYA &04ae 29 0a AND #&0a ; MOVE_WALK_FORWARDS | MOVE_WALK_BACKWARDS &04b0 4a LSR A # Convert MOVE_WALK_BACKWARDS (8) to MOVE_WALK_FORWARDS (2) &04b1 4a LSR A &04b2 90 02 BCC &04b6 ; not_walking_forward &04b4 09 08 ORA #&08 ; MOVE_WALK_BACKWARDS # and MOVE_WALK_FORWARDS to MOVE_WALK_BACK_OR_BLOCK ; not_walking_forward # i.e. flip direction of moves if player is facing left &04b6 85 90 STA &90 ; opposite_walk &04b8 98 TYA &04b9 29 f5 AND #&f5 ; !(MOVE_WALK_FORWARDS | MOVE_WALK_BACKWARDS) &04bb 05 90 ORA &90 ; opposite_walk &04bd a8 TAY ; leave &04be 60 RTS # Leave with Y = move ; player_one_keys # After processing, moves become: &04bf a1 ; &01 : W # &01 Jump &11 Flying kick &04c0 b2 ; &02 : D # &02 Walk forward &12 Mid kick &04c1 c2 ; &04 : X # &04 Crouch / low punch &14 Forward sweep &04c2 c1 ; &08 : A # &08 Walk back / block &18 Roundhouse / about-face &04c3 a2 ; &10 : E # &03 High punch &13 High kick &04c4 d2 ; &20 : C # &06 Jab &16 Short jab kick &04c5 e1 ; &40 : Z # &0c Back somersault &1c Backwards sweep &04c6 90 ; &80 : Q # &09 Forward Somersault &19 High back kick &04c7 f0 ; ESCAPE ; player_two_keys &04c8 b6 ; &01 : O &04c9 d7 ; &02 : ; &04ca e7 ; &04 : . &04cb c6 ; &08 : K &04cc b7 ; &10 : P &04cd e8 ; &20 : / &04ce e6 ; &40 : , &04cf a5 ; &80 : I &04d0 f9 ; RIGHT ; check_for_computer_move # Called with X = 0 for player one, 1 for player two &04d1 8a TXA &04d2 f0 1e BEQ &04f2 ; is_computer_player_one ; is_computer_player_two &04d4 a2 03 LDX #&03 # If this is player two, ; copy_players_two_and_one_states_loop &04d6 bd fa 54 LDA &54fa,X ; player_one_state + 1 # use player one as the other player &04d9 9d 85 0d STA &0d85,X ; other_player_state_for_computer &04dc bd f2 54 LDA &54f2,X ; player_two_state + 1 # and player two as this player &04df 9d 80 0d STA &0d80,X ; this_player_state_for_computer &04e2 ca DEX &04e3 10 f1 BPL &04d6 ; copy_players_two_and_one_states_loop &04e5 a6 72 LDX &72 ; player_two_screen_address_low &04e7 a4 78 LDY &78 ; player_one_screen_address_low &04e9 a5 7e LDA &7e ; players_flip &04eb 4a LSR A # Swap bits so lowest bit is this player &04ec 90 1b BCC &0509 ; set_player_screen_addresses &04ee 09 02 ORA #&02 &04f0 b0 17 BCS &0509 ; set_player_screen_addresses # Always branches ; is_computer_player_one &04f2 a2 03 LDX #&03 # If this is player one, ; copy_players_one_and_two_states_loop &04f4 bd fa 54 LDA &54fa,X ; player_one_state + 1 # use player one as this player &04f7 9d 80 0d STA &0d80,X ; this_player_state_for_computer &04fa bd f2 54 LDA &54f2,X ; player_two_state + 1 # and player two as the other player &04fd 9d 85 0d STA &0d85,X ; other_player_state_for_computer &0500 ca DEX &0501 10 f1 BPL &04f4 ; copy_players_one_and_two_states_loop &0503 a6 78 LDX &78 ; player_one_screen_address_low &0505 a4 72 LDY &72 ; player_two_screen_address_low &0507 a5 7e LDA &7e ; players_flip # Keep bits (lowest bit is this player) ; set_player_screen_addresses &0509 8e 84 0d STX &0d84 ; this_player_screen_address_low_for_computer &050c 8c 89 0d STY &0d89 ; other_player_screen_address_low_for_computer &050f 8d 8a 0d STA &0d8a ; computer_players_flip &0512 4c b0 1a JMP &1ab0 ; consider_computer_move # Returns Y = move ; unused &0515 ee ff 00 00 00 00 00 00 00 00 00 ; add_points_for_hit # Called with X = 0 for player one, 4 for player two &0520 a9 00 LDA #&00 # Set to zero to indicate insufficient points by default &0522 8d f3 0d STA &0df3 ; sufficient_points_for_win # Unused variable &0525 ad 00 01 LDA &0100 ; points_for_hit &0528 18 CLC &0529 7d f0 0d ADC &0df0,X ; players_points # Add points to scoring player's total &052c 9d f0 0d STA &0df0,X ; players_points &052f 8e f2 0d STX &0df2 ; scoring_player_offset &0532 c9 04 CMP #&04 &0534 90 05 BCC &053b ; not_sufficient_points_for_win &0536 a9 04 LDA #&04 # Set to non-zero to indicate sufficient points for win &0538 8d f3 0d STA &0df3 ; sufficient_points_for_win # Unused variable ; not_sufficient_points_for_win &053b 0a ASL A &053c 8d f1 0d STA &0df1 ; scoring_player_yin_yang_offset &053f a8 TAY &0540 a9 05 LDA #&05 &0542 85 93 STA &93 ; sprite_address_high &0544 be 8b 05 LDX &058b,Y ; yin_yang_sprite_addresses_low_table - 2 &0547 a9 00 LDA #&00 # Plot first yin-yang &0549 20 56 05 JSR &0556 ; plot_yin_yang_section &054c ac f1 0d LDY &0df1 ; scoring_player_yin_yang_offset &054f be 8c 05 LDX &058c,Y ; yin_yang_sprite_addresses_low_table - 2 + 1 &0552 f0 30 BEQ &0584 ; leave # Leave if points don't require second yin-yang &0554 a9 02 LDA #&02 # Plot second yin-yang ; plot_yin_yang_section &0556 86 92 STX &92 ; sprite_address_low &0558 18 CLC &0559 6d f2 0d ADC &0df2 ; scoring_player_offset &055c aa TAX &055d bd 85 05 LDA &0585,X ; yin_yang_screen_addresses &0560 85 90 STA &90 ; screen_address_low &0562 bd 86 05 LDA &0586,X ; yin_yang_screen_addresses + 1 &0565 85 91 STA &91 ; screen_address_high &0567 a2 02 LDX #&02 ; plot_yin_yang_section_group_loop &0569 a0 0f LDY #&0f ; plot_yin_yang_section_byte_loop &056b b1 92 LDA (&92),Y ; sprite_address &056d 91 90 STA (&90),Y ; screen_address &056f 88 DEY &0570 10 f9 BPL &056b ; plot_yin_yang_section_byte_loop &0572 a5 92 LDA &92 ; sprite_address_low &0574 18 CLC &0575 69 10 ADC #&10 # Move down a group in sprite &0577 85 92 STA &92 ; sprite_address_low &0579 e6 91 INC &91 ; screen_address_high # Move down a group on screen &057b a5 90 LDA &90 ; screen_address_low &057d 69 40 ADC #&40 &057f 85 90 STA &90 ; screen_address_low &0581 ca DEX &0582 d0 e5 BNE &0569 ; plot_yin_yang_section_group_loop ; leave &0584 60 RTS ; yin_yang_screen_addresses &0585 08 5d ; &5d08 # Player one, first yin-yang &0587 20 5d ; &5d20 # second yin-yang &0589 28 5e ; &5e28 # Player two, first yin-yang &058b 10 5e ; &5e10 # second yin-yang ; yin_yang_sprite_addresses_low_table &058d 95 00 # Half &058f b5 00 # One &0591 b5 95 # One and a half &0593 b5 b5 # Two ; half_yin_yang_sprite &0595 00 00 00 00 11 11 11 11 00 00 44 ee ee bf bf ff &05a5 00 00 00 00 00 11 00 00 ff 77 66 66 cc 88 00 00 ; full_yin_yang_sprite &05b5 00 11 23 47 57 9f 9f 9f 00 88 4c ee ee bf bf ff &05c5 8f 8f 57 47 23 11 00 00 ff 7f 6e 6e cc 88 00 00 ; update_time &05d5 ad f8 0d LDA &0df8 ; suppress_timer # Negative to suppress updating time &05d8 30 3e BMI &0618 ; leave &05da a5 70 LDA &70 ; screen_address_low &05dc 48 PHA ; screen_address_low &05dd a5 71 LDA &71 ; screen_address_high &05df 48 PHA ; screen_address_high &05e0 a9 d8 LDA #&d8 ; &5ed8 &05e2 85 70 STA &70 ; screen_address_low &05e4 a9 5e LDA #&5e &05e6 85 71 STA &71 ; screen_address_high &05e8 ad f6 0d LDA &0df6 ; time_high &05eb 20 9a 53 JSR &539a ; plot_character &05ee ad f7 0d LDA &0df7 ; time_low &05f1 20 9a 53 JSR &539a ; plot_character &05f4 ce f5 0d DEC &0df5 ; time_fraction &05f7 d0 19 BNE &0612 ; not_out_of_time &05f9 a9 32 LDA #&32 ; 50 &05fb 8d f5 0d STA &0df5 ; time_fraction &05fe ce f7 0d DEC &0df7 ; time_low &0601 10 0f BPL &0612 ; not_out_of_time &0603 a9 09 LDA #&09 &0605 8d f7 0d STA &0df7 ; time_low &0608 ce f6 0d DEC &0df6 ; time_high &060b 10 05 BPL &0612 ; not_out_of_time &060d a9 ff LDA #&ff &060f 8d f8 0d STA &0df8 ; suppress_timer # Set to negative to indicate out of time ; not_out_of_time &0612 68 PLA ; screen_address_high &0613 85 71 STA &71 ; screen_address_high &0615 68 PLA ; screen_address_low &0616 85 70 STA &70 ; screen_address_low ; leave &0618 60 RTS ; unused &0619 00 00 00 00 00 00 00 ; event_handler &0620 ad ce 06 LDA &06ce ; background_type &0623 f0 02 BEQ &0627 ; set_palette_offset &0625 a9 12 LDA #&12 ; set_palette_offset &0627 85 9f STA &9f ; palette_offset &0629 20 63 06 JSR &0663 ; update_palette &062c a9 a0 LDA #&a0 # Enable interrupts for User VIA timer 2 &062e 8d 6e fe STA &fe6e ; User VIA interrupt enable register &0631 20 00 0e JSR &0e00 ; update_tune &0634 ad f8 0d LDA &0df8 ; suppress_timer # Non-zero if out of time or start or end of round &0637 d0 19 BNE &0652 ; leave &0639 4c d5 05 JMP &05d5 ; update_time ; initialise_irq2_handler &063c 78 SEI &063d ad 06 02 LDA &0206 ; irq2_vector_low &0640 85 6e STA &6e ; previous_irq2_vector_low &0642 ad 07 02 LDA &0207 ; irq2_vector_high &0645 85 6f STA &6f ; previous_irq2_vector_high &0647 a9 53 LDA #&53 ; &0653 = irq2_handler &0649 8d 06 02 STA &0206 ; irq2_vector_low &064c a9 06 LDA #&06 &064e 8d 07 02 STA &0207 ; irq2_vector_high &0651 58 CLI ; leave &0652 60 RTS ; irq2_handler &0653 48 PHA ; tmp_a &0654 98 TYA &0655 48 PHA ; tmp_y &0656 8a TXA &0657 48 PHA ; tmp_x &0658 20 63 06 JSR &0663 ; update_palette &065b 68 PLA ; tmp_x &065c aa TAX &065d 68 PLA ; tmp_y &065e a8 TAY &065f 68 PLA ; tmp_a &0660 6c 6e 00 JMP (&006e) ; previous_irq2_vector ; update_palette &0663 a4 9f LDY &9f ; palette_offset &0665 a2 03 LDX #&03 ; update_palette_loop &0667 bd a0 06 LDA &06a0,X ; palette_colour_bases &066a 85 9e STA &9e ; colour_base &066c b9 a4 06 LDA &06a4,Y ; palette_table # Get one byte from table for each colour &066f 05 9e ORA &9e ; colour_base &0671 8d 21 fe STA &fe21 ; video ULA palette register &0674 09 10 ORA #&10 &0676 8d 21 fe STA &fe21 ; video ULA palette register &0679 49 40 EOR #&40 &067b 8d 21 fe STA &fe21 ; video ULA palette register &067e 49 10 EOR #&10 &0680 8d 21 fe STA &fe21 ; video ULA palette register &0683 c8 INY &0684 ca DEX &0685 10 e0 BPL &0667 ; update_palette_loop &0687 b9 a4 06 LDA &06a4,Y ; palette_table # Get two bytes from table for delay until next change &068a 8d 68 fe STA &fe68 ; User VIA timer 2 counter LSB &068d c8 INY &068e b9 a4 06 LDA &06a4,Y ; palette_table &0691 30 07 BMI &069a ; disable_interrupt # Second byte is negative if this is the last change &0693 8d 69 fe STA &fe69 ; User VIA timer 2 counter MSB &0696 c8 INY &0697 84 9f STY &9f ; palette_offset &0699 60 RTS ; disable_interrupt &069a a9 20 LDA #&20 # Disable interrupts for User VIA timer 2 &069c 8d 6e fe STA &fe6e ; User VIA interrupt enable register &069f 60 RTS ; palette_colour_bases &06a0 a0 80 20 00 ; palette_table ; 3 2 1 0 timer # Background zero (outside) &06a4 01 00 02 07 d0 18 ; C W M B &06aa 01 06 02 07 40 05 ; C R M B &06b0 01 03 04 07 ff ff ; C B Y B ; 3 2 1 0 timer # Background one (inside) &06b6 01 00 04 07 98 13 ; C W Y B &06bc 00 06 04 07 40 0b ; W R Y B &06c2 00 03 04 07 c8 00 ; W B Y B &06c8 01 03 04 07 ff ff ; C B Y B ; background_type &06ce 00 ; unused &06cf fe ... &fe.. &06d0 49 40 EOR #&40 &06d2 8d 21 fe STA &fe21 ; video ULA palette register &06d5 49 10 EOR #&10 &06d7 8d 21 fe STA &fe21 ; video ULA palette register &06da 60 RTS ; unused &06db 00 00 00 00 00 ; flip_table &06e0 00 08 04 0c 02 0a 06 0e 01 09 05 0d 03 0b 07 0f &06f0 80 88 84 8c 82 8a 86 8e 81 89 85 8d 83 8b 87 8f &0700 40 48 44 4c 42 4a 46 4e 41 49 45 4d 43 4b 47 4f &0710 c0 c8 c4 cc c2 ca c6 ce c1 c9 c5 cd c3 cb c7 cf &0720 20 28 24 2c 22 2a 26 2e 21 29 25 2d 23 2b 27 2f &0730 a0 a8 a4 ac a2 aa a6 ae a1 a9 a5 ad a3 ab a7 af &0740 60 68 64 6c 62 6a 66 6e 61 69 65 6d 63 6b 67 6f &0750 e0 e8 e4 ec e2 ea e6 ee e1 e9 e5 ed e3 eb e7 ef &0760 10 18 14 1c 12 1a 16 1e 11 19 15 1d 13 1b 17 1f &0770 90 98 94 9c 92 9a 96 9e 91 99 95 9d 93 9b 97 9f &0780 50 58 54 5c 52 5a 56 5e 51 59 55 5d 53 5b 57 5f &0790 d0 d8 d4 dc d2 da d6 de d1 d9 d5 dd d3 db d7 df &07a0 30 38 34 3c 32 3a 36 3e 31 39 35 3d 33 3b 37 3f &07b0 b0 b8 b4 bc b2 ba b6 be b1 b9 b5 bd b3 bb b7 bf &07c0 70 78 74 7c 72 7a 76 7e 71 79 75 7d 73 7b 77 7f &07d0 f0 f8 f4 fc f2 fa f6 fe f1 f9 f5 fd f3 fb f7 ff ; unused &07e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &07f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; os_sound_workspace &0800 ff 00 00 00 00 00 00 80 c0 c0 c0 c0 04 04 04 04 &0810 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0820 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0830 00 00 00 00 00 00 00 00 ff 00 00 00 00 f0 00 0e &0840 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0850 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0860 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0870 00 00 00 00 00 00 00 00 00 00 00 90 64 06 00 00 ; unused &0880 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0890 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &08a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &08b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; os_envelope_storage &08c0 81 00 00 00 00 00 00 24 fd fd fe 64 1e 00 00 00 ; 1 # Tune and game over tune ; unused &08d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &08e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &08f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; consider_end_of_game &0900 ad fa 0d LDA &0dfa ; game_type &0903 c9 01 CMP #&01 : GAME_TYPE_ONE_PLAYER &0905 f0 03 BEQ &090a ; is_one_player_game &0907 4c b1 09 JMP &09b1 ; not_one_player_game ; is_one_player_game &090a ad f8 0d LDA &0df8 ; suppress_timer # Negative if out of time &090d c9 ff CMP #&ff &090f f0 2c BEQ &093d ; one_player_round_ran_out_of_time &0911 ad f0 0d LDA &0df0 ; player_one_points &0914 c9 04 CMP #&04 &0916 b0 48 BCS &0960 ; one_player_round_won_by_human_player &0918 ad f4 0d LDA &0df4 ; player_two_points &091b c9 04 CMP #&04 &091d 90 40 BCC &095f ; leave # Not end of round if neither player has scored four points ; one_player_round_lost_by_human_player &091f a9 01 LDA #&01 &0921 8d f8 0d STA &0df8 ; suppress_timer # Set to positive non-zero to indicate end of round &0924 20 06 0a JSR &0a06 ; update_players_for_thirty_frames ; one_player_round_lost_by_human_player_skipping_update &0927 a0 2d LDY #&2d ; MOVE_BOW_FORWARDS &0929 8c ea 0d STY &0dea ; player_two_involuntary_move &092c 8c e6 0d STY &0de6 ; tune_needs_restarting # Set to positive non-zero to pause tune ng &092f 20 06 0a JSR &0a06 ; update_players_for_thirty_frames &0932 a9 ff LDA #&ff &0934 8d e7 0d STA &0de7 ; game_over # Set to negative to indicate game over &0937 20 00 0b JSR &0b00 ; play_game_over_tune &093a 4c 9b 09 JMP &099b ; reset_points_and_time ; one_player_round_ran_out_of_time &093d a0 2e LDY #&2e ; MOVE_FACE_FORWARDS &093f 8c ea 0d STY &0dea ; player_two_involuntary_move &0942 8c e9 0d STY &0de9 ; player_one_involuntary_move &0945 ad f0 0d LDA &0df0 ; player_one_points &0948 cd f4 0d CMP &0df4 ; player_two_points &094b f0 4e BEQ &099b ; reset_points_and_time # If players drew, restart round &094d 90 d8 BCC &0927 ; one_player_round_lost_by_human_player_skipping_update ; one_player_round_won_by_human_player_on_points &094f 20 1b 0a JSR &0a1b ; bow_player_one_forward_and_update &0952 ad fb 0d LDA &0dfb ; computer_skill &0955 c9 14 CMP #&14 ; SKILL_10TH_DAN &0957 f0 42 BEQ &099b ; reset_points_and_time &0959 ee fb 0d INC &0dfb ; computer_skill # Move to next opponent &095c 4c 9b 09 JMP &099b ; reset_points_and_time ; leave &095f 60 RTS ; one_player_round_won_by_human_player &0960 ad fb 0d LDA &0dfb ; computer_skill &0963 c9 14 CMP #&14 ; SKILL_10TH_DAN &0965 f0 03 BEQ &096a ; skip_increasing_computer_skill &0967 ee fb 0d INC &0dfb ; computer_skill # Move to next opponent ; skip_increasing_computer_skill &096a 20 13 0a JSR &0a13 ; update_bow_player_one_forward_and_update &096d a9 01 LDA #&01 &096f 8d ed 0d STA &0ded ; scoring_player &0972 a2 05 LDX #&05 &0974 8e 01 01 STX &0101 ; offensive_move_offset # Score 100 for each second remaining on timer &0977 8d 00 01 STA &0100 ; points_for_hit # Don't double score ; score_for_remaining_time_outer_loop &097a a2 32 LDX #&32 ; score_for_remaining_time_loop &097c 8a TXA &097d 48 PHA ; count &097e 20 d5 05 JSR &05d5 ; update_time &0981 a0 03 LDY #&03 ; delay_outer_loop &0983 a2 00 LDX #&00 ; delay_loop &0985 ca DEX &0986 d0 fd BNE &0985 ; delay_loop &0988 88 DEY &0989 d0 f8 BNE &0983 ; delay_outer_loop &098b 68 PLA ; count &098c aa TAX &098d ca DEX &098e d0 ec BNE &097c ; score_for_remaining_time_loop &0990 ad f8 0d LDA &0df8 ; suppress_timer # Negative if out of time &0993 30 06 BMI &099b ; reset_points_and_time &0995 20 5d 53 JSR &535d ; update_scores &0998 4c 7a 09 JMP &097a ; score_for_remaining_time_outer_loop ; reset_points_and_time &099b a9 00 LDA #&00 &099d 8d f0 0d STA &0df0 ; player_one_points &09a0 8d f4 0d STA &0df4 ; player_two_points &09a3 8d f8 0d STA &0df8 ; suppress_timer # Set to zero to update timer &09a6 a9 05 LDA #&05 ; GAME_TYPE_ONE_PLAYER | GAME_TYPE_RESET_POINTS &09a8 8d fa 0d STA &0dfa ; game_type &09ab 8d 00 01 STA &0100 ; round_over # Set to non-zero to indicate round over &09ae 4c f6 09 JMP &09f6 ; reset_time ; not_one_player_game &09b1 ad f8 0d LDA &0df8 ; suppress_timer # Negative if out of time &09b4 c9 ff CMP #&ff &09b6 f0 01 BEQ &09b9 ; reset_demo_or_two_player_game &09b8 60 RTS ; reset_demo_or_two_player_game &09b9 20 f6 09 JSR &09f6 ; reset_time # Returns zero &09bc 8d fc 54 STA &54fc ; player_one_move_state # Set to zero (MOVE_STATE_START) to allow new move &09bf 8d f4 54 STA &54f4 ; player_two_move_state # Set to zero (MOVE_STATE_START) to allow new move &09c2 8d ec 0d STA &0dec ; players_blocking_move + 1 # Set to zero (MOVE_NONE) to indicate no blocking move &09c5 8d eb 0d STA &0deb ; players_blocking_move # Set to zero (MOVE_NONE) to indicate no blocking move &09c8 a0 2e LDY #&2e ; MOVE_FACE_FORWARDS &09ca ee e8 0d INC &0de8 ; demo_or_two_player_game_rounds &09cd ad e8 0d LDA &0de8 ; demo_or_two_player_game_rounds &09d0 c9 04 CMP #&04 &09d2 90 13 BCC &09e7 ; not_end_of_demo_or_two_player_game # Has the demo or two player game run for four rounds? &09d4 a9 00 LDA #&00 &09d6 8d e8 0d STA &0de8 ; demo_or_two_player_game_rounds &09d9 ad fa 0d LDA &0dfa ; game_type &09dc c9 03 CMP #&03 ; GAME_TYPE_DEMO &09de f0 05 BEQ &09e5 ; not_two_player_game &09e0 a9 ff LDA #&ff &09e2 8d e7 0d STA &0de7 ; game_over # Set to negative to indicate game over ; not_two_player_game &09e5 a0 2d LDY #&2d ; MOVE_BOW_FORWARDS ; not_end_of_demo_or_two_player_game &09e7 8c e9 0d STY &0de9 ; player_one_involuntary_move &09ea 8c ea 0d STY &0dea ; player_two_involuntary_move &09ed a2 0a LDX #&0a ; 10 &09ef 20 08 0a JSR &0a08 ; update_players_for_X_frames_loop # Returns X = &ff &09f2 8e 00 01 STX &0100 ; round_over # Set to non-zero to indicate round over &09f5 60 RTS ; reset_time &09f6 a9 32 LDA #&32 ; 50 &09f8 8d f5 0d STA &0df5 ; time_fraction &09fb a9 03 LDA #&03 &09fd 8d f6 0d STA &0df6 ; time_high &0a00 a9 00 LDA #&00 &0a02 8d f7 0d STA &0df7 ; time_low &0a05 60 RTS ; update_players_for_thirty_frames &0a06 a2 1e LDX #&1e ; 30 ; update_players_for_X_frames_loop &0a08 8a TXA &0a09 48 PHA ; count &0a0a 20 20 21 JSR &2120 ; update_players &0a0d 68 PLA ; count &0a0e aa TAX &0a0f ca DEX &0a10 10 f6 BPL &0a08 ; update_players_for_X_frames_loop &0a12 60 RTS ; update_bow_player_one_forward_and_update &0a13 a9 01 LDA #&01 &0a15 8d f8 0d STA &0df8 ; suppress_timer # Set to positive non-zero to indicate end of round &0a18 20 06 0a JSR &0a06 ; update_players_for_thirty_frames ; bow_player_one_forward_and_update &0a1b a0 2d LDY #&2d ; MOVE_BOW_FORWARDS &0a1d 8c e9 0d STY &0de9 ; player_one_involuntary_move &0a20 4c 06 0a JMP &0a06 ; update_players_for_thirty_frames ; unused &0a23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0a33 00 00 00 00 00 00 00 00 00 00 00 00 00 ; check_for_mode_keypresses &0a40 a5 70 LDA &70 ; screen_address_low &0a42 48 PHA ; screen_address_low &0a43 a5 71 LDA &71 ; screen_address_high &0a45 48 PHA ; screen_address_high &0a46 a2 eb LDX #&eb ; f4 # f4 toggles tune &0a48 20 a8 0a JSR &0aa8 ; check_for_keypress &0a4b 4d e2 0d EOR &0de2 ; tune_suppressed &0a4e 8d e2 0d STA &0de2 ; tune_suppressed &0a51 a2 8e LDX #&8e ; f1 # f1 toggles player one input &0a53 20 a8 0a JSR &0aa8 ; check_for_keypress &0a56 4d fe 0d EOR &0dfe ; players_input_type # Set to zero for keyboard, non-zero for joystick &0a59 8d fe 0d STA &0dfe ; players_input_type &0a5c a2 48 LDX #&48 ; &7748 &0a5e a0 77 LDY #&77 &0a60 20 cf 0a JSR &0acf ; plot_input_method &0a63 a2 8d LDX #&8d ; f2 # f2 toggles player two input &0a65 20 a8 0a JSR &0aa8 ; check_for_keypress &0a68 4d ff 0d EOR &0dff ; players_input_type + 1 # Set to zero for keyboard, non-zero for joystick &0a6b 8d ff 0d STA &0dff ; players_input_type + 1 &0a6e a2 60 LDX #&60 ; &7860 &0a70 a0 78 LDY #&78 &0a72 20 cf 0a JSR &0acf ; plot_input_method &0a75 a2 8c LDX #&8c ; f3 # f3 toggles number of players &0a77 20 a8 0a JSR &0aa8 ; check_for_keypress &0a7a 4d f9 0d EOR &0df9 ; number_of_players &0a7d 8d f9 0d STA &0df9 ; number_of_players &0a80 aa TAX &0a81 e8 INX &0a82 8a TXA &0a83 a2 77 LDX #&77 ; &77c0 &0a85 86 71 STX &71 ; screen_address_low &0a87 a2 c0 LDX #&c0 &0a89 86 70 STX &70 ; screen_address_high &0a8b 20 9a 53 JSR &539a ; plot_character # Plot number of players &0a8e a9 02 LDA #&02 &0a90 20 d3 0a JSR &0ad3 ; plot_string # Plot " PLAYER" &0a93 a2 df LDX #&df ; f0 # f0 starts game &0a95 20 a8 0a JSR &0aa8 ; check_for_keypress &0a98 c9 01 CMP #&01 &0a9a d0 05 BNE &0aa1 ; not_game_over &0a9c a9 ff LDA #&ff &0a9e 8d e7 0d STA &0de7 ; game_over # Set to negative to indicate end of demo ; not_game_over &0aa1 68 PLA ; screen_address_high &0aa2 85 71 STA &71 ; screen_address_high &0aa4 68 PLA ; screen_address_low &0aa5 85 70 STA &70 ; screen_address_low &0aa7 60 RTS ; check_for_keypress &0aa8 8e f3 0a STX &0af3 ; key_to_check &0aab a0 ff LDY #&ff &0aad a9 81 LDA #&81 ; Scan for a particular key &0aaf 20 f4 ff JSR &fff4 ; OSBYTE # Returns X = Y = &ff if key pressed, &00 if not &0ab2 a9 00 LDA #&00 # Zero to indicate key not pressed by default &0ab4 ac f3 0a LDY &0af3 ; key_to_check &0ab7 e0 ff CPX #&ff &0ab9 d0 0b BNE &0ac6 ; key_was_pressed ; key_was_pressed &0abb cc f2 0a CPY &0af2 ; previous_key_pressed &0abe f0 0e BEQ &0ace ; leave # Suppress auto-repeat &0ac0 8c f2 0a STY &0af2 ; previous_key_pressed &0ac3 a9 01 LDA #&01 # Leave with one to indicate key was pressed &0ac5 60 RTS ; key_not_pressed &0ac6 cc f2 0a CPY &0af2 ; previous_key_pressed &0ac9 d0 03 BNE &0ace ; leave &0acb 8d f2 0a STA &0af2 ; previous_key_pressed ; leave &0ace 60 RTS ; plot_input_method &0acf 86 70 STX &70 ; screen_address_low &0ad1 84 71 STY &71 ; screen_address_high ; plot_string &0ad3 0a ASL A &0ad4 0a ASL A &0ad5 a8 TAY ; plot_string_loop &0ad6 b9 e2 0a LDA &0ae2,Y ; strings &0ad9 30 06 BMI &0ae1 ; leave &0adb 20 9a 53 JSR &539a ; plot_character &0ade c8 INY &0adf d0 f5 BNE &0ad6 ; plot_string_loop ; leave &0ae1 60 RTS ; strings &0ae2 18 1a 19 ff ; &00 : "KEY" &0ae6 17 00 19 ff ; &01 : "JOY" &0aec 1e 1d 1c 0f 19 1a 1b ff ; &02 :" PLAYER" ; previous_key_pressed &0af2 00 ; key_to_check &0af3 00 ; unused &0af4 ff 00 00 00 00 00 00 00 00 00 0b 00 ; play_game_over_tune &0b00 a0 00 LDY #&00 ; play_game_over_tune_loop &0b02 a9 01 LDA #&01 &0b04 8d 3e 0b STA &0b3e ; game_over_tune_sound_block + 0 (channel) &0b07 b9 46 0b LDA &0b46,Y ; game_over_tune_data # Get byte of tune data for pitch &0b0a 8d 42 0b STA &0b42 ; game_over_tune_sound_block + 4 (pitch) &0b0d b9 47 0b LDA &0b47,Y ; game_over_tune_data + 1 # Get byte of tune data for duration &0b10 8d 44 0b STA &0b44 ; game_over_tune_sound_block + 6 (duration) &0b13 20 23 0b JSR &0b23 ; play_game_over_tune_note &0b16 ee 3e 0b INC &0b3e ; game_over_tune_sound_block + 0 (channel) &0b19 20 23 0b JSR &0b23 ; play_game_over_tune_note &0b1c c8 INY &0b1d c8 INY &0b1e c0 4a CPY #&4a &0b20 d0 e0 BNE &0b02 ; play_game_over_tune_loop &0b22 60 RTS ; play_game_over_tune_note &0b23 98 TYA &0b24 48 PHA ; tmp_y ; wait_for_channel &0b25 a9 80 LDA #&80 ; Read I/O device or buffer status &0b27 a2 fa LDX #&fa ; Sound output buffer 1 &0b29 a0 ff LDY #&ff &0b2b 20 f4 ff JSR &fff4 ; OSBYTE &0b2e e0 0f CPX #&0f &0b30 d0 f3 BNE &0b25 ; wait_for_channel &0b32 a2 3e LDX #&3e ; &0b3e = game_over_tune_sound_block &0b34 a0 0b LDY #&0b &0b36 a9 07 LDA #&07 ; Generate a sound &0b38 20 f1 ff JSR &fff1 ; OSWORD &0b3b 68 PLA ; tmp_y &0b3c a8 TAY &0b3d 60 RTS ; game_over_tune_sound_block ; chan vol pitch dur &0b3e 01 00 01 00 00 00 00 00 ; game_over_tune_data ; p d &0b46 6f 05 &0b48 6f 05 &0b4a 67 05 &0b4c 67 05 &0b4e 5b 05 &0b50 5b 05 &0b52 67 05 &0b54 67 05 &0b56 6f 01 &0b58 67 01 &0b5a 6f 01 &0b5c 67 01 &0b5e 6f 01 &0b60 67 01 &0b62 6f 01 &0b64 67 01 &0b66 6f 01 &0b68 67 01 &0b6a 6f 01 &0b6c 67 01 &0b6e 6f 01 &0b70 67 01 &0b72 6f 01 &0b74 67 01 &0b76 6f 01 &0b78 67 01 &0b7a 6f 0c &0b7c 5b 05 &0b7e 5b 05 &0b80 53 05 &0b82 53 05 &0b84 47 05 &0b86 47 05 &0b88 53 05 &0b8a 53 05 &0b8c 5b 11 &0b8e 5b 11 ; plot_computer_skill &0b90 ad fb 0d LDA &0dfb ; computer_skill &0b93 c9 16 CMP #&16 ; SKILL_DEMO &0b95 b0 27 BCS &0bbe ; wipe_computer_skill # Don't display skill level in demo or two-player game &0b97 20 e0 52 JSR &52e0 ; plot_rank ; set_computer_abilities &0b9a ad fb 0d LDA &0dfb ; computer_skill &0b9d 4a LSR A &0b9e a8 TAY &0b9f b9 ca 0b LDA &0bca,Y ; levels_computer_offensive_move_maximum_cooldown &0ba2 8d 93 0d STA &0d93 ; computer_offensive_move_maximum_cooldown + 1 &0ba5 8d 92 0d STA &0d92 ; computer_offensive_move_maximum_cooldown &0ba8 b9 d6 0b LDA &0bd6,Y ; levels_computer_defensive_move_maximum_cooldown &0bab 8d 9b 0d STA &0d9b ; computer_defensive_move_maximum_cooldown + 1 &0bae 8d 9a 0d STA &0d9a ; computer_defensive_move_maximum_cooldown &0bb1 b9 e2 0b LDA &0be2,Y ; levels_computer_base_move_difficulty &0bb4 8d 8f 0d STA &0d8f ; computer_base_move_difficulty &0bb7 b9 ee 0b LDA &0bee,Y ; levels_computer_maximum_move_difficulty &0bba 8d a0 0d STA &0da0 ; computer_maximum_move_difficulty &0bbd 60 RTS ; wipe_computer_skill &0bbe a9 00 LDA #&00 &0bc0 a0 37 LDY #&37 ; wipe_computer_skill_loop &0bc2 99 80 60 STA &6080,Y &0bc5 88 DEY &0bc6 10 fa BPL &0bc2 ; wipe_computer_skill_loop &0bc8 30 d0 BMI &0b9a ; set_computer_abilities # Always branches ; levels_computer_offensive_move_maximum_cooldown ; N 1 2 3 4 5 6 7 8 9 10 D &0bca 28 14 0f 0c 0a 07 05 04 02 01 00 02 ; levels_computer_defensive_move_maximum_cooldown ; N 1 2 3 4 5 6 7 8 9 10 D &0bd6 14 03 03 02 02 01 01 01 01 00 00 01 ; levels_computer_base_move_difficulty ; N 1 2 3 4 5 6 7 8 9 10 D &0be2 05 05 04 04 04 03 03 03 02 02 02 05 ; levels_computer_maximum_move_difficulty ; N 1 2 3 4 5 6 7 8 9 10 D &0bee 05 05 05 05 04 04 04 03 03 03 02 05 ; unused &0bfa 10 10 10 10 10 10 ; font_data &0c00 ee aa aa aa aa aa ee 00 ; &00 : "0" &0c08 44 cc 44 44 44 44 ee 00 ; &01 : "1" &0c10 ee 22 22 ee 88 88 ee 00 ; &02 : "2" &0c18 ee 22 22 ee 22 22 ee 00 ; &03 : "3" &0c20 88 88 aa aa ee 22 22 00 ; &04 : "4" &0c28 ee 88 88 ee 22 22 ee 00 ; &05 : "5" &0c30 ee 88 88 ee aa aa ee 00 ; &06 : "6" &0c38 ee 22 22 22 22 22 22 00 ; &07 : "7" &0c40 ee aa aa ee aa aa ee 00 ; &08 : "8" &0c48 ee aa aa ee 22 22 ee 00 ; &09 : "9" &0c50 aa aa aa ee cc cc cc 00 ; &0a : "VICE" # "VICE" is spread over &0a - &0d &0c58 bb aa aa aa aa aa bb 00 ; &0b &0c60 bb aa 22 33 22 aa bb 00 ; &0c &0c68 88 00 00 00 00 00 88 00 ; &0d &0c70 cc aa aa aa aa aa cc 00 ; &0e : "D" &0c78 ee aa aa ee aa aa aa 00 ; &0f : "A" &0c80 ee aa aa aa aa aa aa 00 ; &10 : "N" &0c88 ee 88 ee 22 ee 00 00 00 ; &11 : "s" &0c90 ee 44 44 44 44 00 00 00 ; &12 : "t" &0c98 ee aa aa aa aa 00 00 00 ; &13 : "n" &0ca0 cc aa aa aa cc 00 00 00 ; &14 : "d" &0ca8 ee aa ee cc aa 00 00 00 ; &15 : "r" &0cb0 aa aa ee aa aa 00 00 00 ; &16 : "h" &0cb8 ee 44 44 44 44 44 cc 00 ; &17 : "J" &0cc0 aa aa aa cc ee aa aa 00 ; &18 : "K" &0cc8 aa aa aa ee 44 44 44 00 ; &19 : "Y" &0cd0 ee 88 88 cc 88 88 ee 00 ; &1a : "E" &0cd8 ee aa aa cc ee aa aa 00 ; &1b : "R" &0ce0 88 88 88 88 88 88 ee 00 ; &1c : "L" &0ce8 ee aa aa ee 88 88 88 00 ; &1d : "P" &0cf0 00 00 00 00 00 00 00 00 ; &1e : " " ; unused &0cf8 00 00 00 00 00 00 00 00 ; nmi_handler &0d00 00 ; unused &0d01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0d11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0d21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0d31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0d41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0d51 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0d61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0d71 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; this_player_state_for_computer ; this_player_move_for_computer &0d80 00 ; this_player_frame_for_computer &0d81 00 ; this_player_move_state_for_computer &0d82 00 ; this_player_sprite_for_computer &0d83 00 ; this_player_screen_address_low_for_computer &0d84 00 ; other_player_state_for_computer ; other_player_move_for_computer &0d85 00 ; other_player_frame_for_computer &0d86 00 ; otherplayer_move_state_for_computer &0d87 00 ; other_player_sprite_for_computer &0d88 00 ; other_player_screen_address_low_for_computer &0d89 00 ; computer_players_flip &0d8a 00 ; rnd_tmp ; vulnerable_positions ; difficulty &0d8b 00 ; rnd_limit ; number_of_possible_moves &0d8c 00 ; facing_same_direction ; separation_between_players ; include_offensive_moves &0d8d 00 ; number_of_suitably_difficult_moves &0d8e 00 ; computer_base_move_difficulty &0d8f 00 ; computer_offensive_move_cooldown &0d90 00 00 ; computer_offensive_move_maximum_cooldown &0d92 00 00 ; computer_check_opponent_cooldown &0d94 00 00 ; computer_check_opponent_maximum_cooldown &0d96 00 00 ; computer_defensive_move_cooldown &0d98 00 00 ; computer_defensive_move_maximum_cooldown &0d9a 00 00 ; computer_walk_timer &0d9c 00 ; unused &0d9d 00 ; computer_pause_timer &0d9e 00 ; unused &0d9f 00 ; computer_maximum_move_difficulty &0da0 00 ; unused &0da1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0db1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0dc1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &0dd1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; players_walking &0de0 00 00 ; tune_suppressed &0de2 00 ; tune_bar &0de3 00 ; tune_position &0de4 00 ; tune_bar_cooldown &0de5 00 ; tune_needs_restarting &0de6 00 ; game_over &0de7 00 ; demo_or_two_player_game_rounds &0de8 00 ; player_one_involuntary_move &0de9 00 ; player_two_involuntary_move &0dea 00 ; players_blocking_move &0deb 00 00 ; scoring_player &0ded 00 ; player_direction &0dee 00 ; screen_address_delta &0def 00 ; player_one_points &0df0 00 ; scoring_player_yin_yang_offset &0df1 00 ; scoring_player_offset &0df2 00 ; sufficient_points_for_win &0df3 00 ; player_two_points &0df4 00 ; time_fraction &0df5 00 ; time_high &0df6 00 ; time_low &0df7 00 ; suppress_timer &0df8 00 ; number_of_players &0df9 00 ; game_type &0dfa 00 ; computer_skill &0dfb 00 ; players_type &0dfc 00 00 ; players_input_type &0dfe 00 00 ; update_tune &0e00 ad e2 0d LDA &0de2 ; tune_suppressed # Non-zero if tune suppressed &0e03 d0 39 BNE &0e3e ; leave &0e05 ad e6 0d LDA &0de6 ; tune_needs_restarting # Negative if tune needs restarting &0e08 10 03 BPL &0e0d ; skip_restarting_tune &0e0a 4c a6 0e JMP &0ea6 ; restart_tune ; skip_restarting_tune &0e0d d0 2f BNE &0e3e ; leave &0e0f ad e5 0d LDA &0de5 ; tune_bar_cooldown &0e12 f0 1a BEQ &0e2e ; consider_playing_note &0e14 ce e5 0d DEC &0de5 ; tune_bar_cooldown &0e17 d0 25 BNE &0e3e ; leave &0e19 ac e3 0d LDY &0de3 ; tune_bar ; get_next_bar &0e1c b9 91 0e LDA &0e91,Y ; tune_bar_data # Get byte of bar data for offset to start of bar &0e1f c9 ff CMP #&ff # &ff indicates end of tune &0e21 d0 07 BNE &0e2a ; set_tune_position &0e23 a0 00 LDY #&00 &0e25 8c e3 0d STY &0de3 ; tune_bar &0e28 f0 f2 BEQ &0e1c ; get_next_bar # Always branches ; set_tune_position &0e2a 8d e4 0d STA &0de4 ; tune_position &0e2d 60 RTS ; consider_playing_note &0e2e a9 80 LDA #&80 ; Read I/O device or buffer status &0e30 a2 fa LDX #&fa ; Sound output buffer 1 &0e32 a0 ff LDY #&ff &0e34 20 f4 ff JSR &fff4 ; OSBYTE &0e37 e0 0f CPX #&0f &0e39 d0 03 BNE &0e3e ; leave # Has the previous note finished? &0e3b 20 3f 0e JSR &0e3f ; play_note # If so, play note ; leave &0e3e 60 RTS ; play_note &0e3f ac e4 0d LDY &0de4 ; tune_position &0e42 a9 01 LDA #&01 &0e44 8d 89 0e STA &0e89 ; tune_sound + 0 (channel) ; play_note_on_channel &0e47 8d 8b 0e STA &0e8b ; tune_sound + 2 (volume) &0e4a b9 b8 0e LDA &0eb8,Y ; tune_note_data # Get byte of tune data for duration &0e4d f0 ef BEQ &0e3e ; leave &0e4f c9 fe CMP #&fe &0e51 f0 27 BEQ &0e7a ; end_of_bar # &fe indicates end of bar &0e53 b0 17 BCS &0e6c ; play_note_on_channel_two # &ff indicates next note should use channel two &0e55 8d 8f 0e STA &0e8f ; tune_sound + 6 (duration) &0e58 c8 INY &0e59 b9 b8 0e LDA &0eb8,Y ; tune_note_data # Get byte of tune data for pitch &0e5c c8 INY &0e5d 8d 8d 0e STA &0e8d ; tune_sound + 4 (pitch) &0e60 8c e4 0d STY &0de4 ; tune_position &0e63 a9 07 LDA #&07 ; Generate a sound &0e65 a2 89 LDX #&89 ; &0e89 = tune_sound &0e67 a0 0e LDY #&0e &0e69 4c f1 ff JMP &fff1 ; OSWORD ; play_note_on_channel_two &0e6c c8 INY &0e6d a9 02 LDA #&02 &0e6f 8d 89 0e STA &0e89 ; tune_sound + 0 (channel) &0e72 a9 01 LDA #&01 &0e74 20 47 0e JSR &0e47 ; play_note_on_channel &0e77 4c 3f 0e JMP &0e3f ; play_note # then play another note on channel one ; end_of_bar &0e7a ac e3 0d LDY &0de3 ; tune_bar &0e7d c8 INY &0e7e b9 91 0e LDA &0e91,Y ; tune_bar_data # Get byte of bar data for delay before next bar &0e81 8d e5 0d STA &0de5 ; tune_bar_cooldown &0e84 c8 INY &0e85 8c e3 0d STY &0de3 ; tune_bar &0e88 60 RTS ; tune_sound ; chan vol pitch dur &0e89 00 00 00 00 00 00 00 00 ; tune_bar_data ; o d &0e91 00 19 &0e93 00 19 &0e95 77 01 &0e97 9b 01 &0e99 77 01 &0e9b 9b 01 &0e9d 77 01 &0e9f 9b 01 &0ea1 77 01 &0ea3 bf 01 &0ea5 ff ; restart_tune &0ea6 a2 00 LDX #&00 &0ea8 8e e6 0d STX &0de6 ; tune_needs_restarting # Set to positive to enable tune &0eab 8e e4 0d STX &0de4 ; tune_position &0eae 8e e3 0d STX &0de3 ; tune_bar &0eb1 e8 INX &0eb2 8e e5 0d STX &0de5 ; tune_bar_cooldown &0eb5 60 RTS ; unused &0eb6 f1 f9 ; tune_note_data ; d p &0eb8 05 6d ; &00 &0eba ff 05 3d &0ebd 05 89 &0ebf 02 81 &0ec1 ff 05 3d &0ec4 02 89 &0ec6 02 81 &0ec8 02 79 &0eca 05 6d &0ecc 05 79 &0ece ff 02 3d &0ed1 05 6d &0ed3 ff 05 3d &0ed6 05 59 &0ed8 05 6d &0eda ff 05 3d &0edd 05 89 &0edf 02 81 &0ee1 ff 05 3d &0ee4 02 89 &0ee6 02 81 &0ee8 02 79 &0eea 05 6d &0eec 05 79 &0eee ff 02 3d &0ef1 05 6d &0ef3 ff 05 3d &0ef6 05 59 &0ef8 05 81 &0efa ff 05 35 &0efd 02 81 &0eff 02 79 &0f01 05 81 &0f03 ff 02 35 &0f06 02 81 &0f08 02 79 &0f0a 05 81 &0f0c 05 95 &0f0e ff 02 35 &0f11 0a 89 &0f13 ff 05 35 &0f16 05 81 &0f18 ff 05 19 &0f1b 02 89 &0f1d 02 81 &0f1f 05 79 &0f21 ff 05 21 &0f24 02 81 &0f26 02 79 &0f28 05 6d &0f2a ff 05 3d &0f2d fe fe &0f2f 05 79 ; &77 &0f31 05 6d &0f33 ff 05 81 &0f36 05 6d &0f38 ff 05 81 &0f3b 05 6d &0f3d ff 05 81 &0f40 05 79 &0f42 05 6d &0f44 ff 05 81 &0f47 05 6d &0f49 ff 05 81 &0f4c 05 6d &0f4e ff 05 81 &0f51 fe fe &0f53 05 79 ; &9b &0f55 05 59 &0f57 ff 05 6d &0f5a 05 59 &0f5c ff 05 6d &0f5f 05 59 &0f61 ff 05 6d &0f64 05 79 &0f66 05 59 &0f68 ff 05 6d &0f6b 05 59 &0f6d ff 05 6d &0f70 05 59 &0f72 ff 05 6d &0f75 fe fe &0f77 05 79 ; &bf &0f79 05 59 &0f7b ff 05 6d &0f7e 05 59 &0f80 ff 05 6d &0f83 05 59 &0f85 ff 05 6d &0f88 05 79 &0f8a 0f 59 &0f8c ff 0f 6d &0f8f fe fe ; unused &0f91 00 00 00 00 00 00 00 ; plot_background &0f98 ec ce 06 CPX &06ce ; background_type &0f9b f0 58 BEQ &0ff5 ; leave # Leave if requested background is already displayed &0f9d 8e ce 06 STX &06ce ; background_type &0fa0 e0 00 CPX #&00 &0fa2 08 PHP ; background is zero &0fa3 a9 13 LDA #&13 ; Wait for vertical retrace &0fa5 20 f4 ff JSR &fff4 ; OSBYTE &0fa8 a0 02 LDY #&02 &0faa 20 ed 0f JSR &0fed ; set_vertical_displayed_register # Hide all but top of screen &0fad 28 PLP ; background is zero &0fae f0 1c BEQ &0fcc ; plot_background_zero ; plot_background_one &0fb0 a0 00 LDY #&00 &0fb2 84 60 STY &60 ; target_address_high &0fb4 a2 6f LDX #&6f ; &6f00 = temporary_packed_background_data # Copy from &7880 to &6f00 &0fb6 a9 80 LDA #&80 ; &7880 = stored_packed_background_data # i.e. make temporary copy of packed data &0fb8 85 62 STA &62 ; source_address_low &0fba a9 78 LDA #&78 &0fbc 20 f6 0f JSR &0ff6 ; copy_packed_background_data &0fbf a9 ff LDA #&ff # Negative to pack data &0fc1 20 11 10 JSR &1011 ; pack_or_unpack_stored_background_data &0fc4 a9 00 LDA #&00 # Positive to unpack data &0fc6 20 0b 10 JSR &100b ; pack_or_unpack_temporary_background_data &0fc9 4c e5 0f JMP &0fe5 ; reveal_background ; plot_background_zero &0fcc a9 ff LDA #&ff # Negative to pack data &0fce 20 0b 10 JSR &100b ; pack_or_unpack_temporary_background_data &0fd1 a9 00 LDA #&00 # Positive to unpack data &0fd3 20 11 10 JSR &1011 ; pack_or_unpack_stored_background_data &0fd6 a0 00 LDY #&00 &0fd8 84 62 STY &62 ; source_address_low &0fda a9 80 LDA #&80 &0fdc 85 60 STA &60 ; target_address_high &0fde a2 78 LDX #&78 ; &7880 = stored_packed_background_data # Copy from &6f00 to &7880 &0fe0 a9 6f LDA #&6f ; &6f00 = temporary_packed_background_data # i.e. store temporary data &0fe2 20 f6 0f JSR &0ff6 ; copy_packed_background_data ; reveal_background &0fe5 20 d0 24 JSR &24d0 ; buffer_bottom_part_of_background &0fe8 20 a8 54 JSR &54a8 ; restore_bottom_part_of_background_and_wipe_play_area &0feb a0 16 LDY #&16 # Display all of screen ; set_vertical_displayed_register &0fed a9 06 LDA #&06 ; R6: Vertical displayed register &0fef 8d 00 fe STA &fe00 ; video register number &0ff2 8c 01 fe STY &fe01 ; video register value ; leave &0ff5 60 RTS ; copy_packed_background_data &0ff6 85 63 STA &63 ; source_address_high &0ff8 86 61 STX &61 ; target_address_high &0ffa a2 06 LDX #&06 ; copy_packed_background_data_loop &0ffc b1 62 LDA (&62),Y ; source_address &0ffe 91 60 STA (&60),Y ; target_address &1000 88 DEY &1001 d0 f9 BNE &0ffc ; copy_packed_background_data_loop &1003 e6 61 INC &61 ; target_address_high &1005 e6 63 INC &63 ; source_address_high &1007 ca DEX &1008 10 f2 BPL &0ffc ; copy_packed_background_data_loop &100a 60 RTS ; pack_or_unpack_temporary_background_data &100b a2 00 LDX #&00 ; &6f00 = temporary_packed_background_data &100d a0 6f LDY #&6f &100f 10 04 BPL &1015 ; pack_or_unpack_background_data # Always branches ; pack_or_unpack_stored_background_data &1011 a2 80 LDX #&80 ; &7880 = stored_packed_background_data &1013 a0 78 LDY #&78 ; pack_or_unpack_background_data &1015 85 69 STA &69 ; pack_or_unpack &1017 86 67 STX &67 ; packed_data_address_low &1019 84 68 STY &68 ; packed_data_address_high &101b a9 80 LDA #&80 &101d 85 6a STA &6a ; first_byte # Set to negative to indicate first byte &101f 85 60 STA &60 ; column_screen_address_low &1021 a9 5f LDA #&5f ; &5f80 &1023 85 61 STA &61 ; column_screen_address_high &1025 a9 28 LDA #&28 &1027 85 64 STA &64 ; columns_to_plot ; pack_or_unpack_background_data_column_loop &1029 a5 60 LDA &60 ; column_screen_address_low &102b 85 62 STA &62 ; screen_address_low &102d 18 CLC &102e 69 08 ADC #&08 # Move right a column &1030 85 60 STA &60 ; column_screen_address_low &1032 a5 61 LDA &61 ; column_screen_address_high &1034 85 63 STA &63 ; screen_address_high &1036 69 00 ADC #&00 &1038 85 61 STA &61 ; column_screen_address_high &103a a9 0c LDA #&0c &103c 85 66 STA &66 ; groups_to_plot ; pack_or_unpack_background_data_group_loop &103e a0 00 LDY #&00 ; pack_or_unpack_background_data_byte_loop &1040 84 65 STY &65 ; row_in_group &1042 20 61 10 JSR &1061 ; pack_or_unpack_a_byte &1045 a4 65 LDY &65 ; row_in_group &1047 c8 INY &1048 c0 08 CPY #&08 &104a 90 f4 BCC &1040 ; pack_or_unpack_background_data_byte_loop &104c a5 62 LDA &62 ; screen_address_low &104e 69 3f ADC #&3f # Move down a group &1050 85 62 STA &62 ; screen_address_low &1052 a5 63 LDA &63 ; screen_address_high &1054 69 01 ADC #&01 &1056 85 63 STA &63 ; screen_address_high &1058 c6 66 DEC &66 ; groups_to_plot &105a d0 e2 BNE &103e ; pack_or_unpack_background_data_group_loop &105c c6 64 DEC &64 ; columns_to_plot &105e d0 c9 BNE &1029 ; pack_or_unpack_background_data_column_loop &1060 60 RTS ; pack_or_unpack_a_byte &1061 a5 69 LDA &69 ; pack_or_unpack &1063 10 52 BPL &10b7 ; is_unpacking ; is_packing &1065 b1 62 LDA (&62),Y ; screen_address &1067 a6 6a LDX &6a ; first_byte # Negative if first byte of screen data &1069 30 30 BMI &109b ; is_new_run &106b c5 6c CMP &6c ; run_value &106d d0 03 BNE &1072 ; pack_run &106f e6 6d INC &6d ; run_length &1071 60 RTS ; pack_run &1072 48 PHA ; screen byte &1073 a6 6d LDX &6d ; run_length &1075 e0 03 CPX #&03 &1077 90 2b BCC &10a4 ; write_repeated_bytes # Runs of length 1 or 2 are written as repeated bytes &1079 a9 ed LDA #&ed ; 0000 &107b a6 6c LDX &6c ; run_value # Runs of value &00 (solid colour 0) are written as a &107d f0 13 BEQ &1092 ; write_value_and_run_length # &ed byte, followed by the length of the run &107f a9 ec LDA #&ec &1081 e0 f0 CPX #&f0 ; 2222 # Runs of value &f0 (solid colour 2) are written as a &1083 f0 0d BEQ &1092 ; write_value_and_run_length # &ec byte, followed by the length of the run &1085 a6 6d LDX &6d ; run_length &1087 e0 04 CPX #&04 &1089 90 19 BCC &10a4 ; write_repeated_bytes # Runs of length 3 are written as repeated bytes &108b a9 d0 LDA #&d0 &108d 20 b0 10 JSR &10b0 ; write_byte_of_packed_data # All other runs are written as a &d0 byte, followed by &1090 a5 6c LDA &6c ; run_value # the value, followed by the length of the run ; write_value_and_run_length &1092 20 b0 10 JSR &10b0 ; write_byte_of_packed_data &1095 a5 6d LDA &6d ; run_length &1097 20 b0 10 JSR &10b0 ; write_byte_of_packed_data &109a 68 PLA ; screen byte ; is_new_run &109b 85 6c STA &6c ; run_value &109d a9 01 LDA #&01 &109f 85 6a STA &6a ; first_byte # Set to positive to indicate not first byte &10a1 85 6d STA &6d ; run_length &10a3 60 RTS ; write_repeated_bytes &10a4 a5 6c LDA &6c ; run_value ; write_repeated_bytes_loop &10a6 20 b0 10 JSR &10b0 ; write_byte_of_packed_data &10a9 ca DEX &10aa d0 fa BNE &10a6 ; write_repeated_bytes_loop &10ac 68 PLA ; screen byte &10ad 4c 9b 10 JMP &109b ; is_new_run ; write_byte_of_packed_data &10b0 a0 00 LDY #&00 &10b2 91 67 STA (&67),Y ; packed_data_address &10b4 4c ef 10 JMP &10ef ; move_to_next_byte_of_packed_data ; is_unpacking &10b7 a5 6a LDA &6a ; first_byte # Negative if first byte of screen data &10b9 30 04 BMI &10bf ; read_new_run &10bb a5 6d LDA &6d ; run_length &10bd d0 25 BNE &10e4 ; continue_previous_run ; read_new_run &10bf 84 6a STY &6a ; first_byte # Set to positive to indicate not first byte &10c1 20 eb 10 JSR &10eb ; read_byte_of_packed_data &10c4 a2 f0 LDX #&f0 ; 2222 &10c6 c9 ec CMP #&ec # &ec starts run of &f0 (solid colour 2) &10c8 f0 13 BEQ &10dd ; set_run_value &10ca a2 00 LDX #&00 ; 0000 &10cc c9 ed CMP #&ed # &ed starts run of &00 (solid colour 0) &10ce f0 0d BEQ &10dd ; set_run_value &10d0 c9 d0 CMP #&d0 &10d2 f0 05 BEQ &10d9 ; get_run_value # &d0 starts run of other value ; set_screen_byte # Otherwise, write a single byte &10d4 a4 65 LDY &65 ; row_in_group &10d6 91 62 STA (&62),Y ; screen_address &10d8 60 RTS ; get_run_value &10d9 20 eb 10 JSR &10eb ; read_byte_of_packed_data &10dc aa TAX ; set_run_value &10dd 86 6c STX &6c ; run_value &10df 20 eb 10 JSR &10eb ; read_byte_of_packed_data &10e2 85 6d STA &6d ; run_length ; continue_previous_run &10e4 c6 6d DEC &6d ; run_length &10e6 a5 6c LDA &6c ; run_value &10e8 4c d4 10 JMP &10d4 ; set_screen_byte ; read_byte_of_packed_data &10eb a0 00 LDY #&00 &10ed b1 67 LDA (&67),Y ; packed_data_address ; move_to_next_byte_of_packed_data &10ef e6 67 INC &67 ; packed_data_address_low &10f1 d0 0c BNE &10ff ; leave &10f3 e6 68 INC &68 ; packed_data_address_high &10f5 10 08 BPL &10ff ; leave &10f7 a0 5b LDY #&5b ; &5bc0 = continuation_of_stored_packed_background_data &10f9 84 68 STY &68 ; packed_data_address_high &10fb a0 c0 LDY #&c0 &10fd 84 67 STY &67 ; packed_data_address_low ; leave &10ff 60 RTS ; sprite_20_data (SPRITE_WALKING_THREE) &1100 38 02 10 ; min_x = &10, max_x = &38, top_group = &02 &1103 07 07 07 23 31 30 70 70 80 91 91 3b ff f7 e6 c4 &1113 01 88 ee ff ff ff 11 00 0e 1f 0f 0f 9e f8 fc 74 &1123 00 00 88 00 e0 e0 e0 00 07 07 07 07 07 07 07 07 &1133 0f 1e 48 48 48 48 80 80 0f 0f 87 07 03 03 01 01 &1143 08 0c 0c 0c 0c 0c 0e 0e 00 00 00 00 00 00 00 00 &1153 12 03 03 03 12 16 07 07 f0 a5 a5 96 96 0f 0f 0f &1163 c0 0c 0c 0e 0f 87 87 87 00 00 00 00 00 00 08 08 &1173 00 00 00 00 00 00 00 00 07 07 03 21 12 03 30 30 &1183 78 69 6d 0f 4b 87 0f c3 8f 4b 1c 0c 0c 0c 0c c0 &1193 0c 4c 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 &11a3 16 0f 0f 2d 0f 1e 0f 0f c3 c3 c3 4b 4b 1e bc 78 &11b3 08 0c 0e 69 e1 e1 e1 c7 00 00 00 10 f8 78 78 68 &11c3 00 40 e0 e0 e0 e0 80 00 31 51 11 11 11 10 10 12 &11d3 fc fb f9 f4 f4 f1 f0 e0 00 00 80 80 00 00 00 00 &11e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &11f3 00 00 00 00 00 00 11 70 00 00 00 00 66 ff f0 f7 &1203 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &1213 00 00 00 00 00 00 00 00 ; sprite_28_data (SPRITE_BOW_SIDEWAYS_ONE) &121b 20 02 10 ; min_x = &10, max_x = &20, top_group = &02 &121e 03 03 03 37 fc fc 74 30 08 08 88 08 ee c4 e0 e0 &122e 23 23 13 47 47 47 03 03 0c 0c 48 88 88 08 08 08 &123e 0f 0f 0f 07 07 43 07 03 e2 84 0c 0c 0c 0c 0c 0c &124e 69 69 78 34 74 16 1e 0f 0c 0c 0c 0c cc a6 e2 e2 &125e 0f 0f 0f 0f 0f 96 9e 5b 08 08 0c 84 84 0c 0c 0c &126e 76 75 75 30 12 07 07 0f e4 e0 c0 c4 c0 80 80 08 &127e 00 00 11 33 f4 73 f6 76 00 00 88 cc c0 cc c0 cc ; sprite_29_data (SPRITE_BOW_SIDEWAYS_TWO) &128e 30 02 10 ; min_x = &10, max_x = &30, top_group = &02 &1291 03 03 03 13 36 fc fc 30 08 08 91 3b ff cc e0 e0 &12a1 00 00 ff ff 33 00 00 00 00 00 cc ee ff cc 00 00 &12b1 21 33 23 07 47 47 03 03 0c 0c 4c 08 08 08 08 08 &12c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &12d1 1e 0f 0f 07 47 47 07 03 94 94 0c 0c 0c 0c 0c 0c &12e1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &12f1 07 07 43 69 1e 1e 1e 1e 69 79 e1 c2 c2 e6 a4 94 &1301 84 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &1311 00 00 00 00 01 01 03 03 03 07 0f 1e 2d 2f 6d 6d &1321 3c 1e 96 0f 0f 0e 0e 48 80 80 00 00 00 00 00 00 &1331 00 00 00 00 00 00 00 00 10 00 10 00 00 00 00 01 &1341 f1 f6 76 76 75 75 78 3c cc c0 cc e4 e0 c0 c4 c0 &1351 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &1361 00 00 00 00 00 11 33 76 00 00 00 00 00 88 cc c0 ; sprite_2a_data (SPRITE_FACE_FORWARDS) &1371 30 02 10 ; min_x = &10, max_x = &30, top_group = &02 &1374 00 00 00 33 33 11 10 10 0e ae 31 fd f9 f1 e0 e2 &1384 07 17 ee f9 f8 f0 70 70 00 00 00 00 ee e6 80 80 &1394 01 01 01 01 01 01 01 00 4b 0e 0e 0e 0e 0e 0e 0e &13a4 87 87 87 87 87 07 07 07 00 00 00 00 00 00 00 00 &13b4 c0 e1 e1 61 21 01 01 01 3c 0f 1e 2d 2d 2d 4b 5a &13c4 c3 87 0f 87 87 4b 4b 4b 60 60 60 60 00 00 00 00 &13d4 0f 0e 0e 0e 2c 84 c0 c0 0f 0f 0f 0f 0f 0f 87 78 &13e4 1e 0e 0e 2c 2c 2c 0e 78 0e 0e 0e 0e 0e 2e 68 68 &13f4 03 03 03 07 07 0f 0f 0f 3c 3c 3c 1e 1e 1e 0f 0f &1404 0f 0f 0f 0f 0f 0f 0f 0f 00 08 08 08 0c 0c 0c 0e &1414 00 00 00 00 00 00 00 01 fc fe f8 74 74 31 3c 1e &1424 c4 cc c0 c0 c0 80 84 86 00 00 00 00 00 00 00 00 &1434 00 00 00 00 00 00 00 00 00 00 00 33 77 74 fb fc &1444 00 00 00 88 cc c4 c8 c4 00 00 00 00 00 00 00 00 ; sprite_2b_data (SPRITE_BOW_FORWARDS) &1454 30 03 10 ; min_x = &10, max_x = &30, top_group = &03 &1457 00 00 00 33 33 11 10 10 0e ae 31 fd f9 f1 e0 e2 &1467 07 17 ee f9 f8 f0 70 70 00 00 00 00 ee e6 80 80 &1477 01 01 01 01 01 01 01 00 4b 0e 0e 0e 0e 0e 0e 0e &1487 87 87 87 87 87 07 07 07 00 00 00 00 00 00 00 00 &1497 c0 e1 e1 61 21 01 01 01 3c 0f 1e 2d 2d 2d 4b 5a &14a7 c3 87 0f 87 87 4b 4b 4b 60 60 60 60 00 00 00 00 &14b7 0f 0e 0e 0e 2c 84 c0 c0 0f 0f 0f 0f 0f 0f 87 78 &14c7 1e 0e 0e 2c 2c 2c 0e 78 0e 0e 0e 0e 0e 2e 68 68 &14d7 03 03 03 07 07 0f 0f 0f 3f 3f 3c 1e 1e 1e 0f 0f &14e7 cf cf 87 0f 0f 0f 0f 0f 00 08 08 08 0c 0c 0c 0e &14f7 00 00 00 00 00 00 00 01 11 33 73 75 75 75 7d 7e &1507 88 cc ee ee ee ec ec e2 00 00 00 00 00 00 00 00 ; sprite_2c_data (SPRITE_FALLING_BACKWARDS_ONE) &1517 30 02 08 ; min_x = &08, max_x = &30, top_group = &02 &151a 00 00 33 77 77 33 00 00 00 00 cc ff ff ff dd 00 &152a 01 01 00 88 ee ff ff 33 0c 4c c0 e0 70 f8 fc fc &153a 00 00 00 00 00 ee f7 f7 00 00 00 00 00 00 00 00 &154a 00 00 00 00 00 00 00 00 07 07 07 03 03 03 03 01 &155a 80 08 08 08 0c 0c 0c 0c 00 00 00 00 00 00 00 00 &156a 00 00 00 00 00 00 00 00 07 07 03 01 00 00 00 00 &157a 2d 1e 1e 96 43 07 07 07 08 08 0c 0c 84 84 80 80 &158a 00 00 00 00 00 00 00 00 10 10 01 00 00 00 00 00 &159a 0f c3 78 1e 0f 0f 0f 0f 48 e0 b4 84 e0 1e 0f 2d &15aa 00 00 00 c0 00 80 00 08 00 00 00 00 00 00 00 00 &15ba 07 43 21 12 01 01 01 01 69 2f 4b 87 0f 0f 0f 0f &15ca 5a 2c 48 0c 0c 0c 0c 0c 86 00 00 00 00 00 00 00 &15da 30 00 00 00 00 00 00 00 80 00 01 03 03 07 07 07 &15ea fc 74 3c 3d be 78 78 78 00 3c 3c 78 f0 e1 87 0f &15fa 00 00 08 0e 3c 3c 3c 2e 00 00 00 00 c0 f0 f0 70 &160a 11 33 32 32 32 31 b1 51 f7 f5 fa fa f8 fc fe fa &161a 00 00 00 88 88 80 80 00 00 00 00 00 00 00 00 00 &162a 00 00 00 00 00 00 00 00 ; sprite_2d_data (SPRITE_FALLING_BACKWARDS_TWO) &1632 38 03 08 ; min_x = &08, max_x = &38, top_group = &03 &1635 33 77 77 33 00 00 00 00 cc ee ff ff ff 77 00 00 &1645 00 00 ff ff ff ff 00 00 30 30 fc fc fc fe fe 33 &1655 80 80 f7 f7 f7 e6 c4 88 30 00 cc ee ff 77 33 00 &1665 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &1675 00 00 00 00 00 00 00 00 03 03 03 03 03 11 10 32 &1685 48 58 58 1c 58 88 80 80 4c c4 c0 c0 c0 e0 f0 70 &1695 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &16a5 00 00 00 00 00 00 00 00 0f 43 21 03 03 03 03 12 &16b5 4b 49 0d 0d 0d 0d 0d 49 0c 0c 0c 0c 4c 4c 4c 4c &16c5 00 00 00 00 00 00 00 00 1f 0f 07 07 43 21 10 00 &16d5 69 69 4b 1e 0f 2d c3 03 4b 4b 4b 4b 0f 0f 0f 0f &16e5 2c 1e 0f 0f 0f 87 4b 4b 00 00 00 80 80 48 48 0c &16f5 73 73 91 00 00 00 00 00 fc e5 ad 8f 07 25 0f 2d &1705 3c 3c 3c 78 78 69 69 e1 1e 1e 1e 4a 0c 0e 0f 2d &1715 f0 f0 f2 30 00 00 08 0c 00 80 80 80 00 00 00 00 &1725 00 11 32 32 75 75 75 73 00 80 ee ea e4 f5 f1 f8 &1735 00 00 00 00 00 00 00 34 00 00 00 00 00 00 00 4c &1745 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_2e_data (SPRITE_FALLEN_BACKWARDS) &1755 48 07 00 ; min_x = &00, max_x = &48, top_group = &07 &1758 47 03 03 03 23 33 11 00 1e 0f 0f 1e 3c 3e ff 33 &1768 0f 0f c3 e1 f0 f0 f8 fe 5a 87 87 87 0f a7 f1 e0 &1778 3c 87 87 87 1e 78 ff 11 87 69 1e 0f 87 0f af ff &1788 0f 0f f1 0f 1e 1e be ff 2d 69 69 e1 f1 f1 f1 e8 &1798 68 f1 f1 e2 cc 88 00 00 33 76 fd fd fc fe fe fe &17a8 00 c4 e4 e0 f0 c3 87 6d 00 00 00 00 87 0f 0f 0f &17b8 00 00 00 60 78 0f 3c 5a 00 00 00 00 c0 e8 0f 4b &17c8 00 00 00 00 00 00 0e 0f 00 00 00 00 00 00 00 0f &17d8 00 00 00 00 00 00 00 0f 00 00 00 20 20 60 60 68 ; sprite_2f_data (SPRITE_FALLING_FORWARDS_ONE) &17e8 28 04 08 ; min_x = &08, max_x = &28, top_group = &04 &17eb 00 03 43 43 c3 e1 c3 61 1e 1f 0e 1f 6e 7f ff ff &17fb d0 c5 47 8b cb c3 e1 f8 86 0e 0e 0c 0c 08 66 ff &180b 01 01 00 00 00 00 00 00 0f 5a 69 69 61 34 34 1e &181b 4a 87 87 87 0f 0f a7 e3 00 00 08 08 0c 0c 0e 0e &182b 07 17 16 16 07 07 03 03 0f 0f 0f 8f c3 4b 0f 0f &183b 4b 5a 5a 1e 3e 0e 0e 4a 00 00 80 80 e0 f0 70 30 &184b 32 10 10 10 01 03 03 07 e8 e2 e0 c3 e1 69 2d 2d &185b 00 00 00 08 0c 0e 0e 0f 00 00 00 00 00 00 00 00 &186b 00 11 33 32 31 f3 73 72 cc ee e0 ee e0 e6 f2 f8 &187b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_30_data (SPRITE_FALLING_FORWARDS_TWO) &188b 40 05 08 ; min_x = &08, max_x = &40, top_group = &05 &188e 00 07 87 87 87 c3 c3 dd 07 07 0f 0f 0f 0f 1e cf &189e 1e 1e 0f 4b 0f 87 0f 0f 87 87 c3 c2 0c 3f 3b ff &18ae 20 20 20 00 77 ff ff bb 00 00 00 00 ff ff ff ee &18be 00 00 00 00 00 ff ff 00 00 00 00 00 00 00 00 00 &18ce 00 00 00 00 01 03 03 03 07 1e 3c 3c 3c 3c 3c 1e &18de 0f 0f 0f 0f 4b 69 1e 87 2d 2d 0c 0c 08 08 80 48 &18ee 0e 3c 3c 34 10 00 00 00 00 00 c0 e0 e0 e0 20 00 &18fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &190e 01 03 03 07 07 07 43 43 0f 0f 0f 0f 4b 87 87 0f &191e 78 79 78 5a 4b 0f 0f 0f 80 80 80 08 0c 0c 0c 0e &192e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &193e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &194e 40 20 10 20 00 01 07 0f ff ff f0 ff f8 f0 7a f0 &195e 88 80 88 80 80 88 88 80 00 00 00 00 00 00 00 00 ; sprite_31_data (SPRITE_FALLEN_FORWARDS) &196e 48 07 00 ; min_x = &00, max_x = &48, top_group = &07 &1971 00 40 e3 c7 87 87 e3 f9 87 fc 2d 1e 0f 0f 0f ff &1981 e1 0f 0f 0f 0f 0f 0f 3f 1e 1e 78 87 4f f0 f0 f8 &1991 2d 69 87 0f 0f 0f e3 f1 1f 1f 1f 1e 3d 7c 7c fd &19a1 ff ff ff ff f7 f7 f3 f7 ca cb cb cb db cb b7 ff &19b1 00 00 08 68 f0 f8 fc 77 00 00 00 00 00 00 00 00 &19c1 00 00 00 00 00 00 60 c3 00 00 00 00 00 00 00 1e &19d1 00 00 00 00 00 00 c3 87 00 00 00 00 00 00 69 87 &19e1 00 00 00 00 00 07 0f 1e 00 00 00 00 00 68 e7 ff &19f1 00 00 00 00 00 00 00 0c 00 00 00 00 00 00 00 00 ; sprite_32_data (SPRITE_FALLEN_INWARDS) &1a01 28 04 08 ; min_x = &08, max_x = &28, top_group = &04 &1a04 65 96 87 87 c3 f3 f9 f9 0f 0f 87 87 0f 1f bf ee &1a14 0f 2d 2d 0f 1f f6 fc fc 0c 80 80 08 00 c4 c0 c0 &1a24 52 23 03 03 03 03 03 01 7c 3e 3e 1f 1e 0f 0f 0f &1a34 e1 87 0f 0f 1e a5 d2 87 00 08 08 08 0c 0c 0c 0c &1a44 07 07 07 07 17 16 16 16 0f 87 f6 7c f0 f1 f2 b4 &1a54 0e c3 c3 c7 bc 78 f0 f0 00 00 00 08 88 08 00 00 &1a64 00 01 03 03 07 07 07 07 3d 3d 3c f8 1e 96 87 87 &1a74 e4 e4 c2 86 0e 0e 2c 0e 00 00 00 00 00 00 00 00 &1a84 00 00 00 00 00 00 00 00 00 11 33 30 33 32 32 76 &1a94 cc ee e2 ec e2 e6 ea e0 00 00 00 00 00 00 00 00 &1aa4 00 00 00 00 00 00 00 00 00 00 00 00 ; consider_computer_move &1ab0 ad 00 01 LDA &0100 ; points_for_hit &1ab3 48 PHA ; points_for_hit &1ab4 ad 80 0d LDA &0d80 ; this_computer_move_for_computer &1ab7 c9 09 CMP #&09 ; MOVE_FORWARD_SOMERSAULT &1ab9 f0 14 BEQ &1acf ; use_null_move_for_computer_player # If this player is somersaulting, &1abb c9 0c CMP #&0c ; MOVE_BACK_SOMERSAULT &1abd f0 10 BEQ &1acf ; use_null_move_for_computer_player # leave with no move &1abf ad 85 0d LDA &0d85 ; other_player_move_for_computer &1ac2 c9 1c CMP #&1c ; MOVE_BACKWARDS_SWEEP &1ac4 d0 05 BNE &1acb ; not_backwards_sweep &1ac6 a9 14 LDA #&14 ; MOVE_FORWARD_SWEEP # Treat other player's backward sweep as forward sweep &1ac8 8d 85 0d STA &0d85 ; other_player_move_for_computer ; not_backwards_sweep &1acb c9 29 CMP #&29 ; MOVE_FALL_BACKWARDS &1acd 90 05 BCC &1ad4 ; not_falling # If this player is falling, ; use_null_move_for_computer_player &1acf a0 00 LDY #&00 ; MOVE_NONE # leave with no move &1ad1 4c 40 1c JMP &1c40 ; use_move_Y_for_computer_player ; not_falling &1ad4 cd 80 0d CMP &0d80 ; this_computer_move_for_computer # A = other_player_move_for_computer &1ad7 d0 12 BNE &1aeb ; not_same_move_as_other_player # Branch if this player's move different to other player's &1ad9 c9 02 CMP #&02 ; MOVE_WALK_FORWARDS &1adb f0 0e BEQ &1aeb ; not_same_move_as_other_player # or if both players are walking in same direction &1add c9 08 CMP #&08 ; MOVE_WALK_BACKWARDS &1adf f0 0a BEQ &1aeb ; not_same_move_as_other_player &1ae1 ad 82 0d LDA &0d82 ; this_player_move_state_for_computer &1ae4 c9 02 CMP #&02 ; MOVE_STATE_REVERSE &1ae6 b0 03 BCS &1aeb ; not_same_move_as_other_player # Branch if this player's move reversing or held &1ae8 4c 3d 1c JMP &1c3d ; use_previous_move_for_computer_player # Otherwise, continue previous move ; not_same_move_as_other_player &1aeb ad 87 0d LDA &0d87 ; other_player_move_state_for_computer &1aee c9 01 CMP #&01 ; MOVE_STATE_FORWARD # Is the other player making a move? &1af0 f0 03 BEQ &1af5 ; consider_considering_other_players_move ; to_consider_walking_towards_opponent &1af2 4c b9 1b JMP &1bb9 ; consider_walking_towards_opponent # If not, consider walking towards other player ; consider_considering_other_players_move &1af5 ae ed 0d LDX &0ded ; scoring_player &1af8 bd 93 0d LDA &0d93,X ; computer_check_opponent_cooldown - 1 # Always zero &1afb f0 05 BEQ &1b02 ; consider_other_players_move # Always branches &1afd de 93 0d DEC &0d93,X ; computer_check_opponent_cooldown - 1 &1b00 d0 25 BNE &1b27 ; skip_considering_other_players_move ; consider_other_players_move &1b02 a2 05 LDX #&05 ; other_computer_state &1b04 a0 00 LDY #&00 ; this_computer_state &1b06 20 a5 1d JSR &1da5 ; evaluate_possible_move # Check if other player can hit this player &1b09 ad 00 01 LDA &0100 ; points_for_hit &1b0c f0 e4 BEQ &1af2 ; to_consider_walking_towards_opponent # If not, consider walking towards other player ; can_be_attacked &1b0e ac ed 0d LDY &0ded ; scoring_player &1b11 be 95 0d LDX &0d95,Y ; computer_check_opponent_maximum_cooldown - 1 # Always zero &1b14 ad 85 0d LDA &0d85 ; other_player_move_for_computer &1b17 c9 14 CMP #&14 ; MOVE_FORWARD_SWEEP &1b19 d0 02 BNE &1b1d ; not_forward_sweep &1b1b a2 00 LDX #&00 # Sweeps would receive an immediate check otherwise ; not_forward_sweep &1b1d c9 1c CMP #&1c ; MOVE_BACKWARDS_SWEEP &1b1f d0 02 BNE &1b23 ; not_backward_sweep &1b21 a2 00 LDX #&00 ; not_backward_sweep &1b23 8a TXA &1b24 99 93 0d STA &0d93,Y ; computer_check_opponent_cooldown - 1 # Always set to zero ; skip_considering_other_players_move &1b27 a9 00 LDA #&00 &1b29 8d 8c 0d STA &0d8c ; number_of_possible_moves &1b2c ad 8a 0d LDA &0d8a ; computer_players_flip &1b2f f0 02 BEQ &1b33 ; set_facing_same_direction # Branch if both players are facing right &1b31 49 03 EOR #&03 # Three if both players are facing left, so becomes zero ; set_facing_same_direction &1b33 8d 8d 0d STA &0d8d ; facing_same_direction # Set to zero if players facing same direction &1b36 ad 85 0d LDA &0d85 ; other_player_move_for_computer &1b39 c9 16 CMP #&16 ; MOVE_SHORT_JAB_KICK &1b3b d0 05 BNE &1b42 ; not_short_jab_kick &1b3d a9 12 LDA #&12 ; MOVE_MID_KICK # Treat other player's short jab kick as mid kick &1b3f 8d 85 0d STA &0d85 ; other_player_move_for_computer ; not_short_jab_kick &1b42 20 ca 1d JSR &1dca ; find_offset_of_move_in_list_of_moves # Returns Y = offset in list &1b45 b9 33 1e LDA &1e33,Y ; moves_flags &1b48 29 15 AND #&15 # Get attacking flags &1b4a 8d 8b 0d STA &0d8b ; vulnerable_positions &1b4d a0 16 LDY #&16 ; OFFSET_LAST_MOVE ; find_possible_defensive_move_loop # For each move in list, &1b4f b9 33 1e LDA &1e33,Y ; moves_flags &1b52 4a LSR A &1b53 29 15 AND #&15 # Get defending flags &1b55 2d 8b 0d AND &0d8b ; vulnerable_positions &1b58 f0 45 BEQ &1b9f ; add_possible_defensive_move # If no overlap, add this as possible defensive move ; consider_next_possible_defensive_move &1b5a 88 DEY &1b5b 10 f2 BPL &1b4f ; find_possible_defensive_move_loop &1b5d ae 8c 0d LDX &0d8c ; number_of_possible_moves # For each possible defensive move, &1b60 ca DEX ; check_if_already_performing_defensive_move_loop &1b61 bc 61 1e LDY &1e61,X ; list_of_possible_moves &1b64 b9 1c 1e LDA &1e1c,Y ; list_of_moves &1b67 cd 80 0d CMP &0d80 ; this_computer_move_for_computer # Is this player already performing it? &1b6a f0 4a BEQ &1bb6 ; to_use_previous_move_for_computer_player # If so, continue performing the move &1b6c ca DEX &1b6d 10 f2 BPL &1b61 ; check_if_already_performing_defensive_move_loop &1b6f a9 ff LDA #&ff # Non-zero to exclude offensive moves &1b71 20 d5 1d JSR &1dd5 ; populate_list_of_suitably_difficult_moves &1b74 20 8c 1d JSR &1d8c ; rnd &1b77 bc 6d 1e LDY &1e6d,X ; list_of_suitably_difficult_moves &1b7a b9 1c 1e LDA &1e1c,Y ; list_of_moves # Pick random defensive move from list &1b7d a8 TAY &1b7e ae ed 0d LDX &0ded ; scoring_player &1b81 bd 97 0d LDA &0d97,X ; computer_defensive_move_cooldown - 1 &1b84 f0 10 BEQ &1b96 ; use_defensive_move # Can this player make a defensive move now? &1b86 de 97 0d DEC &0d97,X ; computer_defensive_move_cooldown - 1 &1b89 f0 0b BEQ &1b96 ; use_defensive_move ; use_previous_move_for_computer_player_if_not_jumping # If not, continue previous move &1b8b ac 80 0d LDY &0d80 ; this_computer_move_for_computer &1b8e c0 01 CPY #&01 ; MOVE_JUMP &1b90 d0 24 BNE &1bb6 ; to_use_previous_move_for_computer_player &1b92 a0 00 LDY #&00 ; MOVE_NONE # unless jumping, in which case, make this player stand &1b94 f0 06 BEQ &1b9c ; to_use_move_Y_for_computer_player # Always branches ; use_defensive_move &1b96 bd 99 0d LDA &0d99,X ; computer_defensive_move_maximum_cooldown - 1 &1b99 9d 97 0d STA &0d97,X ; computer_defensive_move_cooldown - 1 ; to_use_move_Y_for_computer_player &1b9c 4c 40 1c JMP &1c40 ; use_move_Y_for_computer_player ; add_possible_defensive_move # Y is offset of possible defensive move &1b9f b9 33 1e LDA &1e33,Y ; moves_flags &1ba2 10 05 BPL &1ba9 ; skip_same_direction_check # If top bit set, players must be facing each other ; is_block_up_block_down_or_crouch &1ba4 ae 8d 0d LDX &0d8d ; facing_same_direction # Zero if players facing same direction &1ba7 f0 b1 BEQ &1b5a ; consider_next_possible_defensive_move ; skip_same_direction_check &1ba9 98 TYA &1baa ae 8c 0d LDX &0d8c ; number_of_possible_moves &1bad 9d 61 1e STA &1e61,X ; list_of_possible_moves # Add move to list &1bb0 ee 8c 0d INC &0d8c ; number_of_possible_moves &1bb3 4c 5a 1b JMP &1b5a ; consider_next_possible_defensive_move ; to_use_previous_move_for_computer_player &1bb6 4c 3d 1c JMP &1c3d ; use_previous_move_for_computer_player ; consider_walking_towards_opponent &1bb9 a0 00 LDY #&00 # Positive to indicate this player is right of other player by default &1bbb 98 TYA &1bbc ae ed 0d LDX &0ded ; scoring_player &1bbf 9d 93 0d STA &0d93,X ; computer_check_opponent_cooldown - 1 &1bc2 ad 80 0d LDA &0d80 ; this_computer_move_for_computer &1bc5 c9 02 CMP #&02 ; MOVE_WALK_FORWARDS &1bc7 f0 0b BEQ &1bd4 ; calculate_separation_between_players &1bc9 c9 08 CMP #&08 ; MOVE_WALK_BACKWARDS &1bcb f0 07 BEQ &1bd4 ; calculate_separation_between_players &1bcd ad 82 0d LDA &0d82 ; this_player_move_state_for_computer # Is this player making a move? &1bd0 c9 01 CMP #&01 ; MOVE_STATE_FORWARD &1bd2 f0 69 BEQ &1c3d ; use_previous_move_for_computer_player # If so, continue move ; calculate_separation_between_players &1bd4 ad 84 0d LDA &0d84 ; this_player_screen_address_low_for_computer &1bd7 38 SEC # Calculate separation between players &1bd8 ed 89 0d SBC &0d89 ; other_player_screen_address_low_for_computer &1bdb 90 09 BCC &1be6 ; skip_inversion &1bdd a0 ff LDY #&ff # Negative to indicate this player is left of other player &1bdf ad 89 0d LDA &0d89 ; other_player_screen_address_low_for_computer &1be2 38 SEC &1be3 ed 84 0d SBC &0d84 ; this_player_screen_address_low_for_computer ; skip_inversion &1be6 8d 8d 0d STA &0d8d ; separation_between_players &1be9 ad 8a 0d LDA &0d8a ; computer_players_flip &1bec f0 11 BEQ &1bff ; is_facing_same_direction &1bee c9 03 CMP #&03 &1bf0 f0 0d BEQ &1bff ; is_facing_same_direction ; is_facing_opposite_direction # If the players are facing opposite directions, &1bf2 ad 8d 0d LDA &0d8d ; separation_between_players &1bf5 c9 d8 CMP #&d8 ; -5 * 8 &1bf7 b0 29 BCS &1c22 ; check_if_other_player_is_hittable &1bf9 c9 59 CMP #&59 ; 11 * 8 + 1 &1bfb b0 0d BCS &1c0a ; consider_walking_forward_or_turning &1bfd 90 23 BCC &1c22 ; check_if_other_player_is_hittable # Always branches ; is_facing_same_direction # If the players are facing the same direction, &1bff ad 8d 0d LDA &0d8d ; separation_between_players &1c02 c9 c0 CMP #&c0 ; -4 * 8 &1c04 b0 1c BCS &1c22 ; check_if_other_player_is_hittable &1c06 c9 41 CMP #&41 ; 8 * 8 + 1 &1c08 90 18 BCC &1c22 ; check_if_other_player_is_hittable ; consider_walking_forward_or_turning &1c0a ad 8a 0d LDA &0d8a ; computer_players_flip &1c0d 4a LSR A &1c0e 90 04 BCC &1c14 ; not_facing_left # Branch if this player is facing left &1c10 98 TYA &1c11 49 ff EOR #&ff # Otherwise, flip comparison &1c13 a8 TAY ; not_facing_left &1c14 c0 00 CPY #&00 &1c16 f0 05 BEQ &1c1d ; use_walk_forward_for_computer_player # Branch if this player isn't beyond other player &1c18 a0 28 LDY #&28 ; MOVE_ROUNDHOUSE_BLOCK # Turn player to face other player &1c1a 4c 40 1c JMP &1c40 ; use_move_Y_for_computer_player ; use_walk_forward_for_computer_player &1c1d a0 02 LDY #&02 ; MOVE_WALK_FORWARDS &1c1f 4c 40 1c JMP &1c40 ; use_move_Y_for_computer_player # Walk forward towards other player ; check_if_other_player_is_hittable &1c22 a2 00 LDX #&00 ; this_computer_state &1c24 a0 05 LDY #&05 ; other_computer_state &1c26 20 a5 1d JSR &1da5 ; evaluate_possible_move # Check if this player can hit other player &1c29 ad 00 01 LDA &0100 ; points_for_hit &1c2c d0 03 BNE &1c31 ; can_hit_other_player &1c2e 4c ce 1c JMP &1cce ; populate_list_of_possible_moves ; can_hit_other_player &1c31 ad 87 0d LDA &0d87 ; other_player_move_state_for_computer &1c34 c9 03 CMP #&03 ; MOVE_STATE_END &1c36 d0 05 BNE &1c3d ; use_previous_move_for_computer_player &1c38 a0 00 LDY #&00 ; MOVE_NONE &1c3a 4c 40 1c JMP &1c40 ; use_move_Y_for_computer_player ; use_previous_move_for_computer_player &1c3d ac 80 0d LDY &0d80 ; this_computer_move_for_computer ; use_move_Y_for_computer_player &1c40 c0 02 CPY #&02 ; MOVE_WALK_FORWARDS &1c42 f0 04 BEQ &1c48 ; is_walking &1c44 c0 08 CPY #&08 ; MOVE_WALK_BACKWARDS &1c46 d0 51 BNE &1c99 ; not_walking ; is_walking # If this player is walking, consider pausing &1c48 ad 9e 0d LDA &0d9e ; computer_pause_timer &1c4b f0 05 BEQ &1c52 ; not_paused &1c4d ce 9e 0d DEC &0d9e ; computer_pause_timer &1c50 d0 2e BNE &1c80 ; pause_computer_player ; not_paused &1c52 ce 9c 0d DEC &0d9c ; computer_walk_timer &1c55 d0 14 BNE &1c6b ; skip_pause &1c57 a9 05 LDA #&05 &1c59 8d 9e 0d STA &0d9e ; computer_pause_timer # Pause for fixed duration &1c5c a9 0a LDA #&0a &1c5e 8d 8c 0d STA &0d8c ; rnd_limit &1c61 20 8c 1d JSR &1d8c ; rnd &1c64 8a TXA &1c65 18 CLC &1c66 69 05 ADC #&05 &1c68 8d 9c 0d STA &0d9c ; computer_walk_timer # Walk for random duration ; skip_pause &1c6b 98 TYA &1c6c 48 PHA ; walk move &1c6d ad 85 0d LDA &0d85 ; other_player_move_for_computer &1c70 20 ca 1d JSR &1dca ; find_offset_of_move_in_list_of_moves # Returns Y = offset in list &1c73 c0 0a CPY #&0a ; OFFSET_FIRST_OFFENSIVE_MOVE &1c75 68 PLA ; walk move &1c76 a8 TAY &1c77 90 20 BCC &1c99 ; not_being_attacked # Branch if other player isn't attacking &1c79 ad 87 0d LDA &0d87 ; other_player_move_state_for_computer &1c7c c9 01 CMP #&01 ; MOVE_STATE_FORWARD &1c7e d0 19 BNE &1c99 ; not_being_attacked # Branch if other player reversing or holding attack ; pause_computer_player &1c80 a0 00 LDY #&00 ; MOVE_NONE &1c82 98 TYA &1c83 48 PHA ; walk move &1c84 ad 85 0d LDA &0d85 ; other_player_move_for_computer &1c87 20 ca 1d JSR &1dca ; find_offset_of_move_in_list_of_moves # Returns Y = offset in list &1c8a c0 0a CPY #&0a ; OFFSET_FIRST_OFFENSIVE_MOVE &1c8c 68 PLA ; walk move &1c8d a8 TAY &1c8e 90 09 BCC &1c99 ; not_being_attacked # Branch if other player isn't attacking &1c90 ad 87 0d LDA &0d87 ; other_player_move_state_for_computer &1c93 c9 01 CMP #&01 ; MOVE_STATE_FORWARD &1c95 d0 02 BNE &1c99 ; not_being_attacked # Branch if other player reversing or holding attack &1c97 a0 00 LDY #&00 ; MOVE_NONE ; not_being_attacked &1c99 c0 06 CPY #&06 ; MOVE_CROUCHING_JAB &1c9b d0 02 BNE &1c9f ; not_crouching_jab &1c9d a0 27 LDY #&27 ; MOVE_CROUCHING_BLOCK # Convert crouching jab into crouching block ; not_crouching_jab &1c9f c0 2a CPY #&2a ; MOVE_FALL_INWARDS &1ca1 90 02 BCC &1ca5 ; not_falling &1ca3 a0 00 LDY #&00 ; MOVE_NONE ; not_falling &1ca5 c0 01 CPY #&01 ; MOVE_JUMP # If this player is jumping, &1ca7 d0 20 BNE &1cc9 ; skip_converting_jump &1ca9 ad a0 0d LDA &0da0 ; computer_maximum_move_difficulty &1cac c9 03 CMP #&03 &1cae 90 19 BCC &1cc9 ; skip_converting_jump # Branch if 10th dan, i.e. 10th dan doesn't somersault &1cb0 ad 64 fe LDA &fe64 ; User VIA timer 1 counter LSB &1cb3 c9 f8 CMP #&f8 # 8 in 256 chance of converting to back somersault &1cb5 90 04 BCC &1cbb ; skip_back_somersault &1cb7 a0 0c LDY #&0c ; MOVE_BACK_SOMERSAULT &1cb9 b0 0e BCS &1cc9 ; skip_converting_jump ; skip_back_somersault &1cbb c9 f0 CMP #&f0 # 8 in 256 chance of converting to forward somersault &1cbd 90 04 BCC &1cc3 ; skip_forward_somersault &1cbf a0 09 LDY #&09 ; MOVE_FORWARD_SOMERSAULT &1cc1 b0 06 BCS &1cc9 ; skip_converting_jump ; skip_forward_somersault &1cc3 c9 c8 CMP #&c8 # 40 in 256 chance of converting to flying kick &1cc5 90 02 BCC &1cc9 ; skip_converting_jump &1cc7 a0 11 LDY #&11 ; MOVE_FLYING_KICK ; skip_converting_jump &1cc9 68 PLA ; points_for_hit &1cca 8d 00 01 STA &0100 ; points_for_hit &1ccd 60 RTS ; populate_list_of_possible_moves &1cce a9 00 LDA #&00 &1cd0 8d 8c 0d STA &0d8c ; number_of_possible_moves &1cd3 ad 85 0d LDA &0d85 ; other_player_move_for_computer &1cd6 20 ca 1d JSR &1dca ; find_offset_of_move_in_list_of_moves # Returns Y = offset in list &1cd9 b9 33 1e LDA &1e33,Y ; moves_flags &1cdc 4a LSR A &1cdd 29 15 AND #&15 # Get defending flags &1cdf 8d 8b 0d STA &0d8b ; vulnerable_positions # i.e. vulnerable positions of defending player &1ce2 a0 16 LDY #&16 ; OFFSET_LAST_MOVE ; populate_list_of_possible_moves_loop &1ce4 b9 33 1e LDA &1e33,Y ; moves_flags &1ce7 29 15 AND #&15 # Get attacking flags &1ce9 2d 8b 0d AND &0d8b ; vulnerable_positions &1cec d0 44 BNE &1d32 ; add_possible_offensive_move # If not blocked, add to list of possible moves ; consider_next_possible_move &1cee 88 DEY &1cef c0 0a CPY #&0a ; OFFSET_FIRST_OFFENSIVE_MOVE &1cf1 b0 f1 BCS &1ce4 ; populate_list_of_possible_moves_loop &1cf3 ad 8c 0d LDA &0d8c ; number_of_possible_moves &1cf6 f0 5c BEQ &1d54 ; consider_random_walk_or_somersault # If no possible attacks, walk or somersault &1cf8 a9 00 LDA #&00 # Zero to include offensive moves &1cfa 20 d5 1d JSR &1dd5 ; populate_list_of_suitably_difficult_moves &1cfd 20 8c 1d JSR &1d8c ; rnd # Pick random possible move from list &1d00 bc 6d 1e LDY &1e6d,X ; list_of_suitably_difficult_moves &1d03 b9 4a 1e LDA &1e4a,Y ; moves_difficulty_table &1d06 cd a0 0d CMP &0da0 ; computer_maximum_move_difficulty &1d09 b0 49 BCS &1d54 ; consider_random_walk_or_somersault # If too difficult, walk or somersault &1d0b b9 1c 1e LDA &1e1c,Y ; list_of_moves &1d0e a8 TAY &1d0f cc 85 0d CPY &0d85 ; other_player_move_for_computer &1d12 f0 19 BEQ &1d2d ; use_null_move_for_computer_player # Don't make same move as other player &1d14 ae ed 0d LDX &0ded ; scoring_player &1d17 bd 8f 0d LDA &0d8f,X ; computer_offensive_move_cooldown - 1 &1d1a f0 08 BEQ &1d24 ; use_offensive_move &1d1c de 8f 0d DEC &0d8f,X ; computer_offensive_move_cooldown - 1 &1d1f f0 03 BEQ &1d24 ; use_offensive_move &1d21 4c 8b 1b JMP &1b8b ; use_previous_move_for_computer_player_if_not_jumping ; use_offensive_move &1d24 bd 91 0d LDA &0d91,X ; computer_offensive_move_maximum_cooldown - 1 &1d27 9d 8f 0d STA &0d8f,X ; computer_offensive_move_cooldown - 1 &1d2a 4c 40 1c JMP &1c40 ; use_move_Y_for_computer_player ; use_null_move_for_computer_player &1d2d a0 00 LDY #&00 ; MOVE_NONE &1d2f 4c 40 1c JMP &1c40 ; use_move_Y_for_computer_player ; add_possible_offensive_move &1d32 98 TYA # Y is offset of possible attack &1d33 48 PHA ; offset &1d34 ae 8c 0d LDX &0d8c ; number_of_possible_moves &1d37 9d 61 1e STA &1e61,X ; list_of_possible_moves # Add move to list &1d3a b9 1c 1e LDA &1e1c,Y ; list_of_moves &1d3d a2 00 LDX #&00 ; this_player_state_for_computer &1d3f a0 05 LDY #&05 ; other_player_state_for_computer &1d41 20 a8 1d JSR &1da8 ; evaluate_possible_move_A # Check if this player can hit other player &1d44 ad 00 01 LDA &0100 ; points_for_hit &1d47 f0 03 BEQ &1d4c ; skip_extending_list &1d49 ee 8c 0d INC &0d8c ; number_of_possible_moves # If so, keep move on list ; skip_extending_list &1d4c 68 PLA ; offset &1d4d a8 TAY &1d4e 4c ee 1c JMP &1cee ; consider_next_possible_move ; to_use_previous_move_for_computer_player &1d51 4c 3d 1c JMP &1c3d ; use_previous_move_for_computer_player ; consider_random_walk_or_somersault &1d54 ad 84 0d LDA &0d84 ; this_player_screen_address_low_for_computer &1d57 cd 89 0d CMP &0d89 ; other_player_screen_address_low_for_computer &1d5a f0 19 BEQ &1d75 ; is_level_with_other_player ; consider_walking_forward_or_back_at_random &1d5c ad 80 0d LDA &0d80 ; this_computer_move_for_computer &1d5f c9 08 CMP #&08 ; MOVE_WALK_BACKWARDS &1d61 f0 ee BEQ &1d51 ; to_use_previous_move_for_computer_player # If this player was walking, keep walking &1d63 c9 02 CMP #&02 ; MOVE_WALK_FORWARDS &1d65 f0 ea BEQ &1d51 ; to_use_previous_move_for_computer_player &1d67 a0 08 LDY #&08 ; MOVE_WALK_BACKWARDS # Otherwise walk forward or back at random &1d69 ad 64 fe LDA &fe64 ; User VIA timer 1 counter LSB &1d6c 4a LSR A &1d6d 4a LSR A &1d6e 90 02 BCC &1d72 ; to_use_move_Y_for_computer_player &1d70 a0 02 LDY #&02 ; MOVE_WALK_FORWARDS ; to_use_move_Y_for_computer_player &1d72 4c 40 1c JMP &1c40 ; use_move_Y_for_computer_player ; is_level_with_other_player &1d75 ad 8a 0d LDA &0d8a ; computer_players_flip &1d78 f0 04 BEQ &1d7e ; consider_somersaulting_forward_or_back_at_random &1d7a c9 03 CMP #&03 # If the players are facing the same direction, &1d7c d0 de BNE &1d5c ; consider_walking_forward_or_back_at_random ; consider_somersaulting_forward_or_back_at_random &1d7e a0 09 LDY #&09 ; MOVE_FORWARD_SOMERSAULT # Somersault forward or back at random &1d80 ad 64 fe LDA &fe64 ; User VIA timer 1 counter LSB &1d83 4a LSR A &1d84 4a LSR A &1d85 90 02 BCC &1d89 ; to_use_move_Y_for_computer_player &1d87 a0 0c LDY #&0c ; MOVE_BACK_SOMERSAULT ; to_use_move_Y_for_computer_player &1d89 4c 40 1c JMP &1c40 ; use_move_Y_for_computer_player ; rnd &1d8c ad 64 fe LDA &fe64 ; User VIA timer 1 counter LSB &1d8f 4a LSR A &1d90 4d 65 fe EOR &fe65 ; User VIA timer 1 counter MSB &1d93 8d 8b 0d STA &0d8b ; rnd_tmp &1d96 4a LSR A &1d97 4a LSR A &1d98 4a LSR A &1d99 4d 8b 0d EOR &0d8b ; rnd_tmp &1d9c 29 1f AND #&1f &1d9e cd 8c 0d CMP &0d8c ; number_of_possible_moves, rnd_limit &1da1 b0 e9 BCS &1d8c ; rnd &1da3 aa TAX &1da4 60 RTS ; evaluate_possible_move # Called with X = attacker offset, Y = defender offset &1da5 bd 80 0d LDA &0d80,X ; this_computer_move # (0 for this, 5 for other) ; evaluate_possible_move_A &1da8 85 a8 STA &a8 ; attacking_player_move &1daa bd 84 0d LDA &0d84,X ; this_player_screen_address_low_for_computer &1dad 85 aa STA &aa ; attacking_player_screen_address_low &1daf b9 83 0d LDA &0d83,Y ; this_computer_sprite_for_computer &1db2 85 a9 STA &a9 ; defending_player_sprite &1db4 b9 84 0d LDA &0d84,Y ; this_player_screen_address_low_for_computer &1db7 85 ac STA &ac ; defending_player_screen_address_low &1db9 ad 8a 0d LDA &0d8a ; computer_players_flip &1dbc e0 00 CPX #&00 &1dbe f0 05 BEQ &1dc5 ; set_attacking_and_defending_players_flip # If attacker is player one, keep flip &1dc0 4a LSR A &1dc1 90 02 BCC &1dc5 ; set_attacking_and_defending_players_flip &1dc3 09 02 ORA #&02 # Otherwise, swap bits ; set_attacking_and_defending_players_flip &1dc5 85 ae STA &ae ; attacking_and_defending_players_flip &1dc7 4c 40 27 JMP &2740 ; check_for_hit ; find_offset_of_move_in_list_of_moves # Called with A = move &1dca a0 16 LDY #&16 ; OFFSET_LAST_MOVE ; find_offset_of_move_in_list_of_moves_loop &1dcc d9 1c 1e CMP &1e1c,Y ; list_of_moves &1dcf f0 03 BEQ &1dd4 ; leave # Leave with Y = offset in list &1dd1 88 DEY &1dd2 10 f8 BPL &1dcc ; find_offset_of_move_in_list_of_moves_loop ; leave &1dd4 60 RTS ; populate_list_of_suitably_difficult_moves # Called with A zero to include offensive moves &1dd5 ce 8c 0d DEC &0d8c ; number_of_possible_moves # non-zero to exclude offensive moves &1dd8 8d 8d 0d STA &0d8d ; include_offensive_moves &1ddb ad 8f 0d LDA &0d8f ; computer_base_move_difficulty &1dde 8d 8b 0d STA &0d8b ; difficulty ; populate_list_of_suitably_difficult_moves_difficulty_loop &1de1 ae 8c 0d LDX &0d8c ; number_of_possible_moves # For each possible move in list, &1de4 a9 00 LDA #&00 &1de6 8d 8e 0d STA &0d8e ; number_of_suitably_difficult_moves ; populate_list_of_suitably_difficult_moves_loop &1de9 8a TXA &1dea 48 PHA ; offset &1deb bc 61 1e LDY &1e61,X ; list_of_possible_moves &1dee ae 8d 0d LDX &0d8d ; include_offensive_moves &1df1 f0 04 BEQ &1df7 ; skip_considering_offensiveness &1df3 c0 0a CPY #&0a ; OFFSET_FIRST_OFFENSIVE_MOVE &1df5 b0 12 BCS &1e09 ; consider_next_possible_move ; skip_considering_offensiveness &1df7 be 4a 1e LDX &1e4a,Y ; moves_difficulty_table &1dfa ec 8b 0d CPX &0d8b ; difficulty &1dfd b0 0a BCS &1e09 ; consider_next_possible_move # Is the move too difficult? &1dff 98 TYA &1e00 ac 8e 0d LDY &0d8e ; number_of_suitably_difficult_moves &1e03 99 6d 1e STA &1e6d,Y ; list_of_suitably_difficult_moves # If not, add to list &1e06 ee 8e 0d INC &0d8e ; number_of_suitably_difficult_moves ; consider_next_possible_move &1e09 68 PLA ; offset &1e0a aa TAX &1e0b ca DEX &1e0c 10 db BPL &1de9 ; populate_list_of_suitably_difficult_moves_loop &1e0e ae 8e 0d LDX &0d8e ; number_of_suitably_difficult_moves &1e11 d0 05 BNE &1e18 ; leave_setting_number_of_possible_moves # If no moves were added to list, &1e13 ee 8b 0d INC &0d8b ; difficulty # look for more difficult moves &1e16 d0 c9 BNE &1de1 ; populate_list_of_suitably_difficult_moves_difficulty_loop # Always branches ; leave_setting_number_of_possible_moves &1e18 8e 8c 0d STX &0d8c ; number_of_possible_moves &1e1b 60 RTS ; list_of_moves &1e1c 01 ; &00 : MOVE_JUMP &1e1d 04 ; &01 : MOVE_CROUCH &1e1e 24 ; &02 : MOVE_HIGH_BLOCK &1e1f 25 ; &03 : MOVE_LOW_BLOCK &1e20 02 ; &04 : MOVE_WALK_FORWARDS &1e21 08 ; &05 : MOVE_WALK_BACKWARDS &1e22 00 ; &06 : MOVE_NONE &1e23 09 ; &07 : MOVE_FORWARD_SOMERSAULT &1e24 0c ; &08 : MOVE_BACK_SOMERSAULT &1e25 04 ; &09 : MOVE_CROUCH &1e26 06 ; &0a : MOVE_CROUCHING_JAB # First offensive move &1e27 26 ; &0b : MOVE_STANDING_JAB &1e28 03 ; &0c : MOVE_HIGH_PUNCH &1e29 1c ; &0d : MOVE_BACKWARDS_SWEEP &1e2a 14 ; &0e : MOVE_FORWARD_SWEEP &1e2b 19 ; &0f : MOVE_HIGH_BACK_KICK &1e2c 16 ; &10 : MOVE_SHORT_JAB_KICK &1e2d 12 ; &11 : MOVE_MID_KICK &1e2e 13 ; &12 : MOVE_HIGH_KICK &1e2f 11 ; &13 : MOVE_FLYING_KICK &1e30 18 ; &14 : MOVE_ROUNDHOUSE &1e31 27 ; &15 : MOVE_CROUCHING_BLOCK &1e32 28 ; &16 : MOVE_ROUNDHOUSE_BLOCK # Move flags # ========== # 8....... (T) if set, player must be facing one another for defence to succeed # # ..2.8.2. (D) defending flags; bit set if player is vulnerable in position # ..2..... defending player is vulnerable at bottom # ....8... defending player is vulnerable at middle # ......2. defending player is vulnerable at top # # ...1.4.1 (A) attacking flags; bit set if move attacks position # ...1.... move attacks bottom # .....4.. move attacks middle # .......1 move attacks top # # If (D AND A) != 0, then attack is successful ; moves_flags 84218421 8 282 141 ; ; T DADADA T DDD AAA &1e33 02 ; MOVE_JUMP : 00000010 0 001 000 # vulnerable at top &1e34 28 ; MOVE_CROUCH : 00101000 0 110 000 # vulnerable at bottom and middle &1e35 a8 ; MOVE_HIGH_BLOCK : 10101000 1 110 000 # vulnerable at bottom and middle, top if not facing &1e36 a2 ; MOVE_LOW_BLOCK : 10100010 1 101 000 # vulnerable at bottom and top, middle if not facing &1e37 2a ; MOVE_WALK_FORWARDS : 00101010 0 111 000 # vulnerable at bottom, middle and top &1e38 2a ; MOVE_WALK_BACKWARDS : 00101010 0 111 000 # vulnerable at bottom, middle and top &1e39 2a ; MOVE_NONE : 00101010 0 111 000 # vulnerable at bottom, middle and top &1e3a 28 ; MOVE_FORWARD_SOMERSAULT : 00101000 0 110 000 # vulnerable at bottom and middle &1e3b 28 ; MOVE_BACK_SOMERSAULT : 00101000 0 110 000 # vulnerable at bottom and middle &1e3c a8 ; MOVE_CROUCH : 10101000 1 110 000 # vulnerable at bottom and middle, top if not facing &1e3d 2c ; MOVE_CROUCHING_JAB : 00101100 0 110 010 # attacks middle, vulnerable at bottom and middle &1e3e 2e ; MOVE_STANDING_JAB : 00101110 0 111 010 # attacks middle, vulnerable at bottom, middle and top &1e3f 2b ; MOVE_HIGH_PUNCH : 00101011 0 111 001 # attacks top, vulnerable at bottom, middle and top &1e40 2a ; MOVE_BACKWARDS_SWEEP : 00101010 0 111 000 # vulnerable at bottom, middle and top &1e41 38 ; MOVE_FORWARD_SWEEP : 00111000 0 110 100 # attacks bottom, vulnerable at bottom and middle &1e42 29 ; MOVE_HIGH_BACK_KICK : 00101001 0 110 001 # attacks top, vulnerable at bottom and middle &1e43 3a ; MOVE_SHORT_JAB_KICK : 00111010 0 111 100 # attacks bottom, vulnerable at bottom, middle and top &1e44 2c ; MOVE_MID_KICK : 00101100 0 110 010 # attacks middle, vulnerable at bottom and middle &1e45 29 ; MOVE_HIGH_KICK : 00101001 0 110 001 # attacks top, vulnerable at bottom and middle &1e46 03 ; MOVE_FLYING_KICK : 00000011 0 001 001 # attacks top, vulnerable at top &1e47 29 ; MOVE_ROUNDHOUSE : 00101001 0 110 001 # attacks top, vulnerable at bottom and middle &1e48 2c ; MOVE_CROUCHING_BLOCK : 00101100 0 110 010 # attacks middle, vulnerable at bottom and middle &1e49 2a ; MOVE_ROUNDHOUSE_BLOCK : 00101010 0 111 000 # vulnerable at bottom, middle and top ; moves_difficulty_table &1e4a 04 ; MOVE_JUMP &1e4b 01 ; MOVE_CROUCH &1e4c 01 ; MOVE_HIGH_BLOCK &1e4d 01 ; MOVE_LOW_BLOCK &1e4e 01 ; MOVE_WALK_FORWARDS &1e4f 01 ; MOVE_WALK_BACKWARDS &1e50 01 ; MOVE_NONE &1e51 03 ; MOVE_FORWARD_SOMERSAULT &1e52 03 ; MOVE_BACK_SOMERSAULT &1e53 01 ; MOVE_CROUCH &1e54 02 ; MOVE_CROUCHING_JAB &1e55 01 ; MOVE_STANDING_JAB &1e56 01 ; MOVE_HIGH_PUNCH &1e57 04 ; MOVE_BACKWARDS_SWEEP &1e58 04 ; MOVE_FORWARD_SWEEP &1e59 02 ; MOVE_HIGH_BACK_KICK &1e5a 01 ; MOVE_SHORT_JAB_KICK &1e5b 02 ; MOVE_MID_KICK &1e5c 03 ; MOVE_HIGH_KICK &1e5d 03 ; MOVE_FLYING_KICK &1e5e 04 ; MOVE_ROUNDHOUSE &1e5f 02 ; MOVE_CROUCHING_BLOCK &1e60 04 ; MOVE_ROUNDHOUSE_BLOCK ; list_of_possible_moves &1e61 00 00 00 00 00 00 00 00 00 00 00 00 ; list_of_suitably_difficult_moves &1e6d 00 00 00 00 00 00 00 00 00 00 00 00 ; unused # Source code fragment corresponding to &1bce - &1be5 &1e79 44 38 32 3a 43 4d 50 23 31 3a 42 45 51 6f 75 74 ; ... D82:CMP#1:BEQoutd &1e89 64 0d &1e8b 01 9a 07 2e 6a 75 0d ; 410.ju &1e92 01 a4 26 4c 44 41 26 44 38 34 3a 53 45 43 3a 53 ; 420LDA&D84:SEC:SBC&D89:BCCoks:LDY#&FF &1ea2 42 43 26 44 38 39 3a 42 43 43 6f 6b 73 3a 4c 44 &1eb2 59 23 26 46 46 0d &1eb8 01 ae 17 4c 44 41 26 44 38 39 3a 53 45 43 3a 53 ; 430LDA&D89:SEC:SBC&D84 &1ec8 42 43 26 44 38 34 0d &1ecf 01 ; entry_point_after_relocation &1ed0 a2 ff LDX #&ff &1ed2 9a TXS &1ed3 a0 0f LDY #&0f &1ed5 8c e6 0d STY &0de6 ; tune_needs_restarting # Set to positive non-zero to pause tune ng &1ed8 a9 00 LDA #&00 ; remove_roms_loop &1eda 99 a1 02 STA &02a1,Y ; os_paged_rom_type_table # Remove paged ROMs from ROM information table &1edd 88 DEY &1ede 10 fa BPL &1eda ; remove_roms_loop &1ee0 a9 40 LDA #&40 ; RTI &1ee2 8d 00 0d STA &0d00 ; nmi_handler &1ee5 a2 d8 LDX #&d8 ; &6fd8 = initial_packed_background_data &1ee7 a0 6f LDY #&6f &1ee9 20 15 10 JSR &1015 ; pack_or_unpack_background_data # Display initial background (outside) &1eec 20 3c 06 JSR &063c ; initialise_irq2_handler &1eef a9 0e LDA #&0e ; Enable event &1ef1 a2 04 LDX #&04 ; vsync event &1ef3 20 f4 ff JSR &fff4 ; OSBYTE &1ef6 20 d0 24 JSR &24d0 ; buffer_bottom_part_of_background &1ef9 a9 00 LDA #&00 &1efb 8d f9 0d STA &0df9 ; number_of_players # Set to zero to use one player game by default &1efe 8d fe 0d STA &0dfe ; players_input_type # Set to zero to use keyboard for player one by default &1f01 8d ff 0d STA &0dff ; players_input_type + 1 # Set to zero to use keyboard for player two by default &1f04 8d e2 0d STA &0de2 ; tune_suppressed # Set to zero to play tune by default &1f07 a9 16 LDA #&16 ; SKILL_DEMO # Set computer skill for demo &1f09 8d fb 0d STA &0dfb ; computer_skill ; start_demo &1f0c a9 03 LDA #&03 ; GAME_TYPE_DEMO &1f0e 8d fa 0d STA &0dfa ; game_type ; start_game &1f11 20 50 53 JSR &5350 ; reset_scores &1f14 a9 ff LDA #&ff &1f16 8d e6 0d STA &0de6 ; tune_needs_restarting # Set to negative to indicate tune needs restarting &1f19 a9 32 LDA #&32 ; 50 &1f1b 8d f5 0d STA &0df5 ; time_fraction &1f1e a9 03 LDA #&03 # Rounds are 30 seconds long &1f20 8d f6 0d STA &0df6 ; time_high &1f23 a9 00 LDA #&00 &1f25 8d f7 0d STA &0df7 ; time_low &1f28 a9 fe LDA #&fe &1f2a 8d f8 0d STA &0df8 ; suppress_timer # Set to &fe to suppress timer at start of round &1f2d a9 00 LDA #&00 &1f2f 8d e8 0d STA &0de8 ; demo_or_two_player_game_rounds &1f32 8d f4 0d STA &0df4 ; player_two_points &1f35 8d f0 0d STA &0df0 ; player_one_points &1f38 8d e7 0d STA &0de7 ; game_over # Set to zero to indicate not game over &1f3b ae fa 0d LDX &0dfa ; game_type &1f3e 4c 52 1f JMP &1f52 ; start_round_resetting_points ; start_round &1f41 ad fa 0d LDA &0dfa ; game_type &1f44 c9 03 CMP #&03 ; GAME_TYPE_DEMO &1f46 d0 03 BNE &1f4b ; skip_resetting_scores &1f48 20 50 53 JSR &5350 ; reset_scores ; skip_resetting_scores &1f4b ae fa 0d LDX &0dfa ; game_type &1f4e e0 01 CPX #&01 ; GAME_TYPE_ONE_PLAYER &1f50 f0 1f BEQ &1f71 ; skip_resetting_points ; start_round_resetting_points &1f52 a9 00 LDA #&00 &1f54 8d f4 0d STA &0df4 ; player_two_points &1f57 8d f0 0d STA &0df0 ; player_one_points &1f5a a0 3f LDY #&3f ; wipe_yin_yang_section_loop &1f5c 99 00 5d STA &5d00,Y &1f5f 99 40 5e STA &5e40,Y &1f62 99 00 5e STA &5e00,Y &1f65 99 40 5f STA &5f40,Y &1f68 88 DEY &1f69 10 f1 BPL &1f5c ; wipe_yin_yang_section_loop &1f6b 8a TXA &1f6c 29 03 AND #&03 # Clear GAME_TYPE_RESET_POINTS &1f6e 8d fa 0d STA &0dfa ; game_type ; skip_resetting_points &1f71 a9 00 LDA #&00 ; MOVE_NONE, MOVE_STATE_START &1f73 8d ec 0d STA &0dec ; players_blocking_move + 1 # Set to zero (MOVE_NONE) to indicate no blocking move &1f76 8d eb 0d STA &0deb ; players_blocking_move # Set to zero (MOVE_NONE) to indicate no blocking move &1f79 8d 00 01 STA &0100 ; round_over &1f7c 8d f9 54 STA &54f9 ; player_one_frame_timer &1f7f 8d f1 54 STA &54f1 ; player_two_frame_timer &1f82 8d fc 54 STA &54fc ; player_one_move_state # Set to zero (MOVE_STATE_START) to allow new move &1f85 8d f4 54 STA &54f4 ; player_two_move_state # Set to zero (MOVE_STATE_START) to allow new move &1f88 8d e1 0d STA &0de1 ; players_walking + 1 # Set to positive to indicate not walking &1f8b 8d e0 0d STA &0de0 ; players_walking # Set to positive to indicate not walking &1f8e a9 ff LDA #&ff ; MOVE_UNDEFINED &1f90 8d f2 54 STA &54f2 ; player_two_move &1f93 8d fa 54 STA &54fa ; player_one_move &1f96 a9 02 LDA #&02 &1f98 85 7e STA &7e ; players_flip # Set player one facing right, player two facing left &1f9a 8d 7e 01 STA &017e ; players_flip_for_movement_purposes &1f9d a9 76 LDA #&76 &1f9f 85 79 STA &79 ; player_one_screen_address_high &1fa1 85 73 STA &73 ; player_two_screen_address_high &1fa3 a9 a8 LDA #&a8 &1fa5 85 72 STA &72 ; player_two_screen_address_low &1fa7 a9 50 LDA #&50 &1fa9 85 78 STA &78 ; player_one_screen_address_low &1fab 20 a8 54 JSR &54a8 ; restore_bottom_part_of_background_and_wipe_play_area &1fae ad fb 0d LDA &0dfb ; computer_skill &1fb1 4a LSR A # In one player game, background alternates every dan &1fb2 ae fa 0d LDX &0dfa ; game_type &1fb5 e0 01 CPX #&01 ; GAME_TYPE_ONE_PLAYER &1fb7 f0 03 BEQ &1fbc ; set_background_type &1fb9 ad e8 0d LDA &0de8 ; demo_or_two_player_game_rounds # Otherwise, background alternates every round ; set_background_type &1fbc 29 01 AND #&01 &1fbe 49 01 EOR #&01 &1fc0 aa TAX &1fc1 20 98 0f JSR &0f98 ; plot_background &1fc4 a9 00 LDA #&00 &1fc6 a0 7f LDY #&7f ; wipe_right_of_status_section_loop &1fc8 99 00 78 STA &7800,Y &1fcb 88 DEY &1fcc 10 fa BPL &1fc8 ; wipe_right_of_status_section_loop &1fce 20 90 0b JSR &0b90 ; plot_computer_skill &1fd1 a9 00 LDA #&00 &1fd3 8d f8 0d STA &0df8 ; suppress_timer # Set to zero to update timer &1fd6 a9 13 LDA #&13 ; Wait for vertical retrace &1fd8 20 f4 ff JSR &fff4 ; OSBYTE &1fdb a9 fe LDA #&fe &1fdd 8d f8 0d STA &0df8 ; suppress_timer # Set to &fe to suppress timer at start of round &1fe0 a9 2c LDA #&2c ; MOVE_BOW_SIDEWAYS &1fe2 8d ea 0d STA &0dea ; player_two_involuntary_move &1fe5 8d e9 0d STA &0de9 ; player_one_involuntary_move &1fe8 a0 10 LDY #&10 &1fea 20 15 20 JSR &2015 ; update_game_for_Y_frames # Animate players bowing sideways at start of round &1fed a9 00 LDA #&00 ; MOVE_NONE &1fef 8d ea 0d STA &0dea ; player_two_involuntary_move &1ff2 8d e9 0d STA &0de9 ; player_one_involuntary_move &1ff5 8d f8 0d STA &0df8 ; suppress_timer # Set to zero to update timer ; main_game_loop &1ff8 20 20 20 JSR &2020 ; update_game &1ffb 20 00 09 JSR &0900 ; consider_end_of_game &1ffe ad 00 01 LDA &0100 ; round_over &2001 f0 f5 BEQ &1ff8 ; main_game_loop &2003 a9 fe LDA #&fe &2005 8d f8 0d STA &0df8 ; suppress_timer # Set to &fe to suppress timer at end of round &2008 ad e7 0d LDA &0de7 ; game_over # Negative if game over &200b d0 52 BNE &205f ; end_of_game &200d a0 1e LDY #&1e &200f 20 15 20 JSR &2015 ; update_game_for_Y_frames # Animate players at end of round &2012 4c 41 1f JMP &1f41 ; start_round ; update_game_for_Y_frames &2015 98 TYA &2016 48 PHA ; count &2017 20 20 20 JSR &2020 ; update_game &201a 68 PLA ; count &201b a8 TAY &201c 88 DEY &201d 10 f6 BPL &2015 ; update_game_for_Y_frames &201f 60 RTS ; update_game &2020 ad fa 0d LDA &0dfa ; game_type &2023 c9 03 CMP #&03 ; GAME_TYPE_DEMO &2025 d0 1f BNE &2046 ; not_demo &2027 20 40 0a JSR &0a40 ; check_for_mode_keypresses &202a ad e7 0d LDA &0de7 ; game_over # Negative if f0 was pressed to end demo &202d 10 2d BPL &205c ; to_update_players &202f 68 PLA # Remove update_game from stack &2030 68 PLA &2031 ae f9 0d LDX &0df9 ; number_of_players &2034 e8 INX &2035 8e fa 0d STX &0dfa ; game_type &2038 a9 16 LDA #&16 ; SKILL_DEMO # Don't display second player rank in two player game &203a e0 02 CPX #&02 ; GAME_TYPE_TWO_PLAYER &203c f0 02 BEQ &2040 ; set_computer_skill &203e a9 00 LDA #&00 ; SKILL_NOVICE ; set_computer_skill &2040 8d fb 0d STA &0dfb ; computer_skill &2043 4c 11 1f JMP &1f11 ; start_game ; not_demo &2046 20 6c 20 JSR &206c ; check_for_quitting # Returns one if f5 was pressed to quit game &2049 c9 01 CMP #&01 &204b d0 0f BNE &205c ; to_update_players &204d 68 PLA # Remove update_game from stack &204e 68 PLA &204f a9 03 LDA #&03 ; GAME_TYPE_DEMO &2051 8d fa 0d STA &0dfa ; game_type &2054 a9 16 LDA #&16 ; SKILL_DEMO # Set computer skill for demo &2056 8d fb 0d STA &0dfb ; computer_skill &2059 4c 11 1f JMP &1f11 ; start_game ; to_update_players &205c 4c 20 21 JMP &2120 ; update_players ; end_of_game &205f a0 1e LDY #&1e &2061 20 15 20 JSR &2015 ; update_game_for_Y_frames # Animate players at end of game &2064 a9 16 LDA #&16 ; SKILL_DEMO # Set computer skill for demo &2066 8d fb 0d STA &0dfb ; computer_skill &2069 4c 0c 1f JMP &1f0c ; start_demo ; check_for_quitting &206c a2 8b LDX #&8b ; f5 # f5 quits game &206e 4c a8 0a JMP &0aa8 ; check_for_keypress ; unused # &2071 - &20ad is similar to &202f - &206a &2071 68 PLA &2072 68 PLA &2073 ae f9 0d LDX &0df9 ; number_of_players &2076 e8 INX &2077 8e fa 0d STX &0dfa ; game_type &207a a9 16 LDA #&16 ; SKILL_DEMO &207c e0 02 CPX #&02 ; GAME_TYPE_TWO_PLAYER &207e f0 02 BEQ &2082 ; unused_set_computer_skill &2080 a9 00 LDA #&00 ; SKILL_NOVICE ; unused_set_computer_skill &2082 8d fb 0d STA &0dfb ; computer_skill &2085 4c 53 1f JMP &1f53 # &2043 4c 11 1f JMP &1f11 ; start_game ; unused_not_demo &2088 20 e7 20 JSR &20e7 ; unused_check_for_quitting # &2046 20 6c 20 JSR &206c ; check_for_quitting &208b c9 01 CMP #&01 &208d d0 0f BNE &209e ; to_update_players &208f 68 PLA &2090 68 PLA &2091 a9 03 LDA #&03 &2093 8d fa 0d STA &0dfa ; game_type &2096 a9 16 LDA #&16 ; SKILL_DEMO &2098 8d fb 0d STA &0dfb ; computer_skill &209b 4c 53 1f JMP &1f53 # &2059 4c 11 1f JMP &1f11 ; start_game ; to_update_players &209e 4c 20 21 JMP &2120 ; update_players &20a1 a0 1e LDY #&1e &20a3 20 57 20 JSR &2057 # &2061 20 15 20 JSR &2015 ; update_game_for_Y_frames &20a6 a9 16 LDA #&16 ; SKILL_DEMO &20a8 8d fb 0d STA &0dfb ; computer_skill &20ab 4c 4e 1f JMP &1f4e # &2069 4c 0c 1f JMP &1f0c ; start_demo ; unused &20ae 4c 2e 47 41 4d 45 31 0d ; "L.GAME1" &20b6 4c 2e 47 41 4d 45 35 0d ; "L.GAME5" &20be 4c 2e 47 41 4d 45 36 0d ; "L.GAME6" &20c6 4c 2e 47 41 4d 45 37 0d ; "L.GAME7" ; unused # &20ce - &20e6 is similar to &2d0e - &2d26 ; unused_poke_addresses_loop &20ce b9 ec 20 LDA &20ec,Y ; unused_addresses_and_data_to_poke # &2d0e b9 3f 2d LDA &2d3f,Y ; addresses_and_data_to_poke &20d1 8d e1 20 STA &20e1 ; unused_poke_address_low # &2d11 8d 21 2d STA &2d21 ; poke_address_low &20d4 b9 ed 20 LDA &20ed,Y ; unused_addresses_and_data_to_poke + 1 # &2d14 b9 40 2d LDA &2d40,Y ; addresses_and_data_to_poke + 1 &20d7 8d e2 20 STA &20e2 ; unused_poke_address_high # &2d17 8d 22 2d STA &2d22 ; poke_address_high &20da b9 ee 20 LDA &20ee,Y ; unused_addresses_and_data_to_poke + 2 # &2d1a b9 41 2d LDA &2d41,Y ; addresses_and_data_to_poke + 2 &20dd c8 INY &20de c8 INY &20df c8 INY &20e0 8d ff ff STA &ffff # actually STA unused_poke_address &20e3 ca DEX &20e4 d0 e8 BNE &20ce ; unused_poke_addresses_loop &20e6 60 RTS # &2d26 a9 0c LDA #&0c ; CLS ; unused_check_for_quitting # &20e7 - &20eb is a copy of &206c - &2070 &20e7 a2 8b LDX #&8b ; f5 &20e9 4c a8 0a JMP &0aa8 ; check_for_keypress ; unused_addresses_and_data_to_poke # &20ec - &2111 is a copy of &2d3f - &2d65 &20ec 20 02 20 &20ef 21 02 06 &20f2 00 fe 06 &20f5 01 fe 00 &20f8 50 03 00 &20fb 51 03 5d &20fe 4e 03 5d &2101 00 fe 0d &2104 01 fe 40 &2107 00 fe 07 &210a 01 fe 1f &210d 00 fe 08 &2110 01 fe c4 ; unused # &2113 - &211d is a copy of &2d5b - &2d65 &2113 fe 07 &2115 01 fe 1f &2118 00 fe 08 &211b 01 fe c4 ; unused # &211e - &211f is a copy of &2d64 - &2d65 &211e fe c4 ; update_players &2120 ee f9 54 INC &54f9 ; player_one_frame_timer &2123 ee f1 54 INC &54f1 ; player_two_frame_timer &2126 a9 00 LDA #&00 &2128 85 8a STA &8a ; perform_hit_check # Set to zero to skip hit check by default &212a 8d fc 0d STA &0dfc ; players_type # Set to positive to indicate player one human by default &212d 8d fd 0d STA &0dfd ; players_type + 1 # Set to positive to indicate player two human by default &2130 a2 ff LDX #&ff &2132 ad fa 0d LDA &0dfa ; game_type &2135 4a LSR A &2136 90 09 BCC &2141 ; update_player_one &2138 8e fd 0d STX &0dfd ; players_type + 1 # Set to negative to indicate player two computer in one player game or demo &213b 4a LSR A &213c 90 03 BCC &2141 ; update_player_one &213e 8e fc 0d STX &0dfc ; players_type # Set to negative to indicate player one computer in demo ; update_player_one &2141 a2 00 LDX #&00 &2143 a5 7e LDA &7e ; players_flip # &01 set if player one facing left &2145 4a LSR A &2146 90 02 BCC &214a ; set_player_direction_for_player_one &2148 a2 80 LDX #&80 ; set_player_direction_for_player_one &214a 8e ee 0d STX &0dee ; player_direction # Set to positive if facing right, negative if facing left &214d a2 01 LDX #&01 # Player one &214f 8e ed 0d STX &0ded ; scoring_player &2152 ca DEX ; 0 # Player one &2153 a9 bf LDA #&bf ; &04bf = player_one_keys &2155 20 00 04 JSR &0400 ; check_for_move # Returns Y = move &2158 ad e9 0d LDA &0de9 ; player_one_involuntary_move &215b f0 01 BEQ &215e ; not_involuntary_move_for_player_one # Non-zero if player one is making an involuntary move &215d a8 TAY ; not_involuntary_move_for_player_one &215e a2 04 LDX #&04 ; get_player_one_addresses_and_state_loop &2160 b5 75 LDA &75,X ; player_one_addresses - 1 # Use player one as this player &2162 95 85 STA &85,X ; this_player_addresses - 1 # 86, 87, 88, 89 &2164 bd f8 54 LDA &54f8,X ; player_one_state - 1 &2167 95 80 STA &80,X ; player_state - 1 # 81, 82, 83, 84 &2169 ca DEX &216a d0 f4 BNE &2160 ; get_player_one_addresses_and_state_loop &216c ad fd 54 LDA &54fd ; player_one_sprite &216f 85 85 STA &85 ; this_player_sprite &2171 a2 04 LDX #&04 # Unnecessary code ; get_player_one_addresses_and_state_again_loop # &2171 - &217e is a copy of &215e - &216b &2173 b5 75 LDA &75,X ; player_one_addresses - 1 &2175 95 85 STA &85,X ; this_player_addresses - 1 &2177 bd f8 54 LDA &54f8,X ; player_one_state - 1 &217a 95 80 STA &80,X ; player_state - 1 &217c ca DEX &217d d0 f4 BNE &2173 ; get_player_one_addresses_and_state_again_loop &217f ad f2 54 LDA &54f2 ; player_two_move # Use player two as other player &2182 85 8f STA &8f ; other_player_move &2184 ad f4 54 LDA &54f4 ; player_two_move_state &2187 85 a9 STA &a9 ; other_player_move_state &2189 20 9e 22 JSR &229e ; update_move &218c a5 82 LDA &82 ; this_player_move &218e 85 a8 STA &a8 ; attacking_player_move &2190 a5 85 LDA &85 ; this_player_sprite &2192 8d fd 54 STA &54fd ; player_one_sprite &2195 ad e9 0d LDA &0de9 ; player_one_involuntary_move &2198 d0 40 BNE &21da ; no_score_for_player_one # No score if either player is falling &219a ad ea 0d LDA &0dea ; player_two_involuntary_move &219d d0 3b BNE &21da ; no_score_for_player_one &219f a5 8a LDA &8a ; perform_hit_check # Non-zero if hit check should be performed &21a1 f0 37 BEQ &21da ; no_score_for_player_one &21a3 ad f5 54 LDA &54f5 ; player_two_sprite &21a6 85 a9 STA &a9 ; defending_player_sprite &21a8 a5 7e LDA &7e ; players_flip &21aa 85 ae STA &ae ; attacking_and_defending_players_flip &21ac a9 00 LDA #&00 &21ae 8d 00 01 STA &0100 ; points_for_hit # Set to zero to indicate no points by default &21b1 a5 72 LDA &72 ; player_two_screen_address_low &21b3 85 ac STA &ac ; defending_player_screen_address_low &21b5 a5 78 LDA &78 ; player_one_screen_address_low &21b7 85 aa STA &aa ; attacking_player_screen_address_low &21b9 20 40 27 JSR &2740 ; check_for_hit &21bc ad 00 01 LDA &0100 ; points_for_hit &21bf f0 19 BEQ &21da ; no_score_for_player_one &21c1 a2 00 LDX #&00 # Add to player one's points &21c3 20 20 05 JSR &0520 ; add_points_for_hit &21c6 20 5d 53 JSR &535d ; update_scores &21c9 a9 00 LDA #&00 ; MOVE_NONE, MOVE_STATE_START &21cb 8d ec 0d STA &0dec ; players_blocking_move + 1 # Set to zero (MOVE_NONE) to indicate no blocking move &21ce 8d f4 54 STA &54f4 ; player_two_move_state # Set to zero (MOVE_STATE_START) to allow new move &21d1 ad fa 54 LDA &54fa ; player_one_move &21d4 20 14 24 JSR &2414 ; get_fall_type # Returns Y = fall type &21d7 8c ea 0d STY &0dea ; player_two_involuntary_move # Set player two falling ; no_score_for_player_one &21da a2 04 LDX #&04 ; set_player_one_and_get_player_two_addresses_and_state_loop &21dc b5 85 LDA &85,X ; this_player_addresses - 1 &21de 95 75 STA &75,X ; player_one_addresses - 1 # Store changes to player one &21e0 b5 80 LDA &80,X ; player_state - 1 &21e2 9d f8 54 STA &54f8,X ; player_one_state - 1 &21e5 bd f0 54 LDA &54f0,X ; player_two_state - 1 # Use player two as this player &21e8 95 80 STA &80,X ; player_state - 1 # 81, 82, 83, 84 &21ea b5 6f LDA &6f,X ; player_two_addresses - 1 &21ec 95 85 STA &85,X ; this_player_addresses - 1 # 86, 87, 88, 89 &21ee ca DEX &21ef d0 eb BNE &21dc ; set_player_one_and_get_player_two_addresses_and_state_loop ; update_player_two &21f1 a2 00 LDX #&00 &21f3 86 8a STX &8a ; perform_hit_check # Set to zero to skip hit check by default &21f5 a5 7e LDA &7e ; players_flip # &02 set if player two facing left &21f7 4a LSR A &21f8 4a LSR A &21f9 90 02 BCC &21fd ; set_player_direction_for_player_two &21fb a2 80 LDX #&80 ; set_player_direction_for_player_two &21fd 8e ee 0d STX &0dee ; player_direction # Set to positive if facing right, negative if facing left &2200 ee ed 0d INC &0ded ; scoring_player ; 2 # Player two &2203 a2 01 LDX #&01 # Player two &2205 a9 c8 LDA #&c8 ; &0bc8 = player_two_keys &2207 20 00 04 JSR &0400 ; check_for_move # Returns Y = move &220a ad ea 0d LDA &0dea ; player_two_involuntary_move &220d f0 01 BEQ &2210 ; not_involuntary_move_for_player_two # Non-zero if player two is making an involuntary move &220f a8 TAY ; not_involuntary_move_for_player_two &2210 ad f5 54 LDA &54f5 ; player_two_sprite &2213 85 85 STA &85 ; this_player_sprite &2215 ad fa 54 LDA &54fa ; player_one_move # Use player one as other player &2218 85 8f STA &8f ; other_player_move &221a ad fc 54 LDA &54fc ; player_one_move_state &221d 85 a9 STA &a9 ; other_player_move_state &221f 20 9e 22 JSR &229e ; update_move &2222 a5 82 LDA &82 ; this_player_move &2224 85 a8 STA &a8 ; attacking_player_move &2226 ad ea 0d LDA &0dea ; player_two_involuntary_move &2229 d0 51 BNE &227c ; no_score_for_player_two # No score if either player is falling &222b ad e9 0d LDA &0de9 ; player_one_involuntary_move &222e d0 4c BNE &227c ; no_score_for_player_two &2230 a5 85 LDA &85 ; this_player_sprite &2232 8d f5 54 STA &54f5 ; player_two_sprite &2235 a5 8a LDA &8a ; perform_hit_check # Non-zero if hit check should be performed &2237 f0 43 BEQ &227c ; no_score_for_player_two &2239 ad fd 54 LDA &54fd ; player_one_sprite &223c 85 a9 STA &a9 ; defending_player_sprite &223e a5 7e LDA &7e ; players_flip &2240 4a LSR A # Swap bits &2241 90 02 BCC &2245 ; set_attacking_and_defending_players_flip &2243 09 02 ORA #&02 ; set_attacking_and_defending_players_flip &2245 85 ae STA &ae ; attacking_and_defending_players_flip &2247 a9 00 LDA #&00 &2249 8d 00 01 STA &0100 ; points_for_hit # Set to zero to indicate no points by default &224c a5 72 LDA &72 ; player_two_screen_address_low &224e 85 aa STA &aa ; attacking_player_screen_address_low &2250 a5 78 LDA &78 ; player_one_screen_address_low &2252 85 ac STA &ac ; defending_player_screen_address_low &2254 20 40 27 JSR &2740 ; check_for_hit &2257 ad 00 01 LDA &0100 ; points_for_hit &225a f0 20 BEQ &227c ; no_score_for_player_two &225c a2 04 LDX #&04 # Add to player two's points &225e 20 20 05 JSR &0520 ; add_points_for_hit &2261 ad fa 0d LDA &0dfa ; game_type &2264 c9 01 CMP #&01 ; GAME_TYPE_ONE_PLAYER &2266 f0 03 BEQ &226b ; skip_updating_score # Computer doesn't score in one player game &2268 20 5d 53 JSR &535d ; update_scores ; skip_updating_score &226b ad f2 54 LDA &54f2 ; player_two_move &226e 20 14 24 JSR &2414 ; get_fall_type # Returns Y = fall type &2271 8c e9 0d STY &0de9 ; player_one_involuntary_move # Set player one falling &2274 a9 00 LDA #&00 ; MOVE_NONE, MOVE_STATE_START &2276 8d fc 54 STA &54fc ; player_one_move_state # Set to zero (MOVE_STATE_START) to allow new move &2279 8d eb 0d STA &0deb ; players_blocking_move # Set to zero (MOVE_NONE) to indicate no blocking move ; no_score_for_player_two &227c a2 04 LDX #&04 ; set_player_two_state_loop &227e b5 85 LDA &85,X ; this_player_addresses - 1 &2280 95 6f STA &6f,X ; player_two_addresses - 1 # Store changes to player two &2282 b5 80 LDA &80,X ; player_state - 1 &2284 9d f0 54 STA &54f0,X ; player_two_state - 1 &2287 ca DEX &2288 d0 f4 BNE &227e ; set_player_two_state_loop &228a 4c f1 24 JMP &24f1 ; plot_players ; set_current_move_from_A &228d a8 TAY &228e 4c cc 22 JMP &22cc ; set_current_move_from_Y ; use_blocking_move_if_set &2291 bd ea 0d LDA &0dea,X ; players_blocking_move - 1 # Non-zero if player has a blocking move set &2294 f0 36 BEQ &22cc ; set_current_move_from_Y &2296 a8 TAY # If so, use that in place of move &2297 4c cc 22 JMP &22cc ; set_current_move_from_Y ; unused # Unused code &229a a8 TAY &229b 4c c9 22 JMP &22c9 ; update_move # Called with Y = player move &229e ae ed 0d LDX &0ded ; scoring_player &22a1 c0 08 CPY #&08 ; MOVE_WALK_BACKWARDS &22a3 f0 ec BEQ &2291 ; use_blocking_move_if_set # Use blocking move if set; returns to &22cc &22a5 c0 06 CPY #&06 ; MOVE_CROUCHING_JAB &22a7 f0 e8 BEQ &2291 ; use_blocking_move_if_set # Use blocking move if set; returns to &22cc &22a9 bd ea 0d LDA &0dea,X ; players_blocking_move - 1 &22ac c9 09 CMP #&09 ; MOVE_FORWARD_SOMERSAULT &22ae f0 dd BEQ &228d ; set_current_move_from_A # Continue previous forward somersault &22b0 c9 0c CMP #&0c ; MOVE_BACK_SOMERSAULT &22b2 f0 d9 BEQ &228d ; set_current_move_from_A # Continue previous back somersault &22b4 c9 28 CMP #&28 ; MOVE_ROUNDHOUSE_BLOCK &22b6 f0 d5 BEQ &228d ; set_current_move_from_A # Continue previous roundhouse block &22b8 a9 00 LDA #&00 ; MOVE_NONE # Clear blocking move by default &22ba c0 09 CPY #&09 ; MOVE_FORWARD_SOMERSAULT &22bc d0 01 BNE &22bf ; not_forward_somersault &22be 98 TYA # Use forward somersault as blocking move ; not_forward_somersault &22bf c0 0c CPY #&0c ; MOVE_BACK_SOMERSAULT &22c1 d0 01 BNE &22c4 ; not_back_somersault &22c3 98 TYA # Use back somersault as blocking move ; not_back_somersault &22c4 c0 28 CPY #&28 ; MOVE_ROUNDHOUSE_BLOCK &22c6 d0 01 BNE &22c9 ; not_roundhouse_block &22c8 98 TYA # Use roundhouse block as blocking move ; not_roundhouse_block &22c9 9d ea 0d STA &0dea,X ; players_blocking_move - 1 ; set_current_move_from_Y &22cc 84 80 STY &80 ; current_move # This is the move that is being or will be made, &22ce bd ea 0d LDA &0dea,X ; players_blocking_move - 1 # not necessarily the move the player wants to make &22d1 d0 07 BNE &22da ; not_crouching_to_block &22d3 c0 06 CPY #&06 ; MOVE_CROUCHING_JAB &22d5 d0 03 BNE &22da ; not_crouching_to_block &22d7 4c 7d 24 JMP &247d ; consider_crouching_or_standing_jab # Returns to &22cc, possibly setting Y ; not_crouching_to_block &22da a5 84 LDA &84 ; this_player_move_state &22dc d0 07 BNE &22e5 ; not_starting_move # Zero if MOVE_STATE_START, i.e. no move in progress or held ; is_starting_move &22de c0 08 CPY #&08 ; MOVE_WALK_BACKWARDS &22e0 d0 18 BNE &22fa ; skip_reversing_move &22e2 4c 48 24 JMP &2448 ; consider_setting_blocking_move # Returns to &22cc or &22fa ; not_starting_move &22e5 c9 02 CMP #&02 ; MOVE_STATE_REVERSE &22e7 f0 36 BEQ &231f ; consider_moving_to_next_frame # If move reversing, continue animating regardless &22e9 c4 82 CPY &82 ; this_player_move # Y = current_move &22eb f0 32 BEQ &231f ; consider_moving_to_next_frame # Otherwise, animate forward only if key still pressed &22ed ae ed 0d LDX &0ded ; scoring_player &22f0 bd df 0d LDA &0ddf,X ; players_walking - 1 # Negative if player is walking &22f3 30 05 BMI &22fa ; skip_reversing_move ; start_reversing_move &22f5 a9 02 LDA #&02 ; MOVE_STATE_REVERSE # If the player isn't walking, &22f7 4c 1d 23 JMP &231d ; set_move_state # start reversing move as soon as key released ; skip_reversing_move &22fa c4 82 CPY &82 ; this_player_move # Y = current_move &22fc f0 21 BEQ &231f ; consider_moving_to_next_frame ; consider_if_player_walking &22fe a9 00 LDA #&00 # Zero to indicate not walking by default &2300 c0 02 CPY #&02 ; MOVE_WALK_FORWARDS &2302 d0 02 BNE &2306 ; not_walking_forwards &2304 a9 ff LDA #&ff ; not_walking_forwards &2306 c0 08 CPY #&08 ; MOVE_WALK_BACKWARDS &2308 d0 02 BNE &230c ; not_walking_backwards &230a a9 ff LDA #&ff ; not_walking_backwards &230c ae ed 0d LDX &0ded ; scoring_player &230f 9d df 0d STA &0ddf,X ; players_walking - 1 # Set to negative if player walking &2312 84 82 STY &82 ; this_player_move # Use current move as player's move &2314 be 00 57 LDX &5700,Y ; move_to_frame_table &2317 86 83 STX &83 ; this_player_frame &2319 a9 01 LDA #&01 ; MOVE_STATE_FORWARD &231b 85 81 STA &81 ; this_player_frame_timer # Start move animating forwards ; set_move_state &231d 85 84 STA &84 ; this_player_move_state ; consider_moving_to_next_frame &231f a6 83 LDX &83 ; this_player_frame ; consider_moving_to_next_frame_from_X &2321 bd 00 55 LDA &5500,X ; frames_sprite_table &2324 30 08 BMI &232e ; move_to_next_frame_if_move_ongoing &2326 a5 81 LDA &81 ; this_player_frame_timer &2328 dd 00 56 CMP &5600,X ; frames_data_table &232b b0 01 BCS &232e ; move_to_next_frame_if_move_ongoing &232d 60 RTS ; move_to_next_frame_if_move_ongoing &232e a5 84 LDA &84 ; this_player_move_state &2330 c9 01 CMP #&01 ; MOVE_STATE_FORWARD &2332 d0 01 BNE &2335 ; skip_moving_to_next_frame &2334 e8 INX # Move to next frame of move ; skip_moving_to_next_frame &2335 c9 02 CMP #&02 ; MOVE_STATE_REVERSE &2337 d0 01 BNE &233a ; skip_moving_to_previous_frame &2339 ca DEX # Move to previous frame of move ; skip_moving_to_previous_frame &233a bd 00 55 LDA &5500,X ; frames_sprite_table &233d c9 ef CMP #&ef ; FRAME_PLAY_SOUND &233f d0 03 BNE &2344 ; not_frame_ef &2341 4c 88 24 JMP &2488 ; play_sound_for_fall ; not_frame_ef &2344 c9 f0 CMP #&f0 ; FRAME_HIT_CHECK &2346 d0 0a BNE &2352 ; not_frame_f0 ; is_frame_f0 # FRAME_HIT_CHECK &2348 a4 84 LDY &84 ; this_player_move_state &234a 88 DEY &234b d0 d4 BNE &2321 ; consider_moving_to_next_frame_from_X # If move isn't in reverse, &234d 85 8a STA &8a ; perform_hit_check # Set to non-zero to perform hit check &234f 4c 21 23 JMP &2321 ; consider_moving_to_next_frame_from_X ; not_frame_f0 &2352 c9 f8 CMP #&f8 ; FRAME_MOVE_ON_REVERSE &2354 f0 62 BEQ &23b8 ; is_frame_f8 &2356 c9 f9 CMP #&f9 ; FRAME_MOVE &2358 f0 64 BEQ &23be ; is_frame_f9 &235a c9 fa CMP #&fa ; FRAME_FLIP_ON_REVERSE &235c f0 41 BEQ &239f ; is_frame_fa &235e c9 fb CMP #&fb ; FRAME_FLIP &2360 f0 4c BEQ &23ae ; is_frame_fb &2362 c9 fc CMP #&fc ; FRAME_END_AS_REACHING_KICK &2364 f0 2e BEQ &2394 ; is_frame_fc &2366 c9 fd CMP #&fd ; FRAME_END_AND_RESTART &2368 f0 70 BEQ &23da ; is_frame_fd &236a c9 f4 CMP #&f4 ; FRAME_END_AND_STAND &236c d0 08 BNE &2376 ; not_frame_f4 ; is_frame_f4 # FRAME_END_AND_STAND &236e 20 e2 23 JSR &23e2 ; clear_blocking_move &2371 a0 00 LDY #&00 ; MOVE_NONE &2373 4c fe 22 JMP &22fe ; consider_if_player_walking ; not_frame_f4 &2376 c9 fe CMP #&fe ; FRAME_REVERSE &2378 f0 71 BEQ &23eb ; is_frame_fe &237a b0 72 BCS &23ee ; is_frame_ff ; set_frame # Otherwise, regular frame &237c 86 83 STX &83 ; this_player_frame ; set_sprite_from_frame &237e bd 00 55 LDA &5500,X ; frames_sprite_table &2381 85 85 STA &85 ; this_player_sprite &2383 0a ASL A &2384 a8 TAY &2385 b9 30 57 LDA &5730,Y ; sprite_addresses_table &2388 85 86 STA &86 ; this_player_sprite_address_low &238a b9 31 57 LDA &5731,Y ; sprite_addresses_table &238d 85 87 STA &87 ; this_player_sprite_address_high &238f a9 00 LDA #&00 &2391 85 81 STA &81 ; this_player_frame_timer &2393 60 RTS ; is_frame_fc # FRAME_END_AS_REACHING_KICK &2394 a2 95 LDX #&95 ; move_20_frames (MOVE_REACHING_KICK) + 3 # End move as though reaching kick, &2396 a9 03 LDA #&03 ; MOVE_STATE_END # i.e. don't reverse roundhouse &2398 85 84 STA &84 ; this_player_move_state &239a 85 8a STA &8a ; perform_hit_check # Set to non-zero to perform hit check &239c 4c 21 23 JMP &2321 ; consider_moving_to_next_frame_from_X ; is_frame_fa # FRAME_FLIP_ON_REVERSE &239f a5 84 LDA &84 ; this_player_move_state &23a1 c9 01 CMP #&01 ; MOVE_STATE_FORWARD &23a3 f0 10 BEQ &23b5 ; to_consider_moving_to_next_frame_from_X # If the move is in reverse, &23a5 ad 7e 01 LDA &017e ; players_flip_for_movement_purposes &23a8 4d ed 0d EOR &0ded ; scoring_player &23ab 8d 7e 01 STA &017e ; players_flip_for_movement_purposes ; is_frame_fb # FRAME_FLIP &23ae a5 7e LDA &7e ; players_flip &23b0 4d ed 0d EOR &0ded ; scoring_player # Flip player direction &23b3 85 7e STA &7e ; players_flip ; to_consider_moving_to_next_frame_from_X &23b5 4c 21 23 JMP &2321 ; consider_moving_to_next_frame_from_X ; is_frame_f8 # FRAME_MOVE_ON_REVERSE &23b8 a5 84 LDA &84 ; this_player_move_state &23ba c9 01 CMP #&01 ; MOVE_STATE_FORWARD &23bc f0 f7 BEQ &23b5 ; to_consider_moving_to_next_frame_from_X # If the move is in reverse, ; is_frame_f9 # FRAME_MOVE &23be bd 00 56 LDA &5600,X ; frames_data_table # Top bit unset to move forward, set to move backwards &23c1 4d ee 0d EOR &0dee ; player_direction &23c4 10 40 BPL &2406 ; move_player_right ; move_player_left &23c6 29 7f AND #&7f # Remaining bits set distance to move &23c8 8d ef 0d STA &0def ; screen_address_delta &23cb a5 88 LDA &88 ; this_player_screen_address_low &23cd 38 SEC &23ce ed ef 0d SBC &0def ; screen_address_delta &23d1 c5 88 CMP &88 ; this_player_screen_address_low &23d3 90 02 BCC &23d7 ; skip_floor &23d5 a9 00 LDA #&00 ; skip_floor &23d7 4c 0f 24 JMP &240f ; set_this_player_screen_address_low ; is_frame_fd # FRAME_END_AND_RESTART &23da 20 e2 23 JSR &23e2 ; clear_blocking_move &23dd a4 80 LDY &80 ; current_move # Allow move to be made again from start, &23df 4c fe 22 JMP &22fe ; consider_if_player_walking # without holding at end or reversing ; clear_blocking_move &23e2 ae ed 0d LDX &0ded ; scoring_player &23e5 a9 00 LDA #&00 ; MOVE_NONE &23e7 9d ea 0d STA &0dea,X ; players_blocking_move - 1 &23ea 60 RTS ; is_frame_fe # FRAME_REVERSE (&fe) &23eb 4c f5 22 JMP &22f5 ; start_reversing_move # Reverse move at end ; is_frame_ff # FRAME_END (&ff) &23ee a5 84 LDA &84 ; this_player_move_state &23f0 49 02 EOR #&02 ; MOVE_STATE_REVERSE &23f2 f0 07 BEQ &23fb ; at_start_of_move # If move state was MOVE_STATE_FORWARD (&01), ; at_end_of_move &23f4 85 84 STA &84 ; this_player_move_state # set move state to MOVE_STATE_END (&03) &23f6 a6 83 LDX &83 ; this_player_frame # i.e. hold move in end frame &23f8 4c 7e 23 JMP &237e ; set_sprite_from_frame # Use previous frame of move for sprite ; at_start_of_move &23fb 85 84 STA &84 ; this_player_move_state # set move state to MOVE_STATE_START (&00) &23fd a9 ff LDA #&ff # i.e. allow move to be repeated after being reversed &23ff 85 82 STA &82 ; this_player_move &2401 a4 80 LDY &80 ; current_move &2403 4c 9e 22 JMP &229e ; update_move ; move_player_right &2406 18 CLC &2407 65 88 ADC &88 ; this_player_screen_address_low &2409 c5 88 CMP &88 ; this_player_screen_address_low &240b b0 02 BCS &240f ; skip_overflow &240d a9 f8 LDA #&f8 ; skip_overflow ; set_this_player_screen_address_low &240f 85 88 STA &88 ; this_player_screen_address_low &2411 4c 21 23 JMP &2321 ; consider_moving_to_next_frame_from_X ; get_fall_type # Called with A = attacking move &2414 c9 19 CMP #&19 ; MOVE_HIGH_BACK_KICK &2416 d0 07 BNE &241f ; not_high_back_kick &2418 a5 7e LDA &7e ; players_flip &241a 49 01 EOR #&01 # High back kick strikes behind player &241c 4c 3c 24 JMP &243c ; consider_falling_forwards_or_backwards_A ; not_high_back_kick &241f c9 06 CMP #&06 ; MOVE_CROUCHING_JAB &2421 f0 0c BEQ &242f ; consider_falling_inwards &2423 c9 27 CMP #&27 ; MOVE_CROUCHING_BLOCK &2425 f0 08 BEQ &242f ; consider_falling_inwards &2427 c9 26 CMP #&26 ; MOVE_STANDING_JAB &2429 f0 04 BEQ &242f ; consider_falling_inwards &242b c9 12 CMP #&12 ; MOVE_MID_KICK &242d d0 0b BNE &243a ; consider_falling_forwards_or_backwards ; consider_falling_inwards &242f a5 7e LDA &7e ; players_flip &2431 f0 07 BEQ &243a ; consider_falling_forwards_or_backwards # Branch if both players facing right &2433 c9 03 CMP #&03 &2435 f0 03 BEQ &243a ; consider_falling_forwards_or_backwards # Branch if both players facing left &2437 a0 2a LDY #&2a ; MOVE_FALL_INWARDS &2439 60 RTS ; consider_falling_forwards_or_backwards &243a a5 7e LDA &7e ; players_flip ; consider_falling_forwards_or_backwards_A &243c f0 04 BEQ &2442 ; leave_with_fall_forwards # Branch if both players facing right &243e c9 03 CMP #&03 &2440 d0 03 BNE &2445 ; leave_with_fall_backwards # Branch if players facing different directions ; leave_with_fall_forwards &2442 a0 2b LDY #&2b ; MOVE_FALL_FORWARDS &2444 60 RTS ; leave_with_fall_backwards &2445 a0 29 LDY #&29 ; MOVE_FALL_BACKWARDS &2447 60 RTS ; consider_setting_blocking_move &2448 a5 a9 LDA &a9 ; other_player_move_state &244a c9 01 CMP #&01 ; MOVE_STATE_FORWARD &244c d0 1e BNE &246c ; skip_setting_block # If the other player's move is ongoing, &244e a5 8f LDA &8f ; other_player_move &2450 c9 03 CMP #&03 ; MOVE_HIGH_PUNCH &2452 f0 20 BEQ &2474 ; use_high_block &2454 c9 06 CMP #&06 ; MOVE_CROUCHING_JAB &2456 f0 17 BEQ &246f ; use_low_block &2458 c9 26 CMP #&26 ; MOVE_STANDING_JAB &245a f0 13 BEQ &246f ; use_low_block &245c c9 12 CMP #&12 ; MOVE_MID_KICK &245e f0 0f BEQ &246f ; use_low_block &2460 c9 11 CMP #&11 ; MOVE_FLYING_KICK &2462 f0 10 BEQ &2474 ; use_high_block &2464 c9 13 CMP #&13 ; MOVE_HIGH_KICK &2466 f0 0c BEQ &2474 ; use_high_block &2468 c9 18 CMP #&18 ; MOVE_ROUNDHOUSE &246a f0 08 BEQ &2474 ; use_high_block ; skip_setting_block &246c 4c fa 22 JMP &22fa ; skip_reversing_move ; use_low_block &246f a0 25 LDY #&25 ; MOVE_LOW_BLOCK &2471 4c 76 24 JMP &2476 ; set_blocking_move ; use_high_block &2474 a0 24 LDY #&24 ; MOVE_HIGH_BLOCK ; set_blocking_move &2476 98 TYA &2477 9d ea 0d STA &0dea,X ; players_blocking_move - 1 &247a 4c cc 22 JMP &22cc ; set_current_move_from_Y ; consider_crouching_or_standing_jab # If the player presses diagonally down and forward, &247d a5 82 LDA &82 ; this_player_move &247f c9 04 CMP #&04 ; MOVE_CROUCH # Is the player crouching? If so, use crouching jab &2481 f0 f3 BEQ &2476 ; set_blocking_move &2483 a0 26 LDY #&26 ; MOVE_STANDING_JAB # Otherwise, use standing jab &2485 4c 76 24 JMP &2476 ; set_blocking_move ; play_sound_for_fall # Called with X = frame &2488 8a TXA &2489 48 PHA ; tmp_x &248a bd 00 56 LDA &5600,X ; frames_data_table &248d 0a ASL A &248e 0a ASL A &248f a8 TAY &2490 a2 00 LDX #&00 ; copy_fall_sound_data &2492 b9 ad 24 LDA &24ad,Y ; fall_sound_data &2495 9d b9 24 STA &24b9,X ; fall_sound_block &2498 c8 INY &2499 e8 INX &249a e8 INX &249b e0 08 CPX #&08 &249d d0 f3 BNE &2492 ; copy_fall_sound_data &249f a2 b9 LDX #&b9 ; &24b9 = fall_sound_block &24a1 a0 24 LDY #&24 &24a3 a9 07 LDA #&07 ; Generate a sound &24a5 20 f1 ff JSR &fff1 ; OSWORD # Play sound for fall &24a8 68 PLA ; tmp_x &24a9 aa TAX &24aa 4c 21 23 JMP &2321 ; consider_moving_to_next_frame_from_X ; fall_sound_data ; c v p d &24ad 00 f1 04 01 ; &00 # Falling forwards or backwards &24b1 00 f1 04 02 ; &01 # Fallen forwards or backwards &24b5 00 f1 06 06 ; &02 # Falling inwards ; fall_sound_block ; chan vol pitch dur &24b9 00 00 00 00 00 00 00 00 ; unused &24c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; buffer_bottom_part_of_background &24d0 a9 00 LDA #&00 &24d2 85 90 STA &90 ; source_address_low &24d4 85 92 STA &92 ; target_address_low &24d6 a9 6c LDA #&6c ; &6c00 &24d8 85 91 STA &91 ; source_address_high &24da a9 58 LDA #&58 ; &5800 = background_buffer &24dc 85 93 STA &93 ; target_address_high &24de a2 02 LDX #&02 &24e0 a0 00 LDY #&00 ; buffer_bottom_part_of_background_loop # Copy &6c00 - &6eff to &5800 - &5aff &24e2 b1 90 LDA (&90),Y ; source_address &24e4 91 92 STA (&92),Y ; target_address &24e6 c8 INY &24e7 d0 f9 BNE &24e2 ; buffer_bottom_part_of_background &24e9 e6 91 INC &91 ; source_address_high &24eb e6 93 INC &93 ; target_address_high &24ed ca DEX &24ee 10 f2 BPL &24e2 ; buffer_bottom_part_of_background &24f0 60 RTS ; plot_players &24f1 a5 7e LDA &7e ; players_flip # &01 set if player one facing left (i.e. flipped) &24f3 4a LSR A &24f4 90 0a BCC &2500 ; use_unflipped_player_one ; use_flipped_player_one &24f6 a9 a8 LDA #&a8 ; TAY # If so, use flip tables for offsets &24f8 8d 3d 26 STA &263d ; prepare_player_one_flip_offset_op &24fb a9 bd LDA #&bd ; LDA &....,X # and values &24fd 4c 07 25 JMP &2507 ; set_prepare_player_one_flip_value_op ; use_unflipped_player_one &2500 a9 ea LDA #&ea ; NOP # Otherwise, use null operations &2502 8d 3d 26 STA &263d ; prepare_player_one_flip_offset_op &2505 a9 ae LDA #&ae ; LDX &.... ; set_prepare_player_one_flip_value_op &2507 8d 51 26 STA &2651 ; prepare_player_one_flip_value_op &250a a5 7e LDA &7e ; players_flip # &02 set if player two facing left (i.e. flipped) &250c 29 02 AND #&02 &250e f0 0a BEQ &251a ; use_unflipped_player_two ; use_flipped_player_two &2510 a9 a8 LDA #&a8 ; TAY # If so, use flip tables for offsets &2512 8d ea 25 STA &25ea ; prepare_player_two_flip_op &2515 a9 bd LDA #&bd ; LDA &....,X # and values &2517 4c 21 25 JMP &2521 ; set_prepare_player_two_flip_value_op ; use_unflipped_player_two &251a a9 ea LDA #&ea ; NOP # Otherwise, use null operations &251c 8d ea 25 STA &25ea ; prepare_player_two_flip_op &251f a9 ae LDA #&ae ; LDX &.... ; set_prepare_player_two_flip_value_op &2521 8d 00 26 STA &2600 ; prepare_player_two_flip_value_op &2524 a2 03 LDX #&03 ; backup_player_addresses_loop &2526 b5 70 LDA &70,X ; player_two_addresses # 70, 71, 72, 73 &2528 48 PHA ; player two address &2529 b5 76 LDA &76,X ; player_one_addresses # 76, 77, 78, 89 &252b 48 PHA ; player one address &252c ca DEX &252d 10 f7 BPL &2526 ; backup_player_addresses_loop &252f a9 5a LDA #&5a ; &5a80 = players_buffer &2531 85 91 STA &91 ; player_two_buffer_address_high &2533 85 93 STA &93 ; player_one_buffer_address_high &2535 a5 72 LDA &72 ; player_two_screen_address_low &2537 18 CLC &2538 69 80 ADC #&80 &253a 85 90 STA &90 ; player_one_buffer_address_high &253c a5 91 LDA &91 ; player_two_buffer_address_high &253e 69 00 ADC #&00 &2540 85 91 STA &91 ; player_two_buffer_address_high &2542 a5 78 LDA &78 ; player_one_screen_address_low &2544 18 CLC &2545 69 80 ADC #&80 &2547 85 92 STA &92 ; player_one_buffer_address_low &2549 a5 93 LDA &93 ; player_one_buffer_address_high &254b 69 00 ADC #&00 &254d 85 93 STA &93 ; player_one_buffer_address_high &254f a2 02 LDX #&02 &2551 a0 00 LDY #&00 ; set_players_sprite_sizes_loop &2553 b1 70 LDA (&70),Y ; player_two_sprite_address # Get three bytes of sprite data &2555 9d e0 54 STA &54e0,X ; player_two_sprite_min_x # for max_x, top_group and min_x &2558 e6 70 INC &70 ; player_two_sprite_address_low &255a d0 02 BNE &255e ; skip_page_two &255c e6 71 INC &71 ; player_two_sprite_address_high ; skip_page_two &255e b1 76 LDA (&76),Y ; player_two_sprite_address_low # Get three bytes of sprite data &2560 9d e4 54 STA &54e4,X ; player_one_sprite_min_x # for max_x, top_group and min_x &2563 e6 76 INC &76 ; player_one_sprite_address_low &2565 d0 02 BNE &2569 ; skip_page_one &2567 e6 77 INC &77 ; player_one_sprite_address_high ; skip_page_one &2569 ca DEX &256a 10 e7 BPL &2553 ; set_players_sprite_sizes_loop &256c ad e6 54 LDA &54e6 ; player_one_sprite_max_x &256f 38 SEC &2570 ed e4 54 SBC &54e4 ; player_one_sprite_min_x &2573 8d e7 54 STA &54e7 ; player_one_sprite_width &2576 ad e2 54 LDA &54e2 ; player_two_sprite_max_x &2579 38 SEC &257a ed e0 54 SBC &54e0 ; player_two_sprite_min_x &257d 8d e3 54 STA &54e3 ; player_two_sprite_width &2580 a9 13 LDA #&13 ; Wait for vertical retrace &2582 20 f4 ff JSR &fff4 ; OSBYTE &2585 a0 10 LDY #&10 ; delay_outer_loop &2587 a2 00 LDX #&00 ; delay_inner_loop &2589 ca DEX &258a d0 fd BNE &2589 ; delay_inner_loop &258c 88 DEY &258d d0 f8 BNE &2587 ; delay_outer_loop &258f a2 08 LDX #&08 ; plot_players_group_loop &2591 8a TXA &2592 48 PHA ; groups remaining &2593 a9 00 LDA #&00 &2595 a0 47 LDY #&47 ; wipe_player_buffers_loop &2597 91 90 STA (&90),Y ; player_two_buffer_address &2599 91 92 STA (&92),Y ; player_one_buffer_address &259b 88 DEY &259c 10 f9 BPL &2597 ; wipe_player_buffers_loop &259e e0 02 CPX #&02 &25a0 b0 2c BCS &25ce ; skip_adding_background_to_player_buffer &25a2 8a TXA ; groups remaining &25a3 0a ASL A &25a4 a8 TAY &25a5 b9 de 26 LDA &26de,Y ; background_buffer_addresses_table &25a8 8d be 25 STA &25be ; background_left_address_address_low &25ab 69 a0 ADC #&a0 &25ad 8d c4 25 STA &25c4 ; background_right_address_address_low &25b0 b9 df 26 LDA &26df,Y ; background_buffer_addresses_table + 1 &25b3 8d bf 25 STA &25bf ; background_left_address_address_high &25b6 69 00 ADC #&00 &25b8 8d c5 25 STA &25c5 ; background_right_address_address_high &25bb a0 9f LDY #&9f ; copy_background_loop &25bd b9 00 58 LDA &5800,Y # actually LDA background_left_address_address,Y &25c0 99 80 5a STA &5a80,Y ; players_buffer &25c3 b9 a0 58 LDA &58a0,Y # actually LDA two_address,Y &25c6 99 20 5b STA &5b20,Y ; players_buffer + &a0 &25c9 88 DEY &25ca c0 ff CPY #&ff &25cc d0 ef BNE &25bd ; copy_background_loop ; skip_adding_background_to_player_buffer &25ce ec e1 54 CPX &54e1 ; player_two_top_group &25d1 90 4b BCC &261e ; skip_player_two_group # Does player two need to be plotted in this group? &25d3 a0 47 LDY #&47 &25d5 a5 70 LDA &70 ; player_two_sprite_address_low &25d7 48 PHA ; player_two_sprite_address_low &25d8 38 SEC &25d9 ed e0 54 SBC &54e0 ; player_two_sprite_min_x &25dc 85 70 STA &70 ; player_two_sprite_address_low &25de a5 71 LDA &71 ; player_two_sprite_address_high &25e0 48 PHA ; player_two_sprite_address_high &25e1 e9 00 SBC #&00 &25e3 85 71 STA &71 ; player_two_sprite_address_high ; prepare_player_two_buffer_loop &25e5 84 7c STY &7c ; offset &25e7 b9 b0 57 LDA &57b0,Y ; offset_flip_table ; prepare_player_two_flip_op &25ea ea NOP # also TAY if player two flipped &25eb b1 70 LDA (&70),Y ; player_two_sprite_address &25ed cc e2 54 CPY &54e2 ; player_two_sprite_max_x &25f0 90 02 BCC &25f4 ; skip_clipping_player_two_to_right &25f2 a9 00 LDA #&00 # Set to zero to clip to right ; skip_clipping_player_two_to_right &25f4 cc e0 54 CPY &54e0 ; player_two_sprite_min_x &25f7 b0 02 BCS &25fb ; skip_clipping_player_two_to_left &25f9 a9 00 LDA #&00 # Set to zero to clip to left ; skip_clipping_player_two_to_left &25fb a4 7c LDY &7c ; offset &25fd aa TAX &25fe f0 15 BEQ &2615 ; skip_player_two_byte # Branch if byte is zero, i.e. nothing to plot ; prepare_player_two_flip_value_op &2600 ae e0 06 LDX &06e0 ; flip_table # also LDA &06e0,X ; flip_table if player two flipped &2603 85 7d STA &7d ; sprite_byte &2605 0a ASL A # 00 01 10 11 : C B Y K &2606 0a ASL A # 00 10 00 10 &2607 0a ASL A &2608 0a ASL A &2609 05 7d ORA &7d ; sprite_byte # 00 11 10 11 ; C K Y K &260b 85 7d STA &7d ; sprite_byte # i.e. replace colour 1 (blue) with colour 3 (black) &260d aa TAX &260e b1 90 LDA (&90),Y ; player_two_buffer_address &2610 20 c2 26 JSR &26c2 ; apply_mask &2613 91 90 STA (&90),Y ; player_two_buffer_address # Plot player two to buffer ; skip_player_two_byte &2615 88 DEY &2616 10 cd BPL &25e5 ; prepare_player_two_buffer_loop &2618 68 PLA ; player_two_sprite_address_high &2619 85 71 STA &71 ; player_two_sprite_address_high &261b 68 PLA ; player_two_sprite_address_low &261c 85 70 STA &70 ; player_two_sprite_address_low ; skip_player_two_group &261e 68 PLA ; groups remaining &261f aa TAX &2620 48 PHA ; groups remaining &2621 ec e5 54 CPX &54e5 ; player_one_top_group &2624 90 43 BCC &2669 ; skip_player_one_group # Does player one need to be plotted in this group? ; prepare_player_one_buffer &2626 a0 47 LDY #&47 &2628 a5 76 LDA &76 ; player_one_sprite_address_low &262a 48 PHA ; player_one_sprite_address_low &262b 38 SEC &262c ed e4 54 SBC &54e4 ; player_one_sprite_min_x &262f 85 76 STA &76 ; player_one_sprite_address_low &2631 a5 77 LDA &77 ; player_one_sprite_address_high &2633 48 PHA ; player_one_sprite_address_high &2634 e9 00 SBC #&00 &2636 85 77 STA &77 ; player_one_sprite_address_high ; prepare_player_one_buffer_loop &2638 84 7c STY &7c ; offset &263a b9 b0 57 LDA &57b0,Y ; offset_flip_table ; prepare_player_one_flip_offset_op &263d ea NOP # also TAY if player one flipped &263e b1 76 LDA (&76),Y ; player_one_sprite_address &2640 cc e6 54 CPY &54e6 ; player_one_sprite_max_x &2643 90 02 BCC &2647 ; skip_clipping_player_one_to_right &2645 a9 00 LDA #&00 # Set to zero to clip to right ; skip_clipping_player_one_to_right &2647 cc e4 54 CPY &54e4 ; player_one_sprite_min_x &264a b0 02 BCS &264e ; skip_clipping_player_one_to_left &264c a9 00 LDA #&00 # Set to zero to clip to left ; skip_clipping_player_one_to_left &264e a4 7c LDY &7c ; offset &2650 aa TAX ; prepare_player_one_flip_value_op &2651 ae e0 06 LDX &06e0 ; flip_table # also LDA &06e0,X ; flip_table if player one flipped &2654 aa TAX &2655 f0 09 BEQ &2660 ; skip_player_one_byte # Branch if byte is zero, i.e. nothing to plot &2657 86 7d STX &7d ; sprite_byte &2659 b1 92 LDA (&92),Y ; player_one_buffer_address &265b 20 c2 26 JSR &26c2 ; apply_mask &265e 91 92 STA (&92),Y ; player_one_buffer_address # Plot player one to buffer ; skip_player_one_byte &2660 88 DEY &2661 10 d5 BPL &2638 ; prepare_player_one_buffer_loop &2663 68 PLA ; player_one_sprite_address_high &2664 85 77 STA &77 ; player_one_sprite_address_high &2666 68 PLA ; player_one_sprite_address_low &2667 85 76 STA &76 ; player_one_sprite_address_low ; skip_player_one_group &2669 a0 47 LDY #&47 ; plot_players_byte_loop &266b b1 90 LDA (&90),Y ; player_two_buffer_address &266d 91 72 STA (&72),Y ; player_two_screen_address # Plot player two buffer to screen &266f b1 92 LDA (&92),Y ; player_one_buffer_address &2671 91 78 STA (&78),Y ; player_one_screen_address # Plot player one buffer to screen &2673 88 DEY &2674 10 f5 BPL &266b ; plot_players_byte_loop &2676 a5 72 LDA &72 ; player_two_screen_address_low &2678 38 SEC &2679 e9 40 SBC #&40 # Move up a group &267b 85 72 STA &72 ; player_two_screen_address_low &267d a5 73 LDA &73 ; player_two_screen_address_high &267f e9 01 SBC #&01 &2681 85 73 STA &73 ; player_two_screen_address_high &2683 a5 78 LDA &78 ; player_one_screen_address_low &2685 38 SEC &2686 e9 40 SBC #&40 # Move up a group &2688 85 78 STA &78 ; player_one_screen_address_low &268a a5 79 LDA &79 ; player_one_screen_address_high &268c e9 01 SBC #&01 &268e 85 79 STA &79 ; player_one_screen_address_high &2690 18 CLC &2691 a5 70 LDA &70 ; player_two_sprite_address_low &2693 6d e3 54 ADC &54e3 ; player_two_sprite_width &2696 85 70 STA &70 ; player_two_sprite_address_low &2698 a5 71 LDA &71 ; player_two_sprite_address_high &269a 69 00 ADC #&00 &269c 85 71 STA &71 ; player_two_sprite_address_high &269e 18 CLC &269f a5 76 LDA &76 ; player_one_sprite_address_low &26a1 6d e7 54 ADC &54e7 ; player_one_sprite_width &26a4 85 76 STA &76 ; player_one_sprite_address_low &26a6 a5 77 LDA &77 ; player_one_sprite_address_high &26a8 69 00 ADC #&00 &26aa 85 77 STA &77 ; player_one_sprite_address_high &26ac 68 PLA ; groups remaining &26ad aa TAX &26ae ca DEX &26af 30 03 BMI &26b4 ; restore_player_addresses &26b1 4c 91 25 JMP &2591 ; plot_players_group_loop ; restore_player_addresses &26b4 a2 00 LDX #&00 ; restore_player_addresses_loop &26b6 68 PLA ; player one address &26b7 95 76 STA &76,X ; player_one_addresses # 76, 77, 78, 89 &26b9 68 PLA ; player two address &26ba 95 70 STA &70,X ; player_two_addresses # 70, 71, 72, 73 &26bc e8 INX &26bd e0 04 CPX #&04 &26bf d0 f5 BNE &26b6 ; restore_player_addresses_loop &26c1 60 RTS ; apply_mask # Called with X = sprite_byte, A = background_byte &26c2 86 7c STX &7c ; mask_byte &26c4 85 7f STA &7f ; background_byte &26c6 f0 13 BEQ &26db ; skip_calculating_mask &26c8 8a TXA &26c9 4a LSR A # Move colour 2 into low nibble &26ca 4a LSR A &26cb 4a LSR A &26cc 4a LSR A &26cd 05 7c ORA &7c ; mask_byte # Low nibble bits set if any colour &26cf 85 7c STA &7c ; mask_byte &26d1 0a ASL A # Move colour 1 into high nibble &26d2 0a ASL A &26d3 0a ASL A &26d4 0a ASL A &26d5 05 7c ORA &7c ; mask_byte # High nibble bits set if any colour &26d7 49 ff EOR #&ff # Invert, so both bits for pixel clear if any colour &26d9 25 7f AND &7f ; background_byte ; skip_calculating_mask &26db 05 7d ORA &7d ; sprite_byte &26dd 60 RTS ; background_buffer_addresses_table &26de 00 58 ; &5800 = background_buffer &26e0 40 59 ; &5940 = background_buffer + &140 ; unused # &26e2 - &2717 is similar to &2685 - &26c1 &26e2 38 SEC &26e3 e9 40 SBC #&40 &26e5 85 78 STA &78 ; player_one_screen_address_low &26e7 a5 79 LDA &79 ; player_one_screen_address_high &26e9 e9 01 SBC #&01 &26eb 85 79 STA &79 ; player_one_screen_address_high &26ed a5 70 LDA &70 ; player_two_sprite_address_low &26ef 18 CLC # &2693 6d e3 54 ADC &54e3 ; player_two_sprite_width &26f0 69 48 ADC #&48 # &26f2 85 70 STA &70 ; player_two_sprite_address_low &26f4 a5 71 LDA &71 ; player_two_sprite_address_high &26f6 69 00 ADC #&00 &26f8 85 71 STA &71 ; player_two_sprite_address_high &26fa a5 76 LDA &76 ; player_one_sprite_address_low # &269e 18 CLC &26fc 18 CLC # &269f a5 76 LDA &76 ; player_one_sprite_address_low &26fd 69 48 ADC #&48 # &26a1 6d e7 54 ADC &54e7 ; player_one_sprite_width &26ff 85 76 STA &76 ; player_one_sprite_address_low &2701 a5 77 LDA &77 ; player_one_sprite_address_high &2703 69 00 ADC #&00 &2705 85 77 STA &77 ; player_one_sprite_address_high # &26ac - &26ad missing &2707 ca DEX &2708 10 bc BPL &26c6 # &26af 30 03 BMI &26b4 ; restore_player_addresses ; unused_restore_player_addresses # &26b1 - &26b3 missing &270a a2 00 LDX #&00 ; unused_restore_player_addresses_loop &270c 68 PLA ; player one address &270d 95 76 STA &76,X ; player_one_addresses &270f 68 PLA ; player two address &2710 95 70 STA &70,X ; player_two_addresses &2712 e8 INX &2713 e0 04 CPX #&04 &2715 d0 f5 BNE &270c ; unused_restore_player_addresses_loop &2717 60 RTS ; unused # &2718 - &2733 is a copy of &26c2 - &26dd (apply_mask) &2718 86 7c STX &7c ; mask_byte &271a 85 7f STA &7f ; background_byte &271c f0 13 BEQ &2731 ; unused_skip_calculating_mask &271e 8a TXA &271f 4a LSR A &2720 4a LSR A &2721 4a LSR A &2722 4a LSR A &2723 05 7c ORA &7c ; mask_byte &2725 85 7c STA &7c ; mask_byte &2727 0a ASL A &2728 0a ASL A &2729 0a ASL A &272a 0a ASL A &272b 05 7c ORA &7c ; mask_byte &272d 49 ff EOR #&ff &272f 25 7f AND &7f ; background_byte ; unused_skip_calculating_mask &2731 05 7d ORA &7d ; sprite_byte &2733 60 RTS ; unused # &2734 - &2737 is a copy of &26de - &26e1 &2734 00 58 ; &5800 &2736 40 59 ; &5940 &2738 80 5a ; &5a80 # Extra row would be third group of background ; unused &273a 00 00 00 00 00 00 ; check_for_hit &2740 a0 0a LDY #&0a ; NUMBER_OF_OFFENSIVE_MOVES - 1 &2742 a5 a8 LDA &a8 ; attacking_player_move &2744 c9 27 CMP #&27 ; MOVE_CROUCHING_BLOCK &2746 d0 02 BNE &274a ; not_crouching_block &2748 a9 06 LDA #&06 ; MOVE_CROUCHING_JAB # Treat crouching block as crouching jab ; not_crouching_block &274a c9 16 CMP #&16 ; MOVE_SHORT_JAB_KICK &274c d0 0e BNE &275c ; check_if_move_is_offensive_loop &274e a6 a9 LDX &a9 ; defending_player_sprite &2750 e0 0d CPX #&0d ; SPRITE_LOW_BLOCK &2752 d0 08 BNE &275c ; check_if_move_is_offensive_loop # Short jab kick blocked by low block if players facing &2754 a6 ae LDX &ae ; attacking_and_defending_players_flip &2756 f0 04 BEQ &275c ; check_if_move_is_offensive_loop # Branch if both players facing right &2758 c9 03 CMP #&03 &275a d0 08 BNE &2764 ; leave # Leave if both players not facing left ; check_if_move_is_offensive_loop &275c d9 00 54 CMP &5400,Y ; offensive_moves &275f f0 04 BEQ &2765 ; is_offensive_move &2761 88 DEY &2762 10 f8 BPL &275c ; check_if_move_is_offensive_loop ; leave &2764 60 RTS ; is_offensive_move &2765 8c 01 01 STY &0101 ; offensive_move_offset &2768 be 16 54 LDX &5416,Y ; offensive_moves_partial_hit_distances &276b 86 af STX &af ; partial_hit_distance &276d a5 ae LDA &ae ; attacking_and_defending_players_flip &276f be 0b 54 LDX &540b,Y ; offensive_moves_flags # 8....... set if move attacks backwards &2772 10 04 BPL &2778 ; not_backwards_attack &2774 49 01 EOR #&01 &2776 85 ae STA &ae ; attacking_and_defending_players_flip ; not_backwards_attack &2778 8a TXA &2779 29 0f AND #&0f # ....8421 specified full hit distance base in groups &277b 0a ASL A &277c 0a ASL A &277d 0a ASL A # ....8421 -> .8421... i.e. convert to bytes &277e 85 8f STA &8f ; full_hit_distance &2780 8a TXA &2781 29 60 AND #&60 # .42..... determines which distance table to use &2783 85 8e STA &8e ; which_distance_table &2785 4a LSR A &2786 4a LSR A &2787 05 8e ORA &8e ; which_distance_table # .42..... -> .4242... i.e. multiply by forty &2789 18 CLC &278a 65 a9 ADC &a9 ; defending_player_sprite &278c aa TAX &278d bd 30 54 LDA &5430,X ; attack_distances_tables &2790 a4 ae LDY &ae ; attacking_and_defending_players_flip &2792 c0 03 CPY #&03 &2794 f0 04 BEQ &279a ; is_facing_same_direction # Branch if both players facing left &2796 a4 ae LDY &ae ; attacking_and_defending_players_flip &2798 d0 0a BNE &27a4 ; is_facing_opposite_direction # Branch if either player not facing right ; is_facing_same_direction &279a 29 f0 AND #&f0 # 8421.... sets distance when facing same direction &279c c9 f0 CMP #&f0 &279e f0 4a BEQ &27ea ; leave_with_no_hit &27a0 4a LSR A # 8421.... -> .8421... i.e. convert to bytes &27a1 4c ad 27 JMP &27ad ; calculate_full_hit_distance ; is_facing_opposite_direction &27a4 29 0f AND #&0f # ....8421 sets distance when facing opposite directions &27a6 c9 0f CMP #&0f &27a8 f0 40 BEQ &27ea ; leave_with_no_hit &27aa 0a ASL A &27ab 0a ASL A &27ac 0a ASL A # ....8421 -> .8421... i.e. convert to bytes ; calculate_full_hit_distance &27ad 18 CLC &27ae 65 8f ADC &8f ; full_hit_distance &27b0 85 8f STA &8f ; full_hit_distance &27b2 a9 48 LDA #&48 ; 9 * 8 &27b4 38 SEC &27b5 e5 8f SBC &8f ; full_hit_distance &27b7 85 8f STA &8f ; full_hit_distance &27b9 a5 ac LDA &ac ; defending_player_screen_address_low &27bb c5 aa CMP &aa ; attacking_player_screen_address_low &27bd 90 37 BCC &27f6 ; is_right_of_other_player ; is_left_of_other_player &27bf 38 SEC &27c0 e5 aa SBC &aa ; attacking_player_screen_address_low ; compare_player_positions &27c2 c9 80 CMP #&80 &27c4 b0 24 BCS &27ea ; leave_with_no_hit # No hit if attacking player beyond defending player &27c6 46 ae LSR &ae ; attacking_and_defending_players_flip &27c8 b0 08 BCS &27d2 ; is_facing_left ; is_facing_right &27ca a5 ac LDA &ac ; defending_player_screen_address_low &27cc 38 SEC &27cd e5 aa SBC &aa ; attacking_player_screen_address_low &27cf 4c d7 27 JMP &27d7 ; consider_distance_between_players ; is_facing_left &27d2 a5 aa LDA &aa ; attacking_player_screen_address_low &27d4 38 SEC &27d5 e5 ac SBC &ac ; defending_player_screen_address_low ; consider_distance_between_players &27d7 85 8e STA &8e ; distance_between_players &27d9 a5 8f LDA &8f ; full_hit_distance &27db 38 SEC &27dc e5 8e SBC &8e ; distance_between_players &27de f0 10 BEQ &27f0 ; leave_with_full_hit # Full hit if attacking at exactly the right position &27e0 c5 af CMP &af ; partial_hit_distance &27e2 b0 06 BCS &27ea ; leave_with_no_hit ; leave_with_partial_hit # Partial hit if attacking within range &27e4 a9 01 LDA #&01 # One point for partial hit &27e6 8d 00 01 STA &0100 ; points_for_hit &27e9 60 RTS ; leave_with_no_hit &27ea a9 00 LDA #&00 &27ec 8d 00 01 STA &0100 ; points_for_hit &27ef 60 RTS ; leave_with_full_hit &27f0 a9 02 LDA #&02 # Two points for full hit &27f2 8d 00 01 STA &0100 ; points_for_hit &27f5 60 RTS ; is_right_of_other_player &27f6 a5 aa LDA &aa ; attacking_player_screen_address_low &27f8 38 SEC &27f9 e5 ac SBC &ac ; defending_player_screen_address_low &27fb 4c c2 27 JMP &27c2 ; compare_player_positions ; unused &27fe 00 00 ; sprite_00_data (SPRITE_STANDING) &2800 30 02 00 ; min_x = &00, max_x = &30, top_group = &02 &2803 03 03 03 03 73 f0 f0 f1 0c 0c 59 b3 7f ff ee 00 &2813 77 ff ff ff ff 99 00 00 00 cc ff ff ff ff 00 00 &2823 0f 07 07 8f cf fc fe 32 00 88 4c 08 f0 f0 f0 80 &2833 00 00 00 01 01 01 03 03 0f 0f 0f 0f 0f 1e 2c 2c &2843 0f 2d 48 80 00 00 00 00 0f 87 43 03 01 01 00 00 &2853 0c 0e 0e 0e 0e 0e 0f 0f 00 00 00 00 00 00 00 00 &2863 00 00 00 00 00 00 00 00 01 01 01 03 07 07 0f 0f &2873 f0 3c 78 4b 4b 4b 0f 0f c2 0e 0e 87 87 4b 4b 4b &2883 00 00 00 00 08 08 0c 0c 00 00 00 00 00 00 00 00 &2893 00 00 00 00 00 00 00 00 03 03 01 10 01 01 10 10 &28a3 3c 3c 1e 1f c3 0f 0f c3 e1 87 0e 0e 0e 0e 0e 68 &28b3 1e 1f 0e 00 00 00 00 00 80 00 00 00 00 00 00 00 &28c3 00 00 00 00 00 00 00 00 03 03 07 16 07 07 07 07 &28d3 e1 69 69 3c 3c 87 4f 3c 0c 0e 0f 0f 3c 78 f0 f0 &28e3 00 00 00 08 0c 3c 3c 1e 00 00 20 70 f0 f0 e0 c0 &28f3 00 00 00 00 00 00 00 00 30 00 20 00 00 00 00 01 &2903 fe fd fc fa fa f0 f0 f0 80 88 c8 c0 80 88 80 00 &2913 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2923 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2933 00 00 00 00 33 77 f8 f3 00 00 00 00 00 88 80 88 &2943 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_01_data (SPRITE_KICK_ONE) &2953 30 01 00 ; min_x = &00, max_x = &30, top_group = &01 &2956 00 00 00 00 00 00 00 00 00 00 00 00 11 33 11 00 &2966 07 07 07 23 fd fc f8 70 80 80 b3 f7 ff c4 80 00 &2976 00 00 ee ff 33 00 00 00 00 00 00 00 00 00 00 00 &2986 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2996 1e 1e 1e 16 07 07 07 07 10 00 00 00 80 80 80 80 &29a6 f0 f0 f0 00 00 00 00 00 00 00 00 00 00 00 00 00 &29b6 00 00 00 00 00 00 00 00 01 01 01 01 01 00 00 00 &29c6 4b 4b 4b 0f 1e 1e 1e 1e 0f 58 80 81 01 21 31 30 &29d6 0f 87 0e 0e 0e 0c 2c ac 00 00 00 00 00 00 00 00 &29e6 00 00 00 00 00 00 00 00 1e 07 01 10 01 01 01 01 &29f6 0f 0f 0f b4 f0 2d 2d 2d 2c 4b c3 0f 0f 87 87 4b &2a06 00 00 08 0c 0e 0f 0f 0f 00 00 00 00 00 00 00 00 &2a16 01 01 01 01 01 01 01 00 0f 0f 4b 3e 1e 1e 1e 1e &2a26 0f 1e 3c f0 f0 f0 e1 a7 0f 87 87 c7 b2 84 0c 2c &2a36 0c 48 e0 f0 f0 f0 10 10 00 00 00 80 c0 c0 c0 c0 &2a46 00 00 00 00 00 00 01 01 30 30 34 3c 1e 0f 0f 0f &2a56 c0 80 87 c3 c3 c3 69 69 00 00 08 08 0c 0e 0f 0f &2a66 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 &2a76 00 00 10 00 00 00 00 00 70 f1 f6 76 76 75 75 30 &2a86 c0 cc c0 cc e4 e0 c0 c4 00 00 00 00 00 00 00 00 &2a96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2aa6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 33 77 &2ab6 00 00 00 00 00 00 88 c4 00 00 00 00 00 00 00 00 &2ac6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_02_data (SPRITE_SHORT_JAB_KICK) &2ad6 40 02 00 ; min_x = &00, max_x = &40, top_group = &02 &2ad9 00 00 00 00 00 00 00 00 00 00 00 33 77 33 00 00 &2ae9 03 03 cf ef ff fc f0 f0 48 7b 7b 7b 7f f7 e2 c0 &2af9 00 cc ff ff ff 11 00 00 00 00 00 ff ff ff 00 00 &2b09 00 00 00 cc ff ff ff 00 00 00 00 00 cc ee cc 00 &2b19 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2b29 07 07 07 07 07 07 07 07 48 80 80 80 80 80 48 48 &2b39 00 00 00 00 00 00 00 00 4b 21 10 00 00 00 00 00 &2b49 78 5c 84 44 00 00 00 00 e0 e0 e0 60 20 00 00 00 &2b59 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2b69 0f 07 07 07 07 07 07 07 4b a5 a5 96 0f 2d 48 48 &2b79 0f 0f 0f 0f 0f 4b 21 10 08 0c 0e 0f 0f 0f 0f 0f &2b89 00 00 00 00 08 6c 3c 78 00 00 00 00 00 00 00 c0 &2b99 01 01 01 00 00 00 00 00 0f 0f 0f 0f 0f 07 10 00 &2ba9 bc 78 78 7d 2f 4b 96 78 c3 86 0f 1e 2d 69 c3 c3 &2bb9 3c 3c 34 22 08 0c 0e 0f f0 f0 90 00 00 00 00 00 &2bc9 80 80 80 00 00 00 00 00 00 00 00 00 00 00 00 00 &2bd9 00 00 00 00 00 00 01 01 30 30 30 16 07 0f 0f 1e &2be9 c0 87 c3 c3 0f 0f 0f 1e 00 0c 0e 0f 0f 69 e1 e1 &2bf9 00 00 00 00 08 0c 0f 3e 00 00 00 00 00 00 30 f0 &2c09 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 &2c19 10 00 10 00 10 00 00 00 70 f0 77 76 76 75 75 74 &2c29 c0 cc c0 cc e4 e0 c0 c4 00 00 00 00 00 00 00 00 &2c39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2c49 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2c59 00 00 00 00 00 00 00 00 00 00 00 00 00 00 33 77 &2c69 00 00 00 00 00 00 88 c8 00 00 00 00 00 00 00 00 &2c79 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2c89 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_03_data (SPRITE_KICK_TWO) &2c99 38 02 00 ; min_x = &00, max_x = &38, top_group = &02 &2c9c 77 77 11 00 00 00 00 00 88 ff ff ff 33 00 00 00 &2cac 00 ff ff ff ff 00 00 00 01 00 dd ff ff 76 74 30 &2cbc 2e 6c f1 f1 f0 f0 f0 e0 00 00 88 ee ee bb 88 00 &2ccc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2cdc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2cec 07 07 03 03 03 03 01 01 2c 2c 2c 2c 2c 2c 2c 2c &2cfc 00 00 00 00 # Continued at &2d00 in GAME2 ; entry_point &2d00 a9 16 LDA #&16 # Change to MODE 5 &2d02 20 ee ff JSR &ffee ; OSWRCH &2d05 a9 05 LDA #&05 &2d07 20 ee ff JSR &ffee ; OSWRCH &2d0a a2 0d LDX #&0d &2d0c a0 00 LDY #&00 ; poke_addresses_loop &2d0e b9 3f 2d LDA &2d3f,Y ; addresses_and_data_to_poke &2d11 8d 21 2d STA &2d21 ; poke_address_low &2d14 b9 40 2d LDA &2d40,Y ; addresses_and_data_to_poke + 1 &2d17 8d 22 2d STA &2d22 ; poke_address_high &2d1a b9 41 2d LDA &2d41,Y ; addresses_and_data_to_poke + 2 &2d1d c8 INY &2d1e c8 INY &2d1f c8 INY &2d20 8d ff ff STA &ffff # actually STA poke_address &2d23 ca DEX &2d24 d0 e8 BNE &2d0e ; poke_addresses_loop &2d26 a9 0c LDA #&0c ; CLS &2d28 20 ee ff JSR &ffee ; OSWRCH &2d2b a0 00 LDY #&00 ; relocate_second_stage_loop &2d2d b9 66 2d LDA &2d66,Y ; unrelocated_second_stage &2d30 99 00 58 STA &5800,Y ; second_stage &2d33 b9 66 2e LDA &2e66,Y ; unrelocated_second_stage + &100 &2d36 99 00 59 STA &5900,Y ; second_stage + &100 &2d39 88 DEY &2d3a d0 f1 BNE &2d2d ; relocate_second_stage_loop &2d3c 4c 00 58 JMP &5800 ; second_stage ; addresses_and_data_to_poke &2d3f 20 02 20 ; &0220 = &20 # event_vector = &0620 (event_handler) &2d42 21 02 06 ; &0221 = &06 &2d45 00 fe 06 ; &fe00 = &06 # R6: Vertical displayed register &2d48 01 fe 06 ; &fe01 = &06 &2d4b 50 03 00 ; &0350 = &00 # os_screen_start-address = &5d00 &2d4e 51 03 5d ; &0351 = &5d &2d51 4e 03 5d ; &034e = &5d # os_screen_memory_high_byte = &5d &2d54 00 fe 0d ; &fe00 = &0d # R13: Displayed screen start address register (low) &2d57 01 fe 40 ; &fe01 = &40 &2d5a 00 fe 07 ; &fe00 = &07 # R7: Vertical sync position &2d5d 01 fe 1f ; &fe01 = &1f &2d60 00 fe 08 ; &fe00 = &08 # R8: Interlace and delay register &2d63 01 fe c4 ; &fe01 = &c4 # &2d66 - &2e1e is moved to &5800 - &58b8 at &2d30 ; second_stage &5800 a2 00 LDX #&00 ; write_text_window_loop &5802 bd 5a 58 LDA &585a,X ; text_window_string &5805 20 ee ff JSR &ffee ; OSWRCH &5808 e8 INX &5809 e0 05 CPX #&05 &580b 90 f5 BCC &5802 ; write_text_window_loop &580d a9 8c LDA #&8c ; Select Tape FS &580f a2 0c LDX #&0c ; 1200 baud &5811 20 f4 ff JSR &fff4 ; OSBYTE &5814 a9 8b LDA #&8b ; Set filing system attributes &5816 a2 01 LDX #&01 # *OPT 1,1 &5818 a0 01 LDY #&01 &581a 20 f4 ff JSR &fff4 ; OSBYTE &581d 78 SEI &581e a9 03 LDA #&03 # Enable ESCAPE, clear memory on BREAK &5820 8d 58 02 STA &0258 ; ESCAPE/BREAK effect &5823 a2 3a LDX #&3a ; &583a = load_game2_command &5825 a0 58 LDY #&58 &5827 20 f7 ff JSR &fff7 ; OSCLI # *LOAD GAME2 2D00 &582a a2 4a LDX #&4a ; &584a = load_game3_command &582c a0 58 LDY #&58 &582e 20 f7 ff JSR &fff7 ; OSCLI # *LOAD GAME3 6FD8 &5831 58 CLI &5832 a9 0c LDA #&0c ; CLS &5834 20 ee ff JSR &ffee ; OSWRCH &5837 4c d0 1e JMP &1ed0 ; entry_point_after_relocation ; load_game2_command &583a 4c 4f 41 44 20 47 41 4d 45 32 20 32 44 30 30 0d ; "LOAD GAME2 2D00" ; load_game3_command &584a 4c 4f 41 44 20 47 41 4d 45 33 20 36 46 44 38 0d ; "LOAD GAME3 6FD8" ; text_window_string &585a 1c 00 05 13 00 ; define text window x:(&00, &13), y:(&00, &05) ; unused &585f 28 63 29 20 4d 69 63 68 61 65 6c 20 53 69 6d 70 ; "(c) Michael Simp" &586f 73 6f 6e 2e 20 50 2e 53 2e 41 64 2d 2d 2d 6e 20 ; "son. P.S.Ad---n " &587f 4d 2d 2d 67 2d 6e 20 64 69 64 20 6e 6f 74 20 63 ; "M--g-n did not c" &588f 6f 70 79 20 74 68 65 20 67 72 61 70 68 69 63 73 ; "opy the graphics" &589f 2c 6a 75 73 74 20 74 68 61 74 20 74 65 72 72 69 ; ",just that terri" &58af 62 6c 65 20 6d 75 73 69 63 2e ; "ble music." ; GAME2 ; 00000000 00000000 2B00 &2d00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 # Continuation of sprite_03_data &2d10 00 00 00 00 78 10 00 00 00 00 00 00 e0 c0 00 00 &2d20 00 00 00 00 0f 07 07 07 07 07 07 07 2c 48 48 48 &2d30 48 48 48 2c 00 00 00 00 00 00 00 00 00 00 00 00 &2d40 00 00 00 00 07 07 07 16 07 03 03 01 87 4b a5 0c &2d50 4c 48 f8 78 0f 0f 0f 0f 01 e0 e0 e0 1e 3c 2d 3c &2d60 5a 96 0f 0f 4b 87 0f 0f 1e 0e a4 a4 0f 0f 1e 69 &2d70 03 32 30 00 0c 2c 2c 6c 68 c0 80 00 10 10 01 03 &2d80 03 07 07 07 f2 f0 f5 f2 78 1f 0f 0f 0f 0f 0f 0f &2d90 87 0f 0f 0f 4b 0f 1e 0f 0f 0f 0f 1e f8 78 00 87 &2da0 87 87 87 2d f0 30 00 00 0e 0f 0f 0f 00 00 00 00 &2db0 00 00 08 08 11 b2 71 b3 32 32 33 11 f1 fc f3 f0 &2dc0 f6 f5 f0 f2 00 00 00 00 00 24 0f 0f 00 00 00 00 &2dd0 00 00 0f 87 00 00 00 00 00 00 08 7e 00 00 00 00 &2de0 00 00 e0 f0 00 00 00 00 00 00 00 00 00 00 00 00 &2df0 00 00 00 00 00 00 00 00 00 00 00 ee 00 00 00 00 &2e00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2e20 00 00 00 00 ; sprite_04_data (SPRITE_MID_KICK) &2e24 48 02 00 ; min_x = &00, max_x = &48, top_group = &02 &2e27 77 77 11 00 00 00 00 00 88 ff ff ff 33 00 00 00 &2e37 00 ff ff ff ff 00 00 00 01 88 ff ff 77 76 30 30 &2e47 2e 6c f1 f1 f0 f0 f0 e0 00 00 ff ff ff 00 00 00 &2e57 00 00 ff ff ff 00 00 00 00 00 ff ff 33 00 00 00 &2e67 00 00 88 ee ff cc 00 00 00 00 00 00 00 00 00 00 &2e77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2e87 07 07 03 03 03 03 01 01 2c 2c 2c 2c 2c 2c 2c 2c &2e97 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2ea7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2eb7 01 00 00 00 00 00 00 00 78 30 10 00 00 00 00 00 &2ec7 c0 c0 c0 00 00 00 00 00 0f 07 07 07 07 07 07 07 &2ed7 2c 48 48 48 48 48 48 2c 00 00 00 00 00 00 00 00 &2ee7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2ef7 00 00 00 00 00 00 00 00 07 07 07 16 07 03 03 01 &2f07 87 4b a5 0c 4c 68 f8 78 0f 0f 0f 0f 01 00 00 80 &2f17 1e 3c 2d 3c 5a 96 0f 0f 4b 87 0f 0f 1e 0e a4 a4 &2f27 0f 1e 0c 08 00 00 00 00 f0 00 00 00 00 00 00 00 &2f37 84 00 00 00 00 00 00 00 f0 10 00 00 00 00 00 00 &2f47 10 10 01 03 03 07 07 07 f2 f0 f5 f2 78 0f 0f 0f &2f57 0f 8f 87 c3 8f 0f 0f 0f 5a 2c 1e 0f 0f 0f 0f 1e &2f67 00 00 01 87 87 87 87 2d 00 00 0f 0f 0f 0f 1e 0f &2f77 00 00 0f 0f 0f 0f 0f 0f 00 00 00 3c 78 78 78 7c &2f87 00 00 00 80 e0 f0 f0 f0 11 b2 71 b3 32 32 33 11 &2f97 f1 fc f3 f0 f6 f5 f0 f2 00 00 00 01 03 07 0f 0f &2fa7 00 00 03 0f 0f 0f 0f 87 00 00 78 78 3c 3c 2e c2 &2fb7 00 e0 f0 f0 f4 00 00 00 00 00 00 00 00 00 00 00 &2fc7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2fd7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ee &2fe7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &2ff7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3007 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3017 00 00 00 00 00 00 00 00 ; sprite_05_data (SPRITE_HIGH_KICK) &301f 48 02 00 ; min_x = &00, max_x = &48, top_group = &02 &3022 00 00 11 33 11 00 00 00 00 11 ff ff ff 77 77 33 &3032 00 ff ff ff ff 88 00 00 01 cd ef ef ff 30 f0 f0 &3042 2c 2c 3d 3f fb f3 e2 80 00 00 ff ff ff 00 00 00 &3052 00 00 ff ff 99 00 00 00 00 00 cc ff ff 66 00 00 &3062 00 00 00 00 88 00 00 00 10 00 00 00 00 00 00 00 &3072 c0 c0 c0 c4 e2 e0 40 00 00 00 00 00 00 00 00 00 &3082 03 03 03 03 03 01 01 01 2c 2c 2c 2c 2c 2c 2c 2c &3092 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &30a2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &30b2 03 03 01 01 11 10 10 10 80 80 08 88 80 80 c0 c0 &30c2 00 00 00 00 00 00 00 00 0f 0f 07 07 07 07 07 03 &30d2 0c 0c 48 48 48 48 48 2c 00 00 00 00 00 00 00 00 &30e2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &30f2 00 00 00 00 00 00 00 00 03 07 07 07 07 07 03 03 &3102 1f 0f 0f 87 4b 3c 48 80 cf 0f 0f 0f 0f 87 52 10 &3112 3c 2d 3c 69 4b 87 87 0f 86 0e 0e 84 48 2c 2c 0c &3122 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3132 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3142 33 32 32 10 01 01 03 03 f2 f8 e9 e3 e1 c3 f0 3c &3152 0f 1e 0f 0f 0f 0f 87 e3 80 00 09 4b 4b 2d 2d 2d &3162 07 0f 0f 0f 0f 0f 69 e1 2d 4a 0e 0c 0c 08 08 00 &3172 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3182 00 00 00 00 00 00 00 00 00 00 00 51 30 31 73 33 &3192 00 00 cc ee e0 ee e8 e6 00 00 00 00 00 03 07 0f &31a2 00 00 10 74 3c 1e 2e 48 70 f2 c0 c4 80 00 01 03 &31b2 00 01 03 07 07 0f 0f 1e 1f 0f 0f 0e 48 84 80 00 &31c2 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &31d2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &31e2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &31f2 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 00 &3202 00 00 00 00 00 10 30 36 00 00 00 30 f0 f0 f0 f0 &3212 00 00 00 00 00 80 80 80 ; sprite_06_data (SPRITE_SWEEP_ONE) &321a 28 04 00 ; min_x = &00, max_x = &28, top_group = &04 &321d 07 16 26 30 30 f0 f0 f2 23 63 43 61 71 e8 f8 f4 &322d 4b 0f 0f 0f 10 00 f7 c4 1e 1e 3e 48 b3 77 cc 00 &323d f8 f0 f0 00 ee ff 77 00 03 03 03 03 07 07 07 07 &324d 4b 4b 78 87 87 b0 83 03 0f 3c e1 1e 1e 0f 87 4b &325d 87 4b 87 87 4b 2d 1e 1f 78 78 78 68 48 84 2c 6c &326d 00 01 01 01 03 03 03 03 1f 0f 0f 0f 0f 2d 2d 4b &327d c3 c3 87 87 0f 0f 1e 3c 0f 0f 87 87 4b 19 00 91 &328d 00 08 08 0c 48 c0 e0 e0 00 00 00 00 00 00 00 00 &329d 73 33 32 32 10 10 12 16 e6 f2 f8 e8 e2 e0 c3 c3 &32ad 00 00 00 00 00 00 08 0c 00 00 00 00 00 00 00 00 &32bd 00 00 00 00 00 00 00 00 00 00 00 00 11 33 70 31 &32cd 00 00 00 cc ee e0 ee e8 00 00 00 00 00 00 00 00 &32dd 00 00 00 00 00 00 00 00 ; sprite_07_data (SPRITE_SWEEP_TWO) &32e5 48 04 00 ; min_x = &00, max_x = &48, top_group = &04 &32e8 01 10 10 30 70 f0 f4 77 1c 0d 48 88 80 f7 f7 cc &32f8 0f 87 96 3c 30 fc fc 74 2d 5b 59 44 c4 c0 f3 e2 &3308 e1 e1 f1 60 60 70 f0 fe 0f 1e 2d c3 21 10 f7 91 &3318 0f 0f 0f 0f 0f 87 e9 fe 00 0c 3e 7c 78 3c 7e d5 &3328 00 00 00 e0 e0 e0 c0 ee 00 00 00 00 00 01 01 01 &3338 1e 1e 2d 2d 2d 2d 1e 1c 0f 87 4b 2d 2d 96 1e 1e &3348 2d 1e 1e 1e 3c 79 c3 2d 2c 2c 1e 1e 5e eb e1 e1 &3358 00 00 00 08 0e 0f 0f 0f 00 00 00 00 00 00 0c 0e &3368 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3378 00 00 00 00 00 00 00 00 03 07 07 07 0f 1e 1e 1e &3388 7d 7c 3e 3e 96 1e 1e 0f d6 c3 cb cb 1e 0f 0f 2d &3398 00 80 48 48 2c 2c 2c 2c 00 00 00 00 00 00 00 00 &33a8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &33b8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &33c8 00 10 00 00 00 00 00 01 b3 77 f3 74 77 77 7e 7c &33d8 cc cc c8 c4 cc c8 c0 cc 00 00 00 00 00 00 00 00 &33e8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &33f8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3408 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 &3418 00 00 00 00 00 00 00 11 00 00 00 00 00 00 00 88 &3428 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3438 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3448 00 00 00 00 00 00 00 00 ; sprite_08_data (SPRITE_CROUCHING_JAB) &3450 40 03 00 ; min_x = &00, max_x = &40, top_group = &03 &3453 01 61 e1 e1 f1 e0 c0 60 08 4b 3c 0f 0f 0f a1 10 &3463 87 0f 0f 0f 0f 1e 3d f3 2c 48 0c b3 7f ff ff 88 &3473 03 07 07 cf eb fc fc 74 0c 08 08 ff ff e6 e0 e0 &3483 00 00 ff ff bb 00 00 00 00 00 88 ee ff cc 00 00 &3493 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &34a3 01 01 03 03 03 03 43 07 1e 1e 0f 0f 0f 0f 1e 1e &34b3 0f 0f 87 87 1e a5 2d 0b 00 08 0c 0c 0c 0c 0c 0c &34c3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &34d3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &34e3 25 16 12 03 01 10 01 01 0f 0f 0f 0f 0f 0f 96 78 &34f3 87 4b 0f 0f 0e 0c 0c 80 1f 0f 0f 0c 00 00 00 00 &3503 f0 38 80 00 00 00 00 00 e0 e0 60 00 00 00 00 00 &3513 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3523 00 00 00 00 01 03 16 34 10 12 07 0f 96 96 87 1e &3533 f1 f1 f0 e8 68 0e 0f 0f 00 00 00 00 00 00 1e 1e &3543 00 00 00 00 00 00 f0 f0 00 00 00 00 00 00 80 e0 &3553 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3563 00 00 00 00 00 00 00 00 00 51 30 51 11 11 11 11 &3573 ff f0 f7 f8 fb f9 f4 f4 00 00 00 00 00 80 80 00 &3583 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3593 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &35a3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &35b3 00 00 00 00 00 00 00 66 00 00 00 00 00 00 00 00 &35c3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_09_data (SPRITE_PREPARING_TO_PUNCH) &35d3 20 02 00 ; min_x = &00, max_x = &20, top_group = &02 &35d6 07 07 07 67 f9 f8 f0 f0 08 80 33 ff ff ff cc 88 &35e6 01 01 cd ef ef ff 32 10 0c 0c 0c 0c 2e f3 f0 f0 &35f6 01 01 01 03 03 03 03 07 0f 1e 0e 2c 2c 48 48 08 &3606 07 07 03 03 03 03 03 01 08 08 48 48 48 0c 0c 0c &3616 00 00 00 00 00 00 01 01 0f 0f 0f 0f 0f 0f 0f 0f &3626 84 86 0e 0f 0f 0f 0f 0f 00 00 00 00 00 00 80 80 &3636 00 00 00 00 00 00 00 00 0f 4b 1e 0f 87 78 0f 0f &3646 48 0c 84 0c 0c 0c e0 58 00 00 00 00 00 00 00 00 &3656 00 00 00 01 01 01 01 01 07 0f 87 0f 2d 0f 0f 0f &3666 48 0c 0c 1c 3c f8 78 68 00 00 c0 c0 c0 c0 80 00 &3676 00 00 00 00 00 00 00 00 f7 f7 76 76 32 30 12 07 &3686 e8 e6 f2 f8 e8 e2 e0 48 00 00 00 00 00 00 00 00 &3696 00 00 00 00 00 00 00 00 00 00 00 00 11 33 76 71 &36a6 00 00 00 00 cc ee e0 ee 00 00 00 00 00 00 00 00 ; sprite_0a_data (SPRITE_STANDING_JAB) &36b6 30 02 00 ; min_x = &00, max_x = &30, top_group = &02 &36b9 03 07 07 73 70 f0 f0 70 2c 48 19 7f ff f7 f3 e2 &36c9 00 00 ff ff ff ff 00 00 87 87 87 87 bf f8 f8 f8 &36d9 00 00 00 88 ff f7 e0 e0 00 00 00 00 88 88 00 00 &36e9 00 00 00 01 01 01 03 03 07 07 0f 0f 0f 0f 1e 1e &36f9 3c 3c 58 58 80 80 00 00 0f 0f 0f 0f 87 87 87 87 &3709 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3719 00 00 00 00 00 00 00 00 03 03 03 03 03 03 07 07 &3729 2d 2d 0f 0f 0f 0f 0f 2d 08 08 0c 0e 0e 0e 0f 0f &3739 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3749 00 00 00 00 00 00 00 00 0f 0f 07 03 30 12 03 03 &3759 2d 0f 0f 0f 1e f0 3c 1e 07 00 00 00 00 00 80 40 &3769 4c 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3779 00 00 00 01 01 01 01 01 07 07 0f 0f 4b 4b 4b 4b &3789 87 87 0f 0f 0f 0f 4b 1e 00 08 0c 0f 0f 0f 0f 0f &3799 00 00 00 00 3c 3c 3c 3c 00 00 60 e0 e0 e0 c0 00 &37a9 00 00 00 00 00 00 00 00 b3 33 33 11 11 00 10 03 &37b9 fb f9 f4 f4 f1 f1 f0 4e 00 80 80 00 00 00 00 00 &37c9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &37d9 00 00 00 00 00 00 00 00 00 00 00 00 11 b0 71 b3 &37e9 00 00 00 ee ff f0 ff fc 00 00 00 00 00 00 00 00 &37f9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_0b_data (SPRITE_HIGH_PUNCH) &3809 30 02 00 ; min_x = &00, max_x = &30, top_group = &02 &380c 03 07 07 73 70 f0 f0 70 2c 48 19 7f ff f7 f3 e2 &381c 00 00 ff ff ff ff 00 00 87 87 87 87 bf f8 f8 f8 &382c 00 00 00 88 ff f7 e0 e0 00 00 00 00 88 88 00 00 &383c 00 00 00 01 01 01 03 03 07 07 0f 0f 0f 0f 1e 1e &384c 3c 3c 58 58 80 80 00 00 0f 0f 0f 0f 87 87 87 87 &385c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &386c 00 00 00 00 00 00 00 00 03 03 03 03 03 03 07 07 &387c 2d 2d 0f 0f 0f 0f 0f 2d 08 08 0c 0e 0e 0e 0f 0f &388c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &389c 00 00 00 00 00 00 00 00 0f 0f 07 03 30 12 03 03 &38ac 0f 0f 0f 0f 1e f0 3c 1e 00 00 00 00 00 00 80 40 &38bc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &38cc 00 00 00 01 01 01 01 01 07 07 0f 0f 4b 4b 4b 4b &38dc 87 87 0f 0f 0f 0f 1e 2d 0f 0f 0f 0f 3c c0 08 00 &38ec 2c 0e 2c 84 00 00 00 00 00 00 00 00 00 00 00 00 &38fc 00 00 00 00 00 00 00 00 b3 33 33 11 11 00 10 03 &390c fb f9 f4 f4 f1 f1 f0 6c 00 80 80 00 00 00 01 07 &391c 00 00 00 10 30 70 78 78 00 40 e0 e0 e0 e0 c0 80 &392c 00 00 00 00 00 00 00 00 00 00 00 00 11 b0 71 b3 &393c 00 00 00 ee ff f0 ff fc 00 00 00 00 00 00 00 00 &394c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_0c_data (SPRITE_CROUCH) &395c 20 03 00 ; min_x = &00, max_x = &20, top_group = &03 &395f 61 61 61 73 f9 f9 74 76 5a 2d 2d 1e c3 ed fe ff &396f 1e 1e 1e 1e 0f f2 fe fe 0e 0e 0e 2c cc e2 f0 f0 &397f 36 03 03 03 03 01 10 01 f1 1f 3c 2d 2d 2d 0f c3 &398f 8f 4b 4b 87 4b 58 3c 2d 0e 0e 0e 0e 86 86 0e 0e &399f 0f 1e 1e 1e 0f 0f 97 3e 0f 0f 0f 0f 96 bc f0 f0 &39af 84 08 80 88 80 c0 80 c3 00 00 00 00 00 00 00 0c &39bf 00 01 12 17 07 0f 1e 2d f1 f0 e0 e1 69 6d 2f 0f &39cf 30 74 36 a7 0f 0f 0f 0e 80 80 88 08 08 08 00 00 &39df 00 11 70 b1 51 91 11 11 ff f0 f7 fc fb f9 f4 f4 &39ef 72 70 70 30 30 b0 b0 30 00 00 00 00 00 00 80 80 &39ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 66 &3a0f 00 00 00 00 00 00 60 70 00 00 00 00 00 00 00 00 ; sprite_0d_data (SPRITE_LOW_BLOCK) &3a1f 30 02 00 ; min_x = &00, max_x = &30, top_group = &02 &3a22 03 03 03 03 73 f0 f0 f1 0c 0c 59 b3 7f ff ee 00 &3a32 77 ff ff ff ff 99 00 00 00 cc ff ff ff ff 00 00 &3a42 0f 07 07 8f cf fc fe 32 00 88 4c 08 f0 f0 f0 80 &3a52 00 00 00 01 01 01 03 03 0f 0f 0f 0f 0f 1e 2c 2c &3a62 0f 2d 48 80 00 00 00 00 0f 87 43 03 01 01 00 00 &3a72 0c 0e 0e 0e 0e 0e 0f 0f 00 00 00 00 00 00 00 00 &3a82 00 00 00 00 00 00 00 00 01 01 01 03 07 07 0f 0f &3a92 f0 3c 78 4b 4b 4b 0f 0f c2 0e 0e 87 87 4b 4b 4b &3aa2 70 70 30 30 38 18 1d 1c 00 00 00 80 80 80 80 80 &3ab2 00 00 00 00 00 00 00 00 03 03 01 10 01 01 10 10 &3ac2 3c 3c 3c 2f c3 0f 0f c3 e1 87 0f 0f 2f 0e 0e 68 &3ad2 08 0c 0c 0e 0e 2c 68 68 00 00 00 00 00 00 00 00 &3ae2 00 00 00 00 00 00 00 00 03 03 07 16 07 07 07 07 &3af2 e1 69 69 3c 3c 87 5e 3c 08 0c 0e 0e 4b e1 e1 e1 &3b02 00 00 00 00 00 00 08 08 00 00 00 00 00 00 00 00 &3b12 00 00 00 00 00 00 00 00 30 00 20 00 00 00 00 01 &3b22 fe fd fc fa fa f0 f0 f0 80 88 c8 c0 80 88 80 00 &3b32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3b42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3b52 00 00 00 00 33 77 f8 f3 00 00 00 00 00 88 80 88 &3b62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_0e_data (SPRITE_HIGH_BLOCK) &3b72 30 02 00 ; min_x = &00, max_x = &30, top_group = &02 &3b75 03 03 03 03 73 f0 f0 f1 0c 0c 59 b3 7f ff ee 00 &3b85 77 ff ff ff ff 99 00 00 21 21 ed ed ef ff 32 11 &3b95 0c 0c 0c 2e fb f1 f0 f0 00 00 00 00 88 cc c4 80 &3ba5 00 00 00 01 01 01 03 03 0f 0f 0f 0f 0f 1e 2c 2c &3bb5 0f 2d 48 80 00 00 00 00 0f 87 43 43 43 43 61 21 &3bc5 00 00 08 08 08 08 08 08 00 00 00 00 00 00 00 00 &3bd5 00 00 00 00 00 00 00 00 01 01 01 03 07 07 0f 0f &3be5 d3 3c 78 4b 4b 4b 0f 0f f0 78 1e 86 87 87 87 0f &3bf5 c0 c0 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 &3c05 00 00 00 00 00 00 00 00 07 03 03 21 01 10 01 10 &3c15 4b 2d 2d 5a 0f 1f 96 1e 0f 0e 0e 0e 0e 86 c2 f0 &3c25 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3c35 00 00 00 00 00 00 00 00 01 21 21 43 43 07 07 07 &3c45 78 7c 7c 3e 1e 0f 4b 4b 5a 2d 0f 0f 96 87 1e 0f &3c55 7c 2f 0f 2c 48 80 00 00 00 00 00 00 00 00 00 00 &3c65 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00 00 &3c75 fe fd fc fa fa 70 70 78 80 88 c8 c0 80 88 80 00 &3c85 e0 e0 60 70 70 70 70 f8 00 00 00 00 00 00 00 00 &3c95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 10 &3ca5 00 00 00 00 33 77 f8 f3 00 00 00 00 00 88 80 88 &3cb5 00 00 00 00 c0 e0 e4 e0 00 00 00 00 00 00 00 00 ; sprite_0f_data (SPRITE_BENDING_KNEES) &3cc5 30 02 08 ; min_x = &08, max_x = &30, top_group = &02 &3cc8 00 00 00 00 11 11 00 00 03 07 47 eb f9 f8 f8 74 &3cd8 0f 1e 0f 3d 3f f7 f3 e2 4b c3 87 9f f5 f8 f8 f8 &3ce8 08 00 00 00 88 88 80 80 00 00 00 00 00 00 00 00 &3cf8 01 00 00 00 00 00 00 10 0f 87 43 63 63 87 4f 0f &3d08 4b 4b 4b 4b 4b 4b 0f 87 08 08 08 08 08 08 08 08 &3d18 00 00 00 00 00 00 00 00 70 56 47 07 07 03 03 01 &3d28 96 c3 c3 c3 1e 1e 0f 0f 7e 86 86 0f 0f 0f 87 87 &3d38 c0 c0 00 00 00 00 00 08 01 01 01 01 01 00 00 00 &3d48 1e 1e 2d 2d 0f 2f 71 70 0f 0f 0f 0f 0f 0f 9e f8 &3d58 4a 86 86 86 86 e8 f8 3c 00 00 00 00 00 00 00 c0 &3d68 00 00 00 00 00 00 00 01 03 03 07 07 0f 0f 0f 0f &3d78 3c 3c 3c 1e 1e 0f 87 87 80 80 08 0c 0c 0c 0c 0e &3d88 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3d98 00 10 00 00 00 00 00 01 f1 77 76 76 76 75 3d 3c &3da8 cc c0 cc e4 e0 c0 c4 c0 00 00 00 00 00 00 00 00 &3db8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 &3dc8 00 00 00 00 00 11 33 76 00 00 00 00 00 88 cc c0 &3dd8 00 00 00 00 00 00 00 00 ; sprite_10_data (SPRITE_JUMPING) &3de0 38 01 08 ; min_x = &08, max_x = &38, top_group = &01 &3de3 00 00 33 ff 77 00 00 00 00 33 ff ff ff 00 00 00 &3df3 00 ff ff ff ff ff 77 11 00 ff ff ff 88 cc ee ee &3e03 00 ee ff ff 33 11 00 00 00 00 cc ee ff ff 00 00 &3e13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3e23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3e33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3e43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3e53 10 10 00 00 00 00 00 00 c0 e0 e0 f0 70 00 00 00 &3e63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3e73 00 00 00 00 00 00 00 00 21 10 10 00 00 00 00 00 &3e83 0f 0f 0f 0f 07 07 03 01 00 00 08 08 08 0c 0c c0 &3e93 07 07 30 30 30 10 00 00 80 80 80 e0 f0 f0 00 00 &3ea3 03 03 03 01 00 00 00 00 3c 78 78 2d 1f 2d 25 21 &3eb3 a7 e5 0f c3 2d 1e 1e 1e 87 96 a5 1e ed c8 80 00 &3ec3 0e 0e 0f 0f 0f 0f 0f 07 00 00 00 00 00 08 08 08 &3ed3 01 01 03 03 03 03 03 03 0f 2d 2d 2d 4b 4b 5a 1e &3ee3 4b 4b 0f 69 e1 e1 e1 d2 0f 0f 0f 3c 0f 0f 87 0f &3ef3 00 00 08 1e 96 5a 1c 0e 00 00 60 f0 f0 f0 80 00 &3f03 00 00 00 00 00 00 00 01 31 71 11 10 12 07 0f 0f &3f13 f9 f4 f4 f1 f0 e1 e1 c3 80 80 00 00 00 00 48 0e &3f23 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3f33 00 00 00 00 00 00 00 00 00 00 00 00 11 10 70 31 &3f43 00 00 66 ff f8 f7 fc fb 00 00 00 00 00 00 00 00 &3f53 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_11_data (SPRITE_FLYING_KICK) &3f63 48 00 08 ; min_x = &08, max_x = &48, top_group = &00 &3f66 ff ff ff 77 00 00 00 00 ff ff ff ff 33 00 00 00 &3f76 ff ff ff ff ff 33 00 00 ff ff ff cc ff ff 33 00 &3f86 ee ff ff 11 00 00 00 00 00 ff ff ff 11 00 00 00 &3f96 00 88 ff ff ff 00 00 00 00 00 ee ee ee 00 00 00 &3fa6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 77 &3fb6 00 00 00 00 00 00 00 ee 00 00 00 00 00 00 00 00 &3fc6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3fd6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3fe6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &3ff6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4006 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4026 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4036 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4046 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4056 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4066 00 00 00 00 00 00 00 00 87 43 01 00 00 00 00 00 &4076 0f 0f 1f 1e 06 00 00 00 08 c8 f0 f0 f0 f0 30 10 &4086 10 00 00 80 80 80 80 80 87 43 03 00 00 00 00 00 &4096 f8 18 00 00 00 00 00 00 e0 e0 e0 60 00 00 00 00 &40a6 1e 1e 07 03 03 01 00 00 c3 96 b4 4b 87 87 87 87 &40b6 87 4b 2d a5 4b 78 2d 1e 0f 0f 0f 0f 0f c3 30 00 &40c6 08 0e 0f 0f 0f 0f 87 61 00 00 08 0e 0f 0f 0f 0f &40d6 00 00 00 00 08 e0 f0 f0 00 00 00 00 00 00 80 e0 &40e6 07 0f 1e 1e 1e 0f 0f 1e 96 96 0f 1e 3c 78 f0 e1 &40f6 0f 0f c3 d2 c3 e2 a5 cb 0f 0f e1 10 00 00 00 0c &4106 1e 1e 1e 2e 00 00 00 00 c0 f0 f0 70 30 00 00 00 &4116 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4126 20 00 00 01 03 07 07 07 75 75 70 78 3c 3c 3c 1e &4136 e0 c0 c4 c4 c0 87 0f 0f 00 00 00 00 00 08 0e 0f &4146 00 00 00 00 00 00 00 0c 00 00 00 00 00 00 00 00 &4156 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4166 00 00 00 00 30 00 00 10 00 11 33 74 71 f3 f6 76 &4176 00 88 cc c0 cc c0 cc e4 00 00 00 00 00 00 00 00 &4186 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4196 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_12_data (SPRITE_HIGH_BACK_KICK_ONE) &41a6 38 02 10 ; min_x = &10, max_x = &38, top_group = &02 &41a9 03 03 03 32 fc f8 70 70 0c 0c 3f 7f ff ff f3 e2 &41b9 00 00 88 ff ff ee 88 00 00 00 00 88 88 00 00 00 &41c9 00 00 00 00 00 00 00 00 d2 e1 f0 70 70 13 03 03 &41d9 0e a4 4a 8e 0e 0e 0c 0c 00 00 00 00 00 00 00 00 &41e9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &41f9 43 07 21 12 12 21 43 07 0f 4b 87 0f 0f 0f 1e 0e &4209 68 08 08 08 00 00 00 00 00 00 00 00 00 00 00 00 &4219 00 00 00 00 00 00 00 00 21 03 16 07 07 16 07 07 &4229 2d 3c 78 78 cf 0f 0f 0f 0e 2c 84 c0 e0 68 68 68 &4239 78 bc 6e 04 00 00 00 00 80 00 00 00 00 00 00 00 &4249 01 03 07 07 07 07 07 03 1f 4b 4b 87 87 4b 87 0f &4259 87 87 0f 0f 0f 0f 0f 1e 00 08 08 08 48 2e 3c 78 &4269 00 00 00 70 30 f0 f0 c0 00 00 00 00 00 00 00 01 &4279 33 32 32 10 10 14 1e 1e f2 f8 e8 e2 e0 c0 86 87 &4289 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4299 00 00 00 00 00 00 10 00 00 00 00 11 33 f0 73 33 &42a9 00 00 cc ee e0 ee e8 e6 00 00 00 00 00 00 00 00 &42b9 00 00 00 00 00 00 00 00 ; sprite_13_data (SPRITE_HIGH_BACK_KICK_TWO) &42c1 48 03 00 ; min_x = &00, max_x = &48, top_group = &03 &42c4 33 33 00 00 00 00 00 00 ee ff ff 77 33 00 00 00 &42d4 00 ff ff ff ff 00 00 00 00 88 ff ff ff 77 33 11 &42e4 0f 0f 0f 1f bf f9 f8 f8 00 00 33 ff ff ff e6 80 &42f4 00 ff ff ff ff cc 00 00 00 88 cc ee ff 77 00 00 &4304 00 00 00 00 cc ee ee 00 00 00 00 00 00 00 00 00 &4314 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4324 01 01 01 00 00 00 00 00 0f 0f 4b 87 87 0f 0f 0f &4334 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4344 54 10 00 00 00 00 00 00 80 c0 e0 e0 e0 60 40 00 &4354 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4364 00 00 00 00 00 00 00 00 31 21 21 21 10 10 10 01 &4374 0f 8f 0f 0f 0f 0f 0f 0f 87 d2 c3 68 a0 a0 a0 a0 &4384 87 0f 0b 21 01 10 00 00 0c 0c 0c 0e 0e 0f 1e b4 &4394 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 &43a4 00 00 00 00 00 00 00 00 03 21 10 00 00 00 00 00 &43b4 0f 0f 0f 87 43 43 21 13 7c 78 78 e1 f1 f1 d3 0f &43c4 3c 0f 0f 0f 0f 0f 8f 0f 1e 1e 3c 7c 2d 0f 1e 2d &43d4 f2 fa f8 f2 f3 4c 08 08 cc c8 c8 c8 88 00 00 00 &43e4 00 00 00 00 00 00 00 00 e3 07 03 01 01 00 00 00 &43f4 80 48 2c 1e 1e 0f 07 43 00 00 00 00 08 0e 0f 0f &4404 00 01 03 03 03 30 38 7c 06 0f 0f 0f 0f 8f 87 87 &4414 00 08 0c 0e 0f 4b 87 87 00 20 40 70 fe 7b f7 f1 &4424 00 00 00 00 88 c4 c4 cc 00 00 00 00 30 30 30 30 &4434 00 00 00 00 80 e0 e0 f1 00 00 00 00 00 00 00 00 &4444 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4454 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4464 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_14_data (SPRITE_ROUNDHOUSE_ONE) &4474 30 02 00 ; min_x = &00, max_x = &30, top_group = &02 &4477 00 00 00 77 ff ff 00 00 00 00 00 cc ff ff 77 32 &4487 0f 07 07 07 ed f8 f0 f0 00 00 00 66 ff ff ff ff &4497 16 34 34 30 98 fe ff ff 80 80 c0 c0 e0 e0 e0 88 &44a7 00 00 00 00 00 00 00 00 01 01 01 01 00 00 00 00 &44b7 0e 0e 0e 0e 0e 0e 0f 0f 07 07 03 01 01 01 00 00 &44c7 0c 2c 2c 2c 0f 0f 0f 0f 00 00 00 00 00 00 00 00 &44d7 00 00 00 00 00 00 00 00 00 00 01 01 01 01 01 01 &44e7 2d 5a 5a 4b 4b 0f 0f 0f 1e 1e 0f 87 0f 0f 07 07 &44f7 00 00 80 80 80 08 0c 0c 00 00 00 00 00 00 00 00 &4507 f0 e0 40 00 00 00 00 00 05 01 01 00 00 00 00 00 &4517 0f 0f 0f 3c 3c b4 7c 2f 2d 4b f0 e1 c0 84 ca 1e &4527 08 08 08 00 00 00 00 00 00 00 00 00 00 00 00 00 &4537 00 00 00 00 01 10 70 f0 01 03 43 87 0f 0f 96 96 &4547 78 79 69 4b 4f 0f 0f 0f 0c 2c 2c 1e 0f 0f 4b 4b &4557 00 00 00 00 00 00 08 08 00 00 00 00 00 00 00 00 &4567 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4577 f1 fa f2 f0 f4 f4 71 76 a8 a8 88 88 80 80 80 08 &4587 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4597 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &45a7 00 00 00 00 77 f7 f8 ff 00 00 00 00 00 88 a8 c0 &45b7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_15_data (SPRITE_ROUNDHOUSE_TWO) &45c7 20 03 00 ; min_x = &00, max_x = &20, top_group = &03 &45ca 00 00 00 00 77 ff 77 00 00 00 00 77 ff ff ff 00 &45da 03 03 03 cf de fc f8 70 08 08 08 08 08 6e e6 c4 &45ea 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &45fa 03 03 03 03 03 03 03 03 0c 0c 0c 0c 08 08 08 08 &460a 30 70 f0 f0 e0 00 00 00 2c 84 84 80 00 00 00 00 &461a 07 03 12 01 01 01 01 03 0e 4a 86 0e 0e 0e 0e 0c &462a 00 00 01 01 01 03 03 03 06 0f 0f 0f 0f 2d 1e 2d &463a 3c 1e 0f 0f 0f 0f 0f 0f 87 87 0f 2c 0e 0e 0e 0e &464a 00 00 00 00 00 00 00 00 00 00 30 70 70 70 10 00 &465a f4 e1 43 0f 87 c3 e1 f0 c4 08 08 0c 0e 0e 0e 0f &466a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &467a 77 f9 f6 ff f1 fa f2 f0 00 88 88 c4 c0 fc ec dc ; sprite_16_data (SPRITE_ROUNDHOUSE_THREE) &368a 38 03 00 ; min_x = &00, max_x = &38, top_group = &03 &368d 00 00 00 00 77 ff ff 00 01 01 01 01 ef fe fe 76 &369d 0c 0c 0c 0c 1d b7 f3 f1 00 00 00 11 ff ff ee 00 &36ad 00 00 00 ff ff ff 33 00 00 00 00 77 ff ff ff 00 &36bd 00 00 00 88 cc cc 88 00 00 00 00 00 00 00 00 00 &36cd 01 01 01 01 01 01 01 01 0f 1e 1e 1e 0e 0e 0e 0e &36dd 00 00 00 00 00 00 00 00 10 10 00 00 00 00 00 00 &36ed 80 c0 c0 c0 40 00 00 00 00 00 00 00 00 00 00 00 &36fd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 &370d 07 07 07 0f 0f 0f 0f 0f 2c 0c 08 08 80 80 80 00 &371d 01 01 01 01 10 10 10 10 0e 0e 0e 0c 0c 80 80 80 &372d 00 00 00 00 00 00 00 00 30 70 f0 f0 f0 e0 00 00 &373d 8f 87 87 87 21 10 00 00 0f 0f 0f 0f 0f 87 07 07 &374d 87 87 4b 4b 4b 4b 2d 2d 0f 0f 0f 0f 0f 0f 0f 1e &375d 7f 3f 1f 0e 0e 0e 0e 0e ec dc 98 00 00 00 00 00 &376d 00 00 00 00 01 03 07 37 00 00 00 0c 0f 0f 0f 0f &377d 00 00 00 00 08 0e 0f 0f 03 03 03 01 10 07 87 87 &378d 0c 0e 0e 0f 0f 0f 0f 0f 00 00 32 76 ff ff 7f 7f &379d 00 00 88 cc e6 e6 e6 ea 00 00 00 00 00 00 00 00 &37ad 00 00 00 00 00 00 00 00 00 00 10 10 10 00 00 00 &37bd 00 00 c0 e0 e0 f0 61 21 00 00 00 00 00 00 00 08 &37cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_17_data (SPRITE_ROUNDHOUSE_FOUR) &47dd 30 03 10 ; min_x = &10, max_x = &30, top_group = &03 &47e0 47 47 47 47 07 25 f8 f8 00 00 00 33 77 77 ff f7 &47f0 00 00 00 cc ff ff ff 88 00 00 00 00 cc ee ff ee &4800 23 23 27 47 47 47 47 47 08 08 80 80 80 08 08 00 &4810 03 03 10 10 10 00 00 00 08 80 c0 c0 e0 e0 e0 60 &4820 03 03 03 03 23 23 23 23 3c 0f 1e 0e 0c 0c 48 48 &4830 0e 86 0e 0e 1e 96 07 43 00 00 00 00 00 00 00 08 &4840 00 01 01 01 01 01 03 03 87 87 87 87 87 4b 4b 4b &4850 fb fb fb fb fd 7d 0f 0e cc cc cc cc cc 88 00 00 &4860 00 00 00 00 00 00 00 00 03 07 07 07 07 0f 4b 4b &4870 0c 1a 96 1e 0f 0f 7d fd c0 e0 e0 e0 20 00 88 88 &4880 00 00 00 00 00 00 00 00 00 00 00 00 00 01 10 03 &4890 00 00 10 70 3c 3c 0e 84 00 00 c0 c0 c0 80 00 00 ; sprite_18_data (SPRITE_REACHING_KICK) &48a0 48 03 00 ; min_x = &00, max_x = &48, top_group = &03 &48a3 00 00 00 11 77 77 00 00 00 00 77 ff ff ee 77 00 &48b3 00 33 ff ff ff 00 00 00 07 8f 8f 8f be f8 f1 f1 &48c3 80 80 e6 7f ff ff cc 00 00 00 77 ff ee 00 00 00 &48d3 00 00 ff ff cc 00 00 00 00 00 ee ff ff 33 00 00 &48e3 00 00 00 88 cc 00 00 00 32 10 10 10 10 00 00 00 &48f3 80 80 80 c0 e4 f0 30 30 00 00 00 00 00 00 00 00 &4903 0f 0f 0f 0f 07 07 07 07 80 80 80 80 80 80 80 80 &4913 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4923 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4933 0f 0f 1e 1e 2d 0f 07 07 3c 48 00 00 80 80 08 08 &4943 69 c3 03 01 01 01 01 01 0f 0f 0f 0f 1e 1e 1e 1e &4953 80 08 08 08 00 00 00 00 00 00 00 00 00 00 00 00 &4963 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4973 00 00 00 00 00 00 00 00 fe fe 74 12 03 17 07 0f &4983 f0 f4 f0 e1 c3 0f 0f 4b 0f 87 87 0f 0f 1e 1e 2d &4993 96 b4 e1 87 c3 a5 1e 0f 86 84 0c 08 08 00 00 80 &49a3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &49b3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &49c3 00 33 77 ff f0 ff ff fe 00 88 cb c7 cb c3 cf cb &49d3 00 07 0f 4b 0f 1e 1e 0f 9e 1e 96 4b 87 0f 0f 87 &49e3 f0 87 1e 1e 2d 4b 1e 0e 0f 0f 0f d2 48 80 00 00 &49f3 1e 3e 48 00 00 00 00 00 c0 00 00 00 00 00 00 00 &4a03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4a13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4a23 00 00 00 00 00 00 00 34 00 00 00 00 00 00 f0 f0 &4a33 00 00 00 00 00 00 03 0f 00 00 00 00 00 10 3c 3c &4a43 00 00 00 30 f0 f0 f0 f0 00 00 00 00 80 80 80 80 ; sprite_19_data (SPRITE_SOMERSAULT_ONE) &4a53 38 02 10 ; min_x = &10, max_x = &38, top_group = &02 &4a56 01 01 10 10 76 ff ff 33 0c c0 c0 c0 f3 f1 f1 f9 &4a66 00 00 00 77 ff ff cc 00 00 00 ee ff ff 00 00 00 &4a76 00 00 00 88 00 00 00 00 e0 e0 60 00 01 01 01 01 &4a86 0e 0e 0e 0e 0e 0c 0c 0c 00 00 00 00 00 00 00 00 &4a96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4aa6 01 07 4b 0f 96 d2 c3 c0 1e 0f 0f 0f 0f 0f 0e 0e &4ab6 0c 0c 0c 08 08 00 00 00 60 60 60 60 20 00 00 00 &4ac6 00 00 00 00 00 00 00 00 03 03 03 03 01 01 01 00 &4ad6 1e 1e 1e 2d 2d 2d 1e 1e 25 03 0b 0b 09 0d 0c 0c &4ae6 0c 0c 48 c0 c0 c0 e0 60 00 00 00 00 00 00 00 00 &4af6 00 00 01 01 01 03 03 03 07 87 87 4b 4b 2d 2d 2d &4b06 0f 2d 0f 0f 4b 4b 0f 2d 79 68 08 08 08 08 0c 0c &4b16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4b26 00 00 00 00 00 00 03 07 00 00 11 11 07 0f 0f 0f &4b36 fd fe ff fd f1 f2 f2 78 88 80 88 80 88 88 80 80 &4b46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4b56 00 00 00 00 00 00 10 00 00 00 00 00 00 c0 40 73 &4b66 00 00 00 00 00 00 00 00 ; sprite_1a_data (SPRITE_SOMERSAULT_TWO) &4b6e 38 00 10 ; min_x = &10, max_x = &38, top_group = &00 &4b71 00 00 11 77 ff ff 33 00 00 11 ff ff ff ff ff 33 &4b81 00 ff ff ff ff ff ff ee 00 00 ff ff ff ff cc 00 &4b91 00 00 00 cc ee 88 00 00 00 00 00 00 00 00 00 00 &4ba1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4bb1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4bc1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4bd1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4be1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4bf1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4c01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4c11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4c21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4c31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4c41 10 00 00 00 00 00 00 00 80 00 00 00 00 00 00 00 &4c51 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4c61 00 00 30 70 f0 f0 e0 c0 01 07 87 87 1e 1e 1e 1c &4c71 c3 c3 c3 a7 87 87 87 87 10 08 08 08 08 08 08 00 &4c81 00 00 00 00 00 00 00 00 01 01 01 01 00 00 00 00 &4c91 1e 0f 0f 0f 0f 0f 07 03 2d a5 87 4b 4b 2d 69 69 &4ca1 3d 3d 3d 78 78 f0 f2 72 c4 e6 ea e4 e6 ea c8 cc &4cb1 00 00 00 00 00 00 01 01 03 07 0f 1e 1e 0f 2d 0f &4cc1 0f 0f 0f 0f 0f 0f 0f 1e 08 08 0c 0c 0e 0e 1f 1f &4cd1 00 00 00 00 40 80 80 c4 ; sprite_1b_data (SPRITE_SOMERSAULT_THREE) &4cd9 30 00 10 ; min_x = &10, max_x = &30, top_group = &00 &4cdc 00 00 00 77 ff ff 33 00 00 33 ff ff ff ff ff 77 &4cec 00 88 ff ff ff ff ff 88 00 00 00 cc cc 88 00 00 &4cfc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4d0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4d1c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4d2c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4d3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4d4c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4d5c 00 00 00 00 00 00 00 00 70 72 33 30 33 30 33 11 &4d6c ea e6 e6 fc e2 ee cc 88 00 00 00 00 80 80 00 00 &4d7c 00 00 00 00 00 00 00 00 01 01 01 01 10 30 32 30 &4d8c 1e 0f 0f 0f 0f 87 c2 ea 08 08 08 08 00 00 00 00 &4d9c 07 07 03 03 03 01 01 00 78 3c 87 0e 0e 0c 08 00 &4dac 87 a5 96 1e 1e 1e 0f 0f 0c 0c 0c 0c 0c 0c 0c 0c &4dbc 07 07 07 16 34 34 34 07 03 03 07 0f 87 c3 e1 f0 &4dcc 0f 0f 0f 1e 2d 4b 0f 87 08 80 0c 0c 0c 0c 0c 0c &4ddc c0 e0 f0 70 30 21 21 07 00 00 00 00 01 01 01 03 &4dec 00 00 00 0f 0f 0f 0f 0f 00 00 00 00 00 00 08 08 ; sprite_1c_data (SPRITE_SOMERSAULT_FOUR) &4dfc 30 00 10 ; min_x = &10, max_x = &30, top_group = &00 &4dff 00 00 00 33 77 ff ff 11 00 00 ff ff ff ff ff ff &4e0f 00 00 ff ff ff ff ff cc 00 00 88 ff ff ee 88 00 &4e1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4e2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4e3f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4e4f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4e5f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4e6f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4e7f 40 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 &4e8f 0f 0f 00 00 00 00 00 00 0c 08 00 00 00 00 00 00 &4e9f fa fc f4 fb fd 75 75 20 c3 c3 87 87 87 16 03 03 &4eaf 1e 1e 96 87 87 0f 0f 0f 0f 0f 0f 87 87 4b 4a 48 &4ebf 00 00 00 00 00 10 76 72 16 12 10 10 10 12 da da &4ecf 87 87 87 87 87 c3 c3 a5 08 0c 0e 0e 0f 0f 0f 0f &4edf 00 00 00 00 00 00 00 00 00 01 21 30 34 34 34 34 &4eef 0f 0f 0f 0f 0e 0c 0e 87 08 08 00 00 00 00 00 08 &4eff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4f0f 00 00 00 00 00 03 07 07 c0 c0 e0 e0 e0 e8 4c 0c ; sprite_1d_data (SPRITE_SOMERSAULT_FIVE) &4f1f 38 01 10 ; min_x = &10, max_x = &38, top_group = &01 &4f22 00 00 00 11 77 77 00 00 00 00 ff ff ff ff ff 11 &4f32 00 00 ff ff ff ff ff ff 00 00 88 ff ff ff ee 00 &4f42 00 00 00 88 cc cc 00 00 00 00 00 00 00 00 00 00 &4f52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4f62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4f72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4f82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &4f92 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 &4fa2 2d 2d 69 43 03 00 00 00 0e 0e 0c 0c 08 00 00 00 &4fb2 07 07 07 42 52 70 30 10 00 00 00 00 00 80 c0 c0 &4fc2 03 03 03 03 03 01 01 01 5a 1e 1e 0f 1e 1e 3c 2d &4fd2 e1 f0 f0 3c 0f 0f 0f 0e 4b c3 c3 87 0f 07 07 07 &4fe2 00 00 00 00 00 80 c0 c0 01 03 03 03 03 03 03 03 &4ff2 2c 0e 0e 0f 87 87 4b 4b 00 00 10 30 70 c3 07 87 &5002 00 00 80 80 0c 0e 0e 0e 00 00 00 00 00 00 00 00 &5012 b1 51 11 11 10 00 00 01 fc fb f1 f4 f4 f1 f0 e0 &5022 00 00 80 80 00 00 00 00 00 00 00 00 00 00 00 00 &5032 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 70 &5042 00 00 00 00 66 ff f0 f7 00 00 00 00 00 00 00 00 &5052 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_1e_data (SPRITE_WALKING_ONE) &5062 38 02 08 ; min_x = &08, max_x = &38, top_group = &02 &5065 03 03 33 30 70 70 70 71 0f 0e 0c 91 f7 f7 ee 88 &5075 00 77 ff ff ff 88 00 00 10 98 fe ff ff 77 11 00 &5085 0e 0e 0e 1f 7d f8 f0 f8 00 00 00 88 cc ee e2 c0 &5095 00 00 01 01 01 03 03 03 0f 0f 0f 0f 0f 0f 0f 0f &50a5 0f 0f 0c 08 08 08 00 00 0f 87 43 21 21 21 21 10 &50b5 08 0c 0c 0c 0c 0c 0e 0e 00 00 00 00 00 00 00 00 &50c5 00 00 00 00 00 00 00 00 01 01 01 03 03 07 07 0f &50d5 f0 5a 5a 4b c3 87 0f 0f e0 0e 0e 87 87 4b 4b 4b &50e5 00 00 00 00 00 00 08 08 00 00 00 00 00 00 00 00 &50f5 00 00 00 00 00 00 00 00 03 03 01 10 01 01 10 10 &5105 3c 3c 3e 0f a5 4b 87 e1 c7 2d 0e 0e 0e 0e 0e 68 &5115 1e 2e 86 00 00 00 00 00 00 00 00 00 00 00 00 00 &5125 00 00 00 00 00 00 00 00 03 07 07 16 07 07 07 07 &5135 e1 69 69 2d 0f 87 5e 3c 0c 0e 0f 3c 78 f0 f0 e3 &5145 00 00 00 08 7c 3c 3c 3c 00 60 f0 f0 f0 f0 e0 00 &5155 00 00 00 00 00 00 00 00 10 20 00 00 00 00 00 01 &5165 fe fd fc fa fa f0 f0 f0 80 88 c8 c0 80 88 80 00 &5175 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &5185 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 &5195 00 00 00 00 33 77 f8 f3 00 00 00 00 00 88 80 88 &51a5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; sprite_1f_data (SPRITE_WALKING_TWO) &51b5 38 02 10 ; min_x = &10, max_x = &38, top_group = &02 &51b8 07 07 07 07 61 70 70 70 00 00 33 77 ff ee cc 00 &51c8 03 03 8b cf cf 30 30 30 08 08 08 08 c4 f3 f1 f1 &51d8 00 00 00 00 00 00 88 00 07 07 07 07 07 07 07 07 &51e8 2d 58 48 08 08 08 00 00 0f 0f 87 87 87 43 43 03 &51f8 00 00 00 08 08 08 08 08 00 00 00 00 00 00 00 00 &5208 12 03 03 03 03 03 07 07 f0 3c 4b 4b 87 87 0f 0f &5218 84 0c 84 86 86 0f 0f 0f 00 00 00 00 00 00 00 00 &5228 00 00 00 00 00 00 00 00 07 07 03 21 12 03 21 30 &5238 78 78 2d 2f 87 0f 0f 87 c3 0f 0d 0c 0c 0c 0c c0 &5248 3c 2e 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 &5258 16 07 0f 2d 0f 1e 0f 0f c3 c3 c3 69 69 0f 9e 78 &5268 08 0c 0e 0f 69 e1 e1 e1 00 00 00 00 18 78 78 3c &5278 00 00 40 e0 e0 e0 c0 80 71 11 51 11 11 10 10 12 &5288 fc fb f9 f4 f4 f1 f0 e0 00 00 80 80 00 00 00 00 &5298 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &52a8 00 00 00 00 00 00 11 10 00 00 00 00 66 ff f0 f7 &52b8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &52c8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &52d8 00 00 00 00 00 00 00 00 ; plot_rank &52e0 a5 70 LDA &70 ; screen_address_low &52e2 48 PHA ; screen_address_low &52e3 a5 71 LDA &71 ; screen_address_high &52e5 48 PHA ; screen_address_high &52e6 a9 60 LDA #&60 ; &6080 &52e8 85 71 STA &71 ; screen_address_high &52ea a9 80 LDA #&80 &52ec 85 70 STA &70 ; screen_address_low &52ee 20 f8 52 JSR &52f8 ; plot_rank_without_preserving_screen_address &52f1 68 PLA ; screen_address_high &52f2 85 71 STA &71 ; screen_address_high &52f4 68 PLA ; screen_address_low &52f5 85 70 STA &70 ; screen_address_low &52f7 60 RTS ; plot_rank_without_preserving_screen_address &52f8 a0 11 LDY #&11 &52fa ad fb 0d LDA &0dfb ; computer_skill &52fd 4a LSR A &52fe f0 2f BEQ &532f ; plot_rank_loop # Plot "NOVICE" instead of "DAN" &5300 c9 0a CMP #&0a &5302 90 0e BCC &5312 ; not_10th_dan &5304 a9 01 LDA #&01 ; "1" &5306 20 9a 53 JSR &539a ; plot_character &5309 a9 00 LDA #&00 ; "0" &530b 20 9a 53 JSR &539a ; plot_character &530e 38 SEC &530f 4c 1b 53 JMP &531b ; consider_plotting_suffix ; not_10th_dan &5312 48 PHA ; dan &5313 20 9a 53 JSR &539a ; plot_character &5316 68 PLA ; dan &5317 c9 04 CMP #&04 &5319 90 04 BCC &531f ; plot_dan_loop ; consider_plotting_suffix &531b a0 04 LDY #&04 &531d b0 10 BCS &532f ; plot_dan_loop # Plot "th" as part of "DAN" &531f 0a ASL A &5320 a8 TAY &5321 b9 3e 53 LDA &533e,Y ; rank_suffixes &5324 20 9a 53 JSR &539a ; plot_character # Plot "st", "nd" or "rd" &5327 b9 3f 53 LDA &533f,Y ; rank_suffixes + 1 &532a 20 9a 53 JSR &539a ; plot_character &532d a0 02 LDY #&02 # Plot "DAN" ; plot_rank_loop &532f b9 3b 53 LDA &533b,Y ; rank_text &5332 30 06 BMI &533a ; leave &5334 20 9a 53 JSR &539a ; plot_character &5337 88 DEY &5338 10 f5 BPL &532f ; plot_rank_loop ; leave &533a 60 RTS ; rank_text &533b 10 0f 0e ; "DAN" # Stored backwards ; rank_suffixes &533e 16 12 ; "th" # Stored backwards &5340 11 12 ; "st" &5342 13 14 ; "nd" &5344 15 14 ; "rd" &5346 ff &5347 0d 0c 0b 0a 00 10 ; "th" # Stored backwards ; unused &534d 22 22 00 ; reset_scores &5350 a9 00 LDA #&00 &5352 a2 0b LDX #&0b ; reset_scores_loop &5354 9d b7 53 STA &53b7,X ; scores &5357 ca DEX &5358 10 fa BPL &5354 ; reset_scores_loop &535a 8d ed 0d STA &0ded ; scoring_player ; update_scores &535d ad ed 0d LDA &0ded ; scoring_player &5360 c9 01 CMP #&01 &5362 d0 05 BNE &5369 ; skip_adding_to_player_one_score &5364 a2 02 LDX #&02 # Add to hundreds of player one score &5366 20 ce 53 JSR &53ce ; add_to_score ; skip_adding_to_player_two_score &5369 ad ed 0d LDA &0ded ; scoring_player &536c c9 02 CMP #&02 &536e d0 05 BNE &5375 ; skip_adding_to_player_one_score &5370 a2 08 LDX #&08 # Add to hundreds of player two score &5372 20 ce 53 JSR &53ce ; add_to_score ; skip_adding_to_player_two_score &5375 a9 80 LDA #&80 ; &5e80 &5377 85 70 STA &70 ; screen_address_low &5379 a9 5e LDA #&5e &537b 85 71 STA &71 ; screen_address_high &537d a0 05 LDY #&05 ; plot_player_one_score_loop &537f b9 b7 53 LDA &53b7,Y ; scores &5382 20 9a 53 JSR &539a ; plot_character # Plot player one score &5385 88 DEY &5386 10 f7 BPL &537f ; plot_player_one_score_loop &5388 a9 10 LDA #&10 &538a 85 70 STA &70 ; screen_address_low &538c e6 71 INC &71 ; screen_address_high &538e a0 05 LDY #&05 ; plot_player_two_score_loop &5390 b9 bd 53 LDA &53bd,Y ; scores + 6 &5393 20 9a 53 JSR &539a ; plot_character # Plot player two score &5396 88 DEY &5397 10 f7 BPL &5390 ; plot_player_two_score_loop &5399 60 RTS ; plot_character &539a 0a ASL A &539b 0a ASL A &539c 0a ASL A &539d aa TAX &539e 98 TYA &539f 48 PHA ; tmp_y &53a0 a0 00 LDY #&00 ; plot_character_loop &53a2 bd 00 0c LDA &0c00,X ; font_data &53a5 91 70 STA (&70),Y ; screen_address &53a7 c8 INY &53a8 e8 INX &53a9 c0 08 CPY #&08 &53ab d0 f5 BNE &53a2 ; plot_character_loop &53ad a5 70 LDA &70 ; screen_address_low &53af 18 CLC &53b0 69 08 ADC #&08 &53b2 85 70 STA &70 ; screen_address_low &53b4 68 PLA ; tmp_y &53b5 a8 TAY &53b6 60 RTS ; scores &53b7 00 00 00 00 00 00 &53bd 00 00 00 00 00 00 ; scores_for_offensive_moves &53c3 04 ; MOVE_HIGH_PUNCH # Score 400 or 800 &53c4 04 ; MOVE_CROUCHING_JAB # Score 400 or 800 &53c5 05 ; MOVE_FLYING_KICK # Score 500 or 1000 &53c6 04 ; MOVE_HIGH_KICK # Score 400 or 800 &53c7 01 ; MOVE_MID_KICK # Score 100 or 200 &53c8 01 ; MOVE_SHORT_JAB_KICK # Score 100 or 200 &53c9 02 ; MOVE_FORWARD_SWEEP # Score 200 or 400 &53ca 04 ; MOVE_BACKWARDS_SWEEP # Score 400 or 800 &53cb 05 ; MOVE_ROUNDHOUSE # Score 500 or 1000 &53cc 04 ; MOVE_HIGH_BACK_KICK # Score 400 or 800 &53cd 03 ; MOVE_STANDING_JAB # Score 300 or 600 ; add_to_score &53ce ac 01 01 LDY &0101 ; offensive_move_offset &53d1 b9 c3 53 LDA &53c3,Y ; scores_for_offensive_moves &53d4 ac 00 01 LDY &0100 ; points_for_hit &53d7 c0 02 CPY #&02 &53d9 d0 01 BNE &53dc ; skip_doubling &53db 0a ASL A # Double score for full hit ; skip_doubling &53dc 18 CLC &53dd 7d b7 53 ADC &53b7,X ; scores &53e0 c9 0a CMP #&0a &53e2 b0 04 BCS &53e8 ; reduce_overflow &53e4 9d b7 53 STA &53b7,X ; scores &53e7 60 RTS ; reduce_overflow &53e8 38 SEC &53e9 e9 0a SBC #&0a &53eb 9d b7 53 STA &53b7,X ; scores &53ee e8 INX &53ef fe b7 53 INC &53b7,X ; scores &53f2 bd b7 53 LDA &53b7,X ; scores &53f5 c9 0a CMP #&0a &53f7 b0 ef BCS &53e8 ; reduce_overflow &53f9 60 RTS ; unused # &53fa - &53ff is an unused copy of &53f4 - &53f9 &53fa 53 &53fb c9 0a CMP #&0a &53fd b0 ef BCS &53ee &53ff 60 RTS ; offensive_moves &5400 03 ; &00 : MOVE_HIGH_PUNCH &5401 06 ; &01 : MOVE_CROUCHING_JAB &5402 11 ; &02 : MOVE_FLYING_KICK &5403 13 ; &03 : MOVE_HIGH_KICK &5404 12 ; &04 : MOVE_MID_KICK &5405 16 ; &05 : MOVE_SHORT_JAB_KICK &5406 14 ; &06 : MOVE_FORWARD_SWEEP &5407 1c ; &07 : MOVE_BACKWARDS_SWEEP &5408 18 ; &08 : MOVE_ROUNDHOUSE &5409 19 ; &09 : MOVE_HIGH_BACK_KICK &540a 26 ; &0a : MOVE_STANDING_JAB # Offensive move flags # ==================== # 8....... if set, flip players_flip, i.e. attack backwards, not forwards # .42..... attack distances table to use # ....8421 full hit distance base ; offensive_moves_flags &540b 43 ; MOVE_HIGH_PUNCH : forwards, use distance table 2 (top attack), full hit distance 3 &540c 21 ; MOVE_CROUCHING_JAB : forwards, use distance table 1 (middle attack), full hit distance 1 &540d 40 ; MOVE_FLYING_KICK : forwards, use distance table 2 (top attack), full hit distance 0 &540e 41 ; MOVE_HIGH_KICK : forwards, use distance table 2 (top attack), full hit distance 1 &540f 20 ; MOVE_MID_KICK : forwards, use distance table 1 (middle attack), full hit distance 0 &5410 02 ; MOVE_SHORT_JAB_KICK : forwards, use distance table 0 (bottom attack), full hit distance 2 &5411 00 ; MOVE_FORWARD_SWEEP : forwards, use distance table 0 (bottom attack), full hit distance 0 &5412 00 ; MOVE_BACKWARDS_SWEEP : forwards, use distance table 0 (bottom attack), full hit distance 0 &5413 41 ; MOVE_ROUNDHOUSE : forwards, use distance table 2 (top attack), full hit distance 1 &5414 c1 ; MOVE_HIGH_BACK_KICK : backwards, use distance table 2 (top attack), full hit distance 1 &5415 23 ; MOVE_STANDING_JAB : forwards, use distance table 1 (middle attack), full hit distance 3 ; offensive_moves_partial_hit_distances # In bytes, plus one &5416 09 ; MOVE_HIGH_PUNCH : 1 * 8 + 1 &5417 09 ; MOVE_CROUCHING_JAB : 1 * 8 + 1 &5418 09 ; MOVE_FLYING_KICK : 1 * 8 + 1 &5419 09 ; MOVE_HIGH_KICK : 1 * 8 + 1 &541a 11 ; MOVE_MID_KICK : 2 * 8 + 1 &541b 09 ; MOVE_SHORT_JAB_KICK : 1 * 8 + 1 &541c 11 ; MOVE_FORWARD_SWEEP : 2 * 8 + 1 &541d 11 ; MOVE_BACKWARDS_SWEEP : 2 * 8 + 1 &541e 09 ; MOVE_ROUNDHOUSE : 1 * 8 + 1 &541f 09 ; MOVE_HIGH_BACK_KICK : 1 * 8 + 1 &5420 11 ; MOVE_STANDING_JAB : 2 * 8 + 1 ; unused &5421 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 # Attack distances tables # ======================= # Three tables, each indexed by sprite. # # 8421.... distance if players are facing same direction # ....8421 distance if players are facing opposite direction # # If all bits set in a nibble, not hit, otherwise full hit distance ; attack_distances_tables ; 0 1 2 3 4 5 6 7 8 9 a b c d e f # Table 0 (bottom attacks) &5430 14 26 25 34 34 34 04 14 23 05 15 15 05 14 15 34 ; &00 # Used for MOVE_SHORT_JAB_KICK, &5440 ff ff 25 34 24 25 16 25 35 35 ff ff ff ff 23 24 ; &10 # MOVE_FORWARD_SWEEP, &5450 23 00 00 00 00 00 00 00 ; &20 # and MOVE_BACKWARDS_SWEEP ; ; 0 1 2 3 4 5 6 7 8 9 a b c d e f # Table 1 (middle attacks) &5458 26 26 16 15 15 15 27 36 45 17 27 27 1f 2f 26 25 ; &00 # Used for MOVE_CROUCHING_JAB, &5468 ff ff 35 53 36 36 35 44 15 35 ff ff ff 45 35 35 ; &10 # MOVE_MID_KICK, &5478 35 00 00 00 00 00 00 00 ; &20 # and MOVE_STANDING_JAB ; ; 0 1 2 3 4 5 6 7 8 9 a b c d e f # Table 2 (top attacks) &5480 26 27 27 ff 1f ff ff ff ff 27 26 26 ff 26 2f 45 ; &00 # Used for MOVE_HIGH_PUNCH, MOVE_FLYING_KICK, &5490 35 36 45 ff 26 ff ff ff ff 53 44 44 44 35 35 35 ; &10 # MOVE_HIGH_KICK, MOVE_ROUNDHOUSE, &54a0 35 00 00 00 00 00 00 00 ; &20 # and MOVE_HIGH_BACK_KICK ; restore_bottom_part_of_background_and_wipe_play_area &54a8 a9 00 LDA #&00 &54aa a8 TAY &54ab 85 90 STA &90 ; target_address_low &54ad 85 92 STA &92 ; source_address_low &54af a9 6c LDA #&6c ; &6c00 &54b1 85 91 STA &91 ; target_address_high &54b3 a9 58 LDA #&58 ; &5800 = background_buffer &54b5 85 93 STA &93 ; source_address_high &54b7 a2 03 LDX #&03 ; restore_bottom_part_of_background_loop &54b9 b1 92 LDA (&92),Y ; source_address &54bb 91 90 STA (&90),Y ; target_address &54bd c8 INY &54be d0 f9 BNE &54b9 ; restore_bottom_part_of_background_loop &54c0 e6 91 INC &91 ; target_address_high &54c2 e6 93 INC &93 ; source_address_high &54c4 ca DEX &54c5 d0 f2 BNE &54b9 ; restore_bottom_part_of_background_loop &54c7 84 90 STY &90 ; target_address_low &54c9 c6 91 DEC &91 ; target_address_high &54cb 98 TYA &54cc a0 80 LDY #&80 &54ce a2 0a LDX #&0a ; wipe_play_area_loop &54d0 91 90 STA (&90),Y ; target_address &54d2 c8 INY &54d3 d0 fb BNE &54d0 ; wipe_play_area_loop &54d5 e6 91 INC &91 ; target_address_high &54d7 ca DEX &54d8 d0 f6 BNE &54d0 ; wipe_play_area_loop &54da 60 RTS ; unused &54db 00 00 00 00 00 ; player_two_sprite_min_x &54e0 00 ; player_two_top_group &54e1 02 ; player_two_sprite_max_x &54e2 30 ; player_two_sprite_width &54e3 30 ; player_one_sprite_min_x &54e4 08 ; player_one_top_group &54e5 04 ; player_one_sprite_max_x &54e6 28 ; player_one_sprite_width &54e7 20 ; unused &54e8 00 00 00 00 00 03 00 32 00 ; player_two_state ; player_two_frame_timer &54f1 00 ; player_two_move &54f2 00 ; player_two_frame &54f3 00 ; player_two_move_state &54f4 03 ; player_two_sprite &54f5 04 ; unused &54f6 00 00 00 ; player_one_state ; player_one_frame_timer &54f9 00 ; player_one_move &54fa 2a ; player_one_frame &54fb ab ; player_one_move_state &54fc 03 ; player_one_sprite &54fd 32 ; unused &54fe 00 00 ; frames_sprite_table ; move_00_frames (MOVE_NONE) &5500 00 ; SPRITE_STANDING # &5600 01 ; 1 frame &5501 ff ; FRAME_END # &5601 00 &5502 ff ; FRAME_END # &5602 00 ; (unused) ; move_01_frames (MOVE_JUMP) &5503 ff ; FRAME_END # &5603 01 &5504 0f ; SPRITE_BENDING_KNEES # &5604 01 ; 1 frame &5505 10 ; SPRITE_JUMPING # &5605 04 ; 4 frames &5506 fe ; FRAME_REVERSE # &5606 00 # Reverse jump &5507 ff ; FRAME_END # &5607 00 ; (unused) &5508 ff ; FRAME_END # &5608 00 ; (unused) ; move_03_frames (MOVE_HIGH_PUNCH) &5509 ff ; FRAME_END # &5609 01 &550a 09 ; SPRITE_PREPARING_TO_PUNCH # &560a 01 ; 1 frame &550b f0 ; FRAME_HIT_CHECK # &560b 01 &550c 0b ; SPRITE_HIGH_PUNCH # &560c 01 ; 1 frame &550d ff ; FRAME_END # &560d 00 # Hold high punch &550e ff ; FRAME_END # &560e 00 ; (unused) ; move_02_frames (MOVE_WALK_FORWARDS) &550f ff ; FRAME_END # &560f 01 &5510 1e ; SPRITE_WALKING_ONE # &5610 01 ; 1 frame &5511 f9 ; FRAME_MOVE # &5611 08 ; forward 4 pixels &5512 1f ; SPRITE_WALKING_TWO # &5612 01 ; 1 frame &5513 20 ; SPRITE_WALKING_THREE # &5613 01 ; 1 frame &5514 f9 ; FRAME_MOVE # &5614 08 ; forward 4 pixels &5515 00 ; SPRITE_STANDING # &5615 00 ; 0 frames &5516 fd ; FRAME_END_AND_RESTART # &5616 00 # Repeat walk forwards &5517 ff ; FRAME_END # &5617 00 ; (unused) &5518 ff ; FRAME_END # &5618 00 ; (unused) ; move_06_frames (MOVE_CROUCHING_JAB) &5519 ff ; FRAME_END # &5619 01 &551a 08 ; SPRITE_CROUCHING_JAB # &561a 01 ; 1 frame &551b f0 ; FRAME_HIT_CHECK # &561b 01 &551c 08 ; SPRITE_CROUCHING_JAB # &561c 01 ; 1 frame &551d ff ; FRAME_END # &561d 00 # Hold crouching jab &551e ff ; FRAME_END # &561e 00 ; (unused) ; move_04_frames (MOVE_CROUCH) &551f 0c ; SPRITE_CROUCH # &561f 01 ; 1 frame &5520 ff ; FRAME_END # &5620 00 # Hold crouch &5521 ff ; FRAME_END # &5621 00 ; (unused) ; move_0c_frames (MOVE_BACK_SOMERSAULT) &5522 ff ; FRAME_END # &5622 01 &5523 0f ; SPRITE_BENDING_KNEES # &5623 01 ; 1 frame &5524 f9 ; FRAME_MOVE # &5624 88 ; backward 4 pixels &5525 1d ; SPRITE_SOMERSAULT_FIVE # &5625 01 ; 1 frame &5526 f9 ; FRAME_MOVE # &5626 90 ; backward 8 pixels &5527 1c ; SPRITE_SOMERSAULT_FOUR # &5627 01 ; 1 frame &5528 f9 ; FRAME_MOVE # &5628 90 ; backward 8 pixels &5529 1b ; SPRITE_SOMERSAULT_THREE # &5629 01 ; 1 frame &552a f9 ; FRAME_MOVE # &562a 90 ; backward 8 pixels &552b 1a ; SPRITE_SOMERSAULT_TWO # &562b 01 ; 1 frame &552c f9 ; FRAME_MOVE # &562c 90 ; backward 8 pixels &552d 19 ; SPRITE_SOMERSAULT_ONE # &562d 01 ; 1 frame &552e 0f ; SPRITE_BENDING_KNEES # &562e 01 ; 1 frame &552f fd ; FRAME_END_AND_RESTART # &562f 00 # Repeat back somersault &5530 ff ; FRAME_END # &5630 00 ; (unused) &5531 ff ; FRAME_END # &5631 00 ; (unused) ; move_08_frames (MOVE_WALK_BACKWARDS) &5532 ff ; FRAME_END # &5632 01 &5533 f9 ; FRAME_MOVE # &5633 88 ; backward 4 pixels &5534 20 ; SPRITE_WALKING_THREE # &5634 01 ; 1 frame &5535 1f ; SPRITE_WALKING_TWO # &5635 01 ; 1 frame &5536 f9 ; FRAME_MOVE # &5636 88 ; backward 4 pixels &5537 1e ; SPRITE_WALKING_ONE # &5637 01 ; 1 frame &5538 00 ; SPRITE_STANDING # &5638 01 ; 1 frame &5539 fd ; FRAME_END_AND_RESTART # &5639 00 # Repeat walk forwards &553a ff ; FRAME_END # &563a 00 ; (unused) &553b ff ; FRAME_END # &563b 00 ; (unused) ; move_09_frames (MOVE_FORWARD_SOMERSAULT) &553c ff ; FRAME_END # &563c 01 &553d 0f ; SPRITE_BENDING_KNEES # &563d 01 ; 1 frame &553e 19 ; SPRITE_SOMERSAULT_ONE # &563e 01 ; 1 frame &553f f9 ; FRAME_MOVE # &563f 10 ; forward 8 pixels &5540 1a ; SPRITE_SOMERSAULT_TWO # &5640 01 ; 1 frame &5541 f9 ; FRAME_MOVE # &5641 10 ; forward 8 pixels &5542 1b ; SPRITE_SOMERSAULT_THREE # &5642 01 ; 1 frame &5543 f9 ; FRAME_MOVE # &5643 10 ; forward 8 pixels &5544 1c ; SPRITE_SOMERSAULT_FOUR # &5644 01 ; 1 frame &5545 f9 ; FRAME_MOVE # &5645 10 ; forward 8 pixels &5546 1d ; SPRITE_SOMERSAULT_FIVE # &5646 01 ; 1 frame &5547 f9 ; FRAME_MOVE # &5647 08 ; forward 4 pixels &5548 0f ; SPRITE_BENDING_KNEES # &5648 01 ; 1 frame &5549 fd ; FRAME_END_AND_RESTART # &5649 00 # Repeat forward somersault &554a ff ; FRAME_END # &564a 00 ; (unused) &554b ff ; FRAME_END # &564b 00 ; (unused) ; move_11_frames (MOVE_FLYING_KICK) &554c ff ; FRAME_END # &564c 01 &554d 0f ; SPRITE_BENDING_KNEES # &564d 01 ; 1 frame &554e 01 ; SPRITE_KICK_ONE # &564e 01 ; 1 frame &554f 10 ; SPRITE_JUMPING # &564f 01 ; 1 frame &5550 f9 ; FRAME_MOVE # &5650 08 ; forward 4 pixels &5551 f0 ; FRAME_HIT_CHECK # &5651 00 &5552 11 ; SPRITE_FLYING_KICK # &5652 04 ; 4 frames &5553 fe ; FRAME_REVERSE # &5653 00 # Reverse flying kick &5554 ff ; FRAME_END # &5654 00 ; (unused) &5555 ff ; FRAME_END # &5655 00 ; (unused) ; move_13_frames (MOVE_HIGH_KICK) &5556 ff ; FRAME_END # &5656 01 &5557 01 ; SPRITE_KICK_ONE # &5657 01 ; 1 frame &5558 03 ; SPRITE_KICK_TWO # &5658 01 ; 1 frame &5559 f0 ; FRAME_HIT_CHECK # &5659 00 &555a 05 ; SPRITE_HIGH_KICK # &565a 01 ; 1 frame &555b ff ; FRAME_END # &565b 00 # Hold high kick &555c ff ; FRAME_END # &565c 00 ; (unused) ; move_12_frames (MOVE_MID_KICK) &555d ff ; FRAME_END # &565d 01 &555e 01 ; SPRITE_KICK_ONE # &565e 01 ; 1 frame &555f 03 ; SPRITE_KICK_TWO # &565f 01 ; 1 frame &5560 f0 ; FRAME_HIT_CHECK # &5660 00 &5561 04 ; SPRITE_MID_KICK # &5661 01 ; 1 frame &5562 ff ; FRAME_END # &5662 00 # Hold mid kick &5563 ff ; FRAME_END # &5663 00 ; (unused) ; move_16_frames (MOVE_SHORT_JAB_KICK) &5564 ff ; FRAME_END # &5664 01 &5565 01 ; SPRITE_KICK_ONE # &5665 01 ; 1 frame &5566 f0 ; FRAME_HIT_CHECK # &5666 00 &5567 02 ; SPRITE_SHORT_JAB_KICK # &5667 01 ; 1 frame &5568 ff ; FRAME_END # &5668 00 # Hold short jab kick &5569 ff ; FRAME_END # &5669 00 ; (unused) ; move_14_frames (MOVE_FORWARD_SWEEP) &556a 0c ; SPRITE_CROUCH # &566a 01 ; 1 frame &556b 06 ; SPRITE_SWEEP_ONE # &566b 04 ; 4 frames &556c f0 ; FRAME_HIT_CHECK # &566c 00 &556d 07 ; SPRITE_SWEEP_TWO # &566d 01 ; 1 frame &556e ff ; FRAME_END # &566e 00 # Hold forward sweep &556f ff ; FRAME_END # &566f 00 ; (unused) ; move_1c_frames (MOVE_BACKWARDS_SWEEP) &5570 ff ; FRAME_END # &5670 01 &5571 0c ; SPRITE_CROUCH # &5671 01 ; 1 frame &5572 fb ; FRAME_FLIP # &5672 00 &5573 f9 ; FRAME_MOVE # &5673 a0 ; backward 32 pixels &5574 06 ; SPRITE_SWEEP_ONE # &5674 04 ; 4 frames &5575 f0 ; FRAME_HIT_CHECK # &5675 00 &5576 07 ; SPRITE_SWEEP_TWO # &5676 01 ; 1 frame &5577 ff ; FRAME_END # &5677 00 # Hold backwards sweep &5578 ff ; FRAME_END # &5678 00 ; (unused) ; move_18_frames (MOVE_ROUNDHOUSE) &5579 ff ; FRAME_END # &5679 01 &557a 14 ; SPRITE_ROUNDHOUSE_ONE # &567a 01 ; 1 frame &557b fa ; FRAME_FLIP_ON_REVERSE # &567b 00 # About face if roundhouse stopped early &557c f8 ; FRAME_MOVE_ON_REVERSE # &567c 98 ; backward 24 pixels &557d 15 ; SPRITE_ROUNDHOUSE_TWO # &567d 01 ; 1 frame &557e 16 ; SPRITE_ROUNDHOUSE_THREE # &567e 01 ; 1 frame &557f 17 ; SPRITE_ROUNDHOUSE_FOUR # &567f 01 ; 1 frame &5580 fc ; FRAME_END_AS_REACHING_KICK # &5680 00 # Hold reaching kick at end of roundhouse &5581 ff ; FRAME_END # &5681 00 ; (unused) &5582 ff ; FRAME_END # &5682 00 ; (unused) ; move_19_frames (MOVE_HIGH_BACK_KICK) &5583 ff ; FRAME_END # &5683 01 &5584 12 ; SPRITE_HIGH_BACK_KICK_ONE # &5684 03 ; 3 frames &5585 f0 ; FRAME_HIT_CHECK # &5685 00 &5586 13 ; SPRITE_HIGH_BACK_KICK_TWO # &5686 01 ; 1 frame &5587 ff ; FRAME_END # &5687 00 # Hold high back kick &5588 ff ; FRAME_END # &5688 00 ; (unused) ; move_28_frames (MOVE_ROUNDHOUSE_BLOCK) &5589 ff ; FRAME_END # &5689 01 &558a 14 ; SPRITE_ROUNDHOUSE_ONE # &568a 01 ; 1 frame &558b 15 ; SPRITE_ROUNDHOUSE_TWO # &568b 01 ; 1 frame &558c fb ; FRAME_FLIP # &568c 00 &558d f9 ; FRAME_MOVE # &568d 98 ; backward 24 pixels &558e 14 ; SPRITE_ROUNDHOUSE_ONE # &568e 01 ; 1 frame &558f f4 ; FRAME_END_AND_STAND # &568f 00 # Stand after roundhouse block &5590 ff ; FRAME_END # &5690 00 ; (unused) &5591 ff ; FRAME_END # &5691 00 ; (unused) ; move_20_frames (MOVE_REACHING_KICK) &5592 ff ; FRAME_END # &5692 01 &5593 01 ; SPRITE_KICK_ONE # &5693 01 ; 1 frame &5594 03 ; SPRITE_KICK_TWO # &5694 01 ; 1 frame &5595 18 ; SPRITE_REACHING_KICK # &5695 01 ; 1 frame &5596 ff ; FRAME_END # &5696 00 # Hold reaching kick &5597 ff ; FRAME_END # &5697 00 ; (unused) ; move_29_frames (MOVE_FALL_BACKWARDS) &5598 ff ; FRAME_END # &5698 01 &5599 ef ; FRAME_PLAY_SOUND # &5699 00 ; sound 0 &559a 2c ; SPRITE_FALLING_BACKWARDS_ONE # &569a 03 ; 3 frames &559b f9 ; FRAME_MOVE # &569b 98 ; backward 24 pixels &559c 2d ; SPRITE_FALLING_BACKWARDS_TWO # &569c 02 ; 2 frames &559d f9 ; FRAME_MOVE # &569d 88 ; backward 8 pixels &559e 2d ; SPRITE_FALLING_BACKWARDS_TWO # &569e 02 ; 2 frames &559f 2e ; SPRITE_FALLEN_BACKWARDS # &569f 01 ; 1 frame &55a0 ef ; FRAME_PLAY_SOUND # &56a0 01 ; sound 1 &55a1 2e ; SPRITE_FALLEN_BACKWARDS # &56a1 03 ; 3 frames &55a2 ef ; FRAME_PLAY_SOUND # &56a2 01 ; sound 1 &55a3 2e ; SPRITE_FALLEN_BACKWARDS # &56a3 01 ; 1 frame &55a4 ff ; FRAME_END # &56a4 00 # Hold fall backwards &55a5 ff ; FRAME_END # &56a5 00 ; (unused) ; move_2a_frames (MOVE_FALL_INWARDS) &55a6 ff ; FRAME_END # &56a6 01 &55a7 f9 ; FRAME_MOVE # &56a7 88 ; backward 8 pixels &55a8 0f ; SPRITE_BENDING_KNEES # &56a8 02 ; 2 frames &55a9 ef ; FRAME_PLAY_SOUND # &56a9 02 ; sound 2 &55aa 0f ; SPRITE_BENDING_KNEES # &56aa 04 ; 4 frames &55ab 32 ; SPRITE_FALLEN_INWARDS # &56ab 01 ; 1 frame &55ac ff ; FRAME_END # &56ac 00 # Hold fall inwards &55ad ff ; FRAME_END # &56ad 00 ; (unused) ; move_2b_frames (MOVE_FALL_FORWARDS) &55ae ff ; FRAME_END # &56ae 01 &55af ef ; FRAME_PLAY_SOUND # &56af 00 ; sound 0 &55b0 0f ; SPRITE_BENDING_KNEES # &56b0 03 ; 3 frames &55b1 2f ; SPRITE_FALLING_FORWARDS_ONE # &56b1 03 ; 3 frames &55b2 ef ; FRAME_PLAY_SOUND # &56b2 01 ; sound 1 &55b3 30 ; SPRITE_FALLING_FORWARDS_TWO # &56b3 03 ; 3 frames &55b4 ef ; FRAME_PLAY_SOUND # &56b4 01 ; sound 1 &55b5 f9 ; FRAME_MOVE # &56b5 08 ; forward 8 pixels &55b6 31 ; SPRITE_FALLEN_FORWARDS # &56b6 01 ; 1 frame &55b7 ff ; FRAME_END # &56b7 00 # Hold fall forwards &55b8 ff ; FRAME_END # &56b8 00 ; (unused) ; move_24_frames (MOVE_HIGH_BLOCK) &55b9 ff ; FRAME_END # &56b9 01 &55ba 0e ; SPRITE_HIGH_BLOCK # &56ba 01 ; 1 frame &55bb ff ; FRAME_END # &56bb 00 # Hold high block &55bc ff ; FRAME_END # &56bc 00 ; (unused) ; move_25_frames (MOVE_LOW_BLOCK) &55bd ff ; FRAME_END # &56bd 01 &55be 0d ; SPRITE_LOW_BLOCK # &56be 01 ; 1 frame &55bf ff ; FRAME_END # &56bf 00 # Hold low block &55c0 ff ; FRAME_END # &56c0 00 ; (unused) ; move_26_frames (MOVE_STANDING_JAB) &55c1 ff ; FRAME_END # &56c1 01 &55c2 09 ; SPRITE_PREPARING_TO_PUNCH # &56c2 01 ; 1 frame &55c3 f0 ; FRAME_HIT_CHECK # &56c3 00 &55c4 0a ; SPRITE_STANDING_JAB # &56c4 01 ; 1 frame &55c5 ff ; FRAME_END # &56c5 00 # Hold standing jab &55c6 ff ; FRAME_END # &56c6 00 ; (unused) ; move_2c_frames (MOVE_BOW_SIDEWAYS) &55c7 00 ; SPRITE_STANDING # &56c7 01 ; 1 frame &55c8 28 ; SPRITE_BOW_SIDEWAYS_ONE # &56c8 04 ; 4 frames &55c9 29 ; SPRITE_BOW_SIDEWAYS_TWO # &56c9 08 ; 08 frames &55ca fe ; FRAME_REVERSE # &56ca 00 # Reverse bow sideways &55cb ff ; FRAME_END # &56cb 00 ; (unused) &55cc ff ; FRAME_END # &56cc 00 ; (unused) ; move_2d_frames (MOVE_BOW_FORWARDS) &55cd ff ; FRAME_END # &56cd 01 &55ce 2a ; SPRITE_FACE_FORWARDS # &56ce 0a ; 10 frames &55cf 2b ; SPRITE_BOW_FORWARDS # &56cf 0a ; 10 frames &55d0 2a ; SPRITE_FACE_FORWARDS # &56d0 01 ; 1 frame &55d1 ff ; FRAME_END # &56d1 00 # Hold bow forwards &55d2 ff ; FRAME_END # &56d2 00 ; (unused) ; move_27_frames (MOVE_CROUCHING_BLOCK) &55d3 ff ; FRAME_END # &56d3 01 &55d4 0c ; SPRITE_CROUCH # &56d4 02 ; 2 frames &55d5 f0 ; FRAME_HIT_CHECK # &56d5 01 &55d6 08 ; SPRITE_CROUCHING_JAB # &56d6 02 ; 2 frames &55d7 ff ; FRAME_END # &56d7 00 # Hold crouching block &55d8 ff ; FRAME_END # &56d8 00 ; (unused) ; move_2e_frames (MOVE_FACE_FORWARDS) &55d9 ff ; FRAME_END # &56d9 01 &55da 2a ; SPRITE_FACE_FORWARDS # &56da 01 ; 1 frame &55db ff ; FRAME_END # &56db 00 # Hold face forwards ; unused &55dc ff ; FRAME_END # &56dc 00 &55dd ff ; FRAME_END # &56dd 00 &55de ff ; FRAME_END # &56de 00 &55df ff ; FRAME_END # &56df 00 &55e0 ff ; FRAME_END # &56e0 00 &55e1 ff ; FRAME_END # &56e1 00 &55e2 ff ; FRAME_END # &56e2 00 &55e3 ff ; FRAME_END # &56e3 00 &55e4 ff ; FRAME_END # &56e4 00 &55e5 ff ; FRAME_END # &56e5 00 &55e6 ff ; FRAME_END # &56e6 00 &55e7 ff ; FRAME_END # &56e7 00 &55e8 ff ; FRAME_END # &56e8 00 &55e9 ff ; FRAME_END # &56e9 00 &55ea ff ; FRAME_END # &56ea 00 &55eb ff ; FRAME_END # &56eb 00 &55ec ff ; FRAME_END # &56ec 00 &55ed ff ; FRAME_END # &56ed 00 &55ee ff ; FRAME_END # &56ee 00 &55ef ff ; FRAME_END # &56ef 00 &55f0 ff ; FRAME_END # &56f0 00 &55f1 ff ; FRAME_END # &56f1 00 &55f2 ff ; FRAME_END # &56f2 00 &55f3 ff ; FRAME_END # &56f3 00 &55f4 ff ; FRAME_END # &56f4 00 &55f5 ff ; FRAME_END # &56f5 00 &55f6 ff ; FRAME_END # &56f6 00 &55f7 ff ; FRAME_END # &56f7 00 &55f8 ff ; FRAME_END # &56f8 00 &55f9 ff ; FRAME_END # &56f9 00 &55fa ff ; FRAME_END # &56fa 00 &55fb ff ; FRAME_END # &56fb 00 &55fc ff ; FRAME_END # &56fc 00 &55fd ff ; FRAME_END # &56fd 00 &55fe ff ; FRAME_END # &56fe 00 &55ff ff ; FRAME_END # &56ff 00 ; frames_data_table ; 0 1 2 3 4 5 6 7 8 9 a b c d e f &5600 01 00 00 01 01 04 00 00 00 01 01 01 01 00 00 01 ; &00 &5610 01 08 01 01 08 00 00 00 00 01 01 01 01 00 00 01 ; &10 &5620 00 00 01 01 88 01 90 01 90 01 90 01 90 01 01 00 ; &20 &5630 00 00 01 88 01 01 88 01 01 00 00 00 01 01 01 10 ; &30 &5640 01 10 01 10 01 10 01 08 01 00 00 00 01 01 01 01 ; &40 &5650 08 00 04 00 00 00 01 01 01 00 01 00 00 01 01 01 ; &50 &5660 00 01 00 00 01 01 00 01 00 00 01 04 00 01 00 00 ; &60 &5670 01 01 00 a0 04 00 01 00 00 01 01 00 98 01 01 01 ; &70 &5680 00 00 00 01 03 00 01 00 00 01 01 01 00 98 01 00 ; &80 &5690 00 00 01 01 01 01 00 00 01 00 03 98 02 88 02 01 ; &90 &56a0 01 03 01 01 00 00 01 88 02 02 04 01 00 00 01 00 ; &a0 &56b0 03 03 01 03 01 08 01 00 00 01 01 00 00 01 01 00 ; &b0 &56c0 00 01 01 00 01 00 00 01 04 08 00 00 00 01 0a 0a ; &c0 &56d0 01 00 00 01 02 01 02 00 00 01 01 00 00 00 00 00 ; &d0 &56e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; &e0 &56f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ; &f0 ; move_to_frame_table &5700 00 ; &00 : MOVE_NONE &5701 03 ; &01 : MOVE_JUMP &5702 0f ; &02 : MOVE_WALK_FORWARDS &5703 09 ; &03 : MOVE_HIGH_PUNCH &5704 1f ; &04 : MOVE_CROUCH &5705 00 ; &05 ; (MOVE_NONE) &5706 19 ; &06 : MOVE_CROUCHING_JAB &5707 00 ; &07 ; (MOVE_NONE) &5708 32 ; &08 : MOVE_WALK_BACKWARDS &5709 3c ; &09 : MOVE_FORWARD_SOMERSAULT &570a 00 ; &0a ; (MOVE_NONE) &570b 00 ; &0b ; (MOVE_NONE) &570c 22 ; &0c : MOVE_BACK_SOMERSAULT &570d 00 ; &0d ; (MOVE_NONE) &570e 00 ; &0e ; (MOVE_NONE) &570f 00 ; &0f ; (MOVE_NONE) &5710 00 ; &10 ; (MOVE_NONE) &5711 4c ; &11 : MOVE_FLYING_KICK &5712 5d ; &12 : MOVE_MID_KICK &5713 56 ; &13 : MOVE_HIGH_KICK &5714 6a ; &14 : MOVE_FORWARD_SWEEP &5715 00 ; &15 ; (MOVE_NONE) &5716 64 ; &16 : MOVE_SHORT_JAB_KICK &5717 00 ; &17 ; (MOVE_NONE) &5718 79 ; &18 : MOVE_ROUNDHOUSE &5719 83 ; &19 : MOVE_HIGH_BACK_KICK &571a 00 ; &1a ; (MOVE_NONE) &571b 00 ; &1b ; (MOVE_NONE) &571c 70 ; &1c : MOVE_BACKWARDS_SWEEP &571d 00 ; &1d ; (MOVE_NONE) &571e 00 ; &1e ; (MOVE_NONE) &571f 00 ; &1f ; (MOVE_NONE) &5720 92 ; &20 : MOVE_REACHING_KICK &5721 00 ; &21 ; (MOVE_NONE) &5722 00 ; &22 ; (MOVE_NONE) &5723 00 ; &23 ; (MOVE_NONE) &5724 b9 ; &24 : MOVE_HIGH_BLOCK &5725 bd ; &25 : MOVE_LOW_BLOCK &5726 c1 ; &26 : MOVE_STANDING_JAB &5727 d3 ; &27 : MOVE_CROUCHING_BLOCK &5728 89 ; &28 : MOVE_ROUNDHOUSE_BLOCK &5729 98 ; &29 : MOVE_FALL_INWARDS &572a a6 ; &2a : MOVE_FALL_INWARDS &572b ae ; &2b : MOVE_FALL_FORWARDS &572c c7 ; &2c : MOVE_BOW_SIDEWAYS &572d cd ; &2d : MOVE_BOW_FORWARDS &572e d9 ; &2e : MOVE_FACE_FORWARDS &572f 00 ; &2f ; (MOVE_NONE) ; sprite_addresses_table &5730 00 28 ; &2800 = sprite_00_data &5732 53 29 ; &2953 = sprite_01_data &5734 d6 2a ; &2ad6 = sprite_02_data &5736 99 2c ; &2c99 = sprite_03_data &5738 24 2e ; &2e24 = sprite_04_data &573a 1f 30 ; &301f = sprite_05_data &573c 1a 32 ; &321a = sprite_06_data &573e e5 32 ; &32e5 = sprite_07_data &5740 50 34 ; &3450 = sprite_08_data &5742 d3 35 ; &35d3 = sprite_09_data &5744 b6 36 ; &36b6 = sprite_0a_data &5746 09 38 ; &3809 = sprite_0b_data &5748 5c 39 ; &395c = sprite_0c_data &574a 1f 3a ; &3a1f = sprite_0d_data &574c 72 3b ; &3b72 = sprite_0e_data &574e c5 3c ; &3cc5 = sprite_0f_data &5750 e0 3d ; &3de0 = sprite_10_data &5752 63 3f ; &3f63 = sprite_11_data &5754 a6 41 ; &41a6 = sprite_12_data &5756 c1 42 ; &42c1 = sprite_13_data &5758 74 44 ; &4474 = sprite_14_data &575a c7 45 ; &45c7 = sprite_15_data &575c 8a 46 ; &468a = sprite_16_data &575e dd 47 ; &47dd = sprite_17_data &5760 a0 48 ; &48a0 = sprite_18_data &5762 53 4a ; &4a53 = sprite_19_data &5764 6e 4b ; &4b6e = sprite_1a_data &5766 d9 4c ; &4cd9 = sprite_1b_data &5768 fc 4d ; &4dfc = sprite_1c_data &576a 1f 4f ; &4f1f = sprite_1d_data &576c 62 50 ; &5062 = sprite_1e_data &576e b5 51 ; &51b5 = sprite_1f_data &5770 00 11 ; &1100 = sprite_20_data &5772 00 00 ; (unused) &5774 00 00 ; (unused) &5776 00 00 ; (unused) &5778 00 00 ; (unused) &577a 00 00 ; (unused) &577c 00 00 ; (unused) &577e 00 00 ; (unused) &5780 1b 12 ; &121b = sprite_28_data &5782 8e 12 ; &128e = sprite_29_data &5784 71 13 ; &1371 = sprite_2a_data &5786 54 14 ; &1454 = sprite_2b_data &5788 17 15 ; &1517 = sprite_2c_data &578a 32 16 ; &1632 = sprite_2d_data &578c 55 17 ; &1755 = sprite_2e_data &578e e8 17 ; &17e8 = sprite_2f_data &5790 8b 18 ; &188b = sprite_30_data &5792 6e 19 ; &196e = sprite_31_data &5794 01 1a ; &1a01 = sprite_32_data ; unused &5796 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &57a6 00 00 00 00 00 00 00 00 00 00 ; offset_flip_table &57b0 40 41 42 43 44 45 46 47 38 39 3a 3b 3c 3d 3e 3f &57c0 30 31 32 33 34 35 36 37 28 29 2a 2b 2c 2d 2e 2f &57d0 20 21 22 23 24 25 26 27 18 19 1a 1b 1c 1d 1e 1f &57e0 10 11 12 13 14 15 16 17 08 09 0a 0b 0c 0d 0e 0f &57f0 00 01 02 03 04 05 06 07 ; unused &57f8 00 00 00 00 00 00 00 00 ; GAME3 ; 00000000 00000000 0F68 ; initial_packed_background_data # Outside &6fd8 ed 07 ff d0 4f 04 d0 2f 05 ff ff d0 4f 04 d0 2f &6fe8 04 d0 ff 05 6f 1f 1f 1f 8f 8f 4f 4f d0 6f 04 ff &6ff8 0f 0f ff 6f ff 0f 0f ff 6f ef 0f ed 2f ff d0 9f &7008 04 d0 4f 05 ff ff d0 9f 04 d0 4f 04 d0 ff 05 1f &7018 2f ef ff df cf cf cf d0 df 04 ff 0f 0f ff df ff &7028 0f 0f ff df df cf ed 2f ff d0 2f 04 d0 9f 05 ff &7038 ff d0 2f 04 d0 9f 04 d0 ff 05 9f 9f 5f 7f ef df &7048 df ef d0 af 04 ff 0f 0f ff af ff 0f 0f ff 8f ff &7058 0f ed 2f ff d0 4f 04 d0 2f 05 ff ff d0 4f 04 d0 &7068 2f 04 d0 ff 05 4f 4f cf 7f 9f ff 6f 2f 2f 1f 1f &7078 1f ff 1f 1f ff 1f ff 1f 1f ff 1f ff 1f 11 ed 2e &7088 ff 9f 9f 8f 4f 4f 4f 2f 2f 2f ff ff 9f 9f 4f 4f &7098 4f 2f 2f 2f d0 ff 05 6f 6f 9f 9f 7f df 9f 9f 5f &70a8 5f 5f ff 3f 0f 0f 7f 5f 7f 0f 0f 7f 5f 5f 5f cc &70b8 ed 05 d0 11 06 00 00 11 11 23 47 47 8f 8f 9f 9f &70c8 9f d0 8f 04 77 77 d0 8f 04 47 33 74 74 77 ed 08 &70d8 ff 2f 2f 9f 9f 9f d0 4f 04 ff ff 2f 2f 9f 9f 9f &70e8 4f 4f 4f d0 ff 05 6f 5f df ef af 9f 9f 9f d0 bf &70f8 04 ff 0f 0f ff bf ff 0f 0f ff bf bf 8f ed 04 77 &7108 f8 ec 03 f7 f2 f0 f1 fb fa fa ff af 5f ef 8f 8f &7118 0f 8f bf 7e 7c 7c fd 6f ef 3f 1f 0f 0f 8f ff ff &7128 ed 09 ff 4f 4f 2f 2f 2f d0 9f 04 ff ff 4f 4f 2f &7138 2f 2f 9f 9f 9f d0 ff 05 0f 0f bf ef df bf af ef &7148 6f 4f 4f 4f ff 0f 0f ff 4f ff 0f 0f ff 0f ff 0f &7158 ed 05 88 80 80 80 88 88 80 80 88 ee ee 9f 9f 0f &7168 0f 2f 2f 2f 4f 4f 9f 9f af df 3f 4f 8f 8f 4f 1f &7178 3e fc fe 33 ed 08 ff 9f 8f 4f 4f 2f 2f 2f 1f 1f &7188 ff ff af 9f 5f 4f 4f 2f 2f 2f d0 ff 05 9f 9f af &7198 6f bf ff 5f 5f 5f 3f 3f 3f ff 0f 0f ff 3f ff 0f &71a8 0f ff 1f ff 0f ed 11 88 88 88 d0 4c 04 8c dd 6e &71b8 bf dd 6e 3f 1d 6e bb dd e6 e2 e2 cc ed 05 11 33 &71c8 77 ee 1f 8f 8f 4f 2f 2f 1f 1f 6e ee bf 8f 4f 2f &71d8 9f 8f 4f 3f d0 ff 04 fe fe 9e 5e 7e fe be 3e 3e &71e8 3e be be be bf ef 0f 0f ef af ef 0f 0f ef af af &71f8 2f 33 ed 19 88 cc 44 88 cc 44 88 88 ed 0a 88 88 &7208 ed 03 88 4c 2e 1f 0f 7f 88 ed 03 88 4c 2e 1f 8f &7218 7f ff ff ff fe f8 f0 f0 f2 f1 f1 ec 08 f8 7f 0f &7228 0f 7f 78 7f 0f 0f 7f 78 78 78 88 ed 0e d0 11 19 &7238 ed 0d 88 ed 09 88 00 00 10 ec 05 f8 f8 f4 fe fa &7248 f5 f7 fa f5 ff fa f5 ff 0f 0f ff f0 ff 0f 0f ff &7258 ec 03 ed 07 ff d0 f8 09 ec 09 ff f0 f7 f7 f4 f4 &7268 f5 f4 f4 f5 f5 f7 f0 ff ed 17 01 07 87 f0 e1 e1 &7278 ec 09 f8 f8 f5 ff fa f5 ff 0f 0f ff f1 ff 0f 0f &7288 ff f1 f1 f0 ed 07 ff ec 12 ff f0 ff ff f0 fe f1 &7298 f6 ff f8 f0 ff f0 ff ed 12 01 01 03 07 d0 0f 06 &72a8 78 ec 0c f8 f8 f7 ef 0f 0f ef e7 ef 0f 0f ef e7 &72b8 ef eb 33 ed 06 ff ec 12 ff f0 ff ff f0 f6 f9 f5 &72c8 fe f3 f0 ff f0 ff ed 0f 01 07 d0 0f 06 1e b4 78 &72d8 e1 87 ec 06 f1 f1 f2 f7 f5 f2 f3 f1 f2 fb 7f 0f &72e8 0f 7f 7a 7f 0f 0f 7f 78 78 78 88 ed 06 ff ec 12 &72f8 ff f0 fd fd d0 f5 04 fd f5 fd fd f0 ff ed 0e 03 &7308 d0 0f 05 1e 3c d2 87 96 1e 0f 87 d2 ec 03 f4 fa &7318 ff f5 fa ff f5 fa ff f5 fa fe ff 0f 0f ff f0 ff &7328 0f 0f ff ec 03 d0 11 07 ff ec 12 ff f0 ff ff f0 &7338 f3 f4 f1 f3 f6 f4 ff f0 ff ed 0b 03 07 d0 0f 07 &7348 1e 1e 0f 0f 1e 1e 3c 2d 3c ec 03 fa ff e6 ee cc &7358 c4 cc 88 88 99 99 d0 88 09 99 99 88 88 99 55 66 &7368 22 11 77 66 cc bb 99 cc ee d0 88 08 99 cc e6 f7 &7378 f1 f0 ff f0 ff ff f0 fb fc f3 ff f0 f0 ff f0 ff &7388 ed 0c 08 0c 0e 0e d0 0f 05 d0 87 05 a5 87 d2 f0 &7398 f0 f7 dd 99 d0 22 05 88 cc d0 44 05 55 55 77 77 &73a8 33 66 99 33 66 11 33 00 22 00 00 ee ff 77 88 33 &73b8 66 44 00 11 00 00 66 11 11 00 bb dd 66 bb ff f0 &73c8 ff f0 ff ff f1 f9 f5 f7 fd fd f3 ff f0 ff ed 0a &73d8 d0 11 07 00 08 08 0c d0 1f 07 e6 dd dd dd 11 bb &73e8 aa 88 aa aa 88 88 aa aa aa ee 66 55 55 44 44 44 &73f8 aa 88 aa ee 66 bb 11 11 11 33 22 22 ff bb dd 88 &7408 11 00 00 88 44 33 11 00 88 ee 33 99 cc ee ff f0 &7418 ff f0 f7 f7 f4 f5 f4 f6 f7 f5 f4 f7 f0 ff ed 05 &7428 11 67 57 ee bf 2f 7f 27 4e 08 8c 19 aa 88 99 99 &7438 08 88 88 08 d0 88 05 cc ee bb 99 88 88 88 cc 44 &7448 44 44 66 66 66 77 ff aa 99 44 66 55 66 22 99 00 &7458 44 bb 99 ee 77 00 00 cc 77 ee 77 11 88 cc 77 11 &7468 00 ee 77 00 11 00 ee 77 00 ff f0 ff f0 ff ff f0 &7478 fd f2 fd ff f0 f0 ff f0 ff ed 05 ee bf 22 dd 2f &7488 df 2a 00 00 22 00 88 55 55 dd 5d 88 00 00 77 22 &7498 77 dd 22 00 66 00 88 ff 66 11 ed 05 22 22 66 cc &74a8 aa 66 88 ff 33 88 77 00 cc ff 00 00 ee 77 aa cc &74b8 88 88 99 ee 88 ff 33 00 00 cc 77 11 cc 00 dd 77 &74c8 00 88 77 f8 f0 ff f0 ff ff f1 fd f7 fb fb f7 f5 &74d8 ff f0 ff ed 07 88 88 44 44 44 d0 22 04 55 bb 11 &74e8 dd 5d 88 00 11 11 11 23 ab 23 77 66 55 dd ee cc &74f8 55 bb d0 11 05 00 aa ee 66 55 55 bb bb 55 aa 66 &7508 88 00 11 77 cc cc 44 ee 00 ee aa 66 ff ee 00 11 &7518 77 66 88 00 11 77 ee 00 77 88 88 f7 f0 ff f0 f7 &7528 f7 f4 f4 f5 f4 f4 f5 f5 f7 f0 ff ed 12 01 89 8b &7538 8f 8f 8f 0f 0f 1e 1e f0 f8 f8 f8 ff 99 88 ed 07 &7548 88 99 99 99 11 55 66 44 44 44 11 77 ee aa 99 00 &7558 00 44 66 22 33 77 ff ee 00 00 88 00 00 11 77 ee &7568 88 11 ee 88 00 33 ff f0 ff f0 ff ff f0 fe f1 f6 &7578 ff f8 f0 ff f0 ff ed 10 03 d0 0f 07 87 96 d2 ec &7588 05 f1 fa 75 75 74 75 33 d0 32 05 33 23 23 33 32 &7598 33 ab ab bb 33 76 f8 ee 66 66 11 11 11 77 cc ff &75a8 ed 03 55 55 dd 99 aa 22 cc 99 22 66 cc 99 fe f0 &75b8 ff f0 ff ff f1 fd f3 fb ff f7 f1 ff f0 ff ed 10 &75c8 08 0c 0e d0 0f 06 87 2d 3c ec 04 f4 f8 fe f4 fa &75d8 fe f4 fa ff f5 f2 f1 ff 0f 0f ff f0 ff 0f 0f ff &75e8 ec 03 ed 06 88 ff fa ff 75 32 11 99 99 11 55 55 &75f8 11 99 11 32 76 f8 f0 f0 ff f0 f7 f7 f6 f4 f4 f5 &7608 f7 f4 f6 f7 f0 ff ed 14 09 0f 0f 0f 1e 0f 0f 0f &7618 b4 ec 05 f1 f1 f0 f1 f1 f2 f3 f1 f8 f9 ff 0f 0f &7628 ff fa ff 0f 0f ff ff f5 f2 ed 07 ff fa ff f5 fa &7638 ff f5 fa ff f5 fa fe ec 07 ff f0 ff ff f0 f7 f9 &7648 f6 f7 f8 f8 ff f0 ff ed 0e 01 03 07 d0 0f 08 87 &7658 87 5a ec 05 f1 f0 f8 f8 f0 f8 fc f4 f8 f8 f0 ff &7668 0f 0f ff f8 ff 0f 0f ff f0 f8 f0 ed 07 ff fa f5 &7678 fa fe f4 f8 f8 ec 0b ff f0 ff ff f0 f7 f9 f6 fe &7688 f1 f1 ff f0 ff ed 0d 0c d0 0f 09 87 c3 78 ec 08 &7698 f8 f8 f4 f6 f7 f2 ec 03 f7 df 4f 4f df d7 df 4f &76a8 4f df d7 d7 d7 77 ed 06 ff f8 ec 11 ff f0 fd fd &76b8 f5 f5 d0 fd 04 f5 fd f0 ff ed 0f 08 08 0c 0c 0e &76c8 0e 0f 0f 0f 4b c3 87 f0 e1 ec 09 f8 f4 f5 f5 f2 &76d8 f3 ff 0f 0f ff f0 ff 0f 0f ff ec 03 ed 07 ff ec &76e8 12 ff f0 ff ff f0 f3 f0 f5 ff f2 f8 ff f0 ff ed &76f8 16 08 0c 0e d0 0f 04 ec 03 f5 f2 f7 f1 f0 f1 f5 &7708 fa ff f5 fa ff ff 0f 0f ff fa ff 0f 0f ff f7 f1 &7718 f2 ed 07 ff ec 12 ff f0 ff ff f0 f9 f6 f9 ff f0 &7728 f0 ff f0 ff ed 1a 08 0c 0e e0 ec 03 fa ff f5 fa &7738 ff f5 fa ff f5 fa ff ff 0f 0f ff f8 ff 0f 0f ff &7748 fe f4 f8 ed 07 ff ec 12 ff f0 ff ff f1 fd f7 fb &7758 fb f7 f5 ff f0 ff ed 20 f9 ff f5 fa fe f4 f8 fc &7768 f0 f8 f8 f0 ff 0f 0f ff f0 ff 0f 0f ff ec 03 ed &7778 07 d0 88 07 99 aa ff dd ee f7 d5 e6 f7 d5 e6 f7 &7788 dd e6 f7 d5 e6 f7 d5 e6 f7 d5 e6 f7 d5 cc ed 1e &7798 10 70 f8 ec 08 f1 f1 fe 9f 0f 0f 9f 9e 9f 0f 0f &77a8 9f 9e 9e 9e ee ed 0c 44 44 88 cc 44 88 cc 44 88 &77b8 cc 44 88 cc 44 88 cc 44 88 cc 44 88 cc 44 88 88 &77c8 ed 21 c0 e6 f3 f1 f1 ec 03 f8 f8 f4 fc fa ff 0f &77d8 0f ff f1 ff 0f 0f ff ec 03 ed 4a 88 88 cc c4 e6 &77e8 e2 f1 f1 f0 f0 ff 0f 0f ff f4 ff 0f 0f ff f2 f1 &77f8 f1 ed 51 99 dd f6 ff 0f 0f ff f0 ff 0f 0f ff f8 &7808 f4 fe ed 4f 11 76 f8 f5 f2 ff 0f 0f ff fc ff 0f &7818 0f ff f1 f1 f1 ed 4f 88 e6 f9 f6 ff bf 8f 8f bf &7828 bf bf 8f 8f bf be bf be ed 51 88 88 c4 ff 0f 0f &7838 ff fd ff 0f 0f ff f0 f0 f8 ed 54 ff 0f 0f ff f1 &7848 ff 0f 0f ff ec 03 ed 54 ff 0f 0f ff f0 ff 0f 0f &7858 ff f6 f1 f0 00 00 00 00 00 00 00 00 00 00 00 00 &7868 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 &7878 00 00 00 00 00 00 00 00 ; packed_background_data # Inside &7880 ed 08 d0 ff 04 d0 8f 05 bc ec 0a f2 f5 f8 f8 ec &7890 04 f7 f9 f9 ec 16 f2 f5 f9 f4 d0 f6 05 ec 14 f1 &78a0 e2 e2 c4 88 88 ed 08 d0 ff 04 0f 0f 0f 3c ec 0e &78b0 f8 f8 f4 f4 f2 f2 f1 f8 fc fc fe d0 f6 2b f7 e6 &78c0 e6 c4 88 88 ed 0e d0 ff 04 0f 0e d0 c2 0e c3 f3 &78d0 f0 f3 d0 f2 05 d0 fa 26 fb fa fb ea ea ee cc 88 &78e0 88 ed 14 d0 ff 04 0f 00 00 d0 0f 05 0e 0c 09 06 &78f0 08 03 00 00 0f ff f0 ff ec 2b ff f0 ff ed 09 11 &7900 00 11 ed 0e d0 ff 04 0f 00 00 d0 0f 04 09 00 0c &7910 09 03 0b 09 00 00 0f ff f0 ff ec 0b f1 e0 e2 f7 &7920 e6 e6 e6 ff aa aa aa ff aa aa aa ff e6 e6 e2 f1 &7930 f1 ec 0b ff f0 ff ed 08 aa 55 aa 55 aa 55 ed 0c &7940 d0 ff 04 0f 00 00 d0 0f 05 0e 0e 0d 0d 09 03 00 &7950 00 0f ff f0 ff ec 07 f1 f3 d5 ff 99 99 99 ff 99 &7960 99 99 ff 99 99 99 ff 99 99 99 ff 99 99 99 ff 99 &7970 99 99 f7 f3 ec 07 ff f0 ff ed 08 88 44 aa 55 aa &7980 55 aa 55 ed 0a d0 ff 04 0f 00 00 0f 0f 0c 08 03 &7990 06 08 0a 0a 07 0b 00 00 0f ff f0 ff ec 06 f7 aa &79a0 22 22 ff 22 22 22 ff 22 22 22 ff 22 22 22 ff 22 &79b0 22 22 ff 22 22 22 ff 22 22 22 ff 22 ff f1 f1 e3 &79c0 e3 e7 c7 cf c7 ef 67 67 23 23 33 11 11 33 67 47 &79d0 47 8f df 77 fe fc 77 ed 09 d0 ff 04 0f 00 00 0f &79e0 0f 0f 07 03 06 0e 0d 03 02 0d 00 00 0f ff f0 ff &79f0 ec 06 fc 77 55 55 ff 55 55 55 ff 55 55 55 ff 55 &7a00 55 55 ff 55 55 55 ff 55 77 74 fc 74 f8 fb f9 f9 &7a10 fc 7d 7d 3f d0 0f 04 4f 8f 6f 7f 6f 1f 3e 3e fe &7a20 fd 6f 1f 3f 4f ef eb e3 f7 88 ed 09 d0 ff 04 0f &7a30 00 00 d0 0f 04 03 01 0c 09 03 03 09 00 00 0f ff &7a40 f0 ff ec 08 f8 74 fe 33 22 22 ff 22 22 22 ff 22 &7a50 22 22 ff 22 22 22 ff 22 aa f7 e6 f3 f3 f6 f6 f2 &7a60 fa fe d7 df 4f 0f 0f 6f 6f 2f 2f ef ef c7 e3 f3 &7a70 ef 1f 6f cf 8f 0f 0f 0f 7f cc ed 0a d0 ff 04 0f &7a80 00 00 0f 0f 0e 0e 0c 0d 09 09 0b 0a 06 00 00 0f &7a90 ff f0 ff ec 0c f8 f8 fc 74 74 74 fe 32 32 32 fe &7aa0 32 32 76 fc 74 fc f8 f8 f8 ec 07 f8 f8 7c 7c 7f &7ab0 7c 7f d0 4c 04 88 88 cc bf d0 0f 04 1f 7f fc ff &7ac0 ed 0a d0 ff 04 0f 00 00 0f 01 01 0c 09 0b 03 03 &7ad0 01 0c 0e 00 00 0f ff f0 ff ec 10 d0 f1 04 ec 17 &7ae0 ff f0 ff ed 08 88 88 88 99 11 11 99 11 11 ed 09 &7af0 d0 ff 04 0f 00 00 0f 0f 0f 0e 0d 0b 0e 0e 0d 09 &7b00 02 00 00 0f ff f0 ff ec 0f fc 3e 3e 3e be fc ec &7b10 16 ff f0 ff ed 06 77 d0 f8 04 ec 03 ff f0 ff ed &7b20 09 d0 ff 04 0f 00 00 0e 0e 0e 06 0e 02 02 0a 06 &7b30 06 02 00 00 0f ff f1 fd d0 f5 2b ff f0 ff ed 06 &7b40 ff ec 07 ff f4 ff ed 09 d0 ff 04 0f 08 08 d0 09 &7b50 08 08 09 09 08 08 0f ff ec 2c f1 fe f1 ee ed 06 &7b60 ff ec 07 ff f2 ff ed 09 d0 ff 04 0f 00 00 0f 0f &7b70 0f 0e 0e 0d 0d 0d 01 02 0e 00 00 0f ff ec 2b f1 &7b80 fe f1 ee ed 07 ee d0 f1 04 ec 03 ff f0 ff ed 09 &7b90 d0 ff 04 0f 00 00 0f 0f 01 04 0b d0 07 04 0b 08 &7ba0 00 00 0f ff d0 f4 2b fe f1 fe 11 ed 0c d0 99 06 &7bb0 ed 09 d0 ff 04 0f 00 00 0f 0f 0e 09 0b 06 06 0a &7bc0 0b 06 06 00 00 0f ff ec 2c fc f3 fc 33 ed 06 77 &7bd0 d0 f8 04 ec 03 ff f0 ff ed 09 d0 ff 04 0f 00 00 &7be0 0f 08 07 0c 01 05 0d 07 07 05 0d 00 00 0f ff d0 &7bf0 f2 2d ff f0 ff ed 06 ff ec 07 ff f4 ff ed 09 d0 &7c00 ff 04 0f 00 00 0f 0f 03 01 0e 0f 0e 0c 09 0a 0a &7c10 00 00 0f ff ec 2c f1 fe f1 ee ed 06 ff ec 07 ff &7c20 f1 ff ed 09 d0 ff 04 0f 00 00 d0 0e 05 08 77 44 &7c30 77 cc 88 88 ee 88 ff 88 ee 88 ff 88 ee 88 ff 88 &7c40 ff 88 ee 88 88 cc f7 e3 f3 ec 19 f1 fe f1 ee ed &7c50 07 ff ec 07 ff f0 ff ed 09 d0 ff 04 8f 88 88 d0 &7c60 8b 05 88 ff 11 ff 11 ed 05 06 07 0b 0d 0a 0a 07 &7c70 06 ed 06 11 ff 3e fe d0 f8 19 fe f1 fe 11 ed 08 &7c80 d0 88 04 c4 c4 c4 cc c4 cc ed 09 d0 ff 04 0f 00 &7c90 00 0f 0f 0e 0e 0d 0d 05 06 06 8b 8b 88 88 8f ff &7ca0 d0 f8 0f ec 1d fc f3 fc 33 ed 06 33 d0 74 04 f8 &7cb0 f8 f8 ff f8 ff ed 09 d0 ff 04 0f 00 00 0f 03 01 &7cc0 0c 0a 0b 03 02 00 0d 0f 00 00 0f ff d0 f2 2d ff &7cd0 f0 ff ed 06 ff ec 07 ff f2 ff ed 09 d0 ff 04 0f &7ce0 00 00 d0 0f 05 08 06 06 0d 09 06 00 00 0f ff ec &7cf0 2c f1 fe f1 ee ed 06 ff ec 07 ff f1 ff ed 09 d0 &7d00 ff 04 0f 01 01 d0 0d 06 05 0d 0d 09 09 01 01 0f &7d10 ff ec 2b f1 fe f1 ee ed 07 ff ec 07 ff f0 ff ed &7d20 09 d0 ff 04 0f 00 00 d0 07 06 06 01 01 03 07 00 &7d30 00 0f ff d0 f4 2b fe f1 fe 11 ed 08 d0 88 04 c4 &7d40 c4 c4 cc c4 cc ed 09 d0 ff 04 0f 00 00 0f 0f 0f &7d50 0e 08 01 07 0e 0c 09 03 00 00 0f ff ec 2c fe f1 &7d60 fe 11 ed 06 33 d0 74 04 f8 f8 f8 ff f8 ff ed 09 &7d70 d0 ff 04 0f 00 00 0f 0f 0f 03 01 0a 0b 03 03 09 &7d80 0c 00 00 0f ff d0 f2 2d ff f0 ff ed 06 ff ec 07 &7d90 ff f2 ff ed 09 d0 ff 04 0f 00 00 d0 0f 04 0e 0e &7da0 0e 0d 0d 09 03 00 00 0f ff ec 2c f1 fe f1 ee ed &7db0 06 ff ec 07 ff f1 ff ed 09 d0 ff 04 0f 00 00 0f &7dc0 0c 09 06 06 0c 08 08 0b 0b 07 00 00 0f ff ec 2b &7dd0 f1 fe f1 ee ed 07 ff ec 07 ff f0 ff ed 09 d0 ff &7de0 04 0f 00 00 0f 0f 07 0b 0e 0e 0d 0d 01 0b 0e 00 &7df0 00 0f ff d0 f8 2b fe f1 fe 11 ed 08 d0 88 04 c4 &7e00 c4 c4 cc c4 cc ed 09 d0 ff 04 0f 00 00 0f 0f 0f &7e10 01 04 0e 0d 09 09 06 06 00 00 0f ff ec 2c fc f3 &7e20 fc 33 ed 06 11 d0 32 04 74 74 74 77 74 77 ed 09 &7e30 d0 ff 04 0f 00 00 d0 0f 04 0e 06 0e 0d 0d 02 06 &7e40 00 00 0f ff d0 f2 2d ff f0 ff ed 06 ff ec 07 ff &7e50 f1 ff ed 09 d0 ff 04 0f 00 00 0f 0f 08 06 07 0e &7e60 09 09 05 06 0e 00 00 0f ff ec 2c f1 fe f1 ee ed &7e70 06 ff ec 07 ff f0 ff ed 09 d0 ff 04 0f 00 00 0f &7e80 0f 0f 07 03 09 0e 0e 0e 0d 05 00 00 0f ff ec 2b &7e90 f1 fe f1 ee ed 07 ff ec 07 ff f4 ff ed 09 d0 ff &7ea0 04 0f 00 00 d0 0f 04 01 05 09 09 0b 0b 09 00 00 &7eb0 0f ff d0 f8 2b fc f3 fc 33 ed 07 88 d0 c4 04 e2 &7ec0 e2 e2 ee e2 ee ed 09 d0 ff 04 0f d0 17 0f 1f ff &7ed0 ec 2c f8 f7 f8 77 ed 1a d0 ff 04 0f cf e9 d0 f8 &7ee0 04 fc fc ff d0 ee 17 ff ff ef ef ff d0 ee 12 ff &7ef0 ef ef ff d0 ee 04 e6 ee 57 57 67 23 33 11 11 ed &7f00 13 d0 ff 04 0f 0f 0f 87 ec 05 f8 77 d0 11 16 ff &7f10 ff 1f 1f bf bf d0 fb 0f bf bf bf 1f 1f ff d0 11 &7f20 08 99 5d 5d 3f bf 9f df 77 33 33 11 11 ed 0c d0 &7f30 ff 04 d0 1f 05 d3 d0 f1 4a f9 75 33 00 ; unused &7f3d 00 00 00