Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!cs.umu.se!dvljrt From: dvljrt@cs.umu.se (Joakim Rosqvist) Newsgroups: comp.sys.amiga.programmer Subject: Re: 3D stuff & quick line drawing Message-ID: <1991Apr24.203219.22776@cs.umu.se> Date: 24 Apr 91 20:32:19 GMT References: <1991Apr21.081925.4722@lynx.CS.ORST.EDU> <1991Apr22.122442.25505@cs.umu.se> <20884@cbmvax.commodore.com> Sender: news@cs.umu.se (News Administrator) Organization: Dep. of Info.Proc, Umea Univ., Sweden Lines: 53 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] >>Here is a part of the source i use when i want *fast* lines. >>It uses the blitter and writes directly to the DFF regs >>(no flames please, i *did* call Ownblitter first) > >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. > >>[stuff deleted] >> jsr OwnBlitter(a6) >> >> lea $dff000,a6 > >** You need to WaitBlit() here Sorry, I though Ownblitter meant 'when you have called this function, you own the blitter' > >> move #$8000,BLTADAT(a6) >> [more stuff deleted] >>wait: btst #6,DMACONR(a6) >> bne.s wait > >** 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. 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. /$DR.HEX$