2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2012 Sam Lantinga
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.
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.
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
22 #include "SDL_config.h"
25 Centscreen extension definitions
30 #ifndef _SDL_xbios_centscreen_h
31 #define _SDL_xbios_centscreen_h
33 #include <mint/falcon.h> /* for trap_14_xxx macros */
35 #include "SDL_xbios.h"
39 #define CSCREEN_ENERGYSTAR (1<<9)
40 #define CSCREEN_SAVER (1<<10)
41 #define CSCREEN_VIRTUAL (1<<11)
42 #define CSCREEN_EXTCLOCK_CT2 (1<<12)
43 #define CSCREEN_EXTCLOCK (1<<13)
44 #define CSCREEN_STANDARD (1<<14)
45 #define CSCREEN_DEFAULT (1<<15)
47 /*--- Structures ---*/
50 unsigned short handle; /* videomode handle */
51 unsigned short mode; /* Falcon videomode code */
52 unsigned short physx; /* visible width */
53 unsigned short physy; /* visible height */
54 unsigned short plan; /* bitplanes */
55 unsigned short logx; /* virtual width */
56 unsigned short logy; /* virtual height */
57 unsigned short eco; /* screen saver delay */
58 unsigned short eco2; /* energy star screen saver delay */
59 unsigned short wsize; /* screen width (mm) */
60 unsigned short hsize; /* screen height (mm) */
61 unsigned short dummy[21];
62 unsigned char name[32]; /* videomode name */
65 /*--- Functions prototypes ---*/
67 #define Vread(current_mode) \
68 (void)trap_14_wl((short)0x41,(long)(current_mode))
69 #define Vwrite(init_vdi, inparam, outparam) \
70 (long)trap_14_wwll((short)0x42,(short)(init_vdi),(long)(inparam),(long)(outparam))
71 #define Vattrib(inparam, outparam) \
72 (void)trap_14_wll((short)0x43,(long)(inparam),(long)(outparam))
73 #define Vcreate(inparam, outparam) \
74 (void)trap_14_wll((short)0x44,(long)(inparam),(long)(outparam))
75 #define Vdelete(handle) \
76 (long)trap_14_ww((short)0x45,(short)(handle))
77 #define Vfirst(mask,mode) \
78 (long)trap_14_wll((short)0x46,(long)(mask),(long)(mode))
79 #define Vnext(mask,mode) \
80 (long)trap_14_wll((short)0x47,(long)(mask),(long)(mode))
81 #define Vvalid(handle) \
82 (long)trap_14_ww((short)0x48,(short)(handle))
84 (long)trap_14_w((short)0x49)
86 (long)trap_14_w((short)0x4a)
88 (long)trap_14_w((short)0x4b)
90 (long)trap_14_w((short)0x4c)
91 #define Vscroll(scrollmode) \
92 (long)trap_14_ww((short)0x4d,(short)(scrollmode))
94 (long)trap_14_w((short)0x4e)
96 (long)trap_14_w((short)0x4f)
98 (long)trap_14_ww((short)0x50,(short)(cmd))
99 #define SetMon(montype) \
100 (long)trap_14_ww((short)0x51,(short)(montype))
101 #define MultiMon(cmd) \
102 (long)trap_14_ww((short)0x52,(short)(cmd))
103 #define VSizeComp() \
104 (long)trap_14_w((short)0x53)
105 #define Vsize(mode) \
106 (long)trap_14_wl((short)0x54,(long)(mode))
108 /*--- Functions prototypes ---*/
110 int SDL_XBIOS_ListCentscreenModes(_THIS, int actually_add);
111 void SDL_XBIOS_CentscreenSetmode(_THIS, int width, int height, int planes);
112 void SDL_XBIOS_CentscreenRestore(_THIS, int prev_handle);
114 #endif /* _SDL_xbios_centscreen_h */