ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/include/video.h
Revision: 1.1
Committed: 2002-02-04T16:58:13Z (22 years, 9 months ago) by cebix
Content type: text/plain
Branch: MAIN
Branch point for: cebix
Log Message:
Initial revision

File Contents

# User Rev Content
1 cebix 1.1 /*
2     * video.h - Video/graphics emulation
3     *
4     * SheepShaver (C) 1997-2002 Marc Hellwig and Christian Bauer
5     *
6     * This program is free software; you can redistribute it and/or modify
7     * it under the terms of the GNU General Public License as published by
8     * the Free Software Foundation; either version 2 of the License, or
9     * (at your option) any later version.
10     *
11     * This program is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15     *
16     * You should have received a copy of the GNU General Public License
17     * along with this program; if not, write to the Free Software
18     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19     */
20    
21     #ifndef VIDEO_H
22     #define VIDEO_H
23    
24     extern bool VideoActivated(void);
25     extern bool VideoSnapshot(int xsize, int ysize, uint8 *p);
26    
27     extern int16 VideoDoDriverIO(void *spaceID, void *commandID, void *commandContents, uint32 commandCode, uint32 commandKind);
28    
29     // System specific and internal functions/data
30     struct VideoInfo {
31     int viType; // Screen/Window
32     uint32 viRowBytes; // width of each row in memory
33     uint16 viXsize,viYsize; // Window
34     uint32 viAppleMode; // Screen Color Depth
35     uint32 viAppleID; // Screen DisplayID
36     };
37    
38     extern struct VideoInfo VModes[]; // List of available video modes
39    
40     enum { // viAppleMode
41     APPLE_1_BIT = 0x80,
42     APPLE_2_BIT,
43     APPLE_4_BIT,
44     APPLE_8_BIT,
45     APPLE_16_BIT,
46     APPLE_32_BIT
47     };
48    
49     enum { // viAppleID
50     APPLE_640x480 = 0x81,
51     APPLE_W_640x480,
52     APPLE_800x600,
53     APPLE_W_800x600,
54     APPLE_1024x768,
55     APPLE_1152x900,
56     APPLE_1280x1024,
57     APPLE_1600x1200,
58     APPLE_ID_MIN = APPLE_640x480,
59     APPLE_ID_MAX = APPLE_1600x1200
60     };
61    
62     enum { // Display type
63     DIS_INVALID,
64     DIS_SCREEN,
65     DIS_WINDOW
66     };
67    
68     extern bool video_activated; // Flag: video display activated, mouse and keyboard data valid
69     extern uint32 screen_base; // Frame buffer base address
70     extern int cur_mode; // Number of current video mode (index in VModes array)
71     extern int display_type; // Current display type (see above)
72     extern rgb_color mac_pal[256];
73     extern uint8 remap_mac_be[256];
74     extern uint8 MacCursor[68];
75    
76     struct GammaTbl;
77    
78     struct VidLocals{
79     uint16 saveMode;
80     uint32 saveData;
81     uint16 savePage;
82     uint32 saveBaseAddr;
83     GammaTbl *gammaTable; // Current gamma table
84     uint32 maxGammaTableSize; // Biggest gamma table allocated
85     uint32 saveVidParms;
86     bool luminanceMapping; // Luminance mapping on/off
87     int32 cursorX; // Hardware cursor state. Unused, but must be remembered
88     int32 cursorY;
89     uint32 cursorVisible;
90     uint32 cursorSet;
91     uint32 vslServiceID; // VSL interrupt service ID
92     bool interruptsEnabled; // VBL interrupts on/off
93     uint32 regEntryID[4];
94     };
95    
96     extern VidLocals *private_data; // Pointer to driver local variables (there is only one display, so this is ok)
97    
98     extern bool VideoInit(void);
99     extern void VideoExit(void);
100     extern void VideoVBL(void);
101     extern void VideoInstallAccel(void);
102     extern void VideoQuitFullScreen(void);
103    
104     extern void video_set_palette(void);
105     extern void video_set_cursor(void);
106     extern int16 video_mode_change(VidLocals *csSave, uint32 ParamPtr);
107    
108     extern int16 VSLDoInterruptService(uint32 arg1);
109     extern void NQDMisc(uint32 arg1, void *arg2);
110    
111     extern bool keyfile_valid;
112    
113     #endif