diff --git a/graphics/hgr/boxes/fast_test.s b/graphics/hgr/boxes/fast_test.s index 61117c35..f87f5ada 100644 --- a/graphics/hgr/boxes/fast_test.s +++ b/graphics/hgr/boxes/fast_test.s @@ -6,6 +6,7 @@ GBASL = $26 GBASH = $27 +OTHER_MASK = $73 XRUN = $74 COUNT = $75 @@ -141,7 +142,41 @@ simple_rectangle_loop: lda HGR_BITS jsr COLOR_SHIFT - ; check if narrow case where in same +no_shift: + + ; check if narrow corner case where begin and end same block + ; if RX%7 + XRUN > 8 + + ldx VGI_RX1 + lda mod7_table,X + clc + adc XRUN + cmp #8 + bcs not_corner + +; jmp not_corner + +corner: + ; want to use MASK of left_mask, MOD7 and 7-XRUN + + lda #7 + sec + sbc XRUN + sta OTHER_MASK + + lda mod7_table,X + tax + + lda (GBASL),Y + eor HGR_BITS + and left_masks,X + and OTHER_MASK + eor (GBASL),Y + sta (GBASL),Y + + jmp done_row + +not_corner: ; see if not starting on boundary ldx VGI_RX1 @@ -164,9 +199,12 @@ simple_rectangle_loop: adc XRUN sta XRUN -no_shift: + lda HGR_BITS + jsr COLOR_SHIFT +;no_shift: + ; draw common draw_run: lda XRUN