
                                 R G T E R M
                     A BBS Terminal Emulator for Windows

                        User Guide & Command Reference


==============================================================================
1. INTRODUCTION
==============================================================================

RGTERM is a Windows terminal emulator built specifically for dialing bulletin
board systems (BBSes) and other dial-up-style hosts over modern transports. It
reproduces the look and feel of the classic DOS/Windows terminal programs of
the BBS era - Telix, Qmodem, Terminate - while connecting over Telnet, SSH,
TelnetS (TLS), RLogin, a raw TCP socket, or a local shell, instead of a real
modem.

RGTERM understands several different display protocols a BBS or door might
speak, not just plain ANSI:

  - ANSI-BBS - the standard CP437/ANSI-art terminal most modern BBSes use

  - RIPscrip - vector-graphics BBS menus (with SkyPix, an Amiga graphics
    dialect that rides on the same wire protocol)

  - PETSCII - Commodore 64/128 character graphics

  - ATASCII - Atari 8-bit character graphics

  - Viewdata/Prestel and BBC Micro Mode 7 - the British teletext standard
    (same underlying SAA5050 codes, different screen geometry)

  - VT52 (Atari ST dialect) - the ST's own GEM console control codes

  - Atari ST IGS - the ST's "Instant Graphics and Sound" vector graphics,
    with animation and sound (Section 10)

  - Avatar - a minimal DOS-BBS control-code scheme

  - Plain ASCII - no color, no cursor addressing, for the dumbest possible
    terminal

On top of text display, RGTERM can also show inline bitmap graphics a BBS
sends - Sixel, the iTerm2 inline-image protocol (OSC 1337) and SyncTERM's
JPEG XL / PPM still images (see "JXL photos" below) - play ANSI
music, decode SyncTERM-style "APC audio" sound effects from door games, auto-
answer IEMSI login banners, and simulate a slower modem connection (with a
full fake "dialing" sequence) for anyone who wants the authentic wait.

JXL photos: BBS photo galleries written for SyncTERM send pictures (their
GIF/JPG/PNG files, converted) as JPEG XL through SyncTERM's "APC" graphics
commands - DrawJXL / DrawJXLBlob, plus DrawPPM / DrawPPMBlob for plain PPM.
RGTERM draws those as still images, the same way it draws Sixel. JPEG XL
needs libjxl: put jxl.dll and its companion DLLs (jxl_cms.dll,
brotlicommon.dll, brotlidec.dll, hwy.dll - from a libjxl Windows build) in
RGTERM's dll\ folder. Without them RGTERM tells the BBS it has no JXL, and a
gallery that also supports PPM or Sixel uses that instead. This is for
photos only: the screen-buffer "Load/Paste" commands video doors use are not
supported, and a rapid stream of images to the same spot (video sent as
separate pictures) is ignored. Only the first frame of an animated JXL is
shown.

It also speaks two door-specific protocols that ride on top of ANSI:

  - DDO-F/X LITE - the control-code language Locatha Industries' door games
    use to talk to their own LI-TERM F/X terminal (Section 8)

  - Operation Overkill ][ (OOII) - the proprietary art/sound protocol
    SyncTERM supports for that door, detected automatically from its logon
    banner. Its art and sound files live in an ooii\ folder inside your
    doors folder - the .conf File Location on Configuration page 3, or
    doors\ooii\ under RGTERM's folder if that's blank (an ooii\ folder
    directly under RGTERM's folder still works too)

File transfers are handled with Zmodem (8K blocks with an automatic 1K
fallback, resume in both directions, and automatically skipping a file that
already exists complete in your download folder - except during DDO-F/X
doors, which always overwrite) and Xmodem/Ymodem/Ymodem-G, plus
a simple ASCII line-paced upload for pasting in text a line at a time. Uploads
can also be started by simply dragging files from Explorer onto the RGTERM
window.

RGTERM can also run small scripts (RGScript) that log in and drive menus
or doors for you - written by hand, or recorded with Ctrl+O while you do
it yourself (Section 16).

This document covers every keyboard command, every phonebook field, every
Configuration setting, and - in the second half - how to wire an external SVGA
"door terminal" program (GTERM, GWTERM, PIT) into RGTERM so it can take over
rendering for a door that expects one of those, while RGTERM keeps the actual
BBS connection open underneath it.


==============================================================================
2. GETTING STARTED
==============================================================================

RGTERM opens with a short splash screen (about 2.5 seconds - any key skips
it), then the phonebook screen - a scrollable list of saved connections. Use
the arrow keys (or press a letter key to jump straight to the next entry
starting with that letter) to select one, then press Enter or double-click it
to connect. Press Ins to add a new entry, Alt+E to edit the selected one, or
Del to remove it.

Each phonebook entry stores everything needed to reconnect the same way every
time: host, port, protocol, terminal type, screen size, font, login
credentials, and a handful of per-connection display toggles (Sixel, ICE
colors, UTF-8, IEMSI, simulated baud rate). See Section 4 for the full field
reference.

Once connected, RGTERM behaves like an ordinary terminal window: everything
the BBS sends renders directly, and every local command is reached through an
Alt-key or Ctrl-key combination so it never collides with anything the remote
BBS or a door game might also want to read from the keyboard. "Doorway mode"
(Alt+W) exists specifically for the rare case where a DOS door game itself
uses Alt-combinations - while it's on, every local hotkey below is suppressed
and passed straight through to the remote instead.


* When the connection ends

A short "connection terminated" popup appears whenever a session ends, and
you stay in the terminal so you can still read whatever the BBS printed on
the way out (Alt+D takes you back to the phonebook).

After a call, the popup also shows a summary of the session:

  Online 00:42:17   In 1.8 MB   Out 12 KB   Files: 3 down, 1 up

  - Online      how long you were connected
  - In / Out    bytes received from and sent to the BBS (uploads count
                toward Out, downloads toward In)
  - Files       files downloaded and uploaded that finished OK (Zmodem,
                Xmodem, Ymodem). Left off when there were none.

With a summary, the popup stays up for 5 seconds instead of half a second.
Press any key to close it sooner - the key only closes the popup, it isn't
sent anywhere. If the connection never came up (a failed dial), there is
no summary and the popup is the short one as before.

If the connection is LOST - a network error or reset, not a normal logoff -
and you hadn't pressed a key in the last 3 seconds, RGTERM asks:

  Connection lost - Redial?  Y/N

Y reconnects to the same entry; N (or Esc) dismisses it. A normal logoff
from the BBS, or one that happens right after you pressed a key (logging off,
failing a bot check, being kicked by a door), never asks - those are treated
as deliberate.


* Importing another terminal's phonebook (Alt+I)

Alt+I on the phonebook screen opens RGTERM's file browser in RGTERM's own
folder, listing *.phn, *.lst, *.fon, *.toml, *.reg, *.ini and a plain
"phonebook" file. Highlight the file and press Enter; RGTERM works out the
format from the file's contents and adds its boards to the end of your
phonebook (then sorts it). Esc goes back.

  NetRunner       .phn
  SyncTERM        syncterm.lst
  mTelnet         .fon
  IcyTerm         phonebook.toml - normally in
                  %APPDATA%\GitHub\icy_term\config\
  Qodem           phonebook (no extension) - normally at ~/.qodem/ on the
                  Linux/BSD machine it's on; copy it over and import as-is
  MagiTerm        a bracket-per-board .ini dialing directory (best-effort -
                  only Name/Host/Port come across)
  PuTTY           a regedit .reg export of HKEY_CURRENT_USER\Software\
                  SimonTatham\PuTTY\Sessions - PuTTY itself has no
                  phonebook file, so export that registry key first
                  (regedit, right-click the Sessions key, Export...)

The quickest way to the IcyTerm file: press F5 in the browser and type

  %APPDATA%\GitHub\icy_term\config\phonebook.toml

and press Enter - the browser opens that folder with the file highlighted.

From IcyTerm entries RGTERM takes the name, host and port, protocol
(Telnet, Raw, SSH with its key file, RLogin and "RLogin swapped"), terminal
type (mapped to the matching RGTERM Term Type - PETSCII becomes C64,
Utf8Ansi becomes ANSI-BBS with UTF-8 on, AtariST with IGS becomes Atari ST
IGS, and so on), screen size, username, password, ICE colors, baud
emulation and the comment (into the entry's notes). WebSocket, modem and
serial boards are imported as plain Telnet with a note to check them.
IcyTerm's own auto-login strings use IcyTerm's syntax, so they're copied
into the notes for reference instead of being run.

From Qodem entries RGTERM takes name, host, port, username, password and
connection method (SSH with SHELL/COMMANDLINE mapped to RGTERM's own Shell
type, RLOGIN, SOCKET as Raw, anything else as Telnet); MODEM entries are
skipped entirely, since a phone number has no host/port to import as.
Emulation is mapped where there's an obvious match (AVATAR, XTERM/LINUX
variants with UTF-8 detected from the name, TTY/DEBUG as plain ASCII) and
otherwise imported as ANSI-BBS with a note.

From a PuTTY .reg export RGTERM takes the session name, host, port,
protocol (SSH with its key file, RLogin, Raw, Telnet), username and UTF-8
(from LineCodePage); PuTTY's own "Default Settings" template entry is
skipped, and Serial sessions import as plain Telnet with a note, same as
an unmapped IcyTerm/SyncTERM connection type.


* Phonebook backup reminder

Every 90 days RGTERM offers to back up your phonebook when it starts:

  PHONEBOOK BACKUP
  It's been 90+ days since your last backup.
  Back it up now?  Y/N

Y writes a dated copy of the phonebook next to RGTERM.exe - named like
rgterm_backup_20260925.ini (the status line shows the exact name). N or Esc
skips it and asks again in another 90 days.
A brand-new install is never asked on its first launch.


==============================================================================
3. COMPLETE COMMAND REFERENCE
==============================================================================

This is the same reference shown in-app via Alt+Z, reproduced here in full
together with a few additional commands (accessibility, About and quit) that
don't fit that screen's own two-column layout.


Navigation (Phonebook & Menus)
------------------------------

  Esc                 Back / cancel screen
  Up/Dn/Left/Right    Move lightbar / cursor
  PgUp / PgDn         Phonebook: jump 10 rows. Scrollback browsing (Alt+B):
                      back / forward one full screen. In a live session
                      they go to the BBS - see "Keys sent to the BBS"
  Home / End          Jump to top / bottom of the list


Keys sent to the BBS
--------------------

In a live session the cursor-pad keys are sent to the BBS as terminal codes:

  Key         ANSI-BBS boards          Renegade
  ---------   ----------------------   ---------------------
  PgUp        ESC [ V                  ESC [ r
  PgDn        ESC [ U                  ESC [ q
  Ins         ESC [ @                  ESC [ n
  Home        ESC [ H                  ESC [ H
  End         ESC [ K                  ESC [ K
  Del         DEL (ASCII 127)          DEL (ASCII 127)

ANSI-BBS is the default and is what Synchronet, Mystic, WWIV and Enigma
read as Page Up / Page Down / Insert. Renegade understands only its own
codes, so RGTERM watches the board's logon text for "The Renegade Bulletin
Board System" (or Renegade's IEMSI ID) and switches PgUp / PgDn / Ins to the
Renegade codes for the rest of that call. The next connection starts on the
ANSI-BBS set again. Until a Renegade banner has gone by, Renegade simply
ignores the ANSI-BBS codes, so nothing is lost.

F1 - F10 with no macro assigned send nothing; assign a macro on
Configuration page 2 (Section 5) to give a key a job.

While scrollback browsing is on (Alt+B), PgUp / PgDn / Home / End / the arrow
keys scroll your history instead and nothing is sent to the BBS.


Phonebook
---------

  Enter               Connect to the selected entry, or commit the current
                      field while editing
  Alt+E               Edit the selected entry
  Ins                 Add a new entry
  Del                 Delete the selected entry
  Alt+Up / Alt+Dn     Move the selected entry up/down in the list
  Alt+D               Open the dialing directory (phonebook) from a live
                      session
  Alt+Q               Quick dial - type a host[:port] directly without saving
                      an entry
  Alt+I               Import a phonebook file (NetRunner, SyncTERM, mTelnet
                      or IcyTerm format - see Section 2)
  Alt+C               Open the Configuration screen (Section 5)
  A-Z (a letter)      Jump to the next entry starting with that letter (press
                      again to cycle to the next match)


Session
-------

  Alt+H               Hang up the current connection
  Alt+L               Send this entry's saved Username and Password to the
                      BBS (a one-key login instead of typing them)
  Alt+B               Toggle scrollback browsing mode (the mouse wheel also
                      scrolls back)
  Alt+8               Toggle UTF-8 decoding on/off for this session
  Alt+W               Toggle doorway mode (suppresses every local hotkey below
                      except itself)
  Alt+G               Toggle session capture (writes a .ans + .log to your
                      Capture Directory)
  Alt+P               Save a screenshot (.png) of the current screen
  Alt+N               Save the current screen as a standalone .ans file
  Alt+V               Save the WHOLE scrollback plus the screen as .ans and
                      .txt (see "Scrollback, pausing and saving" below).
                      Shift+Alt+N does the same, and is the one to use with
                      screen-reader mode on (Alt+V then re-reads the screen)
  Scroll Lock         Pause / resume incoming BBS text (the Pause key does
                      the same) - see below
  Alt+M               ANSI music on/off (also DDO-F/X door music and
                      sound). Muting also stops a tune that's
                      playing right now. Same setting as "ANSI Music" on
                      Alt+C, and it's saved
  Alt+J               Shell to DOS - open an interactive cmd.exe prompt,
                      return to RGTERM on exit
  Alt+T               Copy the whole visible screen as plain text.
                      Ctrl+Shift+C does the same, and is the one to use with
                      screen-reader mode on (Alt+T then reads the current
                      line)
  F1 - F10            Send a saved macro string (edit these on Configuration
                      page 2 - see Section 5 for the escape codes)
  F12                 Cycle through the fonts in the fonts\ folder (does not
                      touch the F-key macros)
  Shift+F12           Switch font resolution: Upscaled (16x32, NetRunner-
                      style) or Standard (8x16 pixels doubled). Remembered
                      in rgterm_config.ini as UpscaledFont
  Alt+T               With screen-reader mode on: read the current line
  Ctrl+Right          Screen size up one step (1x-3x in 0.5 steps, then
                      Full Screen) - applied live and remembered
  Ctrl+Left           Screen size down one step
  Alt+V               With screen-reader mode on: re-read the whole visible
                      screen on demand
  Ctrl+Space          Screen reader: silence speech immediately
  Ctrl+F1 - Ctrl+F8   Launch the external door program configured in that slot
                      (see Section 11)


Scripts
-------

  Alt+O               Pick a script from the scripts\ folder and run it -
                      or, while one is running, stop it
  Ctrl+O              Start / stop the script recorder
  Shift+F1 - F10      Run the script assigned to that key (Configuration
                      page 4); press it again to stop that script

See Section 16. Ctrl+O is taken for the recorder, so it no longer sends ^O
to the BBS (in doorway mode it still does).


File Transfers
--------------

  Alt+U               Start a Zmodem upload (browse and pick one or more
                      files). Opens by itself when the BBS starts a Zmodem
                      upload and nothing is queued yet
  Alt+A               Start a plain-text ASCII line upload
  Alt+Y               Start an Xmodem/Ymodem download (protocol auto-detected)
  Alt+K               Start an Xmodem/Ymodem upload (choose the protocol)
  Drag & drop         Drop one or more files from Explorer onto the window to
                      start an immediate Zmodem upload (requires a live
                      connection)

Zmodem DOWNLOADS need no key at all - they start automatically the moment
the BBS begins sending. See Section 7.


Window & Application
--------------------

  Alt+Enter           Toggle fullscreen (see also Screen Scale, Section 6)
  Alt+R               Toggle screen-reader-friendly mode on/off
  Alt+F               Screen-reader mode: announce prompts only (Ctrl+Alt+R
                      also works)
  Alt+S               Toggle the persistent status bar
  F11                 Switch between your custom phonebook and the downloaded
                      Telnet BBS Guide list
  Ctrl+F11            Download/refresh the Telnet BBS Guide list
  Alt+Z               Show the help screen
  Alt+=               About RGTERM (version/credits; any key closes it -
                      also reachable from the Alt+Z screen's footer)
  Alt+X               Quit RGTERM


Clipboard
---------

  Ctrl+C              Copy the current selection
  Ctrl+V              Paste the clipboard into the session
  Right-click         Paste the clipboard (into the session, or into the
                      field being edited on the Edit/Configuration screens)


Mouse
-----

  Left-drag           Select text on the terminal screen. Letting go of the
                      button copies the selection to the clipboard right
                      away - a short "copied" message shows in the bottom
                      status row
  Click a URL         Plays the link as an audio stream - for the music
                      links some BBSes and doors post (click again to stop)
  Ctrl+click a URL    Opens the link in your web browser
  Double-click        Connect (phonebook), flip a Yes/No field (Edit and
                      Configuration screens), open page 2/3 from their links
                      on Configuration page 1
  Mouse wheel         Scroll back through the session history
  Drag window edge    Resize freely - RGTERM snaps it to the correct shape
                      when you let go (Section 6)

Mouse in doors: when a door turns on mouse reporting (some modern doors
and menus do), clicks, right/middle clicks and the wheel go to the door
instead of doing the local actions above - the same modes SyncTERM has:

  ESC[?9h      Clicks only (old X10 style) - button presses, no releases
  ESC[?1000h   Presses and releases
  ESC[?1002h   Presses, releases, and movement while a button is held
  ESC[?1003h   Presses, releases, and all movement
  ESC[?1006h   Send them in the newer SGR format (ESC[<b;x;yM) instead of
               the classic ESC[M format - needed past column/row 223

Ctrl and Alt held during a click are passed along to the door. Movement is
only sent when the pointer moves onto a different character cell, so a
door isn't flooded with reports.

Hold Shift to use the mouse for RGTERM instead while a door has mouse
reporting on: Shift+drag selects and copies text, Shift+right-click
pastes, and Shift+wheel scrolls back. None of that goes to the door.

Mouse reporting always switches off when you hang up.


Scrollback, pausing and saving
------------------------------

  Scroll Lock (or Pause) holds everything the BBS sends and keeps it off the
  screen - handy for reading a fast bulletin. Nothing is lost: it keeps
  arriving and waiting. The bottom row shows

    PAUSED - 12,345 bytes waiting - Scroll Lock to resume

  Press Scroll Lock again and the waiting text plays out (at the entry's
  simulated baud rate, if it has one). You can still type while paused, and
  Alt+B scrollback still works. Pausing isn't allowed during a file
  transfer (the protocol would time out); a hangup ends the pause; and if
  16 MB piles up it resumes by itself.

  Alt+B browses the scrollback (the last 2,000 lines). Its bottom row reads

    SCROLLBACK 12/340  PgUp/PgDn/Home: browse  S: save to file  End/Esc: live

  S (or Alt+V at any time) saves everything that scrolled by plus the
  current screen as two files, named <host>-scrollback-<date and time>, in
  the Capture Directory (Download Directory if that's blank):

    .ans   the colors kept, CP437 + ANSI codes, like Alt+N
    .txt   plain text in UTF-8, so Notepad shows box-drawing characters
           correctly

  Blank lines at the start and end and trailing spaces are left out.


File browser
------------

The file picker used by Alt+U, Alt+A, Alt+K, Alt+O and Alt+I:

  Up/Dn, PgUp/PgDn    Move
  Enter               Open a folder, or pick the highlighted file
  Backspace           Up one folder
  F5                  Type a folder or a full file path. %APPDATA%,
                      %USERPROFILE% and other Windows variables work; a path
                      to a file opens its folder with the file highlighted
  F6                  Next drive
  Esc                 Cancel

Hidden folders such as AppData are listed; Windows system folders
($RECYCLE.BIN and the like) are not.


Status messages
---------------

Quick confirmations - "copied to clipboard", "upload queue cleared", "a
transfer is already in progress", "waiting for Xmodem/Ymodem sender...",
ASCII upload started/finished/cancelled, and so on - appear centered in the
bottom status row for a few seconds, then disappear. They never pop up the
file-transfer box; that box only appears for an actual transfer (Section 7).


==============================================================================
4. PHONEBOOK ENTRY FIELDS
==============================================================================

Opened with Ins (new entry) or Alt+E (edit selected). The screen is laid out
in three groups:


Connection
----------

  Name          Label shown in the phonebook list only - purely cosmetic,
                never sent anywhere
  Host          Hostname or IP address, the same as you'd type after telnet or
                ssh on a command line. A user:pass@host shorthand is also
                accepted for SSH
  Port          TCP port - auto-fills to the protocol's default
                (23/22/992/513) when Protocol is changed, but can be
                overridden
  Term Type     Which display protocol to speak - see Section 1 for the full
                list. ANSI-BBS is the default and sits first in the list.
                Atari ST IGS turns on IGS graphics (Section 10)
  Screen Size   COLSxROWS reported to the BBS - affects the remote's own word-
                wrap and full-screen menus, not the size of the window itself
                (window size is Screen Scale - Section 6)
  Font          Bitmap font used to render the session. IBM_VGA_8x16 is the
                default and sits first in the list
                If fonts\ also has a matching NAME_16x32.F32 (e.g.
                IBM_VGA_16x32.F32 next to IBM_VGA_8x16.F16), RGTERM draws
                that real 16x32 bitmap instead of doubling the 8x16 pixels -
                the same "Upscaled Resolution" look NetRunner has. Set
                UpscaledFont=0 under [Config] in rgterm_config.ini (or press
                Shift+F12) for the old doubled-pixel look. When the window
                isn't an exact 1x/2x/3x... multiple of the 16x32 grid (the
                default 2.5x Screen Scale, for example), the final stretch
                is smoothed so strokes don't come out uneven;
                SmoothScaling=0 turns that off. For the sharpest text, pick
                Screen Scale 2.0x (1280x800, NetRunner's own default size).


Display & Login
---------------

  Sixel             Lets the BBS send real bitmap images as Sixel escape
                    sequences
  iTerm2 Images     A newer Sixel alternative (OSC 1337 File=) some door
                    software uses for PNG/JPEG/GIF images; off by default
  ICE Colors        Blink SGR shows as a bright background instead of
                    literally blinking - matches most modern BBS ANSI art
  UTF-8             Decode incoming text as UTF-8 instead of CP437 - only for
                    BBSes that actually send UTF-8
  IEMSI             Auto-answers a BBS/door's IEMSI login banner with this
                    entry's Username/Password
  Sim. Baud Rate    Cosmetic modem-speed throttle, with a full fake dialing
                    sequence shown before connecting
  Username/Password Sent automatically when the BBS asks, or on demand with
                    Alt+L - leave blank to type them by hand each time.
                    The password always shows as ******** (never its
                    length); while you're editing it, F2 shows or hides
                    it in plain text.
                    Scripts can use them too - username() / password()
  Script            A logon script to run when this entry connects - just
                    the name (titantic or titantic.rgs); it's always loaded
                    from RGTERM's scripts\ folder, never from a path.
                    Blank = none. (Section 16)


Security
--------

  Protocol                  Telnet, SSH, TelnetS (TLS), RLogin, Raw socket, or
                            Shell (a local process)
  Key File                  SSH private key to authenticate with, instead of
                            or alongside a password
  Trust New Key/Cert        Accept an unseen SSH host key or TLS certificate
                            automatically instead of prompting
  RLogin Client/Server User The two usernames RLogin's own login string
                            carries
  Shell Command             Command line to launch for the Shell protocol -
                            blank runs cmd.exe


==============================================================================
5. THE CONFIGURATION SCREEN (Alt+C)
==============================================================================

Alt+C opens RGTERM's global settings - things that apply to every
connection, as opposed to the per-entry phonebook fields in Section 4. It
works from the phonebook or from inside a live session; leaving it puts you
back exactly where you were, with the session's screen restored.

Settings are saved to rgterm_config.ini next to RGTERM.exe - a separate file
from the phonebook, so editing phonebook entries can never wipe them out.


* Keys on the Configuration screen

  Up / Dn             Move between fields
  Enter               Next field (on a page link: open that page)
  Left / Right        On a < value > field: cycle through the choices. On a
                      text field: move the cursor
  Y / N / Space       Set or flip a Yes/No field
  PgDn / PgUp         Next / previous page (1 -> 2 -> 3 -> 4 -> 1)
  Right-click         Paste the clipboard into the current text field (only
                      the first line is used)
  Esc                 SAVE and go back - Esc does not discard changes

Any field shown as "< value >" when highlighted is a choice list - use
Left/Right, you can't type into it. The line of hint text near the bottom of
the screen explains whichever field is highlighted.


Page 1 - Settings
-----------------

GENERAL (both on one row - Default Term Type on the left, Screen Scale on
the right)

  Default Term Type   < ANSI-BBS >  The Term Type pre-filled into every NEW
                      phonebook entry. Existing entries keep their own.

  Screen Scale        < 2.5x >  Window size: 1x, 1.5x, 2x, 2.5x, 3x, then
                      Full Screen. Changes take effect IMMEDIATELY as you
                      press Left/Right, and are remembered as the size
                      RGTERM opens at next time. Full details in Section 6.

FILE PATHS

  Download Directory  Where Zmodem and Xmodem/Ymodem downloads are saved.
                      Either relative to RGTERM.exe (e.g. downloads) or an
                      absolute path (e.g. d:\temp). The default "." means
                      RGTERM's own folder.

  Upload Directory    The folder the upload file browser (Alt+U, Alt+K,
                      Alt+A) starts in. Same relative/absolute rules.

  Capture Directory   Where Alt+G captures (.ans + .log), Alt+P screenshots
                      (.png) and Alt+N ANSI exports (.ans) are saved. Leave it
                      blank to use the Download Directory.

  BBS Guide Archive   The file Ctrl+F11 downloads from telnetbbsguide.com.
  Name                Tokens are replaced with today's date when it
                      downloads:
                        %MMYY%   month + 2-digit year   (0926)
                        %MM%     month                  (09)
                        %YY%     2-digit year           (26)
                        %YYYY%   4-digit year           (2026)
                      Default: ibbs%MMYY%.zip. A value starting with http://
                      or https:// is used as a complete URL instead. If this
                      month's file isn't posted yet, RGTERM automatically
                      tries last month's. Blank restores the default.

COMPATIBILITY (left column - every remaining setting)

  ANSI Music          Yes/No. Plays the BASIC "PLAY"-style music some BBSes
                      and doors embed in their ANSI (ESC[M ... Ctrl-N, the
                      Qmodem/TeliMate/ansi.sys style).

  ATASCII Lenient     Yes/No. In ATASCII (Atari) sessions, also treat plain
  CR/LF               CR/LF as line breaks. No = exact Atari hardware
                      behavior; Yes fixes boards that mix plain-ASCII
                      banners into an ATASCII session and otherwise come out
                      as one garbled line.

  PETSCII Lenient     Yes/No. In PETSCII (C64) sessions, show lowercase
  Letters             letters without waiting for the charset-switch code.
                      No = exact C64 behavior; Yes fixes boards that print
                      plain banners in PETSCII mode.

  ASCII Upload        Milliseconds to wait between lines of an ASCII (Alt+A)
  Delay (ms)          upload, so a slow BBS editor doesn't drop characters.
                      Default 100. 0 sends the whole file at once.

MORE SETTINGS (right column - links only; Enter or double-click opens them)

  F1-F10 Editable Macro Keys     -> page 2
  External Door Programs         -> page 3
  Shift+F1-F10 Script Keys       -> page 4

The hint text for the highlighted field fills the space below.


Page 2 - F1-F10 Macro Keys
--------------------------

Ten text fields, one per function key. While connected, pressing that F-key
sends the text to the BBS. Leave a field blank to keep the key's normal
behavior. (F11 and F12 are not macro keys - F11 switches phonebook lists and
F12 cycles fonts.)

Macros are typed as plain text, with these escape codes for keys you can't
type into a text box:

  \r        Enter (carriage return)       \n        Line feed
  \t        Tab                           \b        Backspace
  \e        Esc                           \\        a literal backslash
  \^        a literal caret (^)           \xHH      any byte, in hex
  ^A - ^Z   Ctrl+A through Ctrl+Z         ^@ ^[ ^\ ^] ^^ ^_  the other
                                          control codes

Anything that isn't a recognized code is sent exactly as typed, so ordinary
text never needs escaping.

Examples:

  F1   myhandle\r                 types your handle and presses Enter
  F2   /q\r                       quit a menu that uses /Q
  F3   \e[A                       an ANSI Up-arrow sequence
  F4   Y\r\rN\r                   answer a run of prompts at once


Page 3 - External Door Programs
-------------------------------

Up to eight local programs, launched with Ctrl+F1 through Ctrl+F8, all
sharing one .conf folder and (optionally) one serial bridge:

  .conf File Location The folder holding your DOSBox .conf files. Every
                      program starts in this folder, so a slot can simply
                      say -conf gterm.conf instead of the full path (a
                      relative mount path inside the .conf also resolves
                      from here). Blank = RGTERM's own folder.
                      Operation Overkill ][ art and sounds are also read
                      from the ooii\ folder inside it (or doors\ooii\
                      under RGTERM's folder when this is blank).
  Serial Bridge       Shares your live BBS session with the door program.
  COM Port              6400 or TCP:6400   RGTERM listens on 127.0.0.1 at
                                           that port for DOSBox's
                                           serial1=nullmodem line - no
                                           driver needed (Section 11)
                        COM11              uses a com0com virtual pair
                                           instead
                        (blank)            no bridge - the program runs on
                                           its own
  Ctrl+F1 - Ctrl+F8   The full command line for each slot, e.g.
                        "C:\DOSBox\dosbox.exe" -conf gterm.conf
                      %HOST% %PORT% %USER% %PASSWORD% are replaced with the
                      connected phonebook entry's own values.

(Earlier builds had ten slots. Slots 9 and 10 in rgterm_config.ini are left
untouched but are no longer shown or launchable.)

Sections 11 to 14 walk through a complete, working example.


Page 4 - Shift+F1-F10 Script Keys
---------------------------------

Ten fields, one per key. Type a script NAME for each - tw-pairtrade or
tw-pairtrade.rgs - and pressing that Shift+F-key in the terminal runs
scripts\<name>.rgs. Pressing the same key again while its script is still
running stops it. Blank = the key does nothing (pressing it tells you so).
Like everywhere else, scripts only ever load from the scripts\ folder.
Stored in rgterm_config.ini under [ScriptKeys] as ShiftF1 ... ShiftF10.

Enter on the last field of page 3 now moves on to page 4 instead of saving
and closing - use Esc to save and close from any page.


Settings with no screen of their own
------------------------------------

  [Transfers]
  (DDO-F/X fonts)      .FNT fonts are looked for first in <RGTERM folder>\fonts\ddofx
                      (created automatically, like fonts\skypix for SkyPix),
                      then in DDOFXDir for fonts a door sent itself.
  DDOFXDir=doors\ddofx  Folder where files downloaded during a DDO-F/X session
                      (a door's resource .zips, plus the files unzipped from
                      them) are KEPT, and where DDO-F/X looks for them. A
                      relative name is under the RGTERM folder, so the default
                      is <RGTERM folder>\doors\ddofx, keeping all door files
                      together. Missing folders are created automatically.
                      Use a full path (d:\ddofx) to put it elsewhere, or leave
                      it empty to keep these files
                      in the Download Directory as before. Ordinary BBS
                      downloads are not affected.
  DDOFXDeleteZips=1   After a DDO-F/X resource .zip is unzipped into that
                      folder (and every file checked), delete the .zip so
                      only the unzipped files are kept. A zip that fails to
                      unzip is left alone. Set to 0 to keep the .zips.
  Zmodem8K=1          Try 8K Zmodem upload blocks (default). Set to 0 only
                      for a board that misbehaves even with the automatic
                      1K fallback (Section 7).


==============================================================================
6. WINDOW SIZE, SCREEN SCALE & FULL SCREEN
==============================================================================

RGTERM's screen is always an 80x25 grid of 8x16 character cells (or whatever
Screen Size the entry uses), drawn at a fixed size and then scaled up to
fill the window. So "window size" is purely how large that picture is drawn -
it never changes the number of rows and columns the BBS sees.


* Screen Scale (Alt+C, page 1, General)

  Setting        Window's drawing area for an 80x25 screen
  -------        ------------------------------------------
  1x             640 x 400
  1.5x           960 x 600
  2x             1280 x 800
  2.5x           1600 x 1000   (the default)
  3x             1920 x 1200
  Full Screen    the whole monitor, borderless (same as Alt+Enter)

Press Left/Right on the field to step through these, wrapping around at
either end (3x -> Full Screen -> 1x, and the reverse). The window resizes the
instant you press the key - you'll see the Configuration screen itself grow
and shrink - and the window's top-left corner stays put so it doesn't jump
around the desktop. No restart is needed. Whatever you leave it on is saved
and used the next time RGTERM starts.

Coming off Full Screen returns to whichever multiplier you used last.


* Full Screen

Full Screen is exactly the Alt+Enter mode: no title bar or border, covering
the whole primary monitor. When Screen Scale is set to Full Screen, RGTERM
starts windowed at your last multiplier and immediately switches to full
screen the same way Alt+Enter does, so the two always behave identically.
Alt+Enter still toggles back to a normal window at any time, and back again.

Alt+Enter on its own is a quick, temporary toggle - it doesn't change the
saved Screen Scale setting.


* When the BBS asks for a different screen size

A door can ask for a different text screen for the rest of the call - for
example 80x50, or 132 columns - with the xterm/SyncTERM "resize" code
(ESC[8;rows;cols t). RGTERM switches to that size, tells the BBS the new
size the same way it does at connect, and shows "Screen size 132x37 (set
by the BBS)" for a moment. A 0 or missing number keeps that dimension.

  - Limits: 20-255 columns, 5-150 rows
  - With the Alt+S status bar on, the BBS still gets exactly the rows it
    asked for; the status row is added under them
  - It lasts for this call only - the phonebook entry isn't changed, and
    the next connect uses the entry's own Screen Size again
  - Ignored in RIP, IGS, PETSCII, Viewdata and Atari ST (VT52) sessions,
    which have fixed screens of their own

Auto font for tall screens: when the BBS asks for 40 or more rows (80x43
and 80x50 are the usual ones), RGTERM switches to an 8x8 CP437 font, the
same as a real VGA card does in those modes. With the normal 8x16 font an
80x50 screen would be twice as tall as it is wide and get squeezed into a
thin column in the middle of the window; with 8x8 it keeps the normal
80x25 shape and fills the window, so the text stays readable. If the BBS
goes back to 25 lines (or anything under 40), the entry's own font comes
back. Hanging up or the next connect always restores the normal font.
(A font picked by the BBS itself - ESC[0;n D - replaces the 8x8 font.)


* The window title

While connected, the title bar (and the taskbar button) reads

  RGTERM - The Titantic BBS Telnet - 00:12:47

- the phonebook entry's name (or its host if it has no name) and the time
online, updated every second - so the right window is easy to spot. It
goes back to plain "RGTERM" when you hang up.


* Resizing by hand

You can also drag the window edges or corners to any size. When you let go,
RGTERM snaps the window to the nearest size with the correct proportions, so
the characters never end up stretched or squashed.


==============================================================================
7. FILE TRANSFERS IN DEPTH
==============================================================================


Zmodem downloads
----------------

There's nothing to press - a Zmodem download starts automatically as soon as
the BBS begins sending. Files are saved to the Download Directory (Section
5). Batches of several files are handled in one go.

When the BBS offers a file whose name already exists in your Download
Directory, RGTERM compares sizes first:

  Existing file is the same size or larger   Skipped - the BBS is told you
                                             already have it and moves on to
                                             the next file ("SKIPPED" notice)
  Existing file is smaller (a download that  Resumed - only the missing part
  was cut off earlier)                       is requested
  No existing file                           Downloaded normally

Exception: during a DDO-F/X door session every download is taken fresh from
the first byte and REPLACES the file on disk - no skipping, no resuming. Those
doors reuse the same file names ($LI$T001.ZIP etc.) for different games'
content, so skipping or resuming by name would keep the wrong game's file or
build a corrupt mix of two. See Section 8.


The transfer box
----------------

While a transfer runs, a centered box shows:

  Receiving via Zmodem   (or "Sending via Zmodem", or the Xmodem/Ymodem
                          equivalent)
  File                   the file name
  Size / Pos             total bytes and bytes so far
  Rate                   average speed - "(measuring...)" for the first moment
                         or on very small files
  Errors                 retransmissions so far
  Block                  the block size in use
  [##########    ]  %    progress bar

The Block line shows the real block size - 8192 or 1024 on uploads, and on
downloads the largest block the BBS has sent.

The box only shows while a file is actually moving. When the transfer
finishes it stays up for about a second, so even a tiny file visibly
registers, but it closes straight away once the BBS starts drawing its own
screen again (its menu or prompt). It also closes immediately if the
connection drops or the door hangs up on you.

An upload you've QUEUED (Alt+U, then Esc with files in the queue) or picked
with Alt+K doesn't open the box - only the status row says "queued - sends
once the BBS starts the upload". The box appears when the BBS's side
actually starts the transfer.

Nothing else opens this box - quick status messages use the bottom row
instead (Section 3).


How a Zmodem session ends (technical)
-------------------------------------

For anyone reading a debug log: after the last file the sender sends ZFIN,
RGTERM answers with its own ZFIN, and the sender finishes with the two
characters "OO" ("over and out"). RGTERM hides those two O's so they don't
print on screen. If a sender repeats its ZFIN after RGTERM has already closed
out the transfer, RGTERM still answers it, so the sender never counts the
batch as failed. When RGTERM is the sender (uploads), it sends the first ZFIN
and answers the receiver's reply with "OO".


Zmodem uploads
--------------

Alt+U opens a file browser in the Upload Directory - pick one or more files
and they're queued and sent in one batch. Dragging files from Explorer onto
the window does the same thing instantly (folders are skipped). If you try to
start an upload while a transfer is already running, you'll get a status-row
message instead and nothing is queued twice.

You don't have to press Alt+U first: when you start an upload from the BBS's
own menu and its Zmodem receiver starts waiting, RGTERM notices and opens the
same file browser on its own (only if nothing is queued already). Pick the
file and it goes straight to the waiting BBS; Esc closes the browser and the
BBS gives up on its own after a short wait. The browser only pops up once per
upload attempt, not again every time the BBS repeats its "ready" signal.

Message uploads: many BBS message editors have their own Upload command that
takes a file by Zmodem and turns it into the message text (the BBS announces
something like "Ready to receive TEMPMSG.1"). That's the way to post ANSI art
- the file arrives byte for byte, escape codes included. If RGTERM sees the
BBS asking for a message like this and you pick something that isn't a text
file (anything but .ans .asc .txt .msg .diz .nfo .ice .avt .pcb .doc .me .1st
or no extension), it asks first: Y sends it anyway, N (or Enter/Esc) reopens
the file picker so you can choose the right file.

* 8K blocks, with a 1K fallback

Uploads are sent in 8K (8192-byte) blocks - about eight times fewer blocks
than the classic 1K, which is noticeably faster over the internet. Some old
DOS-era receivers can't take 8K blocks, so RGTERM watches for the signs -
the BBS asking for the same spot in the file again, or no answer within 5
seconds - and at the first sign switches to 1K for the rest of that upload
batch. A receiver that says up front it only has room for less than 8K gets
1K from the start. If a board still has trouble, see the Zmodem8K setting
in Section 5.

* Resume

Uploads now ask the receiving end to resume: if the BBS already has part of
the file from an upload that was cut off, it tells RGTERM where to carry on
and only the rest is sent. Receivers that don't support resuming simply
start from the beginning. (Downloads have always resumed - see above.)


Xmodem / Ymodem
---------------

These don't start themselves the way Zmodem does - press Alt+Y just before
(or just after) telling the BBS to send, and RGTERM detects whether it's
Xmodem (checksum or CRC), Xmodem-1K, Ymodem (batch) or Ymodem-G. Alt+K
uploads, and asks which protocol to use since the receiver can't be
auto-detected.


ASCII upload
------------

Alt+A sends a plain text file line by line, pausing between lines by the
ASCII Upload Delay setting (Section 5) - ideal for pasting a long
message into a BBS's line editor. Hanging up cancels it.


==============================================================================
8. DDO-F/X LITE DOORS (LI-TERM COMPATIBILITY)
==============================================================================

DDO-F/X ("Digital Dimensions Online F/X") is the system Locatha Industries
built its door games around - Black Jack 21, Yahtzee, Metal Worlds, Poker
F/X, Othello F/X and 20+ others. Those doors expect the caller to be running
Locatha's own terminal, LI-TERM F/X, and talk to it with hidden control
codes: they ask what terminal and video card you have, check whether their
graphics/sound resources are already on your disk, send the missing ones,
then check again before starting.

RGTERM answers all of that the same way LI-TERM F/X 2.0 does. There's no
setting to turn on - it activates automatically the first time a door sends a
DDO-F/X command, and resets on every new connection.


What RGTERM does and doesn't do in DDO-F/X
------------------------------------------

Supported:

  - All the "detect" questions (terminal, memory, drive, video card, sound
    card, speed, video mode, music/sound/theme/font status)
  - All four file checks (music, theme, resource, font) and the resource-
    entry check
  - Resource pack download, auto-unzip and overwrite
  - The macro engine (doors define up to 32 multi-line macros and run them
    on keypresses) and the 300-slot "return string" table doors use to send
    your keypresses back to them
  - Short timed pauses
  - Local scripts. Graphics doors keep most of their screens inside their
    own resource file (for Blood Quest, QUESTV1.REM) and tell the terminal
    "run MAIN.FX1" instead of sending the screen. RGTERM finds the file
    in your Download Directory and runs the script the way LI-TERM does:
    its text (story pages, help text, ANSI) appears on screen and its
    commands are handled like any others.
  - Text fields. When a door puts up a text box (Blood Quest asks for
    your vampire's name this way), the bottom row turns into an input
    line:

        Door input (Enter sends, Esc cancels): NAME_

    The box's default text is shown first; typing replaces it. Nothing is
    sent while you type - LI-TERM sends the whole line when you press
    Enter, and so does RGTERM. (Before this, each key went straight to
    the door with nothing echoed, so a name prompt looked like a blank,
    frozen screen.) Esc closes the input line without sending; the
    field's own hotkey, if it has one, opens it again.
  - Every query that expects an answer (joystick, mouse, window and pixel
    queries included) gets one, so the door never waits forever for a
    reply. Where RGTERM doesn't have the thing (a joystick) it says so.

Graphics mode (DDO-F/X "Normal Mode"):

Graphics doors like Blood Quest switch LI-TERM to a 640x480, 256-colour
SVGA screen (the log shows {LIGMODE}). RGTERM now does the same: the
terminal view is replaced by the door's picture, kept in 4:3 proportion.
The pictures come from the door's own resource files in your Download
Directory (for Blood Quest, QUESTV1.RES) - nothing extra is sent for them.

  - Pictures, page copies and cut-outs, palettes and fades
  - Sprites and animations, including the flying/moving ones (motion paths)
    and the "simple sprites" arcade doors move frame by frame (Metal
    Worlds' players, monsters and torches)
  - FLI/FLC movies the door plays in part of the screen (Galactic Fleet
    Wars' planets and ships, Dragon Slayer's dragons). They come as
    plain .FLI/.FLC files the door sends to your Download Directory.
  - Text windows: the door's menus, story pages and messages, in the
    door's own text fonts (the .FNT files from its font pack; RGTERM's
    own font stands in for any that are missing). Arrow keys scroll them
    where the door has set that up.
  - Text drawn straight onto the picture (stats, scores, dialog text),
    including areas the door scrolls up line by line (Dragon Slayer's
    battle scroll)
  - Text boxes (e.g. Blood Quest's name prompt) are drawn in place, and
    what you type shows in them. Once you press Enter the box stays
    drawn only until the door paints over that spot, as in LI-TERM.
  - Key bindings the door makes (CREATE KEY MACRO)
  - The mouse, as in LI-TERM: click the door's buttons, pictures and
    icons (the pointer turns into a hand over anything clickable), pick
    radio buttons and check boxes, click a text box to type in it. Held
    down, scroll arrows keep scrolling. Right-click works too where the
    door uses it.
  - List boxes (e.g. Blood Quest's clan list): click an entry to move the
    highlight there, double-click it (or use the door's key) to select it.
  - Push buttons also answer to their keys, with the pressed look.
  - Mouse fields: moving the mouse over a spot the door marked runs its
    action (Dark Harvest's tool bar shows what each icon does this way),
    and the door's own mouse pointers (.MPT) replace the Windows one.
  - The 3D view (Dark Harvest's city, sewers and dungeons): walk with
    the arrow keys (Up/Down move, Left/Right turn), or whatever keys the
    door sets up. Walls, floors, ceilings, animated textures, doors and
    creatures on the map, the door's scripted walk-throughs and the
    little overhead map all work. Walls are always drawn as whole
    blocks (LI-TERM could also draw thin walls).
  - Timed events (story pages that move on by themselves), animation
    collision boxes, screen shake, and the door's script variables.
  - Graphic windows: the framed panels doors pop up over the picture
    (Blood Quest's profiles, the SOUND MASTER panel behind every Locatha
    door's speaker icon). The title bar is yellow on red for the window
    in front, yellow on blue otherwise; drag it to move the window. Its
    buttons (where the door allows them): close (X), full size / back,
    back to the original place (the little house), and back to the icon
    (_). The corner thumb resizes, and the arrows in the frame scroll
    windows bigger than their frame. Esc or the door's own key closes
    the window when the door set one up. Everything inside - pictures,
    animations, buttons, mouse fields - works as it does on the screen.
  - The SOUND MASTER panel is the real one now: theme sounds on/off,
    music stop, previous/next part of the song, play, pause, and volume
    up/down (the number shows the door's music volume), with the
    dancing music bars - one per track of the song.

  F10 flips between the graphics screen and the text screen underneath,
  as LI-TERM's F10 did (it only does this while a door is in graphics
  mode - otherwise F10 is your macro key as usual). The graphics screen
  ends when the door sends its "exit to text mode" command, or on hangup.

Music and sound effects:

  - Background music in MOD and S3M format plays while you're in the door
    (text or graphics screen), from the file the door sent to your
    Download Directory. It stops when the door says so, when a graphics
    door leaves its graphics screen, or on hangup. A song a graphics door
    starts in the moment it leaves (Dark Harvest's SAFE.S3M) is not
    played, so it doesn't carry on over the BBS menus.
    CMF (FM synthesizer) songs are not supported and stay silent.
  - Sound effects from the door's theme pack (.THE), sound-bite library,
    "big samples", RealPlay files and text-to-speech (TALK.THE) all play,
    including the ones tied to animation frames. Up to four effects play
    at once on top of the music.
  - Alt+M (the same switch as ANSI music, also under Alt+C) mutes and
    un-mutes door music and sound (the door's SOUND MASTER panel has its
    own controls - see above). While muted RGTERM tells the door that
    music and sound are off; a song that was playing picks up where it
    left off when you turn it back on.

Not yet supported:

  - Dragging icons around, animated mouse pointers, bitmap (.BMF) fonts,
    marquees, the 3DS polygon engine (spinning 3D models), joysticks.
  - File transfer progress while the graphics screen is up (the transfer
    still works; press F10 to watch it on the text screen).
  - Auto-playing a RealPlay sample right after a $LI$R*.ZIP arrives.


If a DDO-F/X door says "ERROR IN TRANSFER OF RESOURCES"
-------------------------------------------------------

This means the door's second file check didn't match what it sent.
With the current build this should no longer happen. If it does:

  - Delete any old $LI$*.ZIP files, and the files unpacked from them, from
    your Download Directory - copies left by older RGTERM builds can be
    corrupt - and enter the door again so it re-sends everything.
  - Make sure the Download Directory is writable.
  - Turn on the debug log (Section 15) and look at what the door asked
    ({dr...}, {dm...}) and what RGTERM answered right after.


If a DDO-F/X door seems to freeze right after the download
-----------------------------------------------------------

Doors like Blood Quest show a registration screen ("PRESS A KEY"), then
switch to graphics mode and draw everything else from their resource
file. Older RGTERM builds didn't run those resource scripts, so the
screen stayed stuck on "PRESS A KEY" while the door was really sitting
on its main menu waiting for a menu key. (Blood Quest: E enters the
game, L or X leaves.) Current builds run the scripts and draw the
graphics menu with its buttons. The same goes for later screens: Blood
Quest's story pages ("<CONTINUED...>") only take N (next page), P
(previous) and X (done) - Enter, Space and Q do nothing there.
If you still see no menu:

  - Check that the door's resource files (for Blood Quest,
    QUESTV1.REM) are in your Download Directory. They are unpacked there
    automatically from the $LI$T001.ZIP pack.
  - Turn on the debug log (Section 15) and look for "RUN LOCAL SCRIPT"
    lines. "not found" means the resource file isn't where RGTERM looked.

"TIME EXPIRED!!" right after a DDO-F/X door's main menu comes from the
door itself, not RGTERM - no time information goes between the door and
the terminal. Blood Quest, for example, gives unregistered copies a fixed
15 minutes, and registered copies whatever time is left in DOOR.SYS; an
instant "TIME EXPIRED" means the door read 0 time left. Check the
time-remaining lines of the DOOR.SYS your BBS writes for that node.

** Found that if a user has more than 900 minutes left online, this will
trigger the TIME EXPIRED error. **

Graphics doors now show their pictures, animations and text windows
(see "Graphics mode" above); sound and mouse clicks are still missing.



==============================================================================
9. COMMAND-LINE SWITCHES (DOOR / LAUNCHER USE)
==============================================================================

RGTERM accepts the same command-line switches as Rick Parrish's TelnetDoor,
so a BBS (or a shortcut, or a batch file) can launch it to connect straight
to a host with no phonebook screen at all. Switches can start with - or /.

  -Shost[:port]   Connect straight to this host, skipping the splash and the
                  phonebook. The port can be given here or with -P.
  -Pport          Port to connect to. Default 23, or 513 with RLogin.
  -R              Use RLogin instead of Telnet.
  -Xname          RLogin client username (implies -R). Default: your Windows
                  user name.
  -Yname          RLogin server username - the name to log in as (implies
                  -R). Default: your Windows user name.
  -Zterm          RLogin terminal type (implies -R). Default ansi-bbs.
  -E              Local echo - show what you type on your own screen, for
                  hosts that don't echo it back.
  -Wn             When the session ends, wait n seconds (any key skips the
                  wait), then quit. Default 5. -W0 quits immediately.
  -K              Keep RGTERM open after the session ends instead of quitting
                  - useful when you use -S as a personal shortcut rather
                  than from a door.
  -Mfile          Show a quick-connect menu from a BBS list file instead of
                  the phonebook (see below). Ignored if -S is also given.

Examples:

  RGTERM.EXE -S thebbs.example.com                  Telnet on port 23
  RGTERM.EXE -S thebbs.example.com:2323 -W0         port 2323, quit at hangup
  RGTERM.EXE -S thedoors.example.com -Y%1 -W0       RLogin as the BBS user
  RGTERM.EXE -S thebbs.example.com -K               a desktop shortcut that
                                                   stays open afterwards


* The -M BBS list file

A plain INI file - the same layout as TelnetDoor.ini - with one section per
BBS. The section name is what's shown; S= is the host and P= the port (23 if
omitted). Up to 99 entries; sections without an S= line are skipped.

  [The Titantic BBS]
  S=ttb.rgbbs.info
  P=23

  [Some Other Board]
  S=bbs.example.com
  P=2323

If the file can't be found or has no usable entries, RGTERM falls back to the
normal phonebook.


==============================================================================
10. PROTOCOLS & FEATURES IN DEPTH
==============================================================================

This section walks through exactly what to type, field by field, for every
protocol and the less obvious display features - RIP, SkyPix, and changing
fonts - with a worked example for each. Field names below match the
Connection/Display & Login/Security groups from Section 4.


SSH
---

Protocol = SSH. Port defaults to 22. Authenticates with Username/Password, a
Key File, or both - RGTERM tries whichever methods the server actually offers,
public key first if a Key File is set and the server allows it, falling back
to password.

Worked example - connecting with a password:

  Host        bbs.example.com
  Port        22
  Protocol    SSH
  Username    myuser
  Password    (your account password)

There's also a shorthand: typing user:pass@host directly into the Host field
(e.g. bbs:bbs@bsbbs.com.br) works even with Username/Password left blank -
RGTERM parses the embedded credentials out of Host itself before connecting.
Whichever way you enter it, only the bare hostname is ever shown on screen or
logged - the credentials themselves never are.


* Key File - what to type, and what it means

Key File takes the path to your PRIVATE key file (for example
C:\Users\you\.ssh\id_ed25519 or id_rsa) - not the matching .pub file. RGTERM
derives the public key from the private key automatically, so only one file is
ever needed here.

If your private key itself is passphrase-protected, put that passphrase in the
Password field - when a Key File is set, Password is read as the KEY's
passphrase, not an account password, since public-key auth doesn't use a
separate account password at all. Leave Password blank if the key has no
passphrase.

  Host        bbs.example.com
  Port        22
  Protocol    SSH
  Username    myuser
  Key File    C:\Users\myuser\.ssh\id_ed25519
  Password    (the key's own passphrase, or blank if it has none)


* Trust New Key

The first time you connect to a given SSH server, it presents a host key - a
fingerprint proving "this is really the same server you talked to before", the
same trust-on-first-use model every SSH client uses. Trust New Key = Yes
accepts an unseen host key automatically with no prompt; No means RGTERM will
ask before trusting a server it hasn't seen before. Leave this No unless
you're certain you're connecting to the right host - it's the whole point of
host-key checking in the first place.


TelnetS (Telnet over TLS)
-------------------------

Protocol = TelnetS. Port defaults to 992. This is ordinary Telnet's own IAC
option negotiation, wrapped inside a TLS-encrypted connection - not a
different protocol underneath, just an encrypted transport for the same one.
Use it for a BBS that specifically advertises "TelnetS" or "Telnet+TLS"
support.

  Host        bbs.example.com
  Port        992
  Protocol    TelnetS

Trust New Cert works exactly like SSH's Trust New Key, applied to the server's
TLS certificate instead of an SSH host key: Yes accepts an unseen (including
self-signed) certificate automatically; No prompts first. Most BBSes running
TelnetS use a self-signed certificate rather than one from a public
certificate authority, so Yes is usually the practical choice here, same
trust-on-first-use reasoning as SSH.


RLogin
------

Protocol = RLogin. Port defaults to 513. RLogin's own login string carries TWO
usernames, not one - a genuinely common point of confusion:

  RLogin Client User    the username on YOUR machine that the remote is asked
                        to trust
  RLogin Server User    the username to actually log in as on the remote -
                        what you'd normally just call "username" anywhere else

A typical BBS using RLogin (common for door-game front-ends like
BBSLink/Global-Link setups) will tell you what to put in each. If in doubt,
Server User is almost always the one that matters for what shows up at the
BBS's own login prompt.


Raw
---

Protocol = Raw. A bare TCP socket - no Telnet IAC option negotiation, no
terminal-type/window-size negotiation of any kind, because there's no protocol
layer here to hand that information to. RGTERM still decodes whatever comes
back according to the Term Type you picked, but the remote is never actually
TOLD what terminal type or screen size you're using - there's no mechanism for
it to ask.

Use this for a host that speaks plain text over a socket without expecting any
Telnet negotiation at all - a Telnet server doing IAC negotiation at a Raw
connection will generally show its negotiation bytes as visible garbage on
screen, since nothing on this end is answering them the way a real Telnet
client would.

  Host        bbs.example.com
  Port        (whatever the host actually listens on)
  Protocol    Raw


Shell
-----

Protocol = Shell. This is NOT a network connection at all - Host and Port are
never even read for this protocol. Instead, RGTERM launches a local process
directly and pipes its input/output through the same terminal window,
rendering, capture, and hotkeys you'd use for a real BBS session. It's how
RGTERM's own Alt+J (Shell to DOS) hotkey works internally, just wired to a
saved phonebook entry instead of a one-off keypress.

Shell Command is the actual command line to launch. Leave it blank and RGTERM
runs plain cmd.exe. To get a *nix-style shell instead, point it at something
that provides one on your machine:

  (blank)             Runs cmd.exe - an ordinary Windows command prompt inside
                      RGTERM's window
  wsl.exe             Windows Subsystem for Linux, if installed - a real Linux
                      shell
  C:\...\bash.exe     A Cygwin, MSYS2, or Git-for-Windows install's own bash,
                      if you have one

Worked example - a phonebook entry that's really just a WSL shortcut with
RGTERM's own capture/screenshot/font features available:

  Name          WSL Shell
  Protocol      Shell
  Shell Command wsl.exe

Since this never opens a network connection, none of the SSH/TLS/RLogin fields
apply, and there's no host to trust a key or certificate from.


RIP (RIPscrip)
--------------

RIPscrip is a vector-graphics BBS menu system - the remote sends drawing
commands (lines, filled regions, icons, mouse-clickable buttons) instead of
plain ANSI art, and RGTERM renders them as real graphics rather than
characters. Set Term Type to RIP to use it.

  Host        rip.example-bbs.com
  Port        23
  Term Type   RIP

RGTERM tells the BBS it supports RIP by sending "RIP" as its terminal type
over the wire (the same TTYPE negotiation any terminal type uses) - a board
that offers a RIP menu set will switch to sending RIP commands once it sees
that. If a board doesn't actually support RIP, connecting with this Term Type
simply does nothing special - RIP commands never arrive, and whatever plain
text the board does send still displays normally.

RIP drawing follows the real RIPscrip behavior of RIPterm and SyncTERM:
palette changes recolor the whole picture, fill patterns and line styles
(dotted, dashed, thick) are honored, arcs, pie slices, ovals and Bezier
curves are drawn, and flood fills stop at the borders the art intended
instead of leaking across the screen.

RIP text fonts
  RIP text is drawn with Borland BGI stroke fonts, as on a real RIP
  terminal. Put these ten files in the fonts folder next to RGTERM.exe:

    TRIP.CHR  LITT.CHR  SANS.CHR  GOTH.CHR  SCRI.CHR
    SIMP.CHR  TSCR.CHR  LCOM.CHR  EURO.CHR  BOLD.CHR

  (Triplex, Small, Sans Serif, Gothic, Script, Simplex, Triplex Script,
  Complex, European and Bold - RIP font numbers 1 to 10.) RIP font 0, the
  built-in 8x8 font, needs no file. If a .CHR file is missing, text in that
  font is drawn with a plain built-in font instead, so RIP still works
  without the fonts folder - it just looks less like the original.


SkyPix
------

SkyPix is an Amiga-specific graphics dialect (used by C-Net and AmiExpress-
based BBSes) that happens to ride on the exact same wire-level RIP terminal
type - a SkyPix-capable board is watching for RIP-flavored negotiation, then
sends SkyPix's own distinct command set once it sees it. Set Term Type to
SkyPix specifically (not RIP) so RGTERM's own font-caption handling and other
SkyPix-specific detection line up correctly, even though the same "RIP" string
still goes out over the wire either way.

  Host        amiga-bbs.example.com
  Port        23
  Term Type   SkyPix

SkyPix commands are auto-detected once connected - there's nothing further to
configure beyond picking this Term Type.

SkyPix sessions use the real SkyPix 16-color palette (not RIP's), and Area
Fill, brush Blit and filled ellipses follow the SkyPix specification, so
pictures match what iCYterm shows. The SkyPix palette is only used during a
SkyPix session - RIP and ANSI-BBS colors are never changed by it.


Atari ST IGS
------------

IGS ("Instant Graphics and Sound") is the Atari ST's answer to RIP: the BBS
sends drawing commands - lines, boxes, filled shapes, polygons, text in
graphics fonts, fill patterns, color palette changes - mixed in with the
ST's VT52 text. Set Term Type to Atari ST IGS:

  Host        st-bbs.example.com
  Port        23
  Term Type   Atari ST IGS

What RGTERM supports:

  - The drawing commands, drawn at the ST's own resolutions (320x200 in
    16 colors, 640x200 in 4, 640x400 in 2) and scaled to the window
  - Timed pauses and animation loops - an IGS screen that animates plays
    at the speed the BBS intended, not all at once
  - Clickable screen areas - IGS menus can define mouse-click zones;
    clicking one sends that menu choice to the BBS
  - 40-column text when the board switches to low resolution
  - The ST's sound: the built-in GIST sound effects (bells, explosions,
    lasers and so on) played through a YM2149 sound-chip emulation

Plain Atari ST (without IGS) is still there for ST boards that only use
VT52 text.


Changing Fonts
--------------

There are two different ways to change the bitmap font RGTERM renders with,
for two different purposes:


* Per-entry default (Font field)

Set on the phonebook entry itself (Section 4, Connection group) - this is what
the session starts with every time you connect using that entry. IBM_VGA_8x16
is the shipped default and sits first in the list. Left/Right on this field
cycles alphabetically through every .F16 file in the fonts\ folder.

Worked example - an entry that opens in an Amiga-styled font by default (this
is exactly what the Amiga (Topaz) Term Type preset already sets up for you
automatically, but any Term Type can be paired with any font by hand):

  Term Type   ANSI-BBS
  Font        AMIGA_TOPAZ_PLUS_8x16


* Live, mid-session (F12)

F12 cycles through the same font list on the fly, without editing the entry at
all - useful for trying a board's ANSI art in a different font, or just
personal preference, without changing what the entry itself defaults to next
time. A board that changes its own font mid-session (RIP and SkyPix boards
commonly do, and some ANSI-art doors send their own font-select sequences too)
will override whatever F12 last picked - F12 is a manual override for you, not
a lock against the remote's own choices.


==============================================================================
11. EXTERNAL DOOR PROGRAMS & THE COM BRIDGE
==============================================================================

Some BBS doors expect a specific full-screen SVGA "door terminal" program on
the caller's own machine - GTERM, GWTERM, and PIT are three such programs,
each a separate downloadable DOS executable that takes over the screen and
talks to the BBS over what it believes is a real serial port (COM1).

RGTERM supports this without any virtual COM port driver (no com0com, no null-
modem cable emulator) using a plain TCP loopback bridge instead:

  - RGTERM listens on 127.0.0.1 at a port you choose (ExternalDoorComPort -
    the COM Port field on Configuration page 3, Section 5)

  - A DOSBox instance, launched by RGTERM via Ctrl+F1-Ctrl+F8, runs the door
    terminal program inside it

  - DOSBox's own [serial] nullmodem setting connects OUT to that same port the
    instant the door terminal opens COM1

  - From that point on, everything the BBS sends is mirrored onto the door
    terminal's emulated COM1, and everything the door terminal sends back over
    COM1 goes out to the live BBS session - the same session RGTERM already
    had open

  NOTE: The two port numbers must match exactly - RGTERM's ExternalDoorComPort
        setting and the port: value in the DOSBox .conf file's [serial] line.
        If you change one, change the other.

Setup, in general, for any of these three programs, follows the same four
steps:

  - 1. Point one of the eight External Door Programs slots (Alt-C, page 3) at
    your DOSBox executable, with -conf pointing at that program's own .conf
    file

  - 2. Set ExternalDoorComPort to match the port: value in that .conf file's
    [serial] line

  - 3. Set .conf File Location (Alt-C, page 3) to the folder holding the
    .conf file - then the slot only needs -conf gterm.conf, and a relative
    mount line inside it works too

  - 4. Connect to the BBS as usual, get to the point where the door expects
    the door terminal to take over, then press the Ctrl+F<n> you configured


==============================================================================
12. EXAMPLE: GTERM.EXE
==============================================================================

GTERM (Land Of Devastation's SVGA door terminal, v5.11) is the one confirmed
working end-to-end, using DOSBox Staging (not the older DOSBox 0.74-3). The 
full working configuration, with every setting explained inline, is reproduced
below exactly as verified:

  ............................................................................
  | ### gterm-tcp.conf ##########################################################
  | #
  | # DOSBox config for running GTERM.EXE (Land Of Devastation's SVGA door
  | # terminal, v5.11) as an RGTERM "external door" (Ctrl+F1..Ctrl+F8), with
  | # RGTERM's own already-live BBS session mirrored onto GTERM's emulated COM1
  | # over a plain TCP socket - no com0com, no virtual COM port driver at all.
  | #
  | # How the two ends find each other:
  | #   - RGTERM (uComBridgeTcp.pas / TComBridgeTcp) LISTENS on 127.0.0.1 at the
  | #     port given in ExternalDoorComPort (Alt-C, page 3), e.g. "TCP:6400" or
  | #     just "6400".
  | #   - DOSBox, per [serial] below, CONNECTS OUT to that same port as soon as
  | #     GTERM opens COM1. That's what "server:127.0.0.1" means in a DOSBox
  | #     nullmodem line: it names the machine DOSBox connects TO, i.e. it makes
  | #     DOSBox the client, RGTERM the server. (Leaving "server:" out would
  | #     make DOSBox itself listen instead - the opposite of what's wanted
  | #     here.)
  | #
  | # If you change the port here, change ExternalDoorComPort in RGTERM to
  | # match (and vice versa) - the two numbers must be identical.
  | #
  | # Setup:
  | #   1) Point RGTERM's ExternalDoorCommands[n] (Alt-C, page 3, "External
  | #      Door Programs") at DOSBox STAGING (not old DOSBox 0.74-3 - see
  | #      output=texture below for why) with this file as -conf, e.g.:
  | #        "C:\Program Files\DOSBox Staging\dosbox.exe" -conf "C:\rgterm\doors\gterm\gterm-tcp.conf"
  | #   2) Set ExternalDoorComPort to "TCP:6400" (or your own port - just keep
  | #      it matching the [serial] line below).
  | #   3) Set ExternalDoorWorkDir to this gterm folder (or leave it, since the
  | #      mount below is relative to wherever DOSBox itself is started from -
  | #      an absolute mount path is safer if your shortcut/working dir isn't
  | #      guaranteed to be this folder; see the "mount c" line below).
  | #   4) Connect to your BBS/door in RGTERM as usual, get to the point the
  | #      door expects GTERM to take over, then press the configured
  | #      Ctrl+F<n>. RGTERM starts listening, launches DOSBox, and DOSBox
  | #      connects straight in and starts GTERM - no second login, no modem.
  | #
  | ##############################################################################
  | 
  | [sdl]
  | fullscreen=false
  | # texture, not opengl: this machine runs over Remote Desktop, and
  | # DOSBox's OpenGL/present path doesn't actually reach the screen through
  | # RDP's virtual display driver - renders "succeed" internally (see the
  | # PACER: log messages) but nothing shows, permanently black. texture
  | # uses SDL2's own renderer instead and survives RDP. If you ever run
  | # this on a normal local display instead of RDP, opengl is fine too and
  | # generally looks a little nicer - but texture is the safe default here.
  | output=texture
  | waitonerror=true
  | 
  | [dosbox]
  | # vesa_nolfb, not svga_s3: confirmed working for GTERM's actual SVGA
  | # drawing (svga_s3's explicit S3-chip emulation was tried too - same
  | # black-screen symptom turned out to be the RDP/output issue above, not
  | # the chipset, so either likely works now, but this is the one actually
  | # confirmed end-to-end).
  | machine=vesa_nolfb
  | memsize=16
  | 
  | [cpu]
  | core=dynamic
  | cycles=200000
  | cputype=auto
  | 
  | [serial]
  | # Must match RGTERM's ExternalDoorComPort port number exactly.
  | serial1=nullmodem server:127.0.0.1 port:6400 transparent:1
  | 
  | [autoexec]
  | # Absolute path is safer than a bare "mount c ." if DOSBox isn't always
  | # launched with this folder as its own working directory - edit this one
  | # line to wherever you actually unzipped GTERM511.ZIP. Match the drive
  | # letter on the "mount" line and the line right after it (c/c, d/d,
  | # whichever you use) - a mismatch here was an earlier real bug (mounted
  | # as c, switched to d) that silently made GTERM.EXE un-findable.
  | mount d "d:\wp\rgterm\rgterm\doors\gterm" d:
  | 
  | # GTERM's own command line:
  | #   /NOACCEL /FORCEINT /FORCEDUAL - GTERM.DOC's own SVGA-compatibility
  | #     switches.
  | #   FOSSIL - REQUIRED. GTERM's internal comm routines never actually
  | #     sent or received a single byte over DOSBox's emulated COM1 in any
  | #     amount of testing, including /OLDINTERNAL - only FOSSIL mode
  | #     (talking through a real FOSSIL driver instead of the UART
  | #     directly) actually got live data flowing to/from the BBS. A DOS
  | #     FOSSIL driver (e.g. BNU or X00) must be mounted here and loaded on
  | #     its own line BEFORE gterm.exe, e.g.:
  | #   bnu.exe
  | gterm.exe com 1 /NOACCEL /FORCEINT /FORCEDUAL FOSSIL
  ............................................................................

  NOTE: GTERM will not send or receive a single byte over COM1 without a
        FOSSIL driver loaded first (BNU or X00 are the common choices) - this
        was confirmed the hard way. Load it as its own line immediately before
        gterm.exe in [autoexec].


==============================================================================
13. EXAMPLE: GWTERM
==============================================================================

  NOTE: Unlike the GTERM configuration above, this section has NOT been
        confirmed working end-to-end. GWTERM was not one of the programs
        tested in this session, so the settings below are a template adapted
        from GTERM's own confirmed-working configuration, not a verified one.
        Confirm GWTERM's actual command-line switches and FOSSIL requirement
        against its own documentation before relying on this.

GWTERM is presumed to be a sibling SVGA door terminal in the same family as
GTERM, so the same DOSBox approach - TCP loopback bridge, [serial] nullmodem,
FOSSIL driver - should apply. Start from the GTERM configuration in Section 12
and adjust:

  - The [autoexec] mount path and drive letter, pointed at wherever GWTERM's
    own files are unzipped

  - The final command line - replace gterm.exe with GWTERM's own executable
    name and its own documented switches

  - The port number in [serial] and RGTERM's ExternalDoorComPort, if you want
    GWTERM on a different port from GTERM so both can be configured at once in
    different Ctrl+F<n> slots

  - Whether GWTERM also requires FOSSIL mode specifically, or can talk to
    DOSBox's emulated UART directly - check its own documentation, since this
    was GTERM's own specific finding, not a general DOSBox limitation

If GWTERM turns out to need different SDL/output or machine= settings than
GTERM (for a different reason than GTERM's own RDP black-screen issue), the
[sdl] and [dosbox] sections in Section 12 are the two places to revisit.


==============================================================================
14. EXAMPLE: PIT
==============================================================================

  NOTE: As with GWTERM above, this section is an UNVERIFIED template, not a
        confirmed-working configuration. PIT was not tested in this session.

The same four-step setup and the same DOSBox TCP-bridge approach in Section 11
applies to PIT as well, assuming it's also a DOS-based door terminal that
opens a COM port the way GTERM does. Build its own config the same way as
GWTERM's above: copy Section 12's file, point the mount and command line at
PIT's own executable and folder, and confirm its own FOSSIL/serial
requirements against its documentation rather than assuming they're identical
to GTERM's.


==============================================================================
15. TROUBLESHOOTING
==============================================================================


* Black screen / nothing displays inside DOSBox

If you're running over Remote Desktop, DOSBox's default OpenGL output path
does not reach the screen through RDP's virtual display driver - it reports
success internally but nothing actually appears. Set output=texture in the
[sdl] section instead. On a normal local display, opengl usually works fine
(and can look a little nicer), but texture is the safer default if you're not
sure.


* Door terminal program doesn't send or receive anything

Some DOS door terminals (confirmed for GTERM) never talk to DOSBox's emulated
UART directly, even in modes documented as working without one - they need a
FOSSIL driver (BNU or X00 are common, free choices) loaded first, and a
FOSSIL-mode switch on their own command line. If a program has one, try it
before assuming the COM bridge itself is broken.


* "File not found" trying to launch the door terminal inside DOSBox

Check that the drive letter on the mount line and the drive letter immediately
after it (and on the command line that follows) all match. Mounting as one
letter and then referencing another is an easy copy-paste mistake and silently
makes the program un-findable rather than producing an obvious error.


* RGTERM and DOSBox can't connect to each other

  - Confirm ExternalDoorComPort in RGTERM and the port: value in the .conf
    file's [serial] line are identical

  - Confirm the [serial] line has server:127.0.0.1 - without it, DOSBox
    listens instead of connecting out, and neither side will ever find the
    other

  - Make sure nothing else on the machine is already using that port


* The window is the wrong size, or too big for my monitor

Change Screen Scale on Alt+C page 1 (Section 6) - it resizes live, so you can
see each size before settling on one. If the window ever opens off-screen or
too large to reach the Configuration screen, edit rgterm_config.ini next to
RGTERM.exe while RGTERM is closed: under [Config], set ScreenScale=2 (or any
value from 1 to 3 in steps of 0.5) and ScreenScaleFullScreen=0.


* The transfer box won't go away / keeps popping up

With the current build the box only shows while a file is actually moving,
closes as soon as the BBS draws its screen again after the transfer (or
about a second later if it doesn't), and never opens just because files
are queued. If you still see it, turn on the debug log (below) and
reproduce it.


* An upload stalls or keeps restarting at the same point

RGTERM falls back from 8K to 1K blocks on its own the first time a board
has trouble (Section 7). If a particular board still fails, close RGTERM
and set Zmodem8K=0 under [Transfers] in rgterm_config.ini.


* Zmodem uploads to Synchronet (sexyz) fail with CRC errors

Fixed in this build. Over Telnet, a server that hasn't agreed to "binary"
mode throws away a NUL or line feed that comes right after a carriage
return, so any upload block containing those byte pairs arrived damaged.
RGTERM now follows the Telnet rule for that case (a carriage return goes
out as CR + NUL until the server agrees to binary), escapes every control
character when the receiver asks for it (sexyz's EscapeCtrlChars / -e),
and drops from 8K to 1K blocks straight away if the receiver rejects 8K.
If an upload to a particular board still fails, set Zmodem8K=0 (Section
5) and send a debug log (below).


* Password prompts showed only "***"

Fixed in this build: a board that masks your password with one "*" per
key now shows every star as you type. (RGTERM's automatic Zmodem-download
detection used to hold stars back - a Zmodem start begins with "**" - and
threw away every star after the third.)


* A script doesn't run, or stops with an error

The status row names the problem and the line number, e.g.
"titantic.rgs line 24: dreamweaver is not a variable - put text in quotes".
The most common mistake is text without quotes: sendln "dreamweaver", not
sendln dreamweaver. "Script not found: scripts\xxx.rgs" means the name in
the Script field (or on the Shift+F key) doesn't match a file in the
scripts folder. Errors also go to the debug log. See SCRIPTING.txt.


* A Zmodem download was "SKIPPED"

A file with that name and at least that size is already in your Download
Directory (Section 7). Delete or rename the old copy and download again.
(DDO-F/X doors never skip - Section 8.)


* Scrolling ANSI art piles up on the last lines instead of scrolling

Fixed in this build. Some ANSI art draws one screen row as several pieces,
each one "new line, cursor up, cursor right, draw" - at the bottom of the
screen the new line scrolls the picture up, and the cursor-up then puts the
next piece back on the same row. RGTERM used to cancel that scroll, so the
art stacked up on the last two rows. It now scrolls exactly as SyncTERM and
the original DOS ANSI driver do. If you still see it, turn on the debug log
(below) and send the log along with the name of the board and screen.


* PgUp / PgDn / Insert do nothing, or type a stray character

RGTERM sends the ANSI-BBS codes by default and switches to Renegade's codes
when a Renegade board announces itself at logon. If you connect to a
Renegade board that you reached through a menu or a gateway that hid its
banner, RGTERM can't tell, and PgUp / PgDn / Ins will be ignored until it
sees "Renegade Bulletin Board System" go by - reconnecting directly, or
logging off and on again so the logon banner shows, fixes it. While Alt+B
scrollback browsing is on, those keys scroll your history and are not sent
to the BBS at all - press End or Esc to return to live.


* The debug log

For anything connection- or transfer-related, RGTERM can write a detailed log
of every byte sent and received. Close RGTERM, open rgterm_config.ini next to
RGTERM.exe, and add:

  [Debug]
  RawLog=1

Start RGTERM and reproduce the problem; the log is written to
rgterm_debug.log in RGTERM's folder (new sessions are added to the end of the
same file). Set RawLog=0, or remove the line, to turn it off again - the log
grows quickly.

For DDO-F/X testing only: an empty file named ALWAYSDENY.TXT next to
RGTERM.exe makes RGTERM answer "NO" to every DDO-F/X file check for the whole
session (forcing the door to re-send everything). Delete it afterwards.


* Where to look next

RGTERM's own in-app help (Alt+Z) always reflects the exact build you're
running; this document is a snapshot alongside it (late September 2026
edition). The complete scripting language reference is SCRIPTING.txt.
The hint line at the bottom of the Configuration screen (Alt+C) explains
whichever setting is highlighted, and the Edit screen shows a description of
the chosen Term Type and Font as you cycle through them.


==============================================================================
16. SCRIPTING (RGScript)
==============================================================================

RGTERM can run small scripts that talk to the BBS for you - log in, get
past the "press ESC twice" and "hit a key" screens, walk a menu, or repeat
a routine in a door game. Scripts are plain text files ending in .rgs, kept
in the scripts folder next to RGTERM.exe:

  RGTERM\RGTERM.exe
  RGTERM\scripts\example.rgs      created the first time RGTERM runs

Edit them with any text editor. Scripts are ONLY ever loaded from this
folder - every place you name a script takes just the name, never a path.
The full language reference, with every command and more examples, is in
SCRIPTING.txt; this section covers how to use them.


Three ways to run a script
--------------------------

  1) Logon script - the phonebook's Script field (Alt+E, Section 4). Type
     titantic and scripts\titantic.rgs runs every time that entry
     connects. It stops when the call ends (unless the script itself hung
     up or dialed another board).

  2) Alt+O, any time - in the terminal or the phonebook. The script
     picker opens on the scripts folder, showing each script with its
     description (the script's first comment line); pick one and it runs.
     Press Alt+O again to stop it. These aren't tied to the call - they
     run until they end or you stop them - so they're the place for
     door-game helpers like the Trade Wars 2002 example (tw-pairtrade.rgs).

  3) Shift+F1 - Shift+F10 - assign scripts on Configuration page 4
     (Section 5). Press the key to run, press it again to stop.

Only one script runs at a time; starting another stops the one running.
The bottom row shows "Script xxx running", then "finished" or "stopped" -
or the error and its line number.


Recording a script (Ctrl+O)
---------------------------

Ctrl+O starts the recorder and Ctrl+O again stops it; *REC* shows on the
status bar while it's on. Just use the board normally - RGTERM watches what
the BBS shows and what you type, and writes a script that does it again:

  expect "Press <ESC> twice to continue..."
  send "\e\e"

  expect "Login:"
  sendln username()        // the entry's Username field

  expect "Password:"
  sendln password()        // the entry's Password - never in the file

  expect "mins left):"
  send "M"

  - Each prompt becomes an expect line, which waits up to 30 seconds for
    that text and stops the script with a message if it never shows.
  - A line you type followed by Enter becomes sendln; a single-key menu
    choice (no Enter) becomes send. Backspaces are applied first.
  - Parts of a prompt that change every call (time left, dates, node
    numbers) are cut off - only the text after the last number is used.
  - If what you type matches the entry's Username or Password, the script
    writes username() / password() instead of the text, so your password
    never ends up in a file.

Recording also stops and saves by itself when the call ends. The script is
saved as scripts\<entry name>.rgs (with -2, -3 ... added rather than
overwriting an existing one); the status row tells you the name.

To record a LOGON script, press Ctrl+O in the phonebook, connect, log in,
then press Ctrl+O. If that entry's Script field is empty, RGTERM fills it
in with the new script, so it runs on every connect from then on.

To record anything else - a door routine, a mail run - press Ctrl+O while
online. Run it later with Alt+O or put it on a Shift+F key.


The language in brief
---------------------

  // comments                     # comments work too
  var name = "USERNAME"           text always goes in "double quotes"
  x = 5                           whole numbers
  if ... then ... elseif ... else ... end
  while ... end    for i = 1 to 10 ... end    repeat ... until ...
  function name(a, b) ... return ... end

  send "text"            send keys        sendln "text"   send + Enter
  waitfor("a", "b", 30)  wait for any of these (30 s); returns 1, 2 ... or
                         0 on timeout. Ignores case and ANSI color codes
  delay 500 / sleep 2    pause in milliseconds / seconds
  print "message"        show a message on the status row
  connect "Board Name"   dial a phonebook entry;   hangup
  username() password()  the connected entry's saved login
  input("question", "default")
                         ask YOU something on the bottom row and wait for
                         Enter (Esc gives back the default); returns text
  getline(row)           read a line of the screen
  lastline()             the whole line the last waitfor matched
  number(text)           the first number in some text, commas ignored

Escape codes inside text: \r Enter, \e Esc, \t Tab, \xHH any byte, and
^M-style control keys. Text MUST be in quotes - sendln dreamweaver (no
quotes) is an error that tells you to add them.


Example - press ESC twice, then log in (scripts\titantic.rgs)
------------------------------------------------------------

  if waitfor("<esc> twice", 60) = 0 then
    print "Never saw the Press <ESC> twice prompt"
    exit
  end
  send "\e"
  delay 250
  send "\e"

  if waitfor("login:", 60) then sendln username() end
  if waitfor("password:", 30) then sendln password() end

Put titantic in that entry's Script field, and its Username and Password in
the entry, and every connect logs you in.

