Figure out the correspondence between Galaxian and Alien Typhoon
authorNick Downing <nick@ndcode.org>
Wed, 29 Jun 2022 04:59:39 +0000 (14:59 +1000)
committerNick Downing <nick@ndcode.org>
Wed, 29 Jun 2022 08:48:13 +0000 (18:48 +1000)
galaxian/alien_typhoon.txt
galaxian/galaxian.txt
galaxian/uncomment.sh [new file with mode: 0755]

index c5bd5e7..be8d15a 100644 (file)
@@ -2,22 +2,745 @@ areas
 0x0000,0x0100,zpage,uninit
 0x0400,0x0037,text0,init
 0x0600,0x0200,text1,init
+0x0800,0x0a00,udata0,uninit
 0x1200,0x0e00,text2,init
 0x4000,0x5d80,text3,init
 
 items
-0x8b85,0x0001,,code_ign # bug? overruns larr_8dcb
-0x8b8d,0x0001,,code_ign # bug? overruns harr_8e8b
-0x8c5c,0x0001,,code_ign # bug? overruns larr_8dcb
-0x8c64,0x0001,,code_ign # bug? overruns harr_8e8b
+# draw_erase_x0: for drawing
+# draw_erase_x0 + 1: for erasing
+0x0000,0x0002,draw_erase_x0,byte
+# draw_erase_y0: for drawing
+# draw_erase_y0 + 1: for erasing
+0x0002,0x0002,draw_erase_y0,byte
+# draw_erase_shape: for drawing
+# draw_erase_shape + 1: for erasing
+0x0004,0x0002,draw_erase_shape,byte
+# clip_rect: x0
+# clip_rect + 1: x1
+# clip_rect + 2: y0
+# clip_rect + 3: y1
+0x0007,0x0004,clip_rect,byte
+0x000b,0x0001,draw_x1,byte
+0x000d,0x0001,draw_y1,byte
+# draw_x0: for drawing
+# draw_x0 + 1: for erasing
+0x0010,0x0002,draw_x0,byte
+# draw_y0: for drawing
+# draw_y0 + 1: for erasing
+0x0012,0x0002,draw_y0,byte
+0x0014,0x0002,video_line_ptr,word
+0x0016,0x0001,draw_misc_x_save,byte
+# lo byte of (shift count * 0x80) + shape
+# also y coordinate temporary storage
+0x0017,0x0001,draw_temp,byte
+# saves value of ships before increment
+0x0018,0x0001,score_temp,byte
+# this part may have shifted
+0x001f,0x0001,gal_bvar_001f,byte
+0x0020,0x0001,draw_x_save,byte
+# this part has shifted by 1 byte
+# high score in 4-digit BCD
+0x0024,0x0002,high_score,byte
+# cleared when keyboard input occurs
+# I think it controls demo mode, 0 for play mode
+0x0026,0x0001,demo_mode,byte
+# I think this controls awarding of bonus ships
+0x0027,0x0001,score_threshold,byte
+0x0028,0x0001,gal_bvar_0027,byte
+# is it an array?
+0x0029,0x0001,gal_bvar_0028,byte
+# score in 4-digit BCD
+0x002a,0x0002,score,byte
+0x002c,0x0001,gal_bvar_002b,byte
+0x002d,0x0001,gal_bvar_002c,byte
+0x002e,0x0001,gal_bvar_002d,byte
+0x002f,0x0001,gal_barr_002e,byte
+0x0037,0x0001,starfield_count,byte
+# sizes have not been looked at yet
+0x0038,0x0001,gal_barr_0037,byte
+0x0040,0x0001,gal_barr_003f,byte
+0x0048,0x0001,gal_barr_0047,byte
+0x0050,0x0001,gal_barr_004f,byte
+0x0058,0x0001,gal_barr_0057,byte
+0x0060,0x0001,gal_bvar_005f,byte
+0x0061,0x0001,gal_bvar_0060,byte
+0x0062,0x0001,gal_bvar_0061,byte
+0x0063,0x0001,gal_bvar_0062,byte
+0x0064,0x0001,gal_bvar_0063,byte
+0x0065,0x0001,gal_bvar_0064,byte
+0x0068,0x0001,gal_bvar_0067,byte
+0x0069,0x0001,gal_bvar_0068,byte
+# ships in 2-digit BCD
+0x006a,0x0001,ships,byte
+0x006b,0x0001,active_aliens,byte
+0x006c,0x0001,gal_bvar_006b,byte
+0x006d,0x0001,gal_bvar_006c,byte
+0x006e,0x0001,gal_bvar_006d,byte
+0x006f,0x0001,gal_bvar_006e,byte
+0x0070,0x0001,gal_bvar_006f,byte
+# some extra draw_erase_x0 goes at 0x0074?
+# some extra draw_erase_y0 goes at 0x0075?
+# gets set to value of bvar_48a0 when win awarded
+# does it cause a new phalanx of aliens to appear?
+0x007b,0x0001,new_level_flag,byte
+# wins in 2-digit BCD
+0x007c,0x0001,wins,byte
+0x007d,0x0001,gal_bvar_0073,byte
+0x007e,0x0001,gal_bvar_0074,byte
+0x007f,0x0001,gal_bvar_0075,byte
+0x0082,0x0001,gal_bvar_0078,byte
+0x0083,0x0001,gal_bvar_0079,byte
+0x0084,0x0001,gal_bvar_007a,byte
+0x0086,0x0001,gal_bvar_007c,byte
+0x0087,0x0001,gal_bvar_007d,byte
+0x0088,0x0001,gal_bvar_007e,byte
+0x0089,0x0001,gal_bvar_007f,byte
+0x008b,0x0001,gal_bvar_0081,byte
+0x0090,0x0001,gal_bvar_0085,byte
+0x0095,0x0001,gal_bvar_008e,byte
+0x0097,0x0001,gal_bvar_0093,byte
+# saves x reg during calculation
+0x0098,0x0001,score_x_save,byte
+# have these shifted?
+# sizes have not been examined yet
+0x00a9,0x0001,gal_barr_00a9,byte
+0x00b1,0x0001,gal_barr_00b1,byte
+# bits 0 and 7 seem to be used for something
+# there seem to be aliens 0x01 (maybe 0x00) to 0x12
+# or maybe entry 0 is used for currently processing alien
+0x00c1,0x0012,alien_status,byte
+0x0400,0x0001,gal_sub_9751,code
+0x0434,0x0001,do_title_display,code
+0x0600,0x0080,misc_shape_data_ptr_lo,byte
+0x0680,0x0080,misc_shape_data_ptr_hi,byte
+0x0700,0x0080,misc_shape_width_bytes,byte
+0x0780,0x0080,misc_shape_height,byte
+0x0801,0x0028,star_x,byte
+0x0841,0x0028,star_y,byte
+# sizes have not been examined yet
+0x0881,0x0001,gal_barr_8d91,byte
+0x08c1,0x0028,move_starfield_table,byte
+0x0901,0x0028,star_y_velocity,byte
+# sizes have not been examined yet
+0x0941,0x0001,gal_barr_8f11,byte
+0x0981,0x0028,star_shape_left,byte
+0x09c1,0x0028,star_shape_right,byte
+0x0a11,0x0008,shell_x_velocity,byte
+0x0a31,0x0008,shell_x,byte
+0x0a41,0x0008,shell_y,byte
+0x0a51,0x0008,shell_x_fraction,byte
+# sizes have not been examined yet
+0x0a71,0x0001,gal_barr_8ce1,byte
+0x0ac9,0x0001,missile_x,byte
+0x0ad1,0x0001,missile_y,byte
+# sizes have not been examined yet
+0x0ad9,0x0001,gal_barr_8fd9,byte
+0x0e00,0x0002,gal_barr_00c0,byte
+# sizes have not been examined yet
+0x0e30,0x0002,gal_barr_9068,byte
+0x0e90,0x0012,x_90a8,byte
+0x0ec0,0x0012,y_9028,byte
+# the below seem to be x and y pairs
+# sizes have not been examined yet
+0x0ef1,0x0001,gal_barr_90e9,byte
+0x0f50,0x0001,gal_barr_9168,byte
+0x0f80,0x0001,gal_barr_8fe8,byte
+0x0fb1,0x0001,gal_barr_91e9,byte
+0x0fe1,0x0001,gal_barr_9229,byte
+0x1071,0x0001,gal_barr_9129,byte
+0x1400,0x0380,shape_data_ptr_lo,byte
+0x1780,0x0380,shape_data_ptr_hi,byte
+0x1b00,0x0380,shape_width_bytes,byte
+# 0x80 spare?
+0x1f00,0x0080,shape_height,byte
+# 0x80 spare?
+0x2000,0x0028,VIDEO_LINE_00,byte
+0x2028,0x0028,VIDEO_LINE_40,byte
+0x2050,0x0028,VIDEO_LINE_80,byte
+0x2080,0x0028,VIDEO_LINE_08,byte
+0x20a8,0x0028,VIDEO_LINE_48,byte
+0x20d0,0x0028,VIDEO_LINE_88,byte
+0x2100,0x0028,VIDEO_LINE_10,byte
+0x2128,0x0028,VIDEO_LINE_50,byte
+0x2150,0x0028,VIDEO_LINE_90,byte
+0x2180,0x0028,VIDEO_LINE_18,byte
+0x21a8,0x0028,VIDEO_LINE_58,byte
+0x21d0,0x0028,VIDEO_LINE_98,byte
+0x2200,0x0028,VIDEO_LINE_20,byte
+0x2228,0x0028,VIDEO_LINE_60,byte
+0x2250,0x0028,VIDEO_LINE_A0,byte
+0x2280,0x0028,VIDEO_LINE_28,byte
+0x22a8,0x0028,VIDEO_LINE_68,byte
+0x22d0,0x0028,VIDEO_LINE_A8,byte
+0x2300,0x0028,VIDEO_LINE_30,byte
+0x2328,0x0028,VIDEO_LINE_70,byte
+0x2350,0x0028,VIDEO_LINE_B0,byte
+0x2380,0x0028,VIDEO_LINE_38,byte
+0x23a8,0x0028,VIDEO_LINE_78,byte
+0x23d0,0x0028,VIDEO_LINE_B8,byte
+0x2400,0x0028,VIDEO_LINE_01,byte
+0x2428,0x0028,VIDEO_LINE_41,byte
+0x2450,0x0028,VIDEO_LINE_81,byte
+0x2480,0x0028,VIDEO_LINE_09,byte
+0x24a8,0x0028,VIDEO_LINE_49,byte
+0x24d0,0x0028,VIDEO_LINE_89,byte
+0x2500,0x0028,VIDEO_LINE_11,byte
+0x2528,0x0028,VIDEO_LINE_51,byte
+0x2550,0x0028,VIDEO_LINE_91,byte
+0x2580,0x0028,VIDEO_LINE_19,byte
+0x25a8,0x0028,VIDEO_LINE_59,byte
+0x25d0,0x0028,VIDEO_LINE_99,byte
+0x2600,0x0028,VIDEO_LINE_21,byte
+0x2628,0x0028,VIDEO_LINE_61,byte
+0x2650,0x0028,VIDEO_LINE_A1,byte
+0x2680,0x0028,VIDEO_LINE_29,byte
+0x26a8,0x0028,VIDEO_LINE_69,byte
+0x26d0,0x0028,VIDEO_LINE_A9,byte
+0x2700,0x0028,VIDEO_LINE_31,byte
+0x2728,0x0028,VIDEO_LINE_71,byte
+0x2750,0x0028,VIDEO_LINE_B1,byte
+0x2780,0x0028,VIDEO_LINE_39,byte
+0x27a8,0x0028,VIDEO_LINE_79,byte
+0x27d0,0x0028,VIDEO_LINE_B9,byte
+0x2800,0x0028,VIDEO_LINE_02,byte
+0x2828,0x0028,VIDEO_LINE_42,byte
+0x2850,0x0028,VIDEO_LINE_82,byte
+0x2880,0x0028,VIDEO_LINE_0A,byte
+0x28a8,0x0028,VIDEO_LINE_4A,byte
+0x28d0,0x0028,VIDEO_LINE_8A,byte
+0x2900,0x0028,VIDEO_LINE_12,byte
+0x2928,0x0028,VIDEO_LINE_52,byte
+0x2950,0x0028,VIDEO_LINE_92,byte
+0x2980,0x0028,VIDEO_LINE_1A,byte
+0x29a8,0x0028,VIDEO_LINE_5A,byte
+0x29d0,0x0028,VIDEO_LINE_9A,byte
+0x2a00,0x0028,VIDEO_LINE_22,byte
+0x2a28,0x0028,VIDEO_LINE_62,byte
+0x2a50,0x0028,VIDEO_LINE_A2,byte
+0x2a80,0x0028,VIDEO_LINE_2A,byte
+0x2aa8,0x0028,VIDEO_LINE_6A,byte
+0x2ad0,0x0028,VIDEO_LINE_AA,byte
+0x2b00,0x0028,VIDEO_LINE_32,byte
+0x2b28,0x0028,VIDEO_LINE_72,byte
+0x2b50,0x0028,VIDEO_LINE_B2,byte
+0x2b80,0x0028,VIDEO_LINE_3A,byte
+0x2ba8,0x0028,VIDEO_LINE_7A,byte
+0x2bd0,0x0028,VIDEO_LINE_BA,byte
+0x2c00,0x0028,VIDEO_LINE_03,byte
+0x2c28,0x0028,VIDEO_LINE_43,byte
+0x2c50,0x0028,VIDEO_LINE_83,byte
+0x2c80,0x0028,VIDEO_LINE_0B,byte
+0x2ca8,0x0028,VIDEO_LINE_4B,byte
+0x2cd0,0x0028,VIDEO_LINE_8B,byte
+0x2d00,0x0028,VIDEO_LINE_13,byte
+0x2d28,0x0028,VIDEO_LINE_53,byte
+0x2d50,0x0028,VIDEO_LINE_93,byte
+0x2d80,0x0028,VIDEO_LINE_1B,byte
+0x2da8,0x0028,VIDEO_LINE_5B,byte
+0x2dd0,0x0028,VIDEO_LINE_9B,byte
+0x2e00,0x0028,VIDEO_LINE_23,byte
+0x2e28,0x0028,VIDEO_LINE_63,byte
+0x2e50,0x0028,VIDEO_LINE_A3,byte
+0x2e80,0x0028,VIDEO_LINE_2B,byte
+0x2ea8,0x0028,VIDEO_LINE_6B,byte
+0x2ed0,0x0028,VIDEO_LINE_AB,byte
+0x2f00,0x0028,VIDEO_LINE_33,byte
+0x2f28,0x0028,VIDEO_LINE_73,byte
+0x2f50,0x0028,VIDEO_LINE_B3,byte
+0x2f80,0x0028,VIDEO_LINE_3B,byte
+0x2fa8,0x0028,VIDEO_LINE_7B,byte
+0x2fd0,0x0028,VIDEO_LINE_BB,byte
+0x3000,0x0028,VIDEO_LINE_04,byte
+0x3028,0x0028,VIDEO_LINE_44,byte
+0x3050,0x0028,VIDEO_LINE_84,byte
+0x3080,0x0028,VIDEO_LINE_0C,byte
+0x30a8,0x0028,VIDEO_LINE_4C,byte
+0x30d0,0x0028,VIDEO_LINE_8C,byte
+0x3100,0x0028,VIDEO_LINE_14,byte
+0x3128,0x0028,VIDEO_LINE_54,byte
+0x3150,0x0028,VIDEO_LINE_94,byte
+0x3180,0x0028,VIDEO_LINE_1C,byte
+0x31a8,0x0028,VIDEO_LINE_5C,byte
+0x31d0,0x0028,VIDEO_LINE_9C,byte
+0x3200,0x0028,VIDEO_LINE_24,byte
+0x3228,0x0028,VIDEO_LINE_64,byte
+0x3250,0x0028,VIDEO_LINE_A4,byte
+0x3280,0x0028,VIDEO_LINE_2C,byte
+0x32a8,0x0028,VIDEO_LINE_6C,byte
+0x32d0,0x0028,VIDEO_LINE_AC,byte
+0x3300,0x0028,VIDEO_LINE_34,byte
+0x3328,0x0028,VIDEO_LINE_74,byte
+0x3350,0x0028,VIDEO_LINE_B4,byte
+0x3380,0x0028,VIDEO_LINE_3C,byte
+0x33a8,0x0028,VIDEO_LINE_7C,byte
+0x33d0,0x0028,VIDEO_LINE_BC,byte
+0x3400,0x0028,VIDEO_LINE_05,byte
+0x3428,0x0028,VIDEO_LINE_45,byte
+0x3450,0x0028,VIDEO_LINE_85,byte
+0x3480,0x0028,VIDEO_LINE_0D,byte
+0x34a8,0x0028,VIDEO_LINE_4D,byte
+0x34d0,0x0028,VIDEO_LINE_8D,byte
+0x3500,0x0028,VIDEO_LINE_15,byte
+0x3528,0x0028,VIDEO_LINE_55,byte
+0x3550,0x0028,VIDEO_LINE_95,byte
+0x3580,0x0028,VIDEO_LINE_1D,byte
+0x35a8,0x0028,VIDEO_LINE_5D,byte
+0x35d0,0x0028,VIDEO_LINE_9D,byte
+0x3600,0x0028,VIDEO_LINE_25,byte
+0x3628,0x0028,VIDEO_LINE_65,byte
+0x3650,0x0028,VIDEO_LINE_A5,byte
+0x3680,0x0028,VIDEO_LINE_2D,byte
+0x36a8,0x0028,VIDEO_LINE_6D,byte
+0x36d0,0x0028,VIDEO_LINE_AD,byte
+0x3700,0x0028,VIDEO_LINE_35,byte
+0x3728,0x0028,VIDEO_LINE_75,byte
+0x3750,0x0028,VIDEO_LINE_B5,byte
+0x3780,0x0028,VIDEO_LINE_3D,byte
+0x37a8,0x0028,VIDEO_LINE_7D,byte
+0x37d0,0x0028,VIDEO_LINE_BD,byte
+0x3800,0x0028,VIDEO_LINE_06,byte
+0x3828,0x0028,VIDEO_LINE_46,byte
+0x3850,0x0028,VIDEO_LINE_86,byte
+0x3880,0x0028,VIDEO_LINE_0E,byte
+0x38a8,0x0028,VIDEO_LINE_4E,byte
+0x38d0,0x0028,VIDEO_LINE_8E,byte
+0x3900,0x0028,VIDEO_LINE_16,byte
+0x3928,0x0028,VIDEO_LINE_56,byte
+0x3950,0x0028,VIDEO_LINE_96,byte
+0x3980,0x0028,VIDEO_LINE_1E,byte
+0x39a8,0x0028,VIDEO_LINE_5E,byte
+0x39d0,0x0028,VIDEO_LINE_9E,byte
+0x3a00,0x0028,VIDEO_LINE_26,byte
+0x3a28,0x0028,VIDEO_LINE_66,byte
+0x3a50,0x0028,VIDEO_LINE_A6,byte
+0x3a80,0x0028,VIDEO_LINE_2E,byte
+0x3aa8,0x0028,VIDEO_LINE_6E,byte
+0x3ad0,0x0028,VIDEO_LINE_AE,byte
+0x3b00,0x0028,VIDEO_LINE_36,byte
+0x3b28,0x0028,VIDEO_LINE_76,byte
+0x3b50,0x0028,VIDEO_LINE_B6,byte
+0x3b80,0x0028,VIDEO_LINE_3E,byte
+0x3ba8,0x0028,VIDEO_LINE_7E,byte
+0x3bd0,0x0028,VIDEO_LINE_BE,byte
+0x3c00,0x0028,VIDEO_LINE_07,byte
+0x3c28,0x0028,VIDEO_LINE_47,byte
+0x3c50,0x0028,VIDEO_LINE_87,byte
+0x3c80,0x0028,VIDEO_LINE_0F,byte
+0x3ca8,0x0028,VIDEO_LINE_4F,byte
+0x3cd0,0x0028,VIDEO_LINE_8F,byte
+0x3d00,0x0028,VIDEO_LINE_17,byte
+0x3d28,0x0028,VIDEO_LINE_57,byte
+0x3d50,0x0028,VIDEO_LINE_97,byte
+0x3d80,0x0028,VIDEO_LINE_1F,byte
+0x3da8,0x0028,VIDEO_LINE_5F,byte
+0x3dd0,0x0028,VIDEO_LINE_9F,byte
+0x3e00,0x0028,VIDEO_LINE_27,byte
+0x3e28,0x0028,VIDEO_LINE_67,byte
+0x3e50,0x0028,VIDEO_LINE_A7,byte
+0x3e80,0x0028,VIDEO_LINE_2F,byte
+0x3ea8,0x0028,VIDEO_LINE_6F,byte
+0x3ed0,0x0028,VIDEO_LINE_AF,byte
+0x3f00,0x0028,VIDEO_LINE_37,byte
+0x3f28,0x0028,VIDEO_LINE_77,byte
+0x3f50,0x0028,VIDEO_LINE_B7,byte
+0x3f80,0x0028,VIDEO_LINE_3F,byte
+0x3fa8,0x0028,VIDEO_LINE_7F,byte
+0x3fd0,0x0028,VIDEO_LINE_BF,byte
+0x44da,0x0001,wins_y,byte
+0x44dc,0x0001,wins_x,byte
+0x44de,0x0001,ships_y,byte
+0x44e0,0x0001,ships_x,byte
+0x44e2,0x0001,high_score_y,byte
+0x44e4,0x0001,high_score_x,byte
+0x44e6,0x0001,score_y,byte
+0x44e8,0x0001,score_x,byte
+0x44ea,0x0001,gal_bvar_4864,byte
+0x44ec,0x0001,gal_bvar_4866,byte
+0x44ee,0x0001,gal_bvar_4868,byte
+0x44f0,0x0001,gal_bvar_486c,byte
+0x44f4,0x0001,shell_y_velocity,byte
+0x44f6,0x0001,shell_x_velocity_fraction,byte
+0x44f8,0x0001,missile_y_velocity,byte
+0x4506,0x0001,gal_bvar_4880,byte
+0x4508,0x0001,gal_bvar_4882,byte
+0x450a,0x0001,gal_bvar_4884,byte
+0x450c,0x0001,high_score_init,byte
+0x450e,0x0001,gal_bvar_4888,byte
+0x4510,0x0001,gal_bvar_488a,byte
+0x4512,0x0001,gal_bvar_488c,byte
+0x4514,0x0001,gal_bvar_488e,byte
+0x4516,0x0001,gal_bvar_4890,byte
+0x4518,0x0001,gal_bvar_4892,byte
+0x451a,0x0001,gal_bvar_4894,byte
+0x4520,0x0001,gal_bvar_489a,byte
+0x4522,0x0001,gal_bvar_489c,byte
+0x4524,0x0001,gal_bvar_489e,byte
+0x4526,0x0001,gal_bvar_48a0,byte
+0x4528,0x0001,gal_bvar_48a2,byte
+# ships won't be redrawn if they exceed this
+0x452a,0x0001,max_displayed_ships,byte
+0x4530,0x0001,starfield_count_init,byte
+0x4532,0x0001,gal_bvar_48ac,byte
+0x4534,0x0001,gal_bvar_48ae,byte
+0x4536,0x0001,gal_bvar_48b0,byte
+# used for clearing the screen in the beginning
+# seems to be x0, x1, y0, y1
+# it will be offset by the centre values x = 0x6c, y = 0x20
+0x4538,0x0004,screen_size,byte
+0x453c,0x0001,gal_bvar_48b6,byte
+0x453d,0x0001,gal_bvar_48b7,byte
+0x453e,0x0001,gal_bvar_48b8,byte
+0x453f,0x0001,gal_bvar_48b9,byte
+0x4540,0x0001,gal_bvar_48ba,byte
+0x4541,0x0001,gal_bvar_48bb,byte
+0x4542,0x0001,gal_bvar_48bc,byte
+0x4543,0x0001,gal_bvar_48bd,byte
+0x4548,0x0001,gal_bvar_48c2,byte
+0x4549,0x0001,gal_bvar_48c3,byte
+0x454a,0x0001,gal_bvar_48c4,byte
+0x454b,0x0001,gal_bvar_48c5,byte
+0x454f,0x0001,gal_bvar_48c9,byte
+# added to score, presumably when alien is destroyed
+0x4550,0x0004,points_table,byte
+# sizes have not been examined yet
+0x4555,0x0001,gal_barr_490f,byte
+0x4575,0x0001,gal_barr_492f,byte
+0x4584,0x0001,gal_barr_48ce,byte
+0x45a4,0x0010,title_display_delay,byte
+0x45c4,0x0010,title_display_y,byte
+0x45e4,0x0010,title_display_x,byte
+# sizes have not been examined yet
+0x4646,0x0001,gal_barr_4c40,byte
+0x464e,0x0001,gal_barr_4c48,byte
+0x4656,0x0001,gal_barr_4c50,byte
+0x465e,0x0001,gal_barr_4c58,byte
+0x4666,0x0001,gal_barr_4c60,byte
+0x466e,0x0001,gal_barr_4c68,byte
+0x4676,0x0001,gal_barr_4c70,byte
+0x467e,0x0001,gal_barr_4c78,byte
+# 46c6 == 49c0?
+0x4707,0x0001,gal_barr_4a01,byte
+0x4747,0x0001,gal_barr_4a41,byte
+0x4787,0x0001,gal_barr_4a81,byte
+0x4847,0x0001,gal_barr_4b41,byte
+0x488e,0x0001,gal_barr_4b81,byte
+# the basic shape
+# a value from a lookup table gets added to this
+0x4907,0x0012,alien_shapes,byte
+# sizes have not been examined yet
+0x4a47,0x0001,gal_barr_4d81,byte
+0x4c46,0x0001,gal_bvar_4e80,byte
+0x5046,0x0001,gal_bvar_5280,byte
+# something strange with 5281
+0x5446,0x0001,gal_bvar_5680,byte
+# sizes have not been examined yet
+0x5746,0x0001,shape_data,byte
+0x6f46,0x0001,misc_shape_data,byte
+0x8ad7,0x0001,gal_sub_932b,code
+0x8b2b,0x0001,init_bvar_0019,byte
+0x8b32,0x0001,gal_sub_9383,code
+# see screen_size
+0x8b53,0x0004,screen_offset,byte
+# initialize clip_rect, clear screen, set hires
+0x8b57,0x0001,video_init,code
+0x8b6d,0x0001,,code_ign # self-modifying code assembled with garbage word
+0x8b6e,0x0002,,word
+# clears rectangle described by clip_rect
+0x8b83,0x0001,video_clear_rect,code
+0x8b85,0x0001,,code_ign # accessing video_line_table before clipping y
+0x8b8d,0x0001,,code_ign # accessing video_line_table before clipping y
+# returns a = quotient, y = remainder, cf = 0
+0x8ba5,0x0001,div_a_by_7,code
+# the value from shape_data_ptr_lo/hi is relative to this value
+0x8bc3,0x0002,shape_data_ptr_base,word,byte
+0x8bc5,0x0007,x2_mod7_table,byte
+0x8bcc,0x0007,x2_div7_table,byte
+# these contain the pointer for shift count 0, shape 0
+# the byte accessed will be base + shift count * 0x80 + shape
+0x8bd3,0x0002,shape_data_ptr_lo_base,word,byte
+0x8bd5,0x0002,shape_data_ptr_hi_base,word,byte
+0x8bd7,0x0002,shape_width_bytes_base,word,byte
+# takes x = 0 draw, x = 1 erase
+# reads draw_erase_(x0|y0|shape)
+# sets up draw_(x0|x1|y0|y1)
+# returns y:a = pointer to shape data
+0x8bd9,0x0001,draw_erase_setup,code
+# these are not done because the low byte of assembled word is meaningful
+#0x8c15,0x0001,,code_ign # self-modifying code assembled with garbage word
+#0x8c16,0x0002,,word
+#0x8c1d,0x0001,,code_ign # self-modifying code assembled with garbage word
+#0x8c1e,0x0002,,word
+#0x8c25,0x0001,,code_ign # self-modifying code assembled with garbage word
+#0x8c26,0x0002,,word
+# erases and then draws shape
+0x8c2e,0x0001,move_shape,code
+# alien typhoon has special case for non clipped (unlike galaxian)
+0x8c31,0x0001,draw_shape,code
+0x8c5c,0x0001,,code_ign # accessing video_line_table before clipping y
+0x8c64,0x0001,,code_ign # accessing video_line_table before clipping y
+0x8c6d,0x0001,,code_ign # self-modifying code assembled with garbage word
+0x8c6e,0x0002,,word
 0x8c91,0x0001,,code_ign # causes merging of code items
-0x8c99,0x0001,,code_ign # bug? overruns harr_8e8b
-0x8d02,0x0001,,code_ign # bug? overruns larr_8dcb
-0x8d0a,0x0001,,code_ign # bug? overruns harr_8e8b
+0x8c99,0x0001,,code_ign # accessing video_line_table before clipping y
+0x8cb2,0x0001,,code_ign # self-modifying code assembled with garbage word
+0x8cb3,0x0002,,word
+# alien typhoon has special case for non clipped (unlike galaxian)
+0x8cd6,0x0001,erase_shape,code
+0x8d02,0x0001,,code_ign # accessing video_line_table before clipping y
+0x8d0a,0x0001,,code_ign # accessing video_line_table before clipping y
+0x8d13,0x0001,,code_ign # self-modifying code assembled with garbage word
+0x8d14,0x0002,,word
 0x8d31,0x0001,,code_ign # causes merging of code items
-0x8d39,0x0001,,code_ign # bug? overruns harr_8e8b
+0x8d39,0x0001,,code_ign # accessing video_line_table before clipping y
+0x8d52,0x0001,,code_ign # self-modifying code assembled with garbage word
+0x8d53,0x0002,,word
+0x8d70,0x0002,misc_shape_data_ptr_base,word,byte
+# draws over previous video contents
+# a = shape to draw
+# draw_x1 = x0 for drawing and is advanced by routine
+0x8d72,0x0001,draw_misc,code
+0x8db1,0x0001,,code_ign # self-modifying code assembled with garbage word
+0x8db2,0x0002,,word
+0x8dcb,0x00c0,video_line_table_lo,byte,byte,10000
+0x8e8b,0x00c0,video_line_table_hi,byte,byte,10000
 0x8f98,0x0001,start,code
-0x91bb,0x0001,,code_ign # bug? overruns larr_8dcb
-0x91c0,0x0001,,code_ign # bug? overruns harr_8e8b
-0x91e5,0x0001,,code_ign # bug? overruns larr_8dcb
-0x91ea,0x0001,,code_ign # bug? overruns harr_8e8b
+#??? 0x9751,0x0001,gal_sub_9751,code
+# initializes zpage, and probably other init, and draws something
+0x902e,0x0001,zpage_init,code
+0x9032,0x0001,,code_ign # zeroing zpage, don't merge cleared variables
+0x9081,0x0001,gal_sub_979f,code
+0x9099,0x0001,gal_sub_97be,code
+0x90a0,0x0001,gal_sub_97c5,code
+0x90d7,0x0001,gal_sub_97fc,code
+0x90e6,0x0001,gal_loc_980b,code
+0x90f0,0x0001,gal_rts_9815,code
+0x90f1,0x0001,gal_sub_9816,code
+0x90fb,0x0001,gal_loc_9820,code
+0x90fc,0x0002,gal_ptr_9821,word
+# sizes have not been examined yet
+0x9109,0x0001,gal_barr_982e,byte
+0x9111,0x0001,gal_barr_9836,byte
+# used for colouring the starfield
+0x9119,0x0001,star_mask_table_left,byte
+0x911d,0x0001,star_mask_table_right,byte
+# called when star goes off screen at y = 0xe0
+# randomize the x position for restart at y = 0x20
+0x9121,0x0001,regenerate_star,byte
+0x9134,0x0001,gal_sub_9859,code
+0x9179,0x0001,move_starfield,code
+0x91bb,0x0001,,code_ign # accessing video_line_table before clipping y
+0x91c0,0x0001,,code_ign # accessing video_line_table before clipping y
+0x91e5,0x0001,,code_ign # accessing video_line_table before clipping y
+0x91ea,0x0001,,code_ign # accessing video_line_table before clipping y
+0x920f,0x0001,gal_sub_9934,code
+0x9245,0x0001,gal_sub_9960,code
+# 92b1 = 3$
+0x92b6,0x0001,gal_sub_99aa,code
+0x930a,0x0001,gal_loc_99da,code
+0x9390,0x0001,gal_sub_9a5d,code
+0x939e,0x0001,gal_loc_9a6a,code
+# these get barr_9168[current alien] added to them and stored where indicated
+0x9421,0x0002,ptr_9ef1_base,word
+0x9423,0x0002,ptr_9efe_base,word
+0x9425,0x0002,ptr_9f18_base,word
+0x9427,0x0001,gal_sub_9add,code
+0x946e,0x0001,gal_sub_9b2d,code
+0x9475,0x0001,gal_loc_9b34,code
+0x94e4,0x0001,gal_sub_9b9e,code
+0x950d,0x0001,gal_sub_9bdc,code
+0x9538,0x0001,gal_sub_9c10,code
+0x956f,0x0001,gal_sub_9c85,code
+0x958b,0x0001,gal_sub_9ca1,code
+# this is probably called when we start to process a certain alien
+# it sets lookup tables that are used for animating the shape and other things
+0x959b,0x0001,setup_ptr_9ef1_ptr_9efe_ptr_9f18,code
+0x95b5,0x0001,gal_sub_9ccb,code
+0x97bf,0x0001,gal_sub_9e14,code
+0x97d4,0x0001,gal_loc_9e28,code
+0x9846,0x0001,gal_sub_9ea6,code
+0x9881,0x0001,gal_sub_9ecb,code
+# get_alien_shape_9eec = 0$
+0x98af,0x0002,gal_ptr_9ef1,word
+0x98c7,0x0001,physics_9ef7,code
+0x98ce,0x0002,gal_ptr_9efe,word
+0x990a,0x0001,gal_ptr_9f18,word
+0x9914,0x0001,physics_9f22,code
+# galaxian routine seems to have been split into 2 routines
+0x9973,0x0001,move_shell_by_velocity0,code
+0x9984,0x0001,move_shell_by_velocity1,code
+0x99a2,0x0001,move_missile_by_velocity,code
+0x99e3,0x0001,calculate_xy_a0d3,code
+#fix 0x9f88,0x0001,move_alien_shape_9f88,code
+#fix 0x9fcf,0x0001,move_missile,code
+0x9a19,0x0001,move_shell,code
+0x9a4f,0x0001,maybe_move_ship,code
+0x9a6e,0x0001,maybe_award_points,code
+#fix 0xa0d3,0x0001,calculate_xy_a0d3,code -- moved to above
+#fix 0xa0d9,0x0001,calculate_xy_a0d9,code
+#fix 0xa0f4,0x0001,clip_xy,code
+0x9abd,0x0001,move_ship,code
+0x9ad8,0x0001,move_shape_a12e,code
+0x9aed,0x0001,gal_loc_a147,code
+# returns a = x, y = y
+#fix 0xa156,0x0001,get_new_position,code
+0x9af8,0x0001,get_shape_a15f,code
+0x9aff,0x0001,gal_rts_a166,code
+0x9b00,0x0001,do_erase_shape,code
+# might also be doing collision detection?
+0x9b0c,0x0001,award_points,code
+# returns a = object x - 3, y = object y
+#fix 0xa205,0x0001,get_old_position,code
+# it can calculate a foot or an explosion shape
+# it can also return a value from a table directly
+0x9b8c,0x0001,get_alien_shape_a20f,code
+0x9baa,0x0001,gal_rts_a22d,code
+0x9bab,0x0001,move_alien_shape_a22e,code
+0x9bcf,0x0001,gal_loc_a255,code
+# called when an alien is killed and needs to be erased
+# decrements active_aliens, awards a win if decremented to zero
+0x9bda,0x0001,erase_shape_a264,code
+0x9bf8,0x0001,erase_missile,code
+0x9c14,0x0001,erase_shell,code
+# draws "score" followed by 4 digits followed by "0"
+# also updates high score if new score exceeds high score
+0x9c30,0x0001,draw_score,code
+# draws "high score" followed by 4 digits followed by "0"
+0x9c71,0x0001,draw_high_score,code
+0x9c96,0x0001,gal_rts_a331,code
+0x9c97,0x0001,draw_ships,code
+0x9cc0,0x0001,draw_wins,code
+0x9ce2,0x0001,set_base_draw_digit_pair,code
+0x9ce5,0x0001,draw_digit_pair,code
+0x9cf1,0x0001,set_base_draw_hi_digit,code
+0x9cf5,0x0001,set_base_draw_digit,code
+0x9cf8,0x0001,draw_digit,code
+0x9cfc,0x0001,draw_digit_base,byte
+# a = x (saved to draw_x1), y = y (saved to draw_erase_y0)
+0x9d00,0x0001,set_cursor,byte
+# do_title_display in text screen jumps to here
+# draws shapes draw_misc_50 through 5f at title_display_x, title_display_y
+0x9d05,0x0001,title_display,byte
+# does x * 0x1000 loops, can be cut short by keyboard input
+0x9d47,0x0001,delay_x,byte
+0xc000,0x0001,HW_KBD,byte
+0xc010,0x0001,HW_KBDSTRB,byte
+0xc030,0x0001,HW_SPKR,byte
+0xc050,0x0001,HW_TXTCLR,byte
+0xc052,0x0001,HW_MIXCLR,byte
+0xc054,0x0001,HW_PAGE1,byte
+0xc057,0x0001,HW_HIRES,byte
+0xc061,0x0001,HW_PB0,byte
+0xc062,0x0001,HW_PB1,byte
+0xc064,0x0001,HW_PADDL0,byte
+0xc065,0x0001,HW_PADDL1,byte
+0xc070,0x0001,HW_PTRIG,byte
+
+shape_names
+0x00,ship
+0x01,missile
+0x02,shell
+0x04,ship_explosion
+0x05,ship_explosion
+0x06,ship_explosion
+0x07,ship_explosion
+0x08,alien_foot
+0x09,alien_foot
+0x0a,alien_foot
+0x0b,alien_foot
+0x0c,alien_foot
+0x0d,alien_foot
+0x0e,alien_foot
+0x0f,alien_foot
+0x10,alien_explosion
+0x11,alien_explosion
+0x12,alien_explosion
+0x13,alien_explosion
+0x14,alien_foot
+0x15,alien_foot
+0x16,alien_foot
+0x17,alien_foot
+0x18,text_100
+0x19,text_200
+0x1a,text_300
+0x1b,text_500
+0x28,alien_head
+0x29,alien_head
+0x2a,alien_head
+0x3c,alien_head
+0x3d,alien_head
+0x3e,alien_head
+0x50,flagship
+0x51,flagship
+0x52,flagship
+
+misc_shape_names
+0x00,signature
+0x02,text_score
+0x03,text_score_0
+0x04,text_hiscore
+0x05,text_hiscore_0
+0x06,text_ships
+0x07,text_ships_blank
+0x08,text_wins
+0x09,text_wins_blank
+0x14,text_0
+0x15,text_1
+0x16,text_2
+0x17,text_3
+0x18,text_4
+0x19,text_5
+0x1a,text_6
+0x1b,text_7
+0x1c,text_8
+0x1d,text_9
+0x1e,text_0
+0x1f,text_1
+0x20,text_2
+0x21,text_3
+0x22,text_4
+0x23,text_5
+0x24,text_6
+0x25,text_7
+0x26,text_8
+0x27,text_9
+0x28,ships_0
+0x29,ships_1
+0x2a,ships_2
+0x2b,ships_3
+0x32,blank
+0x3c,flags_0
+0x3d,flags_1
+0x3e,flags_2
+0x3f,flags_3
+0x40,flags_4
+0x41,flags_5
+0x42,flags_6
+0x43,flags_7
+0x44,flags_8
+0x45,flags_9
+0x46,flags_00
+0x47,flags_10
+0x48,flags_20
+0x49,flags_30
+0x4a,flags_40
+0x4b,flags_50
+0x4c,flags_60
+0x4d,flags_70
+0x4e,flags_80
+0x4f,flags_90
+0x50,text_galaxian
+0x51,text_by
+0x52,text_tony_suzuki
+0x53,text_copyright_1980
+0x54,text_star_craft
+0x55,text_tokyo
+0x56,text_points
+0x57,flagship
+0x58,text_random_or_50
+0x59,alien
+0x5a,text_50_or_30
+0x5b,alien
+0x5c,text_30_or_10
+0x5d,text_special_add_1_ship_at_3000_pts
+0x64,bullet
index 75e95ef..e9d7d86 100644 (file)
@@ -32,6 +32,7 @@ items
 0x0017,0x0001,draw_temp,byte
 # saves value of ships before increment
 0x0018,0x0001,score_temp,byte
+0x001f,0x0001,gal_bvar_001f,byte
 0x0020,0x0001,draw_x_save,byte
 # high score in 4-digit BCD
 0x0023,0x0002,high_score,byte
@@ -40,19 +41,63 @@ items
 0x0025,0x0001,demo_mode,byte
 # I think this controls awarding of bonus ships
 0x0026,0x0001,score_threshold,byte
+0x0027,0x0001,gal_bvar_0027,byte
+# is it an array?
+0x0028,0x0001,gal_bvar_0028,byte
 # score in 4-digit BCD
 0x0029,0x0002,score,byte
+0x002b,0x0001,gal_bvar_002b,byte
+0x002c,0x0001,gal_bvar_002c,byte
+0x002d,0x0001,gal_bvar_002d,byte
+0x002e,0x0001,gal_barr_002e,byte
 0x0036,0x0001,starfield_count,byte
+# sizes have not been looked at yet
+0x0037,0x0001,gal_barr_0037,byte
+0x003f,0x0001,gal_barr_003f,byte
+0x0047,0x0001,gal_barr_0047,byte
+0x004f,0x0001,gal_barr_004f,byte
+0x0057,0x0001,gal_barr_0057,byte
+0x005f,0x0001,gal_bvar_005f,byte
+0x0060,0x0001,gal_bvar_0060,byte
+0x0061,0x0001,gal_bvar_0061,byte
+0x0062,0x0001,gal_bvar_0062,byte
+0x0063,0x0001,gal_bvar_0063,byte
+0x0064,0x0001,gal_bvar_0064,byte
+0x0067,0x0001,gal_bvar_0067,byte
+0x0068,0x0001,gal_bvar_0068,byte
 # ships in 2-digit BCD
 0x0069,0x0001,ships,byte
 0x006a,0x0001,active_aliens,byte
+0x006b,0x0001,gal_bvar_006b,byte
+0x006c,0x0001,gal_bvar_006c,byte
+0x006d,0x0001,gal_bvar_006d,byte
+0x006e,0x0001,gal_bvar_006e,byte
+0x006f,0x0001,gal_bvar_006f,byte
 # gets set to value of bvar_48a0 when win awarded
 # does it cause a new phalanx of aliens to appear?
 0x0071,0x0001,new_level_flag,byte
 # wins in 2-digit BCD
 0x0072,0x0001,wins,byte
+0x0073,0x0001,gal_bvar_0073,byte
+0x0074,0x0001,gal_bvar_0074,byte
+0x0075,0x0001,gal_bvar_0075,byte
+0x0078,0x0001,gal_bvar_0078,byte
+0x0079,0x0001,gal_bvar_0079,byte
+0x007a,0x0001,gal_bvar_007a,byte
+0x007c,0x0001,gal_bvar_007c,byte
+0x007d,0x0001,gal_bvar_007d,byte
+0x007e,0x0001,gal_bvar_007e,byte
+0x007f,0x0001,gal_bvar_007f,byte
+0x0081,0x0001,gal_bvar_0081,byte
+0x0085,0x0001,gal_bvar_0085,byte
+0x008e,0x0001,gal_bvar_008e,byte
 # saves x reg during calculation
 0x0091,0x0001,score_x_save,byte
+0x0093,0x0001,gal_bvar_0093,byte
+# sizes have not been examined yet
+0x00a9,0x0001,gal_barr_00a9,byte
+0x00b1,0x0001,gal_barr_00b1,byte
+0x00c0,0x0001,gal_barr_00c0,byte
 # bits 0 and 7 seem to be used for something
 # there seem to be aliens 0x01 (maybe 0x00) to 0x12
 # or maybe entry 0 is used for currently processing alien
@@ -257,49 +302,131 @@ items
 0x485e,0x0001,high_score_x,byte
 0x4860,0x0001,score_y,byte
 0x4862,0x0001,score_x,byte
+0x4864,0x0001,gal_bvar_4864,byte
+0x4866,0x0001,gal_bvar_4866,byte
+0x4868,0x0001,gal_bvar_4868,byte
+0x486c,0x0001,gal_bvar_486c,byte
 0x486e,0x0001,shell_y_velocity,byte
 0x4870,0x0001,shell_x_velocity_fraction,byte
 0x4872,0x0001,missile_y_velocity,byte
+0x4880,0x0001,gal_bvar_4880,byte
+0x4882,0x0001,gal_bvar_4882,byte
+0x4884,0x0001,gal_bvar_4884,byte
 0x4886,0x0001,high_score_init,byte
+0x4888,0x0001,gal_bvar_4888,byte
+0x488a,0x0001,gal_bvar_488a,byte
+0x488c,0x0001,gal_bvar_488c,byte
+0x488e,0x0001,gal_bvar_488e,byte
+0x4890,0x0001,gal_bvar_4890,byte
+0x4892,0x0001,gal_bvar_4892,byte
+0x4894,0x0001,gal_bvar_4894,byte
+0x489a,0x0001,gal_bvar_489a,byte
+0x489c,0x0001,gal_bvar_489c,byte
+0x489e,0x0001,gal_bvar_489e,byte
+0x48a0,0x0001,gal_bvar_48a0,byte
+0x48a2,0x0001,gal_bvar_48a2,byte
 # ships won't be redrawn if they exceed this
 0x48a4,0x0001,max_displayed_ships,byte
 0x48aa,0x0001,starfield_count_init,byte
+0x48ac,0x0001,gal_bvar_48ac,byte
+0x48ae,0x0001,gal_bvar_48ae,byte
+0x48b0,0x0001,gal_bvar_48b0,byte
 # used for clearing the screen in the beginning
 # seems to be x0, x1, y0, y1
 # it will be offset by the centre values x = 0x6c, y = 0x20
 0x48b2,0x0004,screen_size,byte
+0x48b6,0x0001,gal_bvar_48b6,byte
+0x48b7,0x0001,gal_bvar_48b7,byte
+0x48b8,0x0001,gal_bvar_48b8,byte
+0x48b9,0x0001,gal_bvar_48b9,byte
+0x48ba,0x0001,gal_bvar_48ba,byte
+0x48bb,0x0001,gal_bvar_48bb,byte
+0x48bc,0x0001,gal_bvar_48bc,byte
+0x48bd,0x0001,gal_bvar_48bd,byte
+0x48c2,0x0001,gal_bvar_48c2,byte
+0x48c3,0x0001,gal_bvar_48c3,byte
+0x48c4,0x0001,gal_bvar_48c4,byte
+0x48c5,0x0001,gal_bvar_48c5,byte
+0x48c9,0x0001,gal_bvar_48c9,byte
 # added to score, presumably when alien is destroyed
 0x48ca,0x0004,points_table,byte
+# sizes have not been examined yet
+0x48ce,0x0001,gal_barr_48ce,byte
 0x48de,0x0010,title_display_delay,byte
 0x48ee,0x0010,title_display_y,byte
 0x48fe,0x0010,title_display_x,byte
+# sizes have not been examined yet
+0x490f,0x0001,gal_barr_490f,byte
+0x492f,0x0001,gal_barr_492f,byte
+0x4a01,0x0001,gal_barr_4a01,byte
+0x4a41,0x0001,gal_barr_4a41,byte
+0x4a81,0x0001,gal_barr_4a81,byte
+0x4b41,0x0001,gal_barr_4b41,byte
+0x4b81,0x0001,gal_barr_4b81,byte
 # the basic shape
 # a value from a lookup table gets added to this
 0x4c01,0x0012,alien_shapes,byte
+# sizes have not been examined yet
+0x4c40,0x0001,gal_barr_4c40,byte
+0x4c48,0x0001,gal_barr_4c48,byte
+0x4c50,0x0001,gal_barr_4c50,byte
+0x4c58,0x0001,gal_barr_4c58,byte
+0x4c60,0x0001,gal_barr_4c60,byte
+0x4c68,0x0001,gal_barr_4c68,byte
+0x4c70,0x0001,gal_barr_4c70,byte
+0x4c78,0x0001,gal_barr_4c78,byte
+0x4d81,0x0001,gal_barr_4d81,byte
+0x4e80,0x0001,gal_bvar_4e80,byte
+0x5280,0x0001,gal_bvar_5280,byte
+0x5281,0x0001,gal_barr_5281,byte
+0x5680,0x0001,gal_bvar_5680,byte
+# sizes have not been examined yet
+0x5a80,0x0001,shape_data,byte
 0x7280,0x0380,shape_data_ptr_lo,byte
 0x7600,0x0380,shape_data_ptr_hi,byte
 0x7980,0x0380,shape_width_bytes,byte
 0x7d80,0x0080,shape_height,byte
+# sizes have not been examined yet
 0x7e80,0x0001,misc_shape_data,byte
 0x8a80,0x0080,misc_shape_data_ptr_lo,byte
 0x8b00,0x0080,misc_shape_data_ptr_hi,byte
 0x8b80,0x0080,misc_shape_width_bytes,byte
 0x8c00,0x0080,misc_shape_height,byte
 0x8c81,0x0028,star_x,byte
+# sizes have not been examined yet
+0x8ce1,0x0001,gal_barr_8ce1,byte
 0x8cf1,0x0008,shell_y,byte
 0x8d01,0x0008,shell_x_velocity,byte
 0x8d11,0x0008,shell_x,byte
 0x8d21,0x0008,shell_x_fraction,byte
 0x8d31,0x0028,star_y,byte
+# sizes have not been examined yet
+0x8d91,0x0001,gal_barr_8d91,byte
 0x8df1,0x0028,star_shape_left,byte
 0x8e51,0x0028,star_shape_right,byte
 0x8eb1,0x0028,star_y_velocity,byte
+# sizes have not been examined yet
+0x8f11,0x0001,gal_barr_8f11,byte
 0x8f71,0x0001,missile_y,byte
 0x8f79,0x0028,move_starfield_table,byte
+# sizes have not been examined yet
+0x8fd9,0x0001,gal_barr_8fd9,byte
 0x8fe1,0x0001,missile_x,byte
+# sizes have not been examined yet
+0x8fe8,0x0001,gal_barr_8fe8,byte
 0x9028,0x0012,y_9028,byte
+# sizes have not been examined yet
+0x9068,0x0001,gal_barr_9068,byte
 0x90a8,0x0012,x_90a8,byte
+# sizes have not been examined yet
+0x90e9,0x0001,gal_barr_90e9,byte
+0x9129,0x0001,gal_barr_9129,byte
+0x9168,0x0001,gal_barr_9168,byte
+0x91e9,0x0001,gal_barr_91e9,byte
+0x9229,0x0001,gal_barr_9229,byte
+0x932b,0x0001,gal_sub_932b,code
 0x937c,0x0001,init_bvar_0019,byte
+0x9383,0x0001,gal_sub_9383,code
 # see screen_size
 0x93a4,0x0004,screen_offset,byte
 # initialize clip_rect, clear screen, set hires
@@ -326,6 +453,7 @@ items
 # sets up draw_(x0|x1|y0|y1)
 # returns y:a = pointer to shape data
 0x942a,0x0001,draw_erase_setup,code
+# these are not done because the low byte of assembled word is meaningful
 #0x9466,0x0001,,code_ign # self-modifying code assembled with garbage word
 #0x9467,0x0002,,word
 #0x946e,0x0001,,code_ign # self-modifying code assembled with garbage word
@@ -344,7 +472,7 @@ items
 0x94e5,0x0001,,code_ign # accessing video_line_table before clipping y
 0x94fe,0x0001,,code_ign # self-modifying code assembled with garbage word
 0x94ff,0x0002,,word
-0x951c,0x0002,misc_shape_data_ptr_base,word
+0x951c,0x0002,misc_shape_data_ptr_base,word,byte
 # draws over previous video contents
 # a = shape to draw
 # draw_x1 = x0 for drawing and is advanced by routine
@@ -354,29 +482,65 @@ items
 0x9577,0x00c0,video_line_table_lo,byte,byte,10000
 0x9637,0x00c0,video_line_table_hi,byte,byte,10000
 0x9707,0x0001,start,code
+0x9751,0x0001,gal_sub_9751,code
 # initializes zpage, and probably other init, and draws something
 0x9780,0x0001,zpage_init,code
 0x9784,0x0001,,code_ign # zeroing zpage, don't merge cleared variables
+0x979f,0x0001,gal_sub_979f,code
+0x97be,0x0001,gal_sub_97be,code
+0x97c5,0x0001,gal_sub_97c5,code
+0x97fc,0x0001,gal_sub_97fc,code
+0x980b,0x0001,gal_loc_980b,code
+0x9815,0x0001,gal_rts_9815,code
+0x9816,0x0001,gal_sub_9816,code
+0x9820,0x0001,gal_loc_9820,code
+0x9821,0x0002,gal_ptr_9821,word
+# sizes have not been exained yet
+0x982e,0x0001,gal_barr_982e,byte
+0x9836,0x0001,gal_barr_9836,byte
 # used for colouring the starfield
 0x983e,0x0001,star_mask_table_left,byte
 0x9842,0x0001,star_mask_table_right,byte
 # called when star goes off screen at y = 0xe0
 # randomize the x position for restart at y = 0x20
 0x9846,0x0001,regenerate_star,byte
+0x9859,0x0001,gal_sub_9859,code
 0x989e,0x0001,move_starfield,code
 0x98e0,0x0001,,code_ign # accessing video_line_table before clipping y
 0x98e5,0x0001,,code_ign # accessing video_line_table before clipping y
 0x990a,0x0001,,code_ign # accessing video_line_table before clipping y
 0x990f,0x0001,,code_ign # accessing video_line_table before clipping y
+0x9934,0x0001,gal_sub_9934,code
+0x9960,0x0001,gal_sub_9960,code
+0x99aa,0x0001,gal_sub_99aa,code
+0x99da,0x0001,gal_loc_99da,code
+0x9a5d,0x0001,gal_sub_9a5d,code
+0x9a6a,0x0001,gal_loc_9a6a,code
 # these get barr_9168[current alien] added to them and stored where indicated
 0x9ad7,0x0002,ptr_9ef1_base,word
 0x9ad9,0x0002,ptr_9efe_base,word
 0x9adb,0x0002,ptr_9f18_base,word
+0x9add,0x0001,gal_sub_9add,code
+0x9b2d,0x0001,gal_sub_9b2d,code
+0x9b34,0x0001,gal_loc_9b34,code
+0x9b9e,0x0001,gal_sub_9b9e,code
+0x9bdc,0x0001,gal_sub_9bdc,code
+0x9c10,0x0001,gal_sub_9c10,code
+0x9c85,0x0001,gal_sub_9c85,code
+0x9ca1,0x0001,gal_sub_9ca1,code
 # this is probably called when we start to process a certain alien
 # it sets lookup tables that are used for animating the shape and other things
 0x9cb1,0x0001,setup_ptr_9ef1_ptr_9efe_ptr_9f18,code
+0x9ccb,0x0001,gal_sub_9ccb,code
+0x9e14,0x0001,gal_sub_9e14,code
+0x9e28,0x0001,gal_loc_9e28,code
+0x9ea6,0x0001,gal_sub_9ea6,code
+0x9ecb,0x0001,gal_sub_9ecb,code
 0x9eec,0x0001,get_alien_shape_9eec,code
+0x9ef1,0x0002,gal_ptr_9ef1,word
 0x9ef7,0x0001,physics_9ef7,code
+0x9efe,0x0002,gal_ptr_9efe,word
+0x9f18,0x0001,gal_ptr_9f18,word
 0x9f22,0x0001,physics_9f22,code
 0x9f5b,0x0001,move_shell_by_velocity,code
 0x9f7d,0x0001,move_missile_by_velocity,code
@@ -390,9 +554,11 @@ items
 0xa0f4,0x0001,clip_xy,code
 0xa10d,0x0001,move_ship,code
 0xa12e,0x0001,move_shape_a12e,code
+0xa147,0x0001,gal_loc_a147,code
 # returns a = x, y = y
 0xa156,0x0001,get_new_position,code
 0xa15f,0x0001,get_shape_a15f,code
+0xa166,0x0001,gal_rts_a166,code
 0xa167,0x0001,do_erase_shape,code
 # might also be doing collision detection?
 0xa173,0x0001,award_points,code
@@ -401,7 +567,9 @@ items
 # it can calculate a foot or an explosion shape
 # it can also return a value from a table directly
 0xa20f,0x0001,get_alien_shape_a20f,code
+0xa22d,0x0001,gal_rts_a22d,code
 0xa22e,0x0001,move_alien_shape_a22e,code
+0xa255,0x0001,gal_loc_a255,code
 # called when an alien is killed and needs to be erased
 # decrements active_aliens, awards a win if decremented to zero
 0xa264,0x0001,erase_shape_a264,code
@@ -412,6 +580,7 @@ items
 0xa2cb,0x0001,draw_score,code
 # draws "high score" followed by 4 digits followed by "0"
 0xa30c,0x0001,draw_high_score,code
+0xa331,0x0001,gal_rts_a331,code
 0xa332,0x0001,draw_ships,code
 0xa354,0x0001,draw_wins,code
 0xa376,0x0001,set_base_draw_digit_pair,code
@@ -435,6 +604,7 @@ items
 0xc057,0x0001,HW_HIRES,byte
 0xc061,0x0001,HW_PB0,byte
 0xc062,0x0001,HW_PB1,byte
+0xc064,0x0001,HW_PADDL0,byte
 0xc065,0x0001,HW_PADDL1,byte
 0xc070,0x0001,HW_PTRIG,byte
 
diff --git a/galaxian/uncomment.sh b/galaxian/uncomment.sh
new file mode 100755 (executable)
index 0000000..41647e5
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# use like this:
+#   ./uncomment.sh <galaxian.asm >a
+#   ./uncomment.sh <alien_typhoon.asm >b
+#   diff --unified a b >c
+
+sed -e 's/[ \t]*;.*//; s/:\t/:\n\t/' |\
+sed -e 's/^\(\t...\)\(\t[^0-9#*]\)/\1\n\t\2/; s/^\(\t...\t\*\)/\1\n\t\t/'