fixes
This commit is contained in:
parent
e9f8aa1512
commit
839330edb3
1 changed files with 5 additions and 7 deletions
12
mandel.s
12
mandel.s
|
@ -772,13 +772,14 @@ loop_sx:
|
||||||
jsr mandelbrot
|
jsr mandelbrot
|
||||||
jsr pset
|
jsr pset
|
||||||
|
|
||||||
|
|
||||||
; check if we should update the counters
|
; check if we should update the counters
|
||||||
;
|
;
|
||||||
; count_pixels >= width? update!
|
; count_pixels >= width? update!
|
||||||
inc count_pixels
|
inc count_pixels
|
||||||
lda count_pixels
|
lda count_pixels
|
||||||
cmp #width
|
cmp #width
|
||||||
bpl update_status
|
bmi update_status
|
||||||
|
|
||||||
; count_frames >= 120? update!
|
; count_frames >= 120? update!
|
||||||
lda count_frames
|
lda count_frames
|
||||||
|
@ -820,14 +821,13 @@ update_status:
|
||||||
; FR0 *= ms_per_frame
|
; FR0 *= ms_per_frame
|
||||||
ldx #.lobyte(ms_per_frame)
|
ldx #.lobyte(ms_per_frame)
|
||||||
ldy #.hibyte(ms_per_frame)
|
ldy #.hibyte(ms_per_frame)
|
||||||
|
jsr FLD1R
|
||||||
jsr FMUL
|
jsr FMUL
|
||||||
|
|
||||||
; FR1 = total_ms
|
; FR0 += total_ms
|
||||||
ldx #total_ms
|
ldx #total_ms
|
||||||
ldy #0
|
ldy #0
|
||||||
jsr FLD1R
|
jsr FLD1R
|
||||||
|
|
||||||
; FR0 += FR1
|
|
||||||
jsr FADD
|
jsr FADD
|
||||||
|
|
||||||
; total_ms = FR0
|
; total_ms = FR0
|
||||||
|
@ -835,12 +835,10 @@ update_status:
|
||||||
ldy #0
|
ldy #0
|
||||||
jsr FST0R
|
jsr FST0R
|
||||||
|
|
||||||
; FR1 = total_pixels
|
; FR0 /= total_pixels
|
||||||
ldx #total_pixels
|
ldx #total_pixels
|
||||||
ldy #0
|
ldy #0
|
||||||
jsr FLD1R
|
jsr FLD1R
|
||||||
|
|
||||||
; FR0 /= FR1
|
|
||||||
jsr FDIV
|
jsr FDIV
|
||||||
|
|
||||||
; convert to ASCII in INBUFF
|
; convert to ASCII in INBUFF
|
||||||
|
|
Loading…
Reference in a new issue