Mercurial > sdl-ios-xcode
annotate src/video/xbios/SDL_xbiosmodes.c @ 2072:4b3f98a9a2c1
xbios: preliminary video mode init
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Mon, 13 Nov 2006 19:59:28 +0000 |
parents | |
children | 790726541708 |
rev | line source |
---|---|
2072
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
1 /* |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
4 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
9 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
13 Lesser General Public License for more details. |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
14 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
18 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
19 Sam Lantinga |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
20 slouken@libsdl.org |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
21 */ |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
22 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
23 #include <mint/osbind.h> |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
24 #include <mint/falcon.h> |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
25 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
26 #include "SDL_config.h" |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
27 #include "SDL_xbios.h" |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
28 #include "SDL_xbiosmodes.h" |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
29 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
30 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
31 typedef struct { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
32 int width,height,bpp; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
33 int modecode; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
34 int doubleline; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
35 } xbios_mode_t; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
36 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
37 static xbios_mode_t falcon_rgb_modes[]={ |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
38 {768, 480, 16, BPS16 | COL80 | OVERSCAN | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
39 {768, 240, 16, BPS16 | COL80 | OVERSCAN}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
40 {640, 400, 16, BPS16 | COL80 | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
41 {640, 200, 16, BPS16 | COL80}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
42 {384, 480, 16, BPS16 | OVERSCAN | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
43 {384, 240, 16, BPS16 | OVERSCAN}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
44 {320, 400, 16, BPS16 | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
45 {320, 200, 16, BPS16}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
46 {768, 480, 8, BPS8 | COL80 | OVERSCAN | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
47 {768, 240, 8, BPS8 | COL80 | OVERSCAN}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
48 {640, 400, 8, BPS8 | COL80 | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
49 {640, 200, 8, BPS8 | COL80}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
50 {384, 480, 8, BPS8 | OVERSCAN | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
51 {384, 240, 8, BPS8 | OVERSCAN}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
52 {320, 400, 8, BPS8 | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
53 {320, 200, 8, BPS8} |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
54 }; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
55 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
56 static xbios_mode_t falcon_vga_modes[]={ |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
57 {320, 480, 16, BPS16 }, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
58 {320, 240, 16, BPS16 | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
59 {640, 480, 8, BPS8 | COL80}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
60 {640, 240, 8, BPS8 | COL80 | VERTFLAG}, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
61 {320, 480, 8, BPS8 }, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
62 {320, 240, 8, BPS8 | VERTFLAG} |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
63 }; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
64 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
65 static void |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
66 SDL_XBIOS_AddMode(_THIS, int width, int height, int bpp, Uint16 modecode, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
67 SDL_bool doubleline) |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
68 { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
69 SDL_VideoDisplay display; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
70 SDL_DisplayData *displaydata; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
71 SDL_DisplayMode mode; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
72 Uint32 Rmask, Gmask, Bmask, Amask; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
73 int orig_bpp; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
74 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
75 Rmask = Gmask = Bmask = Amask = 0; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
76 if (bpp == 16) { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
77 Rmask = 31<<11; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
78 Gmask = 63<<5; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
79 Bmask = 31; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
80 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
81 /* Memorize for c2p4 operation */ |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
82 orig_bpp = bpp; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
83 if (bpp == 4) { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
84 bpp = 8; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
85 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
86 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
87 mode.format = SDL_MasksToPixelFormatEnum(bpp, Rmask, Gmask, Bmask, Amask); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
88 mode.w = width; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
89 mode.h = height; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
90 mode.refresh_rate = 0; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
91 mode.driverdata = NULL; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
92 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
93 displaydata = (SDL_DisplayData *) SDL_malloc(sizeof(*displaydata)); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
94 if (!displaydata) { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
95 return; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
96 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
97 displaydata->modecode = modecode; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
98 displaydata->doubleline = doubleline; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
99 displaydata->c2p4 = (orig_bpp == 4); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
100 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
101 SDL_zero(display); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
102 display.desktop_mode = mode; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
103 display.current_mode = mode; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
104 display.driverdata = displaydata; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
105 SDL_AddVideoDisplay(&display); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
106 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
107 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
108 void |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
109 SDL_XBIOS_InitModes(_THIS) |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
110 { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
111 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
112 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
113 switch (data->cookie_vdo >> 16) { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
114 case VDO_ST: |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
115 case VDO_STE: |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
116 { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
117 SDL_XBIOS_AddMode(_this, 320, 200, 4, ST_LOW >> 8, SDL_FALSE); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
118 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
119 break; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
120 case VDO_TT: |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
121 { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
122 SDL_XBIOS_AddMode(_this, 320, 480, 8, TT_LOW, SDL_FALSE); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
123 /* Software double-lined mode */ |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
124 SDL_XBIOS_AddMode(_this, 320, 240, 8, TT_LOW, SDL_TRUE); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
125 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
126 break; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
127 case VDO_F30: |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
128 { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
129 Uint16 modecodemask = VsetMode(-1) & (VGA | PAL); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
130 int i; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
131 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
132 switch (VgetMonitor()) { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
133 case MONITOR_MONO: |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
134 /* Not usable */ |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
135 break; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
136 case MONITOR_RGB: |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
137 case MONITOR_TV: |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
138 for (i=0; i<sizeof(falcon_rgb_modes)/sizeof(xbios_mode_t); i++) { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
139 SDL_XBIOS_AddMode(_this, falcon_rgb_modes[i].width, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
140 falcon_rgb_modes[i].height, falcon_rgb_modes[i].bpp, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
141 falcon_rgb_modes[i].modecode & modecodemask, SDL_FALSE); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
142 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
143 break; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
144 case MONITOR_VGA: |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
145 for (i=0; i<sizeof(falcon_vga_modes)/sizeof(xbios_mode_t); i++) { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
146 SDL_XBIOS_AddMode(_this, falcon_vga_modes[i].width, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
147 falcon_vga_modes[i].height, falcon_vga_modes[i].bpp, |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
148 falcon_vga_modes[i].modecode & modecodemask, SDL_FALSE); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
149 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
150 break; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
151 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
152 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
153 break; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
154 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
155 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
156 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
157 void |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
158 SDL_XBIOS_GetDisplayModes(_THIS) |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
159 { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
160 SDL_DisplayData *data = (SDL_DisplayData *) SDL_CurrentDisplay.driverdata; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
161 SDL_DisplayMode mode; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
162 //SDL_AddDisplayMode(_this->current_display, &mode); |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
163 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
164 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
165 int |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
166 SDL_XBIOS_SetDisplayMode(_THIS, SDL_DisplayMode * mode) |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
167 { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
168 //SDL_DisplayModeData *data = (SDL_DisplayModeData *) mode->driverdata; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
169 return -1; |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
170 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
171 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
172 void |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
173 SDL_XBIOS_QuitModes(_THIS) |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
174 { |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
175 } |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
176 |
4b3f98a9a2c1
xbios: preliminary video mode init
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
177 /* vi: set ts=4 sw=4 expandtab: */ |