home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / pcq_incl3v1.lha / Graphics / gfxbase.i < prev    next >
Encoding:
Text File  |  1994-10-12  |  5.7 KB  |  173 lines

  1. {
  2.         GfxBase.i for PCQ Pascal
  3. }
  4.  
  5. {$I   "Include:Exec/Lists.i"}
  6. {$I   "Include:Exec/Libraries.i"}
  7. {$I   "Include:Exec/Interrupts.i"}
  8. {$I   "Include:exec/Semaphores.i"}
  9. {$I   "Include:Graphics/Monitor.i"}
  10.  
  11. type
  12.  
  13.     GfxBaseRec = record
  14.         LibNode         : Library;
  15.         ActiView        : Address;      { ViewPtr }
  16.         copinit         : Address; { (copinitptr) ptr to copper start up list }
  17.         cia             : Address;      { for 8520 resource use }
  18.         blitter         : Address;      { for future blitter resource use }
  19.         LOFlist         : Address;
  20.         SHFlist         : Address;
  21.         blthd,
  22.         blttl           : Address;
  23.         bsblthd,
  24.         bsblttl         : Address;      { Previous four are (bltnodeptr) }
  25.         vbsrv,
  26.         timsrv,
  27.         bltsrv          : Interrupt;
  28.         TextFonts       : List;
  29.         DefaultFont     : Address;      { TextFontPtr }
  30.         Modes           : Short;        { copy of current first bplcon0 }
  31.         VBlank          : Byte;
  32.         Debug           : Byte;
  33.         BeamSync        : Short;
  34.         system_bplcon0  : Short; { it is ored into each bplcon0 for display }
  35.         SpriteReserved  : Byte;
  36.         bytereserved    : Byte;
  37.         Flags           : Short;
  38.         BlitLock        : Short;
  39.         BlitNest        : Short;
  40.  
  41.         BlitWaitQ       : List;
  42.         BlitOwner       : Address;      { TaskPtr }
  43.         TOF_WaitQ       : List;
  44.         DisplayFlags    : Short;        { NTSC PAL GENLOC etc}
  45.  
  46.                 { Display flags are determined at power on }
  47.  
  48.         SimpleSprites   : Address;      { SimpleSpritePtr ptr }
  49.         MaxDisplayRow   : Short;        { hardware stuff, do not use }
  50.         MaxDisplayColumn : Short;       { hardware stuff, do not use }
  51.         NormalDisplayRows : Short;
  52.         NormalDisplayColumns : Short;
  53.  
  54.         { the following are for standard non interlace, 1/2 wb width }
  55.  
  56.         NormalDPMX      : Short;        { Dots per meter on display }
  57.         NormalDPMY      : Short;        { Dots per meter on display }
  58.         LastChanceMemory : Address;     { SignalSemaphorePtr }
  59.         LCMptr          : Address;
  60.         MicrosPerLine   : Short;        { 256 time usec/line }
  61.         MinDisplayColumn : Short;
  62.         ChipRevBits0    : Byte;
  63.         crb_reserved  :  Array[0..4] of Byte;
  64.         monitor_id  : Short;             { normally null }
  65.         hedley  : Array[0..7] of Integer;
  66.         hedley_sprites  : Array[0..7] of Integer;     { sprite ptrs for intuition mouse }
  67.         hedley_sprites1 : Array[0..7] of Integer;            { sprite ptrs for intuition mouse }
  68.         hedley_count    : Short;
  69.         hedley_flags    : Short;
  70.         hedley_tmp      : Short;
  71.         hash_table      : Address;
  72.         current_tot_rows : Short;
  73.         current_tot_cclks : Short;
  74.         hedley_hint     : Byte;
  75.         hedley_hint2    : Byte;
  76.         nreserved       : Array[0..3] of Integer;
  77.         a2024_sync_raster : Address;
  78.         control_delta_pal : Short;
  79.         control_delta_ntsc : Short;
  80.         current_monitor : MonitorSpecPtr;
  81.         MonitorList     : List;
  82.         default_monitor : MonitorSpecPtr;
  83.         MonitorListSemaphore : SignalSemaphorePtr;
  84.         DisplayInfoDataBase : Address;
  85.         ActiViewCprSemaphore : SignalSemaphorePtr;
  86.         UtilityBase  : Address;           { for hook AND tag utilities   }
  87.         ExecBase     : Address;              { to link with rom.lib }
  88.         bwshifts     : Address;
  89.         StrtFetchMasks,
  90.         StopFetchMasks,
  91.         Overrun,
  92.         RealStops    : Address;
  93.         SpriteWidth,                    { current width (in words) of sprites }
  94.         SpriteFMode  : WORD;            { current sprite fmode bits    }
  95.         SoftSprites,                    { bit mask of size change knowledgeable sprites }
  96.         arraywidth   : BYTE;
  97.         DefaultSpriteWidth : WORD;      { what width intuition wants }
  98.         SprMoveDisable,
  99.         WantChips,
  100.         BoardMemType,
  101.         Bugs         : Byte;
  102.         gb_LayersBase : Address;
  103.         ColorMask    : Integer;
  104.         IVector,
  105.         IData        : Address;
  106.         SpecialCounter : Integer;         { special for double buffering }
  107.         DBList       : Address;
  108.         MonitorFlags : WORD;
  109.         ScanDoubledSprites,
  110.         BP3Bits      : Byte;
  111.         MonitorVBlank  : AnalogSignalInterval;
  112.         natural_monitor  : MonitorSpecPtr;
  113.         ProgData     : Address;
  114.         ExtSprites   : Byte;
  115.         pad3         : Byte;
  116.         GfxFlags     : WORD;
  117.         VBCounter    : Integer;
  118.         HashTableSemaphore  : SignalSemaphorePtr;
  119.         HWEmul       : Array[0..8] of Address;
  120.     end;
  121.     GfxBasePtr = ^GfxBaseRec;
  122.  
  123. const
  124.  
  125.     NTSC        = 1;
  126.     GENLOC      = 2;
  127.     PAL         = 4;
  128.     TODA_SAFE   = 8;
  129.  
  130.     BLITMSG_FAULT = 4;
  131.  
  132. { bits defs for ChipRevBits }
  133.    GFXB_BIG_BLITS = 0 ;
  134.    GFXB_HR_AGNUS  = 0 ;
  135.    GFXB_HR_DENISE = 1 ;
  136.    GFXB_AA_ALICE  = 2 ;
  137.    GFXB_AA_LISA   = 3 ;
  138.    GFXB_AA_MLISA  = 4 ;      { internal use only. }
  139.  
  140.    GFXF_BIG_BLITS = 1 ;
  141.    GFXF_HR_AGNUS  = 1 ;
  142.    GFXF_HR_DENISE = 2 ;
  143.    GFXF_AA_ALICE  = 4 ;
  144.    GFXF_AA_LISA   = 8 ;
  145.    GFXF_AA_MLISA  = 16;      { internal use only }
  146.  
  147. { Pass ONE of these to SetChipRev() }
  148.    SETCHIPREV_A   = GFXF_HR_AGNUS;
  149.    SETCHIPREV_ECS = (GFXF_HR_AGNUS OR GFXF_HR_DENISE);
  150.    SETCHIPREV_AA  = (GFXF_AA_ALICE OR GFXF_AA_LISA OR SETCHIPREV_ECS);
  151.    SETCHIPREV_BEST= $ffffffff;
  152.  
  153. { memory type }
  154.    BUS_16         = 0;
  155.    NML_CAS        = 0;
  156.    BUS_32         = 1;
  157.    DBL_CAS        = 2;
  158.    BANDWIDTH_1X   = (BUS_16 OR NML_CAS);
  159.    BANDWIDTH_2XNML= BUS_32;
  160.    BANDWIDTH_2XDBL= DBL_CAS;
  161.    BANDWIDTH_4X   = (BUS_32 OR DBL_CAS);
  162.  
  163. { GfxFlags (private) }
  164.    NEW_DATABASE   = 1;
  165.  
  166.    GRAPHICSNAME   = "graphics.library";
  167.  
  168.  
  169. FUNCTION SetChipRev(want : Integer) : Integer;
  170.     External;
  171.  
  172.  
  173.