home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / chunky2planar / pllbc2p / demos / pllbc2p_demos.txt < prev    next >
Text File  |  1980-01-10  |  2KB  |  83 lines

  1.  
  2.  *=-----------------------------------------------------------------------=*
  3.  
  4.                              The PLLB-C2P Demo's
  5.  
  6.                    Written (hacked together) by Kevin Picone
  7.  
  8.             (c) copyright 1996, Kevin Picone, Of Underware Design
  9.  
  10.                          Lasted Updated: 27-4-1996
  11.  
  12.  *=-----------------------------------------------------------------------=*
  13.  
  14.  
  15.  
  16.  Zrotate/Flexer:   256/64 & 16 colours, 320*256, Pixel Res of 1x*2y
  17.  ===============
  18.  
  19.  With this routine and the type of image that it uses, I've selected
  20.  to use the Normal Pllb-C2P mode in all three demos.  If the Image was
  21.  less complex (ie. more solid colour areas) or moved less, well I would
  22.  have been better suited to use the DELTA modes.
  23.  
  24.  Unfortunately, the code that renders the rotated Scanlines is quite slow.
  25.  Here is an example of the code render just a single pixel in the rotated
  26.  line.
  27.  
  28.  ; a0 = pointer to chunky buffer
  29.  ; a2 ='s pointer to Picture's address ie. picture is (256*256 pixels)
  30.  
  31.  ;    Render Pixel    
  32.  
  33.     move.w d2,d4        ; backup X position
  34.     move.w d3,d5        : Backup Y position
  35.  
  36.     lsr.w #8,d4        ; shift x position into lower Byte 
  37.     move.b d4,d5        ; move X position into y pos
  38.  
  39.     move.b (a2,d5.l),(a0)+        ; Grab & output pixel
  40.  
  41.     add.w d0,d2        ; add X fraction to X offset!
  42.     add.w d1,d3        ; add Y fraction to Y offset!
  43.  
  44.  
  45.  On my A1200/020 14mhz+fastram it's runs at an Average of 6.8 Fps
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  Gouraud Cube:     256 colours, 320*256, Pixel Res of 1x*2y 
  52.  =============
  53.  
  54.  In these little demos, I've selected to use a both the NULLSKIP C2P,
  55.  and the new DELTANULLSKIP c2p routines, which are denoted NS & DNS
  56.  respectively in the filenames. I've select these since there is obviously
  57.  quite a large amount of unused screen space, and not to mention that
  58.  this C2P mode also clears the chunky buffer for me.
  59.  
  60.  Unfortunately again, the Gouraud code is extremely slow, with the inner
  61.  draw gouraud scanline loop looking something like this..
  62.  
  63.  DrawGouraudScanLine_lp:
  64.             move.w d4,d0
  65.             lsr.w #8,d0
  66.             move.b d0,(a5)+
  67.             add.w d5,d4
  68.  
  69.         dbf d7,DrawGouraudScanLine_lp
  70.  
  71.  
  72.  On my A1200/020 14mhz+fastram it's runs at an Average of 14.2 Fps
  73.  
  74.  
  75.  *=-----------------------------------------------------------------------=*
  76.  
  77.                                T H E   E N D
  78.  
  79.  *=-----------------------------------------------------------------------=*
  80.  
  81.  
  82.  
  83.