{"schema":1,"platform":"c64","game":"the-sentinel","title":"The Sentinel","build":"freezer-cartridge backup SENTINEL+ (one packed file) on a disk named P00 IMPORTS, not the original release; its RAM at $FF40-$FFFF (the vectors) comes back as $FF, so it is restarted at the game entry $3F00","symbols_sha256":"1eb334403bee1f3f90600eb6318d12ecc66eba9cfa5a0c97a92d8a6e73d04b13","index":[{"a":0,"n":"cpu_port_ddr","k":"variable","len":1,"c":true},{"a":1,"n":"cpu_port_banking","k":"variable","len":1,"c":true},{"a":2,"n":"edge_frac_or_xlist_page","k":"variable","len":1,"c":true},{"a":3,"n":"viewer_col_rotated","k":"variable","len":1,"c":true},{"a":4,"n":"poly_bottom_y","k":"variable","len":1,"c":true},{"a":5,"n":"draw_table_offset","k":"variable","len":1,"c":true},{"a":6,"n":"tile_height_or_poly_top","k":"variable","len":1,"c":true},{"a":7,"n":"cur_buffer_min_yaw_hi","k":"variable","len":1,"c":true},{"a":8,"n":"last_pan_dir","k":"variable","len":1,"c":true},{"a":9,"n":"pan_key_now","k":"variable","len":1,"c":true},{"a":10,"n":"point_dx_hi","k":"variable","len":1,"c":true},{"a":11,"n":"player_obj","k":"variable","len":1,"c":true},{"a":12,"n":"shared_0C","k":"variable","len":1,"c":true},{"a":13,"n":"shared_0D","k":"variable","len":1,"c":true},{"a":14,"n":"point_x_save","k":"variable","len":1,"c":true},{"a":15,"n":"y_save_or_obscured","k":"variable","len":1,"c":true},{"a":16,"n":"buffer_kind","k":"variable","len":1,"c":true},{"a":17,"n":"cur_buffer_origin_hi","k":"variable","len":1,"c":true},{"a":18,"n":"cur_buffer_max_yaw_hi","k":"variable","len":1,"c":true},{"a":19,"n":"dither_tmp","k":"variable","len":1,"c":true},{"a":20,"n":"target_seen_bits","k":"variable","len":1,"c":true},{"a":21,"n":"loop_count","k":"variable","len":1,"c":true},{"a":22,"n":"edge_end_y_lo","k":"variable","len":1,"c":true},{"a":23,"n":"edge_or_trace_count","k":"variable","len":1,"c":true},{"a":24,"n":"shared_18","k":"variable","len":1,"c":true},{"a":25,"n":"poly_colours_or_row","k":"variable","len":1,"c":true},{"a":26,"n":"shared_1A","k":"variable","len":1,"c":true},{"a":27,"n":"quadrant_table_offset","k":"variable","len":1,"c":true},{"a":28,"n":"arc_right_yaw_or_action","k":"variable","len":1,"c":true},{"a":29,"n":"viewer_row_rotated","k":"variable","len":1,"c":true},{"a":30,"n":"shared_counter_1E","k":"variable","len":1,"c":true},{"a":31,"n":"yaw_adjust_lo","k":"variable","len":1,"c":true},{"a":32,"n":"screen_left_yaw_hi","k":"variable","len":1,"c":true},{"a":33,"n":"draw_table_index","k":"variable","len":1,"c":true},{"a":34,"n":"plot_ptr","k":"variable","len":1,"c":true},{"a":35,"n":"plot_ptr_hi","k":"variable","len":1,"c":true},{"a":36,"n":"tile_x","k":"variable","len":1,"c":true},{"a":37,"n":"tile_col_or_fill_count","k":"variable","len":1,"c":true},{"a":38,"n":"tile_z","k":"variable","len":1,"c":true},{"a":39,"n":"tile_count_mask","k":"variable","len":1,"c":true},{"a":40,"n":"cur_buffer_min_yaw_lo","k":"variable","len":1,"c":true},{"a":41,"n":"cur_buffer_origin_lo","k":"variable","len":1,"c":true},{"a":42,"n":"star_random","k":"variable","len":2,"c":true},{"a":44,"n":"vec_x_bot_or_goes_right","k":"variable","len":1,"c":true},{"a":45,"n":"vec_y_bot_or_goes_left","k":"variable","len":1,"c":true},{"a":46,"n":"vec_z_bot","k":"variable","len":1,"c":true},{"a":47,"n":"vec_x_lo","k":"variable","len":1,"c":true},{"a":48,"n":"vec_y_lo_or_min_flat_x","k":"variable","len":1,"c":true},{"a":49,"n":"vec_z_lo_or_max_flat_x","k":"variable","len":1,"c":true},{"a":50,"n":"row_left_tile_or_cos_lo","k":"variable","len":1,"c":true},{"a":51,"n":"row_right_tile_or_cos_hi","k":"variable","len":1,"c":true},{"a":52,"n":"coord_x_bot_or_shape","k":"variable","len":1,"c":true},{"a":53,"n":"coord_y_bot_or_buf_left","k":"variable","len":1,"c":true},{"a":54,"n":"coord_z_bot_or_buf_right","k":"variable","len":1,"c":true},{"a":55,"n":"coord_x_lo_or_vis_left","k":"variable","len":1,"c":true},{"a":56,"n":"coord_y_lo_or_vis_right","k":"variable","len":1,"c":true},{"a":57,"n":"coord_z_lo_or_edge_x_end","k":"variable","len":1,"c":true},{"a":58,"n":"coord_x_hi_or_dx_lo","k":"variable","len":1,"c":true},{"a":59,"n":"coord_y_hi_or_poly_type","k":"variable","len":1,"c":true},{"a":60,"n":"coord_z_hi_or_points_ptr","k":"variable","len":1,"c":true},{"a":61,"n":"vec_yaw_lo_or_points_ptr_hi","k":"variable","len":1,"c":true},{"a":62,"n":"vec_yaw_hi_or_edge_y0_hi","k":"variable","len":1,"c":true},{"a":63,"n":"vec_pitch_lo_or_edge_y1_hi","k":"variable","len":1,"c":true},{"a":64,"n":"vec_pitch_hi_or_edge_scale","k":"variable","len":1,"c":true},{"a":65,"n":"edge_x_start_hi","k":"variable","len":1,"c":true},{"a":66,"n":"edge_x_end_hi","k":"variable","len":1,"c":true},{"a":67,"n":"edge_dx_hi","k":"variable","len":2,"c":true},{"a":69,"n":"tile_first_point","k":"table","len":5,"c":true},{"a":74,"n":"poly_side_index","k":"variable","len":1,"c":true},{"a":75,"n":"arc_opposite_quadrant","k":"variable","len":1,"c":true},{"a":76,"n":"obj_type_measured","k":"variable","len":2,"c":true},{"a":78,"n":"obj_point_or_face_num","k":"variable","len":1,"c":true},{"a":79,"n":"obj_last_point_or_face","k":"variable","len":1,"c":true},{"a":80,"n":"pitch_delta_lo","k":"variable","len":1,"c":true},{"a":81,"n":"buffer_top_pitch","k":"variable","len":1,"c":true},{"a":82,"n":"buffer_bottom_pitch","k":"variable","len":1,"c":true},{"a":83,"n":"draw_phase_count","k":"variable","len":1,"c":true},{"a":84,"n":"right_edge_old_byte","k":"variable","len":1,"c":true},{"a":85,"n":"draw_target_unused","k":"variable","len":1,"c":true},{"a":86,"n":"poly_right_x","k":"variable","len":1,"c":true},{"a":87,"n":"fill_rows_left","k":"variable","len":1,"c":true},{"a":88,"n":"poly_fill_byte","k":"variable","len":1,"c":true},{"a":89,"n":"obj_view_yaw_diff_lo","k":"variable","len":1,"c":true},{"a":90,"n":"obj_view_yaw_diff_hi","k":"variable","len":2,"c":true},{"a":92,"n":"opp_side_lo","k":"variable","len":1,"c":true},{"a":93,"n":"opp_side_hi","k":"variable","len":1,"c":true},{"a":94,"n":"tile_ptr","k":"variable","len":1,"c":true},{"a":95,"n":"tile_ptr_page","k":"variable","len":1,"c":true},{"a":96,"n":"second_axis_or_gaze_flags","k":"variable","len":1,"c":true},{"a":97,"n":"cur_buffer_width_px","k":"variable","len":1,"c":true},{"a":98,"n":"copy_src","k":"variable","len":1,"c":true},{"a":99,"n":"copy_src_hi","k":"variable","len":1,"c":true},{"a":100,"n":"copy_dst","k":"variable","len":1,"c":true},{"a":101,"n":"copy_dst_hi","k":"variable","len":1,"c":true},{"a":102,"n":"smooth_action_or_quad4","k":"variable","len":1,"c":true},{"a":103,"n":"sign_bits","k":"variable","len":1,"c":true},{"a":104,"n":"mul_b_lo","k":"variable","len":1,"c":true},{"a":105,"n":"mul_b_hi","k":"variable","len":1,"c":true},{"a":106,"n":"mul_a_lo","k":"variable","len":1,"c":true},{"a":107,"n":"mul_a_hi","k":"variable","len":1,"c":true},{"a":108,"n":"poly_x_two_bytes","k":"variable","len":2,"c":true},{"a":110,"n":"viewer_obj","k":"variable","len":1,"c":true},{"a":111,"n":"obj_measured","k":"variable","len":1,"c":true},{"a":112,"n":"tmp_p","k":"variable","len":1,"c":true},{"a":113,"n":"tmp_q","k":"variable","len":1,"c":true},{"a":114,"n":"tmp_r","k":"variable","len":1,"c":true},{"a":115,"n":"tmp_s","k":"variable","len":1,"c":true},{"a":116,"n":"tmp_t","k":"variable","len":1,"c":true},{"a":117,"n":"tmp_u","k":"variable","len":1,"c":true},{"a":118,"n":"tmp_v","k":"variable","len":1,"c":true},{"a":119,"n":"tmp_w","k":"variable","len":1,"c":true},{"a":120,"n":"tmp_g","k":"variable","len":1,"c":true},{"a":121,"n":"platform_height_lo","k":"variable","len":1,"c":true},{"a":122,"n":"adj_side_lo","k":"variable","len":1,"c":true},{"a":123,"n":"adj_side_hi","k":"variable","len":1,"c":true},{"a":124,"n":"hyp_lo","k":"variable","len":1,"c":true},{"a":125,"n":"hyp_hi","k":"variable","len":1,"c":true},{"a":126,"n":"tangent","k":"variable","len":1,"c":true},{"a":127,"n":"tile_onscreen_or_skip_poly","k":"variable","len":1,"c":true},{"a":128,"n":"dx_lo","k":"variable","len":1,"c":true},{"a":129,"n":"dy_lo","k":"variable","len":1,"c":true},{"a":130,"n":"dz_lo","k":"variable","len":1,"c":true},{"a":131,"n":"dx_abs_hi","k":"variable","len":1,"c":true},{"a":132,"n":"dy_hi","k":"variable","len":1,"c":true},{"a":133,"n":"dz_abs_hi","k":"variable","len":1,"c":true},{"a":134,"n":"dx_hi_or_vec_x_hi","k":"variable","len":1,"c":true},{"a":135,"n":"vec_y_hi","k":"variable","len":1,"c":true},{"a":136,"n":"dz_hi_or_vec_z_hi","k":"variable","len":2,"c":true},{"a":138,"n":"angle_lo","k":"variable","len":1,"c":true},{"a":139,"n":"angle_hi","k":"variable","len":2,"c":true},{"a":141,"n":"pitch_delta_hi","k":"variable","len":1,"c":true},{"a":142,"n":"sin_8bit","k":"variable","len":1,"c":true},{"a":143,"n":"cos_8bit","k":"variable","len":1,"c":true},{"a":144,"n":"enemy_slot","k":"variable","len":1,"c":true},{"a":145,"n":"current_obj","k":"variable","len":1,"c":true},{"a":146,"n":"col_offset_lo","k":"variable","len":1,"c":true},{"a":147,"n":"col_offset_hi","k":"variable","len":1,"c":true},{"a":148,"n":"view_origin_col","k":"variable","len":1,"c":true},{"a":149,"n":"view_origin_row","k":"variable","len":1,"c":true},{"a":150,"n":"strip_col","k":"variable","len":1,"c":true},{"a":151,"n":"strip_row","k":"variable","len":1,"c":true},{"a":152,"n":"copy_rows_left","k":"variable","len":1,"c":true},{"a":153,"n":"copy_dst2","k":"variable","len":1,"c":true},{"a":154,"n":"copy_dst2_hi","k":"variable","len":1,"c":true},{"a":155,"n":"sights_sprite_x","k":"variable","len":1,"c":true},{"a":156,"n":"sights_sprite_y","k":"variable","len":1,"c":true},{"a":157,"n":"dissolve_col","k":"variable","len":1,"c":true},{"a":158,"n":"dissolve_row","k":"variable","len":1,"c":true},{"a":159,"n":"dissolve_line","k":"variable","len":2,"c":true},{"a":161,"n":"dot_dst2","k":"variable","len":1,"c":true},{"a":162,"n":"dot_dst2_hi","k":"variable","len":1,"c":true},{"a":163,"n":"dissolve_rand_mid","k":"variable","len":1,"c":true},{"a":164,"n":"dissolve_rand_hi","k":"variable","len":1,"c":true},{"a":165,"n":"dissolve_rand_x4_lo","k":"variable","len":1,"c":true},{"a":166,"n":"dissolve_rand_x4_mid","k":"variable","len":1,"c":true},{"a":167,"n":"dissolve_rand_x4_hi","k":"variable","len":1,"c":true},{"a":168,"n":"sq_yaw_lo_ptr","k":"variable","len":1,"c":true},{"a":169,"n":"sq_yaw_lo_page","k":"variable","len":1,"c":true},{"a":170,"n":"sq_yaw_hi_ptr","k":"variable","len":1,"c":true},{"a":171,"n":"sq_yaw_hi_page","k":"variable","len":1,"c":true},{"a":172,"n":"sq_pitch_lo_ptr","k":"variable","len":1,"c":true},{"a":173,"n":"sq_pitch_lo_page","k":"variable","len":1,"c":true},{"a":174,"n":"sq_pitch_hi_ptr","k":"variable","len":1,"c":true},{"a":175,"n":"sq_pitch_hi_page","k":"variable","len":1,"c":true},{"a":176,"n":"view_pitch_lo16","k":"variable","len":1,"c":true},{"a":177,"n":"view_pitch_hi16","k":"variable","len":1,"c":true},{"a":178,"n":"view_yaw_minus_10","k":"variable","len":1,"c":true},{"a":179,"n":"zp_unused_b3","k":"table","len":61,"c":true},{"a":240,"n":"font_glyph_ptr","k":"variable","len":1,"c":true},{"a":241,"n":"font_glyph_page","k":"variable","len":1,"c":true},{"a":242,"n":"os_param_ptr","k":"variable","len":1,"c":true},{"a":243,"n":"os_param_ptr_hi","k":"variable","len":1,"c":true},{"a":244,"n":"text_bitmap_ptr","k":"variable","len":1,"c":true},{"a":245,"n":"text_bitmap_page","k":"variable","len":1,"c":true},{"a":246,"n":"sound_block_ptr","k":"variable","len":1,"c":true},{"a":247,"n":"sound_block_ptr_hi","k":"variable","len":1,"c":true},{"a":248,"n":"zp_unused_f8","k":"table","len":8,"c":true},{"a":512,"n":"random_bytes","k":"table","len":256,"c":true},{"a":768,"n":"system_vectors_unused","k":"table","len":256,"c":true},{"a":2304,"n":"obj_x","k":"variable","len":1,"c":true},{"a":2305,"n":"a_0901","k":"variable","len":1,"c":true},{"a":2306,"n":"a_0902","k":"table","len":14,"c":true},{"a":2320,"n":"a_0910","k":"table","len":47,"c":true},{"a":2367,"n":"a_093F","k":"variable","len":1,"c":true},{"a":2368,"n":"obj_y_hi","k":"variable","len":1,"c":true},{"a":2369,"n":"a_0941","k":"variable","len":1,"c":true},{"a":2370,"n":"a_0942","k":"table","len":14,"c":true},{"a":2384,"n":"a_0950","k":"table","len":47,"c":true},{"a":2431,"n":"a_097F","k":"variable","len":1,"c":true},{"a":2432,"n":"obj_z","k":"variable","len":1,"c":true},{"a":2433,"n":"a_0981","k":"variable","len":1,"c":true},{"a":2434,"n":"a_0982","k":"table","len":14,"c":true},{"a":2448,"n":"a_0990","k":"table","len":47,"c":true},{"a":2495,"n":"a_09BF","k":"variable","len":1,"c":true},{"a":2496,"n":"obj_yaw","k":"variable","len":1,"c":true},{"a":2497,"n":"a_09C1","k":"variable","len":1,"c":true},{"a":2498,"n":"a_09C2","k":"table","len":14,"c":true},{"a":2512,"n":"a_09D0","k":"table","len":47,"c":true},{"a":2559,"n":"a_09FF","k":"variable","len":1,"c":true},{"a":2560,"n":"obj_y_lo","k":"variable","len":1,"c":true},{"a":2561,"n":"a_0A01","k":"variable","len":1,"c":true},{"a":2562,"n":"a_0A02","k":"table","len":61,"c":true},{"a":2623,"n":"a_0A3F","k":"variable","len":1,"c":true},{"a":2624,"n":"obj_type","k":"variable","len":1,"c":true},{"a":2625,"n":"a_0A41","k":"table","len":62,"c":true},{"a":2687,"n":"a_0A7F","k":"variable","len":1,"c":true},{"a":2688,"n":"draw_pitch_lo","k":"variable","len":1,"c":true},{"a":2689,"n":"f_0A81","k":"table","len":64,"c":true},{"a":2784,"n":"draw_pitch_hi","k":"variable","len":1,"c":true},{"a":2785,"n":"f_0AE1","k":"table","len":31,"c":true},{"a":2816,"n":"f_0B00","k":"variable","len":1,"c":true},{"a":2817,"n":"f_0B01","k":"table","len":63,"c":true},{"a":2880,"n":"draw_x_hi","k":"table","len":22,"c":true},{"a":2902,"n":"f_0B56","k":"table","len":64,"c":true},{"a":2976,"n":"draw_yaw_lo","k":"table","len":11,"c":true},{"a":2987,"n":"f_0BAB","k":"table","len":64,"c":true},{"a":3072,"n":"sin16_lo","k":"variable","len":1,"c":true},{"a":3073,"n":"cos16_lo","k":"variable","len":1,"c":true},{"a":3074,"n":"sin16_hi","k":"variable","len":2,"c":true},{"a":3076,"n":"scanner_request","k":"variable","len":1,"c":true},{"a":3077,"n":"icon_column","k":"variable","len":1,"c":true},{"a":3078,"n":"lowest_enemy_height","k":"variable","len":1,"c":true},{"a":3079,"n":"enemy_limit","k":"variable","len":1,"c":true},{"a":3080,"n":"height_scale","k":"variable","len":1,"c":true},{"a":3081,"n":"scanner_state","k":"variable","len":1,"c":true},{"a":3082,"n":"player_energy","k":"variable","len":2,"c":true},{"a":3084,"n":"sincos_angle_hi","k":"variable","len":1,"c":true},{"a":3085,"n":"tactics_sp","k":"variable","len":1,"c":true},{"a":3086,"n":"meanie_turn_step","k":"variable","len":1,"c":true},{"a":3087,"n":"text_shadow_off","k":"variable","len":1,"c":true},{"a":3088,"n":"glyph_block","k":"table","len":9,"c":true},{"a":3097,"n":"sentinel_x","k":"variable","len":1,"c":true},{"a":3098,"n":"sentinel_z","k":"variable","len":1,"c":true},{"a":3099,"n":"pan_abort_check","k":"variable","len":1,"c":true},{"a":3100,"n":"picture_obj_type","k":"variable","len":1,"c":true},{"a":3101,"n":"last_pan_logged","k":"variable","len":1,"c":true},{"a":3102,"n":"no_dissolve","k":"variable","len":1,"c":true},{"a":3103,"n":"same_pan_held","k":"variable","len":1,"c":true},{"a":3104,"n":"enemy_drain_timer","k":"table","len":8,"c":true},{"a":3112,"n":"enemy_turn_timer","k":"table","len":8,"c":true},{"a":3120,"n":"enemy_tactic_timer","k":"table","len":16,"c":true},{"a":3136,"n":"face_point_0","k":"variable","len":1,"c":true},{"a":3137,"n":"face_point_1","k":"variable","len":1,"c":true},{"a":3138,"n":"face_point_2","k":"variable","len":1,"c":true},{"a":3139,"n":"face_point_3","k":"variable","len":1,"c":true},{"a":3140,"n":"face_point_4","k":"table","len":3,"c":true},{"a":3143,"n":"obj_draw_pass","k":"variable","len":1,"c":true},{"a":3144,"n":"prev_row_left_tile","k":"variable","len":1,"c":true},{"a":3145,"n":"digit3d_x","k":"variable","len":1,"c":true},{"a":3146,"n":"digit3d_z","k":"variable","len":1,"c":true},{"a":3147,"n":"drawing_title","k":"variable","len":1,"c":true},{"a":3148,"n":"backdrop_kind","k":"variable","len":1,"c":true},{"a":3149,"n":"object_only_redraw","k":"variable","len":1,"c":true},{"a":3150,"n":"landscape_over","k":"variable","len":1,"c":true},{"a":3151,"n":"player_tile_hidden","k":"variable","len":1,"c":true},{"a":3152,"n":"timer_divider","k":"variable","len":1,"c":true},{"a":3153,"n":"uturn_armed","k":"variable","len":1,"c":true},{"a":3154,"n":"landscape_nonzero","k":"variable","len":1,"c":true},{"a":3155,"n":"sincos_work_lo","k":"variable","len":1,"c":true},{"a":3156,"n":"sincos_work_hi","k":"variable","len":1,"c":true},{"a":3157,"n":"stash_offset","k":"variable","len":1,"c":true},{"a":3158,"n":"gaze_hits_target_sq","k":"variable","len":1,"c":true},{"a":3159,"n":"obj_rel_yaw_hi","k":"variable","len":1,"c":true},{"a":3160,"n":"drain_target","k":"variable","len":1,"c":true},{"a":3161,"n":"obj_rel_yaw_lo","k":"variable","len":2,"c":true},{"a":3163,"n":"obj_height_lo","k":"variable","len":1,"c":true},{"a":3164,"n":"obj_height_hi","k":"variable","len":1,"c":true},{"a":3165,"n":"obj_dist_lo","k":"variable","len":1,"c":true},{"a":3166,"n":"obj_dist_hi","k":"variable","len":1,"c":true},{"a":3167,"n":"sights_on","k":"variable","len":1,"c":true},{"a":3168,"n":"text_in_3d","k":"variable","len":1,"c":true},{"a":3169,"n":"action_key","k":"variable","len":1,"c":true},{"a":3170,"n":"obj_left_col","k":"variable","len":1,"c":true},{"a":3171,"n":"player_moved","k":"variable","len":1,"c":true},{"a":3172,"n":"quit_request","k":"variable","len":1,"c":true},{"a":3173,"n":"code_check_bits","k":"variable","len":2,"c":true},{"a":3175,"n":"gaze_hits_boulder","k":"variable","len":1,"c":true},{"a":3176,"n":"enemy_view_arc","k":"variable","len":1,"c":true},{"a":3177,"n":"redraw_width_cols","k":"variable","len":1,"c":true},{"a":3178,"n":"obj_width_cols","k":"variable","len":1,"c":true},{"a":3179,"n":"stack_count","k":"variable","len":1,"c":true},{"a":3180,"n":"stack_top_obj","k":"variable","len":1,"c":true},{"a":3181,"n":"redraw_style","k":"variable","len":1,"c":true},{"a":3182,"n":"gaze_for_robot","k":"variable","len":1,"c":true},{"a":3183,"n":"enemy_count","k":"variable","len":1,"c":true},{"a":3184,"n":"chord_note_count","k":"variable","len":1,"c":true},{"a":3185,"n":"no_play_after_build","k":"variable","len":1,"c":true},{"a":3186,"n":"paused","k":"variable","len":1,"c":true},{"a":3187,"n":"sound_kind","k":"variable","len":1,"c":true},{"a":3188,"n":"gameover_pitch","k":"variable","len":1,"c":true},{"a":3189,"n":"tamper_seed","k":"variable","len":1,"c":true},{"a":3190,"n":"tree_blocks_view","k":"variable","len":2,"c":true},{"a":3192,"n":"title_x_offset","k":"variable","len":2,"c":true},{"a":3194,"n":"edge_in_fill_colour","k":"variable","len":1,"c":true},{"a":3195,"n":"seed_reg_0","k":"variable","len":1,"c":true},{"a":3196,"n":"seed_reg_1","k":"variable","len":1,"c":true},{"a":3197,"n":"seed_reg_2","k":"variable","len":1,"c":true},{"a":3198,"n":"seed_reg_3","k":"variable","len":1,"c":true},{"a":3199,"n":"seed_reg_4","k":"variable","len":1,"c":true},{"a":3200,"n":"enemy_meanie_scan","k":"table","len":8,"c":true},{"a":3208,"n":"enemy_energy","k":"table","len":8,"c":true},{"a":3216,"n":"enemy_meanie_fail_obj","k":"table","len":8,"c":true},{"a":3224,"n":"enemy_meanie_fail_count","k":"table","len":8,"c":true},{"a":3232,"n":"enemy_meanie_obj","k":"table","len":8,"c":true},{"a":3240,"n":"enemy_target","k":"table","len":8,"c":true},{"a":3248,"n":"enemy_sees_target","k":"table","len":8,"c":true},{"a":3256,"n":"enemy_drain_scan","k":"table","len":9,"c":true},{"a":3265,"n":"scroll_steps_left","k":"variable","len":1,"c":true},{"a":3266,"n":"view_image_addr","k":"variable","len":1,"c":true},{"a":3267,"n":"view_image_addr_hi","k":"table","len":3,"c":true},{"a":3270,"n":"sights_x","k":"variable","len":1,"c":true},{"a":3271,"n":"sights_y","k":"variable","len":1,"c":true},{"a":3272,"n":"sights_start_pace","k":"variable","len":1,"c":true},{"a":3273,"n":"sights_saved_bytes","k":"table","len":5,"c":true},{"a":3278,"n":"skip_stash_check","k":"variable","len":1,"c":true},{"a":3279,"n":"dissolve_mask","k":"variable","len":1,"c":true},{"a":3280,"n":"dissolve_rand","k":"variable","len":1,"c":true},{"a":3281,"n":"pan_scroll_steps","k":"variable","len":1,"c":true},{"a":3282,"n":"dissolve_batch","k":"variable","len":1,"c":true},{"a":3283,"n":"dissolve_width_cols","k":"variable","len":1,"c":true},{"a":3284,"n":"min_obj_width","k":"table","len":3,"c":true},{"a":3287,"n":"hide_sights","k":"variable","len":1,"c":true},{"a":3288,"n":"scroll_step_due","k":"table","len":4,"c":true},{"a":3292,"n":"prev_focus","k":"variable","len":1,"c":true},{"a":3293,"n":"gaze_sees_tree","k":"variable","len":1,"c":true},{"a":3294,"n":"hyperspace_ended","k":"variable","len":1,"c":true},{"a":3295,"n":"sound_timer","k":"table","len":5,"c":true},{"a":3300,"n":"key_action_busy","k":"variable","len":1,"c":true},{"a":3301,"n":"enemies_asleep","k":"variable","len":1,"c":true},{"a":3302,"n":"on_sentinel_tower","k":"variable","len":1,"c":true},{"a":3303,"n":"music_pos","k":"variable","len":1,"c":true},{"a":3304,"n":"keylog_pan_x","k":"variable","len":1,"c":true},{"a":3305,"n":"keylog_action","k":"variable","len":1,"c":true},{"a":3306,"n":"keylog_pan_y","k":"variable","len":1,"c":true},{"a":3307,"n":"keylog_misc","k":"table","len":5,"c":true},{"a":3312,"n":"input_buffer","k":"variable","len":1,"c":true},{"a":3313,"n":"input_buffer_1","k":"table","len":6,"c":true},{"a":3319,"n":"input_buffer_7","k":"table","len":5,"c":true},{"a":3324,"n":"not_in_game","k":"variable","len":1,"c":true},{"a":3325,"n":"landscape_lo","k":"variable","len":1,"c":true},{"a":3326,"n":"landscape_hi","k":"variable","len":2,"c":true},{"a":3328,"n":"nmi_rti_unused","k":"table","len":3,"c":true},{"a":3331,"n":"mul8_a_by_u","k":"routine","len":2,"c":true},{"a":3333,"n":"mul8_t_by_u","k":"routine","len":69,"c":true},{"a":3342,"n":"b_0D0E","k":"branch","len":1,"c":false},{"a":3350,"n":"b_0D16","k":"branch","len":1,"c":false},{"a":3358,"n":"b_0D1E","k":"branch","len":1,"c":false},{"a":3366,"n":"b_0D26","k":"branch","len":1,"c":false},{"a":3374,"n":"b_0D2E","k":"branch","len":1,"c":false},{"a":3382,"n":"b_0D36","k":"branch","len":1,"c":false},{"a":3390,"n":"b_0D3E","k":"branch","len":1,"c":false},{"a":3398,"n":"b_0D46","k":"branch","len":1,"c":false},{"a":3402,"n":"arctan_ratio","k":"routine","len":299,"c":true},{"a":3419,"n":"b_0D5B","k":"branch","len":1,"c":false},{"a":3432,"n":"b_0D68","k":"branch","len":1,"c":false},{"a":3449,"n":"b_0D79","k":"branch","len":1,"c":false},{"a":3462,"n":"b_0D86","k":"branch","len":1,"c":false},{"a":3479,"n":"b_0D97","k":"branch","len":1,"c":false},{"a":3492,"n":"b_0DA4","k":"branch","len":1,"c":false},{"a":3506,"n":"b_0DB2","k":"branch","len":1,"c":false},{"a":3509,"n":"b_0DB5","k":"branch","len":1,"c":false},{"a":3518,"n":"b_0DBE","k":"branch","len":1,"c":false},{"a":3521,"n":"b_0DC1","k":"branch","len":1,"c":false},{"a":3530,"n":"b_0DCA","k":"branch","len":1,"c":false},{"a":3533,"n":"b_0DCD","k":"branch","len":1,"c":false},{"a":3542,"n":"b_0DD6","k":"branch","len":1,"c":false},{"a":3545,"n":"b_0DD9","k":"branch","len":1,"c":false},{"a":3554,"n":"b_0DE2","k":"branch","len":1,"c":false},{"a":3557,"n":"b_0DE5","k":"branch","len":1,"c":false},{"a":3566,"n":"b_0DEE","k":"branch","len":1,"c":false},{"a":3569,"n":"b_0DF1","k":"branch","len":1,"c":false},{"a":3576,"n":"b_0DF8","k":"branch","len":1,"c":false},{"a":3580,"n":"j_0DFC","k":"branch","len":1,"c":false},{"a":3585,"n":"b_0E01","k":"branch","len":1,"c":false},{"a":3600,"n":"b_0E10","k":"branch","len":1,"c":false},{"a":3615,"n":"b_0E1F","k":"branch","len":1,"c":false},{"a":3637,"n":"b_0E35","k":"branch","len":1,"c":false},{"a":3657,"n":"b_0E49","k":"branch","len":1,"c":false},{"a":3664,"n":"b_0E50","k":"branch","len":1,"c":false},{"a":3696,"n":"b_0E70","k":"branch","len":1,"c":false},{"a":3700,"n":"r_0E74","k":"branch","len":1,"c":false},{"a":3701,"n":"sin_cos_16","k":"routine","len":168,"c":true},{"a":3732,"n":"b_0E94","k":"branch","len":1,"c":false},{"a":3745,"n":"b_0EA1","k":"branch","len":1,"c":false},{"a":3787,"n":"b_0ECB","k":"branch","len":1,"c":false},{"a":3834,"n":"b_0EFA","k":"branch","len":1,"c":false},{"a":3837,"n":"j_0EFD","k":"branch","len":1,"c":false},{"a":3865,"n":"b_0F19","k":"branch","len":1,"c":false},{"a":3869,"n":"f_0F1D","k":"routine","len":25,"c":true},{"a":3878,"n":"b_0F26","k":"branch","len":1,"c":false},{"a":3894,"n":"f_0F36","k":"routine","len":5,"c":true},{"a":3895,"n":"b_0F37","k":"branch","len":1,"c":false},{"a":3899,"n":"sin_cos_x_save","k":"variable","len":1,"c":true},{"a":3900,"n":"landscape_hi_hideout","k":"routine","len":2,"c":true},{"a":3902,"n":"angle_to_radians","k":"routine","len":12,"c":true},{"a":3914,"n":"mul16_by_u","k":"routine","len":24,"c":true},{"a":3937,"n":"r_0F61","k":"branch","len":1,"c":false},{"a":3938,"n":"key_is_down","k":"routine","len":14,"c":true},{"a":3952,"n":"sin_cos_8","k":"routine","len":46,"c":true},{"a":3956,"n":"b_0F74","k":"branch","len":1,"c":false},{"a":3973,"n":"b_0F85","k":"branch","len":1,"c":false},{"a":3986,"n":"b_0F92","k":"branch","len":1,"c":false},{"a":3991,"n":"b_0F97","k":"branch","len":1,"c":false},{"a":3993,"n":"b_0F99","k":"branch","len":1,"c":false},{"a":3998,"n":"mul16x16_signed","k":"routine","len":105,"c":true},{"a":4021,"n":"b_0FB5","k":"branch","len":1,"c":false},{"a":4033,"n":"b_0FC1","k":"branch","len":1,"c":false},{"a":4055,"n":"b_0FD7","k":"branch","len":1,"c":false},{"a":4073,"n":"b_0FE9","k":"branch","len":1,"c":false},{"a":4099,"n":"b_1003","k":"branch","len":1,"c":false},{"a":4103,"n":"apply_sign16","k":"routine","len":2,"c":true},{"a":4105,"n":"negate16","k":"routine","len":14,"c":true},{"a":4118,"n":"r_1016","k":"branch","len":1,"c":false},{"a":4119,"n":"title_loop","k":"routine","len":29,"c":true},{"a":4148,"n":"ask_landscape","k":"routine","len":56,"c":true},{"a":4180,"n":"b_1054","k":"branch","len":1,"c":false},{"a":4191,"n":"b_105F","k":"branch","len":1,"c":false},{"a":4204,"n":"build_landscape","k":"routine","len":8,"c":true},{"a":4212,"n":"wrong_code","k":"routine","len":24,"c":true},{"a":4236,"n":"code_for_0000","k":"table","len":4,"c":true},{"a":4240,"n":"clear_view_screen","k":"routine","len":39,"c":true},{"a":4271,"n":"b_10AF","k":"branch","len":1,"c":false},{"a":4278,"n":"r_10B6","k":"branch","len":1,"c":false},{"a":4279,"n":"pan_view","k":"routine","len":146,"c":true},{"a":4334,"n":"b_10EE","k":"branch","len":1,"c":false},{"a":4340,"n":"b_10F4","k":"branch","len":1,"c":false},{"a":4351,"n":"b_10FF","k":"branch","len":1,"c":false},{"a":4405,"n":"b_1135","k":"branch","len":1,"c":false},{"a":4410,"n":"j_113A","k":"branch","len":1,"c":false},{"a":4413,"n":"r_113D","k":"branch","len":1,"c":false},{"a":4414,"n":"b_113E","k":"branch","len":1,"c":false},{"a":4425,"n":"f_1149","k":"routine","len":2,"c":true},{"a":4427,"n":"pitch_limit_up","k":"variable","len":1,"c":true},{"a":4428,"n":"pitch_limit_down","k":"variable","len":1,"c":true},{"a":4429,"n":"reset_game_state","k":"routine","len":47,"c":true},{"a":4437,"n":"b_1155","k":"branch","len":1,"c":false},{"a":4455,"n":"b_1167","k":"branch","len":1,"c":false},{"a":4462,"n":"b_116E","k":"branch","len":1,"c":false},{"a":4468,"n":"b_1174","k":"branch","len":1,"c":false},{"a":4476,"n":"reset_display_and_tiles","k":"routine","len":35,"c":true},{"a":4483,"n":"b_1183","k":"branch","len":1,"c":false},{"a":4511,"n":"poll_keys","k":"routine","len":117,"c":true},{"a":4526,"n":"b_11AE","k":"branch","len":1,"c":false},{"a":4557,"n":"b_11CD","k":"branch","len":1,"c":false},{"a":4560,"n":"j_11D0","k":"branch","len":1,"c":false},{"a":4564,"n":"b_11D4","k":"branch","len":1,"c":false},{"a":4566,"n":"b_11D6","k":"branch","len":1,"c":false},{"a":4569,"n":"b_11D9","k":"branch","len":1,"c":false},{"a":4593,"n":"b_11F1","k":"branch","len":1,"c":false},{"a":4609,"n":"b_1201","k":"branch","len":1,"c":false},{"a":4619,"n":"b_120B","k":"branch","len":1,"c":false},{"a":4621,"n":"j_120D","k":"branch","len":1,"c":false},{"a":4628,"n":"focus_on_action","k":"routine","len":15,"c":true},{"a":4636,"n":"b_121C","k":"branch","len":1,"c":false},{"a":4643,"n":"same_pan_key_held","k":"routine","len":19,"c":true},{"a":4660,"n":"b_1234","k":"branch","len":1,"c":false},{"a":4662,"n":"space_was_down","k":"variable","len":2,"c":true},{"a":4664,"n":"place_object_low","k":"routine","len":58,"c":true},{"a":4670,"n":"b_123E","k":"branch","len":1,"c":false},{"a":4682,"n":"b_124A","k":"branch","len":1,"c":false},{"a":4720,"n":"b_1270","k":"branch","len":1,"c":false},{"a":4722,"n":"seed_0_to_30","k":"routine","len":10,"c":true},{"a":4732,"n":"gameplay_loop","k":"routine","len":143,"c":true},{"a":4745,"n":"j_1289","k":"branch","len":1,"c":false},{"a":4767,"n":"b_129F","k":"branch","len":1,"c":false},{"a":4780,"n":"b_12AC","k":"branch","len":1,"c":false},{"a":4785,"n":"b_12B1","k":"branch","len":1,"c":false},{"a":4810,"n":"b_12CA","k":"branch","len":1,"c":false},{"a":4816,"n":"b_12D0","k":"branch","len":1,"c":false},{"a":4830,"n":"b_12DE","k":"branch","len":1,"c":false},{"a":4866,"n":"gameplay_exit_if_moved","k":"branch","len":1,"c":false},{"a":4872,"n":"gameplay_restart","k":"branch","len":1,"c":false},{"a":4875,"n":"key_check_delay","k":"variable","len":1,"c":true},{"a":4876,"n":"enemy_timer_gate","k":"routine","len":11,"c":true},{"a":4887,"n":"tick_enemy_timers","k":"routine","len":30,"c":true},{"a":4894,"n":"b_131E","k":"branch","len":1,"c":false},{"a":4904,"n":"b_1328","k":"branch","len":1,"c":false},{"a":4912,"n":"r_1330","k":"branch","len":1,"c":false},{"a":4913,"n":"timer_divider_step","k":"branch","len":1,"c":false},{"a":4917,"n":"enemy_timer_phase","k":"variable","len":1,"c":true},{"a":4918,"n":"reset_view_origin","k":"routine","len":22,"c":true},{"a":4940,"n":"centre_sights","k":"routine","len":23,"c":true},{"a":4963,"n":"scan_game_keys","k":"routine","len":42,"c":true},{"a":4967,"n":"b_1367","k":"branch","len":1,"c":false},{"a":4973,"n":"b_136D","k":"branch","len":1,"c":false},{"a":4995,"n":"b_1383","k":"branch","len":1,"c":false},{"a":5005,"n":"game_key_codes","k":"table","len":15,"c":true},{"a":5020,"n":"game_key_slots","k":"table","len":15,"c":true},{"a":5035,"n":"draw_title_view","k":"routine","len":104,"c":true},{"a":5052,"n":"b_13BC","k":"branch","len":1,"c":false},{"a":5103,"n":"b_13EF","k":"branch","len":1,"c":false},{"a":5124,"n":"b_1404","k":"branch","len":1,"c":false},{"a":5130,"n":"b_140A","k":"branch","len":1,"c":false},{"a":5139,"n":"title_viewer_y","k":"variable","len":2,"c":true},{"a":5141,"n":"title_viewer_pitch","k":"variable","len":2,"c":true},{"a":5143,"n":"title_viewer_x","k":"variable","len":2,"c":true},{"a":5145,"n":"title_text_x_offset","k":"variable","len":2,"c":true},{"a":5147,"n":"title_viewer_z","k":"variable","len":2,"c":true},{"a":5149,"n":"title_viewer_yaw","k":"variable","len":2,"c":true},{"a":5151,"n":"title_view_kind","k":"variable","len":1,"c":true},{"a":5152,"n":"place_enemies","k":"routine","len":48,"c":true},{"a":5161,"n":"b_1429","k":"branch","len":1,"c":false},{"a":5172,"n":"b_1434","k":"branch","len":1,"c":false},{"a":5200,"n":"place_player","k":"routine","len":45,"c":true},{"a":5231,"n":"b_146F","k":"branch","len":1,"c":false},{"a":5240,"n":"b_1478","k":"branch","len":1,"c":false},{"a":5245,"n":"place_trees","k":"routine","len":45,"c":true},{"a":5271,"n":"b_1497","k":"branch","len":1,"c":false},{"a":5273,"n":"b_1499","k":"branch","len":1,"c":false},{"a":5290,"n":"make_secret_code","k":"routine","len":42,"c":true},{"a":5302,"n":"b_14B6","k":"branch","len":1,"c":false},{"a":5312,"n":"b_14C0","k":"branch","len":1,"c":false},{"a":5331,"n":"secret_code_return","k":"branch","len":1,"c":false},{"a":5332,"n":"enemy_colour3_by_count","k":"table","len":8,"c":true},{"a":5340,"n":"secret_code_verdict","k":"routine","len":23,"c":true},{"a":5363,"n":"enemy_colour2_by_count","k":"table","len":8,"c":true},{"a":5371,"n":"place_enemies_on_peaks","k":"routine","len":162,"c":true},{"a":5376,"n":"j_1500","k":"branch","len":1,"c":false},{"a":5383,"n":"b_1507","k":"branch","len":1,"c":false},{"a":5403,"n":"b_151B","k":"branch","len":1,"c":false},{"a":5487,"n":"b_156F","k":"branch","len":1,"c":false},{"a":5510,"n":"b_1586","k":"branch","len":1,"c":false},{"a":5522,"n":"j_1592","k":"branch","len":1,"c":false},{"a":5533,"n":"list_blocks_at_height","k":"routine","len":39,"c":true},{"a":5537,"n":"b_15A1","k":"branch","len":1,"c":false},{"a":5549,"n":"b_15AD","k":"branch","len":1,"c":false},{"a":5559,"n":"b_15B7","k":"branch","len":1,"c":false},{"a":5570,"n":"b_15C2","k":"branch","len":1,"c":false},{"a":5572,"n":"leading_zero_masks","k":"table","len":8,"c":true},{"a":5580,"n":"find_block_peaks","k":"routine","len":105,"c":true},{"a":5584,"n":"b_15D0","k":"branch","len":1,"c":false},{"a":5616,"n":"b_15F0","k":"branch","len":1,"c":false},{"a":5630,"n":"b_15FE","k":"branch","len":1,"c":false},{"a":5657,"n":"b_1619","k":"branch","len":1,"c":false},{"a":5667,"n":"b_1623","k":"branch","len":1,"c":false},{"a":5685,"n":"update_scanner","k":"routine","len":10,"c":true},{"a":5695,"n":"draw_scanner","k":"routine","len":50,"c":true},{"a":5708,"n":"b_164C","k":"branch","len":1,"c":false},{"a":5727,"n":"b_165F","k":"branch","len":1,"c":false},{"a":5741,"n":"b_166D","k":"branch","len":1,"c":false},{"a":5745,"n":"scanner_noise_ptr","k":"routine","len":45,"c":true},{"a":5789,"n":"scanner_done","k":"branch","len":1,"c":false},{"a":5790,"n":"scanner_spare_byte","k":"variable","len":1,"c":true},{"a":5791,"n":"scanner_column","k":"variable","len":1,"c":true},{"a":5792,"n":"scanner_fill_state","k":"variable","len":1,"c":true},{"a":5793,"n":"scanner_fill_bytes","k":"table","len":11,"c":true},{"a":5804,"n":"scanner_column_lo","k":"table","len":9,"c":true},{"a":5813,"n":"run_enemy_turn","k":"routine","len":33,"c":true},{"a":5830,"n":"b_16C6","k":"branch","len":1,"c":false},{"a":5846,"n":"next_enemy_turn","k":"routine","len":16,"c":true},{"a":5857,"n":"b_16E1","k":"branch","len":1,"c":false},{"a":5862,"n":"enemy_tactics","k":"routine","len":25,"c":true},{"a":5887,"n":"meanie_turn","k":"routine","len":116,"c":true},{"a":5928,"n":"meanie_turn_toward","k":"branch","len":1,"c":false},{"a":5937,"n":"b_1731","k":"branch","len":1,"c":false},{"a":5976,"n":"meanie_target_lost","k":"branch","len":1,"c":false},{"a":5981,"n":"meanie_back_to_tree","k":"branch","len":1,"c":false},{"a":6003,"n":"tactics_spend_energy","k":"routine","len":34,"c":true},{"a":6013,"n":"tactics_drain_scan","k":"branch","len":1,"c":false},{"a":6034,"n":"b_1792","k":"branch","len":1,"c":false},{"a":6037,"n":"tactics_find_robot","k":"routine","len":100,"c":true},{"a":6057,"n":"b_17A9","k":"branch","len":1,"c":false},{"a":6060,"n":"b_17AC","k":"branch","len":1,"c":false},{"a":6066,"n":"b_17B2","k":"branch","len":1,"c":false},{"a":6090,"n":"b_17CA","k":"branch","len":1,"c":false},{"a":6112,"n":"tactics_find_tree_or_boulder","k":"branch","len":1,"c":false},{"a":6122,"n":"tactics_drain_now","k":"branch","len":1,"c":false},{"a":6137,"n":"tactics_turn","k":"routine","len":44,"c":true},{"a":6146,"n":"tactics_end_turn","k":"branch","len":1,"c":false},{"a":6149,"n":"b_1805","k":"branch","len":1,"c":false},{"a":6181,"n":"tactics_have_target","k":"routine","len":45,"c":true},{"a":6202,"n":"tactics_wait","k":"branch","len":1,"c":false},{"a":6205,"n":"b_183D","k":"branch","len":1,"c":false},{"a":6226,"n":"tactics_try_meanie","k":"routine","len":36,"c":true},{"a":6247,"n":"b_1867","k":"branch","len":1,"c":false},{"a":6254,"n":"b_186E","k":"branch","len":1,"c":false},{"a":6262,"n":"redraw_dithered","k":"routine","len":17,"c":true},{"a":6267,"n":"redraw_at_once","k":"branch","len":1,"c":false},{"a":6276,"n":"tactics_done","k":"branch","len":1,"c":false},{"a":6279,"n":"check_enemy_sight","k":"routine","len":27,"c":true},{"a":6306,"n":"derive_altered_seed","k":"routine","len":22,"c":true},{"a":6321,"n":"b_18B1","k":"branch","len":1,"c":false},{"a":6328,"n":"check_sight_arc","k":"routine","len":102,"c":true},{"a":6374,"n":"b_18E6","k":"branch","len":1,"c":false},{"a":6404,"n":"b_1904","k":"branch","len":1,"c":false},{"a":6422,"n":"sight_done_clear","k":"branch","len":1,"c":false},{"a":6423,"n":"sight_done","k":"branch","len":1,"c":false},{"a":6430,"n":"sight_saved_x","k":"variable","len":1,"c":true},{"a":6431,"n":"check_player_drain","k":"routine","len":83,"c":true},{"a":6437,"n":"b_1925","k":"branch","len":1,"c":false},{"a":6453,"n":"b_1935","k":"branch","len":1,"c":false},{"a":6474,"n":"b_194A","k":"branch","len":1,"c":false},{"a":6477,"n":"b_194D","k":"branch","len":1,"c":false},{"a":6513,"n":"r_1971","k":"branch","len":1,"c":false},{"a":6514,"n":"drain_prev_sound","k":"variable","len":1,"c":true},{"a":6515,"n":"clear_meanie_search","k":"routine","len":19,"c":true},{"a":6534,"n":"find_meanie_tree","k":"routine","len":122,"c":true},{"a":6543,"n":"b_198F","k":"branch","len":1,"c":false},{"a":6561,"n":"meanie_search_next","k":"branch","len":1,"c":false},{"a":6595,"n":"b_19C3","k":"branch","len":1,"c":false},{"a":6613,"n":"b_19D5","k":"branch","len":1,"c":false},{"a":6650,"n":"b_19FA","k":"branch","len":1,"c":false},{"a":6656,"n":"player_drained_out","k":"routine","len":8,"c":true},{"a":6664,"n":"drain_target_energy","k":"routine","len":85,"c":true},{"a":6694,"n":"drain_non_player","k":"branch","len":1,"c":false},{"a":6714,"n":"b_1A3A","k":"branch","len":1,"c":false},{"a":6724,"n":"b_1A44","k":"branch","len":1,"c":false},{"a":6731,"n":"b_1A4B","k":"branch","len":1,"c":false},{"a":6734,"n":"j_1A4E","k":"branch","len":1,"c":false},{"a":6735,"n":"j_1A4F","k":"branch","len":1,"c":false},{"a":6749,"n":"spend_enemy_energy","k":"routine","len":42,"c":true},{"a":6784,"n":"spend_energy_done","k":"branch","len":1,"c":false},{"a":6785,"n":"b_1A81","k":"branch","len":1,"c":false},{"a":6791,"n":"advance_to_next_landscape","k":"routine","len":41,"c":true},{"a":6832,"n":"find_drainable_object","k":"routine","len":68,"c":true},{"a":6834,"n":"b_1AB2","k":"branch","len":1,"c":false},{"a":6850,"n":"b_1AC2","k":"branch","len":1,"c":false},{"a":6883,"n":"b_1AE3","k":"branch","len":1,"c":false},{"a":6895,"n":"b_1AEF","k":"branch","len":1,"c":false},{"a":6900,"n":"abort_if_visible_in_pan","k":"routine","len":5,"c":true},{"a":6905,"n":"abort_enemy_turn","k":"routine","len":7,"c":true},{"a":6912,"n":"object_visible_during_pan","k":"routine","len":24,"c":true},{"a":6935,"n":"visibility_done","k":"branch","len":1,"c":false},{"a":6936,"n":"do_action_key","k":"routine","len":86,"c":true},{"a":6951,"n":"b_1B27","k":"branch","len":1,"c":false},{"a":6953,"n":"action_not_hyperspace","k":"branch","len":1,"c":false},{"a":6976,"n":"action_follow_sights","k":"branch","len":1,"c":false},{"a":7022,"n":"note_transfer_onto_tower","k":"routine","len":20,"c":true},{"a":7042,"n":"action_key_outcomes","k":"routine","len":142,"c":true},{"a":7044,"n":"play_move_music","k":"branch","len":1,"c":false},{"a":7054,"n":"absorb_object","k":"branch","len":1,"c":false},{"a":7070,"n":"delete_and_credit","k":"branch","len":1,"c":false},{"a":7081,"n":"refuse_action","k":"branch","len":1,"c":false},{"a":7098,"n":"create_object","k":"branch","len":1,"c":false},{"a":7131,"n":"b_1BDB","k":"branch","len":1,"c":false},{"a":7146,"n":"b_1BEA","k":"branch","len":1,"c":false},{"a":7148,"n":"absorb_meanie","k":"branch","len":1,"c":false},{"a":7150,"n":"b_1BEE","k":"branch","len":1,"c":false},{"a":7166,"n":"b_1BFE","k":"branch","len":1,"c":false},{"a":7179,"n":"b_1C0B","k":"branch","len":1,"c":false},{"a":7184,"n":"sights_to_gaze_vector","k":"routine","len":68,"c":true},{"a":7252,"n":"angles_to_vector","k":"routine","len":41,"c":true},{"a":7293,"n":"scale_by_trig_term","k":"routine","len":32,"c":true},{"a":7325,"n":"trig_term_div16","k":"routine","len":30,"c":true},{"a":7352,"n":"b_1CB8","k":"branch","len":1,"c":false},{"a":7355,"n":"step_along_vector","k":"routine","len":33,"c":true},{"a":7357,"n":"b_1CBD","k":"branch","len":1,"c":false},{"a":7374,"n":"b_1CCE","k":"branch","len":1,"c":false},{"a":7388,"n":"unused_1cdc","k":"variable","len":1,"c":true},{"a":7389,"n":"trace_gaze","k":"routine","len":105,"c":true},{"a":7400,"n":"gaze_step","k":"branch","len":1,"c":false},{"a":7474,"n":"b_1D32","k":"branch","len":1,"c":false},{"a":7490,"n":"gaze_hit","k":"branch","len":1,"c":false},{"a":7492,"n":"gaze_blocked","k":"branch","len":1,"c":false},{"a":7494,"n":"gaze_sloping_tile","k":"routine","len":68,"c":true},{"a":7538,"n":"b_1D72","k":"branch","len":1,"c":false},{"a":7559,"n":"b_1D87","k":"branch","len":1,"c":false},{"a":7562,"n":"gaze_pick_slope_edge","k":"routine","len":37,"c":true},{"a":7573,"n":"b_1D95","k":"branch","len":1,"c":false},{"a":7580,"n":"b_1D9C","k":"branch","len":1,"c":false},{"a":7581,"n":"j_1D9D","k":"branch","len":1,"c":false},{"a":7590,"n":"b_1DA6","k":"branch","len":1,"c":false},{"a":7599,"n":"gaze_test_slope_edge","k":"routine","len":66,"c":true},{"a":7607,"n":"b_1DB7","k":"branch","len":1,"c":false},{"a":7613,"n":"b_1DBD","k":"branch","len":1,"c":false},{"a":7632,"n":"b_1DD0","k":"branch","len":1,"c":false},{"a":7662,"n":"b_1DEE","k":"branch","len":1,"c":false},{"a":7665,"n":"slope_edge_choice","k":"table","len":8,"c":true},{"a":7673,"n":"tile_height_under_gaze","k":"routine","len":182,"c":true},{"a":7694,"n":"b_1E0E","k":"branch","len":1,"c":false},{"a":7702,"n":"b_1E16","k":"branch","len":1,"c":false},{"a":7743,"n":"b_1E3F","k":"branch","len":1,"c":false},{"a":7752,"n":"b_1E48","k":"branch","len":1,"c":false},{"a":7785,"n":"b_1E69","k":"branch","len":1,"c":false},{"a":7833,"n":"b_1E99","k":"branch","len":1,"c":false},{"a":7844,"n":"b_1EA4","k":"branch","len":1,"c":false},{"a":7855,"n":"tile_centre_offset","k":"routine","len":29,"c":true},{"a":7864,"n":"b_1EB8","k":"branch","len":1,"c":false},{"a":7875,"n":"b_1EC3","k":"branch","len":1,"c":false},{"a":7881,"n":"b_1EC9","k":"branch","len":1,"c":false},{"a":7884,"n":"load_object_coords","k":"routine","len":35,"c":true},{"a":7919,"n":"remove_object","k":"routine","len":39,"c":true},{"a":7943,"n":"b_1F07","k":"branch","len":1,"c":false},{"a":7950,"n":"b_1F0E","k":"branch","len":1,"c":false},{"a":7958,"n":"place_object_on_tile","k":"routine","len":124,"c":true},{"a":7994,"n":"b_1F3A","k":"branch","len":1,"c":false},{"a":8018,"n":"b_1F52","k":"branch","len":1,"c":false},{"a":8029,"n":"b_1F5D","k":"branch","len":1,"c":false},{"a":8038,"n":"b_1F66","k":"branch","len":1,"c":false},{"a":8054,"n":"j_1F76","k":"branch","len":1,"c":false},{"a":8080,"n":"b_1F90","k":"branch","len":1,"c":false},{"a":8082,"n":"spawn_tile_index","k":"variable","len":1,"c":true},{"a":8083,"n":"reset_redraw_flags","k":"routine","len":12,"c":true},{"a":8095,"n":"redraw_object","k":"routine","len":246,"c":true},{"a":8115,"n":"b_1FB3","k":"branch","len":1,"c":false},{"a":8130,"n":"redraw_next_pass","k":"branch","len":1,"c":false},{"a":8175,"n":"b_1FEF","k":"branch","len":1,"c":false},{"a":8188,"n":"b_1FFC","k":"branch","len":1,"c":false},{"a":8236,"n":"redraw_copy_out","k":"branch","len":1,"c":false},{"a":8257,"n":"b_2041","k":"branch","len":1,"c":false},{"a":8278,"n":"b_2056","k":"branch","len":1,"c":false},{"a":8286,"n":"b_205E","k":"branch","len":1,"c":false},{"a":8303,"n":"b_206F","k":"branch","len":1,"c":false},{"a":8314,"n":"b_207A","k":"branch","len":1,"c":false},{"a":8316,"n":"j_207C","k":"branch","len":1,"c":false},{"a":8325,"n":"b_2085","k":"branch","len":1,"c":false},{"a":8338,"n":"b_2092","k":"branch","len":1,"c":false},{"a":8341,"n":"buffer_copy_ptr","k":"variable","len":1,"c":true},{"a":8342,"n":"buffer_copy_ptr_hi","k":"variable","len":1,"c":true},{"a":8343,"n":"unused_screen_ptr","k":"variable","len":2,"c":true},{"a":8345,"n":"dither_rounds","k":"variable","len":1,"c":true},{"a":8346,"n":"redraw_yaw_shift","k":"variable","len":1,"c":true},{"a":8347,"n":"find_object_on_screen","k":"routine","len":119,"c":true},{"a":8372,"n":"b_20B4","k":"branch","len":1,"c":false},{"a":8401,"n":"b_20D1","k":"branch","len":1,"c":false},{"a":8408,"n":"b_20D8","k":"branch","len":1,"c":false},{"a":8438,"n":"b_20F6","k":"branch","len":1,"c":false},{"a":8459,"n":"b_210B","k":"branch","len":1,"c":false},{"a":8464,"n":"b_2110","k":"branch","len":1,"c":false},{"a":8466,"n":"object_half_widths","k":"table","len":7,"c":true},{"a":8473,"n":"next_pass_buffer","k":"variable","len":1,"c":true},{"a":8474,"n":"saved_viewer_yaw","k":"variable","len":1,"c":true},{"a":8475,"n":"object_columns","k":"variable","len":1,"c":true},{"a":8476,"n":"object_left_col","k":"variable","len":1,"c":true},{"a":8477,"n":"alloc_object_slot","k":"routine","len":3,"c":true},{"a":8480,"n":"alloc_slot_for_type","k":"routine","len":22,"c":true},{"a":8482,"n":"b_2122","k":"branch","len":1,"c":false},{"a":8492,"n":"b_212C","k":"branch","len":1,"c":false},{"a":8502,"n":"adjust_player_energy","k":"routine","len":25,"c":true},{"a":8517,"n":"b_2145","k":"branch","len":1,"c":false},{"a":8520,"n":"b_2148","k":"branch","len":1,"c":false},{"a":8527,"n":"energy_by_type","k":"table","len":7,"c":true},{"a":8534,"n":"hyperspace_player","k":"routine","len":88,"c":true},{"a":8575,"n":"b_217F","k":"branch","len":1,"c":false},{"a":8608,"n":"b_21A0","k":"branch","len":1,"c":false},{"a":8615,"n":"b_21A7","k":"branch","len":1,"c":false},{"a":8621,"n":"r_21AD","k":"branch","len":1,"c":false},{"a":8622,"n":"draw_stacked_objects","k":"routine","len":99,"c":true},{"a":8629,"n":"b_21B5","k":"branch","len":1,"c":false},{"a":8646,"n":"b_21C6","k":"branch","len":1,"c":false},{"a":8676,"n":"b_21E4","k":"branch","len":1,"c":false},{"a":8692,"n":"b_21F4","k":"branch","len":1,"c":false},{"a":8699,"n":"b_21FB","k":"branch","len":1,"c":false},{"a":8703,"n":"b_21FF","k":"branch","len":1,"c":false},{"a":8706,"n":"b_2202","k":"branch","len":1,"c":false},{"a":8720,"n":"r_2210","k":"branch","len":1,"c":false},{"a":8721,"n":"fill_background","k":"routine","len":117,"c":true},{"a":8736,"n":"b_2220","k":"branch","len":1,"c":false},{"a":8738,"n":"b_2222","k":"branch","len":1,"c":false},{"a":8755,"n":"b_2233","k":"branch","len":1,"c":false},{"a":8773,"n":"j_2245","k":"branch","len":1,"c":false},{"a":8775,"n":"b_2247","k":"branch","len":1,"c":false},{"a":8831,"n":"b_227F","k":"branch","len":1,"c":false},{"a":8838,"n":"bg_even_lines","k":"table","len":4,"c":true},{"a":8842,"n":"bg_odd_lines","k":"table","len":4,"c":true},{"a":8846,"n":"pixel_masks","k":"table","len":4,"c":true},{"a":8850,"n":"colour_bytes","k":"table","len":4,"c":true},{"a":8854,"n":"masks_left_of","k":"table","len":4,"c":true},{"a":8858,"n":"masks_right_of","k":"table","len":4,"c":true},{"a":8862,"n":"masks_through","k":"table","len":4,"c":true},{"a":8866,"n":"buffer_offsets","k":"table","len":4,"c":true},{"a":8870,"n":"unused_offsets_hi","k":"table","len":4,"c":true},{"a":8874,"n":"draw_polygon_spans","k":"routine","len":181,"c":true},{"a":8947,"n":"b_22F3","k":"branch","len":1,"c":false},{"a":8976,"n":"r_2310","k":"branch","len":1,"c":false},{"a":8977,"n":"span_next_line","k":"branch","len":1,"c":false},{"a":9003,"n":"b_232B","k":"branch","len":1,"c":false},{"a":9009,"n":"b_2331","k":"branch","len":1,"c":false},{"a":9015,"n":"b_2337","k":"branch","len":1,"c":false},{"a":9024,"n":"b_2340","k":"branch","len":1,"c":false},{"a":9045,"n":"b_2355","k":"branch","len":1,"c":false},{"a":9055,"n":"a_235F","k":"routine","len":59,"c":true},{"a":9074,"n":"b_2372","k":"branch","len":1,"c":false},{"a":9076,"n":"b_2374","k":"branch","len":1,"c":false},{"a":9079,"n":"span_line_start","k":"branch","len":1,"c":false},{"a":9114,"n":"a_239A","k":"routine","len":37,"c":true},{"a":9118,"n":"b_239E","k":"branch","len":1,"c":false},{"a":9151,"n":"a_23BF","k":"routine","len":28,"c":true},{"a":9168,"n":"b_23D0","k":"branch","len":1,"c":false},{"a":9179,"n":"a_23DB","k":"routine","len":128,"c":true},{"a":9304,"n":"b_2458","k":"branch","len":1,"c":false},{"a":9307,"n":"build_tile_visibility","k":"routine","len":127,"c":true},{"a":9318,"n":"b_2466","k":"branch","len":1,"c":false},{"a":9336,"n":"b_2478","k":"branch","len":1,"c":false},{"a":9354,"n":"b_248A","k":"branch","len":1,"c":false},{"a":9370,"n":"b_249A","k":"branch","len":1,"c":false},{"a":9433,"n":"r_24D9","k":"branch","len":1,"c":false},{"a":9434,"n":"bit_masks_msb","k":"table","len":8,"c":true},{"a":9442,"n":"trace_row_corners","k":"routine","len":104,"c":true},{"a":9453,"n":"j_24ED","k":"branch","len":1,"c":false},{"a":9477,"n":"b_2505","k":"branch","len":1,"c":false},{"a":9505,"n":"b_2521","k":"branch","len":1,"c":false},{"a":9511,"n":"b_2527","k":"branch","len":1,"c":false},{"a":9522,"n":"b_2532","k":"branch","len":1,"c":false},{"a":9546,"n":"check_code_stash","k":"routine","len":44,"c":true},{"a":9569,"n":"b_2561","k":"branch","len":1,"c":false},{"a":9590,"n":"trace_corner_ray","k":"routine","len":78,"c":true},{"a":9594,"n":"b_257A","k":"branch","len":1,"c":false},{"a":9647,"n":"b_25AF","k":"branch","len":1,"c":false},{"a":9648,"n":"b_25B0","k":"branch","len":1,"c":false},{"a":9667,"n":"r_25C3","k":"branch","len":1,"c":false},{"a":9668,"n":"build_corner_heights","k":"routine","len":97,"c":true},{"a":9682,"n":"b_25D2","k":"branch","len":1,"c":false},{"a":9688,"n":"stash_fail_restart","k":"branch","len":1,"c":false},{"a":9691,"n":"b_25DB","k":"branch","len":1,"c":false},{"a":9715,"n":"b_25F3","k":"branch","len":1,"c":false},{"a":9725,"n":"b_25FD","k":"branch","len":1,"c":false},{"a":9738,"n":"b_260A","k":"branch","len":1,"c":false},{"a":9746,"n":"b_2612","k":"branch","len":1,"c":false},{"a":9753,"n":"b_2619","k":"branch","len":1,"c":false},{"a":9756,"n":"b_261C","k":"branch","len":1,"c":false},{"a":9765,"n":"draw_view_rows","k":"routine","len":430,"c":true},{"a":9792,"n":"b_2640","k":"branch","len":1,"c":false},{"a":9879,"n":"b_2697","k":"branch","len":1,"c":false},{"a":9895,"n":"b_26A7","k":"branch","len":1,"c":false},{"a":9916,"n":"b_26BC","k":"branch","len":1,"c":false},{"a":9929,"n":"j_26C9","k":"branch","len":1,"c":false},{"a":9950,"n":"view_next_row","k":"branch","len":1,"c":false},{"a":9980,"n":"b_26FC","k":"branch","len":1,"c":false},{"a":9982,"n":"b_26FE","k":"branch","len":1,"c":false},{"a":9993,"n":"b_2709","k":"branch","len":1,"c":false},{"a":10003,"n":"b_2713","k":"branch","len":1,"c":false},{"a":10013,"n":"b_271D","k":"branch","len":1,"c":false},{"a":10031,"n":"b_272F","k":"branch","len":1,"c":false},{"a":10039,"n":"b_2737","k":"branch","len":1,"c":false},{"a":10049,"n":"b_2741","k":"branch","len":1,"c":false},{"a":10059,"n":"b_274B","k":"branch","len":1,"c":false},{"a":10077,"n":"b_275D","k":"branch","len":1,"c":false},{"a":10090,"n":"b_276A","k":"branch","len":1,"c":false},{"a":10093,"n":"b_276D","k":"branch","len":1,"c":false},{"a":10095,"n":"view_own_row","k":"branch","len":1,"c":false},{"a":10107,"n":"b_277B","k":"branch","len":1,"c":false},{"a":10118,"n":"j_2786","k":"branch","len":1,"c":false},{"a":10131,"n":"b_2793","k":"branch","len":1,"c":false},{"a":10193,"n":"b_27D1","k":"branch","len":1,"c":false},{"a":10195,"n":"quadrant_offsets","k":"table","len":4,"c":true},{"a":10199,"n":"find_row_view_edges","k":"routine","len":85,"c":true},{"a":10210,"n":"b_27E2","k":"branch","len":1,"c":false},{"a":10227,"n":"b_27F3","k":"branch","len":1,"c":false},{"a":10234,"n":"b_27FA","k":"branch","len":1,"c":false},{"a":10239,"n":"b_27FF","k":"branch","len":1,"c":false},{"a":10257,"n":"b_2811","k":"branch","len":1,"c":false},{"a":10264,"n":"b_2818","k":"branch","len":1,"c":false},{"a":10272,"n":"b_2820","k":"branch","len":1,"c":false},{"a":10277,"n":"j_2825","k":"branch","len":1,"c":false},{"a":10279,"n":"b_2827","k":"branch","len":1,"c":false},{"a":10284,"n":"row_step_end","k":"routine","len":2,"c":true},{"a":10286,"n":"step_corner_left","k":"routine","len":8,"c":true},{"a":10294,"n":"step_corner_right","k":"routine","len":7,"c":true},{"a":10301,"n":"corner_view_angles","k":"routine","len":288,"c":true},{"a":10309,"n":"corner_angles_calc","k":"branch","len":1,"c":false},{"a":10352,"n":"b_2870","k":"branch","len":1,"c":false},{"a":10378,"n":"b_288A","k":"branch","len":1,"c":false},{"a":10416,"n":"b_28B0","k":"branch","len":1,"c":false},{"a":10427,"n":"b_28BB","k":"branch","len":1,"c":false},{"a":10444,"n":"b_28CC","k":"branch","len":1,"c":false},{"a":10452,"n":"j_28D4","k":"branch","len":1,"c":false},{"a":10484,"n":"b_28F4","k":"branch","len":1,"c":false},{"a":10502,"n":"b_2906","k":"branch","len":1,"c":false},{"a":10526,"n":"j_291E","k":"branch","len":1,"c":false},{"a":10575,"n":"b_294F","k":"branch","len":1,"c":false},{"a":10583,"n":"b_2957","k":"branch","len":1,"c":false},{"a":10589,"n":"draw_landscape_row","k":"routine","len":48,"c":true},{"a":10593,"n":"j_2961","k":"branch","len":1,"c":false},{"a":10611,"n":"b_2973","k":"branch","len":1,"c":false},{"a":10613,"n":"j_2975","k":"branch","len":1,"c":false},{"a":10636,"n":"r_298C","k":"branch","len":1,"c":false},{"a":10637,"n":"flip_row_buffer","k":"routine","len":6,"c":true},{"a":10643,"n":"set_draw_buffer","k":"routine","len":40,"c":true},{"a":10683,"n":"buffer_origin_hi","k":"table","len":3,"c":true},{"a":10686,"n":"buffer_left_px","k":"table","len":3,"c":true},{"a":10689,"n":"buffer_width_px","k":"table","len":3,"c":true},{"a":10692,"n":"buffer_min_yaw_hi","k":"table","len":3,"c":true},{"a":10695,"n":"set_object_buffer","k":"routine","len":50,"c":true},{"a":10744,"n":"r_29F8","k":"branch","len":1,"c":false},{"a":10745,"n":"draw_title_block_tile","k":"routine","len":25,"c":true},{"a":10770,"n":"draw_tile_and_objects","k":"routine","len":57,"c":true},{"a":10805,"n":"b_2A35","k":"branch","len":1,"c":false},{"a":10817,"n":"b_2A41","k":"branch","len":1,"c":false},{"a":10827,"n":"draw_flat_tile","k":"routine","len":12,"c":true},{"a":10839,"n":"set_stash_offset","k":"routine","len":6,"c":true},{"a":10845,"n":"draw_one_face_tile","k":"routine","len":12,"c":true},{"a":10857,"n":"draw_sloping_tile","k":"routine","len":33,"c":true},{"a":10890,"n":"draw_two_face_tile","k":"routine","len":31,"c":true},{"a":10921,"n":"draw_polygon","k":"routine","len":35,"c":true},{"a":10944,"n":"b_2AC0","k":"branch","len":1,"c":false},{"a":10947,"n":"b_2AC3","k":"branch","len":1,"c":false},{"a":10955,"n":"r_2ACB","k":"branch","len":1,"c":false},{"a":10956,"n":"generate_landscape","k":"routine","len":86,"c":true},{"a":10958,"n":"b_2ACE","k":"branch","len":1,"c":false},{"a":10976,"n":"b_2AE0","k":"branch","len":1,"c":false},{"a":10982,"n":"b_2AE6","k":"branch","len":1,"c":false},{"a":11009,"n":"b_2B01","k":"branch","len":1,"c":false},{"a":11013,"n":"b_2B05","k":"branch","len":1,"c":false},{"a":11042,"n":"process_all_tiles","k":"routine","len":97,"c":true},{"a":11048,"n":"b_2B28","k":"branch","len":1,"c":false},{"a":11052,"n":"b_2B2C","k":"branch","len":1,"c":false},{"a":11083,"n":"b_2B4B","k":"branch","len":1,"c":false},{"a":11094,"n":"b_2B56","k":"branch","len":1,"c":false},{"a":11113,"n":"b_2B69","k":"branch","len":1,"c":false},{"a":11122,"n":"b_2B72","k":"branch","len":1,"c":false},{"a":11125,"n":"b_2B75","k":"branch","len":1,"c":false},{"a":11128,"n":"b_2B78","k":"branch","len":1,"c":false},{"a":11139,"n":"smooth_landscape","k":"routine","len":37,"c":true},{"a":11145,"n":"b_2B89","k":"branch","len":1,"c":false},{"a":11149,"n":"b_2B8D","k":"branch","len":1,"c":false},{"a":11162,"n":"b_2B9A","k":"branch","len":1,"c":false},{"a":11176,"n":"point_at_tile","k":"routine","len":20,"c":true},{"a":11196,"n":"smooth_tile_strip","k":"routine","len":160,"c":true},{"a":11202,"n":"b_2BC2","k":"branch","len":1,"c":false},{"a":11214,"n":"b_2BCE","k":"branch","len":1,"c":false},{"a":11216,"n":"j_2BD0","k":"branch","len":1,"c":false},{"a":11233,"n":"b_2BE1","k":"branch","len":1,"c":false},{"a":11259,"n":"b_2BFB","k":"branch","len":1,"c":false},{"a":11272,"n":"j_2C08","k":"branch","len":1,"c":false},{"a":11280,"n":"b_2C10","k":"branch","len":1,"c":false},{"a":11283,"n":"j_2C13","k":"branch","len":1,"c":false},{"a":11286,"n":"b_2C16","k":"branch","len":1,"c":false},{"a":11305,"n":"b_2C29","k":"branch","len":1,"c":false},{"a":11308,"n":"b_2C2C","k":"branch","len":1,"c":false},{"a":11310,"n":"b_2C2E","k":"branch","len":1,"c":false},{"a":11326,"n":"b_2C3E","k":"branch","len":1,"c":false},{"a":11334,"n":"b_2C46","k":"branch","len":1,"c":false},{"a":11342,"n":"b_2C4E","k":"branch","len":1,"c":false},{"a":11356,"n":"set_cracker_seed","k":"routine","len":6,"c":true},{"a":11362,"n":"store_tile_strip","k":"routine","len":26,"c":true},{"a":11364,"n":"b_2C64","k":"branch","len":1,"c":false},{"a":11374,"n":"b_2C6E","k":"branch","len":1,"c":false},{"a":11376,"n":"j_2C70","k":"branch","len":1,"c":false},{"a":11388,"n":"get_tile_shape","k":"routine","len":153,"c":true},{"a":11448,"n":"b_2CB8","k":"branch","len":1,"c":false},{"a":11451,"n":"b_2CBB","k":"branch","len":1,"c":false},{"a":11463,"n":"r_2CC7","k":"branch","len":1,"c":false},{"a":11464,"n":"b_2CC8","k":"branch","len":1,"c":false},{"a":11474,"n":"b_2CD2","k":"branch","len":1,"c":false},{"a":11477,"n":"b_2CD5","k":"branch","len":1,"c":false},{"a":11485,"n":"r_2CDD","k":"branch","len":1,"c":false},{"a":11486,"n":"b_2CDE","k":"branch","len":1,"c":false},{"a":11494,"n":"r_2CE6","k":"branch","len":1,"c":false},{"a":11495,"n":"b_2CE7","k":"branch","len":1,"c":false},{"a":11517,"n":"r_2CFD","k":"branch","len":1,"c":false},{"a":11518,"n":"b_2CFE","k":"branch","len":1,"c":false},{"a":11526,"n":"r_2D06","k":"branch","len":1,"c":false},{"a":11527,"n":"b_2D07","k":"branch","len":1,"c":false},{"a":11537,"n":"r_2D11","k":"branch","len":1,"c":false},{"a":11538,"n":"b_2D12","k":"branch","len":1,"c":false},{"a":11541,"n":"triangle_third_point","k":"table","len":4,"c":true},{"a":11545,"n":"tile_face_colours","k":"table","len":32,"c":true},{"a":11577,"n":"triangle_first_point","k":"table","len":16,"c":true},{"a":11593,"n":"triangle_points","k":"routine","len":35,"c":true},{"a":11604,"n":"b_2D54","k":"branch","len":1,"c":false},{"a":11628,"n":"get_polygon_lines","k":"routine","len":376,"c":true},{"a":11662,"n":"b_2D8E","k":"branch","len":1,"c":false},{"a":11667,"n":"b_2D93","k":"branch","len":1,"c":false},{"a":11673,"n":"b_2D99","k":"branch","len":1,"c":false},{"a":11712,"n":"b_2DC0","k":"branch","len":1,"c":false},{"a":11721,"n":"b_2DC9","k":"branch","len":1,"c":false},{"a":11727,"n":"b_2DCF","k":"branch","len":1,"c":false},{"a":11762,"n":"j_2DF2","k":"branch","len":1,"c":false},{"a":11780,"n":"j_2E04","k":"branch","len":1,"c":false},{"a":11833,"n":"b_2E39","k":"branch","len":1,"c":false},{"a":11855,"n":"b_2E4F","k":"branch","len":1,"c":false},{"a":11858,"n":"b_2E52","k":"branch","len":1,"c":false},{"a":11873,"n":"b_2E61","k":"branch","len":1,"c":false},{"a":11916,"n":"b_2E8C","k":"branch","len":1,"c":false},{"a":11926,"n":"b_2E96","k":"branch","len":1,"c":false},{"a":11966,"n":"b_2EBE","k":"branch","len":1,"c":false},{"a":11978,"n":"b_2ECA","k":"branch","len":1,"c":false},{"a":11980,"n":"b_2ECC","k":"branch","len":1,"c":false},{"a":11989,"n":"b_2ED5","k":"branch","len":1,"c":false},{"a":11995,"n":"b_2EDB","k":"branch","len":1,"c":false},{"a":12000,"n":"b_2EE0","k":"branch","len":1,"c":false},{"a":12003,"n":"r_2EE3","k":"branch","len":1,"c":false},{"a":12004,"n":"trace_polygon_edge","k":"routine","len":122,"c":true},{"a":12024,"n":"b_2EF8","k":"branch","len":1,"c":false},{"a":12026,"n":"b_2EFA","k":"branch","len":1,"c":false},{"a":12028,"n":"b_2EFC","k":"branch","len":1,"c":false},{"a":12048,"n":"b_2F10","k":"branch","len":1,"c":false},{"a":12053,"n":"b_2F15","k":"branch","len":1,"c":false},{"a":12055,"n":"b_2F17","k":"branch","len":1,"c":false},{"a":12079,"n":"b_2F2F","k":"branch","len":1,"c":false},{"a":12083,"n":"b_2F33","k":"branch","len":1,"c":false},{"a":12120,"n":"b_2F58","k":"branch","len":1,"c":false},{"a":12126,"n":"smc_steep_xstep","k":"routine","len":2,"c":true},{"a":12127,"n":"j_2F5F","k":"branch","len":1,"c":false},{"a":12128,"n":"smc_steep_line","k":"routine","len":1,"c":true},{"a":12129,"n":"smc_steep_table","k":"routine","len":16,"c":true},{"a":12135,"n":"j_2F67","k":"branch","len":1,"c":false},{"a":12138,"n":"b_2F6A","k":"branch","len":1,"c":false},{"a":12140,"n":"r_2F6C","k":"branch","len":1,"c":false},{"a":12141,"n":"b_2F6D","k":"branch","len":1,"c":false},{"a":12145,"n":"trace_shallow_edge","k":"routine","len":48,"c":true},{"a":12166,"n":"b_2F86","k":"branch","len":1,"c":false},{"a":12170,"n":"b_2F8A","k":"branch","len":1,"c":false},{"a":12172,"n":"b_2F8C","k":"branch","len":1,"c":false},{"a":12193,"n":"smc_shallow_xstep","k":"routine","len":4,"c":true},{"a":12197,"n":"smc_shallow_skip","k":"routine","len":9,"c":true},{"a":12205,"n":"j_2FAD","k":"branch","len":1,"c":false},{"a":12206,"n":"smc_shallow_line","k":"routine","len":1,"c":true},{"a":12207,"n":"smc_shallow_table","k":"routine","len":7,"c":true},{"a":12208,"n":"j_2FB0","k":"branch","len":1,"c":false},{"a":12214,"n":"skip_steep_offscreen","k":"routine","len":20,"c":true},{"a":12228,"n":"b_2FC4","k":"branch","len":1,"c":false},{"a":12234,"n":"smc_steep_xstep_off","k":"routine","len":18,"c":true},{"a":12235,"n":"j_2FCB","k":"branch","len":1,"c":false},{"a":12246,"n":"b_2FD6","k":"branch","len":1,"c":false},{"a":12252,"n":"skip_shallow_offscreen","k":"routine","len":14,"c":true},{"a":12266,"n":"smc_shallow_xstep_off","k":"routine","len":24,"c":true},{"a":12278,"n":"j_2FF6","k":"branch","len":1,"c":false},{"a":12284,"n":"b_2FFC","k":"branch","len":1,"c":false},{"a":12290,"n":"split_long_edge","k":"routine","len":187,"c":true},{"a":12322,"n":"b_3022","k":"branch","len":1,"c":false},{"a":12336,"n":"b_3030","k":"branch","len":1,"c":false},{"a":12385,"n":"b_3061","k":"branch","len":1,"c":false},{"a":12426,"n":"b_308A","k":"branch","len":1,"c":false},{"a":12477,"n":"trace_wide_edge","k":"routine","len":92,"c":true},{"a":12506,"n":"b_30DA","k":"branch","len":1,"c":false},{"a":12512,"n":"j_30E0","k":"branch","len":1,"c":false},{"a":12537,"n":"b_30F9","k":"branch","len":1,"c":false},{"a":12563,"n":"b_3113","k":"branch","len":1,"c":false},{"a":12569,"n":"smc_wsteep_xstep","k":"routine","len":7,"c":true},{"a":12575,"n":"j_311F","k":"branch","len":1,"c":false},{"a":12576,"n":"smc_wsteep_line","k":"routine","len":1,"c":true},{"a":12577,"n":"smc_wsteep_table","k":"routine","len":31,"c":true},{"a":12583,"n":"b_3127","k":"branch","len":1,"c":false},{"a":12590,"n":"b_312E","k":"branch","len":1,"c":false},{"a":12597,"n":"b_3135","k":"branch","len":1,"c":false},{"a":12608,"n":"smc_wsteep_xhi","k":"routine","len":8,"c":true},{"a":12616,"n":"trace_wide_shallow","k":"routine","len":37,"c":true},{"a":12627,"n":"b_3153","k":"branch","len":1,"c":false},{"a":12653,"n":"smc_wshallow_xstep","k":"routine","len":18,"c":true},{"a":12659,"n":"j_3173","k":"branch","len":1,"c":false},{"a":12670,"n":"j_317E","k":"branch","len":1,"c":false},{"a":12671,"n":"smc_wshallow_line","k":"routine","len":1,"c":true},{"a":12672,"n":"smc_wshallow_table","k":"routine","len":26,"c":true},{"a":12680,"n":"b_3188","k":"branch","len":1,"c":false},{"a":12687,"n":"b_318F","k":"branch","len":1,"c":false},{"a":12698,"n":"smc_wshallow_xhi","k":"routine","len":8,"c":true},{"a":12706,"n":"corrupt_secret_code","k":"routine","len":2,"c":true},{"a":12708,"n":"set_edge_store_op","k":"routine","len":38,"c":true},{"a":12717,"n":"b_31AD","k":"branch","len":1,"c":false},{"a":12727,"n":"b_31B7","k":"branch","len":1,"c":false},{"a":12734,"n":"b_31BE","k":"branch","len":1,"c":false},{"a":12736,"n":"j_31C0","k":"branch","len":1,"c":false},{"a":12738,"n":"b_31C2","k":"branch","len":1,"c":false},{"a":12746,"n":"next_seed","k":"routine","len":40,"c":true},{"a":12751,"n":"b_31CF","k":"branch","len":1,"c":false},{"a":12786,"n":"next_seed_saved_y","k":"variable","len":1,"c":true},{"a":12787,"n":"print_number","k":"routine","len":3,"c":true},{"a":12790,"n":"print_digit","k":"routine","len":14,"c":true},{"a":12796,"n":"b_31FC","k":"branch","len":1,"c":false},{"a":12804,"n":"spawn_char_3d","k":"routine","len":43,"c":true},{"a":12823,"n":"b_3217","k":"branch","len":1,"c":false},{"a":12827,"n":"b_321B","k":"branch","len":1,"c":false},{"a":12847,"n":"check_cracker_seed","k":"routine","len":11,"c":true},{"a":12858,"n":"spawn_char_rows","k":"routine","len":68,"c":true},{"a":12870,"n":"b_3246","k":"branch","len":1,"c":false},{"a":12911,"n":"b_326F","k":"branch","len":1,"c":false},{"a":12926,"n":"block_pair_objects","k":"table","len":4,"c":true},{"a":12930,"n":"draw_title_screen","k":"routine","len":67,"c":true},{"a":12971,"n":"b_32AB","k":"branch","len":1,"c":false},{"a":12973,"n":"b_32AD","k":"branch","len":1,"c":false},{"a":12988,"n":"b_32BC","k":"branch","len":1,"c":false},{"a":12997,"n":"title_screen_type","k":"variable","len":1,"c":true},{"a":12998,"n":"title_text","k":"table","len":15,"c":true},{"a":13013,"n":"read_number","k":"routine","len":100,"c":true},{"a":13022,"n":"b_32DE","k":"branch","len":1,"c":false},{"a":13031,"n":"b_32E7","k":"branch","len":1,"c":false},{"a":13033,"n":"b_32E9","k":"branch","len":1,"c":false},{"a":13055,"n":"b_32FF","k":"branch","len":1,"c":false},{"a":13073,"n":"b_3311","k":"branch","len":1,"c":false},{"a":13089,"n":"b_3321","k":"branch","len":1,"c":false},{"a":13093,"n":"b_3325","k":"branch","len":1,"c":false},{"a":13106,"n":"b_3332","k":"branch","len":1,"c":false},{"a":13112,"n":"r_3338","k":"branch","len":1,"c":false},{"a":13113,"n":"print_input_buffer","k":"routine","len":30,"c":true},{"a":13120,"n":"b_3340","k":"branch","len":1,"c":false},{"a":13133,"n":"b_334D","k":"branch","len":1,"c":false},{"a":13143,"n":"input_to_bcd","k":"routine","len":29,"c":true},{"a":13147,"n":"b_335B","k":"branch","len":1,"c":false},{"a":13172,"n":"input_digit_value","k":"routine","len":24,"c":true},{"a":13186,"n":"b_3382","k":"branch","len":1,"c":false},{"a":13192,"n":"b_3388","k":"branch","len":1,"c":false},{"a":13196,"n":"print_bcd_pair","k":"routine","len":14,"c":true},{"a":13210,"n":"next_seed_bcd","k":"routine","len":28,"c":true},{"a":13222,"n":"b_33A6","k":"branch","len":1,"c":false},{"a":13234,"n":"b_33B2","k":"branch","len":1,"c":false},{"a":13238,"n":"bcd_low_digit","k":"variable","len":1,"c":true},{"a":13239,"n":"spawn_secret_code","k":"routine","len":42,"c":true},{"a":13258,"n":"b_33CA","k":"branch","len":1,"c":false},{"a":13268,"n":"b_33D4","k":"branch","len":1,"c":false},{"a":13281,"n":"print_landscape_num","k":"routine","len":12,"c":true},{"a":13293,"n":"init_landscape_seed","k":"routine","len":39,"c":true},{"a":13326,"n":"b_340E","k":"branch","len":1,"c":false},{"a":13328,"n":"b_3410","k":"branch","len":1,"c":false},{"a":13332,"n":"print_text_byte","k":"routine","len":18,"c":true},{"a":13339,"n":"b_341B","k":"branch","len":1,"c":false},{"a":13350,"n":"get_enemy_count","k":"routine","len":43,"c":true},{"a":13362,"n":"b_3432","k":"branch","len":1,"c":false},{"a":13373,"n":"b_343D","k":"branch","len":1,"c":false},{"a":13377,"n":"b_3441","k":"branch","len":1,"c":false},{"a":13383,"n":"b_3447","k":"branch","len":1,"c":false},{"a":13393,"n":"random_0_to_22","k":"routine","len":17,"c":true},{"a":13410,"n":"energy_to_bcd","k":"routine","len":14,"c":true},{"a":13417,"n":"b_3469","k":"branch","len":1,"c":false},{"a":13423,"n":"r_346F","k":"branch","len":1,"c":false},{"a":13424,"n":"make_sound","k":"routine","len":13,"c":true},{"a":13437,"n":"process_volume_keys","k":"routine","len":60,"c":true},{"a":13461,"n":"b_3495","k":"branch","len":1,"c":false},{"a":13467,"n":"b_349B","k":"branch","len":1,"c":false},{"a":13496,"n":"r_34B8","k":"branch","len":1,"c":false},{"a":13497,"n":"volume_level","k":"variable","len":1,"c":true},{"a":13498,"n":"process_pause_keys","k":"routine","len":36,"c":true},{"a":13518,"n":"b_34CE","k":"branch","len":1,"c":false},{"a":13533,"n":"r_34DD","k":"branch","len":1,"c":false},{"a":13534,"n":"process_music","k":"routine","len":62,"c":true},{"a":13563,"n":"b_34FB","k":"branch","len":1,"c":false},{"a":13584,"n":"b_3510","k":"branch","len":1,"c":false},{"a":13592,"n":"b_3518","k":"branch","len":1,"c":false},{"a":13595,"n":"r_351B","k":"branch","len":1,"c":false},{"a":13596,"n":"silence_all_voices","k":"routine","len":9,"c":true},{"a":13598,"n":"b_351E","k":"branch","len":1,"c":false},{"a":13605,"n":"silence_voice_0","k":"routine","len":2,"c":true},{"a":13607,"n":"silence_voice_x","k":"routine","len":5,"c":true},{"a":13612,"n":"process_sound","k":"routine","len":64,"c":true},{"a":13661,"n":"r_355D","k":"branch","len":1,"c":false},{"a":13662,"n":"b_355E","k":"branch","len":1,"c":false},{"a":13665,"n":"b_3561","k":"branch","len":1,"c":false},{"a":13676,"n":"play_game_decoy","k":"variable","len":1,"c":true},{"a":13677,"n":"play_game","k":"routine","len":16,"c":true},{"a":13693,"n":"main_game_loop","k":"routine","len":134,"c":true},{"a":13704,"n":"b_3588","k":"branch","len":1,"c":false},{"a":13749,"n":"b_35B5","k":"branch","len":1,"c":false},{"a":13760,"n":"b_35C0","k":"branch","len":1,"c":false},{"a":13769,"n":"j_35C9","k":"branch","len":1,"c":false},{"a":13781,"n":"b_35D5","k":"branch","len":1,"c":false},{"a":13812,"n":"b_35F4","k":"branch","len":1,"c":false},{"a":13827,"n":"finish_landscape","k":"routine","len":58,"c":true},{"a":13839,"n":"b_360F","k":"branch","len":1,"c":false},{"a":13866,"n":"b_362A","k":"branch","len":1,"c":false},{"a":13882,"n":"j_363A","k":"branch","len":1,"c":false},{"a":13885,"n":"play_loop","k":"routine","len":89,"c":true},{"a":13893,"n":"b_3645","k":"branch","len":1,"c":false},{"a":13914,"n":"b_365A","k":"branch","len":1,"c":false},{"a":13928,"n":"b_3668","k":"branch","len":1,"c":false},{"a":13945,"n":"b_3679","k":"branch","len":1,"c":false},{"a":13948,"n":"b_367C","k":"branch","len":1,"c":false},{"a":13962,"n":"b_368A","k":"branch","len":1,"c":false},{"a":13967,"n":"b_368F","k":"branch","len":1,"c":false},{"a":14080,"n":"precompute_tile_angles","k":"routine","len":242,"c":true},{"a":14096,"n":"j_3710","k":"branch","len":1,"c":false},{"a":14103,"n":"j_3717","k":"branch","len":1,"c":false},{"a":14129,"n":"b_3731","k":"branch","len":1,"c":false},{"a":14151,"n":"b_3747","k":"branch","len":1,"c":false},{"a":14210,"n":"b_3782","k":"branch","len":1,"c":false},{"a":14226,"n":"b_3792","k":"branch","len":1,"c":false},{"a":14230,"n":"j_3796","k":"branch","len":1,"c":false},{"a":14262,"n":"b_37B6","k":"branch","len":1,"c":false},{"a":14301,"n":"b_37DD","k":"branch","len":1,"c":false},{"a":14314,"n":"b_37EA","k":"branch","len":1,"c":false},{"a":14321,"n":"r_37F1","k":"branch","len":1,"c":false},{"a":14322,"n":"tile_view_angles_fast","k":"routine","len":187,"c":true},{"a":14344,"n":"b_3808","k":"branch","len":1,"c":false},{"a":14355,"n":"b_3813","k":"branch","len":1,"c":false},{"a":14371,"n":"b_3823","k":"branch","len":1,"c":false},{"a":14378,"n":"j_382A","k":"branch","len":1,"c":false},{"a":14474,"n":"b_388A","k":"branch","len":1,"c":false},{"a":14495,"n":"b_389F","k":"branch","len":1,"c":false},{"a":14502,"n":"b_38A6","k":"branch","len":1,"c":false},{"a":14509,"n":"clear_view_rows_1_8","k":"routine","len":101,"c":true},{"a":14610,"n":"clear_view_cols_0_15","k":"routine","len":77,"c":true},{"a":14848,"n":"row_char_addr_lo","k":"table","len":25,"c":true},{"a":14880,"n":"row_char_addr_hi","k":"table","len":25,"c":true},{"a":14912,"n":"row_second_copy_page","k":"table","len":25,"c":true},{"a":14944,"n":"row_first_char","k":"table","len":25,"c":true},{"a":15104,"n":"arctan_lo","k":"variable","len":1,"c":true},{"a":15105,"n":"arctan_lo_1","k":"table","len":64,"c":true},{"a":15169,"n":"arctan_lo_65","k":"table","len":64,"c":true},{"a":15233,"n":"arctan_lo_129","k":"table","len":64,"c":true},{"a":15297,"n":"arctan_lo_193","k":"table","len":64,"c":true},{"a":15361,"n":"arctan_hi","k":"variable","len":1,"c":true},{"a":15362,"n":"arctan_hi_1","k":"table","len":64,"c":true},{"a":15426,"n":"arctan_hi_65","k":"table","len":64,"c":true},{"a":15490,"n":"arctan_hi_129","k":"table","len":64,"c":true},{"a":15554,"n":"arctan_hi_193","k":"table","len":64,"c":true},{"a":15618,"n":"tan_half_angle","k":"table","len":64,"c":true},{"a":15682,"n":"tan_half_angle_64","k":"table","len":65,"c":true},{"a":15747,"n":"bitmap_row_lo","k":"table","len":25,"c":true},{"a":15772,"n":"bitmap_row_lo_copy","k":"table","len":25,"c":true},{"a":15797,"n":"bitmap_row_hi","k":"table","len":25,"c":true},{"a":15822,"n":"bitmap_row_hi_copy","k":"table","len":25,"c":true},{"a":15872,"n":"edge_pixels_left","k":"table","len":60,"c":true},{"a":15932,"n":"edge_left_colour_3c","k":"table","len":4,"c":true},{"a":15936,"n":"edge_pixels_right","k":"table","len":60,"c":true},{"a":15996,"n":"edge_right_colour_3c","k":"table","len":4,"c":true},{"a":16000,"n":"tile_visibility","k":"table","len":64,"c":true},{"a":16064,"n":"tile_visibility_x16","k":"table","len":64,"c":true},{"a":16128,"n":"game_entry","k":"routine","len":180,"c":true},{"a":16151,"n":"b_3F17","k":"branch","len":1,"c":false},{"a":16282,"n":"b_3F9A","k":"branch","len":1,"c":false},{"a":16290,"n":"b_3FA2","k":"branch","len":1,"c":false},{"a":16296,"n":"b_3FA8","k":"branch","len":1,"c":false},{"a":28672,"n":"sights_sprite","k":"variable","len":1,"c":true},{"a":28673,"n":"sights_row0_mid","k":"table","len":3,"c":true},{"a":28676,"n":"sights_row1_mid","k":"table","len":3,"c":true},{"a":28679,"n":"sights_row2_mid","k":"table","len":3,"c":true},{"a":28682,"n":"sights_row3_mid","k":"table","len":3,"c":true},{"a":28685,"n":"sights_row4_mid","k":"variable","len":2,"c":true},{"a":28687,"n":"sights_row5_left","k":"variable","len":1,"c":true},{"a":28688,"n":"sights_row5_mid","k":"variable","len":1,"c":true},{"a":28689,"n":"sights_row5_right","k":"variable","len":2,"c":true},{"a":28691,"n":"sights_row6_mid","k":"table","len":3,"c":true},{"a":28694,"n":"sights_row7_mid","k":"table","len":3,"c":true},{"a":28697,"n":"sights_row8_mid","k":"table","len":3,"c":true},{"a":28700,"n":"sights_row9_mid","k":"table","len":3,"c":true},{"a":28703,"n":"sights_row10_mid","k":"table","len":33,"c":true},{"a":28736,"n":"scanner_sprite_1","k":"table","len":64,"c":true},{"a":28800,"n":"scanner_sprite_2","k":"table","len":64,"c":true},{"a":28864,"n":"scanner_sprite_3","k":"table","len":64,"c":true},{"a":33024,"n":"font_20","k":"table","len":64,"c":true},{"a":33088,"n":"font_28","k":"table","len":64,"c":true},{"a":33152,"n":"font_30","k":"table","len":64,"c":true},{"a":33216,"n":"font_38","k":"table","len":64,"c":true},{"a":33280,"n":"font_40","k":"table","len":64,"c":true},{"a":33344,"n":"font_48","k":"table","len":64,"c":true},{"a":33408,"n":"font_50","k":"table","len":64,"c":true},{"a":33472,"n":"font_58","k":"table","len":40,"c":true},{"a":33512,"n":"font_5d_arrow","k":"table","len":16,"c":true},{"a":33528,"n":"font_5f_dash","k":"table","len":8,"c":true},{"a":33536,"n":"font_60","k":"table","len":64,"c":true},{"a":33600,"n":"font_68","k":"table","len":64,"c":true},{"a":33664,"n":"font_70","k":"table","len":64,"c":true},{"a":33728,"n":"font_78","k":"table","len":24,"c":true},{"a":33752,"n":"font_7b_blocks","k":"table","len":8,"c":true},{"a":33760,"n":"font_7c_blocks","k":"table","len":32,"c":true},{"a":33792,"n":"unused_rts","k":"variable","len":1,"c":true},{"a":33793,"n":"get_object_angles","k":"routine","len":116,"c":true},{"a":33888,"n":"b_8460","k":"branch","len":1,"c":false},{"a":33909,"n":"get_obj_point_angles","k":"routine","len":190,"c":true},{"a":33925,"n":"j_8485","k":"branch","len":1,"c":false},{"a":33961,"n":"b_84A9","k":"branch","len":1,"c":false},{"a":33991,"n":"b_84C7","k":"branch","len":1,"c":false},{"a":34053,"n":"b_8505","k":"branch","len":1,"c":false},{"a":34098,"n":"r_8532","k":"branch","len":1,"c":false},{"a":34099,"n":"draw_object","k":"routine","len":145,"c":true},{"a":34140,"n":"b_855C","k":"branch","len":1,"c":false},{"a":34151,"n":"b_8567","k":"branch","len":1,"c":false},{"a":34153,"n":"j_8569","k":"branch","len":1,"c":false},{"a":34159,"n":"b_856F","k":"branch","len":1,"c":false},{"a":34169,"n":"b_8579","k":"branch","len":1,"c":false},{"a":34183,"n":"b_8587","k":"branch","len":1,"c":false},{"a":34212,"n":"b_85A4","k":"branch","len":1,"c":false},{"a":34230,"n":"b_85B6","k":"branch","len":1,"c":false},{"a":34244,"n":"object_xz_delta","k":"routine","len":49,"c":true},{"a":34268,"n":"b_85DC","k":"branch","len":1,"c":false},{"a":34290,"n":"b_85F2","k":"branch","len":1,"c":false},{"a":34293,"n":"object_height_delta","k":"routine","len":18,"c":true},{"a":34311,"n":"fill_top_bitmap_row","k":"routine","len":16,"c":true},{"a":34315,"n":"b_860B","k":"branch","len":1,"c":false},{"a":34327,"n":"print_token","k":"routine","len":18,"c":true},{"a":34330,"n":"j_861A","k":"branch","len":1,"c":false},{"a":34344,"n":"r_8628","k":"branch","len":1,"c":false},{"a":34345,"n":"wait_key","k":"routine","len":3,"c":true},{"a":34348,"n":"read_key","k":"routine","len":22,"c":true},{"a":34369,"n":"r_8641","k":"branch","len":1,"c":false},{"a":34370,"n":"keyboard_select_stub","k":"routine","len":1,"c":true},{"a":34371,"n":"set_palette","k":"routine","len":89,"c":true},{"a":34380,"n":"b_864C","k":"branch","len":1,"c":false},{"a":34387,"n":"b_8653","k":"branch","len":1,"c":false},{"a":34397,"n":"b_865D","k":"branch","len":1,"c":false},{"a":34410,"n":"b_866A","k":"branch","len":1,"c":false},{"a":34420,"n":"b_8674","k":"branch","len":1,"c":false},{"a":34426,"n":"b_867A","k":"branch","len":1,"c":false},{"a":34439,"n":"b_8687","k":"branch","len":1,"c":false},{"a":34454,"n":"j_8696","k":"branch","len":1,"c":false},{"a":34460,"n":"palette_colour2_copy","k":"variable","len":1,"c":true},{"a":34461,"n":"palettes","k":"variable","len":2,"c":true},{"a":34463,"n":"palette_83_colour2","k":"variable","len":1,"c":true},{"a":34464,"n":"palette_83_colour3","k":"table","len":5,"c":true},{"a":34469,"n":"dither_view_to_screen","k":"routine","len":267,"c":true},{"a":34482,"n":"b_86B2","k":"branch","len":1,"c":false},{"a":34489,"n":"b_86B9","k":"branch","len":1,"c":false},{"a":34492,"n":"j_86BC","k":"branch","len":1,"c":false},{"a":34497,"n":"j_86C1","k":"branch","len":1,"c":false},{"a":34563,"n":"b_8703","k":"branch","len":1,"c":false},{"a":34624,"n":"b_8740","k":"branch","len":1,"c":false},{"a":34647,"n":"b_8757","k":"branch","len":1,"c":false},{"a":34682,"n":"b_877A","k":"branch","len":1,"c":false},{"a":34732,"n":"b_87AC","k":"branch","len":1,"c":false},{"a":34735,"n":"r_87AF","k":"branch","len":1,"c":false},{"a":34736,"n":"dither_seed_lo","k":"variable","len":1,"c":true},{"a":34737,"n":"game_over_screen","k":"routine","len":80,"c":true},{"a":34750,"n":"b_87BE","k":"branch","len":1,"c":false},{"a":34817,"n":"decay_view","k":"routine","len":21,"c":true},{"a":34819,"n":"b_8803","k":"branch","len":1,"c":false},{"a":34823,"n":"b_8807","k":"branch","len":1,"c":false},{"a":34838,"n":"decoy_jmp_opcode","k":"variable","len":1,"c":true},{"a":34839,"n":"rts_to_preview","k":"routine","len":2,"c":true},{"a":34841,"n":"place_title_object","k":"routine","len":60,"c":true},{"a":34901,"n":"title_obj_z","k":"table","len":3,"c":true},{"a":34904,"n":"preview_landscape","k":"routine","len":26,"c":true},{"a":34930,"n":"title_view_pitch","k":"table","len":3,"c":true},{"a":34933,"n":"title_obj_height","k":"table","len":3,"c":true},{"a":34936,"n":"title_obj_yaw","k":"table","len":3,"c":true},{"a":34939,"n":"title_view_yaw","k":"table","len":3,"c":true},{"a":34942,"n":"draw_title_pair","k":"routine","len":9,"c":true},{"a":34951,"n":"draw_title_object","k":"routine","len":8,"c":true},{"a":34959,"n":"start_music","k":"routine","len":14,"c":true},{"a":34973,"n":"unused_fill_889D","k":"table","len":99,"c":true},{"a":35072,"n":"init_machine","k":"routine","len":197,"c":true},{"a":35269,"n":"patch_font_glyphs","k":"routine","len":30,"c":true},{"a":35271,"n":"b_89C7","k":"branch","len":1,"c":false},{"a":35299,"n":"glyph_5d_arrow","k":"table","len":8,"c":true},{"a":35307,"n":"glyph_5f_dash","k":"table","len":8,"c":true},{"a":35315,"n":"glyph_7b_blocks","k":"table","len":8,"c":true},{"a":35323,"n":"glyph_7c_blocks","k":"table","len":8,"c":true},{"a":35331,"n":"set_border_vic_bank1","k":"routine","len":31,"c":true},{"a":35362,"n":"fill_colour_ram_0d","k":"routine","len":20,"c":true},{"a":35366,"n":"b_8A26","k":"branch","len":1,"c":false},{"a":35382,"n":"set_backgrounds","k":"routine","len":46,"c":true},{"a":35399,"n":"b_8A47","k":"branch","len":1,"c":false},{"a":35428,"n":"unreached_rts","k":"variable","len":1,"c":true},{"a":35429,"n":"colour_fill_patterns","k":"table","len":4,"c":true},{"a":35433,"n":"vdu_pending","k":"variable","len":1,"c":true},{"a":35434,"n":"vdu_param_count","k":"variable","len":1,"c":true},{"a":35435,"n":"oswrch_vdu","k":"routine","len":20,"c":true},{"a":35455,"n":"vdu_param_byte","k":"routine","len":148,"c":true},{"a":35478,"n":"b_8A96","k":"branch","len":1,"c":false},{"a":35481,"n":"b_8A99","k":"branch","len":1,"c":false},{"a":35502,"n":"b_8AAE","k":"branch","len":1,"c":false},{"a":35511,"n":"b_8AB7","k":"branch","len":1,"c":false},{"a":35550,"n":"b_8ADE","k":"branch","len":1,"c":false},{"a":35566,"n":"b_8AEE","k":"branch","len":1,"c":false},{"a":35569,"n":"b_8AF1","k":"branch","len":1,"c":false},{"a":35595,"n":"j_8B0B","k":"branch","len":1,"c":false},{"a":35600,"n":"j_8B10","k":"branch","len":1,"c":false},{"a":35603,"n":"vdu_new_code","k":"routine","len":201,"c":true},{"a":35619,"n":"b_8B23","k":"branch","len":1,"c":false},{"a":35630,"n":"b_8B2E","k":"branch","len":1,"c":false},{"a":35646,"n":"b_8B3E","k":"branch","len":1,"c":false},{"a":35652,"n":"b_8B44","k":"branch","len":1,"c":false},{"a":35674,"n":"b_8B5A","k":"branch","len":1,"c":false},{"a":35679,"n":"b_8B5F","k":"branch","len":1,"c":false},{"a":35682,"n":"b_8B62","k":"branch","len":1,"c":false},{"a":35692,"n":"b_8B6C","k":"branch","len":1,"c":false},{"a":35704,"n":"b_8B78","k":"branch","len":1,"c":false},{"a":35735,"n":"b_8B97","k":"branch","len":1,"c":false},{"a":35759,"n":"b_8BAF","k":"branch","len":1,"c":false},{"a":35762,"n":"b_8BB2","k":"branch","len":1,"c":false},{"a":35797,"n":"b_8BD5","k":"branch","len":1,"c":false},{"a":35804,"n":"vdu_draw_char","k":"routine","len":179,"c":true},{"a":35910,"n":"b_8C46","k":"branch","len":1,"c":false},{"a":35944,"n":"b_8C68","k":"branch","len":1,"c":false},{"a":35970,"n":"b_8C82","k":"branch","len":1,"c":false},{"a":35973,"n":"vdu_restore_exit","k":"branch","len":1,"c":false},{"a":35983,"n":"text_cursor_down","k":"routine","len":16,"c":true},{"a":35995,"n":"b_8C9B","k":"branch","len":1,"c":false},{"a":35999,"n":"nybble_to_mask","k":"table","len":16,"c":true},{"a":36015,"n":"vdu_mode","k":"variable","len":1,"c":true},{"a":36016,"n":"vdu_keep_mask","k":"variable","len":1,"c":true},{"a":36017,"n":"text_fg_fill","k":"variable","len":1,"c":true},{"a":36018,"n":"text_bg_fill","k":"variable","len":1,"c":true},{"a":36019,"n":"gcol_fg_fill","k":"variable","len":1,"c":true},{"a":36020,"n":"gcol_bg_fill","k":"variable","len":1,"c":true},{"a":36021,"n":"plot_y_high","k":"variable","len":1,"c":true},{"a":36022,"n":"write_char_byte","k":"routine","len":43,"c":true},{"a":36065,"n":"cell_number_lo","k":"variable","len":1,"c":true},{"a":36066,"n":"cell_number_hi","k":"variable","len":1,"c":true},{"a":36067,"n":"fg_fill","k":"variable","len":1,"c":true},{"a":36068,"n":"bg_fill","k":"variable","len":1,"c":true},{"a":36069,"n":"text_column","k":"variable","len":1,"c":true},{"a":36070,"n":"text_row","k":"variable","len":1,"c":true},{"a":36071,"n":"work_byte_a","k":"variable","len":1,"c":true},{"a":36072,"n":"work_byte_b","k":"table","len":3,"c":true},{"a":36075,"n":"vdu_saved_a","k":"variable","len":1,"c":true},{"a":36076,"n":"saved_x","k":"variable","len":1,"c":true},{"a":36077,"n":"saved_y","k":"variable","len":1,"c":true},{"a":36078,"n":"glyph_pixel_mask","k":"variable","len":1,"c":true},{"a":36079,"n":"key_table_offset","k":"variable","len":1,"c":true},{"a":36080,"n":"last_key_number","k":"variable","len":1,"c":true},{"a":36081,"n":"bbc_to_c64_colour","k":"table","len":8,"c":true},{"a":36089,"n":"test_key","k":"routine","len":43,"c":true},{"a":36130,"n":"b_8D22","k":"branch","len":1,"c":false},{"a":36132,"n":"line_bits","k":"table","len":8,"c":true},{"a":36140,"n":"osrdch_read_key","k":"routine","len":85,"c":true},{"a":36146,"n":"b_8D32","k":"branch","len":1,"c":false},{"a":36154,"n":"b_8D3A","k":"branch","len":1,"c":false},{"a":36178,"n":"b_8D52","k":"branch","len":1,"c":false},{"a":36180,"n":"b_8D54","k":"branch","len":1,"c":false},{"a":36196,"n":"b_8D64","k":"branch","len":1,"c":false},{"a":36204,"n":"b_8D6C","k":"branch","len":1,"c":false},{"a":36225,"n":"osword_dispatch","k":"routine","len":51,"c":true},{"a":36234,"n":"b_8D8A","k":"branch","len":1,"c":false},{"a":36266,"n":"b_8DAA","k":"branch","len":1,"c":false},{"a":36268,"n":"b_8DAC","k":"branch","len":1,"c":false},{"a":36276,"n":"osword_sound","k":"routine","len":204,"c":true},{"a":36371,"n":"b_8E13","k":"branch","len":1,"c":false},{"a":36378,"n":"b_8E1A","k":"branch","len":1,"c":false},{"a":36450,"n":"b_8E62","k":"branch","len":1,"c":false},{"a":36472,"n":"b_8E78","k":"branch","len":1,"c":false},{"a":36480,"n":"freq_lo_work","k":"variable","len":2,"c":true},{"a":36482,"n":"sound_byte5","k":"variable","len":1,"c":true},{"a":36483,"n":"sound_voice","k":"variable","len":1,"c":true},{"a":36484,"n":"env_copy_count","k":"variable","len":1,"c":true},{"a":36485,"n":"env_tick_mask","k":"variable","len":1,"c":true},{"a":36486,"n":"voice_duration","k":"table","len":4,"c":true},{"a":36490,"n":"voice_pitch","k":"table","len":4,"c":true},{"a":36494,"n":"voice_release_len","k":"table","len":4,"c":true},{"a":36498,"n":"voice_release_left","k":"table","len":4,"c":true},{"a":36502,"n":"voice_env_base","k":"table","len":4,"c":true},{"a":36506,"n":"voice_env_steps","k":"table","len":4,"c":true},{"a":36510,"n":"voice_env_section","k":"table","len":4,"c":true},{"a":36514,"n":"voice_ctrl_release","k":"table","len":4,"c":true},{"a":36518,"n":"voice_envelopes","k":"variable","len":1,"c":true},{"a":36519,"n":"env_pitch_change","k":"table","len":3,"c":true},{"a":36522,"n":"env_section_steps","k":"table","len":17,"c":true},{"a":36539,"n":"voice_sid_offset","k":"table","len":3,"c":true},{"a":36542,"n":"voice_env_offset","k":"table","len":3,"c":true},{"a":36545,"n":"release_frames","k":"table","len":16,"c":true},{"a":36561,"n":"sound_frame_tick","k":"routine","len":59,"c":true},{"a":36563,"n":"b_8ED3","k":"branch","len":1,"c":false},{"a":36590,"n":"b_8EEE","k":"branch","len":1,"c":false},{"a":36616,"n":"b_8F08","k":"branch","len":1,"c":false},{"a":36620,"n":"pitch_envelope_tick","k":"routine","len":108,"c":true},{"a":36625,"n":"b_8F11","k":"branch","len":1,"c":false},{"a":36645,"n":"b_8F25","k":"branch","len":1,"c":false},{"a":36663,"n":"b_8F37","k":"branch","len":1,"c":false},{"a":36665,"n":"b_8F39","k":"branch","len":1,"c":false},{"a":36681,"n":"b_8F49","k":"branch","len":1,"c":false},{"a":36717,"n":"b_8F6D","k":"branch","len":1,"c":false},{"a":36721,"n":"b_8F71","k":"branch","len":1,"c":false},{"a":36728,"n":"osbyte_dispatch","k":"routine","len":32,"c":true},{"a":36737,"n":"b_8F81","k":"branch","len":1,"c":false},{"a":36757,"n":"b_8F95","k":"branch","len":1,"c":false},{"a":36760,"n":"nmi_ack","k":"routine","len":6,"c":true},{"a":36766,"n":"irq_ack","k":"routine","len":21,"c":true},{"a":36785,"n":"b_8FB1","k":"branch","len":1,"c":false},{"a":36787,"n":"keymap_shifted","k":"table","len":64,"c":true},{"a":36851,"n":"keymap_plain","k":"table","len":64,"c":true},{"a":36915,"n":"pitch_freq_lo","k":"table","len":64,"c":true},{"a":36979,"n":"pitch_freq_lo_64","k":"table","len":64,"c":true},{"a":37043,"n":"pitch_freq_lo_128","k":"table","len":64,"c":true},{"a":37107,"n":"pitch_freq_lo_192","k":"table","len":64,"c":true},{"a":37171,"n":"pitch_freq_hi","k":"table","len":64,"c":true},{"a":37235,"n":"pitch_freq_hi_64","k":"table","len":64,"c":true},{"a":37299,"n":"pitch_freq_hi_128","k":"table","len":64,"c":true},{"a":37363,"n":"pitch_freq_hi_192","k":"table","len":64,"c":true},{"a":37504,"n":"hyp_angle_zero","k":"routine","len":7,"c":true},{"a":37511,"n":"get_hypotenuse_angle","k":"routine","len":182,"c":true},{"a":37525,"n":"b_9295","k":"branch","len":1,"c":false},{"a":37544,"n":"b_92A8","k":"branch","len":1,"c":false},{"a":37569,"n":"b_92C1","k":"branch","len":1,"c":false},{"a":37573,"n":"j_92C5","k":"branch","len":1,"c":false},{"a":37617,"n":"b_92F1","k":"branch","len":1,"c":false},{"a":37625,"n":"b_92F9","k":"branch","len":1,"c":false},{"a":37631,"n":"b_92FF","k":"branch","len":1,"c":false},{"a":37635,"n":"j_9303","k":"branch","len":1,"c":false},{"a":37679,"n":"b_932F","k":"branch","len":1,"c":false},{"a":37687,"n":"b_9337","k":"branch","len":1,"c":false},{"a":37693,"n":"get_pitch_angle_delta","k":"routine","len":66,"c":true},{"a":37709,"n":"b_934D","k":"branch","len":1,"c":false},{"a":37756,"n":"b_937C","k":"branch","len":1,"c":false},{"a":37759,"n":"get_hypotenuse","k":"routine","len":46,"c":true},{"a":37805,"n":"hyp_saved_y","k":"variable","len":1,"c":true},{"a":37806,"n":"next_random","k":"routine","len":65,"c":true},{"a":37871,"n":"random_gen","k":"variable","len":1,"c":true},{"a":37872,"n":"random_gen_mid","k":"variable","len":1,"c":true},{"a":37873,"n":"random_gen_top","k":"variable","len":1,"c":true},{"a":37874,"n":"random_shift","k":"variable","len":1,"c":true},{"a":37875,"n":"random_shift_mid","k":"variable","len":1,"c":true},{"a":37876,"n":"random_shift_top","k":"variable","len":1,"c":true},{"a":37877,"n":"draw_stars","k":"routine","len":100,"c":true},{"a":37883,"n":"b_93FB","k":"branch","len":1,"c":false},{"a":37891,"n":"b_9403","k":"branch","len":1,"c":false},{"a":37927,"n":"b_9427","k":"branch","len":1,"c":false},{"a":37939,"n":"b_9433","k":"branch","len":1,"c":false},{"a":37969,"n":"b_9451","k":"branch","len":1,"c":false},{"a":37971,"n":"b_9453","k":"branch","len":1,"c":false},{"a":37977,"n":"dot_counter","k":"variable","len":1,"c":true},{"a":37978,"n":"dot_colour","k":"variable","len":1,"c":true},{"a":37979,"n":"pixel_colour1","k":"table","len":4,"c":true},{"a":37983,"n":"fade_view_27","k":"routine","len":2,"c":true},{"a":37985,"n":"fade_view_dots","k":"routine","len":110,"c":true},{"a":37988,"n":"b_9464","k":"branch","len":1,"c":false},{"a":38003,"n":"b_9473","k":"branch","len":1,"c":false},{"a":38015,"n":"b_947F","k":"branch","len":1,"c":false},{"a":38031,"n":"b_948F","k":"branch","len":1,"c":false},{"a":38033,"n":"b_9491","k":"branch","len":1,"c":false},{"a":38068,"n":"b_94B4","k":"branch","len":1,"c":false},{"a":38095,"n":"dot_row_walk","k":"variable","len":1,"c":true},{"a":38096,"n":"dot_byte_walk","k":"variable","len":1,"c":true},{"a":38144,"n":"pixel_clear_keep_masks","k":"table","len":8,"c":true},{"a":38152,"n":"update_icon_row","k":"routine","len":113,"c":true},{"a":38165,"n":"j_9515","k":"branch","len":1,"c":false},{"a":38188,"n":"b_952C","k":"branch","len":1,"c":false},{"a":38211,"n":"b_9543","k":"branch","len":1,"c":false},{"a":38225,"n":"b_9551","k":"branch","len":1,"c":false},{"a":38242,"n":"b_9562","k":"branch","len":1,"c":false},{"a":38265,"n":"put_icon_char","k":"routine","len":15,"c":true},{"a":38280,"n":"band_index","k":"variable","len":1,"c":true},{"a":38281,"n":"band_lines","k":"table","len":5,"c":true},{"a":38286,"n":"band_charsets","k":"table","len":5,"c":true},{"a":38291,"n":"frame_band","k":"variable","len":2,"c":true},{"a":38293,"n":"set_band_lines","k":"routine","len":76,"c":true},{"a":38308,"n":"b_95A4","k":"branch","len":1,"c":false},{"a":38312,"n":"b_95A8","k":"branch","len":1,"c":false},{"a":38317,"n":"j_95AD","k":"branch","len":1,"c":false},{"a":38321,"n":"b_95B1","k":"branch","len":1,"c":false},{"a":38323,"n":"b_95B3","k":"branch","len":1,"c":false},{"a":38329,"n":"b_95B9","k":"branch","len":1,"c":false},{"a":38339,"n":"b_95C3","k":"branch","len":1,"c":false},{"a":38369,"n":"irq_not_raster","k":"routine","len":8,"c":true},{"a":38377,"n":"play_irq","k":"routine","len":183,"c":true},{"a":38407,"n":"b_9607","k":"branch","len":1,"c":false},{"a":38445,"n":"b_962D","k":"branch","len":1,"c":false},{"a":38448,"n":"b_9630","k":"branch","len":1,"c":false},{"a":38456,"n":"b_9638","k":"branch","len":1,"c":false},{"a":38489,"n":"b_9659","k":"branch","len":1,"c":false},{"a":38505,"n":"b_9669","k":"branch","len":1,"c":false},{"a":38520,"n":"b_9678","k":"branch","len":1,"c":false},{"a":38526,"n":"b_967E","k":"branch","len":1,"c":false},{"a":38535,"n":"b_9687","k":"branch","len":1,"c":false},{"a":38544,"n":"b_9690","k":"branch","len":1,"c":false},{"a":38554,"n":"j_969A","k":"branch","len":1,"c":false},{"a":38560,"n":"sights_pan_step","k":"table","len":4,"c":true},{"a":38564,"n":"sights_pan_step_hi","k":"variable","len":2,"c":true},{"a":38566,"n":"scroll_view_step","k":"routine","len":136,"c":true},{"a":38584,"n":"b_96B8","k":"branch","len":1,"c":false},{"a":38590,"n":"b_96BE","k":"branch","len":1,"c":false},{"a":38602,"n":"b_96CA","k":"branch","len":1,"c":false},{"a":38639,"n":"b_96EF","k":"branch","len":1,"c":false},{"a":38642,"n":"b_96F2","k":"branch","len":1,"c":false},{"a":38654,"n":"b_96FE","k":"branch","len":1,"c":false},{"a":38660,"n":"b_9704","k":"branch","len":1,"c":false},{"a":38672,"n":"b_9710","k":"branch","len":1,"c":false},{"a":38698,"n":"j_972A","k":"branch","len":1,"c":false},{"a":38702,"n":"unused_pan_entry","k":"routine","len":2,"c":true},{"a":38704,"n":"show_buffer_strip","k":"routine","len":109,"c":true},{"a":38749,"n":"b_975D","k":"branch","len":1,"c":false},{"a":38788,"n":"b_9784","k":"branch","len":1,"c":false},{"a":38808,"n":"b_9798","k":"branch","len":1,"c":false},{"a":38813,"n":"copy_buffer_row","k":"routine","len":116,"c":true},{"a":38878,"n":"r_97DE","k":"branch","len":1,"c":false},{"a":38879,"n":"b_97DF","k":"branch","len":1,"c":false},{"a":38928,"n":"r_9810","k":"branch","len":1,"c":false},{"a":38929,"n":"split_row_page","k":"variable","len":1,"c":true},{"a":38930,"n":"copy_cells_twice","k":"routine","len":68,"c":true},{"a":38994,"n":"b_9852","k":"branch","len":1,"c":false},{"a":38998,"n":"copy_cells","k":"routine","len":50,"c":true},{"a":39044,"n":"b_9884","k":"branch","len":1,"c":false},{"a":39048,"n":"copy_cell","k":"routine","len":42,"c":true},{"a":39090,"n":"show_whole_view","k":"routine","len":91,"c":true},{"a":39117,"n":"b_98CD","k":"branch","len":1,"c":false},{"a":39146,"n":"b_98EA","k":"branch","len":1,"c":false},{"a":39181,"n":"pan_fill_offset","k":"table","len":4,"c":true},{"a":39185,"n":"pan_position_step","k":"table","len":4,"c":true},{"a":39189,"n":"pan_source_step_lo","k":"table","len":4,"c":true},{"a":39193,"n":"pan_source_step_hi","k":"table","len":4,"c":true},{"a":39197,"n":"pan_source_start_hi","k":"table","len":4,"c":true},{"a":39201,"n":"pan_source_start_lo","k":"table","len":4,"c":true},{"a":39205,"n":"pan_angle_update","k":"table","len":4,"c":true},{"a":39209,"n":"start_scrolling_view","k":"routine","len":3,"c":true},{"a":39212,"n":"set_pan_source","k":"routine","len":13,"c":true},{"a":39225,"n":"use_row_buffer","k":"routine","len":18,"c":true},{"a":39232,"n":"b_9940","k":"branch","len":1,"c":false},{"a":39243,"n":"buffer_max_pitch","k":"variable","len":2,"c":true},{"a":39245,"n":"buffer_min_pitch","k":"variable","len":2,"c":true},{"a":39247,"n":"use_column_buffer","k":"routine","len":5,"c":true},{"a":39252,"n":"set_column_buffer_pitch","k":"routine","len":4,"c":true},{"a":39256,"n":"move_sights","k":"routine","len":13,"c":true},{"a":39266,"n":"b_9962","k":"branch","len":1,"c":false},{"a":39269,"n":"move_sights_sideways","k":"routine","len":47,"c":true},{"a":39292,"n":"b_997C","k":"branch","len":1,"c":false},{"a":39295,"n":"r_997F","k":"branch","len":1,"c":false},{"a":39296,"n":"b_9980","k":"branch","len":1,"c":false},{"a":39312,"n":"b_9990","k":"branch","len":1,"c":false},{"a":39316,"n":"move_sights_up_down","k":"routine","len":72,"c":true},{"a":39352,"n":"b_99B8","k":"branch","len":1,"c":false},{"a":39356,"n":"b_99BC","k":"branch","len":1,"c":false},{"a":39378,"n":"b_99D2","k":"branch","len":1,"c":false},{"a":39382,"n":"b_99D6","k":"branch","len":1,"c":false},{"a":39388,"n":"place_sights_sprite","k":"routine","len":58,"c":true},{"a":39445,"n":"r_9A15","k":"branch","len":1,"c":false},{"a":39446,"n":"sights_x_high","k":"variable","len":1,"c":true},{"a":39447,"n":"unused_sights_pixels","k":"table","len":12,"c":true},{"a":39459,"n":"unused_sights_x_steps","k":"table","len":12,"c":true},{"a":39471,"n":"unused_sights_y_steps","k":"table","len":13,"c":true},{"a":39484,"n":"hide_sights_sprite","k":"routine","len":9,"c":true},{"a":39493,"n":"unused_sights_move_lo","k":"table","len":6,"c":true},{"a":39499,"n":"unused_sights_move_hi","k":"table","len":6,"c":true},{"a":39505,"n":"set_video_mode","k":"routine","len":91,"c":true},{"a":39553,"n":"b_9A81","k":"branch","len":1,"c":false},{"a":39596,"n":"reset_view_matrix","k":"routine","len":56,"c":true},{"a":39608,"n":"b_9AB8","k":"branch","len":1,"c":false},{"a":39610,"n":"b_9ABA","k":"branch","len":1,"c":false},{"a":39637,"n":"b_9AD5","k":"branch","len":1,"c":false},{"a":39652,"n":"fill_colour_ram","k":"routine","len":18,"c":true},{"a":39654,"n":"b_9AE6","k":"branch","len":1,"c":false},{"a":39670,"n":"video_mode_flag","k":"variable","len":1,"c":true},{"a":40096,"n":"obj_point_first","k":"variable","len":1,"c":true},{"a":40097,"n":"obj_point_end","k":"table","len":10,"c":true},{"a":40107,"n":"obj_polygon_first","k":"variable","len":1,"c":true},{"a":40108,"n":"obj_polygon_end","k":"table","len":10,"c":true},{"a":40118,"n":"obj_polygon_phases","k":"table","len":11,"c":true},{"a":40129,"n":"unused_sights_stash","k":"table","len":12,"c":true},{"a":40141,"n":"meanie_polygons","k":"table","len":55,"c":true},{"a":40196,"n":"meanie_polygons_90","k":"table","len":51,"c":true},{"a":40247,"n":"enemy_yaw_step","k":"table","len":9,"c":true},{"a":40416,"n":"obj_point_yaw","k":"table","len":51,"c":true},{"a":40467,"n":"obj_point_yaw_51","k":"table","len":43,"c":true},{"a":40510,"n":"obj_point_yaw_94","k":"table","len":42,"c":true},{"a":40552,"n":"obj_point_yaw_136","k":"table","len":24,"c":true},{"a":40736,"n":"obj_point_height","k":"table","len":51,"c":true},{"a":40787,"n":"obj_point_height_51","k":"table","len":43,"c":true},{"a":40830,"n":"obj_point_height_94","k":"table","len":42,"c":true},{"a":40872,"n":"obj_point_height_136","k":"table","len":24,"c":true},{"a":40960,"n":"basic_leftover_a000","k":"table","len":96,"c":true},{"a":41056,"n":"obj_point_distance","k":"table","len":29,"c":true},{"a":41085,"n":"obj_point_distance_sentry","k":"table","len":22,"c":true},{"a":41107,"n":"obj_point_distance_tree","k":"table","len":17,"c":true},{"a":41124,"n":"obj_point_distance_boulder","k":"table","len":8,"c":true},{"a":41132,"n":"obj_point_distance_meanie","k":"table","len":18,"c":true},{"a":41150,"n":"obj_point_distance_sentinel","k":"table","len":30,"c":true},{"a":41180,"n":"obj_point_distance_tower","k":"table","len":12,"c":true},{"a":41192,"n":"obj_point_distance_text","k":"table","len":24,"c":true},{"a":41216,"n":"basic_leftover_a100","k":"table","len":160,"c":true},{"a":41376,"n":"obj_polygon_data","k":"table","len":27,"c":true},{"a":41403,"n":"obj_polygon_data_sentry","k":"table","len":25,"c":true},{"a":41428,"n":"obj_polygon_data_tree","k":"table","len":15,"c":true},{"a":41443,"n":"obj_polygon_data_boulder","k":"table","len":10,"c":true},{"a":41453,"n":"obj_polygon_data_meanie","k":"table","len":25,"c":true},{"a":41478,"n":"obj_polygon_data_sentinel","k":"table","len":35,"c":true},{"a":41513,"n":"obj_polygon_data_tower","k":"table","len":11,"c":true},{"a":41524,"n":"obj_polygon_data_text","k":"table","len":12,"c":true},{"a":41536,"n":"basic_leftover_a240","k":"table","len":160,"c":true},{"a":41696,"n":"obj_polygon_list_lo","k":"table","len":27,"c":true},{"a":41723,"n":"obj_polygon_list_lo_sentry","k":"table","len":25,"c":true},{"a":41748,"n":"obj_polygon_list_lo_tree","k":"table","len":15,"c":true},{"a":41763,"n":"obj_polygon_list_lo_boulder","k":"table","len":10,"c":true},{"a":41773,"n":"obj_polygon_list_lo_meanie","k":"table","len":25,"c":true},{"a":41798,"n":"obj_polygon_list_lo_sentinel","k":"table","len":35,"c":true},{"a":41833,"n":"obj_polygon_list_lo_tower","k":"table","len":11,"c":true},{"a":41844,"n":"obj_polygon_list_lo_text","k":"table","len":12,"c":true},{"a":41856,"n":"basic_leftover_a380","k":"table","len":160,"c":true},{"a":42016,"n":"obj_polygon_list_hi","k":"table","len":27,"c":true},{"a":42043,"n":"obj_polygon_list_hi_sentry","k":"table","len":25,"c":true},{"a":42068,"n":"obj_polygon_list_hi_tree","k":"table","len":15,"c":true},{"a":42083,"n":"obj_polygon_list_hi_boulder","k":"table","len":10,"c":true},{"a":42093,"n":"obj_polygon_list_hi_meanie","k":"table","len":25,"c":true},{"a":42118,"n":"obj_polygon_list_hi_sentinel","k":"table","len":35,"c":true},{"a":42153,"n":"obj_polygon_list_hi_tower","k":"table","len":11,"c":true},{"a":42164,"n":"obj_polygon_list_hi_text","k":"table","len":12,"c":true},{"a":42176,"n":"basic_leftover_a4c0","k":"table","len":160,"c":true},{"a":42336,"n":"obj_sentinel_polygons","k":"table","len":64,"c":true},{"a":42400,"n":"obj_sentinel_polygons_2","k":"table","len":60,"c":true},{"a":42460,"n":"obj_sentinel_polygons_3","k":"table","len":36,"c":true},{"a":42496,"n":"obj_tree_polygons","k":"table","len":35,"c":true},{"a":42531,"n":"obj_tree_polygons_2","k":"table","len":32,"c":true},{"a":42563,"n":"obj_boulder_polygons","k":"table","len":42,"c":true},{"a":42605,"n":"obj_tower_polygons","k":"table","len":51,"c":true},{"a":42656,"n":"obj_text_block_polygons","k":"table","len":20,"c":true},{"a":42676,"n":"obj_robot_polygons","k":"table","len":61,"c":true},{"a":42737,"n":"obj_robot_polygons_2","k":"table","len":62,"c":true},{"a":42799,"n":"obj_sentry_polygons","k":"table","len":56,"c":true},{"a":42855,"n":"obj_sentry_polygons_2","k":"table","len":57,"c":true},{"a":42912,"n":"point_screen_x_lo","k":"table","len":64,"c":true},{"a":42976,"n":"point_screen_x_lo_objects","k":"table","len":32,"c":true},{"a":43008,"n":"point_yaw_hi","k":"variable","len":1,"c":true},{"a":43009,"n":"point_yaw_hi_plus1","k":"table","len":31,"c":true},{"a":43040,"n":"point_yaw_hi_row_b","k":"variable","len":1,"c":true},{"a":43041,"n":"point_yaw_hi_row_b_plus1","k":"table","len":31,"c":true},{"a":43072,"n":"point_yaw_hi_objects","k":"table","len":32,"c":true},{"a":43104,"n":"basic_leftover_a860","k":"table","len":484,"c":true},{"a":43588,"n":"print_char_shadowed","k":"routine","len":38,"c":true},{"a":43611,"n":"b_AA5B","k":"branch","len":1,"c":false},{"a":43623,"n":"b_AA67","k":"branch","len":1,"c":false},{"a":43626,"n":"print_token_byte","k":"routine","len":25,"c":true},{"a":43633,"n":"b_AA71","k":"branch","len":1,"c":false},{"a":43637,"n":"b_AA75","k":"branch","len":1,"c":false},{"a":43651,"n":"plot_bytes_left","k":"variable","len":1,"c":true},{"a":43652,"n":"token_offsets","k":"table","len":18,"c":true},{"a":43670,"n":"shadow_front_char","k":"variable","len":1,"c":true},{"a":43671,"n":"shadow_front_colour","k":"table","len":10,"c":true},{"a":43681,"n":"shadow_rear_char","k":"variable","len":1,"c":true},{"a":43682,"n":"shadow_rear_colour","k":"table","len":11,"c":true},{"a":43693,"n":"tok0_title_press_any_key","k":"table","len":6,"c":true},{"a":43699,"n":"tok1_landscape_number","k":"table","len":19,"c":true},{"a":43718,"n":"tok2_secret_code_prompt","k":"table","len":9,"c":true},{"a":43727,"n":"tok3_wrong_secret_code","k":"table","len":21,"c":true},{"a":43748,"n":"tok4_preview_caption","k":"table","len":9,"c":true},{"a":43757,"n":"tok5_next_code_caption","k":"table","len":6,"c":true},{"a":43763,"n":"tok6_press_any_key","k":"table","len":3,"c":true},{"a":43766,"n":"tok7_tab_1_2","k":"table","len":7,"c":true},{"a":43773,"n":"tok8_tab_3_4","k":"table","len":7,"c":true},{"a":43780,"n":"tok9_tab_3_24","k":"table","len":7,"c":true},{"a":43787,"n":"tok10_vdu5_gcol_128","k":"table","len":5,"c":true},{"a":43792,"n":"tok11_vdu5_gcol_129","k":"table","len":5,"c":true},{"a":43797,"n":"tok12_tab_1_21","k":"table","len":7,"c":true},{"a":43804,"n":"tok13_landscape","k":"table","len":10,"c":true},{"a":43814,"n":"tok14_secret_entry_code","k":"table","len":18,"c":true},{"a":43832,"n":"tok15_five_spaces","k":"table","len":6,"c":true},{"a":43838,"n":"tok16_three_spaces","k":"table","len":4,"c":true},{"a":43842,"n":"tok17_press_any_key_text","k":"table","len":14,"c":true},{"a":43856,"n":"music_hyperspace","k":"table","len":25,"c":true},{"a":43881,"n":"music_transfer","k":"table","len":25,"c":true},{"a":43906,"n":"music_game_over","k":"table","len":16,"c":true},{"a":43922,"n":"music_landscape_done","k":"table","len":30,"c":true},{"a":43952,"n":"icon_chars_blank_robot","k":"table","len":16,"c":true},{"a":43968,"n":"icon_chars_tree","k":"table","len":16,"c":true},{"a":43984,"n":"icon_chars_boulder","k":"table","len":16,"c":true},{"a":44000,"n":"icon_char_gold_robot","k":"table","len":8,"c":true},{"a":44008,"n":"icon_chars_scanner","k":"table","len":24,"c":true},{"a":44032,"n":"sound_enemy_turn","k":"table","len":8,"c":true},{"a":44040,"n":"sound_meanie_turn","k":"table","len":8,"c":true},{"a":44048,"n":"sound_create_absorb","k":"table","len":8,"c":true},{"a":44056,"n":"sound_music_note","k":"table","len":4,"c":true},{"a":44060,"n":"sound_music_pitch","k":"table","len":4,"c":true},{"a":44064,"n":"sound_scanner","k":"table","len":8,"c":true},{"a":44072,"n":"sound_ping","k":"table","len":4,"c":true},{"a":44076,"n":"sound_ping_pitch","k":"table","len":4,"c":true},{"a":44080,"n":"sound_game_over","k":"table","len":4,"c":true},{"a":44084,"n":"sound_game_over_pitch","k":"table","len":4,"c":true},{"a":44088,"n":"basic_leftover_ac38","k":"table","len":8,"c":true},{"a":44096,"n":"pitch_effect_flutter","k":"table","len":7,"c":true},{"a":44103,"n":"pitch_effect_warble","k":"table","len":7,"c":true},{"a":44110,"n":"pitch_effect_rise","k":"table","len":7,"c":true},{"a":44117,"n":"basic_leftover_ac55","k":"table","len":43,"c":true},{"a":44160,"n":"sine_table","k":"table","len":64,"c":true},{"a":44224,"n":"sine_table_upper","k":"table","len":64,"c":true},{"a":44288,"n":"polygon_left_x","k":"variable","len":1,"c":true},{"a":44289,"n":"strip_tile_next","k":"variable","len":1,"c":true},{"a":44290,"n":"strip_tile_next2","k":"variable","len":1,"c":true},{"a":44291,"n":"strip_tile_next3","k":"table","len":43,"c":true},{"a":44334,"n":"strip_seed_copy_base","k":"table","len":18,"c":true},{"a":44352,"n":"tile_block_list","k":"table","len":60,"c":true},{"a":44412,"n":"a_AD7C","k":"table","len":64,"c":true},{"a":44544,"n":"polygon_right_x","k":"table","len":7,"c":true},{"a":44551,"n":"block_max_alt_m9","k":"variable","len":1,"c":true},{"a":44552,"n":"block_max_alt_m8","k":"variable","len":1,"c":true},{"a":44553,"n":"block_max_alt_m7","k":"table","len":6,"c":true},{"a":44559,"n":"block_max_alt_m1","k":"variable","len":1,"c":true},{"a":44560,"n":"block_max_altitude","k":"variable","len":1,"c":true},{"a":44561,"n":"block_max_alt_p1","k":"table","len":6,"c":true},{"a":44567,"n":"block_max_alt_p7","k":"variable","len":1,"c":true},{"a":44568,"n":"block_max_alt_p8","k":"variable","len":1,"c":true},{"a":44569,"n":"block_max_alt_p9","k":"table","len":64,"c":true},{"a":44640,"n":"block_max_tile_x","k":"table","len":23,"c":true},{"a":44663,"n":"a_AE77","k":"table","len":41,"c":true},{"a":44704,"n":"block_max_tile_z","k":"table","len":64,"c":true},{"a":48128,"n":"tile_corner_yaw_lo","k":"table","len":1024,"c":true},{"a":49152,"n":"tile_corner_yaw_hi","k":"table","len":1024,"c":true},{"a":50176,"n":"tile_corner_pitch_lo","k":"table","len":1024,"c":true},{"a":51200,"n":"tile_corner_pitch_hi","k":"table","len":1024,"c":true}],"records":[{"a":0,"l":"cpu_port_ddr","c":"6510 port direction register, not a game variable. $8903 stores $2F here at start-up and no other traced instruction writes it. The BBC original kept the number of the enemy being processed at this address; the C64 build moved that byte to $90, and the reset loop at $115D starts clearing zero page at $02 so both port registers are left alone.","t":"byte","b":[255],"x":[4453,35075]},{"a":1,"l":"cpu_port_banking","c":"6510 port data register, i.e. the memory map. $8907 stores $35 at start-up (RAM at $A000-$BFFF and $E000-$FFFF, I/O at $D000-$DFFF) and no other traced instruction writes it. The BBC original kept the current object number here; on the C64 that byte lives at $91.","t":"byte","b":[255],"x":[35079]},{"a":2,"l":"edge_frac_or_xlist_page","c":"Shared byte. In the gaze-versus-tile test at $1CDD it is the position (0-255) along the tile edge where the gaze point lies, stored at $1DBD and used as a multiplier at $1DD2 to interpolate the edge height. In the tile-shape code it is the page of the x-coordinate list an edge is traced into: $2E0D sets $AD, $2E24 bumps it to $AE, and $2F39/$30EA patch it into the store operands at $2F61 and $3121.","t":"byte","b":[0],"x":[7613,7634,11791,11812,12089,12522]},{"a":3,"l":"viewer_col_rotated","c":"Tile column of the viewer in the rotated frame used for drawing (axes turned to match the view direction), written four ways at $268D-$26BF, compared at $2772-$2799 and $2965/$2980 while rows are drawn. The C64-only precompute at $3700 reuses it for the viewer's plain column, loaded from obj_x at $3705 and subtracted at $3720.","t":"byte","b":[0],"x":[9869,9885,9903,9919,10098,10111,10137,10186,10331,10597,10624,14085,14112]},{"a":4,"l":"poly_bottom_y","c":"Screen y of the lowest point of the polygon being filled (y grows up the screen). Written by the tile-shape code at $2DFC/$2EAC/$2EFA and used as the fill's lower bound in $22AA at $22B3, $230C and $2313.","t":"byte","b":[0],"x":[8883,8972,8979,11772,11948,11972,12016,12026]},{"a":5,"l":"draw_table_offset","c":"Offset into the per-corner drawing tables ($0A80, $0AE0, $0BA0, $A800) for the tile being handled: set at $2462, $26D4 and many points in $2625-$27B0, and ORed into the index at $25B2, $284A, $2A17, $2D6E and the C64-only $37F7.","t":"byte","b":[0],"x":[9314,9336,9340,9650,9940,9950,9954,10003,10007,10025,10029,10049,10053,10071,10075,10133,10160,10314,10775,11630,14327]},{"a":6,"l":"tile_height_or_poly_top","c":"Shared byte. As a tile height: the height limit in $1238 (raised by one after every 256 misses until it reaches 12), the altitude being scanned in $14FB/$159D/$15CC (e.g. $15A4 compare, $1617 store). As a polygon bound: the screen y of the polygon's highest point, set by the tile-shape code ($2DF4, $2F15) and read by the fill at $22B0/$22C2/$2308.","t":"byte","b":[0],"x":[4664,4674,4676,4711,5388,5393,5522,5540,5582,5651,5655,8880,8898,8968,11764,11950,11970,12040,12053]},{"a":7,"l":"cur_buffer_min_yaw_hi","c":"High byte of the smallest yaw angle that still lands inside the current screen buffer. Set by the buffer set-up routines ($2999, $29CA) and checked at $293F and in the C64-only tile loop at $388F.","t":"byte","b":[0],"x":[10559,10649,10698,10705,14479]},{"a":8,"l":"last_pan_dir","c":"Direction of the most recent pan: 0 right, 1 left, 2 up, 3 down. Copied from $09 at $3647 when a pan starts (cleared at $3596); read by the pan routine $10B7 to pick the step from $9925, by the C64 scroller $96A6 to pick the scroll direction, and at $1FE0/$207C.","t":"byte","b":[0],"x":[4279,4319,4388,8160,8316,13718,13895,38566,38702]},{"a":9,"l":"pan_key_now","c":"Pan direction currently being requested, same values as $08, bit 7 set for none. $119F sets $80 then stores the sideways or vertical key-logger entry ($120B); the C64 sights code at $997A/$998E/$99B6/$99D0 stores a direction when the sights are pushed past the edge of the view. Read at $12CA, $3645 and $995B.","t":"byte","b":[0],"x":[4513,4619,4621,4810,13893,39259,39290,39310,39350,39376]},{"a":10,"l":"point_dx_hi","c":"High byte of the x difference between two polygon points, stored at $3017 in the edge tracer and used at $303E as the sign for $1007 (make positive).","t":"byte","b":[0],"x":[12311,12350]},{"a":11,"l":"player_obj","c":"Object number (0-63) of the robot the player is in: written when the player is placed ($1455), on transfer ($1B6C) and hyperspace ($21A5); read all over the enemy, drain and visibility code (e.g. $16E1, $1938, $2481) and by the C64 sights code at $9994 to fetch the player's pitch.","t":"byte","b":[0],"x":[4386,5205,5857,5909,6084,6269,6456,6667,6920,7020,7136,8349,8539,8580,8613,8646,9345,9470,13732,39316]},{"a":12,"l":"shared_0C","c":"Multi-purpose byte: row counter in the highest-tile search ($15E4-$162B); vertical tolerance when testing a gaze against a tile surface ($1CFF, $1E2E sets $10, compared $1D1E); low byte of the pointer ($0C/$0D) into the secret-code stash on page $3F, built at $254F-$2555 from the stash offset at $0C55 plus 41 and stepped down at $2567; y delta low byte in the tile-edge tracer ($2E18-$3173).","t":"byte","b":[0],"x":[5604,5614,5675,7423,7454,7726,9557,9569,9575,9580,11800,11825,11827,11851,11873,12085,12102,12105,12124,12194,12232,12267,12324,12336,12390,12469,12518,12545,12567,12659]},{"a":13,"l":"shared_0D","c":"Multi-purpose byte: column counter in the highest-tile search ($15F2-$1625); high byte of the stash pointer at $0C, always $3F ($2559-$255D: 3 + $3C), so the C64 keeps its stash on the page of the start-up code at $3F00; the signed, scaled x step of an edge in the tile-edge tracer ($2F29-$3177).","t":"byte","b":[0],"x":[5618,5628,5669,9565,12073,12079,12083,12120,12175,12178,12198,12228,12271,12482,12493,12495,12516,12563,12635,12663]},{"a":14,"l":"point_x_save","c":"Holds X (a polygon point number) across the edge tracer: stored at $3002 and restored at $309A to index the pitch tables at $0A80/$0AE0.","t":"byte","b":[0],"x":[12290,12442]},{"a":15,"l":"y_save_or_obscured","c":"Shared byte. In the enemy code ($17AE, $17C8, $17CD) a flag for an enemy that sees the player's robot but not the tile it stands on. In the landscape drawing loop it saves Y across calls ($2847/$2957), and the C64-only loop at $37F4/$38A6 uses it the same way.","t":"byte","b":[0],"x":[6062,6088,6093,10311,10583,14324,14502]},{"a":16,"l":"buffer_kind","c":"Which screen buffer the drawing code is filling (row or column buffer, left or right part). Set by $2993/$29F6 and $1FED/$2033, flipped at $298D, read by the fill ($22CA) and the polygon drawer ($2AA9, $2AB7).","t":"byte","b":[0],"x":[8173,8243,8906,10637,10643,10742,10921,10935]},{"a":17,"l":"cur_buffer_origin_hi","c":"High byte of the offset that turns a yaw measured from the buffer's centre into one measured from its left edge; set by $29A3/$29ED and added at $2DA7/$2DDD in the tile-shape code.","t":"byte","b":[0],"x":[10659,10733,11687,11741]},{"a":18,"l":"cur_buffer_max_yaw_hi","c":"High byte of the largest yaw angle that still lands inside the current screen buffer; set by $299E/$29D6, checked at $2951 and in the C64-only tile loop at $38A0.","t":"byte","b":[0],"x":[10577,10654,10710,14496]},{"a":19,"l":"dither_tmp","c":"Scratch for the C64 dissolve routine $86A5: the random row pick at $8712-$871B, then the masked source pixels at $877F that are ORed into the screen byte at $8786.","t":"byte","b":[0],"x":[34580,34584,34687,34694]},{"a":20,"l":"target_seen_bits","c":"Result of an enemy's line-of-sight check on its target: bit 7 when the target's tile can be seen, bit 6 when only the robot itself can. Built in the enemy code ($17DC, $1891), shifted at $18FC, read at $1719-$183F, $19DE and $1AE6.","t":"byte","b":[0],"x":[5913,6050,6078,6108,6185,6207,6289,6396,6622,6886]},{"a":21,"l":"loop_count","c":"General loop counter used by many routines: star batches in $1090 (3 passes), placement attempts in $1238 (256 per height), row loops in the fill $2211 ($2243/$2272), smoothing passes $2B87, the four-step bit loop of the 3D digit printer at $3244/$325D, the screen decay at $8805, the icon loop at $9513 and the C64 object redraw at $206A/$2081.","t":"byte","b":[0],"x":[4269,4274,4668,4670,8298,8321,8771,8818,11143,11171,12868,12893,34821,34829,38163,38165,38173,38188,38196]},{"a":22,"l":"edge_end_y_lo","c":"Low byte of the y (pitch) of the end point of the polygon edge being traced ($2E77-$30B3).","t":"byte","b":[0],"x":[11895,12010,12379,12385,12392,12426,12447,12467]},{"a":23,"l":"edge_or_trace_count","c":"Number of edges in the polygon being drawn (set $2D8E, $8593, compared $2E8F) or, in the visibility tracer, the number of steps along the ray ($24F5, halved at $253E, used at $2576).","t":"byte","b":[0],"x":[9461,9534,9590,11662,11671,11725,11919,11928,34195]},{"a":24,"l":"shared_18","c":"Multi-purpose: tile column in the highest-tile block search ($15D5/$15F4) and in the row visibility trace ($24EB-$25BC); low byte of an edge's start x in the edge tracer ($2E7C-$3165).","t":"byte","b":[0],"x":[5589,5620,9451,9463,9486,9648,9660,11900,12061,12115,12188,12223,12261,12404,12436,12477,12555,12645]},{"a":25,"l":"poly_colours_or_row","c":"Colour pair of the polygon being drawn (fill and edge colours), set by the tile and object drawers ($2A60, $2A94, $2AA1, $8589) and read by the fill at $22E0/$22EB; also a row number in the visibility trace ($24FC).","t":"byte","b":[0],"x":[8928,8939,9468,10848,10900,10913,34185]},{"a":26,"l":"shared_1A","c":"Multi-purpose: tile row in the highest-tile search ($15DB/$15E6) and visibility trace ($2471-$24E2); the screen line being filled ($230A-$239E); low byte of an edge's start y in the edge tracer ($2E6D-$30E8).","t":"byte","b":[0],"x":[5595,5606,8970,8977,9077,9118,9329,9334,9378,9429,9442,11885,12034,12087,12387,12428,12464,12520]},{"a":27,"l":"quadrant_table_offset","c":"Offset into the drawing tables for the quadrant holding the right-hand edge of the 90-degree view: $266D-$2670 look it up in the four-byte table at $27D3 from the top two bits of the arc yaw; added at $2A1A.","t":"byte","b":[0],"x":[9840,10778]},{"a":28,"l":"arc_right_yaw_or_action","c":"Shared byte: the yaw of the right edge of the view arc (viewer yaw + $20, stored $265C, tested $2684/$28A3 and at $37FB in the C64 loop), or the action code for the landscape data pass run by $2B22/$2BBC (bit tests at $2BC5, $2BDB, $2C65).","t":"byte","b":[0],"x":[9820,9829,9860,10403,11042,11055,11198,11205,11227,11365,14331]},{"a":29,"l":"viewer_row_rotated","c":"Tile row of the viewer in the rotated drawing frame, companion of $03: written at $2692-$26C7, compared $26F5, subtracted at $2879. The C64-only precompute reuses it for the viewer's plain row, loaded from obj_z at $370A and subtracted at $3736.","t":"byte","b":[0],"x":[9874,9890,9911,9927,9973,10361,14090,14134]},{"a":30,"l":"shared_counter_1E","c":"Counter reused by unrelated loops: trees still to plant ($1497/$14A6), gaze checks in the anti-tamper routine at $1887 ($18D6/$1912), extra columns for the fill ($2222/$2276), horizontal edges in the tile-shape code ($2DF8-$2EDB) and dots in the C64 screen decay ($8801/$8811).","t":"byte","b":[0],"x":[5271,5286,6358,6418,8738,8822,11768,11926,11995,34817,34833]},{"a":31,"l":"yaw_adjust_lo","c":"Low byte of a yaw offset applied while redrawing a single object so that its left edge sits at the buffer's left edge; set at $1FD0/$2003, subtracted at $2894, $8418 and in the C64 tile loop at $3854.","t":"byte","b":[0],"x":[8144,8195,10388,14420,33816]},{"a":32,"l":"screen_left_yaw_hi","c":"High byte of the yaw of the screen's left edge reduced to one quadrant; stored at $2682, subtracted at $289B.","t":"byte","b":[0],"x":[9858,10395]},{"a":33,"l":"draw_table_index","c":"Index of the tile corner or object point being written to the drawing tables ($0A80/$0AE0/$0BA0/$A800): set at $284C and $8479, stepped at $8527; the C64-only precompute makes it (column*8 AND $E0) OR row at $3755 and uses it at $37C7; the C64 tile loop makes it Y OR $05 at $37F9 and uses it at $384F.","t":"byte","b":[0],"x":[10316,10383,10475,10544,14165,14279,14329,14415,33913,34016,34073,34087]},{"a":34,"l":"plot_ptr","c":"Two-byte pointer ($22/$23) to the screen or buffer byte being plotted: stars at $9406-$9451, the C64 random-dot plot at $9498/$94BC, and the scanner static at $1665/$167C (high byte fixed at $70).","t":"byte","b":[0],"x":[5733,5756,37894,37913,37915,37931,37956,37969,38040,38068,38076]},{"a":35,"l":"plot_ptr_hi","c":"High byte of the plot pointer at $22: star row page at $9413/$9433 (wrapped into the view buffer at $9422-$9431), $94A1 in the dot plotter, $1669 (= $70) for the scanner.","t":"byte","b":[0],"x":[5737,37907,37920,37939,38049]},{"a":36,"l":"tile_x","c":"Tile column 0-31 of the square being worked on; one of the most used variables. Set by callers before $2BA8 (pointer to the square's byte in $0400-$07FF), stepped in the generator and smoothing loops ($2B03, $2B98), the spawn code ($124D, $1463, $1F16) and the C64 per-square precompute at $3712-$37E3.","t":"byte","b":[0],"x":[4685,5219,5448,5462,5622,5657,5667,6853,7113,7405,7476,7500,7514,7922,7958,9684,9694,9699,10210,10234,10239,10264,10270,10279,10286,10294,10309,10329,10409,10421,10432,10450,11011,11028,11050,11130,11160,11167,11176,11186,11214,11374,11397,11419,12864,12891,14098,14110,14156,14168,14307,14322,14337,14347,14366,14376]},{"a":37,"l":"tile_col_or_fill_count","c":"Column of the tile being drawn in the landscape row loop ($295F-$2987, $2A15, $2A4D, $2D6C) or the number of columns left to fill in $2211 ($2224/$223F).","t":"byte","b":[0],"x":[8740,8767,10188,10591,10604,10606,10618,10631,10755,10773,10829,11628]},{"a":38,"l":"tile_z","c":"Tile row 0-31 of the square being worked on, the partner of $24 (the pointer at $2BA8 is built from both); also the fill's current character row at $2211/$2233/$227F and the digit row at $322B.","t":"byte","b":[0],"x":[4690,5223,5453,5608,5662,5673,6858,7117,7413,7483,7507,7521,7927,7963,8721,8755,8831,9680,9705,9931,9967,9971,10009,10023,10055,10069,10135,10162,10359,10411,10416,10438,10447,10760,10831,11007,11032,11046,11134,11147,11154,11183,11209,11369,11408,11430,12843,12897,14094,14132,14163,14314,14339,14350,14360,14374]},{"a":39,"l":"tile_count_mask","c":"Bit mask with as many leading zeroes as the count it was made from: set by $15BE (tiles at one height) and $24B1, used to limit a random pick at $151E and $24CB.","t":"byte","b":[0],"x":[5406,5566,9393,9419]},{"a":40,"l":"cur_buffer_min_yaw_lo","c":"Low byte of the smallest yaw inside the current screen buffer (pair of $07); set $29B6/$29CF, checked $2948 and $3898.","t":"byte","b":[0],"x":[10568,10678,10703,14488]},{"a":41,"l":"cur_buffer_origin_lo","c":"Low byte of the buffer's yaw-origin offset (pair of $11); set $29B8/$29F2, added $2DA0/$2DD6.","t":"byte","b":[0],"x":[10680,10738,11680,11734]},{"a":42,"l":"star_random","c":"Random byte used to pick a star's pixel in the star plotter $93F5: stored at $940B from $93F0, rotated at $9435 to choose one of four pixels. $2B after it is not referenced.","t":"byte","b":[0,0],"x":[37899,37941]},{"a":44,"l":"vec_x_bot_or_goes_right","c":"Lowest byte of the x part of a 3D vector (e.g. eye to sights, written $1C9A, added $1CC4, $250C-$2532), and in the fill a flag that the polygon ran past the buffer's right edge ($22AC, $2333, $233C, read $2AB9).","t":"byte","b":[0],"x":[7322,7364,8876,9011,9020,9484,9499,9522,10937]},{"a":45,"l":"vec_y_bot_or_goes_left","c":"Lowest byte of the y part of a 3D vector ($1C67, $2536, $2595), and in the fill the flag that the polygon ran past the left edge ($22AE, $232D, $234F).","t":"byte","b":[0],"x":[7271,8878,9005,9039,9526,9621]},{"a":46,"l":"vec_z_bot","c":"Lowest byte of the z part of a 3D vector; shifted at $253A in the visibility tracer.","t":"byte","b":[0],"x":[9530]},{"a":47,"l":"vec_x_lo","c":"Low byte of the x part of a 3D vector: set $1C96, $2512; added $1CC8, $257D; shifted $2534.","t":"byte","b":[0],"x":[7318,7368,9490,9503,9524,9597]},{"a":48,"l":"vec_y_lo_or_min_flat_x","c":"Low byte of the y part of a 3D vector ($1C65, $1D2E, $2538, $259B), or in the tile-shape code the smallest x of the horizontal edges found ($2DFE-$2ED9).","t":"byte","b":[0],"x":[7269,7470,9528,9627,11774,11952,11989,11993]},{"a":49,"l":"vec_z_lo_or_max_flat_x","c":"Low byte of the z part of a 3D vector ($253C, $2588), or in the tile-shape code the largest x of the horizontal edges ($2DF6-$2ED3).","t":"byte","b":[0],"x":[9532,9608,11766,11957,11983,11987]},{"a":50,"l":"row_left_tile_or_cos_lo","c":"Leftmost tile of the row being drawn ($26D0-$2721, $27D7-$2829), or the low byte of cos(pitch) when turning angles into a vector ($1C5E, read $1C81).","t":"byte","b":[0],"x":[7262,7297,9936,9945,9956,9985,10017,10199,10212,10268,10281]},{"a":51,"l":"row_right_tile_or_cos_hi","c":"Rightmost tile of the row being drawn ($26E8-$274F, $27FC-$281A), or the high byte of cos(pitch) in the vector code ($1C5C, $1C85).","t":"byte","b":[0],"x":[7260,7301,9960,10031,10063,10236,10241,10266]},{"a":52,"l":"coord_x_bot_or_shape","c":"Lowest byte of a 24-bit x coordinate ($1CC1/$1CC6, $1ECE), or the tile shape number used as a colour-table offset in the two-face tile drawer ($2A8A/$2A99).","t":"byte","b":[0],"x":[7361,7366,7886,10890,10905]},{"a":53,"l":"coord_y_bot_or_buf_left","c":"Lowest byte of a 24-bit y coordinate ($1ED0, $2592/$2597), or the buffer's left edge in pixels ($29AD/$29E8, used by the fill at $2380/$23A9).","t":"byte","b":[0],"x":[7888,9088,9129,9618,9623,10669,10728]},{"a":54,"l":"coord_z_bot_or_buf_right","c":"Lowest byte of a 24-bit z coordinate ($1ED2), or the buffer's right edge in pixels ($29B2/$29E3, compared at $23A4).","t":"byte","b":[0],"x":[7890,9124,10674,10723]},{"a":55,"l":"coord_x_lo_or_vis_left","c":"Middle byte of a 24-bit x coordinate ($1CCE/$1CD0, $1ED6, $257A/$257F), or the leftmost visible tile of the row being drawn ($26E6-$2786, $295D/$297C).","t":"byte","b":[0],"x":[7374,7376,7584,7601,7855,7894,9482,9594,9599,9958,9987,9997,10011,10021,10095,10116,10118,10589,10620]},{"a":56,"l":"coord_y_lo_or_vis_right","c":"Middle byte of a 24-bit y coordinate ($1D11, $1E6D, $1EDD, $2599/$259D), or the rightmost visible tile of the row ($26EA-$278B, $2961/$2973).","t":"byte","b":[0],"x":[7441,7648,7789,7901,9625,9629,9962,10033,10043,10057,10067,10102,10107,10123,10593,10611]},{"a":57,"l":"coord_z_lo_or_edge_x_end","c":"Middle byte of a 24-bit z coordinate ($1DA6, $1ED8, $2585/$258A), or the low byte of an edge's end x in the edge tracer ($2E81-$30C0).","t":"byte","b":[0],"x":[7590,7605,7866,7896,9605,9610,11905,12064,12364,12402,12409,12434,12457,12480]},{"a":58,"l":"coord_x_hi_or_dx_lo","c":"High byte of a 24-bit x coordinate (tile column plus fraction: $1CD2-$1CEB, $1EE2, $2510; read at $1BC7 by the transfer code), or the low byte of an edge's x step ($3047, $3077).","t":"byte","b":[0],"x":[7111,7378,7382,7403,7906,9488,9592,12359,12407]},{"a":59,"l":"coord_y_hi_or_poly_type","c":"High byte of a 24-bit y (height) coordinate ($1D16, $1D72, $1EE7, $259F/$25A3), or the polygon kind in bits 6-7 for the drawer (set $2A64, $2A8F, $8542; tested $2D70).","t":"byte","b":[0],"x":[7446,7538,7653,7796,7911,9631,9635,10852,10895,10915,10919,11632,34114]},{"a":60,"l":"coord_z_hi_or_points_ptr","c":"High byte of a 24-bit z coordinate ($1CF3, $1EEC, read by the transfer code at $1BCB), or the low byte of the pointer ($3C/$3D) to the list of point numbers of the polygon being drawn: $0C40 for a tile face (set at $2650/$2654), the object's polygon data from $A2E0/$A420 in the object drawer ($8598/$85B8); read through at $2D99-$2E0A.","t":"byte","b":[0],"x":[7115,7411,7916,9539,9808,11673,11727,11782,11786,34200,34232]},{"a":61,"l":"vec_yaw_lo_or_points_ptr_hi","c":"Low byte of a vector's yaw ($1C21, $18CE, read $1C69), or the high byte of the polygon point-list pointer at $3C ($0C for tile faces at $2654, from $A420 for objects at $859D/$85BC).","t":"byte","b":[0],"x":[6350,7201,7273,9812,34205,34236]},{"a":62,"l":"vec_yaw_hi_or_edge_y0_hi","c":"High byte of a vector's yaw ($1C2B, $18D2, read $1C6D), or the high byte of an edge's start y in the edge tracer ($2E68-$3188, $314E, $31A5).","t":"byte","b":[0],"x":[6354,7211,7277,11880,12028,12111,12184,12396,12432,12532,12590,12622,12680,12709]},{"a":63,"l":"vec_pitch_lo_or_edge_y1_hi","c":"Low byte of a vector's pitch ($1C46, $18EB), or the high byte of an edge's end y in the edge tracer ($2E72-$30A4).","t":"byte","b":[0],"x":[6379,7238,11890,12004,12374,12394,12400,12430,12452]},{"a":64,"l":"vec_pitch_hi_or_edge_scale","c":"High byte of a vector's pitch ($1C52, $18F1), or the shift count used to squeeze an edge's x and y deltas into single bytes in the edge tracer (cleared at $3006, rotated at $302B, read $305D, counted down $3086).","t":"byte","b":[0],"x":[6385,7250,12294,12331,12381,12422]},{"a":65,"l":"edge_x_start_hi","c":"High byte of the start x of the polygon edge being traced ($2E85-$319A); read at $31AF by the code that patches the edge-storing instructions.","t":"byte","b":[0],"x":[11909,12055,12413,12440,12484,12608,12698,12719]},{"a":66,"l":"edge_x_end_hi","c":"High byte of the end x of the polygon edge being traced ($2E87-$30C6).","t":"byte","b":[0],"x":[11911,12057,12369,12411,12417,12438,12462,12486]},{"a":67,"l":"edge_dx_hi","c":"High byte of the signed, scaled x step of the edge being traced: stored at $3043, subtracted at $307F. $44 after it is not referenced.","t":"byte","b":[0,0],"x":[12355,12415]},{"a":69,"l":"tile_first_point","c":"Number of the first corner used when a tile's shape is split into faces: stored by $2A46/$2A79, read at $2D49 by the tile-shape code. $46-$49 after it are not referenced.","t":"byte","b":[0,0,0,0,0],"x":[10822,10873,11593]},{"a":74,"l":"poly_side_index","c":"Index of the polygon side being processed in the tile-shape code: stored $2E04, read $2E8C.","t":"byte","b":[0],"x":[11780,11916]},{"a":75,"l":"arc_opposite_quadrant","c":"Quadrant number opposite to the one holding the right edge of the view arc; stored at $267B, read by the tile drawers at $2A42 and $2A81.","t":"byte","b":[0],"x":[9851,10818,10881]},{"a":76,"l":"obj_type_measured","c":"Type of the object whose screen angles are being computed: set from the type table at $0A40 by $8406, indexes the shape data at $8475/$854B/$856F; also read at $18D8 in the anti-tamper routine at $1887. $4D after it is not referenced.","t":"byte","b":[0,0],"x":[6360,33798,33909,34123,34159]},{"a":78,"l":"obj_point_or_face_num","c":"Loop counter over an object's points ($8483-$8529, while angles are computed) or over its faces ($8579, $85A2, while drawing).","t":"byte","b":[0],"x":[33923,33938,34038,34085,34089,34169,34210]},{"a":79,"l":"obj_last_point_or_face","c":"End value for the loop counter at $4E: the object's last point ($847E, compared $852B) or last face ($8574, compared $85A5).","t":"byte","b":[0],"x":[33918,34091,34164,34213]},{"a":80,"l":"pitch_delta_lo","c":"Low byte of a difference between two pitch angles: made at $9363 (then divided by 16 with the RORs at $936C-$9375), read at $2937 and $8520.","t":"byte","b":[0],"x":[10551,34080,37731,37740,37743,37746,37749]},{"a":81,"l":"buffer_top_pitch","c":"Largest pitch that fits the current screen buffer: the C64 sets it from the table at $994B ($F0 for both buffers) at $9943; compared at $2EA8-$2F10 when a tile's points are clipped.","t":"byte","b":[240],"x":[11944,12012,12044,12048,39235]},{"a":82,"l":"buffer_bottom_pitch","c":"Smallest pitch that fits the current screen buffer: $9948 loads it from $994D ($B0 for the row buffer, $30 for the column buffer); compared at $2EA4-$2F04.","t":"byte","b":[48],"x":[11940,12020,12024,12036,39240]},{"a":83,"l":"draw_phase_count","c":"Pass counter for objects drawn in more than one pass by the object drawer: set $8546/$856D, read $857E, counted down $85A9.","t":"byte","b":[0],"x":[34118,34157,34174,34217]},{"a":84,"l":"right_edge_old_byte","c":"Screen byte that was behind the right edge of the polygon line being filled; saved at $2394, reused at $2359.","t":"byte","b":[0],"x":[9049,9108]},{"a":85,"l":"draw_target_unused","c":"Written but never read in this image: $3594 stores 0 and $35CE stores $19 when a landscape starts. In the BBC original the drawing code tested it to draw either to the screen or into the buffer; no traced C64 instruction reads it (searched named and indexed operands), though the missing code at $B000-$B5FF could.","t":"byte","b":[0],"x":[13716,13774]},{"a":86,"l":"poly_right_x","c":"Screen x of the right end of the polygon line being filled ($233A, $2390, compared $23B1, $23D1).","t":"byte","b":[0],"x":[9018,9104,9137,9169]},{"a":87,"l":"fill_rows_left","c":"Rows left to fill in the screen-fill routine $2211 (set $2213 from Y, counted down $2281).","t":"byte","b":[0],"x":[8723,8833]},{"a":88,"l":"poly_fill_byte","c":"Pixel byte holding four pixels of the polygon's fill colour, made at $2306 and stored at $23D7.","t":"byte","b":[0],"x":[8966,9175]},{"a":89,"l":"obj_view_yaw_diff_lo","c":"Low byte of the difference between the viewer's yaw and the yaw of the object being measured (made $842F/$844A in $8401, read $8485).","t":"byte","b":[0],"x":[33839,33866,33925]},{"a":90,"l":"obj_view_yaw_diff_hi","c":"High byte of the yaw difference at $59 ($8436/$8446, read $8489 and $8555). $5B after it is not referenced.","t":"byte","b":[0,0],"x":[33846,33862,33929,34133]},{"a":92,"l":"opp_side_lo","c":"Low byte of the second (opposite) side given to the hypotenuse routines: stored $929B/$92AE in $9287, read $938D in $937F.","t":"byte","b":[0],"x":[37531,37550,37773]},{"a":93,"l":"opp_side_hi","c":"High byte of the opposite side ($9297/$92AA, read $9391).","t":"byte","b":[0],"x":[37527,37546,37777]},{"a":94,"l":"tile_ptr","c":"Pointer ($5E/$5F) to a square's byte in the landscape grid at $0400-$07FF, always used with Y as ($5E),Y. The low byte stays 0 (cleared by the reset at $115D); $2BA8 puts the page in $5F and the row/column index in Y. Read and written through it everywhere tiles are tested or changed ($1257, $1F7C, $2B12, $377C).","t":"byte","b":[0],"x":[4695,4705,5633,5639,6863,6997,7526,7676,7950,7971,8060,10473,11024,11026,11062,11072,11128,11219,11382,11391,11402,11413,11424,12889,14204,14447]},{"a":95,"l":"tile_ptr_page","c":"Page of the landscape square pointer at $5E: 4 + (column AND 3), set by $2BB9 and by the C64-only loops at $375F/$383D; each page holds 256 squares.","t":"byte","b":[0],"x":[10471,11193,14175,14397]},{"a":96,"l":"second_axis_or_gaze_flags","c":"In the sine/cosine routine $0E75 the index (0 or 1) of the value computed second ($0E88-$0F01). In the gaze code the control bits for $1DF9: bit 7 = let a boulder or the Sentinel's tower on the square count towards its height, bit 6 = report where the gaze meets it ($1CFD, $1D22, $1D4A, $1E42, $1EA2); cleared at $25C8.","t":"byte","b":[0],"x":[3720,3730,3837,3841,7421,7458,7498,7746,7842,9672]},{"a":97,"l":"cur_buffer_width_px","c":"Width in pixels of the current screen buffer: set $29A8/$29DC, read by the fill at $2337/$2384.","t":"byte","b":[0],"x":[9015,9092,10664,10672,10716,10726]},{"a":98,"l":"copy_src","c":"Source pointer ($62/$63) for the C64's copying of the drawn view: the dissolve at $86A5 reads buffer pixels through it ($872A, $877A); the column and block copiers at $9730-$98DB step it by $140 per row.","t":"byte","b":[0],"x":[34602,34682,38714,38788,38793,38930,38937,38944,38951,38958,38965,38972,38979,38998,39003,39008,39013,39018,39023,39028,39033,39050,39055,39060,39065,39070,39075,39080,39085,39126]},{"a":99,"l":"copy_src_hi","c":"High byte of the copy source pointer at $62: set $8733, $9745, $98DB; incremented in the unrolled copy loops at $984C and $9880.","t":"byte","b":[0],"x":[34611,38725,38795,38799,38988,39040,39131]},{"a":100,"l":"copy_dst","c":"Destination pointer ($64/$65) into the character-set memory the play screen shows, built from the row tables $3A00/$3A20 plus column*8 ($875E, $9763, $97B3) and written through by the copiers at $9812-$98AF and the dissolve at $8788.","t":"byte","b":[0],"x":[34654,34689,34696,38755,38835,38862,38867,38887,38904,38909,38932,38939,38946,38953,38960,38967,38974,38981,39000,39005,39010,39015,39020,39025,39030,39035,39052,39057,39062,39067,39072,39077,39082,39087]},{"a":101,"l":"copy_dst_hi","c":"High byte of the copy destination at $64 ($8767, $976A, $97BA); the column copier adds and removes the extra page offset from $3A40 around its second copy ($9775-$9782).","t":"byte","b":[0],"x":[34663,38762,38773,38775,38780,38786,38842,38869,38873,38883,38913,38917,38990,39042]},{"a":102,"l":"smooth_action_or_quad4","c":"Action code for the landscape smoothing pass ($2B83, ORed at $2BBC) or the arc quadrant times 4 used when counting a sloping tile's faces ($2675, subtracted $2A6B).","t":"byte","b":[0],"x":[9845,10859,11139,11196]},{"a":103,"l":"sign_bits","c":"Sign flags for the maths routines: $0F70 stores the angle so that bit 7 gives the sign of the sine and bit 6 that of the cosine (tested $0F8C, $84A2); $0F9E flips bit 7 for each negative factor and $1005 applies it to the product; set by $1C7F.","t":"byte","b":[0],"x":[3956,3980,4015,4019,4027,4031,4101,7295,33954,34009]},{"a":104,"l":"mul_b_lo","c":"Low byte of the second factor of the 16x16 multiply at $0F9E, sign-magnitude with the sign in bit 0 ($0FB5); set by $1C8C.","t":"byte","b":[0],"x":[4021,4037,7308]},{"a":105,"l":"mul_b_hi","c":"High byte of the second factor of the 16x16 multiply ($0FD7, $0FED); set by $1C91.","t":"byte","b":[0],"x":[4055,4077,7313]},{"a":106,"l":"mul_a_lo","c":"Low byte of the first (two's complement) factor of the 16x16 multiply; negated in place at $0FA5-$0FA7, read $0FE9; set by $1C83.","t":"byte","b":[0],"x":[4005,4007,4073,7299]},{"a":107,"l":"mul_a_hi","c":"High byte of the first factor of the 16x16 multiply; its sign is tested at $0F9E, negated $0FAB-$0FAD, read $0FC1; set by $1C87.","t":"byte","b":[0],"x":[3998,4011,4013,4033,7303]},{"a":108,"l":"poly_x_two_bytes","c":"Flag telling the tile-shape code whether the polygon's pixel x coordinates need two bytes (bit 6); set $2D95/$2DCB, tested $2E3B. $6D after it is not referenced on the C64 (the BBC's scroll routine used it).","t":"byte","b":[0,0],"x":[11669,11723,11835]},{"a":110,"l":"viewer_obj","c":"Object number of whoever is looking: the player for the view and pans ($10B9, $2625), an enemy while it scans for targets ($16E3, $1773), the object on the title or game-over picture ($13F5, $8852); also a loop counter while enemies are placed ($1500-$156D). The C64-only precompute at $3700 reads it.","t":"byte","b":[0],"x":[4281,4317,5109,5376,5455,5485,5859,5887,6003,6271,6541,6922,6953,7389,7474,8130,8191,9765,10322,10526,13734,14080,14232,33800,33811,34068,34898]},{"a":111,"l":"obj_measured","c":"Number of the object whose screen angles $8401 works out (stored $8401, read $8428 and $85C1).","t":"byte","b":[0],"x":[33793,33832,34241]},{"a":112,"l":"tmp_p","c":"Scratch byte. Mostly the low byte of a store pointer ($70/$71) in the fill's unrolled loops at $2238-$2456; a work byte in $245B/$25C6-$2617; and in the C64 screen-matrix reset $9AAC the pointer that walks $7C00 in 240-byte steps.","t":"byte","b":[0],"x":[8760,8778,8783,8788,8793,8798,8803,8808,8813,9029,9159,9182,9186,9190,9194,9198,9202,9206,9210,9214,9218,9222,9226,9230,9234,9238,9242,9246,9250,9254,9258,9262,9266,9270,9274,9278,9282,9286,9290,9294,9298,9302,9356,9465,9670,9697,9725,9732,9736,9740,9744,9747,9751,39602,39611,39618,39623]},{"a":113,"l":"tmp_q","c":"Scratch byte, the high half of the pointer at $70 in the fill (set $223D/$234B/$23CD, stepped $227A) and in the matrix reset $9AB6-$9ACD; also read as a value in $245B-$25C4.","t":"byte","b":[0],"x":[8765,8826,9035,9165,9447,9676,9703,9719,9738,9753,39606,39625,39629]},{"a":114,"l":"tmp_r","c":"Scratch byte used by the fill ($22AA) and the visibility code ($24E2-$25C4); in the C64 visibility loop it is the low byte of a pointer compared through at $25A5.","t":"byte","b":[0],"x":[8919,8988,8993,9024,9062,9069,9074,9106,9116,9145,9153,9157,9637,9711,9756]},{"a":115,"l":"tmp_s","c":"Scratch byte: fill, visibility and gaze code ($1CDD, $22AA, $24E2-$25C4, $2C7C); the high byte of the pointer at $72 in the C64 visibility loop (set from $3C + $40 at $2548, updated $258C-$2590).","t":"byte","b":[0],"x":[7494,7540,7615,7622,8926,8995,8999,9031,9161,9544,9612,9616,9721,11395,11432,11457]},{"a":116,"l":"tmp_t","c":"Main scratch byte and the low half of most 16-bit results: (A $74) is the product of $0D03/$0F4A/$0F9E, the dividend of $0D4A, the angle given to $0E75/$0F3E/$0F70, the value $1007/$1009 negate. Used by about forty routines.","t":"byte","b":[8],"x":[3331,3335,3343,3351,3359,3367,3375,3383,3391,3399,3402,3413,3421,3425,3432,3443,3451,3455,3462,3473,3481,3485,3497,3509,3521,3533,3545,3557,3578,3604,3607,3643,3662,3686,3762,3764,3771,3777,3793,3807,3814,3902,3905,3929,3931,3958,4044,4062,4084,4093,4110,4112,5408,5555,6279,6299,6311,6323,6332,6341,6381,6433,6470,6480,7240,7275,7320,7328,7334,7338,7341,7344,7352,7359,7372,7380,7519,7544,7619,7651,7820,7864,7875,7879,7881,8388,8401,8420,8429,8655,8665,8748,8776,8786,8796,8806,8900,8908,8937,8945,9060,9067,9381,9414,9458,9505,9509,9514,9769,9776,9779,9782,9785,9794,9827,9853,10452,10460,10466,10511,10516,10695,10712,11070,11078,11428,11438,11451,11470,11488,11495,11501,11511,11682,11689,11692,11695,11701,11736,11747,11750,11753,11814,11820,12303,12328,12342,12357,12512,12540,12630,13013,13077,13117,13129,13150,13160,13360,13384,13399,13407,14378,14386,14392,14459,14464,33927,33950,33967,34044,34055,34371,34380,37585,37647,37775,37786,37788,39598,39631]},{"a":117,"l":"tmp_u","c":"Second scratch byte: the 8-bit factor of $0D03 and $0F4A, the high byte returned by $0F3E/$0F4A and $1009, a counter in $8643 (colours left to set, $864A/$8697) and a work byte in many other routines.","t":"byte","b":[0],"x":[3340,3348,3356,3364,3372,3380,3388,3396,3419,3427,3449,3457,3479,3487,3657,3660,3692,3713,3769,3800,3809,3823,3860,3912,3924,3935,4035,4075,4082,4089,4105,4116,5257,5265,5269,7187,7191,7194,7197,7203,7219,7223,7226,7229,7232,7242,7512,7548,7632,7646,7655,7791,7799,7804,7812,7817,8753,8781,8791,8801,8811,9412,9421,10497,10506,10536,11094,11312,11324,11332,11340,11342,11345,11417,11442,11464,11499,11527,11816,11818,12316,12326,12348,12553,12583,12643,12673,14230,14242,33943,33961,33974,33996,34053,34063,34378,34387,34455,37771,37784,37795]},{"a":118,"l":"tmp_v","c":"Scratch byte: high byte of the divisor for the arctangent at $0D4A (compared $0D4F-$0DE2), high byte of the 16-bit factor of $0F4A, and a work byte in the edge tracer and elsewhere.","t":"byte","b":[0],"x":[3407,3429,3437,3459,3467,3489,3493,3502,3506,3514,3518,3526,3530,3538,3542,3550,3554,3562,3566,3574,3753,3802,3908,3919,4049,4087,7505,7552,9350,9363,11406,11434,11444,11466,11479,11505,11520,11810,11831,11833,11847,11858,12318,12322,12514,12570,12654,37581,37643,37779]},{"a":119,"l":"tmp_w","c":"Scratch byte: low byte of the arctangent divisor ($0D57, $0D5F), holds the partial product in $0F4A ($0F4D/$0F56) and $0F9E ($0FCA-$0FE3).","t":"byte","b":[0],"x":[3415,3423,3445,3453,3475,3483,3917,3926,4042,4053,4065,4067,4091,7496,9370,9407,37591,37653]},{"a":120,"l":"tmp_g","c":"Scratch byte: collects two extra quotient bits for interpolation in $0D4A ($0DF1/$0DF8, tested $0E2C-$0E5F), the top byte of the 16x16 product ($0FDC-$1003) and a work byte in the gaze code.","t":"byte","b":[0],"x":[3569,3576,3602,3628,3650,3679,4060,4071,4097,4099,7581,7592,7617,7644]},{"a":121,"l":"platform_height_lo","c":"Fractional part of the height of a boulder or the Sentinel's tower found under the gaze: cleared $1D03, set by $1DF9, read $1D0E-$1D2E.","t":"byte","b":[0],"x":[7427,7438,7443,7452,7734,7776]},{"a":122,"l":"adj_side_lo","c":"Low byte of the first (adjacent) side given to the hypotenuse routines ($9287, $937F).","t":"byte","b":[0],"x":[37535,37554,37791]},{"a":123,"l":"adj_side_hi","c":"High byte of the adjacent side ($9287, $937F).","t":"byte","b":[0],"x":[37539,37558,37797]},{"a":124,"l":"hyp_lo","c":"Low byte of the hypotenuse (horizontal distance) worked out by $937F; read by $8401 and $933D, and by the C64 precompute at $37B8, which feeds it back as a side for the pitch angle.","t":"byte","b":[0],"x":[14264,33870,33888,37711,37793]},{"a":125,"l":"hyp_hi","c":"High byte of the hypotenuse from $937F; read by $8401, $8533, $933D and the C64 precompute at $37BC.","t":"byte","b":[0],"x":[14268,33868,33893,34102,37715,37799]},{"a":126,"l":"tangent","c":"Tangent (times 256) found by the arctangent at $0D4A and used as the table index there ($0E05 sets $FF, $0E20 stores it); also set at $9280 and read at $9382.","t":"byte","b":[0],"x":[3589,3616,37504,37762]},{"a":127,"l":"tile_onscreen_or_skip_poly","c":"Whether the tile being drawn lies on, partly on or off the screen, or whether the polygon being traced has any visible pixels (non-zero = skip it): $2D6C-$2EE4, $31A4, and the C64 tile loop at $38A8.","t":"byte","b":[0],"x":[10320,10575,10581,10585,11776,11964,11966,12138,12717,14504]},{"a":128,"l":"dx_lo","c":"Low byte of an x difference between two points: made by $85C4 and by the C64 precompute ($3719-$37B0), used by the hypotenuse and angle routines ($9287, $933D) and $283D, $1887, $209B.","t":"byte","b":[0],"x":[6370,6412,8372,10326,10344,10346,10534,14105,14121,14123,14240,14254,14256,34003,34061,34246,37521,37533,37548,37573,37579,37587,37631,37645,37701,37703]},{"a":129,"l":"dy_lo","c":"Low byte of a y (height) difference, made by $85F5 and read by $8401 and $1887.","t":"byte","b":[0],"x":[6368,6407,33875,33877,33882,33898,34300]},{"a":130,"l":"dz_lo","c":"Low byte of a z difference (made by $85C4, the C64 precompute $371B/$37BA), used with $80 by $9287 and $933D.","t":"byte","b":[0],"x":[10356,10370,10372,14107,14143,14145,14266,33969,33983,33985,34272,37519,37529,37552,37560,37569,37583,37635,37641,37649,37713]},{"a":131,"l":"dx_abs_hi","c":"Absolute value of the high byte of the x difference ($85C4, $3731/$37B6), compared at $9289.","t":"byte","b":[0],"x":[10352,14129,14262,34007,34268,37513,37537,37544,37633,37655,37709]},{"a":132,"l":"dy_hi","c":"High byte of the y difference, made at $8604 by $85F5 and read by $8401.","t":"byte","b":[0],"x":[6372,6414,33873,33886,33903,34308]},{"a":133,"l":"dz_abs_hi","c":"Absolute value of the high byte of the z difference ($85C4, $3747/$37BE), compared at $9287.","t":"byte","b":[0],"x":[10378,14151,14270,33991,34290,37511,37525,37556,37564,37571,37593,37717]},{"a":134,"l":"dx_hi_or_vec_x_hi","c":"Signed high byte of the x difference ($85C4, $3722/$37A7), or the high byte of the x part of a ray in the visibility tracer ($24E2-$2516).","t":"byte","b":[0],"x":[9479,9494,9602,10337,10350,14114,14127,14247,14260,34011,34259,34266,37598,37619,37660,37693,37707]},{"a":135,"l":"vec_y_hi","c":"High byte of the y part of a ray in the visibility tracer; read at $25A1 by the C64 version of that loop.","t":"byte","b":[0],"x":[9633]},{"a":136,"l":"dz_hi_or_vec_z_hi","c":"Signed high byte of the z difference ($85C4, $3738/$37C2), or the high byte of the z part of a ray in the visibility tracer. $89 after it is not referenced.","t":"byte","b":[0,0],"x":[9614,10363,10376,14136,14149,14274,33976,33989,34281,34288,37600,37662,37681,37721]},{"a":138,"l":"angle_lo","c":"Low byte of the 16-bit angle returned by the arctangent $0D4A and the hypotenuse-angle routine $9287; read by $8401, $8475, $933D, $1887, $209B and the C64 precompute, which stores it per square at $3771 and rescales it at $37CD-$37DF.","t":"byte","b":[0],"x":[3593,3621,3637,3664,3670,3683,3688,3698,6348,6377,8386,8418,10385,14193,14285,14288,14291,14294,14303,33813,33837,34018,37506,37607,37609,37669,37671,37726]},{"a":139,"l":"angle_hi","c":"High byte of that angle (a full turn is 256 in this byte): set by $0D4A/$9287, stored per square by the C64 precompute at $3775/$37C9. $8C after it is not referenced.","t":"byte","b":[0,0],"x":[3597,3626,3645,3672,3677,3690,3694,3696,6352,6383,8393,8425,10393,14197,14281,33821,33844,34027,37508,37613,37615,37626,37628,37675,37677,37688,37690,37733]},{"a":141,"l":"pitch_delta_hi","c":"High byte of a difference between two pitch angles (made in $933D, read $283D and $8475).","t":"byte","b":[0],"x":[10546,34075,37756]},{"a":142,"l":"sin_8bit","c":"Size of the sine of an angle, 8 bits, from the table at $AC80 via $0F70 (stored $0F92/$0F9B); signs in bits 7/6 of $67. Read by $8475.","t":"byte","b":[0],"x":[3986,3995,33998]},{"a":143,"l":"cos_8bit","c":"Size of the cosine of the same angle, 8 bits, from $AC80 via $0F70 (stored $0F94/$0F99); read by $8475.","t":"byte","b":[0],"x":[3988,3993,33945]},{"a":144,"l":"enemy_slot","c":"Number (0-7) of the enemy being handled in this turn of the main loop: read by the tactics code at $16B9-$1A5D to index the per-enemy tables at $0C20-$0CBF, and stepped once per turn: $16D9 counts it down and $16DD-$16DF wrap it from -1 back to 7. The BBC original kept this at $00, which is the 6510's own register on the C64.","t":"byte","b":[0],"x":[5817,5849,5855,5940,5981,6013,6023,6127,6137,6176,6214,6229,6539,6543,6626,6703,6736,6749,6776]},{"a":145,"l":"current_obj","c":"Number of the object being processed by the object routines: set at $187B, $1B06, $1BA1, $212C; read at $1A7D, $2163, $21A3 and $209B; the game-over code sets it to 1 at $87E5-$87E7. The BBC original kept this at $01, the 6510's port register on the C64.","t":"byte","b":[0],"x":[6267,6781,6918,7073,7109,8180,8347,8356,8492,8547,8611,34791]},{"a":146,"l":"col_offset_lo","c":"Low byte of column*8 (the byte offset of a character column within a row of the view's character data), made at $8745, $9750 and $97A2 and added to the row base from $3A00 to form the destination pointer at $64.","t":"byte","b":[0],"x":[34629,34652,38736,38753,38818,38833]},{"a":147,"l":"col_offset_hi","c":"High byte of column*8 (the carry, for columns 32-39): $874A, $9755, $97A7; added with the row base high byte from $3A20.","t":"byte","b":[0],"x":[34634,34661,38741,38760,38823,38840]},{"a":148,"l":"view_origin_col","c":"Screen column (0-39) where the view's left edge currently starts: the C64 scrolls sideways by moving this origin round a 40-column ring instead of copying the whole view. Reset to 0 by $1336 and $98B8, stepped by the pan scroller at $96AC-$96BE (wraps 0/39), read at $2039 and $9712.","t":"byte","b":[0],"x":[4931,8249,38572,38590,38674,39096]},{"a":149,"l":"view_origin_row","c":"Screen row (0-24) where the view's top currently starts, the vertical partner of $94: reset by $1345/$98BA, stepped by $96F2-$9704 (wraps 0/24), used by the interrupt set-up at $9597 to place the raster splits and by the dot plotter at $9477.","t":"byte","b":[0],"x":[4933,8259,38007,38295,38604,38642,38660,39098]},{"a":150,"l":"strip_col","c":"Screen column where the next strip of new picture is copied: origin plus the table at $990D for the pan direction, modulo 40 ($96C0-$96CA); also set at $2041/$207A for an object redraw and to 0 at $98B4. Used as column*8 by the copiers at $974B-$97F4 and by the dissolve at $8738.","t":"byte","b":[0],"x":[8257,8303,8314,34616,38602,38676,38731,38813,38852,38858,38894,38900,39092]},{"a":151,"l":"strip_row","c":"Screen row where the next strip goes, modulo 25 ($96CE, $9706-$9710), set at $2045 and $98B6, counted up by the full-screen copy at $98E0; indexes the row tables $3A00/$3A20/$3A40 ($9757, $97A9, $874F).","t":"byte","b":[0],"x":[8261,34639,38606,38672,38743,38825,39094,39120,39136,39138]},{"a":152,"l":"copy_rows_left","c":"Rows left in the column copy at $9730: set to 24 ($9759-$975B), counted down at $9798.","t":"byte","b":[0],"x":[38747,38808]},{"a":153,"l":"copy_dst2","c":"Second destination pointer ($99/$9A). For screen rows where the table at $3A40 gives a non-zero page offset, the copiers and the dissolve write every byte twice, to ($64) and to this pointer ($8788/$878A, $9814/$9816); $99 is a copy of $64's low byte ($8760, $97E9, $97FF).","t":"byte","b":[0],"x":[34656,34698,38889,38911,38934,38941,38948,38955,38962,38969,38976,38983]},{"a":154,"l":"copy_dst2_hi","c":"High byte of the second destination: the high byte at $65 plus the page offset from $3A40 for that row ($876D, $97E5, $980B).","t":"byte","b":[0],"x":[34669,38885,38923,38992]},{"a":155,"l":"sights_sprite_x","c":"Horizontal position of the sights in view pixels, the value the C64 turns into sprite 0's x (x*2+14, with bit 8 in $D010) at $99EE-$9A0A. A copy of $0CC6, made at $1359, $96ED and by the sights movers $9972/$9986.","t":"byte","b":[0],"x":[4953,38637,39282,39302,39406]},{"a":156,"l":"sights_sprite_y","c":"Vertical position of the sights, turned into sprite 0's y as $F9 minus it at $99E1-$99E6. A copy of $0CC7 made at $1360, $9728, $99A8, $99C2, $99D9.","t":"byte","b":[0],"x":[4960,38696,39336,39362,39385,39396]},{"a":157,"l":"dissolve_col","c":"Column (0 to buffer width-1) of the byte the dissolve at $86A5 copies next; a random walk: the random byte plus the old value, masked and wrapped ($86F5-$8703).","t":"byte","b":[0],"x":[34550,34563,34590,34613]},{"a":158,"l":"dissolve_row","c":"Character row (0-23) of the byte the dissolve copies next: 3/4 of a random 0-31 ($8712-$871B).","t":"byte","b":[0],"x":[34587,34636]},{"a":159,"l":"dissolve_line","c":"Pixel line pair (0-3) within the character for the dissolve; lines $9F and $9F+4 are copied ($8705-$870D, used $8723 and $8743). $A0 after it is not referenced.","t":"byte","b":[0,0],"x":[34573,34595,34627]},{"a":161,"l":"dot_dst2","c":"Second pointer ($A1/$A2) of the dot plotter at $945F: for rows with a non-zero page offset at $3A40 each dot is written to ($22) and again here ($94BC/$94BE); the low byte is copied from $22 at $949A.","t":"byte","b":[0],"x":[38042,38078]},{"a":162,"l":"dot_dst2_hi","c":"High byte of the dot plotter's second pointer: $23 plus the page offset from $3A40 ($94A3-$94A7).","t":"byte","b":[0],"x":[38055]},{"a":163,"l":"dissolve_rand_mid","c":"Middle byte of the dissolve's 24-bit random number (low byte at $87B0, high byte at $A4), multiplied by 5 on each step at $86C1-$86ED.","t":"byte","b":[0],"x":[34502,34531,34535,34544]},{"a":164,"l":"dissolve_rand_hi","c":"High byte of the dissolve's random number; after each step it gives the column offset ($86EF-$86FB).","t":"byte","b":[0],"x":[34506,34537,34541]},{"a":165,"l":"dissolve_rand_x4_lo","c":"Scratch for the dissolve's random step: low byte of the number times 4 ($86C4-$86DE).","t":"byte","b":[0],"x":[34500,34510,34516,34526]},{"a":166,"l":"dissolve_rand_x4_mid","c":"Scratch: middle byte of the random number times 4 ($86C8-$86E5).","t":"byte","b":[0],"x":[34504,34512,34518,34533]},{"a":167,"l":"dissolve_rand_x4_hi","c":"Scratch: high byte of the random number times 4 ($86CC-$86EB).","t":"byte","b":[0],"x":[34508,34514,34520,34539]},{"a":168,"l":"sq_yaw_lo_ptr","c":"Pointer ($A8/$A9, low byte always 0) to the C64's table of yaw angles (low bytes) from the viewer (normally the player) to every square, at $BC00-$BFFF, laid out like the landscape grid. Written through at $3773 by the precompute at $3700, read at $3851 by the drawing loop.","t":"byte","b":[0],"x":[14195,14417]},{"a":169,"l":"sq_yaw_lo_page","c":"Page of the yaw-low table: $BC + (column AND 3), set at $3763 and $3841; the three other table pages at $AB, $AD, $AF are this plus 4, 8 and 12.","t":"byte","b":[0],"x":[14179,14401]},{"a":170,"l":"sq_yaw_hi_ptr","c":"Pointer ($AA/$AB, low byte 0) to the C64's table of yaw angle high bytes per square at $C000-$C3FF ($3777 writes, $3859 reads).","t":"byte","b":[0],"x":[14199,14425]},{"a":171,"l":"sq_yaw_hi_page","c":"Page of the yaw-high table, $C0-$C3 ($3767, $3845).","t":"byte","b":[0],"x":[14183,14405]},{"a":172,"l":"sq_pitch_lo_ptr","c":"Pointer ($AC/$AD, low byte 0) to the table of pitch angles per square, low bytes, at $C400-$C7FF; the precompute stores the 16-bit angle divided by 16 ($37C9-$37DF), low byte through this pointer at $37E1; read at $3860.","t":"byte","b":[0],"x":[14305,14432]},{"a":173,"l":"sq_pitch_lo_page","c":"Page of the pitch-low table, $C4-$C7 ($376B, $3849).","t":"byte","b":[0],"x":[14187,14409]},{"a":174,"l":"sq_pitch_hi_ptr","c":"Pointer ($AE/$AF, low byte 0) to the table of pitch angle high bytes per square at $C800-$CBFF, sign-extended ($37DD writes, $3868 reads).","t":"byte","b":[0],"x":[14301,14440]},{"a":175,"l":"sq_pitch_hi_page","c":"Page of the pitch-high table, $C8-$CB ($376F, $384D).","t":"byte","b":[0],"x":[14191,14413]},{"a":176,"l":"view_pitch_lo16","c":"Low byte of the viewer's pitch rescaled to the precomputed tables' units (pitch*16 + 2, 16-bit), made by the C64 insert at $2627-$2644 at the start of each view; subtracted at $3863.","t":"byte","b":[0],"x":[9796,14435]},{"a":177,"l":"view_pitch_hi16","c":"High byte of the rescaled viewer pitch, sign-extended ($2640); subtracted at $386A.","t":"byte","b":[0],"x":[9792,14442]},{"a":178,"l":"view_yaw_minus_10","c":"Viewer's yaw minus 10, made at $2646-$264C; subtracted from each square's precomputed yaw at $385B, so the drawing loop gets yaws relative to the view.","t":"byte","b":[8],"x":[9804,14427]},{"a":179,"l":"zp_unused_b3","c":"$B3-$EF: no traced instruction names these bytes (the indexed zero-page accesses, such as $1DBF and $2507, use small indexes). They still hold the KERNAL's own work values from before the game took over (for example the screen line bytes $84-$87 at $D9-$EF) and are identical in work/entry.vsf and work/play-l0000.vsf. Whether the missing $B000-$B5FF code uses them is unknown.","t":"byte","b":[3,1,0,0,0,1,1,1]},{"a":187,"t":"byte","b":[1,1,1,0,100,38,0,192]},{"a":195,"t":"byte","b":[0,192,64,4,0,4,0,4]},{"a":203,"t":"byte","b":[64,5,2,32,0,0,0,4]},{"a":211,"t":"byte","b":[0,0,39,0,147,0,132,132]},{"a":219,"t":"byte","b":[132,132,132,132,132,133,133,133]},{"a":227,"t":"byte","b":[133,133,133,134,134,134,134,134]},{"a":235,"t":"byte","b":[134,134,135,135,135]},{"a":240,"l":"font_glyph_ptr","c":"Pointer ($F0/$F1) to a glyph of the BBC Micro font at $8000 + 8 * character: set by the C64 text printer at $8BDC-$8BEC and by the character-definition call (OSWORD 10 emulation) at $8D92-$8DA2; read through at $8C46/$8C68/$8DAC.","t":"byte","b":[0],"x":[35804,35808,35811,35814,35910,35944,36242,36246,36249,36252,36268]},{"a":241,"l":"font_glyph_page","c":"High byte of the glyph pointer: $80 + character/32 ($8BEC, $8DA2).","t":"byte","b":[129],"x":[35820,36258]},{"a":242,"l":"os_param_ptr","c":"Two uses in the C64's stand-in for the BBC system calls: the pointer ($F2/$F3) to the colour-matrix cell at $CC00 + cell that the text printer writes ($8C15/$8C21), and the parameter block address passed in X/Y to the OSWORD 10 emulation ($8D8C/$8D8A), whose 8 glyph bytes are copied there ($8DAE).","t":"byte","b":[92],"x":[35861,36236,36240,36260,36270]},{"a":243,"l":"os_param_ptr_hi","c":"High byte of the pointer at $F2 ($8C21 = $CC + row page; $8D8A from Y).","t":"byte","b":[207],"x":[35873,36234,36264]},{"a":244,"l":"text_bitmap_ptr","c":"Pointer ($F4/$F5) to the bitmap byte at $E000 + 8 * cell that the C64 text printer draws into ($8C3A/$8C35); written through with colour masks at $8CC1/$8CDE. Each 8-pixel row of a BBC glyph becomes two multicolour bytes: the high nibble goes into one cell, then $8C53-$8C5E move the pointer 8 bytes on to the next cell for the low nibble.","t":"byte","b":[232],"x":[35898,35907,35923,35928,36033,36062]},{"a":245,"l":"text_bitmap_page","c":"High byte of the text printer's bitmap pointer: $E0 + cell*8 / 256 ($8C35, $8C5A-$8C5E).","t":"byte","b":[250],"x":[35893,35930,35934]},{"a":246,"l":"sound_block_ptr","c":"Pointer ($F6/$F7) to the sound parameter block given in X/Y to the C64's OSWORD 7 emulation (make a sound): set $8DB4, read through at $8DBA-$8E7A to program the SID.","t":"byte","b":[235],"x":[36276,36282,36302,36311,36318,36330,36342,36389,36399,36408,36415,36428,36474]},{"a":247,"l":"sound_block_ptr_hi","c":"High byte of the sound parameter block pointer ($8DB6).","t":"byte","b":[0],"x":[36278]},{"a":248,"l":"zp_unused_f8","c":"$F8-$FF: not named by any traced instruction, directly or through an index, and unchanged between the hand-over and play snapshots.","t":"byte","b":[0,0,0,115,44,0,100,32]},{"a":256,"t":"gap","n":256,"x":[4459,4493,5316,5352,5833,5892,6291,6437,6565,6834,7022,7054,7150,7844,7932,7954,7997,8041,8482,8633,8692,8709,10487,11296,11302,14213]},{"a":256,"t":"note","l":"obj_flags","c":"Flags of the 64 object slots, $0100-$013F: bit 7 set = slot free; bit 6 set = the object stands on another, whose number is in bits 0-5. $118B sets all to $80; searched for a free slot at $2122; the reset loop at $116B clears $0100-$01BF. Game data kept in the stack page; the stack itself works down from $01FF.","note":"outside the tracked image","x":[4459,4493,5316,5352,5833,5892,6291,6437,6565,6834,7022,7054,7150,7844,7932,7954,7997,8041,8482,8633,8692,8709,10487,11296,11302,14213]},{"a":320,"t":"note","l":"obj_pitch","c":"Pitch (up/down angle) of each of the 64 objects, $0140-$017F: $F5 when placed ($1F7E); the player's changes by 4 per up/down pan ($10FF-$1145); read by the view set-up $262B, the sights code $9996 and $933D, $1C4C.","note":"outside the tracked image","x":[4351,4363,4396,4402,4414,4421,7244,8064,9771,37735,39318]},{"a":322,"t":"note","l":"a_0142","c":"obj_pitch entries 2-15: object 2 is the viewer of the title and game-over pictures, whose pitch $8839 sets from $8872+Y.","note":"outside the tracked image","x":[34873]},{"a":336,"t":"note","l":"a_0150","c":"obj_pitch entries 16-63: $13CB sets object 16's, the viewer of the title and preview views.","note":"outside the tracked image","x":[5067]},{"a":384,"t":"note","l":"row_visibility","c":"Work area $0180-$01BF shared by the landscape drawing: the visibility of the tile corners of two rows (from $0180 and $01A0) while rows are traced ($245B-$24BC), and the square data of the tiles in view ($283D, $29C7, $2A12, the C64 loop at $3871).","note":"outside the tracked image","x":[9395,9657,10477,10523,10745,10788,14449,14471]},{"a":385,"t":"note","l":"f_0181","c":"row_visibility+1: $24B6 ORs in the neighbouring corner of the first row (ORA $0181,X).","note":"outside the tracked image","x":[9398]},{"a":416,"t":"note","l":"f_01A0","c":"Second half of the corner-visibility area, $01A0-$01BF (the other row); read at $24B9.","note":"outside the tracked image","x":[9401]},{"a":417,"t":"note","l":"f_01A1","c":"$01A0 entry plus one: $24BC ORs in the neighbouring corner of the second row.","note":"outside the tracked image","x":[9404]},{"a":512,"l":"random_bytes","c":"256 pseudo-random bytes, $0200-$02FF, made once at start-up: $3F96-$3FAF fill the seed register with ones, run it 256 times and store the next 256 results here. Only reader: the scanner static at $1670, whose operand low byte is stepped down by $166D (self-modifying), so it walks backwards through the table.","t":"byte","b":[124,243,103,58,119,1,225,84],"x":[5744,16299]},{"a":520,"t":"byte","b":[114,72,204,32,253,52,7,167]},{"a":528,"t":"byte","b":[26,61,173,233,0,103,186,159]},{"a":536,"t":"byte","b":[246,29,202,124,116,180,26,175]},{"a":544,"t":"byte","b":[11,29,148,221,165,129,28,43]},{"a":552,"t":"byte","b":[40,6,252,214,143,246,41,147]},{"a":560,"t":"byte","b":[122,191,188,177,194,40,97,70]},{"a":568,"t":"byte","b":[73,121,235,227,239,14,11,166]},{"a":576,"t":"byte","b":[30,201,53,245,155,236,248,247]},{"a":584,"t":"byte","b":[200,199,8,247,112,145,63,28]},{"a":592,"t":"byte","b":[102,225,83,68,70,10,239,105]},{"a":600,"t":"byte","b":[177,57,232,212,255,137,239,88]},{"a":608,"t":"byte","b":[226,88,195,218,156,42,213,16]},{"a":616,"t":"byte","b":[35,55,78,231,175,146,201,252]},{"a":624,"t":"byte","b":[198,250,203,134,84,101,61,161]},{"a":632,"t":"byte","b":[142,30,171,33,40,57,115,36]},{"a":640,"t":"byte","b":[222,182,61,254,123,18,52,126]},{"a":648,"t":"byte","b":[49,11,14,61,195,113,36,244]},{"a":656,"t":"byte","b":[2,189,232,255,248,101,110,51]},{"a":664,"t":"byte","b":[156,77,111,143,213,42,132,155]},{"a":672,"t":"byte","b":[219,38,211,83,205,231,95,91]},{"a":680,"t":"byte","b":[241,228,33,138,166,24,87,247]},{"a":688,"t":"byte","b":[167,207,90,183,164,9,129,79]},{"a":696,"t":"byte","b":[185,58,85,56,120,114,229,222]},{"a":704,"t":"byte","b":[44,127,47,82,28,116,221,10]},{"a":712,"t":"byte","b":[99,137,150,196,84,138,103,120]},{"a":720,"t":"byte","b":[165,187,187,135,189,199,128,23]},{"a":728,"t":"byte","b":[139,237,176,50,64,221,201,94]},{"a":736,"t":"byte","b":[89,145,184,175,69,151,153,109]},{"a":744,"t":"byte","b":[56,35,84,95,154,13,27,223]},{"a":752,"t":"byte","b":[215,224,44,34,234,133,228,212]},{"a":760,"t":"byte","b":[72,17,224,171,237,151,61,229]},{"a":768,"l":"system_vectors_unused","c":"$0300-$03FF, the BASIC and KERNAL vector page, left as the system had it ($0314/$0315 still hold $EA31, the KERNAL's interrupt entry) and not used by the game: the KERNAL is banked out ($01 = $35) and the game sets its own vectors at $FFFA-$FFFF ($8900). No traced instruction reaches this page (named, indexed or indirect) and it is identical in work/entry.vsf and work/play-l0000.vsf. $035C-$03FB hold spaces left by the loading environment.","t":"byte","b":[139,227,167,2,124,165,26,167]},{"a":776,"t":"byte","b":[228,167,134,174,0,0,0,0]},{"a":784,"t":"byte","b":[76,72,178,0,49,234,236,191]},{"a":792,"t":"byte","b":[193,254,74,243,145,242,14,242]},{"a":800,"t":"byte","b":[80,242,51,243,87,241,202,241]},{"a":808,"t":"byte","b":[237,246,62,241,47,243,102,254]},{"a":816,"t":"byte","b":[165,244,237,245,0,0,0,0]},{"a":824,"t":"byte","b":[0,0,0,0,255,255,0,0]},{"a":832,"t":"byte","b":[255,255,0,0,255,255,0,0]},{"a":840,"t":"byte","b":[255,255,0,0,191,255,93,0]},{"a":848,"t":"byte","b":[255,255,0,0,255,255,0,0]},{"a":856,"t":"byte","b":[255,255,0,0,32,32,32,32]},{"a":864,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":872,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":880,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":888,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":896,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":904,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":912,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":920,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":928,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":936,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":944,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":952,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":960,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":968,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":976,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":984,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":992,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":1000,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":1008,"t":"byte","b":[32,32,32,32,32,32,32,32]},{"a":1016,"t":"byte","b":[32,32,32,32,0,0,0,0]},{"a":1024,"t":"gap","n":1280},{"a":2304,"l":"obj_x","c":"Tile column (x, 0-31) of each of the 64 objects, $0900-$093F, indexed by object number: set when an object is placed ($1F18), read wherever positions are needed ($1986-$2625, $85C4, the C64 precompute at $3702); cleared by the reset at $1157.","t":"byte","b":[0],"x":[4439,6581,6585,6850,7478,7903,7919,7960,8582,9866,9887,9900,9924,14082,34249,34252]},{"a":2305,"l":"a_0901","c":"obj_x entry 1: on the title and game-over pictures object 1 is the object shown, and $8830-$8833 give it the viewer's column.","t":"byte","b":[0],"x":[34867]},{"a":2306,"l":"a_0902","c":"obj_x entries 2-15. Object 2 is the viewer of the title and game-over pictures; $8830 copies its column to object 1.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[34864]},{"a":2314,"t":"byte","b":[0,0,0,0,0,0]},{"a":2320,"l":"a_0910","c":"obj_x entries 16-62: $13D1 puts object 16, the viewer of the title and preview views, in its column.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[5073]},{"a":2328,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2336,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2344,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2352,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2360,"t":"byte","b":[0,0,0,0,0,0,0]},{"a":2367,"l":"a_093F","c":"obj_x entry 63: slot 63 is the object used to draw the blocks of the title's 3D lettering; $2A03-$2A05 put it in the column of the tile being drawn before $8533 draws it.","t":"byte","b":[0],"x":[10757]},{"a":2368,"l":"obj_y_hi","c":"Height of each object, whole units, $0940-$097F (the fraction is in $0A00): written only at $1F76 when an object is placed (on the ground or on top of another), read by the drawing, gaze and delta code ($1DF9, $245B, $283D, $85F5, the C64 precompute at $378C/$37A4).","t":"byte","b":[0],"x":[7736,7778,7793,7851,7908,7943,8029,8054,8541,8657,8660,9347,10494,10538,14220,14244,34302,34305]},{"a":2369,"l":"a_0941","c":"obj_y_hi entry 1: $8826-$882D put the displayed object at the viewer's height plus the offset at $8875+Y.","t":"byte","b":[0],"x":[34861]},{"a":2370,"l":"a_0942","c":"obj_y_hi entries 2-15; object 2's height is read at $8826 for the picture layout.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[34854]},{"a":2378,"t":"byte","b":[0,0,0,0,0,0]},{"a":2384,"l":"a_0950","c":"obj_y_hi entries 16-62: $13C5 sets the height of object 16, the title and preview viewer.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[5061]},{"a":2392,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2400,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2408,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2416,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2424,"t":"byte","b":[0,0,0,0,0,0,0]},{"a":2431,"l":"a_097F","c":"obj_y_hi entry 63: $3291 sets the 3D-lettering block object's height to 2 when the title is drawn.","t":"byte","b":[0],"x":[12945]},{"a":2432,"l":"obj_z","c":"Tile row (z, 0-31) of each object, $0980-$09BF: set with obj_x when an object is placed ($1F1D), read with it everywhere positions are compared (the C64 precompute reads the viewer's at $3707).","t":"byte","b":[0],"x":[6599,6603,6855,7485,7913,7924,7965,8590,9871,9882,9908,9916,14087,34275,34278]},{"a":2433,"l":"a_0981","c":"obj_z entry 1: $8820-$8823 put the displayed object at the viewer's row plus the offset at $8855+Y.","t":"byte","b":[0],"x":[34851]},{"a":2434,"l":"a_0982","c":"obj_z entries 2-15: object 2's row, read at $8820.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[34848]},{"a":2442,"t":"byte","b":[0,0,0,0,0,0]},{"a":2448,"l":"a_0990","c":"obj_z entries 16-62: $13D7 sets the row of object 16, the title and preview viewer.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[5079]},{"a":2456,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2464,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2472,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2480,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2488,"t":"byte","b":[0,0,0,0,0,0,0]},{"a":2495,"l":"a_09BF","c":"obj_z entry 63: $2A08-$2A0A put the 3D-lettering block object in the row of the tile being drawn.","t":"byte","b":[0],"x":[10762]},{"a":2496,"l":"obj_yaw","c":"Yaw (compass direction, 256 to a turn) each object faces, $09C0-$09FF: set when placed, turned by pans ($10BF-$10FB), U-turns ($1B34-$1B39) and the enemies' turning; read by the view set-up ($2646, $2656) and the object code. The reset loop clears only up to $09EF.","t":"byte","b":[0],"x":[4287,4294,4325,4331,4340,4347,5482,5949,5956,6153,6160,6964,6969,7138,7143,7205,8075,8146,8155,8200,9798,9814,33823,33841]},{"a":2497,"l":"a_09C1","c":"obj_yaw entry 1: the displayed object's direction on the picture, from $8878+Y ($884D).","t":"byte","b":[0],"x":[34893]},{"a":2498,"l":"a_09C2","c":"obj_yaw entries 2-15: $883F sets the picture viewer's direction from $887B+Y.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[34879]},{"a":2506,"t":"byte","b":[0,0,0,0,0,0]},{"a":2512,"l":"a_09D0","c":"obj_yaw entries 16-62: $13DD sets the direction of object 16, the title and preview viewer.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[5085]},{"a":2520,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2528,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2536,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2544,"t":"byte","b":[102,0,255,25,38,153,102,154]},{"a":2552,"t":"byte","b":[106,0,255,141,69,135,141]},{"a":2559,"l":"a_09FF","c":"obj_yaw entry 63: $3285-$3287 turn the 3D-lettering block object to $80 (facing the other way).","t":"byte","b":[128],"x":[12935]},{"a":2560,"l":"obj_y_lo","c":"Fraction of each object's height (1/256 units), $0A00-$0A3F, the low byte to obj_y_hi at $0940; set by placing and stacking, read by $1DF9, $283D and $85F5 and by the C64 precompute ($379D).","t":"byte","b":[0],"x":[4442,7728,7770,7785,7898,8007,8010,8018,8024,8046,8648,8652,10531,14237,34293,34297]},{"a":2561,"l":"a_0A01","c":"obj_y_lo entry 1: cleared for the displayed object at $8847.","t":"byte","b":[0],"x":[34887]},{"a":2562,"l":"a_0A02","c":"obj_y_lo entries 2-62: $8844 clears the picture viewer's fraction.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[34884]},{"a":2570,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2578,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2586,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2594,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2602,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2610,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2618,"t":"byte","b":[0,0,0,0,0]},{"a":2623,"l":"a_0A3F","c":"obj_y_lo entry 63: $E0 for the 3D-lettering block object ($328C).","t":"byte","b":[0],"x":[12940]},{"a":2624,"l":"obj_type","c":"Type of each object, $0A40-$0A7F: 0 robot (the player's is made at $1450-$1452), 1 sentry ($1502), 2 tree ($176B, $1A49), 3 boulder, 4 meanie ($19EE), 5 the Sentinel (object 0, $155B), 6 its tower, 7-9 the halves of the title's 3D letter blocks. Written when objects are made ($2131, $1504, $155D) or change type ($176D, $19F0, $1A4B); read all through the enemy and object code ($16BB-$16C4 pick out types 1 and 5, the enemies).","t":"byte","b":[0],"x":[5380,5469,5819,5997,6296,6442,6570,6640,6698,6731,6843,6872,7012,7036,7059,7131,7155,7702,7759,7833,7983,8000,8358,8497,8502,8669,33795]},{"a":2625,"l":"a_0A41","c":"obj_type entries 1-62: $8819 sets the type of object 1, the object shown on the title or game-over picture, from A.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[34841]},{"a":2633,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2641,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2649,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2657,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2665,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2673,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2681,"t":"byte","b":[0,0,0,0,0,0]},{"a":2687,"l":"a_0A7F","c":"obj_type entry 63: $29FC-$29FE set it from the low nibble of the tile data (7-9 for the lettering blocks, 0 for none).","t":"byte","b":[0],"x":[10750]},{"a":2688,"l":"draw_pitch_lo","c":"Low byte of the screen pitch of each point being drawn, $0A80-$0ADF, 96 entries: 0-31 and 32-63 the tile corners of two landscape rows (the half chosen by $05), 64-95 the points of an object. Written by $2939, the C64 tile loop ($3865) and the object point code ($8522); read by the tile-shape code ($2E11-$309C).","t":"byte","b":[0],"x":[10152,10553,11793,11797,11882,11892,11937,12376,12444,14437,34082]},{"a":2689,"l":"f_0A81","c":"draw_pitch_lo from entry 1 on: $27A8-$27AB copy an entry into the next one at the end of a row.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[10155]},{"a":2697,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2705,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2713,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2721,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2729,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2737,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2745,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2753,"t":"gap","n":31},{"a":2784,"l":"draw_pitch_hi","c":"High byte of the screen pitch of each point being drawn, $0AE0-$0B3F, the same 96 entries as $0A80: $851D for object points, $386C in the C64 tile loop; read $2E1D-$30A1.","t":"byte","b":[0],"x":[10142,10548,11802,11805,11877,11887,11932,12371,12449,14444,34077]},{"a":2785,"l":"f_0AE1","c":"draw_pitch_hi from entry 1: $27A5 copies an entry into the next one.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[10149]},{"a":2793,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2801,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2809,"t":"byte","b":[0,0,0,0,0,0,0]},{"a":2816,"l":"f_0B00","c":"draw_pitch_hi entry 32, the first of the second tile row: $27B4-$27B6 store $FF.","t":"byte","b":[0],"x":[10166]},{"a":2817,"l":"f_0B01","c":"draw_pitch_hi entries 33-95: $27B9 stores $FF in the entry after the one at $27B6.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[10169]},{"a":2825,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2833,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2841,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2849,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2857,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2865,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":2873,"t":"byte","b":[0,0,0,0,0,170,170]},{"a":2880,"l":"draw_x_hi","c":"High byte of the screen x of each point being drawn, $0B40-$0B9F, 96 entries matching $0A80; made and read by the tile-shape code ($2D6C-$3017).","t":"byte","b":[170,170,106,0,0,154,170,169],"x":[11712,11839,11842,11864,11867,12305,12308,12366,12459]},{"a":2888,"t":"byte","b":[102,169,102,0,0,153,102,153]},{"a":2896,"t":"byte","b":[102,149,101,0,0,153]},{"a":2902,"l":"f_0B56","c":"draw_x_hi entries 22-85. The instruction that makes this symbol, LDA $0B56,X at $254F, is a disguise: X is $FF there, so it reads $0C55, the stash offset.","t":"byte","b":[101,85,85,85,149,0,0,149],"x":[9551]},{"a":2910,"t":"byte","b":[85,87,85,87,221,0,0,85]},{"a":2918,"t":"byte","b":[85,119,221,119,93,0,0,85]},{"a":2926,"t":"byte","b":[85,119,93,119,221,0,0,85]},{"a":2934,"t":"byte","b":[85,117,93,119,221,0,0,89]},{"a":2942,"t":"byte","b":[86,85,213,119,221,0,0,166]},{"a":2950,"t":"byte","b":[106,102,89,85,85,0,0,170]},{"a":2958,"t":"byte","b":[106,169,154,86,102,0,0,168]},{"a":2966,"t":"gap","n":10},{"a":2976,"l":"draw_yaw_lo","c":"Low byte of the screen yaw of each point being drawn, $0BA0-$0BFF, the same 96 entries; the high bytes are at $A800. Written by the row code ($2896) and the C64 tile loop ($3856); read at $2945, $2D9C, $2DD2.","t":"byte","b":[4,157,53,194,87,235,116,5],"x":[10390,10565,11676,11730,14422,14485,34024]},{"a":2984,"t":"byte","b":[149,26,167]},{"a":2987,"l":"f_0BAB","c":"draw_yaw_lo entries 11-74. LDY $0BAB,X at $14AC is a disguised read of $0C55 (X = $AA), not of this table.","t":"byte","b":[41,179,60,187,64,195,61,190],"x":[5292]},{"a":2995,"t":"byte","b":[60,177,45,159,24,143,253,112]},{"a":3003,"t":"byte","b":[226,76,186,32,140,43,195,90]},{"a":3011,"t":"byte","b":[240,133,25,171,59,194,80,220]},{"a":3019,"t":"byte","b":[103,240,119,253,130,252,126,253]},{"a":3027,"t":"byte","b":[123,247,114,235,98,209,69,184]},{"a":3035,"t":"byte","b":[41,152,5,113,220,187,126,96]},{"a":3043,"t":"byte","b":[157,187,126,96,157,78,45,88]},{"a":3051,"t":"gap","n":21},{"a":3072,"l":"sin16_lo","c":"Low byte of the 16-bit sine made by $0E75 (stored through $0C00,X with X=0 at $0EC5/$0EEA/$0EF5); bit 0 is the sign, set at $0F20-$0F23 when the sine is negative. Read by the vector code as $0C00,Y at $1C89 and $1C9D. The reset loop at $1174 also starts its $0C00-$0CEF sweep here.","t":"byte","b":[0],"x":[3781,3818,3829,3872,3875,4468,7305,7325]},{"a":3073,"l":"cos16_lo","c":"Low byte of the 16-bit cosine made by $0E75 (the X=1 slot of $0C00,X); bit 0 is its sign, set at $0F31-$0F34.","t":"byte","b":[0],"x":[3889,3892]},{"a":3074,"l":"sin16_hi","c":"High bytes of the 16-bit sine ($0C02) and cosine ($0C03), stored as $0C02,X by $0E75 at $0EBE/$0EFA and read as $0C02,Y at $1C8E/$1CA2.","t":"byte","b":[0,0],"x":[3774,3834,7310,7330]},{"a":3076,"l":"scanner_request","c":"Scanner state to show next: 0 off, 4 static, 8 solid. $1635 redraws the scanner on every call while this is non-zero (fresh static each time, and it becomes $0C09) and once more when it drops to 0. Stored from Y by the energy-drain code at $194D; cleared at $359E when a landscape starts.","t":"byte","b":[0],"x":[5685,6477,13726]},{"a":3077,"l":"icon_column","c":"Next column (0-39) of the top screen row where $9579 puts an energy icon: cleared at $950A, used as the index into the screen matrix at $7C00 ($957A) and stepped at $9583; $9556/$9567 stop the icon loops at columns 29 and 38. On the C64 the icons are characters $F0-$F9 in that row.","t":"byte","b":[0],"x":[38154,38230,38247,38266,38275]},{"a":3078,"l":"lowest_enemy_height","c":"Height of the lowest enemy on the landscape, stored at $1598 when enemies are placed and used as the height limit for placing the player ($146F), new trees ($149E) and trees an enemy makes with spare energy ($1A6A).","t":"byte","b":[0],"x":[5231,5278,5528,6762]},{"a":3079,"l":"enemy_limit","c":"Most enemies the landscape may have: 1 + (landscape number / 10), at most 8, worked out by $33ED-$3410 from the BCD landscape number; read by $1420-$1431 when the enemies are chosen.","t":"byte","b":[1],"x":[5164,5169,13328]},{"a":3080,"l":"height_scale","c":"Multiplier for the landscape's heights, which sets how rugged it is: $18 for landscape 0000, otherwise $0E plus a value from $3451 ($2AD7-$2AE6); applied at $2B58.","t":"byte","b":[0],"x":[10982,11096]},{"a":3081,"l":"scanner_state","c":"Scanner state last drawn by $1635: 0 off (sprites 1-3 hidden), 4 static, 8 solid; also copied to $16A0 as the offset into the scanner patterns at $16A1. Written $163F, compared $163A.","t":"byte","b":[0],"x":[5690,5695,5701]},{"a":3082,"l":"player_energy","c":"The player's energy in units (tree 1, boulder 2, robot 3): set at $1459 when the player is placed, changed by the drain code ($1A0F-$1A17) and by absorbing and creating ($2139-$214A); read by $3464 to print it and by $9510 to draw the icons. The byte after it, $0C0B, is not referenced.","t":"byte","b":[0,0],"x":[5209,6671,6679,8505,8522,13412,38160]},{"a":3084,"l":"sincos_angle_hi","c":"High byte of the angle given to $0E75, kept for the quadrant tests: stored $0E75, bit 6 tested at $0E8C to swap sine and cosine, bits 7 and 6 at $0F19-$0F2A for the signs.","t":"byte","b":[0],"x":[3701,3724,3865,3878,3882]},{"a":3085,"l":"tactics_sp","c":"Stack pointer saved at $16B6 when the enemy tactics code starts, so that $1AF9-$1AFD can abandon the tactics from any depth: TXS, then on at $16D6 with the next enemy.","t":"byte","b":[0],"x":[5814,6905]},{"a":3086,"l":"meanie_turn_step","c":"Yaw step used when a meanie turns to look for the player, stored at $1731 and added at $1741.","t":"byte","b":[0],"x":[5937,5953]},{"a":3087,"l":"text_shadow_off","c":"Bit 7 set: $AA44 prints characters plainly; clear: with the drop shadow. $3339-$333A set it before the input buffer is printed and $3353 clears it afterwards.","t":"byte","b":[84],"x":[13114,13139,43588]},{"a":3088,"l":"glyph_block","c":"Nine-byte parameter block $0C10-$0C18 for the character-definition request (OSWORD 10 through $FFF1, emulated at $8D81): byte 0 is the character code (stored $3205), bytes 1-8 receive its eight rows from the font at $8000. The 3D title-digit printer then shifts the rows out bit by bit ($323A, $3246, $324A; $326A).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[12805,12858,12870,12874,12906]},{"a":3096,"t":"byte","b":[0]},{"a":3097,"l":"sentinel_x","c":"Tile column of the Sentinel, stored at $1558 when the enemies are placed; $2189 compares it on hyperspace (to see whether the player is on the Sentinel's square).","t":"byte","b":[0],"x":[5464,8585]},{"a":3098,"l":"sentinel_z","c":"Tile row of the Sentinel, stored at $1553; compared at $2191.","t":"byte","b":[0],"x":[5459,8593]},{"a":3099,"l":"pan_abort_check","c":"Bit 7 set while a pan strip is drawn without the sights ($3657, cleared $365D): the view drawer tests it at $2760 and gives up the strip as soon as the pan key is released.","t":"byte","b":[0],"x":[10080,13911,13917]},{"a":3100,"l":"picture_obj_type","c":"Object type shown in the title and game-over pictures: $13AB sets it for the title, and during play the enemy code records the type of the enemy acting against the player ($16C6: 1 sentry or 5 Sentinel; $1722: 4 meanie; $1B24: 0). $87DA reads it so that the game-over picture shows the enemy that did it; $13E7 reads it on the title.","t":"byte","b":[0],"x":[5035,5095,5830,5922,6948,34778]},{"a":3101,"l":"last_pan_logged","c":"Key-logger value of the latest pan key (0 right, 1 left, 2 up, 3 down), stored at $1211 and compared by $1223 with the current keys.","t":"byte","b":[0],"x":[4625,4649]},{"a":3102,"l":"no_dissolve","c":"Bit 7 set: redraw objects at once instead of dissolving them in. Set with $0CE4 at $1219, cleared at $12F6, $1F9B, $364E and $87F1; the C64 dissolve at $8797 stops early when it is set.","t":"byte","b":[0],"x":[4633,4854,8091,13902,34711,34801]},{"a":3103,"l":"same_pan_held","c":"Bit 7 set when the pan key used for the last pan is still held after the scroll finished: cleared at $128E, set at $129C from $1223; tested at $1B01.","t":"byte","b":[0],"x":[4750,4764,6913]},{"a":3104,"l":"enemy_drain_timer","c":"Eight bytes, one per enemy: countdown before the enemy may drain energy again. $1317 counts all 24 bytes of $0C20-$0C37 down (stopping at 1) on every third call, and on the C64 those calls pass through the extra divider at $130C, which lets only about four in five through. The tactics code sets them ($175A-$1869, $1A33) and tests them ($1795, $182E, $193C).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[4894,4901,5978,6037,6057,6114,6190,6199,6249,6460,6707]},{"a":3112,"l":"enemy_turn_timer","c":"Eight bytes, one per enemy: countdown to the enemy's next turn, counted down with the other timers by $131E; tested $17FB, reloaded $1815.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[6139,6165]},{"a":3120,"l":"enemy_tactic_timer","c":"Eight bytes, one per enemy: countdown to the next time tactics are applied to that enemy, set when enemies are placed ($157D) and by the tactics code ($16EF-$1870). The eight bytes after it, $0C38-$0C3F, are not referenced (the timer loop at $131C stops at $0C37).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[5501,5862,5871,5961,6131,6218,6256]},{"a":3128,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":3136,"l":"face_point_0","c":"First entry of the point list of the tile face being drawn (up to five corner numbers at $0C40-$0C44), written by the tile-shape code at $2D54/$2D76 and read through the pointer at $3C.","t":"byte","b":[0],"x":[11604,11638]},{"a":3137,"l":"face_point_1","c":"Second corner number of the tile face being drawn ($2D5C/$2D7E).","t":"byte","b":[0],"x":[11612,11646]},{"a":3138,"l":"face_point_2","c":"Third corner number of the tile face being drawn ($2D65/$2D84).","t":"byte","b":[0],"x":[11621,11652]},{"a":3139,"l":"face_point_3","c":"Fourth corner number of the tile face being drawn ($2D57/$2D89).","t":"byte","b":[0],"x":[11607,11657]},{"a":3140,"l":"face_point_4","c":"Fifth entry of the tile face's point list, written only at $2D79. $0C45-$0C46 after it are not referenced.","t":"byte","b":[0,0,0],"x":[11641]},{"a":3143,"l":"obj_draw_pass","c":"Bit 7 tells the object drawer which of the two passes it is on for objects drawn in two phases ($8548, flipped $8582, $85B1).","t":"byte","b":[0],"x":[34120,34178,34225]},{"a":3144,"l":"prev_row_left_tile","c":"Leftmost tile found for the previous landscape row, reused as the starting guess for the next row ($26CD, $26DB).","t":"byte","b":[0],"x":[9933,9947]},{"a":3145,"l":"digit3d_x","c":"Tile column where the next big 3D digit of the secret code is built on the landscape ($3213, $323D-$3275).","t":"byte","b":[0],"x":[12819,12861,12911,12917]},{"a":3146,"l":"digit3d_z","c":"Tile row of the 3D digit being built ($3217, $3228).","t":"byte","b":[0],"x":[12823,12840]},{"a":3147,"l":"drawing_title","c":"Bit 7 set while the title picture is drawn ($3295 ROR, $32C1 LSR); tested by the tile drawer at $2A1F.","t":"byte","b":[0],"x":[10783,12949,12993]},{"a":3148,"l":"backdrop_kind","c":"How the view's background is filled: $2211 takes two alternating fill bytes from $2286+kind and $228A+kind: 0 = $00/$55 stripes (the sky in play), 1 = plain $00, 2 = $AA/$55, 3 = plain $55, to which $1090 adds stars. Set by the title and preview code ($13AE, $140F), hyperspace ($2175) and the game-over picture ($87E2); read $10A4, $2226.","t":"byte","b":[0],"x":[4260,5038,5135,8565,8742,34786]},{"a":3149,"l":"object_only_redraw","c":"Bit 7: redraw an object without the landscape behind it ($1FEF). Cleared at $1F98, set with $C0 by the game-over picture ($87EB). A C64 addition reads it in the play interrupt: while bit 7 is set it plots random dots over the view, 4 per band ($9623) and 12 per frame once the landscape is over ($9690, when $0C4E bit 7 is set), the game-over decay.","t":"byte","b":[0],"x":[8088,8175,10842,34795,38435,38544]},{"a":3150,"l":"landscape_over","c":"Bit 7 set when the landscape has ended: $1A00-$1A02 store $80 when the player's energy runs out, and $35E2-$35E7 copy $0CDE into it when a hyperspace ended the game. The gameplay loop shows the game-over picture when it is non-zero ($12A2); also tested by the object redraw ($204C, $2059), $3588 and the play interrupt ($9645).","t":"byte","b":[0],"x":[4770,6658,8268,8281,13704,13799,38469]},{"a":3151,"l":"player_tile_hidden","c":"$40 when an enemy scanning the player can see the robot but not its square ($1952); the C64 scanner at $168F then leaves the lower half of the scanner empty.","t":"byte","b":[0],"x":[5775,6482]},{"a":3152,"l":"timer_divider","c":"Divides the enemy timer updates: $1317 only counts the timers when it is 0 and then reloads it with 2, otherwise $1331 decrements it, so the timers move on every third call.","t":"byte","b":[0],"x":[4887,4909,4913]},{"a":3153,"l":"uturn_armed","c":"Bit 6 set means a U key press may start a U-turn: set to $40 by $11EA-$11EC whenever no pan or action key is down, cleared at $1281; the action code shifts it out at $1B2F so holding U turns only once; $35B5 reads it.","t":"byte","b":[0],"x":[4588,4737,6959,13749]},{"a":3154,"l":"landscape_nonzero","c":"Zero for landscape 0000, non-zero otherwise (the high BCD byte, or the low one when the high is 0): set by $33F9/$3400. Landscape 0000 skips the code question ($104D) and is handled specially at $1420, $145C and $2AD7.","t":"byte","b":[3],"x":[4173,5152,5212,10967,13305,13312]},{"a":3155,"l":"sincos_work_lo","c":"Low byte of the angle in radians inside $0E75 ($0E7E), turned into its complement at $0F06-$0F09 for the second pass; read $0EAE, $0ECE.","t":"byte","b":[0],"x":[3710,3738,3758,3790,3846,3849]},{"a":3156,"l":"sincos_work_hi","c":"High byte of the radians value in $0E75 ($0E83, complemented $0F0E-$0F11; read $0EB6, $0ED5).","t":"byte","b":[0],"x":[3715,3766,3797,3854,3857]},{"a":3157,"l":"stash_offset","c":"Offset of the landscape's secret-code stash on page $3F. Only reached through disguised indexed operands: written by $2A5A (STA $0C4D,X with X=8, from $0C7D by $2A57), read by $14AC (LDY $0BAB,X with X=$AA) for the loop whose STA $3F00,Y at $14C7 fills the stash, and by $254F (LDA $0B56,X with X=$FF), which adds 41 for the stash pointer in $0C/$0D. In work/play-l0000.vsf it is $8D and the 43 stash bytes sit at $3F8D-$3FB7, over the tail of the start-up code at $3F00.","t":"byte","b":[0]},{"a":3158,"l":"gaze_hits_target_sq","c":"Bit 7 set when the square being tested by $1DF9 holds the target object ($1E13); tested $1E90, cleared $1CDF, rotated $18F9.","t":"byte","b":[0],"x":[6393,7391,7699,7824]},{"a":3159,"l":"obj_rel_yaw_hi","c":"High byte of the yaw of the object being measured, relative to the viewer ($8425); read $170E/$172A, $18BE, $20C6/$20E6, $84ED.","t":"byte","b":[0],"x":[5902,5930,6334,8390,8422,33829,34029]},{"a":3160,"l":"drain_target","c":"Object number an enemy is draining or aiming at: stored $188C, $1AEA; read $191A, $1A08, compared by the gaze code at $1E0E.","t":"byte","b":[0],"x":[6284,6426,6664,6890,7694]},{"a":3161,"l":"obj_rel_yaw_lo","c":"Low byte of the object's yaw relative to the viewer ($841A); read $20BE/$20DE, $84E5. The next byte, $0C5A, is not referenced.","t":"byte","b":[0,0],"x":[8382,8414,33818,34021]},{"a":3163,"l":"obj_height_lo","c":"Low byte of the object's height relative to the viewer, the opposite side of the viewer-object triangle ($846C); read $850A, $8561.","t":"byte","b":[0],"x":[33900,34058,34145]},{"a":3164,"l":"obj_height_hi","c":"High byte of the relative height ($8471); read $8511, $855C.","t":"byte","b":[0],"x":[33905,34065,34140]},{"a":3165,"l":"obj_dist_lo","c":"Low byte of the object's horizontal distance from the viewer, the adjacent side ($8462); read $84AB.","t":"byte","b":[0],"x":[33890,33963]},{"a":3166,"l":"obj_dist_hi","c":"High byte of the horizontal distance ($8467); read $84B3.","t":"byte","b":[0],"x":[33895,33971]},{"a":3167,"l":"sights_on","c":"Bit 7 set while the sights are shown: toggled by SPACE at $11BA-$11BF, cleared at $359B and $87D7. With it set the pan keys move the sights ($11F1), action keys below $22 are allowed ($12D9), and the C64 scroller moves sprite 0 along with the view ($96D0, $9716).","t":"byte","b":[0],"x":[4538,4543,4593,4825,8328,13723,13905,34775,38608,38678]},{"a":3168,"l":"text_in_3d","c":"Bit 7 set: digits are printed as big 3D blocks on the landscape ($31FC); set at $33B9 for the secret code, cleared $33DD.","t":"byte","b":[0],"x":[12796,13241,13277]},{"a":3169,"l":"action_key","c":"Logger value of the action key being carried out, stored at $12DE: $1B1B treats $22 as hyperspace, $1B2B $23 as the U-turn, and $1B4E tests bit 5. $211D also stores here the type of an object about to be made, which $2131 copies into the type table at $0A40, so the create keys' logger values serve as object types.","t":"byte","b":[0],"x":[4830,6936,6987,7006,8477,8494]},{"a":3170,"l":"obj_left_col","c":"Column offset of the left edge of the object being redrawn, relative to the screen's left edge ($20D8, $20FA; $1FC4-$2012).","t":"byte","b":[0],"x":[8132,8203,8210,8408,8442]},{"a":3171,"l":"player_moved","c":"Bit 7 set when the player moved to another square or turned round: set to $80 at $1B87-$1B89 (transfer and U-turn) and at $21A9 (hyperspace); the gameplay loop shifts it out at $12B1/$1302 and returns.","t":"byte","b":[0],"x":[4785,4866,7049,8617]},{"a":3172,"l":"quit_request","c":"Bit 7 set when F1 was pressed ($11AB); the gameplay loop ($12B6) and $3580 then end the game.","t":"byte","b":[0],"x":[4523,4790,13696]},{"a":3173,"l":"code_check_bits","c":"Result bits of the secret-code comparison in $1450: each pass of the loop at $14BA-$14C0 rotates in whether a generated BCD byte equals the byte at $0C6F+X; X runs down from $AA (or $A5) to $80, so only the last comparisons meet the entered code at $0CF0-$0CF3 and the rest compare against bytes up to $0D19. Read at $14DC. $0C66 after it is not referenced.","t":"byte","b":[0,0],"x":[5312,5340]},{"a":3175,"l":"gaze_hits_boulder","c":"Bit 7 set when the square tested by $1DF9 holds a boulder ($1E57); cleared $1D05, read $1D29.","t":"byte","b":[0],"x":[7429,7465,7767]},{"a":3176,"l":"enemy_view_arc","c":"Width of the viewing arc of the enemy being handled ($16F4, $1988); compared at $18C7.","t":"byte","b":[0],"x":[5876,6328,6343,6536]},{"a":3177,"l":"redraw_width_cols","c":"Width in columns of the buffer used to redraw an object, at most 20 ($210B, clamped at $2105-$2109); read $1FE2-$2021.","t":"byte","b":[0],"x":[8162,8207,8217,8225,8459]},{"a":3178,"l":"obj_width_cols","c":"Width in columns of the visible part of the object being redrawn ($20FD, $201E); read $2015.","t":"byte","b":[0],"x":[8213,8222,8445]},{"a":3179,"l":"stack_count","c":"Counter over the objects in a stack while it is drawn ($21C1, $21EA, $21EF, $220B).","t":"byte","b":[0],"x":[8641,8682,8687,8715]},{"a":3180,"l":"stack_top_obj","c":"Object number at the top of the stack being drawn ($21B0; read $21E7, $21FF).","t":"byte","b":[0],"x":[8624,8679,8703]},{"a":3181,"l":"redraw_style","c":"How a changed object is put on screen by $1F9F: bit 6 dissolve it in ($2047), bit 7 take the sights off first (on the C64 by turning sprite 0 off, $1FA9-$1FB2). $C0 at $12F3 after an action and $87EE; 0 at $1F95; also $1878; read $1FA9, $2047.","t":"byte","b":[0],"x":[4851,6264,8085,8105,8263,34798]},{"a":3182,"l":"gaze_for_robot","c":"Bit 7 set while an enemy checks whether it can see a robot, so the gaze test also reports a robot it sees without seeing its square ($18DD, $1904, $1B40; read $1D26). $322F reads $0C6E+7 = $0C75 with X=7, not this byte.","t":"byte","b":[0],"x":[6365,6404,6976,7462,12847]},{"a":3183,"l":"enemy_count","c":"Number of enemies on this landscape, Sentinel included (1-8): $1434; read $143A, $1515/$158A; the tree count starts from 48 minus three per enemy ($147D-$1489). $14BA reads $0C6F+X with X from $AA down to $80, a secret-code loop, not this byte.","t":"byte","b":[0],"x":[5172,5178,5248,5251,5254,5306,5397,5514]},{"a":3184,"l":"chord_note_count","c":"Sound counter for one note of a chord in the music player ($34F5, $34FE).","t":"byte","b":[0],"x":[13557,13566]},{"a":3185,"l":"no_play_after_build","c":"Bit 7 set: build the landscape and its code without previewing or playing it; set to $80 at $219D on the hyperspace path, tested $14AF and $2C19, shifted out $14CE.","t":"byte","b":[0],"x":[5295,5326,8605,11289]},{"a":3186,"l":"paused","c":"Bit 7 set while the game is paused ($34C3 ROR, $34DA LSR); the play interrupt then only scans the pause keys ($964A).","t":"byte","b":[0],"x":[13507,13530,38474]},{"a":3187,"l":"sound_kind","c":"What the sound code is doing: 3 music ($8892-$8894), 6 the game-over sound ($35EA-$35EC, $87C4-$87C6); the drain code stores the scanner sound's value from Y at $195F after comparing it at $195B; read at $1955 and $3531.","t":"byte","b":[0],"x":[6485,6491,6495,13617,13804,13836,34758,34964]},{"a":3188,"l":"gameover_pitch","c":"Falling pitch of the game-over sound: $E6 at $87CB, decremented at $355A, read $3540.","t":"byte","b":[0],"x":[13632,13658,34763]},{"a":3189,"l":"tamper_seed","c":"Anti-tamper value made at $18B5 from the hidden landscape byte at $0F3D; $322D-$3232 read it (as $0C6E,X with X=7) and compare it with $0F3D. $2A57 reads $0C75+8 = $0C7D, not this byte.","t":"byte","b":[0],"x":[6325,10839]},{"a":3190,"l":"tree_blocks_view","c":"Set by the enemy gaze code when a tree is in the way: bit 7 for the target's square, bit 6 for the robot itself ($1901); read $17B7. $0C77 after it is not referenced.","t":"byte","b":[0,0],"x":[6071,6401]},{"a":3192,"l":"title_x_offset","c":"Horizontal offset added while drawing the title and preview pictures ($13F0, $140C), 0 in play; subtracted at $285E and $85D0. $0C79 is not referenced.","t":"byte","b":[0,0],"x":[5104,5132,10334,34256]},{"a":3194,"l":"edge_in_fill_colour","c":"Bit 7 set: polygon edges are drawn in the fill colour ($22E2); set and cleared by the object drawer ($853A, $85BE).","t":"byte","b":[0],"x":[8930,34106,34238]},{"a":3195,"l":"seed_reg_0","c":"Five-byte shift register $0C7B-$0C7F that generates the landscape's seed numbers ($31CA shifts eight bits per call and returns $0C7F). $0C7B takes the low BCD byte of the landscape number at $33F0; the start-up code fills all five with 1 at $3F96-$3F9E.","t":"byte","b":[3],"x":[12761,13296,16282]},{"a":3196,"l":"seed_reg_1","c":"Second byte of the seed register: the high BCD byte of the landscape number at $33ED; cleared with $0C7D-$0C7F at $360F.","t":"byte","b":[0],"x":[12764,13293,13839]},{"a":3197,"l":"seed_reg_2","c":"Third byte of the seed register: set to 1 by $1193 after the reset, feeds the register's feedback ($31CF), copied to $0C55 at $2A57.","t":"byte","b":[1],"x":[4499,12751,12767]},{"a":3198,"l":"seed_reg_3","c":"Fourth byte of the seed register ($31E2).","t":"byte","b":[0],"x":[12770]},{"a":3199,"l":"seed_reg_4","c":"Top byte of the seed register: the value each $31CA call returns ($31EE) and part of the feedback ($31D5).","t":"byte","b":[0],"x":[12757,12773,12782]},{"a":3200,"l":"enemy_meanie_scan","c":"Eight bytes, one per enemy: which object the enemy's search for a tree to turn into a meanie has reached ($1982, $1991, $19A1, $19FA).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[6029,6530,6545,6561,6650]},{"a":3208,"l":"enemy_energy","c":"Eight bytes, one per enemy: energy the enemy has drained and still has to spend by planting trees ($1A52/$1A58 add, $1A60/$1A7A spend).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[6738,6744,6752,6778]},{"a":3216,"l":"enemy_meanie_fail_obj","c":"Eight bytes, one per enemy: the target for which the enemy found no tree to turn into a meanie, so it does not search again ($1978, $199C; compared $17D2).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[6098,6520,6556]},{"a":3224,"l":"enemy_meanie_fail_count","c":"Eight bytes, one per enemy: failed meanie searches ($197D, $1996; read $1859).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[6233,6525,6550]},{"a":3232,"l":"enemy_meanie_obj","c":"Eight bytes, one per enemy: bit 7 clear when the enemy has made a meanie, with its object number in bits 0-6 ($19EB, $1768, $1975; read $16F7-$1873, $1BFF/$1C06).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[5879,5942,5983,5992,6259,6517,6635,7167,7174]},{"a":3240,"l":"enemy_target","c":"Eight bytes, one per enemy: object number of the enemy's current target ($1826; read $1701, $179A, $1935, $1999, $19B1).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[5889,6042,6182,6453,6553,6577]},{"a":3248,"l":"enemy_sees_target","c":"Eight bytes, one per enemy: bit 7 set when the enemy sees the target's square, bit 6 when it sees only the robot ($182B; read $1943).","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[6187,6467]},{"a":3256,"l":"enemy_drain_scan","c":"Eight bytes, one per enemy: bit 7 set to make the enemy look for something to drain on its next turn ($1862, $1792; read $177F). The byte after, $0CC0, is not referenced.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[6015,6034,6242]},{"a":3264,"t":"byte","b":[0]},{"a":3265,"l":"scroll_steps_left","c":"Scroll steps still to do in the current pan: loaded from $0CD1 at $3663; the play interrupt raises $0CD8 while it is non-zero ($964F-$9656); each step at $96A6 decrements it ($972A); $368F waits for 0.","t":"byte","b":[0],"x":[13923,13967,38479,38698]},{"a":3266,"l":"view_image_addr","c":"Address of the top-left of the view's image in the bitmap-layout area, $E140 on the C64 (set $1339/$133E); the star plotter adds it at $9415/$941D.","t":"byte","b":[0],"x":[4921,37909]},{"a":3267,"l":"view_image_addr_hi","c":"High byte of the view image address, $E1 ($133E, read $941D). $0CC4-$0CC5 after it are not referenced on the C64, whose sights are a sprite.","t":"byte","b":[0,0,0],"x":[4926,37917]},{"a":3270,"l":"sights_x","c":"Horizontal position of the sights in view pixels, $10-$8F: $50 when shown ($1354), moved by one per step at $996C-$9990; pushing past either edge wraps it by 64 and starts a pan. Copied to $9B for sprite 0; read by $1C10 to aim.","t":"byte","b":[0],"x":[4950,7184,38634,39276,39292,39296,39312]},{"a":3271,"l":"sights_y","c":"Vertical position of the sights, $20-$9F: $5F when shown ($135D), moved at $99A2-$99D2 (stops at the edge when the view is at a pitch limit); copied to $9C; read by $1C2D.","t":"byte","b":[0],"x":[4957,7213,38693,39330,39352,39356,39378,39382]},{"a":3272,"l":"sights_start_pace","c":"Bit pattern that makes the sights start moving slowly: $6B at $11E2 while no pan key is down, shifted left at $11F6 on each move call, and the sights only move when a 0 comes out.","t":"byte","b":[0],"x":[4578,4598]},{"a":3273,"l":"sights_saved_bytes","c":"Written as 0 at $3598 and $87D4 but not read by any traced C64 code: the BBC kept the count of screen bytes saved under its drawn sights here; the C64 sights are a sprite. $0CCA-$0CCD after it are not referenced either.","t":"byte","b":[0,0,0,0,0],"x":[13720,34772]},{"a":3278,"l":"skip_stash_check","c":"Bit 7 set: skip the stash test hidden in the visibility code ($254A); bit 7 is set at $2573.","t":"byte","b":[0],"x":[9546,9587]},{"a":3279,"l":"dissolve_mask","c":"Mask with the same number of leading zero bits as the buffer width minus 1, from the table at $15C4 ($86B6-$86B9); limits the random column at $86F8.","t":"byte","b":[0],"x":[34489,34552]},{"a":3280,"l":"dissolve_rand","c":"Random byte for one dissolve step ($86F2), supplying the line pair ($8706), the row ($870F) and the pixel mask index ($876F).","t":"byte","b":[0],"x":[34546,34566,34575,34671]},{"a":3281,"l":"pan_scroll_steps","c":"Number of scroll steps for the pan just drawn: cleared at $364B, set by $9929 (16 sideways, 8 up or down); copied to $0CC1 at $3660.","t":"byte","b":[0],"x":[13899,13920,39209]},{"a":3282,"l":"dissolve_batch","c":"Bytes left in one batch of the dissolve: 96 at $86BC-$86BE, counted down at $879C; after each batch the sound code runs ($87A1).","t":"byte","b":[0],"x":[34494,34716]},{"a":3283,"l":"dissolve_width_cols","c":"Width in columns of the buffer being dissolved in, copied at $86A5-$86A8 from $211B; the random column is wrapped by it ($86FB-$8700). The BBC used the width in bytes.","t":"byte","b":[0],"x":[34472,34555,34560]},{"a":3284,"l":"min_obj_width","c":"Minimum on-screen width used when working out how much of an object to redraw ($19F5, $1A46; read $20AC-$20B8). $0CD5-$0CD6 are not referenced.","t":"byte","b":[0,0,0],"x":[6645,6726,8364,8369,8376]},{"a":3287,"l":"hide_sights","c":"Bit 7 set: do not show the sights ($2063 ROR, $2085 LSR); the C64 sprite routine $99DC neither positions nor enables sprite 0 while it is set.","t":"byte","b":[0],"x":[8291,8325,39388]},{"a":3288,"l":"scroll_step_due","c":"C64 addition. Bit 7 is set by the play interrupt ($9654-$9656) whenever scroll steps are left in $0CC1; the pan loop at $3668 waits for it, does one step ($96A6 and the missing $B006) and clears it at $368C. While it is set the interrupt leaves the enemy timers and scanner to the pan loop ($965E). $0CD9-$0CDB are not referenced.","t":"byte","b":[0,0,0,0],"x":[13928,13964,38486,38494]},{"a":3292,"l":"prev_focus","c":"Copy of $0CE4 from the last key poll ($121F); the gameplay loop reads it at $1291 to see whether a pan key was being acted on.","t":"byte","b":[0],"x":[4639,4753]},{"a":3293,"l":"gaze_sees_tree","c":"Bit 7 set when the gaze being traced has met a tree ($1E96 ROR; $1CE2 LSR; $18FE ROL).","t":"byte","b":[0],"x":[6398,7394,7830]},{"a":3294,"l":"hyperspace_ended","c":"Bit 7 set when a hyperspace ended the landscape, bit 6 when it won it ($217A, $2198); read $245B, $35A8, $35E2.","t":"byte","b":[0],"x":[8570,8600,9307,13736,13794]},{"a":3295,"l":"sound_timer","c":"Frames left of the current sound: set by the sound and music code ($34AD, $3501, $3557, $3563, $3622), counted down once a frame by the play interrupt ($9630, held at 0 by $9635). $0CE0-$0CE3 after it are not referenced.","t":"byte","b":[0,0,0,0,0],"x":[13467,13485,13569,13612,13655,13667,13858,38448,38453]},{"a":3300,"l":"key_action_busy","c":"Bit 7 set while a key action (pan, absorb, create...) is being carried out: set by $1214, cleared at $127E; the play interrupt stops polling keys while it is set ($9669) and $347D skips the volume keys.","t":"byte","b":[128],"x":[4630,4636,4734,4745,13437,38505]},{"a":3301,"l":"enemies_asleep","c":"Bit 7 set until the player first acts: the gameplay loop clears it at $12E1 when an action key is used; while set the play interrupt does not run the enemy timers or scanner ($9659) and $367F skips them in the pan loop.","t":"byte","b":[128],"x":[4833,13951,38489]},{"a":3302,"l":"on_sentinel_tower","c":"6 when the player stands on the Sentinel's tower, anything else otherwise ($1B7F); used when the next secret code is made ($33C4-$33D7), where a wrong value spoils the code.","t":"byte","b":[128],"x":[7039,13252,13255,13271]},{"a":3303,"l":"music_pos","c":"Position in the music being played, bit 7 set when none plays ($888F, $34DE-$3518; read $35D8, $362D).","t":"byte","b":[128],"x":[13534,13539,13592,13784,13869,34959]},{"a":3304,"l":"keylog_pan_x","c":"Key logger entry 0: the sideways pan key (0 right, 1 left), bit 7 set for none. Filled by $1363 ($1367, $1380), read at $1201, $122C, $9965; the pause code sets it to $80 ($9687).","t":"byte","b":[128],"x":[4609,4652,4967,4992,4998,38535,39269]},{"a":3305,"l":"keylog_action","c":"Key logger entry 1: the action key (absorb, transfer, create, hyperspace, U-turn) as its logger value, bit 7 set for none; read at $11E5 and $12D0.","t":"byte","b":[128],"x":[4581,4816]},{"a":3306,"l":"keylog_pan_y","c":"Key logger entry 2: the vertical pan key (2 up, 3 down), bit 7 for none; read $1206, $1231, $1389, $9999.","t":"byte","b":[128],"x":[4614,4657,5001,39321]},{"a":3307,"l":"keylog_misc","c":"Key logger entry 3: the pause and volume keys, read by $3485 and $34BA/$34CE. $0CEC-$0CEF after it are set to $80 by the reset but not otherwise referenced.","t":"byte","b":[128,128,128,128,128],"x":[13445,13498,13518]},{"a":3312,"l":"input_buffer","c":"Eight-byte keyboard buffer for the landscape number and code, newest character at the low end ($32DE-$332F). $3357 packs it into BCD pairs, lowest pair first, at $0CF0-$0CF3; $1044-$1047 hand the landscape number to $33ED and $1057 puts landscape 0000's code here. Characters from $0CF4 are overwritten with $FF as they are packed ($337C-$337E).","t":"byte","b":[32],"x":[4167,4183,13022,13058,13093,13103,13120,13162,13172,13182]},{"a":3313,"l":"input_buffer_1","c":"Input buffer bytes 1-6 ($0CF1-$0CF6): $0CF1 gives the high BCD byte of the entered landscape number at $1044, and $32FF/$3328 move the buffer up a byte per key typed.","t":"byte","b":[32,32,32,32,32,32],"x":[4164,13055,13096]},{"a":3319,"l":"input_buffer_7","c":"Last byte of the input buffer: $330A-$330C put a space here when the buffer contents move up. $0CF8-$0CFB after it are not referenced ($2A $AA $A2 $00 in the image).","t":"byte","b":[32,42,170,162,0],"x":[13068]},{"a":3324,"l":"not_in_game","c":"Bit 7 set while no landscape is being played (title, preview): set by $114E and at start-up ($3F04); the play interrupt ($9640) only runs the game's timers and key polls when it is clear.","t":"byte","b":[240],"x":[4430,13690,16132,38464]},{"a":3325,"l":"landscape_lo","c":"Low BCD byte of the landscape number 0000-9999, set at $33F6; read $1A8C, $33E7, $35FA. The hand-over image holds $03 here and $00 at $0CFE: whoever froze the game had entered landscape 0003.","t":"byte","b":[3],"x":[6796,13287,13302,13818]},{"a":3326,"l":"landscape_hi","c":"High BCD byte of the landscape number ($33F3); read $1A90, $33E1, $3426, $35F7. The byte after it, $0CFF, is not referenced.","t":"byte","b":[0,34],"x":[6800,13281,13299,13350,13815]},{"a":3328,"l":"nmi_rti_unused","c":"An RTI and two zero bytes that nothing reaches: no traced instruction jumps or points a vector here, and the C64's NMI vector is set to $8F98 ($890B/$8910). In the BBC original the operating system sent NMIs to this address and the two bytes after it held a saved interrupt vector; the C64 build kept the RTI and left the two bytes zero.","t":"byte","b":[64,0,0]},{"a":3331,"l":"mul8_a_by_u","c":"Unsigned 8-bit multiply: A * $75, 16-bit result with the high byte in A and the low byte in $74. Shift-and-add unrolled eight times; X and Y untouched. Called by the sine/cosine code ($0EA3, $0EA6, $0F51), the 16x16 multiply ($0FC7-$0FEF), the gaze code ($1DD4), smoothing ($2B5B) and the object angle code ($849B, $84D0). Byte for byte the BBC routine.","t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t","x":[3747,3750,3921,4039,4057,4079,7636,11099,33947,34000]},{"a":3333,"l":"mul8_t_by_u","c":"Second entry into the multiply at $0D03 that skips its first STA: multiplies the value already in $74 by $75 (high byte in A, low in $74). Used only by $0F4A.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[3914]},{"a":3335,"t":"code","b":[70,116],"m":"lsr","oa":116,"o":"tmp_t"},{"a":3337,"t":"code","b":[144,3],"m":"bcc","oa":3342,"o":"b_0D0E"},{"a":3339,"t":"code","b":[24],"m":"clc"},{"a":3340,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":3342,"l":"b_0D0E","t":"code","b":[106],"m":"ror","o":"a","x":[3337]},{"a":3343,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3345,"t":"code","b":[144,3],"m":"bcc","oa":3350,"o":"b_0D16"},{"a":3347,"t":"code","b":[24],"m":"clc"},{"a":3348,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":3350,"l":"b_0D16","t":"code","b":[106],"m":"ror","o":"a","x":[3345]},{"a":3351,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3353,"t":"code","b":[144,3],"m":"bcc","oa":3358,"o":"b_0D1E"},{"a":3355,"t":"code","b":[24],"m":"clc"},{"a":3356,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":3358,"l":"b_0D1E","t":"code","b":[106],"m":"ror","o":"a","x":[3353]},{"a":3359,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3361,"t":"code","b":[144,3],"m":"bcc","oa":3366,"o":"b_0D26"},{"a":3363,"t":"code","b":[24],"m":"clc"},{"a":3364,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":3366,"l":"b_0D26","t":"code","b":[106],"m":"ror","o":"a","x":[3361]},{"a":3367,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3369,"t":"code","b":[144,3],"m":"bcc","oa":3374,"o":"b_0D2E"},{"a":3371,"t":"code","b":[24],"m":"clc"},{"a":3372,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":3374,"l":"b_0D2E","t":"code","b":[106],"m":"ror","o":"a","x":[3369]},{"a":3375,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3377,"t":"code","b":[144,3],"m":"bcc","oa":3382,"o":"b_0D36"},{"a":3379,"t":"code","b":[24],"m":"clc"},{"a":3380,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":3382,"l":"b_0D36","t":"code","b":[106],"m":"ror","o":"a","x":[3377]},{"a":3383,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3385,"t":"code","b":[144,3],"m":"bcc","oa":3390,"o":"b_0D3E"},{"a":3387,"t":"code","b":[24],"m":"clc"},{"a":3388,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":3390,"l":"b_0D3E","t":"code","b":[106],"m":"ror","o":"a","x":[3385]},{"a":3391,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3393,"t":"code","b":[144,3],"m":"bcc","oa":3398,"o":"b_0D46"},{"a":3395,"t":"code","b":[24],"m":"clc"},{"a":3396,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":3398,"l":"b_0D46","t":"code","b":[106],"m":"ror","o":"a","x":[3393]},{"a":3399,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3401,"t":"code","b":[96],"m":"rts"},{"a":3402,"l":"arctan_ratio","c":"Arctangent of a ratio: given a smaller unsigned 16-bit value in A (high) and $74 (low) and a larger one in $76/$77, divides them by shift-and-subtract to get the tangent times 256 in $7E, looks the angle up in the tables read as $3B00,Y (low bytes) and $3C01,Y (high bytes) (interpolating with two extra quotient bits kept in $78) and returns it in $8A/$8B, 16 bits to a full turn, so 0 to $2000 (45 degrees). A quotient that overflows (a ratio of 1) leaves through $0E03 with $7E = $FF and the angle $2000. Called from $92DB and $9319. Same bytes as the BBC routine.","t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t","x":[37595,37657]},{"a":3404,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3405,"t":"code","b":[176,12],"m":"bcs","oa":3419,"o":"b_0D5B"},{"a":3407,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3409,"t":"code","b":[144,21],"m":"bcc","oa":3432,"o":"b_0D68"},{"a":3411,"t":"code","b":[208,6],"m":"bne","oa":3419,"o":"b_0D5B"},{"a":3413,"t":"code","b":[164,116],"m":"ldy","oa":116,"o":"tmp_t"},{"a":3415,"t":"code","b":[196,119],"m":"cpy","oa":119,"o":"tmp_w"},{"a":3417,"t":"code","b":[144,13],"m":"bcc","oa":3432,"o":"b_0D68"},{"a":3419,"l":"b_0D5B","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[3405,3411]},{"a":3421,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":3423,"t":"code","b":[229,119],"m":"sbc","oa":119,"o":"tmp_w"},{"a":3425,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":3427,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":3429,"t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v"},{"a":3431,"t":"code","b":[56],"m":"sec"},{"a":3432,"l":"b_0D68","t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t","x":[3409,3417]},{"a":3434,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3435,"t":"code","b":[176,12],"m":"bcs","oa":3449,"o":"b_0D79"},{"a":3437,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3439,"t":"code","b":[144,21],"m":"bcc","oa":3462,"o":"b_0D86"},{"a":3441,"t":"code","b":[208,6],"m":"bne","oa":3449,"o":"b_0D79"},{"a":3443,"t":"code","b":[164,116],"m":"ldy","oa":116,"o":"tmp_t"},{"a":3445,"t":"code","b":[196,119],"m":"cpy","oa":119,"o":"tmp_w"},{"a":3447,"t":"code","b":[144,13],"m":"bcc","oa":3462,"o":"b_0D86"},{"a":3449,"l":"b_0D79","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[3435,3441]},{"a":3451,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":3453,"t":"code","b":[229,119],"m":"sbc","oa":119,"o":"tmp_w"},{"a":3455,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":3457,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":3459,"t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v"},{"a":3461,"t":"code","b":[56],"m":"sec"},{"a":3462,"l":"b_0D86","t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t","x":[3439,3447]},{"a":3464,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3465,"t":"code","b":[176,12],"m":"bcs","oa":3479,"o":"b_0D97"},{"a":3467,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3469,"t":"code","b":[144,21],"m":"bcc","oa":3492,"o":"b_0DA4"},{"a":3471,"t":"code","b":[208,6],"m":"bne","oa":3479,"o":"b_0D97"},{"a":3473,"t":"code","b":[164,116],"m":"ldy","oa":116,"o":"tmp_t"},{"a":3475,"t":"code","b":[196,119],"m":"cpy","oa":119,"o":"tmp_w"},{"a":3477,"t":"code","b":[144,13],"m":"bcc","oa":3492,"o":"b_0DA4"},{"a":3479,"l":"b_0D97","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[3465,3471]},{"a":3481,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":3483,"t":"code","b":[229,119],"m":"sbc","oa":119,"o":"tmp_w"},{"a":3485,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":3487,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":3489,"t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v"},{"a":3491,"t":"code","b":[56],"m":"sec"},{"a":3492,"l":"b_0DA4","t":"code","b":[8],"m":"php","x":[3469,3477]},{"a":3493,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3495,"t":"code","b":[240,103],"m":"beq","oa":3600,"o":"b_0E10"},{"a":3497,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":3499,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3500,"t":"code","b":[176,4],"m":"bcs","oa":3506,"o":"b_0DB2"},{"a":3502,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3504,"t":"code","b":[144,3],"m":"bcc","oa":3509,"o":"b_0DB5"},{"a":3506,"l":"b_0DB2","t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v","x":[3500]},{"a":3508,"t":"code","b":[56],"m":"sec"},{"a":3509,"l":"b_0DB5","t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t","x":[3504]},{"a":3511,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3512,"t":"code","b":[176,4],"m":"bcs","oa":3518,"o":"b_0DBE"},{"a":3514,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3516,"t":"code","b":[144,3],"m":"bcc","oa":3521,"o":"b_0DC1"},{"a":3518,"l":"b_0DBE","t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v","x":[3512]},{"a":3520,"t":"code","b":[56],"m":"sec"},{"a":3521,"l":"b_0DC1","t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t","x":[3516]},{"a":3523,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3524,"t":"code","b":[176,4],"m":"bcs","oa":3530,"o":"b_0DCA"},{"a":3526,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3528,"t":"code","b":[144,3],"m":"bcc","oa":3533,"o":"b_0DCD"},{"a":3530,"l":"b_0DCA","t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v","x":[3524]},{"a":3532,"t":"code","b":[56],"m":"sec"},{"a":3533,"l":"b_0DCD","t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t","x":[3528]},{"a":3535,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3536,"t":"code","b":[176,4],"m":"bcs","oa":3542,"o":"b_0DD6"},{"a":3538,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3540,"t":"code","b":[144,3],"m":"bcc","oa":3545,"o":"b_0DD9"},{"a":3542,"l":"b_0DD6","t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v","x":[3536]},{"a":3544,"t":"code","b":[56],"m":"sec"},{"a":3545,"l":"b_0DD9","t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t","x":[3540]},{"a":3547,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3548,"t":"code","b":[176,4],"m":"bcs","oa":3554,"o":"b_0DE2"},{"a":3550,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3552,"t":"code","b":[144,3],"m":"bcc","oa":3557,"o":"b_0DE5"},{"a":3554,"l":"b_0DE2","t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v","x":[3548]},{"a":3556,"t":"code","b":[56],"m":"sec"},{"a":3557,"l":"b_0DE5","t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t","x":[3552]},{"a":3559,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3560,"t":"code","b":[176,4],"m":"bcs","oa":3566,"o":"b_0DEE"},{"a":3562,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3564,"t":"code","b":[144,3],"m":"bcc","oa":3569,"o":"b_0DF1"},{"a":3566,"l":"b_0DEE","t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v","x":[3560]},{"a":3568,"t":"code","b":[56],"m":"sec"},{"a":3569,"l":"b_0DF1","t":"code","b":[102,120],"m":"ror","oa":120,"o":"tmp_g","x":[3564]},{"a":3571,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3572,"t":"code","b":[176,2],"m":"bcs","oa":3576,"o":"b_0DF8"},{"a":3574,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":3576,"l":"b_0DF8","t":"code","b":[102,120],"m":"ror","oa":120,"o":"tmp_g","x":[3572]},{"a":3578,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":3580,"l":"j_0DFC","t":"code","b":[40],"m":"plp","x":[3612]},{"a":3581,"t":"code","b":[144,2],"m":"bcc","oa":3585,"o":"b_0E01"},{"a":3583,"t":"code","b":[105,31],"m":"adc","o":"#$1F"},{"a":3585,"l":"b_0E01","t":"code","b":[144,28],"m":"bcc","oa":3615,"o":"b_0E1F","x":[3581]},{"a":3587,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":3589,"t":"code","b":[133,126],"m":"sta","oa":126,"o":"tangent"},{"a":3591,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":3593,"t":"code","b":[133,138],"m":"sta","oa":138,"o":"angle_lo"},{"a":3595,"t":"code","b":[169,32],"m":"lda","o":"#$20"},{"a":3597,"t":"code","b":[133,139],"m":"sta","oa":139,"o":"angle_hi"},{"a":3599,"t":"code","b":[96],"m":"rts"},{"a":3600,"l":"b_0E10","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[3495]},{"a":3602,"t":"code","b":[133,120],"m":"sta","oa":120,"o":"tmp_g"},{"a":3604,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3606,"t":"code","b":[106],"m":"ror","o":"a"},{"a":3607,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3609,"t":"code","b":[106],"m":"ror","o":"a"},{"a":3610,"t":"code","b":[9,32],"m":"ora","o":"#$20"},{"a":3612,"t":"code","b":[76,252,13],"m":"jmp","oa":3580,"o":"j_0DFC"},{"a":3615,"l":"b_0E1F","t":"code","b":[168],"m":"tay","x":[3585]},{"a":3616,"t":"code","b":[133,126],"m":"sta","oa":126,"o":"tangent"},{"a":3618,"t":"code","b":[185,0,59],"m":"lda","oa":15104,"o":"arctan_lo,y"},{"a":3621,"t":"code","b":[133,138],"m":"sta","oa":138,"o":"angle_lo"},{"a":3623,"t":"code","b":[185,1,60],"m":"lda","oa":15361,"o":"arctan_hi,y"},{"a":3626,"t":"code","b":[133,139],"m":"sta","oa":139,"o":"angle_hi"},{"a":3628,"t":"code","b":[36,120],"m":"bit","oa":120,"o":"tmp_g"},{"a":3630,"t":"code","b":[48,5],"m":"bmi","oa":3637,"o":"b_0E35"},{"a":3632,"t":"code","b":[112,30],"m":"bvs","oa":3664,"o":"b_0E50"},{"a":3634,"t":"code","b":[76,116,14],"m":"jmp","oa":3700,"o":"r_0E74"},{"a":3637,"l":"b_0E35","t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo","x":[3630]},{"a":3639,"t":"code","b":[56],"m":"sec"},{"a":3640,"t":"code","b":[249,1,59],"m":"sbc","oa":15105,"o":"arctan_lo_1,y"},{"a":3643,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":3645,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":3647,"t":"code","b":[249,2,60],"m":"sbc","oa":15362,"o":"arctan_hi_1,y"},{"a":3650,"t":"code","b":[36,120],"m":"bit","oa":120,"o":"tmp_g"},{"a":3652,"t":"code","b":[80,3],"m":"bvc","oa":3657,"o":"b_0E49"},{"a":3654,"t":"code","b":[32,9,16],"m":"jsr","oa":4105,"o":"negate16"},{"a":3657,"l":"b_0E49","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[3652]},{"a":3659,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3660,"t":"code","b":[102,117],"m":"ror","oa":117,"o":"tmp_u"},{"a":3662,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":3664,"l":"b_0E50","t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo","x":[3632]},{"a":3666,"t":"code","b":[24],"m":"clc"},{"a":3667,"t":"code","b":[121,1,59],"m":"adc","oa":15105,"o":"arctan_lo_1,y"},{"a":3670,"t":"code","b":[133,138],"m":"sta","oa":138,"o":"angle_lo"},{"a":3672,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":3674,"t":"code","b":[121,2,60],"m":"adc","oa":15362,"o":"arctan_hi_1,y"},{"a":3677,"t":"code","b":[133,139],"m":"sta","oa":139,"o":"angle_hi"},{"a":3679,"t":"code","b":[36,120],"m":"bit","oa":120,"o":"tmp_g"},{"a":3681,"t":"code","b":[16,13],"m":"bpl","oa":3696,"o":"b_0E70"},{"a":3683,"t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo"},{"a":3685,"t":"code","b":[24],"m":"clc"},{"a":3686,"t":"code","b":[101,116],"m":"adc","oa":116,"o":"tmp_t"},{"a":3688,"t":"code","b":[133,138],"m":"sta","oa":138,"o":"angle_lo"},{"a":3690,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":3692,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":3694,"t":"code","b":[133,139],"m":"sta","oa":139,"o":"angle_hi"},{"a":3696,"l":"b_0E70","t":"code","b":[70,139],"m":"lsr","oa":139,"o":"angle_hi","x":[3681]},{"a":3698,"t":"code","b":[102,138],"m":"ror","oa":138,"o":"angle_lo"},{"a":3700,"l":"r_0E74","t":"code","b":[96],"m":"rts","x":[3634]},{"a":3701,"l":"sin_cos_16","c":"Sine and cosine of a 16-bit angle (A high, $74 low) to about 15 bits: reduces the angle into one quadrant as radians ($0F3E), evaluates a short polynomial with the multiplies at $0D03/$0F4A (small-angle form, or the complementary angle past $7A), and does it twice ($60 counts the passes) so that X=0 fills sine and X=1 cosine. Stores magnitudes in $0C02/$0C00 (sine) and $0C03/$0C01 (cosine), then sets bit 0 of a low byte when that value is negative (sine for angles past 180 degrees at $0F19, cosine in the second and third quadrants at $0F26). Keeps X in $0F3B. Called from $1C54 and $1C6F when turning the sights direction into a vector. Unchanged from the BBC code; $0E9A-$0EA0 can never run, since both branches before it jump.","t":"code","b":[141,12,12],"m":"sta","oa":3084,"o":"sincos_angle_hi","x":[7252,7279]},{"a":3704,"t":"code","b":[142,59,15],"m":"stx","oa":3899,"o":"sin_cos_x_save"},{"a":3707,"t":"code","b":[32,62,15],"m":"jsr","oa":3902,"o":"angle_to_radians"},{"a":3710,"t":"code","b":[141,83,12],"m":"sta","oa":3155,"o":"sincos_work_lo"},{"a":3713,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":3715,"t":"code","b":[141,84,12],"m":"sta","oa":3156,"o":"sincos_work_hi"},{"a":3718,"t":"code","b":[162,1],"m":"ldx","o":"#$01"},{"a":3720,"t":"code","b":[134,96],"m":"stx","oa":96,"o":"second_axis_or_gaze_flags"},{"a":3722,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":3724,"t":"code","b":[44,12,12],"m":"bit","oa":3084,"o":"sincos_angle_hi"},{"a":3727,"t":"code","b":[80,3],"m":"bvc","oa":3732,"o":"b_0E94"},{"a":3729,"t":"code","b":[232],"m":"inx"},{"a":3730,"t":"code","b":[198,96],"m":"dec","oa":96,"o":"second_axis_or_gaze_flags"},{"a":3732,"l":"b_0E94","t":"code","b":[201,122],"m":"cmp","o":"#$7A","x":[3727,3862]},{"a":3734,"t":"code","b":[144,9],"m":"bcc","oa":3745,"o":"b_0EA1"},{"a":3736,"t":"code","b":[176,49],"m":"bcs","oa":3787,"o":"b_0ECB"},{"a":3738,"t":"code","b":[173,83,12],"m":"lda","oa":3155,"o":"sincos_work_lo"},{"a":3741,"t":"code","b":[201,240],"m":"cmp","o":"#$F0"},{"a":3743,"t":"code","b":[176,42],"m":"bcs","oa":3787,"o":"b_0ECB"},{"a":3745,"l":"b_0EA1","t":"code","b":[169,171],"m":"lda","o":"#$AB","x":[3734]},{"a":3747,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":3750,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":3753,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":3755,"t":"code","b":[32,74,15],"m":"jsr","oa":3914,"o":"mul16_by_u"},{"a":3758,"t":"code","b":[173,83,12],"m":"lda","oa":3155,"o":"sincos_work_lo"},{"a":3761,"t":"code","b":[56],"m":"sec"},{"a":3762,"t":"code","b":[229,116],"m":"sbc","oa":116,"o":"tmp_t"},{"a":3764,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":3766,"t":"code","b":[173,84,12],"m":"lda","oa":3156,"o":"sincos_work_hi"},{"a":3769,"t":"code","b":[229,117],"m":"sbc","oa":117,"o":"tmp_u"},{"a":3771,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":3773,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3774,"t":"code","b":[157,2,12],"m":"sta","oa":3074,"o":"sin16_hi,x"},{"a":3777,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":3779,"t":"code","b":[41,254],"m":"and","o":"#$FE"},{"a":3781,"t":"code","b":[157,0,12],"m":"sta","oa":3072,"o":"sin16_lo,x"},{"a":3784,"t":"code","b":[76,253,14],"m":"jmp","oa":3837,"o":"j_0EFD"},{"a":3787,"l":"b_0ECB","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[3736,3743]},{"a":3789,"t":"code","b":[56],"m":"sec"},{"a":3790,"t":"code","b":[237,83,12],"m":"sbc","oa":3155,"o":"sincos_work_lo"},{"a":3793,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":3795,"t":"code","b":[169,201],"m":"lda","o":"#$C9"},{"a":3797,"t":"code","b":[237,84,12],"m":"sbc","oa":3156,"o":"sincos_work_hi"},{"a":3800,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":3802,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":3804,"t":"code","b":[32,74,15],"m":"jsr","oa":3914,"o":"mul16_by_u"},{"a":3807,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":3809,"t":"code","b":[38,117],"m":"rol","oa":117,"o":"tmp_u"},{"a":3811,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":3813,"t":"code","b":[56],"m":"sec"},{"a":3814,"t":"code","b":[229,116],"m":"sbc","oa":116,"o":"tmp_t"},{"a":3816,"t":"code","b":[41,254],"m":"and","o":"#$FE"},{"a":3818,"t":"code","b":[157,0,12],"m":"sta","oa":3072,"o":"sin16_lo,x"},{"a":3821,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":3823,"t":"code","b":[229,117],"m":"sbc","oa":117,"o":"tmp_u"},{"a":3825,"t":"code","b":[144,7],"m":"bcc","oa":3834,"o":"b_0EFA"},{"a":3827,"t":"code","b":[169,254],"m":"lda","o":"#$FE"},{"a":3829,"t":"code","b":[157,0,12],"m":"sta","oa":3072,"o":"sin16_lo,x"},{"a":3832,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":3834,"l":"b_0EFA","t":"code","b":[157,2,12],"m":"sta","oa":3074,"o":"sin16_hi,x","x":[3825]},{"a":3837,"l":"j_0EFD","t":"code","b":[228,96],"m":"cpx","oa":96,"o":"second_axis_or_gaze_flags","x":[3784]},{"a":3839,"t":"code","b":[240,24],"m":"beq","oa":3865,"o":"b_0F19"},{"a":3841,"t":"code","b":[166,96],"m":"ldx","oa":96,"o":"second_axis_or_gaze_flags"},{"a":3843,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":3845,"t":"code","b":[56],"m":"sec"},{"a":3846,"t":"code","b":[237,83,12],"m":"sbc","oa":3155,"o":"sincos_work_lo"},{"a":3849,"t":"code","b":[141,83,12],"m":"sta","oa":3155,"o":"sincos_work_lo"},{"a":3852,"t":"code","b":[169,201],"m":"lda","o":"#$C9"},{"a":3854,"t":"code","b":[237,84,12],"m":"sbc","oa":3156,"o":"sincos_work_hi"},{"a":3857,"t":"code","b":[141,84,12],"m":"sta","oa":3156,"o":"sincos_work_hi"},{"a":3860,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":3862,"t":"code","b":[76,148,14],"m":"jmp","oa":3732,"o":"b_0E94"},{"a":3865,"l":"b_0F19","t":"code","b":[173,12,12],"m":"lda","oa":3084,"o":"sincos_angle_hi","x":[3839]},{"a":3868,"t":"code","b":[16,8],"m":"bpl","oa":3878,"o":"b_0F26"},{"a":3869,"t":"note","l":"f_0F1D","c":"Not a variable, a decoy base address: $2C5F stores to $0F1D+X with X=$20, which reaches $0F3D, the hidden landscape byte (see $0F3C). The bytes from here to $0F35 are the sign fix-ups at the end of $0E75: bit 0 of $0C00 set for a negative sine ($0F19-$0F23), bit 0 of $0C01 for a negative cosine ($0F26-$0F34).","note":"inside the item at $0F1C","x":[11359]},{"a":3870,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":3872,"t":"code","b":[13,0,12],"m":"ora","oa":3072,"o":"sin16_lo"},{"a":3875,"t":"code","b":[141,0,12],"m":"sta","oa":3072,"o":"sin16_lo"},{"a":3878,"l":"b_0F26","t":"code","b":[173,12,12],"m":"lda","oa":3084,"o":"sincos_angle_hi","x":[3868]},{"a":3881,"t":"code","b":[10],"m":"asl","o":"a"},{"a":3882,"t":"code","b":[77,12,12],"m":"eor","oa":3084,"o":"sincos_angle_hi"},{"a":3885,"t":"code","b":[16,8],"m":"bpl","oa":3895,"o":"b_0F37"},{"a":3887,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":3889,"t":"code","b":[13,1,12],"m":"ora","oa":3073,"o":"cos16_lo"},{"a":3892,"t":"code","b":[141,1,12],"m":"sta","oa":3073,"o":"cos16_lo"},{"a":3894,"t":"note","l":"f_0F36","c":"Not a variable, a decoy base address: $18A4 (LDA) and $3232 (CMP) use $0F36+X with X=7, which reaches $0F3D, the hidden landscape byte. The bytes $0F36-$0F3A are the last byte of the STA $0C01 at $0F34 and the X restore and RTS that end $0E75.","note":"inside the item at $0F34","x":[6308,12850]},{"a":3895,"l":"b_0F37","t":"code","b":[174,59,15],"m":"ldx","oa":3899,"o":"sin_cos_x_save","x":[3885]},{"a":3898,"t":"code","b":[96],"m":"rts"},{"a":3899,"l":"sin_cos_x_save","c":"One byte where $0E75 keeps X: stored at $0E78, reloaded at $0F37.","t":"byte","b":[0],"x":[3704,3895]},{"a":3900,"l":"landscape_hi_hideout","c":"An LDA #imm that is never executed: its operand byte, $0F3D, is where the game hides a copy of the landscape number's high BCD byte for its anti-tamper checks. $2C5C-$2C5F copy it from $AD4E (with X=$20, disguised as STA $0F1D,X); $AD4E is the third of the 81 seed numbers stored by $2ACC, which is still the high byte fed into the seed register at $33ED. $18A2-$18A4 read it back as LDA $0F36,X with X=7 to build $0C75, and $322D-$3232 compare $0C75 with it (CMP $0F36,X, X=7). Same arrangement as the BBC original.","t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":3902,"l":"angle_to_radians","c":"Turns the 16-bit angle in A (high) and $74 (low) into radians within its quadrant: drops the top two bits (the quadrant) by shifting left twice, then multiplies by $C9 through $0F4A, so a right angle gives about $C900 (1 radian = $8000). Result high byte in $75, low byte in A and $74. Only caller: $0E7B.","t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t","x":[3707]},{"a":3904,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3905,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":3907,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3908,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":3910,"t":"code","b":[169,201],"m":"lda","o":"#$C9"},{"a":3912,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":3914,"l":"mul16_by_u","c":"Multiplies the 16-bit value $76 (high) / $74 (low) by the 8-bit $75 and keeps the top 16 bits of the 24-bit product: high byte in $75, low byte in A and $74. Built from two 8x8 multiplies ($0D05, $0D03). Called by $0EAB, $0EDC and the hypotenuse routine at $9395; $0F3E falls into it.","t":"code","b":[32,5,13],"m":"jsr","oa":3333,"o":"mul8_t_by_u","x":[3755,3804,37781]},{"a":3917,"t":"code","b":[133,119],"m":"sta","oa":119,"o":"tmp_w"},{"a":3919,"t":"code","b":[165,118],"m":"lda","oa":118,"o":"tmp_v"},{"a":3921,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":3924,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":3926,"t":"code","b":[165,119],"m":"lda","oa":119,"o":"tmp_w"},{"a":3928,"t":"code","b":[24],"m":"clc"},{"a":3929,"t":"code","b":[101,116],"m":"adc","oa":116,"o":"tmp_t"},{"a":3931,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":3933,"t":"code","b":[144,2],"m":"bcc","oa":3937,"o":"r_0F61"},{"a":3935,"t":"code","b":[230,117],"m":"inc","oa":117,"o":"tmp_u"},{"a":3937,"l":"r_0F61","t":"code","b":[96],"m":"rts","x":[3933]},{"a":3938,"l":"key_is_down","c":"Tests one key: X is the C64 key number (bits 0-2 the keyboard row driven on $DC00, bits 3-5 the column bit read from $DC01; $20 is F1, $27 SPACE). Calls $FFF4 with A=$81 and Y=$FF, the BBC's scan-one-key request, which the C64 layer passes to $8CF9; it answers X=$FF when the key is down. Returns Z set if down; Y is preserved. Same bytes as the BBC routine, only the key numbers passed by its callers ($11A5, $11B0, $1370) are C64 ones.","t":"code","b":[152],"m":"tya","x":[4517,4528,4976]},{"a":3939,"t":"code","b":[72],"m":"pha"},{"a":3940,"t":"code","b":[169,129],"m":"lda","o":"#$81"},{"a":3942,"t":"code","b":[160,255],"m":"ldy","o":"#$FF"},{"a":3944,"t":"code","b":[32,244,255],"m":"jsr","oa":65524,"o":"osbyte_jmp"},{"a":3947,"t":"code","b":[104],"m":"pla"},{"a":3948,"t":"code","b":[168],"m":"tay"},{"a":3949,"t":"code","b":[224,255],"m":"cpx","o":"#$FF"},{"a":3951,"t":"code","b":[96],"m":"rts"},{"a":3952,"l":"sin_cos_8","c":"8-bit sine and cosine of an angle in A (256 to a turn; bit 7 of $74 adds half a step): folds the angle into a quadrant, reads the 128-entry sine table at $AC80 at the angle and at its complement, and stores |sin| in $8E and |cos| in $8F, swapping them as the quadrant needs. Leaves the angle in $67 so that bit 7 is the sine's sign and bit 6 the cosine's. Only caller $848F (object point angles). The BBC routine read its table at $5980; the C64 copy reads $AC80, $5300 higher, as the moved data block requires.","t":"code","b":[16,2],"m":"bpl","oa":3956,"o":"b_0F74","x":[33935]},{"a":3954,"t":"code","b":[73,64],"m":"eor","o":"#$40"},{"a":3956,"l":"b_0F74","t":"code","b":[133,103],"m":"sta","oa":103,"o":"sign_bits","x":[3952]},{"a":3958,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":3960,"t":"code","b":[42],"m":"rol","o":"a"},{"a":3961,"t":"code","b":[41,127],"m":"and","o":"#$7F"},{"a":3963,"t":"code","b":[170],"m":"tax"},{"a":3964,"t":"code","b":[73,127],"m":"eor","o":"#$7F"},{"a":3966,"t":"code","b":[24],"m":"clc"},{"a":3967,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":3969,"t":"code","b":[16,2],"m":"bpl","oa":3973,"o":"b_0F85"},{"a":3971,"t":"code","b":[169,127],"m":"lda","o":"#$7F"},{"a":3973,"l":"b_0F85","t":"code","b":[168],"m":"tay","x":[3969]},{"a":3974,"t":"code","b":[189,128,172],"m":"lda","oa":44160,"o":"sine_table,x"},{"a":3977,"t":"code","b":[190,128,172],"m":"ldx","oa":44160,"o":"sine_table,y"},{"a":3980,"t":"code","b":[36,103],"m":"bit","oa":103,"o":"sign_bits"},{"a":3982,"t":"code","b":[48,7],"m":"bmi","oa":3991,"o":"b_0F97"},{"a":3984,"t":"code","b":[112,7],"m":"bvs","oa":3993,"o":"b_0F99"},{"a":3986,"l":"b_0F92","t":"code","b":[133,142],"m":"sta","oa":142,"o":"sin_8bit","x":[3991]},{"a":3988,"t":"code","b":[134,143],"m":"stx","oa":143,"o":"cos_8bit"},{"a":3990,"t":"code","b":[96],"m":"rts"},{"a":3991,"l":"b_0F97","t":"code","b":[112,249],"m":"bvs","oa":3986,"o":"b_0F92","x":[3982]},{"a":3993,"l":"b_0F99","t":"code","b":[133,143],"m":"sta","oa":143,"o":"cos_8bit","x":[3984]},{"a":3995,"t":"code","b":[134,142],"m":"stx","oa":142,"o":"sin_8bit"},{"a":3997,"t":"code","b":[96],"m":"rts"},{"a":3998,"l":"mul16x16_signed","c":"Signed 16x16 multiply keeping the top 16 bits: ($6B,$6A) is two's complement, ($69,$68) sign-magnitude with the sign in bit 0 of $68, and bit 7 of $67 is an extra sign. Makes both positive (flipping bit 7 of $67 for each negative), adds the three significant partial products from $0D03 (the low-by-low one is replaced by a rounding constant $80) and returns the result in A (high) and $74 (low) with the sign applied by falling into $1007. Only caller $1C93.","t":"code","b":[165,107],"m":"lda","oa":107,"o":"mul_a_hi","x":[7315]},{"a":4000,"t":"code","b":[16,19],"m":"bpl","oa":4021,"o":"b_0FB5"},{"a":4002,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4004,"t":"code","b":[56],"m":"sec"},{"a":4005,"t":"code","b":[229,106],"m":"sbc","oa":106,"o":"mul_a_lo"},{"a":4007,"t":"code","b":[133,106],"m":"sta","oa":106,"o":"mul_a_lo"},{"a":4009,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4011,"t":"code","b":[229,107],"m":"sbc","oa":107,"o":"mul_a_hi"},{"a":4013,"t":"code","b":[133,107],"m":"sta","oa":107,"o":"mul_a_hi"},{"a":4015,"t":"code","b":[165,103],"m":"lda","oa":103,"o":"sign_bits"},{"a":4017,"t":"code","b":[73,128],"m":"eor","o":"#$80"},{"a":4019,"t":"code","b":[133,103],"m":"sta","oa":103,"o":"sign_bits"},{"a":4021,"l":"b_0FB5","t":"code","b":[165,104],"m":"lda","oa":104,"o":"mul_b_lo","x":[4000]},{"a":4023,"t":"code","b":[41,1],"m":"and","o":"#$01"},{"a":4025,"t":"code","b":[240,6],"m":"beq","oa":4033,"o":"b_0FC1"},{"a":4027,"t":"code","b":[165,103],"m":"lda","oa":103,"o":"sign_bits"},{"a":4029,"t":"code","b":[73,128],"m":"eor","o":"#$80"},{"a":4031,"t":"code","b":[133,103],"m":"sta","oa":103,"o":"sign_bits"},{"a":4033,"l":"b_0FC1","t":"code","b":[165,107],"m":"lda","oa":107,"o":"mul_a_hi","x":[4025]},{"a":4035,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":4037,"t":"code","b":[165,104],"m":"lda","oa":104,"o":"mul_b_lo"},{"a":4039,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":4042,"t":"code","b":[133,119],"m":"sta","oa":119,"o":"tmp_w"},{"a":4044,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":4046,"t":"code","b":[24],"m":"clc"},{"a":4047,"t":"code","b":[105,128],"m":"adc","o":"#$80"},{"a":4049,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":4051,"t":"code","b":[144,2],"m":"bcc","oa":4055,"o":"b_0FD7"},{"a":4053,"t":"code","b":[230,119],"m":"inc","oa":119,"o":"tmp_w"},{"a":4055,"l":"b_0FD7","t":"code","b":[165,105],"m":"lda","oa":105,"o":"mul_b_hi","x":[4051]},{"a":4057,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":4060,"t":"code","b":[133,120],"m":"sta","oa":120,"o":"tmp_g"},{"a":4062,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":4064,"t":"code","b":[24],"m":"clc"},{"a":4065,"t":"code","b":[101,119],"m":"adc","oa":119,"o":"tmp_w"},{"a":4067,"t":"code","b":[133,119],"m":"sta","oa":119,"o":"tmp_w"},{"a":4069,"t":"code","b":[144,2],"m":"bcc","oa":4073,"o":"b_0FE9"},{"a":4071,"t":"code","b":[230,120],"m":"inc","oa":120,"o":"tmp_g"},{"a":4073,"l":"b_0FE9","t":"code","b":[165,106],"m":"lda","oa":106,"o":"mul_a_lo","x":[4069]},{"a":4075,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":4077,"t":"code","b":[165,105],"m":"lda","oa":105,"o":"mul_b_hi"},{"a":4079,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":4082,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":4084,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":4086,"t":"code","b":[24],"m":"clc"},{"a":4087,"t":"code","b":[101,118],"m":"adc","oa":118,"o":"tmp_v"},{"a":4089,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":4091,"t":"code","b":[101,119],"m":"adc","oa":119,"o":"tmp_w"},{"a":4093,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":4095,"t":"code","b":[144,2],"m":"bcc","oa":4099,"o":"b_1003"},{"a":4097,"t":"code","b":[230,120],"m":"inc","oa":120,"o":"tmp_g"},{"a":4099,"l":"b_1003","t":"code","b":[165,120],"m":"lda","oa":120,"o":"tmp_g","x":[4095]},{"a":4101,"t":"code","b":[36,103],"m":"bit","oa":103,"o":"sign_bits"},{"a":4103,"l":"apply_sign16","c":"If the N flag is clear on entry, returns (A high, $74 low) unchanged; if it is set, falls into $1009 and negates it. Callers load or BIT-test a high byte just before, so this gives an absolute value ($1DD8, $2B5F, $3019, $3040) or applies a sign (the end of $0F9E).","t":"code","b":[16,13],"m":"bpl","oa":4118,"o":"r_1016","x":[7640,11103,12313,12352]},{"a":4105,"l":"negate16","c":"Negates the 16-bit value with its high byte in A and low byte in $74: returns the new high byte in A (the old one is left in $75) and the low byte in $74. Called by $0E46, $1CB5, $84A6, $8502.","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[3654,7349,33958,34050]},{"a":4107,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4109,"t":"code","b":[56],"m":"sec"},{"a":4110,"t":"code","b":[229,116],"m":"sbc","oa":116,"o":"tmp_t"},{"a":4112,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":4114,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4116,"t":"code","b":[229,117],"m":"sbc","oa":117,"o":"tmp_u"},{"a":4118,"l":"r_1016","t":"code","b":[96],"m":"rts","x":[4103]},{"a":4119,"l":"title_loop","c":"Start of the title sequence, entered from the start-up code ($3FB1) and jumped to from $3585 and $363A. Resets the stack to $01FF, sets all four colours to blue (A=6 to $8643: the BBC code passed 4, which is blue in the BBC palette, 6 is blue on the C64), resets the game state ($114D), draws the title picture ($3282 with A=0), prints token 0 (PRESS ANY KEY) through $8617, selects the title colours (A=$87) and waits for a key ($8629). Then falls into $1034.","t":"code","b":[162,255],"m":"ldx","o":"#$FF","x":[13701,13882,16305]},{"a":4121,"t":"code","b":[154],"m":"txs"},{"a":4122,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":4124,"t":"code","b":[32,67,134],"m":"jsr","oa":34371,"o":"set_palette"},{"a":4127,"t":"code","b":[32,77,17],"m":"jsr","oa":4429,"o":"reset_game_state"},{"a":4130,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4132,"t":"code","b":[32,130,50],"m":"jsr","oa":12930,"o":"draw_title_screen"},{"a":4135,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":4137,"t":"code","b":[32,23,134],"m":"jsr","oa":34327,"o":"print_token"},{"a":4140,"t":"code","b":[169,135],"m":"lda","o":"#$87"},{"a":4142,"t":"code","b":[32,67,134],"m":"jsr","oa":34371,"o":"set_palette"},{"a":4145,"t":"code","b":[32,41,134],"m":"jsr","oa":34345,"o":"wait_key"},{"a":4148,"l":"ask_landscape","c":"Asks for a landscape: resets state ($114D), prints token 1 (LANDSCAPE NUMBER?), reads four digits ($32D5 with A=4), packs them into BCD ($3357) and seeds the landscape generator with them ($33ED, X = low byte from $0CF0, Y = high byte from $0CF1). For landscape 0000 ($0C52 = 0) it copies the stored code at $108C into $0CF0-$0CF3 and skips the question; otherwise it prints token 2 (SECRET ENTRY CODE?) and reads eight digits. Reached from $1017 and from $1089.","t":"code","b":[32,77,17],"m":"jsr","oa":4429,"o":"reset_game_state","x":[4233]},{"a":4151,"t":"code","b":[162,1],"m":"ldx","o":"#$01"},{"a":4153,"t":"code","b":[32,23,134],"m":"jsr","oa":34327,"o":"print_token"},{"a":4156,"t":"code","b":[169,4],"m":"lda","o":"#$04"},{"a":4158,"t":"code","b":[32,213,50],"m":"jsr","oa":13013,"o":"read_number"},{"a":4161,"t":"code","b":[32,87,51],"m":"jsr","oa":13143,"o":"input_to_bcd"},{"a":4164,"t":"code","b":[172,241,12],"m":"ldy","oa":3313,"o":"input_buffer_1"},{"a":4167,"t":"code","b":[174,240,12],"m":"ldx","oa":3312,"o":"input_buffer"},{"a":4170,"t":"code","b":[32,237,51],"m":"jsr","oa":13293,"o":"init_landscape_seed"},{"a":4173,"t":"code","b":[173,82,12],"m":"lda","oa":3154,"o":"landscape_nonzero"},{"a":4176,"t":"code","b":[208,13],"m":"bne","oa":4191,"o":"b_105F"},{"a":4178,"t":"code","b":[162,3],"m":"ldx","o":"#$03"},{"a":4180,"l":"b_1054","t":"code","b":[189,140,16],"m":"lda","oa":4236,"o":"code_for_0000,x","x":[4187]},{"a":4183,"t":"code","b":[157,240,12],"m":"sta","oa":3312,"o":"input_buffer,x"},{"a":4186,"t":"code","b":[202],"m":"dex"},{"a":4187,"t":"code","b":[16,247],"m":"bpl","oa":4180,"o":"b_1054"},{"a":4189,"t":"code","b":[48,13],"m":"bmi","oa":4204,"o":"build_landscape"},{"a":4191,"l":"b_105F","t":"code","b":[162,2],"m":"ldx","o":"#$02","x":[4176]},{"a":4193,"t":"code","b":[32,23,134],"m":"jsr","oa":34327,"o":"print_token"},{"a":4196,"t":"code","b":[169,8],"m":"lda","o":"#$08"},{"a":4198,"t":"code","b":[32,213,50],"m":"jsr","oa":13013,"o":"read_number"},{"a":4201,"t":"code","b":[32,87,51],"m":"jsr","oa":13143,"o":"input_to_bcd"},{"a":4204,"l":"build_landscape","c":"Blanks the screen to blue (A=6 to $8643) and calls the landscape builder $2ACC; also entered from $3600 to replay a landscape without asking for the code again. The stack was reset at $1017, so the JSR at $1071 leaves its return address in $01FE/$01FF; when the entered code is right, $2C1E-$2C26 overwrite it with $8816 and the builder's RTS continues at $8817 (the landscape preview) instead of here. A normal return means the code was wrong and falls into $1074.","t":"code","b":[169,6],"m":"lda","o":"#$06","x":[4189,13824]},{"a":4206,"t":"code","b":[32,67,134],"m":"jsr","oa":34371,"o":"set_palette"},{"a":4209,"t":"code","b":[32,204,42],"m":"jsr","oa":10956,"o":"generate_landscape"},{"a":4212,"l":"wrong_code","c":"Wrong secret code: reached by falling out of $1071 and by the JMP at $886F when the preview's own check of the code (in $1450) fails. Resets state, redraws the title ($3282 with A=0), selects the title colours (A=$87), prints token 3 (WRONG SECRET CODE and PRESS ANY KEY), waits for a key ($8629) and goes back to $1034.","t":"code","b":[32,77,17],"m":"jsr","oa":4429,"o":"reset_game_state","x":[34927]},{"a":4215,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4217,"t":"code","b":[32,130,50],"m":"jsr","oa":12930,"o":"draw_title_screen"},{"a":4220,"t":"code","b":[169,135],"m":"lda","o":"#$87"},{"a":4222,"t":"code","b":[32,67,134],"m":"jsr","oa":34371,"o":"set_palette"},{"a":4225,"t":"code","b":[162,3],"m":"ldx","o":"#$03"},{"a":4227,"t":"code","b":[32,23,134],"m":"jsr","oa":34327,"o":"print_token"},{"a":4230,"t":"code","b":[32,41,134],"m":"jsr","oa":34345,"o":"wait_key"},{"a":4233,"t":"code","b":[76,52,16],"m":"jmp","oa":4148,"o":"ask_landscape"},{"a":4236,"l":"code_for_0000","c":"Four BCD bytes $87 $53 $04 $06, the eight-digit secret code of landscape 0000 (06045387) stored low byte first like the input buffer. $1052-$105B copy them to $0CF0-$0CF3 so that landscape 0000 never asks for a code while the generator's checks still find the right one.","t":"byte","b":[135,83,4,6],"x":[4180]},{"a":4240,"l":"clear_view_screen","c":"Clears the play screen before a view is drawn: $1336 resets the view's screen origin and the screen matrix, $8607 fills the 320 bytes above the view image ($E000-$E13F, the row of energy icons and scanner) with $55, $2993 (A=0) and $2211 (A=0, Y=24 rows, X=40 columns) fill the view with the background kind in $0C4C, and when that kind is 3 (black sky) $93F5 draws 40 stars, three times over. The same sequence as the BBC routine with the C64's own targets. Called from $13E4, $35AF, $35C0.","t":"code","b":[32,54,19],"m":"jsr","oa":4918,"o":"reset_view_origin","x":[5092,13743,13760]},{"a":4243,"t":"code","b":[32,7,134],"m":"jsr","oa":34311,"o":"fill_top_bitmap_row"},{"a":4246,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4248,"t":"code","b":[32,147,41],"m":"jsr","oa":10643,"o":"set_draw_buffer"},{"a":4251,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4253,"t":"code","b":[160,24],"m":"ldy","o":"#$18"},{"a":4255,"t":"code","b":[162,40],"m":"ldx","o":"#$28"},{"a":4257,"t":"code","b":[32,17,34],"m":"jsr","oa":8721,"o":"fill_background"},{"a":4260,"t":"code","b":[173,76,12],"m":"lda","oa":3148,"o":"backdrop_kind"},{"a":4263,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":4265,"t":"code","b":[208,11],"m":"bne","oa":4278,"o":"r_10B6"},{"a":4267,"t":"code","b":[169,3],"m":"lda","o":"#$03"},{"a":4269,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":4271,"l":"b_10AF","t":"code","b":[32,245,147],"m":"jsr","oa":37877,"o":"draw_stars","x":[4276]},{"a":4274,"t":"code","b":[198,21],"m":"dec","oa":21,"o":"loop_count"},{"a":4276,"t":"code","b":[208,249],"m":"bne","oa":4271,"o":"b_10AF"},{"a":4278,"l":"r_10B6","t":"code","b":[96],"m":"rts","x":[4265]},{"a":4279,"l":"pan_view","c":"Draws the strip of landscape a pan needs and starts the scroll. Direction in $08: 0 right, 1 left, 2 up, 3 down. Turns the viewer by the step at $9925+Y (yaw +20/-8, pitch +4/-12), fills the off-screen column buffer ($3912) or row buffer ($38AD) with alternate $55 and $00 bytes, the striped sky (the BBC called its general fill routine here), selects that buffer ($994F or $9939) and draws the view ($2625). If drawing was abandoned because the pan key was let go (carry set) the turn is undone ($10F4, $113E); otherwise the angle is settled to the net step (8 yaw units sideways, 4 pitch units up or down) and $9929 sets 16 or 8 scroll steps. An up or down pan does nothing when the pitch already equals the limit at $114B or $114C. Called from $365A.","t":"code","b":[164,8],"m":"ldy","oa":8,"o":"last_pan_dir","x":[13914]},{"a":4281,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":4283,"t":"code","b":[192,2],"m":"cpy","o":"#$02"},{"a":4285,"t":"code","b":[176,64],"m":"bcs","oa":4351,"o":"b_10FF"},{"a":4287,"t":"code","b":[189,192,9],"m":"lda","oa":2496,"o":"obj_yaw,x"},{"a":4290,"t":"code","b":[24],"m":"clc"},{"a":4291,"t":"code","b":[121,37,153],"m":"adc","oa":39205,"o":"pan_angle_update,y"},{"a":4294,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":4297,"t":"code","b":[162,127],"m":"ldx","o":"#$7F"},{"a":4299,"t":"code","b":[169,85],"m":"lda","o":"#$55"},{"a":4301,"t":"code","b":[32,18,57],"m":"jsr","oa":14610,"o":"clear_view_cols_0_15"},{"a":4304,"t":"code","b":[162,126],"m":"ldx","o":"#$7E"},{"a":4306,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4308,"t":"code","b":[32,18,57],"m":"jsr","oa":14610,"o":"clear_view_cols_0_15"},{"a":4311,"t":"code","b":[32,79,153],"m":"jsr","oa":39247,"o":"use_column_buffer"},{"a":4314,"t":"code","b":[32,37,38],"m":"jsr","oa":9765,"o":"draw_view_rows"},{"a":4317,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":4319,"t":"code","b":[164,8],"m":"ldy","oa":8,"o":"last_pan_dir"},{"a":4321,"t":"code","b":[176,17],"m":"bcs","oa":4340,"o":"b_10F4"},{"a":4323,"t":"code","b":[208,9],"m":"bne","oa":4334,"o":"b_10EE"},{"a":4325,"t":"code","b":[189,192,9],"m":"lda","oa":2496,"o":"obj_yaw,x"},{"a":4328,"t":"code","b":[56],"m":"sec"},{"a":4329,"t":"code","b":[233,12],"m":"sbc","o":"#$0C"},{"a":4331,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":4334,"l":"b_10EE","t":"code","b":[169,16],"m":"lda","o":"#$10","x":[4323]},{"a":4336,"t":"code","b":[32,41,153],"m":"jsr","oa":39209,"o":"start_scrolling_view"},{"a":4339,"t":"code","b":[96],"m":"rts"},{"a":4340,"l":"b_10F4","t":"code","b":[189,192,9],"m":"lda","oa":2496,"o":"obj_yaw,x","x":[4321]},{"a":4343,"t":"code","b":[56],"m":"sec"},{"a":4344,"t":"code","b":[249,37,153],"m":"sbc","oa":39205,"o":"pan_angle_update,y"},{"a":4347,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":4350,"t":"code","b":[96],"m":"rts"},{"a":4351,"l":"b_10FF","t":"code","b":[189,64,1],"m":"lda","oa":320,"o":"obj_pitch,x","x":[4285]},{"a":4354,"t":"code","b":[217,73,17],"m":"cmp","oa":4425,"o":"f_1149,y"},{"a":4357,"t":"code","b":[240,54],"m":"beq","oa":4413,"o":"r_113D"},{"a":4359,"t":"code","b":[24],"m":"clc"},{"a":4360,"t":"code","b":[121,37,153],"m":"adc","oa":39205,"o":"pan_angle_update,y"},{"a":4363,"t":"code","b":[157,64,1],"m":"sta","oa":320,"o":"obj_pitch,x"},{"a":4366,"t":"code","b":[162,79],"m":"ldx","o":"#$4F"},{"a":4368,"t":"code","b":[169,85],"m":"lda","o":"#$55"},{"a":4370,"t":"code","b":[32,173,56],"m":"jsr","oa":14509,"o":"clear_view_rows_1_8"},{"a":4373,"t":"code","b":[162,78],"m":"ldx","o":"#$4E"},{"a":4375,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4377,"t":"code","b":[32,173,56],"m":"jsr","oa":14509,"o":"clear_view_rows_1_8"},{"a":4380,"t":"code","b":[32,57,153],"m":"jsr","oa":39225,"o":"use_row_buffer"},{"a":4383,"t":"code","b":[32,37,38],"m":"jsr","oa":9765,"o":"draw_view_rows"},{"a":4386,"t":"code","b":[166,11],"m":"ldx","oa":11,"o":"player_obj"},{"a":4388,"t":"code","b":[164,8],"m":"ldy","oa":8,"o":"last_pan_dir"},{"a":4390,"t":"code","b":[176,22],"m":"bcs","oa":4414,"o":"b_113E"},{"a":4392,"t":"code","b":[192,3],"m":"cpy","o":"#$03"},{"a":4394,"t":"code","b":[208,9],"m":"bne","oa":4405,"o":"b_1135"},{"a":4396,"t":"code","b":[189,64,1],"m":"lda","oa":320,"o":"obj_pitch,x"},{"a":4399,"t":"code","b":[24],"m":"clc"},{"a":4400,"t":"code","b":[105,8],"m":"adc","o":"#$08"},{"a":4402,"t":"code","b":[157,64,1],"m":"sta","oa":320,"o":"obj_pitch,x"},{"a":4405,"l":"b_1135","t":"code","b":[169,8],"m":"lda","o":"#$08","x":[4394]},{"a":4407,"t":"code","b":[32,41,153],"m":"jsr","oa":39209,"o":"start_scrolling_view"},{"a":4410,"l":"j_113A","t":"code","b":[32,84,153],"m":"jsr","oa":39252,"o":"set_column_buffer_pitch","x":[4424]},{"a":4413,"l":"r_113D","t":"code","b":[96],"m":"rts","x":[4357]},{"a":4414,"l":"b_113E","t":"code","b":[189,64,1],"m":"lda","oa":320,"o":"obj_pitch,x","x":[4390]},{"a":4417,"t":"code","b":[56],"m":"sec"},{"a":4418,"t":"code","b":[249,37,153],"m":"sbc","oa":39205,"o":"pan_angle_update,y"},{"a":4421,"t":"code","b":[157,64,1],"m":"sta","oa":320,"o":"obj_pitch,x"},{"a":4424,"t":"code","b":[76,58,17],"m":"jmp","oa":4410,"o":"j_113A"},{"a":4425,"t":"note","l":"f_1149","c":"Not a variable: the two operand bytes of the JMP $113A at $1148. The pitch-limit test at $1102 reads $1149+Y with Y = 2 (up) or 3 (down), which lands on $114B and $114C.","note":"inside the item at $1148","x":[4354]},{"a":4427,"l":"pitch_limit_up","c":"$35 (+53): the highest pitch the player's view may reach. $1102 refuses an up pan when the viewer's pitch equals it, and the C64 sights code at $99AE stops the sights at the top edge instead of starting a pan. The test is an exact match: it works because every object starts at pitch $F5 ($1F7E) and pans move it in steps of 4, so the pitch meets $35 exactly.","t":"byte","b":[53],"x":[39342]},{"a":4428,"l":"pitch_limit_down","c":"$CD (-51): the lowest pitch the player's view may reach, tested by the same exact match at $1102 (Y=3) and by the sights code at $99C8.","t":"byte","b":[205],"x":[39368]},{"a":4429,"l":"reset_game_state","c":"Resets the game state before the title or a landscape: sets bit 7 of $0CFC (no game running), then in one loop clears the object tables $0900-$09EF and $0A00-$0AEF, zero page $02-$B1, $0100-$01BF (object flags, pitches, tile visibility) and $0C00-$0CE3, and sets $0CE4-$0CEF to $80. The C64 version skips $00/$01, the processor port, and clears up to $B1 because its own variables go up to there; the BBC cleared $00-$8F. LDX #0 appears twice ($1151, $1153). Falls into $117C. Called from $101F, $1034, $1074, $35F4.","t":"code","b":[56],"m":"sec","x":[4127,4148,4212,13812]},{"a":4430,"t":"code","b":[110,252,12],"m":"ror","oa":3324,"o":"not_in_game"},{"a":4433,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":4435,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":4437,"l":"b_1155","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[4474]},{"a":4439,"t":"code","b":[157,0,9],"m":"sta","oa":2304,"o":"obj_x,x"},{"a":4442,"t":"code","b":[157,0,10],"m":"sta","oa":2560,"o":"obj_y_lo,x"},{"a":4445,"t":"code","b":[224,2],"m":"cpx","o":"#$02"},{"a":4447,"t":"code","b":[144,6],"m":"bcc","oa":4455,"o":"b_1167"},{"a":4449,"t":"code","b":[224,178],"m":"cpx","o":"#$B2"},{"a":4451,"t":"code","b":[176,2],"m":"bcs","oa":4455,"o":"b_1167"},{"a":4453,"t":"code","b":[149,0],"m":"sta","oa":0,"o":"cpu_port_ddr,x"},{"a":4455,"l":"b_1167","t":"code","b":[224,192],"m":"cpx","o":"#$C0","x":[4447,4451]},{"a":4457,"t":"code","b":[176,3],"m":"bcs","oa":4462,"o":"b_116E"},{"a":4459,"t":"code","b":[157,0,1],"m":"sta","oa":256,"o":"obj_flags,x"},{"a":4462,"l":"b_116E","t":"code","b":[224,228],"m":"cpx","o":"#$E4","x":[4457]},{"a":4464,"t":"code","b":[144,2],"m":"bcc","oa":4468,"o":"b_1174"},{"a":4466,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":4468,"l":"b_1174","t":"code","b":[157,0,12],"m":"sta","oa":3072,"o":"sin16_lo,x","x":[4464]},{"a":4471,"t":"code","b":[232],"m":"inx"},{"a":4472,"t":"code","b":[224,240],"m":"cpx","o":"#$F0"},{"a":4474,"t":"code","b":[144,217],"m":"bcc","oa":4437,"o":"b_1155"},{"a":4476,"l":"reset_display_and_tiles","c":"C64 addition first: switches the display to the title's bitmap screen in bank 3 (A=0 to $9A51). Then the BBC routine from $1181: marks every square visible ($3E80-$3EFF = $FF), frees all 64 object slots ($0100-$013F = $80), steps the seed byte $0C7D, restores the column-buffer pitch limits ($9954); and a second C64 addition turns all sprites off ($D015 = 0). Reached from $114D and called from $3615.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[13845]},{"a":4478,"t":"code","b":[32,81,154],"m":"jsr","oa":39505,"o":"set_video_mode"},{"a":4481,"t":"code","b":[162,63],"m":"ldx","o":"#$3F"},{"a":4483,"l":"b_1183","t":"code","b":[169,255],"m":"lda","o":"#$FF","x":[4497]},{"a":4485,"t":"code","b":[157,128,62],"m":"sta","oa":16000,"o":"tile_visibility,x"},{"a":4488,"t":"code","b":[157,192,62],"m":"sta","oa":16064,"o":"tile_visibility_x16,x"},{"a":4491,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":4493,"t":"code","b":[157,0,1],"m":"sta","oa":256,"o":"obj_flags,x"},{"a":4496,"t":"code","b":[202],"m":"dex"},{"a":4497,"t":"code","b":[16,240],"m":"bpl","oa":4483,"o":"b_1183"},{"a":4499,"t":"code","b":[238,125,12],"m":"inc","oa":3197,"o":"seed_reg_2"},{"a":4502,"t":"code","b":[32,84,153],"m":"jsr","oa":39252,"o":"set_column_buffer_pitch"},{"a":4505,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4507,"t":"code","b":[141,21,208],"m":"sta","o":"vic_sprite_enable"},{"a":4510,"t":"code","b":[96],"m":"rts"},{"a":4511,"l":"poll_keys","c":"Reads the game keys once a frame, called from the play interrupt ($9678) while $0CE4 bit 7 is clear and the delay in $130B has run out. Sets $09 to $80 (no pan); F1 sets bit 7 of $0C64 (quit); SPACE toggles the sights ($0C5F) once per press ($1236), showing them through $134C and $99DC (the C64 sights are sprite 0) or hiding them through $9A3C. Then scans the logged keys ($1363, Y=$0E). No pan key: resets the sights' start-up pacing ($0CC8 = $6B), passes an action key to $1214, or re-arms the U-turn ($0C51 = $40). A pan key: moves the sights ($9958, paced by $0CC8) when they are shown, otherwise puts the direction in $09 and $0C1D. Ends by copying $0CE4 to $0CDC ($121C).","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[38520]},{"a":4513,"t":"code","b":[133,9],"m":"sta","oa":9,"o":"pan_key_now"},{"a":4515,"t":"code","b":[162,32],"m":"ldx","o":"#$20"},{"a":4517,"t":"code","b":[32,98,15],"m":"jsr","oa":3938,"o":"key_is_down"},{"a":4520,"t":"code","b":[208,4],"m":"bne","oa":4526,"o":"b_11AE"},{"a":4522,"t":"code","b":[56],"m":"sec"},{"a":4523,"t":"code","b":[110,100,12],"m":"ror","oa":3172,"o":"quit_request"},{"a":4526,"l":"b_11AE","t":"code","b":[162,39],"m":"ldx","o":"#$27","x":[4520]},{"a":4528,"t":"code","b":[32,98,15],"m":"jsr","oa":3938,"o":"key_is_down"},{"a":4531,"t":"code","b":[208,31],"m":"bne","oa":4564,"o":"b_11D4"},{"a":4533,"t":"code","b":[173,54,18],"m":"lda","oa":4662,"o":"space_was_down"},{"a":4536,"t":"code","b":[208,31],"m":"bne","oa":4569,"o":"b_11D9"},{"a":4538,"t":"code","b":[173,95,12],"m":"lda","oa":3167,"o":"sights_on"},{"a":4541,"t":"code","b":[73,128],"m":"eor","o":"#$80"},{"a":4543,"t":"code","b":[141,95,12],"m":"sta","oa":3167,"o":"sights_on"},{"a":4546,"t":"code","b":[16,9],"m":"bpl","oa":4557,"o":"b_11CD"},{"a":4548,"t":"code","b":[32,76,19],"m":"jsr","oa":4940,"o":"centre_sights"},{"a":4551,"t":"code","b":[32,220,153],"m":"jsr","oa":39388,"o":"place_sights_sprite"},{"a":4554,"t":"code","b":[76,208,17],"m":"jmp","oa":4560,"o":"j_11D0"},{"a":4557,"l":"b_11CD","t":"code","b":[32,60,154],"m":"jsr","oa":39484,"o":"hide_sights_sprite","x":[4546]},{"a":4560,"l":"j_11D0","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[4554]},{"a":4562,"t":"code","b":[208,2],"m":"bne","oa":4566,"o":"b_11D6"},{"a":4564,"l":"b_11D4","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[4531]},{"a":4566,"l":"b_11D6","t":"code","b":[141,54,18],"m":"sta","oa":4662,"o":"space_was_down","x":[4562]},{"a":4569,"l":"b_11D9","t":"code","b":[160,14],"m":"ldy","o":"#$0E","x":[4536]},{"a":4571,"t":"code","b":[32,99,19],"m":"jsr","oa":4963,"o":"scan_game_keys"},{"a":4574,"t":"code","b":[16,17],"m":"bpl","oa":4593,"o":"b_11F1"},{"a":4576,"t":"code","b":[169,107],"m":"lda","o":"#$6B"},{"a":4578,"t":"code","b":[141,200,12],"m":"sta","oa":3272,"o":"sights_start_pace"},{"a":4581,"t":"code","b":[173,233,12],"m":"lda","oa":3305,"o":"keylog_action"},{"a":4584,"t":"code","b":[16,42],"m":"bpl","oa":4628,"o":"focus_on_action"},{"a":4586,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":4588,"t":"code","b":[141,81,12],"m":"sta","oa":3153,"o":"uturn_armed"},{"a":4591,"t":"code","b":[208,43],"m":"bne","oa":4636,"o":"b_121C"},{"a":4593,"l":"b_11F1","t":"code","b":[174,95,12],"m":"ldx","oa":3167,"o":"sights_on","x":[4574]},{"a":4596,"t":"code","b":[16,11],"m":"bpl","oa":4609,"o":"b_1201"},{"a":4598,"t":"code","b":[14,200,12],"m":"asl","oa":3272,"o":"sights_start_pace"},{"a":4601,"t":"code","b":[176,33],"m":"bcs","oa":4636,"o":"b_121C"},{"a":4603,"t":"code","b":[32,88,153],"m":"jsr","oa":39256,"o":"move_sights"},{"a":4606,"t":"code","b":[76,13,18],"m":"jmp","oa":4621,"o":"j_120D"},{"a":4609,"l":"b_1201","t":"code","b":[173,232,12],"m":"lda","oa":3304,"o":"keylog_pan_x","x":[4596]},{"a":4612,"t":"code","b":[16,5],"m":"bpl","oa":4619,"o":"b_120B"},{"a":4614,"t":"code","b":[173,234,12],"m":"lda","oa":3306,"o":"keylog_pan_y"},{"a":4617,"t":"code","b":[48,17],"m":"bmi","oa":4636,"o":"b_121C"},{"a":4619,"l":"b_120B","t":"code","b":[133,9],"m":"sta","oa":9,"o":"pan_key_now","x":[4612]},{"a":4621,"l":"j_120D","t":"code","b":[165,9],"m":"lda","oa":9,"o":"pan_key_now","x":[4606]},{"a":4623,"t":"code","b":[48,11],"m":"bmi","oa":4636,"o":"b_121C"},{"a":4625,"t":"code","b":[141,29,12],"m":"sta","oa":3101,"o":"last_pan_logged"},{"a":4628,"l":"focus_on_action","c":"Sets bit 7 of $0CE4 and $0C1E so that the game concentrates on the key action just started (the play interrupt stops reading keys while $0CE4 bit 7 is set, $9669), then at $121C copies $0CE4 into $0CDC and returns. Called from $12AC, $1B69, $21A0 and reached from $119F.","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[4584,4780,7017,8608]},{"a":4630,"t":"code","b":[141,228,12],"m":"sta","oa":3300,"o":"key_action_busy"},{"a":4633,"t":"code","b":[141,30,12],"m":"sta","oa":3102,"o":"no_dissolve"},{"a":4636,"l":"b_121C","t":"code","b":[173,228,12],"m":"lda","oa":3300,"o":"key_action_busy","x":[4591,4601,4617,4623]},{"a":4639,"t":"code","b":[141,220,12],"m":"sta","oa":3292,"o":"prev_focus"},{"a":4642,"t":"code","b":[96],"m":"rts"},{"a":4643,"l":"same_pan_key_held","c":"With interrupts off, rescans the pan keys ($1363, Y=3) and compares the key logger's sideways ($0CE8) and vertical ($0CEA) entries with the last pan direction in $0C1D. Z set if the same pan key is still down. Used by $1296 and by the view drawer at $2765, which gives up a pan strip once the key is released.","t":"code","b":[120],"m":"sei","x":[4758,10085]},{"a":4644,"t":"code","b":[160,3],"m":"ldy","o":"#$03"},{"a":4646,"t":"code","b":[32,99,19],"m":"jsr","oa":4963,"o":"scan_game_keys"},{"a":4649,"t":"code","b":[173,29,12],"m":"lda","oa":3101,"o":"last_pan_logged"},{"a":4652,"t":"code","b":[205,232,12],"m":"cmp","oa":3304,"o":"keylog_pan_x"},{"a":4655,"t":"code","b":[240,3],"m":"beq","oa":4660,"o":"b_1234"},{"a":4657,"t":"code","b":[205,234,12],"m":"cmp","oa":3306,"o":"keylog_pan_y"},{"a":4660,"l":"b_1234","t":"code","b":[88],"m":"cli","x":[4655]},{"a":4661,"t":"code","b":[96],"m":"rts"},{"a":4662,"l":"space_was_down","c":"SPACE latch for the sights toggle: $11D0-$11D6 store $80 while SPACE is down and 0 once it is up, and $11B5 only toggles the sights when this is 0, so holding SPACE toggles once. The following byte, $1237, is not referenced by any traced instruction.","t":"byte","b":[0,0],"x":[4533,4566]},{"a":4664,"l":"place_object_low","c":"Tries to put object X on a random empty, flat square whose height is below A: picks a column and a row with $1272, points at the square ($2BA8) and accepts it if it holds no object (byte below $C0), is flat (low nibble 0) and is lower than the limit (high nibble); $1F16 then places the object. After every 256 misses the limit rises by one; when it reaches 12 the routine gives up. Carry clear on success, set on failure. The BBC's call to $2BA8's counterpart returned the square byte and the object test in the flags; the C64 version loads and tests the square here ($1257-$125B). Called from $1478, $14A1, $1A6D, $2165.","t":"code","b":[133,6],"m":"sta","oa":6,"o":"tile_height_or_poly_top","x":[5240,5281,6765,8549]},{"a":4666,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4668,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":4670,"l":"b_123E","t":"code","b":[198,21],"m":"dec","oa":21,"o":"loop_count","x":[4699,4703,4713]},{"a":4672,"t":"code","b":[208,8],"m":"bne","oa":4682,"o":"b_124A"},{"a":4674,"t":"code","b":[230,6],"m":"inc","oa":6,"o":"tile_height_or_poly_top"},{"a":4676,"t":"code","b":[165,6],"m":"lda","oa":6,"o":"tile_height_or_poly_top"},{"a":4678,"t":"code","b":[201,12],"m":"cmp","o":"#$0C"},{"a":4680,"t":"code","b":[176,38],"m":"bcs","oa":4720,"o":"b_1270"},{"a":4682,"l":"b_124A","t":"code","b":[32,114,18],"m":"jsr","oa":4722,"o":"seed_0_to_30","x":[4672]},{"a":4685,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":4687,"t":"code","b":[32,114,18],"m":"jsr","oa":4722,"o":"seed_0_to_30"},{"a":4690,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":4692,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":4695,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":4697,"t":"code","b":[201,192],"m":"cmp","o":"#$C0"},{"a":4699,"t":"code","b":[176,225],"m":"bcs","oa":4670,"o":"b_123E"},{"a":4701,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":4703,"t":"code","b":[208,221],"m":"bne","oa":4670,"o":"b_123E"},{"a":4705,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":4707,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":4708,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":4709,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":4710,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":4711,"t":"code","b":[197,6],"m":"cmp","oa":6,"o":"tile_height_or_poly_top"},{"a":4713,"t":"code","b":[176,211],"m":"bcs","oa":4670,"o":"b_123E"},{"a":4715,"t":"code","b":[32,22,31],"m":"jsr","oa":7958,"o":"place_object_on_tile"},{"a":4718,"t":"code","b":[24],"m":"clc"},{"a":4719,"t":"code","b":[96],"m":"rts"},{"a":4720,"l":"b_1270","t":"code","b":[56],"m":"sec","x":[4680]},{"a":4721,"t":"code","b":[96],"m":"rts"},{"a":4722,"l":"seed_0_to_30","c":"Next number from the landscape's seed sequence ($31CA) reduced to 0-30: keeps the low five bits and draws again when they are 31. Picks random tile coordinates for $1238.","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[4682,4687,4729]},{"a":4725,"t":"code","b":[41,31],"m":"and","o":"#$1F"},{"a":4727,"t":"code","b":[201,31],"m":"cmp","o":"#$1F"},{"a":4729,"t":"code","b":[176,247],"m":"bcs","oa":4722,"o":"seed_0_to_30"},{"a":4731,"t":"code","b":[96],"m":"rts"},{"a":4732,"l":"gameplay_loop","c":"The loop that runs while the player stands still. Clears $0CE4 and $0C51 and, a C64 addition, sets $130B to 2 so that the interrupt's next key scan waits a frame. Each pass without a pending key action notes whether the same pan key is still held ($0C1F via $1223), runs the enemies ($16B5), shows the game-over picture if the landscape is over ($0C4E, $87B1 with A=$1E), returns carry set when the player moved or turned ($0C63) or pressed F1 ($0C64), and otherwise updates the energy drain ($191F), the pause keys ($34BA), sound ($352C) and the volume keys ($347D). With a key pending: returns carry clear for a pan ($09); for an action key ($0CE9; codes below $22 need the sights on) stores it in $0C61, wakes the enemies (bit 7 of $0CE5 cleared), silences sound channel 0 ($3525) and runs the action ($1B18); on success plays sound 2 ($3470), redraws the changed object ($1F9F) and the energy icons ($9508). The C64 silences channel 0 before trying the action; the BBC did it after a success. Called from $363D.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[4872,13885]},{"a":4734,"t":"code","b":[141,228,12],"m":"sta","oa":3300,"o":"key_action_busy"},{"a":4737,"t":"code","b":[141,81,12],"m":"sta","oa":3153,"o":"uturn_armed"},{"a":4740,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":4742,"t":"code","b":[141,11,19],"m":"sta","oa":4875,"o":"key_check_delay"},{"a":4745,"l":"j_1289","t":"code","b":[173,228,12],"m":"lda","oa":3300,"o":"key_action_busy","x":[4807]},{"a":4748,"t":"code","b":[48,60],"m":"bmi","oa":4810,"o":"b_12CA"},{"a":4750,"t":"code","b":[78,31,12],"m":"lsr","oa":3103,"o":"same_pan_held"},{"a":4753,"t":"code","b":[173,220,12],"m":"lda","oa":3292,"o":"prev_focus"},{"a":4756,"t":"code","b":[16,9],"m":"bpl","oa":4767,"o":"b_129F"},{"a":4758,"t":"code","b":[32,35,18],"m":"jsr","oa":4643,"o":"same_pan_key_held"},{"a":4761,"t":"code","b":[208,4],"m":"bne","oa":4767,"o":"b_129F"},{"a":4763,"t":"code","b":[56],"m":"sec"},{"a":4764,"t":"code","b":[110,31,12],"m":"ror","oa":3103,"o":"same_pan_held"},{"a":4767,"l":"b_129F","t":"code","b":[32,181,22],"m":"jsr","oa":5813,"o":"run_enemy_turn","x":[4756,4761]},{"a":4770,"t":"code","b":[173,78,12],"m":"lda","oa":3150,"o":"landscape_over"},{"a":4773,"t":"code","b":[240,10],"m":"beq","oa":4785,"o":"b_12B1"},{"a":4775,"t":"code","b":[169,30],"m":"lda","o":"#$1E"},{"a":4777,"t":"code","b":[32,177,135],"m":"jsr","oa":34737,"o":"game_over_screen"},{"a":4780,"l":"b_12AC","t":"code","b":[32,20,18],"m":"jsr","oa":4628,"o":"focus_on_action","x":[4788,4793]},{"a":4783,"t":"code","b":[56],"m":"sec"},{"a":4784,"t":"code","b":[96],"m":"rts"},{"a":4785,"l":"b_12B1","t":"code","b":[14,99,12],"m":"asl","oa":3171,"o":"player_moved","x":[4773]},{"a":4788,"t":"code","b":[176,246],"m":"bcs","oa":4780,"o":"b_12AC"},{"a":4790,"t":"code","b":[44,100,12],"m":"bit","oa":3172,"o":"quit_request"},{"a":4793,"t":"code","b":[48,241],"m":"bmi","oa":4780,"o":"b_12AC"},{"a":4795,"t":"code","b":[32,31,25],"m":"jsr","oa":6431,"o":"check_player_drain"},{"a":4798,"t":"code","b":[32,186,52],"m":"jsr","oa":13498,"o":"process_pause_keys"},{"a":4801,"t":"code","b":[32,44,53],"m":"jsr","oa":13612,"o":"process_sound"},{"a":4804,"t":"code","b":[32,125,52],"m":"jsr","oa":13437,"o":"process_volume_keys"},{"a":4807,"t":"code","b":[76,137,18],"m":"jmp","oa":4745,"o":"j_1289"},{"a":4810,"l":"b_12CA","t":"code","b":[165,9],"m":"lda","oa":9,"o":"pan_key_now","x":[4748]},{"a":4812,"t":"code","b":[48,2],"m":"bmi","oa":4816,"o":"b_12D0"},{"a":4814,"t":"code","b":[24],"m":"clc"},{"a":4815,"t":"code","b":[96],"m":"rts"},{"a":4816,"l":"b_12D0","t":"code","b":[173,233,12],"m":"lda","oa":3305,"o":"keylog_action","x":[4812]},{"a":4819,"t":"code","b":[48,51],"m":"bmi","oa":4872,"o":"gameplay_restart"},{"a":4821,"t":"code","b":[201,34],"m":"cmp","o":"#$22"},{"a":4823,"t":"code","b":[176,5],"m":"bcs","oa":4830,"o":"b_12DE"},{"a":4825,"t":"code","b":[44,95,12],"m":"bit","oa":3167,"o":"sights_on"},{"a":4828,"t":"code","b":[16,42],"m":"bpl","oa":4872,"o":"gameplay_restart"},{"a":4830,"l":"b_12DE","t":"code","b":[141,97,12],"m":"sta","oa":3169,"o":"action_key","x":[4823]},{"a":4833,"t":"code","b":[78,229,12],"m":"lsr","oa":3301,"o":"enemies_asleep"},{"a":4836,"t":"code","b":[32,37,53],"m":"jsr","oa":13605,"o":"silence_voice_0"},{"a":4839,"t":"code","b":[32,24,27],"m":"jsr","oa":6936,"o":"do_action_key"},{"a":4842,"t":"code","b":[176,22],"m":"bcs","oa":4866,"o":"gameplay_exit_if_moved"},{"a":4844,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":4846,"t":"code","b":[32,112,52],"m":"jsr","oa":13424,"o":"make_sound"},{"a":4849,"t":"code","b":[169,192],"m":"lda","o":"#$C0"},{"a":4851,"t":"code","b":[141,109,12],"m":"sta","oa":3181,"o":"redraw_style"},{"a":4854,"t":"code","b":[78,30,12],"m":"lsr","oa":3102,"o":"no_dissolve"},{"a":4857,"t":"code","b":[32,159,31],"m":"jsr","oa":8095,"o":"redraw_object"},{"a":4860,"t":"code","b":[32,37,53],"m":"jsr","oa":13605,"o":"silence_voice_0"},{"a":4863,"t":"code","b":[32,8,149],"m":"jsr","oa":38152,"o":"update_icon_row"},{"a":4866,"l":"gameplay_exit_if_moved","t":"code","b":[14,99,12],"m":"asl","oa":3171,"o":"player_moved","x":[4842]},{"a":4869,"t":"code","b":[144,1],"m":"bcc","oa":4872,"o":"gameplay_restart"},{"a":4871,"t":"code","b":[96],"m":"rts"},{"a":4872,"l":"gameplay_restart","t":"code","b":[76,124,18],"m":"jmp","oa":4732,"o":"gameplay_loop","x":[4819,4828,4869]},{"a":4875,"l":"key_check_delay","c":"C64 addition; the BBC has no byte here (its timer routine follows the gameplay loop directly). Frames to wait before the raster interrupt resumes its key-press check: the gameplay loop start stores 2 ($1284-$1286); the interrupt ($966E-$9678) decrements it while it is non-zero and calls the key checker at $119F only once it reads 0, so after each (re)start of the loop one frame passes without a key check, then it runs every frame. 0 in both snapshots.","t":"byte","b":[0],"x":[4742,38510,38515]},{"a":4876,"l":"enemy_timer_gate","c":"C64 addition in front of the BBC's enemy timer routine. Adds $CD to the phase byte at $1335 and returns unless the addition carries, so the tick at $1317 runs on 205 of every 256 calls. Called by the raster interrupt at most once a frame ($9663, reached only with bit 7 of $0CFC, $0C4E, $0C72, $0CE5 and $0CD8 all clear, so not while paused) and, when a pan is being scrolled, by the main loop after each scroll step instead ($3684, skipped while $0CE5 bit 7 is set). With the tick's own one-in-three divider the timers at $0C20-$0C37 count about 13.4 times a second on a PAL machine when called every frame (50.1 frames a second x 205/256 / 3), where the BBC's interrupt, on a 20 ms timer, made it 16.7. Why the C64 slows the enemies down is not known.","t":"code","b":[173,53,19],"m":"lda","oa":4917,"o":"enemy_timer_phase","x":[13956,38499]},{"a":4879,"t":"code","b":[24],"m":"clc"},{"a":4880,"t":"code","b":[105,205],"m":"adc","o":"#$CD"},{"a":4882,"t":"code","b":[141,53,19],"m":"sta","oa":4917,"o":"enemy_timer_phase"},{"a":4885,"t":"code","b":[144,25],"m":"bcc","oa":4912,"o":"r_1330"},{"a":4887,"l":"tick_enemy_timers","c":"The BBC's enemy timer tick, byte for byte, reached here only by falling through from the gate at $130C. While the divider $0C50 is non-zero it is decremented and nothing else happens; when it is 0 it is reset to 2 and each of the 24 timers at $0C20-$0C37 that holds 2 or more is decremented, so a timer counts down to 1 and stays there. Three timers per enemy n (0-7): $0C20+n drain, $0C28+n turn, $0C30+n tactics.","t":"code","b":[173,80,12],"m":"lda","oa":3152,"o":"timer_divider"},{"a":4890,"t":"code","b":[208,21],"m":"bne","oa":4913,"o":"timer_divider_step"},{"a":4892,"t":"code","b":[162,23],"m":"ldx","o":"#$17"},{"a":4894,"l":"b_131E","t":"code","b":[189,32,12],"m":"lda","oa":3104,"o":"enemy_drain_timer,x","x":[4905]},{"a":4897,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":4899,"t":"code","b":[144,3],"m":"bcc","oa":4904,"o":"b_1328"},{"a":4901,"t":"code","b":[222,32,12],"m":"dec","oa":3104,"o":"enemy_drain_timer,x"},{"a":4904,"l":"b_1328","t":"code","b":[202],"m":"dex","x":[4899]},{"a":4905,"t":"code","b":[16,243],"m":"bpl","oa":4894,"o":"b_131E"},{"a":4907,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":4909,"t":"code","b":[141,80,12],"m":"sta","oa":3152,"o":"timer_divider"},{"a":4912,"l":"r_1330","t":"code","b":[96],"m":"rts","x":[4885]},{"a":4913,"l":"timer_divider_step","t":"code","b":[206,80,12],"m":"dec","oa":3152,"o":"timer_divider","x":[4890]},{"a":4916,"t":"code","b":[96],"m":"rts"},{"a":4917,"l":"enemy_timer_phase","c":"C64 addition: the running fraction for the gate at $130C, advanced by $CD on every call ($130C-$1312, its only reader and writer); a carry out of it lets the enemy timer tick run. 0 in both snapshots.","t":"byte","b":[0],"x":[4876,4882]},{"a":4918,"l":"reset_view_origin","c":"C64 rewrite of the BBC's screen-start reset, called first by the screen clear at $1090. With interrupts off: sets the drawing base $0CC2/$0CC3 to $E140, one character row (320 bytes) into the bank-3 bitmap at $E000 (the random-dot plotter at $93FB adds its offsets to it, wraps past $FFFF back to $E000 and skips $FF40-$FFFF); zeroes the pan offsets $94 (columns, 0-39) and $95 (rows, 0-24) that $96A6 steps; and calls $9AAC to lay out the screen matrix at $7C00 again. The BBC set its base to $60C0, fetched its icon-row address and wrote the 6845 start-address registers, which have no C64 counterpart.","t":"code","b":[120],"m":"sei","x":[4240]},{"a":4919,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":4921,"t":"code","b":[141,194,12],"m":"sta","oa":3266,"o":"view_image_addr"},{"a":4924,"t":"code","b":[169,225],"m":"lda","o":"#$E1"},{"a":4926,"t":"code","b":[141,195,12],"m":"sta","oa":3267,"o":"view_image_addr_hi"},{"a":4929,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":4931,"t":"code","b":[133,148],"m":"sta","oa":148,"o":"view_origin_col"},{"a":4933,"t":"code","b":[133,149],"m":"sta","oa":149,"o":"view_origin_row"},{"a":4935,"t":"code","b":[32,172,154],"m":"jsr","oa":39596,"o":"reset_view_matrix"},{"a":4938,"t":"code","b":[88],"m":"cli"},{"a":4939,"t":"code","b":[96],"m":"rts"},{"a":4940,"l":"centre_sights","c":"C64 rewrite of the BBC's sights set-up. Clears sprite 0's X bit 8 in $D010 ($134C-$1351) and puts the sights in the middle of the view: $0CC6 = 80 (x, 0-159) and $0CC7 = 95 (y), copied to $9B/$9C, from which $99DC positions sprite 0, the crosshair whose shape is at $7000. The BBC instead worked out where in its bitmap to draw the sights ($0CC4/$0CC5), which the C64 never reads or writes. Called when SPACE turns the sights on ($11C4) and by the play-screen set-up ($98C7).","t":"code","b":[173,16,208],"m":"lda","o":"vic_sprite_x_msb","x":[4548,39111]},{"a":4943,"t":"code","b":[41,254],"m":"and","o":"#$FE"},{"a":4945,"t":"code","b":[141,16,208],"m":"sta","o":"vic_sprite_x_msb"},{"a":4948,"t":"code","b":[169,80],"m":"lda","o":"#$50"},{"a":4950,"t":"code","b":[141,198,12],"m":"sta","oa":3270,"o":"sights_x"},{"a":4953,"t":"code","b":[133,155],"m":"sta","oa":155,"o":"sights_sprite_x"},{"a":4955,"t":"code","b":[169,95],"m":"lda","o":"#$5F"},{"a":4957,"t":"code","b":[141,199,12],"m":"sta","oa":3271,"o":"sights_y"},{"a":4960,"t":"code","b":[133,156],"m":"sta","oa":156,"o":"sights_sprite_y"},{"a":4962,"t":"code","b":[96],"m":"rts"},{"a":4963,"l":"scan_game_keys","c":"Fills the four-entry key log $0CE8-$0CEB. Marks every entry empty ($80), then for Y down to 0 tests the key whose matrix code is at $138D+Y (through $0F62, the C64's OSBYTE $81 at $8F78 and the matrix test at $8CF9) and, when it is held, stores (slot byte >> 2) into entry (slot byte AND 3), the slot byte being $139C+Y; a key tested later (lower Y) overwrites one tested earlier in the same entry. Returns A = $0CE8 AND $0CEA, so N is clear when a pan key (S, D, L, comma) is held. Y picks how far the scan starts: 14 from the key checker ($11D9), 3 for the pan keys alone ($1224), 13 from the interrupt while paused ($967E, which then empties entries 0-2). The code is the BBC's; only the key table differs.","t":"code","b":[162,3],"m":"ldx","o":"#$03","x":[4571,4646,38528]},{"a":4965,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":4967,"l":"b_1367","t":"code","b":[157,232,12],"m":"sta","oa":3304,"o":"keylog_pan_x,x","x":[4971]},{"a":4970,"t":"code","b":[202],"m":"dex"},{"a":4971,"t":"code","b":[16,250],"m":"bpl","oa":4967,"o":"b_1367"},{"a":4973,"l":"b_136D","t":"code","b":[190,141,19],"m":"ldx","oa":5005,"o":"game_key_codes,y","x":[4996]},{"a":4976,"t":"code","b":[32,98,15],"m":"jsr","oa":3938,"o":"key_is_down"},{"a":4979,"t":"code","b":[208,14],"m":"bne","oa":4995,"o":"b_1383"},{"a":4981,"t":"code","b":[185,156,19],"m":"lda","oa":5020,"o":"game_key_slots,y"},{"a":4984,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":4986,"t":"code","b":[170],"m":"tax"},{"a":4987,"t":"code","b":[185,156,19],"m":"lda","oa":5020,"o":"game_key_slots,y"},{"a":4990,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":4991,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":4992,"t":"code","b":[157,232,12],"m":"sta","oa":3304,"o":"keylog_pan_x,x"},{"a":4995,"l":"b_1383","t":"code","b":[136],"m":"dey","x":[4979]},{"a":4996,"t":"code","b":[16,231],"m":"bpl","oa":4973,"o":"b_136D"},{"a":4998,"t":"code","b":[173,232,12],"m":"lda","oa":3304,"o":"keylog_pan_x"},{"a":5001,"t":"code","b":[45,234,12],"m":"and","oa":3306,"o":"keylog_pan_y"},{"a":5004,"t":"code","b":[96],"m":"rts"},{"a":5005,"l":"game_key_codes","c":"The 15 game keys as C64 keyboard-matrix codes (column x 8 + row, the form the key test at $8CF9 takes), in the order scan_game_keys reads them: $29 S, $12 D, $15 L, $3D comma, $11 A, $37 Q, $0A R, $32 T, $23 B, $2B H, $03 7, $1B 8, $10 CRSR-right, $38 CRSR-down, $33 U. The BBC table held its negative INKEY numbers for the same letters, with COPY and DELETE where the C64 uses CRSR-right (pause) and CRSR-down (resume).","t":"byte","b":[41,18,21,61,17,55,10,50],"x":[4973]},{"a":5013,"t":"byte","b":[35,43,3,27,16,56,51]},{"a":5020,"l":"game_key_slots","c":"Where scan_game_keys files each key of $138D: bits 0-1 pick the log entry $0CE8+n, bits 2-7 are the value stored there. Entry 0 sideways pan (S 1, D 0); entry 2 vertical pan (L 2, comma 3); entry 1 actions (A 32 absorb, Q 33 transfer, R 0, T 2, B 3 = the type to create, H 34 hyperspace, U 35 U-turn); entry 3 volume and pause (7 0 quieter, 8 1 louder, CRSR-right 2 pause, CRSR-down 3 resume; used at $3485 and $34BA). The same 15 bytes as the BBC's table.","t":"byte","b":[4,0,10,14,129,133,1,9],"x":[4981,4987]},{"a":5028,"t":"byte","b":[13,137,3,7,11,15,141]},{"a":5035,"l":"draw_title_view","c":"Draws one of the pictures made with the 3D engine. A = object to stand on a tower at the right (5 Sentinel for the title, $32BA; 0 robot for the secret-code screen, $32A7; $80 none for the landscape preview, $885F), kept in $0C1C; X = background kind for the clear at $1090, kept in $0C4C (1 plain, 3 stars); Y = view, kept in $141F (1 title screens, 0 preview). Patches the drop-shadow text colours in the VDU sequence at $AA96 (front X EOR 3 at $AA97, shadow 2 or 3 at $AAA2), sets viewer object 16 from the tables at $1413-$141D ($0950 height, $0150 pitch, $0910 x, $0990 z, $09D0 yaw), clears the screen ($1090), draws the object ($887E) unless A has bit 7 set, sets the 3D-text x offset $0C78 from $1419+Y and draws the view from object 16 ($2625). After a preview it zeroes the 128-byte tile visibility table at $3E80 and sets $141F to $7F. Leaves $0C78 and $0C4C at 0. The BBC routine with its addresses moved.","t":"code","b":[141,28,12],"m":"sta","oa":3100,"o":"picture_obj_type","x":[12990,34913]},{"a":5038,"t":"code","b":[142,76,12],"m":"stx","oa":3148,"o":"backdrop_kind"},{"a":5041,"t":"code","b":[138],"m":"txa"},{"a":5042,"t":"code","b":[162,2],"m":"ldx","o":"#$02"},{"a":5044,"t":"code","b":[73,3],"m":"eor","o":"#$03"},{"a":5046,"t":"code","b":[141,151,170],"m":"sta","oa":43671,"o":"shadow_front_colour"},{"a":5049,"t":"code","b":[240,1],"m":"beq","oa":5052,"o":"b_13BC"},{"a":5051,"t":"code","b":[232],"m":"inx"},{"a":5052,"l":"b_13BC","t":"code","b":[142,162,170],"m":"stx","oa":43682,"o":"shadow_rear_colour","x":[5049]},{"a":5055,"t":"code","b":[140,31,20],"m":"sty","oa":5151,"o":"title_view_kind"},{"a":5058,"t":"code","b":[185,19,20],"m":"lda","oa":5139,"o":"title_viewer_y,y"},{"a":5061,"t":"code","b":[141,80,9],"m":"sta","oa":2384,"o":"a_0950"},{"a":5064,"t":"code","b":[185,21,20],"m":"lda","oa":5141,"o":"title_viewer_pitch,y"},{"a":5067,"t":"code","b":[141,80,1],"m":"sta","oa":336,"o":"a_0150"},{"a":5070,"t":"code","b":[185,23,20],"m":"lda","oa":5143,"o":"title_viewer_x,y"},{"a":5073,"t":"code","b":[141,16,9],"m":"sta","oa":2320,"o":"a_0910"},{"a":5076,"t":"code","b":[185,27,20],"m":"lda","oa":5147,"o":"title_viewer_z,y"},{"a":5079,"t":"code","b":[141,144,9],"m":"sta","oa":2448,"o":"a_0990"},{"a":5082,"t":"code","b":[185,29,20],"m":"lda","oa":5149,"o":"title_viewer_yaw,y"},{"a":5085,"t":"code","b":[141,208,9],"m":"sta","oa":2512,"o":"a_09D0"},{"a":5088,"t":"code","b":[185,25,20],"m":"lda","oa":5145,"o":"title_text_x_offset,y"},{"a":5091,"t":"code","b":[72],"m":"pha"},{"a":5092,"t":"code","b":[32,144,16],"m":"jsr","oa":4240,"o":"clear_view_screen"},{"a":5095,"t":"code","b":[173,28,12],"m":"lda","oa":3100,"o":"picture_obj_type"},{"a":5098,"t":"code","b":[48,3],"m":"bmi","oa":5103,"o":"b_13EF"},{"a":5100,"t":"code","b":[32,126,136],"m":"jsr","oa":34942,"o":"draw_title_pair"},{"a":5103,"l":"b_13EF","t":"code","b":[104],"m":"pla","x":[5098]},{"a":5104,"t":"code","b":[141,120,12],"m":"sta","oa":3192,"o":"title_x_offset"},{"a":5107,"t":"code","b":[162,16],"m":"ldx","o":"#$10"},{"a":5109,"t":"code","b":[134,110],"m":"stx","oa":110,"o":"viewer_obj"},{"a":5111,"t":"code","b":[32,37,38],"m":"jsr","oa":9765,"o":"draw_view_rows"},{"a":5114,"t":"code","b":[173,31,20],"m":"lda","oa":5151,"o":"title_view_kind"},{"a":5117,"t":"code","b":[208,11],"m":"bne","oa":5130,"o":"b_140A"},{"a":5119,"t":"code","b":[162,127],"m":"ldx","o":"#$7F"},{"a":5121,"t":"code","b":[142,31,20],"m":"stx","oa":5151,"o":"title_view_kind"},{"a":5124,"l":"b_1404","t":"code","b":[157,128,62],"m":"sta","oa":16000,"o":"tile_visibility,x","x":[5128]},{"a":5127,"t":"code","b":[202],"m":"dex"},{"a":5128,"t":"code","b":[16,250],"m":"bpl","oa":5124,"o":"b_1404"},{"a":5130,"l":"b_140A","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[5117]},{"a":5132,"t":"code","b":[141,120,12],"m":"sta","oa":3192,"o":"title_x_offset"},{"a":5135,"t":"code","b":[141,76,12],"m":"sta","oa":3148,"o":"backdrop_kind"},{"a":5138,"t":"code","b":[96],"m":"rts"},{"a":5139,"l":"title_viewer_y","c":"Height of the viewer (object 16) for draw_title_view, copied to $0950: 33 for the landscape preview (Y = 0), 75 for the title and secret-code screens (Y = 1).","t":"byte","b":[33,75],"x":[5058]},{"a":5141,"l":"title_viewer_pitch","c":"Pitch of the title viewer, copied to $0150: $EA (-22) for the preview, $D9 (-39) for the title screens.","t":"byte","b":[234,217],"x":[5064]},{"a":5143,"l":"title_viewer_x","c":"x position of the title viewer, copied to $0910: 15 for the preview, 0 for the title screens.","t":"byte","b":[15,0],"x":[5070]},{"a":5145,"l":"title_text_x_offset","c":"Offset for the large 3D title text, put in $0C78 while draw_title_view draws: 0 for the preview, $EF (-17) for the title screens.","t":"byte","b":[0,239],"x":[5088]},{"a":5147,"l":"title_viewer_z","c":"z position of the title viewer, copied to $0990: $C2 (194) for the preview, $BF (191) for the title screens.","t":"byte","b":[194,191],"x":[5076]},{"a":5149,"l":"title_viewer_yaw","c":"Yaw of the title viewer, copied to $09D0: 0 for the preview, 18 for the title screens. All six viewer tables at $1413-$141E hold the BBC's values.","t":"byte","b":[0,18],"x":[5082]},{"a":5151,"l":"title_view_kind","c":"Which picture draw_title_view is making (Y: 0 preview, 1 title screens), stored at $13BF; after a preview $1401 sets it to $7F, and it stays non-zero from then on (1 at the hand-over, $7F in play). The object-angle routine reads it at $843B to tell the preview from everything else.","t":"byte","b":[1],"x":[5055,5114,5121,33851]},{"a":5152,"l":"place_enemies","c":"Decides how many enemies a landscape has and places them. Landscape 0000 ($0C52 = 0, set by $33F9) gets one; any other gets the count from $3426, capped at $0C07. Stores the count in $0C6F, places the enemies ($14FB), then sets two colours of the play palette by the count, entry (count - 1) AND 7: $86A0 (colour 3) from $14D4 and $869F (colour 2) from $14F3. The BBC wrote BBC colour numbers into its own palette table; the C64 tables hold C64 colour codes and its palette is at $869D. Called from the preview ($8858) and the next-landscape routine ($1A9D).","t":"code","b":[173,82,12],"m":"lda","oa":3154,"o":"landscape_nonzero","x":[6813,34904]},{"a":5155,"t":"code","b":[208,4],"m":"bne","oa":5161,"o":"b_1429"},{"a":5157,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":5159,"t":"code","b":[208,11],"m":"bne","oa":5172,"o":"b_1434"},{"a":5161,"l":"b_1429","t":"code","b":[32,38,52],"m":"jsr","oa":13350,"o":"get_enemy_count","x":[5155]},{"a":5164,"t":"code","b":[205,7,12],"m":"cmp","oa":3079,"o":"enemy_limit"},{"a":5167,"t":"code","b":[144,3],"m":"bcc","oa":5172,"o":"b_1434"},{"a":5169,"t":"code","b":[173,7,12],"m":"lda","oa":3079,"o":"enemy_limit"},{"a":5172,"l":"b_1434","t":"code","b":[141,111,12],"m":"sta","oa":3183,"o":"enemy_count","x":[5159,5167]},{"a":5175,"t":"code","b":[32,251,20],"m":"jsr","oa":5371,"o":"place_enemies_on_peaks"},{"a":5178,"t":"code","b":[173,111,12],"m":"lda","oa":3183,"o":"enemy_count"},{"a":5181,"t":"code","b":[56],"m":"sec"},{"a":5182,"t":"code","b":[233,1],"m":"sbc","o":"#$01"},{"a":5184,"t":"code","b":[41,7],"m":"and","o":"#$07"},{"a":5186,"t":"code","b":[170],"m":"tax"},{"a":5187,"t":"code","b":[189,212,20],"m":"lda","oa":5332,"o":"enemy_colour3_by_count,x"},{"a":5190,"t":"code","b":[141,160,134],"m":"sta","oa":34464,"o":"palette_83_colour3"},{"a":5193,"t":"code","b":[189,243,20],"m":"lda","oa":5363,"o":"enemy_colour2_by_count,x"},{"a":5196,"t":"code","b":[141,159,134],"m":"sta","oa":34463,"o":"palette_83_colour2"},{"a":5199,"t":"code","b":[96],"m":"rts"},{"a":5200,"l":"place_player","c":"Makes the player's robot and puts it on the landscape. Takes a new object number for a robot ($211D, A = 0) into $0B and sets the starting energy $0C0A to 10. On landscape 0000 ($0C52 = 0) it stands the robot on tile x 8, z 17 ($1F16) and jumps to the tree placement at $147D; otherwise it has $1238 put it on a random flat, empty tile lower than min(6, $0C06), the lowest enemy's height ($1238 raises its limit after every 255 failed tries), repeating until that succeeds, and falls into $147D. Called from the preview ($886C) and from $1AA0. The BBC routine.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[6816,34924]},{"a":5202,"t":"code","b":[32,29,33],"m":"jsr","oa":8477,"o":"alloc_object_slot"},{"a":5205,"t":"code","b":[134,11],"m":"stx","oa":11,"o":"player_obj"},{"a":5207,"t":"code","b":[169,10],"m":"lda","o":"#$0A"},{"a":5209,"t":"code","b":[141,10,12],"m":"sta","oa":3082,"o":"player_energy"},{"a":5212,"t":"code","b":[173,82,12],"m":"lda","oa":3154,"o":"landscape_nonzero"},{"a":5215,"t":"code","b":[208,14],"m":"bne","oa":5231,"o":"b_146F"},{"a":5217,"t":"code","b":[169,8],"m":"lda","o":"#$08"},{"a":5219,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":5221,"t":"code","b":[169,17],"m":"lda","o":"#$11"},{"a":5223,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":5225,"t":"code","b":[32,22,31],"m":"jsr","oa":7958,"o":"place_object_on_tile"},{"a":5228,"t":"code","b":[76,125,20],"m":"jmp","oa":5245,"o":"place_trees"},{"a":5231,"l":"b_146F","t":"code","b":[173,6,12],"m":"lda","oa":3078,"o":"lowest_enemy_height","x":[5215,5243]},{"a":5234,"t":"code","b":[201,6],"m":"cmp","o":"#$06"},{"a":5236,"t":"code","b":[144,2],"m":"bcc","oa":5240,"o":"b_1478"},{"a":5238,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":5240,"l":"b_1478","t":"code","b":[32,56,18],"m":"jsr","oa":4664,"o":"place_object_low","x":[5236]},{"a":5243,"t":"code","b":[176,242],"m":"bcs","oa":5231,"o":"b_146F"},{"a":5245,"l":"place_trees","c":"Adds the trees. Limit $75 = 48 - 3 x the enemy count ($0C6F); count = 10 + a seed number 0-22 ($3451), no more than the limit, kept in $1E. Each tree takes a new object number ($211D, A = 2) and goes on a random flat, empty tile lower than the lowest enemy's height $0C06 ($1238); the first failure ends the loop. Falls through into make_secret_code ($14AA). The BBC routine.","t":"code","b":[169,48],"m":"lda","o":"#$30","x":[5228]},{"a":5247,"t":"code","b":[56],"m":"sec"},{"a":5248,"t":"code","b":[237,111,12],"m":"sbc","oa":3183,"o":"enemy_count"},{"a":5251,"t":"code","b":[237,111,12],"m":"sbc","oa":3183,"o":"enemy_count"},{"a":5254,"t":"code","b":[237,111,12],"m":"sbc","oa":3183,"o":"enemy_count"},{"a":5257,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":5259,"t":"code","b":[32,81,52],"m":"jsr","oa":13393,"o":"random_0_to_22"},{"a":5262,"t":"code","b":[24],"m":"clc"},{"a":5263,"t":"code","b":[105,10],"m":"adc","o":"#$0A"},{"a":5265,"t":"code","b":[197,117],"m":"cmp","oa":117,"o":"tmp_u"},{"a":5267,"t":"code","b":[144,2],"m":"bcc","oa":5271,"o":"b_1497"},{"a":5269,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":5271,"l":"b_1497","t":"code","b":[133,30],"m":"sta","oa":30,"o":"shared_counter_1E","x":[5267]},{"a":5273,"l":"b_1499","t":"code","b":[169,2],"m":"lda","o":"#$02","x":[5288]},{"a":5275,"t":"code","b":[32,29,33],"m":"jsr","oa":8477,"o":"alloc_object_slot"},{"a":5278,"t":"code","b":[173,6,12],"m":"lda","oa":3078,"o":"lowest_enemy_height"},{"a":5281,"t":"code","b":[32,56,18],"m":"jsr","oa":4664,"o":"place_object_low"},{"a":5284,"t":"code","b":[176,4],"m":"bcs","oa":5290,"o":"make_secret_code"},{"a":5286,"t":"code","b":[198,30],"m":"dec","oa":30,"o":"shared_counter_1E"},{"a":5288,"t":"code","b":[208,239],"m":"bne","oa":5273,"o":"b_1499"},{"a":5290,"l":"make_secret_code","c":"Runs the landscape's seed sequence on to its secret code and checks the code typed in. X counts 170 down to 128 (from 165 when $0C71 bit 7 is set, as after a won landscape: the display code at $33C4-$33D5 then makes the last four numbers itself). Each step takes the next seed number as BCD ($339A), compares it with the byte at $0C6F+X (for X = 132-129 the four typed pairs at $0CF3-$0CF0), rotates the match into $0C65, and stores the difference plus the byte at $0100 ($7F, the flags of object 0, the Sentinel on its tower) at $3F00+Y, Y starting from the landscape's offset $0C55 and wrapping within page $3F. On the C64 page $3F is the run-once start-up code at $3F00-$3FB3, so playing a landscape overwrites 43 of its bytes; on the BBC the page was a screen buffer. During play $254F-$2570 reads five of them back: the four for the typed pairs must be $7F, the one before them must not. Then ASL $0C71: bit 7 was set - return ($14D3); clear - on to $14DC.","t":"code","b":[162,170],"m":"ldx","o":"#$AA","x":[5284]},{"a":5292,"t":"code","b":[188,171,11],"m":"ldy","oa":2987,"o":"f_0BAB,x"},{"a":5295,"t":"code","b":[44,113,12],"m":"bit","oa":3185,"o":"no_play_after_build"},{"a":5298,"t":"code","b":[16,2],"m":"bpl","oa":5302,"o":"b_14B6"},{"a":5300,"t":"code","b":[162,165],"m":"ldx","o":"#$A5"},{"a":5302,"l":"b_14B6","t":"code","b":[32,154,51],"m":"jsr","oa":13210,"o":"next_seed_bcd","x":[5298,5324]},{"a":5305,"t":"code","b":[56],"m":"sec"},{"a":5306,"t":"code","b":[253,111,12],"m":"sbc","oa":3183,"o":"enemy_count,x"},{"a":5309,"t":"code","b":[240,1],"m":"beq","oa":5312,"o":"b_14C0"},{"a":5311,"t":"code","b":[24],"m":"clc"},{"a":5312,"l":"b_14C0","t":"code","b":[46,101,12],"m":"rol","oa":3173,"o":"code_check_bits","x":[5309]},{"a":5315,"t":"code","b":[24],"m":"clc"},{"a":5316,"t":"code","b":[109,0,1],"m":"adc","oa":256,"o":"obj_flags"},{"a":5319,"t":"code","b":[153,0,63],"m":"sta","oa":16128,"o":"game_entry,y"},{"a":5322,"t":"code","b":[200],"m":"iny"},{"a":5323,"t":"code","b":[202],"m":"dex"},{"a":5324,"t":"code","b":[48,232],"m":"bmi","oa":5302,"o":"b_14B6"},{"a":5326,"t":"code","b":[14,113,12],"m":"asl","oa":3185,"o":"no_play_after_build"},{"a":5329,"t":"code","b":[144,9],"m":"bcc","oa":5340,"o":"secret_code_verdict"},{"a":5331,"l":"secret_code_return","t":"code","b":[96],"m":"rts","x":[5347]},{"a":5332,"l":"enemy_colour3_by_count","c":"Colour 3 of the play palette for enemy counts 1-8, as C64 colour codes: 5 green, 2 red, 7 yellow, 3 cyan, 2 red, 3 cyan, 2 red, 7 yellow (read at $1443, stored in $86A0). The BBC table gave the same colours as BBC colour numbers (2, 1, 3, 6, 1, 6, 1, 3).","t":"byte","b":[5,2,7,3,2,3,2,7],"x":[5187]},{"a":5340,"l":"secret_code_verdict","c":"End of the secret-code check, when the landscape is about to be played. Unless bits 1-4 of $0C65 are all set (all four typed pairs matched) it returns through $14D3, and the preview goes on to the wrong-code screen ($886F, $1074). On a match it drops its own return address and returns instead into the game start at $356D, through an address computed from $0100: high = $0100 + $B6, low = high + $37, which is $356C only when $0100 holds $7F. The BBC's second constant was $6E, for its game start at $35A4.","t":"code","b":[173,101,12],"m":"lda","oa":3173,"o":"code_check_bits","x":[5329]},{"a":5343,"t":"code","b":[41,30],"m":"and","o":"#$1E"},{"a":5345,"t":"code","b":[201,30],"m":"cmp","o":"#$1E"},{"a":5347,"t":"code","b":[208,238],"m":"bne","oa":5331,"o":"secret_code_return"},{"a":5349,"t":"code","b":[104],"m":"pla"},{"a":5350,"t":"code","b":[104],"m":"pla"},{"a":5351,"t":"code","b":[24],"m":"clc"},{"a":5352,"t":"code","b":[173,0,1],"m":"lda","oa":256,"o":"obj_flags"},{"a":5355,"t":"code","b":[105,182],"m":"adc","o":"#$B6"},{"a":5357,"t":"code","b":[72],"m":"pha"},{"a":5358,"t":"code","b":[24],"m":"clc"},{"a":5359,"t":"code","b":[105,55],"m":"adc","o":"#$37"},{"a":5361,"t":"code","b":[72],"m":"pha"},{"a":5362,"t":"code","b":[96],"m":"rts"},{"a":5363,"l":"enemy_colour2_by_count","c":"Colour 2 of the play palette for enemy counts 1-8, as C64 colour codes: 1 white, 7 yellow, 3 cyan, 2 red, 1 white, 7 yellow, 3 cyan, 2 red (read at $1449, stored in $869F). The BBC's numbers for the same colours were 7, 3, 6, 1, 7, 3, 6, 1.","t":"byte","b":[1,7,3,2,1,7,3,2],"x":[5193]},{"a":5371,"l":"place_enemies_on_peaks","c":"Stands the Sentinel and sentries on the highest ground. $15CC first finds each 4x4 block's highest flat tile (height $AE10+b, tile $AE60+b / $AEA0+b) and the landscape's highest in $06. For each enemy n (count in $0C6F): type $0A40+n = 1 (sentry); lists the blocks at height $06 ($159D), lowering $06 a level ($10) while there are none; picks one of them with a seed number ($31CA) masked by $27 and less than the list length; zeroes that block's height and its eight neighbours' ($AE07-$AE19 + block) so no enemy lands next to another; uses the block's highest tile as (x, z). Enemy 0 is the Sentinel: tile noted in $0C19/$0C1A, type 5, and first a tower (type 6, facing 0) placed under it. Each enemy is placed ($1F16), its meanie records cleared ($1973), its tactics timer $0C30+n set to (seed / 2) AND 63 OR 5 and its turn step $9D37+n to +20 or -20 by the seed's bit 0. Ends with $0C06 = the last enemy's height (high nibble of $06). If $06 reaches 0 before every enemy has a block, $1515 sets the count $0C6F to the $FF that $159D leaves in X, not to the number placed. The BBC routine, tables moved +$5300.","t":"code","b":[32,204,21],"m":"jsr","oa":5580,"o":"find_block_peaks","x":[5175]},{"a":5374,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":5376,"l":"j_1500","t":"code","b":[134,110],"m":"stx","oa":110,"o":"viewer_obj","x":[5519]},{"a":5378,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":5380,"t":"code","b":[157,64,10],"m":"sta","oa":2624,"o":"obj_type,x"},{"a":5383,"l":"b_1507","t":"code","b":[32,157,21],"m":"jsr","oa":5533,"o":"list_blocks_at_height","x":[5395]},{"a":5386,"t":"code","b":[144,15],"m":"bcc","oa":5403,"o":"b_151B"},{"a":5388,"t":"code","b":[165,6],"m":"lda","oa":6,"o":"tile_height_or_poly_top"},{"a":5390,"t":"code","b":[56],"m":"sec"},{"a":5391,"t":"code","b":[233,16],"m":"sbc","o":"#$10"},{"a":5393,"t":"code","b":[133,6],"m":"sta","oa":6,"o":"tile_height_or_poly_top"},{"a":5395,"t":"code","b":[208,242],"m":"bne","oa":5383,"o":"b_1507"},{"a":5397,"t":"code","b":[142,111,12],"m":"stx","oa":3183,"o":"enemy_count"},{"a":5400,"t":"code","b":[76,146,21],"m":"jmp","oa":5522,"o":"j_1592"},{"a":5403,"l":"b_151B","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[5386,5410]},{"a":5406,"t":"code","b":[37,39],"m":"and","oa":39,"o":"tile_count_mask"},{"a":5408,"t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t"},{"a":5410,"t":"code","b":[176,247],"m":"bcs","oa":5403,"o":"b_151B"},{"a":5412,"t":"code","b":[168],"m":"tay"},{"a":5413,"t":"code","b":[190,64,173],"m":"ldx","oa":44352,"o":"tile_block_list,y"},{"a":5416,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":5418,"t":"code","b":[157,7,174],"m":"sta","oa":44551,"o":"block_max_alt_m9,x"},{"a":5421,"t":"code","b":[157,8,174],"m":"sta","oa":44552,"o":"block_max_alt_m8,x"},{"a":5424,"t":"code","b":[157,9,174],"m":"sta","oa":44553,"o":"block_max_alt_m7,x"},{"a":5427,"t":"code","b":[157,15,174],"m":"sta","oa":44559,"o":"block_max_alt_m1,x"},{"a":5430,"t":"code","b":[157,16,174],"m":"sta","oa":44560,"o":"block_max_altitude,x"},{"a":5433,"t":"code","b":[157,17,174],"m":"sta","oa":44561,"o":"block_max_alt_p1,x"},{"a":5436,"t":"code","b":[157,23,174],"m":"sta","oa":44567,"o":"block_max_alt_p7,x"},{"a":5439,"t":"code","b":[157,24,174],"m":"sta","oa":44568,"o":"block_max_alt_p8,x"},{"a":5442,"t":"code","b":[157,25,174],"m":"sta","oa":44569,"o":"block_max_alt_p9,x"},{"a":5445,"t":"code","b":[189,96,174],"m":"lda","oa":44640,"o":"block_max_tile_x,x"},{"a":5448,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":5450,"t":"code","b":[189,160,174],"m":"lda","oa":44704,"o":"block_max_tile_z,x"},{"a":5453,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":5455,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":5457,"t":"code","b":[208,28],"m":"bne","oa":5487,"o":"b_156F"},{"a":5459,"t":"code","b":[141,26,12],"m":"sta","oa":3098,"o":"sentinel_z"},{"a":5462,"t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x"},{"a":5464,"t":"code","b":[141,25,12],"m":"sta","oa":3097,"o":"sentinel_x"},{"a":5467,"t":"code","b":[169,5],"m":"lda","o":"#$05"},{"a":5469,"t":"code","b":[141,64,10],"m":"sta","oa":2624,"o":"obj_type"},{"a":5472,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":5474,"t":"code","b":[32,29,33],"m":"jsr","oa":8477,"o":"alloc_object_slot"},{"a":5477,"t":"code","b":[32,22,31],"m":"jsr","oa":7958,"o":"place_object_on_tile"},{"a":5480,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":5482,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":5485,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":5487,"l":"b_156F","t":"code","b":[32,22,31],"m":"jsr","oa":7958,"o":"place_object_on_tile","x":[5457]},{"a":5490,"t":"code","b":[32,115,25],"m":"jsr","oa":6515,"o":"clear_meanie_search"},{"a":5493,"t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed"},{"a":5496,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":5497,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":5499,"t":"code","b":[9,5],"m":"ora","o":"#$05"},{"a":5501,"t":"code","b":[157,48,12],"m":"sta","oa":3120,"o":"enemy_tactic_timer,x"},{"a":5504,"t":"code","b":[169,20],"m":"lda","o":"#$14"},{"a":5506,"t":"code","b":[144,2],"m":"bcc","oa":5510,"o":"b_1586"},{"a":5508,"t":"code","b":[169,236],"m":"lda","o":"#$EC"},{"a":5510,"l":"b_1586","t":"code","b":[157,55,157],"m":"sta","oa":40247,"o":"enemy_yaw_step,x","x":[5506]},{"a":5513,"t":"code","b":[232],"m":"inx"},{"a":5514,"t":"code","b":[236,111,12],"m":"cpx","oa":3183,"o":"enemy_count"},{"a":5517,"t":"code","b":[176,3],"m":"bcs","oa":5522,"o":"j_1592"},{"a":5519,"t":"code","b":[76,0,21],"m":"jmp","oa":5376,"o":"j_1500"},{"a":5522,"l":"j_1592","t":"code","b":[165,6],"m":"lda","oa":6,"o":"tile_height_or_poly_top","x":[5400,5517]},{"a":5524,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":5525,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":5526,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":5527,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":5528,"t":"code","b":[141,6,12],"m":"sta","oa":3078,"o":"lowest_enemy_height"},{"a":5531,"t":"code","b":[24],"m":"clc"},{"a":5532,"t":"code","b":[96],"m":"rts"},{"a":5533,"l":"list_blocks_at_height","c":"Lists the 4x4 blocks whose highest flat tile ($AE10+b) equals the height in $06 (tile-byte form, height in the high nibble): block numbers to $AD40 onward, the count to $74, and to $27 the mask from $15C4 that just covers the count's highest set bit. Returns C clear when there is at least one, C set when there is none. X is $FF on return either way. The BBC routine, tables moved +$5300.","t":"code","b":[162,63],"m":"ldx","o":"#$3F","x":[5383]},{"a":5535,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":5537,"l":"b_15A1","t":"code","b":[189,16,174],"m":"lda","oa":44560,"o":"block_max_altitude,x","x":[5550]},{"a":5540,"t":"code","b":[197,6],"m":"cmp","oa":6,"o":"tile_height_or_poly_top"},{"a":5542,"t":"code","b":[208,5],"m":"bne","oa":5549,"o":"b_15AD"},{"a":5544,"t":"code","b":[138],"m":"txa"},{"a":5545,"t":"code","b":[153,64,173],"m":"sta","oa":44352,"o":"tile_block_list,y"},{"a":5548,"t":"code","b":[200],"m":"iny"},{"a":5549,"l":"b_15AD","t":"code","b":[202],"m":"dex","x":[5542]},{"a":5550,"t":"code","b":[16,241],"m":"bpl","oa":5537,"o":"b_15A1"},{"a":5552,"t":"code","b":[152],"m":"tya"},{"a":5553,"t":"code","b":[240,15],"m":"beq","oa":5570,"o":"b_15C2"},{"a":5555,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":5557,"t":"code","b":[160,255],"m":"ldy","o":"#$FF"},{"a":5559,"l":"b_15B7","t":"code","b":[10],"m":"asl","o":"a","x":[5561]},{"a":5560,"t":"code","b":[200],"m":"iny"},{"a":5561,"t":"code","b":[144,252],"m":"bcc","oa":5559,"o":"b_15B7"},{"a":5563,"t":"code","b":[185,196,21],"m":"lda","oa":5572,"o":"leading_zero_masks,y"},{"a":5566,"t":"code","b":[133,39],"m":"sta","oa":39,"o":"tile_count_mask"},{"a":5568,"t":"code","b":[24],"m":"clc"},{"a":5569,"t":"code","b":[96],"m":"rts"},{"a":5570,"l":"b_15C2","t":"code","b":[56],"m":"sec","x":[5553]},{"a":5571,"t":"code","b":[96],"m":"rts"},{"a":5572,"l":"leading_zero_masks","c":"$FF $7F $3F $1F $0F $07 $03 $01: entry n has n leading zero bits. Indexed by the number of leading zeros of a count, it gives the smallest all-ones mask covering the count (read at $15BB for the block list and at $86B6 outside this range).","t":"byte","b":[255,127,63,31,15,7,3,1],"x":[5563,34486]},{"a":5580,"l":"find_block_peaks","c":"Splits the landscape into an 8 x 8 grid of 4x4-tile blocks (the last row and column one tile short, the landscape being 31 tiles across) and for block b = 0-63 records the height of its highest flat tile (shape 0) in $AE10+b and that tile's x and z in $AE60+b and $AEA0+b; a block without a flat tile keeps height 0. The highest of all ends up in $06. C64 difference: the tile routine $2BA8 only points $5E/$5F and Y at the tile byte, so this routine loads it itself (LDA ($5E),Y at $1601); the BBC's tile routine returned it in A.","t":"code","b":[162,0],"m":"ldx","o":"#$00","x":[5371]},{"a":5582,"t":"code","b":[134,6],"m":"stx","oa":6,"o":"tile_height_or_poly_top"},{"a":5584,"l":"b_15D0","t":"code","b":[138],"m":"txa","x":[5682]},{"a":5585,"t":"code","b":[41,7],"m":"and","o":"#$07"},{"a":5587,"t":"code","b":[10],"m":"asl","o":"a"},{"a":5588,"t":"code","b":[10],"m":"asl","o":"a"},{"a":5589,"t":"code","b":[133,24],"m":"sta","oa":24,"o":"shared_18"},{"a":5591,"t":"code","b":[138],"m":"txa"},{"a":5592,"t":"code","b":[41,56],"m":"and","o":"#$38"},{"a":5594,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":5595,"t":"code","b":[133,26],"m":"sta","oa":26,"o":"shared_1A"},{"a":5597,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":5599,"t":"code","b":[157,16,174],"m":"sta","oa":44560,"o":"block_max_altitude,x"},{"a":5602,"t":"code","b":[169,4],"m":"lda","o":"#$04"},{"a":5604,"t":"code","b":[133,12],"m":"sta","oa":12,"o":"shared_0C"},{"a":5606,"t":"code","b":[165,26],"m":"lda","oa":26,"o":"shared_1A"},{"a":5608,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":5610,"t":"code","b":[201,28],"m":"cmp","o":"#$1C"},{"a":5612,"t":"code","b":[144,2],"m":"bcc","oa":5616,"o":"b_15F0"},{"a":5614,"t":"code","b":[198,12],"m":"dec","oa":12,"o":"shared_0C"},{"a":5616,"l":"b_15F0","t":"code","b":[169,4],"m":"lda","o":"#$04","x":[5612,5677]},{"a":5618,"t":"code","b":[133,13],"m":"sta","oa":13,"o":"shared_0D"},{"a":5620,"t":"code","b":[165,24],"m":"lda","oa":24,"o":"shared_18"},{"a":5622,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":5624,"t":"code","b":[201,28],"m":"cmp","o":"#$1C"},{"a":5626,"t":"code","b":[144,2],"m":"bcc","oa":5630,"o":"b_15FE"},{"a":5628,"t":"code","b":[198,13],"m":"dec","oa":13,"o":"shared_0D"},{"a":5630,"l":"b_15FE","t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile","x":[5626,5671]},{"a":5633,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":5635,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":5637,"t":"code","b":[208,28],"m":"bne","oa":5667,"o":"b_1623"},{"a":5639,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":5641,"t":"code","b":[41,240],"m":"and","o":"#$F0"},{"a":5643,"t":"code","b":[221,16,174],"m":"cmp","oa":44560,"o":"block_max_altitude,x"},{"a":5646,"t":"code","b":[144,19],"m":"bcc","oa":5667,"o":"b_1623"},{"a":5648,"t":"code","b":[157,16,174],"m":"sta","oa":44560,"o":"block_max_altitude,x"},{"a":5651,"t":"code","b":[197,6],"m":"cmp","oa":6,"o":"tile_height_or_poly_top"},{"a":5653,"t":"code","b":[144,2],"m":"bcc","oa":5657,"o":"b_1619"},{"a":5655,"t":"code","b":[133,6],"m":"sta","oa":6,"o":"tile_height_or_poly_top"},{"a":5657,"l":"b_1619","t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x","x":[5653]},{"a":5659,"t":"code","b":[157,96,174],"m":"sta","oa":44640,"o":"block_max_tile_x,x"},{"a":5662,"t":"code","b":[165,38],"m":"lda","oa":38,"o":"tile_z"},{"a":5664,"t":"code","b":[157,160,174],"m":"sta","oa":44704,"o":"block_max_tile_z,x"},{"a":5667,"l":"b_1623","t":"code","b":[230,36],"m":"inc","oa":36,"o":"tile_x","x":[5637,5646]},{"a":5669,"t":"code","b":[198,13],"m":"dec","oa":13,"o":"shared_0D"},{"a":5671,"t":"code","b":[208,213],"m":"bne","oa":5630,"o":"b_15FE"},{"a":5673,"t":"code","b":[230,38],"m":"inc","oa":38,"o":"tile_z"},{"a":5675,"t":"code","b":[198,12],"m":"dec","oa":12,"o":"shared_0C"},{"a":5677,"t":"code","b":[208,193],"m":"bne","oa":5616,"o":"b_15F0"},{"a":5679,"t":"code","b":[232],"m":"inx"},{"a":5680,"t":"code","b":[224,64],"m":"cpx","o":"#$40"},{"a":5682,"t":"code","b":[144,156],"m":"bcc","oa":5584,"o":"b_15D0"},{"a":5684,"t":"code","b":[96],"m":"rts"},{"a":5685,"l":"update_scanner","c":"Scanner refresh, run by the raster interrupt at most once a frame ($9666, together with the timer gate), or after each scroll step during a pan ($3687). While $0C04 is non-zero (an enemy is draining the player, set by check_player_drain) it redraws the scanner in that state; otherwise it redraws it in state 0 once, when the last state drawn ($0C09) was not 0. The BBC routine.","t":"code","b":[173,4,12],"m":"lda","oa":3076,"o":"scanner_request","x":[13959,38502]},{"a":5688,"t":"code","b":[208,5],"m":"bne","oa":5695,"o":"draw_scanner"},{"a":5690,"t":"code","b":[205,9,12],"m":"cmp","oa":3081,"o":"scanner_state"},{"a":5693,"t":"code","b":[240,94],"m":"beq","oa":5789,"o":"scanner_done"},{"a":5695,"l":"draw_scanner","c":"C64 rewrite of the scanner drawing. A = state: 0 off, 4 static (an enemy is draining the player), 8 solid (pause, from $34C8; $34D7 clears it). Stores it in $0C09 and $16A0, switches sprites 1-3 on for a non-zero state and off for 0 (bits 1-3 of $D015), then fills four rows of eight byte-columns of their sprite data: counter $169F runs 8 down to 1, column address $7000 + the byte at $16AC+counter ($7040-$7042 sprite 1, $7080-$7082 sprite 2, $70C0-$70C1 sprite 3, left to right), rows at +9, +6, +3, +0, each byte taken from $16A1 + state + two noise bits. The noise comes from page 2, 256 seed-generator numbers stored at start-up ($3FA0-$3FAF), read backwards through the operand at $1671. After the left four columns, if $0C4F is $40 (the enemy sees the player but not the player's tile) the rest is drawn in state 0: the half-full scanner. The BBC drew the same pattern into its bitmap, with fresh random numbers, at an address worked out from $0CC2.","t":"code","b":[141,9,12],"m":"sta","oa":3081,"o":"scanner_state","x":[5688,13512,13527]},{"a":5698,"t":"code","b":[141,160,22],"m":"sta","oa":5792,"o":"scanner_fill_state"},{"a":5701,"t":"code","b":[173,9,12],"m":"lda","oa":3081,"o":"scanner_state"},{"a":5704,"t":"code","b":[240,2],"m":"beq","oa":5708,"o":"b_164C"},{"a":5706,"t":"code","b":[169,14],"m":"lda","o":"#$0E"},{"a":5708,"l":"b_164C","t":"code","b":[141,159,22],"m":"sta","oa":5791,"o":"scanner_column","x":[5704]},{"a":5711,"t":"code","b":[173,21,208],"m":"lda","o":"vic_sprite_enable"},{"a":5714,"t":"code","b":[41,241],"m":"and","o":"#$F1"},{"a":5716,"t":"code","b":[13,159,22],"m":"ora","oa":5791,"o":"scanner_column"},{"a":5719,"t":"code","b":[141,21,208],"m":"sta","o":"vic_sprite_enable"},{"a":5722,"t":"code","b":[169,8],"m":"lda","o":"#$08"},{"a":5724,"t":"code","b":[141,159,22],"m":"sta","oa":5791,"o":"scanner_column"},{"a":5727,"l":"b_165F","t":"code","b":[174,159,22],"m":"ldx","oa":5791,"o":"scanner_column","x":[5773,5780,5787]},{"a":5730,"t":"code","b":[189,172,22],"m":"lda","oa":5804,"o":"scanner_column_lo,x"},{"a":5733,"t":"code","b":[133,34],"m":"sta","oa":34,"o":"plot_ptr"},{"a":5735,"t":"code","b":[169,112],"m":"lda","o":"#$70"},{"a":5737,"t":"code","b":[133,35],"m":"sta","oa":35,"o":"plot_ptr_hi"},{"a":5739,"t":"code","b":[160,9],"m":"ldy","o":"#$09"},{"a":5741,"l":"b_166D","t":"code","b":[206,113,22],"m":"dec","oa":5745,"o":"scanner_noise_ptr","x":[5761]},{"a":5744,"t":"code","b":[173,0,2],"m":"lda","oa":512,"o":"random_bytes"},{"a":5745,"t":"note","l":"scanner_noise_ptr","c":"Self-modified operand: the low byte of LDA $0200 at $1670, decremented at $166D before every read, so the scanner's noise walks down page 2 one byte per row, 32 bytes per redraw, wrapping within the page (0 in both snapshots). The code after it finishes draw_scanner's loop: two more DEYs make the row step 3, $1683 counts the columns, and $168F-$169B switches the right half to state 0 when $0C4F is $40.","note":"inside the item at $1670","x":[5741]},{"a":5747,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":5749,"t":"code","b":[13,160,22],"m":"ora","oa":5792,"o":"scanner_fill_state"},{"a":5752,"t":"code","b":[170],"m":"tax"},{"a":5753,"t":"code","b":[189,161,22],"m":"lda","oa":5793,"o":"scanner_fill_bytes,x"},{"a":5756,"t":"code","b":[145,34],"m":"sta","oa":34,"o":"(plot_ptr),y"},{"a":5758,"t":"code","b":[136],"m":"dey"},{"a":5759,"t":"code","b":[136],"m":"dey"},{"a":5760,"t":"code","b":[136],"m":"dey"},{"a":5761,"t":"code","b":[16,234],"m":"bpl","oa":5741,"o":"b_166D"},{"a":5763,"t":"code","b":[206,159,22],"m":"dec","oa":5791,"o":"scanner_column"},{"a":5766,"t":"code","b":[240,21],"m":"beq","oa":5789,"o":"scanner_done"},{"a":5768,"t":"code","b":[173,159,22],"m":"lda","oa":5791,"o":"scanner_column"},{"a":5771,"t":"code","b":[201,4],"m":"cmp","o":"#$04"},{"a":5773,"t":"code","b":[208,208],"m":"bne","oa":5727,"o":"b_165F"},{"a":5775,"t":"code","b":[173,79,12],"m":"lda","oa":3151,"o":"player_tile_hidden"},{"a":5778,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":5780,"t":"code","b":[208,201],"m":"bne","oa":5727,"o":"b_165F"},{"a":5782,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":5784,"t":"code","b":[141,160,22],"m":"sta","oa":5792,"o":"scanner_fill_state"},{"a":5787,"t":"code","b":[240,194],"m":"beq","oa":5727,"o":"b_165F"},{"a":5789,"l":"scanner_done","t":"code","b":[96],"m":"rts","x":[5693,5766]},{"a":5790,"l":"scanner_spare_byte","c":"Unused on the C64: no traced instruction reads or writes it, directly or through an index. It sits where the BBC kept the scanner's random number, which the C64 no longer needs because its noise comes from page 2.","t":"byte","b":[0]},{"a":5791,"l":"scanner_column","c":"draw_scanner's column counter, 8 down to 1 ($165C-$1688); just before the loop it briefly holds the sprite-enable bits ($0E or 0) that are merged into $D015 ($164C-$1657). C64 use of the BBC's block counter byte. 0 in both snapshots.","t":"byte","b":[0],"x":[5708,5716,5724,5727,5763,5768]},{"a":5792,"l":"scanner_fill_state","c":"The state draw_scanner is filling with, 0, 4 or 8 (from A at $1642), ORed with two noise bits to index $16A1; set to 0 at $1698 for the right half when the player's tile is hidden from the enemy. 0 in both snapshots.","t":"byte","b":[0],"x":[5698,5749,5784]},{"a":5793,"l":"scanner_fill_bytes","c":"Sprite data bytes for the scanner, four per state, chosen by state + two noise bits: state 0 $55 $55 $55 $55 (every pixel pair %01), state 4 $B5 $75 $5B $57 (%01 with a few %10 and %11 pairs: the static), state 8 $FF $FF $FF $FF (every pair %11). C64 values for multicolour sprites; the BBC's twelve bytes were pixel bytes for its own screen.","t":"byte","b":[85,85,85,85,181,117,91,87],"x":[5753]},{"a":5801,"t":"byte","b":[255,255,255]},{"a":5804,"l":"scanner_column_lo","c":"Index base for the scanner's column addresses: draw_scanner reads $16AC + counter for counter 8 down to 1, so the table proper is $16AD-$16B4 = $C1 $C0 $82 $81 $80 $42 $41 $40, low bytes of $70xx in sprite data (sprite 1 at $7040, sprite 2 at $7080, sprite 3 at $70C0; counter 8 is the leftmost column). The byte at $16AC itself is the last state-8 fill byte. C64 addition.","t":"byte","b":[255,193,192,130,129,128,66,65],"x":[5730]},{"a":5812,"t":"byte","b":[64]},{"a":5813,"l":"run_enemy_turn","c":"One enemy's turn in the gameplay loop (called from $129F). Saves the stack pointer in $0C0D so that any routine below can abandon the turn ($1AF9). For the enemy numbered in $90 (0-7): the Sentinel (type 5) or a sentry (type 1) has its type put in $0C1C (the object the game-over screen shows, read at $87DA) and, if its object still exists, gets its tactics ($16E6); if its object slot is empty (absorbed, or never made on this landscape) it releases one unit of stored energy as a tree ($1A5D) and draws the tree ($1876). Other slots just end the turn ($16D6). The C64 keeps the enemy number in zero page $90 because $00 and $01 are the 6510's processor port; the BBC kept it in $00.","t":"code","b":[186],"m":"tsx","x":[4767]},{"a":5814,"t":"code","b":[142,13,12],"m":"stx","oa":3085,"o":"tactics_sp"},{"a":5817,"t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot"},{"a":5819,"t":"code","b":[189,64,10],"m":"lda","oa":2624,"o":"obj_type,x"},{"a":5822,"t":"code","b":[201,1],"m":"cmp","o":"#$01"},{"a":5824,"t":"code","b":[240,4],"m":"beq","oa":5830,"o":"b_16C6"},{"a":5826,"t":"code","b":[201,5],"m":"cmp","o":"#$05"},{"a":5828,"t":"code","b":[208,16],"m":"bne","oa":5846,"o":"next_enemy_turn"},{"a":5830,"l":"b_16C6","t":"code","b":[141,28,12],"m":"sta","oa":3100,"o":"picture_obj_type","x":[5824]},{"a":5833,"t":"code","b":[189,0,1],"m":"lda","oa":256,"o":"obj_flags,x"},{"a":5836,"t":"code","b":[16,24],"m":"bpl","oa":5862,"o":"enemy_tactics"},{"a":5838,"t":"code","b":[32,93,26],"m":"jsr","oa":6749,"o":"spend_enemy_energy"},{"a":5841,"t":"code","b":[176,3],"m":"bcs","oa":5846,"o":"next_enemy_turn"},{"a":5843,"t":"code","b":[76,118,24],"m":"jmp","oa":6262,"o":"redraw_dithered"},{"a":5846,"l":"next_enemy_turn","c":"Ends an enemy's turn: takes one number from the seed generator ($31CA) to stir it, steps the enemy number in $90 down (7 after 0) and makes the player ($0B) the viewing object ($6E) again. Every exit of the tactics code comes here, including the abandon path at $1AF9.","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[5828,5841,5867,5925,6146,6202,6276,6909]},{"a":5849,"t":"code","b":[198,144],"m":"dec","oa":144,"o":"enemy_slot"},{"a":5851,"t":"code","b":[16,4],"m":"bpl","oa":5857,"o":"b_16E1"},{"a":5853,"t":"code","b":[169,7],"m":"lda","o":"#$07"},{"a":5855,"t":"code","b":[133,144],"m":"sta","oa":144,"o":"enemy_slot"},{"a":5857,"l":"b_16E1","t":"code","b":[165,11],"m":"lda","oa":11,"o":"player_obj","x":[5851]},{"a":5859,"t":"code","b":[133,110],"m":"sta","oa":110,"o":"viewer_obj"},{"a":5861,"t":"code","b":[96],"m":"rts"},{"a":5862,"l":"enemy_tactics","c":"What the Sentinel or a sentry (X = enemy 0-7) does on its turn. Acts only when its tactics timer $0C30+X has run down to 1; re-arms it to 4 and sets the view arc $0C68 to 20 yaw units (one screen width). Then, in order: a meanie it has made is handled first ($16FF); energy it holds is put back as a tree ($1773); it looks for a robot to drain ($1795) or else a tree or boulder ($17E0); failing all, it turns ($17F9). A target found goes to $1825 (drain timer, draining, meanie making) and every change is redrawn at $1876/$187B. The tactics timer values it sets: 4 by default, 10 after a meanie turns, 30 after a drain, 50 after making a meanie. The BBC routine except for $90/$91 in place of the BBC's $00/$01 and the two turning sounds ($1750, $181D), which the C64 plays by number alone where the BBC also passed two pitches in X and Y.","t":"code","b":[189,48,12],"m":"lda","oa":3120,"o":"enemy_tactic_timer,x","x":[5836]},{"a":5865,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":5867,"t":"code","b":[176,233],"m":"bcs","oa":5846,"o":"next_enemy_turn"},{"a":5869,"t":"code","b":[169,4],"m":"lda","o":"#$04"},{"a":5871,"t":"code","b":[157,48,12],"m":"sta","oa":3120,"o":"enemy_tactic_timer,x"},{"a":5874,"t":"code","b":[169,20],"m":"lda","o":"#$14"},{"a":5876,"t":"code","b":[141,104,12],"m":"sta","oa":3176,"o":"enemy_view_arc"},{"a":5879,"t":"code","b":[189,160,12],"m":"lda","oa":3232,"o":"enemy_meanie_obj,x"},{"a":5882,"t":"code","b":[16,3],"m":"bpl","oa":5887,"o":"meanie_turn"},{"a":5884,"t":"code","b":[76,115,23],"m":"jmp","oa":6003,"o":"tactics_spend_energy"},{"a":5887,"l":"meanie_turn","c":"enemy_tactics, meanie part (A = the meanie's object, now the viewer in $6E). If its target robot ($0CA8+X) no longer exists, stops the enemy's drain timer and turns the meanie back into a tree ($1758). Otherwise it looks at the robot ($1887): outside its 20-unit arc it turns 8 units towards it ($0C0E = +8 or -8, $1728; sound 1 through $3470; tactics timer 10); inside, if the robot is the player's and the robot or its tile is visible ($14 non-zero) it forces a hyperspace ($2156) and puts 4, meanie, in $0C1C; if not the player's it becomes a tree again with the drain timer stopped, and if not visible, a tree again ($175D: type 2, $0CA0+X = $80).","t":"code","b":[133,110],"m":"sta","oa":110,"o":"viewer_obj","x":[5882]},{"a":5889,"t":"code","b":[188,168,12],"m":"ldy","oa":3240,"o":"enemy_target,x"},{"a":5892,"t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y"},{"a":5895,"t":"code","b":[48,79],"m":"bmi","oa":5976,"o":"meanie_target_lost"},{"a":5897,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":5899,"t":"code","b":[32,135,24],"m":"jsr","oa":6279,"o":"check_enemy_sight"},{"a":5902,"t":"code","b":[173,87,12],"m":"lda","oa":3159,"o":"obj_rel_yaw_hi"},{"a":5905,"t":"code","b":[201,20],"m":"cmp","o":"#$14"},{"a":5907,"t":"code","b":[176,19],"m":"bcs","oa":5928,"o":"meanie_turn_toward"},{"a":5909,"t":"code","b":[196,11],"m":"cpy","oa":11,"o":"player_obj"},{"a":5911,"t":"code","b":[208,63],"m":"bne","oa":5976,"o":"meanie_target_lost"},{"a":5913,"t":"code","b":[165,20],"m":"lda","oa":20,"o":"target_seen_bits"},{"a":5915,"t":"code","b":[240,64],"m":"beq","oa":5981,"o":"meanie_back_to_tree"},{"a":5917,"t":"code","b":[32,86,33],"m":"jsr","oa":8534,"o":"hyperspace_player"},{"a":5920,"t":"code","b":[169,4],"m":"lda","o":"#$04"},{"a":5922,"t":"code","b":[141,28,12],"m":"sta","oa":3100,"o":"picture_obj_type"},{"a":5925,"t":"code","b":[76,214,22],"m":"jmp","oa":5846,"o":"next_enemy_turn"},{"a":5928,"l":"meanie_turn_toward","t":"code","b":[169,8],"m":"lda","o":"#$08","x":[5907]},{"a":5930,"t":"code","b":[44,87,12],"m":"bit","oa":3159,"o":"obj_rel_yaw_hi"},{"a":5933,"t":"code","b":[16,2],"m":"bpl","oa":5937,"o":"b_1731"},{"a":5935,"t":"code","b":[169,248],"m":"lda","o":"#$F8"},{"a":5937,"l":"b_1731","t":"code","b":[141,14,12],"m":"sta","oa":3086,"o":"meanie_turn_step","x":[5933]},{"a":5940,"t":"code","b":[164,144],"m":"ldy","oa":144,"o":"enemy_slot"},{"a":5942,"t":"code","b":[190,160,12],"m":"ldx","oa":3232,"o":"enemy_meanie_obj,y"},{"a":5945,"t":"code","b":[138],"m":"txa"},{"a":5946,"t":"code","b":[32,244,26],"m":"jsr","oa":6900,"o":"abort_if_visible_in_pan"},{"a":5949,"t":"code","b":[189,192,9],"m":"lda","oa":2496,"o":"obj_yaw,x"},{"a":5952,"t":"code","b":[24],"m":"clc"},{"a":5953,"t":"code","b":[109,14,12],"m":"adc","oa":3086,"o":"meanie_turn_step"},{"a":5956,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":5959,"t":"code","b":[169,10],"m":"lda","o":"#$0A"},{"a":5961,"t":"code","b":[153,48,12],"m":"sta","oa":3120,"o":"enemy_tactic_timer,y"},{"a":5964,"t":"code","b":[138],"m":"txa"},{"a":5965,"t":"code","b":[72],"m":"pha"},{"a":5966,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":5968,"t":"code","b":[32,112,52],"m":"jsr","oa":13424,"o":"make_sound"},{"a":5971,"t":"code","b":[104],"m":"pla"},{"a":5972,"t":"code","b":[170],"m":"tax"},{"a":5973,"t":"code","b":[76,123,24],"m":"jmp","oa":6267,"o":"redraw_at_once"},{"a":5976,"l":"meanie_target_lost","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[5895,5911]},{"a":5978,"t":"code","b":[157,32,12],"m":"sta","oa":3104,"o":"enemy_drain_timer,x"},{"a":5981,"l":"meanie_back_to_tree","t":"code","b":[164,144],"m":"ldy","oa":144,"o":"enemy_slot","x":[5915]},{"a":5983,"t":"code","b":[190,160,12],"m":"ldx","oa":3232,"o":"enemy_meanie_obj,y"},{"a":5986,"t":"code","b":[138],"m":"txa"},{"a":5987,"t":"code","b":[32,244,26],"m":"jsr","oa":6900,"o":"abort_if_visible_in_pan"},{"a":5990,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":5992,"t":"code","b":[153,160,12],"m":"sta","oa":3232,"o":"enemy_meanie_obj,y"},{"a":5995,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":5997,"t":"code","b":[157,64,10],"m":"sta","oa":2624,"o":"obj_type,x"},{"a":6000,"t":"code","b":[76,118,24],"m":"jmp","oa":6262,"o":"redraw_dithered"},{"a":6003,"l":"tactics_spend_energy","c":"enemy_tactics with no meanie: the enemy becomes the viewer ($6E) and releases one unit of any energy it holds as a tree ($1A5D); if that worked the turn ends by drawing the tree ($1876). Otherwise, when $0CB8+X bit 7 asks for it, it searches straight away for a tree or boulder to drain ($1AB0): found, it resets its meanie search start ($0C80+X = 64) and drains it ($17EA); not found, it clears that bit and goes on to $1795.","t":"code","b":[134,110],"m":"stx","oa":110,"o":"viewer_obj","x":[5884]},{"a":6005,"t":"code","b":[32,93,26],"m":"jsr","oa":6749,"o":"spend_enemy_energy"},{"a":6008,"t":"code","b":[176,3],"m":"bcs","oa":6013,"o":"tactics_drain_scan"},{"a":6010,"t":"code","b":[76,118,24],"m":"jmp","oa":6262,"o":"redraw_dithered"},{"a":6013,"l":"tactics_drain_scan","t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot","x":[6008]},{"a":6015,"t":"code","b":[189,184,12],"m":"lda","oa":3256,"o":"enemy_drain_scan,x"},{"a":6018,"t":"code","b":[16,17],"m":"bpl","oa":6037,"o":"tactics_find_robot"},{"a":6020,"t":"code","b":[32,176,26],"m":"jsr","oa":6832,"o":"find_drainable_object"},{"a":6023,"t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot"},{"a":6025,"t":"code","b":[176,7],"m":"bcs","oa":6034,"o":"b_1792"},{"a":6027,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":6029,"t":"code","b":[157,128,12],"m":"sta","oa":3200,"o":"enemy_meanie_scan,x"},{"a":6032,"t":"code","b":[208,88],"m":"bne","oa":6122,"o":"tactics_drain_now"},{"a":6034,"l":"b_1792","t":"code","b":[94,184,12],"m":"lsr","oa":3256,"o":"enemy_drain_scan,x","x":[6025]},{"a":6037,"l":"tactics_find_robot","c":"enemy_tactics, robot search. With its drain timer ($0C20+X) running it first re-checks its present target ($0CA8+X) and keeps it ($1825) if the target is still visible; otherwise stops the timer. Then it looks at all 64 objects as robots ($1887 with A = 0), from 63 down: the first robot whose tile it can see, with no tree in the way ($0C76 bit 6 clear), becomes the target ($1825); a player's robot seen without its tile is remembered in $0F. If only that was found, and the player is not the target it last failed to make a meanie for ($0C90+X), it clears its meanie records ($1973) and takes the player as target with visibility $40. Otherwise ($17E0) it stops the drain timer and looks for a tree or boulder to drain ($1AB0); if there is one it drains it ($1A08, tactics timer 30); if not, it may turn ($17F9).","t":"code","b":[189,32,12],"m":"lda","oa":3104,"o":"enemy_drain_timer,x","x":[6018]},{"a":6040,"t":"code","b":[240,18],"m":"beq","oa":6060,"o":"b_17AC"},{"a":6042,"t":"code","b":[188,168,12],"m":"ldy","oa":3240,"o":"enemy_target,x"},{"a":6045,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":6047,"t":"code","b":[32,135,24],"m":"jsr","oa":6279,"o":"check_enemy_sight"},{"a":6050,"t":"code","b":[165,20],"m":"lda","oa":20,"o":"target_seen_bits"},{"a":6052,"t":"code","b":[240,3],"m":"beq","oa":6057,"o":"b_17A9"},{"a":6054,"t":"code","b":[76,37,24],"m":"jmp","oa":6181,"o":"tactics_have_target"},{"a":6057,"l":"b_17A9","t":"code","b":[157,32,12],"m":"sta","oa":3104,"o":"enemy_drain_timer,x","x":[6052]},{"a":6060,"l":"b_17AC","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[6040]},{"a":6062,"t":"code","b":[133,15],"m":"sta","oa":15,"o":"y_save_or_obscured"},{"a":6064,"t":"code","b":[160,63],"m":"ldy","o":"#$3F"},{"a":6066,"l":"b_17B2","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[6091]},{"a":6068,"t":"code","b":[32,135,24],"m":"jsr","oa":6279,"o":"check_enemy_sight"},{"a":6071,"t":"code","b":[173,118,12],"m":"lda","oa":3190,"o":"tree_blocks_view"},{"a":6074,"t":"code","b":[41,64],"m":"and","o":"#$40"},{"a":6076,"t":"code","b":[208,12],"m":"bne","oa":6090,"o":"b_17CA"},{"a":6078,"t":"code","b":[165,20],"m":"lda","oa":20,"o":"target_seen_bits"},{"a":6080,"t":"code","b":[240,8],"m":"beq","oa":6090,"o":"b_17CA"},{"a":6082,"t":"code","b":[48,97],"m":"bmi","oa":6181,"o":"tactics_have_target"},{"a":6084,"t":"code","b":[196,11],"m":"cpy","oa":11,"o":"player_obj"},{"a":6086,"t":"code","b":[208,2],"m":"bne","oa":6090,"o":"b_17CA"},{"a":6088,"t":"code","b":[132,15],"m":"sty","oa":15,"o":"y_save_or_obscured"},{"a":6090,"l":"b_17CA","t":"code","b":[136],"m":"dey","x":[6076,6080,6086]},{"a":6091,"t":"code","b":[16,229],"m":"bpl","oa":6066,"o":"b_17B2"},{"a":6093,"t":"code","b":[164,15],"m":"ldy","oa":15,"o":"y_save_or_obscured"},{"a":6095,"t":"code","b":[48,15],"m":"bmi","oa":6112,"o":"tactics_find_tree_or_boulder"},{"a":6097,"t":"code","b":[152],"m":"tya"},{"a":6098,"t":"code","b":[221,144,12],"m":"cmp","oa":3216,"o":"enemy_meanie_fail_obj,x"},{"a":6101,"t":"code","b":[240,9],"m":"beq","oa":6112,"o":"tactics_find_tree_or_boulder"},{"a":6103,"t":"code","b":[32,115,25],"m":"jsr","oa":6515,"o":"clear_meanie_search"},{"a":6106,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":6108,"t":"code","b":[133,20],"m":"sta","oa":20,"o":"target_seen_bits"},{"a":6110,"t":"code","b":[208,69],"m":"bne","oa":6181,"o":"tactics_have_target"},{"a":6112,"l":"tactics_find_tree_or_boulder","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[6095,6101]},{"a":6114,"t":"code","b":[157,32,12],"m":"sta","oa":3104,"o":"enemy_drain_timer,x"},{"a":6117,"t":"code","b":[32,176,26],"m":"jsr","oa":6832,"o":"find_drainable_object"},{"a":6120,"t":"code","b":[176,15],"m":"bcs","oa":6137,"o":"tactics_turn"},{"a":6122,"l":"tactics_drain_now","t":"code","b":[32,8,26],"m":"jsr","oa":6664,"o":"drain_target_energy","x":[6032]},{"a":6125,"t":"code","b":[176,19],"m":"bcs","oa":6146,"o":"tactics_end_turn"},{"a":6127,"t":"code","b":[164,144],"m":"ldy","oa":144,"o":"enemy_slot"},{"a":6129,"t":"code","b":[169,30],"m":"lda","o":"#$1E"},{"a":6131,"t":"code","b":[153,48,12],"m":"sta","oa":3120,"o":"enemy_tactic_timer,y"},{"a":6134,"t":"code","b":[76,118,24],"m":"jmp","oa":6262,"o":"redraw_dithered"},{"a":6137,"l":"tactics_turn","c":"enemy_tactics, turning: once the turn timer $0C28+X has run down to 1 (otherwise the turn ends, $1802), and if the change may be drawn now ($1AF4), adds the enemy's step $9D37+X (+20 or -20 units of a 256-unit circle) to its yaw $09C0+X, sets the turn timer to 200, clears its meanie records ($1973), plays sound 0 ($3470; the BBC also passed pitches 7 and 120 in X and Y) and redraws it at once ($187B).","t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot","x":[6120]},{"a":6139,"t":"code","b":[189,40,12],"m":"lda","oa":3112,"o":"enemy_turn_timer,x"},{"a":6142,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":6144,"t":"code","b":[144,3],"m":"bcc","oa":6149,"o":"b_1805"},{"a":6146,"l":"tactics_end_turn","t":"code","b":[76,214,22],"m":"jmp","oa":5846,"o":"next_enemy_turn","x":[6125]},{"a":6149,"l":"b_1805","t":"code","b":[138],"m":"txa","x":[6144]},{"a":6150,"t":"code","b":[32,244,26],"m":"jsr","oa":6900,"o":"abort_if_visible_in_pan"},{"a":6153,"t":"code","b":[189,192,9],"m":"lda","oa":2496,"o":"obj_yaw,x"},{"a":6156,"t":"code","b":[24],"m":"clc"},{"a":6157,"t":"code","b":[125,55,157],"m":"adc","oa":40247,"o":"enemy_yaw_step,x"},{"a":6160,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":6163,"t":"code","b":[169,200],"m":"lda","o":"#$C8"},{"a":6165,"t":"code","b":[157,40,12],"m":"sta","oa":3112,"o":"enemy_turn_timer,x"},{"a":6168,"t":"code","b":[32,115,25],"m":"jsr","oa":6515,"o":"clear_meanie_search"},{"a":6171,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":6173,"t":"code","b":[32,112,52],"m":"jsr","oa":13424,"o":"make_sound"},{"a":6176,"t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot"},{"a":6178,"t":"code","b":[76,123,24],"m":"jmp","oa":6267,"o":"redraw_at_once"},{"a":6181,"l":"tactics_have_target","c":"enemy_tactics with a target in Y: records it in $0CA8+X and its visibility ($14) in $0CB0+X. A stopped drain timer ($0C20+X = 0) is started at 120 and the turn ends; a timer still above 1 ends the turn. At 1: if the target's tile is visible ($14 bit 7) the enemy drains it ($1A08), sets its tactics timer to 30 and redraws the object unless it was the player; if only the robot is visible it goes on to make a meanie ($1852).","t":"code","b":[152],"m":"tya","x":[6054,6082,6110]},{"a":6182,"t":"code","b":[157,168,12],"m":"sta","oa":3240,"o":"enemy_target,x"},{"a":6185,"t":"code","b":[165,20],"m":"lda","oa":20,"o":"target_seen_bits"},{"a":6187,"t":"code","b":[157,176,12],"m":"sta","oa":3248,"o":"enemy_sees_target,x"},{"a":6190,"t":"code","b":[189,32,12],"m":"lda","oa":3104,"o":"enemy_drain_timer,x"},{"a":6193,"t":"code","b":[201,1],"m":"cmp","o":"#$01"},{"a":6195,"t":"code","b":[176,8],"m":"bcs","oa":6205,"o":"b_183D"},{"a":6197,"t":"code","b":[169,120],"m":"lda","o":"#$78"},{"a":6199,"t":"code","b":[157,32,12],"m":"sta","oa":3104,"o":"enemy_drain_timer,x"},{"a":6202,"l":"tactics_wait","t":"code","b":[76,214,22],"m":"jmp","oa":5846,"o":"next_enemy_turn","x":[6205]},{"a":6205,"l":"b_183D","t":"code","b":[208,251],"m":"bne","oa":6202,"o":"tactics_wait","x":[6195]},{"a":6207,"t":"code","b":[165,20],"m":"lda","oa":20,"o":"target_seen_bits"},{"a":6209,"t":"code","b":[16,15],"m":"bpl","oa":6226,"o":"tactics_try_meanie"},{"a":6211,"t":"code","b":[32,8,26],"m":"jsr","oa":6664,"o":"drain_target_energy"},{"a":6214,"t":"code","b":[164,144],"m":"ldy","oa":144,"o":"enemy_slot"},{"a":6216,"t":"code","b":[169,30],"m":"lda","o":"#$1E"},{"a":6218,"t":"code","b":[153,48,12],"m":"sta","oa":3120,"o":"enemy_tactic_timer,y"},{"a":6221,"t":"code","b":[176,53],"m":"bcs","oa":6276,"o":"tactics_done"},{"a":6223,"t":"code","b":[76,118,24],"m":"jmp","oa":6262,"o":"redraw_dithered"},{"a":6226,"l":"tactics_try_meanie","c":"enemy_tactics, meanie making: $1986 looks for a tree near the target. Success: tactics timer 50 and the new meanie ($0CA0+Y) drawn dithered ($1876). Failure: if the enemy has failed fewer than two times ($0C98+Y), $0CB8+Y bit 7 is set so its next turn looks for a tree or boulder to drain; otherwise its drain timer is stopped.","t":"code","b":[32,134,25],"m":"jsr","oa":6534,"o":"find_meanie_tree","x":[6209]},{"a":6229,"t":"code","b":[164,144],"m":"ldy","oa":144,"o":"enemy_slot"},{"a":6231,"t":"code","b":[144,21],"m":"bcc","oa":6254,"o":"b_186E"},{"a":6233,"t":"code","b":[185,152,12],"m":"lda","oa":3224,"o":"enemy_meanie_fail_count,y"},{"a":6236,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":6238,"t":"code","b":[176,7],"m":"bcs","oa":6247,"o":"b_1867"},{"a":6240,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":6242,"t":"code","b":[153,184,12],"m":"sta","oa":3256,"o":"enemy_drain_scan,y"},{"a":6245,"t":"code","b":[208,29],"m":"bne","oa":6276,"o":"tactics_done"},{"a":6247,"l":"b_1867","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[6238]},{"a":6249,"t":"code","b":[153,32,12],"m":"sta","oa":3104,"o":"enemy_drain_timer,y"},{"a":6252,"t":"code","b":[240,22],"m":"beq","oa":6276,"o":"tactics_done"},{"a":6254,"l":"b_186E","t":"code","b":[169,50],"m":"lda","o":"#$32","x":[6231]},{"a":6256,"t":"code","b":[153,48,12],"m":"sta","oa":3120,"o":"enemy_tactic_timer,y"},{"a":6259,"t":"code","b":[190,160,12],"m":"ldx","oa":3232,"o":"enemy_meanie_obj,y"},{"a":6262,"l":"redraw_dithered","c":"Shared exit of the tactics code: $1876 first sets $0C6D to $40 (the BBC's flag for a dithered redraw); $187B, used after turns, does not. Both make object X the current object ($91; the BBC used $01), the player the viewer, redraw it ($1F9F) and end the turn ($16D6).","t":"code","b":[169,64],"m":"lda","o":"#$40","x":[5843,6000,6010,6134,6223]},{"a":6264,"t":"code","b":[141,109,12],"m":"sta","oa":3181,"o":"redraw_style"},{"a":6267,"l":"redraw_at_once","t":"code","b":[134,145],"m":"stx","oa":145,"o":"current_obj","x":[5973,6178]},{"a":6269,"t":"code","b":[165,11],"m":"lda","oa":11,"o":"player_obj"},{"a":6271,"t":"code","b":[133,110],"m":"sta","oa":110,"o":"viewer_obj"},{"a":6273,"t":"code","b":[32,159,31],"m":"jsr","oa":8095,"o":"redraw_object"},{"a":6276,"l":"tactics_done","t":"code","b":[76,214,22],"m":"jmp","oa":5846,"o":"next_enemy_turn","x":[6221,6245,6252]},{"a":6279,"l":"check_enemy_sight","c":"Can the viewing object ($6E, an enemy or a meanie) see object Y, which must be of type A? Returns $14 with bit 7 set if it can see the object's tile and, for a robot, bit 6 if it can see the robot itself; $0C76 gets the corresponding tree-in-the-way bits. C is set only when the object is outside the viewer's arc ($0C68). X and Y are kept (X in $191E; Y also left in $0C58). Clears $14, gives up (C clear) if object Y is unused or of another type, gets the angles to it ($8401), then passes through an anti-cracker step ($18A2) into the arc and gaze checks ($18B8). The BBC routine with its callees moved.","t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t","x":[5899,6047,6068,6619,6883]},{"a":6281,"t":"code","b":[142,30,25],"m":"stx","oa":6430,"o":"sight_saved_x"},{"a":6284,"t":"code","b":[140,88,12],"m":"sty","oa":3160,"o":"drain_target"},{"a":6287,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":6289,"t":"code","b":[133,20],"m":"sta","oa":20,"o":"target_seen_bits"},{"a":6291,"t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y"},{"a":6294,"t":"code","b":[48,126],"m":"bmi","oa":6422,"o":"sight_done_clear"},{"a":6296,"t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y"},{"a":6299,"t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t"},{"a":6301,"t":"code","b":[208,119],"m":"bne","oa":6422,"o":"sight_done_clear"},{"a":6303,"t":"code","b":[32,1,132],"m":"jsr","oa":33793,"o":"get_object_angles"},{"a":6306,"l":"derive_altered_seed","c":"Anti-cracker step run on every sight check: $0C75 = the byte at $0F3D + 7 if its low digit is 9, else + 1, so $0C75 always ends up the larger. $0F3D is the operand of LDA #$00 at $0F3C, written by $2C5F; the check at $322F (X = 7 from $322D) calls $31A2 when $0C75 is below it. Same as the BBC.","t":"code","b":[162,7],"m":"ldx","o":"#$07"},{"a":6308,"t":"code","b":[189,54,15],"m":"lda","oa":3894,"o":"f_0F36,x"},{"a":6311,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":6313,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":6315,"t":"code","b":[201,9],"m":"cmp","o":"#$09"},{"a":6317,"t":"code","b":[240,2],"m":"beq","oa":6321,"o":"b_18B1"},{"a":6319,"t":"code","b":[162,1],"m":"ldx","o":"#$01"},{"a":6321,"l":"b_18B1","t":"code","b":[138],"m":"txa","x":[6317]},{"a":6322,"t":"code","b":[24],"m":"clc"},{"a":6323,"t":"code","b":[101,116],"m":"adc","oa":116,"o":"tmp_t"},{"a":6325,"t":"code","b":[141,117,12],"m":"sta","oa":3189,"o":"tamper_seed"},{"a":6328,"l":"check_sight_arc","c":"Second half of check_enemy_sight. Leaves with C set when the object's yaw from the viewer ($0C57) is outside the arc: $0C57 - 10 + $0C68/2 must be below $0C68 (20 for enemies and meanies, 40 in the meanie-tree search). Otherwise copies the ground-plane angle $8A/$8B to the gaze yaw $3D/$3E and makes one trace, or two for a robot ($4C = 0; counter $1E): first at the robot itself with $0C6E bit 7 set, then at its tile, 224/256 of a tile lower. Each trace gets the pitch from the height difference ($933D), builds the gaze vector ($1C54), follows it ($1CDD) and rotates the results into $14 (target seen, from $0C56) and $0C76 (tree seen, from $0CDD). Ends with C clear.","t":"code","b":[173,104,12],"m":"lda","oa":3176,"o":"enemy_view_arc"},{"a":6331,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":6332,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":6334,"t":"code","b":[173,87,12],"m":"lda","oa":3159,"o":"obj_rel_yaw_hi"},{"a":6337,"t":"code","b":[56],"m":"sec"},{"a":6338,"t":"code","b":[233,10],"m":"sbc","o":"#$0A"},{"a":6340,"t":"code","b":[24],"m":"clc"},{"a":6341,"t":"code","b":[101,116],"m":"adc","oa":116,"o":"tmp_t"},{"a":6343,"t":"code","b":[205,104,12],"m":"cmp","oa":3176,"o":"enemy_view_arc"},{"a":6346,"t":"code","b":[176,75],"m":"bcs","oa":6423,"o":"sight_done"},{"a":6348,"t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo"},{"a":6350,"t":"code","b":[133,61],"m":"sta","oa":61,"o":"vec_yaw_lo_or_points_ptr_hi"},{"a":6352,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":6354,"t":"code","b":[133,62],"m":"sta","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":6356,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":6358,"t":"code","b":[133,30],"m":"sta","oa":30,"o":"shared_counter_1E"},{"a":6360,"t":"code","b":[165,76],"m":"lda","oa":76,"o":"obj_type_measured"},{"a":6362,"t":"code","b":[208,40],"m":"bne","oa":6404,"o":"b_1904"},{"a":6364,"t":"code","b":[56],"m":"sec"},{"a":6365,"t":"code","b":[110,110,12],"m":"ror","oa":3182,"o":"gaze_for_robot"},{"a":6368,"t":"code","b":[165,129],"m":"lda","oa":129,"o":"dy_lo"},{"a":6370,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":6372,"t":"code","b":[165,132],"m":"lda","oa":132,"o":"dy_hi"},{"a":6374,"l":"b_18E6","t":"code","b":[32,61,147],"m":"jsr","oa":37693,"o":"get_pitch_angle_delta","x":[6420]},{"a":6377,"t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo"},{"a":6379,"t":"code","b":[133,63],"m":"sta","oa":63,"o":"vec_pitch_lo_or_edge_y1_hi"},{"a":6381,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":6383,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":6385,"t":"code","b":[133,64],"m":"sta","oa":64,"o":"vec_pitch_hi_or_edge_scale"},{"a":6387,"t":"code","b":[32,84,28],"m":"jsr","oa":7252,"o":"angles_to_vector"},{"a":6390,"t":"code","b":[32,221,28],"m":"jsr","oa":7389,"o":"trace_gaze"},{"a":6393,"t":"code","b":[46,86,12],"m":"rol","oa":3158,"o":"gaze_hits_target_sq"},{"a":6396,"t":"code","b":[102,20],"m":"ror","oa":20,"o":"target_seen_bits"},{"a":6398,"t":"code","b":[46,221,12],"m":"rol","oa":3293,"o":"gaze_sees_tree"},{"a":6401,"t":"code","b":[110,118,12],"m":"ror","oa":3190,"o":"tree_blocks_view"},{"a":6404,"l":"b_1904","t":"code","b":[78,110,12],"m":"lsr","oa":3182,"o":"gaze_for_robot","x":[6362]},{"a":6407,"t":"code","b":[165,129],"m":"lda","oa":129,"o":"dy_lo"},{"a":6409,"t":"code","b":[56],"m":"sec"},{"a":6410,"t":"code","b":[233,224],"m":"sbc","o":"#$E0"},{"a":6412,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":6414,"t":"code","b":[165,132],"m":"lda","oa":132,"o":"dy_hi"},{"a":6416,"t":"code","b":[233,0],"m":"sbc","o":"#$00"},{"a":6418,"t":"code","b":[198,30],"m":"dec","oa":30,"o":"shared_counter_1E"},{"a":6420,"t":"code","b":[208,208],"m":"bne","oa":6374,"o":"b_18E6"},{"a":6422,"l":"sight_done_clear","t":"code","b":[24],"m":"clc","x":[6294,6301]},{"a":6423,"l":"sight_done","t":"code","b":[174,30,25],"m":"ldx","oa":6430,"o":"sight_saved_x","x":[6346]},{"a":6426,"t":"code","b":[172,88,12],"m":"ldy","oa":3160,"o":"drain_target"},{"a":6429,"t":"code","b":[96],"m":"rts"},{"a":6430,"l":"sight_saved_x","c":"Where check_enemy_sight keeps X from entry ($1889) to exit ($1917), so X comes back unchanged.","t":"byte","b":[0],"x":[6281,6423]},{"a":6431,"l":"check_player_drain","c":"Is an enemy draining the player? Looks at objects 0-7 for a Sentinel or sentry (types 5 and 1) whose target ($0CA8+n) is the player's robot ($0B) and whose drain timer ($0C20+n) is running. Found: $0C04 = 4 (the scanner fills with static) and $0C4F = that enemy's view of the player ($0CB0+n: $80 tile visible, $40 robot only); one that sees the tile ends the search, one that sees only the robot lets it go on. None: both 0. Then puts 4 or 0 in the sound selector $0C73, and if that changed and the old value was not 3, silences SID voice 2 (OSBYTE $15 with X = 1 through $3527). Called from the gameplay loop ($12BB). C64 changes: the old selector is kept in $1972 and reloaded (the BBC kept it in A), the flags are saved around the store with PHP/PLP (not needed: STY leaves them alone), the flush is of channel 1 where the BBC flushed its buffer 6, and the BBC's store of $12 into its sound block ($5910) is gone.","t":"code","b":[160,0],"m":"ldy","o":"#$00","x":[4795]},{"a":6433,"t":"code","b":[132,116],"m":"sty","oa":116,"o":"tmp_t"},{"a":6435,"t":"code","b":[162,7],"m":"ldx","o":"#$07"},{"a":6437,"l":"b_1925","t":"code","b":[189,0,1],"m":"lda","oa":256,"o":"obj_flags,x","x":[6475]},{"a":6440,"t":"code","b":[48,32],"m":"bmi","oa":6474,"o":"b_194A"},{"a":6442,"t":"code","b":[189,64,10],"m":"lda","oa":2624,"o":"obj_type,x"},{"a":6445,"t":"code","b":[201,1],"m":"cmp","o":"#$01"},{"a":6447,"t":"code","b":[240,4],"m":"beq","oa":6453,"o":"b_1935"},{"a":6449,"t":"code","b":[201,5],"m":"cmp","o":"#$05"},{"a":6451,"t":"code","b":[208,21],"m":"bne","oa":6474,"o":"b_194A"},{"a":6453,"l":"b_1935","t":"code","b":[189,168,12],"m":"lda","oa":3240,"o":"enemy_target,x","x":[6447]},{"a":6456,"t":"code","b":[197,11],"m":"cmp","oa":11,"o":"player_obj"},{"a":6458,"t":"code","b":[208,14],"m":"bne","oa":6474,"o":"b_194A"},{"a":6460,"t":"code","b":[189,32,12],"m":"lda","oa":3104,"o":"enemy_drain_timer,x"},{"a":6463,"t":"code","b":[240,9],"m":"beq","oa":6474,"o":"b_194A"},{"a":6465,"t":"code","b":[160,4],"m":"ldy","o":"#$04"},{"a":6467,"t":"code","b":[189,176,12],"m":"lda","oa":3248,"o":"enemy_sees_target,x"},{"a":6470,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":6472,"t":"code","b":[48,3],"m":"bmi","oa":6477,"o":"b_194D"},{"a":6474,"l":"b_194A","t":"code","b":[202],"m":"dex","x":[6440,6451,6458,6463]},{"a":6475,"t":"code","b":[16,216],"m":"bpl","oa":6437,"o":"b_1925"},{"a":6477,"l":"b_194D","t":"code","b":[140,4,12],"m":"sty","oa":3076,"o":"scanner_request","x":[6472]},{"a":6480,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":6482,"t":"code","b":[141,79,12],"m":"sta","oa":3151,"o":"player_tile_hidden"},{"a":6485,"t":"code","b":[173,115,12],"m":"lda","oa":3187,"o":"sound_kind"},{"a":6488,"t":"code","b":[141,114,25],"m":"sta","oa":6514,"o":"drain_prev_sound"},{"a":6491,"t":"code","b":[204,115,12],"m":"cpy","oa":3187,"o":"sound_kind"},{"a":6494,"t":"code","b":[8],"m":"php"},{"a":6495,"t":"code","b":[140,115,12],"m":"sty","oa":3187,"o":"sound_kind"},{"a":6498,"t":"code","b":[40],"m":"plp"},{"a":6499,"t":"code","b":[240,12],"m":"beq","oa":6513,"o":"r_1971"},{"a":6501,"t":"code","b":[173,114,25],"m":"lda","oa":6514,"o":"drain_prev_sound"},{"a":6504,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":6506,"t":"code","b":[240,5],"m":"beq","oa":6513,"o":"r_1971"},{"a":6508,"t":"code","b":[162,1],"m":"ldx","o":"#$01"},{"a":6510,"t":"code","b":[32,39,53],"m":"jsr","oa":13607,"o":"silence_voice_x"},{"a":6513,"l":"r_1971","t":"code","b":[96],"m":"rts","x":[6499,6506]},{"a":6514,"l":"drain_prev_sound","c":"C64 addition: check_player_drain's copy of the sound selector $0C73 from before its update (written at $1958, read back at $1965 for the test against 3).","t":"byte","b":[0],"x":[6488,6501]},{"a":6515,"l":"clear_meanie_search","c":"Resets enemy X's meanie bookkeeping: $0CA0+X (the meanie it made) and $0C90+X (the target it failed to make one for) to $80, its failure count $0C98+X to 0, and $0C80+X, where the next meanie search starts, to 64. Called when an enemy is placed ($1572), after it turns ($1818) and when it takes the half-visible player as its target ($17D7). The BBC routine.","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[5490,6103,6168]},{"a":6517,"t":"code","b":[157,160,12],"m":"sta","oa":3232,"o":"enemy_meanie_obj,x"},{"a":6520,"t":"code","b":[157,144,12],"m":"sta","oa":3216,"o":"enemy_meanie_fail_obj,x"},{"a":6523,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":6525,"t":"code","b":[157,152,12],"m":"sta","oa":3224,"o":"enemy_meanie_fail_count,x"},{"a":6528,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":6530,"t":"code","b":[157,128,12],"m":"sta","oa":3200,"o":"enemy_meanie_scan,x"},{"a":6533,"t":"code","b":[96],"m":"rts"},{"a":6534,"l":"find_meanie_tree","c":"Looks for a tree to turn into a meanie against enemy $90's target. Widens the arc ($0C68 = 40) and makes the enemy the viewer. Carries on from object $0C80+enemy - 1 downwards: an existing tree within 9 tiles of the target in both x ($0900) and z ($0980) whose tile the enemy can see ($1887, $14 bit 7) is recorded in $0CA0+enemy, becomes type 4 (meanie), $0CD4 gets $68 for the redraw, and C returns clear; but if a pan is under way and the tree is on screen ($1B00), the search position is moved back so this tree is tried again next time, and the turn is abandoned ($1AF9). With no objects left it adds one to the failure count $0C98+enemy, remembers the target in $0C90+enemy and returns C set. The BBC routine.","t":"code","b":[169,40],"m":"lda","o":"#$28","x":[6226]},{"a":6536,"t":"code","b":[141,104,12],"m":"sta","oa":3176,"o":"enemy_view_arc"},{"a":6539,"t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot"},{"a":6541,"t":"code","b":[134,110],"m":"stx","oa":110,"o":"viewer_obj"},{"a":6543,"l":"b_198F","t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot","x":[6568,6575,6597,6615,6624]},{"a":6545,"t":"code","b":[188,128,12],"m":"ldy","oa":3200,"o":"enemy_meanie_scan,x"},{"a":6548,"t":"code","b":[208,11],"m":"bne","oa":6561,"o":"meanie_search_next"},{"a":6550,"t":"code","b":[254,152,12],"m":"inc","oa":3224,"o":"enemy_meanie_fail_count,x"},{"a":6553,"t":"code","b":[189,168,12],"m":"lda","oa":3240,"o":"enemy_target,x"},{"a":6556,"t":"code","b":[157,144,12],"m":"sta","oa":3216,"o":"enemy_meanie_fail_obj,x"},{"a":6559,"t":"code","b":[56],"m":"sec"},{"a":6560,"t":"code","b":[96],"m":"rts"},{"a":6561,"l":"meanie_search_next","t":"code","b":[222,128,12],"m":"dec","oa":3200,"o":"enemy_meanie_scan,x","x":[6548]},{"a":6564,"t":"code","b":[136],"m":"dey"},{"a":6565,"t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y"},{"a":6568,"t":"code","b":[48,229],"m":"bmi","oa":6543,"o":"b_198F"},{"a":6570,"t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y"},{"a":6573,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":6575,"t":"code","b":[208,222],"m":"bne","oa":6543,"o":"b_198F"},{"a":6577,"t":"code","b":[189,168,12],"m":"lda","oa":3240,"o":"enemy_target,x"},{"a":6580,"t":"code","b":[170],"m":"tax"},{"a":6581,"t":"code","b":[189,0,9],"m":"lda","oa":2304,"o":"obj_x,x"},{"a":6584,"t":"code","b":[56],"m":"sec"},{"a":6585,"t":"code","b":[249,0,9],"m":"sbc","oa":2304,"o":"obj_x,y"},{"a":6588,"t":"code","b":[16,5],"m":"bpl","oa":6595,"o":"b_19C3"},{"a":6590,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":6592,"t":"code","b":[24],"m":"clc"},{"a":6593,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":6595,"l":"b_19C3","t":"code","b":[201,10],"m":"cmp","o":"#$0A","x":[6588]},{"a":6597,"t":"code","b":[176,200],"m":"bcs","oa":6543,"o":"b_198F"},{"a":6599,"t":"code","b":[189,128,9],"m":"lda","oa":2432,"o":"obj_z,x"},{"a":6602,"t":"code","b":[56],"m":"sec"},{"a":6603,"t":"code","b":[249,128,9],"m":"sbc","oa":2432,"o":"obj_z,y"},{"a":6606,"t":"code","b":[16,5],"m":"bpl","oa":6613,"o":"b_19D5"},{"a":6608,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":6610,"t":"code","b":[24],"m":"clc"},{"a":6611,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":6613,"l":"b_19D5","t":"code","b":[201,10],"m":"cmp","o":"#$0A","x":[6606]},{"a":6615,"t":"code","b":[176,182],"m":"bcs","oa":6543,"o":"b_198F"},{"a":6617,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":6619,"t":"code","b":[32,135,24],"m":"jsr","oa":6279,"o":"check_enemy_sight"},{"a":6622,"t":"code","b":[165,20],"m":"lda","oa":20,"o":"target_seen_bits"},{"a":6624,"t":"code","b":[16,173],"m":"bpl","oa":6543,"o":"b_198F"},{"a":6626,"t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot"},{"a":6628,"t":"code","b":[152],"m":"tya"},{"a":6629,"t":"code","b":[32,0,27],"m":"jsr","oa":6912,"o":"object_visible_during_pan"},{"a":6632,"t":"code","b":[144,16],"m":"bcc","oa":6650,"o":"b_19FA"},{"a":6634,"t":"code","b":[152],"m":"tya"},{"a":6635,"t":"code","b":[157,160,12],"m":"sta","oa":3232,"o":"enemy_meanie_obj,x"},{"a":6638,"t":"code","b":[169,4],"m":"lda","o":"#$04"},{"a":6640,"t":"code","b":[153,64,10],"m":"sta","oa":2624,"o":"obj_type,y"},{"a":6643,"t":"code","b":[169,104],"m":"lda","o":"#$68"},{"a":6645,"t":"code","b":[141,212,12],"m":"sta","oa":3284,"o":"min_obj_width"},{"a":6648,"t":"code","b":[24],"m":"clc"},{"a":6649,"t":"code","b":[96],"m":"rts"},{"a":6650,"l":"b_19FA","t":"code","b":[254,128,12],"m":"inc","oa":3200,"o":"enemy_meanie_scan,x","x":[6632]},{"a":6653,"t":"code","b":[76,249,26],"m":"jmp","oa":6905,"o":"abort_enemy_turn"},{"a":6656,"l":"player_drained_out","c":"drain_target_energy's exit for a player with no energy left to take: sets $0C4E to $80, which the gameplay loop ($12A2) and the main loop ($3588) treat as the player's defeat, and abandons the enemy's turn ($1AF9).","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[6674]},{"a":6658,"t":"code","b":[141,78,12],"m":"sta","oa":3150,"o":"landscape_over"},{"a":6661,"t":"code","b":[76,249,26],"m":"jmp","oa":6905,"o":"abort_enemy_turn"},{"a":6664,"l":"drain_target_energy","c":"Moves one unit of energy from the object in $0C58 to enemy $90. The player's robot ($0B): with $0C0A already 0 it goes to $1A00; otherwise the energy drops by one, the energy icons and scanner are redrawn ($9508), sound 5 plays ($3470) and C returns set. Any other object must be safe to change during a pan ($1AF4, else the turn is abandoned): a robot becomes a boulder (type 3) and the enemy's drain timer stops, a tree is deleted ($1EEF), a boulder becomes a tree ($0CD4 = $74 for the redraw); C returns clear. Every path adds one to the enemy's store $0C88+enemy; X returns the drained object. The BBC routine with the C64's icon routine and sound call.","t":"code","b":[174,88,12],"m":"ldx","oa":3160,"o":"drain_target","x":[6122,6211]},{"a":6667,"t":"code","b":[228,11],"m":"cpx","oa":11,"o":"player_obj"},{"a":6669,"t":"code","b":[208,23],"m":"bne","oa":6694,"o":"drain_non_player"},{"a":6671,"t":"code","b":[173,10,12],"m":"lda","oa":3082,"o":"player_energy"},{"a":6674,"t":"code","b":[240,236],"m":"beq","oa":6656,"o":"player_drained_out"},{"a":6676,"t":"code","b":[56],"m":"sec"},{"a":6677,"t":"code","b":[233,1],"m":"sbc","o":"#$01"},{"a":6679,"t":"code","b":[141,10,12],"m":"sta","oa":3082,"o":"player_energy"},{"a":6682,"t":"code","b":[32,8,149],"m":"jsr","oa":38152,"o":"update_icon_row"},{"a":6685,"t":"code","b":[169,5],"m":"lda","o":"#$05"},{"a":6687,"t":"code","b":[32,112,52],"m":"jsr","oa":13424,"o":"make_sound"},{"a":6690,"t":"code","b":[56],"m":"sec"},{"a":6691,"t":"code","b":[76,79,26],"m":"jmp","oa":6735,"o":"j_1A4F"},{"a":6694,"l":"drain_non_player","t":"code","b":[138],"m":"txa","x":[6669]},{"a":6695,"t":"code","b":[32,244,26],"m":"jsr","oa":6900,"o":"abort_if_visible_in_pan"},{"a":6698,"t":"code","b":[189,64,10],"m":"lda","oa":2624,"o":"obj_type,x"},{"a":6701,"t":"code","b":[208,11],"m":"bne","oa":6714,"o":"b_1A3A"},{"a":6703,"t":"code","b":[164,144],"m":"ldy","oa":144,"o":"enemy_slot"},{"a":6705,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":6707,"t":"code","b":[153,32,12],"m":"sta","oa":3104,"o":"enemy_drain_timer,y"},{"a":6710,"t":"code","b":[169,3],"m":"lda","o":"#$03"},{"a":6712,"t":"code","b":[208,17],"m":"bne","oa":6731,"o":"b_1A4B"},{"a":6714,"l":"b_1A3A","t":"code","b":[201,2],"m":"cmp","o":"#$02","x":[6701]},{"a":6716,"t":"code","b":[208,6],"m":"bne","oa":6724,"o":"b_1A44"},{"a":6718,"t":"code","b":[32,239,30],"m":"jsr","oa":7919,"o":"remove_object"},{"a":6721,"t":"code","b":[76,78,26],"m":"jmp","oa":6734,"o":"j_1A4E"},{"a":6724,"l":"b_1A44","t":"code","b":[169,116],"m":"lda","o":"#$74","x":[6716]},{"a":6726,"t":"code","b":[141,212,12],"m":"sta","oa":3284,"o":"min_obj_width"},{"a":6729,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":6731,"l":"b_1A4B","t":"code","b":[157,64,10],"m":"sta","oa":2624,"o":"obj_type,x","x":[6712]},{"a":6734,"l":"j_1A4E","t":"code","b":[24],"m":"clc","x":[6721]},{"a":6735,"l":"j_1A4F","t":"code","b":[8],"m":"php","x":[6691]},{"a":6736,"t":"code","b":[164,144],"m":"ldy","oa":144,"o":"enemy_slot"},{"a":6738,"t":"code","b":[185,136,12],"m":"lda","oa":3208,"o":"enemy_energy,y"},{"a":6741,"t":"code","b":[24],"m":"clc"},{"a":6742,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":6744,"t":"code","b":[153,136,12],"m":"sta","oa":3208,"o":"enemy_energy,y"},{"a":6747,"t":"code","b":[40],"m":"plp"},{"a":6748,"t":"code","b":[96],"m":"rts"},{"a":6749,"l":"spend_enemy_energy","c":"Turns one unit of enemy $90's stored energy ($0C88+enemy) back into a tree, which is how drained energy reappears on the landscape. Nothing stored: C set. Otherwise takes a tree object ($211D, A = 2) and has $1238 put it on a random flat, empty tile lower than the lowest enemy ($0C06); failing that, C set. If a pan is under way and the tree would be on screen ($1B00), deletes it again ($1EEF) and abandons the turn ($1AF9). Otherwise takes the unit off the store and returns the tree in X (from $91) with C clear. The BBC routine, with the current object in $91 for the BBC's $01.","t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot","x":[5838,6005]},{"a":6751,"t":"code","b":[56],"m":"sec"},{"a":6752,"t":"code","b":[189,136,12],"m":"lda","oa":3208,"o":"enemy_energy,x"},{"a":6755,"t":"code","b":[240,27],"m":"beq","oa":6784,"o":"spend_energy_done"},{"a":6757,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":6759,"t":"code","b":[32,29,33],"m":"jsr","oa":8477,"o":"alloc_object_slot"},{"a":6762,"t":"code","b":[173,6,12],"m":"lda","oa":3078,"o":"lowest_enemy_height"},{"a":6765,"t":"code","b":[32,56,18],"m":"jsr","oa":4664,"o":"place_object_low"},{"a":6768,"t":"code","b":[176,14],"m":"bcs","oa":6784,"o":"spend_energy_done"},{"a":6770,"t":"code","b":[138],"m":"txa"},{"a":6771,"t":"code","b":[32,0,27],"m":"jsr","oa":6912,"o":"object_visible_during_pan"},{"a":6774,"t":"code","b":[144,9],"m":"bcc","oa":6785,"o":"b_1A81"},{"a":6776,"t":"code","b":[166,144],"m":"ldx","oa":144,"o":"enemy_slot"},{"a":6778,"t":"code","b":[222,136,12],"m":"dec","oa":3208,"o":"enemy_energy,x"},{"a":6781,"t":"code","b":[166,145],"m":"ldx","oa":145,"o":"current_obj"},{"a":6783,"t":"code","b":[24],"m":"clc"},{"a":6784,"l":"spend_energy_done","t":"code","b":[96],"m":"rts","x":[6755,6768]},{"a":6785,"l":"b_1A81","t":"code","b":[32,239,30],"m":"jsr","oa":7919,"o":"remove_object","x":[6774]},{"a":6788,"t":"code","b":[76,249,26],"m":"jmp","oa":6905,"o":"abort_enemy_turn"},{"a":6791,"l":"advance_to_next_landscape","c":"After a won landscape (called from $3618): adds the player's energy, as BCD ($3462), to the landscape number $0CFD/$0CFE, sets the seed generator for the new number ($33ED), generates it ($2ACC), places its enemies ($1420) and player ($1450), which runs on through make_secret_code with $0C71 bit 7 set, then draws the secret-code screen ($3282 with A = $80), prints token 5 ($8617, SECRET ENTRY CODE and LANDSCAPE) and the landscape number ($33E1). The BBC routine.","t":"code","b":[248],"m":"sed","x":[13848]},{"a":6792,"t":"code","b":[32,98,52],"m":"jsr","oa":13410,"o":"energy_to_bcd"},{"a":6795,"t":"code","b":[24],"m":"clc"},{"a":6796,"t":"code","b":[109,253,12],"m":"adc","oa":3325,"o":"landscape_lo"},{"a":6799,"t":"code","b":[170],"m":"tax"},{"a":6800,"t":"code","b":[173,254,12],"m":"lda","oa":3326,"o":"landscape_hi"},{"a":6803,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":6805,"t":"code","b":[168],"m":"tay"},{"a":6806,"t":"code","b":[216],"m":"cld"},{"a":6807,"t":"code","b":[32,237,51],"m":"jsr","oa":13293,"o":"init_landscape_seed"},{"a":6810,"t":"code","b":[32,204,42],"m":"jsr","oa":10956,"o":"generate_landscape"},{"a":6813,"t":"code","b":[32,32,20],"m":"jsr","oa":5152,"o":"place_enemies"},{"a":6816,"t":"code","b":[32,80,20],"m":"jsr","oa":5200,"o":"place_player"},{"a":6819,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":6821,"t":"code","b":[32,130,50],"m":"jsr","oa":12930,"o":"draw_title_screen"},{"a":6824,"t":"code","b":[162,5],"m":"ldx","o":"#$05"},{"a":6826,"t":"code","b":[32,23,134],"m":"jsr","oa":34327,"o":"print_token"},{"a":6829,"t":"code","b":[76,225,51],"m":"jmp","oa":13281,"o":"print_landscape_num"},{"a":6832,"l":"find_drainable_object","c":"Searches objects 63 down to 0 for something the viewing enemy may drain: an existing object that is a boulder or stands on another object. For each it reads the tile under it ($2BA8, then on the C64 LDA ($5E),Y and CMP #$C0 here: $C0 and up means an object is on the tile, bits 0-5 give the top one) and accepts the top object if it is a tree or boulder whose tile the enemy can see ($1887, $14 bit 7). Returns it in $0C58 with C clear, or C set when there is none. The BBC routine but for the tile read, which its tile routine did.","t":"code","b":[162,63],"m":"ldx","o":"#$3F","x":[6020,6117]},{"a":6834,"l":"b_1AB2","t":"code","b":[189,0,1],"m":"lda","oa":256,"o":"obj_flags,x","x":[6896]},{"a":6837,"t":"code","b":[48,56],"m":"bmi","oa":6895,"o":"b_1AEF"},{"a":6839,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":6841,"t":"code","b":[176,7],"m":"bcs","oa":6850,"o":"b_1AC2"},{"a":6843,"t":"code","b":[189,64,10],"m":"lda","oa":2624,"o":"obj_type,x"},{"a":6846,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":6848,"t":"code","b":[208,45],"m":"bne","oa":6895,"o":"b_1AEF"},{"a":6850,"l":"b_1AC2","t":"code","b":[189,0,9],"m":"lda","oa":2304,"o":"obj_x,x","x":[6841]},{"a":6853,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":6855,"t":"code","b":[189,128,9],"m":"lda","oa":2432,"o":"obj_z,x"},{"a":6858,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":6860,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":6863,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":6865,"t":"code","b":[201,192],"m":"cmp","o":"#$C0"},{"a":6867,"t":"code","b":[144,26],"m":"bcc","oa":6895,"o":"b_1AEF"},{"a":6869,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":6871,"t":"code","b":[168],"m":"tay"},{"a":6872,"t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y"},{"a":6875,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":6877,"t":"code","b":[240,4],"m":"beq","oa":6883,"o":"b_1AE3"},{"a":6879,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":6881,"t":"code","b":[208,12],"m":"bne","oa":6895,"o":"b_1AEF"},{"a":6883,"l":"b_1AE3","t":"code","b":[32,135,24],"m":"jsr","oa":6279,"o":"check_enemy_sight","x":[6877]},{"a":6886,"t":"code","b":[165,20],"m":"lda","oa":20,"o":"target_seen_bits"},{"a":6888,"t":"code","b":[16,5],"m":"bpl","oa":6895,"o":"b_1AEF"},{"a":6890,"t":"code","b":[140,88,12],"m":"sty","oa":3160,"o":"drain_target"},{"a":6893,"t":"code","b":[24],"m":"clc"},{"a":6894,"t":"code","b":[96],"m":"rts"},{"a":6895,"l":"b_1AEF","t":"code","b":[202],"m":"dex","x":[6837,6848,6867,6881,6888]},{"a":6896,"t":"code","b":[16,192],"m":"bpl","oa":6834,"o":"b_1AB2"},{"a":6898,"t":"code","b":[56],"m":"sec"},{"a":6899,"t":"code","b":[96],"m":"rts"},{"a":6900,"l":"abort_if_visible_in_pan","c":"Asks $1B00 about object A; if a repeated pan is under way and the object is on screen (C clear) it falls into $1AF9 and abandons the enemy's turn, otherwise it returns with C set. Called before an enemy changes an object ($173A, $1763, $1806, $1A27).","t":"code","b":[32,0,27],"m":"jsr","oa":6912,"o":"object_visible_during_pan","x":[5946,5987,6150,6695]},{"a":6903,"t":"code","b":[176,30],"m":"bcs","oa":6935,"o":"visibility_done"},{"a":6905,"l":"abort_enemy_turn","c":"Abandons the current enemy's turn from any depth: puts back the stack pointer saved in $0C0D at $16B6 and jumps to next_enemy_turn ($16D6), whose RTS then returns straight to the gameplay loop after its call at $129F.","t":"code","b":[174,13,12],"m":"ldx","oa":3085,"o":"tactics_sp","x":[6653,6661,6788]},{"a":6908,"t":"code","b":[154],"m":"txs"},{"a":6909,"t":"code","b":[76,214,22],"m":"jmp","oa":5846,"o":"next_enemy_turn"},{"a":6912,"l":"object_visible_during_pan","c":"May object A be changed without spoiling a pan? When $0C1F bit 7 is clear (the player is not holding the same pan key after a pan) it returns C set at once. Otherwise it makes A the current object ($91; the BBC used $01), makes the player the viewer, and asks $209B whether any of the object is on screen: C clear if it is. X and Y are kept.","t":"code","b":[56],"m":"sec","x":[6629,6771,6900]},{"a":6913,"t":"code","b":[44,31,12],"m":"bit","oa":3103,"o":"same_pan_held"},{"a":6916,"t":"code","b":[16,17],"m":"bpl","oa":6935,"o":"visibility_done"},{"a":6918,"t":"code","b":[133,145],"m":"sta","oa":145,"o":"current_obj"},{"a":6920,"t":"code","b":[165,11],"m":"lda","oa":11,"o":"player_obj"},{"a":6922,"t":"code","b":[133,110],"m":"sta","oa":110,"o":"viewer_obj"},{"a":6924,"t":"code","b":[138],"m":"txa"},{"a":6925,"t":"code","b":[72],"m":"pha"},{"a":6926,"t":"code","b":[152],"m":"tya"},{"a":6927,"t":"code","b":[72],"m":"pha"},{"a":6928,"t":"code","b":[32,155,32],"m":"jsr","oa":8347,"o":"find_object_on_screen"},{"a":6931,"t":"code","b":[104],"m":"pla"},{"a":6932,"t":"code","b":[168],"m":"tay"},{"a":6933,"t":"code","b":[104],"m":"pla"},{"a":6934,"t":"code","b":[170],"m":"tax"},{"a":6935,"l":"visibility_done","t":"code","b":[96],"m":"rts","x":[6903,6916]},{"a":6936,"l":"do_action_key","c":"Carries out the action key logged in $0C61 (entry 1 of the key log), called from the gameplay loop ($12E7). H (34): hyperspace ($2156), $0C1C = 0. U (35): turns the player's robot round by flipping bit 7 of its yaw ($09C0+viewer), with music 40 ($1B84), but only if $0C51 bit 6 is set: the key checker sets it ($11EA) whenever no action key is held, and the ASL $0C51 that tests it clears it, so holding U turns once. A, Q and the create keys first follow the sights ($1C10, then $1CDD with $0C6E bit 7 clear); with no tile or platform in the sights they are refused ($1BA9). Absorb and transfer need an object on that tile (tile byte $C0 and up; the C64 reads the byte itself after $2BA8, at $1B55); transfer needs a robot: $1214 is called, the player's object $0B becomes that robot and the tower check at $1B6E follows. Absorb goes to $1B8E, create to $1BBA. Returns C clear when an object was added or removed, C set otherwise.","t":"code","b":[173,97,12],"m":"lda","oa":3169,"o":"action_key","x":[4839]},{"a":6939,"t":"code","b":[201,34],"m":"cmp","o":"#$22"},{"a":6941,"t":"code","b":[208,10],"m":"bne","oa":6953,"o":"action_not_hyperspace"},{"a":6943,"t":"code","b":[32,86,33],"m":"jsr","oa":8534,"o":"hyperspace_player"},{"a":6946,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":6948,"t":"code","b":[141,28,12],"m":"sta","oa":3100,"o":"picture_obj_type"},{"a":6951,"l":"b_1B27","t":"code","b":[56],"m":"sec","x":[6962]},{"a":6952,"t":"code","b":[96],"m":"rts"},{"a":6953,"l":"action_not_hyperspace","t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj","x":[6941]},{"a":6955,"t":"code","b":[201,35],"m":"cmp","o":"#$23"},{"a":6957,"t":"code","b":[208,17],"m":"bne","oa":6976,"o":"action_follow_sights"},{"a":6959,"t":"code","b":[14,81,12],"m":"asl","oa":3153,"o":"uturn_armed"},{"a":6962,"t":"code","b":[16,243],"m":"bpl","oa":6951,"o":"b_1B27"},{"a":6964,"t":"code","b":[189,192,9],"m":"lda","oa":2496,"o":"obj_yaw,x"},{"a":6967,"t":"code","b":[73,128],"m":"eor","o":"#$80"},{"a":6969,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":6972,"t":"code","b":[169,40],"m":"lda","o":"#$28"},{"a":6974,"t":"code","b":[208,68],"m":"bne","oa":7044,"o":"play_move_music"},{"a":6976,"l":"action_follow_sights","t":"code","b":[78,110,12],"m":"lsr","oa":3182,"o":"gaze_for_robot","x":[6957]},{"a":6979,"t":"code","b":[32,16,28],"m":"jsr","oa":7184,"o":"sights_to_gaze_vector"},{"a":6982,"t":"code","b":[32,221,28],"m":"jsr","oa":7389,"o":"trace_gaze"},{"a":6985,"t":"code","b":[176,94],"m":"bcs","oa":7081,"o":"refuse_action"},{"a":6987,"t":"code","b":[173,97,12],"m":"lda","oa":3169,"o":"action_key"},{"a":6990,"t":"code","b":[41,32],"m":"and","o":"#$20"},{"a":6992,"t":"code","b":[240,104],"m":"beq","oa":7098,"o":"create_object"},{"a":6994,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":6997,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":6999,"t":"code","b":[201,192],"m":"cmp","o":"#$C0"},{"a":7001,"t":"code","b":[144,78],"m":"bcc","oa":7081,"o":"refuse_action"},{"a":7003,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":7005,"t":"code","b":[170],"m":"tax"},{"a":7006,"t":"code","b":[173,97,12],"m":"lda","oa":3169,"o":"action_key"},{"a":7009,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7010,"t":"code","b":[144,42],"m":"bcc","oa":7054,"o":"absorb_object"},{"a":7012,"t":"code","b":[188,64,10],"m":"ldy","oa":2624,"o":"obj_type,x"},{"a":7015,"t":"code","b":[208,64],"m":"bne","oa":7081,"o":"refuse_action"},{"a":7017,"t":"code","b":[32,20,18],"m":"jsr","oa":4628,"o":"focus_on_action"},{"a":7020,"t":"code","b":[134,11],"m":"stx","oa":11,"o":"player_obj"},{"a":7022,"l":"note_transfer_onto_tower","c":"Anti-cracker step inside the transfer: walks down the stack of objects under the robot just entered (object flags $0100+X: bit 6 set means it stands on the object numbered in bits 0-5) and, if it meets object 63, which is always the Sentinel's tower, stores that object's type (6) in $0CE6. The secret-code display at $33C4 halves $0CE6 to get its digit-pair count, so skipping this step gives a wrong code. Falls into $1B82. Same as the BBC.","t":"code","b":[189,0,1],"m":"lda","oa":256,"o":"obj_flags,x","x":[7034]},{"a":7025,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":7027,"t":"code","b":[144,13],"m":"bcc","oa":7042,"o":"action_key_outcomes"},{"a":7029,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":7031,"t":"code","b":[170],"m":"tax"},{"a":7032,"t":"code","b":[73,63],"m":"eor","o":"#$3F"},{"a":7034,"t":"code","b":[208,242],"m":"bne","oa":7022,"o":"note_transfer_onto_tower"},{"a":7036,"t":"code","b":[189,64,10],"m":"lda","oa":2624,"o":"obj_type,x"},{"a":7039,"t":"code","b":[141,230,12],"m":"sta","oa":3302,"o":"on_sentinel_tower"},{"a":7042,"l":"action_key_outcomes","c":"Second half of do_action_key. $1B82: after a transfer, music 25; $1B84 (also after a U-turn): plays the music in A ($888F), sets $0C63 bit 7 so the view is redrawn, returns C set. $1B8E absorb: refused once the Sentinel's slot ($0100) is empty and for the tower (type 6); for a meanie (type 4) the enemy that made it is freed first ($1BEC: $0CA0+n = $80); the object is deleted ($1EEF) and its energy added to the player's ($2136 with C clear). $1BA9: the refusal, sound 5 with its pitch byte in the C64 sound table ($AC2C) set to $AA and back to $90 (the BBC patched $591C). $1BBA create: an object of the key's type ($2120) is paid for from the player's energy ($2136 with C set) and put on the tile in the sights ($3A/$3C, $1F16), refunded if that fails; a new robot faces the player (yaw EOR $80). C64 change besides the sound table: the current object is $91 (BBC $01).","t":"code","b":[169,25],"m":"lda","o":"#$19","x":[7027]},{"a":7044,"l":"play_move_music","t":"code","b":[32,143,136],"m":"jsr","oa":34959,"o":"start_music","x":[6974]},{"a":7047,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":7049,"t":"code","b":[141,99,12],"m":"sta","oa":3171,"o":"player_moved"},{"a":7052,"t":"code","b":[56],"m":"sec"},{"a":7053,"t":"code","b":[96],"m":"rts"},{"a":7054,"l":"absorb_object","t":"code","b":[173,0,1],"m":"lda","oa":256,"o":"obj_flags","x":[7010]},{"a":7057,"t":"code","b":[48,22],"m":"bmi","oa":7081,"o":"refuse_action"},{"a":7059,"t":"code","b":[189,64,10],"m":"lda","oa":2624,"o":"obj_type,x"},{"a":7062,"t":"code","b":[201,4],"m":"cmp","o":"#$04"},{"a":7064,"t":"code","b":[240,82],"m":"beq","oa":7148,"o":"absorb_meanie"},{"a":7066,"t":"code","b":[201,6],"m":"cmp","o":"#$06"},{"a":7068,"t":"code","b":[240,11],"m":"beq","oa":7081,"o":"refuse_action"},{"a":7070,"l":"delete_and_credit","t":"code","b":[32,239,30],"m":"jsr","oa":7919,"o":"remove_object","x":[7177,7182]},{"a":7073,"t":"code","b":[134,145],"m":"stx","oa":145,"o":"current_obj"},{"a":7075,"t":"code","b":[24],"m":"clc"},{"a":7076,"t":"code","b":[32,54,33],"m":"jsr","oa":8502,"o":"adjust_player_energy"},{"a":7079,"t":"code","b":[24],"m":"clc"},{"a":7080,"t":"code","b":[96],"m":"rts"},{"a":7081,"l":"refuse_action","t":"code","b":[169,170],"m":"lda","o":"#$AA","x":[6985,7001,7015,7057,7068,7101,7107,7128]},{"a":7083,"t":"code","b":[141,44,172],"m":"sta","oa":44076,"o":"sound_ping_pitch"},{"a":7086,"t":"code","b":[169,5],"m":"lda","o":"#$05"},{"a":7088,"t":"code","b":[32,112,52],"m":"jsr","oa":13424,"o":"make_sound"},{"a":7091,"t":"code","b":[169,144],"m":"lda","o":"#$90"},{"a":7093,"t":"code","b":[141,44,172],"m":"sta","oa":44076,"o":"sound_ping_pitch"},{"a":7096,"t":"code","b":[56],"m":"sec"},{"a":7097,"t":"code","b":[96],"m":"rts"},{"a":7098,"l":"create_object","t":"code","b":[32,32,33],"m":"jsr","oa":8480,"o":"alloc_slot_for_type","x":[6992]},{"a":7101,"t":"code","b":[176,234],"m":"bcs","oa":7081,"o":"refuse_action"},{"a":7103,"t":"code","b":[56],"m":"sec"},{"a":7104,"t":"code","b":[32,54,33],"m":"jsr","oa":8502,"o":"adjust_player_energy"},{"a":7107,"t":"code","b":[176,228],"m":"bcs","oa":7081,"o":"refuse_action"},{"a":7109,"t":"code","b":[166,145],"m":"ldx","oa":145,"o":"current_obj"},{"a":7111,"t":"code","b":[165,58],"m":"lda","oa":58,"o":"coord_x_hi_or_dx_lo"},{"a":7113,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":7115,"t":"code","b":[165,60],"m":"lda","oa":60,"o":"coord_z_hi_or_points_ptr"},{"a":7117,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":7119,"t":"code","b":[32,22,31],"m":"jsr","oa":7958,"o":"place_object_on_tile"},{"a":7122,"t":"code","b":[144,7],"m":"bcc","oa":7131,"o":"b_1BDB"},{"a":7124,"t":"code","b":[24],"m":"clc"},{"a":7125,"t":"code","b":[32,54,33],"m":"jsr","oa":8502,"o":"adjust_player_energy"},{"a":7128,"t":"code","b":[76,169,27],"m":"jmp","oa":7081,"o":"refuse_action"},{"a":7131,"l":"b_1BDB","t":"code","b":[189,64,10],"m":"lda","oa":2624,"o":"obj_type,x","x":[7122]},{"a":7134,"t":"code","b":[208,10],"m":"bne","oa":7146,"o":"b_1BEA"},{"a":7136,"t":"code","b":[164,11],"m":"ldy","oa":11,"o":"player_obj"},{"a":7138,"t":"code","b":[185,192,9],"m":"lda","oa":2496,"o":"obj_yaw,y"},{"a":7141,"t":"code","b":[73,128],"m":"eor","o":"#$80"},{"a":7143,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":7146,"l":"b_1BEA","t":"code","b":[24],"m":"clc","x":[7134]},{"a":7147,"t":"code","b":[96],"m":"rts"},{"a":7148,"l":"absorb_meanie","t":"code","b":[160,7],"m":"ldy","o":"#$07","x":[7064]},{"a":7150,"l":"b_1BEE","t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y","x":[7180]},{"a":7153,"t":"code","b":[48,24],"m":"bmi","oa":7179,"o":"b_1C0B"},{"a":7155,"t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y"},{"a":7158,"t":"code","b":[201,1],"m":"cmp","o":"#$01"},{"a":7160,"t":"code","b":[240,4],"m":"beq","oa":7166,"o":"b_1BFE"},{"a":7162,"t":"code","b":[201,5],"m":"cmp","o":"#$05"},{"a":7164,"t":"code","b":[208,13],"m":"bne","oa":7179,"o":"b_1C0B"},{"a":7166,"l":"b_1BFE","t":"code","b":[138],"m":"txa","x":[7160]},{"a":7167,"t":"code","b":[217,160,12],"m":"cmp","oa":3232,"o":"enemy_meanie_obj,y"},{"a":7170,"t":"code","b":[208,7],"m":"bne","oa":7179,"o":"b_1C0B"},{"a":7172,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":7174,"t":"code","b":[153,160,12],"m":"sta","oa":3232,"o":"enemy_meanie_obj,y"},{"a":7177,"t":"code","b":[208,147],"m":"bne","oa":7070,"o":"delete_and_credit"},{"a":7179,"l":"b_1C0B","t":"code","b":[136],"m":"dey","x":[7153,7164,7170]},{"a":7180,"t":"code","b":[16,224],"m":"bpl","oa":7150,"o":"b_1BEE"},{"a":7182,"t":"code","b":[48,142],"m":"bmi","oa":7070,"o":"delete_and_credit"},{"a":7184,"l":"sights_to_gaze_vector","c":"Turns the sights' position into a gaze direction from the player's robot (X = its object): yaw = $0CC6 / 8 + the robot's yaw ($09C0+X) - 10, pitch = ($0CC7 - 5) / 16 + the robot's pitch ($0140+X) + 3 + 32/256, as 16-bit angles in $3D/$3E and $3F/$40 (the pitch also in A and $74); falls into $1C54 for the vector. The view is 20 yaw units wide, so x / 8 maps 0-159 onto it. The BBC routine unchanged: the C64 keeps the BBC's sights coordinates although it shows the sights as a sprite.","t":"code","b":[173,198,12],"m":"lda","oa":3270,"o":"sights_x","x":[6979]},{"a":7187,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":7189,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":7191,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":7193,"t":"code","b":[106],"m":"ror","o":"a"},{"a":7194,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":7196,"t":"code","b":[106],"m":"ror","o":"a"},{"a":7197,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":7199,"t":"code","b":[106],"m":"ror","o":"a"},{"a":7200,"t":"code","b":[24],"m":"clc"},{"a":7201,"t":"code","b":[133,61],"m":"sta","oa":61,"o":"vec_yaw_lo_or_points_ptr_hi"},{"a":7203,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":7205,"t":"code","b":[125,192,9],"m":"adc","oa":2496,"o":"obj_yaw,x"},{"a":7208,"t":"code","b":[56],"m":"sec"},{"a":7209,"t":"code","b":[233,10],"m":"sbc","o":"#$0A"},{"a":7211,"t":"code","b":[133,62],"m":"sta","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":7213,"t":"code","b":[173,199,12],"m":"lda","oa":3271,"o":"sights_y"},{"a":7216,"t":"code","b":[56],"m":"sec"},{"a":7217,"t":"code","b":[233,5],"m":"sbc","o":"#$05"},{"a":7219,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":7221,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":7223,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":7225,"t":"code","b":[106],"m":"ror","o":"a"},{"a":7226,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":7228,"t":"code","b":[106],"m":"ror","o":"a"},{"a":7229,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":7231,"t":"code","b":[106],"m":"ror","o":"a"},{"a":7232,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":7234,"t":"code","b":[106],"m":"ror","o":"a"},{"a":7235,"t":"code","b":[24],"m":"clc"},{"a":7236,"t":"code","b":[105,32],"m":"adc","o":"#$20"},{"a":7238,"t":"code","b":[133,63],"m":"sta","oa":63,"o":"vec_pitch_lo_or_edge_y1_hi"},{"a":7240,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":7242,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":7244,"t":"code","b":[125,64,1],"m":"adc","oa":320,"o":"obj_pitch,x"},{"a":7247,"t":"code","b":[24],"m":"clc"},{"a":7248,"t":"code","b":[105,3],"m":"adc","o":"#$03"},{"a":7250,"t":"code","b":[133,64],"m":"sta","oa":64,"o":"vec_pitch_hi_or_edge_scale"},{"a":7252,"l":"angles_to_vector","c":"Makes a Cartesian direction from the pitch ($3F/$40, also in A and $74) and yaw ($3D/$3E): with the sine and cosine of the pitch ($0E75, $1C9D), y = sin/16 into $30/$2D and cos/16 kept in $32/$33; then with those of the yaw, z = cos(pitch) x cos(yaw) into $31/$2E and x = cos(pitch) x sin(yaw) into $2F/$2C ($1C7D). Small enough for trace_gaze to step along. The BBC routine.","t":"code","b":[32,117,14],"m":"jsr","oa":3701,"o":"sin_cos_16","x":[6387]},{"a":7255,"t":"code","b":[160,1],"m":"ldy","o":"#$01"},{"a":7257,"t":"code","b":[32,157,28],"m":"jsr","oa":7325,"o":"trig_term_div16"},{"a":7260,"t":"code","b":[133,51],"m":"sta","oa":51,"o":"row_right_tile_or_cos_hi"},{"a":7262,"t":"code","b":[134,50],"m":"stx","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":7264,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":7266,"t":"code","b":[32,157,28],"m":"jsr","oa":7325,"o":"trig_term_div16"},{"a":7269,"t":"code","b":[133,48],"m":"sta","oa":48,"o":"vec_y_lo_or_min_flat_x"},{"a":7271,"t":"code","b":[134,45],"m":"stx","oa":45,"o":"vec_y_bot_or_goes_left"},{"a":7273,"t":"code","b":[165,61],"m":"lda","oa":61,"o":"vec_yaw_lo_or_points_ptr_hi"},{"a":7275,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":7277,"t":"code","b":[165,62],"m":"lda","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":7279,"t":"code","b":[32,117,14],"m":"jsr","oa":3701,"o":"sin_cos_16"},{"a":7282,"t":"code","b":[160,1],"m":"ldy","o":"#$01"},{"a":7284,"t":"code","b":[162,2],"m":"ldx","o":"#$02"},{"a":7286,"t":"code","b":[32,125,28],"m":"jsr","oa":7293,"o":"scale_by_trig_term"},{"a":7289,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":7291,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":7293,"l":"scale_by_trig_term","c":"Multiplies cos(pitch) ($32/$33, signed) by the sine (Y = 0) or cosine (Y = 1) at $0C00/$0C02+Y, which is in sign-and-magnitude form, through $0F9E, and stores the result as the vector's x (X = 0: $2F, $2C) or z (X = 2: $31, $2E). The BBC routine.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[7286]},{"a":7295,"t":"code","b":[133,103],"m":"sta","oa":103,"o":"sign_bits"},{"a":7297,"t":"code","b":[165,50],"m":"lda","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":7299,"t":"code","b":[133,106],"m":"sta","oa":106,"o":"mul_a_lo"},{"a":7301,"t":"code","b":[165,51],"m":"lda","oa":51,"o":"row_right_tile_or_cos_hi"},{"a":7303,"t":"code","b":[133,107],"m":"sta","oa":107,"o":"mul_a_hi"},{"a":7305,"t":"code","b":[185,0,12],"m":"lda","oa":3072,"o":"sin16_lo,y"},{"a":7308,"t":"code","b":[133,104],"m":"sta","oa":104,"o":"mul_b_lo"},{"a":7310,"t":"code","b":[185,2,12],"m":"lda","oa":3074,"o":"sin16_hi,y"},{"a":7313,"t":"code","b":[133,105],"m":"sta","oa":105,"o":"mul_b_hi"},{"a":7315,"t":"code","b":[32,158,15],"m":"jsr","oa":3998,"o":"mul16x16_signed"},{"a":7318,"t":"code","b":[149,47],"m":"sta","oa":47,"o":"vec_x_lo,x"},{"a":7320,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":7322,"t":"code","b":[149,44],"m":"sta","oa":44,"o":"vec_x_bot_or_goes_right,x"},{"a":7324,"t":"code","b":[96],"m":"rts"},{"a":7325,"l":"trig_term_div16","c":"Returns in A (high) and X (low) the sine (Y = 0) or cosine (Y = 1) held at $0C00/$0C02+Y, divided by 16 and turned from sign-and-magnitude (sign in bit 0 of the low byte) into two's complement ($1009 negates). The BBC routine.","t":"code","b":[185,0,12],"m":"lda","oa":3072,"o":"sin16_lo,y","x":[7257,7266]},{"a":7328,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":7330,"t":"code","b":[185,2,12],"m":"lda","oa":3074,"o":"sin16_hi,y"},{"a":7333,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7334,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":7336,"t":"code","b":[8],"m":"php"},{"a":7337,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7338,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":7340,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7341,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":7343,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7344,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":7346,"t":"code","b":[40],"m":"plp"},{"a":7347,"t":"code","b":[144,3],"m":"bcc","oa":7352,"o":"b_1CB8"},{"a":7349,"t":"code","b":[32,9,16],"m":"jsr","oa":4105,"o":"negate16"},{"a":7352,"l":"b_1CB8","t":"code","b":[166,116],"m":"ldx","oa":116,"o":"tmp_t","x":[7347]},{"a":7354,"t":"code","b":[96],"m":"rts"},{"a":7355,"l":"step_along_vector","c":"Adds the gaze vector ($2F/$2C x, $30/$2D y, $31/$2E z: signed, whole part then fraction) to the 24-bit position ($3A/$37/$34 x, $3B/$38/$35 y, $3C/$39/$36 z), extending each component's sign into the top byte. One step of a gaze trace. The BBC routine.","t":"code","b":[162,2],"m":"ldx","o":"#$02","x":[7400]},{"a":7357,"l":"b_1CBD","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[7385]},{"a":7359,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":7361,"t":"code","b":[181,52],"m":"lda","oa":52,"o":"coord_x_bot_or_shape,x"},{"a":7363,"t":"code","b":[24],"m":"clc"},{"a":7364,"t":"code","b":[117,44],"m":"adc","oa":44,"o":"vec_x_bot_or_goes_right,x"},{"a":7366,"t":"code","b":[149,52],"m":"sta","oa":52,"o":"coord_x_bot_or_shape,x"},{"a":7368,"t":"code","b":[181,47],"m":"lda","oa":47,"o":"vec_x_lo,x"},{"a":7370,"t":"code","b":[16,2],"m":"bpl","oa":7374,"o":"b_1CCE"},{"a":7372,"t":"code","b":[198,116],"m":"dec","oa":116,"o":"tmp_t"},{"a":7374,"l":"b_1CCE","t":"code","b":[117,55],"m":"adc","oa":55,"o":"coord_x_lo_or_vis_left,x","x":[7370]},{"a":7376,"t":"code","b":[149,55],"m":"sta","oa":55,"o":"coord_x_lo_or_vis_left,x"},{"a":7378,"t":"code","b":[181,58],"m":"lda","oa":58,"o":"coord_x_hi_or_dx_lo,x"},{"a":7380,"t":"code","b":[101,116],"m":"adc","oa":116,"o":"tmp_t"},{"a":7382,"t":"code","b":[149,58],"m":"sta","oa":58,"o":"coord_x_hi_or_dx_lo,x"},{"a":7384,"t":"code","b":[202],"m":"dex"},{"a":7385,"t":"code","b":[16,226],"m":"bpl","oa":7357,"o":"b_1CBD"},{"a":7387,"t":"code","b":[96],"m":"rts"},{"a":7388,"l":"unused_1cdc","c":"Unused byte, $00, between step_along_vector and trace_gaze; the BBC original has an unused zero byte in the same place. No traced instruction refers to it.","t":"byte","b":[0]},{"a":7389,"l":"trace_gaze","c":"Follows a gaze from the viewing object ($6E) in steps of the vector at $2C-$31 ($1CBB) until it meets the landscape. C clear: it lands on a tile or platform that is not the viewer's own, and $24/$26 (from $3A/$3C) hold that tile. C set: it leaves the landscape (x or z reaches 31), goes into the ground, passes beside a boulder or tower ($60 bit 6), or would look up onto a tile, which is only allowed for an enemy looking for a robot ($0C6E bit 7) or at a boulder ($0C67 bit 7). $0C56 bit 7 comes back set when the tile holds the target ($0C58), $0CDD bit 7 when a tree is seen. Starts from the viewer's position ($1ECC); each step asks $1DF9 for the height of the tile or of an object on it ($60 = $80), with a tolerance $0C of 128/256 of a tile that the tower cuts to 16. Sloping tiles are tested at $1D46. Used for the player's sights ($1B46) and enemies' sight ($18F6). The BBC routine but for the tile read at $1D66.","t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj","x":[6390,6982]},{"a":7391,"t":"code","b":[78,86,12],"m":"lsr","oa":3158,"o":"gaze_hits_target_sq"},{"a":7394,"t":"code","b":[78,221,12],"m":"lsr","oa":3293,"o":"gaze_sees_tree"},{"a":7397,"t":"code","b":[32,204,30],"m":"jsr","oa":7884,"o":"load_object_coords"},{"a":7400,"l":"gaze_step","t":"code","b":[32,187,28],"m":"jsr","oa":7355,"o":"step_along_vector","x":[7448,7488,7559,7662]},{"a":7403,"t":"code","b":[165,58],"m":"lda","oa":58,"o":"coord_x_hi_or_dx_lo"},{"a":7405,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":7407,"t":"code","b":[201,31],"m":"cmp","o":"#$1F"},{"a":7409,"t":"code","b":[176,81],"m":"bcs","oa":7492,"o":"gaze_blocked"},{"a":7411,"t":"code","b":[165,60],"m":"lda","oa":60,"o":"coord_z_hi_or_points_ptr"},{"a":7413,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":7415,"t":"code","b":[201,31],"m":"cmp","o":"#$1F"},{"a":7417,"t":"code","b":[176,73],"m":"bcs","oa":7492,"o":"gaze_blocked"},{"a":7419,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":7421,"t":"code","b":[133,96],"m":"sta","oa":96,"o":"second_axis_or_gaze_flags"},{"a":7423,"t":"code","b":[133,12],"m":"sta","oa":12,"o":"shared_0C"},{"a":7425,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":7427,"t":"code","b":[133,121],"m":"sta","oa":121,"o":"platform_height_lo"},{"a":7429,"t":"code","b":[141,103,12],"m":"sta","oa":3175,"o":"gaze_hits_boulder"},{"a":7432,"t":"code","b":[32,249,29],"m":"jsr","oa":7673,"o":"tile_height_under_gaze"},{"a":7435,"t":"code","b":[176,57],"m":"bcs","oa":7494,"o":"gaze_sloping_tile"},{"a":7437,"t":"code","b":[170],"m":"tax"},{"a":7438,"t":"code","b":[165,121],"m":"lda","oa":121,"o":"platform_height_lo"},{"a":7440,"t":"code","b":[56],"m":"sec"},{"a":7441,"t":"code","b":[229,56],"m":"sbc","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":7443,"t":"code","b":[133,121],"m":"sta","oa":121,"o":"platform_height_lo"},{"a":7445,"t":"code","b":[138],"m":"txa"},{"a":7446,"t":"code","b":[229,59],"m":"sbc","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":7448,"t":"code","b":[48,206],"m":"bmi","oa":7400,"o":"gaze_step"},{"a":7450,"t":"code","b":[208,40],"m":"bne","oa":7492,"o":"gaze_blocked"},{"a":7452,"t":"code","b":[165,121],"m":"lda","oa":121,"o":"platform_height_lo"},{"a":7454,"t":"code","b":[197,12],"m":"cmp","oa":12,"o":"shared_0C"},{"a":7456,"t":"code","b":[176,34],"m":"bcs","oa":7492,"o":"gaze_blocked"},{"a":7458,"t":"code","b":[36,96],"m":"bit","oa":96,"o":"second_axis_or_gaze_flags"},{"a":7460,"t":"code","b":[112,30],"m":"bvs","oa":7492,"o":"gaze_blocked"},{"a":7462,"t":"code","b":[173,110,12],"m":"lda","oa":3182,"o":"gaze_for_robot"},{"a":7465,"t":"code","b":[13,103,12],"m":"ora","oa":3175,"o":"gaze_hits_boulder"},{"a":7468,"t":"code","b":[48,4],"m":"bmi","oa":7474,"o":"b_1D32"},{"a":7470,"t":"code","b":[165,48],"m":"lda","oa":48,"o":"vec_y_lo_or_min_flat_x"},{"a":7472,"t":"code","b":[16,18],"m":"bpl","oa":7492,"o":"gaze_blocked"},{"a":7474,"l":"b_1D32","t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj","x":[7468]},{"a":7476,"t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x"},{"a":7478,"t":"code","b":[221,0,9],"m":"cmp","oa":2304,"o":"obj_x,x"},{"a":7481,"t":"code","b":[208,7],"m":"bne","oa":7490,"o":"gaze_hit"},{"a":7483,"t":"code","b":[165,38],"m":"lda","oa":38,"o":"tile_z"},{"a":7485,"t":"code","b":[221,128,9],"m":"cmp","oa":2432,"o":"obj_z,x"},{"a":7488,"t":"code","b":[240,166],"m":"beq","oa":7400,"o":"gaze_step"},{"a":7490,"l":"gaze_hit","t":"code","b":[24],"m":"clc","x":[7481]},{"a":7491,"t":"code","b":[96],"m":"rts"},{"a":7492,"l":"gaze_blocked","t":"code","b":[56],"m":"sec","x":[7409,7417,7450,7456,7460,7472,7556,7659]},{"a":7493,"t":"code","b":[96],"m":"rts"},{"a":7494,"l":"gaze_sloping_tile","c":"trace_gaze on a tile that is not flat: its corner height goes in $73 and $77 (a copy, so the corner list wraps round), then with objects ignored ($60 bit 7 cleared) it reads the other corners through $1DF9: x+1 into $76, x+1 and z+1 into $75, z+1 into $74. It then reads the tile's shape (after $2BA8 the C64 loads the byte itself, $1D66). Shapes 4 and 12, with one level edge: stepping goes on if the gaze's whole height $3B is at or above any one corner, and the gaze is blocked only when it is below all four. The other shapes go to $1D8A.","t":"code","b":[133,115],"m":"sta","oa":115,"o":"tmp_s","x":[7435]},{"a":7496,"t":"code","b":[133,119],"m":"sta","oa":119,"o":"tmp_w"},{"a":7498,"t":"code","b":[70,96],"m":"lsr","oa":96,"o":"second_axis_or_gaze_flags"},{"a":7500,"t":"code","b":[230,36],"m":"inc","oa":36,"o":"tile_x"},{"a":7502,"t":"code","b":[32,249,29],"m":"jsr","oa":7673,"o":"tile_height_under_gaze"},{"a":7505,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":7507,"t":"code","b":[230,38],"m":"inc","oa":38,"o":"tile_z"},{"a":7509,"t":"code","b":[32,249,29],"m":"jsr","oa":7673,"o":"tile_height_under_gaze"},{"a":7512,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":7514,"t":"code","b":[198,36],"m":"dec","oa":36,"o":"tile_x"},{"a":7516,"t":"code","b":[32,249,29],"m":"jsr","oa":7673,"o":"tile_height_under_gaze"},{"a":7519,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":7521,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":7523,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":7526,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":7528,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":7530,"t":"code","b":[201,4],"m":"cmp","o":"#$04"},{"a":7532,"t":"code","b":[240,4],"m":"beq","oa":7538,"o":"b_1D72"},{"a":7534,"t":"code","b":[201,12],"m":"cmp","o":"#$0C"},{"a":7536,"t":"code","b":[208,24],"m":"bne","oa":7562,"o":"gaze_pick_slope_edge"},{"a":7538,"l":"b_1D72","t":"code","b":[165,59],"m":"lda","oa":59,"o":"coord_y_hi_or_poly_type","x":[7532]},{"a":7540,"t":"code","b":[197,115],"m":"cmp","oa":115,"o":"tmp_s"},{"a":7542,"t":"code","b":[176,15],"m":"bcs","oa":7559,"o":"b_1D87"},{"a":7544,"t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t"},{"a":7546,"t":"code","b":[176,11],"m":"bcs","oa":7559,"o":"b_1D87"},{"a":7548,"t":"code","b":[197,117],"m":"cmp","oa":117,"o":"tmp_u"},{"a":7550,"t":"code","b":[176,7],"m":"bcs","oa":7559,"o":"b_1D87"},{"a":7552,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":7554,"t":"code","b":[176,3],"m":"bcs","oa":7559,"o":"b_1D87"},{"a":7556,"t":"code","b":[76,68,29],"m":"jmp","oa":7492,"o":"gaze_blocked"},{"a":7559,"l":"b_1D87","t":"code","b":[76,232,28],"m":"jmp","oa":7400,"o":"gaze_step","x":[7542,7546,7550,7554]},{"a":7562,"l":"gaze_pick_slope_edge","c":"trace_gaze for the twelve shapes with two level edges: works out from the shape number which pair of edges slopes, then uses the gaze point's place in the tile (x fraction $37, inverted for two of the four pairs, against z fraction $39) to take the nearer edge of the pair from $1DF1, as the corner (0-3) it starts from.","t":"code","b":[74],"m":"lsr","o":"a","x":[7536]},{"a":7563,"t":"code","b":[144,15],"m":"bcc","oa":7580,"o":"b_1D9C"},{"a":7565,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7566,"t":"code","b":[176,5],"m":"bcs","oa":7573,"o":"b_1D95"},{"a":7568,"t":"code","b":[41,1],"m":"and","o":"#$01"},{"a":7570,"t":"code","b":[76,175,29],"m":"jmp","oa":7599,"o":"gaze_test_slope_edge"},{"a":7573,"l":"b_1D95","t":"code","b":[105,1],"m":"adc","o":"#$01","x":[7566]},{"a":7575,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":7577,"t":"code","b":[76,157,29],"m":"jmp","oa":7581,"o":"j_1D9D"},{"a":7580,"l":"b_1D9C","t":"code","b":[74],"m":"lsr","o":"a","x":[7563]},{"a":7581,"l":"j_1D9D","t":"code","b":[133,120],"m":"sta","oa":120,"o":"tmp_g","x":[7577]},{"a":7583,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7584,"t":"code","b":[165,55],"m":"lda","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":7586,"t":"code","b":[144,2],"m":"bcc","oa":7590,"o":"b_1DA6"},{"a":7588,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":7590,"l":"b_1DA6","t":"code","b":[197,57],"m":"cmp","oa":57,"o":"coord_z_lo_or_edge_x_end","x":[7586]},{"a":7592,"t":"code","b":[165,120],"m":"lda","oa":120,"o":"tmp_g"},{"a":7594,"t":"code","b":[42],"m":"rol","o":"a"},{"a":7595,"t":"code","b":[168],"m":"tay"},{"a":7596,"t":"code","b":[185,241,29],"m":"lda","oa":7665,"o":"slope_edge_choice,y"},{"a":7599,"l":"gaze_test_slope_edge","c":"trace_gaze's test against one sloping edge, from corner X to X+1 (heights $73+X and $74+X): the gaze point's distance along it (x or z fraction, inverted for edges 2 and 3) goes to $02, is multiplied by the edge's rise ($0D03) with the sign applied ($1007), and added to the first corner's height. A gaze ($3B/$38) below that height is blocked ($1D44); otherwise stepping goes on ($1CE8).","t":"code","b":[170],"m":"tax","x":[7570]},{"a":7600,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7601,"t":"code","b":[164,55],"m":"ldy","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":7603,"t":"code","b":[176,2],"m":"bcs","oa":7607,"o":"b_1DB7"},{"a":7605,"t":"code","b":[164,57],"m":"ldy","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":7607,"l":"b_1DB7","t":"code","b":[74],"m":"lsr","o":"a","x":[7603]},{"a":7608,"t":"code","b":[152],"m":"tya"},{"a":7609,"t":"code","b":[144,2],"m":"bcc","oa":7613,"o":"b_1DBD"},{"a":7611,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":7613,"l":"b_1DBD","t":"code","b":[133,2],"m":"sta","oa":2,"o":"edge_frac_or_xlist_page","x":[7609]},{"a":7615,"t":"code","b":[181,115],"m":"lda","oa":115,"o":"tmp_s,x"},{"a":7617,"t":"code","b":[133,120],"m":"sta","oa":120,"o":"tmp_g"},{"a":7619,"t":"code","b":[181,116],"m":"lda","oa":116,"o":"tmp_t,x"},{"a":7621,"t":"code","b":[56],"m":"sec"},{"a":7622,"t":"code","b":[245,115],"m":"sbc","oa":115,"o":"tmp_s,x"},{"a":7624,"t":"code","b":[8],"m":"php"},{"a":7625,"t":"code","b":[16,5],"m":"bpl","oa":7632,"o":"b_1DD0"},{"a":7627,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":7629,"t":"code","b":[24],"m":"clc"},{"a":7630,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":7632,"l":"b_1DD0","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[7625]},{"a":7634,"t":"code","b":[165,2],"m":"lda","oa":2,"o":"edge_frac_or_xlist_page"},{"a":7636,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":7639,"t":"code","b":[40],"m":"plp"},{"a":7640,"t":"code","b":[32,7,16],"m":"jsr","oa":4103,"o":"apply_sign16"},{"a":7643,"t":"code","b":[24],"m":"clc"},{"a":7644,"t":"code","b":[101,120],"m":"adc","oa":120,"o":"tmp_g"},{"a":7646,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":7648,"t":"code","b":[165,56],"m":"lda","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":7650,"t":"code","b":[56],"m":"sec"},{"a":7651,"t":"code","b":[229,116],"m":"sbc","oa":116,"o":"tmp_t"},{"a":7653,"t":"code","b":[165,59],"m":"lda","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":7655,"t":"code","b":[229,117],"m":"sbc","oa":117,"o":"tmp_u"},{"a":7657,"t":"code","b":[16,3],"m":"bpl","oa":7662,"o":"b_1DEE"},{"a":7659,"t":"code","b":[76,68,29],"m":"jmp","oa":7492,"o":"gaze_blocked"},{"a":7662,"l":"b_1DEE","t":"code","b":[76,232,28],"m":"jmp","oa":7400,"o":"gaze_step","x":[7657]},{"a":7665,"l":"slope_edge_choice","c":"Edge choices for trace_gaze's slope test. For each of the four pairs of sloping edges the two edges as starting corners: 0 3 | 1 0 | 1 2 | 2 3, i.e. (0-1, 3-0), (1-2, 0-1), (1-2, 2-3), (2-3, 3-0); $1D8A takes whichever of the pair is nearer the gaze point. Corners: 0 at (x, z), 1 at (x, z+1), 2 at (x+1, z+1), 3 at (x+1, z); an edge runs from its corner to the next. The BBC's values.","t":"byte","b":[0,3,1,0,1,2,2,3],"x":[7596]},{"a":7673,"l":"tile_height_under_gaze","c":"Height of the tile at ($24, $26). No object on it (tile byte below $C0): A = height (high nibble), C set if the tile slopes (shape, the low nibble, non-zero). Objects and $60 bit 7 clear: walks down the stack and returns the tile's height, C clear. $60 bit 7 set (from trace_gaze): works down the stack from the top object, setting $0C56 bit 7 if it meets the target ($0C58); a boulder near the gaze point returns the height of its top (fraction in $79) and sets $0C67 bit 7; the tower near the gaze point returns its top and cuts trace_gaze's tolerance $0C to 16; a tree the gaze passes through sets $0CDD bit 7 unless it is the target, and the walk goes on down; a gaze beside a boulder or tower sets $60 bit 6. The C64 loads and tests the tile byte itself after $2BA8 (LDA ($5E),Y; CMP #$C0 at $1DFC), where the BBC's tile routine returned it with the flag. Called from trace_gaze and from $25DB.","t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile","x":[7432,7502,7509,7516,9691]},{"a":7676,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":7678,"t":"code","b":[201,192],"m":"cmp","o":"#$C0"},{"a":7680,"t":"code","b":[176,61],"m":"bcs","oa":7743,"o":"b_1E3F"},{"a":7682,"t":"code","b":[72],"m":"pha"},{"a":7683,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":7685,"t":"code","b":[168],"m":"tay"},{"a":7686,"t":"code","b":[104],"m":"pla"},{"a":7687,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7688,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7689,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7690,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7691,"t":"code","b":[192,1],"m":"cpy","o":"#$01"},{"a":7693,"t":"code","b":[96],"m":"rts"},{"a":7694,"l":"b_1E0E","t":"code","b":[204,88,12],"m":"cpy","oa":3160,"o":"drain_target","x":[7750]},{"a":7697,"t":"code","b":[208,3],"m":"bne","oa":7702,"o":"b_1E16"},{"a":7699,"t":"code","b":[110,86,12],"m":"ror","oa":3158,"o":"gaze_hits_target_sq"},{"a":7702,"l":"b_1E16","t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y","x":[7697]},{"a":7705,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":7707,"t":"code","b":[240,43],"m":"beq","oa":7752,"o":"b_1E48"},{"a":7709,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":7711,"t":"code","b":[240,39],"m":"beq","oa":7752,"o":"b_1E48"},{"a":7713,"t":"code","b":[201,6],"m":"cmp","o":"#$06"},{"a":7715,"t":"code","b":[208,127],"m":"bne","oa":7844,"o":"b_1EA4"},{"a":7717,"t":"code","b":[32,175,30],"m":"jsr","oa":7855,"o":"tile_centre_offset"},{"a":7720,"t":"code","b":[201,100],"m":"cmp","o":"#$64"},{"a":7722,"t":"code","b":[176,109],"m":"bcs","oa":7833,"o":"b_1E99"},{"a":7724,"t":"code","b":[169,16],"m":"lda","o":"#$10"},{"a":7726,"t":"code","b":[133,12],"m":"sta","oa":12,"o":"shared_0C"},{"a":7728,"t":"code","b":[185,0,10],"m":"lda","oa":2560,"o":"obj_y_lo,y"},{"a":7731,"t":"code","b":[24],"m":"clc"},{"a":7732,"t":"code","b":[105,32],"m":"adc","o":"#$20"},{"a":7734,"t":"code","b":[133,121],"m":"sta","oa":121,"o":"platform_height_lo"},{"a":7736,"t":"code","b":[185,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,y"},{"a":7739,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":7741,"t":"code","b":[24],"m":"clc"},{"a":7742,"t":"code","b":[96],"m":"rts"},{"a":7743,"l":"b_1E3F","t":"code","b":[41,63],"m":"and","o":"#$3F","x":[7680,7849]},{"a":7745,"t":"code","b":[168],"m":"tay"},{"a":7746,"t":"code","b":[36,96],"m":"bit","oa":96,"o":"second_axis_or_gaze_flags"},{"a":7748,"t":"code","b":[16,94],"m":"bpl","oa":7844,"o":"b_1EA4"},{"a":7750,"t":"code","b":[48,198],"m":"bmi","oa":7694,"o":"b_1E0E"},{"a":7752,"l":"b_1E48","t":"code","b":[32,175,30],"m":"jsr","oa":7855,"o":"tile_centre_offset","x":[7707,7711]},{"a":7755,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":7757,"t":"code","b":[176,74],"m":"bcs","oa":7833,"o":"b_1E99"},{"a":7759,"t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y"},{"a":7762,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":7764,"t":"code","b":[240,19],"m":"beq","oa":7785,"o":"b_1E69"},{"a":7766,"t":"code","b":[56],"m":"sec"},{"a":7767,"t":"code","b":[110,103,12],"m":"ror","oa":3175,"o":"gaze_hits_boulder"},{"a":7770,"t":"code","b":[185,0,10],"m":"lda","oa":2560,"o":"obj_y_lo,y"},{"a":7773,"t":"code","b":[56],"m":"sec"},{"a":7774,"t":"code","b":[233,96],"m":"sbc","o":"#$60"},{"a":7776,"t":"code","b":[133,121],"m":"sta","oa":121,"o":"platform_height_lo"},{"a":7778,"t":"code","b":[185,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,y"},{"a":7781,"t":"code","b":[233,0],"m":"sbc","o":"#$00"},{"a":7783,"t":"code","b":[24],"m":"clc"},{"a":7784,"t":"code","b":[96],"m":"rts"},{"a":7785,"l":"b_1E69","t":"code","b":[185,0,10],"m":"lda","oa":2560,"o":"obj_y_lo,y","x":[7764]},{"a":7788,"t":"code","b":[56],"m":"sec"},{"a":7789,"t":"code","b":[229,56],"m":"sbc","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":7791,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":7793,"t":"code","b":[185,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,y"},{"a":7796,"t":"code","b":[229,59],"m":"sbc","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":7798,"t":"code","b":[72],"m":"pha"},{"a":7799,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":7801,"t":"code","b":[24],"m":"clc"},{"a":7802,"t":"code","b":[105,224],"m":"adc","o":"#$E0"},{"a":7804,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":7806,"t":"code","b":[104],"m":"pla"},{"a":7807,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":7809,"t":"code","b":[48,22],"m":"bmi","oa":7833,"o":"b_1E99"},{"a":7811,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7812,"t":"code","b":[102,117],"m":"ror","oa":117,"o":"tmp_u"},{"a":7814,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":7815,"t":"code","b":[208,16],"m":"bne","oa":7833,"o":"b_1E99"},{"a":7817,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":7819,"t":"code","b":[106],"m":"ror","o":"a"},{"a":7820,"t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t"},{"a":7822,"t":"code","b":[144,9],"m":"bcc","oa":7833,"o":"b_1E99"},{"a":7824,"t":"code","b":[44,86,12],"m":"bit","oa":3158,"o":"gaze_hits_target_sq"},{"a":7827,"t":"code","b":[48,4],"m":"bmi","oa":7833,"o":"b_1E99"},{"a":7829,"t":"code","b":[56],"m":"sec"},{"a":7830,"t":"code","b":[110,221,12],"m":"ror","oa":3293,"o":"gaze_sees_tree"},{"a":7833,"l":"b_1E99","t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y","x":[7722,7757,7809,7815,7822,7827]},{"a":7836,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":7838,"t":"code","b":[240,4],"m":"beq","oa":7844,"o":"b_1EA4"},{"a":7840,"t":"code","b":[169,192],"m":"lda","o":"#$C0"},{"a":7842,"t":"code","b":[133,96],"m":"sta","oa":96,"o":"second_axis_or_gaze_flags"},{"a":7844,"l":"b_1EA4","t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y","x":[7715,7748,7838]},{"a":7847,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":7849,"t":"code","b":[176,148],"m":"bcs","oa":7743,"o":"b_1E3F"},{"a":7851,"t":"code","b":[185,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,y"},{"a":7854,"t":"code","b":[96],"m":"rts"},{"a":7855,"l":"tile_centre_offset","c":"How far a point is from the middle of its tile, for the gaze test in the routine at $1DF9. Takes the fractional x and z of the point in $37 and $39, measures each against $80 (half a tile) and returns the larger distance in A and in $74. A fraction below $80 gives its distance through EOR #$FF, one less than the true value. Called only from $1E25 (a tower counts as hit within $64) and $1E48 (a tree or boulder, within $40). Same bytes as the BBC Micro routine.","t":"code","b":[165,55],"m":"lda","oa":55,"o":"coord_x_lo_or_vis_left","x":[7717,7752]},{"a":7857,"t":"code","b":[56],"m":"sec"},{"a":7858,"t":"code","b":[233,128],"m":"sbc","o":"#$80"},{"a":7860,"t":"code","b":[16,2],"m":"bpl","oa":7864,"o":"b_1EB8"},{"a":7862,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":7864,"l":"b_1EB8","t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t","x":[7860]},{"a":7866,"t":"code","b":[165,57],"m":"lda","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":7868,"t":"code","b":[56],"m":"sec"},{"a":7869,"t":"code","b":[233,128],"m":"sbc","o":"#$80"},{"a":7871,"t":"code","b":[16,2],"m":"bpl","oa":7875,"o":"b_1EC3"},{"a":7873,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":7875,"l":"b_1EC3","t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t","x":[7871]},{"a":7877,"t":"code","b":[176,2],"m":"bcs","oa":7881,"o":"b_1EC9"},{"a":7879,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":7881,"l":"b_1EC9","t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t","x":[7877]},{"a":7883,"t":"code","b":[96],"m":"rts"},{"a":7884,"l":"load_object_coords","c":"Loads object X's position into the three 24-bit coordinates (high, low, bottom byte) that the gaze and sight-line code works in: x = xObject ($0900,X) plus one half into $3A/$37/$34, y = the object's height ($0940,X high, $0A00,X low) into $3B/$38/$35, z = zObject ($0980,X) plus one half into $3C/$39/$36. The bottom bytes are cleared; the halves put the point in the middle of the tile, where objects stand. X is preserved. Called from $1CE5 and from the row trace at $2500. Same bytes as the BBC Micro routine.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[7397,9472]},{"a":7886,"t":"code","b":[133,52],"m":"sta","oa":52,"o":"coord_x_bot_or_shape"},{"a":7888,"t":"code","b":[133,53],"m":"sta","oa":53,"o":"coord_y_bot_or_buf_left"},{"a":7890,"t":"code","b":[133,54],"m":"sta","oa":54,"o":"coord_z_bot_or_buf_right"},{"a":7892,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":7894,"t":"code","b":[133,55],"m":"sta","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":7896,"t":"code","b":[133,57],"m":"sta","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":7898,"t":"code","b":[189,0,10],"m":"lda","oa":2560,"o":"obj_y_lo,x"},{"a":7901,"t":"code","b":[133,56],"m":"sta","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":7903,"t":"code","b":[189,0,9],"m":"lda","oa":2304,"o":"obj_x,x"},{"a":7906,"t":"code","b":[133,58],"m":"sta","oa":58,"o":"coord_x_hi_or_dx_lo"},{"a":7908,"t":"code","b":[189,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,x"},{"a":7911,"t":"code","b":[133,59],"m":"sta","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":7913,"t":"code","b":[189,128,9],"m":"lda","oa":2432,"o":"obj_z,x"},{"a":7916,"t":"code","b":[133,60],"m":"sta","oa":60,"o":"coord_z_hi_or_points_ptr"},{"a":7918,"t":"code","b":[96],"m":"rts"},{"a":7919,"l":"remove_object","c":"Takes object X off the landscape and frees its slot. Looks up the object's tile (its x and z into $24/$26, address from $2BA8 as ($5E),Y). If the object was standing on another one (bit 6 of its flags at $0100,X), the tile byte becomes that lower object's number with bits 7 and 6 set; otherwise it becomes a bare flat tile, the object's height ($0940,X) in the top nibble and shape 0. Then $80 goes into $0100,X to mark the slot free. X is preserved. Callers: $1A3E, $1A81, $1B9E, and $2170 (a hyperspace the player cannot pay for). Same bytes as the BBC Micro routine apart from call addresses.","t":"code","b":[189,0,9],"m":"lda","oa":2304,"o":"obj_x,x","x":[6718,6785,7070,8560]},{"a":7922,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":7924,"t":"code","b":[189,128,9],"m":"lda","oa":2432,"o":"obj_z,x"},{"a":7927,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":7929,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":7932,"t":"code","b":[189,0,1],"m":"lda","oa":256,"o":"obj_flags,x"},{"a":7935,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":7937,"t":"code","b":[144,4],"m":"bcc","oa":7943,"o":"b_1F07"},{"a":7939,"t":"code","b":[9,192],"m":"ora","o":"#$C0"},{"a":7941,"t":"code","b":[208,7],"m":"bne","oa":7950,"o":"b_1F0E"},{"a":7943,"l":"b_1F07","t":"code","b":[189,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,x","x":[7937]},{"a":7946,"t":"code","b":[10],"m":"asl","o":"a"},{"a":7947,"t":"code","b":[10],"m":"asl","o":"a"},{"a":7948,"t":"code","b":[10],"m":"asl","o":"a"},{"a":7949,"t":"code","b":[10],"m":"asl","o":"a"},{"a":7950,"l":"b_1F0E","t":"code","b":[145,94],"m":"sta","oa":94,"o":"(tile_ptr),y","x":[7941]},{"a":7952,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":7954,"t":"code","b":[157,0,1],"m":"sta","oa":256,"o":"obj_flags,x"},{"a":7957,"t":"code","b":[96],"m":"rts"},{"a":7958,"l":"place_object_on_tile","c":"Puts object X on tile ($24,$26). Sets its x and z ($0900/$0980,X) and reads the tile byte: address from $2BA8, then LDA ($5E),Y / CMP #$C0 here, a test the C64 moved out of $2BA8 into its callers (the BBC routine had it inside). An empty tile takes the object at the tile's height with $E0 in $0A00,X. A tile whose top object is a boulder (type 3) or the Sentinel's tower (type 6) takes it on top: flags $0100,X = $40 + that object's number, and a height half a unit above the boulder ($80 added to its $0A00 byte) or one unit above the tower. Any other occupant: carry set, nothing placed. On success the tile byte becomes $C0 + X, the pitch $0140,X = $F5, the yaw $09C0,X = (next landscape random number from $31CA AND $F8) + $60, and carry is clear. Keeps the tile index in $1F92 meanwhile. Callers: $126B, $1469, $1565, $156F, $1BCF.","t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x","x":[4715,5225,5477,5487,7119]},{"a":7960,"t":"code","b":[157,0,9],"m":"sta","oa":2304,"o":"obj_x,x"},{"a":7963,"t":"code","b":[165,38],"m":"lda","oa":38,"o":"tile_z"},{"a":7965,"t":"code","b":[157,128,9],"m":"sta","oa":2432,"o":"obj_z,x"},{"a":7968,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":7971,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":7973,"t":"code","b":[201,192],"m":"cmp","o":"#$C0"},{"a":7975,"t":"code","b":[144,61],"m":"bcc","oa":8038,"o":"b_1F66"},{"a":7977,"t":"code","b":[140,146,31],"m":"sty","oa":8082,"o":"spawn_tile_index"},{"a":7980,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":7982,"t":"code","b":[168],"m":"tay"},{"a":7983,"t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y"},{"a":7986,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":7988,"t":"code","b":[240,4],"m":"beq","oa":7994,"o":"b_1F3A"},{"a":7990,"t":"code","b":[201,6],"m":"cmp","o":"#$06"},{"a":7992,"t":"code","b":[208,86],"m":"bne","oa":8080,"o":"b_1F90"},{"a":7994,"l":"b_1F3A","t":"code","b":[152],"m":"tya","x":[7988]},{"a":7995,"t":"code","b":[9,64],"m":"ora","o":"#$40"},{"a":7997,"t":"code","b":[157,0,1],"m":"sta","oa":256,"o":"obj_flags,x"},{"a":8000,"t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y"},{"a":8003,"t":"code","b":[201,6],"m":"cmp","o":"#$06"},{"a":8005,"t":"code","b":[208,11],"m":"bne","oa":8018,"o":"b_1F52"},{"a":8007,"t":"code","b":[185,0,10],"m":"lda","oa":2560,"o":"obj_y_lo,y"},{"a":8010,"t":"code","b":[157,0,10],"m":"sta","oa":2560,"o":"obj_y_lo,x"},{"a":8013,"t":"code","b":[24],"m":"clc"},{"a":8014,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":8016,"t":"code","b":[208,11],"m":"bne","oa":8029,"o":"b_1F5D"},{"a":8018,"l":"b_1F52","t":"code","b":[185,0,10],"m":"lda","oa":2560,"o":"obj_y_lo,y","x":[8005]},{"a":8021,"t":"code","b":[24],"m":"clc"},{"a":8022,"t":"code","b":[105,128],"m":"adc","o":"#$80"},{"a":8024,"t":"code","b":[157,0,10],"m":"sta","oa":2560,"o":"obj_y_lo,x"},{"a":8027,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":8029,"l":"b_1F5D","t":"code","b":[121,64,9],"m":"adc","oa":2368,"o":"obj_y_hi,y","x":[8016]},{"a":8032,"t":"code","b":[172,146,31],"m":"ldy","oa":8082,"o":"spawn_tile_index"},{"a":8035,"t":"code","b":[76,118,31],"m":"jmp","oa":8054,"o":"j_1F76"},{"a":8038,"l":"b_1F66","t":"code","b":[72],"m":"pha","x":[7975]},{"a":8039,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":8041,"t":"code","b":[157,0,1],"m":"sta","oa":256,"o":"obj_flags,x"},{"a":8044,"t":"code","b":[169,224],"m":"lda","o":"#$E0"},{"a":8046,"t":"code","b":[157,0,10],"m":"sta","oa":2560,"o":"obj_y_lo,x"},{"a":8049,"t":"code","b":[104],"m":"pla"},{"a":8050,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":8051,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":8052,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":8053,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":8054,"l":"j_1F76","t":"code","b":[157,64,9],"m":"sta","oa":2368,"o":"obj_y_hi,x","x":[8035]},{"a":8057,"t":"code","b":[138],"m":"txa"},{"a":8058,"t":"code","b":[9,192],"m":"ora","o":"#$C0"},{"a":8060,"t":"code","b":[145,94],"m":"sta","oa":94,"o":"(tile_ptr),y"},{"a":8062,"t":"code","b":[169,245],"m":"lda","o":"#$F5"},{"a":8064,"t":"code","b":[157,64,1],"m":"sta","oa":320,"o":"obj_pitch,x"},{"a":8067,"t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed"},{"a":8070,"t":"code","b":[41,248],"m":"and","o":"#$F8"},{"a":8072,"t":"code","b":[24],"m":"clc"},{"a":8073,"t":"code","b":[105,96],"m":"adc","o":"#$60"},{"a":8075,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":8078,"t":"code","b":[24],"m":"clc"},{"a":8079,"t":"code","b":[96],"m":"rts"},{"a":8080,"l":"b_1F90","t":"code","b":[56],"m":"sec","x":[7992]},{"a":8081,"t":"code","b":[96],"m":"rts"},{"a":8082,"l":"spawn_tile_index","c":"Scratch byte of place_object_on_tile ($1F16): the tile's index within its page (the Y from $2BA8), saved at $1F29 while Y serves the lower object and reloaded at $1F60. Nothing else touches it.","t":"byte","b":[0],"x":[7977,8032]},{"a":8083,"l":"reset_redraw_flags","c":"Puts three one-shot switches back to their defaults by zeroing them: $0C6D (bit 6 dithers the next redraw, bit 7 hides the sights first), $0C4D (bit 7 draws the object without the landscape) and $0C1E (bit 7 cuts a dither short, tested at $8797; $1219 sets it when a key action starts). It is the way out of redraw_object ($1F9F): taken at once when the object is off screen ($1FA2) and at the end ($2092).","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[8098,8338]},{"a":8085,"t":"code","b":[141,109,12],"m":"sta","oa":3181,"o":"redraw_style"},{"a":8088,"t":"code","b":[141,77,12],"m":"sta","oa":3149,"o":"object_only_redraw"},{"a":8091,"t":"code","b":[141,30,12],"m":"sta","oa":3102,"o":"no_dissolve"},{"a":8094,"t":"code","b":[96],"m":"rts"},{"a":8095,"l":"redraw_object","c":"Redraws the object in $91 after it has changed, as the viewer in $6E sees it, and puts it into the play view. The C64 reworks the BBC routine. The BBC handled an object wider than 20 character columns in two passes, each drawn into a 20-column buffer and copied to the screen, so a close object changed in two visible halves. The C64 first fills the object's whole width ($211B, up to 40 columns) of the bitmap buffer at $E000 ($1FB3), draws the first 20 columns with buffer type 2 and the rest with its extra type 3 ($2119: 160 bytes further right, $22A2), and only then dithers ($86A5, when bit 6 of $0C6D is set) and copies the whole object at once, a column at a time through $9730, into the play view at column ($211C + $94) mod 40 with $95 as the first row ($202C-$2083). Each pass turns the viewer's yaw to the object's left edge ($209A, $1F), finds the columns ($209B), sets up the buffer ($29C7), and draws either the object alone ($8533, when bit 7 of $0C4D is set: the game-over picture) or the landscape view ($2625); the yaw is restored from the copy in $211A where the BBC subtracted the turn again. When the Sentinel has won (bit 7 of $0C4E) the dither runs 40 rounds and the final copy is skipped. The sights sprite is switched off ($9A3C) around the copy and shown again ($99DC) if $0C5F says the sights are up. Callers: $12F9, $1881, $87F9.","t":"code","b":[32,155,32],"m":"jsr","oa":8347,"o":"find_object_on_screen","x":[4857,6273,34809]},{"a":8098,"t":"code","b":[176,239],"m":"bcs","oa":8083,"o":"reset_redraw_flags"},{"a":8100,"t":"code","b":[169,25],"m":"lda","o":"#$19"},{"a":8102,"t":"code","b":[141,153,32],"m":"sta","oa":8345,"o":"dither_rounds"},{"a":8105,"t":"code","b":[173,109,12],"m":"lda","oa":3181,"o":"redraw_style"},{"a":8108,"t":"code","b":[16,5],"m":"bpl","oa":8115,"o":"b_1FB3"},{"a":8110,"t":"code","b":[120],"m":"sei"},{"a":8111,"t":"code","b":[32,60,154],"m":"jsr","oa":39484,"o":"hide_sights_sprite"},{"a":8114,"t":"code","b":[88],"m":"cli"},{"a":8115,"l":"b_1FB3","t":"code","b":[169,25],"m":"lda","o":"#$19","x":[8108]},{"a":8117,"t":"code","b":[160,24],"m":"ldy","o":"#$18"},{"a":8119,"t":"code","b":[174,27,33],"m":"ldx","oa":8475,"o":"object_columns"},{"a":8122,"t":"code","b":[32,17,34],"m":"jsr","oa":8721,"o":"fill_background"},{"a":8125,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":8127,"t":"code","b":[141,25,33],"m":"sta","oa":8473,"o":"next_pass_buffer"},{"a":8130,"l":"redraw_next_pass","t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj","x":[8233]},{"a":8132,"t":"code","b":[173,98,12],"m":"lda","oa":3170,"o":"obj_left_col"},{"a":8135,"t":"code","b":[141,154,32],"m":"sta","oa":8346,"o":"redraw_yaw_shift"},{"a":8138,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":8140,"t":"code","b":[78,154,32],"m":"lsr","oa":8346,"o":"redraw_yaw_shift"},{"a":8143,"t":"code","b":[106],"m":"ror","o":"a"},{"a":8144,"t":"code","b":[133,31],"m":"sta","oa":31,"o":"yaw_adjust_lo"},{"a":8146,"t":"code","b":[189,192,9],"m":"lda","oa":2496,"o":"obj_yaw,x"},{"a":8149,"t":"code","b":[141,26,33],"m":"sta","oa":8474,"o":"saved_viewer_yaw"},{"a":8152,"t":"code","b":[109,154,32],"m":"adc","oa":8346,"o":"redraw_yaw_shift"},{"a":8155,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":8158,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":8160,"t":"code","b":[132,8],"m":"sty","oa":8,"o":"last_pan_dir"},{"a":8162,"t":"code","b":[173,105,12],"m":"lda","oa":3177,"o":"redraw_width_cols"},{"a":8165,"t":"code","b":[32,199,41],"m":"jsr","oa":10695,"o":"set_object_buffer"},{"a":8168,"t":"code","b":[173,25,33],"m":"lda","oa":8473,"o":"next_pass_buffer"},{"a":8171,"t":"code","b":[240,2],"m":"beq","oa":8175,"o":"b_1FEF"},{"a":8173,"t":"code","b":[133,16],"m":"sta","oa":16,"o":"buffer_kind"},{"a":8175,"l":"b_1FEF","t":"code","b":[44,77,12],"m":"bit","oa":3149,"o":"object_only_redraw","x":[8171]},{"a":8178,"t":"code","b":[16,8],"m":"bpl","oa":8188,"o":"b_1FFC"},{"a":8180,"t":"code","b":[164,145],"m":"ldy","oa":145,"o":"current_obj"},{"a":8182,"t":"code","b":[32,51,133],"m":"jsr","oa":34099,"o":"draw_object"},{"a":8185,"t":"code","b":[76,44,32],"m":"jmp","oa":8236,"o":"redraw_copy_out"},{"a":8188,"l":"b_1FFC","t":"code","b":[32,37,38],"m":"jsr","oa":9765,"o":"draw_view_rows","x":[8178]},{"a":8191,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":8193,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":8195,"t":"code","b":[133,31],"m":"sta","oa":31,"o":"yaw_adjust_lo"},{"a":8197,"t":"code","b":[173,26,33],"m":"lda","oa":8474,"o":"saved_viewer_yaw"},{"a":8200,"t":"code","b":[157,192,9],"m":"sta","oa":2496,"o":"obj_yaw,x"},{"a":8203,"t":"code","b":[173,98,12],"m":"lda","oa":3170,"o":"obj_left_col"},{"a":8206,"t":"code","b":[24],"m":"clc"},{"a":8207,"t":"code","b":[109,105,12],"m":"adc","oa":3177,"o":"redraw_width_cols"},{"a":8210,"t":"code","b":[141,98,12],"m":"sta","oa":3170,"o":"obj_left_col"},{"a":8213,"t":"code","b":[173,106,12],"m":"lda","oa":3178,"o":"obj_width_cols"},{"a":8216,"t":"code","b":[56],"m":"sec"},{"a":8217,"t":"code","b":[237,105,12],"m":"sbc","oa":3177,"o":"redraw_width_cols"},{"a":8220,"t":"code","b":[240,14],"m":"beq","oa":8236,"o":"redraw_copy_out"},{"a":8222,"t":"code","b":[141,106,12],"m":"sta","oa":3178,"o":"obj_width_cols"},{"a":8225,"t":"code","b":[141,105,12],"m":"sta","oa":3177,"o":"redraw_width_cols"},{"a":8228,"t":"code","b":[169,3],"m":"lda","o":"#$03"},{"a":8230,"t":"code","b":[141,25,33],"m":"sta","oa":8473,"o":"next_pass_buffer"},{"a":8233,"t":"code","b":[76,194,31],"m":"jmp","oa":8130,"o":"redraw_next_pass"},{"a":8236,"l":"redraw_copy_out","t":"code","b":[160,0],"m":"ldy","o":"#$00","x":[8185,8220]},{"a":8238,"t":"code","b":[32,44,153],"m":"jsr","oa":39212,"o":"set_pan_source"},{"a":8241,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":8243,"t":"code","b":[133,16],"m":"sta","oa":16,"o":"buffer_kind"},{"a":8245,"t":"code","b":[173,28,33],"m":"lda","oa":8476,"o":"object_left_col"},{"a":8248,"t":"code","b":[24],"m":"clc"},{"a":8249,"t":"code","b":[101,148],"m":"adc","oa":148,"o":"view_origin_col"},{"a":8251,"t":"code","b":[201,40],"m":"cmp","o":"#$28"},{"a":8253,"t":"code","b":[144,2],"m":"bcc","oa":8257,"o":"b_2041"},{"a":8255,"t":"code","b":[233,40],"m":"sbc","o":"#$28"},{"a":8257,"l":"b_2041","t":"code","b":[133,150],"m":"sta","oa":150,"o":"strip_col","x":[8253]},{"a":8259,"t":"code","b":[165,149],"m":"lda","oa":149,"o":"view_origin_row"},{"a":8261,"t":"code","b":[133,151],"m":"sta","oa":151,"o":"strip_row"},{"a":8263,"t":"code","b":[44,109,12],"m":"bit","oa":3181,"o":"redraw_style"},{"a":8266,"t":"code","b":[80,18],"m":"bvc","oa":8286,"o":"b_205E"},{"a":8268,"t":"code","b":[44,78,12],"m":"bit","oa":3150,"o":"landscape_over"},{"a":8271,"t":"code","b":[16,5],"m":"bpl","oa":8278,"o":"b_2056"},{"a":8273,"t":"code","b":[169,40],"m":"lda","o":"#$28"},{"a":8275,"t":"code","b":[141,153,32],"m":"sta","oa":8345,"o":"dither_rounds"},{"a":8278,"l":"b_2056","t":"code","b":[32,165,134],"m":"jsr","oa":34469,"o":"dither_view_to_screen","x":[8271]},{"a":8281,"t":"code","b":[173,78,12],"m":"lda","oa":3150,"o":"landscape_over"},{"a":8284,"t":"code","b":[48,39],"m":"bmi","oa":8325,"o":"b_2085"},{"a":8286,"l":"b_205E","t":"code","b":[120],"m":"sei","x":[8266]},{"a":8287,"t":"code","b":[32,60,154],"m":"jsr","oa":39484,"o":"hide_sights_sprite"},{"a":8290,"t":"code","b":[56],"m":"sec"},{"a":8291,"t":"code","b":[110,215,12],"m":"ror","oa":3287,"o":"hide_sights"},{"a":8294,"t":"code","b":[88],"m":"cli"},{"a":8295,"t":"code","b":[173,27,33],"m":"lda","oa":8475,"o":"object_columns"},{"a":8298,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":8300,"t":"code","b":[76,124,32],"m":"jmp","oa":8316,"o":"j_207C"},{"a":8303,"l":"b_206F","t":"code","b":[165,150],"m":"lda","oa":150,"o":"strip_col","x":[8323]},{"a":8305,"t":"code","b":[24],"m":"clc"},{"a":8306,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":8308,"t":"code","b":[201,40],"m":"cmp","o":"#$28"},{"a":8310,"t":"code","b":[144,2],"m":"bcc","oa":8314,"o":"b_207A"},{"a":8312,"t":"code","b":[233,40],"m":"sbc","o":"#$28"},{"a":8314,"l":"b_207A","t":"code","b":[133,150],"m":"sta","oa":150,"o":"strip_col","x":[8310]},{"a":8316,"l":"j_207C","t":"code","b":[164,8],"m":"ldy","oa":8,"o":"last_pan_dir","x":[8300]},{"a":8318,"t":"code","b":[32,48,151],"m":"jsr","oa":38704,"o":"show_buffer_strip"},{"a":8321,"t":"code","b":[198,21],"m":"dec","oa":21,"o":"loop_count"},{"a":8323,"t":"code","b":[208,234],"m":"bne","oa":8303,"o":"b_206F"},{"a":8325,"l":"b_2085","t":"code","b":[78,215,12],"m":"lsr","oa":3287,"o":"hide_sights","x":[8284]},{"a":8328,"t":"code","b":[173,95,12],"m":"lda","oa":3167,"o":"sights_on"},{"a":8331,"t":"code","b":[16,5],"m":"bpl","oa":8338,"o":"b_2092"},{"a":8333,"t":"code","b":[120],"m":"sei"},{"a":8334,"t":"code","b":[32,220,153],"m":"jsr","oa":39388,"o":"place_sights_sprite"},{"a":8337,"t":"code","b":[88],"m":"cli"},{"a":8338,"l":"b_2092","t":"code","b":[76,147,31],"m":"jmp","oa":8083,"o":"reset_redraw_flags","x":[8331]},{"a":8341,"l":"buffer_copy_ptr","c":"Low byte of the address the column copier reads the bitmap buffer from: set by $992C (from $9921,Y) and advanced by $9730 as each column goes to the play view; $2096 is the high byte. The C64 keeps this variable at the BBC's address.","t":"byte","b":[0],"x":[38704,38711,39215]},{"a":8342,"l":"buffer_copy_ptr_hi","c":"High byte of the buffer read address whose low byte is $2095: written by $9935 (from $991D,Y), and carried into at $973F when $9730 steps on to the next column.","t":"byte","b":[0],"x":[38716,38722,39221]},{"a":8343,"l":"unused_screen_ptr","c":"Two bytes that no instruction reads or writes (searched for direct, indexed and indirect access). On the BBC Micro they held the screen address the redrawn object was copied to; the C64 redraw ($1F9F) works with a column number in $96 instead, so the variable is left over.","t":"byte","b":[0,0]},{"a":8345,"l":"dither_rounds","c":"How many rounds the dither routine at $86A5 runs; it counts this down at $87A4. redraw_object sets 25 at $1FA6, or 40 at $2053 for the picture shown when the Sentinel has won.","t":"byte","b":[0],"x":[8102,8275,34724]},{"a":8346,"l":"redraw_yaw_shift","c":"Whole part of the turn redraw_object gives the viewer so that the object's left edge sits at the left of the buffer: the object's first column ($0C62) halved at $1FC7-$1FCC (the half goes into $1F), added to the viewer's yaw at $1FD8.","t":"byte","b":[0],"x":[8135,8140,8152]},{"a":8347,"l":"find_object_on_screen","c":"Works out whether any of object $91 is in view and which character columns it covers; never for the player's own object ($0B). Gets the viewer's angle to the object ($8401), takes the object's half width by type from $2112 (at least $0CD4, which it then clears) and turns it into an angle ($933D). The left edge (yaw minus that angle, doubled into columns) is the first column, 0 if it is off to the left, not visible at 40 or more; the right edge likewise, clipped to 39. Returns carry clear when visible, with the first column in $0C62, the width in $0C6A and the width capped at 20 in $0C69; carry set when not. The C64 also keeps the first column in $211C and the uncapped width in $211B for its one-go copy in redraw_object. Callers: $1B10, $1F9F.","t":"code","b":[164,145],"m":"ldy","oa":145,"o":"current_obj","x":[6928,8095]},{"a":8349,"t":"code","b":[196,11],"m":"cpy","oa":11,"o":"player_obj"},{"a":8351,"t":"code","b":[240,111],"m":"beq","oa":8464,"o":"b_2110"},{"a":8353,"t":"code","b":[32,1,132],"m":"jsr","oa":33793,"o":"get_object_angles"},{"a":8356,"t":"code","b":[164,145],"m":"ldy","oa":145,"o":"current_obj"},{"a":8358,"t":"code","b":[190,64,10],"m":"ldx","oa":2624,"o":"obj_type,y"},{"a":8361,"t":"code","b":[189,18,33],"m":"lda","oa":8466,"o":"object_half_widths,x"},{"a":8364,"t":"code","b":[205,212,12],"m":"cmp","oa":3284,"o":"min_obj_width"},{"a":8367,"t":"code","b":[176,3],"m":"bcs","oa":8372,"o":"b_20B4"},{"a":8369,"t":"code","b":[173,212,12],"m":"lda","oa":3284,"o":"min_obj_width"},{"a":8372,"l":"b_20B4","t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo","x":[8367]},{"a":8374,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":8376,"t":"code","b":[141,212,12],"m":"sta","oa":3284,"o":"min_obj_width"},{"a":8379,"t":"code","b":[32,61,147],"m":"jsr","oa":37693,"o":"get_pitch_angle_delta"},{"a":8382,"t":"code","b":[173,89,12],"m":"lda","oa":3161,"o":"obj_rel_yaw_lo"},{"a":8385,"t":"code","b":[56],"m":"sec"},{"a":8386,"t":"code","b":[229,138],"m":"sbc","oa":138,"o":"angle_lo"},{"a":8388,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":8390,"t":"code","b":[173,87,12],"m":"lda","oa":3159,"o":"obj_rel_yaw_hi"},{"a":8393,"t":"code","b":[229,139],"m":"sbc","oa":139,"o":"angle_hi"},{"a":8395,"t":"code","b":[16,4],"m":"bpl","oa":8401,"o":"b_20D1"},{"a":8397,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":8399,"t":"code","b":[240,7],"m":"beq","oa":8408,"o":"b_20D8"},{"a":8401,"l":"b_20D1","t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t","x":[8395]},{"a":8403,"t":"code","b":[42],"m":"rol","o":"a"},{"a":8404,"t":"code","b":[201,40],"m":"cmp","o":"#$28"},{"a":8406,"t":"code","b":[176,56],"m":"bcs","oa":8464,"o":"b_2110"},{"a":8408,"l":"b_20D8","t":"code","b":[141,98,12],"m":"sta","oa":3170,"o":"obj_left_col","x":[8399]},{"a":8411,"t":"code","b":[141,28,33],"m":"sta","oa":8476,"o":"object_left_col"},{"a":8414,"t":"code","b":[173,89,12],"m":"lda","oa":3161,"o":"obj_rel_yaw_lo"},{"a":8417,"t":"code","b":[24],"m":"clc"},{"a":8418,"t":"code","b":[101,138],"m":"adc","oa":138,"o":"angle_lo"},{"a":8420,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":8422,"t":"code","b":[173,87,12],"m":"lda","oa":3159,"o":"obj_rel_yaw_hi"},{"a":8425,"t":"code","b":[101,139],"m":"adc","oa":139,"o":"angle_hi"},{"a":8427,"t":"code","b":[48,35],"m":"bmi","oa":8464,"o":"b_2110"},{"a":8429,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":8431,"t":"code","b":[42],"m":"rol","o":"a"},{"a":8432,"t":"code","b":[201,40],"m":"cmp","o":"#$28"},{"a":8434,"t":"code","b":[144,2],"m":"bcc","oa":8438,"o":"b_20F6"},{"a":8436,"t":"code","b":[169,39],"m":"lda","o":"#$27"},{"a":8438,"l":"b_20F6","t":"code","b":[24],"m":"clc","x":[8434]},{"a":8439,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":8441,"t":"code","b":[56],"m":"sec"},{"a":8442,"t":"code","b":[237,98,12],"m":"sbc","oa":3170,"o":"obj_left_col"},{"a":8445,"t":"code","b":[141,106,12],"m":"sta","oa":3178,"o":"obj_width_cols"},{"a":8448,"t":"code","b":[141,27,33],"m":"sta","oa":8475,"o":"object_columns"},{"a":8451,"t":"code","b":[240,11],"m":"beq","oa":8464,"o":"b_2110"},{"a":8453,"t":"code","b":[201,21],"m":"cmp","o":"#$15"},{"a":8455,"t":"code","b":[144,2],"m":"bcc","oa":8459,"o":"b_210B"},{"a":8457,"t":"code","b":[169,20],"m":"lda","o":"#$14"},{"a":8459,"l":"b_210B","t":"code","b":[141,105,12],"m":"sta","oa":3177,"o":"redraw_width_cols","x":[8455]},{"a":8462,"t":"code","b":[24],"m":"clc"},{"a":8463,"t":"code","b":[96],"m":"rts"},{"a":8464,"l":"b_2110","t":"code","b":[56],"m":"sec","x":[8351,8406,8427,8451]},{"a":8465,"t":"code","b":[96],"m":"rts"},{"a":8466,"l":"object_half_widths","c":"Half the width of each object type in 1/256 of a tile, for the on-screen test at $20A9: robot $3E, sentry $46, tree $72, boulder $7A, meanie $4A, Sentinel $4E, tower $C1. Same values as the BBC Micro.","t":"byte","b":[62,70,114,122,74,78,193],"x":[8361]},{"a":8473,"l":"next_pass_buffer","c":"C64 addition: the buffer type for the second drawing pass of a wide object. redraw_object zeroes it before the first pass ($1FBF) and sets 3 before the second ($2026); $1FE8 copies a non-zero value into $10, so the second part is drawn 160 bytes (20 columns) further right in the bitmap buffer.","t":"byte","b":[0],"x":[8127,8168,8230]},{"a":8474,"l":"saved_viewer_yaw","c":"C64 addition: the viewer's yaw, saved by redraw_object at $1FD5 before it turns the viewer towards the object and put back at $2005 (the BBC subtracted the turn again instead).","t":"byte","b":[0],"x":[8149,8197]},{"a":8475,"l":"object_columns","c":"C64 addition: the object's full on-screen width in character columns (1-40), stored by $2100 alongside $0C6A but never cut to 20. redraw_object fills that many columns ($1FB7) and copies that many ($2067), and the dither routine reads it at $86A5.","t":"byte","b":[0],"x":[8119,8295,8448,34469]},{"a":8476,"l":"object_left_col","c":"C64 addition: the object's first on-screen column (0-39), stored by $20DB. redraw_object adds the view's column offset $94 to it, mod 40, to find where its copy starts ($2035); unlike $0C62 it is not moved on between passes.","t":"byte","b":[0],"x":[8245,8411]},{"a":8477,"l":"alloc_object_slot","c":"Finds a free object slot for a new object of type A (0 robot, 1 sentry, 2 tree, 3 boulder, 4 meanie, 5 Sentinel, 6 tower). Stores the type in $0C61, then (from $2120) searches the flags at $0100 from slot 63 down for one with bit 7 set, which marks a free slot. None free: carry set. Otherwise the slot number goes to X and $91, the type to $0A40,X, and carry is clear. It does not place the object; $1F16 or $1238 does that. Callers: $1452, $149B, $1562, $1A67, $2158.","t":"code","b":[141,97,12],"m":"sta","oa":3169,"o":"action_key","x":[5202,5275,5474,6759,8536]},{"a":8480,"l":"alloc_slot_for_type","c":"Second way into alloc_object_slot, used when the type is already in $0C61: runs the slot search and bookkeeping from here to $2135. Called only from $1BBA, the create action, which then charges the energy at $1BC0 and places the object at $1BCF (refunding at $1BD5 if it cannot).","t":"code","b":[162,63],"m":"ldx","o":"#$3F","x":[7098]},{"a":8482,"l":"b_2122","t":"code","b":[189,0,1],"m":"lda","oa":256,"o":"obj_flags,x","x":[8488]},{"a":8485,"t":"code","b":[48,5],"m":"bmi","oa":8492,"o":"b_212C"},{"a":8487,"t":"code","b":[202],"m":"dex"},{"a":8488,"t":"code","b":[16,248],"m":"bpl","oa":8482,"o":"b_2122"},{"a":8490,"t":"code","b":[56],"m":"sec"},{"a":8491,"t":"code","b":[96],"m":"rts"},{"a":8492,"l":"b_212C","t":"code","b":[134,145],"m":"stx","oa":145,"o":"current_obj","x":[8485]},{"a":8494,"t":"code","b":[173,97,12],"m":"lda","oa":3169,"o":"action_key"},{"a":8497,"t":"code","b":[157,64,10],"m":"sta","oa":2624,"o":"obj_type,x"},{"a":8500,"t":"code","b":[24],"m":"clc"},{"a":8501,"t":"code","b":[96],"m":"rts"},{"a":8502,"l":"adjust_player_energy","c":"Adds (carry clear) or subtracts (carry set) the energy of object X's type, from the table at $214F, to the player's energy in $0C0A. A subtraction that would go below zero leaves $0C0A as it was and returns carry set; otherwise the result is kept to six bits (AND #$3F) and carry is clear. Callers: $1BA4, $1BC0, $1BD5, $216B.","t":"code","b":[188,64,10],"m":"ldy","oa":2624,"o":"obj_type,x","x":[7076,7104,7125,8555]},{"a":8505,"t":"code","b":[173,10,12],"m":"lda","oa":3082,"o":"player_energy"},{"a":8508,"t":"code","b":[144,7],"m":"bcc","oa":8517,"o":"b_2145"},{"a":8510,"t":"code","b":[249,79,33],"m":"sbc","oa":8527,"o":"energy_by_type,y"},{"a":8513,"t":"code","b":[176,5],"m":"bcs","oa":8520,"o":"b_2148"},{"a":8515,"t":"code","b":[56],"m":"sec"},{"a":8516,"t":"code","b":[96],"m":"rts"},{"a":8517,"l":"b_2145","t":"code","b":[121,79,33],"m":"adc","oa":8527,"o":"energy_by_type,y","x":[8508]},{"a":8520,"l":"b_2148","t":"code","b":[41,63],"m":"and","o":"#$3F","x":[8513]},{"a":8522,"t":"code","b":[141,10,12],"m":"sta","oa":3082,"o":"player_energy"},{"a":8525,"t":"code","b":[24],"m":"clc"},{"a":8526,"t":"code","b":[96],"m":"rts"},{"a":8527,"l":"energy_by_type","c":"Energy units of each object type, read by adjust_player_energy at $213E and $2145: robot 3, sentry 3, tree 1, boulder 2, meanie 1, Sentinel 4, tower 0. Same values as the BBC Micro.","t":"byte","b":[3,3,1,2,1,4,0],"x":[8510,8517]},{"a":8534,"l":"hyperspace_player","c":"The hyperspace. Takes a slot for a new robot ($211D with type 0) and tries to place it on a random tile, aiming below the player's height plus one ($1238, which picks coordinates through $1272); if that fails it returns carry set. The robot's 3 units are then taken from the player ($2136). If the player cannot pay, the robot is removed again ($1EEF), $0C4C = 3 (black background with stars) and $0CDE = $80, the game ending by hyperspace. Otherwise it starts the hyperspace tune ($888F with A = 0); if the player is standing on the Sentinel's tile ($0C19/$0C1A) the landscape is won ($0CDE = $C0, $0C71 = $80); then it calls $1214 and makes the new robot the player ($0B). Both outcomes end with $0C63 = $80 (the player has moved) and carry clear. Callers: $171D, $1B1F.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[5917,6943]},{"a":8536,"t":"code","b":[32,29,33],"m":"jsr","oa":8477,"o":"alloc_object_slot"},{"a":8539,"t":"code","b":[166,11],"m":"ldx","oa":11,"o":"player_obj"},{"a":8541,"t":"code","b":[189,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,x"},{"a":8544,"t":"code","b":[24],"m":"clc"},{"a":8545,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":8547,"t":"code","b":[166,145],"m":"ldx","oa":145,"o":"current_obj"},{"a":8549,"t":"code","b":[32,56,18],"m":"jsr","oa":4664,"o":"place_object_low"},{"a":8552,"t":"code","b":[176,67],"m":"bcs","oa":8621,"o":"r_21AD"},{"a":8554,"t":"code","b":[56],"m":"sec"},{"a":8555,"t":"code","b":[32,54,33],"m":"jsr","oa":8502,"o":"adjust_player_energy"},{"a":8558,"t":"code","b":[144,15],"m":"bcc","oa":8575,"o":"b_217F"},{"a":8560,"t":"code","b":[32,239,30],"m":"jsr","oa":7919,"o":"remove_object"},{"a":8563,"t":"code","b":[169,3],"m":"lda","o":"#$03"},{"a":8565,"t":"code","b":[141,76,12],"m":"sta","oa":3148,"o":"backdrop_kind"},{"a":8568,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":8570,"t":"code","b":[141,222,12],"m":"sta","oa":3294,"o":"hyperspace_ended"},{"a":8573,"t":"code","b":[208,40],"m":"bne","oa":8615,"o":"b_21A7"},{"a":8575,"l":"b_217F","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[8558]},{"a":8577,"t":"code","b":[32,143,136],"m":"jsr","oa":34959,"o":"start_music"},{"a":8580,"t":"code","b":[166,11],"m":"ldx","oa":11,"o":"player_obj"},{"a":8582,"t":"code","b":[189,0,9],"m":"lda","oa":2304,"o":"obj_x,x"},{"a":8585,"t":"code","b":[205,25,12],"m":"cmp","oa":3097,"o":"sentinel_x"},{"a":8588,"t":"code","b":[208,18],"m":"bne","oa":8608,"o":"b_21A0"},{"a":8590,"t":"code","b":[189,128,9],"m":"lda","oa":2432,"o":"obj_z,x"},{"a":8593,"t":"code","b":[205,26,12],"m":"cmp","oa":3098,"o":"sentinel_z"},{"a":8596,"t":"code","b":[208,10],"m":"bne","oa":8608,"o":"b_21A0"},{"a":8598,"t":"code","b":[169,192],"m":"lda","o":"#$C0"},{"a":8600,"t":"code","b":[141,222,12],"m":"sta","oa":3294,"o":"hyperspace_ended"},{"a":8603,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":8605,"t":"code","b":[141,113,12],"m":"sta","oa":3185,"o":"no_play_after_build"},{"a":8608,"l":"b_21A0","t":"code","b":[32,20,18],"m":"jsr","oa":4628,"o":"focus_on_action","x":[8588,8596]},{"a":8611,"t":"code","b":[166,145],"m":"ldx","oa":145,"o":"current_obj"},{"a":8613,"t":"code","b":[134,11],"m":"stx","oa":11,"o":"player_obj"},{"a":8615,"l":"b_21A7","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[8573]},{"a":8617,"t":"code","b":[141,99,12],"m":"sta","oa":3171,"o":"player_moved"},{"a":8620,"t":"code","b":[24],"m":"clc"},{"a":8621,"l":"r_21AD","t":"code","b":[96],"m":"rts","x":[8552]},{"a":8622,"l":"draw_stacked_objects","c":"Draws every object on a tile, given the tile byte in A (bits 0-5 name the top object, kept in $0C6C). Counts the stack by following bit 6 of each object's flags at $0100 down to the bottom object ($0C6B = how many sit above it). A lone object is drawn directly. For a stack it compares the player's height ($0B) with that of the object being drawn: a player below it draws the rest top down; a player above it, or level with anything but the Sentinel's tower, draws bottom up, counting down from the top each time to find the next object up; level with the tower it draws top down, so the platform hides the Sentinel's feet. Objects are drawn by $8533. Reached by JMP from $2A32. Same as the BBC Micro routine.","t":"code","b":[41,63],"m":"and","o":"#$3F","x":[10802]},{"a":8624,"t":"code","b":[141,108,12],"m":"sta","oa":3180,"o":"stack_top_obj"},{"a":8627,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":8629,"l":"b_21B5","t":"code","b":[232],"m":"inx","x":[8638]},{"a":8630,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":8632,"t":"code","b":[168],"m":"tay"},{"a":8633,"t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y"},{"a":8636,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":8638,"t":"code","b":[176,245],"m":"bcs","oa":8629,"o":"b_21B5"},{"a":8640,"t":"code","b":[202],"m":"dex"},{"a":8641,"t":"code","b":[142,107,12],"m":"stx","oa":3179,"o":"stack_count"},{"a":8644,"t":"code","b":[240,60],"m":"beq","oa":8706,"o":"b_2202"},{"a":8646,"l":"b_21C6","t":"code","b":[166,11],"m":"ldx","oa":11,"o":"player_obj","x":[8701]},{"a":8648,"t":"code","b":[189,0,10],"m":"lda","oa":2560,"o":"obj_y_lo,x"},{"a":8651,"t":"code","b":[56],"m":"sec"},{"a":8652,"t":"code","b":[249,0,10],"m":"sbc","oa":2560,"o":"obj_y_lo,y"},{"a":8655,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":8657,"t":"code","b":[189,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,x"},{"a":8660,"t":"code","b":[249,64,9],"m":"sbc","oa":2368,"o":"obj_y_hi,y"},{"a":8663,"t":"code","b":[48,38],"m":"bmi","oa":8703,"o":"b_21FF"},{"a":8665,"t":"code","b":[5,116],"m":"ora","oa":116,"o":"tmp_t"},{"a":8667,"t":"code","b":[208,7],"m":"bne","oa":8676,"o":"b_21E4"},{"a":8669,"t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y"},{"a":8672,"t":"code","b":[201,6],"m":"cmp","o":"#$06"},{"a":8674,"t":"code","b":[240,27],"m":"beq","oa":8703,"o":"b_21FF"},{"a":8676,"l":"b_21E4","t":"code","b":[32,51,133],"m":"jsr","oa":34099,"o":"draw_object","x":[8667]},{"a":8679,"t":"code","b":[172,108,12],"m":"ldy","oa":3180,"o":"stack_top_obj"},{"a":8682,"t":"code","b":[206,107,12],"m":"dec","oa":3179,"o":"stack_count"},{"a":8685,"t":"code","b":[48,33],"m":"bmi","oa":8720,"o":"r_2210"},{"a":8687,"t":"code","b":[174,107,12],"m":"ldx","oa":3179,"o":"stack_count"},{"a":8690,"t":"code","b":[16,7],"m":"bpl","oa":8699,"o":"b_21FB"},{"a":8692,"l":"b_21F4","t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y","x":[8699]},{"a":8695,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":8697,"t":"code","b":[168],"m":"tay"},{"a":8698,"t":"code","b":[202],"m":"dex"},{"a":8699,"l":"b_21FB","t":"code","b":[208,247],"m":"bne","oa":8692,"o":"b_21F4","x":[8690]},{"a":8701,"t":"code","b":[240,199],"m":"beq","oa":8646,"o":"b_21C6"},{"a":8703,"l":"b_21FF","t":"code","b":[172,108,12],"m":"ldy","oa":3180,"o":"stack_top_obj","x":[8663,8674]},{"a":8706,"l":"b_2202","t":"code","b":[32,51,133],"m":"jsr","oa":34099,"o":"draw_object","x":[8644,8718]},{"a":8709,"t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y"},{"a":8712,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":8714,"t":"code","b":[168],"m":"tay"},{"a":8715,"t":"code","b":[206,107,12],"m":"dec","oa":3179,"o":"stack_count"},{"a":8718,"t":"code","b":[16,242],"m":"bpl","oa":8706,"o":"b_2202"},{"a":8720,"l":"r_2210","t":"code","b":[96],"m":"rts","x":[8685]},{"a":8721,"l":"fill_background","c":"Fills a block of character cells of the bitmap at $E000-$FF3F (the title picture itself, and in play the buffer that is copied to the view) with one of four backgrounds. A = first row, an index into the row address tables $3D83/$3DB5 (the BBC used 0 for its screen and 25 for its buffer; on the C64 both halves of those tables give the same rows of the $E000 bitmap). X = columns, Y = rows. $0C4C picks the background, whose bytes for even and odd pixel lines come from $2286 and $228A, so each cell's eight bytes alternate between the two. Rows wider than 32 columns take two passes of at most 256 bytes. C64 change: LDX #$20 now comes before SBC #$20 ($221A), so exactly 32 columns is a single pass; in the BBC order that case began a second pass with a count of 0, which the loop runs as 256 columns. None of the BBC's four calls asked for exactly 32 (they used 40, 40, 16 and at most 20); the C64 redraw asks for any width up to 40 ($1FBA). Callers: $10A1 (40 columns, 24 rows), $1FBA.","t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z","x":[4257,8122]},{"a":8723,"t":"code","b":[132,87],"m":"sty","oa":87,"o":"fill_rows_left"},{"a":8725,"t":"code","b":[138],"m":"txa"},{"a":8726,"t":"code","b":[201,32],"m":"cmp","o":"#$20"},{"a":8728,"t":"code","b":[144,6],"m":"bcc","oa":8736,"o":"b_2220"},{"a":8730,"t":"code","b":[162,32],"m":"ldx","o":"#$20"},{"a":8732,"t":"code","b":[233,32],"m":"sbc","o":"#$20"},{"a":8734,"t":"code","b":[208,2],"m":"bne","oa":8738,"o":"b_2222"},{"a":8736,"l":"b_2220","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[8728]},{"a":8738,"l":"b_2222","t":"code","b":[133,30],"m":"sta","oa":30,"o":"shared_counter_1E","x":[8734]},{"a":8740,"t":"code","b":[134,37],"m":"stx","oa":37,"o":"tile_col_or_fill_count"},{"a":8742,"t":"code","b":[174,76,12],"m":"ldx","oa":3148,"o":"backdrop_kind"},{"a":8745,"t":"code","b":[189,134,34],"m":"lda","oa":8838,"o":"bg_even_lines,x"},{"a":8748,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":8750,"t":"code","b":[189,138,34],"m":"lda","oa":8842,"o":"bg_odd_lines,x"},{"a":8753,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":8755,"l":"b_2233","t":"code","b":[166,38],"m":"ldx","oa":38,"o":"tile_z","x":[8835]},{"a":8757,"t":"code","b":[189,131,61],"m":"lda","oa":15747,"o":"bitmap_row_lo,x"},{"a":8760,"t":"code","b":[133,112],"m":"sta","oa":112,"o":"tmp_p"},{"a":8762,"t":"code","b":[189,181,61],"m":"lda","oa":15797,"o":"bitmap_row_hi,x"},{"a":8765,"t":"code","b":[133,113],"m":"sta","oa":113,"o":"tmp_q"},{"a":8767,"t":"code","b":[166,37],"m":"ldx","oa":37,"o":"tile_col_or_fill_count"},{"a":8769,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":8771,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":8773,"l":"j_2245","t":"code","b":[160,255],"m":"ldy","o":"#$FF","x":[8828]},{"a":8775,"l":"b_2247","t":"code","b":[200],"m":"iny","x":[8816]},{"a":8776,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":8778,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":8780,"t":"code","b":[200],"m":"iny"},{"a":8781,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":8783,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":8785,"t":"code","b":[200],"m":"iny"},{"a":8786,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":8788,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":8790,"t":"code","b":[200],"m":"iny"},{"a":8791,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":8793,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":8795,"t":"code","b":[200],"m":"iny"},{"a":8796,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":8798,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":8800,"t":"code","b":[200],"m":"iny"},{"a":8801,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":8803,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":8805,"t":"code","b":[200],"m":"iny"},{"a":8806,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":8808,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":8810,"t":"code","b":[200],"m":"iny"},{"a":8811,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":8813,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":8815,"t":"code","b":[202],"m":"dex"},{"a":8816,"t":"code","b":[208,213],"m":"bne","oa":8775,"o":"b_2247"},{"a":8818,"t":"code","b":[198,21],"m":"dec","oa":21,"o":"loop_count"},{"a":8820,"t":"code","b":[48,9],"m":"bmi","oa":8831,"o":"b_227F"},{"a":8822,"t":"code","b":[166,30],"m":"ldx","oa":30,"o":"shared_counter_1E"},{"a":8824,"t":"code","b":[48,5],"m":"bmi","oa":8831,"o":"b_227F"},{"a":8826,"t":"code","b":[230,113],"m":"inc","oa":113,"o":"tmp_q"},{"a":8828,"t":"code","b":[76,69,34],"m":"jmp","oa":8773,"o":"j_2245"},{"a":8831,"l":"b_227F","t":"code","b":[230,38],"m":"inc","oa":38,"o":"tile_z","x":[8820,8824]},{"a":8833,"t":"code","b":[198,87],"m":"dec","oa":87,"o":"fill_rows_left"},{"a":8835,"t":"code","b":[208,174],"m":"bne","oa":8755,"o":"b_2233"},{"a":8837,"t":"code","b":[96],"m":"rts"},{"a":8838,"l":"bg_even_lines","c":"Background byte for even pixel lines, by the background number in $0C4C, read by fill_background at $2229: $00 $00 $AA $55. In C64 multicolour, two bits to a pixel, with $228A: background 0 alternates lines of colour 0 and colour 1 (the sky in play), 1 is plain colour 0, 2 alternates lines of colour 2 and colour 1, 3 is plain colour 1. The BBC's same bytes $AA/$55 for background 2 made a checkerboard of colours 3 and 0; its colour 1 byte was $0F.","t":"byte","b":[0,0,170,85],"x":[8745]},{"a":8842,"l":"bg_odd_lines","c":"Background byte for odd pixel lines, by background number 0-3, read by fill_background at $222E: $55 $00 $55 $55 (the BBC had $0F $00 $55 $0F).","t":"byte","b":[85,0,85,85],"x":[8750]},{"a":8846,"l":"pixel_masks","c":"Mask of a single multicolour pixel by its position 0-3 in the byte, counted from the left: $C0 $30 $0C $03 (the BBC's mode 5 masks were $88 $44 $22 $11). Read from outside this range, at $877C, $943F and $944E.","t":"byte","b":[192,48,12,3],"x":[34684,37951,37966]},{"a":8850,"l":"colour_bytes","c":"A byte of four pixels all in one colour, by colour 0-3: $00 $55 $AA $FF (BBC $00 $0F $F0 $FF). draw_polygon_spans takes a polygon's fill byte from here at $2303.","t":"byte","b":[0,85,170,255],"x":[8963]},{"a":8854,"l":"masks_left_of","c":"Mask of the pixels to the left of position 0-3: $00 $C0 $F0 $FC (BBC $00 $88 $CC $EE). draw_polygon_spans uses it at $235B and $23BB to keep what is already on screen left of a span's first pixel.","t":"byte","b":[0,192,240,252],"x":[9051,9147]},{"a":8858,"l":"masks_right_of","c":"Mask of the pixels to the right of position 0-3: $3F $0F $03 $00 (BBC $77 $33 $11 $00). draw_polygon_spans uses it at $2368 and $2396 to keep what is right of a span's last pixel.","t":"byte","b":[63,15,3,0],"x":[9064,9110]},{"a":8862,"l":"masks_through","c":"Mask of position 0-3 and every pixel left of it: $C0 $F0 $FC $FF (BBC $88 $CC $EE $FF). draw_polygon_spans uses it at $2361 when a span starts and ends inside one byte.","t":"byte","b":[192,240,252,255],"x":[9057]},{"a":8866,"l":"buffer_offsets","c":"Offset added to the start of a buffer line by buffer type ($10), read at $22D4: 0 for the left row buffer, $60 (96 bytes, 12 columns) for the right row buffer, 0 for the column buffer, and $A0 (160 bytes, 20 columns) for type 3, a C64 addition used for the second half of a wide object ($2119). The C64 adds only this low byte and the carry ($22D4-$22DC).","t":"byte","b":[0,96,0,160],"x":[8916]},{"a":8870,"l":"unused_offsets_hi","c":"Four zero bytes that nothing reads: high bytes for the offsets at $22A2, which the BBC Micro added from a table of its own (three entries there). The C64's draw_polygon_spans adds just a carry to the high byte ($22DC), so these are left over, grown to four entries like the table beside them.","t":"byte","b":[0,0,0,0]},{"a":8874,"l":"draw_polygon_spans","c":"Draws a filled polygon into the bitmap at $E000-$FF3F (the title picture itself, and in play the buffer that is copied to the view) from its outline, one pixel line at a time: line numbers run from $06 (top) down to $04, and each line's left and right pixel x are in $AD00 and $AE00 (the BBC's $5A00/$5B00, moved +$5300). Returns at once if the middle line's right end is left of its left end (the polygon faces away). $19 holds the colours, fill in bits 2-3 and edge in bits 4-5 (bit 7 of $0C7A makes the edge the fill colour); they are patched into three ORA operands ($235F, $239A, $23BF) and the fill byte comes from $2292. Lines are clipped to the buffer area ($35 and $36 its left and right, $61 its width); $2C and $2D, set to 1 at the start, change when a line runs off the right or the left of it. C64 changes: the first line's address no longer adds the BBC's screen-or-buffer offset ($55), because the C64's row table at $3D83/$3DB5 always gives rows of the $E000 bitmap, 320 bytes apart, and $22A2 has four buffer types; moving down a character row ($231C-$2329) just adds $139, without the BBC's wrap from $5300 back to its buffer's row 16. Callers: $2AB4, $2AC8.","t":"code","b":[169,1],"m":"lda","o":"#$01","x":[10932,10952]},{"a":8876,"t":"code","b":[133,44],"m":"sta","oa":44,"o":"vec_x_bot_or_goes_right"},{"a":8878,"t":"code","b":[133,45],"m":"sta","oa":45,"o":"vec_y_bot_or_goes_left"},{"a":8880,"t":"code","b":[165,6],"m":"lda","oa":6,"o":"tile_height_or_poly_top"},{"a":8882,"t":"code","b":[24],"m":"clc"},{"a":8883,"t":"code","b":[101,4],"m":"adc","oa":4,"o":"poly_bottom_y"},{"a":8885,"t":"code","b":[106],"m":"ror","o":"a"},{"a":8886,"t":"code","b":[170],"m":"tax"},{"a":8887,"t":"code","b":[189,0,174],"m":"lda","oa":44544,"o":"polygon_right_x,x"},{"a":8890,"t":"code","b":[221,0,173],"m":"cmp","oa":44288,"o":"polygon_left_x,x"},{"a":8893,"t":"code","b":[144,81],"m":"bcc","oa":8976,"o":"r_2310"},{"a":8895,"t":"code","b":[169,240],"m":"lda","o":"#$F0"},{"a":8897,"t":"code","b":[24],"m":"clc"},{"a":8898,"t":"code","b":[229,6],"m":"sbc","oa":6,"o":"tile_height_or_poly_top"},{"a":8900,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":8902,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":8903,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":8904,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":8905,"t":"code","b":[170],"m":"tax"},{"a":8906,"t":"code","b":[164,16],"m":"ldy","oa":16,"o":"buffer_kind"},{"a":8908,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":8910,"t":"code","b":[41,7],"m":"and","o":"#$07"},{"a":8912,"t":"code","b":[29,131,61],"m":"ora","oa":15747,"o":"bitmap_row_lo,x"},{"a":8915,"t":"code","b":[24],"m":"clc"},{"a":8916,"t":"code","b":[121,162,34],"m":"adc","oa":8866,"o":"buffer_offsets,y"},{"a":8919,"t":"code","b":[133,114],"m":"sta","oa":114,"o":"tmp_r"},{"a":8921,"t":"code","b":[189,181,61],"m":"lda","oa":15797,"o":"bitmap_row_hi,x"},{"a":8924,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":8926,"t":"code","b":[133,115],"m":"sta","oa":115,"o":"tmp_s"},{"a":8928,"t":"code","b":[165,25],"m":"lda","oa":25,"o":"poly_colours_or_row"},{"a":8930,"t":"code","b":[44,122,12],"m":"bit","oa":3194,"o":"edge_in_fill_colour"},{"a":8933,"t":"code","b":[16,12],"m":"bpl","oa":8947,"o":"b_22F3"},{"a":8935,"t":"code","b":[41,207],"m":"and","o":"#$CF"},{"a":8937,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":8939,"t":"code","b":[165,25],"m":"lda","oa":25,"o":"poly_colours_or_row"},{"a":8941,"t":"code","b":[10],"m":"asl","o":"a"},{"a":8942,"t":"code","b":[10],"m":"asl","o":"a"},{"a":8943,"t":"code","b":[41,48],"m":"and","o":"#$30"},{"a":8945,"t":"code","b":[5,116],"m":"ora","oa":116,"o":"tmp_t"},{"a":8947,"l":"b_22F3","t":"code","b":[141,191,35],"m":"sta","oa":9151,"o":"a_23BF","x":[8933]},{"a":8950,"t":"code","b":[141,95,35],"m":"sta","oa":9055,"o":"a_235F"},{"a":8953,"t":"code","b":[9,64],"m":"ora","o":"#$40"},{"a":8955,"t":"code","b":[141,154,35],"m":"sta","oa":9114,"o":"a_239A"},{"a":8958,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":8959,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":8960,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":8962,"t":"code","b":[168],"m":"tay"},{"a":8963,"t":"code","b":[185,146,34],"m":"lda","oa":8850,"o":"colour_bytes,y"},{"a":8966,"t":"code","b":[133,88],"m":"sta","oa":88,"o":"poly_fill_byte"},{"a":8968,"t":"code","b":[164,6],"m":"ldy","oa":6,"o":"tile_height_or_poly_top"},{"a":8970,"t":"code","b":[132,26],"m":"sty","oa":26,"o":"shared_1A"},{"a":8972,"t":"code","b":[196,4],"m":"cpy","oa":4,"o":"poly_bottom_y"},{"a":8974,"t":"code","b":[176,103],"m":"bcs","oa":9079,"o":"span_line_start"},{"a":8976,"l":"r_2310","t":"code","b":[96],"m":"rts","x":[8893,8981,9085]},{"a":8977,"l":"span_next_line","t":"code","b":[164,26],"m":"ldy","oa":26,"o":"shared_1A","x":[9007,9013,9071,9304]},{"a":8979,"t":"code","b":[196,4],"m":"cpy","oa":4,"o":"poly_bottom_y"},{"a":8981,"t":"code","b":[240,249],"m":"beq","oa":8976,"o":"r_2310"},{"a":8983,"t":"code","b":[152],"m":"tya"},{"a":8984,"t":"code","b":[41,7],"m":"and","o":"#$07"},{"a":8986,"t":"code","b":[208,86],"m":"bne","oa":9074,"o":"b_2372"},{"a":8988,"t":"code","b":[165,114],"m":"lda","oa":114,"o":"tmp_r"},{"a":8990,"t":"code","b":[24],"m":"clc"},{"a":8991,"t":"code","b":[105,57],"m":"adc","o":"#$39"},{"a":8993,"t":"code","b":[133,114],"m":"sta","oa":114,"o":"tmp_r"},{"a":8995,"t":"code","b":[165,115],"m":"lda","oa":115,"o":"tmp_s"},{"a":8997,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":8999,"t":"code","b":[133,115],"m":"sta","oa":115,"o":"tmp_s"},{"a":9001,"t":"code","b":[208,73],"m":"bne","oa":9076,"o":"b_2374"},{"a":9003,"l":"b_232B","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[9090]},{"a":9005,"t":"code","b":[133,45],"m":"sta","oa":45,"o":"vec_y_bot_or_goes_left"},{"a":9007,"t":"code","b":[240,224],"m":"beq","oa":8977,"o":"span_next_line"},{"a":9009,"l":"b_2331","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[9126]},{"a":9011,"t":"code","b":[133,44],"m":"sta","oa":44,"o":"vec_x_bot_or_goes_right"},{"a":9013,"t":"code","b":[240,218],"m":"beq","oa":8977,"o":"span_next_line"},{"a":9015,"l":"b_2337","t":"code","b":[165,97],"m":"lda","oa":97,"o":"cur_buffer_width_px","x":[9094]},{"a":9017,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9018,"t":"code","b":[133,86],"m":"sta","oa":86,"o":"poly_right_x"},{"a":9020,"t":"code","b":[133,44],"m":"sta","oa":44,"o":"vec_x_bot_or_goes_right"},{"a":9022,"t":"code","b":[208,94],"m":"bne","oa":9118,"o":"b_239E"},{"a":9024,"l":"b_2340","t":"code","b":[165,114],"m":"lda","oa":114,"o":"tmp_r","x":[9131]},{"a":9026,"t":"code","b":[56],"m":"sec"},{"a":9027,"t":"code","b":[233,8],"m":"sbc","o":"#$08"},{"a":9029,"t":"code","b":[133,112],"m":"sta","oa":112,"o":"tmp_p"},{"a":9031,"t":"code","b":[165,115],"m":"lda","oa":115,"o":"tmp_s"},{"a":9033,"t":"code","b":[233,0],"m":"sbc","o":"#$00"},{"a":9035,"t":"code","b":[133,113],"m":"sta","oa":113,"o":"tmp_q"},{"a":9037,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":9039,"t":"code","b":[133,45],"m":"sta","oa":45,"o":"vec_y_bot_or_goes_left"},{"a":9041,"t":"code","b":[169,248],"m":"lda","o":"#$F8"},{"a":9043,"t":"code","b":[208,123],"m":"bne","oa":9168,"o":"b_23D0"},{"a":9045,"l":"b_2355","t":"code","b":[138],"m":"txa","x":[9139]},{"a":9046,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":9048,"t":"code","b":[170],"m":"tax"},{"a":9049,"t":"code","b":[165,84],"m":"lda","oa":84,"o":"right_edge_old_byte"},{"a":9051,"t":"code","b":[61,150,34],"m":"and","oa":8854,"o":"masks_left_of,x"},{"a":9054,"t":"code","b":[29,60,62],"m":"ora","oa":15932,"o":"edge_left_colour_3c,x"},{"a":9055,"t":"note","l":"a_235F","c":"Patched operand: low byte of ORA $3E3C,X at $235E, written at $22F6 with the colour byte so that the edge pixels of a span that starts and ends inside one byte come from the left-edge patterns at $3E00 + colours + position. The code from here to $2376 finishes that case and moves down a pixel line (INC $72 within a character, DEY for the line number); $2377 starts a line: reads its ends from $AD00/$AE00, returns once they cross, clips the right end to the buffer and keeps the pixels right of its last one.","note":"inside the item at $235E","x":[8950]},{"a":9057,"t":"code","b":[61,158,34],"m":"and","oa":8862,"o":"masks_through,x"},{"a":9060,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":9062,"t":"code","b":[177,114],"m":"lda","oa":114,"o":"(tmp_r),y"},{"a":9064,"t":"code","b":[61,154,34],"m":"and","oa":8858,"o":"masks_right_of,x"},{"a":9067,"t":"code","b":[5,116],"m":"ora","oa":116,"o":"tmp_t"},{"a":9069,"t":"code","b":[145,114],"m":"sta","oa":114,"o":"(tmp_r),y"},{"a":9071,"t":"code","b":[76,17,35],"m":"jmp","oa":8977,"o":"span_next_line"},{"a":9074,"l":"b_2372","t":"code","b":[230,114],"m":"inc","oa":114,"o":"tmp_r","x":[8986]},{"a":9076,"l":"b_2374","t":"code","b":[136],"m":"dey","x":[9001]},{"a":9077,"t":"code","b":[132,26],"m":"sty","oa":26,"o":"shared_1A"},{"a":9079,"l":"span_line_start","t":"code","b":[185,0,174],"m":"lda","oa":44544,"o":"polygon_right_x,y","x":[8974]},{"a":9082,"t":"code","b":[217,0,173],"m":"cmp","oa":44288,"o":"polygon_left_x,y"},{"a":9085,"t":"code","b":[144,145],"m":"bcc","oa":8976,"o":"r_2310"},{"a":9087,"t":"code","b":[170],"m":"tax"},{"a":9088,"t":"code","b":[229,53],"m":"sbc","oa":53,"o":"coord_y_bot_or_buf_left"},{"a":9090,"t":"code","b":[144,167],"m":"bcc","oa":9003,"o":"b_232B"},{"a":9092,"t":"code","b":[197,97],"m":"cmp","oa":97,"o":"cur_buffer_width_px"},{"a":9094,"t":"code","b":[176,175],"m":"bcs","oa":9015,"o":"b_2337"},{"a":9096,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9097,"t":"code","b":[41,248],"m":"and","o":"#$F8"},{"a":9099,"t":"code","b":[168],"m":"tay"},{"a":9100,"t":"code","b":[138],"m":"txa"},{"a":9101,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":9103,"t":"code","b":[170],"m":"tax"},{"a":9104,"t":"code","b":[132,86],"m":"sty","oa":86,"o":"poly_right_x"},{"a":9106,"t":"code","b":[177,114],"m":"lda","oa":114,"o":"(tmp_r),y"},{"a":9108,"t":"code","b":[133,84],"m":"sta","oa":84,"o":"right_edge_old_byte"},{"a":9110,"t":"code","b":[61,154,34],"m":"and","oa":8858,"o":"masks_right_of,x"},{"a":9113,"t":"code","b":[29,124,62],"m":"ora","oa":15996,"o":"edge_right_colour_3c,x"},{"a":9114,"t":"note","l":"a_239A","c":"Patched operand: low byte of ORA $3E7C,X at $2399, written at $22FB with the colour byte plus $40, so a line's right end takes its edge pixels from the right-edge patterns at $3E40 + colours + position. After it the routine stores that right-end byte and turns to the line's left end ($239E on): a line lying right of the buffer is flagged in $2C and skipped, one starting left of it begins at the buffer's edge ($2340), one whose ends share a byte goes to $2355, otherwise the pixels left of its first one are kept.","note":"inside the item at $2399","x":[8955]},{"a":9116,"t":"code","b":[145,114],"m":"sta","oa":114,"o":"(tmp_r),y"},{"a":9118,"l":"b_239E","t":"code","b":[164,26],"m":"ldy","oa":26,"o":"shared_1A","x":[9022]},{"a":9120,"t":"code","b":[185,0,173],"m":"lda","oa":44288,"o":"polygon_left_x,y"},{"a":9123,"t":"code","b":[170],"m":"tax"},{"a":9124,"t":"code","b":[197,54],"m":"cmp","oa":54,"o":"coord_z_bot_or_buf_right"},{"a":9126,"t":"code","b":[176,137],"m":"bcs","oa":9009,"o":"b_2331"},{"a":9128,"t":"code","b":[56],"m":"sec"},{"a":9129,"t":"code","b":[229,53],"m":"sbc","oa":53,"o":"coord_y_bot_or_buf_left"},{"a":9131,"t":"code","b":[144,147],"m":"bcc","oa":9024,"o":"b_2340"},{"a":9133,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9134,"t":"code","b":[41,248],"m":"and","o":"#$F8"},{"a":9136,"t":"code","b":[168],"m":"tay"},{"a":9137,"t":"code","b":[196,86],"m":"cpy","oa":86,"o":"poly_right_x"},{"a":9139,"t":"code","b":[176,160],"m":"bcs","oa":9045,"o":"b_2355"},{"a":9141,"t":"code","b":[138],"m":"txa"},{"a":9142,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":9144,"t":"code","b":[170],"m":"tax"},{"a":9145,"t":"code","b":[177,114],"m":"lda","oa":114,"o":"(tmp_r),y"},{"a":9147,"t":"code","b":[61,150,34],"m":"and","oa":8854,"o":"masks_left_of,x"},{"a":9150,"t":"code","b":[29,60,62],"m":"ora","oa":15932,"o":"edge_left_colour_3c,x"},{"a":9151,"t":"note","l":"a_23BF","c":"Patched operand: low byte of ORA $3E3C,X at $23BE, written at $22F3 with the colour byte, giving the left-edge pixels of a line's first byte. The code after it points $70/$71 at that byte and works out how many whole bytes lie between the two ends ($23D0-$23D4).","note":"inside the item at $23BE","x":[8947]},{"a":9153,"t":"code","b":[145,114],"m":"sta","oa":114,"o":"(tmp_r),y"},{"a":9155,"t":"code","b":[152],"m":"tya"},{"a":9156,"t":"code","b":[24],"m":"clc"},{"a":9157,"t":"code","b":[101,114],"m":"adc","oa":114,"o":"tmp_r"},{"a":9159,"t":"code","b":[133,112],"m":"sta","oa":112,"o":"tmp_p"},{"a":9161,"t":"code","b":[165,115],"m":"lda","oa":115,"o":"tmp_s"},{"a":9163,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":9165,"t":"code","b":[133,113],"m":"sta","oa":113,"o":"tmp_q"},{"a":9167,"t":"code","b":[152],"m":"tya"},{"a":9168,"l":"b_23D0","t":"code","b":[56],"m":"sec","x":[9043]},{"a":9169,"t":"code","b":[229,86],"m":"sbc","oa":86,"o":"poly_right_x"},{"a":9171,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9172,"t":"code","b":[141,219,35],"m":"sta","oa":9179,"o":"a_23DB"},{"a":9175,"t":"code","b":[165,88],"m":"lda","oa":88,"o":"poly_fill_byte"},{"a":9177,"t":"code","b":[24],"m":"clc"},{"a":9178,"t":"code","b":[144,124],"m":"bcc","oa":9304,"o":"b_2458"},{"a":9179,"t":"note","l":"a_23DB","c":"Patched operand: the offset of BCC at $23DA, written at $23D4 from the byte distance between the line's ends (left offset minus right offset, halved), so the branch lands inside the unrolled run of LDY #n / STA ($70),Y from $23DC to $2457 and stores the fill byte ($58) into just the whole bytes between the two ends, working from the right one back, 8 bytes apart (one character cell each). $2458 then goes back for the next line.","note":"inside the item at $23DA","x":[9172]},{"a":9180,"t":"code","b":[160,248],"m":"ldy","o":"#$F8"},{"a":9182,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9184,"t":"code","b":[160,240],"m":"ldy","o":"#$F0"},{"a":9186,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9188,"t":"code","b":[160,232],"m":"ldy","o":"#$E8"},{"a":9190,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9192,"t":"code","b":[160,224],"m":"ldy","o":"#$E0"},{"a":9194,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9196,"t":"code","b":[160,216],"m":"ldy","o":"#$D8"},{"a":9198,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9200,"t":"code","b":[160,208],"m":"ldy","o":"#$D0"},{"a":9202,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9204,"t":"code","b":[160,200],"m":"ldy","o":"#$C8"},{"a":9206,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9208,"t":"code","b":[160,192],"m":"ldy","o":"#$C0"},{"a":9210,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9212,"t":"code","b":[160,184],"m":"ldy","o":"#$B8"},{"a":9214,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9216,"t":"code","b":[160,176],"m":"ldy","o":"#$B0"},{"a":9218,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9220,"t":"code","b":[160,168],"m":"ldy","o":"#$A8"},{"a":9222,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9224,"t":"code","b":[160,160],"m":"ldy","o":"#$A0"},{"a":9226,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9228,"t":"code","b":[160,152],"m":"ldy","o":"#$98"},{"a":9230,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9232,"t":"code","b":[160,144],"m":"ldy","o":"#$90"},{"a":9234,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9236,"t":"code","b":[160,136],"m":"ldy","o":"#$88"},{"a":9238,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9240,"t":"code","b":[160,128],"m":"ldy","o":"#$80"},{"a":9242,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9244,"t":"code","b":[160,120],"m":"ldy","o":"#$78"},{"a":9246,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9248,"t":"code","b":[160,112],"m":"ldy","o":"#$70"},{"a":9250,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9252,"t":"code","b":[160,104],"m":"ldy","o":"#$68"},{"a":9254,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9256,"t":"code","b":[160,96],"m":"ldy","o":"#$60"},{"a":9258,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9260,"t":"code","b":[160,88],"m":"ldy","o":"#$58"},{"a":9262,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9264,"t":"code","b":[160,80],"m":"ldy","o":"#$50"},{"a":9266,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9268,"t":"code","b":[160,72],"m":"ldy","o":"#$48"},{"a":9270,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9272,"t":"code","b":[160,64],"m":"ldy","o":"#$40"},{"a":9274,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9276,"t":"code","b":[160,56],"m":"ldy","o":"#$38"},{"a":9278,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9280,"t":"code","b":[160,48],"m":"ldy","o":"#$30"},{"a":9282,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9284,"t":"code","b":[160,40],"m":"ldy","o":"#$28"},{"a":9286,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9288,"t":"code","b":[160,32],"m":"ldy","o":"#$20"},{"a":9290,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9292,"t":"code","b":[160,24],"m":"ldy","o":"#$18"},{"a":9294,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9296,"t":"code","b":[160,16],"m":"ldy","o":"#$10"},{"a":9298,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9300,"t":"code","b":[160,8],"m":"ldy","o":"#$08"},{"a":9302,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9304,"l":"b_2458","t":"code","b":[76,17,35],"m":"jmp","oa":8977,"o":"span_next_line","x":[9178]},{"a":9307,"l":"build_tile_visibility","c":"Works out which of the 1024 tiles the player could see from where they stand, as a bit map at $3E80-$3EFF that corner_view_angles consults at $2911. Does nothing when bit 7 of $0CDE is set (the game has ended by hyperspace). Clears the map, builds the height tables ($25C4), then from the back row forward gets each row's corner visibility ($24E2, alternating between $0180 and $01A0 with $05) and marks every tile that has a visible corner among its four, unless the tile is flat and higher than the player's height ($0940 of object $0B). Tile (x, z) is bit (x AND 3) * 2 + (z AND 1), counted from the left ($24DA), of byte $3E80 + (x AND $1C) * 4 + z / 2. Called from $35BA. Same as the BBC Micro routine.","t":"code","b":[173,222,12],"m":"lda","oa":3294,"o":"hyperspace_ended","x":[13754]},{"a":9310,"t":"code","b":[48,121],"m":"bmi","oa":9433,"o":"r_24D9"},{"a":9312,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":9314,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":9316,"t":"code","b":[162,127],"m":"ldx","o":"#$7F"},{"a":9318,"l":"b_2466","t":"code","b":[157,128,62],"m":"sta","oa":16000,"o":"tile_visibility,x","x":[9322]},{"a":9321,"t":"code","b":[202],"m":"dex"},{"a":9322,"t":"code","b":[16,250],"m":"bpl","oa":9318,"o":"b_2466"},{"a":9324,"t":"code","b":[32,196,37],"m":"jsr","oa":9668,"o":"build_corner_heights"},{"a":9327,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":9329,"t":"code","b":[133,26],"m":"sta","oa":26,"o":"shared_1A"},{"a":9331,"t":"code","b":[32,226,36],"m":"jsr","oa":9442,"o":"trace_row_corners"},{"a":9334,"t":"code","b":[198,26],"m":"dec","oa":26,"o":"shared_1A"},{"a":9336,"l":"b_2478","t":"code","b":[165,5],"m":"lda","oa":5,"o":"draw_table_offset","x":[9431]},{"a":9338,"t":"code","b":[73,32],"m":"eor","o":"#$20"},{"a":9340,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":9342,"t":"code","b":[32,226,36],"m":"jsr","oa":9442,"o":"trace_row_corners"},{"a":9345,"t":"code","b":[166,11],"m":"ldx","oa":11,"o":"player_obj"},{"a":9347,"t":"code","b":[189,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,x"},{"a":9350,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":9352,"t":"code","b":[162,30],"m":"ldx","o":"#$1E"},{"a":9354,"l":"b_248A","t":"code","b":[138],"m":"txa","x":[9427]},{"a":9355,"t":"code","b":[168],"m":"tay"},{"a":9356,"t":"code","b":[177,112],"m":"lda","oa":112,"o":"(tmp_p),y"},{"a":9358,"t":"code","b":[160,255],"m":"ldy","o":"#$FF"},{"a":9360,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9361,"t":"code","b":[176,7],"m":"bcs","oa":9370,"o":"b_249A"},{"a":9363,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":9365,"t":"code","b":[144,3],"m":"bcc","oa":9370,"o":"b_249A"},{"a":9367,"t":"code","b":[240,1],"m":"beq","oa":9370,"o":"b_249A"},{"a":9369,"t":"code","b":[200],"m":"iny"},{"a":9370,"l":"b_249A","t":"code","b":[132,119],"m":"sty","oa":119,"o":"tmp_w","x":[9361,9365,9367]},{"a":9372,"t":"code","b":[138],"m":"txa"},{"a":9373,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9374,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9375,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9376,"t":"code","b":[41,224],"m":"and","o":"#$E0"},{"a":9378,"t":"code","b":[5,26],"m":"ora","oa":26,"o":"shared_1A"},{"a":9380,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9381,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":9383,"t":"code","b":[138],"m":"txa"},{"a":9384,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":9386,"t":"code","b":[42],"m":"rol","o":"a"},{"a":9387,"t":"code","b":[168],"m":"tay"},{"a":9388,"t":"code","b":[185,218,36],"m":"lda","oa":9434,"o":"bit_masks_msb,y"},{"a":9391,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":9393,"t":"code","b":[133,39],"m":"sta","oa":39,"o":"tile_count_mask"},{"a":9395,"t":"code","b":[189,128,1],"m":"lda","oa":384,"o":"row_visibility,x"},{"a":9398,"t":"code","b":[29,129,1],"m":"ora","oa":385,"o":"f_0181,x"},{"a":9401,"t":"code","b":[29,160,1],"m":"ora","oa":416,"o":"f_01A0,x"},{"a":9404,"t":"code","b":[29,161,1],"m":"ora","oa":417,"o":"f_01A1,x"},{"a":9407,"t":"code","b":[37,119],"m":"and","oa":119,"o":"tmp_w"},{"a":9409,"t":"code","b":[57,218,36],"m":"and","oa":9434,"o":"bit_masks_msb,y"},{"a":9412,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":9414,"t":"code","b":[164,116],"m":"ldy","oa":116,"o":"tmp_t"},{"a":9416,"t":"code","b":[185,128,62],"m":"lda","oa":16000,"o":"tile_visibility,y"},{"a":9419,"t":"code","b":[37,39],"m":"and","oa":39,"o":"tile_count_mask"},{"a":9421,"t":"code","b":[5,117],"m":"ora","oa":117,"o":"tmp_u"},{"a":9423,"t":"code","b":[153,128,62],"m":"sta","oa":16000,"o":"tile_visibility,y"},{"a":9426,"t":"code","b":[202],"m":"dex"},{"a":9427,"t":"code","b":[16,181],"m":"bpl","oa":9354,"o":"b_248A"},{"a":9429,"t":"code","b":[198,26],"m":"dec","oa":26,"o":"shared_1A"},{"a":9431,"t":"code","b":[16,159],"m":"bpl","oa":9336,"o":"b_2478"},{"a":9433,"l":"r_24D9","t":"code","b":[96],"m":"rts","x":[9310]},{"a":9434,"l":"bit_masks_msb","c":"One bit per entry, from the left: $80 $40 $20 $10 $08 $04 $02 $01. Picks a tile's bit in the visibility map: read at $24AC (inverted) and $24C1 when build_tile_visibility writes the map, at $2916 by corner_view_angles and at $3882 by the C64's cached-angle path.","t":"byte","b":[128,64,32,16,8,4,2,1],"x":[9388,9409,10518,14466]},{"a":9442,"l":"trace_row_corners","c":"For every corner of tile row $1A, x from 31 down to 0 ($18), decides whether the player can see it and stores $FF (seen) or $00 at $0180 + $05 + x. A corner within 1.5 tiles of the player counts as seen. Otherwise it takes the vector from the player's eye ($1ECC on object $0B) to the corner divided by 256 (low bytes $2F-$31, bottom bytes $2C-$2E, sign bytes $86-$88), doubles it while halving the step count in $17 until the longest component nearly fills a byte, then steps along it ($2576), checking each step against the tile-height table. Calls the sound routine $352C once per corner. The anti-cracker check at $254A sits in the middle. C64 differences: the height tables are on page $40 + z instead of $60 + z ($24E4, $2546), and the stepping loop is written out in full. Called from $2473 and $247E.","t":"code","b":[165,26],"m":"lda","oa":26,"o":"shared_1A","x":[9331,9342]},{"a":9444,"t":"code","b":[24],"m":"clc"},{"a":9445,"t":"code","b":[105,64],"m":"adc","o":"#$40"},{"a":9447,"t":"code","b":[133,113],"m":"sta","oa":113,"o":"tmp_q"},{"a":9449,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":9451,"t":"code","b":[133,24],"m":"sta","oa":24,"o":"shared_18"},{"a":9453,"l":"j_24ED","t":"code","b":[32,44,53],"m":"jsr","oa":13612,"o":"process_sound","x":[9664]},{"a":9456,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":9458,"t":"code","b":[132,116],"m":"sty","oa":116,"o":"tmp_t"},{"a":9460,"t":"code","b":[136],"m":"dey"},{"a":9461,"t":"code","b":[132,23],"m":"sty","oa":23,"o":"edge_or_trace_count"},{"a":9463,"t":"code","b":[164,24],"m":"ldy","oa":24,"o":"shared_18"},{"a":9465,"t":"code","b":[177,112],"m":"lda","oa":112,"o":"(tmp_p),y"},{"a":9467,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9468,"t":"code","b":[133,25],"m":"sta","oa":25,"o":"poly_colours_or_row"},{"a":9470,"t":"code","b":[166,11],"m":"ldx","oa":11,"o":"player_obj"},{"a":9472,"t":"code","b":[32,204,30],"m":"jsr","oa":7884,"o":"load_object_coords"},{"a":9475,"t":"code","b":[162,2],"m":"ldx","o":"#$02"},{"a":9477,"l":"b_2505","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[9512]},{"a":9479,"t":"code","b":[149,134],"m":"sta","oa":134,"o":"dx_hi_or_vec_x_hi,x"},{"a":9481,"t":"code","b":[56],"m":"sec"},{"a":9482,"t":"code","b":[245,55],"m":"sbc","oa":55,"o":"coord_x_lo_or_vis_left,x"},{"a":9484,"t":"code","b":[149,44],"m":"sta","oa":44,"o":"vec_x_bot_or_goes_right,x"},{"a":9486,"t":"code","b":[181,24],"m":"lda","oa":24,"o":"shared_18,x"},{"a":9488,"t":"code","b":[245,58],"m":"sbc","oa":58,"o":"coord_x_hi_or_dx_lo,x"},{"a":9490,"t":"code","b":[149,47],"m":"sta","oa":47,"o":"vec_x_lo,x"},{"a":9492,"t":"code","b":[16,11],"m":"bpl","oa":9505,"o":"b_2521"},{"a":9494,"t":"code","b":[214,134],"m":"dec","oa":134,"o":"dx_hi_or_vec_x_hi,x"},{"a":9496,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":9498,"t":"code","b":[56],"m":"sec"},{"a":9499,"t":"code","b":[245,44],"m":"sbc","oa":44,"o":"vec_x_bot_or_goes_right,x"},{"a":9501,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":9503,"t":"code","b":[245,47],"m":"sbc","oa":47,"o":"vec_x_lo,x"},{"a":9505,"l":"b_2521","t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t","x":[9492]},{"a":9507,"t":"code","b":[144,2],"m":"bcc","oa":9511,"o":"b_2527"},{"a":9509,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":9511,"l":"b_2527","t":"code","b":[202],"m":"dex","x":[9507]},{"a":9512,"t":"code","b":[16,219],"m":"bpl","oa":9477,"o":"b_2505"},{"a":9514,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":9516,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9517,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9518,"t":"code","b":[201,6],"m":"cmp","o":"#$06"},{"a":9520,"t":"code","b":[144,126],"m":"bcc","oa":9648,"o":"b_25B0"},{"a":9522,"l":"b_2532","t":"code","b":[6,44],"m":"asl","oa":44,"o":"vec_x_bot_or_goes_right","x":[9537]},{"a":9524,"t":"code","b":[38,47],"m":"rol","oa":47,"o":"vec_x_lo"},{"a":9526,"t":"code","b":[6,45],"m":"asl","oa":45,"o":"vec_y_bot_or_goes_left"},{"a":9528,"t":"code","b":[38,48],"m":"rol","oa":48,"o":"vec_y_lo_or_min_flat_x"},{"a":9530,"t":"code","b":[6,46],"m":"asl","oa":46,"o":"vec_z_bot"},{"a":9532,"t":"code","b":[38,49],"m":"rol","oa":49,"o":"vec_z_lo_or_max_flat_x"},{"a":9534,"t":"code","b":[70,23],"m":"lsr","oa":23,"o":"edge_or_trace_count"},{"a":9536,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9537,"t":"code","b":[144,239],"m":"bcc","oa":9522,"o":"b_2532"},{"a":9539,"t":"code","b":[165,60],"m":"lda","oa":60,"o":"coord_z_hi_or_points_ptr"},{"a":9541,"t":"code","b":[24],"m":"clc"},{"a":9542,"t":"code","b":[105,64],"m":"adc","o":"#$40"},{"a":9544,"t":"code","b":[133,115],"m":"sta","oa":115,"o":"tmp_s"},{"a":9546,"l":"check_code_stash","c":"Anti-cracker check embedded in trace_row_corners, as on the BBC. Unless bit 7 of $0CCE is set, it reads the stash written on page $3F by the secret-code comparison at $14B6-$14C7 (each byte there: generated digits minus typed digits, plus the byte at $0100). It starts at $3F00 + ($0C55 + 41) (LDA $0B56,X is $0C55, because the loop above leaves X = $FF) and works down: four bytes that must each be $7F, then the byte below them, which must not be. Any failure goes to $25D8, which restarts at the title ($1017); success sets bit 7 of $0CCE so it is not checked again. On the C64 page $3F also holds the start-up code at $3F00, which the stash may overwrite once the game is running; nothing jumps back there.","t":"code","b":[173,206,12],"m":"lda","oa":3278,"o":"skip_stash_check"},{"a":9549,"t":"code","b":[48,39],"m":"bmi","oa":9590,"o":"trace_corner_ray"},{"a":9551,"t":"code","b":[189,86,11],"m":"lda","oa":2902,"o":"f_0B56,x"},{"a":9554,"t":"code","b":[24],"m":"clc"},{"a":9555,"t":"code","b":[105,41],"m":"adc","o":"#$29"},{"a":9557,"t":"code","b":[133,12],"m":"sta","oa":12,"o":"shared_0C"},{"a":9559,"t":"code","b":[162,3],"m":"ldx","o":"#$03"},{"a":9561,"t":"code","b":[138],"m":"txa"},{"a":9562,"t":"code","b":[24],"m":"clc"},{"a":9563,"t":"code","b":[105,60],"m":"adc","o":"#$3C"},{"a":9565,"t":"code","b":[133,13],"m":"sta","oa":13,"o":"shared_0D"},{"a":9567,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":9569,"l":"b_2561","t":"code","b":[177,12],"m":"lda","oa":12,"o":"(shared_0C),y","x":[9578]},{"a":9571,"t":"code","b":[201,127],"m":"cmp","o":"#$7F"},{"a":9573,"t":"code","b":[208,113],"m":"bne","oa":9688,"o":"stash_fail_restart"},{"a":9575,"t":"code","b":[198,12],"m":"dec","oa":12,"o":"shared_0C"},{"a":9577,"t":"code","b":[202],"m":"dex"},{"a":9578,"t":"code","b":[16,245],"m":"bpl","oa":9569,"o":"b_2561"},{"a":9580,"t":"code","b":[177,12],"m":"lda","oa":12,"o":"(shared_0C),y"},{"a":9582,"t":"code","b":[201,127],"m":"cmp","o":"#$7F"},{"a":9584,"t":"code","b":[240,102],"m":"beq","oa":9688,"o":"stash_fail_restart"},{"a":9586,"t":"code","b":[56],"m":"sec"},{"a":9587,"t":"code","b":[110,206,12],"m":"ror","oa":3278,"o":"skip_stash_check"},{"a":9590,"l":"trace_corner_ray","c":"Second half of trace_row_corners: steps the scaled vector $17 times from the player's eye towards the corner. C64 change: the BBC ran one loop over the three axes with indexed adds; the C64 writes the adds out in full, keeps the count in X, the x whole part in Y and the z whole part directly in $73 as the height table's page: x ($37, Y) += ($2F, $86), z ($39, $73) += ($31, $88), y ($35, $38, $3B) += ($2D, $30, $87). After each step the height $3B is compared with the highest corner of the tile underneath at ($72),Y, the $4020 table; lower means the corner is hidden (carry set). $25B0 stores $00 or $FF at $0180 + $05 + x and moves to the next corner.","t":"code","b":[166,23],"m":"ldx","oa":23,"o":"edge_or_trace_count","x":[9549]},{"a":9592,"t":"code","b":[164,58],"m":"ldy","oa":58,"o":"coord_x_hi_or_dx_lo"},{"a":9594,"l":"b_257A","t":"code","b":[165,55],"m":"lda","oa":55,"o":"coord_x_lo_or_vis_left","x":[9642]},{"a":9596,"t":"code","b":[24],"m":"clc"},{"a":9597,"t":"code","b":[101,47],"m":"adc","oa":47,"o":"vec_x_lo"},{"a":9599,"t":"code","b":[133,55],"m":"sta","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":9601,"t":"code","b":[152],"m":"tya"},{"a":9602,"t":"code","b":[101,134],"m":"adc","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":9604,"t":"code","b":[168],"m":"tay"},{"a":9605,"t":"code","b":[165,57],"m":"lda","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":9607,"t":"code","b":[24],"m":"clc"},{"a":9608,"t":"code","b":[101,49],"m":"adc","oa":49,"o":"vec_z_lo_or_max_flat_x"},{"a":9610,"t":"code","b":[133,57],"m":"sta","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":9612,"t":"code","b":[165,115],"m":"lda","oa":115,"o":"tmp_s"},{"a":9614,"t":"code","b":[101,136],"m":"adc","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":9616,"t":"code","b":[133,115],"m":"sta","oa":115,"o":"tmp_s"},{"a":9618,"t":"code","b":[165,53],"m":"lda","oa":53,"o":"coord_y_bot_or_buf_left"},{"a":9620,"t":"code","b":[24],"m":"clc"},{"a":9621,"t":"code","b":[101,45],"m":"adc","oa":45,"o":"vec_y_bot_or_goes_left"},{"a":9623,"t":"code","b":[133,53],"m":"sta","oa":53,"o":"coord_y_bot_or_buf_left"},{"a":9625,"t":"code","b":[165,56],"m":"lda","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":9627,"t":"code","b":[101,48],"m":"adc","oa":48,"o":"vec_y_lo_or_min_flat_x"},{"a":9629,"t":"code","b":[133,56],"m":"sta","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":9631,"t":"code","b":[165,59],"m":"lda","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":9633,"t":"code","b":[101,135],"m":"adc","oa":135,"o":"vec_y_hi"},{"a":9635,"t":"code","b":[133,59],"m":"sta","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":9637,"t":"code","b":[209,114],"m":"cmp","oa":114,"o":"(tmp_r),y"},{"a":9639,"t":"code","b":[144,6],"m":"bcc","oa":9647,"o":"b_25AF"},{"a":9641,"t":"code","b":[202],"m":"dex"},{"a":9642,"t":"code","b":[208,206],"m":"bne","oa":9594,"o":"b_257A"},{"a":9644,"t":"code","b":[24],"m":"clc"},{"a":9645,"t":"code","b":[144,1],"m":"bcc","oa":9648,"o":"b_25B0"},{"a":9647,"l":"b_25AF","t":"code","b":[56],"m":"sec","x":[9639]},{"a":9648,"l":"b_25B0","t":"code","b":[165,24],"m":"lda","oa":24,"o":"shared_18","x":[9520,9645]},{"a":9650,"t":"code","b":[5,5],"m":"ora","oa":5,"o":"draw_table_offset"},{"a":9652,"t":"code","b":[168],"m":"tay"},{"a":9653,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":9655,"t":"code","b":[233,0],"m":"sbc","o":"#$00"},{"a":9657,"t":"code","b":[153,128,1],"m":"sta","oa":384,"o":"row_visibility,y"},{"a":9660,"t":"code","b":[198,24],"m":"dec","oa":24,"o":"shared_18"},{"a":9662,"t":"code","b":[48,3],"m":"bmi","oa":9667,"o":"r_25C3"},{"a":9664,"t":"code","b":[76,237,36],"m":"jmp","oa":9453,"o":"j_24ED"},{"a":9667,"l":"r_25C3","t":"code","b":[96],"m":"rts","x":[9662]},{"a":9668,"l":"build_corner_heights","c":"Builds the two height tables the sight-line code uses, on the C64 in pages $40-$5F, memory that is also the play view's character sets (the BBC used its screen memory, $6000-$7FFF). First, for every tile corner, byte $4000 + z * 256 + x = height * 2, plus 1 if the tile anchored there is not flat (heights from $1DF9 with bit 7 of $60 clear, so objects are ignored). Then for every tile with x and z 0-30, byte $4020 + z * 256 + x = the highest of its four corners, or its height if flat. Leaves $70/$71 at $4000 and $72/$73 at $4020 for trace_row_corners. The JMP $363A at $25D8 inside it belongs to the anti-cracker check at $254A, not to this routine. Called from $246C.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[9324]},{"a":9670,"t":"code","b":[133,112],"m":"sta","oa":112,"o":"tmp_p"},{"a":9672,"t":"code","b":[133,96],"m":"sta","oa":96,"o":"second_axis_or_gaze_flags"},{"a":9674,"t":"code","b":[169,95],"m":"lda","o":"#$5F"},{"a":9676,"t":"code","b":[133,113],"m":"sta","oa":113,"o":"tmp_q"},{"a":9678,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":9680,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":9682,"l":"b_25D2","t":"code","b":[169,31],"m":"lda","o":"#$1F","x":[9707]},{"a":9684,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":9686,"t":"code","b":[208,3],"m":"bne","oa":9691,"o":"b_25DB"},{"a":9688,"l":"stash_fail_restart","t":"code","b":[76,58,54],"m":"jmp","oa":13882,"o":"j_363A","x":[9573,9584]},{"a":9691,"l":"b_25DB","t":"code","b":[32,249,29],"m":"jsr","oa":7673,"o":"tile_height_under_gaze","x":[9686,9701]},{"a":9694,"t":"code","b":[164,36],"m":"ldy","oa":36,"o":"tile_x"},{"a":9696,"t":"code","b":[42],"m":"rol","o":"a"},{"a":9697,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":9699,"t":"code","b":[198,36],"m":"dec","oa":36,"o":"tile_x"},{"a":9701,"t":"code","b":[16,244],"m":"bpl","oa":9691,"o":"b_25DB"},{"a":9703,"t":"code","b":[198,113],"m":"dec","oa":113,"o":"tmp_q"},{"a":9705,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":9707,"t":"code","b":[16,229],"m":"bpl","oa":9682,"o":"b_25D2"},{"a":9709,"t":"code","b":[169,32],"m":"lda","o":"#$20"},{"a":9711,"t":"code","b":[133,114],"m":"sta","oa":114,"o":"tmp_r"},{"a":9713,"t":"code","b":[162,30],"m":"ldx","o":"#$1E"},{"a":9715,"l":"b_25F3","t":"code","b":[138],"m":"txa","x":[9762]},{"a":9716,"t":"code","b":[24],"m":"clc"},{"a":9717,"t":"code","b":[105,64],"m":"adc","o":"#$40"},{"a":9719,"t":"code","b":[133,113],"m":"sta","oa":113,"o":"tmp_q"},{"a":9721,"t":"code","b":[133,115],"m":"sta","oa":115,"o":"tmp_s"},{"a":9723,"t":"code","b":[160,30],"m":"ldy","o":"#$1E"},{"a":9725,"l":"b_25FD","t":"code","b":[177,112],"m":"lda","oa":112,"o":"(tmp_p),y","x":[9759]},{"a":9727,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9728,"t":"code","b":[144,26],"m":"bcc","oa":9756,"o":"b_261C"},{"a":9730,"t":"code","b":[42],"m":"rol","o":"a"},{"a":9731,"t":"code","b":[200],"m":"iny"},{"a":9732,"t":"code","b":[209,112],"m":"cmp","oa":112,"o":"(tmp_p),y"},{"a":9734,"t":"code","b":[144,2],"m":"bcc","oa":9738,"o":"b_260A"},{"a":9736,"t":"code","b":[177,112],"m":"lda","oa":112,"o":"(tmp_p),y"},{"a":9738,"l":"b_260A","t":"code","b":[230,113],"m":"inc","oa":113,"o":"tmp_q","x":[9734]},{"a":9740,"t":"code","b":[209,112],"m":"cmp","oa":112,"o":"(tmp_p),y"},{"a":9742,"t":"code","b":[144,2],"m":"bcc","oa":9746,"o":"b_2612"},{"a":9744,"t":"code","b":[177,112],"m":"lda","oa":112,"o":"(tmp_p),y"},{"a":9746,"l":"b_2612","t":"code","b":[136],"m":"dey","x":[9742]},{"a":9747,"t":"code","b":[209,112],"m":"cmp","oa":112,"o":"(tmp_p),y"},{"a":9749,"t":"code","b":[144,2],"m":"bcc","oa":9753,"o":"b_2619"},{"a":9751,"t":"code","b":[177,112],"m":"lda","oa":112,"o":"(tmp_p),y"},{"a":9753,"l":"b_2619","t":"code","b":[198,113],"m":"dec","oa":113,"o":"tmp_q","x":[9749]},{"a":9755,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9756,"l":"b_261C","t":"code","b":[145,114],"m":"sta","oa":114,"o":"(tmp_r),y","x":[9728]},{"a":9758,"t":"code","b":[136],"m":"dey"},{"a":9759,"t":"code","b":[16,220],"m":"bpl","oa":9725,"o":"b_25FD"},{"a":9761,"t":"code","b":[202],"m":"dex"},{"a":9762,"t":"code","b":[16,207],"m":"bpl","oa":9715,"o":"b_25F3"},{"a":9764,"t":"code","b":[96],"m":"rts"},{"a":9765,"l":"draw_view_rows","c":"Draws the landscape as the viewer in $6E sees it, into the bitmap buffer, a row of tiles at a time from the back of the landscape to the front. C64 addition at the start ($2627-$264D): ($B1 $B0) = the viewer's pitch ($0140,X) times 16 plus 2, sign-extended, and $B2 = its yaw ($09C0,X) minus 10, the values that the cached-angle path at $37F2 subtracts ($385B-$386A). Then as on the BBC: the point pointer $3C/$3D = $0C40; from the yaw, the quadrant holding the right edge of the 90-degree view ($1C, offset $1B from $27D3, $66 = quadrant * 4, $4B = quadrant - 2) and the yaw of the view's left edge within it ($20); the viewer's tile turned into that quadrant's frame ($03, $1D). For each row from 31 down to 0 it finds the part in view ($27D7) and draws it ($295D); of the viewer's own row it draws only the part to one side of the viewer, and last the tile under the viewer, stretched across the bottom of the view ($2A4B). When bit 7 of $0C1B is set it asks $1223 after each row whether the same pan key is still held and, if not, returns carry set with the drawing abandoned; carry clear when the view is complete. Callers: $10DA, $111F, $13F7, $1FFC, $35C3.","t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj","x":[4314,4383,5111,8188,13763]},{"a":9767,"t":"code","b":[169,32],"m":"lda","o":"#$20"},{"a":9769,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":9771,"t":"code","b":[189,64,1],"m":"lda","oa":320,"o":"obj_pitch,x"},{"a":9774,"t":"code","b":[8],"m":"php"},{"a":9775,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9776,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":9778,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9779,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":9781,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9782,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":9784,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":9785,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":9787,"t":"code","b":[40],"m":"plp"},{"a":9788,"t":"code","b":[16,2],"m":"bpl","oa":9792,"o":"b_2640"},{"a":9790,"t":"code","b":[9,240],"m":"ora","o":"#$F0"},{"a":9792,"l":"b_2640","t":"code","b":[133,177],"m":"sta","oa":177,"o":"view_pitch_hi16","x":[9788]},{"a":9794,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":9796,"t":"code","b":[133,176],"m":"sta","oa":176,"o":"view_pitch_lo16"},{"a":9798,"t":"code","b":[189,192,9],"m":"lda","oa":2496,"o":"obj_yaw,x"},{"a":9801,"t":"code","b":[56],"m":"sec"},{"a":9802,"t":"code","b":[233,10],"m":"sbc","o":"#$0A"},{"a":9804,"t":"code","b":[133,178],"m":"sta","oa":178,"o":"view_yaw_minus_10"},{"a":9806,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":9808,"t":"code","b":[133,60],"m":"sta","oa":60,"o":"coord_z_hi_or_points_ptr"},{"a":9810,"t":"code","b":[169,12],"m":"lda","o":"#$0C"},{"a":9812,"t":"code","b":[133,61],"m":"sta","oa":61,"o":"vec_yaw_lo_or_points_ptr_hi"},{"a":9814,"t":"code","b":[189,192,9],"m":"lda","oa":2496,"o":"obj_yaw,x"},{"a":9817,"t":"code","b":[24],"m":"clc"},{"a":9818,"t":"code","b":[105,32],"m":"adc","o":"#$20"},{"a":9820,"t":"code","b":[133,28],"m":"sta","oa":28,"o":"arc_right_yaw_or_action"},{"a":9822,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":9824,"t":"code","b":[56],"m":"sec"},{"a":9825,"t":"code","b":[233,32],"m":"sbc","o":"#$20"},{"a":9827,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":9829,"t":"code","b":[165,28],"m":"lda","oa":28,"o":"arc_right_yaw_or_action"},{"a":9831,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9832,"t":"code","b":[42],"m":"rol","o":"a"},{"a":9833,"t":"code","b":[42],"m":"rol","o":"a"},{"a":9834,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":9836,"t":"code","b":[168],"m":"tay"},{"a":9837,"t":"code","b":[185,211,39],"m":"lda","oa":10195,"o":"quadrant_offsets,y"},{"a":9840,"t":"code","b":[133,27],"m":"sta","oa":27,"o":"quadrant_table_offset"},{"a":9842,"t":"code","b":[152],"m":"tya"},{"a":9843,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9844,"t":"code","b":[10],"m":"asl","o":"a"},{"a":9845,"t":"code","b":[133,102],"m":"sta","oa":102,"o":"smooth_action_or_quad4"},{"a":9847,"t":"code","b":[152],"m":"tya"},{"a":9848,"t":"code","b":[56],"m":"sec"},{"a":9849,"t":"code","b":[233,2],"m":"sbc","o":"#$02"},{"a":9851,"t":"code","b":[133,75],"m":"sta","oa":75,"o":"arc_opposite_quadrant"},{"a":9853,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":9855,"t":"code","b":[56],"m":"sec"},{"a":9856,"t":"code","b":[233,10],"m":"sbc","o":"#$0A"},{"a":9858,"t":"code","b":[133,32],"m":"sta","oa":32,"o":"screen_left_yaw_hi"},{"a":9860,"t":"code","b":[36,28],"m":"bit","oa":28,"o":"arc_right_yaw_or_action"},{"a":9862,"t":"code","b":[48,31],"m":"bmi","oa":9895,"o":"b_26A7"},{"a":9864,"t":"code","b":[112,13],"m":"bvs","oa":9879,"o":"b_2697"},{"a":9866,"t":"code","b":[189,0,9],"m":"lda","oa":2304,"o":"obj_x,x"},{"a":9869,"t":"code","b":[133,3],"m":"sta","oa":3,"o":"viewer_col_rotated"},{"a":9871,"t":"code","b":[189,128,9],"m":"lda","oa":2432,"o":"obj_z,x"},{"a":9874,"t":"code","b":[133,29],"m":"sta","oa":29,"o":"viewer_row_rotated"},{"a":9876,"t":"code","b":[76,201,38],"m":"jmp","oa":9929,"o":"j_26C9"},{"a":9879,"l":"b_2697","t":"code","b":[24],"m":"clc","x":[9864]},{"a":9880,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":9882,"t":"code","b":[253,128,9],"m":"sbc","oa":2432,"o":"obj_z,x"},{"a":9885,"t":"code","b":[133,3],"m":"sta","oa":3,"o":"viewer_col_rotated"},{"a":9887,"t":"code","b":[189,0,9],"m":"lda","oa":2304,"o":"obj_x,x"},{"a":9890,"t":"code","b":[133,29],"m":"sta","oa":29,"o":"viewer_row_rotated"},{"a":9892,"t":"code","b":[76,201,38],"m":"jmp","oa":9929,"o":"j_26C9"},{"a":9895,"l":"b_26A7","t":"code","b":[112,19],"m":"bvs","oa":9916,"o":"b_26BC","x":[9862]},{"a":9897,"t":"code","b":[24],"m":"clc"},{"a":9898,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":9900,"t":"code","b":[253,0,9],"m":"sbc","oa":2304,"o":"obj_x,x"},{"a":9903,"t":"code","b":[133,3],"m":"sta","oa":3,"o":"viewer_col_rotated"},{"a":9905,"t":"code","b":[24],"m":"clc"},{"a":9906,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":9908,"t":"code","b":[253,128,9],"m":"sbc","oa":2432,"o":"obj_z,x"},{"a":9911,"t":"code","b":[133,29],"m":"sta","oa":29,"o":"viewer_row_rotated"},{"a":9913,"t":"code","b":[76,201,38],"m":"jmp","oa":9929,"o":"j_26C9"},{"a":9916,"l":"b_26BC","t":"code","b":[189,128,9],"m":"lda","oa":2432,"o":"obj_z,x","x":[9895]},{"a":9919,"t":"code","b":[133,3],"m":"sta","oa":3,"o":"viewer_col_rotated"},{"a":9921,"t":"code","b":[24],"m":"clc"},{"a":9922,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":9924,"t":"code","b":[253,0,9],"m":"sbc","oa":2304,"o":"obj_x,x"},{"a":9927,"t":"code","b":[133,29],"m":"sta","oa":29,"o":"viewer_row_rotated"},{"a":9929,"l":"j_26C9","t":"code","b":[169,31],"m":"lda","o":"#$1F","x":[9876,9892,9913]},{"a":9931,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":9933,"t":"code","b":[173,72,12],"m":"lda","oa":3144,"o":"prev_row_left_tile"},{"a":9936,"t":"code","b":[133,50],"m":"sta","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":9938,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":9940,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":9942,"t":"code","b":[32,215,39],"m":"jsr","oa":10199,"o":"find_row_view_edges"},{"a":9945,"t":"code","b":[165,50],"m":"lda","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":9947,"t":"code","b":[141,72,12],"m":"sta","oa":3144,"o":"prev_row_left_tile"},{"a":9950,"l":"view_next_row","t":"code","b":[165,5],"m":"lda","oa":5,"o":"draw_table_offset","x":[10090]},{"a":9952,"t":"code","b":[73,32],"m":"eor","o":"#$20"},{"a":9954,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":9956,"t":"code","b":[165,50],"m":"lda","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":9958,"t":"code","b":[133,55],"m":"sta","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":9960,"t":"code","b":[165,51],"m":"lda","oa":51,"o":"row_right_tile_or_cos_hi"},{"a":9962,"t":"code","b":[133,56],"m":"sta","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":9964,"t":"code","b":[32,44,53],"m":"jsr","oa":13612,"o":"process_sound"},{"a":9967,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":9969,"t":"code","b":[48,9],"m":"bmi","oa":9980,"o":"b_26FC"},{"a":9971,"t":"code","b":[164,38],"m":"ldy","oa":38,"o":"tile_z"},{"a":9973,"t":"code","b":[196,29],"m":"cpy","oa":29,"o":"viewer_row_rotated"},{"a":9975,"t":"code","b":[208,5],"m":"bne","oa":9982,"o":"b_26FE"},{"a":9977,"t":"code","b":[76,111,39],"m":"jmp","oa":10095,"o":"view_own_row"},{"a":9980,"l":"b_26FC","t":"code","b":[24],"m":"clc","x":[9969]},{"a":9981,"t":"code","b":[96],"m":"rts"},{"a":9982,"l":"b_26FE","t":"code","b":[32,215,39],"m":"jsr","oa":10199,"o":"find_row_view_edges","x":[9975]},{"a":9985,"t":"code","b":[164,50],"m":"ldy","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":9987,"t":"code","b":[196,55],"m":"cpy","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":9989,"t":"code","b":[240,40],"m":"beq","oa":10031,"o":"b_272F"},{"a":9991,"t":"code","b":[144,10],"m":"bcc","oa":10003,"o":"b_2713"},{"a":9993,"l":"b_2709","t":"code","b":[136],"m":"dey","x":[9999]},{"a":9994,"t":"code","b":[32,61,40],"m":"jsr","oa":10301,"o":"corner_view_angles"},{"a":9997,"t":"code","b":[196,55],"m":"cpy","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":9999,"t":"code","b":[208,248],"m":"bne","oa":9993,"o":"b_2709"},{"a":10001,"t":"code","b":[240,28],"m":"beq","oa":10031,"o":"b_272F"},{"a":10003,"l":"b_2713","t":"code","b":[165,5],"m":"lda","oa":5,"o":"draw_table_offset","x":[9991]},{"a":10005,"t":"code","b":[73,32],"m":"eor","o":"#$20"},{"a":10007,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":10009,"t":"code","b":[230,38],"m":"inc","oa":38,"o":"tile_z"},{"a":10011,"t":"code","b":[164,55],"m":"ldy","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":10013,"l":"b_271D","t":"code","b":[136],"m":"dey","x":[10019]},{"a":10014,"t":"code","b":[32,61,40],"m":"jsr","oa":10301,"o":"corner_view_angles"},{"a":10017,"t":"code","b":[196,50],"m":"cpy","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":10019,"t":"code","b":[208,248],"m":"bne","oa":10013,"o":"b_271D"},{"a":10021,"t":"code","b":[132,55],"m":"sty","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":10023,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":10025,"t":"code","b":[165,5],"m":"lda","oa":5,"o":"draw_table_offset"},{"a":10027,"t":"code","b":[73,32],"m":"eor","o":"#$20"},{"a":10029,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":10031,"l":"b_272F","t":"code","b":[164,51],"m":"ldy","oa":51,"o":"row_right_tile_or_cos_hi","x":[9989,10001]},{"a":10033,"t":"code","b":[196,56],"m":"cpy","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":10035,"t":"code","b":[240,40],"m":"beq","oa":10077,"o":"b_275D"},{"a":10037,"t":"code","b":[176,10],"m":"bcs","oa":10049,"o":"b_2741"},{"a":10039,"l":"b_2737","t":"code","b":[200],"m":"iny","x":[10045]},{"a":10040,"t":"code","b":[32,61,40],"m":"jsr","oa":10301,"o":"corner_view_angles"},{"a":10043,"t":"code","b":[196,56],"m":"cpy","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":10045,"t":"code","b":[208,248],"m":"bne","oa":10039,"o":"b_2737"},{"a":10047,"t":"code","b":[240,28],"m":"beq","oa":10077,"o":"b_275D"},{"a":10049,"l":"b_2741","t":"code","b":[165,5],"m":"lda","oa":5,"o":"draw_table_offset","x":[10037]},{"a":10051,"t":"code","b":[73,32],"m":"eor","o":"#$20"},{"a":10053,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":10055,"t":"code","b":[230,38],"m":"inc","oa":38,"o":"tile_z"},{"a":10057,"t":"code","b":[164,56],"m":"ldy","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":10059,"l":"b_274B","t":"code","b":[200],"m":"iny","x":[10065]},{"a":10060,"t":"code","b":[32,61,40],"m":"jsr","oa":10301,"o":"corner_view_angles"},{"a":10063,"t":"code","b":[196,51],"m":"cpy","oa":51,"o":"row_right_tile_or_cos_hi"},{"a":10065,"t":"code","b":[208,248],"m":"bne","oa":10059,"o":"b_274B"},{"a":10067,"t":"code","b":[132,56],"m":"sty","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":10069,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":10071,"t":"code","b":[165,5],"m":"lda","oa":5,"o":"draw_table_offset"},{"a":10073,"t":"code","b":[73,32],"m":"eor","o":"#$20"},{"a":10075,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":10077,"l":"b_275D","t":"code","b":[32,93,41],"m":"jsr","oa":10589,"o":"draw_landscape_row","x":[10035,10047]},{"a":10080,"t":"code","b":[44,27,12],"m":"bit","oa":3099,"o":"pan_abort_check"},{"a":10083,"t":"code","b":[16,5],"m":"bpl","oa":10090,"o":"b_276A"},{"a":10085,"t":"code","b":[32,35,18],"m":"jsr","oa":4643,"o":"same_pan_key_held"},{"a":10088,"t":"code","b":[208,3],"m":"bne","oa":10093,"o":"b_276D"},{"a":10090,"l":"b_276A","t":"code","b":[76,222,38],"m":"jmp","oa":9950,"o":"view_next_row","x":[10083]},{"a":10093,"l":"b_276D","t":"code","b":[56],"m":"sec","x":[10088]},{"a":10094,"t":"code","b":[96],"m":"rts"},{"a":10095,"l":"view_own_row","t":"code","b":[164,55],"m":"ldy","oa":55,"o":"coord_x_lo_or_vis_left","x":[9977]},{"a":10097,"t":"code","b":[200],"m":"iny"},{"a":10098,"t":"code","b":[196,3],"m":"cpy","oa":3,"o":"viewer_col_rotated"},{"a":10100,"t":"code","b":[208,5],"m":"bne","oa":10107,"o":"b_277B"},{"a":10102,"t":"code","b":[132,56],"m":"sty","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":10104,"t":"code","b":[76,134,39],"m":"jmp","oa":10118,"o":"j_2786"},{"a":10107,"l":"b_277B","t":"code","b":[164,56],"m":"ldy","oa":56,"o":"coord_y_lo_or_vis_right","x":[10100]},{"a":10109,"t":"code","b":[136],"m":"dey"},{"a":10110,"t":"code","b":[136],"m":"dey"},{"a":10111,"t":"code","b":[196,3],"m":"cpy","oa":3,"o":"viewer_col_rotated"},{"a":10113,"t":"code","b":[208,16],"m":"bne","oa":10131,"o":"b_2793"},{"a":10115,"t":"code","b":[200],"m":"iny"},{"a":10116,"t":"code","b":[132,55],"m":"sty","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":10118,"l":"j_2786","t":"code","b":[164,55],"m":"ldy","oa":55,"o":"coord_x_lo_or_vis_left","x":[10104]},{"a":10120,"t":"code","b":[32,61,40],"m":"jsr","oa":10301,"o":"corner_view_angles"},{"a":10123,"t":"code","b":[164,56],"m":"ldy","oa":56,"o":"coord_y_lo_or_vis_right"},{"a":10125,"t":"code","b":[32,61,40],"m":"jsr","oa":10301,"o":"corner_view_angles"},{"a":10128,"t":"code","b":[32,93,41],"m":"jsr","oa":10589,"o":"draw_landscape_row"},{"a":10131,"l":"b_2793","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[10113]},{"a":10133,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":10135,"t":"code","b":[230,38],"m":"inc","oa":38,"o":"tile_z"},{"a":10137,"t":"code","b":[164,3],"m":"ldy","oa":3,"o":"viewer_col_rotated"},{"a":10139,"t":"code","b":[32,61,40],"m":"jsr","oa":10301,"o":"corner_view_angles"},{"a":10142,"t":"code","b":[185,224,10],"m":"lda","oa":2784,"o":"draw_pitch_hi,y"},{"a":10145,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":10147,"t":"code","b":[176,44],"m":"bcs","oa":10193,"o":"b_27D1"},{"a":10149,"t":"code","b":[153,225,10],"m":"sta","oa":2785,"o":"f_0AE1,y"},{"a":10152,"t":"code","b":[185,128,10],"m":"lda","oa":2688,"o":"draw_pitch_lo,y"},{"a":10155,"t":"code","b":[153,129,10],"m":"sta","oa":2689,"o":"f_0A81,y"},{"a":10158,"t":"code","b":[169,32],"m":"lda","o":"#$20"},{"a":10160,"t":"code","b":[133,5],"m":"sta","oa":5,"o":"draw_table_offset"},{"a":10162,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":10164,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":10166,"t":"code","b":[153,0,11],"m":"sta","oa":2816,"o":"f_0B00,y"},{"a":10169,"t":"code","b":[153,1,11],"m":"sta","oa":2817,"o":"f_0B01,y"},{"a":10172,"t":"code","b":[153,32,168],"m":"sta","oa":43040,"o":"point_yaw_hi_row_b,y"},{"a":10175,"t":"code","b":[153,0,168],"m":"sta","oa":43008,"o":"point_yaw_hi,y"},{"a":10178,"t":"code","b":[169,20],"m":"lda","o":"#$14"},{"a":10180,"t":"code","b":[153,33,168],"m":"sta","oa":43041,"o":"point_yaw_hi_row_b_plus1,y"},{"a":10183,"t":"code","b":[153,1,168],"m":"sta","oa":43009,"o":"point_yaw_hi_plus1,y"},{"a":10186,"t":"code","b":[165,3],"m":"lda","oa":3,"o":"viewer_col_rotated"},{"a":10188,"t":"code","b":[133,37],"m":"sta","oa":37,"o":"tile_col_or_fill_count"},{"a":10190,"t":"code","b":[32,75,42],"m":"jsr","oa":10827,"o":"draw_flat_tile"},{"a":10193,"l":"b_27D1","t":"code","b":[24],"m":"clc","x":[10147]},{"a":10194,"t":"code","b":[96],"m":"rts"},{"a":10195,"l":"quadrant_offsets","c":"Offset by viewing quadrant 0-3, loaded at $266D and kept in $1B by draw_view_rows: 0, 1, $21, $20. $2A1A adds it to a tile's index in the two 32-byte rows of corner data, to pick the corner that carries the tile's byte as the tile is seen from that quadrant. Same values as the BBC Micro.","t":"byte","b":[0,1,33,32],"x":[9837]},{"a":10199,"l":"find_row_view_edges","c":"For tile row $26, finds the stretch of tile corners that lies in the view, starting from column $32 (the left edge found for the row before, which is usually close). It gets that corner's angles ($283D) and steps along the row with $282E and $2836, going by the on-screen flag each call returns, until it has the first and last corners in view: the left one in $32, the right one in $33. Every corner it looks at has its angles and tile byte stored in the drawing tables on the way. Callers: $26D6 and $26FE. Same as the BBC Micro routine.","t":"code","b":[164,50],"m":"ldy","oa":50,"o":"row_left_tile_or_cos_lo","x":[9942,9982]},{"a":10201,"t":"code","b":[32,61,40],"m":"jsr","oa":10301,"o":"corner_view_angles"},{"a":10204,"t":"code","b":[240,51],"m":"beq","oa":10257,"o":"b_2811"},{"a":10206,"t":"code","b":[201,128],"m":"cmp","o":"#$80"},{"a":10208,"t":"code","b":[240,29],"m":"beq","oa":10239,"o":"b_27FF"},{"a":10210,"l":"b_27E2","t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x","x":[10221]},{"a":10212,"t":"code","b":[133,50],"m":"sta","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":10214,"t":"code","b":[32,54,40],"m":"jsr","oa":10294,"o":"step_corner_right"},{"a":10217,"t":"code","b":[176,15],"m":"bcs","oa":10234,"o":"b_27FA"},{"a":10219,"t":"code","b":[201,129],"m":"cmp","o":"#$81"},{"a":10221,"t":"code","b":[240,243],"m":"beq","oa":10210,"o":"b_27E2"},{"a":10223,"t":"code","b":[201,128],"m":"cmp","o":"#$80"},{"a":10225,"t":"code","b":[240,7],"m":"beq","oa":10234,"o":"b_27FA"},{"a":10227,"l":"b_27F3","t":"code","b":[32,54,40],"m":"jsr","oa":10294,"o":"step_corner_right","x":[10232]},{"a":10230,"t":"code","b":[176,2],"m":"bcs","oa":10234,"o":"b_27FA"},{"a":10232,"t":"code","b":[240,249],"m":"beq","oa":10227,"o":"b_27F3"},{"a":10234,"l":"b_27FA","t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x","x":[10217,10225,10230]},{"a":10236,"t":"code","b":[133,51],"m":"sta","oa":51,"o":"row_right_tile_or_cos_hi"},{"a":10238,"t":"code","b":[96],"m":"rts"},{"a":10239,"l":"b_27FF","t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x","x":[10208,10250]},{"a":10241,"t":"code","b":[133,51],"m":"sta","oa":51,"o":"row_right_tile_or_cos_hi"},{"a":10243,"t":"code","b":[32,46,40],"m":"jsr","oa":10286,"o":"step_corner_left"},{"a":10246,"t":"code","b":[176,31],"m":"bcs","oa":10279,"o":"b_2827"},{"a":10248,"t":"code","b":[201,128],"m":"cmp","o":"#$80"},{"a":10250,"t":"code","b":[240,243],"m":"beq","oa":10239,"o":"b_27FF"},{"a":10252,"t":"code","b":[201,0],"m":"cmp","o":"#$00"},{"a":10254,"t":"code","b":[76,37,40],"m":"jmp","oa":10277,"o":"j_2825"},{"a":10257,"l":"b_2811","t":"code","b":[32,54,40],"m":"jsr","oa":10294,"o":"step_corner_right","x":[10204,10262]},{"a":10260,"t":"code","b":[176,2],"m":"bcs","oa":10264,"o":"b_2818"},{"a":10262,"t":"code","b":[240,249],"m":"beq","oa":10257,"o":"b_2811"},{"a":10264,"l":"b_2818","t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x","x":[10260]},{"a":10266,"t":"code","b":[133,51],"m":"sta","oa":51,"o":"row_right_tile_or_cos_hi"},{"a":10268,"t":"code","b":[165,50],"m":"lda","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":10270,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":10272,"l":"b_2820","t":"code","b":[32,46,40],"m":"jsr","oa":10286,"o":"step_corner_left","x":[10277]},{"a":10275,"t":"code","b":[176,2],"m":"bcs","oa":10279,"o":"b_2827"},{"a":10277,"l":"j_2825","t":"code","b":[240,249],"m":"beq","oa":10272,"o":"b_2820","x":[10254]},{"a":10279,"l":"b_2827","t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x","x":[10246,10275]},{"a":10281,"t":"code","b":[133,50],"m":"sta","oa":50,"o":"row_left_tile_or_cos_lo"},{"a":10283,"t":"code","b":[96],"m":"rts"},{"a":10284,"l":"row_step_end","c":"Shared exit of the two row-stepping helpers after it: returns carry set when a step would leave the row of 32 corners.","t":"code","b":[56],"m":"sec","x":[10288,10299]},{"a":10285,"t":"code","b":[96],"m":"rts"},{"a":10286,"l":"step_corner_left","c":"Moves one corner left along the row being searched: Y = $24 - 1 and on into corner_view_angles; when $24 is already 0 it returns carry set through $282C instead.","t":"code","b":[164,36],"m":"ldy","oa":36,"o":"tile_x","x":[10243,10272]},{"a":10288,"t":"code","b":[240,250],"m":"beq","oa":10284,"o":"row_step_end"},{"a":10290,"t":"code","b":[136],"m":"dey"},{"a":10291,"t":"code","b":[76,61,40],"m":"jmp","oa":10301,"o":"corner_view_angles"},{"a":10294,"l":"step_corner_right","c":"Moves one corner right along the row being searched: Y = $24 + 1, carry set through $282C if that would be corner 32, otherwise it falls straight into corner_view_angles below.","t":"code","b":[164,36],"m":"ldy","oa":36,"o":"tile_x","x":[10214,10227,10257]},{"a":10296,"t":"code","b":[200],"m":"iny"},{"a":10297,"t":"code","b":[192,32],"m":"cpy","o":"#$20"},{"a":10299,"t":"code","b":[240,239],"m":"beq","oa":10284,"o":"row_step_end"},{"a":10301,"l":"corner_view_angles","c":"Angles of tile corner (Y, row $26) as the viewer ($6E) sees it, for drawing. Stores, at index Y + $05, the yaw relative to the left of the view in $0BA0 (low) and $A800 (high), the pitch in $0A80 (low) and $0AE0 (high), and the tile byte in $0180 (0 when the tile has no objects and the map at $3E80 marks it unseen). Returns A and $7F = 0 if the corner is left of the drawing area ($07, $28), $80 inside it, $81 right of it ($12); Y is kept in $24 and $0F and returned, carry clear. C64 addition, its first three instructions: while the play view is up (bit 7 of $9AF6, set by $9A51) it jumps to $37F2, which reads the corner's yaw and pitch from tables the C64 keeps at $BC00-$CBFF (written around $3773-$37E1) and subtracts the viewer's current left-edge yaw and pitch ($1F/$B2, $B0/$B1) instead of working them out. The calculation from $2845, the BBC's, is used for the title and overview pictures: yaw from $9287 with the corner's offset from the viewer's tile ($03/$1D, less $0C78), distance from $937F, pitch from $933D using the tile's height or, under objects, the bottom object's height.","t":"code","b":[44,246,154],"m":"bit","oa":39670,"o":"video_mode_flag","x":[9994,10014,10040,10060,10120,10125,10139,10201,10291]},{"a":10304,"t":"code","b":[16,3],"m":"bpl","oa":10309,"o":"corner_angles_calc"},{"a":10306,"t":"code","b":[76,242,55],"m":"jmp","oa":14322,"o":"tile_view_angles_fast"},{"a":10309,"l":"corner_angles_calc","t":"code","b":[132,36],"m":"sty","oa":36,"o":"tile_x","x":[10304]},{"a":10311,"t":"code","b":[132,15],"m":"sty","oa":15,"o":"y_save_or_obscured"},{"a":10313,"t":"code","b":[152],"m":"tya"},{"a":10314,"t":"code","b":[5,5],"m":"ora","oa":5,"o":"draw_table_offset"},{"a":10316,"t":"code","b":[133,33],"m":"sta","oa":33,"o":"draw_table_index"},{"a":10318,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10320,"t":"code","b":[133,127],"m":"sta","oa":127,"o":"tile_onscreen_or_skip_poly"},{"a":10322,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":10324,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":10326,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":10328,"t":"code","b":[24],"m":"clc"},{"a":10329,"t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x"},{"a":10331,"t":"code","b":[229,3],"m":"sbc","oa":3,"o":"viewer_col_rotated"},{"a":10333,"t":"code","b":[56],"m":"sec"},{"a":10334,"t":"code","b":[237,120,12],"m":"sbc","oa":3192,"o":"title_x_offset"},{"a":10337,"t":"code","b":[133,134],"m":"sta","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":10339,"t":"code","b":[16,11],"m":"bpl","oa":10352,"o":"b_2870"},{"a":10341,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10343,"t":"code","b":[56],"m":"sec"},{"a":10344,"t":"code","b":[229,128],"m":"sbc","oa":128,"o":"dx_lo"},{"a":10346,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":10348,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10350,"t":"code","b":[229,134],"m":"sbc","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":10352,"l":"b_2870","t":"code","b":[133,131],"m":"sta","oa":131,"o":"dx_abs_hi","x":[10339]},{"a":10354,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":10356,"t":"code","b":[133,130],"m":"sta","oa":130,"o":"dz_lo"},{"a":10358,"t":"code","b":[24],"m":"clc"},{"a":10359,"t":"code","b":[165,38],"m":"lda","oa":38,"o":"tile_z"},{"a":10361,"t":"code","b":[229,29],"m":"sbc","oa":29,"o":"viewer_row_rotated"},{"a":10363,"t":"code","b":[133,136],"m":"sta","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":10365,"t":"code","b":[16,11],"m":"bpl","oa":10378,"o":"b_288A"},{"a":10367,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10369,"t":"code","b":[56],"m":"sec"},{"a":10370,"t":"code","b":[229,130],"m":"sbc","oa":130,"o":"dz_lo"},{"a":10372,"t":"code","b":[133,130],"m":"sta","oa":130,"o":"dz_lo"},{"a":10374,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10376,"t":"code","b":[229,136],"m":"sbc","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":10378,"l":"b_288A","t":"code","b":[133,133],"m":"sta","oa":133,"o":"dz_abs_hi","x":[10365]},{"a":10380,"t":"code","b":[32,135,146],"m":"jsr","oa":37511,"o":"get_hypotenuse_angle"},{"a":10383,"t":"code","b":[164,33],"m":"ldy","oa":33,"o":"draw_table_index"},{"a":10385,"t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo"},{"a":10387,"t":"code","b":[56],"m":"sec"},{"a":10388,"t":"code","b":[229,31],"m":"sbc","oa":31,"o":"yaw_adjust_lo"},{"a":10390,"t":"code","b":[153,160,11],"m":"sta","oa":2976,"o":"draw_yaw_lo,y"},{"a":10393,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":10395,"t":"code","b":[229,32],"m":"sbc","oa":32,"o":"screen_left_yaw_hi"},{"a":10397,"t":"code","b":[153,0,168],"m":"sta","oa":43008,"o":"point_yaw_hi,y"},{"a":10400,"t":"code","b":[32,127,147],"m":"jsr","oa":37759,"o":"get_hypotenuse"},{"a":10403,"t":"code","b":[36,28],"m":"bit","oa":28,"o":"arc_right_yaw_or_action"},{"a":10405,"t":"code","b":[48,20],"m":"bmi","oa":10427,"o":"b_28BB"},{"a":10407,"t":"code","b":[112,7],"m":"bvs","oa":10416,"o":"b_28B0"},{"a":10409,"t":"code","b":[166,36],"m":"ldx","oa":36,"o":"tile_x"},{"a":10411,"t":"code","b":[164,38],"m":"ldy","oa":38,"o":"tile_z"},{"a":10413,"t":"code","b":[76,212,40],"m":"jmp","oa":10452,"o":"j_28D4"},{"a":10416,"l":"b_28B0","t":"code","b":[166,38],"m":"ldx","oa":38,"o":"tile_z","x":[10407]},{"a":10418,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":10420,"t":"code","b":[56],"m":"sec"},{"a":10421,"t":"code","b":[229,36],"m":"sbc","oa":36,"o":"tile_x"},{"a":10423,"t":"code","b":[168],"m":"tay"},{"a":10424,"t":"code","b":[76,212,40],"m":"jmp","oa":10452,"o":"j_28D4"},{"a":10427,"l":"b_28BB","t":"code","b":[112,15],"m":"bvs","oa":10444,"o":"b_28CC","x":[10405]},{"a":10429,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":10431,"t":"code","b":[56],"m":"sec"},{"a":10432,"t":"code","b":[229,36],"m":"sbc","oa":36,"o":"tile_x"},{"a":10434,"t":"code","b":[170],"m":"tax"},{"a":10435,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":10437,"t":"code","b":[56],"m":"sec"},{"a":10438,"t":"code","b":[229,38],"m":"sbc","oa":38,"o":"tile_z"},{"a":10440,"t":"code","b":[168],"m":"tay"},{"a":10441,"t":"code","b":[76,212,40],"m":"jmp","oa":10452,"o":"j_28D4"},{"a":10444,"l":"b_28CC","t":"code","b":[169,31],"m":"lda","o":"#$1F","x":[10427]},{"a":10446,"t":"code","b":[56],"m":"sec"},{"a":10447,"t":"code","b":[229,38],"m":"sbc","oa":38,"o":"tile_z"},{"a":10449,"t":"code","b":[170],"m":"tax"},{"a":10450,"t":"code","b":[164,36],"m":"ldy","oa":36,"o":"tile_x"},{"a":10452,"l":"j_28D4","t":"code","b":[132,116],"m":"sty","oa":116,"o":"tmp_t","x":[10413,10424,10441]},{"a":10454,"t":"code","b":[138],"m":"txa"},{"a":10455,"t":"code","b":[10],"m":"asl","o":"a"},{"a":10456,"t":"code","b":[10],"m":"asl","o":"a"},{"a":10457,"t":"code","b":[10],"m":"asl","o":"a"},{"a":10458,"t":"code","b":[41,224],"m":"and","o":"#$E0"},{"a":10460,"t":"code","b":[5,116],"m":"ora","oa":116,"o":"tmp_t"},{"a":10462,"t":"code","b":[168],"m":"tay"},{"a":10463,"t":"code","b":[138],"m":"txa"},{"a":10464,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":10466,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":10468,"t":"code","b":[24],"m":"clc"},{"a":10469,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":10471,"t":"code","b":[133,95],"m":"sta","oa":95,"o":"tile_ptr_page"},{"a":10473,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":10475,"t":"code","b":[166,33],"m":"ldx","oa":33,"o":"draw_table_index"},{"a":10477,"t":"code","b":[157,128,1],"m":"sta","oa":384,"o":"row_visibility,x"},{"a":10480,"t":"code","b":[201,192],"m":"cmp","o":"#$C0"},{"a":10482,"t":"code","b":[144,18],"m":"bcc","oa":10502,"o":"b_2906"},{"a":10484,"l":"b_28F4","t":"code","b":[41,63],"m":"and","o":"#$3F","x":[10492]},{"a":10486,"t":"code","b":[168],"m":"tay"},{"a":10487,"t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y"},{"a":10490,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":10492,"t":"code","b":[176,246],"m":"bcs","oa":10484,"o":"b_28F4"},{"a":10494,"t":"code","b":[185,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,y"},{"a":10497,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":10499,"t":"code","b":[76,30,41],"m":"jmp","oa":10526,"o":"j_291E"},{"a":10502,"l":"b_2906","t":"code","b":[74],"m":"lsr","o":"a","x":[10482]},{"a":10503,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10504,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10505,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10506,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":10508,"t":"code","b":[152],"m":"tya"},{"a":10509,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10510,"t":"code","b":[168],"m":"tay"},{"a":10511,"t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t"},{"a":10513,"t":"code","b":[185,128,62],"m":"lda","oa":16000,"o":"tile_visibility,y"},{"a":10516,"t":"code","b":[164,116],"m":"ldy","oa":116,"o":"tmp_t"},{"a":10518,"t":"code","b":[57,218,36],"m":"and","oa":9434,"o":"bit_masks_msb,y"},{"a":10521,"t":"code","b":[208,3],"m":"bne","oa":10526,"o":"j_291E"},{"a":10523,"t":"code","b":[157,128,1],"m":"sta","oa":384,"o":"row_visibility,x"},{"a":10526,"l":"j_291E","t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj","x":[10499,10521]},{"a":10528,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10530,"t":"code","b":[56],"m":"sec"},{"a":10531,"t":"code","b":[253,0,10],"m":"sbc","oa":2560,"o":"obj_y_lo,x"},{"a":10534,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":10536,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":10538,"t":"code","b":[253,64,9],"m":"sbc","oa":2368,"o":"obj_y_hi,x"},{"a":10541,"t":"code","b":[32,61,147],"m":"jsr","oa":37693,"o":"get_pitch_angle_delta"},{"a":10544,"t":"code","b":[164,33],"m":"ldy","oa":33,"o":"draw_table_index"},{"a":10546,"t":"code","b":[165,141],"m":"lda","oa":141,"o":"pitch_delta_hi"},{"a":10548,"t":"code","b":[153,224,10],"m":"sta","oa":2784,"o":"draw_pitch_hi,y"},{"a":10551,"t":"code","b":[165,80],"m":"lda","oa":80,"o":"pitch_delta_lo"},{"a":10553,"t":"code","b":[153,128,10],"m":"sta","oa":2688,"o":"draw_pitch_lo,y"},{"a":10556,"t":"code","b":[185,0,168],"m":"lda","oa":43008,"o":"point_yaw_hi,y"},{"a":10559,"t":"code","b":[197,7],"m":"cmp","oa":7,"o":"cur_buffer_min_yaw_hi"},{"a":10561,"t":"code","b":[144,20],"m":"bcc","oa":10583,"o":"b_2957"},{"a":10563,"t":"code","b":[208,10],"m":"bne","oa":10575,"o":"b_294F"},{"a":10565,"t":"code","b":[185,160,11],"m":"lda","oa":2976,"o":"draw_yaw_lo,y"},{"a":10568,"t":"code","b":[197,40],"m":"cmp","oa":40,"o":"cur_buffer_min_yaw_lo"},{"a":10570,"t":"code","b":[144,11],"m":"bcc","oa":10583,"o":"b_2957"},{"a":10572,"t":"code","b":[185,0,168],"m":"lda","oa":43008,"o":"point_yaw_hi,y"},{"a":10575,"l":"b_294F","t":"code","b":[102,127],"m":"ror","oa":127,"o":"tile_onscreen_or_skip_poly","x":[10563]},{"a":10577,"t":"code","b":[197,18],"m":"cmp","oa":18,"o":"cur_buffer_max_yaw_hi"},{"a":10579,"t":"code","b":[144,2],"m":"bcc","oa":10583,"o":"b_2957"},{"a":10581,"t":"code","b":[230,127],"m":"inc","oa":127,"o":"tile_onscreen_or_skip_poly"},{"a":10583,"l":"b_2957","t":"code","b":[164,15],"m":"ldy","oa":15,"o":"y_save_or_obscured","x":[10561,10570,10579]},{"a":10585,"t":"code","b":[165,127],"m":"lda","oa":127,"o":"tile_onscreen_or_skip_poly"},{"a":10587,"t":"code","b":[24],"m":"clc"},{"a":10588,"t":"code","b":[96],"m":"rts"},{"a":10589,"l":"draw_landscape_row","c":"Draws one row of tiles in the 3D view: row $26, columns $37 up to but not including $38. The columns left of the viewer's column $03 go first, left to right; then the columns from $38-1 down to the viewer's column, right to left, so each half is drawn from its outer end inwards. Each tile goes through draw_tile_and_objects ($2A12) with its column in $25. Called from $275D and $2790. Same code as the BBC's DrawLandscapeRow.","t":"code","b":[165,55],"m":"lda","oa":55,"o":"coord_x_lo_or_vis_left","x":[10077,10128]},{"a":10591,"t":"code","b":[133,37],"m":"sta","oa":37,"o":"tile_col_or_fill_count"},{"a":10593,"l":"j_2961","t":"code","b":[197,56],"m":"cmp","oa":56,"o":"coord_y_lo_or_vis_right","x":[10608]},{"a":10595,"t":"code","b":[176,39],"m":"bcs","oa":10636,"o":"r_298C"},{"a":10597,"t":"code","b":[197,3],"m":"cmp","oa":3,"o":"viewer_col_rotated"},{"a":10599,"t":"code","b":[176,10],"m":"bcs","oa":10611,"o":"b_2973"},{"a":10601,"t":"code","b":[32,18,42],"m":"jsr","oa":10770,"o":"draw_tile_and_objects"},{"a":10604,"t":"code","b":[230,37],"m":"inc","oa":37,"o":"tile_col_or_fill_count"},{"a":10606,"t":"code","b":[165,37],"m":"lda","oa":37,"o":"tile_col_or_fill_count"},{"a":10608,"t":"code","b":[76,97,41],"m":"jmp","oa":10593,"o":"j_2961"},{"a":10611,"l":"b_2973","t":"code","b":[165,56],"m":"lda","oa":56,"o":"coord_y_lo_or_vis_right","x":[10599]},{"a":10613,"l":"j_2975","t":"code","b":[56],"m":"sec","x":[10633]},{"a":10614,"t":"code","b":[233,1],"m":"sbc","o":"#$01"},{"a":10616,"t":"code","b":[48,18],"m":"bmi","oa":10636,"o":"r_298C"},{"a":10618,"t":"code","b":[133,37],"m":"sta","oa":37,"o":"tile_col_or_fill_count"},{"a":10620,"t":"code","b":[197,55],"m":"cmp","oa":55,"o":"coord_x_lo_or_vis_left"},{"a":10622,"t":"code","b":[144,12],"m":"bcc","oa":10636,"o":"r_298C"},{"a":10624,"t":"code","b":[197,3],"m":"cmp","oa":3,"o":"viewer_col_rotated"},{"a":10626,"t":"code","b":[144,8],"m":"bcc","oa":10636,"o":"r_298C"},{"a":10628,"t":"code","b":[32,18,42],"m":"jsr","oa":10770,"o":"draw_tile_and_objects"},{"a":10631,"t":"code","b":[165,37],"m":"lda","oa":37,"o":"tile_col_or_fill_count"},{"a":10633,"t":"code","b":[76,117,41],"m":"jmp","oa":10613,"o":"j_2975"},{"a":10636,"l":"r_298C","t":"code","b":[96],"m":"rts","x":[10595,10616,10622,10626]},{"a":10637,"l":"flip_row_buffer","c":"Swaps the drawing buffer between types 0 and 1 (the BBC's left and right row buffers): A = (bit 0 of $10) EOR 1, then falls into set_draw_buffer. Only caller: draw_polygon ($2AC0), when a polygon reaches into the other half. Same as the BBC's FlipBufferType.","t":"code","b":[165,16],"m":"lda","oa":16,"o":"buffer_kind","x":[10944]},{"a":10639,"t":"code","b":[41,1],"m":"and","o":"#$01"},{"a":10641,"t":"code","b":[73,1],"m":"eor","o":"#$01"},{"a":10643,"l":"set_draw_buffer","c":"Sets up the drawing window for buffer type A (0, 1 or 2; kept in $10) from the three-entry tables at $29BB-$29C6: $07 = minimum yaw high byte and $12 = $07/2 EOR $80, $11 = yaw origin, $61 = width, $35 = left edge, $36 = $35+$61, and zero in the low bytes $28 and $29. The tile-angle code tests yaws against $07/$28 and $12 ($293F-$2951); get_polygon_lines adds $29/$11 to every point yaw. Callers: $1098 and $993B (A = 0), $35D2 and $9951 (A = 2; $9951 is the BBC's UseColumnBuffer, moved into the C64's $99xx code), and flip_row_buffer. Same code as the BBC's ConfigureBuffer.","t":"code","b":[133,16],"m":"sta","oa":16,"o":"buffer_kind","x":[4248,13778,39227,39249]},{"a":10645,"t":"code","b":[168],"m":"tay"},{"a":10646,"t":"code","b":[185,196,41],"m":"lda","oa":10692,"o":"buffer_min_yaw_hi,y"},{"a":10649,"t":"code","b":[133,7],"m":"sta","oa":7,"o":"cur_buffer_min_yaw_hi"},{"a":10651,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10652,"t":"code","b":[73,128],"m":"eor","o":"#$80"},{"a":10654,"t":"code","b":[133,18],"m":"sta","oa":18,"o":"cur_buffer_max_yaw_hi"},{"a":10656,"t":"code","b":[185,187,41],"m":"lda","oa":10683,"o":"buffer_origin_hi,y"},{"a":10659,"t":"code","b":[133,17],"m":"sta","oa":17,"o":"cur_buffer_origin_hi"},{"a":10661,"t":"code","b":[185,193,41],"m":"lda","oa":10689,"o":"buffer_width_px,y"},{"a":10664,"t":"code","b":[133,97],"m":"sta","oa":97,"o":"cur_buffer_width_px"},{"a":10666,"t":"code","b":[185,190,41],"m":"lda","oa":10686,"o":"buffer_left_px,y"},{"a":10669,"t":"code","b":[133,53],"m":"sta","oa":53,"o":"coord_y_bot_or_buf_left"},{"a":10671,"t":"code","b":[24],"m":"clc"},{"a":10672,"t":"code","b":[101,97],"m":"adc","oa":97,"o":"cur_buffer_width_px"},{"a":10674,"t":"code","b":[133,54],"m":"sta","oa":54,"o":"coord_z_bot_or_buf_right"},{"a":10676,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10678,"t":"code","b":[133,40],"m":"sta","oa":40,"o":"cur_buffer_min_yaw_lo"},{"a":10680,"t":"code","b":[133,41],"m":"sta","oa":41,"o":"cur_buffer_origin_lo"},{"a":10682,"t":"code","b":[96],"m":"rts"},{"a":10683,"l":"buffer_origin_hi","c":"Yaw origin, high byte, for buffer types 0, 1, 2: 10, 2, 12. set_draw_buffer copies it to $11; get_polygon_lines adds it to each point's yaw ($2DA7, $2DDD) before multiplying by 8 to get a pixel x. Same values as the BBC's buffersOrigin.","t":"byte","b":[10,2,12],"x":[10656]},{"a":10686,"l":"buffer_left_px","c":"Left edge in pixels for buffer types 0, 1, 2: 80, 64, 96. set_draw_buffer copies it to $35 and adds the width from $29C1 to make the right edge in $36. Same values as the BBC's xBuffersLeft.","t":"byte","b":[80,64,96],"x":[10666]},{"a":10689,"l":"buffer_width_px","c":"Width in pixels for buffer types 0, 1, 2: 112, 112, 64. set_draw_buffer copies it to $61, read at $2337 and $2384. Same values as the BBC's xBuffersWidth.","t":"byte","b":[112,112,64],"x":[10661]},{"a":10692,"l":"buffer_min_yaw_hi","c":"Minimum yaw, high byte, for buffer types 0, 1, 2: 20, 20, 8. set_draw_buffer copies it to $07 and derives the maximum in $12 from it ($07/2 EOR $80). Same values as the BBC's buffersMinYaw.","t":"byte","b":[20,20,8],"x":[10646]},{"a":10695,"l":"set_object_buffer","c":"Sets up a narrow drawing window around one object being redrawn (buffer type 2). A = the object's width in character columns, from $0C69 at the only caller, $1FE5. $07/$28 = A/2 as a yaw with a fractional low byte, $12 = $07/2 EOR $80, $61 = 4*A pixels, $36 = $80 OR (2*A AND $FC), $35 = $36-$61, origin $11/$29 = $35/8 (high byte and fraction), $10 = 2. Ends in the RTS at $29F8 that draw_tile_and_objects also uses. Same code as the BBC's ConfigureObjBuffer.","t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t","x":[8165]},{"a":10697,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10698,"t":"code","b":[133,7],"m":"sta","oa":7,"o":"cur_buffer_min_yaw_hi"},{"a":10700,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10702,"t":"code","b":[106],"m":"ror","o":"a"},{"a":10703,"t":"code","b":[133,40],"m":"sta","oa":40,"o":"cur_buffer_min_yaw_lo"},{"a":10705,"t":"code","b":[165,7],"m":"lda","oa":7,"o":"cur_buffer_min_yaw_hi"},{"a":10707,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10708,"t":"code","b":[73,128],"m":"eor","o":"#$80"},{"a":10710,"t":"code","b":[133,18],"m":"sta","oa":18,"o":"cur_buffer_max_yaw_hi"},{"a":10712,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":10714,"t":"code","b":[10],"m":"asl","o":"a"},{"a":10715,"t":"code","b":[10],"m":"asl","o":"a"},{"a":10716,"t":"code","b":[133,97],"m":"sta","oa":97,"o":"cur_buffer_width_px"},{"a":10718,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10719,"t":"code","b":[41,252],"m":"and","o":"#$FC"},{"a":10721,"t":"code","b":[9,128],"m":"ora","o":"#$80"},{"a":10723,"t":"code","b":[133,54],"m":"sta","oa":54,"o":"coord_z_bot_or_buf_right"},{"a":10725,"t":"code","b":[56],"m":"sec"},{"a":10726,"t":"code","b":[229,97],"m":"sbc","oa":97,"o":"cur_buffer_width_px"},{"a":10728,"t":"code","b":[133,53],"m":"sta","oa":53,"o":"coord_y_bot_or_buf_left"},{"a":10730,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10731,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10732,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10733,"t":"code","b":[133,17],"m":"sta","oa":17,"o":"cur_buffer_origin_hi"},{"a":10735,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10737,"t":"code","b":[106],"m":"ror","o":"a"},{"a":10738,"t":"code","b":[133,41],"m":"sta","oa":41,"o":"cur_buffer_origin_lo"},{"a":10740,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":10742,"t":"code","b":[133,16],"m":"sta","oa":16,"o":"buffer_kind"},{"a":10744,"l":"r_29F8","t":"code","b":[96],"m":"rts","x":[10753,10791]},{"a":10745,"l":"draw_title_block_tile","c":"Title-screen branch of draw_tile_and_objects (bit 7 of $0C4B set): the tile's entry in the view table $0180,X is 0, or $20 plus a block-pair object type 7, 8 or 9 (written by spawn_char_rows). Type 0 draws nothing; otherwise object 63 gets that type ($0A7F), the tile's column ($25 to $093F) and row ($26 to $09BF), and is drawn by $8533 (the BBC's DrawObject) with Y = 63. The tile itself is not drawn.","t":"code","b":[189,128,1],"m":"lda","oa":384,"o":"row_visibility,x","x":[10786]},{"a":10748,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":10750,"t":"code","b":[141,127,10],"m":"sta","oa":2687,"o":"a_0A7F"},{"a":10753,"t":"code","b":[240,245],"m":"beq","oa":10744,"o":"r_29F8"},{"a":10755,"t":"code","b":[165,37],"m":"lda","oa":37,"o":"tile_col_or_fill_count"},{"a":10757,"t":"code","b":[141,63,9],"m":"sta","oa":2367,"o":"a_093F"},{"a":10760,"t":"code","b":[165,38],"m":"lda","oa":38,"o":"tile_z"},{"a":10762,"t":"code","b":[141,191,9],"m":"sta","oa":2495,"o":"a_09BF"},{"a":10765,"t":"code","b":[160,63],"m":"ldy","o":"#$3F"},{"a":10767,"t":"code","b":[76,51,133],"m":"jmp","oa":34099,"o":"draw_object"},{"a":10770,"l":"draw_tile_and_objects","c":"Draws the tile at column $25, row $26, and anything standing on it. First calls $352C, the C64's changed copy of the BBC's ProcessSound (not traced here). Index X = (($25 OR $05) + $1B) AND 63 into the view's tile table at $0180. Title screens go to draw_title_block_tile. Otherwise the entry decides: 0 = hidden, nothing drawn; $C0 and up = an object stands there: the flat tile, then the stack of objects through $21AE (the BBC's DrawObjectStack); else the low nibble is the shape: 0 flat (draw_flat_tile), 4 or 12 two triangles (draw_two_face_tile, first point from bit 0 of $4B into $45), anything else draw_sloping_tile. Called by draw_landscape_row. Same logic as the BBC's DrawTileAndObjects.","t":"code","b":[32,44,53],"m":"jsr","oa":13612,"o":"process_sound","x":[10601,10628]},{"a":10773,"t":"code","b":[165,37],"m":"lda","oa":37,"o":"tile_col_or_fill_count"},{"a":10775,"t":"code","b":[5,5],"m":"ora","oa":5,"o":"draw_table_offset"},{"a":10777,"t":"code","b":[24],"m":"clc"},{"a":10778,"t":"code","b":[101,27],"m":"adc","oa":27,"o":"quadrant_table_offset"},{"a":10780,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":10782,"t":"code","b":[170],"m":"tax"},{"a":10783,"t":"code","b":[44,75,12],"m":"bit","oa":3147,"o":"drawing_title"},{"a":10786,"t":"code","b":[48,213],"m":"bmi","oa":10745,"o":"draw_title_block_tile"},{"a":10788,"t":"code","b":[189,128,1],"m":"lda","oa":384,"o":"row_visibility,x"},{"a":10791,"t":"code","b":[240,207],"m":"beq","oa":10744,"o":"r_29F8"},{"a":10793,"t":"code","b":[201,192],"m":"cmp","o":"#$C0"},{"a":10795,"t":"code","b":[144,8],"m":"bcc","oa":10805,"o":"b_2A35"},{"a":10797,"t":"code","b":[72],"m":"pha"},{"a":10798,"t":"code","b":[32,75,42],"m":"jsr","oa":10827,"o":"draw_flat_tile"},{"a":10801,"t":"code","b":[104],"m":"pla"},{"a":10802,"t":"code","b":[76,174,33],"m":"jmp","oa":8622,"o":"draw_stacked_objects"},{"a":10805,"l":"b_2A35","t":"code","b":[41,15],"m":"and","o":"#$0F","x":[10795]},{"a":10807,"t":"code","b":[240,18],"m":"beq","oa":10827,"o":"draw_flat_tile"},{"a":10809,"t":"code","b":[201,12],"m":"cmp","o":"#$0C"},{"a":10811,"t":"code","b":[240,4],"m":"beq","oa":10817,"o":"b_2A41"},{"a":10813,"t":"code","b":[201,4],"m":"cmp","o":"#$04"},{"a":10815,"t":"code","b":[208,40],"m":"bne","oa":10857,"o":"draw_sloping_tile"},{"a":10817,"l":"b_2A41","t":"code","b":[72],"m":"pha","x":[10811]},{"a":10818,"t":"code","b":[165,75],"m":"lda","oa":75,"o":"arc_opposite_quadrant"},{"a":10820,"t":"code","b":[41,1],"m":"and","o":"#$01"},{"a":10822,"t":"code","b":[133,69],"m":"sta","oa":69,"o":"tile_first_point"},{"a":10824,"t":"code","b":[104],"m":"pla"},{"a":10825,"t":"code","b":[208,63],"m":"bne","oa":10890,"o":"draw_two_face_tile"},{"a":10827,"l":"draw_flat_tile","c":"Draws a flat tile in the chequerboard pattern: X = 0 when column $25 and row $26 are both odd or both even, else X = 8; X selects entry 0 ($3C) or 8 ($00) of tile_face_colours. The X = 8 tiles pass through set_stash_offset on the way into draw_one_face_tile. Called from draw_tile_and_objects and from $27CE. Same as the BBC's DrawFlatTile.","t":"code","b":[162,0],"m":"ldx","o":"#$00","x":[10190,10798,10807]},{"a":10829,"t":"code","b":[165,37],"m":"lda","oa":37,"o":"tile_col_or_fill_count"},{"a":10831,"t":"code","b":[69,38],"m":"eor","oa":38,"o":"tile_z"},{"a":10833,"t":"code","b":[41,1],"m":"and","o":"#$01"},{"a":10835,"t":"code","b":[240,8],"m":"beq","oa":10845,"o":"draw_one_face_tile"},{"a":10837,"t":"code","b":[162,8],"m":"ldx","o":"#$08"},{"a":10839,"l":"set_stash_offset","c":"Anti-cracker step inside draw_flat_tile, reached only for the second chequer colour (X = 8): copies the middle byte of the seed register ($0C7D, written as $0C75,X) to $0C55 (as $0C4D,X), the BBC's stashOffset, so its last value depends on the landscape. The C64 keeps the BBC's disguised readers of $0C55: $14AC LDY $0BAB,X after LDX #$AA, and $254F LDA $0B56,X. Falls into draw_one_face_tile.","t":"code","b":[189,117,12],"m":"lda","oa":3189,"o":"tamper_seed,x"},{"a":10842,"t":"code","b":[157,77,12],"m":"sta","oa":3149,"o":"object_only_redraw,x"},{"a":10845,"l":"draw_one_face_tile","c":"Draws a tile as a single four-sided face: colours $19 = tile_face_colours,X, polygon type $3B = 0 (quadrilateral), then jumps to draw_polygon. X is 0 or 8 from draw_flat_tile, or the tile's own shape number from draw_sloping_tile. Same as the BBC's DrawOneFaceTile.","t":"code","b":[189,25,45],"m":"lda","oa":11545,"o":"tile_face_colours,x","x":[10835,10868]},{"a":10848,"t":"code","b":[133,25],"m":"sta","oa":25,"o":"poly_colours_or_row"},{"a":10850,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10852,"t":"code","b":[133,59],"m":"sta","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":10854,"t":"code","b":[76,169,42],"m":"jmp","oa":10921,"o":"draw_polygon"},{"a":10857,"l":"draw_sloping_tile","c":"Draws a sloping tile whose shape A is not 0, 4 or 12. Y = (A - $66) AND 15 turns the shape into one relative to the direction the viewer faces ($66 = viewing quadrant times 4). If Y AND 3 = 1 the tile is one plane and goes to draw_one_face_tile. Otherwise it is two triangles: $45 = triangle_first_point,Y, and 16 is added to the shape (choosing the other half of tile_face_colours) unless (bit 2 of the shape)/4 + $4B is 2 or more. Falls into draw_two_face_tile. Same as the BBC's DrawSlopingTile.","t":"code","b":[170],"m":"tax","x":[10815]},{"a":10858,"t":"code","b":[56],"m":"sec"},{"a":10859,"t":"code","b":[229,102],"m":"sbc","oa":102,"o":"smooth_action_or_quad4"},{"a":10861,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":10863,"t":"code","b":[168],"m":"tay"},{"a":10864,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":10866,"t":"code","b":[201,1],"m":"cmp","o":"#$01"},{"a":10868,"t":"code","b":[240,231],"m":"beq","oa":10845,"o":"draw_one_face_tile"},{"a":10870,"t":"code","b":[185,57,45],"m":"lda","oa":11577,"o":"triangle_first_point,y"},{"a":10873,"t":"code","b":[133,69],"m":"sta","oa":69,"o":"tile_first_point"},{"a":10875,"t":"code","b":[138],"m":"txa"},{"a":10876,"t":"code","b":[41,4],"m":"and","o":"#$04"},{"a":10878,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10879,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":10880,"t":"code","b":[24],"m":"clc"},{"a":10881,"t":"code","b":[101,75],"m":"adc","oa":75,"o":"arc_opposite_quadrant"},{"a":10883,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":10885,"t":"code","b":[138],"m":"txa"},{"a":10886,"t":"code","b":[176,2],"m":"bcs","oa":10890,"o":"draw_two_face_tile"},{"a":10888,"t":"code","b":[9,16],"m":"ora","o":"#$10"},{"a":10890,"l":"draw_two_face_tile","c":"Draws a tile as two triangles. A = shape, plus 16 for the second colour set, kept in $34. First triangle: $3B = $80, colours from tile_face_colours,A, JSR draw_polygon. Second: colours from entry (A EOR 16), bit 6 added to $3B, and falls into draw_polygon. Same as the BBC's DrawTwoFaceTile.","t":"code","b":[133,52],"m":"sta","oa":52,"o":"coord_x_bot_or_shape","x":[10825,10886]},{"a":10892,"t":"code","b":[170],"m":"tax"},{"a":10893,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":10895,"t":"code","b":[133,59],"m":"sta","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":10897,"t":"code","b":[189,25,45],"m":"lda","oa":11545,"o":"tile_face_colours,x"},{"a":10900,"t":"code","b":[133,25],"m":"sta","oa":25,"o":"poly_colours_or_row"},{"a":10902,"t":"code","b":[32,169,42],"m":"jsr","oa":10921,"o":"draw_polygon"},{"a":10905,"t":"code","b":[165,52],"m":"lda","oa":52,"o":"coord_x_bot_or_shape"},{"a":10907,"t":"code","b":[73,16],"m":"eor","o":"#$10"},{"a":10909,"t":"code","b":[170],"m":"tax"},{"a":10910,"t":"code","b":[189,25,45],"m":"lda","oa":11545,"o":"tile_face_colours,x"},{"a":10913,"t":"code","b":[133,25],"m":"sta","oa":25,"o":"poly_colours_or_row"},{"a":10915,"t":"code","b":[165,59],"m":"lda","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":10917,"t":"code","b":[9,64],"m":"ora","o":"#$40"},{"a":10919,"t":"code","b":[133,59],"m":"sta","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":10921,"l":"draw_polygon","c":"Draws one polygon into the current drawing buffer. The kind is in bits 7-6 of $3B: %00 a four-sided tile face, %01 an object face, %10 and %11 the first and second triangle of a tile. Buffer type 2 ($10) is one pass: get_polygon_lines, and if it returns carry clear, the filler at $22AA (the BBC's DrawPolygonLines). With type 0 or 1 it draws into that buffer, then, unless $2C,type is 1 (the polygon stays inside), calls flip_row_buffer and draws it again into the other. Called by the tile routines above and by $859F in the object drawer. Same as the BBC's DrawPolygon.","t":"code","b":[164,16],"m":"ldy","oa":16,"o":"buffer_kind","x":[10854,10902,34207]},{"a":10923,"t":"code","b":[192,2],"m":"cpy","o":"#$02"},{"a":10925,"t":"code","b":[176,20],"m":"bcs","oa":10947,"o":"b_2AC3"},{"a":10927,"t":"code","b":[32,108,45],"m":"jsr","oa":11628,"o":"get_polygon_lines"},{"a":10930,"t":"code","b":[176,12],"m":"bcs","oa":10944,"o":"b_2AC0"},{"a":10932,"t":"code","b":[32,170,34],"m":"jsr","oa":8874,"o":"draw_polygon_spans"},{"a":10935,"t":"code","b":[164,16],"m":"ldy","oa":16,"o":"buffer_kind"},{"a":10937,"t":"code","b":[185,44,0],"m":"lda","oa":44,"o":"vec_x_bot_or_goes_right,y"},{"a":10940,"t":"code","b":[201,1],"m":"cmp","o":"#$01"},{"a":10942,"t":"code","b":[240,11],"m":"beq","oa":10955,"o":"r_2ACB"},{"a":10944,"l":"b_2AC0","t":"code","b":[32,141,41],"m":"jsr","oa":10637,"o":"flip_row_buffer","x":[10930]},{"a":10947,"l":"b_2AC3","t":"code","b":[32,108,45],"m":"jsr","oa":11628,"o":"get_polygon_lines","x":[10925]},{"a":10950,"t":"code","b":[176,3],"m":"bcs","oa":10955,"o":"r_2ACB"},{"a":10952,"t":"code","b":[32,170,34],"m":"jsr","oa":8874,"o":"draw_polygon_spans"},{"a":10955,"l":"r_2ACB","t":"code","b":[96],"m":"rts","x":[10942,10950]},{"a":10956,"l":"generate_landscape","c":"Builds the landscape's 32 x 32 grid of tile corners at $0400-$07FF from the seed sequence. 81 seed numbers go to $AD00-$AD50; only the third ($AD4E) is used again, by set_cracker_seed. $0C08 = 24 on landscape 0000 ($0C52 = 0), otherwise 14 plus a seed number from 0 to 22 ($3451). Then: process_all_tiles $80 (a seed number in every corner), smooth_landscape 0 (average runs of four), process_all_tiles 1 (scale by $0C08, clamp to 1-11), smooth_landscape $40 (level single-corner peaks and dips), get_tile_shape for every corner x, z = 30 down to 0 with the shape put in the high nibble, and process_all_tiles 2 to swap the nibbles: altitude high, shape low. Called from the title loop ($1071) and $1A9A (the next landscape after a win). When smooth_tile_strip has patched the stack, the final RTS goes to $8817 instead of the caller. Same as the BBC's GenerateLandscape.","t":"code","b":[162,80],"m":"ldx","o":"#$50","x":[4209,6810]},{"a":10958,"l":"b_2ACE","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[10965]},{"a":10961,"t":"code","b":[157,0,173],"m":"sta","oa":44288,"o":"polygon_left_x,x"},{"a":10964,"t":"code","b":[202],"m":"dex"},{"a":10965,"t":"code","b":[16,247],"m":"bpl","oa":10958,"o":"b_2ACE"},{"a":10967,"t":"code","b":[173,82,12],"m":"lda","oa":3154,"o":"landscape_nonzero"},{"a":10970,"t":"code","b":[208,4],"m":"bne","oa":10976,"o":"b_2AE0"},{"a":10972,"t":"code","b":[169,24],"m":"lda","o":"#$18"},{"a":10974,"t":"code","b":[208,6],"m":"bne","oa":10982,"o":"b_2AE6"},{"a":10976,"l":"b_2AE0","t":"code","b":[32,81,52],"m":"jsr","oa":13393,"o":"random_0_to_22","x":[10970]},{"a":10979,"t":"code","b":[24],"m":"clc"},{"a":10980,"t":"code","b":[105,14],"m":"adc","o":"#$0E"},{"a":10982,"l":"b_2AE6","t":"code","b":[141,8,12],"m":"sta","oa":3080,"o":"height_scale","x":[10974]},{"a":10985,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":10987,"t":"code","b":[32,34,43],"m":"jsr","oa":11042,"o":"process_all_tiles"},{"a":10990,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":10992,"t":"code","b":[32,131,43],"m":"jsr","oa":11139,"o":"smooth_landscape"},{"a":10995,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":10997,"t":"code","b":[32,34,43],"m":"jsr","oa":11042,"o":"process_all_tiles"},{"a":11000,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":11002,"t":"code","b":[32,131,43],"m":"jsr","oa":11139,"o":"smooth_landscape"},{"a":11005,"t":"code","b":[169,30],"m":"lda","o":"#$1E"},{"a":11007,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":11009,"l":"b_2B01","t":"code","b":[169,30],"m":"lda","o":"#$1E","x":[11034]},{"a":11011,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":11013,"l":"b_2B05","t":"code","b":[32,124,44],"m":"jsr","oa":11388,"o":"get_tile_shape","x":[11030]},{"a":11016,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":11019,"t":"code","b":[138],"m":"txa"},{"a":11020,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11021,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11022,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11023,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11024,"t":"code","b":[17,94],"m":"ora","oa":94,"o":"(tile_ptr),y"},{"a":11026,"t":"code","b":[145,94],"m":"sta","oa":94,"o":"(tile_ptr),y"},{"a":11028,"t":"code","b":[198,36],"m":"dec","oa":36,"o":"tile_x"},{"a":11030,"t":"code","b":[16,237],"m":"bpl","oa":11013,"o":"b_2B05"},{"a":11032,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":11034,"t":"code","b":[16,229],"m":"bpl","oa":11009,"o":"b_2B01"},{"a":11036,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":11038,"t":"code","b":[32,34,43],"m":"jsr","oa":11042,"o":"process_all_tiles"},{"a":11041,"t":"code","b":[96],"m":"rts"},{"a":11042,"l":"process_all_tiles","c":"Applies one operation, chosen by A (kept in $1C), to all 32 x 32 tile corners, z and x each from 31 down to 0: 0 = zero the byte; $80 = store the next seed number; 1 = map a raw seed byte v to an altitude: $0C08 times |v-128|, high byte, with the sign of v-128 put back (the multiply at $0D03 and sign routine at $1007), plus 6, negatives made 0, plus 1, capped at 11; 2 = swap the byte's nibbles. Returns with N set. Called by generate_landscape (A = $80, 1, 2) and draw_title_screen (A = 0). Same as the BBC's ProcessTileData.","t":"code","b":[133,28],"m":"sta","oa":28,"o":"arc_right_yaw_or_action","x":[10987,10997,11038,12954]},{"a":11044,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":11046,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":11048,"l":"b_2B28","t":"code","b":[169,31],"m":"lda","o":"#$1F","x":[11136]},{"a":11050,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":11052,"l":"b_2B2C","t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile","x":[11132]},{"a":11055,"t":"code","b":[165,28],"m":"lda","oa":28,"o":"arc_right_yaw_or_action"},{"a":11057,"t":"code","b":[240,69],"m":"beq","oa":11128,"o":"b_2B78"},{"a":11059,"t":"code","b":[48,64],"m":"bmi","oa":11125,"o":"b_2B75"},{"a":11061,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":11062,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":11064,"t":"code","b":[176,17],"m":"bcs","oa":11083,"o":"b_2B4B"},{"a":11066,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":11067,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":11068,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":11069,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":11070,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":11072,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":11074,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11075,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11076,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11077,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11078,"t":"code","b":[5,116],"m":"ora","oa":116,"o":"tmp_t"},{"a":11080,"t":"code","b":[76,120,43],"m":"jmp","oa":11128,"o":"b_2B78"},{"a":11083,"l":"b_2B4B","t":"code","b":[56],"m":"sec","x":[11064]},{"a":11084,"t":"code","b":[233,128],"m":"sbc","o":"#$80"},{"a":11086,"t":"code","b":[8],"m":"php"},{"a":11087,"t":"code","b":[16,5],"m":"bpl","oa":11094,"o":"b_2B56"},{"a":11089,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":11091,"t":"code","b":[24],"m":"clc"},{"a":11092,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":11094,"l":"b_2B56","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[11087]},{"a":11096,"t":"code","b":[173,8,12],"m":"lda","oa":3080,"o":"height_scale"},{"a":11099,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":11102,"t":"code","b":[40],"m":"plp"},{"a":11103,"t":"code","b":[32,7,16],"m":"jsr","oa":4103,"o":"apply_sign16"},{"a":11106,"t":"code","b":[24],"m":"clc"},{"a":11107,"t":"code","b":[105,6],"m":"adc","o":"#$06"},{"a":11109,"t":"code","b":[16,2],"m":"bpl","oa":11113,"o":"b_2B69"},{"a":11111,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":11113,"l":"b_2B69","t":"code","b":[24],"m":"clc","x":[11109]},{"a":11114,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":11116,"t":"code","b":[201,12],"m":"cmp","o":"#$0C"},{"a":11118,"t":"code","b":[144,2],"m":"bcc","oa":11122,"o":"b_2B72"},{"a":11120,"t":"code","b":[169,11],"m":"lda","o":"#$0B"},{"a":11122,"l":"b_2B72","t":"code","b":[76,120,43],"m":"jmp","oa":11128,"o":"b_2B78","x":[11118]},{"a":11125,"l":"b_2B75","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[11059]},{"a":11128,"l":"b_2B78","t":"code","b":[145,94],"m":"sta","oa":94,"o":"(tile_ptr),y","x":[11057,11080,11122]},{"a":11130,"t":"code","b":[198,36],"m":"dec","oa":36,"o":"tile_x"},{"a":11132,"t":"code","b":[16,174],"m":"bpl","oa":11052,"o":"b_2B2C"},{"a":11134,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":11136,"t":"code","b":[16,166],"m":"bpl","oa":11048,"o":"b_2B28"},{"a":11138,"t":"code","b":[96],"m":"rts"},{"a":11139,"l":"smooth_landscape","c":"Smooths the whole landscape twice ($15 counts 2 passes). Each pass runs smooth_tile_strip on every row (z = 31..0, A = 0) and then every column (x = 31..0, A = $80). A goes to $66 first: bit 6 clear averages, bit 6 set levels single-corner spikes. Called twice by generate_landscape. Same as the BBC's SmoothTileData.","t":"code","b":[133,102],"m":"sta","oa":102,"o":"smooth_action_or_quad4","x":[10992,11002]},{"a":11141,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":11143,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":11145,"l":"b_2B89","t":"code","b":[169,31],"m":"lda","o":"#$1F","x":[11173]},{"a":11147,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":11149,"l":"b_2B8D","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[11156]},{"a":11151,"t":"code","b":[32,188,43],"m":"jsr","oa":11196,"o":"smooth_tile_strip"},{"a":11154,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":11156,"t":"code","b":[16,247],"m":"bpl","oa":11149,"o":"b_2B8D"},{"a":11158,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":11160,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":11162,"l":"b_2B9A","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[11169]},{"a":11164,"t":"code","b":[32,188,43],"m":"jsr","oa":11196,"o":"smooth_tile_strip"},{"a":11167,"t":"code","b":[198,36],"m":"dec","oa":36,"o":"tile_x"},{"a":11169,"t":"code","b":[16,247],"m":"bpl","oa":11162,"o":"b_2B9A"},{"a":11171,"t":"code","b":[198,21],"m":"dec","oa":21,"o":"loop_count"},{"a":11173,"t":"code","b":[208,226],"m":"bne","oa":11145,"o":"b_2B89"},{"a":11175,"t":"code","b":[96],"m":"rts"},{"a":11176,"l":"point_at_tile","c":"Points ($5E) and Y at the tile byte for corner x = $24, z = $26: page $04 + (x AND 3), offset (x/4)*32 + z, so each page holds every fourth column. Differs from the BBC's GetTileData, which also loaded the byte and set carry for an object ($C0 and up): the C64 version stops at the address, and every one of its 17 call sites that wants the byte loads ($5E),Y itself, with CMP #$C0 where the flag is needed (after the calls at $1254, $1ACC, $1DF9).","t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x","x":[4692,5630,6860,6994,7523,7673,7929,7968,11016,11052,11216,11376,11388,11399,11410,11421,12885]},{"a":11178,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11179,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11180,"t":"code","b":[10],"m":"asl","o":"a"},{"a":11181,"t":"code","b":[41,224],"m":"and","o":"#$E0"},{"a":11183,"t":"code","b":[5,38],"m":"ora","oa":38,"o":"tile_z"},{"a":11185,"t":"code","b":[168],"m":"tay"},{"a":11186,"t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x"},{"a":11188,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":11190,"t":"code","b":[24],"m":"clc"},{"a":11191,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":11193,"t":"code","b":[133,95],"m":"sta","oa":95,"o":"tile_ptr_page"},{"a":11195,"t":"code","b":[96],"m":"rts"},{"a":11196,"l":"smooth_tile_strip","c":"Smooths one strip of 32 corners: the row at z = $26 when bit 7 of A is clear, the column at x = $24 when set; bit 6 comes from $66 and the two are kept in $1C. Copies the strip into $AD00-$AD22 with corners 0-2 repeated at the end. Bit 6 set: working down the strip, a corner higher than both neighbours drops to the higher neighbour and one lower than both rises to the lower one. Then, if bit 7 of $0C71 is clear, writes $8816 as the return address at $01FE/$01FF: the title loop calls generate_landscape with the stack reset (LDX #$FF, TXS at $1017), so that RTS lands on $8817, whose bytes $30 $3F are BMI $8858, the landscape preview (the BBC trick, re-aimed at the C64's addresses). Bit 6 clear: each corner becomes the average of itself and the next three, then set_cracker_seed. Same as the BBC's SmoothTileCorners, plus the tile loads the shorter point_at_tile needs.","t":"code","b":[5,102],"m":"ora","oa":102,"o":"smooth_action_or_quad4","x":[11151,11164]},{"a":11198,"t":"code","b":[133,28],"m":"sta","oa":28,"o":"arc_right_yaw_or_action"},{"a":11200,"t":"code","b":[162,34],"m":"ldx","o":"#$22"},{"a":11202,"l":"b_2BC2","t":"code","b":[138],"m":"txa","x":[11225]},{"a":11203,"t":"code","b":[41,31],"m":"and","o":"#$1F"},{"a":11205,"t":"code","b":[36,28],"m":"bit","oa":28,"o":"arc_right_yaw_or_action"},{"a":11207,"t":"code","b":[16,5],"m":"bpl","oa":11214,"o":"b_2BCE"},{"a":11209,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":11211,"t":"code","b":[76,208,43],"m":"jmp","oa":11216,"o":"j_2BD0"},{"a":11214,"l":"b_2BCE","t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x","x":[11207]},{"a":11216,"l":"j_2BD0","t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile","x":[11211]},{"a":11219,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":11221,"t":"code","b":[157,0,173],"m":"sta","oa":44288,"o":"polygon_left_x,x"},{"a":11224,"t":"code","b":[202],"m":"dex"},{"a":11225,"t":"code","b":[16,231],"m":"bpl","oa":11202,"o":"b_2BC2"},{"a":11227,"t":"code","b":[36,28],"m":"bit","oa":28,"o":"arc_right_yaw_or_action"},{"a":11229,"t":"code","b":[80,77],"m":"bvc","oa":11308,"o":"b_2C2C"},{"a":11231,"t":"code","b":[162,31],"m":"ldx","o":"#$1F"},{"a":11233,"l":"b_2BE1","t":"code","b":[189,1,173],"m":"lda","oa":44289,"o":"strip_tile_next,x","x":[11287]},{"a":11236,"t":"code","b":[221,2,173],"m":"cmp","oa":44290,"o":"strip_tile_next2,x"},{"a":11239,"t":"code","b":[240,45],"m":"beq","oa":11286,"o":"b_2C16"},{"a":11241,"t":"code","b":[176,16],"m":"bcs","oa":11259,"o":"b_2BFB"},{"a":11243,"t":"code","b":[221,0,173],"m":"cmp","oa":44288,"o":"polygon_left_x,x"},{"a":11246,"t":"code","b":[240,38],"m":"beq","oa":11286,"o":"b_2C16"},{"a":11248,"t":"code","b":[176,36],"m":"bcs","oa":11286,"o":"b_2C16"},{"a":11250,"t":"code","b":[189,2,173],"m":"lda","oa":44290,"o":"strip_tile_next2,x"},{"a":11253,"t":"code","b":[221,0,173],"m":"cmp","oa":44288,"o":"polygon_left_x,x"},{"a":11256,"t":"code","b":[76,8,44],"m":"jmp","oa":11272,"o":"j_2C08"},{"a":11259,"l":"b_2BFB","t":"code","b":[221,0,173],"m":"cmp","oa":44288,"o":"polygon_left_x,x","x":[11241]},{"a":11262,"t":"code","b":[240,22],"m":"beq","oa":11286,"o":"b_2C16"},{"a":11264,"t":"code","b":[144,20],"m":"bcc","oa":11286,"o":"b_2C16"},{"a":11266,"t":"code","b":[189,0,173],"m":"lda","oa":44288,"o":"polygon_left_x,x"},{"a":11269,"t":"code","b":[221,2,173],"m":"cmp","oa":44290,"o":"strip_tile_next2,x"},{"a":11272,"l":"j_2C08","t":"code","b":[144,6],"m":"bcc","oa":11280,"o":"b_2C10","x":[11256]},{"a":11274,"t":"code","b":[189,0,173],"m":"lda","oa":44288,"o":"polygon_left_x,x"},{"a":11277,"t":"code","b":[76,19,44],"m":"jmp","oa":11283,"o":"j_2C13"},{"a":11280,"l":"b_2C10","t":"code","b":[189,2,173],"m":"lda","oa":44290,"o":"strip_tile_next2,x","x":[11272]},{"a":11283,"l":"j_2C13","t":"code","b":[157,1,173],"m":"sta","oa":44289,"o":"strip_tile_next,x","x":[11277]},{"a":11286,"l":"b_2C16","t":"code","b":[202],"m":"dex","x":[11239,11246,11248,11262,11264]},{"a":11287,"t":"code","b":[16,200],"m":"bpl","oa":11233,"o":"b_2BE1"},{"a":11289,"t":"code","b":[44,113,12],"m":"bit","oa":3185,"o":"no_play_after_build"},{"a":11292,"t":"code","b":[48,11],"m":"bmi","oa":11305,"o":"b_2C29"},{"a":11294,"t":"code","b":[169,136],"m":"lda","o":"#$88"},{"a":11296,"t":"code","b":[157,0,1],"m":"sta","oa":256,"o":"obj_flags,x"},{"a":11299,"t":"code","b":[202],"m":"dex"},{"a":11300,"t":"code","b":[169,22],"m":"lda","o":"#$16"},{"a":11302,"t":"code","b":[157,0,1],"m":"sta","oa":256,"o":"obj_flags,x"},{"a":11305,"l":"b_2C29","t":"code","b":[76,98,44],"m":"jmp","oa":11362,"o":"store_tile_strip","x":[11292]},{"a":11308,"l":"b_2C2C","t":"code","b":[162,0],"m":"ldx","o":"#$00","x":[11229]},{"a":11310,"l":"b_2C2E","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[11354]},{"a":11312,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":11314,"t":"code","b":[189,0,173],"m":"lda","oa":44288,"o":"polygon_left_x,x"},{"a":11317,"t":"code","b":[24],"m":"clc"},{"a":11318,"t":"code","b":[125,1,173],"m":"adc","oa":44289,"o":"strip_tile_next,x"},{"a":11321,"t":"code","b":[144,3],"m":"bcc","oa":11326,"o":"b_2C3E"},{"a":11323,"t":"code","b":[24],"m":"clc"},{"a":11324,"t":"code","b":[230,117],"m":"inc","oa":117,"o":"tmp_u"},{"a":11326,"l":"b_2C3E","t":"code","b":[125,2,173],"m":"adc","oa":44290,"o":"strip_tile_next2,x","x":[11321]},{"a":11329,"t":"code","b":[144,3],"m":"bcc","oa":11334,"o":"b_2C46"},{"a":11331,"t":"code","b":[24],"m":"clc"},{"a":11332,"t":"code","b":[230,117],"m":"inc","oa":117,"o":"tmp_u"},{"a":11334,"l":"b_2C46","t":"code","b":[125,3,173],"m":"adc","oa":44291,"o":"strip_tile_next3,x","x":[11329]},{"a":11337,"t":"code","b":[144,3],"m":"bcc","oa":11342,"o":"b_2C4E"},{"a":11339,"t":"code","b":[24],"m":"clc"},{"a":11340,"t":"code","b":[230,117],"m":"inc","oa":117,"o":"tmp_u"},{"a":11342,"l":"b_2C4E","t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u","x":[11337]},{"a":11344,"t":"code","b":[106],"m":"ror","o":"a"},{"a":11345,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":11347,"t":"code","b":[106],"m":"ror","o":"a"},{"a":11348,"t":"code","b":[157,0,173],"m":"sta","oa":44288,"o":"polygon_left_x,x"},{"a":11351,"t":"code","b":[232],"m":"inx"},{"a":11352,"t":"code","b":[224,32],"m":"cpx","o":"#$20"},{"a":11354,"t":"code","b":[144,210],"m":"bcc","oa":11310,"o":"b_2C2E"},{"a":11356,"l":"set_cracker_seed","c":"Anti-cracker step at the end of the averaging pass of smooth_tile_strip (X = 32 here): copies $AD4E, the third seed number of the landscape, which is the high byte of its BCD number, into $0F3D, the operand of an LDA # at $0F3C in other code. check_cracker_seed and $18A4 read it back. Same as the BBC's SetCrackerSeed.","t":"code","b":[189,46,173],"m":"lda","oa":44334,"o":"strip_seed_copy_base,x"},{"a":11359,"t":"code","b":[157,29,15],"m":"sta","oa":3869,"o":"f_0F1D,x"},{"a":11362,"l":"store_tile_strip","c":"Last part of smooth_tile_strip: writes the 32 smoothed bytes from $AD00-$AD1F back into the row or column of tile corners they came from (bit 7 of $1C picks which), through point_at_tile. Also the landing point of the outlier pass ($2C29).","t":"code","b":[162,31],"m":"ldx","o":"#$1F","x":[11305]},{"a":11364,"l":"b_2C64","t":"code","b":[138],"m":"txa","x":[11385]},{"a":11365,"t":"code","b":[36,28],"m":"bit","oa":28,"o":"arc_right_yaw_or_action"},{"a":11367,"t":"code","b":[16,5],"m":"bpl","oa":11374,"o":"b_2C6E"},{"a":11369,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":11371,"t":"code","b":[76,112,44],"m":"jmp","oa":11376,"o":"j_2C70"},{"a":11374,"l":"b_2C6E","t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x","x":[11367]},{"a":11376,"l":"j_2C70","t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile","x":[11371]},{"a":11379,"t":"code","b":[189,0,173],"m":"lda","oa":44288,"o":"polygon_left_x,x"},{"a":11382,"t":"code","b":[145,94],"m":"sta","oa":94,"o":"(tile_ptr),y"},{"a":11384,"t":"code","b":[202],"m":"dex"},{"a":11385,"t":"code","b":[16,233],"m":"bpl","oa":11364,"o":"b_2C64"},{"a":11387,"t":"code","b":[96],"m":"rts"},{"a":11388,"l":"get_tile_shape","c":"Works out the shape number of the tile anchored at corner x = $24, z = $26 from the altitudes (low nibbles, at this stage) of its four corners: this one to $73, x+1 to $76, then x+1,z+1 to $75 and x,z+1 to $74. Comparing which corners are level and which higher gives X = 0 to 15 (0 flat; 12 for the irregular cases; 8 is never produced). $24 and $26 are left as they came in. Called by generate_landscape for each corner. Same decisions as the BBC's GetTileShape, with a tile load after each point_at_tile call.","t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile","x":[11013]},{"a":11391,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":11393,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":11395,"t":"code","b":[133,115],"m":"sta","oa":115,"o":"tmp_s"},{"a":11397,"t":"code","b":[230,36],"m":"inc","oa":36,"o":"tile_x"},{"a":11399,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":11402,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":11404,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":11406,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":11408,"t":"code","b":[230,38],"m":"inc","oa":38,"o":"tile_z"},{"a":11410,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":11413,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":11415,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":11417,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":11419,"t":"code","b":[198,36],"m":"dec","oa":36,"o":"tile_x"},{"a":11421,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":11424,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":11426,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":11428,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":11430,"t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z"},{"a":11432,"t":"code","b":[165,115],"m":"lda","oa":115,"o":"tmp_s"},{"a":11434,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":11436,"t":"code","b":[240,57],"m":"beq","oa":11495,"o":"b_2CE7"},{"a":11438,"t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t"},{"a":11440,"t":"code","b":[240,22],"m":"beq","oa":11464,"o":"b_2CC8"},{"a":11442,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":11444,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":11446,"t":"code","b":[240,3],"m":"beq","oa":11451,"o":"b_2CBB"},{"a":11448,"l":"b_2CB8","t":"code","b":[162,12],"m":"ldx","o":"#$0C","x":[11507]},{"a":11450,"t":"code","b":[96],"m":"rts"},{"a":11451,"l":"b_2CBB","t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t","x":[11446]},{"a":11453,"t":"code","b":[208,19],"m":"bne","oa":11474,"o":"b_2CD2"},{"a":11455,"t":"code","b":[162,2],"m":"ldx","o":"#$02"},{"a":11457,"t":"code","b":[197,115],"m":"cmp","oa":115,"o":"tmp_s"},{"a":11459,"t":"code","b":[176,2],"m":"bcs","oa":11463,"o":"r_2CC7"},{"a":11461,"t":"code","b":[162,11],"m":"ldx","o":"#$0B"},{"a":11463,"l":"r_2CC7","t":"code","b":[96],"m":"rts","x":[11459]},{"a":11464,"l":"b_2CC8","t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u","x":[11440]},{"a":11466,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":11468,"t":"code","b":[240,16],"m":"beq","oa":11486,"o":"b_2CDE"},{"a":11470,"t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t"},{"a":11472,"t":"code","b":[240,3],"m":"beq","oa":11477,"o":"b_2CD5"},{"a":11474,"l":"b_2CD2","t":"code","b":[162,4],"m":"ldx","o":"#$04","x":[11453]},{"a":11476,"t":"code","b":[96],"m":"rts"},{"a":11477,"l":"b_2CD5","t":"code","b":[162,14],"m":"ldx","o":"#$0E","x":[11472]},{"a":11479,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":11481,"t":"code","b":[144,2],"m":"bcc","oa":11485,"o":"r_2CDD"},{"a":11483,"t":"code","b":[162,7],"m":"ldx","o":"#$07"},{"a":11485,"l":"r_2CDD","t":"code","b":[96],"m":"rts","x":[11481]},{"a":11486,"l":"b_2CDE","t":"code","b":[162,5],"m":"ldx","o":"#$05","x":[11468]},{"a":11488,"t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t"},{"a":11490,"t":"code","b":[144,2],"m":"bcc","oa":11494,"o":"r_2CE6"},{"a":11492,"t":"code","b":[162,13],"m":"ldx","o":"#$0D"},{"a":11494,"l":"r_2CE6","t":"code","b":[96],"m":"rts","x":[11490]},{"a":11495,"l":"b_2CE7","t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t","x":[11436]},{"a":11497,"t":"code","b":[240,28],"m":"beq","oa":11527,"o":"b_2D07"},{"a":11499,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":11501,"t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t"},{"a":11503,"t":"code","b":[240,13],"m":"beq","oa":11518,"o":"b_2CFE"},{"a":11505,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":11507,"t":"code","b":[208,195],"m":"bne","oa":11448,"o":"b_2CB8"},{"a":11509,"t":"code","b":[162,6],"m":"ldx","o":"#$06"},{"a":11511,"t":"code","b":[197,116],"m":"cmp","oa":116,"o":"tmp_t"},{"a":11513,"t":"code","b":[144,2],"m":"bcc","oa":11517,"o":"r_2CFD"},{"a":11515,"t":"code","b":[162,15],"m":"ldx","o":"#$0F"},{"a":11517,"l":"r_2CFD","t":"code","b":[96],"m":"rts","x":[11513]},{"a":11518,"l":"b_2CFE","t":"code","b":[162,1],"m":"ldx","o":"#$01","x":[11503]},{"a":11520,"t":"code","b":[197,118],"m":"cmp","oa":118,"o":"tmp_v"},{"a":11522,"t":"code","b":[144,2],"m":"bcc","oa":11526,"o":"r_2D06"},{"a":11524,"t":"code","b":[162,9],"m":"ldx","o":"#$09"},{"a":11526,"l":"r_2D06","t":"code","b":[96],"m":"rts","x":[11522]},{"a":11527,"l":"b_2D07","t":"code","b":[197,117],"m":"cmp","oa":117,"o":"tmp_u","x":[11497]},{"a":11529,"t":"code","b":[240,7],"m":"beq","oa":11538,"o":"b_2D12"},{"a":11531,"t":"code","b":[162,10],"m":"ldx","o":"#$0A"},{"a":11533,"t":"code","b":[144,2],"m":"bcc","oa":11537,"o":"r_2D11"},{"a":11535,"t":"code","b":[162,3],"m":"ldx","o":"#$03"},{"a":11537,"l":"r_2D11","t":"code","b":[96],"m":"rts","x":[11533]},{"a":11538,"l":"b_2D12","t":"code","b":[162,0],"m":"ldx","o":"#$00","x":[11529]},{"a":11540,"t":"code","b":[96],"m":"rts"},{"a":11541,"l":"triangle_third_point","c":"Added (mod 64) to a triangle's first corner to get its third corner, indexed by $45 (the starting corner, 0 or 1) plus 2 for the second triangle: 1, 33, -1, 31. The corner numbers index the view's point tables, where +32 is the other row. Read at $2D60. Same values as the BBC's trianglePointAdd.","t":"byte","b":[1,33,255,31],"x":[11616]},{"a":11545,"l":"tile_face_colours","c":"Colour byte for each tile face, 32 entries. 0-15: the only or first face, by shape; 16-31: the second triangle. Bits 2-3 and 4-5 hold two colour numbers, the fill and the edge (the filler at $22E0-$22F1 copies the first over the second when bit 7 of $0C7A is set): entry 0 ($3C) is 3 and 3, one flat chequer; entry 8 ($00) is 0 and 0, the other (shape 8 never occurs). Loaded into $19 by draw_one_face_tile and draw_two_face_tile. Same values as the BBC's tileShapeColour; how the C64 filler turns the numbers into colours is not traced here.","t":"byte","b":[60,4,4,8,8,8,4,8],"x":[10845,10897,10910]},{"a":11553,"t":"byte","b":[0,4,8,4,4,8,8,4]},{"a":11561,"t":"byte","b":[0,0,8,4,8,0,8,4]},{"a":11569,"t":"byte","b":[0,0,4,8,4,0,4,8]},{"a":11577,"l":"triangle_first_point","c":"First corner (0 or 1) for drawing a two-triangle tile, by viewer-relative shape 0-15: 1 for shapes 6, 7, 14 and 15, else 0. Read into $45 by draw_sloping_tile. Same values as the BBC's triangleStart.","t":"byte","b":[0,0,0,0,0,0,1,1],"x":[10870]},{"a":11585,"t":"byte","b":[0,0,0,0,0,0,1,1]},{"a":11593,"l":"triangle_points","c":"Part of get_polygon_lines, entered by BMI at $2D72 for a tile drawn as two triangles. A = the rear-left corner number. For the second triangle (bit 6 of $3B) A moves diagonally (+33 mod 64) and Y = $45+2, else Y = $45. Corner list $0C40-$0C43 = A, A EOR 32, (A EOR 32) + triangle_third_point,Y mod 64, A again; then 3 edges.","t":"code","b":[164,69],"m":"ldy","oa":69,"o":"tile_first_point","x":[11634]},{"a":11595,"t":"code","b":[80,7],"m":"bvc","oa":11604,"o":"b_2D54"},{"a":11597,"t":"code","b":[24],"m":"clc"},{"a":11598,"t":"code","b":[105,33],"m":"adc","o":"#$21"},{"a":11600,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":11602,"t":"code","b":[200],"m":"iny"},{"a":11603,"t":"code","b":[200],"m":"iny"},{"a":11604,"l":"b_2D54","t":"code","b":[141,64,12],"m":"sta","oa":3136,"o":"face_point_0","x":[11595]},{"a":11607,"t":"code","b":[141,67,12],"m":"sta","oa":3139,"o":"face_point_3"},{"a":11610,"t":"code","b":[73,32],"m":"eor","o":"#$20"},{"a":11612,"t":"code","b":[141,65,12],"m":"sta","oa":3137,"o":"face_point_1"},{"a":11615,"t":"code","b":[24],"m":"clc"},{"a":11616,"t":"code","b":[121,21,45],"m":"adc","oa":11541,"o":"triangle_third_point,y"},{"a":11619,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":11621,"t":"code","b":[141,66,12],"m":"sta","oa":3138,"o":"face_point_2"},{"a":11624,"t":"code","b":[162,3],"m":"ldx","o":"#$03"},{"a":11626,"t":"code","b":[208,34],"m":"bne","oa":11662,"o":"b_2D8E"},{"a":11628,"l":"get_polygon_lines","c":"Turns one polygon into left and right x-coordinates for each line of the drawing buffer. The corners are numbers in the list at ($3C); for a tile the list is $0C40-$0C44 (pointer set at $264E), filled here from corner ($25 OR $05) as a four-sided face (4 edges in $17) or through triangle_points, while an object face comes with its list ready. Each corner's yaw ($0BA0/$A800) plus the origin ($29/$11), times 8, becomes its x in $A7A0, with a high byte in $0B40 when any x needs one (bit 6 of $6C). Each edge is then traced: from its higher end down, into $AD00 (edges whose later point is higher) or $AE00 (the others) at the offset of each y, through trace_polygon_edge, or split_long_edge when a delta needs two bytes. Level edges only widen $30/$31; a polygon of nothing but level edges becomes one line. $04/$06 end as the lowest and highest line. Returns carry clear if something is to be drawn. Same as the BBC's GetPolygonLines, with its tables moved ($5500 to $A800, $54A0 to $A7A0, $5A00/$5B00 to $AD00/$AE00).","t":"code","b":[165,37],"m":"lda","oa":37,"o":"tile_col_or_fill_count","x":[10927,10947]},{"a":11630,"t":"code","b":[5,5],"m":"ora","oa":5,"o":"draw_table_offset"},{"a":11632,"t":"code","b":[36,59],"m":"bit","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":11634,"t":"code","b":[48,213],"m":"bmi","oa":11593,"o":"triangle_points"},{"a":11636,"t":"code","b":[112,83],"m":"bvs","oa":11721,"o":"b_2DC9"},{"a":11638,"t":"code","b":[141,64,12],"m":"sta","oa":3136,"o":"face_point_0"},{"a":11641,"t":"code","b":[141,68,12],"m":"sta","oa":3140,"o":"face_point_4"},{"a":11644,"t":"code","b":[73,32],"m":"eor","o":"#$20"},{"a":11646,"t":"code","b":[141,65,12],"m":"sta","oa":3137,"o":"face_point_1"},{"a":11649,"t":"code","b":[24],"m":"clc"},{"a":11650,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":11652,"t":"code","b":[141,66,12],"m":"sta","oa":3138,"o":"face_point_2"},{"a":11655,"t":"code","b":[73,32],"m":"eor","o":"#$20"},{"a":11657,"t":"code","b":[141,67,12],"m":"sta","oa":3139,"o":"face_point_3"},{"a":11660,"t":"code","b":[162,4],"m":"ldx","o":"#$04"},{"a":11662,"l":"b_2D8E","t":"code","b":[134,23],"m":"stx","oa":23,"o":"edge_or_trace_count","x":[11626]},{"a":11664,"t":"code","b":[76,201,45],"m":"jmp","oa":11721,"o":"b_2DC9"},{"a":11667,"l":"b_2D93","t":"code","b":[169,192],"m":"lda","o":"#$C0","x":[11745]},{"a":11669,"t":"code","b":[133,108],"m":"sta","oa":108,"o":"poly_x_two_bytes"},{"a":11671,"t":"code","b":[164,23],"m":"ldy","oa":23,"o":"edge_or_trace_count"},{"a":11673,"l":"b_2D99","t":"code","b":[177,60],"m":"lda","oa":60,"o":"(coord_z_hi_or_points_ptr),y","x":[11716]},{"a":11675,"t":"code","b":[170],"m":"tax"},{"a":11676,"t":"code","b":[189,160,11],"m":"lda","oa":2976,"o":"draw_yaw_lo,x"},{"a":11679,"t":"code","b":[24],"m":"clc"},{"a":11680,"t":"code","b":[101,41],"m":"adc","oa":41,"o":"cur_buffer_origin_lo"},{"a":11682,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":11684,"t":"code","b":[189,0,168],"m":"lda","oa":43008,"o":"point_yaw_hi,x"},{"a":11687,"t":"code","b":[101,17],"m":"adc","oa":17,"o":"cur_buffer_origin_hi"},{"a":11689,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":11691,"t":"code","b":[42],"m":"rol","o":"a"},{"a":11692,"t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t"},{"a":11694,"t":"code","b":[42],"m":"rol","o":"a"},{"a":11695,"t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t"},{"a":11697,"t":"code","b":[42],"m":"rol","o":"a"},{"a":11698,"t":"code","b":[157,160,167],"m":"sta","oa":42912,"o":"point_screen_x_lo,x"},{"a":11701,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":11703,"t":"code","b":[42],"m":"rol","o":"a"},{"a":11704,"t":"code","b":[41,7],"m":"and","o":"#$07"},{"a":11706,"t":"code","b":[201,4],"m":"cmp","o":"#$04"},{"a":11708,"t":"code","b":[144,2],"m":"bcc","oa":11712,"o":"b_2DC0"},{"a":11710,"t":"code","b":[9,248],"m":"ora","o":"#$F8"},{"a":11712,"l":"b_2DC0","t":"code","b":[157,64,11],"m":"sta","oa":2880,"o":"draw_x_hi,x","x":[11708]},{"a":11715,"t":"code","b":[136],"m":"dey"},{"a":11716,"t":"code","b":[16,211],"m":"bpl","oa":11673,"o":"b_2D99"},{"a":11718,"t":"code","b":[76,242,45],"m":"jmp","oa":11762,"o":"j_2DF2"},{"a":11721,"l":"b_2DC9","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[11636,11664]},{"a":11723,"t":"code","b":[133,108],"m":"sta","oa":108,"o":"poly_x_two_bytes"},{"a":11725,"t":"code","b":[164,23],"m":"ldy","oa":23,"o":"edge_or_trace_count"},{"a":11727,"l":"b_2DCF","t":"code","b":[177,60],"m":"lda","oa":60,"o":"(coord_z_hi_or_points_ptr),y","x":[11760]},{"a":11729,"t":"code","b":[170],"m":"tax"},{"a":11730,"t":"code","b":[189,160,11],"m":"lda","oa":2976,"o":"draw_yaw_lo,x"},{"a":11733,"t":"code","b":[24],"m":"clc"},{"a":11734,"t":"code","b":[101,41],"m":"adc","oa":41,"o":"cur_buffer_origin_lo"},{"a":11736,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":11738,"t":"code","b":[189,0,168],"m":"lda","oa":43008,"o":"point_yaw_hi,x"},{"a":11741,"t":"code","b":[101,17],"m":"adc","oa":17,"o":"cur_buffer_origin_hi"},{"a":11743,"t":"code","b":[201,32],"m":"cmp","o":"#$20"},{"a":11745,"t":"code","b":[176,176],"m":"bcs","oa":11667,"o":"b_2D93"},{"a":11747,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":11749,"t":"code","b":[42],"m":"rol","o":"a"},{"a":11750,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":11752,"t":"code","b":[42],"m":"rol","o":"a"},{"a":11753,"t":"code","b":[6,116],"m":"asl","oa":116,"o":"tmp_t"},{"a":11755,"t":"code","b":[42],"m":"rol","o":"a"},{"a":11756,"t":"code","b":[157,160,167],"m":"sta","oa":42912,"o":"point_screen_x_lo,x"},{"a":11759,"t":"code","b":[136],"m":"dey"},{"a":11760,"t":"code","b":[16,221],"m":"bpl","oa":11727,"o":"b_2DCF"},{"a":11762,"l":"j_2DF2","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[11718]},{"a":11764,"t":"code","b":[133,6],"m":"sta","oa":6,"o":"tile_height_or_poly_top"},{"a":11766,"t":"code","b":[133,49],"m":"sta","oa":49,"o":"vec_z_lo_or_max_flat_x"},{"a":11768,"t":"code","b":[133,30],"m":"sta","oa":30,"o":"shared_counter_1E"},{"a":11770,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":11772,"t":"code","b":[133,4],"m":"sta","oa":4,"o":"poly_bottom_y"},{"a":11774,"t":"code","b":[133,48],"m":"sta","oa":48,"o":"vec_y_lo_or_min_flat_x"},{"a":11776,"t":"code","b":[133,127],"m":"sta","oa":127,"o":"tile_onscreen_or_skip_poly"},{"a":11778,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":11780,"l":"j_2E04","t":"code","b":[132,74],"m":"sty","oa":74,"o":"poly_side_index","x":[11923]},{"a":11782,"t":"code","b":[177,60],"m":"lda","oa":60,"o":"(coord_z_hi_or_points_ptr),y"},{"a":11784,"t":"code","b":[170],"m":"tax"},{"a":11785,"t":"code","b":[200],"m":"iny"},{"a":11786,"t":"code","b":[177,60],"m":"lda","oa":60,"o":"(coord_z_hi_or_points_ptr),y"},{"a":11788,"t":"code","b":[168],"m":"tay"},{"a":11789,"t":"code","b":[169,173],"m":"lda","o":"#$AD"},{"a":11791,"t":"code","b":[133,2],"m":"sta","oa":2,"o":"edge_frac_or_xlist_page"},{"a":11793,"t":"code","b":[185,128,10],"m":"lda","oa":2688,"o":"draw_pitch_lo,y"},{"a":11796,"t":"code","b":[56],"m":"sec"},{"a":11797,"t":"code","b":[253,128,10],"m":"sbc","oa":2688,"o":"draw_pitch_lo,x"},{"a":11800,"t":"code","b":[133,12],"m":"sta","oa":12,"o":"shared_0C"},{"a":11802,"t":"code","b":[185,224,10],"m":"lda","oa":2784,"o":"draw_pitch_hi,y"},{"a":11805,"t":"code","b":[253,224,10],"m":"sbc","oa":2784,"o":"draw_pitch_hi,x"},{"a":11808,"t":"code","b":[16,23],"m":"bpl","oa":11833,"o":"b_2E39"},{"a":11810,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":11812,"t":"code","b":[230,2],"m":"inc","oa":2,"o":"edge_frac_or_xlist_page"},{"a":11814,"t":"code","b":[134,116],"m":"stx","oa":116,"o":"tmp_t"},{"a":11816,"t":"code","b":[132,117],"m":"sty","oa":117,"o":"tmp_u"},{"a":11818,"t":"code","b":[166,117],"m":"ldx","oa":117,"o":"tmp_u"},{"a":11820,"t":"code","b":[164,116],"m":"ldy","oa":116,"o":"tmp_t"},{"a":11822,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":11824,"t":"code","b":[56],"m":"sec"},{"a":11825,"t":"code","b":[229,12],"m":"sbc","oa":12,"o":"shared_0C"},{"a":11827,"t":"code","b":[133,12],"m":"sta","oa":12,"o":"shared_0C"},{"a":11829,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":11831,"t":"code","b":[229,118],"m":"sbc","oa":118,"o":"tmp_v"},{"a":11833,"l":"b_2E39","t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v","x":[11808]},{"a":11835,"t":"code","b":[36,108],"m":"bit","oa":108,"o":"poly_x_two_bytes"},{"a":11837,"t":"code","b":[80,19],"m":"bvc","oa":11858,"o":"b_2E52"},{"a":11839,"t":"code","b":[185,64,11],"m":"lda","oa":2880,"o":"draw_x_hi,y"},{"a":11842,"t":"code","b":[29,64,11],"m":"ora","oa":2880,"o":"draw_x_hi,x"},{"a":11845,"t":"code","b":[240,11],"m":"beq","oa":11858,"o":"b_2E52"},{"a":11847,"t":"code","b":[165,118],"m":"lda","oa":118,"o":"tmp_v"},{"a":11849,"t":"code","b":[208,4],"m":"bne","oa":11855,"o":"b_2E4F"},{"a":11851,"t":"code","b":[165,12],"m":"lda","oa":12,"o":"shared_0C"},{"a":11853,"t":"code","b":[240,61],"m":"beq","oa":11916,"o":"b_2E8C"},{"a":11855,"l":"b_2E4F","t":"code","b":[76,2,48],"m":"jmp","oa":12290,"o":"split_long_edge","x":[11849]},{"a":11858,"l":"b_2E52","t":"code","b":[165,118],"m":"lda","oa":118,"o":"tmp_v","x":[11837,11845]},{"a":11860,"t":"code","b":[240,11],"m":"beq","oa":11873,"o":"b_2E61"},{"a":11862,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":11864,"t":"code","b":[153,64,11],"m":"sta","oa":2880,"o":"draw_x_hi,y"},{"a":11867,"t":"code","b":[157,64,11],"m":"sta","oa":2880,"o":"draw_x_hi,x"},{"a":11870,"t":"code","b":[76,2,48],"m":"jmp","oa":12290,"o":"split_long_edge"},{"a":11873,"l":"b_2E61","t":"code","b":[165,12],"m":"lda","oa":12,"o":"shared_0C","x":[11860]},{"a":11875,"t":"code","b":[240,103],"m":"beq","oa":11980,"o":"b_2ECC"},{"a":11877,"t":"code","b":[185,224,10],"m":"lda","oa":2784,"o":"draw_pitch_hi,y"},{"a":11880,"t":"code","b":[133,62],"m":"sta","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":11882,"t":"code","b":[185,128,10],"m":"lda","oa":2688,"o":"draw_pitch_lo,y"},{"a":11885,"t":"code","b":[133,26],"m":"sta","oa":26,"o":"shared_1A"},{"a":11887,"t":"code","b":[189,224,10],"m":"lda","oa":2784,"o":"draw_pitch_hi,x"},{"a":11890,"t":"code","b":[133,63],"m":"sta","oa":63,"o":"vec_pitch_lo_or_edge_y1_hi"},{"a":11892,"t":"code","b":[189,128,10],"m":"lda","oa":2688,"o":"draw_pitch_lo,x"},{"a":11895,"t":"code","b":[133,22],"m":"sta","oa":22,"o":"edge_end_y_lo"},{"a":11897,"t":"code","b":[185,160,167],"m":"lda","oa":42912,"o":"point_screen_x_lo,y"},{"a":11900,"t":"code","b":[133,24],"m":"sta","oa":24,"o":"shared_18"},{"a":11902,"t":"code","b":[189,160,167],"m":"lda","oa":42912,"o":"point_screen_x_lo,x"},{"a":11905,"t":"code","b":[133,57],"m":"sta","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":11907,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":11909,"t":"code","b":[133,65],"m":"sta","oa":65,"o":"edge_x_start_hi"},{"a":11911,"t":"code","b":[133,66],"m":"sta","oa":66,"o":"edge_x_end_hi"},{"a":11913,"t":"code","b":[32,228,46],"m":"jsr","oa":12004,"o":"trace_polygon_edge"},{"a":11916,"l":"b_2E8C","t":"code","b":[164,74],"m":"ldy","oa":74,"o":"poly_side_index","x":[11853,11997,12474]},{"a":11918,"t":"code","b":[200],"m":"iny"},{"a":11919,"t":"code","b":[196,23],"m":"cpy","oa":23,"o":"edge_or_trace_count"},{"a":11921,"t":"code","b":[240,3],"m":"beq","oa":11926,"o":"b_2E96"},{"a":11923,"t":"code","b":[76,4,46],"m":"jmp","oa":11780,"o":"j_2E04"},{"a":11926,"l":"b_2E96","t":"code","b":[165,30],"m":"lda","oa":30,"o":"shared_counter_1E","x":[11921]},{"a":11928,"t":"code","b":[197,23],"m":"cmp","oa":23,"o":"edge_or_trace_count"},{"a":11930,"t":"code","b":[208,34],"m":"bne","oa":11966,"o":"b_2EBE"},{"a":11932,"t":"code","b":[189,224,10],"m":"lda","oa":2784,"o":"draw_pitch_hi,x"},{"a":11935,"t":"code","b":[208,29],"m":"bne","oa":11966,"o":"b_2EBE"},{"a":11937,"t":"code","b":[188,128,10],"m":"ldy","oa":2688,"o":"draw_pitch_lo,x"},{"a":11940,"t":"code","b":[196,82],"m":"cpy","oa":82,"o":"buffer_bottom_pitch"},{"a":11942,"t":"code","b":[144,22],"m":"bcc","oa":11966,"o":"b_2EBE"},{"a":11944,"t":"code","b":[196,81],"m":"cpy","oa":81,"o":"buffer_top_pitch"},{"a":11946,"t":"code","b":[176,18],"m":"bcs","oa":11966,"o":"b_2EBE"},{"a":11948,"t":"code","b":[132,4],"m":"sty","oa":4,"o":"poly_bottom_y"},{"a":11950,"t":"code","b":[132,6],"m":"sty","oa":6,"o":"tile_height_or_poly_top"},{"a":11952,"t":"code","b":[165,48],"m":"lda","oa":48,"o":"vec_y_lo_or_min_flat_x"},{"a":11954,"t":"code","b":[153,0,173],"m":"sta","oa":44288,"o":"polygon_left_x,y"},{"a":11957,"t":"code","b":[165,49],"m":"lda","oa":49,"o":"vec_z_lo_or_max_flat_x"},{"a":11959,"t":"code","b":[153,0,174],"m":"sta","oa":44544,"o":"polygon_right_x,y"},{"a":11962,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":11964,"t":"code","b":[133,127],"m":"sta","oa":127,"o":"tile_onscreen_or_skip_poly"},{"a":11966,"l":"b_2EBE","t":"code","b":[165,127],"m":"lda","oa":127,"o":"tile_onscreen_or_skip_poly","x":[11930,11935,11942,11946]},{"a":11968,"t":"code","b":[208,8],"m":"bne","oa":11978,"o":"b_2ECA"},{"a":11970,"t":"code","b":[165,6],"m":"lda","oa":6,"o":"tile_height_or_poly_top"},{"a":11972,"t":"code","b":[197,4],"m":"cmp","oa":4,"o":"poly_bottom_y"},{"a":11974,"t":"code","b":[144,2],"m":"bcc","oa":11978,"o":"b_2ECA"},{"a":11976,"t":"code","b":[24],"m":"clc"},{"a":11977,"t":"code","b":[96],"m":"rts"},{"a":11978,"l":"b_2ECA","t":"code","b":[56],"m":"sec","x":[11968,11974]},{"a":11979,"t":"code","b":[96],"m":"rts"},{"a":11980,"l":"b_2ECC","t":"code","b":[189,160,167],"m":"lda","oa":42912,"o":"point_screen_x_lo,x","x":[11875]},{"a":11983,"t":"code","b":[197,49],"m":"cmp","oa":49,"o":"vec_z_lo_or_max_flat_x"},{"a":11985,"t":"code","b":[144,2],"m":"bcc","oa":11989,"o":"b_2ED5"},{"a":11987,"t":"code","b":[133,49],"m":"sta","oa":49,"o":"vec_z_lo_or_max_flat_x"},{"a":11989,"l":"b_2ED5","t":"code","b":[197,48],"m":"cmp","oa":48,"o":"vec_y_lo_or_min_flat_x","x":[11985]},{"a":11991,"t":"code","b":[176,2],"m":"bcs","oa":11995,"o":"b_2EDB"},{"a":11993,"t":"code","b":[133,48],"m":"sta","oa":48,"o":"vec_y_lo_or_min_flat_x"},{"a":11995,"l":"b_2EDB","t":"code","b":[230,30],"m":"inc","oa":30,"o":"shared_counter_1E","x":[11991]},{"a":11997,"t":"code","b":[76,140,46],"m":"jmp","oa":11916,"o":"b_2E8C"},{"a":12000,"l":"b_2EE0","t":"code","b":[76,189,48],"m":"jmp","oa":12477,"o":"trace_wide_edge","x":[12059]},{"a":12003,"l":"r_2EE3","t":"code","b":[96],"m":"rts","x":[12008,12014,12030,12038]},{"a":12004,"l":"trace_polygon_edge","c":"Traces one polygon edge from its start (x $41:$18, y $3E:$1A, the higher end) to its end (x $42:$39, y $3F:$16), writing an x for each line into the table whose page is in $02 ($AD left, $AE right). First it lowers $04 and raises $06 to cover the edge, clipped to the buffer's lines $52 to $51-1, and returns at once if the edge is wholly above or below. If either x has a high byte it goes to trace_wide_edge. Otherwise X = INX or DEX (opcode) by direction, $0D = |x delta|; a steep edge ($0D < $0C, the y delta) is traced here one line per step with a Bresenham-style error in A, storing every line; a shallow one goes to trace_shallow_edge. The loops are self-modified: the step opcode and the store address are written into the code. Leaves $7F = 0 once it has traced. Same as the BBC's TracePolygonEdge part 1-2.","t":"code","b":[165,63],"m":"lda","oa":63,"o":"vec_pitch_lo_or_edge_y1_hi","x":[11913,12419,12471]},{"a":12006,"t":"code","b":[48,16],"m":"bmi","oa":12024,"o":"b_2EF8"},{"a":12008,"t":"code","b":[208,249],"m":"bne","oa":12003,"o":"r_2EE3"},{"a":12010,"t":"code","b":[165,22],"m":"lda","oa":22,"o":"edge_end_y_lo"},{"a":12012,"t":"code","b":[197,81],"m":"cmp","oa":81,"o":"buffer_top_pitch"},{"a":12014,"t":"code","b":[176,243],"m":"bcs","oa":12003,"o":"r_2EE3"},{"a":12016,"t":"code","b":[197,4],"m":"cmp","oa":4,"o":"poly_bottom_y"},{"a":12018,"t":"code","b":[176,8],"m":"bcs","oa":12028,"o":"b_2EFC"},{"a":12020,"t":"code","b":[197,82],"m":"cmp","oa":82,"o":"buffer_bottom_pitch"},{"a":12022,"t":"code","b":[176,2],"m":"bcs","oa":12026,"o":"b_2EFA"},{"a":12024,"l":"b_2EF8","t":"code","b":[165,82],"m":"lda","oa":82,"o":"buffer_bottom_pitch","x":[12006]},{"a":12026,"l":"b_2EFA","t":"code","b":[133,4],"m":"sta","oa":4,"o":"poly_bottom_y","x":[12022]},{"a":12028,"l":"b_2EFC","t":"code","b":[165,62],"m":"lda","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi","x":[12018]},{"a":12030,"t":"code","b":[48,227],"m":"bmi","oa":12003,"o":"r_2EE3"},{"a":12032,"t":"code","b":[208,14],"m":"bne","oa":12048,"o":"b_2F10"},{"a":12034,"t":"code","b":[165,26],"m":"lda","oa":26,"o":"shared_1A"},{"a":12036,"t":"code","b":[197,82],"m":"cmp","oa":82,"o":"buffer_bottom_pitch"},{"a":12038,"t":"code","b":[144,219],"m":"bcc","oa":12003,"o":"r_2EE3"},{"a":12040,"t":"code","b":[197,6],"m":"cmp","oa":6,"o":"tile_height_or_poly_top"},{"a":12042,"t":"code","b":[144,11],"m":"bcc","oa":12055,"o":"b_2F17"},{"a":12044,"t":"code","b":[197,81],"m":"cmp","oa":81,"o":"buffer_top_pitch"},{"a":12046,"t":"code","b":[144,5],"m":"bcc","oa":12053,"o":"b_2F15"},{"a":12048,"l":"b_2F10","t":"code","b":[165,81],"m":"lda","oa":81,"o":"buffer_top_pitch","x":[12032]},{"a":12050,"t":"code","b":[56],"m":"sec"},{"a":12051,"t":"code","b":[233,1],"m":"sbc","o":"#$01"},{"a":12053,"l":"b_2F15","t":"code","b":[133,6],"m":"sta","oa":6,"o":"tile_height_or_poly_top","x":[12046]},{"a":12055,"l":"b_2F17","t":"code","b":[165,65],"m":"lda","oa":65,"o":"edge_x_start_hi","x":[12042]},{"a":12057,"t":"code","b":[5,66],"m":"ora","oa":66,"o":"edge_x_end_hi"},{"a":12059,"t":"code","b":[208,195],"m":"bne","oa":12000,"o":"b_2EE0"},{"a":12061,"t":"code","b":[165,24],"m":"lda","oa":24,"o":"shared_18"},{"a":12063,"t":"code","b":[56],"m":"sec"},{"a":12064,"t":"code","b":[229,57],"m":"sbc","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":12066,"t":"code","b":[176,11],"m":"bcs","oa":12079,"o":"b_2F2F"},{"a":12068,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":12070,"t":"code","b":[24],"m":"clc"},{"a":12071,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":12073,"t":"code","b":[133,13],"m":"sta","oa":13,"o":"shared_0D"},{"a":12075,"t":"code","b":[162,232],"m":"ldx","o":"#$E8"},{"a":12077,"t":"code","b":[208,4],"m":"bne","oa":12083,"o":"b_2F33"},{"a":12079,"l":"b_2F2F","t":"code","b":[133,13],"m":"sta","oa":13,"o":"shared_0D","x":[12066]},{"a":12081,"t":"code","b":[162,202],"m":"ldx","o":"#$CA"},{"a":12083,"l":"b_2F33","t":"code","b":[164,13],"m":"ldy","oa":13,"o":"shared_0D","x":[12077]},{"a":12085,"t":"code","b":[196,12],"m":"cpy","oa":12,"o":"shared_0C"},{"a":12087,"t":"code","b":[164,26],"m":"ldy","oa":26,"o":"shared_1A"},{"a":12089,"t":"code","b":[165,2],"m":"lda","oa":2,"o":"edge_frac_or_xlist_page"},{"a":12091,"t":"code","b":[176,52],"m":"bcs","oa":12145,"o":"trace_shallow_edge"},{"a":12093,"t":"code","b":[141,97,47],"m":"sta","oa":12129,"o":"smc_steep_table"},{"a":12096,"t":"code","b":[140,96,47],"m":"sty","oa":12128,"o":"smc_steep_line"},{"a":12099,"t":"code","b":[142,94,47],"m":"stx","oa":12126,"o":"smc_steep_xstep"},{"a":12102,"t":"code","b":[164,12],"m":"ldy","oa":12,"o":"shared_0C"},{"a":12104,"t":"code","b":[200],"m":"iny"},{"a":12105,"t":"code","b":[165,12],"m":"lda","oa":12,"o":"shared_0C"},{"a":12107,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":12108,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":12110,"t":"code","b":[24],"m":"clc"},{"a":12111,"t":"code","b":[166,62],"m":"ldx","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":12113,"t":"code","b":[208,99],"m":"bne","oa":12214,"o":"skip_steep_offscreen"},{"a":12115,"t":"code","b":[166,24],"m":"ldx","oa":24,"o":"shared_18"},{"a":12117,"t":"code","b":[76,95,47],"m":"jmp","oa":12127,"o":"j_2F5F"},{"a":12120,"l":"b_2F58","t":"code","b":[101,13],"m":"adc","oa":13,"o":"shared_0D","x":[12136]},{"a":12122,"t":"code","b":[144,3],"m":"bcc","oa":12127,"o":"j_2F5F"},{"a":12124,"t":"code","b":[229,12],"m":"sbc","oa":12,"o":"shared_0C"},{"a":12126,"l":"smc_steep_xstep","c":"Self-modified opcode: the x step of the steep-edge loop, INX ($E8) or DEX ($CA), written by $2F43; skip_steep_offscreen copies it to $2FCA. The STX that follows stores X at the line given by $2F60 in the page given by $2F61.","t":"code","b":[232],"m":"inx","x":[12099,12217]},{"a":12127,"l":"j_2F5F","t":"code","b":[142,119,174],"m":"stx","oa":44663,"o":"a_AE77","x":[12117,12122]},{"a":12128,"t":"note","l":"smc_steep_line","c":"Self-modified operand, low byte of the steep loop's STX: the current line, set to the edge's start y by $2F40, lowered by $2F62 (and $2FCB, $2FD6) each line and raised once by $2FB6; reaching 0 ends the edge.","note":"inside the item at $2F5F","x":[12096,12130,12214,12235,12246]},{"a":12129,"t":"note","l":"smc_steep_table","c":"Self-modified operand, high byte of the steep loop's STX: $AD or $AE, the left or right edge table, written by $2F3D from $02. The rest of this span is the loop's count (Y), the finish at $2F6A (Y = 0 to $7F, drawn) and $2F6D.","note":"inside the item at $2F5F","x":[12093]},{"a":12130,"t":"code","b":[206,96,47],"m":"dec","oa":12128,"o":"smc_steep_line"},{"a":12133,"t":"code","b":[240,6],"m":"beq","oa":12141,"o":"b_2F6D"},{"a":12135,"l":"j_2F67","t":"code","b":[136],"m":"dey","x":[12249]},{"a":12136,"t":"code","b":[208,238],"m":"bne","oa":12120,"o":"b_2F58"},{"a":12138,"l":"b_2F6A","t":"code","b":[132,127],"m":"sty","oa":127,"o":"tile_onscreen_or_skip_poly","x":[12143,12211]},{"a":12140,"l":"r_2F6C","t":"code","b":[96],"m":"rts","x":[12243,12281,12587,12594,12677,12684]},{"a":12141,"l":"b_2F6D","t":"code","b":[160,0],"m":"ldy","o":"#$00","x":[12133,12203]},{"a":12143,"t":"code","b":[240,249],"m":"beq","oa":12138,"o":"b_2F6A"},{"a":12145,"l":"trace_shallow_edge","c":"Shallow edge (x delta >= y delta): steps x one pixel at a time and y when the error overflows. Patches the store at $2FAD (line $2FAE, page $2FAF) and the step at $2FA1. It also chooses the branch distance at $2FA5 so each line keeps its outermost x: 7 stores after every step (the last x on a line wins; left table with DEX, right table with INX), 10 only when a new line starts (the first x wins; left with INX, right with DEX). An edge starting above the buffer goes to skip_shallow_offscreen. The BBC's TracePolygonEdge part 3.","t":"code","b":[141,175,47],"m":"sta","oa":12207,"o":"smc_shallow_table","x":[12091]},{"a":12148,"t":"code","b":[140,174,47],"m":"sty","oa":12206,"o":"smc_shallow_line"},{"a":12151,"t":"code","b":[142,161,47],"m":"stx","oa":12193,"o":"smc_shallow_xstep"},{"a":12154,"t":"code","b":[160,7],"m":"ldy","o":"#$07"},{"a":12156,"t":"code","b":[201,173],"m":"cmp","o":"#$AD"},{"a":12158,"t":"code","b":[240,6],"m":"beq","oa":12166,"o":"b_2F86"},{"a":12160,"t":"code","b":[224,202],"m":"cpx","o":"#$CA"},{"a":12162,"t":"code","b":[240,6],"m":"beq","oa":12170,"o":"b_2F8A"},{"a":12164,"t":"code","b":[208,6],"m":"bne","oa":12172,"o":"b_2F8C"},{"a":12166,"l":"b_2F86","t":"code","b":[224,202],"m":"cpx","o":"#$CA","x":[12158]},{"a":12168,"t":"code","b":[240,2],"m":"beq","oa":12172,"o":"b_2F8C"},{"a":12170,"l":"b_2F8A","t":"code","b":[160,10],"m":"ldy","o":"#$0A","x":[12162]},{"a":12172,"l":"b_2F8C","t":"code","b":[140,165,47],"m":"sty","oa":12197,"o":"smc_shallow_skip","x":[12164,12168]},{"a":12175,"t":"code","b":[164,13],"m":"ldy","oa":13,"o":"shared_0D"},{"a":12177,"t":"code","b":[200],"m":"iny"},{"a":12178,"t":"code","b":[165,13],"m":"lda","oa":13,"o":"shared_0D"},{"a":12180,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":12181,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":12183,"t":"code","b":[24],"m":"clc"},{"a":12184,"t":"code","b":[166,62],"m":"ldx","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":12186,"t":"code","b":[208,64],"m":"bne","oa":12252,"o":"skip_shallow_offscreen"},{"a":12188,"t":"code","b":[166,24],"m":"ldx","oa":24,"o":"shared_18"},{"a":12190,"t":"code","b":[76,173,47],"m":"jmp","oa":12205,"o":"j_2FAD"},{"a":12193,"l":"smc_shallow_xstep","c":"Self-modified opcode: the x step of the shallow-edge loop, DEX ($CA) or INX ($E8), written by $2F77; skip_shallow_offscreen copies it to $2FEA.","t":"code","b":[202],"m":"dex","x":[12151,12209,12255]},{"a":12194,"t":"code","b":[101,12],"m":"adc","oa":12,"o":"shared_0C"},{"a":12196,"t":"code","b":[144,7],"m":"bcc","oa":12205,"o":"j_2FAD"},{"a":12197,"t":"note","l":"smc_shallow_skip","c":"Self-modified branch offset of the BCC at $2FA4, written by $2F8C: 7 goes to the store at $2FAD on every step, 10 skips to $2FB0 unless the line changed. The snapshot holds 7 (the BBC listing assembles 10); either is overwritten before use.","note":"inside the item at $2FA4","x":[12172]},{"a":12198,"t":"code","b":[229,13],"m":"sbc","oa":13,"o":"shared_0D"},{"a":12200,"t":"code","b":[206,174,47],"m":"dec","oa":12206,"o":"smc_shallow_line"},{"a":12203,"t":"code","b":[240,192],"m":"beq","oa":12141,"o":"b_2F6D"},{"a":12205,"l":"j_2FAD","t":"code","b":[142,124,173],"m":"stx","oa":44412,"o":"a_AD7C","x":[12190,12196]},{"a":12206,"t":"note","l":"smc_shallow_line","c":"Self-modified operand, low byte of the shallow loop's STX at $2FAD: the current line, set to the start y by $2F74 and lowered by $2FA8 and $2FF1 as y steps; 0 ends the edge. $2FDC raises it by one first.","note":"inside the item at $2FAD","x":[12148,12200,12252,12273,12284]},{"a":12207,"t":"note","l":"smc_shallow_table","c":"Self-modified operand, high byte of the shallow loop's STX: $AD or $AE, the left or right edge table, written by $2F71. Followed by the loop's end (DEY, BNE $2FA1) and the jump to the common finish at $2F6A.","note":"inside the item at $2FAD","x":[12145]},{"a":12208,"l":"j_2FB0","t":"code","b":[136],"m":"dey","x":[12287]},{"a":12209,"t":"code","b":[208,238],"m":"bne","oa":12193,"o":"smc_shallow_xstep"},{"a":12211,"t":"code","b":[76,106,47],"m":"jmp","oa":12138,"o":"b_2F6A"},{"a":12214,"l":"skip_steep_offscreen","c":"Steep edge that starts above the buffer ($3E not 0): runs the same stepping as the steep loop without storing, with the x step copied from $2F5E into $2FCA, until the line byte at $2F60 comes down through 0, then rejoins the storing loop at $2F67. The first INC balances the extra decrement. The BBC's TracePolygonEdge part 4.","t":"code","b":[238,96,47],"m":"inc","oa":12128,"o":"smc_steep_line","x":[12113]},{"a":12217,"t":"code","b":[174,94,47],"m":"ldx","oa":12126,"o":"smc_steep_xstep"},{"a":12220,"t":"code","b":[142,202,47],"m":"stx","oa":12234,"o":"smc_steep_xstep_off"},{"a":12223,"t":"code","b":[166,24],"m":"ldx","oa":24,"o":"shared_18"},{"a":12225,"t":"code","b":[76,203,47],"m":"jmp","oa":12235,"o":"j_2FCB"},{"a":12228,"l":"b_2FC4","t":"code","b":[101,13],"m":"adc","oa":13,"o":"shared_0D","x":[12241]},{"a":12230,"t":"code","b":[144,3],"m":"bcc","oa":12235,"o":"j_2FCB"},{"a":12232,"t":"code","b":[229,12],"m":"sbc","oa":12,"o":"shared_0C"},{"a":12234,"l":"smc_steep_xstep_off","c":"Self-modified opcode: x step (INX or DEX) of the off-screen steep loop, copied from $2F5E by $2FBC.","t":"code","b":[232],"m":"inx","x":[12220]},{"a":12235,"l":"j_2FCB","t":"code","b":[206,96,47],"m":"dec","oa":12128,"o":"smc_steep_line","x":[12225,12230]},{"a":12238,"t":"code","b":[240,6],"m":"beq","oa":12246,"o":"b_2FD6"},{"a":12240,"t":"code","b":[136],"m":"dey"},{"a":12241,"t":"code","b":[208,241],"m":"bne","oa":12228,"o":"b_2FC4"},{"a":12243,"t":"code","b":[76,108,47],"m":"jmp","oa":12140,"o":"r_2F6C"},{"a":12246,"l":"b_2FD6","t":"code","b":[206,96,47],"m":"dec","oa":12128,"o":"smc_steep_line","x":[12238]},{"a":12249,"t":"code","b":[76,103,47],"m":"jmp","oa":12135,"o":"j_2F67"},{"a":12252,"l":"skip_shallow_offscreen","c":"Shallow edge that starts above the buffer: steps x without storing, with the x step copied from $2FA1 into $2FEA and the line byte $2FAE counting down, until the edge reaches the buffer; then rejoins the storing loop at $2FB0. The BBC's TracePolygonEdge part 5.","t":"code","b":[238,174,47],"m":"inc","oa":12206,"o":"smc_shallow_line","x":[12186]},{"a":12255,"t":"code","b":[174,161,47],"m":"ldx","oa":12193,"o":"smc_shallow_xstep"},{"a":12258,"t":"code","b":[142,234,47],"m":"stx","oa":12266,"o":"smc_shallow_xstep_off"},{"a":12261,"t":"code","b":[166,24],"m":"ldx","oa":24,"o":"shared_18"},{"a":12263,"t":"code","b":[76,246,47],"m":"jmp","oa":12278,"o":"j_2FF6"},{"a":12266,"l":"smc_shallow_xstep_off","c":"Self-modified opcode: x step (INX or DEX) of the off-screen shallow loop, copied from $2FA1 by $2FE2. The loop ends in jumps to the common finish at $2F6C and $2FB0.","t":"code","b":[232],"m":"inx","x":[12258,12279]},{"a":12267,"t":"code","b":[101,12],"m":"adc","oa":12,"o":"shared_0C"},{"a":12269,"t":"code","b":[144,7],"m":"bcc","oa":12278,"o":"j_2FF6"},{"a":12271,"t":"code","b":[229,13],"m":"sbc","oa":13,"o":"shared_0D"},{"a":12273,"t":"code","b":[206,174,47],"m":"dec","oa":12206,"o":"smc_shallow_line"},{"a":12276,"t":"code","b":[240,6],"m":"beq","oa":12284,"o":"b_2FFC"},{"a":12278,"l":"j_2FF6","t":"code","b":[136],"m":"dey","x":[12263,12269]},{"a":12279,"t":"code","b":[208,241],"m":"bne","oa":12266,"o":"smc_shallow_xstep_off"},{"a":12281,"t":"code","b":[76,108,47],"m":"jmp","oa":12140,"o":"r_2F6C"},{"a":12284,"l":"b_2FFC","t":"code","b":[206,174,47],"m":"dec","oa":12206,"o":"smc_shallow_line","x":[12276]},{"a":12287,"t":"code","b":[76,176,47],"m":"jmp","oa":12208,"o":"j_2FB0"},{"a":12290,"l":"split_long_edge","c":"Part of get_polygon_lines for an edge whose deltas do not fit in a byte (x beyond 255, or a y delta of 256 or more): halves the x delta ($75:$74, from $A7A0/$0B40) and y delta ($76:$0C) together, counting the halvings as 2^n-1 in $40, until both fit and neither low byte is $FF. Then it walks the edge in 2^n equal sections from the higher end, each traced by trace_polygon_edge, the last ending exactly on the end point (from $0E), and returns to the edge loop at $2E8C. Same as the BBC's GetPolygonLines part 6.","t":"code","b":[134,14],"m":"stx","oa":14,"o":"point_x_save","x":[11855,11870]},{"a":12292,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":12294,"t":"code","b":[133,64],"m":"sta","oa":64,"o":"vec_pitch_hi_or_edge_scale"},{"a":12296,"t":"code","b":[185,160,167],"m":"lda","oa":42912,"o":"point_screen_x_lo,y"},{"a":12299,"t":"code","b":[56],"m":"sec"},{"a":12300,"t":"code","b":[253,160,167],"m":"sbc","oa":42912,"o":"point_screen_x_lo,x"},{"a":12303,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":12305,"t":"code","b":[185,64,11],"m":"lda","oa":2880,"o":"draw_x_hi,y"},{"a":12308,"t":"code","b":[253,64,11],"m":"sbc","oa":2880,"o":"draw_x_hi,x"},{"a":12311,"t":"code","b":[133,10],"m":"sta","oa":10,"o":"point_dx_hi"},{"a":12313,"t":"code","b":[32,7,16],"m":"jsr","oa":4103,"o":"apply_sign16"},{"a":12316,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":12318,"t":"code","b":[5,118],"m":"ora","oa":118,"o":"tmp_v"},{"a":12320,"t":"code","b":[240,14],"m":"beq","oa":12336,"o":"b_3030"},{"a":12322,"l":"b_3022","t":"code","b":[70,118],"m":"lsr","oa":118,"o":"tmp_v","x":[12334,12340,12346]},{"a":12324,"t":"code","b":[102,12],"m":"ror","oa":12,"o":"shared_0C"},{"a":12326,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":12328,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":12330,"t":"code","b":[56],"m":"sec"},{"a":12331,"t":"code","b":[38,64],"m":"rol","oa":64,"o":"vec_pitch_hi_or_edge_scale"},{"a":12333,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":12334,"t":"code","b":[208,242],"m":"bne","oa":12322,"o":"b_3022"},{"a":12336,"l":"b_3030","t":"code","b":[166,12],"m":"ldx","oa":12,"o":"shared_0C","x":[12320]},{"a":12338,"t":"code","b":[224,255],"m":"cpx","o":"#$FF"},{"a":12340,"t":"code","b":[240,236],"m":"beq","oa":12322,"o":"b_3022"},{"a":12342,"t":"code","b":[166,116],"m":"ldx","oa":116,"o":"tmp_t"},{"a":12344,"t":"code","b":[224,255],"m":"cpx","o":"#$FF"},{"a":12346,"t":"code","b":[240,230],"m":"beq","oa":12322,"o":"b_3022"},{"a":12348,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":12350,"t":"code","b":[36,10],"m":"bit","oa":10,"o":"point_dx_hi"},{"a":12352,"t":"code","b":[32,7,16],"m":"jsr","oa":4103,"o":"apply_sign16"},{"a":12355,"t":"code","b":[133,67],"m":"sta","oa":67,"o":"edge_dx_hi"},{"a":12357,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":12359,"t":"code","b":[133,58],"m":"sta","oa":58,"o":"coord_x_hi_or_dx_lo"},{"a":12361,"t":"code","b":[185,160,167],"m":"lda","oa":42912,"o":"point_screen_x_lo,y"},{"a":12364,"t":"code","b":[133,57],"m":"sta","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":12366,"t":"code","b":[185,64,11],"m":"lda","oa":2880,"o":"draw_x_hi,y"},{"a":12369,"t":"code","b":[133,66],"m":"sta","oa":66,"o":"edge_x_end_hi"},{"a":12371,"t":"code","b":[185,224,10],"m":"lda","oa":2784,"o":"draw_pitch_hi,y"},{"a":12374,"t":"code","b":[133,63],"m":"sta","oa":63,"o":"vec_pitch_lo_or_edge_y1_hi"},{"a":12376,"t":"code","b":[185,128,10],"m":"lda","oa":2688,"o":"draw_pitch_lo,y"},{"a":12379,"t":"code","b":[133,22],"m":"sta","oa":22,"o":"edge_end_y_lo"},{"a":12381,"t":"code","b":[165,64],"m":"lda","oa":64,"o":"vec_pitch_hi_or_edge_scale"},{"a":12383,"t":"code","b":[240,41],"m":"beq","oa":12426,"o":"b_308A"},{"a":12385,"l":"b_3061","t":"code","b":[165,22],"m":"lda","oa":22,"o":"edge_end_y_lo","x":[12424]},{"a":12387,"t":"code","b":[133,26],"m":"sta","oa":26,"o":"shared_1A"},{"a":12389,"t":"code","b":[56],"m":"sec"},{"a":12390,"t":"code","b":[229,12],"m":"sbc","oa":12,"o":"shared_0C"},{"a":12392,"t":"code","b":[133,22],"m":"sta","oa":22,"o":"edge_end_y_lo"},{"a":12394,"t":"code","b":[165,63],"m":"lda","oa":63,"o":"vec_pitch_lo_or_edge_y1_hi"},{"a":12396,"t":"code","b":[133,62],"m":"sta","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":12398,"t":"code","b":[233,0],"m":"sbc","o":"#$00"},{"a":12400,"t":"code","b":[133,63],"m":"sta","oa":63,"o":"vec_pitch_lo_or_edge_y1_hi"},{"a":12402,"t":"code","b":[165,57],"m":"lda","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":12404,"t":"code","b":[133,24],"m":"sta","oa":24,"o":"shared_18"},{"a":12406,"t":"code","b":[56],"m":"sec"},{"a":12407,"t":"code","b":[229,58],"m":"sbc","oa":58,"o":"coord_x_hi_or_dx_lo"},{"a":12409,"t":"code","b":[133,57],"m":"sta","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":12411,"t":"code","b":[165,66],"m":"lda","oa":66,"o":"edge_x_end_hi"},{"a":12413,"t":"code","b":[133,65],"m":"sta","oa":65,"o":"edge_x_start_hi"},{"a":12415,"t":"code","b":[229,67],"m":"sbc","oa":67,"o":"edge_dx_hi"},{"a":12417,"t":"code","b":[133,66],"m":"sta","oa":66,"o":"edge_x_end_hi"},{"a":12419,"t":"code","b":[32,228,46],"m":"jsr","oa":12004,"o":"trace_polygon_edge"},{"a":12422,"t":"code","b":[198,64],"m":"dec","oa":64,"o":"vec_pitch_hi_or_edge_scale"},{"a":12424,"t":"code","b":[208,215],"m":"bne","oa":12385,"o":"b_3061"},{"a":12426,"l":"b_308A","t":"code","b":[165,22],"m":"lda","oa":22,"o":"edge_end_y_lo","x":[12383]},{"a":12428,"t":"code","b":[133,26],"m":"sta","oa":26,"o":"shared_1A"},{"a":12430,"t":"code","b":[165,63],"m":"lda","oa":63,"o":"vec_pitch_lo_or_edge_y1_hi"},{"a":12432,"t":"code","b":[133,62],"m":"sta","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":12434,"t":"code","b":[165,57],"m":"lda","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":12436,"t":"code","b":[133,24],"m":"sta","oa":24,"o":"shared_18"},{"a":12438,"t":"code","b":[165,66],"m":"lda","oa":66,"o":"edge_x_end_hi"},{"a":12440,"t":"code","b":[133,65],"m":"sta","oa":65,"o":"edge_x_start_hi"},{"a":12442,"t":"code","b":[166,14],"m":"ldx","oa":14,"o":"point_x_save"},{"a":12444,"t":"code","b":[189,128,10],"m":"lda","oa":2688,"o":"draw_pitch_lo,x"},{"a":12447,"t":"code","b":[133,22],"m":"sta","oa":22,"o":"edge_end_y_lo"},{"a":12449,"t":"code","b":[189,224,10],"m":"lda","oa":2784,"o":"draw_pitch_hi,x"},{"a":12452,"t":"code","b":[133,63],"m":"sta","oa":63,"o":"vec_pitch_lo_or_edge_y1_hi"},{"a":12454,"t":"code","b":[189,160,167],"m":"lda","oa":42912,"o":"point_screen_x_lo,x"},{"a":12457,"t":"code","b":[133,57],"m":"sta","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":12459,"t":"code","b":[189,64,11],"m":"lda","oa":2880,"o":"draw_x_hi,x"},{"a":12462,"t":"code","b":[133,66],"m":"sta","oa":66,"o":"edge_x_end_hi"},{"a":12464,"t":"code","b":[165,26],"m":"lda","oa":26,"o":"shared_1A"},{"a":12466,"t":"code","b":[56],"m":"sec"},{"a":12467,"t":"code","b":[229,22],"m":"sbc","oa":22,"o":"edge_end_y_lo"},{"a":12469,"t":"code","b":[133,12],"m":"sta","oa":12,"o":"shared_0C"},{"a":12471,"t":"code","b":[32,228,46],"m":"jsr","oa":12004,"o":"trace_polygon_edge"},{"a":12474,"t":"code","b":[76,140,46],"m":"jmp","oa":11916,"o":"b_2E8C"},{"a":12477,"l":"trace_wide_edge","c":"Traces an edge whose start or end x has a high byte (off the left or right of the 0-255 range). $0D = |x delta| (low byte), and by direction: X = INX or DEX, $76 = the low byte at which the high byte changes (0 or $FF), $74 = INC or DEC zero-page opcode for the high byte $41. A steep edge is traced from here: patches the store at $311F (line $3120 from $1A, one more if $3E is not 0; page $3121 from $02), the step $3119 and the high-byte step $3140; a shallow one goes to trace_wide_shallow. set_edge_store_op picks STX, STY or BIT for the store as the x high byte changes. Same as the BBC's TracePolygonEdge part 6-7.","t":"code","b":[165,24],"m":"lda","oa":24,"o":"shared_18","x":[12000]},{"a":12479,"t":"code","b":[56],"m":"sec"},{"a":12480,"t":"code","b":[229,57],"m":"sbc","oa":57,"o":"coord_z_lo_or_edge_x_end"},{"a":12482,"t":"code","b":[133,13],"m":"sta","oa":13,"o":"shared_0D"},{"a":12484,"t":"code","b":[165,65],"m":"lda","oa":65,"o":"edge_x_start_hi"},{"a":12486,"t":"code","b":[229,66],"m":"sbc","oa":66,"o":"edge_x_end_hi"},{"a":12488,"t":"code","b":[16,16],"m":"bpl","oa":12506,"o":"b_30DA"},{"a":12490,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":12492,"t":"code","b":[56],"m":"sec"},{"a":12493,"t":"code","b":[229,13],"m":"sbc","oa":13,"o":"shared_0D"},{"a":12495,"t":"code","b":[133,13],"m":"sta","oa":13,"o":"shared_0D"},{"a":12497,"t":"code","b":[162,232],"m":"ldx","o":"#$E8"},{"a":12499,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":12501,"t":"code","b":[160,230],"m":"ldy","o":"#$E6"},{"a":12503,"t":"code","b":[76,224,48],"m":"jmp","oa":12512,"o":"j_30E0"},{"a":12506,"l":"b_30DA","t":"code","b":[162,202],"m":"ldx","o":"#$CA","x":[12488]},{"a":12508,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":12510,"t":"code","b":[160,198],"m":"ldy","o":"#$C6"},{"a":12512,"l":"j_30E0","t":"code","b":[132,116],"m":"sty","oa":116,"o":"tmp_t","x":[12503]},{"a":12514,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":12516,"t":"code","b":[164,13],"m":"ldy","oa":13,"o":"shared_0D"},{"a":12518,"t":"code","b":[196,12],"m":"cpy","oa":12,"o":"shared_0C"},{"a":12520,"t":"code","b":[164,26],"m":"ldy","oa":26,"o":"shared_1A"},{"a":12522,"t":"code","b":[165,2],"m":"lda","oa":2,"o":"edge_frac_or_xlist_page"},{"a":12524,"t":"code","b":[176,90],"m":"bcs","oa":12616,"o":"trace_wide_shallow"},{"a":12526,"t":"code","b":[141,33,49],"m":"sta","oa":12577,"o":"smc_wsteep_table"},{"a":12529,"t":"code","b":[142,25,49],"m":"stx","oa":12569,"o":"smc_wsteep_xstep"},{"a":12532,"t":"code","b":[165,62],"m":"lda","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":12534,"t":"code","b":[240,1],"m":"beq","oa":12537,"o":"b_30F9"},{"a":12536,"t":"code","b":[200],"m":"iny"},{"a":12537,"l":"b_30F9","t":"code","b":[140,32,49],"m":"sty","oa":12576,"o":"smc_wsteep_line","x":[12534]},{"a":12540,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":12542,"t":"code","b":[141,64,49],"m":"sta","oa":12608,"o":"smc_wsteep_xhi"},{"a":12545,"t":"code","b":[164,12],"m":"ldy","oa":12,"o":"shared_0C"},{"a":12547,"t":"code","b":[152],"m":"tya"},{"a":12548,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":12549,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":12551,"t":"code","b":[24],"m":"clc"},{"a":12552,"t":"code","b":[200],"m":"iny"},{"a":12553,"t":"code","b":[132,117],"m":"sty","oa":117,"o":"tmp_u"},{"a":12555,"t":"code","b":[166,24],"m":"ldx","oa":24,"o":"shared_18"},{"a":12557,"t":"code","b":[32,164,49],"m":"jsr","oa":12708,"o":"set_edge_store_op"},{"a":12560,"t":"code","b":[76,31,49],"m":"jmp","oa":12575,"o":"j_311F"},{"a":12563,"l":"b_3113","t":"code","b":[101,13],"m":"adc","oa":13,"o":"shared_0D","x":[12585]},{"a":12565,"t":"code","b":[144,8],"m":"bcc","oa":12575,"o":"j_311F"},{"a":12567,"t":"code","b":[229,12],"m":"sbc","oa":12,"o":"shared_0C"},{"a":12569,"l":"smc_wsteep_xstep","c":"Self-modified opcode: x step (INX or DEX) of the wide steep loop, written by $30F1. When X reaches $76 the high byte changes at $3140. The store at $311F that follows has its opcode chosen by set_edge_store_op: STX $8E (x on screen), STY $8C (clamped to Y = 0 or $FF), BIT $2C (nothing).","t":"code","b":[232],"m":"inx","x":[12529]},{"a":12570,"t":"code","b":[228,118],"m":"cpx","oa":118,"o":"tmp_v"},{"a":12572,"t":"code","b":[24],"m":"clc"},{"a":12573,"t":"code","b":[240,33],"m":"beq","oa":12608,"o":"smc_wsteep_xhi"},{"a":12575,"l":"j_311F","t":"code","b":[142,0,173],"m":"stx","oa":44288,"o":"polygon_left_x","x":[12560,12565,12613,12738]},{"a":12576,"t":"note","l":"smc_wsteep_line","c":"Self-modified operand, low byte of the wide steep loop's store at $311F: the current line, written by $30F9 and lowered by $3122 and $3137.","note":"inside the item at $311F","x":[12537,12578,12599]},{"a":12577,"t":"note","l":"smc_wsteep_table","c":"Self-modified operand, high byte of the wide steep loop's store: $AD or $AE, written by $30EE. Followed by the loop's line and pixel counting ($3122-$313F), which handles the y high byte $3E reaching 0 by refreshing the store opcode.","note":"inside the item at $311F","x":[12526]},{"a":12578,"t":"code","b":[206,32,49],"m":"dec","oa":12576,"o":"smc_wsteep_line"},{"a":12581,"t":"code","b":[240,7],"m":"beq","oa":12590,"o":"b_312E"},{"a":12583,"l":"b_3127","t":"code","b":[198,117],"m":"dec","oa":117,"o":"tmp_u","x":[12597,12605]},{"a":12585,"t":"code","b":[208,232],"m":"bne","oa":12563,"o":"b_3113"},{"a":12587,"t":"code","b":[76,108,47],"m":"jmp","oa":12140,"o":"r_2F6C"},{"a":12590,"l":"b_312E","t":"code","b":[198,62],"m":"dec","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi","x":[12581]},{"a":12592,"t":"code","b":[16,3],"m":"bpl","oa":12597,"o":"b_3135"},{"a":12594,"t":"code","b":[76,108,47],"m":"jmp","oa":12140,"o":"r_2F6C"},{"a":12597,"l":"b_3135","t":"code","b":[208,240],"m":"bne","oa":12583,"o":"b_3127","x":[12592]},{"a":12599,"t":"code","b":[206,32,49],"m":"dec","oa":12576,"o":"smc_wsteep_line"},{"a":12602,"t":"code","b":[32,164,49],"m":"jsr","oa":12708,"o":"set_edge_store_op"},{"a":12605,"t":"code","b":[76,39,49],"m":"jmp","oa":12583,"o":"b_3127"},{"a":12608,"l":"smc_wsteep_xhi","c":"Self-modified opcode: INC $41 ($E6) or DEC $41 ($C6), written by $30FE, moving the edge's x high byte when X wraps in the wide steep loop; then the store opcode is chosen again.","t":"code","b":[230,65],"m":"inc","oa":65,"o":"edge_x_start_hi","x":[12542,12573]},{"a":12610,"t":"code","b":[32,164,49],"m":"jsr","oa":12708,"o":"set_edge_store_op"},{"a":12613,"t":"code","b":[76,31,49],"m":"jmp","oa":12575,"o":"j_311F"},{"a":12616,"l":"trace_wide_shallow","c":"Wide shallow edge (x delta >= y delta, x with a high byte): like trace_shallow_edge but stores on every step through the store at $317E (line $317F, page $3180) and carries the x high byte in $41 through the self-modified INC/DEC at $319A. The BBC's TracePolygonEdge part 8.","t":"code","b":[141,128,49],"m":"sta","oa":12672,"o":"smc_wshallow_table","x":[12524]},{"a":12619,"t":"code","b":[142,109,49],"m":"stx","oa":12653,"o":"smc_wshallow_xstep"},{"a":12622,"t":"code","b":[165,62],"m":"lda","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":12624,"t":"code","b":[240,1],"m":"beq","oa":12627,"o":"b_3153"},{"a":12626,"t":"code","b":[200],"m":"iny"},{"a":12627,"l":"b_3153","t":"code","b":[140,127,49],"m":"sty","oa":12671,"o":"smc_wshallow_line","x":[12624]},{"a":12630,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":12632,"t":"code","b":[141,154,49],"m":"sta","oa":12698,"o":"smc_wshallow_xhi"},{"a":12635,"t":"code","b":[164,13],"m":"ldy","oa":13,"o":"shared_0D"},{"a":12637,"t":"code","b":[152],"m":"tya"},{"a":12638,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":12639,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":12641,"t":"code","b":[24],"m":"clc"},{"a":12642,"t":"code","b":[200],"m":"iny"},{"a":12643,"t":"code","b":[132,117],"m":"sty","oa":117,"o":"tmp_u"},{"a":12645,"t":"code","b":[166,24],"m":"ldx","oa":24,"o":"shared_18"},{"a":12647,"t":"code","b":[32,164,49],"m":"jsr","oa":12708,"o":"set_edge_store_op"},{"a":12650,"t":"code","b":[76,126,49],"m":"jmp","oa":12670,"o":"j_317E"},{"a":12653,"l":"smc_wshallow_xstep","c":"Self-modified opcode: x step (INX or DEX) of the wide shallow loop, written by $314B. The store at $317E has its opcode chosen by set_edge_store_op (STX, STY or BIT).","t":"code","b":[232],"m":"inx","x":[12619,12675]},{"a":12654,"t":"code","b":[228,118],"m":"cpx","oa":118,"o":"tmp_v"},{"a":12656,"t":"code","b":[24],"m":"clc"},{"a":12657,"t":"code","b":[240,39],"m":"beq","oa":12698,"o":"smc_wshallow_xhi"},{"a":12659,"l":"j_3173","t":"code","b":[101,12],"m":"adc","oa":12,"o":"shared_0C","x":[12703]},{"a":12661,"t":"code","b":[144,7],"m":"bcc","oa":12670,"o":"j_317E"},{"a":12663,"t":"code","b":[229,13],"m":"sbc","oa":13,"o":"shared_0D"},{"a":12665,"t":"code","b":[206,127,49],"m":"dec","oa":12671,"o":"smc_wshallow_line"},{"a":12668,"t":"code","b":[240,10],"m":"beq","oa":12680,"o":"b_3188"},{"a":12670,"l":"j_317E","t":"code","b":[142,0,173],"m":"stx","oa":44288,"o":"polygon_left_x","x":[12650,12661,12687,12695,12741]},{"a":12671,"t":"note","l":"smc_wshallow_line","c":"Self-modified operand, low byte of the wide shallow loop's store at $317E: the current line, written by $3153 and lowered by $3179 and $3191.","note":"inside the item at $317E","x":[12627,12665,12689]},{"a":12672,"t":"note","l":"smc_wshallow_table","c":"Self-modified operand, high byte of the wide shallow loop's store: $AD or $AE, written by $3148. Followed by the loop's pixel count in $75 and the y high byte handling.","note":"inside the item at $317E","x":[12616]},{"a":12673,"t":"code","b":[198,117],"m":"dec","oa":117,"o":"tmp_u"},{"a":12675,"t":"code","b":[208,232],"m":"bne","oa":12653,"o":"smc_wshallow_xstep"},{"a":12677,"t":"code","b":[76,108,47],"m":"jmp","oa":12140,"o":"r_2F6C"},{"a":12680,"l":"b_3188","t":"code","b":[198,62],"m":"dec","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi","x":[12668]},{"a":12682,"t":"code","b":[16,3],"m":"bpl","oa":12687,"o":"b_318F"},{"a":12684,"t":"code","b":[76,108,47],"m":"jmp","oa":12140,"o":"r_2F6C"},{"a":12687,"l":"b_318F","t":"code","b":[208,237],"m":"bne","oa":12670,"o":"j_317E","x":[12682]},{"a":12689,"t":"code","b":[206,127,49],"m":"dec","oa":12671,"o":"smc_wshallow_line"},{"a":12692,"t":"code","b":[32,164,49],"m":"jsr","oa":12708,"o":"set_edge_store_op"},{"a":12695,"t":"code","b":[76,126,49],"m":"jmp","oa":12670,"o":"j_317E"},{"a":12698,"l":"smc_wshallow_xhi","c":"Self-modified opcode: INC $41 or DEC $41, written by $3158, for when X wraps in the wide shallow loop; then the store opcode is chosen again and the loop resumes at $3173.","t":"code","b":[230,65],"m":"inc","oa":65,"o":"edge_x_start_hi","x":[12632,12657]},{"a":12700,"t":"code","b":[32,164,49],"m":"jsr","oa":12708,"o":"set_edge_store_op"},{"a":12703,"t":"code","b":[76,115,49],"m":"jmp","oa":12659,"o":"j_3173"},{"a":12706,"l":"corrupt_secret_code","c":"Anti-cracker trap, reached only from check_cracker_seed with carry clear: BCC next_seed, so one extra seed number is consumed and every code digit drawn after it comes from the wrong place in the sequence. Same as the BBC's CorruptSecretCode.","t":"code","b":[144,38],"m":"bcc","oa":12746,"o":"next_seed","x":[12855]},{"a":12708,"l":"set_edge_store_op","c":"Chooses the store instruction of the wide-edge loops and writes its opcode to both $311F and $317E: BIT ($2C, store nothing) while the y high byte $3E is not 0; otherwise sets $7F = 0 (something will be drawn) and uses STX ($8E) when the x high byte $41 is 0, or STY ($8C) with Y = 0 when $41 is negative and Y = $FF when positive, so off-range x values are stored clamped to 0 or 255. A is kept. Same as the BBC's ModifyStoringCode (whose commentary calls Y unused; the STY it selects stores it).","t":"code","b":[72],"m":"pha","x":[12557,12602,12610,12647,12692,12700]},{"a":12709,"t":"code","b":[165,62],"m":"lda","oa":62,"o":"vec_yaw_hi_or_edge_y0_hi"},{"a":12711,"t":"code","b":[240,4],"m":"beq","oa":12717,"o":"b_31AD"},{"a":12713,"t":"code","b":[169,44],"m":"lda","o":"#$2C"},{"a":12715,"t":"code","b":[208,21],"m":"bne","oa":12738,"o":"b_31C2"},{"a":12717,"l":"b_31AD","t":"code","b":[133,127],"m":"sta","oa":127,"o":"tile_onscreen_or_skip_poly","x":[12711]},{"a":12719,"t":"code","b":[165,65],"m":"lda","oa":65,"o":"edge_x_start_hi"},{"a":12721,"t":"code","b":[208,4],"m":"bne","oa":12727,"o":"b_31B7"},{"a":12723,"t":"code","b":[169,142],"m":"lda","o":"#$8E"},{"a":12725,"t":"code","b":[208,11],"m":"bne","oa":12738,"o":"b_31C2"},{"a":12727,"l":"b_31B7","t":"code","b":[16,5],"m":"bpl","oa":12734,"o":"b_31BE","x":[12721]},{"a":12729,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":12731,"t":"code","b":[76,192,49],"m":"jmp","oa":12736,"o":"j_31C0"},{"a":12734,"l":"b_31BE","t":"code","b":[160,255],"m":"ldy","o":"#$FF","x":[12727]},{"a":12736,"l":"j_31C0","t":"code","b":[169,140],"m":"lda","o":"#$8C","x":[12731]},{"a":12738,"l":"b_31C2","t":"code","b":[141,31,49],"m":"sta","oa":12575,"o":"j_311F","x":[12715,12725]},{"a":12741,"t":"code","b":[141,126,49],"m":"sta","oa":12670,"o":"j_317E"},{"a":12744,"t":"code","b":[104],"m":"pla"},{"a":12745,"t":"code","b":[96],"m":"rts"},{"a":12746,"l":"next_seed","c":"Returns the next number of the landscape's pseudo-random sequence in A. The sequence is a 40-bit shift register at $0C7B-$0C7F: eight times, it shifts left one bit, feeding in bit 3 of $0C7D EOR bit 0 of $0C7F; the result is $0C7F. Y is kept (via $31F2). Callers include generate_landscape, process_all_tiles, next_seed_bcd, spawn_secret_code, $3451, and the C64 entry code at $3FA2-$3FAF, which runs it 256 times and then stores 256 more results at $0200-$02FF. Same as the BBC's GetNextSeedNumber.","t":"code","b":[140,242,49],"m":"sty","oa":12786,"o":"next_seed_saved_y","x":[4722,5403,5493,5846,8067,10958,11125,12706,13210,13274,13362,13393,13647,16290,16296]},{"a":12749,"t":"code","b":[160,8],"m":"ldy","o":"#$08"},{"a":12751,"l":"b_31CF","t":"code","b":[173,125,12],"m":"lda","oa":3197,"o":"seed_reg_2","x":[12777]},{"a":12754,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":12755,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":12756,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":12757,"t":"code","b":[77,127,12],"m":"eor","oa":3199,"o":"seed_reg_4"},{"a":12760,"t":"code","b":[106],"m":"ror","o":"a"},{"a":12761,"t":"code","b":[46,123,12],"m":"rol","oa":3195,"o":"seed_reg_0"},{"a":12764,"t":"code","b":[46,124,12],"m":"rol","oa":3196,"o":"seed_reg_1"},{"a":12767,"t":"code","b":[46,125,12],"m":"rol","oa":3197,"o":"seed_reg_2"},{"a":12770,"t":"code","b":[46,126,12],"m":"rol","oa":3198,"o":"seed_reg_3"},{"a":12773,"t":"code","b":[46,127,12],"m":"rol","oa":3199,"o":"seed_reg_4"},{"a":12776,"t":"code","b":[136],"m":"dey"},{"a":12777,"t":"code","b":[208,228],"m":"bne","oa":12751,"o":"b_31CF"},{"a":12779,"t":"code","b":[172,242,49],"m":"ldy","oa":12786,"o":"next_seed_saved_y"},{"a":12782,"t":"code","b":[173,127,12],"m":"lda","oa":3199,"o":"seed_reg_4"},{"a":12785,"t":"code","b":[96],"m":"rts"},{"a":12786,"l":"next_seed_saved_y","c":"next_seed's saved copy of Y (1 byte), stored at $31CA and restored at $31EB. The BBC's yStoreNextSeed.","t":"byte","b":[145],"x":[12746,12779]},{"a":12787,"l":"print_number","c":"Prints the number 0-9 in A as a digit: adds '0' and falls into print_digit. Used by print_bcd_pair. Same as the BBC's PrintNumber.","t":"code","b":[24],"m":"clc","x":[13201,13207]},{"a":12788,"t":"code","b":[105,48],"m":"adc","o":"#$30"},{"a":12790,"l":"print_digit","c":"Prints the character in A, turning '0' into 'O' (so zeros show as the letter O). When bit 7 of $0C60 is set (the secret-code screen) it goes to spawn_char_3d to build the character in 3D blocks; otherwise to $AA44, the text printer. Also used by print_input_buffer. Same as the BBC's PrintDigit.","t":"code","b":[201,48],"m":"cmp","o":"#$30","x":[13123,13133]},{"a":12792,"t":"code","b":[208,2],"m":"bne","oa":12796,"o":"b_31FC"},{"a":12794,"t":"code","b":[169,79],"m":"lda","o":"#$4F"},{"a":12796,"l":"b_31FC","t":"code","b":[44,96,12],"m":"bit","oa":3168,"o":"text_in_3d","x":[12792]},{"a":12799,"t":"code","b":[48,3],"m":"bmi","oa":12804,"o":"spawn_char_3d"},{"a":12801,"t":"code","b":[76,68,170],"m":"jmp","oa":43588,"o":"print_char_shadowed"},{"a":12804,"l":"spawn_char_3d","c":"Builds a character out of 3D block objects on the landscape, for the title and the secret-code screen. A with bit 7 clear is a character: its code goes to $0C10 and OSWORD 10 (the C64's handler at $8D81 copies the 8 glyph bytes from $8000 + 8*code to $0C11-$0C18); zTile $26 = $0C4A, X = 7, then check_cracker_seed and spawn_char_rows. With bit 7 set, bits 0-4 of A set the position instead: bit 6 clear the column ($0C49), bit 6 set the row ($0C4A). X and Y are kept. Callers: print_digit, draw_title_screen, spawn_secret_code. Same as the BBC's SpawnCharacter3D part 1.","t":"code","b":[72],"m":"pha","x":[12799,12976,13244,13249]},{"a":12805,"t":"code","b":[141,16,12],"m":"sta","oa":3088,"o":"glyph_block"},{"a":12808,"t":"code","b":[41,192],"m":"and","o":"#$C0"},{"a":12810,"t":"code","b":[16,15],"m":"bpl","oa":12827,"o":"b_321B"},{"a":12812,"t":"code","b":[10],"m":"asl","o":"a"},{"a":12813,"t":"code","b":[10],"m":"asl","o":"a"},{"a":12814,"t":"code","b":[104],"m":"pla"},{"a":12815,"t":"code","b":[41,31],"m":"and","o":"#$1F"},{"a":12817,"t":"code","b":[176,4],"m":"bcs","oa":12823,"o":"b_3217"},{"a":12819,"t":"code","b":[141,73,12],"m":"sta","oa":3145,"o":"digit3d_x"},{"a":12822,"t":"code","b":[96],"m":"rts"},{"a":12823,"l":"b_3217","t":"code","b":[141,74,12],"m":"sta","oa":3146,"o":"digit3d_z","x":[12817]},{"a":12826,"t":"code","b":[96],"m":"rts"},{"a":12827,"l":"b_321B","t":"code","b":[138],"m":"txa","x":[12810]},{"a":12828,"t":"code","b":[72],"m":"pha"},{"a":12829,"t":"code","b":[152],"m":"tya"},{"a":12830,"t":"code","b":[72],"m":"pha"},{"a":12831,"t":"code","b":[160,12],"m":"ldy","o":"#$0C"},{"a":12833,"t":"code","b":[162,16],"m":"ldx","o":"#$10"},{"a":12835,"t":"code","b":[169,10],"m":"lda","o":"#$0A"},{"a":12837,"t":"code","b":[32,241,255],"m":"jsr","oa":65521,"o":"osword_jmp"},{"a":12840,"t":"code","b":[173,74,12],"m":"lda","oa":3146,"o":"digit3d_z"},{"a":12843,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":12845,"t":"code","b":[162,7],"m":"ldx","o":"#$07"},{"a":12847,"l":"check_cracker_seed","c":"Anti-cracker check, once per character in spawn_char_3d: if $0C75 is lower than the byte set_cracker_seed put at $0F3D (the landscape's BCD high byte), calls corrupt_secret_code. Play code at $18A2-$18B5 sets $0C75 to that byte plus 1 in BCD (it adds 7 when the low digit is 9), and the reset at $114D zeroes it, so the check can only fail from landscape 0100 up. Same as the BBC's CheckCrackerSeed.","t":"code","b":[189,110,12],"m":"lda","oa":3182,"o":"gaze_for_robot,x"},{"a":12850,"t":"code","b":[221,54,15],"m":"cmp","oa":3894,"o":"f_0F36,x"},{"a":12853,"t":"code","b":[176,3],"m":"bcs","oa":12858,"o":"spawn_char_rows"},{"a":12855,"t":"code","b":[32,162,49],"m":"jsr","oa":12706,"o":"corrupt_secret_code"},{"a":12858,"l":"spawn_char_rows","c":"Places the glyph as block pairs, rows X = 7 down to 0 (glyph rows 6..0, then an empty row; the glyph's last row is never used), each row one tile further back ($26 up by one). Each row drops the glyph's leftmost pixel column, then takes the pixels two at a time (left in bit 1) and writes block_pair_objects,pair into the tile data at x = $0C49..+3 through point_at_tile. The $20 in those values makes the tile's high nibble 2, which the view code reads as the corner's altitude ($2906). Afterwards $0C49 moves 4 tiles right. Same as the BBC's SpawnCharacter3D part 2.","t":"code","b":[30,16,12],"m":"asl","oa":3088,"o":"glyph_block,x","x":[12853,12902,12909]},{"a":12861,"t":"code","b":[173,73,12],"m":"lda","oa":3145,"o":"digit3d_x"},{"a":12864,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":12866,"t":"code","b":[169,4],"m":"lda","o":"#$04"},{"a":12868,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":12870,"l":"b_3246","t":"code","b":[30,16,12],"m":"asl","oa":3088,"o":"glyph_block,x","x":[12895]},{"a":12873,"t":"code","b":[42],"m":"rol","o":"a"},{"a":12874,"t":"code","b":[30,16,12],"m":"asl","oa":3088,"o":"glyph_block,x"},{"a":12877,"t":"code","b":[42],"m":"rol","o":"a"},{"a":12878,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":12880,"t":"code","b":[168],"m":"tay"},{"a":12881,"t":"code","b":[185,126,50],"m":"lda","oa":12926,"o":"block_pair_objects,y"},{"a":12884,"t":"code","b":[72],"m":"pha"},{"a":12885,"t":"code","b":[32,168,43],"m":"jsr","oa":11176,"o":"point_at_tile"},{"a":12888,"t":"code","b":[104],"m":"pla"},{"a":12889,"t":"code","b":[145,94],"m":"sta","oa":94,"o":"(tile_ptr),y"},{"a":12891,"t":"code","b":[230,36],"m":"inc","oa":36,"o":"tile_x"},{"a":12893,"t":"code","b":[198,21],"m":"dec","oa":21,"o":"loop_count"},{"a":12895,"t":"code","b":[208,229],"m":"bne","oa":12870,"o":"b_3246"},{"a":12897,"t":"code","b":[230,38],"m":"inc","oa":38,"o":"tile_z"},{"a":12899,"t":"code","b":[202],"m":"dex"},{"a":12900,"t":"code","b":[48,9],"m":"bmi","oa":12911,"o":"b_326F"},{"a":12902,"t":"code","b":[208,210],"m":"bne","oa":12858,"o":"spawn_char_rows"},{"a":12904,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":12906,"t":"code","b":[141,16,12],"m":"sta","oa":3088,"o":"glyph_block"},{"a":12909,"t":"code","b":[240,203],"m":"beq","oa":12858,"o":"spawn_char_rows"},{"a":12911,"l":"b_326F","t":"code","b":[173,73,12],"m":"lda","oa":3145,"o":"digit3d_x","x":[12900]},{"a":12914,"t":"code","b":[24],"m":"clc"},{"a":12915,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":12917,"t":"code","b":[141,73,12],"m":"sta","oa":3145,"o":"digit3d_x"},{"a":12920,"t":"code","b":[104],"m":"pla"},{"a":12921,"t":"code","b":[168],"m":"tay"},{"a":12922,"t":"code","b":[104],"m":"pla"},{"a":12923,"t":"code","b":[170],"m":"tax"},{"a":12924,"t":"code","b":[104],"m":"pla"},{"a":12925,"t":"code","b":[96],"m":"rts"},{"a":12926,"l":"block_pair_objects","c":"Tile value for each pair of glyph pixels (left pixel in bit 1): %00 $20 (no block), %01 $27, %10 $28, %11 $29. The low nibble becomes object 63's type in draw_title_block_tile: types 7, 8 and 9 are the three block-pair shapes. Same values as the BBC's objBlockNumber.","t":"byte","b":[32,39,40,41],"x":[12881]},{"a":12930,"l":"draw_title_screen","c":"Draws the title screen (A bit 7 clear) or the secret-code screen (bit 7 set, after a landscape is won). Object 63, used for every block, gets yaw 128 ($09FF) and height $2E0 ($097F/$0A3F); bit 7 of $0C4B is set for the duration; process_all_tiles 0 empties the landscape. Title: the 15 bytes of title_text through spawn_char_3d, then DrawTitleView ($13AB) with A = 5, X = 1; code screen: spawn_secret_code, then A = 0, X = 3 (the C64-Wiki screenshots show the Sentinel on blue and a robot on a starry black sky). Y = 1 in both. Callers: $1024, $1079 (A = 0), $1AA5 (A = $80). Same as the BBC's DrawTitleScreen.","t":"code","b":[141,197,50],"m":"sta","oa":12997,"o":"title_screen_type","x":[4132,4217,6821]},{"a":12933,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":12935,"t":"code","b":[141,255,9],"m":"sta","oa":2559,"o":"a_09FF"},{"a":12938,"t":"code","b":[169,224],"m":"lda","o":"#$E0"},{"a":12940,"t":"code","b":[141,63,10],"m":"sta","oa":2623,"o":"a_0A3F"},{"a":12943,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":12945,"t":"code","b":[141,127,9],"m":"sta","oa":2431,"o":"a_097F"},{"a":12948,"t":"code","b":[56],"m":"sec"},{"a":12949,"t":"code","b":[110,75,12],"m":"ror","oa":3147,"o":"drawing_title"},{"a":12952,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":12954,"t":"code","b":[32,34,43],"m":"jsr","oa":11042,"o":"process_all_tiles"},{"a":12957,"t":"code","b":[44,197,50],"m":"bit","oa":12997,"o":"title_screen_type"},{"a":12960,"t":"code","b":[16,9],"m":"bpl","oa":12971,"o":"b_32AB"},{"a":12962,"t":"code","b":[32,183,51],"m":"jsr","oa":13239,"o":"spawn_secret_code"},{"a":12965,"t":"code","b":[162,3],"m":"ldx","o":"#$03"},{"a":12967,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":12969,"t":"code","b":[240,17],"m":"beq","oa":12988,"o":"b_32BC"},{"a":12971,"l":"b_32AB","t":"code","b":[162,0],"m":"ldx","o":"#$00","x":[12960]},{"a":12973,"l":"b_32AD","t":"code","b":[189,198,50],"m":"lda","oa":12998,"o":"title_text,x","x":[12982]},{"a":12976,"t":"code","b":[32,4,50],"m":"jsr","oa":12804,"o":"spawn_char_3d"},{"a":12979,"t":"code","b":[232],"m":"inx"},{"a":12980,"t":"code","b":[224,15],"m":"cpx","o":"#$0F"},{"a":12982,"t":"code","b":[144,245],"m":"bcc","oa":12973,"o":"b_32AD"},{"a":12984,"t":"code","b":[162,1],"m":"ldx","o":"#$01"},{"a":12986,"t":"code","b":[169,5],"m":"lda","o":"#$05"},{"a":12988,"l":"b_32BC","t":"code","b":[160,1],"m":"ldy","o":"#$01","x":[12969]},{"a":12990,"t":"code","b":[32,171,19],"m":"jsr","oa":5035,"o":"draw_title_view"},{"a":12993,"t":"code","b":[78,75,12],"m":"lsr","oa":3147,"o":"drawing_title"},{"a":12996,"t":"code","b":[96],"m":"rts"},{"a":12997,"l":"title_screen_type","c":"draw_title_screen's copy of its argument (1 byte); bit 7 set means the secret-code screen. The BBC's screenType.","t":"byte","b":[0],"x":[12930,12957]},{"a":12998,"l":"title_text","c":"The title as spawn_char_3d input, 15 bytes: $84 (column 4), $D5 (row 21), 'THE', $80 (column 0), $C7 (row 7), 'SENTINEL'. So THE stands further back and SENTINEL spans all 32 columns. Same bytes as the BBC's titleText.","t":"byte","b":[132,213,84,72,69,128,199,83],"x":[12973]},{"a":13006,"t":"byte","b":[69,78,84,73,78,69,76]},{"a":13013,"l":"read_number","c":"Reads a number of up to A digits (4 for the landscape, 8 for the code; kept in $74) into $0CF0-$0CF7, newest digit first, spaces where nothing was typed. Calls $8642 first, which on the C64 is a bare RTS (the BBC's EnableKeyboard selected and flushed the keyboard). Keys come from $862C (OSRDCH with Escape handling). RETURN ends it at once, however many digits were typed; only 0-9 and DEL ($7F, removes the newest) are taken; a digit beyond the limit sends VDU 7, which the C64's OSWRCH ignores ($8B78-$8BAF), so there is no beep. The buffer is shown by print_input_buffer after each change. Same logic as the BBC's ReadNumber.","t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t","x":[4158,4198]},{"a":13015,"t":"code","b":[32,66,134],"m":"jsr","oa":34370,"o":"keyboard_select_stub"},{"a":13018,"t":"code","b":[160,7],"m":"ldy","o":"#$07"},{"a":13020,"t":"code","b":[169,32],"m":"lda","o":"#$20"},{"a":13022,"l":"b_32DE","t":"code","b":[153,240,12],"m":"sta","oa":3312,"o":"input_buffer,y","x":[13026]},{"a":13025,"t":"code","b":[136],"m":"dey"},{"a":13026,"t":"code","b":[16,250],"m":"bpl","oa":13022,"o":"b_32DE"},{"a":13028,"t":"code","b":[32,57,51],"m":"jsr","oa":13113,"o":"print_input_buffer"},{"a":13031,"l":"b_32E7","t":"code","b":[160,0],"m":"ldy","o":"#$00","x":[13051]},{"a":13033,"l":"b_32E9","t":"code","b":[32,44,134],"m":"jsr","oa":34348,"o":"read_key","x":[13042,13048,13075,13086,13109]},{"a":13036,"t":"code","b":[201,13],"m":"cmp","o":"#$0D"},{"a":13038,"t":"code","b":[240,72],"m":"beq","oa":13112,"o":"r_3338"},{"a":13040,"t":"code","b":[201,48],"m":"cmp","o":"#$30"},{"a":13042,"t":"code","b":[144,245],"m":"bcc","oa":13033,"o":"b_32E9"},{"a":13044,"t":"code","b":[201,127],"m":"cmp","o":"#$7F"},{"a":13046,"t":"code","b":[144,25],"m":"bcc","oa":13073,"o":"b_3311"},{"a":13048,"t":"code","b":[208,239],"m":"bne","oa":13033,"o":"b_32E9"},{"a":13050,"t":"code","b":[136],"m":"dey"},{"a":13051,"t":"code","b":[48,234],"m":"bmi","oa":13031,"o":"b_32E7"},{"a":13053,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":13055,"l":"b_32FF","t":"code","b":[189,241,12],"m":"lda","oa":3313,"o":"input_buffer_1,x","x":[13064]},{"a":13058,"t":"code","b":[157,240,12],"m":"sta","oa":3312,"o":"input_buffer,x"},{"a":13061,"t":"code","b":[232],"m":"inx"},{"a":13062,"t":"code","b":[224,7],"m":"cpx","o":"#$07"},{"a":13064,"t":"code","b":[208,245],"m":"bne","oa":13055,"o":"b_32FF"},{"a":13066,"t":"code","b":[169,32],"m":"lda","o":"#$20"},{"a":13068,"t":"code","b":[141,247,12],"m":"sta","oa":3319,"o":"input_buffer_7"},{"a":13071,"t":"code","b":[208,33],"m":"bne","oa":13106,"o":"b_3332"},{"a":13073,"l":"b_3311","t":"code","b":[201,58],"m":"cmp","o":"#$3A","x":[13046]},{"a":13075,"t":"code","b":[176,212],"m":"bcs","oa":13033,"o":"b_32E9"},{"a":13077,"t":"code","b":[196,116],"m":"cpy","oa":116,"o":"tmp_t"},{"a":13079,"t":"code","b":[208,8],"m":"bne","oa":13089,"o":"b_3321"},{"a":13081,"t":"code","b":[169,7],"m":"lda","o":"#$07"},{"a":13083,"t":"code","b":[32,238,255],"m":"jsr","oa":65518,"o":"oswrch_jmp"},{"a":13086,"t":"code","b":[76,233,50],"m":"jmp","oa":13033,"o":"b_32E9"},{"a":13089,"l":"b_3321","t":"code","b":[200],"m":"iny","x":[13079]},{"a":13090,"t":"code","b":[72],"m":"pha"},{"a":13091,"t":"code","b":[162,6],"m":"ldx","o":"#$06"},{"a":13093,"l":"b_3325","t":"code","b":[189,240,12],"m":"lda","oa":3312,"o":"input_buffer,x","x":[13100]},{"a":13096,"t":"code","b":[157,241,12],"m":"sta","oa":3313,"o":"input_buffer_1,x"},{"a":13099,"t":"code","b":[202],"m":"dex"},{"a":13100,"t":"code","b":[16,247],"m":"bpl","oa":13093,"o":"b_3325"},{"a":13102,"t":"code","b":[104],"m":"pla"},{"a":13103,"t":"code","b":[141,240,12],"m":"sta","oa":3312,"o":"input_buffer"},{"a":13106,"l":"b_3332","t":"code","b":[32,57,51],"m":"jsr","oa":13113,"o":"print_input_buffer","x":[13071]},{"a":13109,"t":"code","b":[76,233,50],"m":"jmp","oa":13033,"o":"b_32E9"},{"a":13112,"l":"r_3338","t":"code","b":[96],"m":"rts","x":[13038]},{"a":13113,"l":"print_input_buffer","c":"Shows the input buffer at the cursor: sets bit 7 of $0C0F (plain text, no drop shadow), prints the $74 characters from $0CF0+$74-1 down to $0CF0 (first typed first) through print_digit, so a 0 shows as O, then $74 backspaces (VDU 8) to return the cursor, and clears the bit. Same as the BBC's PrintInputBuffer.","t":"code","b":[56],"m":"sec","x":[13028,13106]},{"a":13114,"t":"code","b":[110,15,12],"m":"ror","oa":3087,"o":"text_shadow_off"},{"a":13117,"t":"code","b":[166,116],"m":"ldx","oa":116,"o":"tmp_t"},{"a":13119,"t":"code","b":[202],"m":"dex"},{"a":13120,"l":"b_3340","t":"code","b":[189,240,12],"m":"lda","oa":3312,"o":"input_buffer,x","x":[13127]},{"a":13123,"t":"code","b":[32,246,49],"m":"jsr","oa":12790,"o":"print_digit"},{"a":13126,"t":"code","b":[202],"m":"dex"},{"a":13127,"t":"code","b":[16,247],"m":"bpl","oa":13120,"o":"b_3340"},{"a":13129,"t":"code","b":[166,116],"m":"ldx","oa":116,"o":"tmp_t"},{"a":13131,"t":"code","b":[169,8],"m":"lda","o":"#$08"},{"a":13133,"l":"b_334D","t":"code","b":[32,246,49],"m":"jsr","oa":12790,"o":"print_digit","x":[13137]},{"a":13136,"t":"code","b":[202],"m":"dex"},{"a":13137,"t":"code","b":[208,250],"m":"bne","oa":13133,"o":"b_334D"},{"a":13139,"t":"code","b":[78,15,12],"m":"lsr","oa":3087,"o":"text_shadow_off"},{"a":13142,"t":"code","b":[96],"m":"rts"},{"a":13143,"l":"input_to_bcd","c":"Packs the eight typed characters at $0CF0-$0CF7 into four BCD bytes at $0CF0-$0CF3, lowest pair first (units in the low nibble of $0CF0). Spaces count as 0, so a short entry is read as if it had leading zeros (RETURN alone gives 0000). $0CF4-$0CF7 are left as $FF. Called after read_number at $1041 and $1069. Same as the BBC's StringToNumber.","t":"code","b":[160,0],"m":"ldy","o":"#$00","x":[4161,4201]},{"a":13145,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":13147,"l":"b_335B","t":"code","b":[32,116,51],"m":"jsr","oa":13172,"o":"input_digit_value","x":[13169]},{"a":13150,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":13152,"t":"code","b":[200],"m":"iny"},{"a":13153,"t":"code","b":[32,116,51],"m":"jsr","oa":13172,"o":"input_digit_value"},{"a":13156,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13157,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13158,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13159,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13160,"t":"code","b":[5,116],"m":"ora","oa":116,"o":"tmp_t"},{"a":13162,"t":"code","b":[157,240,12],"m":"sta","oa":3312,"o":"input_buffer,x"},{"a":13165,"t":"code","b":[232],"m":"inx"},{"a":13166,"t":"code","b":[200],"m":"iny"},{"a":13167,"t":"code","b":[192,8],"m":"cpy","o":"#$08"},{"a":13169,"t":"code","b":[208,232],"m":"bne","oa":13147,"o":"b_335B"},{"a":13171,"t":"code","b":[96],"m":"rts"},{"a":13172,"l":"input_digit_value","c":"Returns the value of the character at $0CF0,Y (a space counts as '0'), and for Y = 4 to 7 overwrites that byte with $FF after reading it. No check that it is a digit. Used by input_to_bcd. Same as the BBC's DigitToNumber.","t":"code","b":[185,240,12],"m":"lda","oa":3312,"o":"input_buffer,y","x":[13147,13153]},{"a":13175,"t":"code","b":[192,4],"m":"cpy","o":"#$04"},{"a":13177,"t":"code","b":[144,7],"m":"bcc","oa":13186,"o":"b_3382"},{"a":13179,"t":"code","b":[72],"m":"pha"},{"a":13180,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":13182,"t":"code","b":[153,240,12],"m":"sta","oa":3312,"o":"input_buffer,y"},{"a":13185,"t":"code","b":[104],"m":"pla"},{"a":13186,"l":"b_3382","t":"code","b":[201,32],"m":"cmp","o":"#$20","x":[13177]},{"a":13188,"t":"code","b":[208,2],"m":"bne","oa":13192,"o":"b_3388"},{"a":13190,"t":"code","b":[169,48],"m":"lda","o":"#$30"},{"a":13192,"l":"b_3388","t":"code","b":[56],"m":"sec","x":[13188]},{"a":13193,"t":"code","b":[233,48],"m":"sbc","o":"#$30"},{"a":13195,"t":"code","b":[96],"m":"rts"},{"a":13196,"l":"print_bcd_pair","c":"Prints the BCD byte in A as two digits, high then low, through print_number (3D blocks when bit 7 of $0C60 is set). Used by spawn_secret_code and print_landscape_num. Same as the BBC's Print2DigitBCD.","t":"code","b":[72],"m":"pha","x":[13265,13284,13290]},{"a":13197,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13198,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13199,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13200,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13201,"t":"code","b":[32,243,49],"m":"jsr","oa":12787,"o":"print_number"},{"a":13204,"t":"code","b":[104],"m":"pla"},{"a":13205,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":13207,"t":"code","b":[76,243,49],"m":"jmp","oa":12787,"o":"print_number"},{"a":13210,"l":"next_seed_bcd","c":"Takes the next seed number and forces each nibble into 0-9 by subtracting 6 from a nibble of 10 or more (so 10-15 become 4-9), returning a BCD byte in A; $33B6 holds the low digit meanwhile. Used by spawn_secret_code and $14B6. Same as the BBC's GetNextSeedAsBCD.","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[5302,13258]},{"a":13213,"t":"code","b":[72],"m":"pha"},{"a":13214,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":13216,"t":"code","b":[201,10],"m":"cmp","o":"#$0A"},{"a":13218,"t":"code","b":[144,2],"m":"bcc","oa":13222,"o":"b_33A6"},{"a":13220,"t":"code","b":[233,6],"m":"sbc","o":"#$06"},{"a":13222,"l":"b_33A6","t":"code","b":[141,182,51],"m":"sta","oa":13238,"o":"bcd_low_digit","x":[13218]},{"a":13225,"t":"code","b":[104],"m":"pla"},{"a":13226,"t":"code","b":[41,240],"m":"and","o":"#$F0"},{"a":13228,"t":"code","b":[201,160],"m":"cmp","o":"#$A0"},{"a":13230,"t":"code","b":[144,2],"m":"bcc","oa":13234,"o":"b_33B2"},{"a":13232,"t":"code","b":[233,96],"m":"sbc","o":"#$60"},{"a":13234,"l":"b_33B2","t":"code","b":[13,182,51],"m":"ora","oa":13238,"o":"bcd_low_digit","x":[13230]},{"a":13237,"t":"code","b":[96],"m":"rts"},{"a":13238,"l":"bcd_low_digit","c":"next_seed_bcd's low digit while it builds the BCD byte (1 byte). The BBC's lowNibbleBCD.","t":"byte","b":[0],"x":[13222,13234]},{"a":13239,"l":"spawn_secret_code","c":"Draws the landscape's secret code as 3D blocks: bit 7 of $0C60 on, position column 0, row 7; X = $0CE6/2 (the object type that $1B7F stores there; by the BBC's numbering 6 is the Sentinel's tower, where a won game ends, giving X = 3); takes X+1 numbers from next_seed_bcd and prints those with X below 4 through print_bcd_pair (8 digits when X starts at 3). Then $0CE6 = $FF, one more next_seed, and bit 7 of $0C60 off. Same as the BBC's SpawnSecretCode3D.","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[12962]},{"a":13241,"t":"code","b":[141,96,12],"m":"sta","oa":3168,"o":"text_in_3d"},{"a":13244,"t":"code","b":[32,4,50],"m":"jsr","oa":12804,"o":"spawn_char_3d"},{"a":13247,"t":"code","b":[169,199],"m":"lda","o":"#$C7"},{"a":13249,"t":"code","b":[32,4,50],"m":"jsr","oa":12804,"o":"spawn_char_3d"},{"a":13252,"t":"code","b":[78,230,12],"m":"lsr","oa":3302,"o":"on_sentinel_tower"},{"a":13255,"t":"code","b":[174,230,12],"m":"ldx","oa":3302,"o":"on_sentinel_tower"},{"a":13258,"l":"b_33CA","t":"code","b":[32,154,51],"m":"jsr","oa":13210,"o":"next_seed_bcd","x":[13269]},{"a":13261,"t":"code","b":[224,4],"m":"cpx","o":"#$04"},{"a":13263,"t":"code","b":[176,3],"m":"bcs","oa":13268,"o":"b_33D4"},{"a":13265,"t":"code","b":[32,140,51],"m":"jsr","oa":13196,"o":"print_bcd_pair"},{"a":13268,"l":"b_33D4","t":"code","b":[202],"m":"dex","x":[13263]},{"a":13269,"t":"code","b":[16,243],"m":"bpl","oa":13258,"o":"b_33CA"},{"a":13271,"t":"code","b":[142,230,12],"m":"stx","oa":3302,"o":"on_sentinel_tower"},{"a":13274,"t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed"},{"a":13277,"t":"code","b":[78,96,12],"m":"lsr","oa":3168,"o":"text_in_3d"},{"a":13280,"t":"code","b":[96],"m":"rts"},{"a":13281,"l":"print_landscape_num","c":"Prints the four-digit landscape number: $0CFE then $0CFD, each through print_bcd_pair. Reached from $1AAD (the code screen, by JMP) and $8869 (the landscape preview). Same as the BBC's PrintLandscapeNum.","t":"code","b":[173,254,12],"m":"lda","oa":3326,"o":"landscape_hi","x":[6829,34921]},{"a":13284,"t":"code","b":[32,140,51],"m":"jsr","oa":13196,"o":"print_bcd_pair"},{"a":13287,"t":"code","b":[173,253,12],"m":"lda","oa":3325,"o":"landscape_lo"},{"a":13290,"t":"code","b":[76,140,51],"m":"jmp","oa":13196,"o":"print_bcd_pair"},{"a":13293,"l":"init_landscape_seed","c":"Starts the seed sequence for the BCD landscape number in Y (high) and X (low): $0C7C = Y, $0C7B = X (after the reset at $114D-$1193 the other register bytes are 1, 0, 0), a copy in $0CFE/$0CFD, $0C52 = non-zero unless it is landscape 0000, and $0C07 = 1 + tens digit for landscapes 0000-0099, capped at 8, and 8 from 0100 up. Callers: $104A (typed number), $1A97 (next landscape), $35FD. Same as the BBC's InitialiseSeeds.","t":"code","b":[140,124,12],"m":"sty","oa":3196,"o":"seed_reg_1","x":[4170,6807,13821]},{"a":13296,"t":"code","b":[142,123,12],"m":"stx","oa":3195,"o":"seed_reg_0"},{"a":13299,"t":"code","b":[140,254,12],"m":"sty","oa":3326,"o":"landscape_hi"},{"a":13302,"t":"code","b":[142,253,12],"m":"stx","oa":3325,"o":"landscape_lo"},{"a":13305,"t":"code","b":[140,82,12],"m":"sty","oa":3154,"o":"landscape_nonzero"},{"a":13308,"t":"code","b":[152],"m":"tya"},{"a":13309,"t":"code","b":[208,15],"m":"bne","oa":13326,"o":"b_340E"},{"a":13311,"t":"code","b":[138],"m":"txa"},{"a":13312,"t":"code","b":[141,82,12],"m":"sta","oa":3154,"o":"landscape_nonzero"},{"a":13315,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13316,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13317,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13318,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13319,"t":"code","b":[24],"m":"clc"},{"a":13320,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":13322,"t":"code","b":[201,9],"m":"cmp","o":"#$09"},{"a":13324,"t":"code","b":[144,2],"m":"bcc","oa":13328,"o":"b_3410"},{"a":13326,"l":"b_340E","t":"code","b":[169,8],"m":"lda","o":"#$08","x":[13309]},{"a":13328,"l":"b_3410","t":"code","b":[141,7,12],"m":"sta","oa":3079,"o":"enemy_limit","x":[13324]},{"a":13331,"t":"code","b":[96],"m":"rts"},{"a":13332,"l":"print_text_byte","c":"Prints one byte of token text. A byte of $C8 or more is itself a token: it is printed whole by $8617 (token number A-$C8), with Y kept across the call; any other byte goes to $AA6A, which sends it to OSWRCH as a character or VDU code. Called from the token loop at $8621, so tokens can nest. Same bytes as the BBC routine at $33DE; only the two call addresses moved.","t":"code","b":[201,200],"m":"cmp","o":"#$C8","x":[34337]},{"a":13334,"t":"code","b":[176,3],"m":"bcs","oa":13339,"o":"b_341B"},{"a":13336,"t":"code","b":[76,106,170],"m":"jmp","oa":43626,"o":"print_token_byte"},{"a":13339,"l":"b_341B","t":"code","b":[233,200],"m":"sbc","o":"#$C8","x":[13334]},{"a":13341,"t":"code","b":[170],"m":"tax"},{"a":13342,"t":"code","b":[152],"m":"tya"},{"a":13343,"t":"code","b":[72],"m":"pha"},{"a":13344,"t":"code","b":[32,23,134],"m":"jsr","oa":34327,"o":"print_token"},{"a":13347,"t":"code","b":[104],"m":"pla"},{"a":13348,"t":"code","b":[168],"m":"tay"},{"a":13349,"t":"code","b":[96],"m":"rts"},{"a":13350,"l":"get_enemy_count","c":"Picks how many enemies a new landscape gets, 1 to 8. The base, kept in $74, is the thousands digit of the landscape number (high nybble of $0CFE, whose two BCD digits are the top of the number) plus 2. Each try takes a random byte from $31CA and counts the 0 bits after its top bit up to the next 1 (7 if none): the count is added to the base when the top bit is clear, and the count plus one is subtracted when it is set. A result outside 0-7 is drawn again. Returns the result plus 1 in A. Caller: $1429. The BBC routine, byte for byte, apart from the random-number call.","t":"code","b":[173,254,12],"m":"lda","oa":3326,"o":"landscape_hi","x":[5161]},{"a":13353,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13354,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13355,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13356,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13357,"t":"code","b":[24],"m":"clc"},{"a":13358,"t":"code","b":[105,2],"m":"adc","o":"#$02"},{"a":13360,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":13362,"l":"b_3432","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[13388]},{"a":13365,"t":"code","b":[160,7],"m":"ldy","o":"#$07"},{"a":13367,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13368,"t":"code","b":[8],"m":"php"},{"a":13369,"t":"code","b":[240,6],"m":"beq","oa":13377,"o":"b_3441"},{"a":13371,"t":"code","b":[160,255],"m":"ldy","o":"#$FF"},{"a":13373,"l":"b_343D","t":"code","b":[200],"m":"iny","x":[13375]},{"a":13374,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13375,"t":"code","b":[144,252],"m":"bcc","oa":13373,"o":"b_343D"},{"a":13377,"l":"b_3441","t":"code","b":[152],"m":"tya","x":[13369]},{"a":13378,"t":"code","b":[40],"m":"plp"},{"a":13379,"t":"code","b":[144,2],"m":"bcc","oa":13383,"o":"b_3447"},{"a":13381,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":13383,"l":"b_3447","t":"code","b":[24],"m":"clc","x":[13379]},{"a":13384,"t":"code","b":[101,116],"m":"adc","oa":116,"o":"tmp_t"},{"a":13386,"t":"code","b":[201,8],"m":"cmp","o":"#$08"},{"a":13388,"t":"code","b":[176,228],"m":"bcs","oa":13362,"o":"b_3432"},{"a":13390,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":13392,"t":"code","b":[96],"m":"rts"},{"a":13393,"l":"random_0_to_22","c":"Returns a random number from 0 to 22 in A: takes a byte from $31CA and adds its low three bits (0-7) to its bits 3-6 (0-15), so the values 7 to 15 are the most likely. Callers: $148B (in the tree placing at $147D) and $2AE0 (in generate_landscape). Same as the BBC routine.","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[5259,10976]},{"a":13396,"t":"code","b":[72],"m":"pha"},{"a":13397,"t":"code","b":[41,7],"m":"and","o":"#$07"},{"a":13399,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":13401,"t":"code","b":[104],"m":"pla"},{"a":13402,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13403,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13404,"t":"code","b":[41,30],"m":"and","o":"#$1E"},{"a":13406,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13407,"t":"code","b":[101,116],"m":"adc","oa":116,"o":"tmp_t"},{"a":13409,"t":"code","b":[96],"m":"rts"},{"a":13410,"l":"energy_to_bcd","c":"Returns the player's energy ($0C0A) in A by counting up from 0 one unit at a time, so that with decimal mode on the result comes back in BCD. Its only caller, the routine at $1A87, turns decimal mode on first and adds the result to the landscape number to get the next landscape. Same as the BBC routine.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[6792]},{"a":13412,"t":"code","b":[174,10,12],"m":"ldx","oa":3082,"o":"player_energy"},{"a":13415,"t":"code","b":[240,6],"m":"beq","oa":13423,"o":"r_346F"},{"a":13417,"l":"b_3469","t":"code","b":[24],"m":"clc","x":[13421]},{"a":13418,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":13420,"t":"code","b":[202],"m":"dex"},{"a":13421,"t":"code","b":[208,250],"m":"bne","oa":13417,"o":"b_3469"},{"a":13423,"l":"r_346F","t":"code","b":[96],"m":"rts","x":[13415]},{"a":13424,"l":"make_sound","c":"Plays sound A: points X/Y at the 8-byte sound block $AC00 + 8*A and calls OSWORD 7 through $FFF1, the C64's stand-in ($8D81) for the BBC's SOUND call. Callers: the game sounds at $12EE, $1750, $181D, $1A1F and $1BB0, and the volume, music and sound-effect code in this block. C64 change: the BBC routine also defined an envelope for the sound (OSWORD 8) and mapped the sound number to its data block through a table; here sound n is simply block n, and no envelope is set.","t":"code","b":[10],"m":"asl","o":"a","x":[4846,5968,6173,6687,7088,13490,13589,13644,13672]},{"a":13425,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13426,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13427,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":13429,"t":"code","b":[170],"m":"tax"},{"a":13430,"t":"code","b":[169,7],"m":"lda","o":"#$07"},{"a":13432,"t":"code","b":[160,172],"m":"ldy","o":"#$AC"},{"a":13434,"t":"code","b":[76,241,255],"m":"jmp","oa":65521,"o":"osword_jmp"},{"a":13437,"l":"process_volume_keys","c":"Handles the volume keys. Returns at once if bit 7 of $0CE4 is set, or unless the fourth key-logger slot $0CEB (filled by the key scan at $1363) holds 0 (key 7, quieter) or 1 (key 8, louder). Steps the level in volume_level ($34B9) by 8 within 0-$78, but first waits, re-reading the key, until the sound counter $0CDF is below 2; then stores the level, writes level/8 (0-15) to the SID volume register $D418, sets $0CDF to 12, plays sound 5 as a sample of the new volume and starts again, so a held key keeps stepping. Called from $12C4. C64 change: the BBC routine rewrote the amplitudes in its sound envelopes; this one sets the SID master volume.","t":"code","b":[173,228,12],"m":"lda","oa":3300,"o":"key_action_busy","x":[4804,13472,13493]},{"a":13440,"t":"code","b":[48,54],"m":"bmi","oa":13496,"o":"r_34B8"},{"a":13442,"t":"code","b":[173,185,52],"m":"lda","oa":13497,"o":"volume_level"},{"a":13445,"t":"code","b":[174,235,12],"m":"ldx","oa":3307,"o":"keylog_misc"},{"a":13448,"t":"code","b":[240,11],"m":"beq","oa":13461,"o":"b_3495"},{"a":13450,"t":"code","b":[202],"m":"dex"},{"a":13451,"t":"code","b":[208,43],"m":"bne","oa":13496,"o":"r_34B8"},{"a":13453,"t":"code","b":[201,120],"m":"cmp","o":"#$78"},{"a":13455,"t":"code","b":[176,10],"m":"bcs","oa":13467,"o":"b_349B"},{"a":13457,"t":"code","b":[105,8],"m":"adc","o":"#$08"},{"a":13459,"t":"code","b":[208,6],"m":"bne","oa":13467,"o":"b_349B"},{"a":13461,"l":"b_3495","t":"code","b":[201,0],"m":"cmp","o":"#$00","x":[13448]},{"a":13463,"t":"code","b":[240,2],"m":"beq","oa":13467,"o":"b_349B"},{"a":13465,"t":"code","b":[233,8],"m":"sbc","o":"#$08"},{"a":13467,"l":"b_349B","t":"code","b":[174,223,12],"m":"ldx","oa":3295,"o":"sound_timer","x":[13455,13459,13463]},{"a":13470,"t":"code","b":[224,2],"m":"cpx","o":"#$02"},{"a":13472,"t":"code","b":[176,219],"m":"bcs","oa":13437,"o":"process_volume_keys"},{"a":13474,"t":"code","b":[141,185,52],"m":"sta","oa":13497,"o":"volume_level"},{"a":13477,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13478,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13479,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":13480,"s":"SID master volume: the level divided by 8","t":"code","b":[141,24,212],"m":"sta","o":"sid_filter_mode_volume"},{"a":13483,"t":"code","b":[169,12],"m":"lda","o":"#$0C"},{"a":13485,"t":"code","b":[141,223,12],"m":"sta","oa":3295,"o":"sound_timer"},{"a":13488,"t":"code","b":[169,5],"m":"lda","o":"#$05"},{"a":13490,"t":"code","b":[32,112,52],"m":"jsr","oa":13424,"o":"make_sound"},{"a":13493,"t":"code","b":[76,125,52],"m":"jmp","oa":13437,"o":"process_volume_keys"},{"a":13496,"l":"r_34B8","t":"code","b":[96],"m":"rts","x":[13440,13451]},{"a":13497,"l":"volume_level","c":"The sound volume, 0 to $78 in steps of 8 (16 levels), $78 (loudest) in the image. process_volume_keys ($347D) changes it and writes it divided by 8 to $D418. As $78 it would disassemble as SEI; it is never executed.","t":"byte","b":[120],"x":[13442,13474]},{"a":13498,"l":"process_pause_keys","c":"Pauses the game when the key slot $0CEB holds 2 (the cursor left/right key): sets bit 7 of the pause flag $0C72, fills the scanner solid ($163F with A = 8), stops all three voices ($351C), and waits until $0CEB holds 3 (the cursor up/down key); the interrupt keeps scanning the keys meanwhile ($967E). Then turns the scanner sprites off ($163F with A = 0) until its next update, and clears the flag. Called from $12BE. The BBC routine with its call addresses moved; the keys come from the tables at $138D and $139C.","t":"code","b":[173,235,12],"m":"lda","oa":3307,"o":"keylog_misc","x":[4798]},{"a":13501,"t":"code","b":[48,30],"m":"bmi","oa":13533,"o":"r_34DD"},{"a":13503,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":13505,"t":"code","b":[208,26],"m":"bne","oa":13533,"o":"r_34DD"},{"a":13507,"t":"code","b":[110,114,12],"m":"ror","oa":3186,"o":"paused"},{"a":13510,"t":"code","b":[169,8],"m":"lda","o":"#$08"},{"a":13512,"t":"code","b":[32,63,22],"m":"jsr","oa":5695,"o":"draw_scanner"},{"a":13515,"t":"code","b":[32,28,53],"m":"jsr","oa":13596,"o":"silence_all_voices"},{"a":13518,"l":"b_34CE","t":"code","b":[173,235,12],"m":"lda","oa":3307,"o":"keylog_misc","x":[13523]},{"a":13521,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":13523,"t":"code","b":[208,249],"m":"bne","oa":13518,"o":"b_34CE"},{"a":13525,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":13527,"t":"code","b":[32,63,22],"m":"jsr","oa":5695,"o":"draw_scanner"},{"a":13530,"t":"code","b":[78,114,12],"m":"lsr","oa":3186,"o":"paused"},{"a":13533,"l":"r_34DD","t":"code","b":[96],"m":"rts","x":[13501,13505]},{"a":13534,"l":"process_music","c":"Plays the next note of the current tune. $0CE7 is the position in the music data at $AB50 (bit 7 set: no tune). A byte of $C8 or more sets the note length, (byte-$C8)*4, in $0C70 and moves on; $FF ends the tune ($0CE7 = $FF). Any other byte is a pitch: it goes into sound block 3's pitch ($AC1C), the length into the sound counter $0CDF, the voice number in block 3's first byte ($AC18) advances 0, 1, 2, 0, and sound 3 is played. Reached from process_sound ($352C) when the effect number is 3. C64 changes: the voices cycle 0-2 where the BBC cycled its channels 1-3, and the envelope byte is no longer rewritten before each note.","t":"code","b":[174,231,12],"m":"ldx","oa":3303,"o":"music_pos","x":[13560,13662]},{"a":13537,"t":"code","b":[48,56],"m":"bmi","oa":13595,"o":"r_351B"},{"a":13539,"t":"code","b":[238,231,12],"m":"inc","oa":3303,"o":"music_pos"},{"a":13542,"t":"code","b":[189,80,171],"m":"lda","oa":43856,"o":"music_hyperspace,x"},{"a":13545,"t":"code","b":[201,255],"m":"cmp","o":"#$FF"},{"a":13547,"t":"code","b":[240,43],"m":"beq","oa":13592,"o":"b_3518"},{"a":13549,"t":"code","b":[201,200],"m":"cmp","o":"#$C8"},{"a":13551,"t":"code","b":[144,10],"m":"bcc","oa":13563,"o":"b_34FB"},{"a":13553,"t":"code","b":[233,200],"m":"sbc","o":"#$C8"},{"a":13555,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13556,"t":"code","b":[10],"m":"asl","o":"a"},{"a":13557,"t":"code","b":[141,112,12],"m":"sta","oa":3184,"o":"chord_note_count"},{"a":13560,"t":"code","b":[76,222,52],"m":"jmp","oa":13534,"o":"process_music"},{"a":13563,"l":"b_34FB","t":"code","b":[141,28,172],"m":"sta","oa":44060,"o":"sound_music_pitch","x":[13551]},{"a":13566,"t":"code","b":[173,112,12],"m":"lda","oa":3184,"o":"chord_note_count"},{"a":13569,"t":"code","b":[141,223,12],"m":"sta","oa":3295,"o":"sound_timer"},{"a":13572,"t":"code","b":[173,24,172],"m":"lda","oa":44056,"o":"sound_music_note"},{"a":13575,"t":"code","b":[24],"m":"clc"},{"a":13576,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":13578,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":13580,"t":"code","b":[144,2],"m":"bcc","oa":13584,"o":"b_3510"},{"a":13582,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":13584,"l":"b_3510","t":"code","b":[141,24,172],"m":"sta","oa":44056,"o":"sound_music_note","x":[13580]},{"a":13587,"t":"code","b":[169,3],"m":"lda","o":"#$03"},{"a":13589,"t":"code","b":[76,112,52],"m":"jmp","oa":13424,"o":"make_sound"},{"a":13592,"l":"b_3518","t":"code","b":[141,231,12],"m":"sta","oa":3303,"o":"music_pos","x":[13547]},{"a":13595,"l":"r_351B","t":"code","b":[96],"m":"rts","x":[13537]},{"a":13596,"l":"silence_all_voices","c":"Stops all three voices: OSBYTE 21 for X = 2, 1 and 0 through $3527. Called when the main loop restarts ($357D), when the game pauses ($34CB) and before the game-over screen ($87B2). C64 change: the BBC flushed its four sound-channel buffers, numbers 7 to 4.","t":"code","b":[162,2],"m":"ldx","o":"#$02","x":[13515,13693,34738]},{"a":13598,"l":"b_351E","t":"code","b":[32,39,53],"m":"jsr","oa":13607,"o":"silence_voice_x","x":[13602]},{"a":13601,"t":"code","b":[202],"m":"dex"},{"a":13602,"t":"code","b":[16,250],"m":"bpl","oa":13598,"o":"b_351E"},{"a":13604,"t":"code","b":[96],"m":"rts"},{"a":13605,"l":"silence_voice_0","c":"Stops voice 0 only (X = 0, then into $3527). Callers: $12E4 and $12FC. C64 change: the BBC flushed its buffer 4 here, the one for sound channel 0.","t":"code","b":[162,0],"m":"ldx","o":"#$00","x":[4836,4860]},{"a":13607,"l":"silence_voice_x","c":"Stops voice X with OSBYTE 21 through $FFF4. The C64's OSBYTE ($8F78) handles this call at $8F81: it marks the voice idle and zeroes its SID control and sustain/release registers. Callers: $196E and the loop at $351E.","t":"code","b":[169,21],"m":"lda","o":"#$15","x":[6510,13598]},{"a":13609,"t":"code","b":[76,244,255],"m":"jmp","oa":65524,"o":"osbyte_jmp"},{"a":13612,"l":"process_sound","c":"Keeps sound effects going; called from the game's waits and long loops ($12C1, $24ED, $26EC, $2A12, $35D5, $362A, $3714, $87A1, $880A). Does nothing while the sound counter $0CDF is non-zero (the interrupt counts it down, $9630). Otherwise acts on the effect number in $0C73: 3 plays the next note of the tune (process_music); 4, the scanner sound, plays sound 4 and sets $0CDF to 50; 6, the game-over sound, while the pitch in $0C74 is still $3C or more, puts it in sound block 6 ($AC34), plays sound 6, waits a random 1-4 counts and lowers the pitch by one. C64 changes: the game-over sound stops at pitch $3C (BBC $50) and uses a single sound block where the BBC set two; the scanner sound no longer sets its block's pitch and amplitude first.","t":"code","b":[173,223,12],"m":"lda","oa":3295,"o":"sound_timer","x":[4801,9453,9964,10770,13781,13866,14100,34721,34826]},{"a":13615,"t":"code","b":[208,44],"m":"bne","oa":13661,"o":"r_355D"},{"a":13617,"t":"code","b":[173,115,12],"m":"lda","oa":3187,"o":"sound_kind"},{"a":13620,"t":"code","b":[201,4],"m":"cmp","o":"#$04"},{"a":13622,"t":"code","b":[240,41],"m":"beq","oa":13665,"o":"b_3561"},{"a":13624,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":13626,"t":"code","b":[240,34],"m":"beq","oa":13662,"o":"b_355E"},{"a":13628,"t":"code","b":[201,6],"m":"cmp","o":"#$06"},{"a":13630,"t":"code","b":[208,29],"m":"bne","oa":13661,"o":"r_355D"},{"a":13632,"t":"code","b":[172,116,12],"m":"ldy","oa":3188,"o":"gameover_pitch"},{"a":13635,"t":"code","b":[192,60],"m":"cpy","o":"#$3C"},{"a":13637,"t":"code","b":[144,22],"m":"bcc","oa":13661,"o":"r_355D"},{"a":13639,"t":"code","b":[140,52,172],"m":"sty","oa":44084,"o":"sound_game_over_pitch"},{"a":13642,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":13644,"t":"code","b":[32,112,52],"m":"jsr","oa":13424,"o":"make_sound"},{"a":13647,"t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed"},{"a":13650,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":13652,"t":"code","b":[24],"m":"clc"},{"a":13653,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":13655,"t":"code","b":[141,223,12],"m":"sta","oa":3295,"o":"sound_timer"},{"a":13658,"t":"code","b":[206,116,12],"m":"dec","oa":3188,"o":"gameover_pitch"},{"a":13661,"l":"r_355D","t":"code","b":[96],"m":"rts","x":[13615,13630,13637]},{"a":13662,"l":"b_355E","t":"code","b":[76,222,52],"m":"jmp","oa":13534,"o":"process_music","x":[13626]},{"a":13665,"l":"b_3561","t":"code","b":[169,50],"m":"lda","o":"#$32","x":[13622]},{"a":13667,"t":"code","b":[141,223,12],"m":"sta","oa":3295,"o":"sound_timer"},{"a":13670,"t":"code","b":[169,4],"m":"lda","o":"#$04"},{"a":13672,"t":"code","b":[32,112,52],"m":"jsr","oa":13424,"o":"make_sound"},{"a":13675,"t":"code","b":[96],"m":"rts"},{"a":13676,"l":"play_game_decoy","c":"A decoy byte that is never executed. The secret-code check reaches play_game by pushing $356C, computed from the Sentinel's object flags ($14E5-$14F1), and returning with RTS at $14F2, so someone reading from $356C sees LDA $83A9,Y instead of the real code. The BBC program has the same byte before its PlayGame.","t":"byte","b":[185]},{"a":13677,"l":"play_game","c":"Starts play once the landscape's secret code has been accepted (entered through the RTS at $14F2; see $356C). Sets the play palette ($8643 with A = $83), waits for a key ($8629: the PRESS ANY KEY of the landscape preview), switches the display to the play screen ($9A51 with A = $80: VIC bank 1, multicolour text, the five character sets and the matrix at $7C00), clears bit 7 of $0CFC to mark a game in progress, and runs into main_game_loop. C64 addition: the call to $9A51.","t":"code","b":[169,131],"m":"lda","o":"#$83"},{"a":13679,"t":"code","b":[32,67,134],"m":"jsr","oa":34371,"o":"set_palette"},{"a":13682,"t":"code","b":[32,41,134],"m":"jsr","oa":34345,"o":"wait_key"},{"a":13685,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":13687,"t":"code","b":[32,81,154],"m":"jsr","oa":39505,"o":"set_video_mode"},{"a":13690,"t":"code","b":[78,252,12],"m":"lsr","oa":3324,"o":"not_in_game"},{"a":13693,"l":"main_game_loop","c":"The main loop's first part, run after play_game and whenever $127C in play_loop asks for a fresh view (JMP at $3642); the cases it handles are the quit flag, the end of the game, a U-turn and a new position. Stops the voices; quits to the title ($1017) if bit 7 of $0C64 is set; restarts the landscape (at $35F4) if bit 7 of $0C4E is set (the player's energy ran out). Otherwise blanks the screen to blue ($8643 with A = 6), zeroes $55, $08, $0CC9, $0C5F and the scanner switch $0C04, turns all sprites off ($D015 = 0), and makes the player ($0B) the viewer ($6E). If bit 7 of $0CDE says a hyperspace ended the game, bit 6 set means the landscape is won (on to finish_landscape, $3603) and clear means it is lost (the screen is cleared and not redrawn). Otherwise, unless this is a U-turn (bit 7 of $0C51), it works out tile visibility ($245B) and the per-tile angles (precompute_tile_angles, $3700); then clears the screen ($1090), draws the view ($2625), the icons and the scanner ($9508), and has the picture shown ($98B2). It then sets the drawing up for buffer use ($55 = $19, $2993 with A = 2), lets any tune finish (process_sound), sets the play palette ($8643, A = $83) and goes on to play_loop ($363D), or after a lost game sets $0C4E, sound effect 6, shows the game-over screen ($87B1, A = 5), resets the variables ($114D) and restarts the same landscape (init_landscape_seed $33ED, then $106C). C64 changes: blue is colour 6 (the BBC's 4); $0C04 and $D015 are cleared directly where the BBC called a routine that also paused; the calls to $3700 and $98B2 are new.","t":"code","b":[32,28,53],"m":"jsr","oa":13596,"o":"silence_all_voices","x":[13890]},{"a":13696,"t":"code","b":[173,100,12],"m":"lda","oa":3172,"o":"quit_request"},{"a":13699,"t":"code","b":[16,3],"m":"bpl","oa":13704,"o":"b_3588"},{"a":13701,"t":"code","b":[76,23,16],"m":"jmp","oa":4119,"o":"title_loop"},{"a":13704,"l":"b_3588","t":"code","b":[173,78,12],"m":"lda","oa":3150,"o":"landscape_over","x":[13699]},{"a":13707,"t":"code","b":[48,103],"m":"bmi","oa":13812,"o":"b_35F4"},{"a":13709,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":13711,"t":"code","b":[32,67,134],"m":"jsr","oa":34371,"o":"set_palette"},{"a":13714,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":13716,"t":"code","b":[133,85],"m":"sta","oa":85,"o":"draw_target_unused"},{"a":13718,"t":"code","b":[133,8],"m":"sta","oa":8,"o":"last_pan_dir"},{"a":13720,"t":"code","b":[141,201,12],"m":"sta","oa":3273,"o":"sights_saved_bytes"},{"a":13723,"t":"code","b":[141,95,12],"m":"sta","oa":3167,"o":"sights_on"},{"a":13726,"t":"code","b":[141,4,12],"m":"sta","oa":3076,"o":"scanner_request"},{"a":13729,"s":"all sprites off (sights and scanner)","t":"code","b":[141,21,208],"m":"sta","o":"vic_sprite_enable"},{"a":13732,"t":"code","b":[165,11],"m":"lda","oa":11,"o":"player_obj"},{"a":13734,"t":"code","b":[133,110],"m":"sta","oa":110,"o":"viewer_obj"},{"a":13736,"t":"code","b":[44,222,12],"m":"bit","oa":3294,"o":"hyperspace_ended"},{"a":13739,"t":"code","b":[16,8],"m":"bpl","oa":13749,"o":"b_35B5"},{"a":13741,"t":"code","b":[112,84],"m":"bvs","oa":13827,"o":"finish_landscape"},{"a":13743,"t":"code","b":[32,144,16],"m":"jsr","oa":4240,"o":"clear_view_screen"},{"a":13746,"t":"code","b":[76,201,53],"m":"jmp","oa":13769,"o":"j_35C9"},{"a":13749,"l":"b_35B5","t":"code","b":[173,81,12],"m":"lda","oa":3153,"o":"uturn_armed","x":[13739]},{"a":13752,"t":"code","b":[48,6],"m":"bmi","oa":13760,"o":"b_35C0"},{"a":13754,"t":"code","b":[32,91,36],"m":"jsr","oa":9307,"o":"build_tile_visibility"},{"a":13757,"t":"code","b":[32,0,55],"m":"jsr","oa":14080,"o":"precompute_tile_angles"},{"a":13760,"l":"b_35C0","t":"code","b":[32,144,16],"m":"jsr","oa":4240,"o":"clear_view_screen","x":[13752]},{"a":13763,"t":"code","b":[32,37,38],"m":"jsr","oa":9765,"o":"draw_view_rows"},{"a":13766,"t":"code","b":[32,8,149],"m":"jsr","oa":38152,"o":"update_icon_row"},{"a":13769,"l":"j_35C9","t":"code","b":[32,178,152],"m":"jsr","oa":39090,"o":"show_whole_view","x":[13746]},{"a":13772,"t":"code","b":[169,25],"m":"lda","o":"#$19"},{"a":13774,"t":"code","b":[133,85],"m":"sta","oa":85,"o":"draw_target_unused"},{"a":13776,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":13778,"t":"code","b":[32,147,41],"m":"jsr","oa":10643,"o":"set_draw_buffer"},{"a":13781,"l":"b_35D5","t":"code","b":[32,44,53],"m":"jsr","oa":13612,"o":"process_sound","x":[13787]},{"a":13784,"t":"code","b":[173,231,12],"m":"lda","oa":3303,"o":"music_pos"},{"a":13787,"t":"code","b":[16,248],"m":"bpl","oa":13781,"o":"b_35D5"},{"a":13789,"t":"code","b":[169,131],"m":"lda","o":"#$83"},{"a":13791,"t":"code","b":[32,67,134],"m":"jsr","oa":34371,"o":"set_palette"},{"a":13794,"t":"code","b":[173,222,12],"m":"lda","oa":3294,"o":"hyperspace_ended"},{"a":13797,"t":"code","b":[16,86],"m":"bpl","oa":13885,"o":"play_loop"},{"a":13799,"t":"code","b":[141,78,12],"m":"sta","oa":3150,"o":"landscape_over"},{"a":13802,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":13804,"t":"code","b":[141,115,12],"m":"sta","oa":3187,"o":"sound_kind"},{"a":13807,"t":"code","b":[169,5],"m":"lda","o":"#$05"},{"a":13809,"t":"code","b":[32,177,135],"m":"jsr","oa":34737,"o":"game_over_screen"},{"a":13812,"l":"b_35F4","t":"code","b":[32,77,17],"m":"jsr","oa":4429,"o":"reset_game_state","x":[13707]},{"a":13815,"t":"code","b":[172,254,12],"m":"ldy","oa":3326,"o":"landscape_hi"},{"a":13818,"t":"code","b":[174,253,12],"m":"ldx","oa":3325,"o":"landscape_lo"},{"a":13821,"t":"code","b":[32,237,51],"m":"jsr","oa":13293,"o":"init_landscape_seed"},{"a":13824,"t":"code","b":[76,108,16],"m":"jmp","oa":4204,"o":"build_landscape"},{"a":13827,"l":"finish_landscape","c":"Runs when a hyperspace from the Sentinel's pedestal has won the landscape. Blanks the screen to blue ($8643, A = 6), clears the sound effect ($0C73) and the upper four bytes of the random generator's register ($0C7C-$0C7F), switches to the bitmap display and resets tile visibility and the object table ($117C), works out the next landscape and shows its secret code ($1A87), sets the title palette ($8643, A = $87), starts the music ($888F with A = $42) with $0CDF = 10, waits for it to end, prints PRESS ANY KEY (token 6, $8617), waits for a key ($8629) and goes back to the title ($1017). C64 changes: blue is colour 6 (the BBC's 4), and it calls $117C, which switches to the bitmap display ($9A51, A = 0) before resetting.","t":"code","b":[169,6],"m":"lda","o":"#$06","x":[13741]},{"a":13829,"t":"code","b":[32,67,134],"m":"jsr","oa":34371,"o":"set_palette"},{"a":13832,"t":"code","b":[162,3],"m":"ldx","o":"#$03"},{"a":13834,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":13836,"t":"code","b":[141,115,12],"m":"sta","oa":3187,"o":"sound_kind"},{"a":13839,"l":"b_360F","t":"code","b":[157,124,12],"m":"sta","oa":3196,"o":"seed_reg_1,x","x":[13843]},{"a":13842,"t":"code","b":[202],"m":"dex"},{"a":13843,"t":"code","b":[16,250],"m":"bpl","oa":13839,"o":"b_360F"},{"a":13845,"t":"code","b":[32,124,17],"m":"jsr","oa":4476,"o":"reset_display_and_tiles"},{"a":13848,"t":"code","b":[32,135,26],"m":"jsr","oa":6791,"o":"advance_to_next_landscape"},{"a":13851,"t":"code","b":[169,135],"m":"lda","o":"#$87"},{"a":13853,"t":"code","b":[32,67,134],"m":"jsr","oa":34371,"o":"set_palette"},{"a":13856,"t":"code","b":[169,10],"m":"lda","o":"#$0A"},{"a":13858,"t":"code","b":[141,223,12],"m":"sta","oa":3295,"o":"sound_timer"},{"a":13861,"t":"code","b":[169,66],"m":"lda","o":"#$42"},{"a":13863,"t":"code","b":[32,143,136],"m":"jsr","oa":34959,"o":"start_music"},{"a":13866,"l":"b_362A","t":"code","b":[32,44,53],"m":"jsr","oa":13612,"o":"process_sound","x":[13872]},{"a":13869,"t":"code","b":[173,231,12],"m":"lda","oa":3303,"o":"music_pos"},{"a":13872,"t":"code","b":[16,248],"m":"bpl","oa":13866,"o":"b_362A"},{"a":13874,"t":"code","b":[162,6],"m":"ldx","o":"#$06"},{"a":13876,"t":"code","b":[32,23,134],"m":"jsr","oa":34327,"o":"print_token"},{"a":13879,"t":"code","b":[32,41,134],"m":"jsr","oa":34345,"o":"wait_key"},{"a":13882,"l":"j_363A","t":"code","b":[76,23,16],"m":"jmp","oa":4119,"o":"title_loop","x":[9688]},{"a":13885,"l":"play_loop","c":"The main loop's second part, where play happens. Calls $127C, which handles the game keys and returns with carry set when a fresh view is needed (then back to main_game_loop). Otherwise a pan is under way: copies the pan key $09 to $08, zeroes $0CD1 and $0C1E, sets bit 7 of $0C1B unless the sights are on ($0C5F), turns the player and draws the newly exposed part of the view ($10B7), clears $0C1B, and copies the number of scroll steps from $0CD1 to $0CC1. C64 change: the BBC now waited while its interrupt scrolled the screen $0CC1 times. Here the interrupt only sets $0CD8 to $80 while $0CC1 is non-zero ($964F-$9656), and this loop does each step itself: $96A6 (advances the scroll offsets $94-$97, moves the sights sprite with them when the sights are on, and decrements $0CC1); a delay of about 400 cycles unless the raster ($D012) is already between lines 230 and 255; JSR $B006, code missing from this copy; then the enemy timers ($130C) and the scanner ($1635), which the interrupt skips while a step is pending, unless bit 7 of $0CE5 is set; then it clears $0CD8. It repeats until $0CC1 is zero, then loops back to $127C.","t":"code","b":[32,124,18],"m":"jsr","oa":4732,"o":"gameplay_loop","x":[13797,13926,13972]},{"a":13888,"t":"code","b":[144,3],"m":"bcc","oa":13893,"o":"b_3645"},{"a":13890,"t":"code","b":[76,125,53],"m":"jmp","oa":13693,"o":"main_game_loop"},{"a":13893,"l":"b_3645","t":"code","b":[165,9],"m":"lda","oa":9,"o":"pan_key_now","x":[13888]},{"a":13895,"t":"code","b":[133,8],"m":"sta","oa":8,"o":"last_pan_dir"},{"a":13897,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":13899,"t":"code","b":[141,209,12],"m":"sta","oa":3281,"o":"pan_scroll_steps"},{"a":13902,"t":"code","b":[141,30,12],"m":"sta","oa":3102,"o":"no_dissolve"},{"a":13905,"t":"code","b":[44,95,12],"m":"bit","oa":3167,"o":"sights_on"},{"a":13908,"t":"code","b":[48,4],"m":"bmi","oa":13914,"o":"b_365A"},{"a":13910,"t":"code","b":[56],"m":"sec"},{"a":13911,"t":"code","b":[110,27,12],"m":"ror","oa":3099,"o":"pan_abort_check"},{"a":13914,"l":"b_365A","t":"code","b":[32,183,16],"m":"jsr","oa":4279,"o":"pan_view","x":[13908]},{"a":13917,"t":"code","b":[78,27,12],"m":"lsr","oa":3099,"o":"pan_abort_check"},{"a":13920,"t":"code","b":[173,209,12],"m":"lda","oa":3281,"o":"pan_scroll_steps"},{"a":13923,"t":"code","b":[141,193,12],"m":"sta","oa":3265,"o":"scroll_steps_left"},{"a":13926,"t":"code","b":[240,213],"m":"beq","oa":13885,"o":"play_loop"},{"a":13928,"l":"b_3668","s":"bit 7 set by the interrupt ($9654) when a scroll step is due","t":"code","b":[173,216,12],"m":"lda","oa":3288,"o":"scroll_step_due","x":[13970]},{"a":13931,"t":"code","b":[16,34],"m":"bpl","oa":13967,"o":"b_368F"},{"a":13933,"t":"code","b":[32,166,150],"m":"jsr","oa":38566,"o":"scroll_view_step"},{"a":13936,"s":"raster line (low 8 bits): lines 230-255 skip the delay","t":"code","b":[173,18,208],"m":"lda","o":"vic_raster"},{"a":13939,"t":"code","b":[201,230],"m":"cmp","o":"#$E6"},{"a":13941,"t":"code","b":[176,5],"m":"bcs","oa":13948,"o":"b_367C"},{"a":13943,"s":"about 400 cycles: 80 times DEX/BNE","t":"code","b":[162,80],"m":"ldx","o":"#$50"},{"a":13945,"l":"b_3679","t":"code","b":[202],"m":"dex","x":[13946]},{"a":13946,"t":"code","b":[208,253],"m":"bne","oa":13945,"o":"b_3679"},{"a":13948,"l":"b_367C","s":"missing from this copy: $B000-$B5FF holds only fill (orientation.md)","t":"code","b":[32,6,176],"m":"jsr","oa":45062,"o":"pan_scroll_step","x":[13941]},{"a":13951,"s":"enemy timers and scanner, skipped by the interrupt while the step was pending","t":"code","b":[173,229,12],"m":"lda","oa":3301,"o":"enemies_asleep"},{"a":13954,"t":"code","b":[48,6],"m":"bmi","oa":13962,"o":"b_368A"},{"a":13956,"t":"code","b":[32,12,19],"m":"jsr","oa":4876,"o":"enemy_timer_gate"},{"a":13959,"t":"code","b":[32,53,22],"m":"jsr","oa":5685,"o":"update_scanner"},{"a":13962,"l":"b_368A","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[13954]},{"a":13964,"t":"code","b":[141,216,12],"m":"sta","oa":3288,"o":"scroll_step_due"},{"a":13967,"l":"b_368F","t":"code","b":[173,193,12],"m":"lda","oa":3265,"o":"scroll_steps_left","x":[13931]},{"a":13970,"t":"code","b":[208,212],"m":"bne","oa":13928,"o":"b_3668"},{"a":13972,"t":"code","b":[240,167],"m":"beq","oa":13885,"o":"play_loop"},{"a":13974,"t":"gap","n":106},{"a":14080,"l":"precompute_tile_angles","c":"C64 addition. For every corner of the 32 x 32 tile grid, works out its yaw and pitch as seen from the middle of the viewing object's tile (object $6E; its x and z from $0900/$0980 go to $03 and $1D) and stores them in four 1 KB tables indexed like the tile data at $0400 (tile x, z at page base + (x AND 3), offset (x AND $1C)*8 + z): yaw low bytes at $BC00, yaw high at $C000, pitch low at $C400, pitch high at $C800. The yaw comes from $9287 with the x and z offsets, the distance from $937F, and the pitch from $9287 again with the height difference and that distance, shifted right four bits with its sign kept. The corner's height is the tile's own (high nybble of its data byte) or, if objects stand there, the y ($0940) of the lowest one, reached through the object flags at $0100; the viewer's y is at $0940/$0A00. Calls process_sound once per row of 32. Called only by main_game_loop ($35BD), after the visibility pass, whenever the player has a new position; tile_view_angles_fast ($37F2) reads the tables. The pointers at $A8/$AA/$AC/$AE get only their high bytes set here; their low bytes are 0 in both snapshots and no traced code writes them.","t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj","x":[13757]},{"a":14082,"t":"code","b":[189,0,9],"m":"lda","oa":2304,"o":"obj_x,x"},{"a":14085,"t":"code","b":[133,3],"m":"sta","oa":3,"o":"viewer_col_rotated"},{"a":14087,"t":"code","b":[189,128,9],"m":"lda","oa":2432,"o":"obj_z,x"},{"a":14090,"t":"code","b":[133,29],"m":"sta","oa":29,"o":"viewer_row_rotated"},{"a":14092,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":14094,"t":"code","b":[133,38],"m":"sta","oa":38,"o":"tile_z"},{"a":14096,"l":"j_3710","t":"code","b":[169,31],"m":"lda","o":"#$1F","x":[14318]},{"a":14098,"t":"code","b":[133,36],"m":"sta","oa":36,"o":"tile_x"},{"a":14100,"s":"keep sound going: once per row of 32 tiles","t":"code","b":[32,44,53],"m":"jsr","oa":13612,"o":"process_sound"},{"a":14103,"l":"j_3717","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[14311]},{"a":14105,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":14107,"t":"code","b":[133,130],"m":"sta","oa":130,"o":"dz_lo"},{"a":14109,"t":"code","b":[24],"m":"clc"},{"a":14110,"t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x"},{"a":14112,"t":"code","b":[229,3],"m":"sbc","oa":3,"o":"viewer_col_rotated"},{"a":14114,"t":"code","b":[133,134],"m":"sta","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":14116,"t":"code","b":[16,11],"m":"bpl","oa":14129,"o":"b_3731"},{"a":14118,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":14120,"t":"code","b":[56],"m":"sec"},{"a":14121,"t":"code","b":[229,128],"m":"sbc","oa":128,"o":"dx_lo"},{"a":14123,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":14125,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":14127,"t":"code","b":[229,134],"m":"sbc","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":14129,"l":"b_3731","t":"code","b":[133,131],"m":"sta","oa":131,"o":"dx_abs_hi","x":[14116]},{"a":14131,"t":"code","b":[24],"m":"clc"},{"a":14132,"t":"code","b":[165,38],"m":"lda","oa":38,"o":"tile_z"},{"a":14134,"t":"code","b":[229,29],"m":"sbc","oa":29,"o":"viewer_row_rotated"},{"a":14136,"t":"code","b":[133,136],"m":"sta","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":14138,"t":"code","b":[16,11],"m":"bpl","oa":14151,"o":"b_3747"},{"a":14140,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":14142,"t":"code","b":[56],"m":"sec"},{"a":14143,"t":"code","b":[229,130],"m":"sbc","oa":130,"o":"dz_lo"},{"a":14145,"t":"code","b":[133,130],"m":"sta","oa":130,"o":"dz_lo"},{"a":14147,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":14149,"t":"code","b":[229,136],"m":"sbc","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":14151,"l":"b_3747","t":"code","b":[133,133],"m":"sta","oa":133,"o":"dz_abs_hi","x":[14138]},{"a":14153,"s":"yaw of the corner from the viewer ($8A/$8B)","t":"code","b":[32,135,146],"m":"jsr","oa":37511,"o":"get_hypotenuse_angle"},{"a":14156,"t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x"},{"a":14158,"t":"code","b":[10],"m":"asl","o":"a"},{"a":14159,"t":"code","b":[10],"m":"asl","o":"a"},{"a":14160,"t":"code","b":[10],"m":"asl","o":"a"},{"a":14161,"t":"code","b":[41,224],"m":"and","o":"#$E0"},{"a":14163,"t":"code","b":[5,38],"m":"ora","oa":38,"o":"tile_z"},{"a":14165,"t":"code","b":[133,33],"m":"sta","oa":33,"o":"draw_table_index"},{"a":14167,"t":"code","b":[168],"m":"tay"},{"a":14168,"t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x"},{"a":14170,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":14172,"t":"code","b":[24],"m":"clc"},{"a":14173,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":14175,"t":"code","b":[133,95],"m":"sta","oa":95,"o":"tile_ptr_page"},{"a":14177,"t":"code","b":[105,184],"m":"adc","o":"#$B8"},{"a":14179,"t":"code","b":[133,169],"m":"sta","oa":169,"o":"sq_yaw_lo_page"},{"a":14181,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":14183,"t":"code","b":[133,171],"m":"sta","oa":171,"o":"sq_yaw_hi_page"},{"a":14185,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":14187,"t":"code","b":[133,173],"m":"sta","oa":173,"o":"sq_pitch_lo_page"},{"a":14189,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":14191,"t":"code","b":[133,175],"m":"sta","oa":175,"o":"sq_pitch_hi_page"},{"a":14193,"t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo"},{"a":14195,"t":"code","b":[145,168],"m":"sta","oa":168,"o":"(sq_yaw_lo_ptr),y"},{"a":14197,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":14199,"t":"code","b":[145,170],"m":"sta","oa":170,"o":"(sq_yaw_hi_ptr),y"},{"a":14201,"s":"horizontal distance into $7C/$7D","t":"code","b":[32,127,147],"m":"jsr","oa":37759,"o":"get_hypotenuse"},{"a":14204,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":14206,"t":"code","b":[201,192],"m":"cmp","o":"#$C0"},{"a":14208,"t":"code","b":[144,16],"m":"bcc","oa":14226,"o":"b_3792"},{"a":14210,"l":"b_3782","t":"code","b":[41,63],"m":"and","o":"#$3F","x":[14218]},{"a":14212,"t":"code","b":[168],"m":"tay"},{"a":14213,"t":"code","b":[185,0,1],"m":"lda","oa":256,"o":"obj_flags,y"},{"a":14216,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":14218,"t":"code","b":[176,246],"m":"bcs","oa":14210,"o":"b_3782"},{"a":14220,"t":"code","b":[185,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,y"},{"a":14223,"t":"code","b":[76,150,55],"m":"jmp","oa":14230,"o":"j_3796"},{"a":14226,"l":"b_3792","t":"code","b":[74],"m":"lsr","o":"a","x":[14208]},{"a":14227,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":14228,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":14229,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":14230,"l":"j_3796","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[14223]},{"a":14232,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":14234,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":14236,"t":"code","b":[56],"m":"sec"},{"a":14237,"t":"code","b":[253,0,10],"m":"sbc","oa":2560,"o":"obj_y_lo,x"},{"a":14240,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":14242,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":14244,"t":"code","b":[253,64,9],"m":"sbc","oa":2368,"o":"obj_y_hi,x"},{"a":14247,"t":"code","b":[133,134],"m":"sta","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":14249,"t":"code","b":[16,11],"m":"bpl","oa":14262,"o":"b_37B6"},{"a":14251,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":14253,"t":"code","b":[56],"m":"sec"},{"a":14254,"t":"code","b":[229,128],"m":"sbc","oa":128,"o":"dx_lo"},{"a":14256,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":14258,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":14260,"t":"code","b":[229,134],"m":"sbc","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":14262,"l":"b_37B6","t":"code","b":[133,131],"m":"sta","oa":131,"o":"dx_abs_hi","x":[14249]},{"a":14264,"t":"code","b":[165,124],"m":"lda","oa":124,"o":"hyp_lo"},{"a":14266,"t":"code","b":[133,130],"m":"sta","oa":130,"o":"dz_lo"},{"a":14268,"t":"code","b":[165,125],"m":"lda","oa":125,"o":"hyp_hi"},{"a":14270,"t":"code","b":[133,133],"m":"sta","oa":133,"o":"dz_abs_hi"},{"a":14272,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":14274,"t":"code","b":[133,136],"m":"sta","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":14276,"s":"pitch of the corner ($8A/$8B), then shifted right 4","t":"code","b":[32,135,146],"m":"jsr","oa":37511,"o":"get_hypotenuse_angle"},{"a":14279,"t":"code","b":[164,33],"m":"ldy","oa":33,"o":"draw_table_index"},{"a":14281,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":14283,"t":"code","b":[8],"m":"php"},{"a":14284,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":14285,"t":"code","b":[102,138],"m":"ror","oa":138,"o":"angle_lo"},{"a":14287,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":14288,"t":"code","b":[102,138],"m":"ror","oa":138,"o":"angle_lo"},{"a":14290,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":14291,"t":"code","b":[102,138],"m":"ror","oa":138,"o":"angle_lo"},{"a":14293,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":14294,"t":"code","b":[102,138],"m":"ror","oa":138,"o":"angle_lo"},{"a":14296,"t":"code","b":[40],"m":"plp"},{"a":14297,"t":"code","b":[16,2],"m":"bpl","oa":14301,"o":"b_37DD"},{"a":14299,"t":"code","b":[9,240],"m":"ora","o":"#$F0"},{"a":14301,"l":"b_37DD","t":"code","b":[145,174],"m":"sta","oa":174,"o":"(sq_pitch_hi_ptr),y","x":[14297]},{"a":14303,"t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo"},{"a":14305,"t":"code","b":[145,172],"m":"sta","oa":172,"o":"(sq_pitch_lo_ptr),y"},{"a":14307,"t":"code","b":[198,36],"m":"dec","oa":36,"o":"tile_x"},{"a":14309,"t":"code","b":[48,3],"m":"bmi","oa":14314,"o":"b_37EA"},{"a":14311,"t":"code","b":[76,23,55],"m":"jmp","oa":14103,"o":"j_3717"},{"a":14314,"l":"b_37EA","t":"code","b":[198,38],"m":"dec","oa":38,"o":"tile_z","x":[14309]},{"a":14316,"t":"code","b":[48,3],"m":"bmi","oa":14321,"o":"r_37F1"},{"a":14318,"t":"code","b":[76,16,55],"m":"jmp","oa":14096,"o":"j_3710"},{"a":14321,"l":"r_37F1","t":"code","b":[96],"m":"rts","x":[14316]},{"a":14322,"l":"tile_view_angles_fast","c":"C64 addition: the play-screen version of the tile-angle routine at $2845, taken from $2842 when bit 7 of $9AF6 is set (the play display is on; $9A51 stores it). Same inputs: the tile in Y (stored in $24) and $26, the view quadrant in bits 7-6 of $1C, $05 (and $21 = Y OR $05 becomes the output index X). Maps the tile to the landscape square as $2845 does, but instead of computing angles it reads the ones precompute_tile_angles stored for that square and makes them relative to the view: yaw minus ($B2, $1F) into $A800,X/$0BA0,X (high/low) and pitch minus ($B1, $B0) into $0AE0,X/$0A80,X; $2625 sets $B2 to the viewer's yaw minus 10 and $B1:$B0 to the viewer's pitch shifted like the table. Copies the square's data byte to $0180,X, or 0 when it holds no object and its bit in tile_visibility ($3E80) is clear. Returns A = X = $7F: bit 7 set when the relative yaw is at least the buffer's minimum in $07/$28 (high/low), bit 0 also set when its high byte is at least the one in $12; Y restored from $0F; carry clear.","t":"code","b":[132,36],"m":"sty","oa":36,"o":"tile_x","x":[10306]},{"a":14324,"t":"code","b":[132,15],"m":"sty","oa":15,"o":"y_save_or_obscured"},{"a":14326,"t":"code","b":[152],"m":"tya"},{"a":14327,"t":"code","b":[5,5],"m":"ora","oa":5,"o":"draw_table_offset"},{"a":14329,"t":"code","b":[133,33],"m":"sta","oa":33,"o":"draw_table_index"},{"a":14331,"t":"code","b":[36,28],"m":"bit","oa":28,"o":"arc_right_yaw_or_action"},{"a":14333,"t":"code","b":[48,20],"m":"bmi","oa":14355,"o":"b_3813"},{"a":14335,"t":"code","b":[112,7],"m":"bvs","oa":14344,"o":"b_3808"},{"a":14337,"t":"code","b":[165,36],"m":"lda","oa":36,"o":"tile_x"},{"a":14339,"t":"code","b":[164,38],"m":"ldy","oa":38,"o":"tile_z"},{"a":14341,"t":"code","b":[76,42,56],"m":"jmp","oa":14378,"o":"j_382A"},{"a":14344,"l":"b_3808","t":"code","b":[169,31],"m":"lda","o":"#$1F","x":[14335]},{"a":14346,"t":"code","b":[56],"m":"sec"},{"a":14347,"t":"code","b":[229,36],"m":"sbc","oa":36,"o":"tile_x"},{"a":14349,"t":"code","b":[168],"m":"tay"},{"a":14350,"t":"code","b":[165,38],"m":"lda","oa":38,"o":"tile_z"},{"a":14352,"t":"code","b":[76,42,56],"m":"jmp","oa":14378,"o":"j_382A"},{"a":14355,"l":"b_3813","t":"code","b":[112,14],"m":"bvs","oa":14371,"o":"b_3823","x":[14333]},{"a":14357,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":14359,"t":"code","b":[56],"m":"sec"},{"a":14360,"t":"code","b":[229,38],"m":"sbc","oa":38,"o":"tile_z"},{"a":14362,"t":"code","b":[168],"m":"tay"},{"a":14363,"t":"code","b":[169,31],"m":"lda","o":"#$1F"},{"a":14365,"t":"code","b":[56],"m":"sec"},{"a":14366,"t":"code","b":[229,36],"m":"sbc","oa":36,"o":"tile_x"},{"a":14368,"t":"code","b":[76,42,56],"m":"jmp","oa":14378,"o":"j_382A"},{"a":14371,"l":"b_3823","t":"code","b":[169,31],"m":"lda","o":"#$1F","x":[14355]},{"a":14373,"t":"code","b":[56],"m":"sec"},{"a":14374,"t":"code","b":[229,38],"m":"sbc","oa":38,"o":"tile_z"},{"a":14376,"t":"code","b":[164,36],"m":"ldy","oa":36,"o":"tile_x"},{"a":14378,"l":"j_382A","t":"code","b":[132,116],"m":"sty","oa":116,"o":"tmp_t","x":[14341,14352,14368]},{"a":14380,"t":"code","b":[170],"m":"tax"},{"a":14381,"t":"code","b":[10],"m":"asl","o":"a"},{"a":14382,"t":"code","b":[10],"m":"asl","o":"a"},{"a":14383,"t":"code","b":[10],"m":"asl","o":"a"},{"a":14384,"t":"code","b":[41,224],"m":"and","o":"#$E0"},{"a":14386,"t":"code","b":[5,116],"m":"ora","oa":116,"o":"tmp_t"},{"a":14388,"t":"code","b":[168],"m":"tay"},{"a":14389,"t":"code","b":[138],"m":"txa"},{"a":14390,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":14392,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":14394,"t":"code","b":[24],"m":"clc"},{"a":14395,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":14397,"t":"code","b":[133,95],"m":"sta","oa":95,"o":"tile_ptr_page"},{"a":14399,"t":"code","b":[105,184],"m":"adc","o":"#$B8"},{"a":14401,"t":"code","b":[133,169],"m":"sta","oa":169,"o":"sq_yaw_lo_page"},{"a":14403,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":14405,"t":"code","b":[133,171],"m":"sta","oa":171,"o":"sq_yaw_hi_page"},{"a":14407,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":14409,"t":"code","b":[133,173],"m":"sta","oa":173,"o":"sq_pitch_lo_page"},{"a":14411,"t":"code","b":[105,4],"m":"adc","o":"#$04"},{"a":14413,"t":"code","b":[133,175],"m":"sta","oa":175,"o":"sq_pitch_hi_page"},{"a":14415,"t":"code","b":[166,33],"m":"ldx","oa":33,"o":"draw_table_index"},{"a":14417,"s":"precomputed yaw, made relative to the view","t":"code","b":[177,168],"m":"lda","oa":168,"o":"(sq_yaw_lo_ptr),y"},{"a":14419,"t":"code","b":[56],"m":"sec"},{"a":14420,"t":"code","b":[229,31],"m":"sbc","oa":31,"o":"yaw_adjust_lo"},{"a":14422,"t":"code","b":[157,160,11],"m":"sta","oa":2976,"o":"draw_yaw_lo,x"},{"a":14425,"t":"code","b":[177,170],"m":"lda","oa":170,"o":"(sq_yaw_hi_ptr),y"},{"a":14427,"t":"code","b":[229,178],"m":"sbc","oa":178,"o":"view_yaw_minus_10"},{"a":14429,"t":"code","b":[157,0,168],"m":"sta","oa":43008,"o":"point_yaw_hi,x"},{"a":14432,"s":"precomputed pitch, made relative to the view","t":"code","b":[177,172],"m":"lda","oa":172,"o":"(sq_pitch_lo_ptr),y"},{"a":14434,"t":"code","b":[56],"m":"sec"},{"a":14435,"t":"code","b":[229,176],"m":"sbc","oa":176,"o":"view_pitch_lo16"},{"a":14437,"t":"code","b":[157,128,10],"m":"sta","oa":2688,"o":"draw_pitch_lo,x"},{"a":14440,"t":"code","b":[177,174],"m":"lda","oa":174,"o":"(sq_pitch_hi_ptr),y"},{"a":14442,"t":"code","b":[229,177],"m":"sbc","oa":177,"o":"view_pitch_hi16"},{"a":14444,"t":"code","b":[157,224,10],"m":"sta","oa":2784,"o":"draw_pitch_hi,x"},{"a":14447,"t":"code","b":[177,94],"m":"lda","oa":94,"o":"(tile_ptr),y"},{"a":14449,"t":"code","b":[157,128,1],"m":"sta","oa":384,"o":"row_visibility,x"},{"a":14452,"t":"code","b":[201,192],"m":"cmp","o":"#$C0"},{"a":14454,"t":"code","b":[176,18],"m":"bcs","oa":14474,"o":"b_388A"},{"a":14456,"t":"code","b":[152],"m":"tya"},{"a":14457,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":14458,"t":"code","b":[168],"m":"tay"},{"a":14459,"t":"code","b":[38,116],"m":"rol","oa":116,"o":"tmp_t"},{"a":14461,"t":"code","b":[185,128,62],"m":"lda","oa":16000,"o":"tile_visibility,y"},{"a":14464,"t":"code","b":[164,116],"m":"ldy","oa":116,"o":"tmp_t"},{"a":14466,"t":"code","b":[57,218,36],"m":"and","oa":9434,"o":"bit_masks_msb,y"},{"a":14469,"t":"code","b":[208,3],"m":"bne","oa":14474,"o":"b_388A"},{"a":14471,"t":"code","b":[157,128,1],"m":"sta","oa":384,"o":"row_visibility,x"},{"a":14474,"l":"b_388A","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[14454,14469]},{"a":14476,"t":"code","b":[188,0,168],"m":"ldy","oa":43008,"o":"point_yaw_hi,x"},{"a":14479,"t":"code","b":[196,7],"m":"cpy","oa":7,"o":"cur_buffer_min_yaw_hi"},{"a":14481,"t":"code","b":[144,19],"m":"bcc","oa":14502,"o":"b_38A6"},{"a":14483,"t":"code","b":[208,10],"m":"bne","oa":14495,"o":"b_389F"},{"a":14485,"t":"code","b":[188,160,11],"m":"ldy","oa":2976,"o":"draw_yaw_lo,x"},{"a":14488,"t":"code","b":[196,40],"m":"cpy","oa":40,"o":"cur_buffer_min_yaw_lo"},{"a":14490,"t":"code","b":[144,10],"m":"bcc","oa":14502,"o":"b_38A6"},{"a":14492,"t":"code","b":[188,0,168],"m":"ldy","oa":43008,"o":"point_yaw_hi,x"},{"a":14495,"l":"b_389F","t":"code","b":[106],"m":"ror","o":"a","x":[14483]},{"a":14496,"t":"code","b":[196,18],"m":"cpy","oa":18,"o":"cur_buffer_max_yaw_hi"},{"a":14498,"t":"code","b":[144,2],"m":"bcc","oa":14502,"o":"b_38A6"},{"a":14500,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":14502,"l":"b_38A6","t":"code","b":[164,15],"m":"ldy","oa":15,"o":"y_save_or_obscured","x":[14481,14490,14498]},{"a":14504,"t":"code","b":[133,127],"m":"sta","oa":127,"o":"tile_onscreen_or_skip_poly"},{"a":14506,"t":"code","b":[170],"m":"tax"},{"a":14507,"t":"code","b":[24],"m":"clc"},{"a":14508,"t":"code","b":[96],"m":"rts"},{"a":14509,"l":"clear_view_rows_1_8","c":"C64 addition. Stores A into every other byte of view rows 1 to 8 of the bitmap at $E000 ($E140-$EB3F), 32 unrolled stores, one per 80-byte quarter row, at offsets X, X-2, ... down to 0 or 1. The pan code ($10B7) calls it twice for a look up or down, X = $4F with A = $55 and X = $4E with A = $00, clearing the 8 character rows it is about to redraw to striped sky: odd pixel lines all colour 1, even lines colour 0.","t":"code","b":[157,64,225],"m":"sta","oa":57664,"o":"f_E140,x","x":[4370,4377,14607]},{"a":14512,"t":"code","b":[157,144,225],"m":"sta","oa":57744,"o":"f_E190,x"},{"a":14515,"t":"code","b":[157,224,225],"m":"sta","oa":57824,"o":"f_E1E0,x"},{"a":14518,"t":"code","b":[157,48,226],"m":"sta","oa":57904,"o":"f_E230,x"},{"a":14521,"t":"code","b":[157,128,226],"m":"sta","oa":57984,"o":"f_E280,x"},{"a":14524,"t":"code","b":[157,208,226],"m":"sta","oa":58064,"o":"f_E2D0,x"},{"a":14527,"t":"code","b":[157,32,227],"m":"sta","oa":58144,"o":"f_E320,x"},{"a":14530,"t":"code","b":[157,112,227],"m":"sta","oa":58224,"o":"f_E370,x"},{"a":14533,"t":"code","b":[157,192,227],"m":"sta","oa":58304,"o":"f_E3C0,x"},{"a":14536,"t":"code","b":[157,16,228],"m":"sta","oa":58384,"o":"f_E410,x"},{"a":14539,"t":"code","b":[157,96,228],"m":"sta","oa":58464,"o":"f_E460,x"},{"a":14542,"t":"code","b":[157,176,228],"m":"sta","oa":58544,"o":"f_E4B0,x"},{"a":14545,"t":"code","b":[157,0,229],"m":"sta","oa":58624,"o":"f_E500,x"},{"a":14548,"t":"code","b":[157,80,229],"m":"sta","oa":58704,"o":"f_E550,x"},{"a":14551,"t":"code","b":[157,160,229],"m":"sta","oa":58784,"o":"f_E5A0,x"},{"a":14554,"t":"code","b":[157,240,229],"m":"sta","oa":58864,"o":"f_E5F0,x"},{"a":14557,"t":"code","b":[157,64,230],"m":"sta","oa":58944,"o":"f_E640,x"},{"a":14560,"t":"code","b":[157,144,230],"m":"sta","oa":59024,"o":"f_E690,x"},{"a":14563,"t":"code","b":[157,224,230],"m":"sta","oa":59104,"o":"f_E6E0,x"},{"a":14566,"t":"code","b":[157,48,231],"m":"sta","oa":59184,"o":"f_E730,x"},{"a":14569,"t":"code","b":[157,128,231],"m":"sta","oa":59264,"o":"f_E780,x"},{"a":14572,"t":"code","b":[157,208,231],"m":"sta","oa":59344,"o":"f_E7D0,x"},{"a":14575,"t":"code","b":[157,32,232],"m":"sta","oa":59424,"o":"f_E820,x"},{"a":14578,"t":"code","b":[157,112,232],"m":"sta","oa":59504,"o":"f_E870,x"},{"a":14581,"t":"code","b":[157,192,232],"m":"sta","oa":59584,"o":"f_E8C0,x"},{"a":14584,"t":"code","b":[157,16,233],"m":"sta","oa":59664,"o":"f_E910,x"},{"a":14587,"t":"code","b":[157,96,233],"m":"sta","oa":59744,"o":"f_E960,x"},{"a":14590,"t":"code","b":[157,176,233],"m":"sta","oa":59824,"o":"f_E9B0,x"},{"a":14593,"t":"code","b":[157,0,234],"m":"sta","oa":59904,"o":"f_EA00,x"},{"a":14596,"t":"code","b":[157,80,234],"m":"sta","oa":59984,"o":"f_EA50,x"},{"a":14599,"t":"code","b":[157,160,234],"m":"sta","oa":60064,"o":"f_EAA0,x"},{"a":14602,"t":"code","b":[157,240,234],"m":"sta","oa":60144,"o":"f_EAF0,x"},{"a":14605,"t":"code","b":[202],"m":"dex"},{"a":14606,"t":"code","b":[202],"m":"dex"},{"a":14607,"t":"code","b":[16,156],"m":"bpl","oa":14509,"o":"clear_view_rows_1_8"},{"a":14609,"t":"code","b":[96],"m":"rts"},{"a":14610,"l":"clear_view_cols_0_15","c":"C64 addition. Stores A into every other byte of the first 128 bytes (character columns 0-15) of view rows 1 to 24 of the bitmap at $E000 (24 unrolled stores, rows $E140 to $FE00), at offsets X, X-2, ... down to 0 or 1. The pan code ($10B7) calls it twice for a pan left or right, X = $7F with A = $55 and X = $7E with A = $00, clearing the 16-column strip it is about to redraw to striped sky.","t":"code","b":[157,64,225],"m":"sta","oa":57664,"o":"f_E140,x","x":[4301,4308,14684]},{"a":14613,"t":"code","b":[157,128,226],"m":"sta","oa":57984,"o":"f_E280,x"},{"a":14616,"t":"code","b":[157,192,227],"m":"sta","oa":58304,"o":"f_E3C0,x"},{"a":14619,"t":"code","b":[157,0,229],"m":"sta","oa":58624,"o":"f_E500,x"},{"a":14622,"t":"code","b":[157,64,230],"m":"sta","oa":58944,"o":"f_E640,x"},{"a":14625,"t":"code","b":[157,128,231],"m":"sta","oa":59264,"o":"f_E780,x"},{"a":14628,"t":"code","b":[157,192,232],"m":"sta","oa":59584,"o":"f_E8C0,x"},{"a":14631,"t":"code","b":[157,0,234],"m":"sta","oa":59904,"o":"f_EA00,x"},{"a":14634,"t":"code","b":[157,64,235],"m":"sta","oa":60224,"o":"f_EB40,x"},{"a":14637,"t":"code","b":[157,128,236],"m":"sta","oa":60544,"o":"f_EC80,x"},{"a":14640,"t":"code","b":[157,192,237],"m":"sta","oa":60864,"o":"f_EDC0,x"},{"a":14643,"t":"code","b":[157,0,239],"m":"sta","oa":61184,"o":"f_EF00,x"},{"a":14646,"t":"code","b":[157,64,240],"m":"sta","oa":61504,"o":"f_F040,x"},{"a":14649,"t":"code","b":[157,128,241],"m":"sta","oa":61824,"o":"f_F180,x"},{"a":14652,"t":"code","b":[157,192,242],"m":"sta","oa":62144,"o":"f_F2C0,x"},{"a":14655,"t":"code","b":[157,0,244],"m":"sta","oa":62464,"o":"f_F400,x"},{"a":14658,"t":"code","b":[157,64,245],"m":"sta","oa":62784,"o":"f_F540,x"},{"a":14661,"t":"code","b":[157,128,246],"m":"sta","oa":63104,"o":"f_F680,x"},{"a":14664,"t":"code","b":[157,192,247],"m":"sta","oa":63424,"o":"f_F7C0,x"},{"a":14667,"t":"code","b":[157,0,249],"m":"sta","oa":63744,"o":"f_F900,x"},{"a":14670,"t":"code","b":[157,64,250],"m":"sta","oa":64064,"o":"f_FA40,x"},{"a":14673,"t":"code","b":[157,128,251],"m":"sta","oa":64384,"o":"f_FB80,x"},{"a":14676,"t":"code","b":[157,192,252],"m":"sta","oa":64704,"o":"f_FCC0,x"},{"a":14679,"t":"code","b":[157,0,254],"m":"sta","oa":65024,"o":"f_FE00,x"},{"a":14682,"t":"code","b":[202],"m":"dex"},{"a":14683,"t":"code","b":[202],"m":"dex"},{"a":14684,"t":"code","b":[16,180],"m":"bpl","oa":14610,"o":"clear_view_cols_0_15"},{"a":14686,"t":"code","b":[96],"m":"rts"},{"a":14687,"t":"gap","n":161},{"a":14848,"l":"row_char_addr_lo","c":"Where each row of the view bitmap goes in the play screen's character sets: low bytes of the address of the row's first character, 25 entries in the order of the row tables at $3D83 (bitmap rows 1-24, then row 0); high bytes at $3A20. Entries 0-4 are rows 1-5 in the $4000 set (characters 40, 80, 120, 160, 200), 5-9 rows 6-10 in $4800 (0-160), 10-14 rows 11-15 in $5000 (200, 0, 40, 80, 120), 15-19 rows 16-20 in $5800 (160, 200, 0, 40, 80), 20-23 rows 21-24 in $6000 (120, 160, 200, 40), and 24 is row 0 at $4000 (0). Read at $8758, $9495, $975D and $97AD. C64 only; the 7 bytes after it are unused.","t":"byte","b":[64,128,192,0,64,0,64,128],"x":[34648,38037,38749,38829]},{"a":14856,"t":"byte","b":[192,0,64,0,64,128,192,0]},{"a":14864,"t":"byte","b":[64,0,64,128,192,0,64,64]},{"a":14872,"t":"byte","b":[0]},{"a":14873,"t":"gap","n":7},{"a":14880,"l":"row_char_addr_hi","c":"High bytes for row_char_addr_lo ($3A00), 25 entries: $41, $42, $43, $45, $46 for the $4000 set, $48-$4D for $4800, and so on to $40 for row 0. Read at $8762, $949C, $9765 and $97B5. C64 only; the 7 bytes after it are unused.","t":"byte","b":[65,66,67,69,70,72,73,74],"x":[34658,38044,38757,38837]},{"a":14888,"t":"byte","b":[75,77,86,80,81,82,83,93]},{"a":14896,"t":"byte","b":[94,88,89,90,99,101,102,97]},{"a":14904,"t":"byte","b":[64]},{"a":14905,"t":"gap","n":7},{"a":14912,"l":"row_second_copy_page","c":"For each entry of $3A00: 0, or the number of pages to a second copy of the same row in the next character set ($08, or $20 for row 0, whose copies are $4000 and $6000). The doubled rows are 5, 10, 15, 20 and 0, the rows the interrupt's character-set switches at raster lines 54, 94, 134, 174 and 214 fall inside (row n spans lines 51+8n to 58+8n), so their characters must exist in both sets. Read at $876A, $94A4, $976F, $977F and $97BC. C64 only; the 7 bytes after it are unused.","t":"byte","b":[0,0,0,0,8,0,0,0],"x":[34666,38052,38767,38783,38844]},{"a":14920,"t":"byte","b":[0,8,0,0,0,0,8,0]},{"a":14928,"t":"byte","b":[0,0,0,8,0,0,0,0]},{"a":14936,"t":"byte","b":[32]},{"a":14937,"t":"gap","n":7},{"a":14944,"l":"row_first_char","c":"The first character code of each screen row 0-24 in the play screen's matrix: 0, 40, 80, 120, 160, 200 repeating every six rows, and 40 for row 24. The matrix fill at $9AB8 produces the same pattern by counting, and no instruction in this image reads this table; the code missing at $B000-$B5FF is the only candidate. C64 only; the bytes after it, to $3AFF, are unused.","t":"byte","b":[0,40,80,120,160,200,0,40]},{"a":14952,"t":"byte","b":[80,120,160,200,0,40,80,120]},{"a":14960,"t":"byte","b":[160,200,0,40,80,120,160,200]},{"a":14968,"t":"byte","b":[40]},{"a":14969,"t":"gap","n":135},{"a":15104,"l":"arctan_lo","c":"Arctangent table, low bytes: entry n (0-256) at $3B00+n is the fractional part of arctan(n/256) in the game's angle units (256 to a full turn); the whole part is at $3C01+n (0-32), so entry 256 is exactly 32, 45 degrees. Checked against the formula for every entry. Read by the angle routine at $0E22-$0E5A, which also uses entry n+1 when further bits of the ratio call for it (flags in $78). The same bytes at the same address as in the BBC program. This label is entry 0.","t":"byte","b":[0],"x":[3618]},{"a":15105,"l":"arctan_lo_1","c":"arctan_lo entries n = 1 to 64 ($3B01-$3B40). The angle routine also reads through this address ($0E38, $0E53) to fetch entry n+1.","t":"byte","b":[41,81,122,163,204,244,29,70],"x":[3640,3667]},{"a":15113,"t":"byte","b":[111,151,192,233,17,58,98,139]},{"a":15121,"t":"byte","b":[180,220,5,45,86,126,167,207]},{"a":15129,"t":"byte","b":[247,32,72,112,153,193,233,17]},{"a":15137,"t":"byte","b":[57,97,137,177,217,1,41,81]},{"a":15145,"t":"byte","b":[120,160,200,239,23,62,102,141]},{"a":15153,"t":"byte","b":[181,220,3,42,81,120,159,198]},{"a":15161,"t":"byte","b":[237,20,59,97,136,174,213,251]},{"a":15169,"l":"arctan_lo_65","c":"arctan_lo entries n = 65 to 128 ($3B41-$3B80).","t":"byte","b":[34,72,110,148,186,224,6,44]},{"a":15177,"t":"byte","b":[81,119,157,194,231,13,50,87]},{"a":15185,"t":"byte","b":[124,161,198,235,16,52,89,125]},{"a":15193,"t":"byte","b":[162,198,234,15,51,86,122,158]},{"a":15201,"t":"byte","b":[194,229,9,44,80,115,150,185]},{"a":15209,"t":"byte","b":[220,255,33,68,103,137,171,206]},{"a":15217,"t":"byte","b":[240,18,52,86,119,153,187,220]},{"a":15225,"t":"byte","b":[253,31,64,97,130,163,195,228]},{"a":15233,"l":"arctan_lo_129","c":"arctan_lo entries n = 129 to 192 ($3B81-$3BC0).","t":"byte","b":[5,37,69,102,134,166,198,230]},{"a":15241,"t":"byte","b":[5,37,68,100,131,162,193,224]},{"a":15249,"t":"byte","b":[255,30,61,91,122,152,183,213]},{"a":15257,"t":"byte","b":[243,17,47,76,106,136,165,194]},{"a":15265,"t":"byte","b":[224,253,26,55,84,112,141,170]},{"a":15273,"t":"byte","b":[198,226,254,27,55,83,110,138]},{"a":15281,"t":"byte","b":[166,193,221,248,19,46,73,100]},{"a":15289,"t":"byte","b":[127,154,180,207,233,4,30,56]},{"a":15297,"l":"arctan_lo_193","c":"arctan_lo entries n = 193 to 256 ($3BC1-$3C00); the last is 0, since arctan(1) is exactly 32 units.","t":"byte","b":[82,108,134,159,185,211,236,5]},{"a":15305,"t":"byte","b":[31,56,81,106,131,156,180,205]},{"a":15313,"t":"byte","b":[229,254,22,46,70,94,118,142]},{"a":15321,"t":"byte","b":[166,190,213,237,4,27,51,74]},{"a":15329,"t":"byte","b":[97,120,142,165,188,211,233,255]},{"a":15337,"t":"byte","b":[22,44,66,88,110,132,154,176]},{"a":15345,"t":"byte","b":[197,219,240,6,27,48,69,90]},{"a":15353,"t":"byte","b":[111,132,153,174,195,215,236,0]},{"a":15361,"l":"arctan_hi","c":"Arctangent table, high bytes: the whole part (0 to 32) of arctan(n/256) in angle units, entry n at $3C01+n, paired with arctan_lo at $3B00+n. The same bytes at the same address as in the BBC program. This label is entry 0.","t":"byte","b":[0],"x":[3623]},{"a":15362,"l":"arctan_hi_1","c":"arctan_hi entries n = 1 to 64 ($3C02-$3C41); also read through this address ($0E3F, $0E5A) as entry n+1.","t":"byte","b":[0,0,0,0,0,0,1,1],"x":[3647,3674]},{"a":15370,"t":"byte","b":[1,1,1,1,2,2,2,2]},{"a":15378,"t":"byte","b":[2,2,3,3,3,3,3,3]},{"a":15386,"t":"byte","b":[3,4,4,4,4,4,4,5]},{"a":15394,"t":"byte","b":[5,5,5,5,5,6,6,6]},{"a":15402,"t":"byte","b":[6,6,6,6,7,7,7,7]},{"a":15410,"t":"byte","b":[7,7,8,8,8,8,8,8]},{"a":15418,"t":"byte","b":[8,9,9,9,9,9,9,9]},{"a":15426,"l":"arctan_hi_65","c":"arctan_hi entries n = 65 to 128 ($3C42-$3C81).","t":"byte","b":[10,10,10,10,10,10,11,11]},{"a":15434,"t":"byte","b":[11,11,11,11,11,12,12,12]},{"a":15442,"t":"byte","b":[12,12,12,12,13,13,13,13]},{"a":15450,"t":"byte","b":[13,13,13,14,14,14,14,14]},{"a":15458,"t":"byte","b":[14,14,15,15,15,15,15,15]},{"a":15466,"t":"byte","b":[15,15,16,16,16,16,16,16]},{"a":15474,"t":"byte","b":[16,17,17,17,17,17,17,17]},{"a":15482,"t":"byte","b":[17,18,18,18,18,18,18,18]},{"a":15490,"l":"arctan_hi_129","c":"arctan_hi entries n = 129 to 192 ($3C82-$3CC1).","t":"byte","b":[19,19,19,19,19,19,19,19]},{"a":15498,"t":"byte","b":[20,20,20,20,20,20,20,20]},{"a":15506,"t":"byte","b":[20,21,21,21,21,21,21,21]},{"a":15514,"t":"byte","b":[21,22,22,22,22,22,22,22]},{"a":15522,"t":"byte","b":[22,22,23,23,23,23,23,23]},{"a":15530,"t":"byte","b":[23,23,23,24,24,24,24,24]},{"a":15538,"t":"byte","b":[24,24,24,24,25,25,25,25]},{"a":15546,"t":"byte","b":[25,25,25,25,25,26,26,26]},{"a":15554,"l":"arctan_hi_193","c":"arctan_hi entries n = 193 to 256 ($3CC2-$3D01); the last is 32.","t":"byte","b":[26,26,26,26,26,26,26,27]},{"a":15562,"t":"byte","b":[27,27,27,27,27,27,27,27]},{"a":15570,"t":"byte","b":[27,27,28,28,28,28,28,28]},{"a":15578,"t":"byte","b":[28,28,28,28,29,29,29,29]},{"a":15586,"t":"byte","b":[29,29,29,29,29,29,29,29]},{"a":15594,"t":"byte","b":[30,30,30,30,30,30,30,30]},{"a":15602,"t":"byte","b":[30,30,30,31,31,31,31,31]},{"a":15610,"t":"byte","b":[31,31,31,31,31,31,31,32]},{"a":15618,"l":"tan_half_angle","c":"Half-angle tangents: entry n (0-128) is 512 * tan(arctan(n/128) / 2), rounded (0 to 212); checked against the formula for every entry. The hypotenuse routine $937F looks it up (at $9388) with the ratio of the shorter to the longer side and adds the shorter side times this factor to the longer side. The same bytes at the same address as in the BBC program. This label is n = 0-63.","t":"byte","b":[0,2,4,6,8,10,12,14],"x":[37768]},{"a":15626,"t":"byte","b":[16,18,20,22,24,26,28,30]},{"a":15634,"t":"byte","b":[32,34,36,38,40,42,44,46]},{"a":15642,"t":"byte","b":[48,50,51,53,55,57,59,61]},{"a":15650,"t":"byte","b":[63,65,67,69,71,73,74,76]},{"a":15658,"t":"byte","b":[78,80,82,84,86,87,89,91]},{"a":15666,"t":"byte","b":[93,95,96,98,100,102,104,105]},{"a":15674,"t":"byte","b":[107,109,111,112,114,116,117,119]},{"a":15682,"l":"tan_half_angle_64","c":"tan_half_angle entries n = 64 to 128 ($3D42-$3D82).","t":"byte","b":[121,123,124,126,128,129,131,132]},{"a":15690,"t":"byte","b":[134,136,137,139,141,142,144,145]},{"a":15698,"t":"byte","b":[147,148,150,151,153,155,156,158]},{"a":15706,"t":"byte","b":[159,161,162,163,165,166,168,169]},{"a":15714,"t":"byte","b":[171,172,173,175,176,178,179,180]},{"a":15722,"t":"byte","b":[182,183,184,186,187,188,190,191]},{"a":15730,"t":"byte","b":[192,194,195,196,197,199,200,201]},{"a":15738,"t":"byte","b":[202,204,205,206,207,209,210,211]},{"a":15746,"t":"byte","b":[212]},{"a":15747,"l":"bitmap_row_lo","c":"Low bytes of the address of each character row of the view bitmap at $E000 (320 bytes a row), 25 entries in the order rows 1-24, then row 0: $E140, $E280, ... $FE00, $E000; high bytes at $3DB5. Read by the drawing code ($2235, $22D0) and by the picture copy ($98D3). C64 values: the BBC table here held rows of the BBC's screen memory.","t":"byte","b":[64,128,192,0,64,128,192,0],"x":[8757,8912,39123]},{"a":15755,"t":"byte","b":[64,128,192,0,64,128,192,0]},{"a":15763,"t":"byte","b":[64,128,192,0,64,128,192,0]},{"a":15771,"t":"byte","b":[0]},{"a":15772,"l":"bitmap_row_lo_copy","c":"A second copy of the bitmap row low bytes, identical to $3D83; read at $8727. On the BBC this table addressed the rows of an off-screen buffer; the C64 draws into the one bitmap at $E000, so both tables hold the same addresses.","t":"byte","b":[64,128,192,0,64,128,192,0],"x":[34599]},{"a":15780,"t":"byte","b":[64,128,192,0,64,128,192,0]},{"a":15788,"t":"byte","b":[64,128,192,0,64,128,192,0]},{"a":15796,"t":"byte","b":[0]},{"a":15797,"l":"bitmap_row_hi","c":"High bytes for bitmap_row_lo: $E1, $E2, $E3, $E5 ... $FE, then $E0 for row 0. Read at $223A, $22D9 and $98D8. C64 values.","t":"byte","b":[225,226,227,229,230,231,232,234],"x":[8762,8921,39128]},{"a":15805,"t":"byte","b":[235,236,237,239,240,241,242,244]},{"a":15813,"t":"byte","b":[245,246,247,249,250,251,252,254]},{"a":15821,"t":"byte","b":[224]},{"a":15822,"l":"bitmap_row_hi_copy","c":"High bytes for bitmap_row_lo_copy, identical to $3DB5; read at $8730. The 25 bytes after this table ($3DE7-$3DFF) are the BBC's sights stash, unchanged and unused: the C64's sights are a sprite.","t":"byte","b":[225,226,227,229,230,231,232,234],"x":[34608]},{"a":15830,"t":"byte","b":[235,236,237,239,240,241,242,244]},{"a":15838,"t":"byte","b":[245,246,247,249,250,251,252,254]},{"a":15846,"t":"byte","b":[224]},{"a":15847,"t":"gap","n":25},{"a":15872,"l":"edge_pixels_left","c":"Left-edge pixel bytes for filling polygons: 16 groups of 4, chosen by the polygon colour byte, a multiple of 4 whose bits 4-5 are the edge colour and bits 2-3 the fill colour. Entry x (0-3) of a group has multicolour pixel x in the edge colour and pixels x+1 to 3 in the fill colour (pixels left of x are 0, to be kept from the screen). The drawing code patches the colour byte into the low byte of ORA $3E3C,X at $235E and $23BE ($22F3, $22F6). C64 values for two-bit pixels (pixel 0 in bits 7-6); the BBC's table here was for its own pixel layout. This label is groups 0-14.","t":"byte","b":[0,0,0,0,21,5,1,0]},{"a":15880,"t":"byte","b":[42,10,2,0,63,15,3,0]},{"a":15888,"t":"byte","b":[64,16,4,1,85,21,5,1]},{"a":15896,"t":"byte","b":[106,26,6,1,127,31,7,1]},{"a":15904,"t":"byte","b":[128,32,8,2,149,37,9,2]},{"a":15912,"t":"byte","b":[170,42,10,2,191,47,11,2]},{"a":15920,"t":"byte","b":[192,48,12,3,213,53,13,3]},{"a":15928,"t":"byte","b":[234,58,14,3]},{"a":15932,"l":"edge_left_colour_3c","c":"Group 15 of edge_pixels_left, colour byte $3C (edge and fill both colour 3): $FF, $3F, $0F, $03. The operands at $235F and $23BF hold $3C in this image because $3C was the last colour byte patched in, which is why a symbol sits here.","t":"byte","b":[255,63,15,3],"x":[9054,9150]},{"a":15936,"l":"edge_pixels_right","c":"Right-edge pixel bytes, laid out like edge_pixels_left: entry x of a group has pixels 0 to x-1 in the fill colour, pixel x in the edge colour and pixels right of x 0. Reached through ORA $3E7C,X at $2399, whose operand low byte is the colour byte OR $40 ($22F9-$22FB). C64 values. This label is groups 0-14.","t":"byte","b":[0,0,0,0,0,64,80,84]},{"a":15944,"t":"byte","b":[0,128,160,168,0,192,240,252]},{"a":15952,"t":"byte","b":[64,16,4,1,64,80,84,85]},{"a":15960,"t":"byte","b":[64,144,164,169,64,208,244,253]},{"a":15968,"t":"byte","b":[128,32,8,2,128,96,88,86]},{"a":15976,"t":"byte","b":[128,160,168,170,128,224,248,254]},{"a":15984,"t":"byte","b":[192,48,12,3,192,112,92,87]},{"a":15992,"t":"byte","b":[192,176,172,171]},{"a":15996,"l":"edge_right_colour_3c","c":"Group 15 of edge_pixels_right, colour byte $3C: $C0, $F0, $FC, $FF. The operand at $239A holds $7C in this image, hence the symbol.","t":"byte","b":[192,240,252,255],"x":[9113]},{"a":16000,"l":"tile_visibility","c":"One bit per tile, set when the tile can be seen from the player's position. Tile (x, z) is bit $80 >> ((x AND 3)*2 + (z AND 1)) of byte $3E80 + (x DIV 4)*16 + z DIV 2, so this half holds x = 0-15. Built by the visibility pass $245B (cleared at $2466, bits set at $24CF), set to all $FF by $1185 and cleared by $1404; read at $24C8, $2911 and $387D. Working data, $FF throughout in the hand-over image; at the same address as in the BBC program.","t":"byte","b":[255,255,255,255,255,255,255,255],"x":[4485,5124,9318,9416,9423,10513,14461]},{"a":16008,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16016,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16024,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16032,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16040,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16048,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16056,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16064,"l":"tile_visibility_x16","c":"Second half of tile_visibility: the tiles with x = 16-31 (also set to $FF at $1188).","t":"byte","b":[255,255,255,255,255,255,255,255],"x":[4488]},{"a":16072,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16080,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16088,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16096,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16104,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16112,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16120,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":16128,"l":"game_entry","c":"The game's entry, run once. Calls the machine set-up ($8900), sets bit 7 of $0CFC (no game in progress), points the IRQ vector at the play interrupt $95E9, clears the four sprite shapes at $7000-$70FF, sets the sprite pointers ($7FF8-$7FFB = $C0-$C3: shapes at $7000, $7040, $7080, $70C0), draws the sights cross into sprite 0's shape, turns multicolour on for sprites 0-3, puts sprites 1-3 side by side at the top right (x = 264, 288, 312; y = 51) in white for the scanner and sprite 0 at y = 154, sets the five bytes of the random generator's register $0C7B-$0C7F to 1, runs the generator ($31CA) 256 times, stores its next 256 bytes at $0200-$02FF (the scanner's specks, read at $1670), and jumps to the title loop ($1017). All C64: the BBC program has its own machine set-up at $3F04. Once a landscape is generated, $14C7 writes the secret-code stash from $3F00 up over this spent code (checked by the code around $255B); in the play snapshot $3F8D-$3FB7 differ.","t":"code","b":[32,0,137],"m":"jsr","oa":35072,"o":"init_machine","x":[5319]},{"a":16131,"t":"code","b":[56],"m":"sec"},{"a":16132,"t":"code","b":[110,252,12],"m":"ror","oa":3324,"o":"not_in_game"},{"a":16135,"t":"code","b":[120],"m":"sei"},{"a":16136,"s":"IRQ vector to the play interrupt $95E9","t":"code","b":[169,149],"m":"lda","o":"#$95"},{"a":16138,"t":"code","b":[141,255,255],"m":"sta","oa":65535,"o":"$FFFF"},{"a":16141,"t":"code","b":[169,233],"m":"lda","o":"#$E9"},{"a":16143,"t":"code","b":[141,254,255],"m":"sta","oa":65534,"o":"$FFFE"},{"a":16146,"t":"code","b":[88],"m":"cli"},{"a":16147,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":16149,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":16151,"l":"b_3F17","t":"code","b":[157,0,112],"m":"sta","oa":28672,"o":"sights_sprite,x","x":[16155]},{"a":16154,"t":"code","b":[202],"m":"dex"},{"a":16155,"t":"code","b":[208,250],"m":"bne","oa":16151,"o":"b_3F17"},{"a":16157,"t":"code","b":[169,192],"m":"lda","o":"#$C0"},{"a":16159,"t":"code","b":[141,248,127],"m":"sta","oa":32760,"o":"sprite0_ptr"},{"a":16162,"t":"code","b":[169,193],"m":"lda","o":"#$C1"},{"a":16164,"t":"code","b":[141,249,127],"m":"sta","oa":32761,"o":"sprite1_ptr"},{"a":16167,"t":"code","b":[169,194],"m":"lda","o":"#$C2"},{"a":16169,"t":"code","b":[141,250,127],"m":"sta","oa":32762,"o":"sprite2_ptr"},{"a":16172,"t":"code","b":[169,195],"m":"lda","o":"#$C3"},{"a":16174,"t":"code","b":[141,251,127],"m":"sta","oa":32763,"o":"sprite3_ptr"},{"a":16177,"s":"sights cross, vertical bar: alternate rows $20 and $10","t":"code","b":[169,32],"m":"lda","o":"#$20"},{"a":16179,"t":"code","b":[141,1,112],"m":"sta","oa":28673,"o":"sights_row0_mid"},{"a":16182,"t":"code","b":[141,7,112],"m":"sta","oa":28679,"o":"sights_row2_mid"},{"a":16185,"t":"code","b":[141,13,112],"m":"sta","oa":28685,"o":"sights_row4_mid"},{"a":16188,"t":"code","b":[141,19,112],"m":"sta","oa":28691,"o":"sights_row6_mid"},{"a":16191,"t":"code","b":[141,25,112],"m":"sta","oa":28697,"o":"sights_row8_mid"},{"a":16194,"t":"code","b":[141,31,112],"m":"sta","oa":28703,"o":"sights_row10_mid"},{"a":16197,"t":"code","b":[169,16],"m":"lda","o":"#$10"},{"a":16199,"t":"code","b":[141,4,112],"m":"sta","oa":28676,"o":"sights_row1_mid"},{"a":16202,"t":"code","b":[141,10,112],"m":"sta","oa":28682,"o":"sights_row3_mid"},{"a":16205,"t":"code","b":[141,22,112],"m":"sta","oa":28694,"o":"sights_row7_mid"},{"a":16208,"t":"code","b":[141,28,112],"m":"sta","oa":28700,"o":"sights_row9_mid"},{"a":16211,"s":"sights cross, horizontal bar in row 5","t":"code","b":[169,153],"m":"lda","o":"#$99"},{"a":16213,"t":"code","b":[141,15,112],"m":"sta","oa":28687,"o":"sights_row5_left"},{"a":16216,"t":"code","b":[169,153],"m":"lda","o":"#$99"},{"a":16218,"t":"code","b":[141,16,112],"m":"sta","oa":28688,"o":"sights_row5_mid"},{"a":16221,"t":"code","b":[169,152],"m":"lda","o":"#$98"},{"a":16223,"t":"code","b":[141,17,112],"m":"sta","oa":28689,"o":"sights_row5_right"},{"a":16226,"s":"sprites 1-3: x bit 8 set (x = 264, 288, 312)","t":"code","b":[169,14],"m":"lda","o":"#$0E"},{"a":16228,"t":"code","b":[141,16,208],"m":"sta","o":"vic_sprite_x_msb"},{"a":16231,"t":"code","b":[169,15],"m":"lda","o":"#$0F"},{"a":16233,"t":"code","b":[141,28,208],"m":"sta","o":"vic_sprite_multicolour"},{"a":16236,"t":"code","b":[169,8],"m":"lda","o":"#$08"},{"a":16238,"t":"code","b":[141,2,208],"m":"sta","o":"vic_sprite1_x"},{"a":16241,"t":"code","b":[169,32],"m":"lda","o":"#$20"},{"a":16243,"t":"code","b":[141,4,208],"m":"sta","o":"vic_sprite2_x"},{"a":16246,"t":"code","b":[169,56],"m":"lda","o":"#$38"},{"a":16248,"t":"code","b":[141,6,208],"m":"sta","o":"vic_sprite3_x"},{"a":16251,"t":"code","b":[169,51],"m":"lda","o":"#$33"},{"a":16253,"t":"code","b":[141,3,208],"m":"sta","o":"vic_sprite1_y"},{"a":16256,"t":"code","b":[141,5,208],"m":"sta","o":"vic_sprite2_y"},{"a":16259,"t":"code","b":[141,7,208],"m":"sta","o":"vic_sprite3_y"},{"a":16262,"t":"code","b":[169,154],"m":"lda","o":"#$9A"},{"a":16264,"t":"code","b":[141,1,208],"m":"sta","o":"vic_sprite0_y"},{"a":16267,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":16269,"t":"code","b":[141,40,208],"m":"sta","o":"vic_sprite1_colour"},{"a":16272,"t":"code","b":[141,41,208],"m":"sta","o":"vic_sprite2_colour"},{"a":16275,"t":"code","b":[141,42,208],"m":"sta","o":"vic_sprite3_colour"},{"a":16278,"t":"code","b":[162,4],"m":"ldx","o":"#$04"},{"a":16280,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":16282,"l":"b_3F9A","t":"code","b":[157,123,12],"m":"sta","oa":3195,"o":"seed_reg_0,x","x":[16286]},{"a":16285,"t":"code","b":[202],"m":"dex"},{"a":16286,"t":"code","b":[16,250],"m":"bpl","oa":16282,"o":"b_3F9A"},{"a":16288,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":16290,"l":"b_3FA2","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[16294]},{"a":16293,"t":"code","b":[202],"m":"dex"},{"a":16294,"t":"code","b":[208,250],"m":"bne","oa":16290,"o":"b_3FA2"},{"a":16296,"l":"b_3FA8","s":"256 random bytes for the scanner's specks","t":"code","b":[32,202,49],"m":"jsr","oa":12746,"o":"next_seed","x":[16303]},{"a":16299,"t":"code","b":[157,0,2],"m":"sta","oa":512,"o":"random_bytes,x"},{"a":16302,"t":"code","b":[202],"m":"dex"},{"a":16303,"t":"code","b":[208,247],"m":"bne","oa":16296,"o":"b_3FA8"},{"a":16305,"t":"code","b":[76,23,16],"m":"jmp","oa":4119,"o":"title_loop"},{"a":16308,"t":"gap","n":12364},{"a":18304,"t":"note","l":"view_set0_icon_glyphs","c":"Characters $F0-$F9 of the first view character set ($4000): the icon and scanner-frame glyphs of the top row, copied from $ABB0 into all five sets by $98E8-$98FD.","note":"outside the tracked image","x":[39149]},{"a":20352,"t":"note","l":"view_set1_icon_glyphs","c":"Characters $F0-$F9 of the $4800 set: the icon glyphs (copied by $98F0).","note":"outside the tracked image","x":[39152]},{"a":22400,"t":"note","l":"view_set2_icon_glyphs","c":"Characters $F0-$F9 of the $5000 set: the icon glyphs (copied by $98F3).","note":"outside the tracked image","x":[39155]},{"a":24448,"t":"note","l":"view_set3_icon_glyphs","c":"Characters $F0-$F9 of the $5800 set: the icon glyphs (copied by $98F6).","note":"outside the tracked image","x":[39158]},{"a":26496,"t":"note","l":"view_set4_icon_glyphs","c":"Characters $F0-$F9 of the $6000 set: the icon glyphs (copied by $98F9).","note":"outside the tracked image","x":[39161]},{"a":28672,"l":"sights_sprite","c":"Sprite 0's shape (pointer $C0), the sights: a cross 11 lines high whose vertical bar is the middle byte of rows 0-10 ($20 and $10 alternately, one multicolour pixel in the sprite's own colour, then in multicolour 0) and whose horizontal bar is row 5 ($99 $99 $98, the two colours alternating across 11 pixels); with the colours $98FF-$9909 sets (white and black) it shows on any ground. The entry clears $7000-$70FF and writes the cross ($3F13-$3F5F); $99DC places and shows the sprite, $9A3C hides it. This label is row 0's left byte (0).","t":"byte","b":[0],"x":[16151]},{"a":28673,"l":"sights_row0_mid","c":"Sights sprite, row 0: the middle byte, $20, part of the vertical bar (written at $3F33); then row 0's right byte and row 1's left byte, both 0.","t":"byte","b":[32,0,0],"x":[16179]},{"a":28676,"l":"sights_row1_mid","c":"Sights sprite, row 1: the middle byte, $10, part of the vertical bar (written at $3F47); then row 1's right byte and row 2's left byte, both 0.","t":"byte","b":[16,0,0],"x":[16199]},{"a":28679,"l":"sights_row2_mid","c":"Sights sprite, row 2: the middle byte, $20, part of the vertical bar (written at $3F36); then row 2's right byte and row 3's left byte, both 0.","t":"byte","b":[32,0,0],"x":[16182]},{"a":28682,"l":"sights_row3_mid","c":"Sights sprite, row 3: the middle byte, $10, part of the vertical bar (written at $3F4A); then row 3's right byte and row 4's left byte, both 0.","t":"byte","b":[16,0,0],"x":[16202]},{"a":28685,"l":"sights_row4_mid","c":"Sights sprite, row 4: the middle byte, $20, the vertical bar just above the crossing (written at $3F39); then row 4's right byte, 0.","t":"byte","b":[32,0],"x":[16185]},{"a":28687,"l":"sights_row5_left","c":"Sights sprite, row 5 (the horizontal bar), left byte: $99, pixels in the sprite's colour and multicolour 0 alternately (written at $3F55).","t":"byte","b":[153],"x":[16213]},{"a":28688,"l":"sights_row5_mid","c":"Sights sprite, row 5, middle byte: $99, the centre of the cross (written at $3F5A).","t":"byte","b":[153],"x":[16218]},{"a":28689,"l":"sights_row5_right","c":"Sights sprite, row 5, right byte: $98, the horizontal bar's last three pixels and an empty one (written at $3F5F); then row 6's left byte, 0.","t":"byte","b":[152,0],"x":[16223]},{"a":28691,"l":"sights_row6_mid","c":"Sights sprite, row 6: the middle byte, $20, part of the vertical bar (written at $3F3C); then row 6's right byte and row 7's left byte, both 0.","t":"byte","b":[32,0,0],"x":[16188]},{"a":28694,"l":"sights_row7_mid","c":"Sights sprite, row 7: the middle byte, $10, part of the vertical bar (written at $3F4D); then row 7's right byte and row 8's left byte, both 0.","t":"byte","b":[16,0,0],"x":[16205]},{"a":28697,"l":"sights_row8_mid","c":"Sights sprite, row 8: the middle byte, $20, part of the vertical bar (written at $3F3F); then row 8's right byte and row 9's left byte, both 0.","t":"byte","b":[32,0,0],"x":[16191]},{"a":28700,"l":"sights_row9_mid","c":"Sights sprite, row 9: the middle byte, $10, part of the vertical bar (written at $3F50); then row 9's right byte and row 10's left byte, both 0.","t":"byte","b":[16,0,0],"x":[16208]},{"a":28703,"l":"sights_row10_mid","c":"Sights sprite, row 10: the middle byte, $20, the bottom of the vertical bar (written at $3F42); after it row 10's right byte, rows 11-20 and the shape's unused 64th byte ($7020-$703F), all 0.","t":"byte","b":[32,0,0,0,0,0,0,0],"x":[16194]},{"a":28711,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28719,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28727,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28735,"t":"byte","b":[0]},{"a":28736,"l":"scanner_sprite_1","c":"Sprite 1's shape (pointer $C1), the left part of the scanner at the top right (x = 264, y = 51). Cleared by the entry; the scanner update ($1635-$169D) writes speck bytes, chosen from its patterns at $16A1 by the random bytes at $0200, into rows 0-3 ($7040-$704B); the rest stays 0.","t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28744,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28752,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28760,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28768,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28776,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28784,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28792,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28800,"l":"scanner_sprite_2","c":"Sprite 2's shape (pointer $C2), the middle part of the scanner (x = 288): rows 0-3 ($7080-$708B) get speck bytes from the scanner update at $1635; the rest stays 0.","t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28808,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28816,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28824,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28832,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28840,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28848,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28856,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28864,"l":"scanner_sprite_3","c":"Sprite 3's shape (pointer $C3), the right part of the scanner (x = 312): only the first two bytes of rows 0-3 get specks, so the scanner is 8 bytes (64 screen pixels) wide and 4 lines high across the three sprites, inside the frame characters at columns 29-38 of the icon row. The rest stays 0.","t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28872,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28880,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28888,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28896,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28904,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28912,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28920,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":28928,"t":"gap","n":4096},{"a":31744,"t":"note","l":"play_matrix","c":"The play screen's matrix (VIC bank 1, $D018 = $F0). $9AB8 fills it: characters 0-239 in order, four times, then 40-79 for row 24; row 0 then holds the icon characters $F0-$F9, written at $9580 (and set to $F0 throughout by $87BE).","note":"outside the tracked image","x":[34750,38272]},{"a":32760,"t":"note","l":"sprite0_ptr","c":"Sprite 0 pointer: $C0, the sights shape at $7000 (set at $3F1F).","note":"outside the tracked image","x":[16159]},{"a":32761,"t":"note","l":"sprite1_ptr","c":"Sprite 1 pointer: $C1, scanner shape at $7040 (set at $3F24).","note":"outside the tracked image","x":[16164]},{"a":32762,"t":"note","l":"sprite2_ptr","c":"Sprite 2 pointer: $C2, scanner shape at $7080 (set at $3F29).","note":"outside the tracked image","x":[16169]},{"a":32763,"t":"note","l":"sprite3_ptr","c":"Sprite 3 pointer: $C3, scanner shape at $70C0 (set at $3F2E).","note":"outside the tracked image","x":[16174]},{"a":33024,"l":"font_20","c":"The text font: the BBC Micro's own 8 x 8 characters, character n at $8000 + 8n for n = $20 to $7E. OSWRCH computes the address at $8BDC-$8BEC; codes below $20 are VDU controls and $7F a delete, so $8000-$80FF and the $7F slot at $83F8 are never drawn. $8100-$813F: space ! \" # $ % & '.","t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":33032,"t":"byte","b":[24,24,24,24,24,0,24,0]},{"a":33040,"t":"byte","b":[108,108,108,0,0,0,0,0]},{"a":33048,"t":"byte","b":[54,54,127,54,127,54,54,0]},{"a":33056,"t":"byte","b":[12,63,104,62,11,126,24,0]},{"a":33064,"t":"byte","b":[96,102,12,24,48,102,6,0]},{"a":33072,"t":"byte","b":[56,108,108,56,109,102,59,0]},{"a":33080,"t":"byte","b":[12,24,48,0,0,0,0,0]},{"a":33088,"l":"font_28","c":"Font characters $28-$2F: ( ) * + , - . /.","t":"byte","b":[12,24,48,48,48,24,12,0]},{"a":33096,"t":"byte","b":[48,24,12,12,12,24,48,0]},{"a":33104,"t":"byte","b":[0,24,126,60,126,24,0,0]},{"a":33112,"t":"byte","b":[0,24,24,126,24,24,0,0]},{"a":33120,"t":"byte","b":[0,0,0,0,0,24,24,48]},{"a":33128,"t":"byte","b":[0,0,0,126,0,0,0,0]},{"a":33136,"t":"byte","b":[0,0,0,0,0,24,24,0]},{"a":33144,"t":"byte","b":[0,6,12,24,48,96,0,0]},{"a":33152,"l":"font_30","c":"Font characters $30-$37: the digits 0 to 7.","t":"byte","b":[60,102,110,126,118,102,60,0]},{"a":33160,"t":"byte","b":[24,56,24,24,24,24,126,0]},{"a":33168,"t":"byte","b":[60,102,6,12,24,48,126,0]},{"a":33176,"t":"byte","b":[60,102,6,28,6,102,60,0]},{"a":33184,"t":"byte","b":[12,28,60,108,126,12,12,0]},{"a":33192,"t":"byte","b":[126,96,124,6,6,102,60,0]},{"a":33200,"t":"byte","b":[28,48,96,124,102,102,60,0]},{"a":33208,"t":"byte","b":[126,6,12,24,48,48,48,0]},{"a":33216,"l":"font_38","c":"Font characters $38-$3F: 8 9 : ; < = > ?.","t":"byte","b":[60,102,102,60,102,102,60,0]},{"a":33224,"t":"byte","b":[60,102,102,62,6,12,56,0]},{"a":33232,"t":"byte","b":[0,0,24,24,0,24,24,0]},{"a":33240,"t":"byte","b":[0,0,24,24,0,24,24,48]},{"a":33248,"t":"byte","b":[12,24,48,96,48,24,12,0]},{"a":33256,"t":"byte","b":[0,0,126,0,126,0,0,0]},{"a":33264,"t":"byte","b":[48,24,12,6,12,24,48,0]},{"a":33272,"t":"byte","b":[60,102,12,24,24,0,24,0]},{"a":33280,"l":"font_40","c":"Font characters $40-$47: @ A B C D E F G.","t":"byte","b":[60,102,110,106,110,96,60,0]},{"a":33288,"t":"byte","b":[60,102,102,126,102,102,102,0]},{"a":33296,"t":"byte","b":[124,102,102,124,102,102,124,0]},{"a":33304,"t":"byte","b":[60,102,96,96,96,102,60,0]},{"a":33312,"t":"byte","b":[120,108,102,102,102,108,120,0]},{"a":33320,"t":"byte","b":[126,96,96,124,96,96,126,0]},{"a":33328,"t":"byte","b":[126,96,96,124,96,96,96,0]},{"a":33336,"t":"byte","b":[60,102,96,110,102,102,60,0]},{"a":33344,"l":"font_48","c":"Font characters $48-$4F: H I J K L M N O.","t":"byte","b":[102,102,102,126,102,102,102,0]},{"a":33352,"t":"byte","b":[126,24,24,24,24,24,126,0]},{"a":33360,"t":"byte","b":[62,12,12,12,12,108,56,0]},{"a":33368,"t":"byte","b":[102,108,120,112,120,108,102,0]},{"a":33376,"t":"byte","b":[96,96,96,96,96,96,126,0]},{"a":33384,"t":"byte","b":[99,119,127,107,107,99,99,0]},{"a":33392,"t":"byte","b":[102,102,118,126,110,102,102,0]},{"a":33400,"t":"byte","b":[60,102,102,102,102,102,60,0]},{"a":33408,"l":"font_50","c":"Font characters $50-$57: P Q R S T U V W.","t":"byte","b":[124,102,102,124,96,96,96,0]},{"a":33416,"t":"byte","b":[60,102,102,102,106,108,54,0]},{"a":33424,"t":"byte","b":[124,102,102,124,108,102,102,0]},{"a":33432,"t":"byte","b":[60,102,96,60,6,102,60,0]},{"a":33440,"t":"byte","b":[126,24,24,24,24,24,24,0]},{"a":33448,"t":"byte","b":[102,102,102,102,102,102,60,0]},{"a":33456,"t":"byte","b":[102,102,102,102,102,60,24,0]},{"a":33464,"t":"byte","b":[99,99,107,107,127,119,99,0]},{"a":33472,"l":"font_58","c":"Font characters $58-$5C: X Y Z [ \\ (to $82E7).","t":"byte","b":[102,102,60,24,60,102,102,0]},{"a":33480,"t":"byte","b":[102,102,102,60,24,24,24,0]},{"a":33488,"t":"byte","b":[126,6,12,24,48,96,126,0]},{"a":33496,"t":"byte","b":[124,96,96,96,96,96,124,0]},{"a":33504,"t":"byte","b":[0,96,48,24,12,6,0,0]},{"a":33512,"l":"font_5d_arrow","c":"Font characters $5D and $5E: at start $89C5 replaces the ']' glyph with a right-pointing arrow (00 08 04 3E 04 08 00 00); '^' is unchanged. Where the game prints the arrow was not found.","t":"byte","b":[0,8,4,62,4,8,0,0],"x":[35274]},{"a":33520,"t":"byte","b":[24,60,102,66,0,0,0,0]},{"a":33528,"l":"font_5f_dash","c":"Font character $5F: at start $89C5 replaces '_' with a short dash across the middle of the cell (row 3 = $7C).","t":"byte","b":[0,0,0,124,0,0,0,0],"x":[35280]},{"a":33536,"l":"font_60","c":"Font characters $60-$67: the pound sign (the BBC Micro's character $60) and a b c d e f g.","t":"byte","b":[28,54,48,124,48,48,126,0]},{"a":33544,"t":"byte","b":[0,0,60,6,62,102,62,0]},{"a":33552,"t":"byte","b":[96,96,124,102,102,102,124,0]},{"a":33560,"t":"byte","b":[0,0,60,102,96,102,60,0]},{"a":33568,"t":"byte","b":[6,6,62,102,102,102,62,0]},{"a":33576,"t":"byte","b":[0,0,60,102,126,96,60,0]},{"a":33584,"t":"byte","b":[28,48,48,124,48,48,48,0]},{"a":33592,"t":"byte","b":[0,0,62,102,102,62,6,60]},{"a":33600,"l":"font_68","c":"Font characters $68-$6F: h i j k l m n o.","t":"byte","b":[96,96,124,102,102,102,102,0]},{"a":33608,"t":"byte","b":[24,0,56,24,24,24,60,0]},{"a":33616,"t":"byte","b":[24,0,56,24,24,24,24,112]},{"a":33624,"t":"byte","b":[96,96,102,108,120,108,102,0]},{"a":33632,"t":"byte","b":[56,24,24,24,24,24,60,0]},{"a":33640,"t":"byte","b":[0,0,54,127,107,107,99,0]},{"a":33648,"t":"byte","b":[0,0,124,102,102,102,102,0]},{"a":33656,"t":"byte","b":[0,0,60,102,102,102,60,0]},{"a":33664,"l":"font_70","c":"Font characters $70-$77: p q r s t u v w.","t":"byte","b":[0,0,124,102,102,124,96,96]},{"a":33672,"t":"byte","b":[0,0,62,102,102,62,6,7]},{"a":33680,"t":"byte","b":[0,0,108,118,96,96,96,0]},{"a":33688,"t":"byte","b":[0,0,62,96,60,6,124,0]},{"a":33696,"t":"byte","b":[48,48,124,48,48,48,28,0]},{"a":33704,"t":"byte","b":[0,0,102,102,102,102,62,0]},{"a":33712,"t":"byte","b":[0,0,102,102,102,60,24,0]},{"a":33720,"t":"byte","b":[0,0,99,107,107,127,54,0]},{"a":33728,"l":"font_78","c":"Font characters $78-$7A: x y z (to $83D7).","t":"byte","b":[0,0,102,60,24,60,102,0]},{"a":33736,"t":"byte","b":[0,0,102,102,102,62,6,60]},{"a":33744,"t":"byte","b":[0,0,126,12,24,48,126,0]},{"a":33752,"l":"font_7b_blocks","c":"Font character $7B: at start $89C5 replaces '{' with a pattern of 4-pixel blocks, rows F0 F0 0F 0F 0F F0 F0 00.","t":"byte","b":[240,240,15,15,15,240,240,0],"x":[35286]},{"a":33760,"l":"font_7c_blocks","c":"Font characters $7C-$7F: at start $89C5 replaces '|' with the blocks F0 F0 00 00 00 F0 F0 00; then '}', '~', and the $7F slot, which OSWRCH never draws.","t":"byte","b":[240,240,0,0,0,240,240,0],"x":[35292]},{"a":33768,"t":"byte","b":[48,24,24,14,24,24,48,0]},{"a":33776,"t":"byte","b":[251,0,0,0,0,0,0,0]},{"a":33784,"t":"byte","b":[48,24,12,6,12,24,48,0]},{"a":33792,"l":"unused_rts","c":"A lone RTS that nothing calls or jumps to; the BBC program has the same unused byte just before its GetObjectAngles (at $5C00 there, this block's BBC address).","t":"byte","b":[96]},{"a":33793,"l":"get_object_angles","c":"Measures object Y as seen from the viewing object $6E: records its number ($6F) and type ($0A40,Y into $4C), gets the x/z and height offsets between them ($85C4, $85F5) and the direction to it ($9287), then stores the yaw relative to the left edge of the view (direction minus the viewer's yaw $09C0,X and $1F, plus 10) in $0C57/$0C59, the object's own facing relative to that direction in $5A/$59, the distance ($937F) in $0C5D/$0C5E and the height offset in $0C5B/$0C5C. When $141F is 0 (the landscape preview) the object is turned to face the viewer ($5A/$59 = $80/$00) and drawn at double size by halving its distance and height offset (and adding $70 to the height's low byte). Callers: $189F, $20A1, $8533. The BBC routine (+$2800) with one C64 change: the test for object #63, the Sentinel's tower, now comes before the turn, so in the preview the tower keeps its own facing; the BBC turned it too and only skipped the doubling.","t":"code","b":[132,111],"m":"sty","oa":111,"o":"obj_measured","x":[6303,8353,34099]},{"a":33795,"t":"code","b":[185,64,10],"m":"lda","oa":2624,"o":"obj_type,y"},{"a":33798,"t":"code","b":[133,76],"m":"sta","oa":76,"o":"obj_type_measured"},{"a":33800,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":33802,"t":"code","b":[32,196,133],"m":"jsr","oa":34244,"o":"object_xz_delta"},{"a":33805,"t":"code","b":[32,245,133],"m":"jsr","oa":34293,"o":"object_height_delta"},{"a":33808,"t":"code","b":[32,135,146],"m":"jsr","oa":37511,"o":"get_hypotenuse_angle"},{"a":33811,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":33813,"t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo"},{"a":33815,"t":"code","b":[56],"m":"sec"},{"a":33816,"t":"code","b":[229,31],"m":"sbc","oa":31,"o":"yaw_adjust_lo"},{"a":33818,"t":"code","b":[141,89,12],"m":"sta","oa":3161,"o":"obj_rel_yaw_lo"},{"a":33821,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":33823,"t":"code","b":[253,192,9],"m":"sbc","oa":2496,"o":"obj_yaw,x"},{"a":33826,"t":"code","b":[24],"m":"clc"},{"a":33827,"t":"code","b":[105,10],"m":"adc","o":"#$0A"},{"a":33829,"t":"code","b":[141,87,12],"m":"sta","oa":3159,"o":"obj_rel_yaw_hi"},{"a":33832,"t":"code","b":[164,111],"m":"ldy","oa":111,"o":"obj_measured"},{"a":33834,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":33836,"t":"code","b":[56],"m":"sec"},{"a":33837,"t":"code","b":[229,138],"m":"sbc","oa":138,"o":"angle_lo"},{"a":33839,"t":"code","b":[133,89],"m":"sta","oa":89,"o":"obj_view_yaw_diff_lo"},{"a":33841,"t":"code","b":[185,192,9],"m":"lda","oa":2496,"o":"obj_yaw,y"},{"a":33844,"t":"code","b":[229,139],"m":"sbc","oa":139,"o":"angle_hi"},{"a":33846,"t":"code","b":[133,90],"m":"sta","oa":90,"o":"obj_view_yaw_diff_hi"},{"a":33848,"t":"code","b":[32,127,147],"m":"jsr","oa":37759,"o":"get_hypotenuse"},{"a":33851,"t":"code","b":[173,31,20],"m":"lda","oa":5151,"o":"title_view_kind"},{"a":33854,"t":"code","b":[208,32],"m":"bne","oa":33888,"o":"b_8460"},{"a":33856,"s":"C64: tower test first; the BBC set $5A/$59 before it","t":"code","b":[192,63],"m":"cpy","o":"#$3F"},{"a":33858,"t":"code","b":[240,28],"m":"beq","oa":33888,"o":"b_8460"},{"a":33860,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":33862,"t":"code","b":[133,90],"m":"sta","oa":90,"o":"obj_view_yaw_diff_hi"},{"a":33864,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":33866,"t":"code","b":[133,89],"m":"sta","oa":89,"o":"obj_view_yaw_diff_lo"},{"a":33868,"t":"code","b":[70,125],"m":"lsr","oa":125,"o":"hyp_hi"},{"a":33870,"t":"code","b":[102,124],"m":"ror","oa":124,"o":"hyp_lo"},{"a":33872,"t":"code","b":[56],"m":"sec"},{"a":33873,"t":"code","b":[102,132],"m":"ror","oa":132,"o":"dy_hi"},{"a":33875,"t":"code","b":[102,129],"m":"ror","oa":129,"o":"dy_lo"},{"a":33877,"t":"code","b":[165,129],"m":"lda","oa":129,"o":"dy_lo"},{"a":33879,"t":"code","b":[24],"m":"clc"},{"a":33880,"t":"code","b":[105,112],"m":"adc","o":"#$70"},{"a":33882,"t":"code","b":[133,129],"m":"sta","oa":129,"o":"dy_lo"},{"a":33884,"t":"code","b":[144,2],"m":"bcc","oa":33888,"o":"b_8460"},{"a":33886,"t":"code","b":[230,132],"m":"inc","oa":132,"o":"dy_hi"},{"a":33888,"l":"b_8460","t":"code","b":[165,124],"m":"lda","oa":124,"o":"hyp_lo","x":[33854,33858,33884]},{"a":33890,"t":"code","b":[141,93,12],"m":"sta","oa":3165,"o":"obj_dist_lo"},{"a":33893,"t":"code","b":[165,125],"m":"lda","oa":125,"o":"hyp_hi"},{"a":33895,"t":"code","b":[141,94,12],"m":"sta","oa":3166,"o":"obj_dist_hi"},{"a":33898,"t":"code","b":[165,129],"m":"lda","oa":129,"o":"dy_lo"},{"a":33900,"t":"code","b":[141,91,12],"m":"sta","oa":3163,"o":"obj_height_lo"},{"a":33903,"t":"code","b":[165,132],"m":"lda","oa":132,"o":"dy_hi"},{"a":33905,"t":"code","b":[141,92,12],"m":"sta","oa":3164,"o":"obj_height_hi"},{"a":33908,"t":"code","b":[96],"m":"rts"},{"a":33909,"l":"get_obj_point_angles","c":"For each point of the shape of the object measured by get_object_angles (type in $4C; its point range from $9CA0/$9CA1), works out the point's view-relative yaw and pitch: turns the point (its yaw $9DE0,Y plus the object's facing $5A/$59, and its distance $A060,Y) with the sine and cosine from $0F70 and the multiply at $0D03, adds the result to the object's distance and height ($0C5D/$0C5E, $0C5B/$0C5C; point heights at $9F20,Y), gets the yaw ($9287) and pitch ($933D), and stores them from index $40 up: yaw plus the object's view yaw ($0C57/$0C59) in $A800/$0BA0, pitch in $0AE0/$0A80. Called from $853D. The BBC routine with only addresses moved: shape tables +$5300 (BBC $49A0 is $9CA0 here), the yaw high-byte table $5500 is $A800.","t":"code","b":[166,76],"m":"ldx","oa":76,"o":"obj_type_measured","x":[34109]},{"a":33911,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":33913,"t":"code","b":[133,33],"m":"sta","oa":33,"o":"draw_table_index"},{"a":33915,"t":"code","b":[189,161,156],"m":"lda","oa":40097,"o":"obj_point_end,x"},{"a":33918,"t":"code","b":[133,79],"m":"sta","oa":79,"o":"obj_last_point_or_face"},{"a":33920,"t":"code","b":[188,160,156],"m":"ldy","oa":40096,"o":"obj_point_first,x"},{"a":33923,"t":"code","b":[132,78],"m":"sty","oa":78,"o":"obj_point_or_face_num"},{"a":33925,"l":"j_8485","t":"code","b":[165,89],"m":"lda","oa":89,"o":"obj_view_yaw_diff_lo","x":[34095]},{"a":33927,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":33929,"t":"code","b":[165,90],"m":"lda","oa":90,"o":"obj_view_yaw_diff_hi"},{"a":33931,"t":"code","b":[24],"m":"clc"},{"a":33932,"t":"code","b":[121,224,157],"m":"adc","oa":40416,"o":"obj_point_yaw,y"},{"a":33935,"t":"code","b":[32,112,15],"m":"jsr","oa":3952,"o":"sin_cos_8"},{"a":33938,"t":"code","b":[164,78],"m":"ldy","oa":78,"o":"obj_point_or_face_num"},{"a":33940,"t":"code","b":[185,96,160],"m":"lda","oa":41056,"o":"obj_point_distance,y"},{"a":33943,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":33945,"t":"code","b":[165,143],"m":"lda","oa":143,"o":"cos_8bit"},{"a":33947,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":33950,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":33952,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":33954,"t":"code","b":[36,103],"m":"bit","oa":103,"o":"sign_bits"},{"a":33956,"t":"code","b":[80,3],"m":"bvc","oa":33961,"o":"b_84A9"},{"a":33958,"t":"code","b":[32,9,16],"m":"jsr","oa":4105,"o":"negate16"},{"a":33961,"l":"b_84A9","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[33956]},{"a":33963,"t":"code","b":[173,93,12],"m":"lda","oa":3165,"o":"obj_dist_lo"},{"a":33966,"t":"code","b":[24],"m":"clc"},{"a":33967,"t":"code","b":[101,116],"m":"adc","oa":116,"o":"tmp_t"},{"a":33969,"t":"code","b":[133,130],"m":"sta","oa":130,"o":"dz_lo"},{"a":33971,"t":"code","b":[173,94,12],"m":"lda","oa":3166,"o":"obj_dist_hi"},{"a":33974,"t":"code","b":[101,117],"m":"adc","oa":117,"o":"tmp_u"},{"a":33976,"t":"code","b":[133,136],"m":"sta","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":33978,"t":"code","b":[16,11],"m":"bpl","oa":33991,"o":"b_84C7"},{"a":33980,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":33982,"t":"code","b":[56],"m":"sec"},{"a":33983,"t":"code","b":[229,130],"m":"sbc","oa":130,"o":"dz_lo"},{"a":33985,"t":"code","b":[133,130],"m":"sta","oa":130,"o":"dz_lo"},{"a":33987,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":33989,"t":"code","b":[229,136],"m":"sbc","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":33991,"l":"b_84C7","t":"code","b":[133,133],"m":"sta","oa":133,"o":"dz_abs_hi","x":[33978]},{"a":33993,"t":"code","b":[185,96,160],"m":"lda","oa":41056,"o":"obj_point_distance,y"},{"a":33996,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":33998,"t":"code","b":[165,142],"m":"lda","oa":142,"o":"sin_8bit"},{"a":34000,"t":"code","b":[32,3,13],"m":"jsr","oa":3331,"o":"mul8_a_by_u"},{"a":34003,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":34005,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34007,"t":"code","b":[133,131],"m":"sta","oa":131,"o":"dx_abs_hi"},{"a":34009,"t":"code","b":[165,103],"m":"lda","oa":103,"o":"sign_bits"},{"a":34011,"t":"code","b":[133,134],"m":"sta","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":34013,"t":"code","b":[32,135,146],"m":"jsr","oa":37511,"o":"get_hypotenuse_angle"},{"a":34016,"t":"code","b":[164,33],"m":"ldy","oa":33,"o":"draw_table_index"},{"a":34018,"t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo"},{"a":34020,"t":"code","b":[24],"m":"clc"},{"a":34021,"t":"code","b":[109,89,12],"m":"adc","oa":3161,"o":"obj_rel_yaw_lo"},{"a":34024,"t":"code","b":[153,160,11],"m":"sta","oa":2976,"o":"draw_yaw_lo,y"},{"a":34027,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":34029,"t":"code","b":[109,87,12],"m":"adc","oa":3159,"o":"obj_rel_yaw_hi"},{"a":34032,"t":"code","b":[153,0,168],"m":"sta","oa":43008,"o":"point_yaw_hi,y"},{"a":34035,"t":"code","b":[32,127,147],"m":"jsr","oa":37759,"o":"get_hypotenuse"},{"a":34038,"t":"code","b":[164,78],"m":"ldy","oa":78,"o":"obj_point_or_face_num"},{"a":34040,"t":"code","b":[185,32,159],"m":"lda","oa":40736,"o":"obj_point_height,y"},{"a":34043,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34044,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":34046,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34048,"t":"code","b":[144,3],"m":"bcc","oa":34053,"o":"b_8505"},{"a":34050,"t":"code","b":[32,9,16],"m":"jsr","oa":4105,"o":"negate16"},{"a":34053,"l":"b_8505","t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u","x":[34048]},{"a":34055,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":34057,"t":"code","b":[24],"m":"clc"},{"a":34058,"t":"code","b":[109,91,12],"m":"adc","oa":3163,"o":"obj_height_lo"},{"a":34061,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":34063,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":34065,"t":"code","b":[109,92,12],"m":"adc","oa":3164,"o":"obj_height_hi"},{"a":34068,"t":"code","b":[166,110],"m":"ldx","oa":110,"o":"viewer_obj"},{"a":34070,"t":"code","b":[32,61,147],"m":"jsr","oa":37693,"o":"get_pitch_angle_delta"},{"a":34073,"t":"code","b":[164,33],"m":"ldy","oa":33,"o":"draw_table_index"},{"a":34075,"t":"code","b":[165,141],"m":"lda","oa":141,"o":"pitch_delta_hi"},{"a":34077,"t":"code","b":[153,224,10],"m":"sta","oa":2784,"o":"draw_pitch_hi,y"},{"a":34080,"t":"code","b":[165,80],"m":"lda","oa":80,"o":"pitch_delta_lo"},{"a":34082,"t":"code","b":[153,128,10],"m":"sta","oa":2688,"o":"draw_pitch_lo,y"},{"a":34085,"t":"code","b":[230,78],"m":"inc","oa":78,"o":"obj_point_or_face_num"},{"a":34087,"t":"code","b":[230,33],"m":"inc","oa":33,"o":"draw_table_index"},{"a":34089,"t":"code","b":[164,78],"m":"ldy","oa":78,"o":"obj_point_or_face_num"},{"a":34091,"t":"code","b":[196,79],"m":"cpy","oa":79,"o":"obj_last_point_or_face"},{"a":34093,"t":"code","b":[240,3],"m":"beq","oa":34098,"o":"r_8532"},{"a":34095,"t":"code","b":[76,133,132],"m":"jmp","oa":33925,"o":"j_8485"},{"a":34098,"l":"r_8532","t":"code","b":[96],"m":"rts","x":[34093]},{"a":34099,"l":"draw_object","c":"Draws object Y in the 3D view. $8401 (the BBC's GetObjectAngles) works out the object's bearing and distance from the viewer; bit 7 of $0C7A is set when the distance high byte ($7D) is 15 or more (on the BBC the flag that draws a distant object's polygon edges in its fill colour), and cleared again at the end; $8475 (the BBC's GetObjPointAngles) projects every point of the shape. The object's type ($4C) gives its polygon numbers, from $9CAB,X up to $9CAC,X; each is drawn by $2AA9 with its colour bits (bits 2-5 of $A1A0,Y into $19), its side count (bits 0-1 plus 3 into $17) and its point list ($A2E0/$A420 into $3C/$3D). Types with a non-zero entry at $9CB6 can be drawn in two passes, bit 7 of each polygon's $A1A0 byte choosing its pass ($0C47). Ends with $3C/$3D = $0C40, Y restored from $6F. Byte for byte the BBC's DrawObject ($5D33), the tables moved +$5300 and the polygon routine to $2AA9.","t":"code","b":[32,1,132],"m":"jsr","oa":33793,"o":"get_object_angles","x":[8182,8676,8706,10767,34956]},{"a":34102,"t":"code","b":[165,125],"m":"lda","oa":125,"o":"hyp_hi"},{"a":34104,"t":"code","b":[201,15],"m":"cmp","o":"#$0F"},{"a":34106,"t":"code","b":[110,122,12],"m":"ror","oa":3194,"o":"edge_in_fill_colour"},{"a":34109,"t":"code","b":[32,117,132],"m":"jsr","oa":33909,"o":"get_obj_point_angles"},{"a":34112,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":34114,"t":"code","b":[133,59],"m":"sta","oa":59,"o":"coord_y_hi_or_poly_type"},{"a":34116,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34118,"t":"code","b":[133,83],"m":"sta","oa":83,"o":"draw_phase_count"},{"a":34120,"t":"code","b":[141,71,12],"m":"sta","oa":3143,"o":"obj_draw_pass"},{"a":34123,"t":"code","b":[166,76],"m":"ldx","oa":76,"o":"obj_type_measured"},{"a":34125,"t":"code","b":[189,182,156],"m":"lda","oa":40118,"o":"obj_polygon_phases,x"},{"a":34128,"t":"code","b":[240,29],"m":"beq","oa":34159,"o":"b_856F"},{"a":34130,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":34131,"t":"code","b":[176,7],"m":"bcs","oa":34140,"o":"b_855C"},{"a":34133,"t":"code","b":[165,90],"m":"lda","oa":90,"o":"obj_view_yaw_diff_hi"},{"a":34135,"t":"code","b":[105,192],"m":"adc","o":"#$C0"},{"a":34137,"t":"code","b":[76,105,133],"m":"jmp","oa":34153,"o":"j_8569"},{"a":34140,"l":"b_855C","t":"code","b":[173,92,12],"m":"lda","oa":3164,"o":"obj_height_hi","x":[34131]},{"a":34143,"t":"code","b":[208,6],"m":"bne","oa":34151,"o":"b_8567"},{"a":34145,"t":"code","b":[173,91,12],"m":"lda","oa":3163,"o":"obj_height_lo"},{"a":34148,"t":"code","b":[240,9],"m":"beq","oa":34159,"o":"b_856F"},{"a":34150,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":34151,"l":"b_8567","t":"code","b":[73,128],"m":"eor","o":"#$80","x":[34143]},{"a":34153,"l":"j_8569","t":"code","b":[16,4],"m":"bpl","oa":34159,"o":"b_856F","x":[34137]},{"a":34155,"t":"code","b":[169,2],"m":"lda","o":"#$02"},{"a":34157,"t":"code","b":[133,83],"m":"sta","oa":83,"o":"draw_phase_count"},{"a":34159,"l":"b_856F","t":"code","b":[166,76],"m":"ldx","oa":76,"o":"obj_type_measured","x":[34128,34148,34153,34228]},{"a":34161,"t":"code","b":[189,172,156],"m":"lda","oa":40108,"o":"obj_polygon_end,x"},{"a":34164,"t":"code","b":[133,79],"m":"sta","oa":79,"o":"obj_last_point_or_face"},{"a":34166,"t":"code","b":[188,171,156],"m":"ldy","oa":40107,"o":"obj_polygon_first,x"},{"a":34169,"l":"b_8579","t":"code","b":[132,78],"m":"sty","oa":78,"o":"obj_point_or_face_num","x":[34215]},{"a":34171,"t":"code","b":[185,160,161],"m":"lda","oa":41376,"o":"obj_polygon_data,y"},{"a":34174,"t":"code","b":[166,83],"m":"ldx","oa":83,"o":"draw_phase_count"},{"a":34176,"t":"code","b":[240,5],"m":"beq","oa":34183,"o":"b_8587"},{"a":34178,"t":"code","b":[77,71,12],"m":"eor","oa":3143,"o":"obj_draw_pass"},{"a":34181,"t":"code","b":[48,29],"m":"bmi","oa":34212,"o":"b_85A4"},{"a":34183,"l":"b_8587","t":"code","b":[41,60],"m":"and","o":"#$3C","x":[34176]},{"a":34185,"t":"code","b":[133,25],"m":"sta","oa":25,"o":"poly_colours_or_row"},{"a":34187,"t":"code","b":[185,160,161],"m":"lda","oa":41376,"o":"obj_polygon_data,y"},{"a":34190,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":34192,"t":"code","b":[24],"m":"clc"},{"a":34193,"t":"code","b":[105,3],"m":"adc","o":"#$03"},{"a":34195,"t":"code","b":[133,23],"m":"sta","oa":23,"o":"edge_or_trace_count"},{"a":34197,"t":"code","b":[185,224,162],"m":"lda","oa":41696,"o":"obj_polygon_list_lo,y"},{"a":34200,"t":"code","b":[133,60],"m":"sta","oa":60,"o":"coord_z_hi_or_points_ptr"},{"a":34202,"t":"code","b":[185,32,164],"m":"lda","oa":42016,"o":"obj_polygon_list_hi,y"},{"a":34205,"t":"code","b":[133,61],"m":"sta","oa":61,"o":"vec_yaw_lo_or_points_ptr_hi"},{"a":34207,"t":"code","b":[32,169,42],"m":"jsr","oa":10921,"o":"draw_polygon"},{"a":34210,"t":"code","b":[164,78],"m":"ldy","oa":78,"o":"obj_point_or_face_num"},{"a":34212,"l":"b_85A4","t":"code","b":[200],"m":"iny","x":[34181]},{"a":34213,"t":"code","b":[196,79],"m":"cpy","oa":79,"o":"obj_last_point_or_face"},{"a":34215,"t":"code","b":[144,208],"m":"bcc","oa":34169,"o":"b_8579"},{"a":34217,"t":"code","b":[198,83],"m":"dec","oa":83,"o":"draw_phase_count"},{"a":34219,"t":"code","b":[48,9],"m":"bmi","oa":34230,"o":"b_85B6"},{"a":34221,"t":"code","b":[240,7],"m":"beq","oa":34230,"o":"b_85B6"},{"a":34223,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":34225,"t":"code","b":[141,71,12],"m":"sta","oa":3143,"o":"obj_draw_pass"},{"a":34228,"t":"code","b":[48,185],"m":"bmi","oa":34159,"o":"b_856F"},{"a":34230,"l":"b_85B6","t":"code","b":[169,64],"m":"lda","o":"#$40","x":[34219,34221]},{"a":34232,"t":"code","b":[133,60],"m":"sta","oa":60,"o":"coord_z_hi_or_points_ptr"},{"a":34234,"t":"code","b":[169,12],"m":"lda","o":"#$0C"},{"a":34236,"t":"code","b":[133,61],"m":"sta","oa":61,"o":"vec_yaw_lo_or_points_ptr_hi"},{"a":34238,"t":"code","b":[78,122,12],"m":"lsr","oa":3194,"o":"edge_in_fill_colour"},{"a":34241,"t":"code","b":[164,111],"m":"ldy","oa":111,"o":"obj_measured"},{"a":34243,"t":"code","b":[96],"m":"rts"},{"a":34244,"l":"object_xz_delta","c":"Ground-plane vector from object X to object Y, for $8401 (its only caller): $86 = x of Y minus x of X ($0900) minus the offset in $0C78, $83 its size; $88 = z of Y minus z of X ($0980), $85 its size; the low bytes $80 and $82 are zeroed. Same bytes as the BBC's GetHorizontalDelta ($5DC4).","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[33802]},{"a":34246,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":34248,"t":"code","b":[56],"m":"sec"},{"a":34249,"t":"code","b":[185,0,9],"m":"lda","oa":2304,"o":"obj_x,y"},{"a":34252,"t":"code","b":[253,0,9],"m":"sbc","oa":2304,"o":"obj_x,x"},{"a":34255,"t":"code","b":[56],"m":"sec"},{"a":34256,"t":"code","b":[237,120,12],"m":"sbc","oa":3192,"o":"title_x_offset"},{"a":34259,"t":"code","b":[133,134],"m":"sta","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":34261,"t":"code","b":[16,5],"m":"bpl","oa":34268,"o":"b_85DC"},{"a":34263,"t":"code","b":[56],"m":"sec"},{"a":34264,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34266,"t":"code","b":[229,134],"m":"sbc","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":34268,"l":"b_85DC","t":"code","b":[133,131],"m":"sta","oa":131,"o":"dx_abs_hi","x":[34261]},{"a":34270,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34272,"t":"code","b":[133,130],"m":"sta","oa":130,"o":"dz_lo"},{"a":34274,"t":"code","b":[56],"m":"sec"},{"a":34275,"t":"code","b":[185,128,9],"m":"lda","oa":2432,"o":"obj_z,y"},{"a":34278,"t":"code","b":[253,128,9],"m":"sbc","oa":2432,"o":"obj_z,x"},{"a":34281,"t":"code","b":[133,136],"m":"sta","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":34283,"t":"code","b":[16,5],"m":"bpl","oa":34290,"o":"b_85F2"},{"a":34285,"t":"code","b":[56],"m":"sec"},{"a":34286,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34288,"t":"code","b":[229,136],"m":"sbc","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":34290,"l":"b_85F2","t":"code","b":[133,133],"m":"sta","oa":133,"o":"dz_abs_hi","x":[34283]},{"a":34292,"t":"code","b":[96],"m":"rts"},{"a":34293,"l":"object_height_delta","c":"Height of object Y above object X for $8401 (its only caller): $81 = low bytes ($0A00) subtracted, $84 = high bytes ($0940) with the borrow. Same bytes as the BBC's GetVerticalDelta ($5DF5).","t":"code","b":[185,0,10],"m":"lda","oa":2560,"o":"obj_y_lo,y","x":[33805]},{"a":34296,"t":"code","b":[56],"m":"sec"},{"a":34297,"t":"code","b":[253,0,10],"m":"sbc","oa":2560,"o":"obj_y_lo,x"},{"a":34300,"t":"code","b":[133,129],"m":"sta","oa":129,"o":"dy_lo"},{"a":34302,"t":"code","b":[185,64,9],"m":"lda","oa":2368,"o":"obj_y_hi,y"},{"a":34305,"t":"code","b":[253,64,9],"m":"sbc","oa":2368,"o":"obj_y_hi,x"},{"a":34308,"t":"code","b":[133,132],"m":"sta","oa":132,"o":"dy_hi"},{"a":34310,"t":"code","b":[96],"m":"rts"},{"a":34311,"l":"fill_top_bitmap_row","c":"C64 only. Fills the 320 bytes $E000-$E13F, the first 40-cell row of the bitmap-layout area at $E000, with $55 (colour 1 in all four pixels of every byte); the screen buffer's row 0 starts right after it at $E140 ($3D9C/$3DCE). Its one caller, $1093 in the screen-clearing routine at $1090, stands where the BBC calls ClearIconsScanner.","t":"code","b":[162,159],"m":"ldx","o":"#$9F","x":[4243]},{"a":34313,"t":"code","b":[169,85],"m":"lda","o":"#$55"},{"a":34315,"l":"b_860B","t":"code","b":[157,0,224],"m":"sta","oa":57344,"o":"f_E000,x","x":[34324]},{"a":34318,"t":"code","b":[157,160,224],"m":"sta","oa":57504,"o":"f_E0A0,x"},{"a":34321,"t":"code","b":[202],"m":"dex"},{"a":34322,"t":"code","b":[224,255],"m":"cpx","o":"#$FF"},{"a":34324,"t":"code","b":[208,245],"m":"bne","oa":34315,"o":"b_860B"},{"a":34326,"t":"code","b":[96],"m":"rts"},{"a":34327,"l":"print_token","c":"Prints text token X: takes the token's start from $AA84,X and passes each byte from $AA96 plus that offset, up to the $FF that ends it, to $3414, which prints it or, for bytes $C8 and up, prints token byte-$C8 by calling back here (saving Y round the call). The BBC's PrintTextToken ($36AD), moved here with its tables at $AA84/$AA96. Callers include the title loop ($1029-$1083), $1AAA, $3420, $3634 and $8866.","t":"code","b":[188,132,170],"m":"ldy","oa":43652,"o":"token_offsets,x","x":[4137,4153,4193,4227,6826,13344,13876,34918]},{"a":34330,"l":"j_861A","t":"code","b":[185,150,170],"m":"lda","oa":43670,"o":"shadow_front_char,y","x":[34341]},{"a":34333,"t":"code","b":[201,255],"m":"cmp","o":"#$FF"},{"a":34335,"t":"code","b":[240,7],"m":"beq","oa":34344,"o":"r_8628"},{"a":34337,"t":"code","b":[32,20,52],"m":"jsr","oa":13332,"o":"print_text_byte"},{"a":34340,"t":"code","b":[200],"m":"iny"},{"a":34341,"t":"code","b":[76,26,134],"m":"jmp","oa":34330,"o":"j_861A"},{"a":34344,"l":"r_8628","t":"code","b":[96],"m":"rts","x":[34335]},{"a":34345,"l":"wait_key","c":"Waits for a key and returns its ASCII code in A: $8642 (nothing on the C64) then $862C. The BBC's ReadKeyboard ($5E07), which re-selects and flushes the keyboard first. Callers: $1031 and $1086 in the title loop and $3637.","t":"code","b":[32,66,134],"m":"jsr","oa":34370,"o":"keyboard_select_stub","x":[4145,4230,13682,13879]},{"a":34348,"l":"read_key","c":"Reads a key through OSRDCH ($FFE0, the C64's $8D2C) and returns it in A. The code after the BCC is the BBC's Escape handling (carry set and A = $1B: acknowledge with OSBYTE $7E, read again); the C64's OSRDCH always returns carry clear, so $8631-$863E never runs, and OSBYTE $7E would do nothing anyway. Same bytes as the BBC's ReadCharacter ($5E0A). The number entry calls it directly at $32E9.","t":"code","b":[32,224,255],"m":"jsr","oa":65504,"o":"osrdch_jmp","x":[13033,34366]},{"a":34351,"t":"code","b":[144,16],"m":"bcc","oa":34369,"o":"r_8641"},{"a":34353,"t":"code","b":[201,27],"m":"cmp","o":"#$1B"},{"a":34355,"t":"code","b":[208,12],"m":"bne","oa":34369,"o":"r_8641"},{"a":34357,"t":"code","b":[152],"m":"tya"},{"a":34358,"t":"code","b":[72],"m":"pha"},{"a":34359,"t":"code","b":[169,126],"m":"lda","o":"#$7E"},{"a":34361,"t":"code","b":[32,244,255],"m":"jsr","oa":65524,"o":"osbyte_jmp"},{"a":34364,"t":"code","b":[104],"m":"pla"},{"a":34365,"t":"code","b":[168],"m":"tay"},{"a":34366,"t":"code","b":[76,44,134],"m":"jmp","oa":34348,"o":"read_key"},{"a":34369,"l":"r_8641","t":"code","b":[96],"m":"rts","x":[34351,34355]},{"a":34370,"l":"keyboard_select_stub","c":"Just an RTS where the BBC's EnableKeyboard (OSBYTE 2 to take input from the keyboard, then a flush of the keyboard buffer) was: the C64's OSRDCH reads the matrix itself and has no buffer to flush. Called from $8629 and from the number entry at $32D7.","t":"code","b":[96],"m":"rts","x":[13015,34345]},{"a":34371,"l":"set_palette","c":"Sets the four display colours. A with bit 7 clear: C64 colour A for all four (callers pass 6, blue, to blank the screen; the BBC passes its blue, 4). A with bit 7 set: logical colour n gets entry (A AND $7F) - 3 + n of $869D ($83 and $87 are used). Colour 0 goes to $D021; colour 2 to $D023 and $869C; colour 1 to $D022 and, packed with colour 2 as high and low nybble, to all of $CC00-$CFFF (the title bitmap's screen matrix); colour 3 to colour RAM through $9AE4, with bit 3 (multicolour cell) added while bit 7 of $9AF6 marks the play screen. So a logical colour is the same bit pair on the title's multicolour bitmap and on the play screen's multicolour characters. The BBC version sends VDU 19 per colour; this one writes the VIC and the matrix itself.","t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t","x":[4124,4142,4206,4222,13679,13711,13791,13829,13853]},{"a":34373,"t":"code","b":[41,127],"m":"and","o":"#$7F"},{"a":34375,"t":"code","b":[168],"m":"tay"},{"a":34376,"t":"code","b":[169,3],"m":"lda","o":"#$03"},{"a":34378,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":34380,"l":"b_864C","t":"code","b":[166,116],"m":"ldx","oa":116,"o":"tmp_t","x":[34457]},{"a":34382,"t":"code","b":[16,3],"m":"bpl","oa":34387,"o":"b_8653"},{"a":34384,"t":"code","b":[190,157,134],"m":"ldx","oa":34461,"o":"palettes,y"},{"a":34387,"l":"b_8653","t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u","x":[34382]},{"a":34389,"t":"code","b":[208,6],"m":"bne","oa":34397,"o":"b_865D"},{"a":34391,"t":"code","b":[142,33,208],"m":"stx","o":"vic_background0"},{"a":34394,"t":"code","b":[76,150,134],"m":"jmp","oa":34454,"o":"j_8696"},{"a":34397,"l":"b_865D","t":"code","b":[201,2],"m":"cmp","o":"#$02","x":[34389]},{"a":34399,"t":"code","b":[208,9],"m":"bne","oa":34410,"o":"b_866A"},{"a":34401,"t":"code","b":[142,156,134],"m":"stx","oa":34460,"o":"palette_colour2_copy"},{"a":34404,"t":"code","b":[142,35,208],"m":"stx","o":"vic_background2"},{"a":34407,"t":"code","b":[76,150,134],"m":"jmp","oa":34454,"o":"j_8696"},{"a":34410,"l":"b_866A","t":"code","b":[144,14],"m":"bcc","oa":34426,"o":"b_867A","x":[34399]},{"a":34412,"t":"code","b":[138],"m":"txa"},{"a":34413,"t":"code","b":[44,246,154],"m":"bit","oa":39670,"o":"video_mode_flag"},{"a":34416,"t":"code","b":[16,2],"m":"bpl","oa":34420,"o":"b_8674"},{"a":34418,"t":"code","b":[9,8],"m":"ora","o":"#$08"},{"a":34420,"l":"b_8674","t":"code","b":[32,228,154],"m":"jsr","oa":39652,"o":"fill_colour_ram","x":[34416]},{"a":34423,"t":"code","b":[76,150,134],"m":"jmp","oa":34454,"o":"j_8696"},{"a":34426,"l":"b_867A","t":"code","b":[138],"m":"txa","x":[34410]},{"a":34427,"t":"code","b":[141,34,208],"m":"sta","o":"vic_background1"},{"a":34430,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34431,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34432,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34433,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34434,"t":"code","b":[13,156,134],"m":"ora","oa":34460,"o":"palette_colour2_copy"},{"a":34437,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":34439,"l":"b_8687","t":"code","b":[157,0,204],"m":"sta","oa":52224,"o":"f_CC00,x","x":[34452]},{"a":34442,"t":"code","b":[157,0,205],"m":"sta","oa":52480,"o":"f_CD00,x"},{"a":34445,"t":"code","b":[157,0,206],"m":"sta","oa":52736,"o":"f_CE00,x"},{"a":34448,"t":"code","b":[157,0,207],"m":"sta","oa":52992,"o":"f_CF00,x"},{"a":34451,"t":"code","b":[202],"m":"dex"},{"a":34452,"t":"code","b":[208,241],"m":"bne","oa":34439,"o":"b_8687"},{"a":34454,"l":"j_8696","t":"code","b":[136],"m":"dey","x":[34394,34407,34423]},{"a":34455,"t":"code","b":[198,117],"m":"dec","oa":117,"o":"tmp_u"},{"a":34457,"t":"code","b":[16,177],"m":"bpl","oa":34380,"o":"b_864C"},{"a":34459,"t":"code","b":[96],"m":"rts"},{"a":34460,"l":"palette_colour2_copy","c":"Logical colour 2 as $8643 last set it ($8661), kept so the colour-1 pass can pack colours 1 and 2 into each byte of the title's screen matrix ($8682). C64 only; 2 (red) in the image.","t":"byte","b":[2],"x":[34401,34434]},{"a":34461,"l":"palettes","c":"Two palettes for $8643, four C64 colours each, logical colour 0 first. $869D-$86A0, used with $83: blue, black, then the two colours $1446/$144C write per landscape; $86A1-$86A4, used with $87: 6 blue, 0 black, 2 red, 7 yellow. They are the BBC's colourPalettes (4, 0, 6, 3 and 4, 0, 1, 3) in C64 colour numbers.","t":"byte","b":[6,0],"x":[34384]},{"a":34463,"l":"palette_83_colour2","c":"Logical colour 2 of the play palette ($83): rewritten for each landscape by $144C from the table at $14F3, indexed by the number of enemies less one ($0C6F). 3 (cyan) in the image.","t":"byte","b":[3],"x":[5196]},{"a":34464,"l":"palette_83_colour3","c":"Logical colour 3 of the play palette ($83): rewritten for each landscape by $1446 from $14D4, by the number of enemies less one; 7 (yellow) in the image. The next four bytes are the $87 palette: 6, 0, 2, 7 (blue, black, red, yellow).","t":"byte","b":[7,6,0,2,7],"x":[5190]},{"a":34469,"l":"dither_view_to_screen","c":"Copies the view from the screen buffer ($E140 onwards, rows at $3D9C/$3DCE) to the play screen's character sets a random pixel pair at a time, so the new picture dissolves in. Width: the column count in $211B (the BBC uses bufferColumns x 8 bytes), with a covering bit mask from $15C4 in $0CCF. Each step multiplies a private 24-bit random number ($87B0, $A3, $A4) by 5 (the BBC calls GetRandomNumber under SEI) and takes from it a column ($9D, below $211B), a character row ($9E, 0-23), a byte pair in the cell ($9F and $9F+4) and a pixel (0-3, mirrored in the second byte, masks $228E and $9500). The target is screen row ($9E+$97) mod 25 through $3A00/$3A20 and column ($9D+$96) mod 40, written again $3A40,row pages higher. With bit 7 of $0C1E set it returns after one step; otherwise 96 steps (the BBC: about 256 of one pixel), then $352C for the sound, until the count in $2099 runs out. Called from $2056.","t":"code","b":[173,27,33],"m":"lda","oa":8475,"o":"object_columns","x":[8278]},{"a":34472,"t":"code","b":[141,211,12],"m":"sta","oa":3283,"o":"dissolve_width_cols"},{"a":34475,"t":"code","b":[56],"m":"sec"},{"a":34476,"t":"code","b":[233,1],"m":"sbc","o":"#$01"},{"a":34478,"t":"code","b":[240,9],"m":"beq","oa":34489,"o":"b_86B9"},{"a":34480,"t":"code","b":[160,255],"m":"ldy","o":"#$FF"},{"a":34482,"l":"b_86B2","t":"code","b":[10],"m":"asl","o":"a","x":[34484]},{"a":34483,"t":"code","b":[200],"m":"iny"},{"a":34484,"t":"code","b":[144,252],"m":"bcc","oa":34482,"o":"b_86B2"},{"a":34486,"t":"code","b":[185,196,21],"m":"lda","oa":5572,"o":"leading_zero_masks,y"},{"a":34489,"l":"b_86B9","t":"code","b":[141,207,12],"m":"sta","oa":3279,"o":"dissolve_mask","x":[34478]},{"a":34492,"l":"j_86BC","t":"code","b":[169,96],"m":"lda","o":"#$60","x":[34729]},{"a":34494,"t":"code","b":[141,210,12],"m":"sta","oa":3282,"o":"dissolve_batch"},{"a":34497,"l":"j_86C1","t":"code","b":[173,176,135],"m":"lda","oa":34736,"o":"dither_seed_lo","x":[34732]},{"a":34500,"t":"code","b":[133,165],"m":"sta","oa":165,"o":"dissolve_rand_x4_lo"},{"a":34502,"t":"code","b":[165,163],"m":"lda","oa":163,"o":"dissolve_rand_mid"},{"a":34504,"t":"code","b":[133,166],"m":"sta","oa":166,"o":"dissolve_rand_x4_mid"},{"a":34506,"t":"code","b":[165,164],"m":"lda","oa":164,"o":"dissolve_rand_hi"},{"a":34508,"t":"code","b":[133,167],"m":"sta","oa":167,"o":"dissolve_rand_x4_hi"},{"a":34510,"t":"code","b":[6,165],"m":"asl","oa":165,"o":"dissolve_rand_x4_lo"},{"a":34512,"t":"code","b":[38,166],"m":"rol","oa":166,"o":"dissolve_rand_x4_mid"},{"a":34514,"t":"code","b":[38,167],"m":"rol","oa":167,"o":"dissolve_rand_x4_hi"},{"a":34516,"t":"code","b":[6,165],"m":"asl","oa":165,"o":"dissolve_rand_x4_lo"},{"a":34518,"t":"code","b":[38,166],"m":"rol","oa":166,"o":"dissolve_rand_x4_mid"},{"a":34520,"t":"code","b":[38,167],"m":"rol","oa":167,"o":"dissolve_rand_x4_hi"},{"a":34522,"t":"code","b":[173,176,135],"m":"lda","oa":34736,"o":"dither_seed_lo"},{"a":34525,"t":"code","b":[24],"m":"clc"},{"a":34526,"t":"code","b":[101,165],"m":"adc","oa":165,"o":"dissolve_rand_x4_lo"},{"a":34528,"t":"code","b":[141,176,135],"m":"sta","oa":34736,"o":"dither_seed_lo"},{"a":34531,"t":"code","b":[165,163],"m":"lda","oa":163,"o":"dissolve_rand_mid"},{"a":34533,"t":"code","b":[101,166],"m":"adc","oa":166,"o":"dissolve_rand_x4_mid"},{"a":34535,"t":"code","b":[133,163],"m":"sta","oa":163,"o":"dissolve_rand_mid"},{"a":34537,"t":"code","b":[165,164],"m":"lda","oa":164,"o":"dissolve_rand_hi"},{"a":34539,"t":"code","b":[101,167],"m":"adc","oa":167,"o":"dissolve_rand_x4_hi"},{"a":34541,"t":"code","b":[133,164],"m":"sta","oa":164,"o":"dissolve_rand_hi"},{"a":34543,"t":"code","b":[170],"m":"tax"},{"a":34544,"t":"code","b":[164,163],"m":"ldy","oa":163,"o":"dissolve_rand_mid"},{"a":34546,"t":"code","b":[140,208,12],"m":"sty","oa":3280,"o":"dissolve_rand"},{"a":34549,"t":"code","b":[24],"m":"clc"},{"a":34550,"t":"code","b":[101,157],"m":"adc","oa":157,"o":"dissolve_col"},{"a":34552,"t":"code","b":[45,207,12],"m":"and","oa":3279,"o":"dissolve_mask"},{"a":34555,"t":"code","b":[205,211,12],"m":"cmp","oa":3283,"o":"dissolve_width_cols"},{"a":34558,"t":"code","b":[144,3],"m":"bcc","oa":34563,"o":"b_8703"},{"a":34560,"t":"code","b":[237,211,12],"m":"sbc","oa":3283,"o":"dissolve_width_cols"},{"a":34563,"l":"b_8703","t":"code","b":[133,157],"m":"sta","oa":157,"o":"dissolve_col","x":[34558]},{"a":34565,"t":"code","b":[138],"m":"txa"},{"a":34566,"t":"code","b":[78,208,12],"m":"lsr","oa":3280,"o":"dissolve_rand"},{"a":34569,"t":"code","b":[42],"m":"rol","o":"a"},{"a":34570,"t":"code","b":[42],"m":"rol","o":"a"},{"a":34571,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":34573,"t":"code","b":[133,159],"m":"sta","oa":159,"o":"dissolve_line"},{"a":34575,"t":"code","b":[173,208,12],"m":"lda","oa":3280,"o":"dissolve_rand"},{"a":34578,"t":"code","b":[41,31],"m":"and","o":"#$1F"},{"a":34580,"t":"code","b":[133,19],"m":"sta","oa":19,"o":"dither_tmp"},{"a":34582,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":34583,"t":"code","b":[24],"m":"clc"},{"a":34584,"t":"code","b":[101,19],"m":"adc","oa":19,"o":"dither_tmp"},{"a":34586,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":34587,"t":"code","b":[133,158],"m":"sta","oa":158,"o":"dissolve_row"},{"a":34589,"t":"code","b":[170],"m":"tax"},{"a":34590,"t":"code","b":[165,157],"m":"lda","oa":157,"o":"dissolve_col"},{"a":34592,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34593,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34594,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34595,"t":"code","b":[5,159],"m":"ora","oa":159,"o":"dissolve_line"},{"a":34597,"t":"code","b":[8],"m":"php"},{"a":34598,"t":"code","b":[24],"m":"clc"},{"a":34599,"t":"code","b":[125,156,61],"m":"adc","oa":15772,"o":"bitmap_row_lo_copy,x"},{"a":34602,"t":"code","b":[133,98],"m":"sta","oa":98,"o":"copy_src"},{"a":34604,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34606,"t":"code","b":[42],"m":"rol","o":"a"},{"a":34607,"t":"code","b":[40],"m":"plp"},{"a":34608,"t":"code","b":[125,206,61],"m":"adc","oa":15822,"o":"bitmap_row_hi_copy,x"},{"a":34611,"t":"code","b":[133,99],"m":"sta","oa":99,"o":"copy_src_hi"},{"a":34613,"t":"code","b":[165,157],"m":"lda","oa":157,"o":"dissolve_col"},{"a":34615,"t":"code","b":[24],"m":"clc"},{"a":34616,"t":"code","b":[101,150],"m":"adc","oa":150,"o":"strip_col"},{"a":34618,"t":"code","b":[201,40],"m":"cmp","o":"#$28"},{"a":34620,"t":"code","b":[144,2],"m":"bcc","oa":34624,"o":"b_8740"},{"a":34622,"t":"code","b":[233,40],"m":"sbc","o":"#$28"},{"a":34624,"l":"b_8740","t":"code","b":[10],"m":"asl","o":"a","x":[34620]},{"a":34625,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34626,"t":"code","b":[10],"m":"asl","o":"a"},{"a":34627,"t":"code","b":[5,159],"m":"ora","oa":159,"o":"dissolve_line"},{"a":34629,"t":"code","b":[133,146],"m":"sta","oa":146,"o":"col_offset_lo"},{"a":34631,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34633,"t":"code","b":[42],"m":"rol","o":"a"},{"a":34634,"t":"code","b":[133,147],"m":"sta","oa":147,"o":"col_offset_hi"},{"a":34636,"t":"code","b":[165,158],"m":"lda","oa":158,"o":"dissolve_row"},{"a":34638,"t":"code","b":[24],"m":"clc"},{"a":34639,"t":"code","b":[101,151],"m":"adc","oa":151,"o":"strip_row"},{"a":34641,"t":"code","b":[201,25],"m":"cmp","o":"#$19"},{"a":34643,"t":"code","b":[144,2],"m":"bcc","oa":34647,"o":"b_8757"},{"a":34645,"t":"code","b":[233,25],"m":"sbc","o":"#$19"},{"a":34647,"l":"b_8757","t":"code","b":[170],"m":"tax","x":[34643]},{"a":34648,"t":"code","b":[189,0,58],"m":"lda","oa":14848,"o":"row_char_addr_lo,x"},{"a":34651,"t":"code","b":[24],"m":"clc"},{"a":34652,"t":"code","b":[101,146],"m":"adc","oa":146,"o":"col_offset_lo"},{"a":34654,"t":"code","b":[133,100],"m":"sta","oa":100,"o":"copy_dst"},{"a":34656,"t":"code","b":[133,153],"m":"sta","oa":153,"o":"copy_dst2"},{"a":34658,"t":"code","b":[189,32,58],"m":"lda","oa":14880,"o":"row_char_addr_hi,x"},{"a":34661,"t":"code","b":[101,147],"m":"adc","oa":147,"o":"col_offset_hi"},{"a":34663,"t":"code","b":[133,101],"m":"sta","oa":101,"o":"copy_dst_hi"},{"a":34665,"t":"code","b":[24],"m":"clc"},{"a":34666,"t":"code","b":[125,64,58],"m":"adc","oa":14912,"o":"row_second_copy_page,x"},{"a":34669,"t":"code","b":[133,154],"m":"sta","oa":154,"o":"copy_dst2_hi"},{"a":34671,"t":"code","b":[173,208,12],"m":"lda","oa":3280,"o":"dissolve_rand"},{"a":34674,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":34675,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":34676,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":34677,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":34678,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":34679,"t":"code","b":[170],"m":"tax"},{"a":34680,"t":"code","b":[160,4],"m":"ldy","o":"#$04"},{"a":34682,"l":"b_877A","t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y","x":[34709]},{"a":34684,"t":"code","b":[61,142,34],"m":"and","oa":8846,"o":"pixel_masks,x"},{"a":34687,"t":"code","b":[133,19],"m":"sta","oa":19,"o":"dither_tmp"},{"a":34689,"t":"code","b":[177,100],"m":"lda","oa":100,"o":"(copy_dst),y"},{"a":34691,"t":"code","b":[61,0,149],"m":"and","oa":38144,"o":"pixel_clear_keep_masks,x"},{"a":34694,"t":"code","b":[5,19],"m":"ora","oa":19,"o":"dither_tmp"},{"a":34696,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":34698,"t":"code","b":[145,153],"m":"sta","oa":153,"o":"(copy_dst2),y"},{"a":34700,"t":"code","b":[138],"m":"txa"},{"a":34701,"t":"code","b":[73,3],"m":"eor","o":"#$03"},{"a":34703,"t":"code","b":[170],"m":"tax"},{"a":34704,"t":"code","b":[152],"m":"tya"},{"a":34705,"t":"code","b":[56],"m":"sec"},{"a":34706,"t":"code","b":[233,4],"m":"sbc","o":"#$04"},{"a":34708,"t":"code","b":[168],"m":"tay"},{"a":34709,"t":"code","b":[240,227],"m":"beq","oa":34682,"o":"b_877A"},{"a":34711,"t":"code","b":[44,30,12],"m":"bit","oa":3102,"o":"no_dissolve"},{"a":34714,"t":"code","b":[48,19],"m":"bmi","oa":34735,"o":"r_87AF"},{"a":34716,"t":"code","b":[206,210,12],"m":"dec","oa":3282,"o":"dissolve_batch"},{"a":34719,"t":"code","b":[208,11],"m":"bne","oa":34732,"o":"b_87AC"},{"a":34721,"t":"code","b":[32,44,53],"m":"jsr","oa":13612,"o":"process_sound"},{"a":34724,"t":"code","b":[206,153,32],"m":"dec","oa":8345,"o":"dither_rounds"},{"a":34727,"t":"code","b":[240,6],"m":"beq","oa":34735,"o":"r_87AF"},{"a":34729,"t":"code","b":[76,188,134],"m":"jmp","oa":34492,"o":"j_86BC"},{"a":34732,"l":"b_87AC","t":"code","b":[76,193,134],"m":"jmp","oa":34497,"o":"j_86C1","x":[34719]},{"a":34735,"l":"r_87AF","t":"code","b":[96],"m":"rts","x":[34714,34727]},{"a":34736,"l":"dither_seed_lo","c":"Low byte of the dither's own 24-bit random number (middle byte $A3, high $A4): $86C1-$86ED multiply it by 5 at every step. Nothing else reads or writes the three bytes: unlike the BBC, the dissolve does not draw on the main random number routine at $93AE. C64 only.","t":"byte","b":[1],"x":[34497,34522,34528]},{"a":34737,"l":"game_over_screen","c":"Ends a game; A = the number of decay passes to run first. Silences the three voices ($351C), turns the sprites off ($D015), points the 40 cells of the play screen's top row ($7C00-$7C27) at character $F0 (where the BBC calls ClearIconsScanner), starts the game-over sound ($0C73 = 6, pitch $0C74 from $E6; the BBC starts at $FA), decays the screen ($8801), then sets up the object of the type in $0C1C for the game-over view ($8819, configuration 0), sets the background ($0C4C = 3) and drawing flags ($0C4D, $0C6D, $0C1E), starts tune $32 ($888F), draws it ($1F9F) and decays for 30 more passes. Called from $12A9 and $35F1. The BBC's ShowGameOverScreen, except that the current-object variable is $91, not $01 as on the BBC ($87E7): on the C64 $00 and $01 are the processor port.","t":"code","b":[72],"m":"pha","x":[4777,13809]},{"a":34738,"t":"code","b":[32,28,53],"m":"jsr","oa":13596,"o":"silence_all_voices"},{"a":34741,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34743,"t":"code","b":[141,21,208],"m":"sta","o":"vic_sprite_enable"},{"a":34746,"t":"code","b":[162,39],"m":"ldx","o":"#$27"},{"a":34748,"t":"code","b":[169,240],"m":"lda","o":"#$F0"},{"a":34750,"l":"b_87BE","t":"code","b":[157,0,124],"m":"sta","oa":31744,"o":"play_matrix,x","x":[34754]},{"a":34753,"t":"code","b":[202],"m":"dex"},{"a":34754,"t":"code","b":[16,250],"m":"bpl","oa":34750,"o":"b_87BE"},{"a":34756,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":34758,"t":"code","b":[141,115,12],"m":"sta","oa":3187,"o":"sound_kind"},{"a":34761,"t":"code","b":[169,230],"m":"lda","o":"#$E6"},{"a":34763,"t":"code","b":[141,116,12],"m":"sta","oa":3188,"o":"gameover_pitch"},{"a":34766,"t":"code","b":[104],"m":"pla"},{"a":34767,"t":"code","b":[32,1,136],"m":"jsr","oa":34817,"o":"decay_view"},{"a":34770,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":34772,"t":"code","b":[140,201,12],"m":"sty","oa":3273,"o":"sights_saved_bytes"},{"a":34775,"t":"code","b":[140,95,12],"m":"sty","oa":3167,"o":"sights_on"},{"a":34778,"t":"code","b":[173,28,12],"m":"lda","oa":3100,"o":"picture_obj_type"},{"a":34781,"t":"code","b":[32,25,136],"m":"jsr","oa":34841,"o":"place_title_object"},{"a":34784,"t":"code","b":[169,3],"m":"lda","o":"#$03"},{"a":34786,"t":"code","b":[141,76,12],"m":"sta","oa":3148,"o":"backdrop_kind"},{"a":34789,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":34791,"t":"code","b":[133,145],"m":"sta","oa":145,"o":"current_obj"},{"a":34793,"t":"code","b":[169,192],"m":"lda","o":"#$C0"},{"a":34795,"t":"code","b":[141,77,12],"m":"sta","oa":3149,"o":"object_only_redraw"},{"a":34798,"t":"code","b":[141,109,12],"m":"sta","oa":3181,"o":"redraw_style"},{"a":34801,"t":"code","b":[78,30,12],"m":"lsr","oa":3102,"o":"no_dissolve"},{"a":34804,"t":"code","b":[169,50],"m":"lda","o":"#$32"},{"a":34806,"t":"code","b":[32,143,136],"m":"jsr","oa":34959,"o":"start_music"},{"a":34809,"t":"code","b":[32,159,31],"m":"jsr","oa":8095,"o":"redraw_object"},{"a":34812,"t":"code","b":[169,30],"m":"lda","o":"#$1E"},{"a":34814,"t":"code","b":[76,1,136],"m":"jmp","oa":34817,"o":"decay_view"},{"a":34817,"l":"decay_view","c":"A passes of 30 ticks each; a tick is $945F (the C64's random-dot plotter, 27 rounds a call) then $352C (sound). The BBC's DecayScreenToBlack, which calls DrawBlackDots and ProcessSound at the same points. Called twice by $87B1.","t":"code","b":[133,30],"m":"sta","oa":30,"o":"shared_counter_1E","x":[34767,34814]},{"a":34819,"l":"b_8803","t":"code","b":[169,30],"m":"lda","o":"#$1E","x":[34835]},{"a":34821,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":34823,"l":"b_8807","t":"code","b":[32,95,148],"m":"jsr","oa":37983,"o":"fade_view_27","x":[34831]},{"a":34826,"t":"code","b":[32,44,53],"m":"jsr","oa":13612,"o":"process_sound"},{"a":34829,"t":"code","b":[198,21],"m":"dec","oa":21,"o":"loop_count"},{"a":34831,"t":"code","b":[208,246],"m":"bne","oa":34823,"o":"b_8807"},{"a":34833,"t":"code","b":[198,30],"m":"dec","oa":30,"o":"shared_counter_1E"},{"a":34835,"t":"code","b":[208,238],"m":"bne","oa":34819,"o":"b_8803"},{"a":34837,"t":"code","b":[96],"m":"rts"},{"a":34838,"l":"decoy_jmp_opcode","c":"A $4C (JMP) byte that is never executed: $8816-$8818 read as JMP $3F30. The landscape generator puts $8816 on the stack as a return address ($2C1E-$2C28: LDA #$88 / LDA #$16 into $0100,X), and an RTS resumes one byte on, at $8817. Kept from the BBC original's trap for crackers (its JumpToPreview).","t":"byte","b":[76]},{"a":34839,"l":"rts_to_preview","c":"Where that planted return address lands: BMI $8858, the landscape preview. Nothing jumps or branches here; if N were clear it would run on into $8819.","t":"code","b":[48,63],"m":"bmi","oa":34904,"o":"preview_landscape"},{"a":34841,"l":"place_title_object","c":"Sets up object 1 as a title-screen object of type A ($0A41), seen from object 2, in configuration Y (0 game over, 1 the object on top of the tower, 2 the tower): object 1's z = object 2's z plus $8855,Y, its y high byte = object 2's plus $8875,Y, its x = object 2's, its yaw ($09C1) = $8878,Y; object 2's pitch ($0142) = $8872,Y and yaw ($09C2) = $887B,Y; both y low bytes 0; the viewing object ($6E) = 2. Same bytes as the BBC's SpawnTitleObject ($5F80).","t":"code","b":[141,65,10],"m":"sta","oa":2625,"o":"a_0A41","x":[34781,34951]},{"a":34844,"t":"code","b":[185,85,136],"m":"lda","oa":34901,"o":"title_obj_z,y"},{"a":34847,"t":"code","b":[24],"m":"clc"},{"a":34848,"t":"code","b":[109,130,9],"m":"adc","oa":2434,"o":"a_0982"},{"a":34851,"t":"code","b":[141,129,9],"m":"sta","oa":2433,"o":"a_0981"},{"a":34854,"t":"code","b":[173,66,9],"m":"lda","oa":2370,"o":"a_0942"},{"a":34857,"t":"code","b":[24],"m":"clc"},{"a":34858,"t":"code","b":[121,117,136],"m":"adc","oa":34933,"o":"title_obj_height,y"},{"a":34861,"t":"code","b":[141,65,9],"m":"sta","oa":2369,"o":"a_0941"},{"a":34864,"t":"code","b":[173,2,9],"m":"lda","oa":2306,"o":"a_0902"},{"a":34867,"t":"code","b":[141,1,9],"m":"sta","oa":2305,"o":"a_0901"},{"a":34870,"t":"code","b":[185,114,136],"m":"lda","oa":34930,"o":"title_view_pitch,y"},{"a":34873,"t":"code","b":[141,66,1],"m":"sta","oa":322,"o":"a_0142"},{"a":34876,"t":"code","b":[185,123,136],"m":"lda","oa":34939,"o":"title_view_yaw,y"},{"a":34879,"t":"code","b":[141,194,9],"m":"sta","oa":2498,"o":"a_09C2"},{"a":34882,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":34884,"t":"code","b":[141,2,10],"m":"sta","oa":2562,"o":"a_0A02"},{"a":34887,"t":"code","b":[141,1,10],"m":"sta","oa":2561,"o":"a_0A01"},{"a":34890,"t":"code","b":[185,120,136],"m":"lda","oa":34936,"o":"title_obj_yaw,y"},{"a":34893,"t":"code","b":[141,193,9],"m":"sta","oa":2497,"o":"a_09C1"},{"a":34896,"t":"code","b":[162,2],"m":"ldx","o":"#$02"},{"a":34898,"t":"code","b":[134,110],"m":"stx","oa":110,"o":"viewer_obj"},{"a":34900,"t":"code","b":[96],"m":"rts"},{"a":34901,"l":"title_obj_z","c":"For $8819, by configuration: how far in front of the viewer object 1 stands, 5 (game over), 7, 7.","t":"byte","b":[5,7,7],"x":[34844]},{"a":34904,"l":"preview_landscape","c":"The landscape seen from above before play. $1420 (the BBC's SpawnEnemies; it also sets the play palette's colours 2 and 3 by the number of enemies), $13AB draws the view (X = 3, Y = 0, A = $80), token 4 prints PRESS ANY KEY and LANDSCAPE, $33E1 the landscape number, then $1450 (the BBC's SpawnPlayer, which goes on to check the secret code and start play); if that returns, JMP $1074 prints WRONG SECRET CODE (token 3). Reached only through the BMI at $8817. The BBC's PreviewLandscape with its calls moved.","t":"code","b":[32,32,20],"m":"jsr","oa":5152,"o":"place_enemies","x":[34839]},{"a":34907,"t":"code","b":[162,3],"m":"ldx","o":"#$03"},{"a":34909,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":34911,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":34913,"t":"code","b":[32,171,19],"m":"jsr","oa":5035,"o":"draw_title_view"},{"a":34916,"t":"code","b":[162,4],"m":"ldx","o":"#$04"},{"a":34918,"t":"code","b":[32,23,134],"m":"jsr","oa":34327,"o":"print_token"},{"a":34921,"t":"code","b":[32,225,51],"m":"jsr","oa":13281,"o":"print_landscape_num"},{"a":34924,"t":"code","b":[32,80,20],"m":"jsr","oa":5200,"o":"place_player"},{"a":34927,"t":"code","b":[76,116,16],"m":"jmp","oa":4212,"o":"wrong_code"},{"a":34930,"l":"title_view_pitch","c":"For $8819, by configuration: the viewer's pitch, -12, -5, -5 ($F4, $FB, $FB).","t":"byte","b":[244,251,251],"x":[34870]},{"a":34933,"l":"title_obj_height","c":"For $8819, by configuration: object 1's height above the viewer in whole units, 0, 1, 0.","t":"byte","b":[0,1,0],"x":[34858]},{"a":34936,"l":"title_obj_yaw","c":"For $8819, by configuration: object 1's yaw, $80, $8E, $CE (128, -114, -50).","t":"byte","b":[128,142,206],"x":[34890]},{"a":34939,"l":"title_view_yaw","c":"For $8819, by configuration: the viewer's yaw, 0, -8, -8.","t":"byte","b":[0,248,248],"x":[34876]},{"a":34942,"l":"draw_title_pair","c":"Draws the two title-screen objects: type A on top of the tower (configuration 1) through $8887, then type 6 (the tower, in the BBC's numbering) with configuration 2 by falling into $8887. Called from $13EC. Same bytes as the BBC's DrawTitleObjects.","t":"code","b":[160,1],"m":"ldy","o":"#$01","x":[5100]},{"a":34944,"t":"code","b":[32,135,136],"m":"jsr","oa":34951,"o":"draw_title_object"},{"a":34947,"t":"code","b":[160,2],"m":"ldy","o":"#$02"},{"a":34949,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":34951,"l":"draw_title_object","c":"Sets up object 1 as type A in configuration Y ($8819) and draws it ($8533 with Y = 1).","t":"code","b":[32,25,136],"m":"jsr","oa":34841,"o":"place_title_object","x":[34944]},{"a":34954,"t":"code","b":[160,1],"m":"ldy","o":"#$01"},{"a":34956,"t":"code","b":[76,51,133],"m":"jmp","oa":34099,"o":"draw_object"},{"a":34959,"l":"start_music","c":"Starts a tune: A = the offset of its first note in the music data at $AB50 (into $0CE7) and sound mode 3 ($0C73) so that $352C plays it note by note. The C64 adds $AC18 = 1: $AC18 is the voice byte of sound 3 (the music note), which $3504 steps before each note, so a tune starts on voice 2 and rotates through all three. Called from $1B84, $2181, $3627, $87F6.","t":"code","b":[141,231,12],"m":"sta","oa":3303,"o":"music_pos","x":[7044,8577,13863,34806]},{"a":34962,"t":"code","b":[169,3],"m":"lda","o":"#$03"},{"a":34964,"t":"code","b":[141,115,12],"m":"sta","oa":3187,"o":"sound_kind"},{"a":34967,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":34969,"t":"code","b":[141,24,172],"m":"sta","oa":44056,"o":"sound_music_note"},{"a":34972,"t":"code","b":[96],"m":"rts"},{"a":34973,"l":"unused_fill_889D","c":"Unused, to $88FF: $FF $FF $00 $00 repeated, with one $BF at $88FC, the same kind of fill as other gaps ($94D1, $9AF8). No instruction in the traced code can reach it.","t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":34981,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":34989,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":34997,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":35005,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":35013,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":35021,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":35029,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":35037,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":35045,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":35053,"t":"byte","b":[255,0,0,255,255,0,0,255]},{"a":35061,"t":"byte","b":[255,0,0,255,255,0,0,191]},{"a":35069,"t":"byte","b":[255,0,0]},{"a":35072,"l":"init_machine","c":"C64 start-up, called once from the entry at $3F00. Masks interrupts; $00 = $2F, $01 = $35 (RAM everywhere, I/O at $D000); NMI vector $FFFA = $8F98, IRQ vector $FFFE = $8F9E; and six JMPs at the BBC operating system's addresses: $FFC2 to $8ED1 and $FFC5 to $8F0C (the BBC's GSINIT and GSREAD slots, used here for the sound's frame tick and pitch envelopes), $FFE0 OSRDCH to $8D2C, $FFEE OSWRCH to $8A6B, $FFF1 OSWORD to $8D81, $FFF4 OSBYTE to $8F78. Then the raster interrupt on ($D01A = 1) with its flags cleared, CIA interrupts off ($DC0D, $DD0D = $7F), a second store to $D019, of $64 (the title set-up at $9A7B puts the same $64 in $D012), $D011 = $1B, $D016 = $D8 (multicolour), sprites off and unexpanded, CLI, then $89C5, $8A22, $8A36, $8A03, and the SID: control 8 on all three voices, filter $D415-$D417 cleared, volume 15. Also sets $D025 = 0.","t":"code","b":[120],"m":"sei","x":[16128]},{"a":35073,"t":"code","b":[169,47],"m":"lda","o":"#$2F"},{"a":35075,"t":"code","b":[133,0],"m":"sta","oa":0,"o":"cpu_port_ddr"},{"a":35077,"t":"code","b":[169,53],"m":"lda","o":"#$35"},{"a":35079,"t":"code","b":[133,1],"m":"sta","oa":1,"o":"cpu_port_banking"},{"a":35081,"t":"code","b":[169,152],"m":"lda","o":"#$98"},{"a":35083,"t":"code","b":[141,250,255],"m":"sta","oa":65530,"o":"$FFFA"},{"a":35086,"t":"code","b":[169,143],"m":"lda","o":"#$8F"},{"a":35088,"t":"code","b":[141,251,255],"m":"sta","oa":65531,"o":"$FFFB"},{"a":35091,"t":"code","b":[169,158],"m":"lda","o":"#$9E"},{"a":35093,"t":"code","b":[141,254,255],"m":"sta","oa":65534,"o":"$FFFE"},{"a":35096,"t":"code","b":[169,143],"m":"lda","o":"#$8F"},{"a":35098,"t":"code","b":[141,255,255],"m":"sta","oa":65535,"o":"$FFFF"},{"a":35101,"t":"code","b":[169,209],"m":"lda","o":"#$D1"},{"a":35103,"t":"code","b":[141,195,255],"m":"sta","oa":65475,"o":"gsinit_slot_lo"},{"a":35106,"t":"code","b":[169,142],"m":"lda","o":"#$8E"},{"a":35108,"t":"code","b":[141,196,255],"m":"sta","oa":65476,"o":"gsinit_slot_hi"},{"a":35111,"t":"code","b":[169,12],"m":"lda","o":"#$0C"},{"a":35113,"t":"code","b":[141,198,255],"m":"sta","oa":65478,"o":"gsread_slot_lo"},{"a":35116,"t":"code","b":[169,143],"m":"lda","o":"#$8F"},{"a":35118,"t":"code","b":[141,199,255],"m":"sta","oa":65479,"o":"gsread_slot_hi"},{"a":35121,"t":"code","b":[169,107],"m":"lda","o":"#$6B"},{"a":35123,"t":"code","b":[141,239,255],"m":"sta","oa":65519,"o":"oswrch_lo"},{"a":35126,"t":"code","b":[169,138],"m":"lda","o":"#$8A"},{"a":35128,"t":"code","b":[141,240,255],"m":"sta","oa":65520,"o":"oswrch_hi"},{"a":35131,"t":"code","b":[169,44],"m":"lda","o":"#$2C"},{"a":35133,"t":"code","b":[141,225,255],"m":"sta","oa":65505,"o":"osrdch_lo"},{"a":35136,"t":"code","b":[169,141],"m":"lda","o":"#$8D"},{"a":35138,"t":"code","b":[141,226,255],"m":"sta","oa":65506,"o":"osrdch_hi"},{"a":35141,"t":"code","b":[169,129],"m":"lda","o":"#$81"},{"a":35143,"t":"code","b":[141,242,255],"m":"sta","oa":65522,"o":"osword_lo"},{"a":35146,"t":"code","b":[169,141],"m":"lda","o":"#$8D"},{"a":35148,"t":"code","b":[141,243,255],"m":"sta","oa":65523,"o":"osword_hi"},{"a":35151,"t":"code","b":[169,120],"m":"lda","o":"#$78"},{"a":35153,"t":"code","b":[141,245,255],"m":"sta","oa":65525,"o":"osbyte_lo"},{"a":35156,"t":"code","b":[169,143],"m":"lda","o":"#$8F"},{"a":35158,"t":"code","b":[141,246,255],"m":"sta","oa":65526,"o":"osbyte_hi"},{"a":35161,"t":"code","b":[169,76],"m":"lda","o":"#$4C"},{"a":35163,"t":"code","b":[141,194,255],"m":"sta","oa":65474,"o":"gsinit_slot_jmp"},{"a":35166,"t":"code","b":[141,197,255],"m":"sta","oa":65477,"o":"gsread_slot_jmp"},{"a":35169,"t":"code","b":[141,238,255],"m":"sta","oa":65518,"o":"oswrch_jmp"},{"a":35172,"t":"code","b":[141,224,255],"m":"sta","oa":65504,"o":"osrdch_jmp"},{"a":35175,"t":"code","b":[141,241,255],"m":"sta","oa":65521,"o":"osword_jmp"},{"a":35178,"t":"code","b":[141,244,255],"m":"sta","oa":65524,"o":"osbyte_jmp"},{"a":35181,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":35183,"t":"code","b":[141,26,208],"m":"sta","o":"vic_irq_enable"},{"a":35186,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":35188,"t":"code","b":[141,25,208],"m":"sta","o":"vic_irq_status"},{"a":35191,"t":"code","b":[169,127],"m":"lda","o":"#$7F"},{"a":35193,"t":"code","b":[141,13,220],"m":"sta","o":"cia1_interrupt"},{"a":35196,"t":"code","b":[141,13,221],"m":"sta","o":"cia2_interrupt"},{"a":35199,"t":"code","b":[169,100],"m":"lda","o":"#$64"},{"a":35201,"t":"code","b":[141,25,208],"m":"sta","o":"vic_irq_status"},{"a":35204,"t":"code","b":[169,27],"m":"lda","o":"#$1B"},{"a":35206,"t":"code","b":[141,17,208],"m":"sta","o":"vic_control1"},{"a":35209,"t":"code","b":[169,216],"m":"lda","o":"#$D8"},{"a":35211,"t":"code","b":[141,22,208],"m":"sta","o":"vic_control2"},{"a":35214,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35216,"t":"code","b":[141,21,208],"m":"sta","o":"vic_sprite_enable"},{"a":35219,"t":"code","b":[141,29,208],"m":"sta","o":"vic_sprite_expand_x"},{"a":35222,"t":"code","b":[141,23,208],"m":"sta","o":"vic_sprite_expand_y"},{"a":35225,"t":"code","b":[141,37,208],"m":"sta","o":"vic_sprite_mc0"},{"a":35228,"t":"code","b":[88],"m":"cli"},{"a":35229,"t":"code","b":[32,197,137],"m":"jsr","oa":35269,"o":"patch_font_glyphs"},{"a":35232,"t":"code","b":[32,34,138],"m":"jsr","oa":35362,"o":"fill_colour_ram_0d"},{"a":35235,"t":"code","b":[32,54,138],"m":"jsr","oa":35382,"o":"set_backgrounds"},{"a":35238,"t":"code","b":[32,3,138],"m":"jsr","oa":35331,"o":"set_border_vic_bank1"},{"a":35241,"t":"code","b":[169,8],"m":"lda","o":"#$08"},{"a":35243,"t":"code","b":[141,4,212],"m":"sta","o":"sid_v1_control"},{"a":35246,"t":"code","b":[141,11,212],"m":"sta","o":"sid_v2_control"},{"a":35249,"t":"code","b":[141,18,212],"m":"sta","o":"sid_v3_control"},{"a":35252,"t":"code","b":[169,15],"m":"lda","o":"#$0F"},{"a":35254,"t":"code","b":[141,24,212],"m":"sta","o":"sid_filter_mode_volume"},{"a":35257,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35259,"t":"code","b":[141,21,212],"m":"sta","o":"sid_filter_cutoff_lo"},{"a":35262,"t":"code","b":[141,22,212],"m":"sta","o":"sid_filter_cutoff_hi"},{"a":35265,"t":"code","b":[141,23,212],"m":"sta","o":"sid_filter_resonance"},{"a":35268,"t":"code","b":[96],"m":"rts"},{"a":35269,"l":"patch_font_glyphs","c":"Copies four new glyphs from $89E3 over the BBC font: character $5D (']') becomes a right arrow, $5F ('_') a dash at mid height, $7B ('{') and $7C ('|') patterns of four-pixel blocks. Called only by $8900. What prints them was not found (no immediate load of these codes and none in the token text).","t":"code","b":[162,7],"m":"ldx","o":"#$07","x":[35229]},{"a":35271,"l":"b_89C7","t":"code","b":[189,227,137],"m":"lda","oa":35299,"o":"glyph_5d_arrow,x","x":[35296]},{"a":35274,"t":"code","b":[157,232,130],"m":"sta","oa":33512,"o":"font_5d_arrow,x"},{"a":35277,"t":"code","b":[189,235,137],"m":"lda","oa":35307,"o":"glyph_5f_dash,x"},{"a":35280,"t":"code","b":[157,248,130],"m":"sta","oa":33528,"o":"font_5f_dash,x"},{"a":35283,"t":"code","b":[189,243,137],"m":"lda","oa":35315,"o":"glyph_7b_blocks,x"},{"a":35286,"t":"code","b":[157,216,131],"m":"sta","oa":33752,"o":"font_7b_blocks,x"},{"a":35289,"t":"code","b":[189,251,137],"m":"lda","oa":35323,"o":"glyph_7c_blocks,x"},{"a":35292,"t":"code","b":[157,224,131],"m":"sta","oa":33760,"o":"font_7c_blocks,x"},{"a":35295,"t":"code","b":[202],"m":"dex"},{"a":35296,"t":"code","b":[16,229],"m":"bpl","oa":35271,"o":"b_89C7"},{"a":35298,"t":"code","b":[96],"m":"rts"},{"a":35299,"l":"glyph_5d_arrow","c":"Glyph for character $5D, copied to $82E8: a right-pointing arrow, rows $00 $08 $04 $3E $04 $08 $00 $00.","t":"byte","b":[0,8,4,62,4,8,0,0],"x":[35271]},{"a":35307,"l":"glyph_5f_dash","c":"Glyph for character $5F, copied to $82F8: a five-pixel dash on row 3 ($7C), the rest empty.","t":"byte","b":[0,0,0,124,0,0,0,0],"x":[35277]},{"a":35315,"l":"glyph_7b_blocks","c":"Glyph for character $7B, copied to $83D8: left half set in rows 0-1 and 5-6, right half in rows 2-4 ($F0 $F0 $0F $0F $0F $F0 $F0 $00).","t":"byte","b":[240,240,15,15,15,240,240,0],"x":[35283]},{"a":35323,"l":"glyph_7c_blocks","c":"Glyph for character $7C, copied to $83E0: left half set in rows 0-1 and 5-6, rows 2-4 and 7 empty ($F0 $F0 $00 $00 $00 $F0 $F0 $00).","t":"byte","b":[240,240,0,0,0,240,240,0],"x":[35289]},{"a":35331,"l":"set_border_vic_bank1","c":"Border black ($D020 = 0), then with interrupts masked VIC bank 1 ($DD02 bits 0-1 made outputs, $DD00 bits 0-1 = %10: $4000-$7FFF) and $D018 = $78 (screen matrix $5C00, characters $6000). Called only by $8900; $9A51 later picks the title's or the play screen's bank.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[35238]},{"a":35333,"t":"code","b":[141,32,208],"m":"sta","o":"vic_border"},{"a":35336,"t":"code","b":[120],"m":"sei"},{"a":35337,"t":"code","b":[173,2,221],"m":"lda","o":"cia2_ddr_a"},{"a":35340,"t":"code","b":[9,3],"m":"ora","o":"#$03"},{"a":35342,"t":"code","b":[141,2,221],"m":"sta","o":"cia2_ddr_a"},{"a":35345,"t":"code","b":[173,0,221],"m":"lda","o":"cia2_port_a"},{"a":35348,"t":"code","b":[41,252],"m":"and","o":"#$FC"},{"a":35350,"t":"code","b":[9,2],"m":"ora","o":"#$02"},{"a":35352,"t":"code","b":[141,0,221],"m":"sta","o":"cia2_port_a"},{"a":35355,"t":"code","b":[169,120],"m":"lda","o":"#$78"},{"a":35357,"t":"code","b":[141,24,208],"m":"sta","o":"vic_memory"},{"a":35360,"t":"code","b":[88],"m":"cli"},{"a":35361,"t":"code","b":[96],"m":"rts"},{"a":35362,"l":"fill_colour_ram_0d","c":"Fills colour RAM $D800-$DBFF with $0D: in the multicolour character mode set at start-up, a multicolour cell whose %11 pixels are colour 5 (green). Called only by $8900.","t":"code","b":[162,0],"m":"ldx","o":"#$00","x":[35232]},{"a":35364,"t":"code","b":[169,13],"m":"lda","o":"#$0D"},{"a":35366,"l":"b_8A26","t":"code","b":[157,0,216],"m":"sta","o":"colour_ram,x","x":[35379]},{"a":35369,"t":"code","b":[157,0,217],"m":"sta","o":"$D900,x"},{"a":35372,"t":"code","b":[157,0,218],"m":"sta","o":"$DA00,x"},{"a":35375,"t":"code","b":[157,0,219],"m":"sta","o":"$DB00,x"},{"a":35378,"t":"code","b":[202],"m":"dex"},{"a":35379,"t":"code","b":[208,241],"m":"bne","oa":35366,"o":"b_8A26"},{"a":35381,"t":"code","b":[96],"m":"rts"},{"a":35382,"l":"set_backgrounds","c":"$D021 = 6 (blue), $D022 = 0 (black), $D023 = 1 (white), then fills $5800-$5FFF so that each byte holds the low byte of its own address: the screen matrix at $5C00 that $8A03 selects then shows characters 0-255 in order, four times over. Called only by $8900.","t":"code","b":[169,6],"m":"lda","o":"#$06","x":[35235]},{"a":35384,"t":"code","b":[141,33,208],"m":"sta","o":"vic_background0"},{"a":35387,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35389,"t":"code","b":[141,34,208],"m":"sta","o":"vic_background1"},{"a":35392,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":35394,"t":"code","b":[141,35,208],"m":"sta","o":"vic_background2"},{"a":35397,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":35399,"l":"b_8A47","t":"code","b":[138],"m":"txa","x":[35425]},{"a":35400,"t":"code","b":[157,0,92],"m":"sta","oa":23552,"o":"f_5C00,x"},{"a":35403,"t":"code","b":[157,0,93],"m":"sta","oa":23808,"o":"f_5D00,x"},{"a":35406,"t":"code","b":[157,0,94],"m":"sta","oa":24064,"o":"f_5E00,x"},{"a":35409,"t":"code","b":[157,0,95],"m":"sta","oa":24320,"o":"f_5F00,x"},{"a":35412,"t":"code","b":[157,0,88],"m":"sta","oa":22528,"o":"f_5800,x"},{"a":35415,"t":"code","b":[157,0,89],"m":"sta","oa":22784,"o":"f_5900,x"},{"a":35418,"t":"code","b":[157,0,90],"m":"sta","oa":23040,"o":"f_5A00,x"},{"a":35421,"t":"code","b":[157,0,91],"m":"sta","oa":23296,"o":"f_5B00,x"},{"a":35424,"t":"code","b":[202],"m":"dex"},{"a":35425,"t":"code","b":[208,228],"m":"bne","oa":35399,"o":"b_8A47"},{"a":35427,"t":"code","b":[96],"m":"rts"},{"a":35428,"l":"unreached_rts","c":"An RTS after the one that ends $8A36; no instruction in the traced code can reach it.","t":"byte","b":[96]},{"a":35429,"l":"colour_fill_patterns","c":"The four logical colours as fill bytes, one bit pair repeated: $00, $55, $AA, $FF. COLOUR and GCOL look their colour number up here (AND $7F, not checked against 3: 4 and up would read $8A69 onwards).","t":"byte","b":[0,85,170,255],"x":[35531,35550,35579]},{"a":35433,"l":"vdu_pending","c":"The VDU code still collecting parameter bytes, $11, $12, $19 or $1F, or 0 for none: set at $8B23, cleared at $8B0B.","t":"byte","b":[0],"x":[35444,35597,35619]},{"a":35434,"l":"vdu_param_count","c":"Parameter bytes received so far for the code in $8A69: zeroed at $8B28, counted up at $8A7F before each is handled.","t":"byte","b":[2],"x":[35455,35462,35485,35515,35624]},{"a":35435,"l":"oswrch_vdu","c":"OSWRCH, reached through the JMP at $FFEE: the C64's stand-in for the BBC's VDU drivers. Keeps A, X and Y in $8CEB-$8CED (restored at $8C85), sends a byte that belongs to a pending code to $8A7F and a new one to $8B13. Text goes on the multicolour bitmap at $E000 (the title screens) in the BBC font at $8100, each character 8 x 8 multicolour pixels and so two cells wide: 20 to a row, 25 rows. There is no graphics cursor: VDU 5 text also goes at the text cursor, and a PLOT only lowers the next characters for the drop shadow. Codes that do something: 4, 5, 8, 9, 10, 13, 17, 18, 25, 31, 127 and 32-126; the bell (7) the number entry sends at $331B is silent.","t":"code","b":[141,235,140],"m":"sta","oa":36075,"o":"vdu_saved_a","x":[35768,35782,35791]},{"a":35438,"t":"code","b":[142,236,140],"m":"stx","oa":36076,"o":"saved_x"},{"a":35441,"t":"code","b":[140,237,140],"m":"sty","oa":36077,"o":"saved_y"},{"a":35444,"t":"code","b":[173,105,138],"m":"lda","oa":35433,"o":"vdu_pending"},{"a":35447,"t":"code","b":[208,6],"m":"bne","oa":35455,"o":"vdu_param_byte"},{"a":35449,"t":"code","b":[173,235,140],"m":"lda","oa":36075,"o":"vdu_saved_a"},{"a":35452,"t":"code","b":[76,19,139],"m":"jmp","oa":35603,"o":"vdu_new_code"},{"a":35455,"l":"vdu_param_byte","c":"A parameter byte for the code in $8A69, counted in $8A6A. PLOT keeps only its fifth byte (y high) in $8CB5; TAB stores its first as column x 2 in $8CE5 and its second as the row in $8CE6, neither checked (a row of 25 or more would draw past $FF3F); GCOL skips its first and sets a graphics colour from its second, below 128 the foreground $8CB3, else the background $8CB4; COLOUR sets the text background $8CB2 from its byte, bit 7 dropped, so there is no way to set the text foreground. The current pair $8CE3/$8CE4 follows when its mode ($8CAF) is in use. The code is cleared at $8B0B after its last byte.","t":"code","b":[238,106,138],"m":"inc","oa":35434,"o":"vdu_param_count","x":[35447]},{"a":35458,"t":"code","b":[201,25],"m":"cmp","o":"#$19"},{"a":35460,"t":"code","b":[208,19],"m":"bne","oa":35481,"o":"b_8A99"},{"a":35462,"t":"code","b":[173,106,138],"m":"lda","oa":35434,"o":"vdu_param_count"},{"a":35465,"t":"code","b":[201,5],"m":"cmp","o":"#$05"},{"a":35467,"t":"code","b":[208,9],"m":"bne","oa":35478,"o":"b_8A96"},{"a":35469,"t":"code","b":[173,235,140],"m":"lda","oa":36075,"o":"vdu_saved_a"},{"a":35472,"t":"code","b":[141,181,140],"m":"sta","oa":36021,"o":"plot_y_high"},{"a":35475,"t":"code","b":[76,11,139],"m":"jmp","oa":35595,"o":"j_8B0B"},{"a":35478,"l":"b_8A96","t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit","x":[35467]},{"a":35481,"l":"b_8A99","t":"code","b":[201,31],"m":"cmp","o":"#$1F","x":[35460]},{"a":35483,"t":"code","b":[208,26],"m":"bne","oa":35511,"o":"b_8AB7"},{"a":35485,"t":"code","b":[173,106,138],"m":"lda","oa":35434,"o":"vdu_param_count"},{"a":35488,"t":"code","b":[201,2],"m":"cmp","o":"#$02"},{"a":35490,"t":"code","b":[240,10],"m":"beq","oa":35502,"o":"b_8AAE"},{"a":35492,"t":"code","b":[173,235,140],"m":"lda","oa":36075,"o":"vdu_saved_a"},{"a":35495,"t":"code","b":[10],"m":"asl","o":"a"},{"a":35496,"t":"code","b":[141,229,140],"m":"sta","oa":36069,"o":"text_column"},{"a":35499,"t":"code","b":[76,16,139],"m":"jmp","oa":35600,"o":"j_8B10"},{"a":35502,"l":"b_8AAE","t":"code","b":[173,235,140],"m":"lda","oa":36075,"o":"vdu_saved_a","x":[35490]},{"a":35505,"t":"code","b":[141,230,140],"m":"sta","oa":36070,"o":"text_row"},{"a":35508,"t":"code","b":[76,11,139],"m":"jmp","oa":35595,"o":"j_8B0B"},{"a":35511,"l":"b_8AB7","t":"code","b":[201,18],"m":"cmp","o":"#$12","x":[35483]},{"a":35513,"t":"code","b":[208,54],"m":"bne","oa":35569,"o":"b_8AF1"},{"a":35515,"t":"code","b":[173,106,138],"m":"lda","oa":35434,"o":"vdu_param_count"},{"a":35518,"t":"code","b":[201,1],"m":"cmp","o":"#$01"},{"a":35520,"t":"code","b":[240,78],"m":"beq","oa":35600,"o":"j_8B10"},{"a":35522,"t":"code","b":[174,235,140],"m":"ldx","oa":36075,"o":"vdu_saved_a"},{"a":35525,"t":"code","b":[16,23],"m":"bpl","oa":35550,"o":"b_8ADE"},{"a":35527,"t":"code","b":[138],"m":"txa"},{"a":35528,"t":"code","b":[41,127],"m":"and","o":"#$7F"},{"a":35530,"t":"code","b":[170],"m":"tax"},{"a":35531,"t":"code","b":[189,101,138],"m":"lda","oa":35429,"o":"colour_fill_patterns,x"},{"a":35534,"t":"code","b":[141,180,140],"m":"sta","oa":36020,"o":"gcol_bg_fill"},{"a":35537,"t":"code","b":[174,175,140],"m":"ldx","oa":36015,"o":"vdu_mode"},{"a":35540,"t":"code","b":[224,5],"m":"cpx","o":"#$05"},{"a":35542,"t":"code","b":[208,22],"m":"bne","oa":35566,"o":"b_8AEE"},{"a":35544,"t":"code","b":[141,228,140],"m":"sta","oa":36068,"o":"bg_fill"},{"a":35547,"t":"code","b":[76,11,139],"m":"jmp","oa":35595,"o":"j_8B0B"},{"a":35550,"l":"b_8ADE","t":"code","b":[189,101,138],"m":"lda","oa":35429,"o":"colour_fill_patterns,x","x":[35525]},{"a":35553,"t":"code","b":[141,179,140],"m":"sta","oa":36019,"o":"gcol_fg_fill"},{"a":35556,"t":"code","b":[174,175,140],"m":"ldx","oa":36015,"o":"vdu_mode"},{"a":35559,"t":"code","b":[224,5],"m":"cpx","o":"#$05"},{"a":35561,"t":"code","b":[208,3],"m":"bne","oa":35566,"o":"b_8AEE"},{"a":35563,"t":"code","b":[141,227,140],"m":"sta","oa":36067,"o":"fg_fill"},{"a":35566,"l":"b_8AEE","t":"code","b":[76,11,139],"m":"jmp","oa":35595,"o":"j_8B0B","x":[35542,35561]},{"a":35569,"l":"b_8AF1","t":"code","b":[201,17],"m":"cmp","o":"#$11","x":[35513]},{"a":35571,"t":"code","b":[208,22],"m":"bne","oa":35595,"o":"j_8B0B"},{"a":35573,"t":"code","b":[173,235,140],"m":"lda","oa":36075,"o":"vdu_saved_a"},{"a":35576,"t":"code","b":[41,127],"m":"and","o":"#$7F"},{"a":35578,"t":"code","b":[170],"m":"tax"},{"a":35579,"t":"code","b":[189,101,138],"m":"lda","oa":35429,"o":"colour_fill_patterns,x"},{"a":35582,"t":"code","b":[141,178,140],"m":"sta","oa":36018,"o":"text_bg_fill"},{"a":35585,"t":"code","b":[174,175,140],"m":"ldx","oa":36015,"o":"vdu_mode"},{"a":35588,"t":"code","b":[224,4],"m":"cpx","o":"#$04"},{"a":35590,"t":"code","b":[208,3],"m":"bne","oa":35595,"o":"j_8B0B"},{"a":35592,"t":"code","b":[141,228,140],"m":"sta","oa":36068,"o":"bg_fill"},{"a":35595,"l":"j_8B0B","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[35475,35508,35547,35566,35571,35590]},{"a":35597,"t":"code","b":[141,105,138],"m":"sta","oa":35433,"o":"vdu_pending"},{"a":35600,"l":"j_8B10","t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit","x":[35499,35520]},{"a":35603,"l":"vdu_new_code","c":"A byte with nothing pending: $11, $12, $19 and $1F start collecting parameters; 9 moves two cells right (wrapping to column 0 of the same row), 8 two cells left (to column 38 of the row above, row 24 above the top), 10 a row down, 13 to column 0; 4 and 5 switch to the text or graphics colour pair, 5 also setting $8CB0 so the picture shows through a glyph's clear pixels; 127 is backspace, an opaque space, backspace (A comes back as 8); other codes below 32 and all from 128 are ignored; 32-126 are drawn at $8BDC.","t":"code","b":[201,31],"m":"cmp","o":"#$1F","x":[35452]},{"a":35605,"t":"code","b":[240,12],"m":"beq","oa":35619,"o":"b_8B23"},{"a":35607,"t":"code","b":[201,18],"m":"cmp","o":"#$12"},{"a":35609,"t":"code","b":[240,8],"m":"beq","oa":35619,"o":"b_8B23"},{"a":35611,"t":"code","b":[201,25],"m":"cmp","o":"#$19"},{"a":35613,"t":"code","b":[240,4],"m":"beq","oa":35619,"o":"b_8B23"},{"a":35615,"t":"code","b":[201,17],"m":"cmp","o":"#$11"},{"a":35617,"t":"code","b":[208,11],"m":"bne","oa":35630,"o":"b_8B2E"},{"a":35619,"l":"b_8B23","t":"code","b":[141,105,138],"m":"sta","oa":35433,"o":"vdu_pending","x":[35605,35609,35613]},{"a":35622,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35624,"t":"code","b":[141,106,138],"m":"sta","oa":35434,"o":"vdu_param_count"},{"a":35627,"t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit"},{"a":35630,"l":"b_8B2E","t":"code","b":[201,9],"m":"cmp","o":"#$09","x":[35617]},{"a":35632,"t":"code","b":[208,18],"m":"bne","oa":35652,"o":"b_8B44"},{"a":35634,"t":"code","b":[173,229,140],"m":"lda","oa":36069,"o":"text_column"},{"a":35637,"t":"code","b":[24],"m":"clc"},{"a":35638,"t":"code","b":[105,2],"m":"adc","o":"#$02"},{"a":35640,"t":"code","b":[201,40],"m":"cmp","o":"#$28"},{"a":35642,"t":"code","b":[144,2],"m":"bcc","oa":35646,"o":"b_8B3E"},{"a":35644,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35646,"l":"b_8B3E","t":"code","b":[141,229,140],"m":"sta","oa":36069,"o":"text_column","x":[35642]},{"a":35649,"t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit"},{"a":35652,"l":"b_8B44","t":"code","b":[201,8],"m":"cmp","o":"#$08","x":[35632]},{"a":35654,"t":"code","b":[208,26],"m":"bne","oa":35682,"o":"b_8B62"},{"a":35656,"t":"code","b":[206,229,140],"m":"dec","oa":36069,"o":"text_column"},{"a":35659,"t":"code","b":[206,229,140],"m":"dec","oa":36069,"o":"text_column"},{"a":35662,"t":"code","b":[16,15],"m":"bpl","oa":35679,"o":"b_8B5F"},{"a":35664,"t":"code","b":[206,230,140],"m":"dec","oa":36070,"o":"text_row"},{"a":35667,"t":"code","b":[16,5],"m":"bpl","oa":35674,"o":"b_8B5A"},{"a":35669,"t":"code","b":[169,24],"m":"lda","o":"#$18"},{"a":35671,"t":"code","b":[141,230,140],"m":"sta","oa":36070,"o":"text_row"},{"a":35674,"l":"b_8B5A","t":"code","b":[169,38],"m":"lda","o":"#$26","x":[35667]},{"a":35676,"t":"code","b":[141,229,140],"m":"sta","oa":36069,"o":"text_column"},{"a":35679,"l":"b_8B5F","t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit","x":[35662]},{"a":35682,"l":"b_8B62","t":"code","b":[201,10],"m":"cmp","o":"#$0A","x":[35654]},{"a":35684,"t":"code","b":[208,6],"m":"bne","oa":35692,"o":"b_8B6C"},{"a":35686,"t":"code","b":[32,143,140],"m":"jsr","oa":35983,"o":"text_cursor_down"},{"a":35689,"t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit"},{"a":35692,"l":"b_8B6C","t":"code","b":[201,13],"m":"cmp","o":"#$0D","x":[35684]},{"a":35694,"t":"code","b":[208,8],"m":"bne","oa":35704,"o":"b_8B78"},{"a":35696,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35698,"t":"code","b":[141,229,140],"m":"sta","oa":36069,"o":"text_column"},{"a":35701,"t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit"},{"a":35704,"l":"b_8B78","t":"code","b":[201,32],"m":"cmp","o":"#$20","x":[35694]},{"a":35706,"t":"code","b":[176,54],"m":"bcs","oa":35762,"o":"b_8BB2"},{"a":35708,"t":"code","b":[201,4],"m":"cmp","o":"#$04"},{"a":35710,"t":"code","b":[208,23],"m":"bne","oa":35735,"o":"b_8B97"},{"a":35712,"t":"code","b":[141,175,140],"m":"sta","oa":36015,"o":"vdu_mode"},{"a":35715,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35717,"t":"code","b":[141,176,140],"m":"sta","oa":36016,"o":"vdu_keep_mask"},{"a":35720,"t":"code","b":[173,178,140],"m":"lda","oa":36018,"o":"text_bg_fill"},{"a":35723,"t":"code","b":[141,228,140],"m":"sta","oa":36068,"o":"bg_fill"},{"a":35726,"t":"code","b":[173,177,140],"m":"lda","oa":36017,"o":"text_fg_fill"},{"a":35729,"t":"code","b":[141,227,140],"m":"sta","oa":36067,"o":"fg_fill"},{"a":35732,"t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit"},{"a":35735,"l":"b_8B97","t":"code","b":[201,5],"m":"cmp","o":"#$05","x":[35710]},{"a":35737,"t":"code","b":[208,20],"m":"bne","oa":35759,"o":"b_8BAF"},{"a":35739,"t":"code","b":[141,175,140],"m":"sta","oa":36015,"o":"vdu_mode"},{"a":35742,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":35744,"t":"code","b":[141,176,140],"m":"sta","oa":36016,"o":"vdu_keep_mask"},{"a":35747,"t":"code","b":[173,180,140],"m":"lda","oa":36020,"o":"gcol_bg_fill"},{"a":35750,"t":"code","b":[141,228,140],"m":"sta","oa":36068,"o":"bg_fill"},{"a":35753,"t":"code","b":[173,179,140],"m":"lda","oa":36019,"o":"gcol_fg_fill"},{"a":35756,"t":"code","b":[141,227,140],"m":"sta","oa":36067,"o":"fg_fill"},{"a":35759,"l":"b_8BAF","t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit","x":[35737]},{"a":35762,"l":"b_8BB2","t":"code","b":[201,127],"m":"cmp","o":"#$7F","x":[35706]},{"a":35764,"t":"code","b":[208,31],"m":"bne","oa":35797,"o":"b_8BD5"},{"a":35766,"t":"code","b":[169,8],"m":"lda","o":"#$08"},{"a":35768,"t":"code","b":[32,107,138],"m":"jsr","oa":35435,"o":"oswrch_vdu"},{"a":35771,"t":"code","b":[173,176,140],"m":"lda","oa":36016,"o":"vdu_keep_mask"},{"a":35774,"t":"code","b":[72],"m":"pha"},{"a":35775,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35777,"t":"code","b":[141,176,140],"m":"sta","oa":36016,"o":"vdu_keep_mask"},{"a":35780,"t":"code","b":[169,32],"m":"lda","o":"#$20"},{"a":35782,"t":"code","b":[32,107,138],"m":"jsr","oa":35435,"o":"oswrch_vdu"},{"a":35785,"t":"code","b":[104],"m":"pla"},{"a":35786,"t":"code","b":[141,176,140],"m":"sta","oa":36016,"o":"vdu_keep_mask"},{"a":35789,"t":"code","b":[169,8],"m":"lda","o":"#$08"},{"a":35791,"t":"code","b":[32,107,138],"m":"jsr","oa":35435,"o":"oswrch_vdu"},{"a":35794,"t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit"},{"a":35797,"l":"b_8BD5","t":"code","b":[201,128],"m":"cmp","o":"#$80","x":[35764]},{"a":35799,"t":"code","b":[144,3],"m":"bcc","oa":35804,"o":"vdu_draw_char"},{"a":35801,"t":"code","b":[76,133,140],"m":"jmp","oa":35973,"o":"vdu_restore_exit"},{"a":35804,"l":"vdu_draw_char","c":"Draws character A (32-126): the glyph at $8000 + 8 x A into $F0/$F1, the bitmap cell $E000 + 8 x (row x 40 + column) into $F4/$F5 (a matrix address $CC00 + row x 40 + column is also put in $F2/$F3 and never used), then each glyph row's left four pixels into that cell and the right four into the next through $8CB6, one pixel row lower (rows 0-6 only) while bit 7 of $8CB5 is set. The cursor moves two cells right, to the next row after column 38.","t":"code","b":[133,240],"m":"sta","oa":240,"o":"font_glyph_ptr","x":[35799]},{"a":35806,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35808,"t":"code","b":[6,240],"m":"asl","oa":240,"o":"font_glyph_ptr"},{"a":35810,"t":"code","b":[42],"m":"rol","o":"a"},{"a":35811,"t":"code","b":[6,240],"m":"asl","oa":240,"o":"font_glyph_ptr"},{"a":35813,"t":"code","b":[42],"m":"rol","o":"a"},{"a":35814,"t":"code","b":[6,240],"m":"asl","oa":240,"o":"font_glyph_ptr"},{"a":35816,"t":"code","b":[42],"m":"rol","o":"a"},{"a":35817,"t":"code","b":[24],"m":"clc"},{"a":35818,"t":"code","b":[105,128],"m":"adc","o":"#$80"},{"a":35820,"t":"code","b":[133,241],"m":"sta","oa":241,"o":"font_glyph_page"},{"a":35822,"t":"code","b":[173,230,140],"m":"lda","oa":36070,"o":"text_row"},{"a":35825,"t":"code","b":[10],"m":"asl","o":"a"},{"a":35826,"t":"code","b":[10],"m":"asl","o":"a"},{"a":35827,"t":"code","b":[24],"m":"clc"},{"a":35828,"t":"code","b":[109,230,140],"m":"adc","oa":36070,"o":"text_row"},{"a":35831,"t":"code","b":[141,231,140],"m":"sta","oa":36071,"o":"work_byte_a"},{"a":35834,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35836,"t":"code","b":[14,231,140],"m":"asl","oa":36071,"o":"work_byte_a"},{"a":35839,"t":"code","b":[42],"m":"rol","o":"a"},{"a":35840,"t":"code","b":[14,231,140],"m":"asl","oa":36071,"o":"work_byte_a"},{"a":35843,"t":"code","b":[42],"m":"rol","o":"a"},{"a":35844,"t":"code","b":[14,231,140],"m":"asl","oa":36071,"o":"work_byte_a"},{"a":35847,"t":"code","b":[42],"m":"rol","o":"a"},{"a":35848,"t":"code","b":[141,232,140],"m":"sta","oa":36072,"o":"work_byte_b"},{"a":35851,"t":"code","b":[173,231,140],"m":"lda","oa":36071,"o":"work_byte_a"},{"a":35854,"t":"code","b":[24],"m":"clc"},{"a":35855,"t":"code","b":[109,229,140],"m":"adc","oa":36069,"o":"text_column"},{"a":35858,"t":"code","b":[141,225,140],"m":"sta","oa":36065,"o":"cell_number_lo"},{"a":35861,"t":"code","b":[133,242],"m":"sta","oa":242,"o":"os_param_ptr"},{"a":35863,"t":"code","b":[173,232,140],"m":"lda","oa":36072,"o":"work_byte_b"},{"a":35866,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":35868,"t":"code","b":[141,226,140],"m":"sta","oa":36066,"o":"cell_number_hi"},{"a":35871,"t":"code","b":[105,204],"m":"adc","o":"#$CC"},{"a":35873,"t":"code","b":[133,243],"m":"sta","oa":243,"o":"os_param_ptr_hi"},{"a":35875,"t":"code","b":[173,226,140],"m":"lda","oa":36066,"o":"cell_number_hi"},{"a":35878,"t":"code","b":[14,225,140],"m":"asl","oa":36065,"o":"cell_number_lo"},{"a":35881,"t":"code","b":[42],"m":"rol","o":"a"},{"a":35882,"t":"code","b":[14,225,140],"m":"asl","oa":36065,"o":"cell_number_lo"},{"a":35885,"t":"code","b":[42],"m":"rol","o":"a"},{"a":35886,"t":"code","b":[14,225,140],"m":"asl","oa":36065,"o":"cell_number_lo"},{"a":35889,"t":"code","b":[42],"m":"rol","o":"a"},{"a":35890,"t":"code","b":[24],"m":"clc"},{"a":35891,"t":"code","b":[105,224],"m":"adc","o":"#$E0"},{"a":35893,"t":"code","b":[133,245],"m":"sta","oa":245,"o":"text_bitmap_page"},{"a":35895,"t":"code","b":[173,225,140],"m":"lda","oa":36065,"o":"cell_number_lo"},{"a":35898,"t":"code","b":[133,244],"m":"sta","oa":244,"o":"text_bitmap_ptr"},{"a":35900,"t":"code","b":[160,7],"m":"ldy","o":"#$07"},{"a":35902,"t":"code","b":[44,181,140],"m":"bit","oa":36021,"o":"plot_y_high"},{"a":35905,"t":"code","b":[16,3],"m":"bpl","oa":35910,"o":"b_8C46"},{"a":35907,"t":"code","b":[230,244],"m":"inc","oa":244,"o":"text_bitmap_ptr"},{"a":35909,"t":"code","b":[136],"m":"dey"},{"a":35910,"l":"b_8C46","t":"code","b":[177,240],"m":"lda","oa":240,"o":"(font_glyph_ptr),y","x":[35905,35921]},{"a":35912,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":35913,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":35914,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":35915,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":35916,"t":"code","b":[170],"m":"tax"},{"a":35917,"t":"code","b":[32,182,140],"m":"jsr","oa":36022,"o":"write_char_byte"},{"a":35920,"t":"code","b":[136],"m":"dey"},{"a":35921,"t":"code","b":[16,243],"m":"bpl","oa":35910,"o":"b_8C46"},{"a":35923,"t":"code","b":[165,244],"m":"lda","oa":244,"o":"text_bitmap_ptr"},{"a":35925,"t":"code","b":[24],"m":"clc"},{"a":35926,"t":"code","b":[105,8],"m":"adc","o":"#$08"},{"a":35928,"t":"code","b":[133,244],"m":"sta","oa":244,"o":"text_bitmap_ptr"},{"a":35930,"t":"code","b":[165,245],"m":"lda","oa":245,"o":"text_bitmap_page"},{"a":35932,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":35934,"t":"code","b":[133,245],"m":"sta","oa":245,"o":"text_bitmap_page"},{"a":35936,"t":"code","b":[160,7],"m":"ldy","o":"#$07"},{"a":35938,"t":"code","b":[44,181,140],"m":"bit","oa":36021,"o":"plot_y_high"},{"a":35941,"t":"code","b":[16,1],"m":"bpl","oa":35944,"o":"b_8C68"},{"a":35943,"t":"code","b":[136],"m":"dey"},{"a":35944,"l":"b_8C68","t":"code","b":[177,240],"m":"lda","oa":240,"o":"(font_glyph_ptr),y","x":[35941,35953]},{"a":35946,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":35948,"t":"code","b":[170],"m":"tax"},{"a":35949,"t":"code","b":[32,182,140],"m":"jsr","oa":36022,"o":"write_char_byte"},{"a":35952,"t":"code","b":[136],"m":"dey"},{"a":35953,"t":"code","b":[16,245],"m":"bpl","oa":35944,"o":"b_8C68"},{"a":35955,"t":"code","b":[173,229,140],"m":"lda","oa":36069,"o":"text_column"},{"a":35958,"t":"code","b":[24],"m":"clc"},{"a":35959,"t":"code","b":[105,2],"m":"adc","o":"#$02"},{"a":35961,"t":"code","b":[201,40],"m":"cmp","o":"#$28"},{"a":35963,"t":"code","b":[144,5],"m":"bcc","oa":35970,"o":"b_8C82"},{"a":35965,"t":"code","b":[32,143,140],"m":"jsr","oa":35983,"o":"text_cursor_down"},{"a":35968,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35970,"l":"b_8C82","t":"code","b":[141,229,140],"m":"sta","oa":36069,"o":"text_column","x":[35963]},{"a":35973,"l":"vdu_restore_exit","t":"code","b":[173,235,140],"m":"lda","oa":36075,"o":"vdu_saved_a","x":[35478,35600,35627,35649,35679,35689,35701,35732,35759,35794,35801]},{"a":35976,"t":"code","b":[174,236,140],"m":"ldx","oa":36076,"o":"saved_x"},{"a":35979,"t":"code","b":[172,237,140],"m":"ldy","oa":36077,"o":"saved_y"},{"a":35982,"t":"code","b":[96],"m":"rts"},{"a":35983,"l":"text_cursor_down","c":"Text cursor one row down ($8CE6), from row 24 back to row 0. Used for code 10 and when a character passes the end of a row.","t":"code","b":[173,230,140],"m":"lda","oa":36070,"o":"text_row","x":[35686,35965]},{"a":35986,"t":"code","b":[24],"m":"clc"},{"a":35987,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":35989,"t":"code","b":[201,25],"m":"cmp","o":"#$19"},{"a":35991,"t":"code","b":[144,2],"m":"bcc","oa":35995,"o":"b_8C9B"},{"a":35993,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":35995,"l":"b_8C9B","t":"code","b":[141,230,140],"m":"sta","oa":36070,"o":"text_row","x":[35991]},{"a":35998,"t":"code","b":[96],"m":"rts"},{"a":35999,"l":"nybble_to_mask","c":"Four glyph pixels to a bitmap mask: entry n has each bit of n doubled into a bit pair ($00, $03, $0C, $0F, $30 ... $FF), the multicolour pixels that a nybble of a glyph row sets.","t":"byte","b":[0,3,12,15,48,51,60,63],"x":[36022]},{"a":36007,"t":"byte","b":[192,195,204,207,240,243,252,255]},{"a":36015,"l":"vdu_mode","c":"4 or 5, the last of VDU 4 and VDU 5 ($8B80, $8B9B): which colour pair ($8CB1/$8CB2 or $8CB3/$8CB4) is in use. 4 in the image.","t":"byte","b":[4],"x":[35537,35556,35585,35712,35739]},{"a":36016,"l":"vdu_keep_mask","c":"$00 after VDU 4, $FF after VDU 5: ANDed with the old bitmap byte where a glyph is clear, so VDU 5 text keeps the picture behind it. The delete code zeroes it round its erasing space ($8BBB-$8BCA).","t":"byte","b":[0],"x":[35717,35744,35771,35777,35786,36035]},{"a":36017,"l":"text_fg_fill","c":"Text foreground fill, $FF (colour 3). Nothing writes it; VDU 4 copies it to $8CE3.","t":"byte","b":[255],"x":[35726]},{"a":36018,"l":"text_bg_fill","c":"Text background fill, set by COLOUR ($8AFE) and copied to $8CE4 by VDU 4. $55 (colour 1) in the image.","t":"byte","b":[85],"x":[35582,35720]},{"a":36019,"l":"gcol_fg_fill","c":"Graphics foreground fill, set by GCOL with a colour below 128 ($8AE1), used by VDU 5 text. $AA in the image.","t":"byte","b":[170],"x":[35553,35753]},{"a":36020,"l":"gcol_bg_fill","c":"Graphics background fill, set by GCOL with a colour of 128 and up ($8ACE), used by VDU 5 text. $00 in the image.","t":"byte","b":[0],"x":[35534,35747]},{"a":36021,"l":"plot_y_high","c":"The fifth byte of the last PLOT (its y high byte). Bit 7 set, as after the shadow's move of -4, draws characters one pixel row lower ($8C3E, $8C62).","t":"byte","b":[0],"x":[35472,35902,35938]},{"a":36022,"l":"write_char_byte","c":"Writes one bitmap byte of a character: X = four glyph pixels (a nybble), Y = the pixel row in the cell at ($F4). Pixels the glyph sets take the foreground fill $8CE3, clear ones the background fill $8CE4 ORed with the old byte ANDed with $8CB0. Work bytes $8CEE, $8CE8, $8CE7.","t":"code","b":[189,159,140],"m":"lda","oa":35999,"o":"nybble_to_mask,x","x":[35917,35949]},{"a":36025,"t":"code","b":[141,238,140],"m":"sta","oa":36078,"o":"glyph_pixel_mask"},{"a":36028,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":36030,"t":"code","b":[141,232,140],"m":"sta","oa":36072,"o":"work_byte_b"},{"a":36033,"t":"code","b":[49,244],"m":"and","oa":244,"o":"(text_bitmap_ptr),y"},{"a":36035,"t":"code","b":[45,176,140],"m":"and","oa":36016,"o":"vdu_keep_mask"},{"a":36038,"t":"code","b":[141,231,140],"m":"sta","oa":36071,"o":"work_byte_a"},{"a":36041,"t":"code","b":[173,232,140],"m":"lda","oa":36072,"o":"work_byte_b"},{"a":36044,"t":"code","b":[45,228,140],"m":"and","oa":36068,"o":"bg_fill"},{"a":36047,"t":"code","b":[13,231,140],"m":"ora","oa":36071,"o":"work_byte_a"},{"a":36050,"t":"code","b":[141,231,140],"m":"sta","oa":36071,"o":"work_byte_a"},{"a":36053,"t":"code","b":[173,238,140],"m":"lda","oa":36078,"o":"glyph_pixel_mask"},{"a":36056,"t":"code","b":[45,227,140],"m":"and","oa":36067,"o":"fg_fill"},{"a":36059,"t":"code","b":[13,231,140],"m":"ora","oa":36071,"o":"work_byte_a"},{"a":36062,"t":"code","b":[145,244],"m":"sta","oa":244,"o":"(text_bitmap_ptr),y"},{"a":36064,"t":"code","b":[96],"m":"rts"},{"a":36065,"l":"cell_number_lo","c":"Low byte of the cell number row x 40 + column, then shifted three times into the low byte of the bitmap offset ($8C12-$8C37).","t":"byte","b":[224],"x":[35858,35878,35882,35886,35895]},{"a":36066,"l":"cell_number_hi","c":"High byte of the cell number row x 40 + column, the start of the bitmap offset's high byte ($8C1C, $8C23).","t":"byte","b":[3],"x":[35868,35875]},{"a":36067,"l":"fg_fill","c":"Fill used for the pixels a glyph sets: from $8CB1 after VDU 4, $8CB3 after VDU 5, or from a GCOL or COLOUR for the pair in use.","t":"byte","b":[255],"x":[35563,35729,35756,36056]},{"a":36068,"l":"bg_fill","c":"Fill used for the pixels a glyph leaves clear: from $8CB2 after VDU 4, $8CB4 after VDU 5, or a GCOL or COLOUR for the pair in use.","t":"byte","b":[85],"x":[35544,35592,35723,35750,36044]},{"a":36069,"l":"text_column","c":"Text cursor column in C64 cells, 0-38 in steps of two (TAB x stores 2x).","t":"byte","b":[6],"x":[35496,35634,35646,35656,35659,35676,35698,35855,35955,35970]},{"a":36070,"l":"text_row","c":"Text cursor row, 0-24 (TAB stores its y without a check).","t":"byte","b":[21],"x":[35505,35664,35671,35822,35828,35983,35995]},{"a":36071,"l":"work_byte_a","c":"Shared work byte: row x 5, then x 40, in the character drawer ($8BF7); the combined pixels in $8CB6; the key number being tried in OSRDCH ($8D54).","t":"byte","b":[53],"x":[35831,35836,35840,35844,35851,36038,36047,36050,36059,36180,36196,36204]},{"a":36072,"l":"work_byte_b","c":"Shared work byte: the high byte of row x 40 ($8C08) and the inverted glyph mask in $8CB6. The two bytes after it, $8CE9 and $8CEA, are not used.","t":"byte","b":[255,0,0],"x":[35848,35863,36030,36041]},{"a":36075,"l":"vdu_saved_a","c":"The byte OSWRCH was given (its A), read back by the code handlers and returned in A.","t":"byte","b":[8],"x":[35435,35449,35469,35492,35502,35522,35573,35973]},{"a":36076,"l":"saved_x","c":"X on entry to OSWRCH or OSRDCH, restored on the way out.","t":"byte","b":[0],"x":[35438,35976,36140,36217]},{"a":36077,"l":"saved_y","c":"Y on entry to OSWRCH or OSRDCH, restored on the way out.","t":"byte","b":[0],"x":[35441,35979,36143,36220]},{"a":36078,"l":"glyph_pixel_mask","c":"The current nybble's pixel mask from $8C9F, for $8CB6.","t":"byte","b":[0],"x":[36025,36053]},{"a":36079,"l":"key_table_offset","c":"$00 while either SHIFT key is down, $40 when not, added to the key number in OSRDCH ($8D72), so an unshifted key reads the second table ($8FF3).","t":"byte","b":[64],"x":[36156,36175,36210]},{"a":36080,"l":"last_key_number","c":"The key number OSRDCH returned last; before scanning again it waits for that key to be let go ($8D32). $08 (RETURN) in the image.","t":"byte","b":[8],"x":[36146,36207]},{"a":36081,"l":"bbc_to_c64_colour","c":"BBC Micro colour n as a C64 colour: 0 black, 2 red, 5 green, 7 yellow, 6 blue, 4 purple, 3 cyan, 1 white. No instruction in the traced code reads it; the palettes at $869D and the colour tables at $14D4 and $14F3 hold colours already translated this way.","t":"byte","b":[0,2,5,7,6,4,3,1]},{"a":36089,"l":"test_key","c":"Tests one key: X = key number, row + 8 x column (row: the $DC00 line driven low, bit X AND 7 of $8D24; column: the $DC01 bit read, X / 8), so $29 is S and $27 SPACE. Returns X = $FF with N set if the key is down, X = 0 with N clear if not; Y is lost. Sets $DC02/$DC03 for output and input and masks interrupts during the scan. Used by OSRDCH and by OSBYTE $81, which is how the game tests its keys ($0F62).","t":"code","b":[120],"m":"sei","x":[36149,36161,36168,36191,36757]},{"a":36090,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":36092,"t":"code","b":[141,2,220],"m":"sta","o":"cia1_ddr_a"},{"a":36095,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":36097,"t":"code","b":[141,3,220],"m":"sta","o":"cia1_ddr_b"},{"a":36100,"t":"code","b":[138],"m":"txa"},{"a":36101,"t":"code","b":[41,7],"m":"and","o":"#$07"},{"a":36103,"t":"code","b":[168],"m":"tay"},{"a":36104,"t":"code","b":[185,36,141],"m":"lda","oa":36132,"o":"line_bits,y"},{"a":36107,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":36109,"t":"code","b":[141,0,220],"m":"sta","o":"cia1_port_a"},{"a":36112,"t":"code","b":[138],"m":"txa"},{"a":36113,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":36114,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":36115,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":36116,"t":"code","b":[168],"m":"tay"},{"a":36117,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":36119,"t":"code","b":[173,1,220],"m":"lda","o":"cia1_port_b"},{"a":36122,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":36124,"t":"code","b":[57,36,141],"m":"and","oa":36132,"o":"line_bits,y"},{"a":36127,"t":"code","b":[240,1],"m":"beq","oa":36130,"o":"b_8D22"},{"a":36129,"t":"code","b":[202],"m":"dex"},{"a":36130,"l":"b_8D22","t":"code","b":[88],"m":"cli","x":[36127]},{"a":36131,"t":"code","b":[96],"m":"rts"},{"a":36132,"l":"line_bits","c":"One bit per matrix line, $01 up to $80, for $8CF9.","t":"byte","b":[1,2,4,8,16,32,64,128],"x":[36104,36124]},{"a":36140,"l":"osrdch_read_key","c":"OSRDCH, reached through the JMP at $FFE0: waits for a key and returns its ASCII code in A, carry always clear (no Escape). First waits for the key returned last ($8CF0) to be let go, then notes SHIFT (keys $39 and $26: $8CEF = 0 if one is down, else $40) and tries keys $3F down to 0, skipping the two SHIFTs, until one is down; the code is $8FB3 + key + $8CEF. Keys with no code there (function keys, cursor keys, CTRL, C=, RUN/STOP, left arrow) return 0. X and Y are kept.","t":"code","b":[142,236,140],"m":"stx","oa":36076,"o":"saved_x"},{"a":36143,"t":"code","b":[140,237,140],"m":"sty","oa":36077,"o":"saved_y"},{"a":36146,"l":"b_8D32","t":"code","b":[174,240,140],"m":"ldx","oa":36080,"o":"last_key_number","x":[36152]},{"a":36149,"t":"code","b":[32,249,140],"m":"jsr","oa":36089,"o":"test_key"},{"a":36152,"t":"code","b":[48,248],"m":"bmi","oa":36146,"o":"b_8D32"},{"a":36154,"l":"b_8D3A","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[36202]},{"a":36156,"t":"code","b":[141,239,140],"m":"sta","oa":36079,"o":"key_table_offset"},{"a":36159,"t":"code","b":[162,57],"m":"ldx","o":"#$39"},{"a":36161,"t":"code","b":[32,249,140],"m":"jsr","oa":36089,"o":"test_key"},{"a":36164,"t":"code","b":[48,12],"m":"bmi","oa":36178,"o":"b_8D52"},{"a":36166,"t":"code","b":[162,38],"m":"ldx","o":"#$26"},{"a":36168,"t":"code","b":[32,249,140],"m":"jsr","oa":36089,"o":"test_key"},{"a":36171,"t":"code","b":[48,5],"m":"bmi","oa":36178,"o":"b_8D52"},{"a":36173,"t":"code","b":[169,64],"m":"lda","o":"#$40"},{"a":36175,"t":"code","b":[141,239,140],"m":"sta","oa":36079,"o":"key_table_offset"},{"a":36178,"l":"b_8D52","t":"code","b":[162,63],"m":"ldx","o":"#$3F","x":[36164,36171]},{"a":36180,"l":"b_8D54","t":"code","b":[142,231,140],"m":"stx","oa":36071,"o":"work_byte_a","x":[36200]},{"a":36183,"t":"code","b":[224,57],"m":"cpx","o":"#$39"},{"a":36185,"t":"code","b":[240,9],"m":"beq","oa":36196,"o":"b_8D64"},{"a":36187,"t":"code","b":[224,38],"m":"cpx","o":"#$26"},{"a":36189,"t":"code","b":[240,5],"m":"beq","oa":36196,"o":"b_8D64"},{"a":36191,"t":"code","b":[32,249,140],"m":"jsr","oa":36089,"o":"test_key"},{"a":36194,"t":"code","b":[48,8],"m":"bmi","oa":36204,"o":"b_8D6C"},{"a":36196,"l":"b_8D64","t":"code","b":[174,231,140],"m":"ldx","oa":36071,"o":"work_byte_a","x":[36185,36189]},{"a":36199,"t":"code","b":[202],"m":"dex"},{"a":36200,"t":"code","b":[16,234],"m":"bpl","oa":36180,"o":"b_8D54"},{"a":36202,"t":"code","b":[48,206],"m":"bmi","oa":36154,"o":"b_8D3A"},{"a":36204,"l":"b_8D6C","t":"code","b":[173,231,140],"m":"lda","oa":36071,"o":"work_byte_a","x":[36194]},{"a":36207,"t":"code","b":[141,240,140],"m":"sta","oa":36080,"o":"last_key_number"},{"a":36210,"t":"code","b":[13,239,140],"m":"ora","oa":36079,"o":"key_table_offset"},{"a":36213,"t":"code","b":[170],"m":"tax"},{"a":36214,"t":"code","b":[189,179,143],"m":"lda","oa":36787,"o":"keymap_shifted,x"},{"a":36217,"t":"code","b":[174,236,140],"m":"ldx","oa":36076,"o":"saved_x"},{"a":36220,"t":"code","b":[172,237,140],"m":"ldy","oa":36077,"o":"saved_y"},{"a":36223,"t":"code","b":[24],"m":"clc"},{"a":36224,"t":"code","b":[96],"m":"rts"},{"a":36225,"l":"osword_dispatch","c":"OSWORD, reached through the JMP at $FFF1. Two calls exist. A = $0A copies the 8 bytes of a glyph from the font at $8000 + 8 x code into the 8 bytes after the code in the block at X (low) and Y (high), as the BBC call does; the title's large letters use it ($3225). A = $07 plays a sound ($8DB4). Any other A returns at once.","t":"code","b":[201,10],"m":"cmp","o":"#$0A"},{"a":36227,"t":"code","b":[240,5],"m":"beq","oa":36234,"o":"b_8D8A"},{"a":36229,"t":"code","b":[201,7],"m":"cmp","o":"#$07"},{"a":36231,"t":"code","b":[240,43],"m":"beq","oa":36276,"o":"osword_sound"},{"a":36233,"t":"code","b":[96],"m":"rts"},{"a":36234,"l":"b_8D8A","t":"code","b":[132,243],"m":"sty","oa":243,"o":"os_param_ptr_hi","x":[36227]},{"a":36236,"t":"code","b":[134,242],"m":"stx","oa":242,"o":"os_param_ptr"},{"a":36238,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":36240,"t":"code","b":[177,242],"m":"lda","oa":242,"o":"(os_param_ptr),y"},{"a":36242,"t":"code","b":[133,240],"m":"sta","oa":240,"o":"font_glyph_ptr"},{"a":36244,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":36246,"t":"code","b":[6,240],"m":"asl","oa":240,"o":"font_glyph_ptr"},{"a":36248,"t":"code","b":[42],"m":"rol","o":"a"},{"a":36249,"t":"code","b":[6,240],"m":"asl","oa":240,"o":"font_glyph_ptr"},{"a":36251,"t":"code","b":[42],"m":"rol","o":"a"},{"a":36252,"t":"code","b":[6,240],"m":"asl","oa":240,"o":"font_glyph_ptr"},{"a":36254,"t":"code","b":[42],"m":"rol","o":"a"},{"a":36255,"t":"code","b":[24],"m":"clc"},{"a":36256,"t":"code","b":[105,128],"m":"adc","o":"#$80"},{"a":36258,"t":"code","b":[133,241],"m":"sta","oa":241,"o":"font_glyph_page"},{"a":36260,"t":"code","b":[230,242],"m":"inc","oa":242,"o":"os_param_ptr"},{"a":36262,"t":"code","b":[208,2],"m":"bne","oa":36266,"o":"b_8DAA"},{"a":36264,"t":"code","b":[230,243],"m":"inc","oa":243,"o":"os_param_ptr_hi"},{"a":36266,"l":"b_8DAA","t":"code","b":[160,7],"m":"ldy","o":"#$07","x":[36262]},{"a":36268,"l":"b_8DAC","t":"code","b":[177,240],"m":"lda","oa":240,"o":"(font_glyph_ptr),y","x":[36273]},{"a":36270,"t":"code","b":[145,242],"m":"sta","oa":242,"o":"(os_param_ptr),y"},{"a":36272,"t":"code","b":[136],"m":"dey"},{"a":36273,"t":"code","b":[16,249],"m":"bpl","oa":36268,"o":"b_8DAC"},{"a":36275,"t":"code","b":[96],"m":"rts"},{"a":36276,"l":"osword_sound","c":"OSWORD 7, the C64's own sound block (not the BBC's), 8 bytes at XY; $3470 passes $AC00 + 8 x sound. Byte 0: voice 0-2 (SID offset from $8EBB). 1: control register, written first without its gate to restart the note and then as given. 2: attack/decay. 3: sustain/release, whose low nybble also picks the release time from $8EC1. 4: pitch, an index into the frequency tables $9033/$9133. 5: pulse width high nybble (bits 0-3) and, with bit 7 set, the frequency halved bits 4-6 plus 1 times. 6: frames before the gate is released (128 and up: held until silenced). 7: offset of a 7-byte pitch envelope at $AC40, or 128 and up for none. Leaves the voice's state at $8E86-$8EBA for $8ED1 and $8F0C.","t":"code","b":[134,246],"m":"stx","oa":246,"o":"sound_block_ptr","x":[36231]},{"a":36278,"t":"code","b":[132,247],"m":"sty","oa":247,"o":"sound_block_ptr_hi"},{"a":36280,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":36282,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36284,"t":"code","b":[170],"m":"tax"},{"a":36285,"t":"code","b":[141,131,142],"m":"sta","oa":36483,"o":"sound_voice"},{"a":36288,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":36290,"t":"code","b":[157,150,142],"m":"sta","oa":36502,"o":"voice_env_base,x"},{"a":36293,"t":"code","b":[157,134,142],"m":"sta","oa":36486,"o":"voice_duration,x"},{"a":36296,"t":"code","b":[189,187,142],"m":"lda","oa":36539,"o":"voice_sid_offset,x"},{"a":36299,"t":"code","b":[170],"m":"tax"},{"a":36300,"t":"code","b":[160,1],"m":"ldy","o":"#$01"},{"a":36302,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36304,"t":"code","b":[41,254],"m":"and","o":"#$FE"},{"a":36306,"t":"code","b":[157,4,212],"m":"sta","o":"sid_v1_control,x"},{"a":36309,"t":"code","b":[160,2],"m":"ldy","o":"#$02"},{"a":36311,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36313,"t":"code","b":[157,5,212],"m":"sta","o":"sid_v1_attack_decay,x"},{"a":36316,"t":"code","b":[160,3],"m":"ldy","o":"#$03"},{"a":36318,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36320,"t":"code","b":[157,6,212],"m":"sta","o":"sid_v1_sustain_release,x"},{"a":36323,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":36325,"t":"code","b":[157,2,212],"m":"sta","o":"sid_v1_pulse_lo,x"},{"a":36328,"t":"code","b":[160,5],"m":"ldy","o":"#$05"},{"a":36330,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36332,"t":"code","b":[141,130,142],"m":"sta","oa":36482,"o":"sound_byte5"},{"a":36335,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":36337,"t":"code","b":[157,3,212],"m":"sta","o":"sid_v1_pulse_hi,x"},{"a":36340,"t":"code","b":[160,4],"m":"ldy","o":"#$04"},{"a":36342,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36344,"t":"code","b":[168],"m":"tay"},{"a":36345,"t":"code","b":[185,51,144],"m":"lda","oa":36915,"o":"pitch_freq_lo,y"},{"a":36348,"t":"code","b":[141,128,142],"m":"sta","oa":36480,"o":"freq_lo_work"},{"a":36351,"t":"code","b":[185,51,145],"m":"lda","oa":37171,"o":"pitch_freq_hi,y"},{"a":36354,"t":"code","b":[44,130,142],"m":"bit","oa":36482,"o":"sound_byte5"},{"a":36357,"t":"code","b":[16,19],"m":"bpl","oa":36378,"o":"b_8E1A"},{"a":36359,"t":"code","b":[72],"m":"pha"},{"a":36360,"t":"code","b":[173,130,142],"m":"lda","oa":36482,"o":"sound_byte5"},{"a":36363,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":36364,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":36365,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":36366,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":36367,"t":"code","b":[41,7],"m":"and","o":"#$07"},{"a":36369,"t":"code","b":[168],"m":"tay"},{"a":36370,"t":"code","b":[104],"m":"pla"},{"a":36371,"l":"b_8E13","t":"code","b":[74],"m":"lsr","o":"a","x":[36376]},{"a":36372,"t":"code","b":[110,128,142],"m":"ror","oa":36480,"o":"freq_lo_work"},{"a":36375,"t":"code","b":[136],"m":"dey"},{"a":36376,"t":"code","b":[16,249],"m":"bpl","oa":36371,"o":"b_8E13"},{"a":36378,"l":"b_8E1A","t":"code","b":[157,1,212],"m":"sta","o":"sid_v1_freq_hi,x","x":[36357]},{"a":36381,"t":"code","b":[173,128,142],"m":"lda","oa":36480,"o":"freq_lo_work"},{"a":36384,"t":"code","b":[157,0,212],"m":"sta","o":"sid_v1_freq_lo,x"},{"a":36387,"t":"code","b":[160,1],"m":"ldy","o":"#$01"},{"a":36389,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36391,"t":"code","b":[157,4,212],"m":"sta","o":"sid_v1_control,x"},{"a":36394,"t":"code","b":[174,131,142],"m":"ldx","oa":36483,"o":"sound_voice"},{"a":36397,"t":"code","b":[160,1],"m":"ldy","o":"#$01"},{"a":36399,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36401,"t":"code","b":[41,254],"m":"and","o":"#$FE"},{"a":36403,"t":"code","b":[157,162,142],"m":"sta","oa":36514,"o":"voice_ctrl_release,x"},{"a":36406,"t":"code","b":[160,4],"m":"ldy","o":"#$04"},{"a":36408,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36410,"t":"code","b":[157,138,142],"m":"sta","oa":36490,"o":"voice_pitch,x"},{"a":36413,"t":"code","b":[160,3],"m":"ldy","o":"#$03"},{"a":36415,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36417,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":36419,"t":"code","b":[168],"m":"tay"},{"a":36420,"t":"code","b":[185,193,142],"m":"lda","oa":36545,"o":"release_frames,y"},{"a":36423,"t":"code","b":[157,142,142],"m":"sta","oa":36494,"o":"voice_release_len,x"},{"a":36426,"t":"code","b":[160,7],"m":"ldy","o":"#$07"},{"a":36428,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36430,"t":"code","b":[168],"m":"tay"},{"a":36431,"t":"code","b":[48,39],"m":"bmi","oa":36472,"o":"b_8E78"},{"a":36433,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":36435,"t":"code","b":[157,154,142],"m":"sta","oa":36506,"o":"voice_env_steps,x"},{"a":36438,"t":"code","b":[157,158,142],"m":"sta","oa":36510,"o":"voice_env_section,x"},{"a":36441,"t":"code","b":[169,7],"m":"lda","o":"#$07"},{"a":36443,"t":"code","b":[141,132,142],"m":"sta","oa":36484,"o":"env_copy_count"},{"a":36446,"t":"code","b":[189,190,142],"m":"lda","oa":36542,"o":"voice_env_offset,x"},{"a":36449,"t":"code","b":[170],"m":"tax"},{"a":36450,"l":"b_8E62","t":"code","b":[185,64,172],"m":"lda","oa":44096,"o":"pitch_effect_flutter,y","x":[36461]},{"a":36453,"t":"code","b":[157,166,142],"m":"sta","oa":36518,"o":"voice_envelopes,x"},{"a":36456,"t":"code","b":[232],"m":"inx"},{"a":36457,"t":"code","b":[200],"m":"iny"},{"a":36458,"t":"code","b":[206,132,142],"m":"dec","oa":36484,"o":"env_copy_count"},{"a":36461,"t":"code","b":[208,243],"m":"bne","oa":36450,"o":"b_8E62"},{"a":36463,"t":"code","b":[174,131,142],"m":"ldx","oa":36483,"o":"sound_voice"},{"a":36466,"t":"code","b":[189,190,142],"m":"lda","oa":36542,"o":"voice_env_offset,x"},{"a":36469,"t":"code","b":[157,150,142],"m":"sta","oa":36502,"o":"voice_env_base,x"},{"a":36472,"l":"b_8E78","t":"code","b":[160,6],"m":"ldy","o":"#$06","x":[36431]},{"a":36474,"t":"code","b":[177,246],"m":"lda","oa":246,"o":"(sound_block_ptr),y"},{"a":36476,"t":"code","b":[157,134,142],"m":"sta","oa":36486,"o":"voice_duration,x"},{"a":36479,"t":"code","b":[96],"m":"rts"},{"a":36480,"l":"freq_lo_work","c":"Low byte of the note's frequency while $8DB4 shifts it down octaves. The byte after it, $8E81, is not used.","t":"byte","b":[0,0],"x":[36348,36372,36381]},{"a":36482,"l":"sound_byte5","c":"Byte 5 of the sound block ($8DEC): pulse width high nybble in bits 0-3, bit 7 to lower the note, bits 4-6 how many more octaves.","t":"byte","b":[0],"x":[36332,36354,36360]},{"a":36483,"l":"sound_voice","c":"The voice of the sound being started (byte 0), used to index the per-voice rows.","t":"byte","b":[0],"x":[36285,36394,36463]},{"a":36484,"l":"env_copy_count","c":"Counts the 7 envelope bytes copied into the voice's store ($8E59-$8E6D).","t":"byte","b":[0],"x":[36443,36458]},{"a":36485,"l":"env_tick_mask","c":"The A that $8F0C was called with (3, from $963A): an envelope steps only when its first byte ANDed with this is non-zero. 3 in the image.","t":"byte","b":[3],"x":[36622,36633]},{"a":36486,"l":"voice_duration","c":"Per voice (three bytes, the fourth unused as in all these rows): frames until the gate is released, from byte 6; 0 = done, 128 and up = held. Counted down by $8ED1.","t":"byte","b":[0,0,0,0],"x":[36293,36476,36563,36570,36745]},{"a":36490,"l":"voice_pitch","c":"Per voice: the current pitch index, from byte 4 and then moved by the envelope ($8F55).","t":"byte","b":[0,0,0,0],"x":[36410,36693,36696]},{"a":36494,"l":"voice_release_len","c":"Per voice: the release time in frames, looked up in $8EC1 by the low nybble of the sustain/release byte.","t":"byte","b":[0,0,0,0],"x":[36423,36584]},{"a":36498,"l":"voice_release_left","c":"Per voice: frames left in the release; when it runs out $8ED1 silences the voice.","t":"byte","b":[0,0,0,0],"x":[36587,36590,36595]},{"a":36502,"l":"voice_env_base","c":"Per voice: where its envelope sits in $8EA6 (0, 7 or 14), or 128 and up when none is running. $FF in the image.","t":"byte","b":[255,255,255,255],"x":[36290,36469,36602,36625,36655,36669,36685,36723,36742]},{"a":36506,"l":"voice_env_steps","c":"Per voice: steps left in the envelope's current section.","t":"byte","b":[0,0,0,0],"x":[36435,36638,36676]},{"a":36510,"l":"voice_env_section","c":"Per voice: the envelope section being stepped, 0-2.","t":"byte","b":[0,0,0,0],"x":[36438,36645,36665,36681]},{"a":36514,"l":"voice_ctrl_release","c":"Per voice: the control byte without its gate bit, written by $8ED1 when the note's time is up.","t":"byte","b":[0,0,0,0],"x":[36403,36578]},{"a":36518,"l":"voice_envelopes","c":"Three 7-byte pitch envelopes copied from $AC40 by $8DB4, for voices 0, 1, 2 at $8EA6, $8EAD, $8EB4. Byte 0 is read here: the envelope steps only if bits 0-1 are not both clear (with the mask in $8E85), and bit 7 set stops it after its third section instead of repeating.","t":"byte","b":[0],"x":[36453,36630,36658]},{"a":36519,"l":"env_pitch_change","c":"Bytes 1-3 of an envelope: the pitch change per step in sections 1, 2 and 3, signed, read at $8F51.","t":"byte","b":[0,0,0],"x":[36689]},{"a":36522,"l":"env_section_steps","c":"Bytes 4-6 of an envelope: the number of steps in sections 1, 2 and 3 (0 skips the section), read at $8F41; the stores of voices 1 and 2 follow, to $8EBA.","t":"byte","b":[0,0,0,0,0,0,0,0],"x":[36673]},{"a":36530,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":36538,"t":"byte","b":[0]},{"a":36539,"l":"voice_sid_offset","c":"SID register offset of each voice: 0, 7, 14 ($D400, $D407, $D40E).","t":"byte","b":[0,7,14],"x":[36296,36575,36605,36707,36737]},{"a":36542,"l":"voice_env_offset","c":"Offset of each voice's envelope store in $8EA6: 0, 7, 14 (the same values, a separate table).","t":"byte","b":[0,7,14],"x":[36446,36466]},{"a":36545,"l":"release_frames","c":"Frames to wait after the gate is released before the voice is silenced, by the release nybble 0-15: 1, 2, 3, 3, 6, 9, 11, 12, 15, 38, 75, 120, 150, 255, 255, 255.","t":"byte","b":[1,2,3,3,6,9,11,12],"x":[36420]},{"a":36553,"t":"byte","b":[15,38,75,120,150,255,255,255]},{"a":36561,"l":"sound_frame_tick","c":"Once a frame from the raster interrupt ($963D, through the JMP at $FFC2, the BBC's GSINIT slot). For each voice 2 to 0: counts the duration $8E86 down and at 0 releases the gate (control from $8EA2) and starts the release count from $8E8E; counts that down and at 0 turns the envelope off and silences the voice (sustain/release and control 0). Durations of 128 and up never count.","t":"code","b":[162,2],"m":"ldx","o":"#$02"},{"a":36563,"l":"b_8ED3","t":"code","b":[189,134,142],"m":"lda","oa":36486,"o":"voice_duration,x","x":[36617]},{"a":36566,"t":"code","b":[240,22],"m":"beq","oa":36590,"o":"b_8EEE"},{"a":36568,"t":"code","b":[48,46],"m":"bmi","oa":36616,"o":"b_8F08"},{"a":36570,"t":"code","b":[222,134,142],"m":"dec","oa":36486,"o":"voice_duration,x"},{"a":36573,"t":"code","b":[208,41],"m":"bne","oa":36616,"o":"b_8F08"},{"a":36575,"t":"code","b":[188,187,142],"m":"ldy","oa":36539,"o":"voice_sid_offset,x"},{"a":36578,"t":"code","b":[189,162,142],"m":"lda","oa":36514,"o":"voice_ctrl_release,x"},{"a":36581,"t":"code","b":[153,4,212],"m":"sta","o":"sid_v1_control,y"},{"a":36584,"t":"code","b":[189,142,142],"m":"lda","oa":36494,"o":"voice_release_len,x"},{"a":36587,"t":"code","b":[157,146,142],"m":"sta","oa":36498,"o":"voice_release_left,x"},{"a":36590,"l":"b_8EEE","t":"code","b":[189,146,142],"m":"lda","oa":36498,"o":"voice_release_left,x","x":[36566]},{"a":36593,"t":"code","b":[240,21],"m":"beq","oa":36616,"o":"b_8F08"},{"a":36595,"t":"code","b":[222,146,142],"m":"dec","oa":36498,"o":"voice_release_left,x"},{"a":36598,"t":"code","b":[208,16],"m":"bne","oa":36616,"o":"b_8F08"},{"a":36600,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":36602,"t":"code","b":[157,150,142],"m":"sta","oa":36502,"o":"voice_env_base,x"},{"a":36605,"t":"code","b":[188,187,142],"m":"ldy","oa":36539,"o":"voice_sid_offset,x"},{"a":36608,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":36610,"t":"code","b":[153,6,212],"m":"sta","o":"sid_v1_sustain_release,y"},{"a":36613,"t":"code","b":[153,4,212],"m":"sta","o":"sid_v1_control,y"},{"a":36616,"l":"b_8F08","t":"code","b":[202],"m":"dex","x":[36568,36573,36593,36598]},{"a":36617,"t":"code","b":[16,200],"m":"bpl","oa":36563,"o":"b_8ED3"},{"a":36619,"t":"code","b":[96],"m":"rts"},{"a":36620,"l":"pitch_envelope_tick","c":"Once a frame from the raster interrupt ($963A, through the JMP at $FFC5, the BBC's GSREAD slot), A = 3. Steps each running pitch envelope whose first byte ANDs with A: counts the section's steps ($8E9A) and at the end of a section moves to the next of three ($8E9E, length from $8EAA); after the third it starts again unless bit 7 of the first byte ends it. Each step adds the section's change ($8EA7) to the pitch $8E8A and writes that pitch's frequency from $9033/$9133 to the voice. The pitch part of a BBC ENVELOPE, one step a frame.","t":"code","b":[162,2],"m":"ldx","o":"#$02"},{"a":36622,"t":"code","b":[141,133,142],"m":"sta","oa":36485,"o":"env_tick_mask"},{"a":36625,"l":"b_8F11","t":"code","b":[188,150,142],"m":"ldy","oa":36502,"o":"voice_env_base,x","x":[36718]},{"a":36628,"t":"code","b":[48,87],"m":"bmi","oa":36717,"o":"b_8F6D"},{"a":36630,"t":"code","b":[185,166,142],"m":"lda","oa":36518,"o":"voice_envelopes,y"},{"a":36633,"t":"code","b":[45,133,142],"m":"and","oa":36485,"o":"env_tick_mask"},{"a":36636,"t":"code","b":[240,79],"m":"beq","oa":36717,"o":"b_8F6D"},{"a":36638,"t":"code","b":[222,154,142],"m":"dec","oa":36506,"o":"voice_env_steps,x"},{"a":36641,"t":"code","b":[48,20],"m":"bmi","oa":36663,"o":"b_8F37"},{"a":36643,"t":"code","b":[208,36],"m":"bne","oa":36681,"o":"b_8F49"},{"a":36645,"l":"b_8F25","t":"code","b":[189,158,142],"m":"lda","oa":36510,"o":"voice_env_section,x","x":[36679]},{"a":36648,"t":"code","b":[24],"m":"clc"},{"a":36649,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":36651,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":36653,"t":"code","b":[144,10],"m":"bcc","oa":36665,"o":"b_8F39"},{"a":36655,"t":"code","b":[188,150,142],"m":"ldy","oa":36502,"o":"voice_env_base,x"},{"a":36658,"t":"code","b":[185,166,142],"m":"lda","oa":36518,"o":"voice_envelopes,y"},{"a":36661,"t":"code","b":[48,58],"m":"bmi","oa":36721,"o":"b_8F71"},{"a":36663,"l":"b_8F37","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[36641]},{"a":36665,"l":"b_8F39","t":"code","b":[157,158,142],"m":"sta","oa":36510,"o":"voice_env_section,x","x":[36653]},{"a":36668,"t":"code","b":[24],"m":"clc"},{"a":36669,"t":"code","b":[125,150,142],"m":"adc","oa":36502,"o":"voice_env_base,x"},{"a":36672,"t":"code","b":[168],"m":"tay"},{"a":36673,"t":"code","b":[185,170,142],"m":"lda","oa":36522,"o":"env_section_steps,y"},{"a":36676,"t":"code","b":[157,154,142],"m":"sta","oa":36506,"o":"voice_env_steps,x"},{"a":36679,"t":"code","b":[240,220],"m":"beq","oa":36645,"o":"b_8F25"},{"a":36681,"l":"b_8F49","t":"code","b":[189,158,142],"m":"lda","oa":36510,"o":"voice_env_section,x","x":[36643]},{"a":36684,"t":"code","b":[24],"m":"clc"},{"a":36685,"t":"code","b":[125,150,142],"m":"adc","oa":36502,"o":"voice_env_base,x"},{"a":36688,"t":"code","b":[168],"m":"tay"},{"a":36689,"t":"code","b":[185,167,142],"m":"lda","oa":36519,"o":"env_pitch_change,y"},{"a":36692,"t":"code","b":[24],"m":"clc"},{"a":36693,"t":"code","b":[125,138,142],"m":"adc","oa":36490,"o":"voice_pitch,x"},{"a":36696,"t":"code","b":[157,138,142],"m":"sta","oa":36490,"o":"voice_pitch,x"},{"a":36699,"t":"code","b":[168],"m":"tay"},{"a":36700,"t":"code","b":[185,51,144],"m":"lda","oa":36915,"o":"pitch_freq_lo,y"},{"a":36703,"t":"code","b":[72],"m":"pha"},{"a":36704,"t":"code","b":[185,51,145],"m":"lda","oa":37171,"o":"pitch_freq_hi,y"},{"a":36707,"t":"code","b":[188,187,142],"m":"ldy","oa":36539,"o":"voice_sid_offset,x"},{"a":36710,"t":"code","b":[153,1,212],"m":"sta","o":"sid_v1_freq_hi,y"},{"a":36713,"t":"code","b":[104],"m":"pla"},{"a":36714,"t":"code","b":[153,0,212],"m":"sta","o":"sid_v1_freq_lo,y"},{"a":36717,"l":"b_8F6D","t":"code","b":[202],"m":"dex","x":[36628,36636,36726]},{"a":36718,"t":"code","b":[16,161],"m":"bpl","oa":36625,"o":"b_8F11"},{"a":36720,"t":"code","b":[96],"m":"rts"},{"a":36721,"l":"b_8F71","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[36661]},{"a":36723,"t":"code","b":[157,150,142],"m":"sta","oa":36502,"o":"voice_env_base,x"},{"a":36726,"t":"code","b":[208,245],"m":"bne","oa":36717,"o":"b_8F6D"},{"a":36728,"l":"osbyte_dispatch","c":"OSBYTE, reached through the JMP at $FFF4. Two calls do something. A = $81 tests one key: jumps to $8CF9 with X = its C64 key number (the game's key numbers are C64 ones, e.g. the table at $138D). A = $15 silences voice X at once, X = 0-2 (the BBC flushes sound buffer X; the C64 callers at $351C pass voices): envelope and duration off, sustain/release and control cleared. Any other A returns doing nothing, $7E (acknowledge Escape, $8639) included.","t":"code","b":[201,129],"m":"cmp","o":"#$81"},{"a":36730,"t":"code","b":[240,25],"m":"beq","oa":36757,"o":"b_8F95"},{"a":36732,"t":"code","b":[201,21],"m":"cmp","o":"#$15"},{"a":36734,"t":"code","b":[240,1],"m":"beq","oa":36737,"o":"b_8F81"},{"a":36736,"t":"code","b":[96],"m":"rts"},{"a":36737,"l":"b_8F81","t":"code","b":[188,187,142],"m":"ldy","oa":36539,"o":"voice_sid_offset,x","x":[36734]},{"a":36740,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":36742,"t":"code","b":[157,150,142],"m":"sta","oa":36502,"o":"voice_env_base,x"},{"a":36745,"t":"code","b":[157,134,142],"m":"sta","oa":36486,"o":"voice_duration,x"},{"a":36748,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":36750,"t":"code","b":[153,6,212],"m":"sta","o":"sid_v1_sustain_release,y"},{"a":36753,"t":"code","b":[153,4,212],"m":"sta","o":"sid_v1_control,y"},{"a":36756,"t":"code","b":[96],"m":"rts"},{"a":36757,"l":"b_8F95","t":"code","b":[76,249,140],"m":"jmp","oa":36089,"o":"test_key","x":[36730]},{"a":36760,"l":"nmi_ack","c":"The NMI handler ($FFFA, set by $8900): reads $DD0D to acknowledge CIA 2 and returns, A kept. Not entered in play (0 hits, live).","t":"code","b":[72],"m":"pha"},{"a":36761,"t":"code","b":[173,13,221],"m":"lda","o":"cia2_interrupt"},{"a":36764,"t":"code","b":[104],"m":"pla"},{"a":36765,"t":"code","b":[64],"m":"rti"},{"a":36766,"l":"irq_ack","c":"The interrupt handler $8900 installs ($FFFE): acknowledges both CIAs ($DC0D, $DD0D) and, if bit 7 of $D019 shows a VIC interrupt, the VIC ($D019 = $FF); only A is saved. $3F07 replaces it with the raster interrupt $95E9, and it is not entered in play (0 hits, live).","t":"code","b":[120],"m":"sei"},{"a":36767,"t":"code","b":[72],"m":"pha"},{"a":36768,"t":"code","b":[216],"m":"cld"},{"a":36769,"t":"code","b":[173,13,220],"m":"lda","o":"cia1_interrupt"},{"a":36772,"t":"code","b":[173,13,221],"m":"lda","o":"cia2_interrupt"},{"a":36775,"t":"code","b":[173,25,208],"m":"lda","o":"vic_irq_status"},{"a":36778,"t":"code","b":[16,5],"m":"bpl","oa":36785,"o":"b_8FB1"},{"a":36780,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":36782,"t":"code","b":[141,25,208],"m":"sta","o":"vic_irq_status"},{"a":36785,"l":"b_8FB1","t":"code","b":[104],"m":"pla","x":[36778]},{"a":36786,"t":"code","b":[64],"m":"rti"},{"a":36787,"l":"keymap_shifted","c":"ASCII for each key number while a SHIFT key is down (OSRDCH, $8CEF = 0). Keys 0-7 are DEL ($7F), 3, 5, 7, 9, +, the pound key ($5C), 1; letters are capitals; RETURN $0D, SPACE $20, CLR/HOME $1E, up arrow $5E, both SHIFTs $10 (the scan skips them); function and cursor keys, CTRL, C=, RUN/STOP and the left arrow are 0.","t":"byte","b":[127,51,53,55,57,43,92,49],"x":[36214]},{"a":36795,"t":"byte","b":[13,87,82,89,73,80,42,0]},{"a":36803,"t":"byte","b":[0,65,68,71,74,76,59,0]},{"a":36811,"t":"byte","b":[0,52,54,56,48,45,30,50]},{"a":36819,"t":"byte","b":[0,90,67,66,77,46,16,32]},{"a":36827,"t":"byte","b":[0,83,70,72,75,58,61,0]},{"a":36835,"t":"byte","b":[0,69,84,85,79,64,94,81]},{"a":36843,"t":"byte","b":[0,16,88,86,78,44,47,0]},{"a":36851,"l":"keymap_plain","c":"ASCII for each key number with no SHIFT down ($8CEF = $40): as $8FB3 but letters in lower case, '?' for the / key (the shifted table has '/'), and 0 for the SHIFT keys. Runs to $9032.","t":"byte","b":[127,51,53,55,57,43,92,49]},{"a":36859,"t":"byte","b":[13,119,114,121,105,112,42,0]},{"a":36867,"t":"byte","b":[0,97,100,103,106,108,59,0]},{"a":36875,"t":"byte","b":[0,52,54,56,48,45,30,50]},{"a":36883,"t":"byte","b":[0,122,99,98,109,46,0,32]},{"a":36891,"t":"byte","b":[0,115,102,104,107,58,61,0]},{"a":36899,"t":"byte","b":[0,101,116,117,111,64,94,113]},{"a":36907,"t":"byte","b":[0,0,120,118,110,44,63,0]},{"a":36915,"l":"pitch_freq_lo","c":"SID frequency table, low bytes of entries 0-63 (high bytes at $9133). 256 entries indexed by a BBC-style pitch number: the C64's OSWORD 7 sound call ($8DF9, pitch from byte 4 of the parameter block) and the pitch-envelope update ($8F5C) fetch the 16-bit value for the voice's frequency registers. Entry n is round(2100 x 2^(n/48)) mod 65536, checked for all 256: 48 steps to the octave, i.e. quarter semitones, the step of the BBC Micro's SOUND pitch. Entry 0 is $0834, 123.3 Hz on a PAL machine; entry 48 is exactly double ($1068).","t":"byte","b":[52,83,114,145,177,209,242,19],"x":[36345,36700]},{"a":36923,"t":"byte","b":[53,87,122,158,193,230,11,48]},{"a":36931,"t":"byte","b":[86,124,163,203,243,28,69,111]},{"a":36939,"t":"byte","b":[154,197,241,29,74,120,167,214]},{"a":36947,"t":"byte","b":[6,54,103,153,204,255,51,104]},{"a":36955,"t":"byte","b":[158,212,11,67,124,182,240,44]},{"a":36963,"t":"byte","b":[104,165,227,34,98,162,228,39]},{"a":36971,"t":"byte","b":[106,175,244,59,131,203,21,96]},{"a":36979,"l":"pitch_freq_lo_64","c":"SID frequency table, low bytes of entries 64-127 (high bytes at $9173): from $14AC (entry 64, 310.8 Hz on PAL) to $3357 (entry 127, 771.8 Hz); entry 96 is $20D0, four times entry 0.","t":"byte","b":[172,249,71,150,230,56,139,223]},{"a":36987,"t":"byte","b":[52,138,226,59,149,240,77,171]},{"a":36995,"t":"byte","b":[11,108,206,50,152,254,103,208]},{"a":37003,"t":"byte","b":[60,168,23,135,249,108,225,88]},{"a":37011,"t":"byte","b":[208,74,198,68,195,69,200,78]},{"a":37019,"t":"byte","b":[213,94,233,118,5,151,42,192]},{"a":37027,"t":"byte","b":[87,241,141,44,205,112,21,189]},{"a":37035,"t":"byte","b":[103,20,195,117,42,225,155,87]},{"a":37043,"l":"pitch_freq_lo_128","c":"SID frequency table, low bytes of entries 128-191 (high bytes at $91B3): from $3416 (entry 128, 783.0 Hz on PAL) to $815E (entry 191, 1944.9 Hz); entry 144 is $41A0, eight times entry 0.","t":"byte","b":[22,216,157,101,47,253,205,161]},{"a":37051,"t":"byte","b":[119,81,46,14,241,216,194,175]},{"a":37059,"t":"byte","b":[160,148,140,136,135,138,145,155]},{"a":37067,"t":"byte","b":[169,188,210,236,11,45,84,127]},{"a":37075,"t":"byte","b":[175,227,27,88,153,223,42,122]},{"a":37083,"t":"byte","b":[207,40,135,235,84,194,53,174]},{"a":37091,"t":"byte","b":[44,176,58,201,94,249,154,65]},{"a":37099,"t":"byte","b":[238,162,91,27,226,175,131,94]},{"a":37107,"l":"pitch_freq_lo_192","c":"SID frequency table, low bytes of entries 192-255 (high bytes at $91F3). Entry 192 is $8340 (1973.2 Hz on PAL) and entry 238 $FF07 (3834 Hz); from entry 239 the formula needs 17 bits and the stored values have wrapped round ($02BD at 239 up to $45FD at 255), so pitches 239-255 would sound at 41-1052 Hz instead of carrying on upward.","t":"byte","b":[64,41,25,16,14,20,33,54]},{"a":37115,"t":"byte","b":[83,119,164,216,21,91,168,254]},{"a":37123,"t":"byte","b":[93,197,54,176,51,191,85,244]},{"a":37131,"t":"byte","b":[158,81,14,213,167,131,106,92]},{"a":37139,"t":"byte","b":[89,96,116,146,188,242,52,130]},{"a":37147,"t":"byte","b":[220,67,183,55,196,95,7,189]},{"a":37155,"t":"byte","b":[128,81,49,31,28,39,66,108]},{"a":37163,"t":"byte","b":[165,239,72,177,43,181,80,253]},{"a":37171,"l":"pitch_freq_hi","c":"SID frequency table, high bytes of entries 0-63 (low bytes at $9033): $08 up to $14. Before writing $D400/$D401 the OSWORD 7 handler can shift the pair right 1 to 8 places (bits 4-6 of parameter byte 5 plus one, when its bit 7 is set) to drop the note by octaves.","t":"byte","b":[8,8,8,8,8,8,8,9],"x":[36351,36704]},{"a":37179,"t":"byte","b":[9,9,9,9,9,9,10,10]},{"a":37187,"t":"byte","b":[10,10,10,10,10,11,11,11]},{"a":37195,"t":"byte","b":[11,11,11,12,12,12,12,12]},{"a":37203,"t":"byte","b":[13,13,13,13,13,13,14,14]},{"a":37211,"t":"byte","b":[14,14,15,15,15,15,15,16]},{"a":37219,"t":"byte","b":[16,16,16,17,17,17,17,18]},{"a":37227,"t":"byte","b":[18,18,18,19,19,19,20,20]},{"a":37235,"l":"pitch_freq_hi_64","c":"SID frequency table, high bytes of entries 64-127 (low bytes at $9073): $14 up to $33.","t":"byte","b":[20,20,21,21,21,22,22,22]},{"a":37243,"t":"byte","b":[23,23,23,24,24,24,25,25]},{"a":37251,"t":"byte","b":[26,26,26,27,27,27,28,28]},{"a":37259,"t":"byte","b":[29,29,30,30,30,31,31,32]},{"a":37267,"t":"byte","b":[32,33,33,34,34,35,35,36]},{"a":37275,"t":"byte","b":[36,37,37,38,39,39,40,40]},{"a":37283,"t":"byte","b":[41,41,42,43,43,44,45,45]},{"a":37291,"t":"byte","b":[46,47,47,48,49,49,50,51]},{"a":37299,"l":"pitch_freq_hi_128","c":"SID frequency table, high bytes of entries 128-191 (low bytes at $90B3): $34 up to $81.","t":"byte","b":[52,52,53,54,55,55,56,57]},{"a":37307,"t":"byte","b":[58,59,60,61,61,62,63,64]},{"a":37315,"t":"byte","b":[65,66,67,68,69,70,71,72]},{"a":37323,"t":"byte","b":[73,74,75,76,78,79,80,81]},{"a":37331,"t":"byte","b":[82,83,85,86,87,88,90,91]},{"a":37339,"t":"byte","b":[92,94,95,96,98,99,101,102]},{"a":37347,"t":"byte","b":[104,105,107,108,110,111,113,115]},{"a":37355,"t":"byte","b":[116,118,120,122,123,125,127,129]},{"a":37363,"l":"pitch_freq_hi_192","c":"SID frequency table, high bytes of entries 192-255 (low bytes at $90F3): $83 rising to $FF at entry 238, then $02 to $45 for the wrapped entries 239-255.","t":"byte","b":[131,133,135,137,139,141,143,145]},{"a":37371,"t":"byte","b":[147,149,151,153,156,158,160,162]},{"a":37379,"t":"byte","b":[165,167,170,172,175,177,180,182]},{"a":37387,"t":"byte","b":[185,188,191,193,196,199,202,205]},{"a":37395,"t":"byte","b":[208,211,214,217,220,223,227,230]},{"a":37403,"t":"byte","b":[233,237,240,244,247,251,255,2]},{"a":37411,"t":"byte","b":[6,10,14,18,22,26,30,34]},{"a":37419,"t":"byte","b":[38,42,47,51,56,60,65,69]},{"a":37427,"t":"gap","n":77},{"a":37427,"t":"note","c":"Not used: $9233-$927F hold a regular $FF $FF $00 $00 pattern with a stray $BF at $927C, like untouched RAM; no instruction found anywhere in the image refers to these addresses.","note":"outside the tracked image"},{"a":37504,"l":"hyp_angle_zero","c":"Zero-length exit of get_hypotenuse_angle ($9287), taken when both sides are 0 and A is 0: clears the side ratio $7E and the angle $8A/$8B, then returns. Byte for byte the BBC Micro code (BBC $5560, moved +$3D20).","t":"code","b":[133,126],"m":"sta","oa":126,"o":"tangent","x":[37562]},{"a":37506,"t":"code","b":[133,138],"m":"sta","oa":138,"o":"angle_lo"},{"a":37508,"t":"code","b":[133,139],"m":"sta","oa":139,"o":"angle_hi"},{"a":37510,"t":"code","b":[96],"m":"rts"},{"a":37511,"l":"get_hypotenuse_angle","c":"Direction of a vector in the ground plane. In: |x| in $83 (high) / $80 (low) with x's sign in bit 7 of $86, |z| in $85 / $82 with z's sign in bit 7 of $88. Copies the longer side to $7B/$7A and the shorter to $5D/$5C (get_hypotenuse $937F uses them next), shifts both left until the longer fills 16 bits, divides through the arctangent routine at $0D4A (which also leaves the side ratio, 0-255, in $7E) and uses the two signs to put the result in the right quadrant. Out: angle in $8B (high byte, 256 to a full turn) and $8A. Called from $288C, $3749, $37C4, $8410, $84DD and $935B. The BBC routine (BBC $5567) with only its own addresses moved.","t":"code","b":[165,133],"m":"lda","oa":133,"o":"dz_abs_hi","x":[10380,14153,14276,33808,34013,37723]},{"a":37513,"t":"code","b":[197,131],"m":"cmp","oa":131,"o":"dx_abs_hi"},{"a":37515,"t":"code","b":[144,8],"m":"bcc","oa":37525,"o":"b_9295"},{"a":37517,"t":"code","b":[208,25],"m":"bne","oa":37544,"o":"b_92A8"},{"a":37519,"t":"code","b":[165,130],"m":"lda","oa":130,"o":"dz_lo"},{"a":37521,"t":"code","b":[197,128],"m":"cmp","oa":128,"o":"dx_lo"},{"a":37523,"t":"code","b":[176,19],"m":"bcs","oa":37544,"o":"b_92A8"},{"a":37525,"l":"b_9295","t":"code","b":[165,133],"m":"lda","oa":133,"o":"dz_abs_hi","x":[37515]},{"a":37527,"t":"code","b":[133,93],"m":"sta","oa":93,"o":"opp_side_hi"},{"a":37529,"t":"code","b":[165,130],"m":"lda","oa":130,"o":"dz_lo"},{"a":37531,"t":"code","b":[133,92],"m":"sta","oa":92,"o":"opp_side_lo"},{"a":37533,"t":"code","b":[165,128],"m":"lda","oa":128,"o":"dx_lo"},{"a":37535,"t":"code","b":[133,122],"m":"sta","oa":122,"o":"adj_side_lo"},{"a":37537,"t":"code","b":[165,131],"m":"lda","oa":131,"o":"dx_abs_hi"},{"a":37539,"t":"code","b":[133,123],"m":"sta","oa":123,"o":"adj_side_hi"},{"a":37541,"t":"code","b":[76,197,146],"m":"jmp","oa":37573,"o":"j_92C5"},{"a":37544,"l":"b_92A8","t":"code","b":[165,131],"m":"lda","oa":131,"o":"dx_abs_hi","x":[37517,37523]},{"a":37546,"t":"code","b":[133,93],"m":"sta","oa":93,"o":"opp_side_hi"},{"a":37548,"t":"code","b":[165,128],"m":"lda","oa":128,"o":"dx_lo"},{"a":37550,"t":"code","b":[133,92],"m":"sta","oa":92,"o":"opp_side_lo"},{"a":37552,"t":"code","b":[165,130],"m":"lda","oa":130,"o":"dz_lo"},{"a":37554,"t":"code","b":[133,122],"m":"sta","oa":122,"o":"adj_side_lo"},{"a":37556,"t":"code","b":[165,133],"m":"lda","oa":133,"o":"dz_abs_hi"},{"a":37558,"t":"code","b":[133,123],"m":"sta","oa":123,"o":"adj_side_hi"},{"a":37560,"t":"code","b":[5,130],"m":"ora","oa":130,"o":"dz_lo"},{"a":37562,"t":"code","b":[240,196],"m":"beq","oa":37504,"o":"hyp_angle_zero"},{"a":37564,"t":"code","b":[165,133],"m":"lda","oa":133,"o":"dz_abs_hi"},{"a":37566,"t":"code","b":[76,3,147],"m":"jmp","oa":37635,"o":"j_9303"},{"a":37569,"l":"b_92C1","t":"code","b":[6,130],"m":"asl","oa":130,"o":"dz_lo","x":[37576]},{"a":37571,"t":"code","b":[38,133],"m":"rol","oa":133,"o":"dz_abs_hi"},{"a":37573,"l":"j_92C5","t":"code","b":[6,128],"m":"asl","oa":128,"o":"dx_lo","x":[37541]},{"a":37575,"t":"code","b":[42],"m":"rol","o":"a"},{"a":37576,"t":"code","b":[144,247],"m":"bcc","oa":37569,"o":"b_92C1"},{"a":37578,"t":"code","b":[106],"m":"ror","o":"a"},{"a":37579,"t":"code","b":[102,128],"m":"ror","oa":128,"o":"dx_lo"},{"a":37581,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":37583,"t":"code","b":[165,130],"m":"lda","oa":130,"o":"dz_lo"},{"a":37585,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":37587,"t":"code","b":[165,128],"m":"lda","oa":128,"o":"dx_lo"},{"a":37589,"t":"code","b":[41,252],"m":"and","o":"#$FC"},{"a":37591,"t":"code","b":[133,119],"m":"sta","oa":119,"o":"tmp_w"},{"a":37593,"t":"code","b":[165,133],"m":"lda","oa":133,"o":"dz_abs_hi"},{"a":37595,"t":"code","b":[32,74,13],"m":"jsr","oa":3402,"o":"arctan_ratio"},{"a":37598,"t":"code","b":[165,134],"m":"lda","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":37600,"t":"code","b":[69,136],"m":"eor","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":37602,"t":"code","b":[48,13],"m":"bmi","oa":37617,"o":"b_92F1"},{"a":37604,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":37606,"t":"code","b":[56],"m":"sec"},{"a":37607,"t":"code","b":[229,138],"m":"sbc","oa":138,"o":"angle_lo"},{"a":37609,"t":"code","b":[133,138],"m":"sta","oa":138,"o":"angle_lo"},{"a":37611,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":37613,"t":"code","b":[229,139],"m":"sbc","oa":139,"o":"angle_hi"},{"a":37615,"t":"code","b":[133,139],"m":"sta","oa":139,"o":"angle_hi"},{"a":37617,"l":"b_92F1","t":"code","b":[169,64],"m":"lda","o":"#$40","x":[37602]},{"a":37619,"t":"code","b":[36,134],"m":"bit","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":37621,"t":"code","b":[16,2],"m":"bpl","oa":37625,"o":"b_92F9"},{"a":37623,"t":"code","b":[169,192],"m":"lda","o":"#$C0"},{"a":37625,"l":"b_92F9","t":"code","b":[24],"m":"clc","x":[37621]},{"a":37626,"t":"code","b":[101,139],"m":"adc","oa":139,"o":"angle_hi"},{"a":37628,"t":"code","b":[133,139],"m":"sta","oa":139,"o":"angle_hi"},{"a":37630,"t":"code","b":[96],"m":"rts"},{"a":37631,"l":"b_92FF","t":"code","b":[6,128],"m":"asl","oa":128,"o":"dx_lo","x":[37638]},{"a":37633,"t":"code","b":[38,131],"m":"rol","oa":131,"o":"dx_abs_hi"},{"a":37635,"l":"j_9303","t":"code","b":[6,130],"m":"asl","oa":130,"o":"dz_lo","x":[37566]},{"a":37637,"t":"code","b":[42],"m":"rol","o":"a"},{"a":37638,"t":"code","b":[144,247],"m":"bcc","oa":37631,"o":"b_92FF"},{"a":37640,"t":"code","b":[106],"m":"ror","o":"a"},{"a":37641,"t":"code","b":[102,130],"m":"ror","oa":130,"o":"dz_lo"},{"a":37643,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":37645,"t":"code","b":[165,128],"m":"lda","oa":128,"o":"dx_lo"},{"a":37647,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":37649,"t":"code","b":[165,130],"m":"lda","oa":130,"o":"dz_lo"},{"a":37651,"t":"code","b":[41,252],"m":"and","o":"#$FC"},{"a":37653,"t":"code","b":[133,119],"m":"sta","oa":119,"o":"tmp_w"},{"a":37655,"t":"code","b":[165,131],"m":"lda","oa":131,"o":"dx_abs_hi"},{"a":37657,"t":"code","b":[32,74,13],"m":"jsr","oa":3402,"o":"arctan_ratio"},{"a":37660,"t":"code","b":[165,134],"m":"lda","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":37662,"t":"code","b":[69,136],"m":"eor","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":37664,"t":"code","b":[16,13],"m":"bpl","oa":37679,"o":"b_932F"},{"a":37666,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":37668,"t":"code","b":[56],"m":"sec"},{"a":37669,"t":"code","b":[229,138],"m":"sbc","oa":138,"o":"angle_lo"},{"a":37671,"t":"code","b":[133,138],"m":"sta","oa":138,"o":"angle_lo"},{"a":37673,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":37675,"t":"code","b":[229,139],"m":"sbc","oa":139,"o":"angle_hi"},{"a":37677,"t":"code","b":[133,139],"m":"sta","oa":139,"o":"angle_hi"},{"a":37679,"l":"b_932F","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[37664]},{"a":37681,"t":"code","b":[36,136],"m":"bit","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":37683,"t":"code","b":[16,2],"m":"bpl","oa":37687,"o":"b_9337"},{"a":37685,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":37687,"l":"b_9337","t":"code","b":[24],"m":"clc","x":[37683]},{"a":37688,"t":"code","b":[101,139],"m":"adc","oa":139,"o":"angle_hi"},{"a":37690,"t":"code","b":[133,139],"m":"sta","oa":139,"o":"angle_hi"},{"a":37692,"t":"code","b":[96],"m":"rts"},{"a":37693,"l":"get_pitch_angle_delta","c":"Pitch of a vector as seen from object X, relative to where that object is looking. In: the vertical component in A (high) and $80 (low), the ground distance in $7D/$7C, X the viewing object. Keeps the sign in $86, makes the vertical side absolute ($83/$80), calls get_hypotenuse_angle with the distance as the other side (sign 0 in $88), subtracts the object's pitch ($0140,X, with $20 as low byte) and divides by 16 with the sign kept: result in $8D (high) and $50. Called from $18E6, $20BB, $292D, $8516. The BBC routine (BBC $561D), relocated.","t":"code","b":[133,134],"m":"sta","oa":134,"o":"dx_hi_or_vec_x_hi","x":[6374,8379,10541,34070]},{"a":37695,"t":"code","b":[168],"m":"tay"},{"a":37696,"t":"code","b":[16,11],"m":"bpl","oa":37709,"o":"b_934D"},{"a":37698,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":37700,"t":"code","b":[56],"m":"sec"},{"a":37701,"t":"code","b":[229,128],"m":"sbc","oa":128,"o":"dx_lo"},{"a":37703,"t":"code","b":[133,128],"m":"sta","oa":128,"o":"dx_lo"},{"a":37705,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":37707,"t":"code","b":[229,134],"m":"sbc","oa":134,"o":"dx_hi_or_vec_x_hi"},{"a":37709,"l":"b_934D","t":"code","b":[133,131],"m":"sta","oa":131,"o":"dx_abs_hi","x":[37696]},{"a":37711,"t":"code","b":[165,124],"m":"lda","oa":124,"o":"hyp_lo"},{"a":37713,"t":"code","b":[133,130],"m":"sta","oa":130,"o":"dz_lo"},{"a":37715,"t":"code","b":[165,125],"m":"lda","oa":125,"o":"hyp_hi"},{"a":37717,"t":"code","b":[133,133],"m":"sta","oa":133,"o":"dz_abs_hi"},{"a":37719,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":37721,"t":"code","b":[133,136],"m":"sta","oa":136,"o":"dz_hi_or_vec_z_hi"},{"a":37723,"t":"code","b":[32,135,146],"m":"jsr","oa":37511,"o":"get_hypotenuse_angle"},{"a":37726,"t":"code","b":[165,138],"m":"lda","oa":138,"o":"angle_lo"},{"a":37728,"t":"code","b":[56],"m":"sec"},{"a":37729,"t":"code","b":[233,32],"m":"sbc","o":"#$20"},{"a":37731,"t":"code","b":[133,80],"m":"sta","oa":80,"o":"pitch_delta_lo"},{"a":37733,"t":"code","b":[165,139],"m":"lda","oa":139,"o":"angle_hi"},{"a":37735,"t":"code","b":[253,64,1],"m":"sbc","oa":320,"o":"obj_pitch,x"},{"a":37738,"t":"code","b":[8],"m":"php"},{"a":37739,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":37740,"t":"code","b":[102,80],"m":"ror","oa":80,"o":"pitch_delta_lo"},{"a":37742,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":37743,"t":"code","b":[102,80],"m":"ror","oa":80,"o":"pitch_delta_lo"},{"a":37745,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":37746,"t":"code","b":[102,80],"m":"ror","oa":80,"o":"pitch_delta_lo"},{"a":37748,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":37749,"t":"code","b":[102,80],"m":"ror","oa":80,"o":"pitch_delta_lo"},{"a":37751,"t":"code","b":[40],"m":"plp"},{"a":37752,"t":"code","b":[16,2],"m":"bpl","oa":37756,"o":"b_937C"},{"a":37754,"t":"code","b":[9,240],"m":"ora","o":"#$F0"},{"a":37756,"l":"b_937C","t":"code","b":[133,141],"m":"sta","oa":141,"o":"pitch_delta_hi","x":[37752]},{"a":37758,"t":"code","b":[96],"m":"rts"},{"a":37759,"l":"get_hypotenuse","c":"Length of the hypotenuse without a square root: the longer side ($7B/$7A) plus the shorter side ($5D/$5C) times tan(half the angle), the tangent from the table at $3D02 indexed by half the ratio in $7E (rounded) and multiplied in by $0F4A. Result in $7D/$7C. Y is kept in hyp_saved_y ($93AD) and given back. Called from $28A0, $3779, $8438, $84F3. The BBC routine (BBC $565F), relocated.","t":"code","b":[140,173,147],"m":"sty","oa":37805,"o":"hyp_saved_y","x":[10400,14201,33848,34035]},{"a":37762,"t":"code","b":[165,126],"m":"lda","oa":126,"o":"tangent"},{"a":37764,"t":"code","b":[74],"m":"lsr","o":"a"},{"a":37765,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":37767,"t":"code","b":[168],"m":"tay"},{"a":37768,"t":"code","b":[185,2,61],"m":"lda","oa":15618,"o":"tan_half_angle,y"},{"a":37771,"t":"code","b":[133,117],"m":"sta","oa":117,"o":"tmp_u"},{"a":37773,"t":"code","b":[165,92],"m":"lda","oa":92,"o":"opp_side_lo"},{"a":37775,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":37777,"t":"code","b":[165,93],"m":"lda","oa":93,"o":"opp_side_hi"},{"a":37779,"t":"code","b":[133,118],"m":"sta","oa":118,"o":"tmp_v"},{"a":37781,"t":"code","b":[32,74,15],"m":"jsr","oa":3914,"o":"mul16_by_u"},{"a":37784,"t":"code","b":[70,117],"m":"lsr","oa":117,"o":"tmp_u"},{"a":37786,"t":"code","b":[102,116],"m":"ror","oa":116,"o":"tmp_t"},{"a":37788,"t":"code","b":[165,116],"m":"lda","oa":116,"o":"tmp_t"},{"a":37790,"t":"code","b":[24],"m":"clc"},{"a":37791,"t":"code","b":[101,122],"m":"adc","oa":122,"o":"adj_side_lo"},{"a":37793,"t":"code","b":[133,124],"m":"sta","oa":124,"o":"hyp_lo"},{"a":37795,"t":"code","b":[165,117],"m":"lda","oa":117,"o":"tmp_u"},{"a":37797,"t":"code","b":[101,123],"m":"adc","oa":123,"o":"adj_side_hi"},{"a":37799,"t":"code","b":[133,125],"m":"sta","oa":125,"o":"hyp_hi"},{"a":37801,"t":"code","b":[172,173,147],"m":"ldy","oa":37805,"o":"hyp_saved_y"},{"a":37804,"t":"code","b":[96],"m":"rts"},{"a":37805,"l":"hyp_saved_y","c":"Where get_hypotenuse keeps the caller's Y (stored at $937F, reloaded at $93A9). $3F in the hand-over image; the BBC binary has $41 at this spot, a leftover value either way.","t":"byte","b":[63],"x":[37759,37801]},{"a":37806,"l":"next_random","c":"Step the 24-bit random generator at $93EF-$93F1 and return its top byte in A: copies it to $93F2-$93F4, shifts the copy left two places and adds it back, so the generator is multiplied by 5 modulo 2^24 (it starts at 1). The same code as the BBC's (BBC $568E), but in the C64 program only the two dot routines call it: draw_stars ($9403) and the black-dot fade ($9464).","t":"code","b":[173,239,147],"m":"lda","oa":37871,"o":"random_gen","x":[37891,37988]},{"a":37809,"t":"code","b":[141,242,147],"m":"sta","oa":37874,"o":"random_shift"},{"a":37812,"t":"code","b":[173,240,147],"m":"lda","oa":37872,"o":"random_gen_mid"},{"a":37815,"t":"code","b":[141,243,147],"m":"sta","oa":37875,"o":"random_shift_mid"},{"a":37818,"t":"code","b":[173,241,147],"m":"lda","oa":37873,"o":"random_gen_top"},{"a":37821,"t":"code","b":[141,244,147],"m":"sta","oa":37876,"o":"random_shift_top"},{"a":37824,"t":"code","b":[14,242,147],"m":"asl","oa":37874,"o":"random_shift"},{"a":37827,"t":"code","b":[46,243,147],"m":"rol","oa":37875,"o":"random_shift_mid"},{"a":37830,"t":"code","b":[46,244,147],"m":"rol","oa":37876,"o":"random_shift_top"},{"a":37833,"t":"code","b":[14,242,147],"m":"asl","oa":37874,"o":"random_shift"},{"a":37836,"t":"code","b":[46,243,147],"m":"rol","oa":37875,"o":"random_shift_mid"},{"a":37839,"t":"code","b":[46,244,147],"m":"rol","oa":37876,"o":"random_shift_top"},{"a":37842,"t":"code","b":[173,239,147],"m":"lda","oa":37871,"o":"random_gen"},{"a":37845,"t":"code","b":[24],"m":"clc"},{"a":37846,"t":"code","b":[109,242,147],"m":"adc","oa":37874,"o":"random_shift"},{"a":37849,"t":"code","b":[141,239,147],"m":"sta","oa":37871,"o":"random_gen"},{"a":37852,"t":"code","b":[173,240,147],"m":"lda","oa":37872,"o":"random_gen_mid"},{"a":37855,"t":"code","b":[109,243,147],"m":"adc","oa":37875,"o":"random_shift_mid"},{"a":37858,"t":"code","b":[141,240,147],"m":"sta","oa":37872,"o":"random_gen_mid"},{"a":37861,"t":"code","b":[173,241,147],"m":"lda","oa":37873,"o":"random_gen_top"},{"a":37864,"t":"code","b":[109,244,147],"m":"adc","oa":37876,"o":"random_shift_top"},{"a":37867,"t":"code","b":[141,241,147],"m":"sta","oa":37873,"o":"random_gen_top"},{"a":37870,"t":"code","b":[96],"m":"rts"},{"a":37871,"l":"random_gen","c":"Random generator, lowest byte of the 24-bit value next_random multiplies by 5 on each call; 01 00 00 in the image, so the sequence is 5, 25, 125, ... modulo 2^24.","t":"byte","b":[1],"x":[37806,37842,37849]},{"a":37872,"l":"random_gen_mid","c":"Random generator, middle byte; the dot routines also use it as a second random number: draw_stars takes its low five bits for the dot's page and its top two bits for the pixel ($9408), the black-dot fade its low six bits for the column step ($9480).","t":"byte","b":[0],"x":[37812,37852,37858,37896,38016]},{"a":37873,"l":"random_gen_top","c":"Random generator, top byte: the value next_random returns in A. The black-dot fade also takes its top two bits as the pixel within the byte ($94A9).","t":"byte","b":[0],"x":[37818,37861,37867,38057]},{"a":37874,"l":"random_shift","c":"Scratch for next_random: the generator's low byte, copied and shifted left twice before being added back.","t":"byte","b":[1],"x":[37809,37824,37833,37846]},{"a":37875,"l":"random_shift_mid","c":"Scratch for next_random: middle byte of the generator times four.","t":"byte","b":[0],"x":[37815,37827,37836,37855]},{"a":37876,"l":"random_shift_top","c":"Scratch for next_random: top byte of the generator times four (bits shifted out of it are lost, hence modulo 2^24).","t":"byte","b":[0],"x":[37821,37830,37839,37864]},{"a":37877,"l":"draw_stars","c":"Draw 40 random stars in colour 2 (%10) into the view picture at $E000, the bitmap that show_whole_view ($98B2) copies to the screen. Called three times by the screen-clearing routine at $1090 when the background type $0C4C is 3, so 120 stars. For each dot: a random low byte (next_random) and a random page 0-$1D (low five bits of $93F0, retried if above) added to the view address $0CC2/$0CC3; a random pixel 0-3 from the top bits of $93F0; the pixel is cleared with the mask at $228E, set to colour 1 from $945B and flipped to colour 2 because bit 7 of dot_colour is set. Differs from the BBC routine (BBC $56D5): 40 dots instead of 80, multicolour pixel tables, the wrap test turned round for a picture that ends at $FFFF (take $20 off the page when the add carries past $FF, where the BBC did so at $80), and a check ($9427) that skips a dot at $FF40 or above, where the vectors and entry-point jumps live. The screen-clearing routine sets $0CC2/$0CC3 to $E140 ($1336) just before, so the highest address reached is $FF3F and neither the wrap nor the skip happens there.","t":"code","b":[169,128],"m":"lda","o":"#$80","x":[4271]},{"a":37879,"t":"code","b":[208,2],"m":"bne","oa":37883,"o":"b_93FB"},{"a":37881,"s":"LDA #0 here is the BBC's DrawBlackDots entry (colour 1 dots); nothing in the C64 program calls $93F9","t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":37883,"l":"b_93FB","t":"code","b":[141,90,148],"m":"sta","oa":37978,"o":"dot_colour","x":[37879]},{"a":37886,"s":"40 dots per call; the BBC drew 80","t":"code","b":[169,40],"m":"lda","o":"#$28"},{"a":37888,"t":"code","b":[141,89,148],"m":"sta","oa":37977,"o":"dot_counter"},{"a":37891,"l":"b_9403","t":"code","b":[32,174,147],"m":"jsr","oa":37806,"o":"next_random","x":[37905,37974]},{"a":37894,"t":"code","b":[133,34],"m":"sta","oa":34,"o":"plot_ptr"},{"a":37896,"t":"code","b":[173,240,147],"m":"lda","oa":37872,"o":"random_gen_mid"},{"a":37899,"t":"code","b":[133,42],"m":"sta","oa":42,"o":"star_random"},{"a":37901,"t":"code","b":[41,31],"m":"and","o":"#$1F"},{"a":37903,"t":"code","b":[201,30],"m":"cmp","o":"#$1E"},{"a":37905,"t":"code","b":[176,240],"m":"bcs","oa":37891,"o":"b_9403"},{"a":37907,"t":"code","b":[133,35],"m":"sta","oa":35,"o":"plot_ptr_hi"},{"a":37909,"t":"code","b":[173,194,12],"m":"lda","oa":3266,"o":"view_image_addr"},{"a":37912,"t":"code","b":[24],"m":"clc"},{"a":37913,"t":"code","b":[101,34],"m":"adc","oa":34,"o":"plot_ptr"},{"a":37915,"t":"code","b":[133,34],"m":"sta","oa":34,"o":"plot_ptr"},{"a":37917,"t":"code","b":[173,195,12],"m":"lda","oa":3267,"o":"view_image_addr_hi"},{"a":37920,"t":"code","b":[101,35],"m":"adc","oa":35,"o":"plot_ptr_hi"},{"a":37922,"s":"C64: a page add that carried past $FF comes back as $00-$1F, so take $20 off","t":"code","b":[48,3],"m":"bmi","oa":37927,"o":"b_9427"},{"a":37924,"t":"code","b":[56],"m":"sec"},{"a":37925,"t":"code","b":[233,32],"m":"sbc","o":"#$20"},{"a":37927,"l":"b_9427","s":"C64 guard: no dot at $FF40-$FFFF (vectors and entry-point jumps)","t":"code","b":[201,255],"m":"cmp","o":"#$FF","x":[37922]},{"a":37929,"t":"code","b":[208,8],"m":"bne","oa":37939,"o":"b_9433"},{"a":37931,"t":"code","b":[165,34],"m":"lda","oa":34,"o":"plot_ptr"},{"a":37933,"t":"code","b":[201,64],"m":"cmp","o":"#$40"},{"a":37935,"t":"code","b":[176,34],"m":"bcs","oa":37971,"o":"b_9453"},{"a":37937,"t":"code","b":[169,255],"m":"lda","o":"#$FF"},{"a":37939,"l":"b_9433","t":"code","b":[133,35],"m":"sta","oa":35,"o":"plot_ptr_hi","x":[37929]},{"a":37941,"t":"code","b":[165,42],"m":"lda","oa":42,"o":"star_random"},{"a":37943,"t":"code","b":[42],"m":"rol","o":"a"},{"a":37944,"t":"code","b":[42],"m":"rol","o":"a"},{"a":37945,"t":"code","b":[42],"m":"rol","o":"a"},{"a":37946,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":37948,"t":"code","b":[170],"m":"tax"},{"a":37949,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":37951,"t":"code","b":[189,142,34],"m":"lda","oa":8846,"o":"pixel_masks,x"},{"a":37954,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":37956,"t":"code","b":[49,34],"m":"and","oa":34,"o":"(plot_ptr),y"},{"a":37958,"t":"code","b":[29,91,148],"m":"ora","oa":37979,"o":"pixel_colour1,x"},{"a":37961,"t":"code","b":[44,90,148],"m":"bit","oa":37978,"o":"dot_colour"},{"a":37964,"t":"code","b":[16,3],"m":"bpl","oa":37969,"o":"b_9451"},{"a":37966,"t":"code","b":[93,142,34],"m":"eor","oa":8846,"o":"pixel_masks,x"},{"a":37969,"l":"b_9451","t":"code","b":[145,34],"m":"sta","oa":34,"o":"(plot_ptr),y","x":[37964]},{"a":37971,"l":"b_9453","t":"code","b":[206,89,148],"m":"dec","oa":37977,"o":"dot_counter","x":[37935]},{"a":37974,"t":"code","b":[208,171],"m":"bne","oa":37891,"o":"b_9403"},{"a":37976,"t":"code","b":[96],"m":"rts"},{"a":37977,"l":"dot_counter","c":"Dots left to draw: 40 from draw_stars ($9400) or the caller's count in the black-dot fade ($9461); counted down at $9453 and $94C9.","t":"byte","b":[0],"x":[37888,37971,37985,38089]},{"a":37978,"l":"dot_colour","c":"Bit 7 set: draw_stars flips each dot from colour 1 to colour 2 (set to $80 at $93FB through the draw_stars entry; the unused entry at $93F9 would store 0 for colour 1). $00 in the hand-over image, $80 in play.","t":"byte","b":[0],"x":[37883,37961]},{"a":37979,"l":"pixel_colour1","c":"Colour 1 (%01) in each of the four multicolour pixels of a byte, indexed by pixel 0-3: $40, $10, $04, $01; ORed in by draw_stars ($9446) and the black-dot fade ($94B9). The BBC's table here held its own pixel layout (08 04 02 01).","t":"byte","b":[64,16,4,1],"x":[37958,38073]},{"a":37983,"l":"fade_view_27","c":"Game-over fade: draw 27 random black (colour 1) dots straight into the play view's character sets, then return; the C64's stand-in for the BBC's DrawBlackDots. Used by the screen decay loop at $8801, which calls it 30 times per pass ($8807). Falls into fade_view_dots with A = 27.","t":"code","b":[169,27],"m":"lda","o":"#$1B","x":[34823]},{"a":37985,"l":"fade_view_dots","c":"Draw A random colour-1 (black) dots into the play view's character sets. The raster interrupt calls it with A = 4 on four of its five band interrupts whenever bit 7 of $0C4D is set ($962A), and with A = 12 on the fifth when the Sentinel has also won ($9697). Row: the random walk dot_row_walk (0-23) plus the vertical scroll position $95, wrapped at 25, looked up in the row tables at $3A00 (low) / $3A20 (high); $3A40 gives the page offset of a second character set for rows that straddle two bands. Byte: the random walk dot_byte_walk (0-79) within the row. Pixel: the top two bits of $93F1. Each dot is written four times, 80 bytes (10 cells) apart across the row, and into both character sets of a split row. Not in the BBC program, which drew its dots into screen memory.","t":"code","b":[141,89,148],"m":"sta","oa":37977,"o":"dot_counter","x":[38442,38551]},{"a":37988,"l":"b_9464","t":"code","b":[32,174,147],"m":"jsr","oa":37806,"o":"next_random","x":[38092]},{"a":37991,"t":"code","b":[41,15],"m":"and","o":"#$0F"},{"a":37993,"t":"code","b":[24],"m":"clc"},{"a":37994,"t":"code","b":[109,207,148],"m":"adc","oa":38095,"o":"dot_row_walk"},{"a":37997,"t":"code","b":[201,24],"m":"cmp","o":"#$18"},{"a":37999,"t":"code","b":[144,2],"m":"bcc","oa":38003,"o":"b_9473"},{"a":38001,"t":"code","b":[233,24],"m":"sbc","o":"#$18"},{"a":38003,"l":"b_9473","t":"code","b":[141,207,148],"m":"sta","oa":38095,"o":"dot_row_walk","x":[37999]},{"a":38006,"t":"code","b":[24],"m":"clc"},{"a":38007,"t":"code","b":[101,149],"m":"adc","oa":149,"o":"view_origin_row"},{"a":38009,"t":"code","b":[201,25],"m":"cmp","o":"#$19"},{"a":38011,"t":"code","b":[144,2],"m":"bcc","oa":38015,"o":"b_947F"},{"a":38013,"t":"code","b":[233,25],"m":"sbc","o":"#$19"},{"a":38015,"l":"b_947F","t":"code","b":[170],"m":"tax","x":[38011]},{"a":38016,"t":"code","b":[173,240,147],"m":"lda","oa":37872,"o":"random_gen_mid"},{"a":38019,"t":"code","b":[41,63],"m":"and","o":"#$3F"},{"a":38021,"t":"code","b":[24],"m":"clc"},{"a":38022,"t":"code","b":[109,208,148],"m":"adc","oa":38096,"o":"dot_byte_walk"},{"a":38025,"t":"code","b":[176,4],"m":"bcs","oa":38031,"o":"b_948F"},{"a":38027,"t":"code","b":[201,80],"m":"cmp","o":"#$50"},{"a":38029,"t":"code","b":[144,2],"m":"bcc","oa":38033,"o":"b_9491"},{"a":38031,"l":"b_948F","t":"code","b":[233,80],"m":"sbc","o":"#$50","x":[38025]},{"a":38033,"l":"b_9491","t":"code","b":[141,208,148],"m":"sta","oa":38096,"o":"dot_byte_walk","x":[38029]},{"a":38036,"t":"code","b":[24],"m":"clc"},{"a":38037,"t":"code","b":[125,0,58],"m":"adc","oa":14848,"o":"row_char_addr_lo,x"},{"a":38040,"t":"code","b":[133,34],"m":"sta","oa":34,"o":"plot_ptr"},{"a":38042,"t":"code","b":[133,161],"m":"sta","oa":161,"o":"dot_dst2"},{"a":38044,"t":"code","b":[189,32,58],"m":"lda","oa":14880,"o":"row_char_addr_hi,x"},{"a":38047,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":38049,"t":"code","b":[133,35],"m":"sta","oa":35,"o":"plot_ptr_hi"},{"a":38051,"t":"code","b":[24],"m":"clc"},{"a":38052,"t":"code","b":[125,64,58],"m":"adc","oa":14912,"o":"row_second_copy_page,x"},{"a":38055,"t":"code","b":[133,162],"m":"sta","oa":162,"o":"dot_dst2_hi"},{"a":38057,"t":"code","b":[173,241,147],"m":"lda","oa":37873,"o":"random_gen_top"},{"a":38060,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38061,"t":"code","b":[42],"m":"rol","o":"a"},{"a":38062,"t":"code","b":[42],"m":"rol","o":"a"},{"a":38063,"t":"code","b":[41,3],"m":"and","o":"#$03"},{"a":38065,"t":"code","b":[170],"m":"tax"},{"a":38066,"s":"each dot at Y = $F0, $A0, $50, $00: four places 80 bytes apart","t":"code","b":[160,240],"m":"ldy","o":"#$F0"},{"a":38068,"l":"b_94B4","t":"code","b":[177,34],"m":"lda","oa":34,"o":"(plot_ptr),y","x":[38087]},{"a":38070,"t":"code","b":[61,0,149],"m":"and","oa":38144,"o":"pixel_clear_keep_masks,x"},{"a":38073,"t":"code","b":[29,91,148],"m":"ora","oa":37979,"o":"pixel_colour1,x"},{"a":38076,"t":"code","b":[145,34],"m":"sta","oa":34,"o":"(plot_ptr),y"},{"a":38078,"t":"code","b":[145,161],"m":"sta","oa":161,"o":"(dot_dst2),y"},{"a":38080,"t":"code","b":[152],"m":"tya"},{"a":38081,"t":"code","b":[56],"m":"sec"},{"a":38082,"t":"code","b":[233,80],"m":"sbc","o":"#$50"},{"a":38084,"t":"code","b":[168],"m":"tay"},{"a":38085,"t":"code","b":[192,176],"m":"cpy","o":"#$B0"},{"a":38087,"t":"code","b":[208,235],"m":"bne","oa":38068,"o":"b_94B4"},{"a":38089,"t":"code","b":[206,89,148],"m":"dec","oa":37977,"o":"dot_counter"},{"a":38092,"t":"code","b":[208,150],"m":"bne","oa":37988,"o":"b_9464"},{"a":38094,"t":"code","b":[96],"m":"rts"},{"a":38095,"l":"dot_row_walk","c":"Row of the last fade dot, 0-23: each dot adds a random 0-15 and wraps at 24 ($9464-$9473); the vertical scroll $95 is added on top.","t":"byte","b":[0],"x":[37994,38003]},{"a":38096,"l":"dot_byte_walk","c":"Byte offset of the last fade dot within its character row, 0-79 (cells 0-9, pixel row = offset mod 8): each dot adds a random 0-63 and wraps at 80 ($9480-$9491).","t":"byte","b":[0],"x":[38022,38033]},{"a":38097,"t":"gap","n":47},{"a":38097,"t":"note","c":"Not used: $94D1-$94FF hold a regular $FF $FF $00 $00 pattern with a stray $BF at $94FC, like untouched RAM; no instruction found anywhere in the image refers to these addresses.","note":"outside the tracked image"},{"a":38144,"l":"pixel_clear_keep_masks","c":"Multicolour pixel masks, eight entries: 0-3 ($3F, $CF, $F3, $FC) clear one pixel of a byte, pixels 0-3 from the left; 4-7 ($C0, $30, $0C, $03) keep only that pixel. The black-dot fade uses entries 0-3 ($94B6); the dithering code at $8783 indexes all eight (X = $0CD0 / 32, then X EOR 3). The C64 counterpart of the BBC's clearPixelMask (BBC $36BF, 77 BB DD EE 88 44 22 11).","t":"byte","b":[63,207,243,252,192,48,12,3],"x":[34691,38070]},{"a":38152,"l":"update_icon_row","c":"Rewrite the top screen row, the energy icons and the scanner frame: the player's energy ($0C0A) drawn as gold robots (icon 6, 15 units each, each followed by a blank), robots (icon 1, 3 units), then a boulder (icons 4-5, 2 units) or a tree (icons 2-3, 1 unit) for what is left; blanks up to column 29; the scanner box (icon 7, icon 8 up to column 38, icon 9) and a final blank. The column counter is $0C05, the working total $15. The same arithmetic as the BBC's UpdateIconsScanner (BBC $36C7), but each icon is one character written into the screen matrix by put_icon_char, and it ends with RTS where the BBC went on to copy an icon buffer to the screen. Called from $12FF, $1A1A, $35C6. In the play snapshot the row reads robot, robot, robot, tree: 10 units.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[4863,6682,13766]},{"a":38154,"t":"code","b":[141,5,12],"m":"sta","oa":3077,"o":"icon_column"},{"a":38157,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38160,"t":"code","b":[173,10,12],"m":"lda","oa":3082,"o":"player_energy"},{"a":38163,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":38165,"l":"j_9515","t":"code","b":[165,21],"m":"lda","oa":21,"o":"loop_count","x":[38185]},{"a":38167,"t":"code","b":[201,15],"m":"cmp","o":"#$0F"},{"a":38169,"t":"code","b":[144,17],"m":"bcc","oa":38188,"o":"b_952C"},{"a":38171,"t":"code","b":[233,15],"m":"sbc","o":"#$0F"},{"a":38173,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":38175,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":38177,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38180,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":38182,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38185,"t":"code","b":[76,21,149],"m":"jmp","oa":38165,"o":"j_9515"},{"a":38188,"l":"b_952C","t":"code","b":[165,21],"m":"lda","oa":21,"o":"loop_count","x":[38169,38208]},{"a":38190,"t":"code","b":[201,3],"m":"cmp","o":"#$03"},{"a":38192,"t":"code","b":[144,17],"m":"bcc","oa":38211,"o":"b_9543"},{"a":38194,"t":"code","b":[233,3],"m":"sbc","o":"#$03"},{"a":38196,"t":"code","b":[133,21],"m":"sta","oa":21,"o":"loop_count"},{"a":38198,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":38200,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38203,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":38205,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38208,"t":"code","b":[76,44,149],"m":"jmp","oa":38188,"o":"b_952C"},{"a":38211,"l":"b_9543","t":"code","b":[201,1],"m":"cmp","o":"#$01","x":[38192]},{"a":38213,"t":"code","b":[144,10],"m":"bcc","oa":38225,"o":"b_9551"},{"a":38215,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38216,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38219,"t":"code","b":[24],"m":"clc"},{"a":38220,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":38222,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38225,"l":"b_9551","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[38213,38235]},{"a":38227,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38230,"t":"code","b":[173,5,12],"m":"lda","oa":3077,"o":"icon_column"},{"a":38233,"t":"code","b":[201,29],"m":"cmp","o":"#$1D"},{"a":38235,"t":"code","b":[144,244],"m":"bcc","oa":38225,"o":"b_9551"},{"a":38237,"t":"code","b":[169,7],"m":"lda","o":"#$07"},{"a":38239,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38242,"l":"b_9562","t":"code","b":[169,8],"m":"lda","o":"#$08","x":[38252]},{"a":38244,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38247,"t":"code","b":[173,5,12],"m":"lda","oa":3077,"o":"icon_column"},{"a":38250,"t":"code","b":[201,38],"m":"cmp","o":"#$26"},{"a":38252,"t":"code","b":[144,244],"m":"bcc","oa":38242,"o":"b_9562"},{"a":38254,"t":"code","b":[169,9],"m":"lda","o":"#$09"},{"a":38256,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38259,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":38261,"t":"code","b":[32,121,149],"m":"jsr","oa":38265,"o":"put_icon_char"},{"a":38264,"t":"code","b":[96],"m":"rts"},{"a":38265,"l":"put_icon_char","c":"Put icon A (0-9) at the next column of the top row: stores character $F0 + A in the screen matrix at $7C00 + $0C05 and advances $0C05; A is preserved. The icon glyphs are characters $F0-$F9, copied into all five character sets from $ABB0 by show_whole_view ($98E8). Replaces the BBC's DrawIcon, which copied eight pixel bytes per icon.","t":"code","b":[72],"m":"pha","x":[38157,38177,38182,38200,38205,38216,38222,38227,38239,38244,38256,38261]},{"a":38266,"t":"code","b":[174,5,12],"m":"ldx","oa":3077,"o":"icon_column"},{"a":38269,"t":"code","b":[24],"m":"clc"},{"a":38270,"t":"code","b":[105,240],"m":"adc","o":"#$F0"},{"a":38272,"t":"code","b":[157,0,124],"m":"sta","oa":31744,"o":"play_matrix,x"},{"a":38275,"t":"code","b":[238,5,12],"m":"inc","oa":3077,"o":"icon_column"},{"a":38278,"t":"code","b":[104],"m":"pla"},{"a":38279,"t":"code","b":[96],"m":"rts"},{"a":38280,"l":"band_index","c":"Which of the five screen bands (0-4) the raster interrupt set up last: counted down by one at each interrupt, 0 wrapping to 4 ($95FF-$9607); set by set_band_lines ($95C9). $03 in the play snapshot.","t":"byte","b":[0],"x":[38345,38399,38407]},{"a":38281,"l":"band_lines","c":"Raster line of each band's interrupt, bands 0-4, worked out from the vertical scroll position $95 by set_band_lines: 53, 213, 173, 133, 93 when $95 is 0 (as in the image). The interrupt that starts band X shows its character set until the line in entry X.","t":"byte","b":[53,213,173,133,93],"x":[38329,38348,38410]},{"a":38286,"l":"band_charsets","c":"$D018 value for each band 0-4: $F8, $F6, $F4, $F2, $F0, the screen matrix at $7C00 with the character set at $6000, $5800, $5000, $4800 and $4000 (VIC bank 1); written at $95DA and $9618. With $95 = 0 this gives $4000 from line 53, $4800 from 93, $5000 from 133, $5800 from 173 and $6000 from 213 to the next frame's line 53, the writes seen live at lines 54-214.","t":"byte","b":[248,246,244,242,240],"x":[38362,38424]},{"a":38291,"l":"frame_band","c":"Index of the band whose interrupt also does the once-a-frame work at $9630 (sound, keys, enemy timers): the band whose line is below 91, set at $95C0; 0 in the image, which puts the work at line 213. The next byte, $9594, is not referenced.","t":"byte","b":[0,0],"x":[38336,38342,38430]},{"a":38293,"l":"set_band_lines","c":"Work out the band interrupt lines for the vertical scroll position $95 (0-24): band 0 at $FD - 8 x $95, bands 4, 3, 2, 1 each 40 lines further on, every value brought into lines 51-250 by adding or taking 200, stored in band_lines. The band whose line is below 91 becomes frame_band. Then starts the sequence at that band: band_index, raster compare $D012 (bit 8 in $D011 cleared) and its character set in $D018. C64 only; called from show_whole_view ($98BC).","t":"code","b":[162,0],"m":"ldx","o":"#$00","x":[39100]},{"a":38295,"t":"code","b":[165,149],"m":"lda","oa":149,"o":"view_origin_row"},{"a":38297,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38298,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38299,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38300,"t":"code","b":[73,255],"m":"eor","o":"#$FF"},{"a":38302,"t":"code","b":[56],"m":"sec"},{"a":38303,"t":"code","b":[105,253],"m":"adc","o":"#$FD"},{"a":38305,"t":"code","b":[76,173,149],"m":"jmp","oa":38317,"o":"j_95AD"},{"a":38308,"l":"b_95A4","t":"code","b":[16,2],"m":"bpl","oa":38312,"o":"b_95A8","x":[38340]},{"a":38310,"t":"code","b":[162,4],"m":"ldx","o":"#$04"},{"a":38312,"l":"b_95A8","t":"code","b":[24],"m":"clc","x":[38308]},{"a":38313,"t":"code","b":[105,40],"m":"adc","o":"#$28"},{"a":38315,"t":"code","b":[176,4],"m":"bcs","oa":38321,"o":"b_95B1"},{"a":38317,"l":"j_95AD","t":"code","b":[201,251],"m":"cmp","o":"#$FB","x":[38305]},{"a":38319,"t":"code","b":[144,2],"m":"bcc","oa":38323,"o":"b_95B3"},{"a":38321,"l":"b_95B1","t":"code","b":[233,200],"m":"sbc","o":"#$C8","x":[38315]},{"a":38323,"l":"b_95B3","t":"code","b":[201,51],"m":"cmp","o":"#$33","x":[38319]},{"a":38325,"t":"code","b":[176,2],"m":"bcs","oa":38329,"o":"b_95B9"},{"a":38327,"t":"code","b":[105,200],"m":"adc","o":"#$C8"},{"a":38329,"l":"b_95B9","t":"code","b":[157,137,149],"m":"sta","oa":38281,"o":"band_lines,x","x":[38325]},{"a":38332,"t":"code","b":[201,91],"m":"cmp","o":"#$5B"},{"a":38334,"t":"code","b":[176,3],"m":"bcs","oa":38339,"o":"b_95C3"},{"a":38336,"t":"code","b":[142,147,149],"m":"stx","oa":38291,"o":"frame_band"},{"a":38339,"l":"b_95C3","t":"code","b":[202],"m":"dex","x":[38334]},{"a":38340,"t":"code","b":[208,222],"m":"bne","oa":38308,"o":"b_95A4"},{"a":38342,"t":"code","b":[174,147,149],"m":"ldx","oa":38291,"o":"frame_band"},{"a":38345,"t":"code","b":[142,136,149],"m":"stx","oa":38280,"o":"band_index"},{"a":38348,"t":"code","b":[189,137,149],"m":"lda","oa":38281,"o":"band_lines,x"},{"a":38351,"t":"code","b":[141,18,208],"m":"sta","o":"vic_raster"},{"a":38354,"t":"code","b":[173,17,208],"m":"lda","o":"vic_control1"},{"a":38357,"t":"code","b":[41,127],"m":"and","o":"#$7F"},{"a":38359,"t":"code","b":[141,17,208],"m":"sta","o":"vic_control1"},{"a":38362,"t":"code","b":[189,142,149],"m":"lda","oa":38286,"o":"band_charsets,x"},{"a":38365,"t":"code","b":[141,24,208],"m":"sta","o":"vic_memory"},{"a":38368,"t":"code","b":[96],"m":"rts"},{"a":38369,"l":"irq_not_raster","c":"Exit for an interrupt that did not come from the VIC (bit 7 of $D019 clear, $95EE): reads $DC0D and $DD0D to clear any CIA interrupt, restores A and returns from the interrupt.","t":"code","b":[173,13,220],"m":"lda","o":"cia1_interrupt","x":[38382]},{"a":38372,"t":"code","b":[173,13,221],"m":"lda","o":"cia2_interrupt"},{"a":38375,"t":"code","b":[104],"m":"pla"},{"a":38376,"t":"code","b":[64],"m":"rti"},{"a":38377,"l":"play_irq","c":"The game's interrupt handler (the IRQ vector at $FFFE is set to $95E9 at $3F08); the C64 replacement for the BBC's IRQHandler. Acknowledges the raster interrupt, saves X and Y. If video_mode_flag ($9AF6) is set (play view) it steps band_index down, arms the next band's raster line and switches $D018 to that band's character set; on the four bands other than frame_band it then only draws fade dots when bit 7 of $0C4D is set (fade_view_dots, A = 4) and returns. On frame_band's interrupt, or on every interrupt when $9AF6 is 0 (one a frame, no bands), it does the once-a-frame work: counts down the sound timer $0CDF, calls $FFC5 with A = 3 and $FFC2 (the C64 sound update at $8F0C and $8ED1, behind the BBC GSREAD and GSINIT addresses), and while a game is in progress ($0CFC bit 7 clear): on a Sentinel win ($0C4E) draws fade dots (A = 12) if $0C4D bit 7 is set; when paused ($0C72) scans the keys with $1363 (Y = 13, the BBC's ScanForGameKeys) and clears key-logger entries 0-2 ($0CE8-$0CEA); otherwise sets bit 7 of $0CD8 while pan steps are pending ($0CC1 non-zero), calls $130C and $1635 (the BBC's enemy-timer and scanner updates) when the Sentinel is active ($0CE5 bit 7 clear) and no step is flagged, and calls the key check $119F unless $0CE4 bit 7 is set or the countdown at $130B is still running. The BBC handler ran the pan scroll itself; here the pan loop at $3668 waits for the $0CD8 flag instead.","t":"code","b":[120],"m":"sei"},{"a":38378,"t":"code","b":[72],"m":"pha"},{"a":38379,"t":"code","b":[173,25,208],"m":"lda","o":"vic_irq_status"},{"a":38382,"t":"code","b":[16,241],"m":"bpl","oa":38369,"o":"irq_not_raster"},{"a":38384,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":38386,"t":"code","b":[141,25,208],"m":"sta","o":"vic_irq_status"},{"a":38389,"t":"code","b":[138],"m":"txa"},{"a":38390,"t":"code","b":[72],"m":"pha"},{"a":38391,"t":"code","b":[152],"m":"tya"},{"a":38392,"t":"code","b":[72],"m":"pha"},{"a":38393,"t":"code","b":[216],"m":"cld"},{"a":38394,"s":"0 = bitmap screen: no bands, straight to the frame work","t":"code","b":[173,246,154],"m":"lda","oa":39670,"o":"video_mode_flag"},{"a":38397,"t":"code","b":[240,49],"m":"beq","oa":38448,"o":"b_9630"},{"a":38399,"t":"code","b":[174,136,149],"m":"ldx","oa":38280,"o":"band_index"},{"a":38402,"t":"code","b":[202],"m":"dex"},{"a":38403,"t":"code","b":[16,2],"m":"bpl","oa":38407,"o":"b_9607"},{"a":38405,"t":"code","b":[162,4],"m":"ldx","o":"#$04"},{"a":38407,"l":"b_9607","t":"code","b":[142,136,149],"m":"stx","oa":38280,"o":"band_index","x":[38403]},{"a":38410,"t":"code","b":[189,137,149],"m":"lda","oa":38281,"o":"band_lines,x"},{"a":38413,"t":"code","b":[141,18,208],"m":"sta","o":"vic_raster"},{"a":38416,"t":"code","b":[173,17,208],"m":"lda","o":"vic_control1"},{"a":38419,"t":"code","b":[41,127],"m":"and","o":"#$7F"},{"a":38421,"t":"code","b":[141,17,208],"m":"sta","o":"vic_control1"},{"a":38424,"t":"code","b":[189,142,149],"m":"lda","oa":38286,"o":"band_charsets,x"},{"a":38427,"t":"code","b":[141,24,208],"m":"sta","o":"vic_memory"},{"a":38430,"t":"code","b":[236,147,149],"m":"cpx","oa":38291,"o":"frame_band"},{"a":38433,"t":"code","b":[240,13],"m":"beq","oa":38448,"o":"b_9630"},{"a":38435,"t":"code","b":[173,77,12],"m":"lda","oa":3149,"o":"object_only_redraw"},{"a":38438,"t":"code","b":[16,5],"m":"bpl","oa":38445,"o":"b_962D"},{"a":38440,"t":"code","b":[169,4],"m":"lda","o":"#$04"},{"a":38442,"t":"code","b":[32,97,148],"m":"jsr","oa":37985,"o":"fade_view_dots"},{"a":38445,"l":"b_962D","t":"code","b":[76,154,150],"m":"jmp","oa":38554,"o":"j_969A","x":[38438]},{"a":38448,"l":"b_9630","t":"code","b":[206,223,12],"m":"dec","oa":3295,"o":"sound_timer","x":[38397,38433]},{"a":38451,"t":"code","b":[16,3],"m":"bpl","oa":38456,"o":"b_9638"},{"a":38453,"t":"code","b":[238,223,12],"m":"inc","oa":3295,"o":"sound_timer"},{"a":38456,"l":"b_9638","s":"C64 sound update through the BBC GSREAD/GSINIT addresses","t":"code","b":[169,3],"m":"lda","o":"#$03","x":[38451]},{"a":38458,"t":"code","b":[32,197,255],"m":"jsr","oa":65477,"o":"gsread_slot_jmp"},{"a":38461,"t":"code","b":[32,194,255],"m":"jsr","oa":65474,"o":"gsinit_slot_jmp"},{"a":38464,"t":"code","b":[173,252,12],"m":"lda","oa":3324,"o":"not_in_game"},{"a":38467,"t":"code","b":[48,85],"m":"bmi","oa":38554,"o":"j_969A"},{"a":38469,"t":"code","b":[173,78,12],"m":"lda","oa":3150,"o":"landscape_over"},{"a":38472,"t":"code","b":[48,70],"m":"bmi","oa":38544,"o":"b_9690"},{"a":38474,"t":"code","b":[173,114,12],"m":"lda","oa":3186,"o":"paused"},{"a":38477,"t":"code","b":[48,47],"m":"bmi","oa":38526,"o":"b_967E"},{"a":38479,"t":"code","b":[173,193,12],"m":"lda","oa":3265,"o":"scroll_steps_left"},{"a":38482,"t":"code","b":[240,5],"m":"beq","oa":38489,"o":"b_9659"},{"a":38484,"s":"C64: flag one pan step for the loop at $3668 instead of scrolling here","t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":38486,"t":"code","b":[141,216,12],"m":"sta","oa":3288,"o":"scroll_step_due"},{"a":38489,"l":"b_9659","t":"code","b":[173,229,12],"m":"lda","oa":3301,"o":"enemies_asleep","x":[38482]},{"a":38492,"t":"code","b":[48,11],"m":"bmi","oa":38505,"o":"b_9669"},{"a":38494,"t":"code","b":[173,216,12],"m":"lda","oa":3288,"o":"scroll_step_due"},{"a":38497,"t":"code","b":[48,6],"m":"bmi","oa":38505,"o":"b_9669"},{"a":38499,"t":"code","b":[32,12,19],"m":"jsr","oa":4876,"o":"enemy_timer_gate"},{"a":38502,"t":"code","b":[32,53,22],"m":"jsr","oa":5685,"o":"update_scanner"},{"a":38505,"l":"b_9669","t":"code","b":[173,228,12],"m":"lda","oa":3300,"o":"key_action_busy","x":[38492,38497]},{"a":38508,"t":"code","b":[48,44],"m":"bmi","oa":38554,"o":"j_969A"},{"a":38510,"s":"C64: key scan held off while $130B counts down (set to 2 at $1286)","t":"code","b":[173,11,19],"m":"lda","oa":4875,"o":"key_check_delay"},{"a":38513,"t":"code","b":[240,5],"m":"beq","oa":38520,"o":"b_9678"},{"a":38515,"t":"code","b":[206,11,19],"m":"dec","oa":4875,"o":"key_check_delay"},{"a":38518,"t":"code","b":[208,34],"m":"bne","oa":38554,"o":"j_969A"},{"a":38520,"l":"b_9678","t":"code","b":[32,159,17],"m":"jsr","oa":4511,"o":"poll_keys","x":[38513]},{"a":38523,"t":"code","b":[76,154,150],"m":"jmp","oa":38554,"o":"j_969A"},{"a":38526,"l":"b_967E","t":"code","b":[160,13],"m":"ldy","o":"#$0D","x":[38477]},{"a":38528,"t":"code","b":[32,99,19],"m":"jsr","oa":4963,"o":"scan_game_keys"},{"a":38531,"t":"code","b":[162,2],"m":"ldx","o":"#$02"},{"a":38533,"t":"code","b":[169,128],"m":"lda","o":"#$80"},{"a":38535,"l":"b_9687","t":"code","b":[157,232,12],"m":"sta","oa":3304,"o":"keylog_pan_x,x","x":[38539]},{"a":38538,"t":"code","b":[202],"m":"dex"},{"a":38539,"t":"code","b":[16,250],"m":"bpl","oa":38535,"o":"b_9687"},{"a":38541,"t":"code","b":[76,154,150],"m":"jmp","oa":38554,"o":"j_969A"},{"a":38544,"l":"b_9690","t":"code","b":[173,77,12],"m":"lda","oa":3149,"o":"object_only_redraw","x":[38472]},{"a":38547,"t":"code","b":[16,5],"m":"bpl","oa":38554,"o":"j_969A"},{"a":38549,"t":"code","b":[169,12],"m":"lda","o":"#$0C"},{"a":38551,"t":"code","b":[32,97,148],"m":"jsr","oa":37985,"o":"fade_view_dots"},{"a":38554,"l":"j_969A","t":"code","b":[104],"m":"pla","x":[38445,38467,38508,38518,38523,38541,38547]},{"a":38555,"t":"code","b":[168],"m":"tay"},{"a":38556,"t":"code","b":[104],"m":"pla"},{"a":38557,"t":"code","b":[170],"m":"tax"},{"a":38558,"t":"code","b":[104],"m":"pla"},{"a":38559,"t":"code","b":[64],"m":"rti"},{"a":38560,"l":"sights_pan_step","c":"How far the sights sprite moves for one pan step, by direction 0-3 (right, left, up, down): -8 and +8 pixels in X ($D000) for right and left, +8 and -8 lines in Y ($D001) for up and down, against the scroll, so the sights stay on the same spot of the landscape (scroll_view_step, $96DA and $971F).","t":"byte","b":[248,8,8,248],"x":[38618,38687]},{"a":38564,"l":"sights_pan_step_hi","c":"High-byte partner for the sights' X move: $FF for a pan right, $00 for a pan left, added with the carry into $D010 ($96E3), whose bit 0 is sprite 0's X bit 8.","t":"byte","b":[255,0],"x":[38627]},{"a":38566,"l":"scroll_view_step","c":"One step of a pan, the C64's counterpart of the BBC's ScrollPlayerView; called from the pan loop at $366D each time the interrupt has flagged $0CD8. Y = the pan direction from $08 (0 right, 1 left, 2 up, 3 down). Right or left: moves the column position $94 by +1 or -1 (0-39, wrapping), sets $96 to the column to fill ($94 + 39 for right, $94 for left, mod 40) and $97 to the row position $95. Up or down: moves the row position $95 by -1 or +1 (0-24, wrapping), sets $97 to the row to fill ($95 for up, $95 + 23 for down, mod 25) and $96 to $94. While the sights are shown ($0C5F bit 7) it moves sprite 0 eight pixels against the scroll (sights_pan_step) and copies the sights position $0CC6 or $0CC7 to $9B or $9C. Ends by counting down the steps left in $0CC1. It changes no screen address and moves no picture data: the pan loop calls $B006 next, which is missing from this copy.","t":"code","b":[164,8],"m":"ldy","oa":8,"o":"last_pan_dir","x":[13933]},{"a":38568,"t":"code","b":[192,2],"m":"cpy","o":"#$02"},{"a":38570,"t":"code","b":[176,70],"m":"bcs","oa":38642,"o":"b_96F2"},{"a":38572,"t":"code","b":[165,148],"m":"lda","oa":148,"o":"view_origin_col"},{"a":38574,"t":"code","b":[24],"m":"clc"},{"a":38575,"t":"code","b":[121,17,153],"m":"adc","oa":39185,"o":"pan_position_step,y"},{"a":38578,"t":"code","b":[16,4],"m":"bpl","oa":38584,"o":"b_96B8"},{"a":38580,"t":"code","b":[169,39],"m":"lda","o":"#$27"},{"a":38582,"t":"code","b":[208,6],"m":"bne","oa":38590,"o":"b_96BE"},{"a":38584,"l":"b_96B8","t":"code","b":[201,40],"m":"cmp","o":"#$28","x":[38578]},{"a":38586,"t":"code","b":[144,2],"m":"bcc","oa":38590,"o":"b_96BE"},{"a":38588,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":38590,"l":"b_96BE","t":"code","b":[133,148],"m":"sta","oa":148,"o":"view_origin_col","x":[38582,38586]},{"a":38592,"t":"code","b":[24],"m":"clc"},{"a":38593,"t":"code","b":[121,13,153],"m":"adc","oa":39181,"o":"pan_fill_offset,y"},{"a":38596,"t":"code","b":[201,40],"m":"cmp","o":"#$28"},{"a":38598,"t":"code","b":[144,2],"m":"bcc","oa":38602,"o":"b_96CA"},{"a":38600,"t":"code","b":[233,40],"m":"sbc","o":"#$28"},{"a":38602,"l":"b_96CA","t":"code","b":[133,150],"m":"sta","oa":150,"o":"strip_col","x":[38598]},{"a":38604,"t":"code","b":[165,149],"m":"lda","oa":149,"o":"view_origin_row"},{"a":38606,"t":"code","b":[133,151],"m":"sta","oa":151,"o":"strip_row"},{"a":38608,"t":"code","b":[44,95,12],"m":"bit","oa":3167,"o":"sights_on"},{"a":38611,"t":"code","b":[16,26],"m":"bpl","oa":38639,"o":"b_96EF"},{"a":38613,"t":"code","b":[120],"m":"sei"},{"a":38614,"s":"move the sights sprite with the landscape","t":"code","b":[173,0,208],"m":"lda","o":"vic_sprite0_x"},{"a":38617,"t":"code","b":[24],"m":"clc"},{"a":38618,"t":"code","b":[121,160,150],"m":"adc","oa":38560,"o":"sights_pan_step,y"},{"a":38621,"t":"code","b":[141,0,208],"m":"sta","o":"vic_sprite0_x"},{"a":38624,"t":"code","b":[173,16,208],"m":"lda","o":"vic_sprite_x_msb"},{"a":38627,"t":"code","b":[121,164,150],"m":"adc","oa":38564,"o":"sights_pan_step_hi,y"},{"a":38630,"t":"code","b":[141,16,208],"m":"sta","o":"vic_sprite_x_msb"},{"a":38633,"t":"code","b":[88],"m":"cli"},{"a":38634,"t":"code","b":[173,198,12],"m":"lda","oa":3270,"o":"sights_x"},{"a":38637,"t":"code","b":[133,155],"m":"sta","oa":155,"o":"sights_sprite_x"},{"a":38639,"l":"b_96EF","t":"code","b":[76,42,151],"m":"jmp","oa":38698,"o":"j_972A","x":[38611]},{"a":38642,"l":"b_96F2","t":"code","b":[165,149],"m":"lda","oa":149,"o":"view_origin_row","x":[38570]},{"a":38644,"t":"code","b":[24],"m":"clc"},{"a":38645,"t":"code","b":[121,17,153],"m":"adc","oa":39185,"o":"pan_position_step,y"},{"a":38648,"t":"code","b":[16,4],"m":"bpl","oa":38654,"o":"b_96FE"},{"a":38650,"t":"code","b":[169,24],"m":"lda","o":"#$18"},{"a":38652,"t":"code","b":[208,6],"m":"bne","oa":38660,"o":"b_9704"},{"a":38654,"l":"b_96FE","t":"code","b":[201,25],"m":"cmp","o":"#$19","x":[38648]},{"a":38656,"t":"code","b":[144,2],"m":"bcc","oa":38660,"o":"b_9704"},{"a":38658,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":38660,"l":"b_9704","t":"code","b":[133,149],"m":"sta","oa":149,"o":"view_origin_row","x":[38652,38656]},{"a":38662,"t":"code","b":[24],"m":"clc"},{"a":38663,"t":"code","b":[121,13,153],"m":"adc","oa":39181,"o":"pan_fill_offset,y"},{"a":38666,"t":"code","b":[201,25],"m":"cmp","o":"#$19"},{"a":38668,"t":"code","b":[144,2],"m":"bcc","oa":38672,"o":"b_9710"},{"a":38670,"t":"code","b":[233,25],"m":"sbc","o":"#$19"},{"a":38672,"l":"b_9710","t":"code","b":[133,151],"m":"sta","oa":151,"o":"strip_row","x":[38668]},{"a":38674,"t":"code","b":[165,148],"m":"lda","oa":148,"o":"view_origin_col"},{"a":38676,"t":"code","b":[133,150],"m":"sta","oa":150,"o":"strip_col"},{"a":38678,"t":"code","b":[44,95,12],"m":"bit","oa":3167,"o":"sights_on"},{"a":38681,"t":"code","b":[16,15],"m":"bpl","oa":38698,"o":"j_972A"},{"a":38683,"t":"code","b":[173,1,208],"m":"lda","o":"vic_sprite0_y"},{"a":38686,"t":"code","b":[24],"m":"clc"},{"a":38687,"t":"code","b":[121,160,150],"m":"adc","oa":38560,"o":"sights_pan_step,y"},{"a":38690,"t":"code","b":[141,1,208],"m":"sta","o":"vic_sprite0_y"},{"a":38693,"t":"code","b":[173,199,12],"m":"lda","oa":3271,"o":"sights_y"},{"a":38696,"t":"code","b":[133,156],"m":"sta","oa":156,"o":"sights_sprite_y"},{"a":38698,"l":"j_972A","t":"code","b":[206,193,12],"m":"dec","oa":3265,"o":"scroll_steps_left","x":[38639,38681]},{"a":38701,"t":"code","b":[96],"m":"rts"},{"a":38702,"l":"unused_pan_entry","c":"Two bytes of code that nothing calls (no reference found by address anywhere in the image): LDY $08, the pan direction, falling into show_buffer_strip. The BBC's ScrollPlayerView began with the same instruction; the C64's only caller of $9730 ($207C) loads Y itself.","t":"code","b":[164,8],"m":"ldy","oa":8,"o":"last_pan_dir"},{"a":38704,"l":"show_buffer_strip","c":"Copy the strip of picture a pan step reveals from the view picture at $E000 into the character sets, the C64 rewrite of the BBC's ShowScreenBuffer. Y = direction 0-3. First advances the source pointer $2095/$2096 by one cell column (+8 or -8) or one character row (-$140 or +$140) from pan_source_step, then: up or down, copies a whole 40-cell row through copy_buffer_row ($979D); right or left, copies one column of 24 cells, into column $96 of the character-set rows from $97 down (wrapping after row 24): cell address = row base from $3A00/$3A20 plus 8 x $96, copied again through the $3A40 page offset for rows that straddle two character sets, the source moving down $140 a row since the picture is laid out as a C64 bitmap. Called from $207E.","t":"code","b":[173,149,32],"m":"lda","oa":8341,"o":"buffer_copy_ptr","x":[8318]},{"a":38707,"t":"code","b":[24],"m":"clc"},{"a":38708,"t":"code","b":[121,21,153],"m":"adc","oa":39189,"o":"pan_source_step_lo,y"},{"a":38711,"t":"code","b":[141,149,32],"m":"sta","oa":8341,"o":"buffer_copy_ptr"},{"a":38714,"t":"code","b":[133,98],"m":"sta","oa":98,"o":"copy_src"},{"a":38716,"t":"code","b":[173,150,32],"m":"lda","oa":8342,"o":"buffer_copy_ptr_hi"},{"a":38719,"t":"code","b":[121,25,153],"m":"adc","oa":39193,"o":"pan_source_step_hi,y"},{"a":38722,"t":"code","b":[141,150,32],"m":"sta","oa":8342,"o":"buffer_copy_ptr_hi"},{"a":38725,"t":"code","b":[133,99],"m":"sta","oa":99,"o":"copy_src_hi"},{"a":38727,"t":"code","b":[192,2],"m":"cpy","o":"#$02"},{"a":38729,"t":"code","b":[176,82],"m":"bcs","oa":38813,"o":"copy_buffer_row"},{"a":38731,"t":"code","b":[165,150],"m":"lda","oa":150,"o":"strip_col"},{"a":38733,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38734,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38735,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38736,"t":"code","b":[133,146],"m":"sta","oa":146,"o":"col_offset_lo"},{"a":38738,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":38740,"t":"code","b":[42],"m":"rol","o":"a"},{"a":38741,"t":"code","b":[133,147],"m":"sta","oa":147,"o":"col_offset_hi"},{"a":38743,"t":"code","b":[166,151],"m":"ldx","oa":151,"o":"strip_row"},{"a":38745,"t":"code","b":[169,24],"m":"lda","o":"#$18"},{"a":38747,"t":"code","b":[133,152],"m":"sta","oa":152,"o":"copy_rows_left"},{"a":38749,"l":"b_975D","t":"code","b":[189,0,58],"m":"lda","oa":14848,"o":"row_char_addr_lo,x","x":[38810]},{"a":38752,"t":"code","b":[24],"m":"clc"},{"a":38753,"t":"code","b":[101,146],"m":"adc","oa":146,"o":"col_offset_lo"},{"a":38755,"t":"code","b":[133,100],"m":"sta","oa":100,"o":"copy_dst"},{"a":38757,"t":"code","b":[189,32,58],"m":"lda","oa":14880,"o":"row_char_addr_hi,x"},{"a":38760,"t":"code","b":[101,147],"m":"adc","oa":147,"o":"col_offset_hi"},{"a":38762,"t":"code","b":[133,101],"m":"sta","oa":101,"o":"copy_dst_hi"},{"a":38764,"t":"code","b":[32,136,152],"m":"jsr","oa":39048,"o":"copy_cell"},{"a":38767,"t":"code","b":[189,64,58],"m":"lda","oa":14912,"o":"row_second_copy_page,x"},{"a":38770,"t":"code","b":[240,16],"m":"beq","oa":38788,"o":"b_9784"},{"a":38772,"t":"code","b":[24],"m":"clc"},{"a":38773,"t":"code","b":[101,101],"m":"adc","oa":101,"o":"copy_dst_hi"},{"a":38775,"t":"code","b":[133,101],"m":"sta","oa":101,"o":"copy_dst_hi"},{"a":38777,"t":"code","b":[32,136,152],"m":"jsr","oa":39048,"o":"copy_cell"},{"a":38780,"t":"code","b":[165,101],"m":"lda","oa":101,"o":"copy_dst_hi"},{"a":38782,"t":"code","b":[56],"m":"sec"},{"a":38783,"t":"code","b":[253,64,58],"m":"sbc","oa":14912,"o":"row_second_copy_page,x"},{"a":38786,"t":"code","b":[133,101],"m":"sta","oa":101,"o":"copy_dst_hi"},{"a":38788,"l":"b_9784","t":"code","b":[165,98],"m":"lda","oa":98,"o":"copy_src","x":[38770]},{"a":38790,"t":"code","b":[24],"m":"clc"},{"a":38791,"t":"code","b":[105,64],"m":"adc","o":"#$40"},{"a":38793,"t":"code","b":[133,98],"m":"sta","oa":98,"o":"copy_src"},{"a":38795,"t":"code","b":[165,99],"m":"lda","oa":99,"o":"copy_src_hi"},{"a":38797,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":38799,"t":"code","b":[133,99],"m":"sta","oa":99,"o":"copy_src_hi"},{"a":38801,"t":"code","b":[232],"m":"inx"},{"a":38802,"t":"code","b":[224,25],"m":"cpx","o":"#$19"},{"a":38804,"t":"code","b":[144,2],"m":"bcc","oa":38808,"o":"b_9798"},{"a":38806,"t":"code","b":[162,0],"m":"ldx","o":"#$00"},{"a":38808,"l":"b_9798","t":"code","b":[198,152],"m":"dec","oa":152,"o":"copy_rows_left","x":[38804]},{"a":38810,"t":"code","b":[208,193],"m":"bne","oa":38749,"o":"b_975D"},{"a":38812,"t":"code","b":[96],"m":"rts"},{"a":38813,"l":"copy_buffer_row","c":"Copy one character row of the picture (40 cells, 320 bytes from $62/$63) into row $97 of the character-set buffer, starting at column $96 and wrapping round: 40 - $96 cells to the right-hand end, then the pointer taken back $140 for the remaining $96 cells at columns 0 onward. Rows that straddle two character sets ($3A40,X non-zero) are written twice through copy_cells_twice with the second address in $99/$9A (page offset kept in split_row_page); the others through copy_cells. Used by show_buffer_strip for up and down pans and by show_whole_view for every row.","t":"code","b":[165,150],"m":"lda","oa":150,"o":"strip_col","x":[38729,39133]},{"a":38815,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38816,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38817,"t":"code","b":[10],"m":"asl","o":"a"},{"a":38818,"t":"code","b":[133,146],"m":"sta","oa":146,"o":"col_offset_lo"},{"a":38820,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":38822,"t":"code","b":[42],"m":"rol","o":"a"},{"a":38823,"t":"code","b":[133,147],"m":"sta","oa":147,"o":"col_offset_hi"},{"a":38825,"t":"code","b":[166,151],"m":"ldx","oa":151,"o":"strip_row"},{"a":38827,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":38829,"t":"code","b":[189,0,58],"m":"lda","oa":14848,"o":"row_char_addr_lo,x"},{"a":38832,"t":"code","b":[24],"m":"clc"},{"a":38833,"t":"code","b":[101,146],"m":"adc","oa":146,"o":"col_offset_lo"},{"a":38835,"t":"code","b":[133,100],"m":"sta","oa":100,"o":"copy_dst"},{"a":38837,"t":"code","b":[189,32,58],"m":"lda","oa":14880,"o":"row_char_addr_hi,x"},{"a":38840,"t":"code","b":[101,147],"m":"adc","oa":147,"o":"col_offset_hi"},{"a":38842,"t":"code","b":[133,101],"m":"sta","oa":101,"o":"copy_dst_hi"},{"a":38844,"t":"code","b":[189,64,58],"m":"lda","oa":14912,"o":"row_second_copy_page,x"},{"a":38847,"t":"code","b":[208,30],"m":"bne","oa":38879,"o":"b_97DF"},{"a":38849,"t":"code","b":[169,40],"m":"lda","o":"#$28"},{"a":38851,"t":"code","b":[56],"m":"sec"},{"a":38852,"t":"code","b":[229,150],"m":"sbc","oa":150,"o":"strip_col"},{"a":38854,"t":"code","b":[170],"m":"tax"},{"a":38855,"t":"code","b":[32,86,152],"m":"jsr","oa":38998,"o":"copy_cells"},{"a":38858,"t":"code","b":[166,150],"m":"ldx","oa":150,"o":"strip_col"},{"a":38860,"t":"code","b":[240,16],"m":"beq","oa":38878,"o":"r_97DE"},{"a":38862,"t":"code","b":[165,100],"m":"lda","oa":100,"o":"copy_dst"},{"a":38864,"t":"code","b":[56],"m":"sec"},{"a":38865,"t":"code","b":[233,64],"m":"sbc","o":"#$40"},{"a":38867,"t":"code","b":[133,100],"m":"sta","oa":100,"o":"copy_dst"},{"a":38869,"t":"code","b":[165,101],"m":"lda","oa":101,"o":"copy_dst_hi"},{"a":38871,"t":"code","b":[233,1],"m":"sbc","o":"#$01"},{"a":38873,"t":"code","b":[133,101],"m":"sta","oa":101,"o":"copy_dst_hi"},{"a":38875,"t":"code","b":[32,86,152],"m":"jsr","oa":38998,"o":"copy_cells"},{"a":38878,"l":"r_97DE","t":"code","b":[96],"m":"rts","x":[38860]},{"a":38879,"l":"b_97DF","t":"code","b":[141,17,152],"m":"sta","oa":38929,"o":"split_row_page","x":[38847]},{"a":38882,"t":"code","b":[24],"m":"clc"},{"a":38883,"t":"code","b":[101,101],"m":"adc","oa":101,"o":"copy_dst_hi"},{"a":38885,"t":"code","b":[133,154],"m":"sta","oa":154,"o":"copy_dst2_hi"},{"a":38887,"t":"code","b":[165,100],"m":"lda","oa":100,"o":"copy_dst"},{"a":38889,"t":"code","b":[133,153],"m":"sta","oa":153,"o":"copy_dst2"},{"a":38891,"t":"code","b":[169,40],"m":"lda","o":"#$28"},{"a":38893,"t":"code","b":[56],"m":"sec"},{"a":38894,"t":"code","b":[229,150],"m":"sbc","oa":150,"o":"strip_col"},{"a":38896,"t":"code","b":[170],"m":"tax"},{"a":38897,"t":"code","b":[32,18,152],"m":"jsr","oa":38930,"o":"copy_cells_twice"},{"a":38900,"t":"code","b":[166,150],"m":"ldx","oa":150,"o":"strip_col"},{"a":38902,"t":"code","b":[240,24],"m":"beq","oa":38928,"o":"r_9810"},{"a":38904,"t":"code","b":[165,100],"m":"lda","oa":100,"o":"copy_dst"},{"a":38906,"t":"code","b":[56],"m":"sec"},{"a":38907,"t":"code","b":[233,64],"m":"sbc","o":"#$40"},{"a":38909,"t":"code","b":[133,100],"m":"sta","oa":100,"o":"copy_dst"},{"a":38911,"t":"code","b":[133,153],"m":"sta","oa":153,"o":"copy_dst2"},{"a":38913,"t":"code","b":[165,101],"m":"lda","oa":101,"o":"copy_dst_hi"},{"a":38915,"t":"code","b":[233,1],"m":"sbc","o":"#$01"},{"a":38917,"t":"code","b":[133,101],"m":"sta","oa":101,"o":"copy_dst_hi"},{"a":38919,"t":"code","b":[24],"m":"clc"},{"a":38920,"t":"code","b":[109,17,152],"m":"adc","oa":38929,"o":"split_row_page"},{"a":38923,"t":"code","b":[133,154],"m":"sta","oa":154,"o":"copy_dst2_hi"},{"a":38925,"t":"code","b":[32,18,152],"m":"jsr","oa":38930,"o":"copy_cells_twice"},{"a":38928,"l":"r_9810","t":"code","b":[96],"m":"rts","x":[38902]},{"a":38929,"l":"split_row_page","c":"Page offset from a split row's first character set to its second ($08 for rows crossing a band boundary, $20 for the row wrapping from $6000 to $4000), kept by copy_buffer_row ($97DF) to rebuild the second pointer $9A after the wrap ($9808). $00 in the image, $20 in play.","t":"byte","b":[0],"x":[38879,38920]},{"a":38930,"l":"copy_cells_twice","c":"Copy X cells of 8 bytes from ($62),Y to both ($64),Y and ($99),Y, Y carrying on from its entry value and the three pointers' high bytes stepped each time Y wraps: the double write for character rows that show in two bands.","t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y","x":[38897,38925,38995]},{"a":38932,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":38934,"t":"code","b":[145,153],"m":"sta","oa":153,"o":"(copy_dst2),y"},{"a":38936,"t":"code","b":[200],"m":"iny"},{"a":38937,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":38939,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":38941,"t":"code","b":[145,153],"m":"sta","oa":153,"o":"(copy_dst2),y"},{"a":38943,"t":"code","b":[200],"m":"iny"},{"a":38944,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":38946,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":38948,"t":"code","b":[145,153],"m":"sta","oa":153,"o":"(copy_dst2),y"},{"a":38950,"t":"code","b":[200],"m":"iny"},{"a":38951,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":38953,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":38955,"t":"code","b":[145,153],"m":"sta","oa":153,"o":"(copy_dst2),y"},{"a":38957,"t":"code","b":[200],"m":"iny"},{"a":38958,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":38960,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":38962,"t":"code","b":[145,153],"m":"sta","oa":153,"o":"(copy_dst2),y"},{"a":38964,"t":"code","b":[200],"m":"iny"},{"a":38965,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":38967,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":38969,"t":"code","b":[145,153],"m":"sta","oa":153,"o":"(copy_dst2),y"},{"a":38971,"t":"code","b":[200],"m":"iny"},{"a":38972,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":38974,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":38976,"t":"code","b":[145,153],"m":"sta","oa":153,"o":"(copy_dst2),y"},{"a":38978,"t":"code","b":[200],"m":"iny"},{"a":38979,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":38981,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":38983,"t":"code","b":[145,153],"m":"sta","oa":153,"o":"(copy_dst2),y"},{"a":38985,"t":"code","b":[200],"m":"iny"},{"a":38986,"t":"code","b":[208,6],"m":"bne","oa":38994,"o":"b_9852"},{"a":38988,"t":"code","b":[230,99],"m":"inc","oa":99,"o":"copy_src_hi"},{"a":38990,"t":"code","b":[230,101],"m":"inc","oa":101,"o":"copy_dst_hi"},{"a":38992,"t":"code","b":[230,154],"m":"inc","oa":154,"o":"copy_dst2_hi"},{"a":38994,"l":"b_9852","t":"code","b":[202],"m":"dex","x":[38986]},{"a":38995,"t":"code","b":[208,189],"m":"bne","oa":38930,"o":"copy_cells_twice"},{"a":38997,"t":"code","b":[96],"m":"rts"},{"a":38998,"l":"copy_cells","c":"Copy X cells of 8 bytes from ($62),Y to ($64),Y, Y carrying on from its entry value and both pointers' high bytes stepped each time Y wraps.","t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y","x":[38855,38875,39045]},{"a":39000,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39002,"t":"code","b":[200],"m":"iny"},{"a":39003,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39005,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39007,"t":"code","b":[200],"m":"iny"},{"a":39008,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39010,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39012,"t":"code","b":[200],"m":"iny"},{"a":39013,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39015,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39017,"t":"code","b":[200],"m":"iny"},{"a":39018,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39020,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39022,"t":"code","b":[200],"m":"iny"},{"a":39023,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39025,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39027,"t":"code","b":[200],"m":"iny"},{"a":39028,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39030,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39032,"t":"code","b":[200],"m":"iny"},{"a":39033,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39035,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39037,"t":"code","b":[200],"m":"iny"},{"a":39038,"t":"code","b":[208,4],"m":"bne","oa":39044,"o":"b_9884"},{"a":39040,"t":"code","b":[230,99],"m":"inc","oa":99,"o":"copy_src_hi"},{"a":39042,"t":"code","b":[230,101],"m":"inc","oa":101,"o":"copy_dst_hi"},{"a":39044,"l":"b_9884","t":"code","b":[202],"m":"dex","x":[39038]},{"a":39045,"t":"code","b":[208,207],"m":"bne","oa":38998,"o":"copy_cells"},{"a":39047,"t":"code","b":[96],"m":"rts"},{"a":39048,"l":"copy_cell","c":"Copy one 8-byte cell from ($62) to ($64), Y = 0 to 7. The BBC's ShowBufferBlock byte for byte (BBC $38B2); used by show_buffer_strip for column pans.","t":"code","b":[160,0],"m":"ldy","o":"#$00","x":[38764,38777]},{"a":39050,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39052,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39054,"t":"code","b":[200],"m":"iny"},{"a":39055,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39057,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39059,"t":"code","b":[200],"m":"iny"},{"a":39060,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39062,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39064,"t":"code","b":[200],"m":"iny"},{"a":39065,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39067,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39069,"t":"code","b":[200],"m":"iny"},{"a":39070,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39072,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39074,"t":"code","b":[200],"m":"iny"},{"a":39075,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39077,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39079,"t":"code","b":[200],"m":"iny"},{"a":39080,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39082,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39084,"t":"code","b":[200],"m":"iny"},{"a":39085,"t":"code","b":[177,98],"m":"lda","oa":98,"o":"(copy_src),y"},{"a":39087,"t":"code","b":[145,100],"m":"sta","oa":100,"o":"(copy_dst),y"},{"a":39089,"t":"code","b":[96],"m":"rts"},{"a":39090,"l":"show_whole_view","c":"Put the whole view picture on the play screen; called from $35C9, after $2625 (the BBC's DrawLandscapeView) has drawn the landscape into the picture. Resets the scroll positions $94-$97 to 0 and recomputes the band lines (set_band_lines); sets $D027 and $D025 to 6 (blue), centres the sights ($134C) and places sprite 0 there (place_sights_sprite); copies all 25 character rows of the picture into the character-set buffer with copy_buffer_row, the source rows taken from $3D9C/$3DCE ($E140, $E280, ... $FE00, then $E000); copies the ten icon characters from $ABB0 into characters $F0-$F9 of all five character sets ($4780, $4F80, $5780, $5F80, $6780); turns sprite 0 off again (hide_sights_sprite) and sets $D027 to 1 (white) and $D025 to 0 (black), the sights' colours.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[13769]},{"a":39092,"t":"code","b":[133,150],"m":"sta","oa":150,"o":"strip_col"},{"a":39094,"t":"code","b":[133,151],"m":"sta","oa":151,"o":"strip_row"},{"a":39096,"t":"code","b":[133,148],"m":"sta","oa":148,"o":"view_origin_col"},{"a":39098,"t":"code","b":[133,149],"m":"sta","oa":149,"o":"view_origin_row"},{"a":39100,"t":"code","b":[32,149,149],"m":"jsr","oa":38293,"o":"set_band_lines"},{"a":39103,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":39105,"t":"code","b":[141,39,208],"m":"sta","o":"vic_sprite0_colour"},{"a":39108,"t":"code","b":[141,37,208],"m":"sta","o":"vic_sprite_mc0"},{"a":39111,"t":"code","b":[32,76,19],"m":"jsr","oa":4940,"o":"centre_sights"},{"a":39114,"t":"code","b":[32,220,153],"m":"jsr","oa":39388,"o":"place_sights_sprite"},{"a":39117,"l":"b_98CD","t":"code","b":[169,25],"m":"lda","o":"#$19","x":[39142]},{"a":39119,"t":"code","b":[24],"m":"clc"},{"a":39120,"t":"code","b":[101,151],"m":"adc","oa":151,"o":"strip_row"},{"a":39122,"t":"code","b":[170],"m":"tax"},{"a":39123,"t":"code","b":[189,131,61],"m":"lda","oa":15747,"o":"bitmap_row_lo,x"},{"a":39126,"t":"code","b":[133,98],"m":"sta","oa":98,"o":"copy_src"},{"a":39128,"t":"code","b":[189,181,61],"m":"lda","oa":15797,"o":"bitmap_row_hi,x"},{"a":39131,"t":"code","b":[133,99],"m":"sta","oa":99,"o":"copy_src_hi"},{"a":39133,"t":"code","b":[32,157,151],"m":"jsr","oa":38813,"o":"copy_buffer_row"},{"a":39136,"t":"code","b":[230,151],"m":"inc","oa":151,"o":"strip_row"},{"a":39138,"t":"code","b":[166,151],"m":"ldx","oa":151,"o":"strip_row"},{"a":39140,"t":"code","b":[224,25],"m":"cpx","o":"#$19"},{"a":39142,"t":"code","b":[208,229],"m":"bne","oa":39117,"o":"b_98CD"},{"a":39144,"t":"code","b":[162,79],"m":"ldx","o":"#$4F"},{"a":39146,"l":"b_98EA","t":"code","b":[189,176,171],"m":"lda","oa":43952,"o":"icon_chars_blank_robot,x","x":[39165]},{"a":39149,"t":"code","b":[157,128,71],"m":"sta","oa":18304,"o":"view_set0_icon_glyphs,x"},{"a":39152,"t":"code","b":[157,128,79],"m":"sta","oa":20352,"o":"view_set1_icon_glyphs,x"},{"a":39155,"t":"code","b":[157,128,87],"m":"sta","oa":22400,"o":"view_set2_icon_glyphs,x"},{"a":39158,"t":"code","b":[157,128,95],"m":"sta","oa":24448,"o":"view_set3_icon_glyphs,x"},{"a":39161,"t":"code","b":[157,128,103],"m":"sta","oa":26496,"o":"view_set4_icon_glyphs,x"},{"a":39164,"t":"code","b":[202],"m":"dex"},{"a":39165,"t":"code","b":[16,235],"m":"bpl","oa":39146,"o":"b_98EA"},{"a":39167,"t":"code","b":[32,60,154],"m":"jsr","oa":39484,"o":"hide_sights_sprite"},{"a":39170,"t":"code","b":[169,1],"m":"lda","o":"#$01"},{"a":39172,"t":"code","b":[141,39,208],"m":"sta","o":"vic_sprite0_colour"},{"a":39175,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":39177,"t":"code","b":[141,37,208],"m":"sta","o":"vic_sprite_mc0"},{"a":39180,"t":"code","b":[96],"m":"rts"},{"a":39181,"l":"pan_fill_offset","c":"Offset from the new scroll position to the column or row a pan step must fill, by direction 0-3: +39 (right: the right-hand column), 0 (left), 0 (up: the top row), +23 (down: the bottom row); read by scroll_view_step at $96C1 and $9707.","t":"byte","b":[39,0,0,23],"x":[38593,38663]},{"a":39185,"l":"pan_position_step","c":"Change to the scroll position for one pan step, by direction 0-3: +1 (right, column position $94), -1 (left), -1 (up, row position $95), +1 (down); read at $96AF and $96F5.","t":"byte","b":[1,255,255,1],"x":[38575,38645]},{"a":39189,"l":"pan_source_step_lo","c":"Low bytes of the step added to the pan source pointer $2095/$2096 before each copy, by direction 0-3: +8, -8, -$140, +$140, one cell column or one character row of the view picture (high bytes at $9919). The same values as the BBC's scrollScreenLo/Hi.","t":"byte","b":[8,248,192,64],"x":[38708]},{"a":39193,"l":"pan_source_step_hi","c":"High bytes of the pan source step, by direction 0-3: $00, $FF, $FE, $01 (low bytes at $9915).","t":"byte","b":[0,255,254,1],"x":[38719]},{"a":39197,"l":"pan_source_start_hi","c":"High bytes of the pan source pointer's starting value, by direction 0-3, giving $E138, $E1C0, $EB40 and $E000 with the low bytes at $9921: one step before the first cell or row to copy, since show_buffer_strip adds the step first; all inside the view picture at $E000. The BBC's screenBufferHi/Lo pointed into a separate buffer instead.","t":"byte","b":[225,225,235,224],"x":[39218]},{"a":39201,"l":"pan_source_start_lo","c":"Low bytes of the pan source starting values, by direction 0-3: $38, $C0, $40, $00 (high bytes at $991D).","t":"byte","b":[56,192,64,0],"x":[39212]},{"a":39205,"l":"pan_angle_update","c":"Angle change used while the new strip of a pan is drawn, by direction 0-3: +20, -8 (added to the player's yaw $09C0,X at $10C3 and taken off at $10F8), +4, -12 (added to the pitch $0140,X at $1108 and taken off at $1142). The same values as the BBC's panAngleToUpdate.","t":"byte","b":[20,248,4,244],"x":[4291,4344,4360,4418]},{"a":39209,"l":"start_scrolling_view","c":"Start a pan: store the number of pan steps, A, in $0CD1 (the pan loop at $3660 copies it to the step counter $0CC1), then fall into set_pan_source for direction Y. Called from $10F0 and $1137. The BBC's StartScrollingView.","t":"code","b":[141,209,12],"m":"sta","oa":3281,"o":"pan_scroll_steps","x":[4336,4407]},{"a":39212,"l":"set_pan_source","c":"Set the pan source pointer $2095/$2096 to the starting address for direction Y from pan_source_start ($9921 low, $991D high). Also called on its own from $202E with Y = 0. The BBC's SetBufferAddress with C64 addresses in the table.","t":"code","b":[185,33,153],"m":"lda","oa":39201,"o":"pan_source_start_lo,y","x":[8238]},{"a":39215,"t":"code","b":[141,149,32],"m":"sta","oa":8341,"o":"buffer_copy_ptr"},{"a":39218,"t":"code","b":[185,29,153],"m":"lda","oa":39197,"o":"pan_source_start_hi,y"},{"a":39221,"t":"code","b":[141,150,32],"m":"sta","oa":8342,"o":"buffer_copy_ptr_hi"},{"a":39224,"t":"code","b":[96],"m":"rts"},{"a":39225,"l":"use_row_buffer","c":"Get ready to draw the new rows of an up or down pan: calls $2993 with A = 0 (the buffer set-up, the BBC's ConfigureBuffer), then sets the pitch limits $51 = $F0 and $52 = $B0 (entry 0 of buffer_max_pitch and buffer_min_pitch). Called from $111C. The BBC's UseRowBuffer with its call relocated.","t":"code","b":[169,0],"m":"lda","o":"#$00","x":[4380]},{"a":39227,"t":"code","b":[32,147,41],"m":"jsr","oa":10643,"o":"set_draw_buffer"},{"a":39230,"t":"code","b":[160,0],"m":"ldy","o":"#$00"},{"a":39232,"l":"b_9940","t":"code","b":[185,75,153],"m":"lda","oa":39243,"o":"buffer_max_pitch,y","x":[39254]},{"a":39235,"t":"code","b":[133,81],"m":"sta","oa":81,"o":"buffer_top_pitch"},{"a":39237,"t":"code","b":[185,77,153],"m":"lda","oa":39245,"o":"buffer_min_pitch,y"},{"a":39240,"t":"code","b":[133,82],"m":"sta","oa":82,"o":"buffer_bottom_pitch"},{"a":39242,"t":"code","b":[96],"m":"rts"},{"a":39243,"l":"buffer_max_pitch","c":"Upper pitch limit written to $51 while drawing a pan strip: $F0 for rows (entry 0) and for columns (entry 1). The BBC's values.","t":"byte","b":[240,240],"x":[39232]},{"a":39245,"l":"buffer_min_pitch","c":"Lower pitch limit written to $52 while drawing a pan strip: $B0 for rows (entry 0), $30 for columns (entry 1). The BBC's values.","t":"byte","b":[176,48],"x":[39237]},{"a":39247,"l":"use_column_buffer","c":"Get ready to draw the new columns of a left or right pan: calls $2993 with A = 2, then falls into set_column_buffer_pitch. Called from $10D7. The BBC's UseColumnBuffer.","t":"code","b":[169,2],"m":"lda","o":"#$02","x":[4311]},{"a":39249,"t":"code","b":[32,147,41],"m":"jsr","oa":10643,"o":"set_draw_buffer"},{"a":39252,"l":"set_column_buffer_pitch","c":"Set the pitch limits for column strips, $51 = $F0 and $52 = $30 (entry 1 of $994B/$994D), by jumping into use_row_buffer's tail with Y = 1. Called from $113A and $1196.","t":"code","b":[160,1],"m":"ldy","o":"#$01","x":[4410,4502]},{"a":39254,"t":"code","b":[208,232],"m":"bne","oa":39232,"o":"b_9940"},{"a":39256,"l":"move_sights","c":"Move the sights one step for the keys in the key logger: sideways (move_sights_sideways), then, if bit 7 of $09 is still set (no sideways pan started), up or down (move_sights_up_down), then show sprite 0 at the new place (place_sights_sprite). Called from $11FB. The BBC's MoveSights ended by drawing the sights into screen memory instead.","t":"code","b":[32,101,153],"m":"jsr","oa":39269,"o":"move_sights_sideways","x":[4603]},{"a":39259,"t":"code","b":[165,9],"m":"lda","oa":9,"o":"pan_key_now"},{"a":39261,"t":"code","b":[16,3],"m":"bpl","oa":39266,"o":"b_9962"},{"a":39263,"t":"code","b":[32,148,153],"m":"jsr","oa":39316,"o":"move_sights_up_down"},{"a":39266,"l":"b_9962","t":"code","b":[76,220,153],"m":"jmp","oa":39388,"o":"place_sights_sprite","x":[39261]},{"a":39269,"l":"move_sights_sideways","c":"Move the sights' x position $0CC6 by one for key-logger entry 0 ($0CE8: 0 right, 1 left, bit 7 no key), within $10-$8F: a step past either edge takes it $40 back towards the middle and stores the direction in $09, which starts a pan. The new x, before any wrap, is copied to $9B for the sprite. The BBC routine's logic without its screen-address update.","t":"code","b":[174,232,12],"m":"ldx","oa":3304,"o":"keylog_pan_x","x":[39256]},{"a":39272,"t":"code","b":[48,21],"m":"bmi","oa":39295,"o":"r_997F"},{"a":39274,"t":"code","b":[208,20],"m":"bne","oa":39296,"o":"b_9980"},{"a":39276,"t":"code","b":[173,198,12],"m":"lda","oa":3270,"o":"sights_x"},{"a":39279,"t":"code","b":[24],"m":"clc"},{"a":39280,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":39282,"t":"code","b":[133,155],"m":"sta","oa":155,"o":"sights_sprite_x"},{"a":39284,"t":"code","b":[201,144],"m":"cmp","o":"#$90"},{"a":39286,"t":"code","b":[144,4],"m":"bcc","oa":39292,"o":"b_997C"},{"a":39288,"t":"code","b":[233,64],"m":"sbc","o":"#$40"},{"a":39290,"t":"code","b":[134,9],"m":"stx","oa":9,"o":"pan_key_now"},{"a":39292,"l":"b_997C","t":"code","b":[141,198,12],"m":"sta","oa":3270,"o":"sights_x","x":[39286]},{"a":39295,"l":"r_997F","t":"code","b":[96],"m":"rts","x":[39272,39324]},{"a":39296,"l":"b_9980","t":"code","b":[173,198,12],"m":"lda","oa":3270,"o":"sights_x","x":[39274]},{"a":39299,"t":"code","b":[56],"m":"sec"},{"a":39300,"t":"code","b":[233,1],"m":"sbc","o":"#$01"},{"a":39302,"t":"code","b":[133,155],"m":"sta","oa":155,"o":"sights_sprite_x"},{"a":39304,"t":"code","b":[201,16],"m":"cmp","o":"#$10"},{"a":39306,"t":"code","b":[176,4],"m":"bcs","oa":39312,"o":"b_9990"},{"a":39308,"t":"code","b":[105,64],"m":"adc","o":"#$40"},{"a":39310,"t":"code","b":[134,9],"m":"stx","oa":9,"o":"pan_key_now"},{"a":39312,"l":"b_9990","t":"code","b":[141,198,12],"m":"sta","oa":3270,"o":"sights_x","x":[39306]},{"a":39315,"t":"code","b":[96],"m":"rts"},{"a":39316,"l":"move_sights_up_down","c":"Move the sights' y position $0CC7 by one for key-logger entry 2 ($0CEA: 2 up, 3 down, bit 7 no key), within $20-$9F: a step past the top or bottom takes it $40 back and stores the direction in $09 (a pan up or down), unless the player's pitch ($0140 + object $0B) is already at its limit ($35 at $114B going up, $CD at $114C going down), when y stays where it was. The new y goes to $9C for the sprite, put back to the old value at a limit ($99D6). The BBC routine plus the $9C bookkeeping.","t":"code","b":[166,11],"m":"ldx","oa":11,"o":"player_obj","x":[39263]},{"a":39318,"t":"code","b":[188,64,1],"m":"ldy","oa":320,"o":"obj_pitch,x"},{"a":39321,"t":"code","b":[174,234,12],"m":"ldx","oa":3306,"o":"keylog_pan_y"},{"a":39324,"t":"code","b":[48,225],"m":"bmi","oa":39295,"o":"r_997F"},{"a":39326,"t":"code","b":[224,2],"m":"cpx","o":"#$02"},{"a":39328,"t":"code","b":[208,26],"m":"bne","oa":39356,"o":"b_99BC"},{"a":39330,"t":"code","b":[173,199,12],"m":"lda","oa":3271,"o":"sights_y"},{"a":39333,"t":"code","b":[24],"m":"clc"},{"a":39334,"t":"code","b":[105,1],"m":"adc","o":"#$01"},{"a":39336,"t":"code","b":[133,156],"m":"sta","oa":156,"o":"sights_sprite_y"},{"a":39338,"t":"code","b":[201,160],"m":"cmp","o":"#$A0"},{"a":39340,"t":"code","b":[144,10],"m":"bcc","oa":39352,"o":"b_99B8"},{"a":39342,"t":"code","b":[204,75,17],"m":"cpy","oa":4427,"o":"pitch_limit_up"},{"a":39345,"t":"code","b":[240,35],"m":"beq","oa":39382,"o":"b_99D6"},{"a":39347,"t":"code","b":[56],"m":"sec"},{"a":39348,"t":"code","b":[233,64],"m":"sbc","o":"#$40"},{"a":39350,"t":"code","b":[134,9],"m":"stx","oa":9,"o":"pan_key_now"},{"a":39352,"l":"b_99B8","t":"code","b":[141,199,12],"m":"sta","oa":3271,"o":"sights_y","x":[39340]},{"a":39355,"t":"code","b":[96],"m":"rts"},{"a":39356,"l":"b_99BC","t":"code","b":[173,199,12],"m":"lda","oa":3271,"o":"sights_y","x":[39328]},{"a":39359,"t":"code","b":[56],"m":"sec"},{"a":39360,"t":"code","b":[233,1],"m":"sbc","o":"#$01"},{"a":39362,"t":"code","b":[133,156],"m":"sta","oa":156,"o":"sights_sprite_y"},{"a":39364,"t":"code","b":[201,32],"m":"cmp","o":"#$20"},{"a":39366,"t":"code","b":[176,10],"m":"bcs","oa":39378,"o":"b_99D2"},{"a":39368,"t":"code","b":[204,76,17],"m":"cpy","oa":4428,"o":"pitch_limit_down"},{"a":39371,"t":"code","b":[240,9],"m":"beq","oa":39382,"o":"b_99D6"},{"a":39373,"t":"code","b":[24],"m":"clc"},{"a":39374,"t":"code","b":[105,64],"m":"adc","o":"#$40"},{"a":39376,"t":"code","b":[134,9],"m":"stx","oa":9,"o":"pan_key_now"},{"a":39378,"l":"b_99D2","t":"code","b":[141,199,12],"m":"sta","oa":3271,"o":"sights_y","x":[39366]},{"a":39381,"t":"code","b":[96],"m":"rts"},{"a":39382,"l":"b_99D6","t":"code","b":[173,199,12],"m":"lda","oa":3271,"o":"sights_y","x":[39345,39371]},{"a":39385,"t":"code","b":[133,156],"m":"sta","oa":156,"o":"sights_sprite_y"},{"a":39387,"t":"code","b":[96],"m":"rts"},{"a":39388,"l":"place_sights_sprite","c":"Show the sights as sprite 0 at the sights position: Y register $D001 = $F9 - $9C, X = 2 x $9B + 14 with bit 8 put into bit 0 of $D010 (through sights_x_high), then sprite 0 enabled in $D015. Does nothing while bit 7 of $0CD7 is set. Sprite 0's image (pointer $C0, data at $7000, drawn by $3F13-$3F5F) is a cross 11 multicolour pixels wide and 11 lines high whose pixels alternate between the sprite colour and multicolour 0 (white and black once show_whole_view has set them). The C64's replacement for the BBC's DrawSights, which drew the cross into screen memory. Called from $11C7, $208E, $98CA, $9962.","t":"code","b":[173,215,12],"m":"lda","oa":3287,"o":"hide_sights","x":[4551,8334,39114,39266]},{"a":39391,"t":"code","b":[48,52],"m":"bmi","oa":39445,"o":"r_9A15"},{"a":39393,"s":"sprite Y = $F9 - sights y","t":"code","b":[169,249],"m":"lda","o":"#$F9"},{"a":39395,"t":"code","b":[56],"m":"sec"},{"a":39396,"t":"code","b":[229,156],"m":"sbc","oa":156,"o":"sights_sprite_y"},{"a":39398,"t":"code","b":[141,1,208],"m":"sta","o":"vic_sprite0_y"},{"a":39401,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":39403,"t":"code","b":[141,22,154],"m":"sta","oa":39446,"o":"sights_x_high"},{"a":39406,"s":"sprite X = 2 x sights x + 14, nine bits","t":"code","b":[165,155],"m":"lda","oa":155,"o":"sights_sprite_x"},{"a":39408,"t":"code","b":[10],"m":"asl","o":"a"},{"a":39409,"t":"code","b":[46,22,154],"m":"rol","oa":39446,"o":"sights_x_high"},{"a":39412,"t":"code","b":[24],"m":"clc"},{"a":39413,"t":"code","b":[105,14],"m":"adc","o":"#$0E"},{"a":39415,"t":"code","b":[141,0,208],"m":"sta","o":"vic_sprite0_x"},{"a":39418,"t":"code","b":[173,22,154],"m":"lda","oa":39446,"o":"sights_x_high"},{"a":39421,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":39423,"t":"code","b":[141,22,154],"m":"sta","oa":39446,"o":"sights_x_high"},{"a":39426,"t":"code","b":[173,16,208],"m":"lda","o":"vic_sprite_x_msb"},{"a":39429,"t":"code","b":[41,254],"m":"and","o":"#$FE"},{"a":39431,"t":"code","b":[13,22,154],"m":"ora","oa":39446,"o":"sights_x_high"},{"a":39434,"t":"code","b":[141,16,208],"m":"sta","o":"vic_sprite_x_msb"},{"a":39437,"t":"code","b":[173,21,208],"m":"lda","o":"vic_sprite_enable"},{"a":39440,"t":"code","b":[9,1],"m":"ora","o":"#$01"},{"a":39442,"t":"code","b":[141,21,208],"m":"sta","o":"vic_sprite_enable"},{"a":39445,"l":"r_9A15","t":"code","b":[96],"m":"rts","x":[39391]},{"a":39446,"l":"sights_x_high","c":"Scratch: bit 8 of the sights sprite's X position while place_sights_sprite builds it ($99EB-$9A07).","t":"byte","b":[0],"x":[39403,39409,39418,39423,39431]},{"a":39447,"l":"unused_sights_pixels","c":"Not read by any code found (searched for its addresses throughout the image): three 4-byte multicolour tables, pixel-clear masks $3F $CF $F3 $FC, colour 1 $40 $10 $04 $01 and colour 2 $80 $20 $08 $02. They look like the C64 conversion of the pixel tables the BBC's DrawSights used, left behind when the sights became a sprite.","t":"byte","b":[63,207,243,252,64,16,4,1]},{"a":39455,"t":"byte","b":[128,32,8,2]},{"a":39459,"l":"unused_sights_x_steps","c":"Not read by any code found: 12 bytes identical to the BBC's xSightsStep (00 00 00 FB 02 02 02 02 02 FB 00 00), the horizontal half of the pixel path along which the BBC drew its cross; unused here, where the sights are sprite 0.","t":"byte","b":[0,0,0,251,2,2,2,2]},{"a":39467,"t":"byte","b":[2,251,0,0]},{"a":39471,"l":"unused_sights_y_steps","c":"Not read by any code found: 13 bytes identical to the BBC's ySightsStep (00 02 02 01 00 00 00 00 00 01 02 02 and the end marker $80), the vertical half of that pixel path.","t":"byte","b":[0,2,2,1,0,0,0,0]},{"a":39479,"t":"byte","b":[0,1,2,2,128]},{"a":39484,"l":"hide_sights_sprite","c":"Hide the sights: clear bit 0 of $D015, sprite 0 off. Replaces the BBC's RemoveSights, which put back the screen bytes under its drawn cross. Called from $11CD, $1FAF, $205F, $98FF.","t":"code","b":[173,21,208],"m":"lda","o":"vic_sprite_enable","x":[4557,8111,8287,39167]},{"a":39487,"t":"code","b":[41,254],"m":"and","o":"#$FE"},{"a":39489,"t":"code","b":[141,21,208],"m":"sta","o":"vic_sprite_enable"},{"a":39492,"t":"code","b":[96],"m":"rts"},{"a":39493,"l":"unused_sights_move_lo","c":"Not read by any code found: 6 bytes identical to the BBC's sightsMoveAddrLo (08 F8 FF 01 C7 39), screen-address steps for moving its drawn cross; high bytes at $9A4B.","t":"byte","b":[8,248,255,1,199,57]},{"a":39499,"l":"unused_sights_move_hi","c":"Not read by any code found: 6 bytes identical to the BBC's sightsMoveAddrHi (00 FF FF 00 FE 01), the partner of $9A45.","t":"byte","b":[0,255,255,0,254,1]},{"a":39505,"l":"set_video_mode","c":"Switch the display between the bitmap screens (title, landscape overview) and the play view; A is stored in video_mode_flag. Bit 7 clear (from $117E with A = 0): VIC bank 3 ($DD00 bits 0-1 = 00), multicolour bitmap at $E000 with its screen colours at $CC00 ($D011 = $3B, $D018 = $38), colour RAM filled with the low three bits of $D800's colour, raster interrupt at line 100. Bit 7 set (from $3577 with A = $80, as a game starts): VIC bank 1 (bits = 10), multicolour text, matrix $7C00, characters from $4000 ($D011 = $1B, $D018 = $F0), colour RAM filled with $D800's colour OR 8 (each cell's multicolour flag), sprite multicolour 1 ($D026) = 5, then falls into reset_view_matrix.","t":"code","b":[141,246,154],"m":"sta","oa":39670,"o":"video_mode_flag","x":[4478,13687]},{"a":39508,"t":"code","b":[170],"m":"tax"},{"a":39509,"t":"code","b":[48,42],"m":"bmi","oa":39553,"o":"b_9A81"},{"a":39511,"t":"code","b":[120],"m":"sei"},{"a":39512,"t":"code","b":[173,2,221],"m":"lda","o":"cia2_ddr_a"},{"a":39515,"t":"code","b":[9,3],"m":"ora","o":"#$03"},{"a":39517,"t":"code","b":[141,2,221],"m":"sta","o":"cia2_ddr_a"},{"a":39520,"t":"code","b":[173,0,221],"m":"lda","o":"cia2_port_a"},{"a":39523,"t":"code","b":[41,252],"m":"and","o":"#$FC"},{"a":39525,"t":"code","b":[141,0,221],"m":"sta","o":"cia2_port_a"},{"a":39528,"t":"code","b":[169,59],"m":"lda","o":"#$3B"},{"a":39530,"t":"code","b":[141,17,208],"m":"sta","o":"vic_control1"},{"a":39533,"t":"code","b":[169,56],"m":"lda","o":"#$38"},{"a":39535,"t":"code","b":[141,24,208],"m":"sta","o":"vic_memory"},{"a":39538,"t":"code","b":[88],"m":"cli"},{"a":39539,"t":"code","b":[173,0,216],"m":"lda","o":"colour_ram"},{"a":39542,"t":"code","b":[41,7],"m":"and","o":"#$07"},{"a":39544,"t":"code","b":[32,228,154],"m":"jsr","oa":39652,"o":"fill_colour_ram"},{"a":39547,"t":"code","b":[169,100],"m":"lda","o":"#$64"},{"a":39549,"t":"code","b":[141,18,208],"m":"sta","o":"vic_raster"},{"a":39552,"t":"code","b":[96],"m":"rts"},{"a":39553,"l":"b_9A81","t":"code","b":[120],"m":"sei","x":[39509]},{"a":39554,"t":"code","b":[173,2,221],"m":"lda","o":"cia2_ddr_a"},{"a":39557,"t":"code","b":[9,3],"m":"ora","o":"#$03"},{"a":39559,"t":"code","b":[141,2,221],"m":"sta","o":"cia2_ddr_a"},{"a":39562,"t":"code","b":[173,0,221],"m":"lda","o":"cia2_port_a"},{"a":39565,"t":"code","b":[41,252],"m":"and","o":"#$FC"},{"a":39567,"t":"code","b":[9,2],"m":"ora","o":"#$02"},{"a":39569,"t":"code","b":[141,0,221],"m":"sta","o":"cia2_port_a"},{"a":39572,"t":"code","b":[169,27],"m":"lda","o":"#$1B"},{"a":39574,"t":"code","b":[141,17,208],"m":"sta","o":"vic_control1"},{"a":39577,"t":"code","b":[169,240],"m":"lda","o":"#$F0"},{"a":39579,"t":"code","b":[141,24,208],"m":"sta","o":"vic_memory"},{"a":39582,"t":"code","b":[88],"m":"cli"},{"a":39583,"t":"code","b":[173,0,216],"m":"lda","o":"colour_ram"},{"a":39586,"t":"code","b":[9,8],"m":"ora","o":"#$08"},{"a":39588,"t":"code","b":[32,228,154],"m":"jsr","oa":39652,"o":"fill_colour_ram"},{"a":39591,"t":"code","b":[169,5],"m":"lda","o":"#$05"},{"a":39593,"t":"code","b":[141,38,208],"m":"sta","o":"vic_sprite_mc1"},{"a":39596,"l":"reset_view_matrix","c":"Fill the play screen matrix: rows 0-23 ($7C00-$7FBF) with character codes 0-239 in four runs of 240, so the pattern repeats every six rows; row 24 ($7FC0-$7FE7) with $28-$4F; and $7FE8 with 0. With the band interrupts giving each 40 lines its own character set, every cell of the view has its own 8 bytes, a bitmap built from characters. Row 0 is then overwritten by update_icon_row. Also called from $1347, after $94 and $95 are set to 0.","t":"code","b":[169,4],"m":"lda","o":"#$04","x":[4935]},{"a":39598,"t":"code","b":[133,116],"m":"sta","oa":116,"o":"tmp_t"},{"a":39600,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":39602,"t":"code","b":[133,112],"m":"sta","oa":112,"o":"tmp_p"},{"a":39604,"t":"code","b":[169,124],"m":"lda","o":"#$7C"},{"a":39606,"t":"code","b":[133,113],"m":"sta","oa":113,"o":"tmp_q"},{"a":39608,"l":"b_9AB8","t":"code","b":[160,0],"m":"ldy","o":"#$00","x":[39633]},{"a":39610,"l":"b_9ABA","t":"code","b":[152],"m":"tya","x":[39616]},{"a":39611,"t":"code","b":[145,112],"m":"sta","oa":112,"o":"(tmp_p),y"},{"a":39613,"t":"code","b":[200],"m":"iny"},{"a":39614,"t":"code","b":[192,240],"m":"cpy","o":"#$F0"},{"a":39616,"t":"code","b":[208,248],"m":"bne","oa":39610,"o":"b_9ABA"},{"a":39618,"t":"code","b":[165,112],"m":"lda","oa":112,"o":"tmp_p"},{"a":39620,"t":"code","b":[24],"m":"clc"},{"a":39621,"t":"code","b":[105,240],"m":"adc","o":"#$F0"},{"a":39623,"t":"code","b":[133,112],"m":"sta","oa":112,"o":"tmp_p"},{"a":39625,"t":"code","b":[165,113],"m":"lda","oa":113,"o":"tmp_q"},{"a":39627,"t":"code","b":[105,0],"m":"adc","o":"#$00"},{"a":39629,"t":"code","b":[133,113],"m":"sta","oa":113,"o":"tmp_q"},{"a":39631,"t":"code","b":[198,116],"m":"dec","oa":116,"o":"tmp_t"},{"a":39633,"t":"code","b":[208,229],"m":"bne","oa":39608,"o":"b_9AB8"},{"a":39635,"t":"code","b":[162,40],"m":"ldx","o":"#$28"},{"a":39637,"l":"b_9AD5","t":"code","b":[138],"m":"txa","x":[39644]},{"a":39638,"t":"code","b":[157,152,127],"m":"sta","oa":32664,"o":"f_7F98,x"},{"a":39641,"t":"code","b":[232],"m":"inx"},{"a":39642,"t":"code","b":[224,80],"m":"cpx","o":"#$50"},{"a":39644,"t":"code","b":[208,247],"m":"bne","oa":39637,"o":"b_9AD5"},{"a":39646,"t":"code","b":[169,0],"m":"lda","o":"#$00"},{"a":39648,"t":"code","b":[141,232,127],"m":"sta","oa":32744,"o":"a_7FE8"},{"a":39651,"t":"code","b":[96],"m":"rts"},{"a":39652,"l":"fill_colour_ram","c":"Fill all of colour RAM, $D800-$DBFF, with A. Called by set_video_mode and from $8674.","t":"code","b":[162,0],"m":"ldx","o":"#$00","x":[34420,39544,39588]},{"a":39654,"l":"b_9AE6","t":"code","b":[157,0,216],"m":"sta","o":"colour_ram,x","x":[39667]},{"a":39657,"t":"code","b":[157,0,217],"m":"sta","o":"$D900,x"},{"a":39660,"t":"code","b":[157,0,218],"m":"sta","o":"$DA00,x"},{"a":39663,"t":"code","b":[157,0,219],"m":"sta","o":"$DB00,x"},{"a":39666,"t":"code","b":[202],"m":"dex"},{"a":39667,"t":"code","b":[208,241],"m":"bne","oa":39654,"o":"b_9AE6"},{"a":39669,"t":"code","b":[96],"m":"rts"},{"a":39670,"l":"video_mode_flag","c":"Display mode: bit 7 set = the play view (character sets with band interrupts), clear = a bitmap screen. Written only by set_video_mode; read by play_irq ($95FA, zero = one interrupt a frame and no band switching), $283D and $866D (whether colour RAM gets the multicolour bit). $00 in the hand-over image, $80 in play.","t":"byte","b":[0],"x":[10301,34413,38394,39505]},{"a":39671,"t":"gap","n":425},{"a":39671,"t":"note","c":"Not used: $9AF7-$9C02 hold a regular $FF $FF $00 $00 pattern, its phase changing at $9B00, with stray values at $9AFC and $9B7E ($BF) and $9BFC ($40), like untouched RAM; no instruction found anywhere in the image refers to these addresses.","note":"outside the tracked image"},{"a":39939,"t":"note","c":"Not used by the game: $9C03-$9C9F is a piece of the BBC BASIC interpreter. BRK, error number 19 and 'String too long' with its closing zero ($9C03-$9C14), then the code that raises it: string concatenation through BASIC's string buffer at $0600 (BCS $9C03 at $9C27 when the combined length passes 255) and 32-bit integer addition on $2A-$2D, with calls to $8C0E-$BDCB. Its absolute jumps land on instruction boundaries of the other fragments (JSR $9DD1 at $9C42 and $9C8E, JSR $9DCE at $9C53), which fits the pieces sitting at the addresses the interpreter runs from. Nothing in the game refers to them.","note":"outside the tracked image"},{"a":40096,"l":"obj_point_first","c":"First point number of each object type, 11 bytes, read at $8480 with X = the type ($4C): 0, 29, 51, 68, 76, 94, 124, 136, 144, 152, then 160 to close the list. In the BBC program the types are robot, sentry, tree, boulder, meanie, the Sentinel, its tower and three blocks of the large 3D title text. Identical to the BBC table (BBC $49A0, moved +$5300).","t":"byte","b":[0],"x":[33920]},{"a":40097,"l":"obj_point_end","c":"The point table read one entry on ($847B): the first point of the next type, where type X's points stop: 29, 51, 68, 76, 94, 124, 136, 144, 152, 160.","t":"byte","b":[29,51,68,76,94,124,136,144],"x":[33915]},{"a":40105,"t":"byte","b":[152,160]},{"a":40107,"l":"obj_polygon_first","c":"First polygon number of each object type, read at $8576: 0, 27, 52, 67, 77, 102, 137, 148, 152, 156, then 160. For polygon n the drawing code reads a data byte at $A1A0 + n ($857B) and finds the point list through the address tables $A2E0/$A420 + n. Identical to the BBC table.","t":"byte","b":[0],"x":[34166]},{"a":40108,"l":"obj_polygon_end","c":"The polygon table read one entry on ($8571): where type X's polygons stop: 27, 52, 67, 77, 102, 137, 148, 152, 156, 160.","t":"byte","b":[27,52,67,77,102,137,148,152],"x":[34161]},{"a":40116,"t":"byte","b":[156,160]},{"a":40118,"l":"obj_polygon_phases","c":"How each object type is drawn, read at $854D: 0 = one pass (types 2, 3, 6-9); 3 = two passes chosen by the object's height relative to the viewer ($0C5C/$0C5B; types 0, 1, 5); 2 = two passes chosen by the object's yaw ($5A; type 4). The eleventh byte ($9CC0) is 0 and unused. Identical to the BBC table.","t":"byte","b":[3,3,0,0,2,3,0,0],"x":[34125]},{"a":40126,"t":"byte","b":[0,0,0]},{"a":40129,"l":"unused_sights_stash","c":"Not read or written by any code found: 12 bytes where the BBC version kept the low bytes of the screen addresses under its drawn sights (BBC $49C1). The first five are $00 as in the BBC binary; the last seven, $04 $E5 $2A $85 $2A $C8 $B1, differ and read as more BASIC interpreter code (SBC $2A, STA $2A, INY, LDA (..),Y).","t":"byte","b":[0,0,0,0,0,4,229,42]},{"a":40137,"t":"byte","b":[133,42,200,177]},{"a":40141,"l":"meanie_polygons","c":"Point lists of the meanie's polygons 77-89, found through the polygon address tables at $A2E0 (low) and $A420 (high) rather than by direct reference. Each byte is $40 plus a point number counted from the meanie's first point, 76, and each list ends by repeating its first point: polygon 77 is $47 $4C $4B $46 $47, points 83, 88, 87, 82 and back to 83. Identical to the BBC data (BBC $49CD).","t":"byte","b":[71,76,75,70,71,64,69,66]},{"a":40149,"t":"byte","b":[64,65,68,64,65,64,68,67]},{"a":40157,"t":"byte","b":[64,64,67,69,64,66,69,68]},{"a":40165,"t":"byte","b":[65,66,69,70,73,69,68,72]},{"a":40173,"t":"byte","b":[71,68,69,73,72,68,69,67]},{"a":40181,"t":"byte","b":[70,69,67,68,71,67,68,67]},{"a":40189,"t":"byte","b":[71,70,67,75,74,70,75]},{"a":40196,"l":"meanie_polygons_90","c":"Point lists of the meanie's polygons 90-101, in the same form as at $9CCD: polygon 90 is $47 $4D $4C $47; polygon 101, $4F $51 $50 $4E $4F, ends the block at $9D36. The highest byte used, $51, is point 93, the meanie's last.","t":"byte","b":[71,77,76,71,75,78,74,75]},{"a":40204,"t":"byte","b":[76,77,79,76,76,79,78,75]},{"a":40212,"t":"byte","b":[76,70,74,73,70,71,72,77]},{"a":40220,"t":"byte","b":[71,74,80,73,74,72,81,77]},{"a":40228,"t":"byte","b":[72,74,78,80,74,77,81,79]},{"a":40236,"t":"byte","b":[77,73,80,81,72,73,79,81]},{"a":40244,"t":"byte","b":[80,78,79]},{"a":40247,"l":"enemy_yaw_step","c":"How far each enemy turns at a time, one byte per enemy (X): set at $1586 to $14 (+20) or $EC (-20), picked by the low bit of the number from $31CA, and added to the enemy's yaw $09C0,X at $180D; 20 of the 256 units in a turn is 28.1 degrees. Nine bytes as in the BBC ($9D37-$9D3F). Until a landscape is set up they hold BBC BASIC bytes (see $9D40); in the play snapshot $9D37 = $EC.","t":"byte","b":[212,157,76,14,140,168,240,250],"x":[5510,6157]},{"a":40255,"t":"byte","b":[48]},{"a":40256,"t":"gap","n":160},{"a":40256,"t":"note","c":"Not used by the game: $9D40-$9DDF is more BBC BASIC interpreter code at its own address: 32-bit shift-and-add multiplication on $2A-$2D and $39-$40, and the start of the expression level for '*', '/' and MOD ($9DD4: CPX #$2A, reached by JMP $9DD4 at $9DC8). The BBC version kept a row of its screen buffer here (BBC $4A40).","note":"outside the tracked image"},{"a":40416,"l":"obj_point_yaw","c":"Angle of each object point around its object's vertical axis, 256 to the turn: points 0-50 (robot 0-28, sentry 29-50 in BBC terms). Added to the object's own yaw ($5A) at $848C; the point's distance from the axis is at $A060 + n and its height at $9F20 + n. Identical to the BBC table (BBC $4AE0).","t":"byte","b":[207,49,95,161,217,39,87,169],"x":[33932]},{"a":40424,"t":"byte","b":[203,0,53,85,171,197,59,82]},{"a":40432,"t":"byte","b":[174,0,236,20,99,157,192,64]},{"a":40440,"t":"byte","b":[105,151,33,223,0,218,38,90]},{"a":40448,"t":"byte","b":[166,245,11,64,90,166,192,218]},{"a":40456,"t":"byte","b":[38,90,166,245,11,248,8,226]},{"a":40464,"t":"byte","b":[30,92,164]},{"a":40467,"l":"obj_point_yaw_51","c":"Object point angles continued: points 51-93 (tree 51-67, boulder 68-75, meanie 76-93).","t":"byte","b":[224,32,96,160,224,32,96,160]},{"a":40475,"t":"byte","b":[0,32,64,96,128,160,192,224]},{"a":40483,"t":"byte","b":[0,0,32,64,96,128,160,192]},{"a":40491,"t":"byte","b":[224,0,89,167,128,114,142,225]},{"a":40499,"t":"byte","b":[31,89,167,213,246,10,43,251]},{"a":40507,"t":"byte","b":[5,233,23]},{"a":40510,"l":"obj_point_yaw_94","c":"Object point angles continued: points 94-135 (the Sentinel 94-123, its tower 124-135).","t":"byte","b":[218,38,90,166,218,38,90,166]},{"a":40518,"t":"byte","b":[245,11,64,90,166,192,218,38]},{"a":40526,"t":"byte","b":[90,166,245,11,83,173,248,8]},{"a":40534,"t":"byte","b":[226,30,220,36,102,154,224,32]},{"a":40542,"t":"byte","b":[96,160,212,236,20,44,84,108]},{"a":40550,"t":"byte","b":[148,172]},{"a":40552,"l":"obj_point_yaw_136","c":"Object point angles continued: points 136-159, the three 3D text blocks (136-143, 144-151, 152-159); the table ends at $9E7F.","t":"byte","b":[224,253,131,160,224,253,131,160]},{"a":40560,"t":"byte","b":[3,32,96,125,3,32,96,125]},{"a":40568,"t":"byte","b":[224,32,96,160,224,32,96,160]},{"a":40576,"t":"gap","n":160},{"a":40576,"t":"note","c":"Not used by the game: $9E80-$9F1F is more BBC BASIC interpreter code, apparently number output: hexadecimal digits and a minus sign sent through $A066, and a loop (JMP $9ED1 at $9EDC) that lands on the LDA $30 at $9ED1, an instruction boundary. The BBC version kept another screen-buffer row here (BBC $4B80).","note":"outside the tracked image"},{"a":40736,"l":"obj_point_height","c":"Height of each object point relative to the object's origin: points 0-50. Bits 0-6 are half the size and bit 7 the sign: $84F8 doubles the byte and negates the result through $1009 when bit 7 was set ($F0 gives -224), then adds the object's height relative to the viewer ($0C5B/$0C5C). Identical to the BBC table (BBC $4C20).","t":"byte","b":[240,240,240,240,184,184,184,184],"x":[34040]},{"a":40744,"t":"byte","b":[184,184,184,184,184,146,146,146]},{"a":40752,"t":"byte","b":[146,138,139,139,139,139,8,8]},{"a":40760,"t":"byte","b":[8,8,131,131,149,240,240,240]},{"a":40768,"t":"byte","b":[240,152,152,155,155,155,155,136]},{"a":40776,"t":"byte","b":[136,136,136,136,136,1,1,8]},{"a":40784,"t":"byte","b":[8,5,5]},{"a":40787,"l":"obj_point_height_51","c":"Object point heights continued: points 51-93 (tree, boulder, meanie).","t":"byte","b":[240,240,240,240,200,200,200,200]},{"a":40795,"t":"byte","b":[200,200,200,200,200,200,200,200]},{"a":40803,"t":"byte","b":[120,176,240,176,240,176,240,176]},{"a":40811,"t":"byte","b":[240,240,240,240,188,188,188,138]},{"a":40819,"t":"byte","b":[138,1,1,136,142,142,136,133]},{"a":40827,"t":"byte","b":[133,6,6]},{"a":40830,"l":"obj_point_height_94","c":"Object point heights continued: points 94-135 (the Sentinel and its tower).","t":"byte","b":[240,240,240,240,224,224,224,224]},{"a":40838,"t":"byte","b":[136,136,139,139,139,139,8,8]},{"a":40846,"t":"byte","b":[5,5,8,8,2,2,17,17]},{"a":40854,"t":"byte","b":[24,24,39,39,39,39,240,240]},{"a":40862,"t":"byte","b":[240,240,16,16,16,16,16,16]},{"a":40870,"t":"byte","b":[16,16]},{"a":40872,"l":"obj_point_height_136","c":"Object point heights continued: points 136-159 (the 3D text blocks); the table ends at $9FBF.","t":"byte","b":[240,240,240,240,112,112,112,112]},{"a":40880,"t":"byte","b":[240,240,240,240,112,112,112,112]},{"a":40888,"t":"byte","b":[240,240,240,240,112,112,112,112]},{"a":40896,"t":"gap","n":64},{"a":40896,"t":"note","c":"Not used by the game: from $9FC0 on past $A000 is BBC BASIC interpreter code at its own address, more of its number printing ('0' and '.' sent through $A066). The BBC version kept another screen-buffer row here (BBC $4CC0).","note":"outside the tracked image"},{"a":40960,"l":"basic_leftover_a000","c":"Not the game's: 96 bytes of BBC BASIC's own code, at the address the BASIC ROM occupies on a BBC Micro, left in a gap between the game's tables. They are the tail of BASIC's number-to-text routine: it strips trailing zeros and a trailing point from the digits in BASIC's string buffer ($0600, length in $36), then appends 'E', a minus sign and the exponent's digits (split off by the divide-by-ten loop at $A052). No instruction in the game refers to $A000-$A05F and the bytes are the same at the hand-over and in play. The BBC original keeps a screen-buffer row at the matching place (this address minus $5300).","t":"byte","b":[164,54,136,185,0,6,201,48]},{"a":40968,"t":"byte","b":[240,248,201,46,240,1,200,132]},{"a":40976,"t":"byte","b":[54,165,73,240,42,169,69,32]},{"a":40984,"t":"byte","b":[102,160,165,73,16,10,169,45]},{"a":40992,"t":"byte","b":[32,102,160,56,169,0,229,73]},{"a":41000,"t":"byte","b":[32,82,160,165,55,240,16,169]},{"a":41008,"t":"byte","b":[32,164,73,48,3,32,102,160]},{"a":41016,"t":"byte","b":[224,0,208,3,76,102,160,96]},{"a":41024,"t":"byte","b":[165,49,74,74,74,74,32,100]},{"a":41032,"t":"byte","b":[160,165,49,41,15,133,49,76]},{"a":41040,"t":"byte","b":[151,161,162,255,56,232,233,10]},{"a":41048,"t":"byte","b":[176,251,105,10,72,138,240,3]},{"a":41056,"l":"obj_point_distance","c":"Object shapes: the distance of each shape point from its object's vertical axis, one byte per point for points 0-159 of the ten object types (each type's first point is in the table at $9CA0; the point's yaw is at $9DE0 and its height at $9F20, same index). $8494 and $84C9 multiply the distance by the sine and cosine ($0F70, $0D03) of the point's yaw plus the object's, giving the point's offsets across the ground. Type names follow the BBC reconstruction; the C64's energy table at $214F agrees for the robot (3 units), tree (1) and boulder (2). This label: the robot, object type 0, points 0-28, distances 0 to 56. The whole table is byte for byte the BBC original's.","t":"byte","b":[20,20,27,27,31,31,35,35],"x":[33940,33993]},{"a":41064,"t":"byte","b":[42,32,42,48,48,52,52,56]},{"a":41072,"t":"byte","b":[56,0,19,19,29,29,12,12]},{"a":41080,"t":"byte","b":[19,19,28,28,32]},{"a":41085,"l":"obj_point_distance_sentry","c":"Point distances (format at $A060) for the sentry, object type 1: points 29-50, 22 bytes, distances 31 to 64.","t":"byte","b":[42,42,42,42,50,50,54,42]},{"a":41093,"t":"byte","b":[42,54,34,34,34,34,64,64]},{"a":41101,"t":"byte","b":[63,63,34,34,31,31]},{"a":41107,"l":"obj_point_distance_tree","c":"Point distances (format at $A060) for the tree, object type 2: points 51-67, 17 bytes, distances 0 to 104.","t":"byte","b":[24,24,24,24,24,24,24,24]},{"a":41115,"t":"byte","b":[104,104,104,104,104,104,104,104]},{"a":41123,"t":"byte","b":[0]},{"a":41124,"l":"obj_point_distance_boulder","c":"Point distances (format at $A060) for the boulder, object type 3: points 68-75, all eight at distance 112.","t":"byte","b":[112,112,112,112,112,112,112,112]},{"a":41132,"l":"obj_point_distance_meanie","c":"Point distances (format at $A060) for the meanie, object type 4: points 76-93, 18 bytes, distances 12 to 68.","t":"byte","b":[52,68,68,26,41,41,12,12]},{"a":41140,"t":"byte","b":[23,23,46,54,54,46,58,58]},{"a":41148,"t":"byte","b":[34,34]},{"a":41150,"l":"obj_point_distance_sentinel","c":"Point distances (format at $A060) for the Sentinel, object type 5: points 94-123, 30 bytes, distances 19 to 70.","t":"byte","b":[56,56,56,56,42,42,42,42]},{"a":41158,"t":"byte","b":[50,50,54,42,42,54,34,34]},{"a":41166,"t":"byte","b":[34,34,64,64,70,70,63,63]},{"a":41174,"t":"byte","b":[34,34,19,19,24,24]},{"a":41180,"l":"obj_point_distance_tower","c":"Point distances (format at $A060) for the Sentinel's tower, object type 6: points 124-135, 12 bytes, distances 145 to 181.","t":"byte","b":[181,181,181,181,145,145,145,145]},{"a":41188,"t":"byte","b":[145,145,145,145]},{"a":41192,"l":"obj_point_distance_text","c":"Point distances (format at $A060) for the three 3D text blocks, object types 7, 8 and 9: points 136-143, 144-151 and 152-159, eight each, distances 136 to 192.","t":"byte","b":[192,136,136,192,192,136,136,192]},{"a":41200,"t":"byte","b":[136,192,192,136,136,192,192,136]},{"a":41208,"t":"byte","b":[192,192,192,192,192,192,192,192]},{"a":41216,"l":"basic_leftover_a100","c":"Not the game's: 160 bytes of BBC BASIC at its ROM address, between the point distances and the polygon data. They belong to BASIC's reader for decimal numbers: a loop that scales by ten once per step of the decimal exponent in $49 ($A102-$A11E), a reader for an exponent's sign and one or two digits taken from the program text through ($19),Y ($A140-$A177), and a five-byte mantissa add ($A178). Nothing in the game refers to $A100-$A19F; the BBC original has screen-buffer row 12 at the matching place.","t":"byte","b":[3,163,165,73,48,11,240,16]},{"a":41224,"t":"byte","b":[32,244,161,198,73,208,249,240]},{"a":41232,"t":"byte","b":[7,32,77,162,230,73,208,249]},{"a":41240,"t":"byte","b":[32,92,166,56,169,255,96,165]},{"a":41248,"t":"byte","b":[50,133,45,41,128,5,49,208]},{"a":41256,"t":"byte","b":[204,165,53,133,42,165,52,133]},{"a":41264,"t":"byte","b":[43,165,51,133,44,169,64,56]},{"a":41272,"t":"byte","b":[96,32,75,161,73,255,56,96]},{"a":41280,"t":"byte","b":[200,177,25,201,45,240,242,201]},{"a":41288,"t":"byte","b":[43,208,3,200,177,25,201,58]},{"a":41296,"t":"byte","b":[176,34,233,47,144,30,133,74]},{"a":41304,"t":"byte","b":[200,177,25,201,58,176,17,233]},{"a":41312,"t":"byte","b":[47,144,13,200,133,67,165,74]},{"a":41320,"t":"byte","b":[10,10,101,74,10,101,67,96]},{"a":41328,"t":"byte","b":[165,74,24,96,169,0,24,96]},{"a":41336,"t":"byte","b":[165,53,101,66,133,53,165,52]},{"a":41344,"t":"byte","b":[101,65,133,52,165,51,101,64]},{"a":41352,"t":"byte","b":[133,51,165,50,101,63,133,50]},{"a":41360,"t":"byte","b":[165,49,101,62,133,49,96,72]},{"a":41368,"t":"byte","b":[166,52,165,49,72,165,50,72]},{"a":41376,"l":"obj_polygon_data","c":"Object shapes: one byte per polygon for polygons 0-159 of the ten object types (each type's first polygon is in the table at $9CAB). Bits 0-1: number of sides less three ($858E; only triangles and quadrilaterals occur). Bits 2-3: fill colour, bits 4-5: edge colour ($8587 passes both to the polygon drawer in $19; $22E2 swaps the edge colour for the fill colour when the object's distance byte $7D is $0F or more, the flag set at $8536). Bit 6: always clear. Bit 7: which of the two passes draws the polygon, for the types that are drawn in two ($8582, the type's setting at $9CB6). This label: the robot, polygons 0-26, 12 triangles and 15 quadrilaterals, 16 in the second pass. Byte for byte the BBC original's table.","t":"byte","b":[21,20,21,153,153,165,165,145],"x":[34171,34187]},{"a":41384,"t":"byte","b":[145,153,144,144,148,148,144,144]},{"a":41392,"t":"byte","b":[156,156,144,21,60,60,25,25]},{"a":41400,"t":"byte","b":[21,21,61]},{"a":41403,"l":"obj_polygon_data_sentry","c":"Polygon data (bits as at $A1A0) for the sentry, object type 1: polygons 27-51, 12 triangles and 13 quadrilaterals, 16 of them in the second pass.","t":"byte","b":[149,148,148,149,168,168,168,168]},{"a":41411,"t":"byte","b":[168,169,168,168,149,168,148,148]},{"a":41419,"t":"byte","b":[21,21,41,41,21,29,29,29]},{"a":41427,"t":"byte","b":[29]},{"a":41428,"l":"obj_polygon_data_tree","c":"Polygon data (bits as at $A1A0) for the tree, object type 2: polygons 52-66, 8 triangles and 7 quadrilaterals, all drawn in one pass.","t":"byte","b":[21,21,21,21,25,25,21,24]},{"a":41436,"t":"byte","b":[28,24,28,24,28,24,28]},{"a":41443,"l":"obj_polygon_data_boulder","c":"Polygon data (bits as at $A1A0) for the boulder, object type 3: polygons 67-76, 8 triangles and 2 quadrilaterals, one pass.","t":"byte","b":[20,20,20,20,24,24,24,24]},{"a":41451,"t":"byte","b":[21,21]},{"a":41453,"l":"obj_polygon_data_meanie","c":"Polygon data (bits as at $A1A0) for the meanie, object type 4: polygons 77-101, 19 triangles and 6 quadrilaterals, 3 of them in the second pass.","t":"byte","b":[21,40,40,28,28,53,188,188]},{"a":41461,"t":"byte","b":[185,20,20,24,24,24,20,20]},{"a":41469,"t":"byte","b":[61,24,24,20,20,60,60,53]},{"a":41477,"t":"byte","b":[53]},{"a":41478,"l":"obj_polygon_data_sentinel","c":"Polygon data (bits as at $A1A0) for the Sentinel, object type 5: polygons 102-136, 16 triangles and 19 quadrilaterals, 21 of them in the second pass.","t":"byte","b":[21,20,20,149,169,149,149,149]},{"a":41486,"t":"byte","b":[149,148,148,149,168,168,168,168]},{"a":41494,"t":"byte","b":[168,168,169,148,148,188,188,149]},{"a":41502,"t":"byte","b":[21,21,20,20,29,29,29,29]},{"a":41510,"t":"byte","b":[21,41,41]},{"a":41513,"l":"obj_polygon_data_tower","c":"Polygon data (bits as at $A1A0) for the Sentinel's tower, object type 6: polygons 137-147, 4 triangles and 7 quadrilaterals, one pass.","t":"byte","b":[21,41,21,41,60,60,60,60]},{"a":41521,"t":"byte","b":[61,61,61]},{"a":41524,"l":"obj_polygon_data_text","c":"Polygon data (bits as at $A1A0) for the three 3D text blocks, object types 7-9: polygons 148-159, four quadrilaterals per block.","t":"byte","b":[21,21,41,61,21,21,41,61]},{"a":41532,"t":"byte","b":[21,21,41,61]},{"a":41536,"l":"basic_leftover_a240","c":"Not the game's: 160 bytes of BBC BASIC at its ROM address, between the polygon data and the low bytes of the polygon list addresses. Most of it is a floating-point divide by ten ($A24D: it takes 4 from the exponent in $30, then scales the mantissa with a chain of shifts and adds), after the tail of a mantissa shift ($A242: LSR $3E, then ROR $3F to $42). Nothing in the game refers to $A240-$A2DF; the BBC original has screen-buffer row 13 at the matching place.","t":"byte","b":[30,162,70,62,102,63,102,64]},{"a":41544,"t":"byte","b":[102,65,102,66,96,56,165,48]},{"a":41552,"t":"byte","b":[233,4,133,48,176,2,198,47]},{"a":41560,"t":"byte","b":[32,63,162,32,8,162,32,63]},{"a":41568,"t":"byte","b":[162,32,66,162,32,66,162,32]},{"a":41576,"t":"byte","b":[66,162,32,8,162,169,0,133]},{"a":41584,"t":"byte","b":[62,165,49,133,63,165,50,133]},{"a":41592,"t":"byte","b":[64,165,51,133,65,165,52,133]},{"a":41600,"t":"byte","b":[66,165,53,42,32,8,162,169]},{"a":41608,"t":"byte","b":[0,133,62,133,63,165,49,133]},{"a":41616,"t":"byte","b":[64,165,50,133,65,165,51,133]},{"a":41624,"t":"byte","b":[66,165,52,42,32,8,162,165]},{"a":41632,"t":"byte","b":[50,42,165,49,101,53,133,53]},{"a":41640,"t":"byte","b":[144,19,230,52,208,15,230,51]},{"a":41648,"t":"byte","b":[208,11,230,50,208,7,230,49]},{"a":41656,"t":"byte","b":[208,3,76,11,162,96,162,0]},{"a":41664,"t":"byte","b":[134,53,134,47,165,45,16,5]},{"a":41672,"t":"byte","b":[32,147,173,162,255,134,46,165]},{"a":41680,"t":"byte","b":[42,133,52,165,43,133,51,165]},{"a":41688,"t":"byte","b":[44,133,50,165,45,133,49,169]},{"a":41696,"l":"obj_polygon_list_lo","c":"Object shapes: low bytes of the address of each polygon's point list, polygons 0-159. The high bytes are 320 bytes on, at $A420; the BASIC leftover at $A380 lies between the halves. $8595 and $859A load the pair into $3C/$3D for the polygon drawer at $2AA9. The lists are at $A560-$A79F for every type but the meanie, whose lists are at $9CCD-$9D36. This label: the robot, polygons 0-26, lists at $A6B4-$A72E. Same bytes as the BBC original's, since the lists moved by a whole number of pages.","t":"byte","b":[180,185,189,194,199,204,209,214],"x":[34197]},{"a":41704,"t":"byte","b":[219,224,229,233,237,241,245,249]},{"a":41712,"t":"byte","b":[253,1,5,9,14,18,22,27]},{"a":41720,"t":"byte","b":[32,37,42]},{"a":41723,"l":"obj_polygon_list_lo_sentry","c":"Polygon list addresses, low bytes (see $A2E0), for the sentry: polygons 27-51, lists at $A72F-$A79F.","t":"byte","b":[47,52,56,60,65,69,73,77]},{"a":41731,"t":"byte","b":[81,85,90,94,98,103,107,111]},{"a":41739,"t":"byte","b":[115,120,125,130,135,140,145,150]},{"a":41747,"t":"byte","b":[155]},{"a":41748,"l":"obj_polygon_list_lo_tree","c":"Polygon list addresses, low bytes (see $A2E0), for the tree: polygons 52-66, lists at $A600-$A642.","t":"byte","b":[0,5,10,15,20,25,30,35]},{"a":41756,"t":"byte","b":[39,43,47,51,55,59,63]},{"a":41763,"l":"obj_polygon_list_lo_boulder","c":"Polygon list addresses, low bytes (see $A2E0), for the boulder: polygons 67-76, lists at $A643-$A66C.","t":"byte","b":[67,71,75,79,83,87,91,95]},{"a":41771,"t":"byte","b":[99,104]},{"a":41773,"l":"obj_polygon_list_lo_meanie","c":"Polygon list addresses, low bytes (see $A2E0), for the meanie: polygons 77-101, lists at $9CCD-$9D36.","t":"byte","b":[205,210,214,218,222,226,231,235]},{"a":41781,"t":"byte","b":[239,244,248,252,0,4,8,12]},{"a":41789,"t":"byte","b":[16,21,25,29,33,37,41,45]},{"a":41797,"t":"byte","b":[50]},{"a":41798,"l":"obj_polygon_list_lo_sentinel","c":"Polygon list addresses, low bytes (see $A2E0), for the Sentinel: polygons 102-136, lists at $A560-$A5FE.","t":"byte","b":[96,101,105,109,114,119,124,129]},{"a":41806,"t":"byte","b":[134,139,143,147,152,156,160,164]},{"a":41814,"t":"byte","b":[168,172,176,181,185,189,193,197]},{"a":41822,"t":"byte","b":[202,207,212,216,220,225,230,235]},{"a":41830,"t":"byte","b":[240,245,250]},{"a":41833,"l":"obj_polygon_list_lo_tower","c":"Polygon list addresses, low bytes (see $A2E0), for the Sentinel's tower: polygons 137-147, lists at $A66D-$A69F.","t":"byte","b":[109,114,119,124,129,133,137,141]},{"a":41841,"t":"byte","b":[145,150,155]},{"a":41844,"l":"obj_polygon_list_lo_text","c":"Polygon list addresses, low bytes (see $A2E0), for the three 3D text blocks: polygons 148-159, each block's four pointing at the same four lists at $A6A0-$A6B3.","t":"byte","b":[160,165,170,175,160,165,170,175]},{"a":41852,"t":"byte","b":[160,165,170,175]},{"a":41856,"l":"basic_leftover_a380","c":"Not the game's: 160 bytes of BBC BASIC at its ROM address, between the two halves of the polygon list address table. They include BASIC's store of its floating-point accumulator as a five-byte number at $046C or $0476 ($A381) and the reverse, loading one through the pointer in $4B/$4C into the accumulator ($A3B5). Nothing in the game refers to $A380-$A41F; the BBC original has screen-buffer row 14 at the matching place.","t":"byte","b":[6,169,118,208,2,169,108,133]},{"a":41864,"t":"byte","b":[75,169,4,133,76,160,0,165]},{"a":41872,"t":"byte","b":[48,145,75,200,165,46,41,128]},{"a":41880,"t":"byte","b":[133,46,165,49,41,127,5,46]},{"a":41888,"t":"byte","b":[145,75,165,50,200,145,75,165]},{"a":41896,"t":"byte","b":[51,200,145,75,165,52,200,145]},{"a":41904,"t":"byte","b":[75,96,32,245,167,160,4,177]},{"a":41912,"t":"byte","b":[75,133,52,136,177,75,133,51]},{"a":41920,"t":"byte","b":[136,177,75,133,50,136,177,75]},{"a":41928,"t":"byte","b":[133,46,136,177,75,133,48,132]},{"a":41936,"t":"byte","b":[53,132,47,5,46,5,50,5]},{"a":41944,"t":"byte","b":[51,5,52,240,4,165,46,9]},{"a":41952,"t":"byte","b":[128,133,49,96,32,254,163,165]},{"a":41960,"t":"byte","b":[49,133,45,165,50,133,44,165]},{"a":41968,"t":"byte","b":[51,133,43,165,52,133,42,96]},{"a":41976,"t":"byte","b":[32,30,162,76,134,166,165,48]},{"a":41984,"t":"byte","b":[16,246,32,83,164,32,218,161]},{"a":41992,"t":"byte","b":[208,50,240,92,165,48,201,160]},{"a":42000,"t":"byte","b":[176,84,201,153,176,38,105,8]},{"a":42008,"t":"byte","b":[133,48,165,64,133,65,165,63]},{"a":42016,"l":"obj_polygon_list_hi","c":"Object shapes: high bytes of the polygon point-list addresses, polygons 0-159 (low bytes at $A2E0). Each is the BBC original's value plus $53, the lists having moved up by $5300: $A5, $A6 or $A7 for the lists at $A560-$A79F, $9C or $9D for the meanie's. This label: the robot, polygons 0-26, $A6 and $A7.","t":"byte","b":[166,166,166,166,166,166,166,166],"x":[34202]},{"a":42024,"t":"byte","b":[166,166,166,166,166,166,166,166]},{"a":42032,"t":"byte","b":[166,167,167,167,167,167,167,167]},{"a":42040,"t":"byte","b":[167,167,167]},{"a":42043,"l":"obj_polygon_list_hi_sentry","c":"Polygon list addresses, high bytes (see $A420), for the sentry: polygons 27-51, all $A7.","t":"byte","b":[167,167,167,167,167,167,167,167]},{"a":42051,"t":"byte","b":[167,167,167,167,167,167,167,167]},{"a":42059,"t":"byte","b":[167,167,167,167,167,167,167,167]},{"a":42067,"t":"byte","b":[167]},{"a":42068,"l":"obj_polygon_list_hi_tree","c":"Polygon list addresses, high bytes (see $A420), for the tree: polygons 52-66, all $A6.","t":"byte","b":[166,166,166,166,166,166,166,166]},{"a":42076,"t":"byte","b":[166,166,166,166,166,166,166]},{"a":42083,"l":"obj_polygon_list_hi_boulder","c":"Polygon list addresses, high bytes (see $A420), for the boulder: polygons 67-76, all $A6.","t":"byte","b":[166,166,166,166,166,166,166,166]},{"a":42091,"t":"byte","b":[166,166]},{"a":42093,"l":"obj_polygon_list_hi_meanie","c":"Polygon list addresses, high bytes (see $A420), for the meanie: polygons 77-101, $9C and $9D.","t":"byte","b":[156,156,156,156,156,156,156,156]},{"a":42101,"t":"byte","b":[156,156,156,156,157,157,157,157]},{"a":42109,"t":"byte","b":[157,157,157,157,157,157,157,157]},{"a":42117,"t":"byte","b":[157]},{"a":42118,"l":"obj_polygon_list_hi_sentinel","c":"Polygon list addresses, high bytes (see $A420), for the Sentinel: polygons 102-136, all $A5.","t":"byte","b":[165,165,165,165,165,165,165,165]},{"a":42126,"t":"byte","b":[165,165,165,165,165,165,165,165]},{"a":42134,"t":"byte","b":[165,165,165,165,165,165,165,165]},{"a":42142,"t":"byte","b":[165,165,165,165,165,165,165,165]},{"a":42150,"t":"byte","b":[165,165,165]},{"a":42153,"l":"obj_polygon_list_hi_tower","c":"Polygon list addresses, high bytes (see $A420), for the Sentinel's tower: polygons 137-147, all $A6.","t":"byte","b":[166,166,166,166,166,166,166,166]},{"a":42161,"t":"byte","b":[166,166,166]},{"a":42164,"l":"obj_polygon_list_hi_text","c":"Polygon list addresses, high bytes (see $A420), for the three 3D text blocks: polygons 148-159, all $A6.","t":"byte","b":[166,166,166,166,166,166,166,166]},{"a":42172,"t":"byte","b":[166,166,166,166]},{"a":42176,"l":"basic_leftover_a4c0","c":"Not the game's: 160 bytes of BBC BASIC at its ROM address, between the polygon list addresses and the Sentinel's polygon lists: part of BASIC's floating-point arithmetic, with short entries that chain its routines ($A4C7, $A4D0), a copy of the second operand ($3B-$42) into the accumulator ($2E-$35) at $A4D6, and the start of another routine at $A4FD. Nothing in the game refers to $A4C0-$A55F; the BBC original has screen-buffer row 15 at the matching place.","t":"byte","b":[208,4,230,49,240,138,96,32]},{"a":42184,"t":"byte","b":[108,164,32,182,164,76,108,164]},{"a":42192,"t":"byte","b":[32,253,164,76,126,173,32,78]},{"a":42200,"t":"byte","b":[163,32,141,163,165,59,133,46]},{"a":42208,"t":"byte","b":[165,60,133,47,165,61,133,48]},{"a":42216,"t":"byte","b":[165,62,133,49,165,63,133,50]},{"a":42224,"t":"byte","b":[165,64,133,51,165,65,133,52]},{"a":42232,"t":"byte","b":[165,66,133,53,96,32,126,173]},{"a":42240,"t":"byte","b":[32,78,163,240,247,32,11,165]},{"a":42248,"t":"byte","b":[76,92,166,32,218,161,240,204]},{"a":42256,"t":"byte","b":[160,0,56,165,48,229,61,240]},{"a":42264,"t":"byte","b":[119,144,55,201,37,176,221,72]},{"a":42272,"t":"byte","b":[41,56,240,25,74,74,74,170]},{"a":42280,"t":"byte","b":[165,65,133,66,165,64,133,65]},{"a":42288,"t":"byte","b":[165,63,133,64,165,62,133,63]},{"a":42296,"t":"byte","b":[132,62,202,208,235,104,41,7]},{"a":42304,"t":"byte","b":[240,78,170,70,62,102,63,102]},{"a":42312,"t":"byte","b":[64,102,65,102,66,202,208,243]},{"a":42320,"t":"byte","b":[240,62,56,165,61,229,48,201]},{"a":42328,"t":"byte","b":[37,176,129,72,41,56,240,25]},{"a":42336,"l":"obj_sentinel_polygons","c":"Object shapes, polygon point lists: each polygon lists its corners in order and repeats the first to close it (sides + 1 bytes). An entry is 64 + the point's number within its object, because the object's points are projected into the drawing tables from entry 64 on ($8477, $84E0), and the polygon drawer uses the entry directly as that index ($2D99). Lists for the Sentinel, object type 5 (points 94-123), run from here to $A5FE; this label: polygons 102-115.","t":"byte","b":[84,80,81,85,84,81,78,85]},{"a":42344,"t":"byte","b":[81,84,79,80,84,79,83,82]},{"a":42352,"t":"byte","b":[78,79,67,71,70,66,67,64]},{"a":42360,"t":"byte","b":[68,71,67,64,66,70,69,65]},{"a":42368,"t":"byte","b":[66,65,69,68,64,65,71,76]},{"a":42376,"t":"byte","b":[75,70,71,68,77,71,68,70]},{"a":42384,"t":"byte","b":[74,69,70,69,73,72,68,69]},{"a":42392,"t":"byte","b":[71,77,76,71,70,75,74,70]},{"a":42400,"l":"obj_sentinel_polygons_2","c":"Point lists (format at $A560) for the Sentinel: polygons 116-129.","t":"byte","b":[68,72,77,68,69,74,73,69]},{"a":42408,"t":"byte","b":[77,81,76,77,75,80,74,75]},{"a":42416,"t":"byte","b":[76,81,80,75,76,77,78,81]},{"a":42424,"t":"byte","b":[77,74,80,79,74,72,78,77]},{"a":42432,"t":"byte","b":[72,73,74,79,73,73,79,78]},{"a":42440,"t":"byte","b":[72,73,89,91,90,88,89,85]},{"a":42448,"t":"byte","b":[93,92,84,85,78,88,85,78]},{"a":42456,"t":"byte","b":[84,89,79,84]},{"a":42460,"l":"obj_sentinel_polygons_3","c":"Point lists (format at $A560) for the Sentinel: polygons 130-136, ending at $A5FE. The byte at $A5FF after them is a spare that no polygon address points at ($3E here, $10 at the BBC original's matching place).","t":"byte","b":[82,86,88,78,82,79,89,87]},{"a":42468,"t":"byte","b":[83,79,87,89,88,86,87,83]},{"a":42476,"t":"byte","b":[87,86,82,83,91,92,93,90]},{"a":42484,"t":"byte","b":[91,88,90,93,85,88,84,92]},{"a":42492,"t":"byte","b":[91,89,84,62]},{"a":42496,"l":"obj_tree_polygons","c":"Point lists (format at $A560) for the tree, object type 2 (points 51-67): polygons 52-58.","t":"byte","b":[72,79,78,73,72,73,78,77]},{"a":42504,"t":"byte","b":[74,73,74,77,76,75,74,65]},{"a":42512,"t":"byte","b":[69,68,64,65,66,70,69,65]},{"a":42520,"t":"byte","b":[66,64,68,71,67,64,67,71]},{"a":42528,"t":"byte","b":[70,66,67]},{"a":42531,"l":"obj_tree_polygons_2","c":"Point lists (format at $A560) for the tree: polygons 59-66, ending at $A642.","t":"byte","b":[72,80,79,72,73,80,72,73]},{"a":42539,"t":"byte","b":[74,80,73,74,75,80,74,75]},{"a":42547,"t":"byte","b":[76,80,75,76,77,80,76,77]},{"a":42555,"t":"byte","b":[78,80,77,78,79,80,78,79]},{"a":42563,"l":"obj_boulder_polygons","c":"Point lists (format at $A560) for the boulder, object type 3 (points 68-75): polygons 67-76.","t":"byte","b":[65,64,71,65,67,66,65,67]},{"a":42571,"t":"byte","b":[69,68,67,69,71,70,69,71]},{"a":42579,"t":"byte","b":[65,66,64,65,67,68,66,67]},{"a":42587,"t":"byte","b":[69,70,68,69,71,64,70,71]},{"a":42595,"t":"byte","b":[65,71,69,67,65,64,66,68]},{"a":42603,"t":"byte","b":[70,64]},{"a":42605,"l":"obj_tower_polygons","c":"Point lists (format at $A560) for the Sentinel's tower, object type 6 (points 124-135): polygons 137-147.","t":"byte","b":[65,70,69,64,65,66,72,71]},{"a":42613,"t":"byte","b":[65,66,67,74,73,66,67,64]},{"a":42621,"t":"byte","b":[68,75,67,64,64,69,68,64]},{"a":42629,"t":"byte","b":[65,71,70,65,66,73,72,66]},{"a":42637,"t":"byte","b":[67,75,74,67,70,71,72,73]},{"a":42645,"t":"byte","b":[70,70,73,74,69,70,69,74]},{"a":42653,"t":"byte","b":[75,68,69]},{"a":42656,"l":"obj_text_block_polygons","c":"Point lists (format at $A560) shared by the three 3D text blocks, object types 7-9: four quadrilaterals over entries 64-71 (a block's eight points), used alike for polygons 148-151, 152-155 and 156-159, since each entry counts from its own object's first point.","t":"byte","b":[64,68,71,67,64,66,70,69]},{"a":42664,"t":"byte","b":[65,66,65,69,68,64,65,69]},{"a":42672,"t":"byte","b":[70,71,68,69]},{"a":42676,"l":"obj_robot_polygons","c":"Point lists (format at $A560) for the robot, object type 0 (points 0-28): polygons 0-12.","t":"byte","b":[75,74,72,76,75,74,73,72]},{"a":42684,"t":"byte","b":[74,84,83,82,85,84,64,68]},{"a":42692,"t":"byte","b":[71,67,64,66,70,69,65,66]},{"a":42700,"t":"byte","b":[67,71,70,66,67,65,69,68]},{"a":42708,"t":"byte","b":[64,65,72,77,80,76,72,75]},{"a":42716,"t":"byte","b":[79,78,74,75,76,80,79,75]},{"a":42724,"t":"byte","b":[76,74,92,73,74,73,92,72]},{"a":42732,"t":"byte","b":[73,74,78,92,74]},{"a":42737,"l":"obj_robot_polygons_2","c":"Point lists (format at $A560) for the robot: polygons 13-26, ending at $A72E.","t":"byte","b":[72,92,77,72,78,81,92,78]},{"a":42745,"t":"byte","b":[92,81,77,92,79,81,78,79]},{"a":42753,"t":"byte","b":[77,81,80,77,80,81,79,80]},{"a":42761,"t":"byte","b":[83,90,91,82,83,82,91,85]},{"a":42769,"t":"byte","b":[82,84,90,83,84,91,86,89]},{"a":42777,"t":"byte","b":[85,91,84,88,87,90,84,85]},{"a":42785,"t":"byte","b":[89,88,84,85,87,88,89,86]},{"a":42793,"t":"byte","b":[87,90,87,86,91,90]},{"a":42799,"l":"obj_sentry_polygons","c":"Point lists (format at $A560) for the sentry, object type 1 (points 29-50): polygons 27-39.","t":"byte","b":[67,72,71,66,67,64,73,67]},{"a":42807,"t":"byte","b":[64,66,70,65,66,65,69,68]},{"a":42815,"t":"byte","b":[64,65,67,73,72,67,66,71]},{"a":42823,"t":"byte","b":[70,66,65,70,69,65,64,68]},{"a":42831,"t":"byte","b":[73,64,73,77,72,73,72,77]},{"a":42839,"t":"byte","b":[76,71,72,71,76,70,71,70]},{"a":42847,"t":"byte","b":[75,69,70,69,75,74,68,69]},{"a":42855,"l":"obj_sentry_polygons_2","c":"Point lists (format at $A560) for the sentry: polygons 40-51, ending at $A79F.","t":"byte","b":[68,74,73,68,73,74,77,73]},{"a":42863,"t":"byte","b":[70,76,75,70,75,79,78,74]},{"a":42871,"t":"byte","b":[75,77,85,84,76,77,74,82]},{"a":42879,"t":"byte","b":[85,77,74,76,84,83,75,76]},{"a":42887,"t":"byte","b":[83,84,85,82,83,81,83,82]},{"a":42895,"t":"byte","b":[80,81,78,80,82,74,78,75]},{"a":42903,"t":"byte","b":[83,81,79,75,79,81,80,78]},{"a":42911,"t":"byte","b":[79]},{"a":42912,"l":"point_screen_x_lo","c":"Run-time buffer, 96 bytes to $A7FF, one byte per drawing-table entry: the low byte of the screen x-coordinate of each corner of the polygon being drawn, worked out at $2D99-$2DEC as the corner's yaw ($0BA0 low, $A800 high, plus the offset in $29/$11) divided by 32, the high byte going to $0B40. The edge tracer reads it ($2E79, $2ECC, $3008, $3049, $30A6). Entries 0-63 are tile corners (two rows of 32), 64-95 the points of the object being drawn. What the image holds here is stale: BBC BASIC's SQR routine ($A7B4, whose BMI at $A7BC reaches the error block at $A7A9: BRK, error 21, '-ve root') and noise. Play overwrites it.","t":"byte","b":[133,50,165,67,133,49,76,89],"x":[11698,11756,11897,11902,11980,12296,12300,12361,12454]},{"a":42920,"t":"byte","b":[166,0,21,45,118,101,32,114]},{"a":42928,"t":"byte","b":[111,111,116,0,32,250,146,32]},{"a":42936,"t":"byte","b":[218,161,240,42,48,235,32,133]},{"a":42944,"t":"byte","b":[163,165,48,74,105,64,133,48]},{"a":42952,"t":"byte","b":[169,5,133,74,32,237,167,32]},{"a":42960,"t":"byte","b":[141,163,169,108,133,75,32,173]},{"a":42968,"t":"byte","b":[166,169,113,133,75,32,0,165]},{"a":42976,"l":"point_screen_x_lo_objects","c":"Entries 64-95 of the screen x low bytes (see $A7A0): the points of the object being drawn. Stale in the image; $A7E8-$A7FD hold the same 22 bytes as the BBC original's workspace at the matching place.","t":"byte","b":[93,91,91,92,93,91,91,92]},{"a":42984,"t":"byte","b":[178,185,178,164,167,168,163,154]},{"a":42992,"t":"byte","b":[156,165,159,153,151,172,158,154]},{"a":43000,"t":"byte","b":[162,154,161,157,159,163,32,250]},{"a":43008,"l":"point_yaw_hi","c":"Run-time buffer, 96 bytes to $A85F: the high byte of the yaw angle, measured from the left edge of the view, of each drawing-table entry (low bytes at $0BA0, pitch at $0A80 and $0AE0). Entries 0-31 and 32-63 hold the corners of two neighbouring rows of tiles, the drawing code swapping halves after each row (it flips the offset in $05 by 32 at $26E0); entries 64-95 hold the points of the object being drawn ($84F0). In play the tile corners are copied from the cache at $BC00-$CBFF ($385D), otherwise computed at $289D. Stale values in the image.","t":"byte","b":[2],"x":[10175,10397,10556,10572,11684,11738,14429,14476,14492,34032]},{"a":43009,"l":"point_yaw_hi_plus1","c":"point_yaw_hi + 1, the next corner along a row. Written directly only at $27C7, which sets the right-hand corners of the tile the player stands on to 20, the right edge of the view, so that tile fills the bottom of the screen (its left corners get $FF, far left, at $27BF and $27BC).","t":"byte","b":[2,3,3,4,4,5,6,6],"x":[10183]},{"a":43017,"t":"byte","b":[7,7,8,8,9,9,10,10]},{"a":43025,"t":"byte","b":[11,11,12,12,13,13,14,14]},{"a":43033,"t":"byte","b":[14,15,15,16,16,17,17]},{"a":43040,"l":"point_yaw_hi_row_b","c":"point_yaw_hi + 32: the second half of the tile-corner entries, the other row of the pair (entries 32-63). $27BC puts $FF (far left) here for the left corner of the player's own tile.","t":"byte","b":[2],"x":[10172]},{"a":43041,"l":"point_yaw_hi_row_b_plus1","c":"point_yaw_hi + 33: the next corner in the second half; $27C4 puts 20 (the right edge of the view) here for the player's own tile.","t":"byte","b":[2,3,3,4,5,5,6,6],"x":[10180]},{"a":43049,"t":"byte","b":[7,7,8,8,9,9,10,10]},{"a":43057,"t":"byte","b":[11,11,12,12,13,13,14,14]},{"a":43065,"t":"byte","b":[15,15,16,16,17,17,17]},{"a":43072,"l":"point_yaw_hi_objects","c":"Entries 64-95 of the yaw high bytes (see $A800): the points of the object being drawn, stored from $84F0 as $8475 works through the object's points. Stale in the image.","t":"byte","b":[1,1,1,1,1,1,1,1]},{"a":43080,"t":"byte","b":[20,21,20,18,18,19,18,17]},{"a":43088,"t":"byte","b":[17,18,17,17,16,19,17,17]},{"a":43096,"t":"byte","b":[18,17,18,17,17,18,86,166]},{"a":43104,"l":"basic_leftover_a860","c":"Not the game's: 484 bytes of BBC BASIC at its ROM address, in the place where the BBC original has the maths routines the C64 moved to $9280-$9463. They hold BASIC's logarithm constants in its five-byte float form (log10 e = $7F $5E $5B $D8 $AA at $A869, ln 2 = $80 $31 $72 $17 $F8 at $A86E, then a series), its series evaluator ($A897) and the range reduction for SIN and COS ($A9D3), whose BCS at $A9D7 lands on the error block at $AA38: BRK, error 23, 'Accuracy l', cut short by the game's code at $AA44 (BASIC's message is 'Accuracy lost'). Nothing in the game refers to $A860-$AA43.","t":"byte","b":[32,245,167,32,0,165,169,255]},{"a":43112,"t":"byte","b":[96,127,94,91,216,170,128,49]},{"a":43120,"t":"byte","b":[114,23,248,6,122,18,56,165]},{"a":43128,"t":"byte","b":[11,136,121,14,159,243,124,42]},{"a":43136,"t":"byte","b":[172,63,181,134,52,1,162,122]},{"a":43144,"t":"byte","b":[127,99,142,55,236,130,63,255]},{"a":43152,"t":"byte","b":[255,193,127,255,255,255,255,133]},{"a":43160,"t":"byte","b":[77,132,78,32,133,163,160,0]},{"a":43168,"t":"byte","b":[177,77,133,72,230,77,208,2]},{"a":43176,"t":"byte","b":[230,78,165,77,133,75,165,78]},{"a":43184,"t":"byte","b":[133,76,32,181,163,32,245,167]},{"a":43192,"t":"byte","b":[32,173,166,24,165,77,105,5]},{"a":43200,"t":"byte","b":[133,77,133,75,165,78,105,0]},{"a":43208,"t":"byte","b":[133,78,133,76,32,0,165,198]},{"a":43216,"t":"byte","b":[72,208,226,96,32,218,168,76]},{"a":43224,"t":"byte","b":[39,169,32,250,146,32,218,161]},{"a":43232,"t":"byte","b":[16,8,70,46,32,234,168,76]},{"a":43240,"t":"byte","b":[22,169,32,129,163,32,177,169]},{"a":43248,"t":"byte","b":[32,218,161,240,9,32,241,167]},{"a":43256,"t":"byte","b":[32,173,166,76,10,169,32,85]},{"a":43264,"t":"byte","b":[170,32,181,163,169,255,96,32]},{"a":43272,"t":"byte","b":[250,146,32,218,161,240,245,16]},{"a":43280,"t":"byte","b":[10,70,46,32,27,169,169,128]},{"a":43288,"t":"byte","b":[133,46,96,165,48,201,129,144]},{"a":43296,"t":"byte","b":[21,32,165,166,32,54,169,32]},{"a":43304,"t":"byte","b":[72,170,32,0,165,32,76,170]},{"a":43312,"t":"byte","b":[32,0,165,76,126,173,165,48]},{"a":43320,"t":"byte","b":[201,115,144,200,32,129,163,32]},{"a":43328,"t":"byte","b":[83,164,169,128,133,61,133,62]},{"a":43336,"t":"byte","b":[133,59,32,5,165,169,90,160]},{"a":43344,"t":"byte","b":[169,32,151,168,32,209,170,169]},{"a":43352,"t":"byte","b":[255,96,9,133,163,89,232,103]},{"a":43360,"t":"byte","b":[128,28,157,7,54,128,87,187]},{"a":43368,"t":"byte","b":[120,223,128,202,154,14,131,132]},{"a":43376,"t":"byte","b":[140,187,202,110,129,149,150,6]},{"a":43384,"t":"byte","b":[222,129,10,199,108,82,127,125]},{"a":43392,"t":"byte","b":[173,144,161,130,251,98,87,47]},{"a":43400,"t":"byte","b":[128,109,99,56,44,32,250,146]},{"a":43408,"t":"byte","b":[32,211,169,230,74,76,158,169]},{"a":43416,"t":"byte","b":[32,250,146,32,211,169,165,74]},{"a":43424,"t":"byte","b":[41,2,240,6,32,170,169,76]},{"a":43432,"t":"byte","b":[126,173,70,74,144,21,32,195]},{"a":43440,"t":"byte","b":[169,32,133,163,32,86,166,32]},{"a":43448,"t":"byte","b":[141,163,32,153,166,32,208,164]},{"a":43456,"t":"byte","b":[76,183,167,32,129,163,32,86]},{"a":43464,"t":"byte","b":[166,169,114,160,170,32,151,168]},{"a":43472,"t":"byte","b":[76,209,170,165,48,201,152,176]},{"a":43480,"t":"byte","b":[95,32,133,163,32,85,170,32]},{"a":43488,"t":"byte","b":[78,163,165,46,133,59,198,61]},{"a":43496,"t":"byte","b":[32,5,165,32,231,166,32,254]},{"a":43504,"t":"byte","b":[163,165,52,133,74,5,51,5]},{"a":43512,"t":"byte","b":[50,5,49,240,56,169,160,133]},{"a":43520,"t":"byte","b":[48,160,0,132,53,165,49,133]},{"a":43528,"t":"byte","b":[46,16,3,32,108,164,32,3]},{"a":43536,"t":"byte","b":[163,32,125,163,32,72,170,32]},{"a":43544,"t":"byte","b":[86,166,32,245,167,32,0,165]},{"a":43552,"t":"byte","b":[32,141,163,32,237,167,32,181]},{"a":43560,"t":"byte","b":[163,32,76,170,32,86,166,32]},{"a":43568,"t":"byte","b":[245,167,76,0,165,76,178,163]},{"a":43576,"t":"byte","b":[0,23,65,99,99,117,114,97]},{"a":43584,"t":"byte","b":[99,121,32,108]},{"a":43588,"l":"print_char_shadowed","c":"Print the character in A with a drop shadow, as on the title and prompt screens. If bit 7 of $0C0F is set, or A is not $20-$7E, A goes straight to OSWRCH ($FFEE, the C64's copy at $8A6B). Otherwise A is written into the shadow sequence at $AA96 (front) and $AAA1 (rear), and the 23 bytes $AAAC down to $AA96 go to OSWRCH, last byte first; X is kept. Reached from $3201 (the end of a digit printer that prints 0 as the letter O) and from $AA6E. The BBC original's instructions, only the addresses moved.","t":"code","b":[44,15,12],"m":"bit","oa":3087,"o":"text_shadow_off","x":[12801,43630]},{"a":43591,"t":"code","b":[48,30],"m":"bmi","oa":43623,"o":"b_AA67"},{"a":43593,"t":"code","b":[201,32],"m":"cmp","o":"#$20"},{"a":43595,"t":"code","b":[144,26],"m":"bcc","oa":43623,"o":"b_AA67"},{"a":43597,"t":"code","b":[201,127],"m":"cmp","o":"#$7F"},{"a":43599,"t":"code","b":[176,22],"m":"bcs","oa":43623,"o":"b_AA67"},{"a":43601,"t":"code","b":[141,150,170],"m":"sta","oa":43670,"o":"shadow_front_char"},{"a":43604,"t":"code","b":[141,161,170],"m":"sta","oa":43681,"o":"shadow_rear_char"},{"a":43607,"t":"code","b":[138],"m":"txa"},{"a":43608,"t":"code","b":[72],"m":"pha"},{"a":43609,"t":"code","b":[162,22],"m":"ldx","o":"#$16"},{"a":43611,"l":"b_AA5B","t":"code","b":[189,150,170],"m":"lda","oa":43670,"o":"shadow_front_char,x","x":[43618]},{"a":43614,"t":"code","b":[32,238,255],"m":"jsr","oa":65518,"o":"oswrch_jmp"},{"a":43617,"t":"code","b":[202],"m":"dex"},{"a":43618,"t":"code","b":[16,247],"m":"bpl","oa":43611,"o":"b_AA5B"},{"a":43620,"t":"code","b":[104],"m":"pla"},{"a":43621,"t":"code","b":[170],"m":"tax"},{"a":43622,"t":"code","b":[96],"m":"rts"},{"a":43623,"l":"b_AA67","t":"code","b":[76,238,255],"m":"jmp","oa":65518,"o":"oswrch_jmp","x":[43591,43595,43599]},{"a":43626,"l":"print_token_byte","c":"Print one byte of a text token (from $3418, for every token byte below $C8). A PLOT code ($19) goes to OSWRCH with the next five bytes of the token, fetched from $AA96+Y onwards (Y is the token printer's index, left on the last byte), counted down in $AA83 from 6. Any other byte goes to $AA44. No C64 token contains a PLOT any more (the BBC original's tokens 7-9 and 12 did), so that branch goes unused.","t":"code","b":[201,25],"m":"cmp","o":"#$19","x":[13336]},{"a":43628,"t":"code","b":[240,7],"m":"beq","oa":43637,"o":"b_AA75"},{"a":43630,"t":"code","b":[76,68,170],"m":"jmp","oa":43588,"o":"print_char_shadowed"},{"a":43633,"l":"b_AA71","t":"code","b":[200],"m":"iny","x":[43643]},{"a":43634,"t":"code","b":[185,150,170],"m":"lda","oa":43670,"o":"shadow_front_char,y"},{"a":43637,"l":"b_AA75","t":"code","b":[32,238,255],"m":"jsr","oa":65518,"o":"oswrch_jmp","x":[43628]},{"a":43640,"t":"code","b":[206,131,170],"m":"dec","oa":43651,"o":"plot_bytes_left"},{"a":43643,"t":"code","b":[208,244],"m":"bne","oa":43633,"o":"b_AA71"},{"a":43645,"t":"code","b":[169,6],"m":"lda","o":"#$06"},{"a":43647,"t":"code","b":[141,131,170],"m":"sta","oa":43651,"o":"plot_bytes_left"},{"a":43650,"t":"code","b":[96],"m":"rts"},{"a":43651,"l":"plot_bytes_left","c":"Bytes of a PLOT still to send, for $AA6A: 6 at rest ($19 and five parameters), counted down per byte and set back to 6 at the end. With no PLOT in the C64's tokens it stays 6.","t":"byte","b":[6],"x":[43640,43647]},{"a":43652,"l":"token_offsets","c":"Text tokens: 18 offsets; token n's text starts at $AA96 plus the n-th byte. Read by the token printer $8617, which $3414 also calls for a token byte of $C8+n inside another token. Offsets $17-$AC put the tokens at $AAAD-$AB42. Identical to the BBC original's table: the tokens the C64 changed were padded to their old lengths.","t":"byte","b":[23,29,48,57,78,87,93,96],"x":[34327]},{"a":43660,"t":"byte","b":[103,110,117,122,127,134,144,162]},{"a":43668,"t":"byte","b":[168,172]},{"a":43670,"l":"shadow_front_char","c":"Drop-shadow VDU sequence, 23 bytes to $AAAC, sent last byte first by $AA44; its start is also the base of the token offsets at $AA84. In the order sent: a space and a DEL (127), PLOT 0,0,-4 (graphics cursor 4 units down), GCOL 0 with the rear colour ($AAA2), the rear character ($AAA1), a backspace, PLOT 0,0,4 (back up), GCOL 0 with the front colour ($AA97), and this byte, the front character. $AA51 writes the character here before each use; the '?' in the image, like its twin at $AAA1, is the last character printed before the backup was made. The C64's OSWRCH at $8A6B interprets the BBC VDU codes.","t":"byte","b":[63],"x":[34330,43601,43611,43634]},{"a":43671,"l":"shadow_front_colour","c":"Colour byte of the GCOL sent just before the front character; $13B6 sets it (A EOR 3) when a screen is set up. With $AA98-$AAA0 it makes the front half of the shadow sequence, read backwards: backspace, PLOT 0,0,4, GCOL 0 and this colour.","t":"byte","b":[2,0,18,0,4,0,0,0],"x":[5046]},{"a":43679,"t":"byte","b":[25,8]},{"a":43681,"l":"shadow_rear_char","c":"The rear (shadow) character of the sequence, written at $AA54 along with $AA96 before each character.","t":"byte","b":[63],"x":[43604]},{"a":43682,"l":"shadow_rear_colour","c":"Colour byte of the GCOL sent before the rear character: $13BC sets it to 2, or to 3 when the front colour is not 0. With $AAA3-$AAAC it makes the start of the sequence, read backwards: space, DEL, PLOT 0,0,-4, GCOL 0 and this colour.","t":"byte","b":[3,0,18,255,252,0,0,0],"x":[5052]},{"a":43690,"t":"byte","b":[25,127,32]},{"a":43693,"l":"tok0_title_press_any_key","c":"Text token 0 (byte $C8), printed on the title screen at $1027: token 10 (text at the graphics cursor, graphics background colour 0), token 12 (TAB(1,21)), token 17 ('PRESS ANY KEY'), then COLOUR 129 (text background colour 1). Every token ends with $FF.","t":"byte","b":[210,212,217,17,129,255]},{"a":43699,"l":"tok1_landscape_number","c":"Text token 1 ($C9), printed at $1037 to ask for a landscape: TAB(1,21) and thirteen spaces (tokens 12, 15, 15, 16) to wipe the prompt row, TAB(1,2) and 'LANDSCAPE' (tokens 7, 13), ' NUMBER?', VDU 4 (text back at the text cursor) and TAB(5,21) for the typed digits. The BBC original puts the digits on row 27.","t":"byte","b":[212,215,215,216,207,213,32,78]},{"a":43707,"t":"byte","b":[85,77,66,69,82,63,4,31]},{"a":43715,"t":"byte","b":[5,21,255]},{"a":43718,"l":"tok2_secret_code_prompt","c":"Text token 2 ($CA), printed at $105F to ask for a secret code: token 10, TAB(1,2), 'SECRET ENTRY CODE' (token 14), '?', VDU 4 and TAB(3,21) for the eight digits. The BBC original puts them on row 27.","t":"byte","b":[210,207,214,63,4,31,3,21]},{"a":43726,"t":"byte","b":[255]},{"a":43727,"l":"tok3_wrong_secret_code","c":"Text token 3 ($CB), printed at $1081 after a wrong code: token 10, TAB(1,2), 'WRONG SECRET CODE', then token 0 (PRESS ANY KEY).","t":"byte","b":[210,207,87,82,79,78,71,32]},{"a":43735,"t":"byte","b":[83,69,67,82,69,84,32,67]},{"a":43743,"t":"byte","b":[79,68,69,200,255]},{"a":43748,"l":"tok4_preview_caption","c":"Text token 4 ($CC), printed at $8864 over the landscape preview: token 11 (text at the graphics cursor, graphics background colour 1), TAB(3,24), 'PRESS ANY KEY', TAB(1,2), two VDU 9 (cursor right), 'LANDSCAPE' and one more VDU 9, after which the landscape's number is printed.","t":"byte","b":[211,209,217,207,9,9,213,9]},{"a":43756,"t":"byte","b":[255]},{"a":43757,"l":"tok5_next_code_caption","c":"Text token 5 ($CD), printed at $1AA8 on the screen that shows the next landscape's secret code: TAB(1,2) 'SECRET ENTRY CODE', TAB(3,4) 'LANDSCAPE', VDU 9.","t":"byte","b":[207,214,208,213,9,255]},{"a":43763,"l":"tok6_press_any_key","c":"Text token 6 ($CE), printed at $3632 when a landscape has been finished: TAB(1,21) 'PRESS ANY KEY'.","t":"byte","b":[212,217,255]},{"a":43766,"l":"tok7_tab_1_2","c":"Text token 7 ($CF): TAB(1,2), the heading row, then $FF and three zero bytes never printed. The BBC original's token 7 is a six-byte PLOT moving the graphics cursor to (64,768); the C64 uses a text TAB and pads the token to the old length, so the offsets at $AA84 stayed as they were.","t":"byte","b":[31,1,2,255,0,0,0]},{"a":43773,"l":"tok8_tab_3_4","c":"Text token 8 ($D0): TAB(3,4), $FF and three zero pad bytes; the BBC original moves the graphics cursor to (192,704) here.","t":"byte","b":[31,3,4,255,0,0,0]},{"a":43780,"l":"tok9_tab_3_24","c":"Text token 9 ($D1): TAB(3,24), $FF and three zero pad bytes; the BBC original moves the graphics cursor to (192,64) here.","t":"byte","b":[31,3,24,255,0,0,0]},{"a":43787,"l":"tok10_vdu5_gcol_128","c":"Text token 10 ($D2): VDU 5 (text drawn at the graphics cursor) and GCOL 0,128 (graphics background colour 0).","t":"byte","b":[5,18,0,128,255]},{"a":43792,"l":"tok11_vdu5_gcol_129","c":"Text token 11 ($D3): VDU 5 and GCOL 0,129 (graphics background colour 1).","t":"byte","b":[5,18,0,129,255]},{"a":43797,"l":"tok12_tab_1_21","c":"Text token 12 ($D4): TAB(1,21), the prompt row, then $FF and three zero pad bytes; the BBC original moves the graphics cursor to (64,160) here.","t":"byte","b":[31,1,21,255,0,0,0]},{"a":43804,"l":"tok13_landscape","c":"Text token 13 ($D5): 'LANDSCAPE'.","t":"byte","b":[76,65,78,68,83,67,65,80]},{"a":43812,"t":"byte","b":[69,255]},{"a":43814,"l":"tok14_secret_entry_code","c":"Text token 14 ($D6): 'SECRET ENTRY CODE'.","t":"byte","b":[83,69,67,82,69,84,32,69]},{"a":43822,"t":"byte","b":[78,84,82,89,32,67,79,68]},{"a":43830,"t":"byte","b":[69,255]},{"a":43832,"l":"tok15_five_spaces","c":"Text token 15 ($D7): five spaces.","t":"byte","b":[32,32,32,32,32,255]},{"a":43838,"l":"tok16_three_spaces","c":"Text token 16 ($D8): three spaces.","t":"byte","b":[32,32,32,255]},{"a":43842,"l":"tok17_press_any_key_text","c":"Text token 17 ($D9): 'PRESS ANY KEY', the last token; the music follows.","t":"byte","b":[80,82,69,83,83,32,65,78]},{"a":43850,"t":"byte","b":[89,32,75,69,89,255]},{"a":43856,"l":"music_hyperspace","c":"Music: four tunes, read by the player at $34DE from $AB50 plus the offset $888F is given (0, 25, 50 or 66). A byte of $C8 or more sets the wait after each following note to (byte - $C8) x 4 ticks of the counter $0CDF, which the interrupt counts down at $9630; any other byte is a note, pitch in quarter-semitones (the scale of the table at $9033/$9133), played as sound 3 ($AC18) on the next of the three voices in turn; $FF ends the tune. Notes with no wait between them sound together as a chord. Offset 0, this label: the hyperspace tune (started at $2181 in the hyperspace routine), five chords 8+36+36, 20+48+48, 28+56+56, 0+28+28, 8+36+36, 24 ticks apart, the last left to ring. Byte for byte the BBC original's music.","t":"byte","b":[200,8,36,206,36,200,20,48],"x":[13542]},{"a":43864,"t":"byte","b":[206,48,200,28,56,206,56,200]},{"a":43872,"t":"byte","b":[0,28,206,28,200,8,36,36]},{"a":43880,"t":"byte","b":[255]},{"a":43881,"l":"music_transfer","c":"Music offset 25: the tune for transferring into another robot (started at $1B84): five chords 8+36+36, 20+48+48, 16+44+44, 0+28+28, 8+36+36, 24 ticks apart; only its third chord differs from the hyperspace tune's.","t":"byte","b":[200,8,36,206,36,200,20,48]},{"a":43889,"t":"byte","b":[206,48,200,16,44,206,44,200]},{"a":43897,"t":"byte","b":[0,28,206,28,200,8,36,36]},{"a":43905,"t":"byte","b":[255]},{"a":43906,"l":"music_game_over","c":"Music offset 50: the game-over tune (started at $87F6): single notes 8, 36, 64 and 68 sixteen ticks apart, 84 held for 60 ticks, then 104, 84, 68, 64 and 36 four ticks apart and a closing 8.","t":"byte","b":[204,8,36,64,68,215,84,201]},{"a":43914,"t":"byte","b":[104,84,68,64,36,212,8,255]},{"a":43922,"l":"music_landscape_done","c":"Music offset 66: the tune for finishing a landscape (started at $3627): six three-note chords, 8+36+36, 0+28+28, 28+56+56, 20+48+48, 16+28+28 and 8+36+36, their notes 4 ticks apart, the first five held for 48, 20, 24, 28 and 36 ticks and the last left to ring.","t":"byte","b":[201,8,36,212,36,201,0,28]},{"a":43930,"t":"byte","b":[205,28,201,28,56,206,56,201]},{"a":43938,"t":"byte","b":[20,48,207,48,201,16,28,209]},{"a":43946,"t":"byte","b":[28,201,8,36,36,255]},{"a":43952,"l":"icon_chars_blank_robot","c":"Energy icons and scanner frame: ten multicolour character shapes, 8 bytes each, copied by $98E8 into characters 240-249 of all five play character sets ($4780, $4F80, $5780, $5F80, $6780) and put on the top screen row by $9508 as character 240 + n. This label: character 240, the empty cell of the icon row (every pixel colour 1), and 241, the robot icon worth 3 units ($9536). The C64's own shapes: the BBC original keeps icon bitmaps in its own screen format here.","t":"byte","b":[85,85,85,85,85,85,85,85],"x":[39146]},{"a":43960,"t":"byte","b":[125,85,0,20,65,65,85,85]},{"a":43968,"l":"icon_chars_tree","c":"Characters 242 and 243, side by side the tree icon, 1 unit of energy (placed at $9547-$954E for a remainder of 1).","t":"byte","b":[93,93,110,110,238,89,85,85]},{"a":43976,"t":"byte","b":[85,85,85,85,213,85,85,85]},{"a":43984,"l":"icon_chars_boulder","c":"Characters 244 and 245, side by side the boulder icon, 2 units of energy (a remainder of 2).","t":"byte","b":[85,85,106,166,149,149,85,85]},{"a":43992,"t":"byte","b":[85,85,85,149,149,149,85,85]},{"a":44000,"l":"icon_char_gold_robot","c":"Character 246, the gold robot icon, worth 15 units ($951F).","t":"byte","b":[125,85,255,215,125,125,85,85]},{"a":44008,"l":"icon_chars_scanner","c":"Characters 247, 248 and 249, the scanner box on the top row: 247 at column 29 (a line down its right side), 248 repeated to column 37 (lines along its top and bottom), 249 at column 38 (a line down its left side), placed at $955D-$9570.","t":"byte","b":[86,86,86,86,86,86,85,85]},{"a":44016,"t":"byte","b":[170,85,85,85,85,170,85,85]},{"a":44024,"t":"byte","b":[149,149,149,149,149,149,85,85]},{"a":44032,"l":"sound_enemy_turn","c":"Sound blocks: seven 8-byte blocks, sound n at $AC00 + 8n, handed to OSWORD 7 by $3470 (X = low byte, Y = $AC). The C64 uses its own block format, read by its OSWORD handler at $8DB4: voice (0-2); SID control byte (waveform and gate); attack/decay; sustain/release (its low nybble also picks a release time from $8EC1); note, looked up in $9033/$9133; bits 0-3 the pulse width's high nybble, and with bit 7 set the frequency halved (bits 4-6) + 1 times; duration in ticks of $8ED1 ($80 or more: not timed out); offset of a pitch effect at $AC40 ($80: none). Sound 0, this block: an enemy turning, played at $181D after its yaw changes: voice 0, noise, attack/decay $94, note 48 three octaves down, 12 ticks. The BBC original's sound data here is in BBC SOUND and ENVELOPE form.","t":"byte","b":[0,129,148,0,48,168,12,128]},{"a":44040,"l":"sound_meanie_turn","c":"Sound 1 (format at $AC00): a meanie turning, played at $1750: voice 0, pulse wave (pulse width high nybble 1), attack/decay $94, note 30 three octaves down, 12 ticks. The BBC original passes two pitches for sounds 0 and 1; the C64 plays both blocks as they stand.","t":"byte","b":[0,65,148,0,30,161,12,128]},{"a":44048,"l":"sound_create_absorb","c":"Sound 2 (format at $AC00): creating or absorbing, played at $12EE: voice 0, noise, attack/decay $DF, sustain/release $E0, note 100, duration $FF, so it is not timed out and lasts until OSBYTE 21 stops the voice ($8F81) or another sound takes it.","t":"byte","b":[0,129,223,224,100,8,255,128]},{"a":44056,"l":"sound_music_note","c":"Sound 3 (format at $AC00): the music's notes. For every note the player at $34DE writes the pitch to $AC1C and moves byte 0, the voice, on by one, 0 to 2 in turn ($3504-$3510); $888F starts a tune on voice 1. Sawtooth, attack/decay $0B, sustain/release $2B, 62 ticks, pitch effect 0 ($AC40).","t":"byte","b":[1,33,11,43],"x":[13572,13584,34969]},{"a":44060,"l":"sound_music_pitch","c":"Note byte of sound 3: the pitch of the current music note, written by the player at $34FB.","t":"byte","b":[34,8,62,0],"x":[13563]},{"a":44064,"l":"sound_scanner","c":"Sound 4 (format at $AC00), the scanner sound in the BBC original's naming: played at $3568 when $0C73 is 4, then a 50-tick wait ($0CDF): voice 1, sawtooth, attack/decay $DA, sustain/release $8B, note 34, 20 ticks, pitch effect 7 ($AC47).","t":"byte","b":[1,33,218,139,34,8,20,7]},{"a":44072,"l":"sound_ping","c":"Sound 5 (format at $AC00): the ping, played after the energy icons change ($1A1F), for a volume key ($34B2) and at $1BB0 with a higher note: voice 2, pulse wave, attack/decay $08, note 144 ($AC2C), 20 ticks, pitch effect 14 ($AC4E).","t":"byte","b":[2,65,8,0]},{"a":44076,"l":"sound_ping_pitch","c":"Note byte of sound 5: 144, except that $1BAB sets 170 for the ping at $1BB0 (where the BBC original sounds an action that is not allowed) and $1BB5 puts 144 back.","t":"byte","b":[144,8,20,14],"x":[7083,7093]},{"a":44080,"l":"sound_game_over","c":"Sound 6 (format at $AC00): the game-over sound. The game's end starts it by setting $0C73 to 6: $87C4-$87CB, in the end-of-game screen routine at $87B1, also sets the note in $0C74 to 230, and $35EA does it when a hyperspace has ended the game ($0CDE). Played at $354C: voice 0, noise two octaves down, attack/decay $02, 1 tick.","t":"byte","b":[0,129,2,0]},{"a":44084,"l":"sound_game_over_pitch","c":"Note byte of sound 6, written at $3547 from $0C74, which starts at 230 ($87CB) and drops by one per sound ($355A) while it is 60 or more, so the noise falls in pitch; the gaps between the sounds are 1 to 4 ticks at random ($354F-$3557).","t":"byte","b":[154,152,1,128],"x":[13639]},{"a":44088,"l":"basic_leftover_ac38","c":"Not the game's: 8 bytes of BBC BASIC code (STA $0600,Y then LDA $19 / PHA / LDA $1A: BASIC's string buffer and text pointer) between the last sound block and the pitch effects; no block or effect index reaches them.","t":"byte","b":[153,0,6,165,25,72,165,26]},{"a":44096,"l":"pitch_effect_flutter","c":"Pitch effects: three 7-byte records, copied into the sound handler's own area ($8E62) when a sound block names one in its byte 7 (0, 7 or 14). Byte 0: bit 7 set = run once, clear = repeat; bits 0-1 must match the value passed to $FFC5 ($8F19; the interrupt passes 3 at $963A, so every record runs). Bytes 1-3: the step added to the note in each of three phases (signed, in quarter-semitones); bytes 4-6: how many ticks each phase lasts (0 skips it). $8F0C steps them once a tick. This record, effect 0, for the music (sound 3): +1 for a tick, -1 for a tick, then 8 ticks unchanged, repeating: a flick of the pitch every ten ticks.","t":"byte","b":[2,1,255,0,1,1,8],"x":[36450]},{"a":44103,"l":"pitch_effect_warble","c":"Pitch effect 7 (format at $AC40), for sound 4, the scanner: +6 and -6 on alternate ticks, repeating, so the note warbles between itself and a tone and a half higher.","t":"byte","b":[1,6,250,0,1,1,0]},{"a":44110,"l":"pitch_effect_rise","c":"Pitch effect 14 (format at $AC40), for sound 5, the ping: +1 for two ticks, -1 for one, then 7 ticks unchanged, run once (bit 7 of byte 0), so the ping ends one step above its note.","t":"byte","b":[130,1,255,0,2,1,7]},{"a":44117,"l":"basic_leftover_ac55","c":"Not the game's: 43 bytes of BBC BASIC code between the pitch effects and the sine table, part of BASIC's expression reader: it tests for a '+' sign and moves back the text pointer offset in $1B. Nothing in the game refers to $AC55-$AC7F.","t":"byte","b":[240,15,201,43,208,3,32,140]},{"a":44125,"t":"byte","b":[138,198,27,32,123,160,76,115]},{"a":44133,"t":"byte","b":[172,32,140,138,198,27,32,123]},{"a":44141,"t":"byte","b":[160,144,3,32,143,173,133,39]},{"a":44149,"t":"byte","b":[76,35,172,32,236,173,240,30]},{"a":44157,"t":"byte","b":[16,27,165]},{"a":44160,"l":"sine_table","c":"Sine table, a quarter wave in 128 bytes: entry n is 256 x sin(n x 90/128 degrees), rounded, capped at 255. $0F70 reads the sine and the cosine of an angle at once (entries n and 128 - n, 128 read as 127) into $8E/$8F, swapped according to the quadrant; the caller takes the signs from $67. This label: entries 0-63, 0 to 44.3 degrees, values 0 to 179. Byte for byte the BBC original's.","t":"byte","b":[0,3,6,9,13,16,19,22],"x":[3974,3977]},{"a":44168,"t":"byte","b":[25,28,31,34,38,41,44,47]},{"a":44176,"t":"byte","b":[50,53,56,59,62,65,68,71]},{"a":44184,"t":"byte","b":[74,77,80,83,86,89,92,95]},{"a":44192,"t":"byte","b":[98,101,104,107,109,112,115,118]},{"a":44200,"t":"byte","b":[121,123,126,129,132,134,137,140]},{"a":44208,"t":"byte","b":[142,145,147,150,152,155,157,160]},{"a":44216,"t":"byte","b":[162,165,167,170,172,174,177,179]},{"a":44224,"l":"sine_table_upper","c":"Sine table entries 64-127 (see $AC80): 45 to 89.3 degrees, values 181 to 255; entries 120-127 are all 255, the last five because 256 does not fit in a byte.","t":"byte","b":[181,183,185,188,190,192,194,196]},{"a":44232,"t":"byte","b":[198,200,202,204,206,207,209,211]},{"a":44240,"t":"byte","b":[213,215,216,218,220,221,223,224]},{"a":44248,"t":"byte","b":[226,227,229,230,231,233,234,235]},{"a":44256,"t":"byte","b":[237,238,239,240,241,242,243,244]},{"a":44264,"t":"byte","b":[245,246,247,248,248,249,250,250]},{"a":44272,"t":"byte","b":[251,252,252,253,253,254,254,254]},{"a":44280,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":44288,"l":"polygon_left_x","c":"Run-time workspace, 256 bytes, with two uses. In play: the left x-coordinate of the polygon being filled on each pixel line, indexed by the line ($2EB2, and the edge tracer's self-modified STX at $311F and $317E); the right edges are at $AE00, and $22BA and $237A compare the two. While a landscape is generated: the strip workspace, $2AD1 filling $AD00-$AD50 with 81 numbers from the landscape's seed generator ($31CA) and $2BD5-$2C73 smoothing a strip of tile altitudes in place, with the block list at $AD40. The BBC original uses its $5A00 the same two ways. The image holds bytes left from an earlier run.","t":"byte","b":[0],"x":[8890,9082,9120,10961,11221,11243,11253,11259,11266,11274,11314,11348,11379,11954,12575,12670]},{"a":44289,"l":"strip_tile_next","c":"polygon_left_x + 1: the next tile along a strip, for the smoothing code ($2BE1, $2C13, $2C36).","t":"byte","b":[174],"x":[11233,11283,11318]},{"a":44290,"l":"strip_tile_next2","c":"polygon_left_x + 2: the tile after next along a strip, for the smoothing code ($2BE4, $2BF2, $2C10, $2C3E).","t":"byte","b":[174],"x":[11236,11250,11269,11280,11326]},{"a":44291,"l":"strip_tile_next3","c":"polygon_left_x + 3: the fourth tile of the window that $2C32-$2C54 averages (four neighbouring tiles added and divided by four); the bytes on to $AD2D are more of the strip in generation and more left edges in play.","t":"byte","b":[173,173,173,173,173,173,173,173],"x":[11334]},{"a":44299,"t":"byte","b":[173,172,172,172,172,172,172,172]},{"a":44307,"t":"byte","b":[172,172,172,171,171,171,171,171]},{"a":44315,"t":"byte","b":[171,171,171,171,170,170,170,170]},{"a":44323,"t":"byte","b":[170,170,170,170,170,169,169,169]},{"a":44331,"t":"byte","b":[169,169,169]},{"a":44334,"l":"strip_seed_copy_base","c":"polygon_left_x + 46, used as $AD2E,X with X = 32 at $2C5C: it copies seed byte $AD4E, the 79th of the 81 at $AD00, into the operand of the LDA #0 at $0F3C ($0F3D), as the BBC original does for an anti-cracker check (its CheckCrackerSeed, C64 $322F). Otherwise part of the strip and edge workspace.","t":"byte","b":[169,169,169,168,168,168,168,168],"x":[11356]},{"a":44342,"t":"byte","b":[168,168,168,168,167,167,167,167]},{"a":44350,"t":"byte","b":[167,167]},{"a":44352,"l":"tile_block_list","c":"During landscape generation: a list of numbers of the 4x4 tile blocks whose highest tile is at a given altitude, built at $15A9 and read at $1525 when enemies are placed. In play: more of the left-edge table (see $AD00).","t":"byte","b":[167,167,167,167,166,166,166,166],"x":[5413,5545]},{"a":44360,"t":"byte","b":[166,166,166,166,166,165,165,165]},{"a":44368,"t":"byte","b":[165,165,165,165,165,165,164,164]},{"a":44376,"t":"byte","b":[143,133,156,150,151,151,151,151]},{"a":44384,"t":"byte","b":[151,151,152,152,152,152,152,152]},{"a":44392,"t":"byte","b":[152,152,152,152,152,152,152,91]},{"a":44400,"t":"byte","b":[91,91,91,91,91,91,91,91]},{"a":44408,"t":"byte","b":[91,91,91,91]},{"a":44412,"l":"a_AD7C","c":"Not a fixed reference: $2FAD is a STX whose operand $2F71-$2F74 set at run time, so the address in the image ($AD7C) is only where the last polygon edge was stored. The bytes from here are more of the left-edge table (see $AD00).","t":"byte","b":[91,92,95,105,105,107,111,115],"x":[12205]},{"a":44420,"t":"byte","b":[117,121,124,66,66,68,78,77]},{"a":44428,"t":"byte","b":[77,78,80,90,89,89,90,92]},{"a":44436,"t":"byte","b":[93,95,99,104,103,104,106,111]},{"a":44444,"t":"byte","b":[112,114,119,118,119,120,121,123]},{"a":44452,"t":"byte","b":[124,127,132,131,132,134,135,137]},{"a":44460,"t":"byte","b":[138,140,127,128,130,125,126,128]},{"a":44468,"t":"byte","b":[123,124,126,185,186,188,183,184]},{"a":44476,"t":"gap","n":68},{"a":44544,"l":"polygon_right_x","c":"Run-time workspace, 256 bytes, with two uses. In play: the right x-coordinate of the polygon being filled on each pixel line ($2EB7, and the edge tracer's self-modified STX at $2F5F), compared with the left edges at $AD00 by $22B7 and $2377. While a landscape is generated: the highest altitude in each 4x4 block of tiles at $AE10, and the x and z of that highest tile at $AE60 and $AEA0. The BBC original uses its $5B00 the same way. The image holds bytes left from an earlier run.","t":"byte","b":[255,175,175,175,175,175,176],"x":[8887,9079,11959]},{"a":44551,"l":"block_max_alt_m9","c":"block_max_altitude - 9: one row back and one column left of block X on the 8-wide grid of 4x4 tile blocks; $152A zeroes it when an enemy has been put in block X, so no second enemy lands next to it.","t":"byte","b":[176],"x":[5418]},{"a":44552,"l":"block_max_alt_m8","c":"block_max_altitude - 8: the block one row back from block X, zeroed at $152D with its neighbours.","t":"byte","b":[176],"x":[5421]},{"a":44553,"l":"block_max_alt_m7","c":"block_max_altitude - 7: one row back and one column right of block X, zeroed at $1530; the bytes to $AE0E are more of the right-edge table in play.","t":"byte","b":[176,176,176,176,176,176],"x":[5424]},{"a":44559,"l":"block_max_alt_m1","c":"block_max_altitude - 1: the block to the left of block X, zeroed at $1533.","t":"byte","b":[176],"x":[5427]},{"a":44560,"l":"block_max_altitude","c":"During landscape generation: the highest tile altitude in each 4x4 block of tiles, one byte per block for an 8 by 8 grid ($AE10-$AE4F), found at $15D0-$1610 and read at $15A1; once an enemy is placed in a block, $152A-$1542 zero that block and its eight neighbours (offsets -9 to +9). In play: part of the right-edge table (see $AE00).","t":"byte","b":[176],"x":[5430,5537,5599,5643,5648]},{"a":44561,"l":"block_max_alt_p1","c":"block_max_altitude + 1: the block to the right of block X, zeroed at $1539; the bytes to $AE16 are blocks 1-6 of the table.","t":"byte","b":[176,176,176,176,176,176],"x":[5433]},{"a":44567,"l":"block_max_alt_p7","c":"block_max_altitude + 7: one row on and one column left of block X, zeroed at $153C.","t":"byte","b":[176],"x":[5436]},{"a":44568,"l":"block_max_alt_p8","c":"block_max_altitude + 8: the block one row on from block X, zeroed at $153F.","t":"byte","b":[176],"x":[5439]},{"a":44569,"l":"block_max_alt_p9","c":"block_max_altitude + 9: one row on and one column right of block X, zeroed at $1542; from here to $AE4F is the rest of the 64-block table, and the zeroing can reach 9 bytes past it.","t":"byte","b":[176,176,176,176,176,176,176,176],"x":[5442]},{"a":44577,"t":"byte","b":[176,176,176,176,176,176,176,177]},{"a":44585,"t":"byte","b":[177,177,177,177,177,177,177,177]},{"a":44593,"t":"byte","b":[177,177,177,177,177,177,177,177]},{"a":44601,"t":"byte","b":[177,177,177,177,177,177,177,177]},{"a":44609,"t":"byte","b":[177,177,177,177,177,177,177,177]},{"a":44617,"t":"byte","b":[177,178,178,178,178,178,178,178]},{"a":44625,"t":"byte","b":[178,178,178,178,178,178,178,143]},{"a":44633,"t":"gap","n":7},{"a":44640,"l":"block_max_tile_x","c":"During landscape generation: the tile x-coordinate of the highest tile in each 4x4 block (64 bytes, in the order of $AE10), written at $161B and read at $1545 to put an enemy there. In play: part of the right-edge table (see $AE00).","t":"byte","b":[164,164,164,164,152,152,152,152],"x":[5445,5659]},{"a":44648,"t":"byte","b":[152,152,152,152,152,152,152,91]},{"a":44656,"t":"byte","b":[93,93,93,93,93,93,93]},{"a":44663,"l":"a_AE77","c":"Not a fixed reference: the STX at $2F5F has its operand's low byte ($2F60) counted down at $2F62 as the right-edge tracer works up the polygon, so $AE77 is only where the last trace stopped. The bytes from here are part of the x-coordinate table of $AE60 and of the right-edge table.","t":"byte","b":[93,93,93,93,92,92,92,97],"x":[12127]},{"a":44671,"t":"byte","b":[110,109,109,113,118,118,126,126]},{"a":44679,"t":"byte","b":[70,70,70,83,82,82,81,81]},{"a":44687,"t":"byte","b":[94,93,93,92,92,96,96,100]},{"a":44695,"t":"byte","b":[108,108,107,107,115,115,114,123]},{"a":44703,"t":"byte","b":[122]},{"a":44704,"l":"block_max_tile_z","c":"During landscape generation: the tile z-coordinate of the highest tile in each 4x4 block (64 bytes), written at $1620 and read at $154A. In play: part of the right-edge table (see $AE00).","t":"byte","b":[122,121,121,124,124,127,136,135],"x":[5450,5664]},{"a":44712,"t":"byte","b":[135,134,138,137,141,140,131,130]},{"a":44720,"t":"byte","b":[130,129,129,128,127,127,126,189]},{"a":44728,"t":"byte","b":[189,188,187,187,187,122,122,126]},{"a":44736,"t":"byte","b":[129,121,121,120,120,120,112,119]},{"a":44744,"t":"byte","b":[119,122,118,118,110,117,117,109]},{"a":44752,"t":"byte","b":[116,116,119,122,255,255,0,0]},{"a":44760,"t":"byte","b":[255,255,0,0,255,255,0,0]},{"a":44768,"t":"gap","n":3360},{"a":45062,"t":"note","l":"pan_scroll_step","c":"Missing from this copy ($B000-$B5FF holds a fill pattern; excluded in game.json). Called once per scroll step of a pan from the loop at $3668-$3692, which replaces the BBC original's wait for its interrupt-driven scroll: the interrupt sets bit 7 of $0CD8 each frame while the step counter $0CC1 is not 0 ($964F-$9656), $96A6 moves the view offsets ($94-$96) and counts $0CC1 down ($972A), the raster is checked against line 230 ($3670), then this is called. So it must move the picture for one step; what it moves, and where, is unknown.","note":"outside the tracked image","x":[13948]},{"a":48128,"l":"tile_corner_yaw_lo","c":"Run-time cache, added by the C64 version: the angles at which every one of the 32 x 32 tile corners is seen from the centre of the player's tile. Four 1 KB tables laid out like the tile map at $0400 (corner (x, z) at offset (x AND 3) x 256 + (x DIV 4) x 32 + z): yaw low byte here, yaw high byte at $C000, pitch low and high bytes, divided by 16, at $C400 and $C800. $3700 fills all four with GetHypotenuseAngle ($9287); the main game loop calls it at $35BD right after the tile-visibility pass ($245B), and skips both after a U-turn (bit 7 of $0C51), when the player has not moved. While bit 7 of $9AF6 is set (play), the tile-angle routine ($283D) jumps to $37F2, which only subtracts the view's current yaw and pitch from these; the BBC original works each corner's angles out as it draws. The image holds a fill pattern here.","t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":48136,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48144,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48152,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48160,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48168,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48176,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48184,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48192,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48200,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48208,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48216,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48224,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48232,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48240,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48248,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48256,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48264,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48272,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48280,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48288,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48296,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48304,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48312,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48320,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48328,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48336,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48344,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48352,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48360,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48368,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48376,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48384,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":48392,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48400,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48408,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48416,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48424,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48432,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48440,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48448,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48456,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48464,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48472,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48480,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48488,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48496,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48504,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48512,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48520,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48528,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48536,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48544,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48552,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48560,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48568,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48576,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48584,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48592,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48600,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48608,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48616,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48624,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48632,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48640,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":48648,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48656,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48664,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48672,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48680,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48688,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48696,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48704,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48712,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48720,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48728,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48736,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48744,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48752,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48760,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48768,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48776,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48784,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48792,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48800,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48808,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48816,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48824,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48832,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48840,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48848,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48856,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48864,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48872,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48880,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48888,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48896,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":48904,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48912,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48920,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48928,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48936,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48944,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48952,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48960,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48968,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48976,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48984,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":48992,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49000,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49008,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49016,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49024,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49032,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49040,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49048,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49056,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49064,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49072,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49080,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49088,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49096,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49104,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49112,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49120,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49128,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49136,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49144,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49152,"l":"tile_corner_yaw_hi","c":"Tile-corner angle cache (see $BC00): yaw high byte of every corner as seen from the player's tile, written at $3777; $3859 subtracts the view's yaw ($B2) from it into $A800.","t":"byte","b":[255,0,0,0,0,255,255,191]},{"a":49160,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49168,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49176,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49184,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49192,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49200,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49208,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49216,"t":"byte","b":[255,0,16,0,0,127,255,255]},{"a":49224,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49232,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49240,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49248,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49256,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49264,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49272,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49280,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49288,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49296,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49304,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49312,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49320,"t":"byte","b":[255,0,0,1,0,255,255,255]},{"a":49328,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49336,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49344,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49352,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49360,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49368,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49376,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49384,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49392,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49400,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49408,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49416,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49424,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49432,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49440,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49448,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49456,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49464,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49472,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49480,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49488,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49496,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49504,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49512,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49520,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49528,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49536,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49544,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49552,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49560,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49568,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49576,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49584,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49592,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49600,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49608,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49616,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49624,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49632,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49640,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49648,"t":"byte","b":[255,0,0,0,0,255,255,255]},{"a":49656,"t":"byte","b":[255,0,32,0,0,255,255,255]},{"a":49664,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":49672,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49680,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49688,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49696,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49704,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49712,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49720,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49728,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49736,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49744,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49752,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49760,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49768,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49776,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49784,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49792,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49800,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49808,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49816,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49824,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49832,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49840,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49848,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49856,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49864,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49872,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49880,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49888,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49896,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49904,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49912,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49920,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":49928,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49936,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49944,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49952,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49960,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49968,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49976,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49984,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":49992,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50000,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50008,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50016,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50024,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50032,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50040,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50048,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50056,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50064,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50072,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50080,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50088,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50096,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50104,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50112,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50120,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50128,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50136,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50144,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50152,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50160,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50168,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50176,"l":"tile_corner_pitch_lo","c":"Tile-corner angle cache (see $BC00): pitch low byte of every corner, after the pitch has been divided by 16 ($37C7-$37E1); $3860 subtracts the view's pitch ($B0) from it into $0A80.","t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50184,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50192,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50200,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50208,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50216,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50224,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50232,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50240,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50248,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50256,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50264,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50272,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50280,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50288,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50296,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50304,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50312,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50320,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50328,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50336,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50344,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50352,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50360,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50368,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50376,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50384,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50392,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50400,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50408,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50416,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50424,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50432,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50440,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50448,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50456,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50464,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50472,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50480,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50488,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50496,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50504,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50512,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50520,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50528,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50536,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50544,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50552,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50560,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50568,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50576,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50584,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50592,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50600,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50608,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50616,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50624,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50632,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50640,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50648,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50656,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50664,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50672,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50680,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":50688,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50696,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50704,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50712,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50720,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50728,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50736,"t":"byte","b":[0,0,4,0,255,255,255,255]},{"a":50744,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50752,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50760,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50768,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50776,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50784,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50792,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50800,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50808,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50816,"t":"byte","b":[0,0,0,0,255,255,253,255]},{"a":50824,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50832,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50840,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50848,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50856,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50864,"t":"byte","b":[0,1,0,0,255,255,255,255]},{"a":50872,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50880,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50888,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50896,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50904,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50912,"t":"byte","b":[0,0,0,0,255,254,255,255]},{"a":50920,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50928,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50936,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50944,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50952,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50960,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50968,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50976,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50984,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":50992,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51000,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51008,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51016,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51024,"t":"byte","b":[0,0,0,2,255,255,255,255]},{"a":51032,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51040,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51048,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51056,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51064,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51072,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51080,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51088,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51096,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51104,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51112,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51120,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51128,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51136,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51144,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51152,"t":"byte","b":[0,2,0,0,255,255,255,253]},{"a":51160,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51168,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51176,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51184,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51192,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51200,"l":"tile_corner_pitch_hi","c":"Tile-corner angle cache (see $BC00): pitch high byte of every corner, divided by 16 with its sign kept (written at $37DD); $3868 subtracts $B1 from it into $0AE0.","t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51208,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51216,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51224,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51232,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51240,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51248,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51256,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51264,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51272,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51280,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51288,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51296,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51304,"t":"byte","b":[0,0,0,16,255,255,255,255]},{"a":51312,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51320,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51328,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51336,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51344,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51352,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51360,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51368,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51376,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51384,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51392,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51400,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51408,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51416,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51424,"t":"byte","b":[0,64,0,0,255,255,255,255]},{"a":51432,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51440,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51448,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51456,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51464,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51472,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51480,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51488,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51496,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51504,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51512,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51520,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51528,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51536,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51544,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51552,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51560,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51568,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51576,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51584,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51592,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51600,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51608,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51616,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51624,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51632,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51640,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51648,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51656,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51664,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51672,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51680,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51688,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51696,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51704,"t":"byte","b":[0,0,0,0,0,0,0,0]},{"a":51712,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51720,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51728,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51736,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51744,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51752,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51760,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51768,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51776,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51784,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51792,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51800,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51808,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51816,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51824,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51832,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51840,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51848,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51856,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51864,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51872,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51880,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51888,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51896,"t":"byte","b":[255,255,255,255,255,255,255,0]},{"a":51904,"t":"byte","b":[16,0,0,255,255,255,255,255]},{"a":51912,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51920,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51928,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51936,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51944,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51952,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51960,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51968,"t":"byte","b":[0,0,0,0,255,255,255,255]},{"a":51976,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51984,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":51992,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52000,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52008,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52016,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52024,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52032,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52040,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52048,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52056,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52064,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52072,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52080,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52088,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52096,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52104,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52112,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52120,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52128,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52136,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52144,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52152,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52160,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52168,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52176,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52184,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52192,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52200,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52208,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52216,"t":"byte","b":[255,255,255,255,255,255,255,255]},{"a":52224,"t":"gap","n":13312,"x":[34439]},{"a":65474,"t":"note","l":"gsinit_slot_jmp","c":"JMP $8ED1, written at start by $8959-$895B with its operand from $891D-$8924; excluded, $FF in this copy. The address is the BBC's GSINIT entry; the C64 uses it for its once-a-frame note timer ($8ED1: durations and releases of the three voices), called from the interrupt at $963D.","note":"outside the tracked image","x":[35163,38461]},{"a":65475,"t":"note","l":"gsinit_slot_lo","c":"Low byte of the JMP at $FFC2, $D1, written at $891F.","note":"outside the tracked image","x":[35103]},{"a":65476,"t":"note","l":"gsinit_slot_hi","c":"High byte of the JMP at $FFC2, $8E, written at $8924.","note":"outside the tracked image","x":[35108]},{"a":65477,"t":"note","l":"gsread_slot_jmp","c":"JMP $8F0C, written at start by $895E; excluded, $FF in this copy. The address is the BBC's GSREAD entry; the C64 uses it for its once-a-frame pitch-effect stepper ($8F0C, records at $AC40), called from the interrupt at $963A with A = 3.","note":"outside the tracked image","x":[35166,38458]},{"a":65478,"t":"note","l":"gsread_slot_lo","c":"Low byte of the JMP at $FFC5, $0C, written at $8929.","note":"outside the tracked image","x":[35113]},{"a":65479,"t":"note","l":"gsread_slot_hi","c":"High byte of the JMP at $FFC5, $8F, written at $892E.","note":"outside the tracked image","x":[35118]},{"a":65504,"t":"note","l":"osrdch_jmp","c":"JMP $8D2C, written at start by $8964, at the address of the BBC's OSRDCH (read a character); called at $862C. Excluded, $FF in this copy.","note":"outside the tracked image","x":[34348,35172]},{"a":65505,"t":"note","l":"osrdch_lo","c":"Low byte of the JMP at $FFE0, $2C, written at $893D.","note":"outside the tracked image","x":[35133]},{"a":65506,"t":"note","l":"osrdch_hi","c":"High byte of the JMP at $FFE0, $8D, written at $8942.","note":"outside the tracked image","x":[35138]},{"a":65518,"t":"note","l":"oswrch_jmp","c":"JMP $8A6B, written at start by $8961, at the address of the BBC's OSWRCH (write a character): the C64's VDU interpreter, used by the text printers ($AA44, $AA6A) and others. Excluded, $FF in this copy.","note":"outside the tracked image","x":[13083,35169,43614,43623,43637]},{"a":65519,"t":"note","l":"oswrch_lo","c":"Low byte of the JMP at $FFEE, $6B, written at $8933.","note":"outside the tracked image","x":[35123]},{"a":65520,"t":"note","l":"oswrch_hi","c":"High byte of the JMP at $FFEE, $8A, written at $8938.","note":"outside the tracked image","x":[35128]},{"a":65521,"t":"note","l":"osword_jmp","c":"JMP $8D81, written at start by $8967, at the address of the BBC's OSWORD: the C64's handler takes A = 7 (play a sound block, $8DB4, blocks at $AC00) and A = 10 (copy a character's 8 bytes from the font at $8000, $8D8A); anything else returns. Excluded, $FF in this copy.","note":"outside the tracked image","x":[12837,13434,35175]},{"a":65522,"t":"note","l":"osword_lo","c":"Low byte of the JMP at $FFF1, $81, written at $8947.","note":"outside the tracked image","x":[35143]},{"a":65523,"t":"note","l":"osword_hi","c":"High byte of the JMP at $FFF1, $8D, written at $894C.","note":"outside the tracked image","x":[35148]},{"a":65524,"t":"note","l":"osbyte_jmp","c":"JMP $8F78, written at start by $896A, at the address of the BBC's OSBYTE: the C64's handler takes A = $81 (scan the keyboard, $8CF9) and A = $15 (silence voice X, $8F81); anything else returns, including the $7E sent at $8639. Excluded, $FF in this copy.","note":"outside the tracked image","x":[3944,13609,34361,35178]},{"a":65525,"t":"note","l":"osbyte_lo","c":"Low byte of the JMP at $FFF4, $78, written at $8951.","note":"outside the tracked image","x":[35153]},{"a":65526,"t":"note","l":"osbyte_hi","c":"High byte of the JMP at $FFF4, $8F, written at $8956.","note":"outside the tracked image","x":[35158]}]}