Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uunet!cbmvax!spence From: spence@cbmvax.commodore.com (Spencer Shanson) Newsgroups: comp.sys.amiga.programmer Subject: Re: 3D stuff & quick line drawing Message-ID: <20967@cbmvax.commodore.com> Date: 26 Apr 91 14:49:12 GMT Article-I.D.: cbmvax.20967 References: <1991Apr21.081925.4722@lynx.CS.ORST.EDU> <1991Apr22.122442.25505@cs.umu.se> <20884@cbmvax.commodore.com> <1991Apr24.203219.22776@cs.umu.se> Reply-To: spence@cbmvax.commodore.com (Spencer Shanson) Organization: Commodore, West Chester, PA Lines: 63 In article <1991Apr24.203219.22776@cs.umu.se> dvljrt@cs.umu.se (Joakim Rosqvist) writes: >In article <20884@cbmvax.commodore.com> spence@cbmvax.commodore.com (Spencer Shanson) writes: >> >> >>In article <1991Apr22.122442.25505@cs.umu.se> dvljrt@cs.umu.se (Joakim Rosqvist) writes: >>> [stuff deleted] >>Great! But you also need to WaitBlit() after owning the blitter (just to be >>safe), and just before starting to write to any of the blitter registers. >> >>** You need to WaitBlit() here > >Sorry, I though Ownblitter meant >'when you have called this function, you own the blitter' > You do own the blitter, but that does not mean that the last blit has finished yet. This will be especially true on a faster CPU and a large blit. Even your own code does its final blit and then disowns it. >>** Better to use WaitBlit(), which knows about various Agnus hardware bugs >>** (see Autodocs for more details) > >The issue here was fast lines, if I could consider calling a ROM-routine >I could just as well have called 'drawline' (or sth, I've never used it) >in gfxlib in the first place. > That's up to you, just don't expect the code to run on every Amiga. At the very least, take into account the hardware bugs described in the autodocs. >BTW, i read in another article that using the blitter on short lines >should be a disadvantage because of the long setup-time. The breakoff >was given to about 150 pixels. I don't know what processor was intended >but I made a little test in the following environment: > >Program ran from fastmem, 68000 used, 1 bitplane 640x256 shown and >no interrupts enabled. >With the blitter i got 738000 pixels/second and 23 microsecond startup-time >which equals 17 extra pixels on every line. Lines between 1..25 pixels >all take the same time. The is beacuse the setup-time was really 58 micros >but for longer lines some of this could be done while the blitter was >drawing the previous line. >With the 68000 i could get about 150000 pixels/sec and 24 micros 'setup' >(I clocked a MAC SE/30 using quickdraw to 110000 pix/sec giggle..) >This means that the breakoff(=the number of pixels where using the blitter >or the 68000 would take the same time) would be at 5 pixels. > You don't say if the lines are arbitrary direction. Sure, for short horizontal lines, you would be better off using the CPU, but I doubt that's the case for lines of any angle of more than a few pixels. >/$DR.HEX$ -- --------------------------------------------------------------------------- Spencer Shanson - Amiga Software Engineer | email: spence@commodore.COM | or uunet!cbmvax!spence All opinions expressed are my own, and do not | "You know my methods. Apply (necessarily) represent those of Commodore. | them" -- Sir Arthur Conan | Doyle - 'The Sign of Four'