Mercurial > sdl-ios-xcode
annotate src/video/xbios/SDL_xbios_blowup.c @ 4396:f5d3f7fa071d SDL-1.2
1.2 pulseaudio: make some function pointers static.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 17 Jan 2010 05:17:59 +0000 |
parents | 6405314a7c07 |
children |
rev | line source |
---|---|
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
1 /* |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
4159 | 3 Copyright (C) 1997-2009 Sam Lantinga |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
4 |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
6 modify it under the terms of the GNU Library General Public |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
8 version 2 of the License, or (at your option) any later version. |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
9 |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
13 Library General Public License for more details. |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
14 |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
15 You should have received a copy of the GNU Library General Public |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
16 License along with this library; if not, write to the Free |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
18 |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
19 Sam Lantinga |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
20 slouken@libsdl.org |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
21 */ |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1042
diff
changeset
|
22 #include "SDL_config.h" |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
23 |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
24 /* |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
25 Blowup extension definitions |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
26 |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
27 Patrice Mandin |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
28 */ |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
29 |
1042
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
30 #include <mint/falcon.h> |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
31 |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
32 #include "SDL_xbios.h" |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
33 #include "SDL_xbios_blowup.h" |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
34 |
4194
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
35 void SDL_XBIOS_ListBlowupModes(_THIS, int actually_add, blow_cookie_t *cookie_blow) |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
36 { |
4194
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
37 int i, j, num_mode, bank; |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
38 blow_mode_t *blow_mode; |
4194
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
39 xbiosmode_t modeinfo; |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
40 |
4194
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
41 if (actually_add) { |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
42 /* Set bit 15 for old modes */ |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
43 for (i=0;i<NUM_MODELISTS;i++) { |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
44 if ( SDL_xbiosmode[i] != NULL ) { |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
45 for ( j=0; SDL_xbiosmode[i][j]; ++j ) { |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
46 SDL_xbiosmode[i][j]->number |= 1<<15; |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
47 } |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
48 } |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
49 } |
1042
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
50 } |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
51 |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
52 /* Add Blowup modes for 8 and 16 bpp */ |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
53 for (num_mode=3; num_mode<5; num_mode++) { |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
54 bank = cookie_blow->num_mode[num_mode]; |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
55 blow_mode = &(cookie_blow->blowup_modes[num_mode+(bank*5)]); |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
56 |
1042
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
57 /* Check extended mode enabled */ |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
58 if (blow_mode->enabled == 0) { |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
59 /* Check monitor needed for this mode */ |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
60 if ((blow_mode->monitor == cookie_blow->montype) |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
61 || ((blow_mode->monitor == MONITOR_TV) |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
62 && (cookie_blow->montype == MONITOR_RGB)) |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
63 || ((blow_mode->monitor == MONITOR_RGB) |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
64 && (cookie_blow->montype == MONITOR_TV))) |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
65 { |
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
66 /* we can use this extended mode */ |
4194
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
67 modeinfo.number = (num_mode == 3 ? BPS8 : BPS16); |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
68 modeinfo.width = blow_mode->width + 1; |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
69 modeinfo.height = blow_mode->height + 1; |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
70 modeinfo.depth = (num_mode == 3 ? 8 : 16); |
4198
6405314a7c07
Define flags for double line and c2p operations. More Milan video work.
Patrice Mandin <patmandin@gmail.com>
parents:
4194
diff
changeset
|
71 modeinfo.flags = (modeinfo.depth == 8 ? XBIOSMODE_C2P : 0); |
4194
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
72 |
05c9e942cc46
Preliminary work to support the Milan video bios, that will gives access to 24 or 32 bpp modes. I used the svga driver as model to dynamically build video modes list.
Patrice Mandin <patmandin@gmail.com>
parents:
4159
diff
changeset
|
73 SDL_XBIOS_AddMode(this, actually_add, &modeinfo); |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
74 } |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
75 } |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
76 } |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
77 } |