home *** CD-ROM | disk | FTP | other *** search
/ Falcon 030 Power 2 / F030_POWER2.iso / ST_STE / MAGS / ICTARI10.ARJ / ictari.10 / GFA / BMAP_ERR / BMAP_ERR.TXT
Text File  |  1994-04-26  |  3KB  |  57 lines

  1.            Subject: The Complete And Essential Guide To Bitmaps
  2.         Part Three: Corrections!
  3.                 By: James Collett (Professor)
  4.        A Member Of: VIRTUAL INFINITY
  5.               Date: May 1994
  6.            Address: Park View Farm, Carlton, Nr Nuneaton, Warks, CV13 ODA
  7.           Internet: s6005146@brookes.ac.uk
  8.       Mono Account: bcc
  9.  
  10.  
  11.     "To Err Is Human..."
  12.     ====================
  13.         Unfortunately  a small,  but potentially confusing,  error  slipped 
  14.     through  in  'the guide to bitmaps' on issue #8 of ICTARI  disk  (March 
  15.     1994).   The error was in the 'pixels and planes in general' section of 
  16.     part one (BITPLANE.TXT).
  17.  
  18.         Just  to re-cap:  in order to write to or read from  a  pixel,  the 
  19.     block  (group of PLANE SIZE pixels) where the pixel is stored  must  be 
  20.     determined.   As discussed previously (issue #8),  the Pth pixel is  in 
  21.     block P DIV S on a machine with a plane size of S bits.
  22.  
  23.         A  pixel`s colour is determined by one bit in  every  plane,  where 
  24.     planes count from 0 to N-1 (inclusive) on a machine with N planes:
  25.  
  26.                                  All  make  up  P15
  27.                       +------------+------------+------------+
  28.                       |            |            |            |
  29.               B0a > B15a;  B0b > B15b;  B0c > B15c;  B0d > B15d;
  30.               ~~~~~~~~~~   ~~~~~~~~~~   ~~~~~~~~~~   ~~~~~~~~~~
  31.                 Plane 0      Plane 1      Plane 2      Plane 3
  32.  
  33.         To clarify the error: on a machine with a plane size of S bits, the 
  34.     POSITION  (of  the bit in each plane) for the Pth pixel  would  be  the 
  35. >>  (P MOD S)th  bit,   if   the machine started counting  from  the  least  <<
  36.     significant  bit (right end),  as illustrated  by listing all the  bits 
  37.     (in hexadecimal) for the example above:                            ¯¯¯¯
  38.  
  39.      FEDCBA9876543210  FEDCBA9876543210  FEDCBA9876543210  FEDCBA9876543210
  40.      ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~
  41.          Plane 0           Plane 1           Plane 2           Plane 3
  42.  
  43.         The machine actually starts counting from the most significant  bit 
  44.     (left  end),  so the POSITION for the Pth pixel is the  (S-P MOD S-1)th 
  45.     bit  in  each plane,  on a machine with a plane size  of  S  bits;  the 
  46.     'positions order' is reversed to the 'natural bit order':
  47.      ¯¯¯¯¯¯¯¯¯
  48.      0123456789ABCDEF  0123456789ABCDEF  0123456789ABCDEF  0123456789ABCDEF
  49.      ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~
  50.          Plane 0           Plane 1           Plane 2           Plane 3
  51.  
  52.         In  other words,  bit B in every plane holds part of the colour  of 
  53.     pixel (S-B-1) in the respective block.
  54.  
  55.  
  56.     ---END---
  57.