Sysop Registry


FlexNet application documentation
TFEMU - TFPC/DRSI compatibility module


    TheFirmware emulator for PC/FlexNet.

    This TF-Emulator allows existing terminal-programs, written for the WA8DED/ TheFirmware command set to be used with PC/FlexNet. These programs include GP, SP, TheBox, DX-Cluster and others.

    TFEMU may be loaded 4 times maximum. Since PC/FlexNet only accepts one program with a given name, TFEMU must first be duplicated, for example with "COPY TFEMU.EXE TFEMU2.EXE". The different TFEMU recognize their mutual existence and automatically dispatch incoming connects among them, so the different TFEMU may run under the same mycall&SSID. The streams of the first loaded TFEMU are filled with incoming connects first, up to the maximum specified with ESC Y, then those of the second TFEMU and so on. If all streams with a given mycall in all TFEMU's are filled, then a CONNECT REQUEST message is generated. It is however unpredictable on which TFEMU this message is output.

Command line parameters:

    tfemu [-i=<int>]

    -h, -? description of the parameters
    -i interrupt nummer (default 0xfd)
    -dr use DRSI interrupt format (TNCTSR-compatible (hopefully)) instead of TFPC(N5NX) format and output port numbers in DRSI format (at link state messages and monitor headers)
    -dx use DRSI interrupt format, and output port numbers in TFPCX format
    -dm use TFPC(N5NX) interrupt format, and output port numbers in TFPCX format. If none of the /d parameters is used, then a TFPC(N5NX) interrupt is installed and no port numbers are output
    -b buffer memory (min. 4kBytes, max. 48kBytes) in bytes
    -p Convert DRSI port numbers to FLEXNET format.
    -l lock out a call+SSID. This should help the sysops of a DX-Cluster which is directly connected to a RMNC. The RMNC likes to poll the DX-Cluster, which forces the Cluster sysop to put the digi callsign into the lockout list. This may be circumvented if the /l option is used. The cluster software then does not notice the RMNC polls. (the frames are displayed in the monitor, but no connect request link state message is generated)

    The driver may be unloaded either with FLEX /U (which unloads also the other PC/FlexNet components) or with KILLAPPL. The FlexNet channel parameters may either be set with ESC T and ESC @MODE or with the FlexNet utility FSET.EXE.

    Implemented TNC commands

    ESC A [0|1] Determines whether an LF is output after each CR (1) or not (0). Affects only the received data. Default: 1
    ESC C [path] * Connect a station. A connect command on channel 0 (monitor/UI) sets the path for UI packets. DRSI port numbers (for example 0:HB9W) are removed, since FlexNet knows where to go...
    ESC D * Disconnects a QSO.
    ESC E [0|1] Determines whether each input is copied to the output. This affects only the terminal mode. Default: 1
    ESC F * Outputs the FRACK (round trip time) value, if connected. Otherwise it outputs some fantasy value for compatibility reasons
    ESC G [0|1] Only in host mode. Polls the specified channel. If the channel 255 is polled, a list of channels with pending data or link state messages is returned (Extended host mode polling)
    ESC I [call] * Sets the source callsign (mycall)
    ESC JHOST[0|1] Switches the host mode on and off. The host mode is used by most packet radio programs
    ESC K[0|1|2] Switches the time stamps on and off. ESC K0 switches all time stamps off, ESC K1 switches the time stamps on for link state messages, and ESC K2 additionally time stamps monitor headers.
    ESC K HH:MM:SS Sets the TFEMU time. The accuracy of the TFEMU time depends on the accuracy of the FlexNet kernel clock.
    ESC K TT.MM.YY Sets the date (european format)
    ESC K MM/DD/YY Sets the date (american format)
    ESC L[n] * Displays the channel state. This command behaves differently in host mode.
    ESC M[UISC+-.] Switches the monitoring on/off. U monitors UI packets, I monitors information packets (connected) and S monitors super- visory packets (such as RR, RNR, REJ and so on). C enables monitoring while a connection is pending. N switches the monitoring off. C has no effect in host mode. In terminal mode, only packets with PID F0 are displayed. With + and - channels may be specified. - suppresses the following channels, and + monitors the specified channels exclusively. ESC UISC-10 for example monitors all packets on all channels except for channel 10.
    ESC N Maximum number of retries. Returns always 10 (for compatibility)
    ESC O * Returns the MAXFRAME value of the stream (if connected)
    ESC P [port] Returns the p-persistence value (256/number of users)
    ESC QRES Resets the software. The default parameters are set
    ESC S[n] * Displays or sets the active stream (terminal mode only)
    ESC T [ch:]txd Sets the TX delay on flexnet channel ch (0..15) to txd*10ms
    ESC V Displays a string with the program version
    ESC U num text Sets the unattended mode and the text to be sent. If num = 1, then the text is sent to all incoming connections
    ESC Y num maximum number of incoming connects
    ESC @B Returns the amount of free memory
    ESC @CAL ch min Enables calibration mode on channel ch for min minutes. min=0 disables calibration prematurely. In calibration mode, In calibration mode, zeroes and ones are sent alternatingly.
    ESC @L1ST [po] Returns the L1 statistics of the specified port PO=port,ID=driver identification,TXF=TxFrames,RxF=RxFrames, TE=TxErrors,RE=RxErrors,RBE=RxBufferOverruns,IOE=IOErrors
    ESC @L2ST [po] Returns the L2 statistics of the specified port PO=port,TD=TxDelay,QSO=number of QSOs,USR=number of stations on the QRG,TIFR=transmitted info frames,RIFR=received info frames,TKBY=transmitted kilobytes,RKBY=received kilobytes, QTY=quality (in %) The values correspond to those in the FlexNet infobox statistics
    ESC @MODE ... Sets the channel mode. The format is compatible to the infobox mode command.
    ESC @PO Sets the port enable for incoming connects. Every stream can individually accept connects from every port ('*'), reject all connects ('-'), or only accept connects from the port specified by a single hexadecimal digit ('0' to '9' and 'A' to 'F'). Example: ESC @PO *-1 means that stream 1 accepts all incoming connects, stream 2 rejects any connect, and stream 3 accepts only connects from port 1. If TFEMU runs on FLEXDIGI, this command does not make much sense, since every connect then comes from the coupling channel 16.
    ESC @PERM * Specifies the port connect mask for the current stream. This command expects a bitmask which specifies for every port if connects should be accepted ('1') or not ('0').
    ESC @S[n] * Displays the stream connection state
    ESC @U[0|1] Specifies whether the poll flag should be set in UI packets
    ESC @WDOG[n] Displays or sets the watchdog. 0 turns the watchdog off. 5..60 sets it to the specified number of minutes. The application is then required to send at least one command, data or a line to TFEMU, otherwise the PC will boot. This feature could be useful for unattended stations, such as BBS, Cluster and so on.

    *: This parameter may be set individually on each stream

    Now incoming connections are taken also if TFEMU is in background (i.e. no Terminal program is running). This works if there is enough free memory and the foreground application behaves cooperatively enough. (not exhaustively tested)

Differences to the Original-Firmware

(as far as they are known...)

  • Frame reject link state messages are not followed by the three reason bytes, because PCF does not indicate them
  • The commands F (Frack) N (max. number of retries) O (MAXFRAME) P (PPersistence)do not set these parameters. For the monitor channel, they return some random number - Some less important firmware commands are not implemented
  • Monitor: AX25 packets with an invalid control byte are displayed as ?? instead of ?xxH, where xx would be the hex representation of the control byte

Interrupt formats

TFPC(N5NX) interrupt

    The TFPC interrupt may be recognized at the string "N5NX" three bytes after the address where the vector points to. The string is not terminated with a zero byte!

    Following functions are available:


      Return if a character is available AX=0: No character available AX=1: Character available


      Read a character. The character is returned in AL. Should only be called if AH=1 returned AX=1!


      Write character in AL to TFEMU

DRSI interrupt

The DRSI interrupt may be recognized with the following bytes: 0x53 0x1e 0xbb 0x?? 0x?? 0x8e 0xdb 0x84 0xe4 0x74 0x20

Following functions are available:

    AH=0 AH=0: No Character available AH=1: Character available, which is returned in AL
    AH=1 Write character in AL to TFEMU Returns AH=0

Special routines

    These routines are specific to TFPCX, but nevertheless they are needed by some application programmes (see TERM below) These routines are available at both interrupts

    AH=0xfb Returns: AL=Highest active port number+1; AH=Number of streams
    AH=0xfc Returns: AL=Bit mask of the ports with active DCD (p.Ex. if(_AL&1) printf("Channel 0 has an active DCD"); ); AH=Bit mask of the ports with active PTT
    AH=0xfd Returns: AX=0 TFEMU is busy, nothing should be sent; AX=1 TFEMU is not busy
    AH=0xfe Returns: AH=2 Major version number (TFEMU emulates TFPCX v2.10); AL=10 Minor version number

    The following should be checked

  • Is the format of the link state messages and the monitor headers really correct
  • Do other programs also work, except the ones mentioned below, especially DRSI programs
  • Is the output of the commands correct (except for some common sense restrictions)

(Incomplete) success list

    TFPCT.COM v2.10 written by OE1HHC and OE3GMW

    This is a simple terminal program, written by the TFKISS authors, which uses the TFPC(N5NX) Interrupt. No anomalies known.

    Reports by HB9JNX@HB9W

    GP.EXE (Graphic Packet) v1.61 written by DH1DAE

    This is a host mode terminal program with graphical user interface (DOS) with many features. It works with an without the -d options. Needs a lot of DOS memory so EMM386 is most likely necessary. Uses the extended host mode. No anomalies known.


    THS.EXE v2.50 written by HB9CVV

    This is a menu driven DOS DRSI hostmode program. It exists quite a long time. It works with the -dr option. No anomalies known.

    Reports by HB9JNX@HB9W

    TERM.EXE v10.36 written by DL5FBD, Gerd-Michael Ritter

    Simple DOS terminal program, which is written in Turbo Pascal and whose source code is available (including a serial interface library that supports "standard" serial interfaces and the TFPC(N5NX) interrupt). Works now since TFEMU supports the special function 0xfd (transmitter handshake). TERM uses this function which is otherwise only supported by TFPCX without testing if this function really exists. (TERM would have to ask for the TFPCX version and if the returned value makes sense (it is neither 0, 0xffff, nor 0xfdxx), it may use these functions)

    Reports by HB9JNX@HB9W, thanks to DG9FDL@DB0SRS, Michael for his hint

    SP.EXE Demoversion 9.00 written by Sigi Kluger DL1MEN (commercial)

    Works as far as I may judge it. SP uses the ESC @B command for the transmitter flow control, therefore TFEMU must(!!) have enough buffer memory, at least 16kByte, -b0x4000! This should solve the problem with sending files

    Reports by HB9JNX@HB9W, thanks to DG9FDL@DB0SRS, Michael for his hint

    TOP.EXE v1.47 written by DF8MT

    A superficial test did not show any problems...

    Reports by HB9JNX@HB9W, thanks to DG9FDL@DB0SRS, Michael for his hint

    THEBOX v1.9a written by DF3AV et al

    TheBox may be started. Warning: TheBox does not test if a firmware emulator is loaded or not - and crashes if not... TFEMU must be started with -i0xfe! Furthermore, TheBox uses the ESC @B command for the transmitter flow control. Therefore, TFEMU must have enough buffer memory, at least 16kByte (-b0x4000)! Otherwise, it seems to work (as far as I can judge it...)

    Reports by HB9JNX@HB9W

    AA4RE BBS v2.9 written by AA4RE

    This mailbox also doesn't test if a WA8DED emulator is loaded! (This seems to be a mailbox "feature"). Otherwise it works, just configure it as described for DRSI's PC*PA adapter, start TFEMU with -dr -i0xff (the com number then also has to be 255!)

    Reports by HB9JNX@HB9W

    PacketCluster v5.4-4 written by Pavillion Software (commercial)

    Install as described for DRSI's PC*PA-Adapter. First tests were immediately successful, more thorough tests will follow. cf /L option. Example: the DX-Cluster HB9W-8 is connected to the RMNC HB9W 9-10. TFEMU should be started with: TFEMU -DR -I=0xff -L=HB9W-9

    Reports by HB9JNX@HB9W

    FBB 5.15c written by F6FBB

    load-high FLEXNET.EXE, KISS.EXE, and TFEMU.EXE in your autoexec.bat. TFEMU doesn't need any parameters, except a larger buffer size if you have an overloaded BBS.

    Concerning FBB, simply validate interface 5 on PORT.SYS (interface previously) used with TFPCX/TFPCR. All INITTNCx.SYS, MAINTx.SYS, and BEACONx.SYS should then use TFEMU commands (explained in this DOC file) : don't mention TxDelay, Persist, etc... :-)

    All tests have been done with FBB 5.15c linked to a FlexNet digipeater on a 9k6 full duplex kiss wire link.

    To know more, contact F5PJE @ F6BIG or F1UNA @ F5KPO. Report courtesy by Eric F5PJE

Unsuccessful programs

    TNCTERM.EXE (supplied with the DRSI driver)

    This is a very simple terminal program. It does not work. It does not recognize the TFEMU interrupt. Does not work also with other WA8DED emulators, such as G8BPQ DED Emulator

    Reports by HB9JNX@HB9W

page created by Thomas Sailer <sailer@ife.ee.ethz.ch>
last updated: 05.04.97

pages created by Gerald Schreiber, dl9fck, last updated: March 2001