src/video/xbios/SDL_xbios.c
changeset 1040 c6ed27c7d47d
parent 993 2662da16d668
child 1042 0e7218843cfb
--- a/src/video/xbios/SDL_xbios.c	Tue Feb 15 11:50:33 2005 +0000
+++ b/src/video/xbios/SDL_xbios.c	Tue Feb 22 17:57:40 2005 +0000
@@ -55,6 +55,8 @@
 #include "SDL_atarimxalloc_c.h"
 #include "SDL_atarigl_c.h"
 #include "SDL_xbios.h"
+#include "SDL_xbios_blowup.h"
+#include "SDL_xbios_sb3.h"
 
 #define XBIOS_VID_DRIVER_NAME "xbios"
 
@@ -138,7 +140,7 @@
 
 static int XBIOS_Available(void)
 {
-	unsigned long cookie_vdo, cookie_mil, cookie_hade;
+	unsigned long cookie_vdo, cookie_mil, cookie_hade, cookie_scpn;
 
 	/* Milan/Hades Atari clones do not have an Atari video chip */
 	if ( (Getcookie(C__MIL, &cookie_mil) == C_FOUND) ||
@@ -165,6 +167,11 @@
 		case VDO_F30:
 			if ( Montype() == MONITOR_MONO)
 				return 0;
+			if (Getcookie(C_SCPN, &cookie_scpn) == C_FOUND) {
+				if (!SDL_XBIOS_SB3Usable((scpn_cookie_t *)cookie_scpn)) {
+					return 0;
+				}
+			}
 			break;
 		default:
 			return 0;
@@ -242,6 +249,7 @@
 {
 	int i,j8,j16;
 	xbiosmode_t *current_mode;
+	unsigned long cookie_blow, cookie_scpn;
 
 	/* Initialize all variables that we clean on shutdown */
 	memset (SDL_modelist, 0, sizeof(SDL_modelist));
@@ -369,6 +377,13 @@
 				current_mode++;
 			}
 
+			/* Initialize BlowUp or SB3 stuff if present */
+			if (Getcookie(C_BLOW, &cookie_blow) == C_FOUND) {
+				SDL_XBIOS_BlowupInit(this, (blow_cookie_t *)cookie_blow);
+			} else if (Getcookie(C_SCPN, &cookie_scpn) == C_FOUND) {
+				SDL_XBIOS_SB3Init(this, (scpn_cookie_t *)cookie_scpn);
+			}
+
 			break;
 	}