Program to use a YAESU FRG 9600 scanner with the computer interface.
Program version 2.7

Copyright 1995-96-97-98-99 Bernardo Rossi
Email brossi@geocities.com

==========================================================================
ATTENTION: Important notice, if you get a message 'Input past end of file'
when starting the program: your old version of FRG.INI has to be modified
according to the included example, since a new entry has been added. In 
this case it is also recommended to delete your old FRG.SAV file.
===========================================================================

The correct functioning of the program is not guaranteed.

No responsibility will be recognized in case of damages, defects, malfunctions
or other, on the computer, interface, scanner or whatever you are using.

Listening and disclosing of certain frequencies may be illegal, and could be
punished by law. It is your responsibility to check the according laws in
your country.

This program can be freely distributed. If you like it, a thank you would be
appreciated at the above email address.

This program must be distributed with all files listed below. They are not to
be changed in any way, excluded the .INI, .SET and station file. No money may
be charged for the program, except for the cost of the disk.

If the file FRG.EXE is changed, it will not work anymore. These changes can be
caused by virus, tampering, checksums of antivirus programs, compressor like
pklite, etc.

Comments and suggestions are also welcome, as well as gifts and donations of
any kind. I cannot guarantee upgrades or assistance, but who knows...

The program contains the following files:
-----------------------------------------
FRG.EXE         The executable
FRG.INI         Configuration file for the program
FRG-ITA.TXT     Instructions in Italian
FRG-ENG.TXT     Instructions in English
FRG-DEU.TXT    Instructions in German
FRG.SET         Alternative setups for the scanning limits
STATION.VHF     Example of stored frequencies
BRUN45.EXE      Runtime for QuickBasic 4.5, (c) Microsoft
FILE-ID.DIZ     Description of the program
WHATSNEW.FRG    Changes during the various releases
FRG.SAV         This is created by the program, contains various settings

Required tools:
---------------
IBM compatible computer, works well on a 386-25, and above
Graphic card VGA color, resolution 640 x 480
Scanner Yaesu FRG-9600
Interface to connect them together. I have put this inside of the FRG for ease
 of use.
Enough knowledge to make all this work :-)


FRG.INI
-------

It has to be modified according to your needs. The necessary data is:

1) The COM port you are using.  COM port can be 1 or 2
2) The hex address of the above COM port. If this value =0, the standard values
   are assumed, COM1=&H3F8 and COM2=&H2F8. If your COM port has a nonstandard
   address, insert it here. If this address is wrong, the recognition of busy
   frequencies will not work.
3) The name of the data file where to store the frequencies.
4) The frequency on which to start the FRG.
5) The mode on which to start the FRG.
6) The lower limit of the frequency band.
7) The upper limit of the frequency band.
8) The scanning step.
9) Sounds enabled: soundon. Sounds disabled: soundoff.
10) A command to run when shelling to dos, e.g. useful if you want to run
    an editor, when you want to take some notes.
11) Busy pause, when a station is found.
12) Scanning pause.
13) The Priority-Frequency
14) The time interval in which the priority-frequency is scanned
15) The type of S-Meter Interface: joy (using Joystick-Port), minix
    (in case you have a Minix-Interface), none (no S-Meter Interface)


The items 4 5 6 7 8 11 12 13 are the initial data, when the program is run. 
They can be freely changed during its execution.

Example of configuration file:

2                 Comport 2
&H2F8             Address of comport 2f8 Hex
station.vhf       File where to store frequencies
1630000           Starting frequency: 163.000.000 hz
FM-N              Starting mode
600000            Lower limit:  60.000.000  hz
9050000           Upper limit: 905.000.000 hz
250               Starting step:    25.000  hz
soundon           Make beeping sounds
edit notes        Command which will be run when shelling to dos
200               Pause, when a station has been found while scanning
0                 Pause between scanning steps
1436250           Priority frequency: 143.625.000 Hz
300               Time interval, ion which the priority-frequency is scanned
joy               Using the joystick-interface as S-Meter

-----------------------------------------------------------------------------

File where to store frequencies
-------------------------------
The file where frequencies will be stored can have any name, as long as
it is specified in FRG.INI

A typical entry in this file may be:

1002000,"FM RADIO","FM-W"," radio ABC"

The above data means:
Frequency - Group - Mode - Name
If you edit the file manually, take care that the commas (,) are at the
right places and the frequencies be in ascending order. The Name must be
preceded by a space or a *. In this case the frequency will be skipped.

As last entry insert
9050000,"END","FM-N"," "

the frequency must be the maximum allowed by the FRG

-----------------------------------------------------------------------------

FRG.SET

You can store scanning limits you often use. With Alt-F4 and then the
desired letter they can be recalled. This file can be modified with any
text editor.

A typical entry may be:

1180000,1360000,500,AM-W,Air Traffic

The data means:
Lower limit - upper limit - step - mode - description

-----------------------------------------------------------------------------

All important data appears in one screen. It resembles somewhat the FRG
9600 front. Pressing the function key (example F1), alt-function key
(example AF1), control-function key (example CF8) or by clicking on the 
buttons with the mouse you will activate the desired function.

----------------------------------------------------------------------------

S-Meter display: When using the right interface, this displays the signal
strength.
If the item in FRG.INI is 'joy', the signal will be read through the
Joystick-Port, using the published interface.
If the item in FRG.INI is 'minix', the signal will be read through the
Minix-interface.
If the item in FRG.INI is 'none', no signal strength will be displayed,
but only the squelch-status.

To calibrate the S-Meter, as a first thing after running the program you have
to tune the FRG first to a frequency with no signal, then to a frequency with
maximum signal. This can be done easily by tuning to a strong FM Broadcast
station, then turning to LSB or USB.

This S-Meter display is still in an experimental stage, I would like to hear
any comments about how it works for you.  

------------------------------------------------------------------------------

On the lower part of the screen you see the spectrum-analyzer.
The frequency band, according to the lower and upper limits, is divided into
4 rows, whose starting frequencies are on the left side of the analyzer.
Scanned frequencies have a white dot.
Found busy frequencies have also a yellow dot.
The actual frequency has a larger white dot.
By clicking on a place of the analyzer you can recall the frequency, according
to the position of the mouse pointer.

------------------------------------------------------------------------------

Arrow up - arrow down on the keyboard: changes the frequency up or down.  You
can also click on the arrow buttons with the mouse.
Single arrow: one step at a time, double arrow: continuously.

F1: FREQUENCY: it must be between the lower and upper limits. The
frequency van be modified by pressing F1. The last 2 digits do NOT have
to be introduced, they will be always 0, like in the FRG.

F2: STEP: Can be freely modified. Last 2 digits like above.

F3: MODE: switches between LSB, USB, AM-N, AM-W, FM-N, FM-W

F4-F5: LIMIT HI e LO: Scanning will be between these limits. The limits
of the FRG itself can not be passed. The last 2 digits do NOT have to be
typed, they will always be 0.

F6: NAME: By pressing F6 you can store a frequency, by giving it a
descriptive name. The name will then appear in the display. This name can
also be freely modified.

F7: GROUP: A frequency can be assigned to a group.  This will be also
stored in the file.

F8 SAVE - CF8 LOAD: You can save all the momentary settings, which then
you can reload later. The settings will be saved in a file called FRG.SAV
Please don't mess around with this file, or you can get unpredictable 
results.

F9: LIST File: The file with the stored frequencies will be displayed.
To go to the next page press Arrow-Down or click on the bottom of the screen.
To go to the previous page press Arrow-Up or click on the top of the screen.
If you enter a letter or click on a frequency, this frequency will be
displayed on the FRG, as long as it is between the limits. With ESC you go
back to the main screen.

F10 or ESC: QUIT: I won't tell you what this is for :-))


Alt-F1: M CLEAR: The displayed frequency will be deleted from the file.
Has to be confirmed.

Alt-F2: SCAN on/off: Start and stop the automatic scanning.

Alt-F3: ADD AUT: When scanning automatically, busy frequencies will be
added automatically to the file. Useful when you are not there. The
frequency will have as Name the date and time it was scanned, as Group
it will have "SCANNED"

Alt-F4: SETUP: The file FRG.SET will be displayed. Pressing one of the
letters or clicking with the mouse,the corresponding data can be loaded, 
so a particular frequency range can be instantly set.

Alt-F5: SKIP: If a stored station is displayed, you can press *. In
this case this frequency will be totally ignored afterwards. Useful if
you want to skip frequencies which transmit only noise. If AF5 is on
OFF, this feature is turned off, if AF5 is on ON, skipping will be
enabled.
If the station was not stored before, you have to press * two times, and
the station will be stored with the name *SKIP. Pressing * again later
will erase this station from the file again.

Alt-F6: PAUSE SCAN: Pause between steps, when scanning automatically or
manually. Higher number means longer pauses.

Alt-F7: PAUSE BUSY: Length of the pause, when a busy frequency is
scanned. Higher number means longer pause.
If = 0 then scanning will stop
If = 1 then scanning will restart when frequency is no more busy, or when
any key is pressed.

Alt-F8: SHIFT: The shift value can be modified, to monitor repeaters etc.
By pressing '-' or '+' the shift value will be subtracted or added to
the displayed frequency.

Alt-F9: MODE SCAN: Scanning can be by Frequency, File or Group.

   Frequency: All the frequencies within the limits will be scanned,
   with the desired step. At the request press F1
   File: All the frequencies stored in the file will be scanned. At the
   request press F2
   Group: All the frequencies in a particular Group will be scanned.
   First you have to scan the file and display the desired group. Then
   at the request press F3

   File-Group: if within the limits there are no stored stations, you
   will hear an alarm and see the message: No stations found

Alt-F10: SHELL: Shell to dos and run the program specified in .INI

Ctrl-F1: To set a new priority-frequency

Ctrl-F2: To switch scanning of the priority-frequency on and off. It is scanned
         in fixed time intervals, according to the entry in FRG.INI. If it is
         busy, the scanner will switch to this frequency.

Ctrl-F10: This clears the spectrum analyzer



---------------------------------------------------------------------------

Error codes:

FREQUENCY OUT OF LIMITS: The frequency is not correct, out of limits

STEP or FREQUENCY NOT CORRECT: The input is not correct

NOTHING SAVED: Station cannot be deleted, because it was not saved previously

ONLY F1 F2 F3: Only these keys are allowed

WRONG KEY PRESSED: You pressed a key which was not allowed

NO STATIONS FOUND: No stations are saved within the active limits

NO SETTINGS SAVED: You are trying to load the settings, but they have not been
saved previously

NOT WHEN SCANNING GROUP: You cannot enable SKIP while scanning GROUP, and when
a station with '*' is displayed

NO GROUP DISPLAYED: You can only scan GROUP when you first recall a station
from the file
