
	     ______             ____  ______     _____  ______ 
	    |  ____|           |  _ \|  ____|   / / _ \|  ____|
	    | |__ _ __ ___  ___| |_) | |__     / / |_| | |__ 
	    |  __| '__/ _ \/ _ \  _ <|  __|   / /|  _  |  __|
	    | |  | | |  __/  __/ |_) | |____ / / | | | | |
	    |_|  |_|  \___|\___|____/|______/_/  |_| |_|_|


		    Trident TGUI9440AGi driver implementation notes.

          Warning: My english is bad ;-)


   This is the FreeBE/AF implementation for the Trident 9440 chipset for
   PCI boards.
   The driver is quite complet but there are some limitations:

   1) The driver doesn't work under Windows.
   2) The driver doesn't work with SciTech tools like vbetest.exe.
   3) The hardware cursor isn't 100% compliant.

   Here are explanations about each topic:
   
   1) Trident drivers for Windows aren't good wenough to support a DOS
   application setting the mode at register level. The drivers can emulate
   VBE calls successfully but virtualize some critical registers avoiding
   changes to this registers.
      I think that isn't an important limitation because the main goal of
   this driver is enhance the performance of DOS Allegro programs and they
   works much better under pure DOS.

   2) I realised it too late, but this time SciTech taked the desition to
   close the Nucleus standard (the VBE/AF sucesor). So I'll address this
   topic only if somebody really needs support for it.

   3) In the future I'll add a way to disable the hardware cursor
   acceleration, but by now I think is better to let it on all the time.

   The implemented routines are the following:

      WaitTillIdle()
      SetMix()
      Set8x8MonoPattern()
      Set8x8ColorPattern()
      Use8x8ColorPattern()
      DrawScan()
      DrawScanList()
      DrawPattScan()
      DrawPattScanList()
      DrawColorPattScan()
      DrawColorPattScanList()
      DrawRect()
      DrawPattRect()
      DrawColorPattRect()
      DrawLine()
      DrawTrap()            *4
      SetLineStipple()      *1
      SetLineStippleCount() *1
      DrawStippleLine()     *1
      PutMonoImage()
      BitBlt()
      BitBltSys()
      SrcTransBlt()
      SrcTransBltSys()
      GetVideoModeInfo()
      SetVideoMode()        *3
      RestoreTextMode()
      SetDisplayStart()
      SetActiveBuffer()
      SetVisibleBuffer()
      GetDisplayStartStatus() *5
      SetBank()
      SetPaletteData()
      SetCursor()
      SetCursorPos()
      SetCursorColor()      *2
      ShowCursor()
      GetClosestPixelClock()

      Notes:
      *1  I'm not sure about the implementation but the functions have
          equivalent registers in the chip.
      *2  9440 doesn't support it, that's a wrapper.
      *3  Supports the AF_CRTCInfo parameter!
      *4  Implemented using scans because isn't supported by the hard.
      *5  Dummy because looks like TGUI doesn't set the interrupt flag.

      Additionally I did some attempts to implement the following Inertia
      functions, but they are disabled because SciTech dropped it:
      
      GetConfigInfo
      GetCurrentMode
      SetVSyncWidth
      GetVSyncWidth
      GetBank
      GetVisibleBuffer
      GetDisplayStart
      SetDisplayStartAddr
      IsVSync
      WaitVSync
      GetActiveBuffer
      IsIdle
          
   The driver was implemented without using BIOS calls for this reason is
   much more complex than current FreeBE/AF drivers (october 1998).
   TGUI9440 doesn't support acelerations in 24 bpp, the modes are supported
   but without accelerations.

    Supported video modes:
    
             8 bpp  15 bpp  16 bpp  24 bpp
    320x200   *       *       *       *
    320x240   *       *       *       *
    400x300   *       *       *       *
    512x384   *       *       *       *
    576x432   *       *       *       *
    640x400   *       *       *       *
    640x480   *       *       *       *
    720x540   *       *       *       *
    800x600   *       *       *       *
    900x675   *       *       *       *
   1024x768   *       *       *      (1)
   
   (1) Needs more than 2Mb so is impossible with 9440

   Other modes could be implemented using AF_CRTCInfo and
   GetClosestPixelClock, that's a good feature of VBE/AF.
   

   Technical notes:
   * I'm bliting to the 0xA0000 region instead of the LFB in BitBltSys
     because that's faster in the Ivan's motherboard, don't ask me why.
   * See the sources for more information.
   * Addtionally you can take a look to the vbeaf.htm included, it was
     generated by my editor with almost no extra efforts.


   Thanks to:
   * The rest of the FreeBE/AF team, specially Shawn, the stub helped a lot
     and I took ideas from various drivers.
   * The people at Trident, they sent me the printed manuals of the board
     without asking a cent (they invested money on it!)
   * Kendall Benett, even when SciTech taked the desition to close the
     Nucleus spec Kendall was very kind answering some questions about
     functions, specially about the AF_CRTCInfo structure.
   * Ivan Baldo, my beta tester.
   

   Legal notes:
   * All trademarks are property of their owners ;-))), I don't know why
     manuals point out it, sounds funny no?
   * The fonts included where dumped from the Trident's BIOS, I guess that's
     OK because the driver works only with Trident boards ;-).
   * Here goes another silly one: The information presented in this
     publication has been carefully tested for reliability; however, no
     responsability is assumed for inaccuracies. Specifications are subject
     to change without notice. =-))))))))))
   * Now seriously: this driver is under the FreeBE/AF license and no
     warranty is provided (after all: try to sue M$ for the time lost
     reinstalling Windows over and over each time it screws your HD ;-).
     

   By Salvador Eduardo Tropea (SET)
   set-soft@usa.net
