src/video/xbios/SDL_xbios_centscreen.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 29 May 2006 04:04:35 +0000
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
permissions -rw-r--r--
more tweaking indent options
patmandin@1061
     1
/*
patmandin@1061
     2
    SDL - Simple DirectMedia Layer
patmandin@1061
     3
    Copyright (C) 1997-2004 Sam Lantinga
patmandin@1061
     4
patmandin@1061
     5
    This library is free software; you can redistribute it and/or
patmandin@1061
     6
    modify it under the terms of the GNU Library General Public
patmandin@1061
     7
    License as published by the Free Software Foundation; either
patmandin@1061
     8
    version 2 of the License, or (at your option) any later version.
patmandin@1061
     9
patmandin@1061
    10
    This library is distributed in the hope that it will be useful,
patmandin@1061
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
patmandin@1061
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
patmandin@1061
    13
    Library General Public License for more details.
patmandin@1061
    14
patmandin@1061
    15
    You should have received a copy of the GNU Library General Public
patmandin@1061
    16
    License along with this library; if not, write to the Free
patmandin@1061
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
patmandin@1061
    18
patmandin@1061
    19
    Sam Lantinga
patmandin@1061
    20
    slouken@libsdl.org
patmandin@1061
    21
*/
slouken@1402
    22
#include "SDL_config.h"
patmandin@1061
    23
patmandin@1061
    24
/*
patmandin@1061
    25
	Centscreen extension definitions
patmandin@1061
    26
patmandin@1061
    27
	Patrice Mandin
patmandin@1061
    28
*/
patmandin@1061
    29
patmandin@1061
    30
#ifndef _SDL_xbios_centscreen_h
patmandin@1061
    31
#define _SDL_xbios_centscreen_h
patmandin@1061
    32
slouken@1662
    33
#include <mint/falcon.h>        /* for trap_14_xxx macros */
patmandin@1061
    34
patmandin@1061
    35
#include "SDL_xbios.h"
patmandin@1061
    36
patmandin@1061
    37
/*--- Defines ---*/
patmandin@1061
    38
patmandin@1061
    39
#ifndef C_CNTS
patmandin@1061
    40
#define C_CNTS 0x434e5453L
patmandin@1061
    41
#endif
patmandin@1061
    42
patmandin@1061
    43
#define CSCREEN_ENERGYSTAR		(1<<9)
patmandin@1061
    44
#define CSCREEN_SAVER			(1<<10)
patmandin@1061
    45
#define CSCREEN_VIRTUAL			(1<<11)
patmandin@1061
    46
#define CSCREEN_EXTCLOCK_CT2	(1<<12)
patmandin@1061
    47
#define CSCREEN_EXTCLOCK		(1<<13)
patmandin@1061
    48
#define CSCREEN_STANDARD		(1<<14)
patmandin@1061
    49
#define CSCREEN_DEFAULT			(1<<15)
patmandin@1061
    50
patmandin@1061
    51
/*--- Structures ---*/
patmandin@1061
    52
slouken@1662
    53
typedef struct
slouken@1662
    54
{
slouken@1662
    55
    unsigned short handle;      /* videomode handle */
slouken@1662
    56
    unsigned short mode;        /* Falcon videomode code */
slouken@1662
    57
    unsigned short physx;       /* visible width */
slouken@1662
    58
    unsigned short physy;       /* visible height */
slouken@1662
    59
    unsigned short plan;        /* bitplanes */
slouken@1662
    60
    unsigned short logx;        /* virtual width */
slouken@1662
    61
    unsigned short logy;        /* virtual height */
slouken@1662
    62
    unsigned short eco;         /* screen saver delay */
slouken@1662
    63
    unsigned short eco2;        /* energy star screen saver delay */
slouken@1662
    64
    unsigned short wsize;       /* screen width (mm) */
slouken@1662
    65
    unsigned short hsize;       /* screen height (mm) */
slouken@1662
    66
    unsigned short dummy[21];
slouken@1662
    67
    unsigned char name[32];     /* videomode name */
slouken@1662
    68
} __attribute__ ((packed)) centscreen_mode_t;
patmandin@1061
    69
patmandin@1061
    70
/*--- Functions prototypes ---*/
patmandin@1061
    71
patmandin@1061
    72
#define Vread(current_mode)	\
patmandin@1061
    73
	(void)trap_14_wl((short)0x41,(long)(current_mode))
patmandin@1061
    74
#define Vwrite(init_vdi, inparam, outparam)	\
patmandin@1061
    75
	(long)trap_14_wwll((short)0x42,(short)(init_vdi),(long)(inparam),(long)(outparam))
patmandin@1061
    76
#define Vattrib(inparam, outparam)	\
patmandin@1061
    77
	(void)trap_14_wll((short)0x43,(long)(inparam),(long)(outparam))
patmandin@1061
    78
#define Vcreate(inparam, outparam)	\
patmandin@1061
    79
	(void)trap_14_wll((short)0x44,(long)(inparam),(long)(outparam))
patmandin@1061
    80
#define Vdelete(handle)	\
patmandin@1061
    81
	(long)trap_14_ww((short)0x45,(short)(handle))
patmandin@1061
    82
#define Vfirst(mask,mode)	\
patmandin@1061
    83
	(long)trap_14_wll((short)0x46,(long)(mask),(long)(mode))
patmandin@1061
    84
#define Vnext(mask,mode)	\
patmandin@1061
    85
	(long)trap_14_wll((short)0x47,(long)(mask),(long)(mode))
patmandin@1061
    86
#define Vvalid(handle)	\
patmandin@1061
    87
	(long)trap_14_ww((short)0x48,(short)(handle))
patmandin@1061
    88
#define Vload()	\
patmandin@1061
    89
	(long)trap_14_w((short)0x49)
patmandin@1061
    90
#define Vsave()	\
patmandin@1061
    91
	(long)trap_14_w((short)0x4a)
patmandin@1061
    92
#define Vopen()	\
patmandin@1061
    93
	(long)trap_14_w((short)0x4b)
patmandin@1061
    94
#define Vclose()	\
patmandin@1061
    95
	(long)trap_14_w((short)0x4c)
patmandin@1061
    96
#define Vscroll(scrollmode)	\
patmandin@1061
    97
	(long)trap_14_ww((short)0x4d,(short)(scrollmode))
patmandin@1061
    98
#define Voffset()	\
patmandin@1061
    99
	(long)trap_14_w((short)0x4e)
patmandin@1061
   100
#define Vseek()	\
patmandin@1061
   101
	(long)trap_14_w((short)0x4f)
patmandin@1061
   102
#define Vlock(cmd)	\
patmandin@1061
   103
	(long)trap_14_ww((short)0x50,(short)(cmd))
patmandin@1061
   104
#define SetMon(montype)	\
patmandin@1061
   105
	(long)trap_14_ww((short)0x51,(short)(montype))
patmandin@1061
   106
#define MultiMon(cmd)	\
patmandin@1061
   107
	(long)trap_14_ww((short)0x52,(short)(cmd))
patmandin@1061
   108
#define VSizeComp()	\
patmandin@1061
   109
	(long)trap_14_w((short)0x53)
patmandin@1061
   110
#define Vsize(mode)	\
patmandin@1061
   111
	(long)trap_14_wl((short)0x54,(long)(mode))
patmandin@1061
   112
patmandin@1061
   113
/*--- Functions prototypes ---*/
patmandin@1061
   114
slouken@1668
   115
int SDL_XBIOS_CentscreenInit(_THIS);
slouken@1668
   116
void SDL_XBIOS_CentscreenSetmode(_THIS, int width, int height, int planes);
slouken@1668
   117
void SDL_XBIOS_CentscreenRestore(_THIS, int prev_handle);
patmandin@1061
   118
patmandin@1061
   119
#endif /* _SDL_xbios_centscreen_h */
slouken@1662
   120
/* vi: set ts=4 sw=4 expandtab: */