[comp.sys.amiga.tech] PolyDraw replacement - waveform plotting

kent@swrinde.nde.swri.edu (Kent D. Polk) (03/20/90)

I have an A2500/20 and need to be able to draw 1k point waveforms very
fast (in a 512 pixel window). I have tried various schemes for
acquiring the necessary speed, but the best I can do misses what I need
by a factor of about 4. BTW, I really have to view all of the data -
i.e. I can't just plot data points that fall on pixel boundaries.

Generally, the fastest (safe) speeds I have obtained are by using
PolyDraw() to draw into a 1 bitplane offscreen rastport and then
BltBitMapRastPort() that bitmap to my display window rastport. I have
the plotting routine running as a process that I send messages to with
a higher priority than my data acquisition processes.

I tried hacking an assembler routine which uses the linedraw mode of
the blitter to draw into my offscreen bitmap, but to my amazement, it
was actually slower than PolyDraw (with the associated copying of my
ydata into an x/y pair array which I circumvented in my assembler
blitter draw).

Any suggestions for getting the speed I need out of this machine?
Would an assembler line draw routine be faster on the '020 than a
blitter one? If so about how much and does anyone have source I could
start with?

Thanks much
====================================================================
Kent Polk - Southwest Research Institute - kent@swrinde.nde.swri.edu
        Motto : "Anything worth doing is worth overdoing"
====================================================================

cmcmanis@stpeter.Sun.COM (Chuck McManis) (03/21/90)

In article <25661@swrinde.nde.swri.edu> (Kent D. Polk) writes:
>Any suggestions for getting the speed I need out of this machine?
>Would an assembler line draw routine be faster on the '020 than a
>blitter one? If so about how much and does anyone have source I could
>start with?

A fast line draw routine (such as a DDA) that fits inside the instruction
cache of the '020 and maximizes register uses will give you the best
performance. Even better would be to do the actual drawing in 32bit RAM
and then using a fast data copy routine to put it into Chip ram. 


--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  Internet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"If it didn't have bones in it, it wouldn't be crunchy now would it?!"

kent@swrinde.nde.swri.edu (Kent D. Polk) (03/21/90)

In article <133167@sun.Eng.Sun.COM> cmcmanis@sun.UUCP (Chuck McManis) writes:
>In article <25661@swrinde.nde.swri.edu> (Kent D. Polk) writes:
>>Any suggestions for getting the speed I need out of this machine?
>>Would an assembler line draw routine be faster on the '020 than a
>>blitter one? If so about how much and does anyone have source I could
>>start with?
>
>A fast line draw routine (such as a DDA) that fits inside the instruction
>cache of the '020 and maximizes register uses will give you the best
>performance. Even better would be to do the actual drawing in 32bit RAM
>and then using a fast data copy routine to put it into Chip ram. 
>
>--Chuck McManis

Could you please point me a bit further in this direction? Such as
example code? I've looked around for quite some time now and have
seen nothing but the blitter line-mode stuff that I mentioned.
Unfortunately, I'm not an assembler programmer, but can hack a bit
once I know where I'm going. (What's a DDA?)

Thanks,
Kent Polk

--------------------------------------------------------
Personal to Tomas Rokicki:
Did my mail response make it to you?
(I sent it yesterday)

cmcmanis@stpeter.Sun.COM (Chuck McManis) (03/21/90)

In article <25677@swrinde.nde.swri.edu> kent@swrinde.UUCP (Kent D. Polk) writes:
>Could you please point me a bit further in this direction? Such as
>example code? 

Actually this is a pretty common algorithim if you had checked any decent
computer graphics text it would have jumped out at you. Lacking even this
most simple ability to consult a library let me make it excruciatingly
clear :
	Newman & Sproul, "Principles of Interactive Computer Graphics"
	published by McGraw-Hill, ISBM 0-07-046338-7
	pp 20-27 and pp 219-220

Other texts work as well some prefer one by Foley and Van Dam.


--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: <none>   Internet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"If it didn't have bones in it, it wouldn't be crunchy now would it?!"