More analysis about decimal routines in ucode
authorNick Downing <nick@ndcode.org>
Fri, 24 Jun 2022 10:42:20 +0000 (20:42 +1000)
committerNick Downing <nick@ndcode.org>
Fri, 24 Jun 2022 13:30:15 +0000 (23:30 +1000)
disasm/star_blazer.txt

index 65a980d..1aebf33 100644 (file)
@@ -138,19 +138,27 @@ items
 0x0d6c,0x0001,calculate_object_shape,code
 0x0d81,0x0001,set_object_shape,code
 0x0de5,0x0001,calculate_direction_nibble,code
-0x0ef7,0x0010,update_a_decimal_vectors,word,code_m1
+0x0ebc,0x0001,set_decimal_0,code
+0x0ec1,0x0001,set_decimal_score_var_4b80_score_var_4b00_by_mission,code
+0x0ece,0x0001,set_decimal_1,code
+0x0ed4,0x0001,set_decimal_score_var_4880_score_var_4800,code
+0x0edc,0x0001,set_decimal_score_var_4980_score_var_4900,code
+0x0ee4,0x0001,set_decimal_score_var_4a80_score_var_4a00,code
+0x0eec,0x0001,set_decimal_score_var_4b80_score_var_4b00,code
+0x0ef2,0x0001,set_decimal_save,code
+0x0ef7,0x0010,set_decimal_vectors,word,code_m1
 0x0f07,0x0010,bits_4_to_6_vectors,word,code_m1
 0x0f17,0x0010,bits_0_to_2_vectors,word,code_m1
-0x0f27,0x000c,ucode_vectors,word,code_m1
+0x0f27,0x000c,ucode_08_to_0e_vectors,word,code_m1
 0x0f33,0x0001,vector_on_bits_4_to_6,code
 0x0f46,0x0001,vector_on_bits_0_to_2,code
 0x0f57,0x0001,decimal_inc,code
 0x0f66,0x0001,decimal_dec,code
-0x0f83,0x0001,vector_to_update_a_decimal,code
-0x0f8d,0x0001,ucode_score,code
+0x0f83,0x0001,vector_to_set_decimal,code
+0x0f8d,0x0001,ucode_decimal,code
 0x0fb1,0x0001,adjust_score_for_reset_object,code
 0x0fb9,0x0001,ucode_byte,code
-0x0fdb,0x0001,go_ucode_score,code
+0x0fdb,0x0001,go_ucode_decimal,code
 # enter with ucode_pair_object = 1st byte of ucode pair, a = 2nd byte
 # these values come from do_ucode_pair (I think the only external caller)
 # does ldx *ucode_pair_object first, so in below, "object" refers to this
@@ -164,17 +172,17 @@ items
 #         < 0x30: set demo mode, set mission from 2nd byte bits 0..3
 #         < 0xa0: vector to start game
 #         >= 0xa0: start game demo
-#     < 0x08: go to ucode_score, with unusual bcc -> bcc instruction
+#     < 0x08: go to ucode_decimal, with unusual bcc -> bcc instruction
 #       2nd byte bits 4..7
 #         == 0x30: vector to update a decimal based on 2nd byte bits 0..2
-#      .dw     loc_0ebc - 1
-#      .dw     loc_0ebc - 1
-#      .dw     loc_0ec1 - 1
-#      .dw     loc_0ece - 1
-#      .dw     loc_0ed4 - 1
-#      .dw     loc_0edc - 1
-#      .dw     loc_0ee4 - 1
-#      .dw     loc_0eec - 1
+#      .dw     set_decimal_0 - 1
+#      .dw     set_decimal_0 - 1
+#      .dw     set_decimal_score_var_4b80_score_var_4b00_by_mission - 1
+#      .dw     set_decimal_1 - 1
+#      .dw     set_decimal_score_var_4880_score_var_4800 - 1
+#      .dw     set_decimal_score_var_4980_score_var_4900 - 1
+#      .dw     set_decimal_score_var_4a80_score_var_4a00 - 1
+#      .dw     set_decimal_score_var_4b80_score_var_4b00 - 1
 #         == 0x40: decimal increment
 #           2nd byte bits 0..2 are *2 and give index into decimals array
 #         == 0x50: decimal decrement
@@ -197,7 +205,7 @@ items
 #   < 0x08: go to 0$
 #     if object is active, change its shape using 2nd byte bits 0..1
 #   < 0x0e: go to 3$
-#     vector to ucode_vectors routine based on 2nd byte bits 0..2
+#     vector to ucode_08_to_0e_vectors routine based on 2nd byte bits 0..2
 #      .dw     horizontal_collision_and_zero - 1
 #      .dw     vertical_collision_and_zero - 1
 #      .dw     horizontal_collision - 1