diff --git a/shapetable_party/dsr_shape.s b/shapetable_party/dsr_shape.s index 87495b29..76ef768a 100644 --- a/shapetable_party/dsr_shape.s +++ b/shapetable_party/dsr_shape.s @@ -36,62 +36,65 @@ dsr_demo: ;========================================= - lda #$20 ; clear HGR page0 to white - sta HGR_PAGE + lda #$20 ; 2 ; set HGR page0 + sta HGR_PAGE ; 2 + sta XPOS ; 2 ; setup XPOS for future - lda #$ff - jsr HCLR_COLOR + lda #$ff ; 2 + jsr HCLR_COLOR ; 3 ; clear HGR page0 to white - jsr HGR2 ; clear HGR page1 to black - ; Hi-res graphics, no text at bottom - ; Y=0, A=$60 after this call + jsr HGR2 ; 3 ; set/clear HGR page1 to black + ; Hi-res graphics, no text at bottom + ; Y=0, A=$60 after this call - ldx #1 - stx HGR_SCALE + sty XPOSH ; 2 + sty FRAME ; 2 - ldx #30 - stx XPOS - lda #0 - sta XPOSH - sta FRAME - lda #180 - sta YPOS + iny ; 1 ; set shape table scale to 1 + sty HGR_SCALE ; 2 + + ;========================= + ; draw crowd + ;========================= + + ; XPOS already 32 from earlier + + lda #180 ; 2 + sta YPOS ; 2 crowd_loop: - jsr xdraw ; draw + jsr xdraw ; 3 ; xdraw on page1 - lsr HGR_PAGE ; $40 -> $20 + lsr HGR_PAGE ; 2 ; switch to page0 ($40 -> $20) - jsr xdraw ; draw + jsr xdraw ; 3 ; xdraw on page 0 - asl HGR_PAGE ; $20 -> $40 + asl HGR_PAGE ; 2 ; switch back to page1 $20 -> $40 - clc - lda XPOS - adc #20 - sta XPOS - cmp #250 - bne crowd_loop + ; clc ; carry should always be 0 from asl + lda XPOS ; 2 + adc #16 ; 2 + sta XPOS ; 2 + cmp #240 ; 2 + bcc crowd_loop ; 2 ; get ready for DSR loop - ldx #