workaround for rounding us/iter

for some reason rounding is giving me wrong results
not sure what i'm doing wrong :D

just show 6 digits :P

ok this gets the us/iter working, and it is more stable
but the elapsed time still needs to be added
This commit is contained in:
Brooke Vibber 2025-01-05 14:29:27 -08:00
parent 918d15e813
commit 7c04862d70

View file

@ -156,7 +156,7 @@ str_self_len = str_self_end - str_self
str_speed_len = str_speed_end - str_speed str_speed_len = str_speed_end - str_speed
str_run_len = str_run_end - str_run str_run_len = str_run_end - str_run
str_done_len = str_done_end - str_done str_done_len = str_done_end - str_done
speed_precision = 5 speed_precision = 6
speed_start = 40 - str_done_len - str_speed_len - speed_precision - 1 speed_start = 40 - str_done_len - str_speed_len - speed_precision - 1
speed_len = 14 + str_speed_len speed_len = 14 + str_speed_len
@ -197,17 +197,17 @@ aspect_x: ; fixed3.13 5/4
aspect_y: ; fixed3.13 3/4 aspect_y: ; fixed3.13 3/4
.word 3 << (13 - 2) .word 3 << (13 - 2)
sec_per_frame: ; float48 0.016666667 sec_per_frame: ; float48 00 . 01 66 66 66 67
.byte 63 ; exponent/sign - -2 .byte 63 ; exponent/sign - -1 bytes
.byte $01 ; BCD digits .byte $01 ; BCD digits
.byte $66 .byte $66
.byte $66 .byte $66
.byte $66 .byte $66
.byte $67 .byte $67
us_per_sec: ; float48 1e9 us_per_sec: ; float48 1e9 01 00 0,0 00 . 00
.byte 68 ; exponent/sign +8 .byte 67 ; exponent/sign +3 bytes
.byte $10 ; BCD digits .byte $01 ; BCD digits
.byte $00 .byte $00
.byte $00 .byte $00
.byte $00 .byte $00
@ -1749,9 +1749,12 @@ update_status:
jsr FLD1R jsr FLD1R
jsr FMUL jsr FMUL
; @fixme
; round to integer ; round to integer
jsr FPI ; for some reason this gives bad results?
jsr IFP ;clc
;jsr FPI
;jsr IFP
; convert to ASCII in INBUFF ; convert to ASCII in INBUFF
jsr FASC jsr FASC