SDL-1.2.14
[sdl_omap.git] / src / video / xbios / SDL_xbios_milan.h
CommitLineData
e14743d1 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
49enum {
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
62enum {
63 ENUMMODE_EXIT=0,
64 ENUMMODE_CONT
65};
66
67enum {
68 BLK_ERR=0,
69 BLK_OK,
70 BLK_CLEARED
71};
72
73/* scrFlags */
74#define SCRINFO_OK 1
75
76/* scrClut */
77#define NO_CLUT 0
78#define HARD_CLUT 1
79#define SOFT_CLUT 2
80
81/* scrFormat */
82#define INTERLEAVE_PLANES 0
83#define STANDARD_PLANES 1
84#define PACKEDPIX_PLANES 2
85
86/* bitFlags */
87#define STANDARD_BITS 1
88#define FALCON_BITS 2
89#define INTEL_BITS 8
90
91/*--- Structures ---*/
92
93typedef struct _scrblk {
94 unsigned long size; /* size of strukture */
95 unsigned long blk_status; /* status bits of blk */
96 unsigned long blk_start; /* Start Adress */
97 unsigned long blk_len; /* length of memblk */
98 unsigned long blk_x; /* x pos in total screen*/
99 unsigned long blk_y; /* y pos in total screen */
100 unsigned long blk_w; /* width */
101 unsigned long blk_h; /* height */
102 unsigned long blk_wrap; /* width in bytes */
103} __attribute__((packed)) SCRMEMBLK;
104
105typedef struct screeninfo {
106 unsigned long size; /* Size of structure */
107 unsigned long devID; /* device id number */
108 unsigned char name[64]; /* Friendly name of Screen */
109 unsigned long scrFlags; /* some Flags */
110 unsigned long frameadr; /* Adress of framebuffer */
111 unsigned long scrHeight; /* visible X res */
112 unsigned long scrWidth; /* visible Y res */
113 unsigned long virtHeight; /* virtual X res */
114 unsigned long virtWidth; /* virtual Y res */
115 unsigned long scrPlanes; /* color Planes */
116 unsigned long scrColors; /* # of colors */
117 unsigned long lineWrap; /* # of Bytes to next line */
118 unsigned long planeWarp; /* # of Bytes to next plane */
119 unsigned long scrFormat; /* screen Format */
120 unsigned long scrClut; /* type of clut */
121 unsigned long redBits; /* Mask of Red Bits */
122 unsigned long greenBits; /* Mask of Green Bits */
123 unsigned long blueBits; /* Mask of Blue Bits */
124 unsigned long alphaBits; /* Mask of Alpha Bits */
125 unsigned long genlockBits;/* Mask of Genlock Bits */
126 unsigned long unusedBits; /* Mask of unused Bits */
127 unsigned long bitFlags; /* Bits organisation flags */
128 unsigned long maxmem; /* max. memory in this mode */
129 unsigned long pagemem; /* needed memory for one page */
130 unsigned long max_x; /* max. possible width */
131 unsigned long max_y; /* max. possible heigth */
132} __attribute__((packed)) SCREENINFO;
133
134/*--- Functions prototypes ---*/
135
136void SDL_XBIOS_ListMilanModes(_THIS, int actually_add);
137
138#endif /* _SDL_xbios_milan_h */