home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2117 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  5.4 KB

  1. Path: grafix.xs4all.nl!john.hendrikx
  2. Date: Wed, 24 Jan 96 22:06:10 GMT+1
  3. Newsgroups: comp.sys.amiga.programmer
  4. Distribution: world
  5. Subject: Re: Amiga doesn`t need Planar!
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=iso-8859-1
  8. Content-Transfer-Encoding: 8bit
  9. From: john.hendrikx@grafix.xs4all.nl (John Hendrikx)
  10. Message-ID: <john.hendrikx.48yf@grafix.xs4all.nl>
  11. Organization: Grafix Attack BBS Holland
  12.  
  13. In a message of 23 Jan 96 T.l. Mensah wrote to All:
  14.  
  15.  TlM> Planar rules, its far more flexible, you don`t need 256 colours worth
  16.  TlM> of bitmap memory for a 2 color screen, etc. i.e you just use 2 Colours
  17.  TlM> worth! basically planar display just blows away all these crappy chunky
  18.  TlM> graphics cards. Basically chunky should be labelled as "CLUNKY!" ...all
  19.  TlM> these "high" end graphics cards would chunk to a halt with half of the
  20.  TlM> tricks that can be done on the bog standard A500 `s copperlist chip!
  21.  
  22. Tell me, how much gfx-memory-accesses does it take to draw a simple 100 pixel
  23. vertical line on a 7-bit Planar display?
  24.  
  25. Let me show you:
  26.  
  27. It takes 100*7 reads and 100*7 writes.  The reads are of course necessary
  28. because you wouldn't want to modify the contents 'surrounding' the vertical
  29. line.
  30.  
  31. Now, how much memory-accesses would this take on 8-bit Chunky (or 16-bit Chunky
  32. for that matter?)
  33.  
  34. Only 100 WRITE-accesses.  No reading involved, no need to worry about
  35. destroying other things on the screen.
  36.  
  37. As memory-speed is usually the thing which determines the speed of the
  38. end-result you'll find that the Chunky solution is a factor 14 faster.  (and it
  39. could be worse if I had used 8-bit planar screens).
  40.  
  41. Another example;
  42.  
  43. Planar
  44. ------
  45.  
  46. You have a 12-bit planar screen, and you want to blit an object of 40x40 pixels
  47. in 12-bit to the screen at say location (30,30).  The object has a Mask as not
  48. all the pixels are to be changed.  Again, let's count gfx-memory accesses (I'm
  49. not counting the mask or object-data memory accesses):
  50.  
  51. To 'blit' one bitplane-row of the planar object you need to read 3 LONGs from
  52. gfx-memory, AND them with the mask, then OR them with the actual data and then
  53. write those 3 LONGs back to gfx-memory (the masking itself is tricky business
  54. as well).
  55.  
  56. The total number of LONG-accesses for 1 bitplane-row would be 6 (3 reads, 3
  57. writes).  For 12-bitplanes this would be 72, and that multiplied by 40 rows
  58. gives you 2880 LONG gfx-memory-accesses.  Dedicated hardware is a requirement
  59. here as the masking process is quite complex to do with the CPU.
  60.  
  61. Chunky
  62. ------
  63.  
  64. You have a 16-bit Chunky screen (ie, again better quality) and you want to blit
  65. an object of 40x40 pixels with 1 WORD/pixel at location (30,30).  Each WORD of
  66. the object which is zero is considered 'masked-out' and will not be written
  67. (ie, no need for a seperate mask!!).
  68.  
  69. Now, to blit one row you need to do 40 WORD-write-accesses (minus those that
  70. are masked out).  Multiple that times 40 rows and you get 1600
  71. WORD-write-accesses to gfx-memory in the WORST-case.
  72.  
  73. -----
  74.  
  75. In both examples I only counted gfx-memory accesses, I did not include time to
  76. fetch the mask, or the object data itself.  If I did Planar would have looked
  77. even worse.
  78.  
  79. It is notable though that Planar -requires- dedicated hardware to get any kind
  80. of speed, and still manages to perform quite poorly in both examples
  81. (especially if you take into account that it performs worse even with less
  82. colors than the Chunky examples).  Chunky can VERY easily be handled with the
  83. CPU alone, or even in parallel with a Chunky blitter.  Also, even if Planar had
  84. a blitter as fast as the Chunky blitter the planar blitter would have to move a
  85. lot more data to get the same results, making it likely that the fastest
  86. blitters in existance are Chunky, not Planar.
  87.  
  88. Now some people say that parallax effects are hard in Chunky, but consider it
  89. the other way around, in Planar rotation, TMapping, Gouraud shaded polygons,
  90. blitting, drawing a line, plotting a pixel(!!) and so on are very complex to do
  91. with the CPU alone.  Drawing a line seems simple but when you compare it to the
  92. Chunky-line-drawing version it is incredibly complex in Planar.
  93.  
  94. Also ever thought of how easy scrolling is in Chunky?  Planar without the
  95. Copper would be hell to scroll horizontally, while in Chunky it is nothing more
  96. than a copy-loop.
  97.  
  98.  TlM> Amiga Rules... Custom Chips Rule..
  99.  
  100. (My?) definition of Amiga:  Anything which runs *REAL* Amiga software like
  101. DirOpus, AdPro, Final Writer, WorkBench, AmigaShell, etcetera...
  102.  
  103. I don't consider hardwarebanging Games/Demos real Amiga software; anyone can
  104. disable the OS and bang a few registers, you could do that on a clone or C-64
  105. if you like.
  106.  
  107.  TlM> HIT THE HARDWARE! HIT THE HARDWARE! HIT THE HARDWARE! HIT THE
  108.  TlM> HARDWARE!
  109.  
  110. Spoken like a true retired C-64 coder.
  111.  
  112.  TlM> All views expressed are my own, if you don`t agree with them, its not
  113.  TlM> your fault that you don`t truly understand the Amiga`s edge! :)
  114.  
  115. Taking a better look at Chunky before dumping it like that might give you a
  116. better perspective as to why some people actually think Chunky is often better
  117. than Planar.  Chunky is used by the clones, that's no reason however to deny
  118. its advantages, just like it would be silly to deny the advantages of 16-bit
  119. sound over our 8-bit sound.
  120.  
  121. Grtz John
  122.  
  123. -----------------------------------------------------------------------
  124.  John.Hendrikx@grafix.xs4all.nl   TextDemo/FastView/Etc... development
  125. -----------------------------------------------------------------------
  126. -- Via Xenolink 1.985B3, XenolinkUUCP 1.1
  127.