|
Index of /projects/gnuradio/mdvh/videocard_rf_output
|
Name Last modified Size Description
Parent Directory 25-May-2009 13:34 -
ih98-tempest.pdf 22-Nov-2004 00:58 466k
readme.both 22-Nov-2004 01:35 16k
readme.fm 22-Nov-2004 01:35 10k
readme.orig 22-Nov-2004 01:35 16k
tempest_for_eliza-1.0.5.tar.gz 22-Nov-2004 00:58 44k
tempest_for_eliza-1.0.6.tar.gz 22-Nov-2004 01:34 88k
xvidtune_output.txt 22-Nov-2004 00:58 1k
Tempest For Eliza
(c) 2001 by Erik Thiele
fm player (c) 2004 by Martin DvH
This program uses the GPL license. see the file
COPYING for details. a very important passage will be pasted here, too.:
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
The FM player in tempest for eliza 1.0.6 is an addition to the AM player found in the original tempest-for-eliza-1.05
Tempest for MP3 FM
---------------
This is a program to generate FM radiosignals using your videocard and monitor.
See README.orig for a generic description about the concept
The first steps are the same as for the original Tempest for MP3 (The AM player, which is also included in this release)
get your favourite mp3 file to the current directory. let's call it
'foobar.mp3'. make sure you have "amp" and "sox" installed. you must
use X11 with 8 bits colordepth. use the old -bpp 8 option to your
xserver or the new -fbbpp 8 option if you have a newer Xserver.
You also need to be root because this player uses dga and dga needs root access.
run xvidtune and read the parameters from the screen or run
xvidtune -show to read the parameters in one line
>xvidtune -show
"1024x768" 78.80 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
name pixel-clock resx htotal resy vtotal
We also need to find out what the correct sampling rate will
be. therefore start:
./tempest_for_mp3_fm 78800000 1024 768 1312 800 10200000 0 1 notexist.raw
pixel-clock resx resy vtotal htotal radiofrequency playmode amplification (dummy)filename
Note that the notexist.raw file does not exist. we just want to
see the output of the program, play no music yet.
it will display:
"audio file frequency should be 60060.975610 Hz"
now take this value and convert your mp3 like this:
./mksong.sh 60060 foobar.mp3 cool.raw
you can now listen to it with this command:
./tempest_for_mp3_fm 78800000 1024 768 1312 800 10200000 0 1 cool.raw
notice the radio frequency of 10200000 Hz (10.2 MHz).
This means it will transmit at 10.2 MHz but because the signal is sampled at the pixelclockrate of 78.8 Mhz it will also tranmit a small signal
at 78.8 +10.2 MHz and 78.8 -10.2 Mhz.
78.8 +10.2 happens to be 88.0 MHz The lowest frequency your FM radio can receive.
The main signal at 10.2 MHz will be the strongest.
If you want to receive the original signal you have to change 10.2 to 88.0 MHz
This only works well if your pixelclock is more the twice that. This means more then 172.0 MHz.
so if your pixelclock is greater then 172.0 MHz
radio-frequency=wanted frequency
if pixelclock less then 172.0 MHz but higher then 108.0
radio-frequency=pixelclock - wanted-frequency
if pixelclock less then 108.0
radio-frequency=wanted-frequency - pixelclock
Most videocards can use very high pixelclocks but not all monitors do.
Higher pixelclock means higher horizontal and vertical refreshrates.
I put two special modeline in my XFree86Config-4 in the monitor section
and increased the maximum HorizSync from 86 to 98, just about as much as my monitor can handle.
The first special modeline "2048x1280tempest" is a modified version of the output of xvidtune -show
I used the largest horizontal resolution my displaycard could handle
I increased the pixelclock to 180.0 to get above the 172.0 limit
I also made VDisplay VSyncstart VSyncEnd and VTotal as close to eachother as possible as the driver would accept
Betweeen VDisplay and VTotal no signal will be sent so the longer this time is the more distortion and noise you get.
The same goes for HDisplay HSynStart HSyncEnd and HTotal although this is less critical.
Ideally I would want VDisplay=VSyncstart=VSyncEnd=VTotal=1280 but I would have to hack the XFree driver to accept that.
Pay attention, your monitor will not like these settings. I even had to switch of my monitor during the (re)start of X otherwise the dcc logic in the driver would recognise that my monitor officially cannot handle these settings.
I also added a less stressfull but still optimized modeline "1024x768tempest"
The only thing I did here is change the VTotal setting from 800 to 772.
This is not as stressfull for the monitor although it is not good for normal use because the top lines of you screen will be all over the screen because they are displayed during the vertical retrace.
In this mode the distortion and noise is also low but I can't use direct frequencies in the FM band and must use the setfrequency=wantedfrequency-pixelclock trick
Section "Monitor"
Identifier "Generic Monitor"
#original for my monitor: HorizSync 30-86
HorizSync 30-98
VertRefresh 50-150
ModeLine "2048x1280tempest" 180.0 2048 2056 2084 2092 1280 1281 1282 1283 -hsync +vsync
#default modeline for 1024x768: ModeLine "1024x768" 78.80 1024 1040 1136 1312 768 769 772 800 +hsync +vsync
ModeLine "1024x768tempest" 78.80 1024 1040 1136 1312 768 769 772 773 +hsync +vsync
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "Generic Monitor"
DefaultDepth 8
SubSection "Display"
Depth 8
Modes "1024x768tempest" "2048x1280tempest" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
If you want to use high pixelclocks but your monitor can't take it you can also play with your monitor off.
I could only receive this way if I held the antenna of my FM radio right to the connector of my displaycard.
I could make the signal much much much stronger when I connected a loose vga cable to my displaycard and connected a
loose end of electrical wire of approximate 75 centimeters to pin 1
(see http://www.bbdsoft.com/video.html for vga connector pinout)
This loose peace of wire acts as an antenna.
In this mode I could still receive the signal a block away from my home.
This however defeates the original goal of the project. NO HARDWARE MODIFICATIONS, proof your monitor is your transmitter.
Playmode:
playmode =0 is the normal setting
if playmode >0 then a testtone of requested frequency will be played in stead of the songs
./tempest_for_mp3_fm 78800000 1024 768 1312 800 9700000 1000 1 nonexist.raw
will play a 1000 Hz tone at 78.8+9.7=87.5Mhz
The playmode means something completely differen here then in the tempest for MP3 AM player
Future plans for tempest for mp3 FM.
I modified this project because I needed a FM testsignal generator with a wide frequency range.
I can use this to test the software defined radios I am building with gnuradio.
Well, it is not a perfect testsignal generator but usable and cheaper as building/buying one.
I am planning to try to hack the xfree driver for my card to try to trick the hardware in not leaving any gaps in the signal during horizontal or vertical retrace.
Maybe I also build a stereo version of the transmitter. This only needs to be a converter which generates a fmstereo encoded raw file from the mp3 or wav file.
I also have not yet incorperated the 75usec preemphasis which is required of a correctly encoded broadcast FM signal (This is just a high pass filter)
I am also planning to build a gnuradio module build on this code as a general high speed DAC (general output sink)
and as a special FM and/or AM output sink.
Related projects:
gnuradio
related projects from Martin Dvh:
gnuradio high-speed input DAC module using a bt878 capture card video input
gnuradio project to make the tuner of a bt8x8 card usable as generic broadband tuner.
(This project is not finished and needs (hopefully small) hardware modifications )
modified bttv driver to capture in raw mode with less gaps in vertical sync
modified btaudio driver to use higher sample frequency and 6dB higher input sensitivity
bttv settings app/lib to set testmode (no sync) and pll frequency
High ,settable and stable gain setting for bt8x8 ADC (This needs settable external ADC reference voltage for bt8x8 (No AGC, use exact stable setting). This is a hardware and software modification.
Credits
-------
The original idea is from Pekka Riikonen. (see file AUTHORS)
he wrote the program
tempest-AM-0.9. Erik Thiele used a simplification of his routines
to create the AM signal.
MDVH (Martin Dvh) wrote tempest for mp3 FM, based on the original idea but used a different approach.