patch-1.3.9 linux/drivers/sound/configure.c

Next file: linux/drivers/sound/coproc.h
Previous file: linux/drivers/sound/audio.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.8/linux/drivers/sound/configure.c linux/drivers/sound/configure.c
@@ -1,3 +1,4 @@
+#define DISABLED_OPTIONS 	0
 /*
  * sound/configure.c  - Configuration program for the Linux Sound Driver
  *
@@ -45,26 +46,36 @@
 #define OPT_GUS16	7
 #define OPT_GUSMAX	8
 #define OPT_MSS		9
-
-#define OPT_HIGHLEVEL   10	/* This must be same than the next one */
-#define OPT_SBPRO	10
-#define OPT_SB16	11
-#define OPT_AUDIO	12
-#define OPT_MIDI_AUTO	13
-#define OPT_MIDI	14
-#define OPT_YM3812_AUTO	15
-#define OPT_YM3812	16
-#define OPT_SEQUENCER	17
-#define OPT_LAST	17	/* Must be the same than the defined OPT */
+#define OPT_SSCAPE	10
+#define OPT_TRIX	11
+#define OPT_MAD16	12
+
+#define OPT_HIGHLEVEL   13	/* This must be same than the next one */
+#define OPT_SBPRO	13
+#define OPT_SB16	14
+#define OPT_AEDSP16     15
+#define OPT_AUDIO	16
+#define OPT_MIDI_AUTO	17
+#define OPT_MIDI	18
+#define OPT_YM3812_AUTO	19
+#define OPT_YM3812	20
+#define OPT_SEQUENCER	21
+#define OPT_LAST	21	/* Last defined OPT number */
 
 #define ANY_DEVS (B(OPT_AUDIO)|B(OPT_MIDI)|B(OPT_SEQUENCER)|B(OPT_GUS)| \
-		  B(OPT_MPU401)|B(OPT_PSS)|B(OPT_GUS16)|B(OPT_GUSMAX)|B(OPT_MSS))
+		  B(OPT_MPU401)|B(OPT_PSS)|B(OPT_GUS16)|B(OPT_GUSMAX)| \
+		  B(OPT_MSS)|B(OPT_SSCAPE)|B(OPT_UART6850)|B(OPT_TRIX)| \
+		  B(OPT_MAD16))
+#define AUDIO_CARDS (B (OPT_PSS) | B (OPT_SB) | B (OPT_PAS) | B (OPT_GUS) | \
+		B (OPT_MSS) | B (OPT_GUS16) | B (OPT_GUSMAX) | B (OPT_TRIX) | \
+		B (OPT_SSCAPE)| B(OPT_MAD16))
+#define MIDI_CARDS (B (OPT_PSS) | B (OPT_SB) | B (OPT_PAS) | B (OPT_MPU401) | \
+		    B (OPT_GUS) | B (OPT_TRIX) | B (OPT_SSCAPE)|B(OPT_MAD16))
 /*
  * Options that have been disabled for some reason (incompletely implemented
  * and/or tested). Don't remove from this list before looking at file
  * experimental.txt for further info.
  */
-#define DISABLED_OPTIONS (B(OPT_PSS))
 
 typedef struct
   {
@@ -109,14 +120,18 @@
   {B (OPT_GUS), 0, "GUS16", 1, 0, 0},
   {B (OPT_GUS), B (OPT_GUS16), "GUSMAX", 1, 0, 0},
   {0, 0, "MSS", 1, 0, 0},
+  {0, 0, "SSCAPE", 1, 0, 0},
+  {0, 0, "TRIX", 1, 0, 0},
+  {0, 0, "MAD16", 1, 0, 0},
 
   {B (OPT_SB), B (OPT_PAS), "SBPRO", 1, 0, 1},
   {B (OPT_SB) | B (OPT_SBPRO), B (OPT_PAS), "SB16", 1, 0, 1},
-{B (OPT_PSS) | B (OPT_SB) | B (OPT_PAS) | B (OPT_GUS) | B (OPT_MSS), 0, "AUDIO", 1, 0, 1},
+  {B (OPT_SBPRO) | B (OPT_MSS) | B (OPT_MPU401), 0, "AEDSP16", 1, 0, 0},
+  {AUDIO_CARDS, 0, "AUDIO", 1, 0, 1},
   {B (OPT_MPU401), 0, "MIDI_AUTO", 0, OPT_MIDI, 0},
-  {B (OPT_PSS) | B (OPT_SB) | B (OPT_PAS) | B (OPT_MPU401) | B (OPT_GUS), 0, "MIDI", 1, 0, 1},
+  {MIDI_CARDS, 0, "MIDI", 1, 0, 1},
   {B (OPT_ADLIB), 0, "YM3812_AUTO", 0, OPT_YM3812, 0},
-  {B (OPT_PSS) | B (OPT_SB) | B (OPT_PAS) | B (OPT_ADLIB), B (OPT_YM3812_AUTO), "YM3812", 1, 0, 1},
+  {B (OPT_PSS) | B (OPT_SB) | B (OPT_PAS) | B (OPT_ADLIB) | B (OPT_MSS) | B (OPT_PSS), B (OPT_YM3812_AUTO), "YM3812", 1, 0, 1},
   {B (OPT_MIDI) | B (OPT_YM3812) | B (OPT_YM3812_AUTO) | B (OPT_GUS), 0, "SEQUENCER", 0, 0, 1}
 };
 
@@ -124,7 +139,7 @@
 {
   "ProAudioSpectrum 16 support",
   "SoundBlaster support",
-  "AdLib support",
+  "Generic OPL2/OPL3 FM synthesizer support",
   "Gravis Ultrasound support",
   "MPU-401 support (NOT for SB16)",
   "6850 UART Midi support",
@@ -132,24 +147,32 @@
   "16 bit sampling option of GUS (_NOT_ GUS MAX)",
   "GUS MAX support",
   "Microsoft Sound System support",
+  "Ensoniq Soundscape support",
+  "MediaTriX AudioTriX Pro support",
+  "Support for MAD16 and/or Mozart based cards",
 
   "SoundBlaster Pro support",
   "SoundBlaster 16 support",
-  "/dev/dsp and /dev/audio support (_recommended_)",
+  "Audio Excel DSP 16 initialization support",
+  "/dev/dsp and /dev/audio supports (usually required)",
   "This should not be asked",
   "MIDI interface support",
   "This should not be asked",
   "FM synthesizer (YM3812/OPL-3) support",
   "/dev/sequencer support",
-  "Should I die"
+  "Is the sky really falling"
 };
 
 unsigned long   selected_options = 0;
 int             sb_dma = 0;
 
+#include "hex2hex.h"
+int             bin2hex (char *path, char *target, char *varname);
+
 int
 can_select_option (int nr)
 {
+#if 0
   switch (nr)
     {
     case 0:
@@ -175,6 +198,7 @@
 
 
     }
+#endif
 
   if (hw_table[nr].conditions)
     if (!(hw_table[nr].conditions & selected_options))
@@ -262,15 +286,19 @@
   printf ("/*\tGenerated by configure. Don't edit!!!!\t*/\n\n");
 
   fprintf (stderr, "\nConfiguring the sound support\n\n");
-
+#if 0
+  /*
+     * The full driver appeared to be impossible to compile and boot.
+     * There are too much supported cards now.
+   */
   fprintf (stderr, "Do you want to include full version of the sound driver (n/y) ? ");
 
   if (think_positively (0))
     {
       /*
- * Select all but some most dangerous cards. These cards are difficult to
- * detect reliably or conflict with some other cards (SCSI, Mitsumi)
- */
+         * Select all but some most dangerous cards. These cards are difficult to
+         * detect reliably or conflict with some other cards (SCSI, Mitsumi)
+       */
       selected_options = 0xffffffff &
 	~(B (OPT_MPU401) | B (OPT_UART6850) | B (OPT_PSS)) &
 	~DISABLED_OPTIONS;
@@ -279,7 +307,9 @@
       full_driver = 1;
     }
   else
+#endif
     {
+#if 0
       fprintf (stderr, "Do you want to DISABLE the Sound Driver (n/y) ?");
       if (think_positively (0))
 	{
@@ -287,6 +317,7 @@
 	  printf ("#undef KERNEL_SOUNDCARD\n");
 	  exit (0);
 	}
+#endif
       /*
        * Partial driver
        */
@@ -324,14 +355,119 @@
 
   if (selected_options & B (OPT_SBPRO))
     {
-      fprintf(stderr, "Do you want support for the mixer of SG NX Pro ? ");
+      fprintf (stderr, "Do you want support for the mixer of SG NX Pro ? ");
+      if (think_positively (0))
+	printf ("#define __SGNXPRO__\n");
+    }
+
+  if (selected_options & B (OPT_SB))
+    {
+      fprintf (stderr, "Do you want support for the MV Jazz16 (ProSonic etc.) ? ");
+      if (think_positively (0))
+	{
+	  printf ("#define JAZZ16\n");
+	  do
+	    {
+	      fprintf (stderr, "\tValid 16 bit DMA channels for ProSonic/Jazz 16 are\n");
+	      fprintf (stderr, "\t1, 3, 5 (default), 7\n");
+	      fprintf (stderr, "\tEnter 16bit DMA channel for Prosonic : ");
+	      num = ask_value ("%d", 5);
+	    }
+	  while (num != 1 && num != 3 && num != 5 && num != 7);
+	  fprintf (stderr, "ProSonic 16 bit DMA set to %d\n", num);
+	  printf ("#define JAZZ_DMA16 %d\n", num);
+
+	  fprintf (stderr, "Do you have SoundMan Wave (n/y) ? ");
+
+	  if (think_positively (0))
+	    {
+	      printf ("#define SM_WAVE\n");
+
+	    midi0001_again:
+	      fprintf
+		(stderr,
+		 "Logitech SoundMan Wave has a microcontroller which must be initialized\n"
+		 "before MIDI emulation works. This is possible only if the microcode\n"
+		 "file is compiled into the driver.\n"
+		 "Do you have access to the MIDI0001.BIN file (y/n) ? ");
+	      if (think_positively (1))
+		{
+		  char            path[512];
+
+		  fprintf (stderr,
+			   "Enter full name of the MIDI0001.BIN file (pwd is sound): ");
+		  scanf ("%s", path);
+		  fprintf (stderr, "including microcode file %s\n", path);
+
+		  if (!bin2hex (path, "smw-midi0001.h", "smw_ucode"))
+		    {
+		      fprintf (stderr, "couldn't open %s file\n",
+			       path);
+		      fprintf (stderr, "try again with correct path? ");
+		      if (think_positively (1))
+			goto midi0001_again;
+		    }
+		  else
+		    printf ("#define SMW_MIDI0001_INCLUDED\n");
+		}
+	    }
+	}
+    }
+
+  if (selected_options & B (OPT_SBPRO))
+    {
+      fprintf (stderr, "\n\nThe Logitech SoundMan Games supports 44 kHz in stereo\n"
+	       "while the standard SB Pro supports just 22 kHz/stereo\n"
+	       "You have an option to enable the SM Games mode.\n"
+	       "However do enable it only if you are _sure_ that your\n"
+	       "card is a SM Games. Enabling this feature with a\n"
+	       "plain old SB Pro _will_ cause troubles with stereo mode.\n"
+	       "\n"
+	       "DANGER! Read the above once again before answering 'y'\n"
+	       "Answer 'n' in case you are unsure what to do!\n");
+      fprintf (stderr, "Do you have a Logitech SoundMan Games (n/y) ? ");
       if (think_positively (0))
-	 printf("#define __SGNXPRO__\n");
+	printf ("#define SM_GAMES\n");
     }
 
   if (selected_options & B (OPT_SB16))
     selected_options |= B (OPT_SBPRO);
 
+  if (selected_options & B (OPT_AEDSP16))
+    {
+      int             sel1 = 0;
+
+      if (selected_options & B (OPT_SBPRO))
+	{
+	  fprintf (stderr, "Do you want support for the Audio Excel SoundBlaster pro mode ? ");
+	  if (think_positively (1))
+	    {
+	      printf ("#define AEDSP16_SBPRO\n");
+	      sel1 = 1;
+	    }
+	}
+
+      if ((selected_options & B (OPT_MSS)) && (sel1 == 0))
+	{
+	  fprintf (stderr, "Do you want support for the Audio Excel Microsoft Sound System mode? ");
+	  if (think_positively (1))
+	    {
+	      printf ("#define AEDSP16_MSS\n");
+	      sel1 = 1;
+	    }
+	}
+
+      if (sel1 == 0)
+	{
+	  printf ("#undef CONFIGURE_SOUNDCARD\n");
+	  printf ("#undef KERNEL_SOUNDCARD\n");
+	  fprintf (stderr, "ERROR!!!!!\nYou loose: you must select at least one mode when using Audio Excel!\n");
+	  exit (-1);
+	}
+      if (selected_options & B (OPT_MPU401))
+	printf ("#define AEDSP16_MPU401\n");
+    }
+
   if (selected_options & B (OPT_PSS))
     {
     genld_again:
@@ -339,8 +475,8 @@
 	(stderr,
        "if you wish to emulate the soundblaster and you have a DSPxxx.LD.\n"
 	 "then you must include the LD in the kernel.\n"
-	 "(do you wish to include a LD) ? ");
-      if (think_positively (0))
+	 "Do you wish to include a LD (y/n) ? ");
+      if (think_positively (1))
 	{
 	  char            path[512];
 
@@ -348,57 +484,55 @@
 		   "Enter the path to your LD file (pwd is sound): ");
 	  scanf ("%s", path);
 	  fprintf (stderr, "including LD file %s\n", path);
-	  selected_options |= B (OPT_SB) | B (OPT_MPU401) | B (OPT_ADLIB);
 
-	  /* Gen LD header */
-	  {
-	    int             fd;
-	    int             count;
-	    char            c;
-	    int             i = 0;
-
-	    if ((fd = open (path, 0)) > 0)
-	      {
-		FILE           *sf = fopen ("synth-ld.h", "w");
-
-		fprintf (sf, "/* automatically generated by configure */\n");
-		fprintf (sf, "unsigned char pss_synth[] = {\n");
-		while (1)
-		  {
-		    count = read (fd, &c, 1);
-		    if (count == 0)
-		      break;
-		    if (i != 0 && (i % 10) == 0)
-		      fprintf (sf, "\n");
-		    fprintf (sf, "0x%02x,", c & 0xFFL);
-		    i++;
-		  }
-		fprintf (sf, "};\n"
-			 "#define pss_synthLen %d\n", i);
-		fclose (sf);
-		close (fd);
-	      }
-	    else
-	      {
-		fprintf (stderr, "couldn't open %s as the ld file\n",
-			 path);
-		fprintf (stderr, "try again with correct path? ");
-		if (think_positively (1))
-		  goto genld_again;
-	      }
-	  }
+	  if (!bin2hex (path, "synth-ld.h", "pss_synth"))
+	    {
+	      fprintf (stderr, "couldn't open %s as the ld file\n",
+		       path);
+	      fprintf (stderr, "try again with correct path? ");
+	      if (think_positively (1))
+		goto genld_again;
+	    }
 	}
       else
 	{
 	  FILE           *sf = fopen ("synth-ld.h", "w");
 
-	  fprintf (sf, "/* automatically generated by configure */\n");
+	  fprintf (sf, "/* automaticaly generated by configure */\n");
 	  fprintf (sf, "unsigned char pss_synth[1];\n"
 		   "#define pss_synthLen 0\n");
 	  fclose (sf);
 	}
     }
 
+  if (selected_options & B (OPT_TRIX))
+    {
+    hex2hex_again:
+      fprintf (stderr, "MediaTriX audioTriX Pro has a onboard microcontroller\n"
+	       "which needs to be initialized by downloading\n"
+	       "the code from file TRXPRO.HEX in the DOS driver\n"
+	       "directory. If you don't have the TRXPRO.HEX handy\n"
+	       "you may skip this step. However SB and MPU-401\n"
+	       "modes of AudioTriX Pro will not work without\n"
+	       "this file!\n"
+	       "\n"
+	       "Do you want to include TRXPRO.HEX in your kernel (y/n) ? ");
+
+      if (think_positively (1))
+	{
+	  char            path[512];
+
+	  fprintf (stderr,
+		 "Enter the path to your TRXPRO.HEX file (pwd is sound): ");
+	  scanf ("%s", path);
+	  fprintf (stderr, "including HEX file %s\n", path);
+
+	  if (!hex2hex (path, "trix_boot.h", "static unsigned char trix_boot"))
+	    goto hex2hex_again;
+	  printf ("#define INCLUDE_TRIX_BOOT\n");
+	}
+    }
+
   if (!(selected_options & ANY_DEVS))
     {
       printf ("#undef CONFIGURE_SOUNDCARD\n");
@@ -423,6 +557,20 @@
   printf ("\n");
 
 #if defined(linux)
+  if (selected_options & B (OPT_AEDSP16))
+    {
+      fprintf (stderr, "\nI/O base for Audio Excel DSP 16 ?\n"
+	       "Warning:\n"
+	       "If you are using Audio Excel SoundBlaster emulation,\n"
+	"you must use the same I/O base for Audio Excel and SoundBlaster.\n"
+	       "The factory default is 220 (other possible value is 240)\n"
+	       "Enter the Audio Excel DSP 16 I/O base: ");
+
+      num = ask_value ("%x", 0x220);
+      fprintf (stderr, "Audio Excel DSP 16 I/O base set to %03x\n", num);
+      printf ("#define AEDSP16_BASE 0x%03x\n", num);
+    }
+
   if ((selected_options & B (OPT_SB)) && selected_options & (B (OPT_AUDIO) | B (OPT_MIDI)))
     {
       fprintf (stderr, "\nI/O base for SB?\n"
@@ -450,7 +598,7 @@
 
       printf ("#define SBC_IRQ %d\n", num);
 
-      if (selected_options & (B (OPT_SBPRO) | B (OPT_PAS) | B (OPT_PSS)))
+      if (selected_options & (B (OPT_SBPRO) | B (OPT_PAS)))
 	{
 	  fprintf (stderr, "\nDMA channel for SoundBlaster?\n"
 		   "For SB 1.0, 1.5 and 2.0 this MUST be 1\n"
@@ -502,6 +650,7 @@
 
   if (selected_options & B (OPT_PAS))
     {
+
       if (selected_options & (B (OPT_AUDIO) | B (OPT_MIDI)))
 	{
 	  fprintf (stderr, "\nIRQ number for ProAudioSpectrum?\n"
@@ -541,6 +690,17 @@
 	  fprintf (stderr, "\nProAudioSpectrum DMA set to %d\n", num);
 	  printf ("#define PAS_DMA %d\n", num);
 	}
+      fprintf (stderr, "\nEnable Joystick port on ProAudioSpectrum (n/y) ? ");
+      if (think_positively (0))
+	printf ("#define PAS_JOYSTICK_ENABLE\n");
+
+      fprintf (stderr, "PAS16 could be noisy with some mother boards\n"
+	       "There is a command line switch (was it :T?)\n"
+	       "in the DOS driver for PAS16 which solves this.\n"
+	       "Don't enable this feature unless you have problems!\n"
+	       "Do you have to use this switch with DOS (y/n) ?");
+      if (think_positively (0))
+	printf ("#define BROKEN_BUS_CLOCK\n");
     }
 
   if (selected_options & B (OPT_GUS))
@@ -602,6 +762,65 @@
 	}
       fprintf (stderr, "\nGravis UltraSound DMA set to %d\n", num);
       printf ("#define GUS_DMA %d\n", num);
+
+      if (selected_options & B (OPT_GUSMAX))
+	{
+	  fprintf (stderr, "\nSecond DMA channel for GUS MAX (optional)?\n"
+		   "The default value is 7 (0 disables)\n"
+		   "Enter the value: ");
+
+	  num = ask_value ("%d", 7);
+	  if (num > 0)
+	    {
+	      if (num > 7)
+		{
+		  fprintf (stderr, "*** Illegal input! ***\n");
+		  num = 7;
+		}
+
+	      fprintf (stderr, "\nGUSMAX DMA set to %d\n", num);
+	      printf ("#define GUSMAX_DMA %d\n", num);
+	    }
+	}
+
+      if (selected_options & B (OPT_GUS16))
+	{
+	  fprintf (stderr, "\nI/O base for GUS16 (GUS 16 bit sampling option)?\n"
+		   "The factory default is 530\n"
+		   "Other possible values are  604, E80 or F40\n"
+		   "Enter the GUS16 I/O base: ");
+
+	  num = ask_value ("%x", 0x530);
+	  fprintf (stderr, "GUS16 I/O base set to %03x\n", num);
+	  printf ("#define GUS16_BASE 0x%03x\n", num);
+
+	  fprintf (stderr, "\nIRQ number for GUS16?\n"
+		   "Valid numbers are: 3, 4, 5, 7, or 9(=2).\n"
+		   "The default value is 7.\n"
+		   "Enter the value: ");
+
+	  num = ask_value ("%d", 7);
+	  if (num == 6 || num < 3 || num > 15)
+	    {
+	      fprintf (stderr, "*** Illegal input! ***\n");
+	      num = 7;
+	    }
+	  fprintf (stderr, "GUS16 IRQ set to %d\n", num);
+	  printf ("#define GUS16_IRQ %d\n", num);
+
+	  fprintf (stderr, "\nDMA number for GUS16?\n"
+		   "The default value is 3\n"
+		   "Enter the value: ");
+
+	  num = ask_value ("%d", 3);
+	  if (num < 0 || num > 3)
+	    {
+	      fprintf (stderr, "*** Illegal input! ***\n");
+	      num = 3;
+	    }
+	  fprintf (stderr, "\nGUS16 DMA set to %d\n", num);
+	  printf ("#define GUS16_DMA %d\n", num);
+	}
     }
 
   if (selected_options & B (OPT_MPU401))
@@ -620,9 +839,7 @@
 	       "Enter the value: ");
 
       num = ask_value ("%d", 9);
-      if (num == 6 || num < 3 || num > 15)	/*
-						 * Used for floppy
-						 */
+      if (num == 6 || num < 3 || num > 15)
 	{
 
 	  fprintf (stderr, "*** Illegal input! ***\n");
@@ -635,15 +852,15 @@
   if (selected_options & B (OPT_UART6850))
     {
       fprintf (stderr, "\nI/O base for 6850 UART Midi?\n"
-	       "Be careful. No defaults.\n"
+	       "Be carefull. No defaults.\n"
 	       "Enter the 6850 UART I/O base: ");
 
       num = ask_value ("%x", 0);
       if (num == 0)
 	{
 	  /*
- * Invalid value entered
- */
+	     * Invalid value entered
+	   */
 	  printf ("#define EXCLUDE_UART6850\n");
 	}
       else
@@ -657,9 +874,7 @@
 		   "Enter the value: ");
 
 	  num = ask_value ("%d", 5);
-	  if (num == 6 || num < 3 || num > 15)	/*
-						 * Used for floppy
-						 */
+	  if (num == 6 || num < 3 || num > 15)
 	    {
 
 	      fprintf (stderr, "*** Illegal input! ***\n");
@@ -673,7 +888,7 @@
   if (selected_options & B (OPT_PSS))
     {
       fprintf (stderr, "\nI/O base for PSS?\n"
-	       "The factory default is 220\n"
+	       "The factory default is 220 (240 also possible)\n"
 	       "Enter the PSS I/O base: ");
 
       num = ask_value ("%x", 0x220);
@@ -686,7 +901,7 @@
 	       "Enter the value: ");
 
       num = ask_value ("%d", 10);
-      if (num == 6 || num < 3 || num > 15)	/* Used for floppy */
+      if (num == 6 || num < 3 || num > 15)
 	{
 	  fprintf (stderr, "*** Illegal input! ***\n");
 	  num = 7;
@@ -695,6 +910,44 @@
       printf ("#define PSS_IRQ %d\n", num);
 
       fprintf (stderr, "\nDMA number for ECHO-PSS?\n"
+	       "The default value is 5\n"
+	       "Valid values are 5, 6 and 7\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 5);
+      if (num < 5 || num > 7)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 5;
+	}
+      fprintf (stderr, "\nECHO-PSS DMA set to %d\n", num);
+      printf ("#define PSS_DMA %d\n", num);
+
+      fprintf (stderr, "\nMSS (MS Sound System) I/O base for the PSS card?\n"
+	       "The factory default is 530\n"
+	       "Other possible values are  604, E80 or F40\n"
+	       "Enter the MSS I/O base: ");
+
+      num = ask_value ("%x", 0x530);
+      fprintf (stderr, "PSS/MSS I/O base set to %03x\n", num);
+      printf ("#define PSS_MSS_BASE 0x%03x\n", num);
+
+      fprintf (stderr, "\nIRQ number for the MSS mode of PSS ?\n"
+	       "Valid numbers are: 7, 9(=2), 10 and 11.\n"
+	       "The default value is 11.\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 11);
+      if (num == 6 || num < 3 || num > 15)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 11;
+	}
+      fprintf (stderr, "PSS/MSS IRQ set to %d\n", num);
+      printf ("#define PSS_MSS_IRQ %d\n", num);
+
+      fprintf (stderr, "\nMSS DMA number for PSS?\n"
+	       "Valid values are 0, 1 and 3.\n"
 	       "The default value is 3\n"
 	       "Enter the value: ");
 
@@ -704,8 +957,31 @@
 	  fprintf (stderr, "*** Illegal input! ***\n");
 	  num = 3;
 	}
-      fprintf (stderr, "\nECHO-PSS DMA set to %d\n", num);
-      printf ("#define PSS_DMA %d\n", num);
+      fprintf (stderr, "\nPSS/MSS DMA set to %d\n", num);
+      printf ("#define PSS_MSS_DMA %d\n", num);
+
+      fprintf (stderr, "\nMIDI I/O base for PSS?\n"
+	       "The factory default is 330\n"
+	       "Enter the PSS MIDI I/O base: ");
+
+      num = ask_value ("%x", 0x330);
+      fprintf (stderr, "PSS/MIDI I/O base set to %03x\n", num);
+      printf ("#define PSS_MPU_BASE 0x%03x\n", num);
+
+      fprintf (stderr, "\nIRQ number for PSS MIDI?\n"
+	       "Valid numbers are: 3, 4, 5, 7 and 9(=2).\n"
+	       "The default value is 9.\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 9);
+      if (num == 6 || num < 3 || num > 15)
+	{
+
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 5;
+	}
+      fprintf (stderr, "PSS MIDI IRQ set to %d\n", num);
+      printf ("#define PSS_MPU_IRQ %d\n", num);
     }
 
   if (selected_options & B (OPT_MSS))
@@ -725,7 +1001,7 @@
 	       "Enter the value: ");
 
       num = ask_value ("%d", 10);
-      if (num == 6 || num < 3 || num > 15)	/* Used for floppy */
+      if (num == 6 || num < 3 || num > 15)
 	{
 	  fprintf (stderr, "*** Illegal input! ***\n");
 	  num = 7;
@@ -734,7 +1010,7 @@
       printf ("#define MSS_IRQ %d\n", num);
 
       fprintf (stderr, "\nDMA number for MSS?\n"
-	       "Valid values are 1 and 3 (sometimes 0)"
+	       "Valid values are 0, 1 and 3.\n"
 	       "The default value is 3\n"
 	       "Enter the value: ");
 
@@ -748,61 +1024,275 @@
       printf ("#define MSS_DMA %d\n", num);
     }
 
-  if (selected_options & B (OPT_GUS16))
+  if (selected_options & B (OPT_SSCAPE))
     {
-      fprintf (stderr, "\nI/O base for GUS16 (GUS 16 bit sampling option)?\n"
+      int             reveal_spea;
+
+      fprintf (stderr, "\n(MIDI) I/O base for Ensoniq Soundscape?\n"
+	       "The factory default is 330\n"
+	       "Other possible values are 320, 340 or 350\n"
+	       "Enter the Soundscape I/O base: ");
+
+      num = ask_value ("%x", 0x330);
+      fprintf (stderr, "Soundscape I/O base set to %03x\n", num);
+      printf ("#define SSCAPE_BASE 0x%03x\n", num);
+
+      fprintf (stderr, "Is your SoundScape card made/marketed by Reveal or Spea? ");
+      reveal_spea = think_positively (0);
+      if (reveal_spea)
+	printf ("#define REVEAL_SPEA\n");
+
+      fprintf (stderr, "\nIRQ number for Soundscape?\n");
+
+      if (reveal_spea)
+	fprintf (stderr, "Check valid interrupts from the manual of your card.\n");
+      else
+	fprintf (stderr, "Valid numbers are: 5, 7, 9(=2) and 10.\n");
+
+      fprintf (stderr, "The default value is 9.\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 9);
+      if (num == 6 || num < 3 || num > 15)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 9;
+	}
+      fprintf (stderr, "Soundscape IRQ set to %d\n", num);
+      printf ("#define SSCAPE_IRQ %d\n", num);
+
+      fprintf (stderr, "\nDMA number for Soundscape?\n"
+	       "Valid values are 1 and 3 (sometimes 0)"
+	       "The default value is 3\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 3);
+      if (num == 4 || num < 0 || num > 7)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 3;
+	}
+      fprintf (stderr, "\nSoundscape DMA set to %d\n", num);
+      printf ("#define SSCAPE_DMA %d\n", num);
+
+      fprintf (stderr, "\nMSS (MS Sound System) I/O base for the SSCAPE card?\n"
+	       "The factory default is 534\n"
+	       "Other possible values are  608, E84 or F44\n"
+	       "Enter the MSS I/O base: ");
+
+      num = ask_value ("%x", 0x534);
+      fprintf (stderr, "SSCAPE/MSS I/O base set to %03x\n", num);
+      printf ("#define SSCAPE_MSS_BASE 0x%03x\n", num);
+
+      fprintf (stderr, "\nIRQ number for the MSS mode of SSCAPE ?\n");
+      if (reveal_spea)
+	fprintf (stderr, "Valid numbers are: 5, 7, 9(=2) and 15.\n");
+      else
+	fprintf (stderr, "Valid numbers are: 5, 7, 9(=2) and 10.\n");
+      fprintf (stderr, "The default value is 5.\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 5);
+      if (num == 6 || num < 3 || num > 15)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 10;
+	}
+      fprintf (stderr, "SSCAPE/MSS IRQ set to %d\n", num);
+      printf ("#define SSCAPE_MSS_IRQ %d\n", num);
+
+      fprintf (stderr, "\nMSS DMA number for SSCAPE?\n"
+	       "Valid values are 0, 1 and 3.\n"
+	       "The default value is 3\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 3);
+      if (num == 4 || num < 0 || num > 7)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 3;
+	}
+      fprintf (stderr, "\nSSCAPE/MSS DMA set to %d\n", num);
+      printf ("#define SSCAPE_MSS_DMA %d\n", num);
+    }
+  if (selected_options & B (OPT_TRIX))
+    {
+
+      fprintf (stderr, "\nWindows Sound System I/O base for the AudioTriX card?\n"
 	       "The factory default is 530\n"
 	       "Other possible values are  604, E80 or F40\n"
-	       "Enter the GUS16 I/O base: ");
+	       "Enter the MSS I/O base: ");
 
       num = ask_value ("%x", 0x530);
-      fprintf (stderr, "GUS16 I/O base set to %03x\n", num);
-      printf ("#define GUS16_BASE 0x%03x\n", num);
+      fprintf (stderr, "AudioTriX MSS I/O base set to %03x\n", num);
+      printf ("#define TRIX_BASE 0x%03x\n", num);
+
+      fprintf (stderr, "\nIRQ number for the WSS mode of AudioTriX ?\n"
+	       "Valid numbers are: 5, 7, 9(=2), 10 and 11.\n"
+	       "The default value is 11.\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 11);
+      if (num != 5 && num != 7 && num != 9 && num != 10 && num != 11)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 11;
+	}
+      fprintf (stderr, " AudioTriX WSS IRQ set to %d\n", num);
+      printf ("#define TRIX_IRQ %d\n", num);
 
-      fprintf (stderr, "\nIRQ number for GUS16?\n"
-	       "Valid numbers are: 3, 4, 5, 7, or 9(=2).\n"
+      fprintf (stderr, "\nWSS DMA number for AudioTriX?\n"
+	       "Valid values are 0, 1 and 3.\n"
+	       "The default value is 3\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 3);
+      if (num != 0 && num != 1 && num != 3)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 3;
+	}
+      fprintf (stderr, "\nAudioTriX/WSS DMA set to %d\n", num);
+      printf ("#define TRIX_DMA %d\n", num);
+
+      fprintf (stderr, "\nSoundBlaster I/O address for the AudioTriX card?\n"
+	       "The factory default is 220\n"
+	  "Other possible values are 200, 210, 230, 240, 250, 260 and 270\n"
+	       "Enter the MSS I/O base: ");
+
+      num = ask_value ("%x", 0x220);
+      fprintf (stderr, "AudioTriX SB I/O base set to %03x\n", num);
+      printf ("#define TRIX_SB_BASE 0x%03x\n", num);
+
+      fprintf (stderr, "\nIRQ number for the SB mode of AudioTriX ?\n"
+	       "Valid numbers are: 3, 4, 5 and 7.\n"
 	       "The default value is 7.\n"
 	       "Enter the value: ");
 
       num = ask_value ("%d", 7);
-      if (num == 6 || num < 3 || num > 15)	/* Used for floppy */
+      if (num != 3 && num != 4 && num != 5 && num != 7)
 	{
 	  fprintf (stderr, "*** Illegal input! ***\n");
 	  num = 7;
 	}
-      fprintf (stderr, "GUS16 IRQ set to %d\n", num);
-      printf ("#define GUS16_IRQ %d\n", num);
+      fprintf (stderr, " AudioTriX SB IRQ set to %d\n", num);
+      printf ("#define TRIX_SB_IRQ %d\n", num);
+
+      fprintf (stderr, "\nSB DMA number for AudioTriX?\n"
+	       "Valid values are 1 and 3.\n"
+	       "The default value is 1\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 1);
+      if (num != 1 && num != 3)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 1;
+	}
+      fprintf (stderr, "\nAudioTriX/SB DMA set to %d\n", num);
+      printf ("#define TRIX_SB_DMA %d\n", num);
+
+      fprintf (stderr, "\nMIDI (MPU-401) I/O address for the AudioTriX card?\n"
+	       "The factory default is 330\n"
+	       "Other possible values are 330, 370, 3B0 and 3F0\n"
+	       "Enter the MPU I/O base: ");
+
+      num = ask_value ("%x", 0x330);
+      fprintf (stderr, "AudioTriX MIDI I/O base set to %03x\n", num);
+      printf ("#define TRIX_MPU_BASE 0x%03x\n", num);
+
+      fprintf (stderr, "\nMIDI IRQ number for the AudioTriX ?\n"
+	       "Valid numbers are: 3, 4, 5, 7 and 9(=2).\n"
+	       "The default value is 5.\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 5);
+      if (num != 3 && num != 4 && num != 5 && num != 7 && num != 9)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 5;
+	}
+      fprintf (stderr, " AudioTriX MIDI IRQ set to %d\n", num);
+      printf ("#define TRIX_MPU_IRQ %d\n", num);
+    }
+
+  if (selected_options & B (OPT_MAD16))
+    {
+      fprintf (stderr, "\n*** Options for the MAD16 and Mozart based cards ***\n\n");
+
+      fprintf (stderr, "\nWindows Sound System I/O base for the MAD16/Mozart card?\n"
+	       "The factory default is 530\n"
+	       "Other possible values are  604, E80 or F40\n"
+	       "(Check which ones are supported by your card!!!!!!)\n"
+	       "Enter the MSS I/O base: ");
+
+      num = ask_value ("%x", 0x530);
+      fprintf (stderr, "MAD16 MSS I/O base set to %03x\n", num);
+      printf ("#define MAD16_BASE 0x%03x\n", num);
+
+      fprintf (stderr, "\nIRQ number for the WSS mode of MAD16/Mozart ?\n"
+	       "Valid numbers are: 7, 9(=2), 10 and 11.\n"
+	       "The default value is 11.\n"
+	       "Enter the value: ");
+
+      num = ask_value ("%d", 11);
+      if (num != 7 && num != 9 && num != 10 && num != 11)
+	{
+	  fprintf (stderr, "*** Illegal input! ***\n");
+	  num = 11;
+	}
+      fprintf (stderr, " MAD16 WSS IRQ set to %d\n", num);
+      printf ("#define MAD16_IRQ %d\n", num);
 
-      fprintf (stderr, "\nDMA number for GUS16?\n"
+      fprintf (stderr, "\nWSS DMA number for MAD16/Mozart?\n"
+	       "Valid values are 0, 1 and 3.\n"
 	       "The default value is 3\n"
 	       "Enter the value: ");
 
       num = ask_value ("%d", 3);
-      if (num < 0 || num > 3)
+      if (num != 0 && num != 1 && num != 3)
 	{
 	  fprintf (stderr, "*** Illegal input! ***\n");
 	  num = 3;
 	}
-      fprintf (stderr, "\nGUS16 DMA set to %d\n", num);
-      printf ("#define GUS16_DMA %d\n", num);
+      fprintf (stderr, "\nMAD16/WSS DMA set to %d\n", num);
+      printf ("#define MAD16_DMA %d\n", num);
+
+      fprintf (stderr, "\nMIDI (MPU-401) I/O address for the MAD16 card?\n"
+	       "(MPU401 is not supported by Mozart and 82C928)\n"
+	       "(This is the second MIDI port in TB Tropez)\n"
+	       "The factory default is 330 (use 0 to disable)\n"
+	       "Other possible values are 330, 320, 310 and 300\n"
+	       "Enter the MPU I/O base: ");
+
+      num = ask_value ("%x", 0x330);
+      if (num == 0)
+	fprintf (stderr, "MAD16/Mozart MIDI port disabled\n");
+      else
+	{
+	  fprintf (stderr, "MAD16 MIDI I/O base set to %03x\n", num);
+	  printf ("#define MAD16_MPU_BASE 0x%03x\n", num);
+
+	  fprintf (stderr, "\nMIDI IRQ number for the MAD16 ?\n"
+		   "Valid numbers are: 5, 7, 9(=2) and 10.\n"
+		   "The default value is 5.\n"
+		   "Enter the value: ");
+
+	  num = ask_value ("%d", 5);
+	  if (num != 3 && num != 4 && num != 5 && num != 7 && num != 9)
+	    {
+	      fprintf (stderr, "*** Illegal input! ***\n");
+	      num = 5;
+	    }
+	  fprintf (stderr, " MAD16 MIDI IRQ set to %d\n", num);
+	  printf ("#define MAD16_MPU_IRQ %d\n", num);
+	}
     }
 #endif
 
   if (selected_options & B (OPT_AUDIO))
     {
-      def_size = 16384;
-
-      if (selected_options & (B (OPT_SBPRO) | B (OPT_PAS) | B (OPT_SB16)))
-	def_size = 32768;
-
-#ifndef __386BSD__
-      if ((selected_options & (B (OPT_PAS) | B (OPT_PAS) | B (OPT_GUS16) | B (OPT_GUSMAX) |
-			       B (OPT_MSS) | B (OPT_PSS))) &&
-	  !full_driver)
-	def_size = 65536;	/*
-				 * PAS16 or SB16
-				 */
-#endif
+      def_size = 65536;
 
       fprintf (stderr, "\nSelect the DMA buffer size (4096, 16384, 32768 or 65536 bytes)\n"
 	       "%d is recommended value for this configuration.\n"
@@ -827,4 +1317,38 @@
 #endif
 
   exit (0);
+}
+
+int
+bin2hex (char *path, char *target, char *varname)
+{
+  int             fd;
+  int             count;
+  char            c;
+  int             i = 0;
+
+  if ((fd = open (path, 0)) > 0)
+    {
+      FILE           *sf = fopen (target, "w");
+
+      fprintf (sf, "/* automaticaly generated by configure */\n");
+      fprintf (sf, "static unsigned char %s[] = {\n", varname);
+      while (1)
+	{
+	  count = read (fd, &c, 1);
+	  if (count == 0)
+	    break;
+	  if (i != 0 && (i % 10) == 0)
+	    fprintf (sf, "\n");
+	  fprintf (sf, "0x%02x,", c & 0xFFL);
+	  i++;
+	}
+      fprintf (sf, "};\n"
+	       "#define %sLen %d\n", varname, i);
+      fclose (sf);
+      close (fd);
+      return 1;
+    }
+
+  return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this