From 3dd58736d78fd2cbfa6a6142422c5e6921554cba Mon Sep 17 00:00:00 2001 From: Pecusx Date: Sat, 12 Nov 2022 12:18:07 +0100 Subject: [PATCH] Rounding proposal. --- grafproc.asm | 29 +++++++++++++++-------------- scorch.bin | Bin 32768 -> 32768 bytes scorch.xex | Bin 49134 -> 49134 bytes 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/grafproc.asm b/grafproc.asm index e0b1411..f109b2b 100644 --- a/grafproc.asm +++ b/grafproc.asm @@ -2109,24 +2109,25 @@ YangleUnder90 sta vy lda #0 ; all arithmetic to zero - sta fx - sta fy sta vx+1 sta vy+1 +; lda #128 ; ; add 0.5 to fx and fy (not vx and vx) for better rounding - it's my opinion (Pecus) + sta fx + sta fy - ;; add 0.5 to vx and vy for better rounding - ;clc - ;lda vx - ;adc #128 ; 1/2 - ;sta vx - ;scc:inc vx+1 - ; - ;clc - ;lda vy - ;adc #128 ; 1/2 - ;sta vy - ;scc:inc vy+1 +/* ; add 0.5 to vx and vy for better rounding + clc + lda vx + adc #128 ; 1/2 + sta vx + scc:inc vx+1 + clc + lda vy + adc #128 ; 1/2 + sta vy + scc:inc vy+1 + */ ; draw by vx vy ; in each step ; 1. plot(xdraw, ydraw) diff --git a/scorch.bin b/scorch.bin index 91040648747bdac00c2bf4be2225282a470754f8..026b8dffb9ad5d8c9e76e3a11f24a355f9dc0f98 100644 GIT binary patch delta 22 dcmZo@U}|V!+F)nPzPojMYfEeUW>?$YP5@@`33UJf delta 22 dcmZo@U}|V!+F)nP-qPCMy1RAzW>?$YP5@<833UJf diff --git a/scorch.xex b/scorch.xex index b213d4edbb9f7cefe9757529679f5b7fbce8555f..51842d1c0ad04a3a12909e7ce6c9eada0e2dc48d 100644 GIT binary patch delta 22 ecmaF&pXuFyrVUH$*mt*XZ*6I9-@K;I$q@jS>I@|S delta 22 ecmaF&pXuFyrVUH$*jrlLTX(l^-@K;I$q@jRP7Eag