This commit is contained in:
Brooke Vibber 2023-02-05 15:14:24 -08:00
parent e9f8aa1512
commit 839330edb3

View file

@ -772,13 +772,14 @@ loop_sx:
jsr mandelbrot
jsr pset
; check if we should update the counters
;
; count_pixels >= width? update!
inc count_pixels
lda count_pixels
cmp #width
bpl update_status
bmi update_status
; count_frames >= 120? update!
lda count_frames
@ -820,14 +821,13 @@ update_status:
; FR0 *= ms_per_frame
ldx #.lobyte(ms_per_frame)
ldy #.hibyte(ms_per_frame)
jsr FLD1R
jsr FMUL
; FR1 = total_ms
; FR0 += total_ms
ldx #total_ms
ldy #0
jsr FLD1R
; FR0 += FR1
jsr FADD
; total_ms = FR0
@ -835,12 +835,10 @@ update_status:
ldy #0
jsr FST0R
; FR1 = total_pixels
; FR0 /= total_pixels
ldx #total_pixels
ldy #0
jsr FLD1R
; FR0 /= FR1
jsr FDIV
; convert to ASCII in INBUFF