src/video/xbios/SDL_xbios_centscreen.h
changeset 1061 5023cde12cbd
child 1064 fba6b67b4d60
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/video/xbios/SDL_xbios_centscreen.h	Wed May 18 17:02:17 2005 +0000
     1.3 @@ -0,0 +1,115 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 1997-2004 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Library General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Library General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Library General Public
    1.19 +    License along with this library; if not, write to the Free
    1.20 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +*/
    1.25 +
    1.26 +/*
    1.27 +	Centscreen extension definitions
    1.28 +
    1.29 +	Patrice Mandin
    1.30 +*/
    1.31 +
    1.32 +#ifndef _SDL_xbios_centscreen_h
    1.33 +#define _SDL_xbios_centscreen_h
    1.34 +
    1.35 +#include <mint/falcon.h>	/* for trap_14_xxx macros */
    1.36 +
    1.37 +#include "SDL_xbios.h"
    1.38 +
    1.39 +/*--- Defines ---*/
    1.40 +
    1.41 +#ifndef C_CNTS
    1.42 +#define C_CNTS 0x434e5453L
    1.43 +#endif
    1.44 +
    1.45 +#define CSCREEN_ENERGYSTAR		(1<<9)
    1.46 +#define CSCREEN_SAVER			(1<<10)
    1.47 +#define CSCREEN_VIRTUAL			(1<<11)
    1.48 +#define CSCREEN_EXTCLOCK_CT2	(1<<12)
    1.49 +#define CSCREEN_EXTCLOCK		(1<<13)
    1.50 +#define CSCREEN_STANDARD		(1<<14)
    1.51 +#define CSCREEN_DEFAULT			(1<<15)
    1.52 +
    1.53 +/*--- Structures ---*/
    1.54 +
    1.55 +typedef struct {
    1.56 +	unsigned short	handle;	/* videomode handle */
    1.57 +	unsigned short	mode;	/* Falcon videomode code */
    1.58 +	unsigned short	physx;	/* visible width */
    1.59 +	unsigned short	physy;	/* visible height */
    1.60 +	unsigned short	plan;	/* bitplanes */
    1.61 +	unsigned short	logx;	/* virtual width */
    1.62 +	unsigned short	logy;	/* virtual height */
    1.63 +	unsigned short	eco;	/* screen saver delay */
    1.64 +	unsigned short	eco2;	/* energy star screen saver delay */
    1.65 +	unsigned short	wsize;	/* screen width (mm) */
    1.66 +	unsigned short	hsize;	/* screen height (mm) */
    1.67 +	unsigned short	dummy[21];
    1.68 +	unsigned char	name[32];	/* videomode name */
    1.69 +} __attribute__((packed)) centscreen_mode_t;
    1.70 +
    1.71 +/*--- Functions prototypes ---*/
    1.72 +
    1.73 +#define Vread(current_mode)	\
    1.74 +	(void)trap_14_wl((short)0x41,(long)(current_mode))
    1.75 +#define Vwrite(init_vdi, inparam, outparam)	\
    1.76 +	(long)trap_14_wwll((short)0x42,(short)(init_vdi),(long)(inparam),(long)(outparam))
    1.77 +#define Vattrib(inparam, outparam)	\
    1.78 +	(void)trap_14_wll((short)0x43,(long)(inparam),(long)(outparam))
    1.79 +#define Vcreate(inparam, outparam)	\
    1.80 +	(void)trap_14_wll((short)0x44,(long)(inparam),(long)(outparam))
    1.81 +#define Vdelete(handle)	\
    1.82 +	(long)trap_14_ww((short)0x45,(short)(handle))
    1.83 +#define Vfirst(mask,mode)	\
    1.84 +	(long)trap_14_wll((short)0x46,(long)(mask),(long)(mode))
    1.85 +#define Vnext(mask,mode)	\
    1.86 +	(long)trap_14_wll((short)0x47,(long)(mask),(long)(mode))
    1.87 +#define Vvalid(handle)	\
    1.88 +	(long)trap_14_ww((short)0x48,(short)(handle))
    1.89 +#define Vload()	\
    1.90 +	(long)trap_14_w((short)0x49)
    1.91 +#define Vsave()	\
    1.92 +	(long)trap_14_w((short)0x4a)
    1.93 +#define Vopen()	\
    1.94 +	(long)trap_14_w((short)0x4b)
    1.95 +#define Vclose()	\
    1.96 +	(long)trap_14_w((short)0x4c)
    1.97 +#define Vscroll(scrollmode)	\
    1.98 +	(long)trap_14_ww((short)0x4d,(short)(scrollmode))
    1.99 +#define Voffset()	\
   1.100 +	(long)trap_14_w((short)0x4e)
   1.101 +#define Vseek()	\
   1.102 +	(long)trap_14_w((short)0x4f)
   1.103 +#define Vlock(cmd)	\
   1.104 +	(long)trap_14_ww((short)0x50,(short)(cmd))
   1.105 +#define SetMon(montype)	\
   1.106 +	(long)trap_14_ww((short)0x51,(short)(montype))
   1.107 +#define MultiMon(cmd)	\
   1.108 +	(long)trap_14_ww((short)0x52,(short)(cmd))
   1.109 +#define VSizeComp()	\
   1.110 +	(long)trap_14_w((short)0x53)
   1.111 +#define Vsize(mode)	\
   1.112 +	(long)trap_14_wl((short)0x54,(long)(mode))
   1.113 +
   1.114 +/*--- Functions prototypes ---*/
   1.115 +
   1.116 +void SDL_XBIOS_CentscreenInit(_THIS);
   1.117 +
   1.118 +#endif /* _SDL_xbios_centscreen_h */