Begin the Galaxian analysis, improve ignores in disassembler
authorNick Downing <nick@ndcode.org>
Tue, 28 Jun 2022 03:20:44 +0000 (13:20 +1000)
committerNick Downing <nick@ndcode.org>
Tue, 28 Jun 2022 06:07:20 +0000 (16:07 +1000)
disasm/disasm.py
disasm/galaxian.txt
disasm/star_blazer.asm.patch
disasm/star_blazer.txt

index 26e226e..072d602 100755 (executable)
@@ -269,6 +269,7 @@ def flush_locals():
 
 item = 0
 modified = False
+ignore = False
 # note: modifies local_defs
 def add_item(
   addr,
@@ -297,6 +298,8 @@ def add_item(
   #  'writeable',
   #  writeable
   #)
+  if ignore:
+    return get_item(addr)
   end = addr + size
 
   # find start of overlapping items
@@ -813,11 +816,11 @@ def disasm_code(addr):
 
 # a basic disassembler is provided without any analysis, for problem
 # instructions which would cause undesirable merging of memory items
-def disasm_code_ign(addr):
-  n, instr = disassembler.instruction_at(addr)
-  instr = instr.lower().split()
-  instr[1] = instr[1].replace('(', '[').replace(')', ']').replace('$', '0x')
-  return n, instr
+#def disasm_code_ign(addr):
+#  n, instr = disassembler.instruction_at(addr)
+#  instr = instr.lower().split()
+#  instr[1] = instr[1].replace('(', '[').replace(')', ']').replace('$', '0x')
+#  return n, instr
 
 def disasm_word(addr, extra_types = [], mate = (0, 1)):
   return 2, ['.dw', word_operand(addr, extra_types, mate)]
@@ -959,11 +962,9 @@ while modified:
             item_info[item].type == ITEM_CODE or
               item_info[item].type == ITEM_CODE_IGN
           ):
-            n, instr = (
-              disasm_code_ign
-            if item_info[item].type == ITEM_CODE_IGN else
-              disasm_code
-            )(addr)
+            ignore = item_info[item].type == ITEM_CODE_IGN
+            n, instr = disasm_code(addr)
+            ignore = False
 
             # use disassembly for reg display, even if falling back to byte
             instr0 = instr
index e4f3944..04b5e76 100644 (file)
@@ -3,14 +3,296 @@ areas
 0x4000,0x6d01,text0,init
 
 items
-0x93d6,0x0001,,code_ign # bug? overruns larr_9577
-0x93de,0x0001,,code_ign # bug? overruns harr_9637
+# 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
+# lo byte of (shift count * 0x80) + shape
+# also y coordinate temporary storage
+0x0017,0x0001,draw_temp,byte
+0x0020,0x0001,draw_x_save,byte
+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
+# is it really?
+0x7280,0x00d2,shape_ptr_lo_7280,byte
+0x7480,0x00d2,shape_ptr_lo_7480,byte
+# is it really?
+0x7600,0x00d2,shape_ptr_hi_7600,byte
+0x7800,0x00d2,shape_ptr_hi_7800,byte
+# is it really?
+0x7980,0x00d2,shape_width_bytes_7980,byte
+0x7b80,0x00d2,shape_width_bytes_7b80,byte
+0x7d80,0x0053,shape_height_bytes_7d80,byte
+# initialize clip_rect, clear screen, set hires
+0x93a8,0x0001,video_init,code
+0x93be,0x0001,,code_ign # self-modifying code assembled with garbage word
+0x93bf,0x0002,,word
+# clears rectangle described by clip_rect
+0x93d4,0x0001,video_clear_rect,code
+0x93d6,0x0001,,code_ign # accessing video_line_table before clipping y
+0x93de,0x0001,,code_ign # accessing video_line_table before clipping y
+# returns a = quotient, y = remainder, cf = 0
+0x93f6,0x0001,div_a_by_7,code
+# the value from shape_ptr_lo/hi is relative to this value
+0x9414,0x0002,shape_ptr_base,word,byte
+0x9416,0x0007,x2_mod7_table,byte
+0x941d,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
+0x9424,0x0002,shape_ptr_lo_base,word,byte
+0x9426,0x0002,shape_ptr_hi_base,word,byte
+0x9428,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
+0x942a,0x0001,draw_erase_setup,code
+#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
+#0x946f,0x0002,,word
+#0x9476,0x0001,,code_ign # self-modifying code assembled with garbage word
+#0x9477,0x0002,,word
+# erases and then draws shape
+0x947f,0x0001,move_shape,code
+0x9482,0x0001,draw_shape,code
 0x9491,0x0001,,code_ign # causes merging of code items
-0x9499,0x0001,,code_ign # bug? overruns harr_9637
+0x9499,0x0001,,code_ign # accessing video_line_table before clipping y
+0x94b2,0x0001,,code_ign # self-modifying code assembled with garbage word
+0x94b3,0x0002,,word
+0x94ce,0x0001,erase_shape,code
 0x94dd,0x0001,,code_ign # causes merging of code items
-0x94e5,0x0001,,code_ign # bug? overruns harr_9637
+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
+# draws over previous video contents
+0x951e,0x0001,draw_misc,code
+0x955d,0x0001,,code_ign # self-modifying code assembled with garbage word
+0x955e,0x0002,,word
+0x9577,0x00c0,video_line_table_lo,byte,byte,10000
+0x9637,0x00c0,video_line_table_hi,byte,byte,10000
 0x9707,0x0001,start,code
-0x98e0,0x0001,,code_ign # bug? overruns larr_9577
-0x98e5,0x0001,,code_ign # bug? overruns harr_9637
-0x990a,0x0001,,code_ign # bug? overruns larr_9577
-0x990f,0x0001,,code_ign # bug? overruns harr_9637
+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
+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
+0xc065,0x0001,HW_PADDL1,byte
+0xc070,0x0001,HW_PTRIG,byte
index 94dde44..edc91e6 100644 (file)
@@ -1,5 +1,5 @@
---- star_blazer.asm0   2022-06-27 10:15:24.503993450 +1000
-+++ star_blazer.asm    2022-06-27 10:16:17.415992796 +1000
+--- star_blazer.asm0   2022-06-28 11:55:37.439914841 +1000
++++ star_blazer.asm    2022-06-28 12:09:26.663904584 +1000
 @@ -1,3 +1,10 @@
 +UNREACHABLE = 1
 +DHGR = 0
@@ -91,8 +91,8 @@
        tsx                             ; 1095 -> 1097 -> 1098 r
        stx     *ucode_sp               ; 1097 -> 1098 -> 109a r
        ldx     *ucode_x_save_c9        ; 1098 -> 109a -> 109c r
--      lda     0xaee0,x                ; 109a -> 109c -> 109f r x=01..7f
-+      lda     object1080_state - 0x10,x ;0xaee0,x             ; 109a -> 109c -> 109f r x=01..7f
+-      lda     object1080_y1 + 0x60,x  ; 109a -> 109c -> 109f r x=01..7f
++      lda     object1080_state - 0x10,x ;object1080_y1 + 0x60,x       ; 109a -> 109c -> 109f r x=01..7f
        sta     *ucode_object_state     ; 109c -> 109f -> 10a1 r
  ucode_execute_words_entry:
        ldy     #0x00                   ; 1090,109f -> 10a1 -> 10a3 r
        jsr     do_ucode_word           ; 10c6 -> 10c8 -> 106a r s=f7..f9,02
        bne     3$                      ; 107b -> 10cb -> 10c0 r z=0
  ucode_execute_words_done:
--      lda     0xaee0,x                ; 1093,10a5,10ba,10c2,10c6 -> 10cd -> 10d0 r x=01..7f
-+      lda     object1080_state - 0x10,x ;0xaee0,x             ; 1093,10a5,10ba,10c2,10c6 -> 10cd -> 10d0 r x=01..7f
+-      lda     object1080_y1 + 0x60,x  ; 1093,10a5,10ba,10c2,10c6 -> 10cd -> 10d0 r x=01..7f
++      lda     object1080_state - 0x10,x ;object1080_y1 + 0x60,x       ; 1093,10a5,10ba,10c2,10c6 -> 10cd -> 10d0 r x=01..7f
        rts                             ; 10cd -> 10d0 -> 123e,143a,1615,1629,1633,1649,165b,1759 r s=f7..fd,02
  ucode_execute_fire_in_state_fn:
        beq     rts_10ec                ; 1216,123b,1260,1285 -> 10d1 -> 10d3,10ec r z=0..1
 +      sta     [*video_line_ptr],y
 +93$:  iny
 +.endif
- 6$:   .db     0xbd                    ; 1b69,1b76 -> 1b6b -> 1b6e r "lda 0x6f9f,x" x=00..39
+ 6$:   .db     0xbd                    ; 1b69,1b76 -> 1b6b -> 1b6e r "lda bvar_6f9f,x" x=00..39
  7$:   .dw     0x6f9f                  ; 1b6c rw
        ora     [*video_line_ptr],y     ; 1b6b -> 1b6e -> 1b70 r y=6c..93
 @@ -2470,16 +2634,50 @@
 +.endif
        ldx     #0x00                   ; 1b8f -> 1b92 -> 1b94 r
        ldy     *draw_y                 ; 1b92 -> 1b94 -> 1b96 r
--9$:   lda     0xa9e0,y                ; 1b94,1bc7 -> 1b96 -> 1b99 r y=11..d8
-+9$:   lda     video_line_table_lo - 0x20,y ;0xa9e0,y          ; 1b94,1bc7 -> 1b96 -> 1b99 r y=11..d8
+-9$:   lda     x_table_times2_mod7_minus_03 + 0xe0,y ; 1b94,1bc7 -> 1b96 -> 1b99 r y=11..d8
++9$:   lda     video_line_table_lo - 0x20,y ;x_table_times2_mod7_minus_03 + 0xe0,y ; 1b94,1bc7 -> 1b96 -> 1b99 r y=11..d8
        sta     *video_line_ptr         ; 1b96 -> 1b99 -> 1b9b r
--      lda     0xaaa0,y                ; 1b99 -> 1b9b -> 1b9e r y=11..d8
-+      lda     video_line_table_hi - 0x20,y ;0xaaa0,y          ; 1b99 -> 1b9b -> 1b9e r y=11..d8
+-      lda     video_line_table_lo + 0xa0,y ; 1b99 -> 1b9b -> 1b9e r y=11..d8
++      lda     video_line_table_hi - 0x20,y ;video_line_table_lo + 0xa0,y ; 1b99 -> 1b9b -> 1b9e r y=11..d8
        sta     *video_line_ptr + 1     ; 1b9b -> 1b9e -> 1ba0 r
        ldy     *draw_x0                ; 1b9e -> 1ba0 -> 1ba2 r
 +.if DHGR ; draw overflow pixel
 +.endif
        ldx     #0x00                   ; 1c73 -> 1c76 -> 1c78 r
        ldy     *draw_y                 ; 1c76 -> 1c78 -> 1c7a r
--4$:   lda     0xa9e0,y                ; 1c78,1cad -> 1c7a -> 1c7d r y=11..d8
-+4$:   lda     video_line_table_lo - 0x20,y ;0xa9e0,y          ; 1c78,1cad -> 1c7a -> 1c7d r y=11..d8
+-4$:   lda     x_table_times2_mod7_minus_03 + 0xe0,y ; 1c78,1cad -> 1c7a -> 1c7d r y=11..d8
++4$:   lda     video_line_table_lo - 0x20,y ;x_table_times2_mod7_minus_03 + 0xe0,y ; 1c78,1cad -> 1c7a -> 1c7d r y=11..d8
        sta     *video_line_ptr         ; 1c7a -> 1c7d -> 1c7f r
--      lda     0xaaa0,y                ; 1c7d -> 1c7f -> 1c82 r y=11..d8
-+      lda     video_line_table_hi - 0x20,y ;0xaaa0,y          ; 1c7d -> 1c7f -> 1c82 r y=11..d8
+-      lda     video_line_table_lo + 0xa0,y ; 1c7d -> 1c7f -> 1c82 r y=11..d8
++      lda     video_line_table_hi - 0x20,y ;video_line_table_lo + 0xa0,y ; 1c7d -> 1c7f -> 1c82 r y=11..d8
        sta     *video_line_ptr + 1     ; 1c7f -> 1c82 -> 1c84 r
        ldy     *draw_x0                ; 1c82 -> 1c84 -> 1c86 r
 +.if DHGR ; erase overflow pixel
index 4ec7b93..de7f32e 100644 (file)
@@ -416,16 +416,16 @@ items
 0x1aaf,0x0001,draw_object,code
 0x1b6b,0x0001,,code_ign # self-modifying code assembled with garbage word
 0x1b6c,0x0002,,word
-0x1b96,0x0001,,code_ign # bug? spans a900 and aa00 tables, don't merge them
-0x1b9b,0x0001,,code_ign # bug? spans aa00 and ab00 tables, don't merge them
+0x1b96,0x0001,,code_ign # accessing video_line_table before clipping y
+0x1b9b,0x0001,,code_ign # accessing video_line_table before clipping y
 0x1bb4,0x0001,,code_ign # self-modifying code assembled with garbage word
 0x1bb5,0x0002,,word
 0x1bcc,0x0001,erase_pixel_object,code
 0x1c0d,0x0001,erase_object,code
 0x1c50,0x0001,,code_ign # self-modifying code assembled with garbage word
 0x1c51,0x0002,,word
-0x1c7a,0x0001,,code_ign # bug? spans a900 and aa00 tables, don't merge them
-0x1c7f,0x0001,,code_ign # bug? spans aa00 and ab00 tables, don't merge them
+0x1c7a,0x0001,,code_ign # accessing video_line_table before clipping y
+0x1c7f,0x0001,,code_ign # accessing video_line_table before clipping y
 0x1c98,0x0001,,code_ign # self-modifying code assembled with garbage word
 0x1c99,0x0002,,word
 0x1cb2,0x0001,draw_misc,code