From 435fc84f7b1c7cd611c038e4f5dee9d57f0011ea Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Thu, 16 May 2019 12:47:04 -0400 Subject: [PATCH] pt3: visualization: boring stripes --- pt3_player/fire.s | 68 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/pt3_player/fire.s b/pt3_player/fire.s index 8063b1a9..91bf416b 100644 --- a/pt3_player/fire.s +++ b/pt3_player/fire.s @@ -77,9 +77,71 @@ draw_fire_frame: ; Update fire frame ;=============================== + lda #fire_framebuffer + sta FIRE_FB_H + + lda #<(fire_framebuffer+40) + sta FIRE_FB2_L + + lda #>(fire_framebuffer+40) + sta FIRE_FB2_H + + ldx #0 + +fire_fb_update: + + ldy #39 +fire_fb_update_loop: + + ; get next line color + lda (FIRE_FB2_L),Y + + ; adjust it + clc + adc #$ff + + ; saturate to 0 + bpl fb_positive + lda #0 +fb_positive: + + ; store out + sta (FIRE_FB_L),Y ; store out + + dey + bpl fire_fb_update_loop + +done_fire_fb_update_loop: + + ; complicated adjustment + clc + lda FIRE_FB_L + adc #40 + sta FIRE_FB_L + lda FIRE_FB_H + adc #0 + sta FIRE_FB_H + + clc + lda FIRE_FB2_L + adc #40 + sta FIRE_FB2_L + lda FIRE_FB2_H + adc #0 + sta FIRE_FB2_H + + inx + cpx #(FIRE_YSIZE-1) + bne fire_fb_update + + + ;=============================== ; copy framebuffer to low-res screen - + ;=============================== lda #