4195
|
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 Library General Public
|
|
7 License as published by the Free Software Foundation; either
|
|
8 version 2 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 Library General Public License for more details.
|
|
14
|
|
15 You should have received a copy of the GNU Library General Public
|
|
16 License along with this library; if not, write to the Free
|
|
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
18
|
|
19 Sam Lantinga
|
|
20 slouken@libsdl.org
|
|
21 */
|
|
22 #include "SDL_config.h"
|
|
23
|
|
24 /*
|
|
25 Milan Xbios video functions
|
|
26
|
|
27 Patrice Mandin
|
|
28 */
|
|
29
|
|
30 #ifndef _SDL_xbios_milan_h
|
|
31 #define _SDL_xbios_milan_h
|
|
32
|
|
33 #include "SDL_xbios.h"
|
|
34
|
|
35 /*--- Defines ---*/
|
|
36
|
|
37 /* Cookies */
|
|
38 #ifndef C__MIL
|
|
39 #define C__MIL 0x5F4D494CL
|
|
40 #endif
|
|
41
|
|
42 #ifndef C__VDI
|
|
43 #define C__VDI 0x5F564449L
|
|
44 #endif
|
|
45
|
|
46 /* Vsetscreen() parameters */
|
|
47 #define MI_MAGIC 0x4D49
|
|
48
|
|
49 enum {
|
|
50 CMD_GETMODE=0,
|
|
51 CMD_SETMODE,
|
|
52 CMD_GETINFO,
|
|
53 CMD_ALLOCPAGE,
|
|
54 CMD_FREEPAGE,
|
|
55 CMD_FLIPPAGE,
|
|
56 CMD_ALLOCMEM,
|
|
57 CMD_FREEMEM,
|
|
58 CMD_SETADR,
|
|
59 CMD_ENUMMODES
|
|
60 };
|
|
61
|
|
62 enum {
|
|
63 ENUMMODE_EXIT=0,
|
|
64 ENUMMODE_CONT
|
|
65 };
|
|
66
|
|
67 enum {
|
|
68 BLK_ERR=0,
|
|
69 BLK_OK,
|
|
70 BLK_CLEARED
|
|
71 };
|
|
72
|
|
73 /* bitFlags */
|
|
74 #define STANDARD_BITS 1
|
|
75 #define FALCON_BITS 2
|
|
76 #define INTEL_BITS 8
|
|
77
|
|
78 /*--- Structures ---*/
|
|
79
|
|
80 typedef struct _scrblk {
|
|
81 unsigned long size; /* size of strukture */
|
|
82 unsigned long blk_status; /* status bits of blk */
|
|
83 unsigned long blk_start; /* Start Adress */
|
|
84 unsigned long blk_len; /* length of memblk */
|
|
85 unsigned long blk_x; /* x pos in total screen*/
|
|
86 unsigned long blk_y; /* y pos in total screen */
|
|
87 unsigned long blk_w; /* width */
|
|
88 unsigned long blk_h; /* height */
|
|
89 unsigned long blk_wrap; /* width in bytes */
|
|
90 } __attribute__((packed)) SCRMEMBLK;
|
|
91
|
|
92 typedef struct screeninfo {
|
|
93 unsigned long size; /* Size of structure */
|
|
94 unsigned long devID; /* device id number */
|
|
95 unsigned char name[64]; /* Friendly name of Screen */
|
|
96 unsigned long scrFlags; /* some Flags */
|
|
97 unsigned long frameadr; /* Adress of framebuffer */
|
|
98 unsigned long scrHeight; /* visible X res */
|
|
99 unsigned long scrWidth; /* visible Y res */
|
|
100 unsigned long virtHeight; /* virtual X res */
|
|
101 unsigned long virtWidth; /* virtual Y res */
|
|
102 unsigned long scrPlanes; /* color Planes */
|
|
103 unsigned long scrColors; /* # of colors */
|
|
104 unsigned long lineWrap; /* # of Bytes to next line */
|
|
105 unsigned long planeWarp; /* # of Bytes to next plane */
|
|
106 unsigned long scrFormat; /* screen Format */
|
|
107 unsigned long scrClut; /* type of clut */
|
|
108 unsigned long redBits; /* Mask of Red Bits */
|
|
109 unsigned long greenBits; /* Mask of Green Bits */
|
|
110 unsigned long blueBits; /* Mask of Blue Bits */
|
|
111 unsigned long alphaBits; /* Mask of Alpha Bits */
|
|
112 unsigned long genlockBits;/* Mask of Genlock Bits */
|
|
113 unsigned long unusedBits; /* Mask of unused Bits */
|
|
114 unsigned long bitFlags; /* Bits organisation flags */
|
|
115 unsigned long maxmem; /* max. memory in this mode */
|
|
116 unsigned long pagemem; /* needed memory for one page */
|
|
117 unsigned long max_x; /* max. possible width */
|
|
118 unsigned long max_y; /* max. possible heigth */
|
|
119 } __attribute__((packed)) SCREENINFO;
|
|
120
|
|
121 /*--- Functions prototypes ---*/
|
|
122
|
|
123 void SDL_XBIOS_ListMilanModes(_THIS, int actually_add);
|
|
124
|
|
125 #endif /* _SDL_xbios_milan_h */
|