SDL-1.2.14
[sdl_omap.git] / src / video / xbios / SDL_xbios_sb3.h
CommitLineData
e14743d1 1/*
2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 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 ScreenBlaster 3 definitions
26
27 Patrice Mandin
28*/
29
30#ifndef _SDL_xbios_sb3_h_
31#define _SDL_xbios_sb3_h_
32
33/*--- Defines ---*/
34
35#ifndef C_SCPN
36#define C_SCPN 0x5343504EL
37#endif
38
39#define SCPN_DEV_1BPP 0
40#define SCPN_DEV_2BPP 1
41#define SCPN_DEV_4BPP 2
42#define SCPN_DEV_8BPP 3
43#define SCPN_DEV_16BPP 4
44
45extern const int SDL_XBIOS_scpn_planes_device[];
46
47/*--- Types ---*/
48
49typedef struct {
50 unsigned short virtual_width; /* Virtual screen width */
51 unsigned short virtual_height; /* Virtual screen height */
52 unsigned short visible_width; /* Visible width */
53 unsigned short visible_height; /* Visible height */
54 unsigned short h_pos; /* Horizontal position in virtual screen */
55 unsigned short v_pos; /* Vertical position in virtual screen */
56 unsigned short dummy;
57 unsigned long size; /* Size of screen in bytes */
58 unsigned short device; /* Device number to find planes = getRez() */
59 /* = Index in scpn_planes_device[] */
60} __attribute__((packed)) scpn_screeninfo_t;
61
62typedef struct {
63 unsigned long magic; /* just a BRA assembler jump */
64 unsigned short version;
65 void *dummy1;
66 unsigned short ptsout0_1;
67 unsigned short ptsout0_2;
68 unsigned short dummy3;
69 unsigned char date[8]; /* Date of program build */
70 unsigned char asm_string[30]; /* 10 times the 'ASM' string */
71 unsigned short dummy4;
72 scpn_screeninfo_t *screen_info;
73 unsigned short dummy6;
74} __attribute__((packed)) scpn_cookie_t;
75
76/*--- Function prototypes ---*/
77
78int SDL_XBIOS_SB3Usable(scpn_cookie_t *cookie_scpn);
79
80void SDL_XBIOS_ListSB3Modes(_THIS, int actually_add, scpn_cookie_t *cookie_scpn);
81
82#endif /* _SDL_xbios_sb3_h_ */