annotate src/video/xbios/SDL_xbios_milan.h @ 4387:72d3b4fd918b SDL-1.2

Missing pop over a jump
author Sam Lantinga <slouken@libsdl.org>
date Thu, 03 Dec 2009 04:20:46 +0000
parents 6405314a7c07
children
rev   line source
4195
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
1 /*
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
3 Copyright (C) 1997-2009 Sam Lantinga
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
4
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
6 modify it under the terms of the GNU Library General Public
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
8 version 2 of the License, or (at your option) any later version.
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
9
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
13 Library General Public License for more details.
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
14
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
15 You should have received a copy of the GNU Library General Public
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
16 License along with this library; if not, write to the Free
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
18
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
19 Sam Lantinga
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
20 slouken@libsdl.org
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
21 */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
22 #include "SDL_config.h"
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
23
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
24 /*
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
25 Milan Xbios video functions
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
26
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
27 Patrice Mandin
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
28 */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
29
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
30 #ifndef _SDL_xbios_milan_h
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
31 #define _SDL_xbios_milan_h
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
32
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
33 #include "SDL_xbios.h"
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
34
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
35 /*--- Defines ---*/
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
36
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
37 /* Cookies */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
38 #ifndef C__MIL
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
39 #define C__MIL 0x5F4D494CL
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
40 #endif
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
41
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
42 #ifndef C__VDI
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
43 #define C__VDI 0x5F564449L
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
44 #endif
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
45
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
46 /* Vsetscreen() parameters */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
47 #define MI_MAGIC 0x4D49
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
48
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
49 enum {
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
50 CMD_GETMODE=0,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
51 CMD_SETMODE,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
52 CMD_GETINFO,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
53 CMD_ALLOCPAGE,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
54 CMD_FREEPAGE,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
55 CMD_FLIPPAGE,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
56 CMD_ALLOCMEM,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
57 CMD_FREEMEM,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
58 CMD_SETADR,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
59 CMD_ENUMMODES
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
60 };
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
61
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
62 enum {
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
63 ENUMMODE_EXIT=0,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
64 ENUMMODE_CONT
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
65 };
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
66
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
67 enum {
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
68 BLK_ERR=0,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
69 BLK_OK,
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
70 BLK_CLEARED
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
71 };
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
72
4198
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
73 /* scrFlags */
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
74 #define SCRINFO_OK 1
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
75
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
76 /* scrClut */
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
77 #define NO_CLUT 0
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
78 #define HARD_CLUT 1
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
79 #define SOFT_CLUT 2
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
80
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
81 /* scrFormat */
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
82 #define INTERLEAVE_PLANES 0
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
83 #define STANDARD_PLANES 1
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
84 #define PACKEDPIX_PLANES 2
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
85
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
86 /* bitFlags */
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
87 #define STANDARD_BITS 1
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
88 #define FALCON_BITS 2
6405314a7c07 Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents: 4195
diff changeset
89 #define INTEL_BITS 8
4195
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
90
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
91 /*--- Structures ---*/
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
92
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
93 typedef struct _scrblk {
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
94 unsigned long size; /* size of strukture */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
95 unsigned long blk_status; /* status bits of blk */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
96 unsigned long blk_start; /* Start Adress */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
97 unsigned long blk_len; /* length of memblk */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
98 unsigned long blk_x; /* x pos in total screen*/
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
99 unsigned long blk_y; /* y pos in total screen */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
100 unsigned long blk_w; /* width */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
101 unsigned long blk_h; /* height */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
102 unsigned long blk_wrap; /* width in bytes */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
103 } __attribute__((packed)) SCRMEMBLK;
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
104
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
105 typedef struct screeninfo {
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
106 unsigned long size; /* Size of structure */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
107 unsigned long devID; /* device id number */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
108 unsigned char name[64]; /* Friendly name of Screen */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
109 unsigned long scrFlags; /* some Flags */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
110 unsigned long frameadr; /* Adress of framebuffer */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
111 unsigned long scrHeight; /* visible X res */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
112 unsigned long scrWidth; /* visible Y res */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
113 unsigned long virtHeight; /* virtual X res */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
114 unsigned long virtWidth; /* virtual Y res */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
115 unsigned long scrPlanes; /* color Planes */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
116 unsigned long scrColors; /* # of colors */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
117 unsigned long lineWrap; /* # of Bytes to next line */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
118 unsigned long planeWarp; /* # of Bytes to next plane */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
119 unsigned long scrFormat; /* screen Format */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
120 unsigned long scrClut; /* type of clut */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
121 unsigned long redBits; /* Mask of Red Bits */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
122 unsigned long greenBits; /* Mask of Green Bits */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
123 unsigned long blueBits; /* Mask of Blue Bits */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
124 unsigned long alphaBits; /* Mask of Alpha Bits */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
125 unsigned long genlockBits;/* Mask of Genlock Bits */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
126 unsigned long unusedBits; /* Mask of unused Bits */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
127 unsigned long bitFlags; /* Bits organisation flags */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
128 unsigned long maxmem; /* max. memory in this mode */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
129 unsigned long pagemem; /* needed memory for one page */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
130 unsigned long max_x; /* max. possible width */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
131 unsigned long max_y; /* max. possible heigth */
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
132 } __attribute__((packed)) SCREENINFO;
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
133
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
134 /*--- Functions prototypes ---*/
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
135
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
136 void SDL_XBIOS_ListMilanModes(_THIS, int actually_add);
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
137
13de8ea401db Start Milan video support
Patrice Mandin <patmandin@gmail.com>
parents:
diff changeset
138 #endif /* _SDL_xbios_milan_h */