home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 2555 / povhlp / techinfo.hlp < prev    next >
Encoding:
Text File  |  1994-07-07  |  6.5 KB  |  101 lines

  1.     This section addresses some of the most commonly asked questions about
  2.  POV-Ray and the way it works.  It applies only to compiles of POV-Ray done
  3.  with Intels 'Code Builder Kit' (ICB) 32bit extended DOS compiler.  It also
  4.  includes some hints on maximizing rendering speed toward the end of the
  5.  file.
  6.  
  7.     This section also gives a real quick overview of the POV-Ray operating
  8.  environment.  It does not fully describe the options & capabilities of the
  9.  80386+ processors as that would take volumes.  It is instead meant to be a
  10.  simple FYI type overview for those that may be interested.
  11.  
  12.     Intel's 'Code Builder Kit' creates 32-bit protected mode programs that
  13.  take advantage of the enhanced memory management of the 80386+ processors.
  14.  These processors have 3 main modes of operation generally known as the
  15.  'real', 'virtual 86' and '386 protected' modes.
  16.  
  17.     The 'real' mode of operation is what most people are familiar with.  In
  18.  this mode the CPU 'emulates' an 8086/8088 based machine.  The 8086 is capa-
  19.  ble of addressing 1 meg of memory, to maintain compatibility this limit is
  20.  also imposed on the '386/'486 processors when running in this mode.  This is
  21.  the mode that MS-DOS, and the overwhelming majority of IBM PC based applica-
  22.  tions, operate in.  The area generally known as 'conventional memory' is the
  23.  first 640K of this memory block with the second 384K being used for the
  24.  built in BIOS ROMS, I/O buffers (such as video) and things like EMS page
  25.  frame addresses.  That is all the memory the 8086/8088 processors are capa-
  26.  ble of directly manipulating.  Basically a 386/486 running in real mode is
  27.  nothing more than a fast 8086 based machine.  In actual operation the 386/
  28.  486 CPU's *are* capable of using an additional 64K of memory beyond what the
  29.  8086 is capable of.  This is what 386/486 memory managers are referring to
  30.  at boot time with messages such as '64K high memory area available'.  All
  31.  the memory in the machine must be dealt with in 'chunks' (called segments)
  32.  no larger than 64K in this mode.
  33.  
  34.     The 'virtual 86' mode is what programs such as Windows run MS-DOS pro-
  35.  grams in.  Basically the CPU sets up 'virtual' machines that all run inde-
  36.  pendently but retain the limits imposed by running in real mode.  In this
  37.  mode several programs can be run 'at the same time' with all of them think-
  38.  ing they are running, by them selves, on an 8086 based machine.  The advan-
  39.  tage of this mode is that each of the virtual machines may be separated, to
  40.  some extent, in hardware (thru the 386+ processors memory management) and is
  41.  thus less subject to problems between applications.
  42.  
  43.     The '386 protected mode' is quite different from both of these modes,
  44.  bearing more similarity to CPU's like the Motorola 680x0 series used in the
  45.  Macintosh.  This is the mode that POV-Ray spends most of it's time running
  46.  in.  The mode offers the ability to load applications in separate areas of
  47.  memory and logically remap that memory to any address in the machine.  Mem-
  48.  ory available in this mode can be configured as a linear address space of 4
  49.  GigaBytes.  (From 0 to 2^32-1 addresses, also called the 'flat memory mo-
  50.  del'.)  This memory may be allocated and dealt with at any size, the DOS 64K
  51.  segment is gone as is the DOS '640K limit'.  4,294,967,294 bytes of RAM are
  52.  theoretically available to POV-Ray in this mode, of course machine and com-
  53.  piler limitations dictate what is 'really' available.  Given a machine with
  54.  sufficient resources POV-Ray can directly use 64 megabytes of physical RAM
  55.  and (thru the Virtual Memory Manager) additional disk space to total 3.75
  56.  Gigabytes of virtual memory.  POV-Ray has the ability to use 3.75 GIGABYTES
  57.  of memory.  Intels Code Builder (ICB) reserves the first megabyte of 'real
  58.  mode' memory in the machine for a 'scratch pad' area and for communication
  59.  with the machines built in BIOS and DOS since THEY are 16-bit 'programs'.
  60.  'Freeing up conventional RAM' has no meaning in this context, POV-Ray does
  61.  not use the area for much.  The POVRAY.EXE file actually contains 5 'pro-
  62.  grams'.  A Loader/DOS extender (used to add 32-bit functions to MS-DOS since
  63.  MS-DOS is a 16-bit operating system), a Virtual Memory Manager, a protected
  64.  mode 80387 emulator to provide floating point math operations in a machine
  65.  with no coprocessor installed, and the POV-Ray program itself.  When POVRAY
  66.  .EXE is invoked the 'loader' is loaded by DOS & executed, it in turn loads
  67.  the DOS extender which checks for the presence of a DPMI *HOST* memory mana-
  68.  ger.  (Common DPMI hosts are Windows, OS/2 2.x  in a DOS VDM, and Quarter-
  69.  decks QEMM with their QDPMI add on installed.  386MAX is also supposed to
  70.  provide it but I have not verified it's operation.)
  71.  
  72.     This is where it gets complicated.  IF an existing DPMI host/memory mana-
  73.  ger (say Windows) is found to be already running the DOS extender USES IT
  74.  for ALL memory requests AND virtual memory management.  Windows IT'S SELF
  75.  provides POV-Ray with all it's memory management and the configuration of
  76.  WINDOWS imposes the limits on what the program can use.  (How much extended
  77.  memory is allocated to the application, the size that the Windows swap file
  78.  is, and can go to, etc...) If a DPMI host is found to be in operation POV-
  79.  Ray (ICB) will 'gut' it's own virtual memory manager (since it's not used in
  80.  this case) to conserve RAM.
  81.  
  82.     If NO DPMI host is found then the DOS Extender in POV-Ray will provide
  83.  the memory management for the program.  (It is NOT, however, a DPMI host).
  84.  The parameters the program will expect to be able to use are set with the
  85.  POVMOD program.  (Windows, OS/2 and QEMM/QDPMI must be configured to provide
  86.  at least these parameters for POV-Ray to run.  It's very important that the
  87.  program providing the DPMI host services be configured to provide what POV-
  88.  Ray ASKS for (which is in turn what is set with POVMOD) or the program will
  89.  error with an insufficient memory message.)
  90.  
  91.     The loader/extender then checks to see if a coprocessor is installed in
  92.  the machine.  IF NONE IS FOUND the 80387 emulator is loaded.  If a coproces-
  93.  sor is detected the emulator is NOT loaded to conserve RAM.
  94.  
  95.     NOTE: The emulator will not work correctly in a DOS VDM under OS/2 2.x,
  96.  the machine MUST have a coprocessor installed for the program to function
  97.  well.  Under Windows 3.x the VEMD.386 driver MUST be installed to run the
  98.  program on a machine with no coprocessor.
  99.  
  100.     At this point the actual execution of POV-Ray begins.
  101.