How I set all of this up at W3SZ
John K3PGP helped me to get started in late 1999 with a homebrew computer-controlled receiver using TUF-1's for mixers, a couple of computer-controlled frequency synthesizers for the LO's, and the DSP-10 as the final audio stage. This has worked well, but the visible bandwidth with the DSP-10 at 4.8 kHz was less than the 10-30 kHz I want. Hence my interest in Leif's software.
I had never used Linux, or any UNIX before, but found that with a little help and some quick reading I was able to get Linux installed on my Windows 95 computer (a Pentium Pro 200 that now runs Windows 98) and Leif's program running over a couple of evenings. I got things working there with a lot of help from Leif as his dsp program progressed from dsp00-01 to dsp00-12. Then, when it was clear that this was a DYNAMITE (or 'killer' to you young 'uns) application, I put it on the faster machine (Pentium 4 1.4 GHz) that I then dedicated to Linux.
NOTE ADDED 11/20/01: The notes below are now I think entirely superfluous. I have upgraded to RedHat Linux 7.2, svgalib 1.4.3, XFree 4.0.1 and with these new software updates there is nothing special required in the installation process. It flows easily and with NO need to alter any source code, etc. Just follow the instructions on Leif's webpage, http://www.nitehawk.com/sm5bsz/linuxdsp/install/dsp.htm. I have left the text below for those who are stuck with old versions of the software, but I believe the text below is now entirely unnecessary.
First the blurb on how I did things with the second (Pentium 4 1.4 GHz) computer with SiS 6326 video card, M Audio Delta 44 soundcard for input, SoundBlaster PCI64 for output:
1. I followed the instructions in "Linux for Dummies" on how to use FIPS to make a disk partition for Linux. Briefly, this involved:
a. defragmenting the hard drive
b. scanning the disk for errors and correcting if found
c. going to 'control panel' and add/remove programs and making a startup floppy
d. using 'find' to find fips.exe and then placing it on the startup floppy just made
e. running fips and proceeding as outlined in 'Linux for Dummies' to create a new partition
f. rebooting with hard drive and going to windows and scanning disk for any errors
Then I used the RedHat Linux 7.0 Installation Guide to install RedHad Linux 7.0 using the installation CD's and the RedHat Linux installation floppy disk. I chose to install Linux so as not to boot from the hard drive, but rather to boot using a floppy. I did this for two reasons (1) I was not sure how well Windows ME and Linux would like each other as dual boot partners and (2) I have an 80 GB hard drive, and wasn't sure Linux would like booting from it. (comments welcome in both respects).
2. Once Red Hat Linux 7.0 was installed I got the OSS sound drivers (osslinux394e-univ.tar.gz) off of the web from www.opensound.com ; they are not free but made the installation pretty simple.
3. Then I downloaded svgalib-1.4.2-bin.tar.gz from www.svgalib.org .
4. Then I downloaded the netwide assembler NASM (nasm-0.98.tgz) from www.web-sites.co.uk/nasm .
5. Then I downloaded Leif's program dsp00-12.tgz from his website; you could also download the items in steps 2,3, and 4 immediately above from Leif's site as well at www.nitehawk.com/sm5bsz/linuxdsp/install/dsp.htm . He has an excellent set of instructions on how to proceed.
6. I pretty much followed the instructions on Leif's page as in step 5 above. I will list those steps here with my modifications.
1. copy osslinux394e-univ.tar.gz from the OSS website or uss22x.tgz from Leif's site to the directory where you want to install oss. I used /usr/lib/oss. Leif used /usr/oss. Go to whatever directory you just used.
2. type tar zxvf osslinux394e-univ.tar.gz
3. type ./oss-install and follow the instructions you should have printed out from the oss INSTALL file in the same directory.
4. copy nasm-0.98.tgz from the nasm website or Leif's page to the directory /usr
5. type tar zxvf nasm.tgz
6 type cd nasm-0.98
7. type ./configure
8. type make
9. type cp /usr/nasm-0.98/nasm /usr/bin
The next steps were necessary for me to have svgalib function, and were provided by Leif. Some may not need them.
10. type rm -f /usr/man/man5/svgalib*
11. type rm -f /usr/man/man7/svgalib*
12. type rm -f -r /usr/doc/svgalib-1.4.0*
13. type rm -f /etc/vga*
14. type rm -f /usr/man/man5/libvga.*
15. type rm -f /usr/i486-linux-libc/lib/libvga.*
16. copy svgalib-1.4.2.tgz from the nasm website to /usr/local/src and go there (cd /usr/local/src)
17. type tar zxvf svgalib-1.4.2.tgz
18. type cd svgalib-1.4.2
19. type mkdir /usr/local/include
20. cd /usr/local/src/svgalib-1.4.2/src/keyboard
21. edit (perhaps using emacs) keyboard.c and replace line 485 ( case SCANCODE_F1...SCANCODE_F10: ) with the following lines:
22. type cd /usr/local/src/svgalib-1.4.2
23. type make install
24. type ln /usr/local/lib/libvga.so.1.4.2 /usr/lib/libvga.so.1
if this gives you an error message change the destination to /usr/local/lib and then copy the results to /usr/lib directory
25. type ln /usr/local/lib/libvgagl.so.1.4.2 /usr/lib/libvgagl.so.1
if this gives you an error message change the destination to /usr/local/lib and then copy the results to /usr/lib directory
26. copy the file dsp00-12.tgz to the desired directory (I used /home/sm5bsz) and then go there
27. type tar zxvf dsp00-12.tgz
28. type cd dsp
29. Edit the sound.h file so that it knows where to find soundcard.h, and to select the proper soundcards. You must select the directory where you installed oss. I used /usr/lib/oss/soundcard.h rather than /lib/oss/soundcard.h. Leif already has sections written for Dslta44 and soundblaster, soundblaster only, etc and you just need to make sure the proper one is 'uncommented' by removing the /* and */ from it, edit it to give the proper soundcard.h location, and make sure the alternatives are commented out with the /* and */ marks.
30. type make
31. type /usr/lib/oss/soundon (or whatever directory you installed into /soundon)
32. type ./dsp
33. If the mouse doesn't work in dsp then you need to set its type by editing /etc/vga/libvga.config and setting the proper mousetype for your system. Again, the types are there...you just need to uncomment the one you want and make sure the rest are commented out. My system works with changing mousetype to 'mouse PS2'. It had been 'mouse IMPS2' till I changed it, and the default choice (a USB mouse) didn't work.
Below are the original instructions I gave for the Pentium Pro late last summer or thereabouts.
With the first machine I run a Pentium Pro 200 with a Sound Blaster AWE32. The machine was originally set up to dual boot with NT and Win95 so I can't boot Linux from a hard disk...if you try to do this when you have NT installed you will likely trash your hard disk and need to reformat, etc. I just boot from floppy when I want to run Linux. I will eventually get a separate machine for Linux. I have 1.5 GB HD space set aside for Linux (about right), 128 MB RAM (much more than I need, I think), Number Nine Virge S3 type video card, PS2 3 button mouse. I am running Red Hat Linux 6.2 and got the OSS sound drivers off of the web from www.opensound.com ; they are not free but made the installation pretty simple. I had never used Linux before and don't really know C but I was able to get going with the documents on the web from OSS and Red Hat (www.redhat.com). So its not too hard to do. Please note: if you have Windows NT on your system and you install Linux to boot from a hard disk you will have a disaster...do not do this. I believe you must do a CUSTOM install in order to choose the option of NOT installing LILO on the hard disk (the boot utility). To me, even if I could have set it up to boot from the hard disk, I likely would have taken this route...when I want to boot to Linux I boot from the Linux boot floppy. When I want to boot to Windows, I pop the floppy part way out of the drive before start-up.
The main notes I have from my experience at installing all of this are:
1. I used Partition Magic to set up the partition for Linux. There is a good section in "Red Hat Linux for Dummies" (I felt this book was just what I needed) that goes over the actual installation of Linux. I'd recommend getting this and reading it carefully. Also read the Installation Manual that comes with Red Hat Linux. I got the Standard Version of Red Hat Linux, for $29.95 list.
2. After you install Linux and are sure its working OK, you unzip Leif's DSP files and the OSS files using the Linux utility "tar", invoking the parameters zxvf. Exactly how to do this is detailed very nicely in the OSS installation file "INSTALL". The expanded OSS files from the OSS archive file which you can download from their website listed above have to go into the directory /tmp to be installed. I put Leif's files in /home/rrehr/sm5bsz. When tar expanded them it put them in a subdirectory /dsp, i.e., in /home/rrehr/sm5bsz/dsp. Tar, the C compiler, etc. are all in the RedHat Linux package. Install the development tools packages when you install Linux to get the C stuff. (I did a custom install so I could make sure I didn't overwrite the boot sector on my hard drive; I DID NOT install LILO!!!).
3. Install the OSS sound drivers and get them working before you compile Leif's program (see section '5' below).
4. I changed the parameters in the sound.h file for SND8 from /dev/dsp5 to /dev/dsp and for SND16 from /dev/dspW to dev/dsp1. I just used dsp and dsp1 because these were used in the stock linux text that was "commented out" in the sound.h file, and so they seemed like a good place to start...I don't know if other values would work or work better for my AWE 32.
5. I needed to change the location of "soundcard.h" referred to in "sound.h" to /usr/lib/oss/soundcard.h. as that is where the OSS install program put it. Once you've made that change to the file sound.h, make sure you're in whatever directory you have Leif's files in and type "make". This will use his "Makefile" to compile the program and produce the executable file "dsp". You run this from the command line in this directory (again, on my machine its /home/rrehr/sm5bsz/dsp) by typing "./dsp". This will bring up the menu screen of Leif's program.
6. To set up the mouse properly in his program ("T") you must have the mouse set up properly in linux. For a PC2 type mouse the type is 5. You set this in the /etc/vga/libvga.config file (see the set of directions for the new machine above if you want more detail). For mousespeed in Leif's program I found that 200 worked well. If you make the speed too small, then you will have difficulty using the mouse to change the graph parameters as its resolution will be insufficient. Next use "S" to set up the display parameters, and then to "U" to set the A/D and D/A parameters. I initially used stereo line input, 16 bits, and 22050 Hz for both input and output sampling rates. I have since changed the input sampling rate to 44100 Hz as I am using a 24 KHz IF filter so I can see about 22 KHz of spectrum (ideally the sampling rate should be at least 2 times the upper extreme of frequency to be sampled), and I just use 5000 as the output sampling rate. Then go to "F" to see if all is well. Then go to "A" and "B" etc. and play around. For best operation you need to calibrate the receiver with a pulser...see Leif's website for details.
Use the mouse and left-click to adjust the physical width, bandwidth, center frequency, baseline, and signal strength range of the waterfall and the spectral displays. Experiment to see how to do this. Some of the parameters are entered by clicking on the numerical values and entering them at the keyboard (number of averages, Waterfall zero, gain, etc). Left click on the spectral peak of interest and it will appear in the zoomed spectrum below the main spectrum. The physical width, bandwidth, etc. of this zoomed spectrum are changed using the mouse, as with the main spectral display.
Let me know if you need help or if there are more details of interest that I neglected...
Below are some additional, miscellaneous details:
You can create .gif files of the screen by just typing "g" and following the instructions.
Read the files settings.txt and mouse_on_graph.txt in the dsp directory to see how to control things once you have the program running.
But anyway, RIGHT NOW (January 7, 2001; version dsp00-06) the spectral display is the best there is that I've seen in terms of its on-screen adjustability, although I don't have it all figured out yet.
GOOD SHOW, Leif!!
Brought to you by the folks at W3SZ