• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2     SDL - Simple DirectMedia Layer
3     Copyright (C) 1997-2012 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 /* Vsetscreen() parameters */
38 #define MI_MAGIC	0x4D49
39 
40 enum {
41 	CMD_GETMODE=0,
42 	CMD_SETMODE,
43 	CMD_GETINFO,
44 	CMD_ALLOCPAGE,
45 	CMD_FREEPAGE,
46 	CMD_FLIPPAGE,
47 	CMD_ALLOCMEM,
48 	CMD_FREEMEM,
49 	CMD_SETADR,
50 	CMD_ENUMMODES
51 };
52 
53 enum {
54 	ENUMMODE_EXIT=0,
55 	ENUMMODE_CONT
56 };
57 
58 enum {
59 	BLK_ERR=0,
60 	BLK_OK,
61 	BLK_CLEARED
62 };
63 
64 /* scrFlags */
65 #define SCRINFO_OK 1
66 
67 /* scrClut */
68 #define NO_CLUT 0
69 #define HARD_CLUT 1
70 #define SOFT_CLUT 2
71 
72 /* scrFormat */
73 #define INTERLEAVE_PLANES 0
74 #define STANDARD_PLANES  1
75 #define PACKEDPIX_PLANES 2
76 
77 /* bitFlags */
78 #define STANDARD_BITS  1
79 #define FALCON_BITS   2
80 #define INTEL_BITS   8
81 
82 /*--- Structures ---*/
83 
84 typedef struct _scrblk {
85 	unsigned long	size;		/* size of strukture */
86 	unsigned long	blk_status;	/* status bits of blk */
87 	unsigned long	blk_start;	/* Start Adress */
88 	unsigned long	blk_len;	/* length of memblk */
89 	unsigned long	blk_x;		/* x pos in total screen*/
90 	unsigned long	blk_y;		/* y pos in total screen */
91 	unsigned long	blk_w;		/* width */
92 	unsigned long	blk_h;		/* height */
93 	unsigned long	blk_wrap;	/* width in bytes */
94 } SCRMEMBLK;
95 
96 typedef struct screeninfo {
97 	unsigned long	size;		/* Size of structure */
98 	unsigned long	devID;		/* device id number */
99 	unsigned char	name[64];	/* Friendly name of Screen */
100 	unsigned long	scrFlags;	/* some Flags */
101 	unsigned long	frameadr;	/* Adress of framebuffer */
102 	unsigned long	scrHeight;	/* visible X res */
103 	unsigned long	scrWidth;	/* visible Y res */
104 	unsigned long	virtHeight;	/* virtual X res */
105 	unsigned long	virtWidth;	/* virtual Y res */
106 	unsigned long	scrPlanes;	/* color Planes */
107 	unsigned long	scrColors;	/* # of colors */
108 	unsigned long	lineWrap;	/* # of Bytes to next line */
109 	unsigned long	planeWarp;	/* # of Bytes to next plane */
110 	unsigned long	scrFormat;	/* screen Format */
111 	unsigned long	scrClut;	/* type of clut */
112 	unsigned long	redBits;	/* Mask of Red Bits */
113 	unsigned long	greenBits;	/* Mask of Green Bits */
114 	unsigned long	blueBits;	/* Mask of Blue Bits */
115 	unsigned long	alphaBits;	/* Mask of Alpha Bits */
116 	unsigned long	genlockBits;/* Mask of Genlock Bits */
117 	unsigned long	unusedBits;	/* Mask of unused Bits */
118 	unsigned long	bitFlags;	/* Bits organisation flags */
119 	unsigned long	maxmem;		/* max. memory in this mode */
120 	unsigned long	pagemem;	/* needed memory for one page */
121 	unsigned long	max_x;		/* max. possible width */
122 	unsigned long	max_y;		/* max. possible heigth */
123 } SCREENINFO;
124 
125 /*--- Functions prototypes ---*/
126 
127 void SDL_XBIOS_ListMilanModes(_THIS, int actually_add);
128 
129 #endif /* _SDL_xbios_milan_h */
130