src/video/xbios/SDL_xbios.h
changeset 3283 1ed5d432e468
parent 3282 10a12f77f597
child 3284 2b95b2c0b6d4
equal deleted inserted replaced
3282:10a12f77f597 3283:1ed5d432e468
     1 /*
       
     2     SDL - Simple DirectMedia Layer
       
     3     Copyright (C) 1997-2009 Sam Lantinga
       
     4 
       
     5     This library is free software; you can redistribute it and/or
       
     6     modify it under the terms of the GNU Lesser General Public
       
     7     License as published by the Free Software Foundation; either
       
     8     version 2.1 of the License, or (at your option) any later version.
       
     9 
       
    10     This library is distributed in the hope that it will be useful,
       
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    13     Lesser General Public License for more details.
       
    14 
       
    15     You should have received a copy of the GNU Lesser General Public
       
    16     License along with this library; if not, write to the Free Software
       
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
       
    18 
       
    19     Sam Lantinga
       
    20     slouken@libsdl.org
       
    21 */
       
    22 #include "SDL_config.h"
       
    23 
       
    24 #ifndef _SDL_xbios_h
       
    25 #define _SDL_xbios_h
       
    26 
       
    27 #include "SDL_stdinc.h"
       
    28 #include "../SDL_sysvideo.h"
       
    29 
       
    30 typedef struct SDL_VideoData
       
    31 {
       
    32     long cookie_vdo;            /* _VDO cookie */
       
    33 
       
    34     Uint16 old_modecode;        /* Current video mode */
       
    35     void *old_vbase;            /* Current pointer to video RAM */
       
    36     int old_numcol;             /* Number of colors in saved palette */
       
    37     Uint32 old_palette[256];    /* Buffer to save current palette */
       
    38 
       
    39 #if 0
       
    40     int old_video_mode;         /* Old video mode before entering SDL */
       
    41     void *old_video_base;       /* Old pointer to screen buffer */
       
    42     void *old_palette;          /* Old palette */
       
    43     Uint32 old_num_colors;      /* Nb of colors in saved palette */
       
    44     int num_modes;              /* Number of xbios video modes */
       
    45     xbiosmode_t *mode_list;     /* List of xbios video modes */
       
    46 
       
    47     void *screens[2];           /* Pointers to aligned screen buffer */
       
    48     void *screensmem[2];        /* Pointers to screen buffer */
       
    49     void *shadowscreen;         /* Shadow screen for c2p conversion */
       
    50     int doubleline;             /* Double line mode ? */
       
    51     int frame_number;           /* Number of frame for double buffer */
       
    52     int pitch;                  /* Destination line width for C2P */
       
    53     int width, height;          /* Screen size for centered C2P */
       
    54 
       
    55     SDL_bool centscreen;        /* Centscreen extension present ? */
       
    56 
       
    57     SDL_Rect *SDL_modelist[NUM_MODELISTS][SDL_NUMMODES + 1];
       
    58     xbiosmode_t *videomodes[NUM_MODELISTS][SDL_NUMMODES + 1];
       
    59 #endif
       
    60 } SDL_VideoData;
       
    61 
       
    62 /* _VDO cookie values */
       
    63 enum
       
    64 {
       
    65     VDO_ST = 0,
       
    66     VDO_STE,
       
    67     VDO_TT,
       
    68     VDO_F30
       
    69 };
       
    70 
       
    71 /* Monitor types */
       
    72 enum
       
    73 {
       
    74     MONITOR_MONO = 0,
       
    75     MONITOR_TV,
       
    76     MONITOR_VGA,
       
    77     MONITOR_RGB
       
    78 };
       
    79 
       
    80 /* EgetShift masks */
       
    81 #define ES_BANK		0x000f
       
    82 #define ES_MODE		0x0700
       
    83 #define ES_GRAY		0x1000
       
    84 #define ES_SMEAR	0x8000
       
    85 
       
    86 /* TT shifter modes */
       
    87 #define ST_LOW	0x0000
       
    88 #define ST_MED	0x0100
       
    89 #define ST_HIGH	0x0200
       
    90 #define TT_LOW	0x0700
       
    91 #define TT_MED	0x0300
       
    92 #define TT_HIGH	0x0600
       
    93 
       
    94 #endif /* _SDL_xbios_h */
       
    95 /* vi: set ts=4 sw=4 expandtab: */