Mercurial > sdl-ios-xcode
annotate src/video/xbios/SDL_xbios_blowup.c @ 2049:5f6550e5184f
Merged SDL-ryan-multiple-audio-device branch r2803:2871 into the trunk.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 17 Oct 2006 09:15:21 +0000 |
parents | 12ef90a41631 |
children | 0e751c1f83f5 |
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 |
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
3 Copyright (C) 1997-2004 Sam Lantinga |
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 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
35 void |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
36 SDL_XBIOS_BlowupInit(_THIS, 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
|
37 { |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
38 int i, num_mode, bank; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
39 blow_mode_t *blow_mode; |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
40 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
41 /* Add bit 15 for old modes */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
42 for (i = 0; i < XBIOS_nummodes; i++) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
43 XBIOS_modelist[i].number |= 1 << 15; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
44 } |
1042
0e7218843cfb
Dynamically create list of video modes, easier to add new ones
Patrice Mandin <patmandin@gmail.com>
parents:
1040
diff
changeset
|
45 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
46 /* Add Blowup modes for 8 and 16 bpp */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
47 for (num_mode = 3; num_mode < 5; num_mode++) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
48 bank = cookie_blow->num_mode[num_mode]; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
49 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
|
50 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
51 /* Check extended mode enabled */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
52 if (blow_mode->enabled == 0) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
53 /* Check monitor needed for this mode */ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
54 if ((blow_mode->monitor == cookie_blow->montype) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
55 || ((blow_mode->monitor == MONITOR_TV) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
56 && (cookie_blow->montype == MONITOR_RGB)) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
57 || ((blow_mode->monitor == MONITOR_RGB) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
58 && (cookie_blow->montype == MONITOR_TV))) { |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
59 /* we can use this extended mode */ |
2036
12ef90a41631
Pfiou, all of it to update, faster to rewrite from scratch?
Patrice Mandin <patmandin@gmail.com>
parents:
1895
diff
changeset
|
60 SDL_XBIOS_AddMode(_this, |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
61 num_mode == 3 ? BPS8 : BPS16, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
62 blow_mode->width + 1, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
63 blow_mode->height + 1, |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
64 num_mode == 3 ? 8 : 16, SDL_FALSE); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
65 } |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
66 } |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
67 } |
1040
c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
Patrice Mandin <patmandin@gmail.com>
parents:
diff
changeset
|
68 } |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
69 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1402
diff
changeset
|
70 /* vi: set ts=4 sw=4 expandtab: */ |