
                       RAILWAYS v3.0.4 - Documentation

                                October 1996

                      A model railroad design software
                         with digital control module
                          (for PC 80286 or above)

                          Distributed as Freeware

                     -----------------------------------
                     Developed by (c) Sebastien MARCHANT
                       Toulouse - France, 1993-1996

----------------------------------------------------------------------------
* Last updated : October, 22nd 1996 *
----------------------------------------------------------------------------

Availability :

   * FTP : ftp://ftp.eis.enac.dgac.fr/pub/Railways/ in file
     RLW[version][language].ZIP
   * WWW : http://www.eis.enac.dgac.fr:8001/ancien/marchant/
   * SimTel and mirrors sites (http://www.coast.net/SimTel/) in
     [simteldir]/msdos/cad/

     Please note that because of reorganisation on our system, URLs should
     change to http://www.enac.fr:8001/... or
     http://www.mis.enac.fr:8001/... or something like that.
     Our FTP server should change as well to ftp.enac.fr or ftp.mis.enac.fr.
     You can try WWW Search Engines with keyword 'ENAC' to get the right
     address...

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

   * An HTML and a PostScript version of this documentation is available via
     WWW (see address above).

   * After Nov.96, you can get the latest version only directly from me,
     because my studies will be finished and hence my Unix school-account
     will be closed (but not my WWW pages...).
     My current address (as of October 1996) is :
                                Sebastien MARCHANT
                                  21, rue Auvray
                                  72 000 LE MANS
                                     FRANCE

   * Nevertheless, I will try to have a new Email address and a new WWW host
     as soon as I can. After Nov.96, try LYCOS Search Engine
     (http://www.lycos.com/) with keyword 'RAILWAYS' or 'MARCHANT' and you
     should find me back on the net !

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

Important notes :

   * All that follows is the English documentation for RAILWAYS 3.0.4,
     October 1996.
   * RAILWAYS software is available in English, French, Dutch, German,
     Swedish and Danish in several separated packages. Note that there is
     only an English documentation and an English Inline-Help, even in the
     French, Dutch, German, Swedish and Danish versions (as of October
     1996).
   * PLEASE, READ THIS DOCUMENTATION THROUGHOUTLY !
   * Don't forget to send me a postcard if you find Railways software quite
     useful to design model railroad layouts and to control them with the
     digital module. (See above address)

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

Tables of Contents

   * FORWARD : LEGAL NOTICE
   * LICENSE AND ADDRESS
   * INTRODUCTION
   * HISTORY

   * I. REQUIREMENTS AND INSTALLATION
        o 1. Requirements
        o 2. Installation under MSDOS, Win3.1 and Win95
        o 3. Running RAILWAYS
        o 4. Files in RLW304US.ZIP
        o 5. Upgrading RLW files (LYO and DAT) to this new version

   * II. RAILWAYS USER INTERFACE
        o 1. 'Main RAILWAYS' icons bar
        o 2. 'EDITOR' icons bar
        o 3. 'DISK ACCESS' icons bar
        o 4. 'EXPORT' menu
        o 5. 'LAYOUT INFORMATION' menu
        o 6. 'ACCESSORIES' icons bar
        o 7. 'ANNOTATIONS' icons bar
        o 8. 'FLEXIBLE' icons bar
        o 9. 'TOOLS' icons bar
        o 10. 'SELECTION' icons bar
        o 11. 'BENCHWORK' icons bar
        o 12. USEFUL KEYS (*** please read this)
        o 13. Digital Control Module (presentation)

   * III. CREATING TRACKS, FLEXTRACKS AND OTHERS WITH RAILWAYS
        o 1. Editing Tracks
        o 2. Selecting a rail and move around layout
        o 3. Editing FlexTracks
        o 4. Creating a new Starting Point
        o 5. 'Copy, Paste & Delete' possibilities (Selection)
        o 6. Changing Line-style and Width of tracks
        o 7. Adding Rectangles and Circles
        o 8. Adding Signals and Turntables
        o 9. Annotating your layout
        o 10. Creating a Benchwork

   * IV. CREATING A TRACKS' DATABASE (DAT File)
        o 1. Instructions and Conventions
        o 2. Merging DAT Files
        o 3. DAT Files included in RAILWAYS v3.0.4 package

   * V. DIGITAL CONTROL MODULE
        o 1. Defining locos
        o 2. Defining switches, signals and uncouplers (electros)
        o 3. Annotating electros
        o 4. Running the Digital Control Module
        o 5. Controlling locos
        o 6. Controlling electros
        o 7. Stopping the Digital Control Module
        o 8. Saving and loading Digital layouts
        o 9. Digital variables
        o 10. Restrictions

   * VI. CONFIGURATION FILE

   * VII. MISCELLANEOUS
        o 1. Window menu & read menu
        o 2. About error messages
        o 3. Programming
        o 4. Special thanks

   * VIII. MAIN EXPECTED IMPROVEMENTS FOR NEXT VERSIONS

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

FORWARD : LEGAL NOTICE

Software : RAILWAYS, version 3.0.4 of October 1996, hereinafter referred to
as "the software".

The software has been designed and produced by Sebastien Marchant (Toulouse,
France) who holds all ownership rights to RAILWAYS from version 0.10 to
version 3.0.4.

   * Reproduction of the software
     Sebastien Marchant grants any user of the software the right to
     reproduce it so as to circulate it. Any copy of the software and/or
     relevant documentation must comprise reference to the ownership of
     Sebastien Marchant, especially the present section : forward : legal
     notice.
     The user undertakes not to carry out any paying distribution of the
     software. However, he is authorized to bill any person or body for the
     cost of reproduction of said software. As regards any other type of
     distribution, the user undertakes to apply to obtain the express
     approval of Sebastien Marchant.

   * Guarantees
     Please note that the software is a product currently being developed.
     Sebastien Marchant shall not be responsible in any way concerning
     conformity, and in particular shall not be liable should the software
     not comply with the requirements of the user, Sebastien Marchant not
     being obliged to repair any possible direct or indirect damage.

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

LICENSE AND ADDRESS

This software package is Freeware, that is FREE OF CHARGE.
Or I should say Postcardware : you are supposed to send me a postcard from
your country in order to "pay" your registration !
But if you think it is worth being used, you can send how many French Francs
or US Dollars you want in order to support improvements. Please write to :

                             Sebastien MARCHANT
                               21, rue AUVRAY
                               72 000 LE MANS
                                   FRANCE

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

INTRODUCTION

RAILWAYS is a Freeware software to help you to design model railroad track
plans and to control them with the digital module for Maerklin Computer
Interfaces 6050, 6051 and 6023.
It can be used by any model railroader, using any kind of tracks (Maerklin,
Fleischmann, Jouef, Lima, Roco, Altas, LGB, ...) and for any scale (HO, N,
O, Z or whatever you want) since you build your own database (DAT file) with
a tool software : SETUPRLW.

You can edit your tracks, define a benchwork, add rectangles, circles,
signals and turntables, add texts and annotations, and above all you can add
flextracks with accuracy. Many tools are provided : 'copy, paste & delete'
possibilities, load and merge parts of layout, translation, rotation, choice
of colours, material list, printer interface for HP-LaserJet, HP-DeskJet and
Epson-compatible. PostScript, DXF (for AutoCAD, or other programs that can
import DXF files) and BMP files can be also exported.

Please, if you have any suggestions, comments, criticisms or problems, send
me a mail, or post an article to rec.models.railroad, or write me a letter,
or call. So I can improve this software. Please, report the bugs you may
find... Thanks a lot.

Don't forget to send me a postcard (or US Dollars if you wish) if you find
Railways software quite useful to design model railroad layouts and to
control them.
If you want to contact me, follow this link (if it still exists...) :
http://www.eis.enac.dgac.fr:8001/ancien/marchant/

                      * Thanks again to use RAILWAYS *

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

HISTORY

   * October 1996 : RAILWAYS 3.0.4 (patch for v3.0 and v3.0.1)
        o digital support for 3-way switches and uncouplers
        o possibility to update tracks and others in a Digital layout file
          (like in a LYO file)
        o two new languages : Swedish and Danish
        o new DAT Files
        o a few other improvements

   * June 1996 : RAILWAYS 3.0.1 (patch for v3.0)
        o Mouse Module was re-written for supporting VESA-SVGA modes with
          ANY mouse driver. A special mouse driver driver is not necessary
          for VESA-SVGA modes.
        o the Dutch version is released
        o the German version is available and released
        o the Swedish version will be available soon

   * May 1996 : RAILWAYS 3.0
        o VESA-SVGA supports : 800x600, 1024x768 and 1280x1024 (need a
          special mouse driver)
        o printer outputs : HP LaserJet, HP DeskJet and Epson compatible
        o a new mode of drawing tracks (much better...)
        o a popup menu for an easier navigation through RAILWAYS menus
        o Maerklin Digital support for Computer Interfaces 6050, 6051 and
          6023
        o support for asymmetric 3-way switches
        o a little undo function
        o hard drives autodetection
        o an easy-to-use benchwork function for rectangular board
        o new DAT files
        o better DXF files : line-styles, layers, ... and less bugs !
        o a Dutch version is now available (May 1996)
        o many other things and fixes

   * October 1995 : RAILWAYS 2.04
        o above all, a maintenance release, because some bugs were found in
          the 'Selection' module which caused General Protection Error (code
          216)
        o possibility to define a benchwork or a layout border
        o exporting to POSTSCRIPT file (good results...)
        o exporting to DXF file for AutoCAD users (need to be improved...)
        o automatic track reference annotation
        o new features thanks to mouse double-click
        o annotations can be of different size
        o more DAT files (many thanks to all senders...)
        o DPMIINST.EXE included for 80286 users
        o many presentation image files available in FTP host
        o many other things

   * March 1995 : Result of January IBM software contest....
        o I just 'received' a demo of OS/2 Warp... Please, react !!!

   * February 1995 : RAILWAYS 1.08
        o all graphical functions rewritten to fix some little bugs (gap
          between two elements of some rails...)
        o signals and turntables
        o 12 characters for References (instead of 10)
        o different line-styles and width for rails (dotted, cut, ...)
        o annotation with arrows
        o no more RLW for 8086, only for 80286 (or 80287) and above
        o personnal directory on FTP host : ftp.eis.enac.dgac.fr
          (pub/Railways/)
        o World Wide Web connection files opened and maintained
        o many other things

   * January 1995 : RAILWAYS 1.07 for an IBM software contest in France.
        o French version !!!
        o fix some little bugs
        o a few things
        o results of contest in March 1995...

   * December 1994 : RAILWAYS 1.06
        o 'Copy, Paste & Delete' possibilities
        o Load and Merge parts of layout
        o Check if already two links
        o Code reduced in some modules
        o Numeric Coprocessor possibilities
        o Fix a bug with mouse in Protected Mode
        o Upgrade tool for 0.10 and 1.04 files
        o World Wide Web connection files (for January 95)
        o Ftp host
        o fix some bugs
        o many things else

   * October 1994 : RAILWAYS 1.04
        o flextrack (many people told me to add it, but it was
          mathematically really complex : polynoms, interpolation,
          equations, Gauss resolution and many other things!)
        o SETUPRLW (better than old MEMODAT)
        o crossing, double junction
        o annotations
        o hypertext help file
        o better README.TXT
        o fix some bugs
        o many things else

   * June 1994 : RAILWAYS 0.12
        o EGA or VGA screen
        o protected mode application (using XMS)
        o compressed files when saving layouts
        o fix some bugs
        o many little improvements

   * April 1994 : RAILWAYS 0.10
        o only for VGA screen
        o real mode application (no XMS)
        o database creation (MEMODAT)
        o edit tracks (but with no crossing)
        o known bug in double junction
        o rectangles and circles

   * May 1993 : the idea to develop a software for model railroaders.

   * 1992 : I started to learn computer science and electronics at the ENAC
     (Ecole Nationale de l'Aviation Civile), in Toulouse, FRANCE.

   * 1990 : I had to move because of studies -> layout in a box!

   * 1976-1990 : my layout became wider and wider.

   * 1976 : my first eletric layout.

   * May, 10th 1971 : my date of birth...

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

I. REQUIREMENTS AND INSTALLATION

   * I.1. Requirements :

     RAILWAYS only runs on IBM-PC or Compatible, 80286 or above, with an
     EGA, VGA or VESA-SVGA graphics adapter, color monitor, and a Microsoft
     compatible mouse, with DOS 3.3 or higher, Win3.1 or Win95 (OS/2 was
     tried with success).
     With a PC-emulator, RAILWAYS can be run on a MAC.

     The available graphics modes are :
        o EGA 640x350 16 colours
        o VGA 640x480 16 colours
        o SVGA 800x600 16 colours
        o SVGA 1024x768 16 colours
        o SVGA 1280x1024 16 colours (may not work with all video cards)

     Default mode is VGA, but you can choose the mode you want in the
     configuration file named RLW-US.CFG. (See section VI.)
     SVGA modes are available for VESA compatible video cards.
     The mouse driver must be loaded before RAILWAYS is launched.
     See SVGAMODE.TXT to configure RAILWAYS in VESA-SVGA graphics mode.

     RAILWAYS package has been tested with many anti-virus programs such as
     F-PROT, and was totally clean.

     Some environment variables are used by RLW in this order : TEMP, TMP.
     This represents the path to the temporary directory for swap. In your
     'autoexec.bat', you should have :
     SET TEMP = [drive\directory for temporary files]
     e.g. : SET TEMP = C:\WINDOWS\TEMP
     If one of these variables is not declared (or not well declared),
     RAILWAYS considers C:\ as the temporary directory for swap.
     Note that current version of RAILWAYS creates only one swap file named
     _RLW_RLW.TMP in the temporary directory.

     If you want, you can add the following line in your 'autoexec.bat', but
     it is not necessary :
     SET RAILWAYS = [drive\directory where RLW is found]
     e.g. : SET RAILWAYS = C:\TOOLS\TRAINS

     Important note :
     RLW can hang your system when used in conjonction with EMM386.EXE...

   * I.2. Installation under MSDOS, Win3.1 and Win95 :

     RAILWAYS is a DOS-based program. Nevertheless, it can be launched in
     Win3.1 and Win95 either from a DOS session or from the
     file-manager/desktop. Read your Windows manual for further information.
     A DOS mouse-driver must be loaded before running RLW.
     See SVGAMODE.TXT to configure RAILWAYS in VESA-SVGA graphics mode.

   * I.3. Running RAILWAYS :

     To run RAILWAYS, launch RLW.EXE (or RLW86.EXE) and wait for loading...
     Do not forget to load the mouse driver before running.
     You are now in RAILWAYS.

     If you want to skip the image presentation (get bored!), add on the
     command line '/S' or '-S'.
     e.g. : RLW.EXE /S

     If you want to view this image without any text (for capture...), add
     on the command line '/P' or '-P'.
     e.g. : RLW.EXE /P

     If you want to view another image (that can be found at
     ftp.eis.enac.dgac.fr in /pub/Railways/FNDFiles), add on the command
     line '/Iname_of_FNDimage' or '-Iname_of_FNDimage'. The default image is
     IMAGE.FND.
     e.g. : RLW.EXE /ISTEAM.FND
     The .FND extension can be forgotten... The FND format is a special
     image format imagined by me to be read as fast as possible.
     Email me if you want more information on FND format.

   * I.4. Files in RLW304US.ZIP :

        o Primary Files :
             + RLW.EXE : RAILWAYS software for Numeric Coprocessor (80287 or
               better), in Protected Mode (using extended memory).
             + RLW86.EXE : RAILWAYS software (80286 or better), in Protected
               Mode.
             + RLW-US.CFG : RAILWAYS configuration file.
             + RLW-US.HLP : RAILWAYS hypertext help file (Inline help).
             + RLW.ICO : RAILWAYS icon (for Windows).
             + ICONES.GPH : Icons library for RAILWAYS.
             + IMAGE.FND : Presentation image.
             + SETUPRLW.EXE : Database builder (DAT file).
             + UPGRDRLW.EXE : Software to upgrade 2.04 files (DAT and LYO).
             + README.TXT : Documentation file (ASCII format).
             + SVGAMODE.TXT : Documentation for installing VESA-SVGA modes.
             + LASTNEWS.TXT : Last news for uncouplers support.
             + MIRRORS.TXT : List of Mirror Sites for RAILWAYS.

        o Track's Databases :
             + ARNOLD-N.DAT : Arnold N.
             + ATLAS-HO.DAT : Atlas HO C100.
             + ATLAS-N.DAT : Atlas N.
             + FMANN-HO.DAT : Fleischmann Profi HO.
             + FMANN-N1.DAT : Fleischmann N (#1).
             + FMANN-N2.DAT : Fleischmann N (#2).
             + FRATESCH.DAT : Frateschi (Brazil).
             + HRNBYOO1.DAT : Hornby OO Imperial.
             + HRNBYOO2.DAT : Hornby OO gauge.
             + JOUEF-HO.DAT : Jouef HO.
             + KLEINBHO.DAT : Kleinbahn and Klein Modellbahn.
             + LGB-IIM.DAT : LGB IIm.
             + LIMA-HO1.DAT : Lima HO 'Nickel Silver'.
             + LIMA-HO2.DAT : Lima HO 'Standard' or 'Blister'.
             + LIONLO27.DAT : Lionel O-27.
             + MARKALPH.DAT : Maerklin Alpha.
             + MARKHUB1.DAT : Maerklin-Hubner I.
             + MARKLINC.DAT : Maerklin C-HO.
             + MARKLINK.DAT : Maerklin K-HO.
             + MARKLINM.DAT : Maerklin M-HO.
             + MARKLINZ.DAT : Maerklin Z.
             + MARKMODM.DAT : Maerklin 3800-3900.
             + MINITRXN.DAT : Minitrix N.
             + PECO-HO.DAT : Peco HO Setrack.
             + PECO-N.DAT : Peco N.
             + PIKO-HO.DAT : Piko HO 'Standardgleis'.
             + PILZ-TT1.DAT : TT standard #1 (Hungary).
             + PILZ-TT2.DAT : TT standard #2 (Hungary).
             + RIVA-HO.DAT : Rivarossi HO.
             + ROCO-HO.DAT : Roco Line HO.
             + ROCO-N.DAT : Roco N.
             + ROCO2-5.DAT : Roco 2.5 (old tracks).
             + ZEUKE-TT.DAT : Zeuke TT (Poland).

        o Examples :
             + CANTONS.LYO : for MARKLINM.DAT.
             + EX774.LYO : for MARKLINM.DAT.
             + EX964.LYO : for MARKLINM.DAT.
             + GEOMETRZ.LYO : for MARKLINZ.DAT.
             + KOMBI-K.LYO : for MARKLINK.DAT.
             + MINICIRC.LYO : for JOUEF-HO.DAT.
             + SET123-*.LYO : for MARKLINM.DAT.
             + TURNTABL.LYO : for MARKLINM.DAT.
             + CANTONS.DCC : for MARKLINM.DAT and for Maerklin Digital
               Module
             + Maerklin K-2275 switch Digital support :
                  + MARK2275.DAT : part of Maerklin K-HO (MARKLINK.DAT)
                  + MARK2275.LYO : layout containing K-2275 in four parts
                  + MARK2275.DCC : Digital layout containing K-2275 in four
                    parts
             + Example of a large and great layout (made by Bo Aslund -
               Sweden) :
                  + ASLUND.DAT : the DAT file.
                  + ASLUND.LYO : the layout.

        o Misc. Files :
             + DPMI16BI.OVL : DOS Protected Mode Interface from Borland.
             + RTM.EXE : Run time Manager from Borland.
             + DPMIINST.EXE : Required by 80286 users.

     Note : You can also find a version of RLW86.EXE named RLWNOXMS.EXE
     which can be run on 8086 processors or required by MAC users running a
     PC emulator (see RLWNOXMS.ZIP on Master FTP Site).

   * I.5. Upgrading RLW files to this new version :

     Because of changes in file formats, you must upgrade all the files you
     have made with previous RAILWAYS versions. If you want to know the
     version number of a LYO file, type at DOS prompt : 'TYPE filename.LYO'.
     You should read only this line :
     [FICHIER DE SAUVEGARDE POUR RAILWAYS X.YZ] where X.YZ is the version
     number.
     To upgrade, use UPGRDRLW.EXE.

        o If you use RLW 2.04 :
          To upgrade a DAT file, select the DAT conversion and give its
          name.
          To upgrade a LYO file, select the LYO conversion and give its
          name.
        o If you use an older version :
          Sorry, but compatibility with older versions is not supported...
          If you really want to upgrade your not 2.04 files, send me an
          email. Maybe I could do something...
        o If you use RLW 2.04, v3.0 or v3.0.1 :
          If you want to use the new possibility for uncouplers, please read
          LASTNEWS.TXT text-file.

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

II. RAILWAYS USER INTERFACE

RAILWAYS is divided into several icons bars in the upper part of the screen.
Each icons bar offers specific possibilities, which are presented below.
You can access these bars either by selecting the proper icon, or by
clicking the right mouse-button which proposes a popup menu.

Some useful information are displayed in the lower part of the screen such
as the current reference, the length of current flextrack, the current
line-mode and width of rails, length of current selected tracks, and a
little help with instructions... So always have a look at this part of the
screen !
Press F1 for the Inline Help.

   * II.1. 'Main RAILWAYS' icons bar :

     ? (AltH) : Presentation and Help on RAILWAYS.

     Editor (AltE) : Edit tracks, flextracks, benchwork, accessories and
     annotations.

     Disk Access (AltD) : Load, merge and save layouts, and load DAT Files.

     Export (AltX) : Export to PostScript, DXF, BitMap files and printers.

     Information (AltI) : Show and print current state of layout.

     Digital Ctrl (AltC) : Digital Module.

     Return to OS (AltR or [ESC]) : Exit RAILWAYS.

   * II.2. 'EDITOR' icons bar :

     ? (AltH) : Help.

     << ([ESC]) : Back to Main icons bar.

     Bench (AltB) : Define a benchwork.

     Icon Tools (AltT) : Rotate layout, change scale, restart layout.

     Icon Accessories (AltA) : Add rectangles, circles, signals, turntables,
     annotations, arrows.

     Straight (AltS) : Choose a reference of a straight rail.

     Curved (AltC) : Choose a reference of a curved rail.

     Switch (AltW) : Choose a reference of a switch.

     Refs (AltR) : Choose a reference among the 8 last selected ones.

     Width (AltD) : Change the half-width of track.

   * II.3. 'DISK ACCESS' icons bar :

     ? (AltH) : Help.

     << ([ESC]) : Back to Main icons bar.

     Icon Load LYO (AltL) : Load or include a layout from disk.
     Warning : all previous data will be lost if you don't choose to merge !

     Icon Save LYO (AltS) : Save current layout. Type the name you want.
     Warning : extension of file will always be '.LYO', whatever you type as
     extension.

     Icon Load DAT (AltD) : Load a DAT File from disk.
     Warning : all previous data will be lost !

     Current DAT File (AltC) : Show current DAT File contents.

   * II.4. 'EXPORT' menu :

     RAILWAYS can export layouts to PostScript, DXF, BitMap formats and some
     printers.

        o PostScript file : The whole layout is taken into account, with the
          current trace-mode (simple or double), and the page is optimized
          (you have the choice between 9 page-formats...)
          Warning : Do not put characters from ASCII-128 to ASCII-255 (e.g.
          accentuated char.) in your texts because they are replaced by
          blank characters, when saved in a PostScript file...

        o DXF file : The whole layout is taken into account, always with
          Simple trace-mode and without annotations. Uncouplers will look
          like default track...
          Warning : Thickness is not in the XY plan, but Z-based.

        o BitMap file (BMP) : Only the part of layout on the screen is taken
          into account, since it is a screen dump (you have to choose
          before, what you want to print)
          Results are better if you use a high graphics mode (eg : Vesa
          1024x768).

        o Printer outputs : Only the part of layout on the screen is taken
          into account, since it is a screen dump (you have to choose
          before, what you want to print). Printer outputs are supported for
          HP LaserJet, HP DeskJet and Epson compatible.
          Results are better if you use a high graphics mode (eg : Vesa
          1024x768).

   * II.5. 'LAYOUT INFORMATION' menu :

     Once you have finished to design your layout, you can display and print
     all the references you have used, with the total length of layout and
     the dimensions. So you can go to your favourite model shop and buy your
     tracks.

   * II.6. 'ACCESSORIES' icons bar :

     ? (AltH) : Help.

     << ([ESC]) : Back to Editor icons bar.

     Annotations (AltA) : Annotate layout.

     Rectangle (AltR) : Draw a rectangle with base length and width you
     choose.

     Circle (AltC) : Draw a circle with radius you choose.

     Signal (AltS) : Add a signal.

     Turntable (AltT) : Add a turntable.

     Delete All (AltD) : Delete all accessories.

   * II.7. 'ANNOTATIONS' icons bar :

     ? (AltH) : Help.

     << ([ESC]) : Back to Accessories icons bar.

     Add Text (AltA) : Add annotation to layout.

     Rescale Texts (AltR) : Rescale annotations.

     Arrow (AltW) : Add an arrow.

     Delete All (AltD) : Delete all annotations.

   * II.8. 'FLEXIBLE' icons bar :

     ? (AltH) : Help.

     << ([ESC]) : Back to Editor icons bar.

     Rail to Rail (AltR) : Link two rails with flextrack.

     Point to Point (AltP) : Link two points (not necessary rails) with
     flextrack.

   * II.9. 'TOOLS' icons bar :

     ? (AltH) : Help.

     << ([ESC]) : Back to Editor icons bar.

     Icon Big Ladder (AltZ) : To increase scale. If you press the right
     button of your mouse, the increasing is 5 times faster than if you
     press the left button.
     Rem. : Why a ladder ? Just because scale and ladder have the same
     French translation : echelle.

     Icon Small Ladder (AltA) : To decrease scale. If you press the right
     button of your mouse, the decreasing is 5 times faster than if you
     press the left button.

     Icon +-Beta deg. (AltW) : To rotate layout with a given angle in
     degrees (positive or negative).

     Icon +-90 deg. (AltV (+) or AltB (-)) : To rotate layout. If you press
     the right button of your mouse, the rotation is -90 deg; if you press
     the left one, it's +90 deg.

     Grid (AltG) : Draw a grid on screen (toggle icon).

     Grid Step (AltR) : Define a new grid step.

     New Layout (AltN) : To restart a new layout. All data will be lost !

     Selection (AltS) : Copy, Paste & Delete facilities.

   * II.10. 'SELECTION' Icons bar :

     ? (AltH) : Help.

     << ([ESC]) : Back to previous icons bar.

     Sector (AltS) : Select all rails, flextracks, accessories and
     annotations from a user-defined area.

     Copy (AltC) : Copy selection.

     -> Rail (AltR) : Move selection to a rail.

     -> Point (AltP) : Move selection to a point.

     Delete (AltD) : Delete selection.

     Clipboard (AltB) : Show clipboard (overall blinking selection view).

     Clear (AltL) : Clear selection but do not delete.

   * II.11. 'BENCHWORK' Icon bar :

     ? (AltH) : Help.

     << ([ESC]) : Back to Editor icons bar.

     Rectangular Bench (AltR) : Create a rectangular benchwork.

     Complex Bench (AltC) : Create a complex benchwork.

     Edit Measures (AltM) : Edit vertices attributes of the benchwork.

     Move (AltV) : Move the benchwork around layout.

     Delete (AltD) : Delete the benchwork.

   * II.12. USEFUL KEYS :

        o F1 : Help on RAILWAYS.
        o F2 : Save LYO-layout with current name.
        o F3 : Refresh screen.
        o F4 : Zoom with mouse.
        o F5 : Center layout with current rail.
        o F6 : Automatic centering (overall view).
        o F7 : Current Reference = Current Rail.
        o F8 : Comparison between two rails : click on two rails,
          considering rail-end (see [<,>] and [TAB] keys), then press F8.
        o F9 : Grid (toggle key)
        o AltF9 : New grid step.
        o F10 : Zoom in.
        o AltF10 : Zoom out.
        o AltF1 : Memory Status.
        o [C] : Center layout with current mouse position.
        o [BackSp] : Undo last deleted rail, flexible, accessory or
          annotation.
        o [ENTER] : Change trace-mode (Simple=OFF, Double=ON) (toggle key).
        o [SPACE] : Add a rail to layout at the end of the current rail.
        o [SHIFT]+[SPACE] : Add a rail to layout at a user-defined point.
        o [DEL] : Delete selected rail.
        o [<,>] : Change switch direction.
        o [TAB] : Change rail orientation.
        o [MOUSE]+L : Change line-mode of rail (different dotted lines).
        o [MOUSE]+B : Change width-mode of rail (normal or large lines).
        o [ESC] : Back to previous icons bar.
        o [CTRL] : Go to 'Copy, Paste and Delete' icon bar.
        o [Alt]+X : Restart a new LYO-layout.
        o [Arrows] : Move around layout.
        o [SHIFT]+Mouse : Move Accessory and Annotation.
        o [ALT]+Mouse : Delete Track, FlexTrack, Accessory and Annotation.
        o [ALT]+Key : Go to Icon name (underlined char.)
          Examples : AltE -> Editor; AltW -> Switch.

     I suggest you to copy these keys on a paper and put it in front of you.

   * II.13. Digital Control Module (presentation)

     The Digital Control Module is only for the Maerklin Computer Interfaces
     6023, 6050 and 6051. It allows you to control 256 switches, signals and
     uncouplers, and 80 locos (speed, functions, direction).
     If you use Maerklin Interface 6023, be sure to set it to BINARY MODE.

     After designing your layout, you can define your locos (address, name,
     max.speed) and your electros (signals, switches and uncouplers
     addresses) using the RAILWAYS interface. When running, you turn
     switches or signals, and activate uncouplers with a simple mouse-click
     and the retro-signalization shows you their active states. You can
     accelerate, decelerate, start and stop the lights, or uncouple (TeleX
     command) locos with the same simple operation thanks to a multiple
     windows manager.

     For further information on the Digital Control Module, please refer to
     section V.

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

III. CREATING TRACKS, FLEXTRACKS AND OTHERS WITH RAILWAYS

   * III.1. Editing Tracks :

     You have to be in 'EDITOR' or 'TOOLS' icons bar.

        o select the reference of the rail you want to add : Straight,
          Curved or Switch (e.g. : rail 'S 9999'). The current reference is
          in the lower left part of the screen.

        o select the rail and the direction where 'S 9999' must be added (if
          your layout is empty, it is not necessary : the center of the
          screen is the default beginning point).

        o press once [SPACE] to add 'S 9999' to your layout.

        o for a curved rail or a switch, you will be asked to choose the
          position. So press [TAB] until you find it convenient (or [ESCAPE]
          to cancel), then press [SPACE] to validate.

        o each time you add a track, RAILWAYS checks if there are already
          two connections and prompts if necessary.

   * III.2. Selecting a rail and move around layout :

     You have to be in 'EDITOR' or 'TOOLS' icons bar.

        o to select a rail, click once with left button on it.

        o to delete a rail, select it and press [DEL], or press [ALT] and
          click on it simultaneously.

        o to select direction, press [TAB] (the current direction has the
          same colour as the selected part of the rail).

        o to select part of a rail (in fact switch), press [<,>].

        o to use automatic track reference annotating, double-click on a
          rail.

        o to have information on a rail, keep your mouse pressed on it or
          double-click on it.

        o to move a rail or several rails, you must use 'Copy, Paste &
          Delete' possibilities.

        o to move around layout, place your mouse on the point which will be
          the new center of the layout on the screen, then press [C].

        o to move around layout, you can also use the arrows of the
          keyboard.

   * III.3. Editing FlexTracks :

     You have to be in 'FLEXIBLE' icons bar. You have the choice between two
     possibilities :

        o Rail to Rail : Choose the two rails and directions between those a
          flextrack will be added (follow the instructions). Then a
          flextrack is created; you can retrace it with mouse to shape it as
          you want.

        o Point to Point : Choose the two points and directions between
          those a flextrack will be added (follow the instructions). Then do
          as Rail to Rail.

     To have information on a flextrack, double-click on it.
     To delete a flextrack, press [ALT] and click on it simultaneously.
     To move a flextrack or several flextracks, you must use 'Copy, Paste &
     Delete' possibilities.

   * III.4. Creating a new Starting Point :

     You have to be in 'EDITOR' or 'TOOLS' icons bar.
     To create a new starting point, press simultaneously [SHIFT] and
     [SPACE] then choose the new direction and follow the instructions.

   * III.5. 'Copy, Paste & Delete' possibilities (Selection) :

     When in 'EDITOR', 'DISK ACCESS', 'FLEXIBLE', or 'TOOLS' icons bar,
     press [CTRL] key to go to the 'SELECTION' icons bar (or click on
     'Selection' icon when in 'TOOLS' icons bar).

     To add a rail or a flextrack to selection, click on it.
     To remove an item from selection, press [ALT] and click on it with left
     button.
     You can press [SHIFT] and left button and keep them pressed and move
     your mouse, to select several items more rapidly.
     You can also use 'Sector' icon and draw a rectangle in which everything
     will be selected.

        o To move selection to a rail :

          - you are asked to select a SELECTED RAIL : choose a rail from the
          ones you have selected (select also its direction)

          - then you are asked to select an UNSELECTED RAIL : choose a rail
          from the ones you have not selected (select also its direction)

        o To move selection to a point :

          - you are asked to select a SELECTED RAIL : choose a rail from the
          ones you have selected (select also its direction)

          - then you are asked to select a POINT : choose a point and the
          direction

        o What you must know when moving :

          - when you want to move the selection, there must be at least one
          selected rail. If not, create a dummy rail and add it to the
          current selection, then move selection to where you want and
          delete the dummy rail. (it maybe a bit strange and difficult, but
          try it!)

          - there is NO check if you move selection where there are already
          two links. So be careful !...

   * III.6. Changing Line-style and Width :

     You must be in 'EDITOR', 'FLEXIBLE', 'TOOLS' or 'SELECTION' icons bar.

        o When in 'EDITOR', 'FLEXIBLE' or 'TOOLS' icons bar, you can change
          line-style by selecting a rail or a flextrack, and pressing L-key
          simultaneously (press [MOUSE] and L-key simultaneously). Width can
          be changed as well by selecting a rail (or flextrack) and pressing
          B-key simultaneously.

        o When in 'SELECTION' icons bar, select the rails and flextracks you
          want, and press L-key to change their line-style or B-key to
          change their width. See part III.5.

        o When you select a rail or a flextrack, the default Line-style and
          Width are changed to selected ones. In the lower left part of the
          screen, you can see after the current reference what is the
          current Line-style and Width coded as follows :
          [number,2 char.,ON or OFF]
          - 'number' is an integer from 1 to 4 for Line-style. 1 is normal
          line, 2 is thin-dotted line, 3 is cut line, 4 is long-dotted line.

          - '2 char.' are 'Nm' for normal width, and 'Br' for thick width.
          - ON or OFF is the current state of drawing : complex (Double=ON)
          or fast (Simple=OFF).
          Examples : [2,Nm,ON] or [3,Br,OFF].

   * III.7. Adding rectangles and circles :

     You must be in 'ACCESSORIES' icons bar.

        o To add a rectangle, give its length and its width, then place it
          where you want (you can rotate it with [+,-] keys).

        o To add a circle, give its radius and place it where you want.

        o To move a rectangle or a circle, press [SHIFT] and click on it
          simultaneously, release [MOUSE] then [SHIFT], and move it with
          mouse.

        o To delete a rectangle or a circle, press [ALT] and click on it
          simultaneously.

   * III.8. Adding signals and turntables :

     You must be in 'ACCESSORIES' icons bar.

        o To add a signal, give its length, its width and colours, then
          place it where you want (you can rotate it with [+,-] keys).

        o To move a signal, do as for a rectangle.

        o To delete a signal, press [ALT] and click on it simultaneously.

        o To add a turntable, give its outer and inner radius, the number of
          direction, then link it to a rail.

        o A turntable consists in 3 circles and (number_of_direction+1)
          rails. Hence, you must use 'Copy, Paste & Delete' possibilities to
          move or delete a turntable as a whole. But you can delete a
          'turntable-direction' like a rail.

   * III.9. Annotating your layout :

     You must be in 'ANNOTATIONS', 'EDITOR' or 'TOOLS' icons bar.

        o When in 'ANNOTATIONS' icons bar :

          - to add an annotation, give your text with justification and
          frame.

          - to add an arrow, choose its starting and ending points (press
          [+,-,/,*] keys to change arrow-shape).

          - you can rescale all texts (icon 'Rescale Texts'), or just one
          text (double-click on it). The bigger is the value you give, the
          bigger is the text...

        o When in 'EDITOR' or 'TOOLS' icons bar, double-click on rail to
          insert the reference as an annotation.

   * III.10. Creating a Benchwork :

     You must be in 'BENCHWORK' icons bar and at least, one track should be
     inserted.

        o Rectangular Benchwork : This option is far the easiest one. You
          just give the dimensions of your benchwork : length and width.
          This creates a rectangular benchwork.

        o Complex Benchwork : Creating a complex benchwork is not trivial,
          but if you know enough about your real benchwork, it should be
          easier...
          The figures below should help you in understanding the way
          RAILWAYS computes the benchwork.
             + first, create an approximate shape of your benchwork
               (approximate lengths and angles). Prefer to define it
               clockwise (1,2,3,4) and to define the first length (1,2)
               horizontally otherwise you may have problems for next
               steps...

                 1     ---> define clockwise --->      2
                  +------------------------------------+
                  \                                    |
                   \                                    \
                    \                                    |
                     \                                    \
                      +------------------------------------+
                      4                                    3

             + second, click on 'Edit Measures' icon to redefine exact
               measures of benchwork (side lengths and angles). Click on the
               vertex 2. A,B,C points appear then give BC exact length, and
               ABC angle in degrees :

                 A                                    B
                 +------------------------------------+
                 \                              280deg |
                  \                                     \
                   \                                    |
                    \                                    \
                     +------------------------------------+
                                                          C

               For instance, if previous ABC angle is 280.0, and if you give
               270.0, the result should be (regardless BC length) as follow :

                 A                                    B
                 +------------------------------------+
                 \                              270deg|
                  |                                   |
                   \                                  |
                    |                                 |
                    +---------------------------------+
                                                      C

             + third and next steps, click on vertices (clockwise round) and
               give each BC exact length, and ABC angle in degrees.

             + if your length and angle measures are right, everything
               should be OK...

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

IV. CREATING A TRACKS' DATABASE (DAT File)

The DAT File is one of the most important files for a good work with
RAILWAYS. It contains all the characteristics of the tracks you use
(references, dimensions, types, ...). SETUPRLW provides you with saving your
tracks characteristics in a DAT file. Type SETUPRLW on DOS prompt and follow
the instructions.

I will be really pleased if you can mail or email me the DAT File(s) you
manage to make, in order to provide other RAILWAYS users with as many DAT
Files as possible.

First steps when creating a DAT File :

   * When asked to type 'NAME' of DAT file, remember that the extension of
     the file is .DAT without any alternative.

   * When asked to type 'NAME of TRACKS', type the name you want.

   * When asked to type 'MEASURE UNIT', type the unit you want with 2
     characters maximum. This measure unit is only a user constant and is
     not taken into account in calculations, so you can give 'cm', or 'in'
     or whatever.
     Above all, you do not have to convert inches to centimeters (or
     inverse), that is to say that you can keep your measures of tracks in
     the unit you want.

   * When asked to type 'REFERENCE', the first character is :
        o S for straight rails
        o C for curved rails
        o W for switches

   * Following characters are up to you, with a maximum of 12.

Database Conventions :

   * Straight, Buffer (1 part) :

             Rail :  ]--------[   -> *length


   * Curve-1 (1 part) :

             Rail : ]---\         -> *radius & UNSIGNED angle
                  angle  \[


   * Uncoupler (1 part) : can be straight (see Straight, Buffer) or curved
     (see Curve-1).
     Only a straight uncoupler is represented in this documentation and in
     SETUPRLW program...

                        _____
             Rail :  ]--|-x-|--[   -> (*length) or (*radius & UNSIGNED angle)
                        -----

   * Curve-2 (2 linked parts) :

             Rail : ]----------\
                     11111112222\[  -> *length1 (if 1 is straight),
                                2        or radius1 (if 1 is curved),
                                        angle1 (0 if 1 is straight),
                                       *length2 (if 2 is straight),
                                         or radius2 (if 2 is curved),
                                        angle2 (0 if 2 is straight).


   * Switch-2 (2-way switch, 2 parts) :

                     11111111
             Rail : ]--------[
                     22222\       -> *length1 (if 1 is straight),
                          2\[          or radius1 (if 1 is curved),
                                      angle1 (0 if 1 is straight),
                                     *length2 (if 2 is straight),
                                       or radius2 (if 2 is curved),
                                      angle2 (0 if 2 is straight).


   * Three-Way (3-way switch, 3 parts) :

                           2/[
                          2/
                     12121/11111
             Rail : ]-----------[
                     13131\         -> *length1 (if 1 is straight),
                          3\             or radius1 (if 1 is curved),
                           3\[          angle1 (0 if 1 is straight),
                                       *length2 (if 2 is straight),
                                         or radius2 (if 2 is curved),
                                        angle2 (0 if 2 is straight),
                                       *length3 (if 3 is straight),
                                         or radius3 (if 3 is curved),
                                        angle3 (0 if 3 is straight).


   * Asymmetric Three-Way (3-way switch, 4 parts) :
     Elements #1 and #2 are 'alone', whereas elements #3 and #4 are linked.

                              4/[
                             4/
                     33333334/
             Rail : ]------------[
                     1212\1111111  ->  *length1 (if 1 is straight),
                         2\             or radius1 (if 1 is curved),
                          2\[           angle1 (0 if 1 is straight),
                                       *length2 (if 2 is straight),
                                         or radius2 (if 2 is curved),
                                        angle2 (0 if 2 is straight),
                                       *length3 (if 3 is straight),
                                         or radius3 (if 3 is curved),
                                        angle3 (0 if 3 is straight),
                                       *length4 (if 4 is straight),
                                         or radius4 (if 4 is curved),
                                        angle4 (0 if 4 is straight).


   * Switch-3 (usually curved switch, 3 parts : 1 alone and 2 linked) :

                     11111112222
             Rail : ]----------\2
                     33333\     \[  -> *length1 (if 1 is straight),
                          3\[            or radius1 (if 1 is curved),
                                        angle1 (0 if 1 is straight),
                                       *length2 (if 2 is straight),
                                         or radius2 (if 2 is curved),
                                        angle2 (0 if 2 is straight),
                                       *length3 (if 3 is straight),
                                         or radius3 (if 3 is curved),
                                        angle3 (0 if 3 is straight).


   * Switch-4 (usually curved switch, 4 parts : 2 linked and 2 linked) :
     [not often used !]

                               2/[
                     1111111222/
             Rail : ]---------
                     33344\         -> *length1 (if 1 is straight),
                          4\[            or radius1 (if 1 is curved),
                                        angle1 (0 if 1 is straight),
                                       *length2 (if 2 is straight),
                                         or radius2 (if 2 is curved),
                                        angle2 (0 if 2 is straight),
                                       *length3 (if 3 is straight),
                                         or radius3 (if 3 is curved),
                                        angle3 (0 if 3 is straight),
                                       *length4 (if 4 is straight),
                                         or radius4 (if 4 is curved),
                                        angle4 (0 if 4 is straight).


   * Crossing (2 parts) :

                          2/[
                     111 2/  angle
             Rail : ]----/-----[
                        /2  111     -> *length1
                      ]/2              *length2
                                       *angle (1->2) (can't be 0)


   * Junction (2 parts) :

                          2/[
                     11  2/  angle
             Rail : ]-==///==-[
                        /2  11      -> *length1
                      ]/2              *length2
                                       *angle (1->2) (can't be 0)


Important notes :

   * Mathematics relation between characteristics :

        o Radius = Length / |Angle| / Pi * 180 (Pi = 3.14159...)

        o Remember that : (10.34 degrees) NOT EQUALS (10 degrees 34 minutes)
          Things like 10deg 34min must NOT be entered. You must convert it
          to a regular angle in degrees. For instance, 10deg 34min is equal
          to 10.56666666deg, because 0.56666666=34/60. (60min equals 1deg)
          Generally speaking, if angle=(Xdeg Ymin), then
          angle=(X+(Y/60))deg.

   * Advice :
     Try to give as many digits as you can after the math-point. For
     instance, give 1.3333333333 rather than 1.33. RAILWAYS calculations
     will be more accurate.

   * To change DAT File before running RLW, edit RLW-US.CFG and change DAT
     File field if necessary (See Configuration of RLW). Or while running
     RLW, go to 'Disk Access' icons bar and choose icon Load DAT.

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

Merging DAT files :

Railways can not load several DAT files at the same time. In order to use
several ones, it is possible to merge them into a single DAT file.

Here is the content of a DAT file (this is a text-file) :

   * first line : the header must be [FICHIER DE DONNEES POUR RAILWAYS v3.0]
   * second line : the name of tracks
   * third line : the measure unit
   * following lines are tracks' descriptions (in Railways format, of
     course)
   * two tracks' descriptions are separated by a blank line
   * last line : the end must be [FIN DE FICHIER DE DONNEES]

First, you must check if the measure unit is the same in every DAT file you
want to merge. If not, you couldn't merge them.
In addition, be sure that no reference-name is defined in more than one DAT
file. Otherwise, you may have problem in finding the right track when
running Railways.

Second, copy all DAT files you want to merge in a single file. For instance
the DOS command line : COPY FILES-1.DAT + FILES-2.DAT [+ ... ] TARGET.DAT
does it for you, assuming FILES-*.DAT are source files and TARGET.DAT is the
destination file.

Third, edit the TARGET.DAT file, and remove all lines containing header,
name of tracks and measure unit information (except the first three lines of
the files, of course), and remove all lines containing ends information
(except the last one).

The following example should help you. The TARGET.DAT file looks like this :

  [FICHIER DE DONNEES POUR RAILWAYS v3.0]
  Name of tracks AAA
  in

  S 9999
  1 1 11
   2.2200000000E+01  0.0000000000E+00

  W 12345
  2 1 44
   1.1100000000E+01  1.5000000000E+01
   1.1500000000E+01  1.5000000000E+01

  [FIN DE FICHIER DE DONNEES]                   (***)
  [FICHIER DE DONNEES POUR RAILWAYS v3.0]       (***)
  Name of tracks BBB                            (***)
  in                                            (***)
                                                (***)
  C 452546
  1 1 12
   1.1100000000E+01  3.0000000000E+01

  W 987654
  2 1 44
   1.1100000000E+01  1.5000000000E+01
   1.1500000000E+01  1.5000000000E+01

  [FIN DE FICHIER DE DONNEES]                   (***)
  [FICHIER DE DONNEES POUR RAILWAYS v3.0]       (***)
  Name of tracks CCC                            (***)
  in                                            (***)
                                                (***)
  W Cross 15
  2 1 24
   2.0000000000E+01  1.5000000000E+01
   2.0000000000E+01  1.5000000000E+01

  [FIN DE FICHIER DE DONNEES]

The lines with (***) must be deleted and the final TARGET.DAT should be :

  [FICHIER DE DONNEES POUR RAILWAYS v3.0]
  Name of tracks AAA
  in

  S 9999
  1 1 11
   2.2200000000E+01  0.0000000000E+00

  W 12345
  2 1 44
   1.1100000000E+01  1.5000000000E+01
   1.1500000000E+01  1.5000000000E+01

  C 452546
  1 1 12
   1.1100000000E+01  3.0000000000E+01

  W 987654
  2 1 44
   1.1100000000E+01  1.5000000000E+01
   1.1500000000E+01  1.5000000000E+01

  W Cross 15
  2 1 24
   2.0000000000E+01  1.5000000000E+01
   2.0000000000E+01  1.5000000000E+01

  [FIN DE FICHIER DE DONNEES]

You may wish to rename the tracks' name : simply change the second line of
TARGET.DAT.
The TARGET.DAT is the final DAT file containing several DAT files.

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

                 +-----------------------------------------------+
                 | DAT Files included in RAILWAYS v3.0.4 package |
                 +-----------------------------------------------+

                     Track's Name                      DAT File
                    --------------                    ----------
                       Arnold N                      ARNOLD-N.DAT
                    Atlas HO C100                  ATLAS-HO.DAT (*)
                       Atlas N                       ATLAS-N.DAT
                 Fleischmann Profi HO                FMANN-HO.DAT
                  Fleischmann N (#1)                 FMANN-N1.DAT
                  Fleischmann N (#2)                 FMANN-N2.DAT
                  Frateschi (Brazil)                 FRATESCH.DAT
                  Hornby OO Imperial               HRNBYOO1.DAT (*)
                   Hornby OO gauge                   HRNBYOO2.DAT
                       Jouef HO                    JOUEF-HO.DAT (*)
            Kleinbahn and Klein Modellbahn           KLEINBHO.DAT
                       LGB IIm                       LGB-IIM.DAT
               Lima HO 'Nickel Silver'               LIMA-HO1.DAT
           Lima HO 'Standard' or 'Blister'           LIMA-HO2.DAT
                     Lionel O-27                     LIONLO27.DAT
                    Maerklin Alpha                   MARKALPH.DAT
                  Maerklin-Huebner I                 MARKHUB1.DAT
                      Maerklin C                     MARKLINC.DAT
                      Maerklin K                   MARKLINK.DAT (*)
                      Maerklin M                   MARKLINM.DAT (*)
                      Maerklin Z                     MARKLINZ.DAT
                  Maerklin 3800-3900                 MARKMODM.DAT
                      Minitrix N                     MINITRXN.DAT
                   Peco HO Setrack                   PECO-HO.DAT
                        Peco N                        PECO-N.DAT
               Piko HO 'Standardgleis'               PIKO-HO.DAT
            Pilz TT standard #1 (Hungary)            PILZ-TT1.DAT
            Pilz TT standard #2 (Hungary)            PILZ-TT2.DAT
                     Rivarossi HO                    RIVA-HO.DAT
                     Roco Line HO                    ROCO-HO.DAT
                        Roco N                        ROCO-N.DAT
                Roco 2.5 (old tracks)                ROCO2-5.DAT
                  Zeuke TT (Poland)                  ZEUKE-TT.DAT

(*) This file was updated to support new uncoupler features. See
LASTNEWS.TXT.

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

V. DIGITAL CONTROL MODULE

The Digital Control Module is only for the Maerklin Computer Interfaces
6023, 6050 and 6051. It allows you to control 256 switches, signals and
uncouplers, and 80 locos (speed, functions, direction).
If you use Maerklin Interface 6023, be sure to set it to BINARY MODE.

After designing your layout, you can define your locos (address, name,
max.speed) and your electros (signals, switches and uncouplers addresses)
using the RAILWAYS interface. When running, you turn switches or signals
with a simple mouse-click and the retro-signalization shows you their active
states. You can accelerate, decelerate, start and stop the lights, or
uncouple (TeleX command) locos with the same simple operation thanks to a
multiple windows manager.

This module is divided into two icons bars. With the first one, you define
your locos and electros, and with the second one, you can run them.

   * V.1. Defining locos
     - click on 'Locos' icon (part 1)
     - give digital decoder address (from 1 to 80), the loco's and train's
     name and its maximum speed (from 1 to 14)
     - to update or delete a loco, give its address; then you are prompted :
     if you anwser 'YES', the loco will be deleted, otherwise you can enter
     new values (do not press [ESC] while updating because it will delete
     the loco)
     - press [SPACE] to display already defined locos

   * V.2. Defining switches, signals and uncouplers (electros)
     - click on 'Electros' icon (part 1)
     - undefined electros are blinking, others have special colours
     - click with LEFT mouse-button on an electro (blinking or not)
     - give its address(es) (from 1 to 256), its name (for annotating) and
     its RED or GREEN WIRE position for retro-signalization (very important
     - see your wiring)
     - the two addresses of a 3-way switch must be different
     - you must define and wire a 3-way switch as follows. Use 4 slots on a
     decoder : two Green and two Red (two addresses); set Green/Green to
     straight, and Red/Green - Green/Red for curves. Please note that
     RAILWAYS will never send Red/Red command for a 3-way switch.
     - give address -1 to undefine an electro
     - if you give the same address to several electros ("cross-addresses"),
     they will be turned together with the same command. Note that 3-way
     switches can not be defined with "cross-addresses"

   * V.3. Annotating electros
     - you must be in the first part of the Digital Module
     - if you are defining electros (blinking mode), press RIGHT
     mouse-button on an electro; give the text you want.
     - you can move, delete and rescale annotations with the mouse-button
     plus [SHIFT], [ALT] and double-click (like in 'Annotations' icons bar)
     when not defining electros.

   * V.4. Running the Digital Control Module
     Once you have finished with defining locos and electros, you can run
     them.
     If you use Maerklin Interface 6023, be sure to set it to BINARY MODE.
     - click on 'Check & Run' icon (part 1)
     - if you give the same address to several electros, you are prompted to
     continue or quit (it is just a warning)
     - choose the COM port for communication between PC and Interface
     - digital communication is suspended by default...
     - click on 'Run DCC' to enable communication
     - RAILWAYS will initialize your electros to the right position for a
     right retro-signalization... Two modes are available : one is said to
     be "fast but unsafe" and the second, "safe but slow". In fact, both are
     safe ! But the first one tries to initialize a maximum of coil-switches
     at the same time; if your Booster is not enough powerful, some of them
     may not be initialized since many coils can be activated at the same
     time.
     The second one controls one switch per command, so it is safer.

     For those interested in programming, here are the procedures in
     Meta-Langague :

     /*** "safe but slow" procedure ***/
        /* each electro receives its shutdown command after
           exactly the time 'shutdown_time' */
          forall Electro do
            send_switch_command(Electro);
            wait_for_time(shutdown_time);
            send_shutdown_command();
            next Electro
          endfor

     /*** "fast but unsafe" procedure ***/
        /* each electro receives its shutdown command between
           the time 'shutdown_time' and 'shutdown_time'*1.5 */
          forall Electro do
            begin_chronometer();
            while ( get_chronometer_time() < (shutdown_time/2) ) do
              send_switch_command(Electro);
              next Electro
            endwhile
            wait_for_time(shutdown_time);
            send_shutdown_command();
            next Electro
          endfor

     - Every loco is set to speed 0, without any active function
     - Press [SPACE] to create new loco-windows even if the Digital Module
     is suspended. You can create as many loco-windows as you want.
     - Most of the keys like [F1], [F3], [F4], ..., [Arrows], [ENTER] are
     still available in order to control the user interface (see section
     II.12)

   * V.5. Controlling locos
     Loco management is done thanks to windows you can put anywhere on the
     screen. The loco-window management is organised as a simple
     window-manager.

     A loco-window looks like this :

        +----------------------------------+
        |            Loco' name            |
        |----------------------------------|
        | F1 [ ] |   Train' name   |  <+>  |
        | F2 [X] |-----------------| Speed |
        | F3 [X] | <-> Address <+> |  <->  |
        | F4 [ ] | <->         <+> |       |
        |----------------------------------|
        |  STOP  |  < | >  | ON/OFF |  TX  |
        +----------------------------------+


     This window allows you to control the loco you want (decoder address),
     its speed, its functions (lights, TeleX,...), its direction.
        o loco selection (address) : click on <-> and <+> icons in the
          Address field
        o loco speed : click on <-> and <+> icons in the Speed field, or
          press left or right mouse-button on the speed value respectively
          to decrease or to increase loco speed
        o 1st function : click in ON/OFF field
        o other functions : click on F1, F2, F3, F4
        o stop loco : click in STOP field
        o loco direction : click in <|> icon field (this will also stop the
          loco)
        o TeleX command : click in TX field (the TeleX is active while the
          mouse is pressed)

     Press [SPACE] to create a new loco-window.
     To delete a loco-window, press [ALT] and click on it.
     To move a loco-window, click in 'Loco's name' field, maintain your
     mouse pressed and move. Release your mouse when you find the right new
     place...

   * V.6. Controlling electros
     Simply click on electros you want to turn. If several electros have the
     same address, they will all change colour and be turned at the same
     time.
     Please note that you can use left and right mouse-button in order to
     change 3-way switch positions.

   * V.7. Stopping the Digital Control Module
     Click on 'Suspend DCC' to stop the Module for a while, or press [ESC]
     or click on 'Emergengy Stop' to stop it and return to "part 1" icons
     bar (all loco-windows will be killed).
     Don't forget to save your layout as a DCC file, in order to save
     current electros positions before exiting the Digital Module.

   * V.8. Saving and loading Digital layouts
     You must save your work before exiting the Digital Control Module if
     you want to save digital data (addresses, etc) and above all if you
     want to use RAILWAYS as the Maerklin Memory : you can save layout
     configurations (electros states) in order to replay with them later.
     If you load a new Digital layout (.DCC), be sure to have saved your
     previous .LYO or .DCC layout, otherwise they will be lost...
     Click on the 'Load DCC' or 'Save DCC' icon in "part 1" icons bar.

   * V.9. Digital variables
        o ShutDown Time :
          This is the amount of time (in hundreths of a second) a coil is
          activated. The smaller is the time, the speeder is the control,
          but the coil may not have enough time to turn the switch... Hence
          this time should be optimized by yourself, from 1 to 500 hundreths
          of a second. Firstly, try 100, and decrease or increase the value
          if necessary...
          You can define ShutDown Time in RLW-US.CFG or while running
          RAILWAYS.
        o Data-Jam Time :
          This is the amount of time between two byte-packets. The smaller
          is the time, the speeder is communication.
          RAILWAYS does monitor CTS communication line, but with slow (or
          too fast) computers, my tests show that some packets may be lost.
          This must be adjusted from 1 to 100 hundreths of a second.
          Firstly, try 1, and increase the value if necessary...
          You can define the Data-Jam Time in RLW-US.CFG or while running
          RAILWAYS.
        o Secure ShutDown Time :
          This is the amount of time between a shutdown command and the next
          command. This time is involved in the Initialization (Safe but
          slow) and in the 3-way switch support. The smaller the time, the
          speeder is the control. Nevertheless, with a too small value, you
          may have trouble... This must be adjusted from 1 to 65535
          hundreths of a second. A value of 45 is said to be the inferior
          limit.
          You can only define the Secure ShutDown Time in RLW-US.CFG.

   * V.10. Restrictions
     Current version of RAILWAYS can not run 3-position signals and some
     complex switches like Maerklin K-2275 or Roco Single Slip.

     Nevertheless, 2-coil switches like Maerklin K-2275 can be controlled
     thanks to Bo Aslund's and Bjoern Gustavsson's idea : in MARKLINK.DAT,
     you can find 'W 2275', 'W 2275L DCC' and 'W 2275R DCC'. See also
     MARK2275.DAT and MARK2275.DCC.
     The 'W 2275' is the junction as defined in the Maerklin Catalog : you
     can use it if you don't need to control the K-2275 with Digital. If you
     want to use the Digital Module, you must use instead two 'W 2275L DCC'
     and two 'W 2275R DCC'.
     Give twice the same addresses to one 'W 2275R DCC' and one 'W 2275L
     DCC', as in the following figure.
     Here is the geometry of 'W 2275* DCC' versus 'W 2275' :
     - 'W 2275' is a Junction : L=22.50cm long and A=14.14333deg.
     - 'W 2275* DCC' is a Switch-2 : 11.25cm long [=L/2] and ( 88.84507107cm
     radius [=L/2/tan(A/2)] and +-7.21666deg [=A/2] ).

     You can find a figure in the PostScript documentation; this should help
     you. Get it from FTP or WWW.

     If you use other tracks with 2-coil junction, such as the Roco Single
     Slip, and if you use the Digital Module, you must define some extra
     parts in the DAT file with special geometry. Ask me via snail-mail if
     you have problem to find the right geometry. This is a real
     mathematical issue !

     There are some known little bugs in the loco-window management :
        o the window manager could be improved in terms of speed
        o when you put a loco-window on an electro (entirely or partly), and
          if you turn this electro, the electro is not necessarly updated on
          the screen. This is due to the fact that the window background
          image does not contain the new representation of the electro.
          Nevertheless, the electro is updated on your real layout !
        o if you quit the Digital Module and make particular operations on a
          curved switch in the Editor bar, then get back to the Digital
          Module, this switch may not be well drawn... To solve this
          problem, define its digital values again.

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

VI. CONFIGURATION OF RLW

RLW-US.CFG is the configuration file of RAILWAYS. It contains all the
default settings while running. For instance, you can choose your colours
for rails, flextracks, accessories, or your preloaded DAT File, EGA, VGA,
SVGA mode, Digital constants, etc.
Comment lines begin with the '#' character.

You will have to edit RLW-US.CFG if you want to change something.

Let's analyse it :

   * Header in French must be [FICHIER DE CONFIGURATION POUR RAILWAYS v3.0].
   * Last Updated : you can write what you want.
   * User Level : 1 for beginner, 2 for expert (this overrides a few warning
     messages)
   * Layout Designer : your name.
   * Preloaded DAT File : Name of the preloaded DAT file when running.
   * Rail Half-Width (x*100) : Must be mutliply by 100 (e.g.: if the real
     value is 1.5cm, type 150).
   * Graphics Mode (EGA, VGA, Vesa800, Vesa1024 or Vesa1280) : give the
     graphics mode you want.
   * Drives List ('AUTO' or 'A:,C:,E:' for instance) : List of the drives
     where files are searched. If AUTO, all drives found at initialization
     (even CD-ROMs) are taken into account.
   * Default Scale : the scale when first editing tracks.
   * Minimal Scale (1/x) : the smallest scale (inverse value : if the value
     is 0.01, type 100).
   * Maximal Scale : the biggest scale.
   * Scale Step (1/x) : step to increase or decrease scale (inverse value).
   * Windows Speed : number of frames to open windows. The bigger is the
     value, the slower it is.
   * Graphics Blinking Speed : no comment.
   * Menus Blinking Number : no comment.
   * Menus Blinking Time : no comment.
   * Double-Click Time : Time for double-clicking mouse menus. The bigger is
     the value, the slower it is.
   * Minimal Rail Search : when you click on a rail, the minimal distance
     for search is this value. The bigger is the value, the less you have to
     be close to the pointed rail to select it.
   * Rail Colour : See colour codes just below or at the end of RLW-US.CFG.
   * Switch Direction Colour : idem.
   * Rail Width Colour : idem.
   * Selected Direction Colour : idem.
   * Selection Colour : idem.
   * FlexTrack Colour : idem.
   * Accessory Colour : idem.
   * Annotation Colour : idem.
   * Screen Frame Colour : idem.
   * Grid Colour : idem.
   * Background Colour : idem.
   * Mouse Colour : idem.
   * Background BMP Colour : idem.
   * Help-Window Colour : idem.
   * Help-Texts Colour : idem.
   * Help-HyperTexts Colour : idem.
   * DCC Blinking Time : Blinking time delay when defining Electros.
   * DCC Colour : Electro colour when defining Electros.
   * DCC Switch Colour : Selected direction Colour of Electros.
   * DCC ShutDown Time (1..500) : ShutDown time for Electros (see Digital
     Control Module).
   * DCC Data-Jam Time (1..100) : Data-Jam time for RS232 communications
     (see Digital Control Module).
   * DCC Secure ShutDown Time (1..65535) : try to set this variable as small
     as possible, until you get trouble with Initialization and/or 3-way
     Switch Digital support... A value of "45" is said to be the limit (see
     Digital Control Module).
   * End (in French) must be [FIN DE FICHIER DE CONFIGURATION].

   * After this, you can type whatever you want.

Warning : do not introduce a zero value, otherwise an error message will
abort the program. Only introduce integers between 1 and 65535.

 Colour Codes to use in RLW-US.CFG :
  1 - Black            8 - DeepBlue
  2 - DarkGray         9 - Blue
  3 - LightGray       10 - LightBlue
  4 - White           11 - Purple
  5 - LightGreen      12 - Brown
  6 - Green           13 - Red
  7 - DarkGreen       14 - Yellow

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

VII. MISCELLANEOUS

   * VII.1. Window menu & read menu :

        o Window menu : Use either mouse or keyboard to select the item you
          want.
             + with mouse :
                  + you can double-click on the chosen item.
                  + click on arrow-up, arrow-down, OK icon to select.
                  + click outside the window to cancel.
             + with keyboard :
                  + use arrow-up or arrow-down to choose.
                  + press [SPACE] or [ENTER] to validate.
                  + press [ESCAPE] to cancel.

        o Read menu :
             + only use keyboard.
             + type the string you want with usually a limit of 255
               characters.
             + correction with [BACKSPACE].
             + erase all with [SHIFT]+[BACKSPACE].
             + press [ENTER] to validate.
             + press [ESCAPE] to cancel.

   * VII.2. About error messages :

        o Bad configuration file ... : check file RLW-US.CFG. It must be in
          the same directory as RLW.EXE.
        o Not enough memory : it is a pity ! Buy some RAM !
        o Graphics mode not initialized : EGA, VGA or VESA-SVGA card is
          required.
        o Graphics icons file ... : check if 'ICONES.GPH' is in the same
          directory as RLW.EXE.
        o Presentation image file ... : check if 'IMAGE.FND' is in the same
          directory as RLW.EXE or if command line /Iname_of_file is valid.
        o Mouse driver is not installed : MS-Compatible mouse is required.
          Its driver must be loaded beforehand (usually MOUSE.COM or
          MOUSE.SYS).

   * VII.3. Programming :

     This software package is written in Borland Pascal 7.0 & Assembler for
     some very fast procedures. It contains more than 30.000 lines and took
     me a long time to develop. Some people asked me for the source code,
     but I don't want to give it for the moment.
     If you find Runtime Error in RAILWAYS, please report them to me by
     giving its number (XXXX:YYYY). So I can improve this software...
     Please report also the bugs you may find... Thanks a lot.

   * VII.4. Special thanks

     I would really like to thank Yvan CORDILLET, Fabien GELENNE, Yann
     LEFABLEC and Cyril MATHEY (some friends at the ENAC (my School)), who
     lend their PC-computers to me and also the ENAC administration which
     allows me (and other people) to work with their PC-computers and HP-UX
     workstations even at night! Without these 'helps', RAILWAYS development
     would not have been possible : I don't have any PC-computer at home !!!
     Most of the time, I work with a pen and a sheet of paper...

     Special thanks to Bo ASLUND and Bjoern GUSTAVSSON from Sweden whose
     helps and suggestions were always appreciated, especially for the
     BetaTest of the Maerklin Digital Module. The loco management (with
     multiple windows) is largely inspired by their ideas.

     I really thank those who have translated the user interface of RAILWAYS
     :
        o French : by me...
        o English : by me...
        o Dutch : Nic POT
        o German : Guido KENSCHE
        o Swedish : Bjoern GUSTAVSSON
        o Danish : Lars LINDHARD

     I would also like to thank people who support me, and especially the
     following persons who have sent me some DAT Files :

        o Bjoern Gustavsson and Bo Aslund (Sweden) :
             + ROCO-HO.DAT - enhanced version (compared with RLW 2.04)
             + FMANN-HO.DAT
             + MARKHUB1.DAT - corrected version (compared with RLW 2.04)
             + ROCO2-5.DAT
             + MARKLINK.DAT - enhanced version (compared with RLW 2.04)
             + MARKLINC.DAT
             + MARKMODM.DAT

        o Rudolf Wansorra (Germany) :
             + MARKLINK.DAT (1)

        o Duane L. Rezac (USA) :
             + ATLAS-HO.DAT (1)

        o Dietmar Beham (Germany) :
             + ARNOLD-N.DAT

        o Davei Ingles (UK) :
             + PECO-N.DAT

        o Preston Bricker (USA) :
             + ATLAS-HO.DAT (2)
             + ATLAS-N.DAT

        o Alfredo Sola Perez (Spain) :
             + ROCO-N.DAT

        o Harald Kuester (Germany) :
             + FMANN-N1.DAT

        o Johan Sunter (Holland) :
             + FMANN-N2.DAT

        o Luis Marcondes (Brazil) :
             + FRATESCH.DAT

        o Arnd Gronenberg (Germany) :
             + LGB-IIM.DAT

        o Dan Bruch (USA) :
             + LIONLO27.DAT

        o Nic Pot (Holland) :
             + MARKALPH.DAT

        o Gabor Bejczi (Hungary) :
             + PILZ-TT1.DAT
             + PILZ-TT2.DAT

        o Jean-Marc Lugrin (Swiss) :
             + MARKLINZ.DAT - enhanced version (compared with RLW 2.04)

        o Wojciech Hilczer (Poland) :
             + ZEUKE-TT.DAT

        o Steve Loft (United Kingdom) :
             + HRNBYOO2.DAT

        o Mario Durante and Luca Seria (Italy) :
             + ARNOLD-N.DAT - enhanced version (compared with RLW v3.0.1)
             + KLEINBHO.DAT
             + LIMA-HO1.DAT
             + PECO-HO.DAT
             + PIKO-HO.DAT
             + RIVA-HO.DAT

        o Andrew Stephenson (United Kingdom) :
             + HRNBYOO1.DAT

        o Girolamo Virgadamo (Italy) :
             + LIMA-HO2.DAT

        o Steven Scholten (Holland) :
             + MINITRXN.DAT

     These DAT Files are included in this version of RAILWAYS, plus the ones
     I made.

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

VIII. MAIN EXPECTED IMPROVEMENTS FOR NEXT VERSIONS

   * Digital support for Reed contacts s88 (6088) from Maerklin.
   * Artificial Intelligence Module for automated locos and electros
     control.
   * DCC-NMRA support.
   * Support for sounds of trains.
   * X11 and Windows95 port...
   * Please send me a message if you have any suggestion. Or to correct my
     English !

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

* End of Document *
