Mercurial > sdl-ios-xcode
comparison src/video/xbios/SDL_xbios.c @ 1040:c6ed27c7d47d
Preliminary support for Blowup and Screen Blaster 3 extensions on Atari Falcon 030
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Tue, 22 Feb 2005 17:57:40 +0000 |
parents | 2662da16d668 |
children | 0e7218843cfb |
comparison
equal
deleted
inserted
replaced
1039:68f2b997758e | 1040:c6ed27c7d47d |
---|---|
53 #include "SDL_ataric2p_s.h" | 53 #include "SDL_ataric2p_s.h" |
54 #include "SDL_atarievents_c.h" | 54 #include "SDL_atarievents_c.h" |
55 #include "SDL_atarimxalloc_c.h" | 55 #include "SDL_atarimxalloc_c.h" |
56 #include "SDL_atarigl_c.h" | 56 #include "SDL_atarigl_c.h" |
57 #include "SDL_xbios.h" | 57 #include "SDL_xbios.h" |
58 #include "SDL_xbios_blowup.h" | |
59 #include "SDL_xbios_sb3.h" | |
58 | 60 |
59 #define XBIOS_VID_DRIVER_NAME "xbios" | 61 #define XBIOS_VID_DRIVER_NAME "xbios" |
60 | 62 |
61 /*#define DEBUG_VIDEO_XBIOS 1*/ | 63 /*#define DEBUG_VIDEO_XBIOS 1*/ |
62 | 64 |
136 | 138 |
137 /* Xbios driver bootstrap functions */ | 139 /* Xbios driver bootstrap functions */ |
138 | 140 |
139 static int XBIOS_Available(void) | 141 static int XBIOS_Available(void) |
140 { | 142 { |
141 unsigned long cookie_vdo, cookie_mil, cookie_hade; | 143 unsigned long cookie_vdo, cookie_mil, cookie_hade, cookie_scpn; |
142 | 144 |
143 /* Milan/Hades Atari clones do not have an Atari video chip */ | 145 /* Milan/Hades Atari clones do not have an Atari video chip */ |
144 if ( (Getcookie(C__MIL, &cookie_mil) == C_FOUND) || | 146 if ( (Getcookie(C__MIL, &cookie_mil) == C_FOUND) || |
145 (Getcookie(C_hade, &cookie_hade) == C_FOUND) ) { | 147 (Getcookie(C_hade, &cookie_hade) == C_FOUND) ) { |
146 return 0; | 148 return 0; |
163 return 0; | 165 return 0; |
164 break; | 166 break; |
165 case VDO_F30: | 167 case VDO_F30: |
166 if ( Montype() == MONITOR_MONO) | 168 if ( Montype() == MONITOR_MONO) |
167 return 0; | 169 return 0; |
170 if (Getcookie(C_SCPN, &cookie_scpn) == C_FOUND) { | |
171 if (!SDL_XBIOS_SB3Usable((scpn_cookie_t *)cookie_scpn)) { | |
172 return 0; | |
173 } | |
174 } | |
168 break; | 175 break; |
169 default: | 176 default: |
170 return 0; | 177 return 0; |
171 } | 178 } |
172 | 179 |
240 | 247 |
241 static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat) | 248 static int XBIOS_VideoInit(_THIS, SDL_PixelFormat *vformat) |
242 { | 249 { |
243 int i,j8,j16; | 250 int i,j8,j16; |
244 xbiosmode_t *current_mode; | 251 xbiosmode_t *current_mode; |
252 unsigned long cookie_blow, cookie_scpn; | |
245 | 253 |
246 /* Initialize all variables that we clean on shutdown */ | 254 /* Initialize all variables that we clean on shutdown */ |
247 memset (SDL_modelist, 0, sizeof(SDL_modelist)); | 255 memset (SDL_modelist, 0, sizeof(SDL_modelist)); |
248 | 256 |
249 /* Cookie _VDO present ? if not, assume ST machine */ | 257 /* Cookie _VDO present ? if not, assume ST machine */ |
365 newvmode &= ~(VGA|PAL); | 373 newvmode &= ~(VGA|PAL); |
366 newvmode |= XBIOS_oldvmode & (VGA|PAL); | 374 newvmode |= XBIOS_oldvmode & (VGA|PAL); |
367 current_mode->number = newvmode; | 375 current_mode->number = newvmode; |
368 | 376 |
369 current_mode++; | 377 current_mode++; |
378 } | |
379 | |
380 /* Initialize BlowUp or SB3 stuff if present */ | |
381 if (Getcookie(C_BLOW, &cookie_blow) == C_FOUND) { | |
382 SDL_XBIOS_BlowupInit(this, (blow_cookie_t *)cookie_blow); | |
383 } else if (Getcookie(C_SCPN, &cookie_scpn) == C_FOUND) { | |
384 SDL_XBIOS_SB3Init(this, (scpn_cookie_t *)cookie_scpn); | |
370 } | 385 } |
371 | 386 |
372 break; | 387 break; |
373 } | 388 } |
374 | 389 |