home *** CD-ROM | disk | FTP | other *** search
- Path: news.eunet.fi!fipnet!kone!jsaarinen
- Newsgroups: comp.sys.amiga.programmer
- X-NewsReader: IntuiNews 1.2b (31.7.94)
- References: <38231915@kone.fipnet.fi> <4d6cpp$iu2@sunsystem5.informatik.tu-muenchen.de>
- From: "Jyrki Saarinen" <jsaarinen@kone.fipnet.fi>
- Date: Sat, 13 Jan 96 15:38:06 UT
- Comments: Illegal date header - new date added by quicknews
- X-Original-Date: Sat, 13 Jan 96 16:14:23
- MIME-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: binary
- Distribution: world
- Subject: Re: Demo/game to OS friendly part II
- Message-ID: <38232022@kone.fipnet.fi>
-
-
- > well seems that OS3 buffering works bets for both AGA and gfx-cards.
- > just blitterc2p to the aga screens and writepixelarray8 to the
- > gfx-screens.
-
- WritePixelArray8() .. no way, just plain copying on ZII cards
- and straight drawing to the frame buffer of faster cards.
-
- Btw, here is the next generation loop:
-
- ;a0.l ptr to texture
- ;a1.l ptr to shading table
- ;a2.l g<<8
- ;a3.l gstep<<8
- ;a4.l ptr to chunky buffer
- ;d0.l vfrac,uint
- ;d1.l vstepfrac,ustepint
- ;d2.l ufrac,vint<<8
- ;d3.l ustepfrac,ustepint<<8
-
- REPT 4
- move.l a2,d4 ;g<<8, 2 cycles
- move.l d2,d5 ;u<<8, 2 cycles
- move.b d0,d5 ;+v, 2 cycles
- move.b (a0,d5.l),d4 ;g<<8,texel, 6 cycles
- add.l a3,a2 ;g+=gstep, 2 cycles
- addx.l d3,d2 ;v+=vstep, 2 cycles
- addx.l d1,d0 ;u+=ustep, 2 cycles
- move.b (a1,d4.l),(a4)+ ;write pixel, 10 cycles
- ENDR
-
- That is 28 cycles per pixel. 64k aligned would be:
-
- ;a2.l g<<8
- ;a3.l gstep<<8
- ;a4.l ptr to chunky buffer
- ;d0.l vfrac,uint
- ;d1.l vstepfrac,ustepint
- ;d2.l ufrac,vint<<8
- ;d3.l ustepfrac,ustepint<<8
- ;d4.l ptr to shading table, 64k aligned
- ;d5.l ptr to texture, 64k aligned
-
- REPT 4
- move.w a2,d4 ;g<<8, 2 cycles
- move.w d2,d5 ;u<<8, 2 cycles
- move.b d0,d5 ;+v, 2 cycles
- move.l d5,a0 ;ptr to texel, 2 cycles
- move.b (a0),d4 ;fetch texel, 5 cycles
- move.l d4,a1 ;ptr to pixel, 2 cycles
- add.l a3,a2 ;g+=gstep, 2 cycles
- addx.l d3,d2 ;v+=vstep, 2 cycles
- addx.l d1,d0 ;u+=ustep, 2 cycles
- move.b (a1),(a4)+ ;write pixel, 7 cycles
- ENDR
-
- Hmm. That is 28 cycles per pixel also.. So, no use for
- 64k aligned textures execpt in plain tmapping, without
- shading, there one cycle can be gained. Also, the hassle
- with 64k aligned textures is a pain in the butt..
-
- A shading table and shading is a must, nobody wants
- to see objects rotaing without shading or with 16 shades
- and one 16c texture.
-
- I wonder would there be any differences on the 68040 with
- these loops..
-
- Oh, the idea why I wrote those loops was the 16 bits fraction
- for v, too..! Looks much better!
-
- The question is, how the first loop should be scheduled for
- the 68040 to go as fast as possible?
-
- -- _
- a Stellar programmer _ //
- "Amiga - back for the future" \X/
-