Skip to content

Latest commit

 

History

History
120 lines (103 loc) · 4.23 KB

SDL_xbios_nova.h

File metadata and controls

120 lines (103 loc) · 4.23 KB
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2012 Sam Lantinga
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Sam Lantinga
slouken@libsdl.org
*/
#include "SDL_config.h"
/*
NOVA video card definitions
Patrice Mandin
*/
#ifndef _SDL_xbios_nova_h
#define _SDL_xbios_nova_h
/*--- Types ---*/
typedef struct {
unsigned char name[33]; /* Video mode name */
unsigned char dummy1;
unsigned short mode; /* Video mode type */
/* 0=4 bpp */
/* 1=1 bpp */
/* 2=8 bpp */
/* 3=15 bpp (little endian) */
/* 4=16 bpp (little endian) */
/* 5=24 bpp (BGR) */
/* 6=32 bpp (RGBA) */
unsigned short pitch; /* bpp<8: words/plane /line */
/* bpp>=8: bytes /line */
unsigned short planes; /* Bits per pixel */
unsigned short colors; /* Number of colours */
unsigned short hc_mode; /* Hardcopy mode */
/* 0=1 pixel screen -> 1x1 printer screen */
/* 1=1 pixel screen -> 2x2 printer screen */
/* 2=1 pixel screen -> 4x4 printer screen */
unsigned short max_x; /* Max x,y coordinates, values-1 */
unsigned short max_y;
unsigned short real_x; /* Real max x,y coordinates, values-1 */
unsigned short real_y;
unsigned short freq; /* Pixel clock */
unsigned char freq2; /* Another pixel clock */
unsigned char low_res; /* Half of pixel clock */
unsigned char r_3c2;
unsigned char r_3d4[25];
unsigned char extended[3];
unsigned char dummy2;
} nova_resolution_t;
/* cookie NOVA points to this */
typedef struct {
unsigned char version[4]; /* Version number */
unsigned char resolution; /* Resolution number */
unsigned char blnk_time; /* Time before blanking */
unsigned char ms_speed; /* Mouse speed */
unsigned char old_res;
/* Pointer to routine to change resolution */
void (*p_chres)(nova_resolution_t *nova_res, unsigned long offset);
unsigned short mode; /* Video mode type: */
/* 0=4 bpp */
/* 1=1 bpp */
/* 2=8 bpp */
/* 3=15 bpp (little endian) */
/* 4=16 bpp (little endian) */
/* 5=24 bpp (BGR) */
/* 6=32 bpp (RGBA) */
unsigned short pitch; /* bpp<8: bytes per plane, per line */
/* bpp>=8: bytes per line */
unsigned short planes; /* Bits per pixel */
unsigned short colours; /* Number of colours, unused */
unsigned short hc; /* Hardcopy mode */
/* 0=1 pixel screen -> 1x1 printer screen */
/* 1=1 pixel screen -> 2x2 printer screen */
/* 2=1 pixel screen -> 4x4 printer screen */
unsigned short max_x, max_y; /* Resolution, values-1 */
unsigned short rmn_x, rmx_x;
unsigned short rmn_y, rmx_y;
unsigned short v_top, v_bottom;
unsigned short v_left, v_right;
/* Pointer to routine to set colours */
void (*p_setcol)(unsigned short index, unsigned char *colors);
void (*chng_vrt)(unsigned short x, unsigned short y);
void (*inst_xbios)(unsigned short on);
void (*pic_on)(unsigned short on);
void (*chng_pos)(nova_resolution_t *nova_res, unsigned short direction, unsigned short offset);
void (*p_setscr)(void *adr); /* Pointer to routine to change screen address */
void *base; /* Address of screen #0 in video RAM */
void *scr_base; /* Adress of video RAM */
unsigned short scrn_cnt; /* Number of possible screens in video RAM */
unsigned long scrn_sze; /* Size of a screen */
void *reg_base; /* Video card I/O registers base */
void (*p_vsync)(void); /* Pointer to routine to vsync */
unsigned char name[36]; /* Video mode name */
unsigned long mem_size; /* Global size of video memory */
} nova_xcb_t;
#endif /* _SDL_xbios_nova_h */