Login
Back to forumSee the full topicGo to last reply

Posted By

MMS
on 2017-04-29
06:27:55
 Re: Use of CIRCLE command in Multicolor Mode

Hi SVS

just by accident I noticed the BLARG BASIC extension to C64, by SLJ (Stephen Judd)

It is only HIRES,unfortunately
It has a well documented (though not multicolor) Circle routine, that is
1) more round (and not 128 sided polygon)
2) stated to be 49x faster than the BASIC7.0 routine (that should be close to 3.5 version speed)

May worth a look, if you gave up with the built in routine.
Certainly it requires the change of the code and the memory addresses.
http://www.ffd2.com/fridge/programs/blarg/

I tested it with a C64 emu (Micro64) and the Circle and Line route are pretty fast.
He was able to demonstrate a Tunnel Demo with 1-3 sec updates, and that is really impressive in BASIC!


An other option:
There was a BASIC routine from the same guy (SLJ) to implement ROUND circle based on BASIC mathematical calculations, without using complex ones.
Not using PI or any other complex floating point stuff, and that speeds up things significantly.

Built in BASIC3.5 routine is faster (as it is an assembly code happy ), but this one also looks good, and the shape look a little better in HIRES. Multicolor modification not done.
I tried with Autrospeed (could speed things up), but maybe I am not experienced enough with it, I failed to create a running file (maybe too small/short code).

It was in the Commodore Hack magazine:
http://codebase64.org/doku.php?id=magazines:chacking9&s[]=circle

The code. it draws a nice HIRES full Circle, but I played with it a little and you can adjust the drawns sections, and the steps.

In multicolor it works, but the horizontal radius doubles (logically), but it is not a circle any more.
Could be solved somehow (easily), but math is not my strong part (next to the lot of other weaknesses I have, haha )

0 REM FAST CIRCLE -- SLJ 9/94
10 GRAPHIC 1,1
15 REM X=Radius
20 X=40:Y=0:TX=X:XO=160:YO=100
30 DRAW1,X+XO,Y+YO: DRAW1,Y+XO,X+YO
40 DRAW1,XO-X,YO+Y: DRAW1,XO-Y,YO+X
50 DRAW1,XO-X,YO-Y: DRAW1,XO-Y,YO-X
60 DRAW1,XO+X,YO-Y: DRAW1,XO+Y,YO-X
70 IF X<=Y THEN 100
80 Y=Y+1:TX=TX-Y
90 IF TX<0 THEN X=X-1:TX=TX+X
95 GOTO 30
100 END

And next to each othet the built-in CIRCLE routine and the SLJ one.






Back to top


Copyright © Plus/4 World Team, 2001-2024