
? File: graphics/ModeID.h

#ifndef GRAPHICS_MODEID_H
#define GRAPHICS_MODEID_H
/*
** $VER: modeid.h 39.4 (24.07.92)
** Includes Release 39.108
**
** include define file for graphics display mode IDs.
**
** (C) Copyright 1985-1992 Commodore-Amiga, Inc.
**     All Rights Reserved
*/

#ifndef GRAPHICS_DISPLAYINFO_H
#include <graphics/displayinfo.h>
#endif

#define INVALID_ID         ~0

/* normal identifiers */

#define MONITOR_ID_MASK       0xFFFF1000

#define DEFAULT_MONITOR_ID    0x00000000
#define NTSC_MONITOR_ID       0x00011000
#define PAL_MONITOR_ID        0x00021000

/* the following 22 composite keys are for Modes on the default Monitor.
 * NTSC & PAL "flavors" of these particular keys may be made by or'ing
 * the NTSC or PAL MONITOR_ID with the desired MODE_KEY...
 *
 * For example, to specifically open a PAL HAM interlaced ViewPort
 * (or intuition screen), you would use the modeid of
 * (PAL_MONITOR_ID | HAMLACE_KEY)
 */

#define LORES_KEY       0x00000000
#define HIRES_KEY       0x00008000
#define SUPER_KEY       0x00008020
#define HAM_KEY            0x00000800
#define LORESLACE_KEY         0x00000004
#define HIRESLACE_KEY         0x00008004
#define SUPERLACE_KEY         0x00008024
#define HAMLACE_KEY        0x00000804
#define LORESDPF_KEY       0x00000400
#define HIRESDPF_KEY       0x00008400
#define SUPERDPF_KEY       0x00008420
#define LORESLACEDPF_KEY      0x00000404
#define HIRESLACEDPF_KEY      0x00008404
#define SUPERLACEDPF_KEY      0x00008424
#define LORESDPF2_KEY         0x00000440
#define HIRESDPF2_KEY         0x00008440
#define SUPERDPF2_KEY         0x00008460
#define LORESLACEDPF2_KEY     0x00000444
#define HIRESLACEDPF2_KEY     0x00008444
#define SUPERLACEDPF2_KEY     0x00008464
#define EXTRAHALFBRITE_KEY    0x00000080
#define EXTRAHALFBRITELACE_KEY      0x00000084
/* New for AA ChipSet (V39) */
#define HIRESHAM_KEY       0x00008800
#define SUPERHAM_KEY       0x00008820
#define HIRESEHB_KEY       0x00008080
#define SUPEREHB_KEY       0x000080a0
#define HIRESHAMLACE_KEY      0x00008804
#define SUPERHAMLACE_KEY      0x00008824
#define HIRESEHBLACE_KEY      0x00008084
#define SUPEREHBLACE_KEY      0x000080a4

/* VGA identifiers */

#define VGA_MONITOR_ID        0x00031000

#define VGAEXTRALORES_KEY     0x00031004
#define VGALORES_KEY       0x00039004
#define VGAPRODUCT_KEY        0x00039024
#define VGAHAM_KEY         0x00031804
#define VGAEXTRALORESLACE_KEY    0x00031005
#define VGALORESLACE_KEY      0x00039005
#define VGAPRODUCTLACE_KEY    0x00039025
#define VGAHAMLACE_KEY        0x00031805
#define VGAEXTRALORESDPF_KEY     0x00031404
#define VGALORESDPF_KEY       0x00039404
#define VGAPRODUCTDPF_KEY     0x00039424
#define VGAEXTRALORESLACEDPF_KEY 0x00031405
#define VGALORESLACEDPF_KEY      0x00039405
#define VGAPRODUCTLACEDPF_KEY    0x00039425
#define VGAEXTRALORESDPF2_KEY    0x00031444
#define VGALORESDPF2_KEY      0x00039444
#define VGAPRODUCTDPF2_KEY    0x00039464
#define VGAEXTRALORESLACEDPF2_KEY   0x00031445
#define VGALORESLACEDPF2_KEY     0x00039445
#define VGAPRODUCTLACEDPF2_KEY      0x00039465
#define VGAEXTRAHALFBRITE_KEY    0x00031084
#define VGAEXTRAHALFBRITELACE_KEY   0x00031085
/* New for AA ChipSet (V39) */
#define VGAPRODUCTHAM_KEY     0x00039824
#define VGALORESHAM_KEY       0x00039804
#define VGAEXTRALORESHAM_KEY     VGAHAM_KEY
#define VGAPRODUCTHAMLACE_KEY    0x00039825
#define VGALORESHAMLACE_KEY      0x00039805
#define VGAEXTRALORESHAMLACE_KEY VGAHAMLACE_KEY
#define VGAEXTRALORESEHB_KEY     VGAEXTRAHALFBRITE_KEY
#define VGAEXTRALORESEHBLACE_KEY VGAEXTRAHALFBRITELACE_KEY
#define VGALORESEHB_KEY       0x00039084
#define VGALORESEHBLACE_KEY      0x00039085
#define VGAEHB_KEY         0x000390a4
#define VGAEHBLACE_KEY        0x000390a5

/* a2024 identifiers */

#define A2024_MONITOR_ID      0x00041000

#define A2024TENHERTZ_KEY     0x00041000
#define A2024FIFTEENHERTZ_KEY    0x00049000

/* prototype identifiers (private) */

#define PROTO_MONITOR_ID      0x00051000


/* These monitors and modes were added for the V38 release. */

#define EURO72_MONITOR_ID     0x00061000

#define EURO72EXTRALORES_KEY     0x00061004
#define EURO72LORES_KEY       0x00069004
#define EURO72PRODUCT_KEY     0x00069024
#define EURO72HAM_KEY         0x00061804
#define EURO72EXTRALORESLACE_KEY 0x00061005
#define EURO72LORESLACE_KEY      0x00069005
#define EURO72PRODUCTLACE_KEY    0x00069025
#define EURO72HAMLACE_KEY     0x00061805
#define EURO72EXTRALORESDPF_KEY     0x00061404
#define EURO72LORESDPF_KEY    0x00069404
#define EURO72PRODUCTDPF_KEY     0x00069424
#define EURO72EXTRALORESLACEDPF_KEY 0x00061405
#define EURO72LORESLACEDPF_KEY      0x00069405
#define EURO72PRODUCTLACEDPF_KEY 0x00069425
#define EURO72EXTRALORESDPF2_KEY 0x00061444
#define EURO72LORESDPF2_KEY      0x00069444
#define EURO72PRODUCTDPF2_KEY    0x00069464
#define EURO72EXTRALORESLACEDPF2_KEY   0x00061445
#define EURO72LORESLACEDPF2_KEY     0x00069445
#define EURO72PRODUCTLACEDPF2_KEY   0x00069465
#define EURO72EXTRAHALFBRITE_KEY 0x00061084
#define EURO72EXTRAHALFBRITELACE_KEY   0x00061085
/* New AA modes (V39) */
#define EURO72PRODUCTHAM_KEY     0x00069824
#define EURO72PRODUCTHAMLACE_KEY 0x00069825
#define EURO72LORESHAM_KEY    0x00069804
#define EURO72LORESHAMLACE_KEY      0x00069805
#define EURO72EXTRALORESHAM_KEY     EURO72HAM_KEY
#define EURO72EXTRALORESHAMLACE_KEY EURO72HAMLACE_KEY
#define EURO72EXTRALORESEHB_KEY     EURO72EXTRAHALFBRITE_KEY
#define EURO72EXTRALORESEHBLACE_KEY EURO72EXTRAHALFBRITELACE_KEY
#define EURO72LORESEHB_KEY    0x00069084
#define EURO72LORESEHBLACE_KEY      0x00069085
#define EURO72EHB_KEY         0x000690a4
#define EURO72EHBLACE_KEY     0x000690a5


#define EURO36_MONITOR_ID     0x00071000

/* Euro36 modeids can be ORed with the default modeids a la NTSC and PAL.
 * For example, Euro36 SuperHires is
 * (EURO36_MONITOR_ID | SUPER_KEY)
 */

#define SUPER72_MONITOR_ID    0x00081000

/* Similarly for Super72 modes. */


/* These monitors and modes were added for the V39 release. */

#define DBLNTSC_MONITOR_ID    0x00091000

#define DBLNTSCLORES_KEY      0x00091000
#define DBLNTSCLORESFF_KEY    0x00091004
#define DBLNTSCLORESHAM_KEY      0x00091800
#define DBLNTSCLORESHAMFF_KEY    0x00091804
#define DBLNTSCLORESEHB_KEY      0x00091080
#define DBLNTSCLORESEHBFF_KEY    0x00091084
#define DBLNTSCLORESLACE_KEY     0x00091005
#define DBLNTSCLORESHAMLACE_KEY     0x00091805
#define DBLNTSCLORESEHBLACE_KEY     0x00091085
#define DBLNTSCLORESDPF_KEY      0x00091400
#define DBLNTSCLORESDPFLACE_KEY     0x00091404
#define DBLNTSCLORESDPF2_KEY     0x00091440
#define DBLNTSCLORESDPF2LACE_KEY 0x00091444
#define DBLNTSCHIRES_KEY      0x00099000
#define DBLNTSCHIRESFF_KEY    0x00099004
#define DBLNTSCHIRESHAM_KEY      0x00099800
#define DBLNTSCHIRESHAMFF_KEY    0x00099804
#define DBLNTSCHIRESLACE_KEY     0x00099005
#define DBLNTSCHIRESHAMLACE_KEY     0x00099805
#define DBLNTSCHIRESEHB_KEY      0x00099080
#define DBLNTSCHIRESEHBFF_KEY    0x00099084
#define DBLNTSCHIRESEHBLACE_KEY     0x00099085
#define DBLNTSCHIRESDPF_KEY      0x00099400
#define DBLNTSCHIRESDPFLACE_KEY     0x00099404
#define DBLNTSCHIRESDPF2_KEY     0x00099440
#define DBLNTSCHIRESDPF2LACE_KEY 0x00099444

#define DBLPAL_MONITOR_ID     0x000a1000

#define DBLPALLORES_KEY       0x000a1000
#define DBLPALLORESFF_KEY     0x000a1004
#define DBLPALLORESHAM_KEY    0x000a1800
#define DBLPALLORESHAMFF_KEY     0x000a1804
#define DBLPALLORESEHB_KEY    0x000a1080
#define DBLPALLORESEHBFF_KEY     0x000a1084
#define DBLPALLORESLACE_KEY      0x000a1005
#define DBLPALLORESHAMLACE_KEY      0x000a1805
#define DBLPALLORESEHBLACE_KEY      0x000a1085
#define DBLPALLORESDPF_KEY    0x000a1400
#define DBLPALLORESDPFLACE_KEY      0x000a1404
#define DBLPALLORESDPF2_KEY      0x000a1440
#define DBLPALLORESDPF2LACE_KEY     0x000a1444
#define DBLPALHIRES_KEY       0x000a9000
#define DBLPALHIRESFF_KEY     0x000a9004
#define DBLPALHIRESHAM_KEY    0x000a9800
#define DBLPALHIRESHAMFF_KEY     0x000a9804
#define DBLPALHIRESLACE_KEY      0x000a9005
#define DBLPALHIRESHAMLACE_KEY      0x000a9805
#define DBLPALHIRESEHB_KEY    0x000a9080
#define DBLPALHIRESEHBFF_KEY     0x000a9084
#define DBLPALHIRESEHBLACE_KEY         0x000a9085
#define DBLPALHIRESDPF_KEY    0x000a9400
#define DBLPALHIRESDPFLACE_KEY      0x000a9404
#define DBLPALHIRESDPF2_KEY      0x000a9440
#define DBLPALHIRESDPF2LACE_KEY     0x000a9444


/* Use these tags for passing to BestModeID() (V39) */

#define SPECIAL_FLAGS (DIPF_IS_DUALPF | DIPF_IS_PF2PRI | DIPF_IS_HAM | DIPF_IS_EXTRAHALFBRITE)

#define BIDTAG_DIPFMustHave   0x80000001  /* mask of the DIPF_ flags the ModeID must have */
            /* Default - NULL */
#define BIDTAG_DIPFMustNotHave   0x80000002  /* mask of the DIPF_ flags the ModeID must not have */
            /* Default - SPECIAL_FLAGS */
#define BIDTAG_ViewPort    0x80000003  /* ViewPort for which a ModeID is sought. */
            /* Default - NULL */
#define BIDTAG_NominalWidth   0x80000004  /* \ together make the aspect ratio and */
#define BIDTAG_NominalHeight  0x80000005  /* / override the vp->Width/Height. */
            /* Default - SourceID NominalDimensionInfo,
             * or vp->DWidth/Height, or (640 * 200),
             * in that preferred order.
             */
#define BIDTAG_DesiredWidth   0x80000006  /* \ Nominal Width and Height of the */
#define BIDTAG_DesiredHeight  0x80000007  /* / returned ModeID. */
            /* Default - same as Nominal */
#define BIDTAG_Depth    0x80000008  /* ModeID must support this depth. */
            /* Default - vp->RasInfo->BitMap->Depth or 1 */
#define BIDTAG_MonitorID   0x80000009  /* ModeID must use this monitor. */
            /* Default - use best monitor available */
#define BIDTAG_SourceID    0x8000000a  /* instead of a ViewPort. */
            /* Default - VPModeID(vp) or HIRES_KEY */
#define BIDTAG_RedBits     0x8000000b  /* \           */
#define BIDTAG_BlueBits    0x8000000c  /* } Match up from the database */
#define BIDTAG_GreenBits   0x8000000d  /* /           */
            /* Default - 4 */
#endif /* GRAPHICS_MODEID_H */






? File: graphics/DisplayInfo.h




#ifndef  GRAPHICS_DISPLAYINFO_H
#define  GRAPHICS_DISPLAYINFO_H
/*
** $VER: displayinfo.h 39.11 (06.06.92)
** Includes Release 39.108
**
** include define file for displayinfo database
**
** (C) Copyright 1985-1992 Commodore-Amiga, Inc.
**     All Rights Reserved
*/

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif /* EXEC_TYPES_H */

#ifndef GRAPHICS_GFX_H
#include <graphics/gfx.h>
#endif /* GRAPHICS_GFX_H */

#ifndef GRAPHICS_MONITOR_H
#include <graphics/monitor.h>
#endif /* GRAPHICS_MONITOR_H */

#ifndef GRAPHICS_MODEID_H
#include <graphics/modeid.h>
#endif /* GRAPHICS_MODEID_H */

#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif /* UTILITY_TAGITEM_H */

/* the "public" handle to a DisplayInfoRecord */

typedef APTR DisplayInfoHandle;

/* datachunk type identifiers */

#define DTAG_DISP    0x80000000
#define DTAG_DIMS    0x80001000
#define DTAG_MNTR    0x80002000
#define DTAG_NAME    0x80003000
#define DTAG_VEC     0x80004000  /* internal use only */

struct QueryHeader
{
   ULONG StructID;   /* datachunk type identifier */
   ULONG DisplayID;  /* copy of display record key */
   ULONG SkipID;     /* TAG_SKIP -- see tagitems.h */
   ULONG Length;     /* length of local data in double-longwords */
};

struct DisplayInfo
{
   struct   QueryHeader Header;
   UWORD NotAvailable;  /* if NULL available, else see defines */
   ULONG PropertyFlags; /* Properties of this mode see defines */
   Point Resolution; /* ticks-per-pixel X/Y            */
   UWORD PixelSpeed; /* aproximation in nanoseconds          */
   UWORD NumStdSprites; /* number of standard amiga sprites    */
   UWORD PaletteRange;  /* OBSOLETE - use Red/Green/Blue bits instead */
   Point SpriteResolution; /* std sprite ticks-per-pixel X/Y    */
   UBYTE pad[4];     /* used internally */
   UBYTE RedBits; /* number of Red bits this display supports (V39) */
   UBYTE GreenBits;  /* number of Green bits this display supports (V39) */
   UBYTE BlueBits;   /* number of Blue bits this display supports (V39) */
   UBYTE pad2[5]; /* find some use for this. */
   ULONG reserved[2];   /* terminator */
};

/* availability */

#define DI_AVAIL_NOCHIPS   0x0001
#define DI_AVAIL_NOMONITOR 0x0002
#define DI_AVAIL_NOTWITHGENLOCK  0x0004

/* mode properties */

#define DIPF_IS_LACE    0x00000001
#define DIPF_IS_DUALPF     0x00000002
#define DIPF_IS_PF2PRI     0x00000004
#define DIPF_IS_HAM     0x00000008

#define DIPF_IS_ECS     0x00000010  /* note: ECS modes (SHIRES, VGA, and **
                                 ** PRODUCTIVITY) do not support      **
                                 ** attached sprites.         **
                                 */
#define DIPF_IS_AA      0x00010000  /* AA modes - may only be available
                  ** if machine has correct memory
                  ** type to support required
                  ** bandwidth - check availability.
                  ** (V39)
                  */
#define DIPF_IS_PAL     0x00000020
#define DIPF_IS_SPRITES    0x00000040
#define DIPF_IS_GENLOCK    0x00000080

#define DIPF_IS_WB      0x00000100
#define DIPF_IS_DRAGGABLE  0x00000200
#define DIPF_IS_PANELLED   0x00000400
#define DIPF_IS_BEAMSYNC   0x00000800

#define DIPF_IS_EXTRAHALFBRITE   0x00001000

/* The following DIPF_IS_... flags are new for V39 */
#define DIPF_IS_SPRITES_ATT      0x00002000  /* supports attached sprites */
#define DIPF_IS_SPRITES_CHNG_RES 0x00004000  /* supports variable sprite resolution */
#define DIPF_IS_SPRITES_BORDER      0x00008000  /* sprite can be displayed in the border */
#define DIPF_IS_SCANDBL       0x00020000  /* scan doubled */
#define DIPF_IS_SPRITES_CHNG_BASE   0x00040000
                                 /* can change the sprite base colour */
#define DIPF_IS_SPRITES_CHNG_PRI 0x00080000
                                 /* can change the sprite priority
                                 ** with respect to the playfield(s).
                                 */
#define DIPF_IS_DBUFFER    0x00100000  /* can support double buffering */
#define DIPF_IS_PROGBEAM   0x00200000  /* is a programmed beam-sync mode */
#define DIPF_IS_FOREIGN    0x80000000  /* this mode is not native to the Amiga */


struct DimensionInfo
{
   struct   QueryHeader Header;
   UWORD MaxDepth;         /* log2( max number of colors ) */
   UWORD MinRasterWidth;       /* minimum width in pixels      */
   UWORD MinRasterHeight;      /* minimum height in pixels     */
   UWORD MaxRasterWidth;       /* maximum width in pixels      */
   UWORD MaxRasterHeight;      /* maximum height in pixels     */
   struct   Rectangle   Nominal;  /* "standard" dimensions        */
   struct   Rectangle   MaxOScan; /* fixed, hardware dependant    */
   struct   Rectangle VideoOScan; /* fixed, hardware dependant    */
   struct   Rectangle   TxtOScan; /* editable via preferences     */
   struct   Rectangle   StdOScan; /* editable via preferences     */
   UBYTE pad[14];
   ULONG reserved[2];         /* terminator */
};

struct MonitorInfo
{
   struct   QueryHeader Header;
   struct   MonitorSpec  *Mspc;   /* pointer to monitor specification  */
   Point ViewPosition;        /* editable via preferences      */
   Point ViewResolution;       /* standard monitor ticks-per-pixel  */
   struct   Rectangle ViewPositionRange;  /* fixed, hardware dependant */
   UWORD TotalRows;        /* display height in scanlines      */
   UWORD TotalColorClocks;     /* scanline width in 280 ns units    */
   UWORD MinRow;        /* absolute minimum active scanline  */
   WORD  Compatibility;       /* how this coexists with others    */
   UBYTE pad[36];
   Point DefaultViewPosition;  /* original, never changes */
   ULONG PreferredModeID;      /* for Preferences */
   ULONG reserved[2];         /* terminator */
};

/* monitor compatibility */

#define MCOMPAT_MIXED   0  /* can share display with other MCOMPAT_MIXED */
#define MCOMPAT_SELF 1  /* can share only within same monitor */
#define MCOMPAT_NOBODY -1  /* only one viewport at a time */

#define DISPLAYNAMELEN 32

struct NameInfo
{
   struct   QueryHeader Header;
   UBYTE Name[DISPLAYNAMELEN];
   ULONG reserved[2];         /* terminator */
};

/******************************************************************************/

/* The following VecInfo structure is PRIVATE, for our use only
 * Touch these, and burn! (V39)
 */

struct VecInfo
{
   struct   QueryHeader   Header;
   APTR  Vec;
   APTR  Data;
   UWORD Type;
   UWORD pad[3];
   ULONG reserved[2];
};

#endif   /* GRAPHICS_DISPLAYINFO_H */
