comparison src/video/xbios/SDL_xbios_centscreen.h @ 1061:5023cde12cbd

Add Falcon Centscreen extension support
author Patrice Mandin <patmandin@gmail.com>
date Wed, 18 May 2005 17:02:17 +0000
parents
children fba6b67b4d60
comparison
equal deleted inserted replaced
1060:86885b40a53b 1061:5023cde12cbd
1 /*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2004 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
23 /*
24 Centscreen extension definitions
25
26 Patrice Mandin
27 */
28
29 #ifndef _SDL_xbios_centscreen_h
30 #define _SDL_xbios_centscreen_h
31
32 #include <mint/falcon.h> /* for trap_14_xxx macros */
33
34 #include "SDL_xbios.h"
35
36 /*--- Defines ---*/
37
38 #ifndef C_CNTS
39 #define C_CNTS 0x434e5453L
40 #endif
41
42 #define CSCREEN_ENERGYSTAR (1<<9)
43 #define CSCREEN_SAVER (1<<10)
44 #define CSCREEN_VIRTUAL (1<<11)
45 #define CSCREEN_EXTCLOCK_CT2 (1<<12)
46 #define CSCREEN_EXTCLOCK (1<<13)
47 #define CSCREEN_STANDARD (1<<14)
48 #define CSCREEN_DEFAULT (1<<15)
49
50 /*--- Structures ---*/
51
52 typedef struct {
53 unsigned short handle; /* videomode handle */
54 unsigned short mode; /* Falcon videomode code */
55 unsigned short physx; /* visible width */
56 unsigned short physy; /* visible height */
57 unsigned short plan; /* bitplanes */
58 unsigned short logx; /* virtual width */
59 unsigned short logy; /* virtual height */
60 unsigned short eco; /* screen saver delay */
61 unsigned short eco2; /* energy star screen saver delay */
62 unsigned short wsize; /* screen width (mm) */
63 unsigned short hsize; /* screen height (mm) */
64 unsigned short dummy[21];
65 unsigned char name[32]; /* videomode name */
66 } __attribute__((packed)) centscreen_mode_t;
67
68 /*--- Functions prototypes ---*/
69
70 #define Vread(current_mode) \
71 (void)trap_14_wl((short)0x41,(long)(current_mode))
72 #define Vwrite(init_vdi, inparam, outparam) \
73 (long)trap_14_wwll((short)0x42,(short)(init_vdi),(long)(inparam),(long)(outparam))
74 #define Vattrib(inparam, outparam) \
75 (void)trap_14_wll((short)0x43,(long)(inparam),(long)(outparam))
76 #define Vcreate(inparam, outparam) \
77 (void)trap_14_wll((short)0x44,(long)(inparam),(long)(outparam))
78 #define Vdelete(handle) \
79 (long)trap_14_ww((short)0x45,(short)(handle))
80 #define Vfirst(mask,mode) \
81 (long)trap_14_wll((short)0x46,(long)(mask),(long)(mode))
82 #define Vnext(mask,mode) \
83 (long)trap_14_wll((short)0x47,(long)(mask),(long)(mode))
84 #define Vvalid(handle) \
85 (long)trap_14_ww((short)0x48,(short)(handle))
86 #define Vload() \
87 (long)trap_14_w((short)0x49)
88 #define Vsave() \
89 (long)trap_14_w((short)0x4a)
90 #define Vopen() \
91 (long)trap_14_w((short)0x4b)
92 #define Vclose() \
93 (long)trap_14_w((short)0x4c)
94 #define Vscroll(scrollmode) \
95 (long)trap_14_ww((short)0x4d,(short)(scrollmode))
96 #define Voffset() \
97 (long)trap_14_w((short)0x4e)
98 #define Vseek() \
99 (long)trap_14_w((short)0x4f)
100 #define Vlock(cmd) \
101 (long)trap_14_ww((short)0x50,(short)(cmd))
102 #define SetMon(montype) \
103 (long)trap_14_ww((short)0x51,(short)(montype))
104 #define MultiMon(cmd) \
105 (long)trap_14_ww((short)0x52,(short)(cmd))
106 #define VSizeComp() \
107 (long)trap_14_w((short)0x53)
108 #define Vsize(mode) \
109 (long)trap_14_wl((short)0x54,(long)(mode))
110
111 /*--- Functions prototypes ---*/
112
113 void SDL_XBIOS_CentscreenInit(_THIS);
114
115 #endif /* _SDL_xbios_centscreen_h */