home *** CD-ROM | disk | FTP | other *** search
/ Brotikasten / BROTCD01.iso / atari / hdemul.txt < prev    next >
Text File  |  1992-11-02  |  65KB  |  1,281 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                           ATARI 8 BIT HARD DISK EMULATOR
  9.  
  10.                                     Version 1.2
  11.  
  12.                                     USER GUIDE
  13.  
  14.                                    November 1991
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.           Acknowledgements:
  44.  
  45.                I would  like to  acknowledge the  excellent work of  Nick
  46.                Kennedy  in  pioneering  the  design of  the  hardware  to
  47.                connect the ATARI to  a PC and without  which this program
  48.                could  never  have  been   started.  Whilst  this  program
  49.                contains   entirely  different   code  to   Nicks'  SIO2PC
  50.                software  it retains  the  look and  feel of  his original
  51.                program so all praise to him for the original idea.
  52.  
  53.                The main menu  program was written and compiled using  the
  54.                Microsoft BASIC  Professional Development System and  uses
  55.                Microsoft run time library code during its execution.
  56.  
  57.                The  serial  port handler  and  command  interpreter  were
  58.                developed using Borland Turbo Assembler.
  59.  
  60.                Debugging  would  not   have  been  possible  without  the
  61.                extensive use of Microsofts' Code View product.
  62.  
  63.  
  64.                                          1
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.           1. Overview . . . . . . . . . . . . . . . . . . . . . . .     3
  72.  
  73.           2. Installation.  . . . . . . . . . . . . . . . . . . . .     4
  74.  
  75.           3. Starting the Emulator. . . . . . . . . . . . . . . . .     4
  76.                3.1 No configuration files.  . . . . . . . . . . . .     5
  77.                3.2 Default configuration file exists. . . . . . . .     5
  78.                3.3 Named configuration file.  . . . . . . . . . . .     5
  79.  
  80.           4. Screen Display . . . . . . . . . . . . . . . . . . . .     5
  81.  
  82.           5. The Main Menu. . . . . . . . . . . . . . . . . . . . .     6
  83.                5.1 F - Create Floppy Disk.  . . . . . . . . . . . .     6
  84.                5.2 H - Create Hard Disk.  . . . . . . . . . . . . .     7
  85.                     5.2.1 SpartaDos X.  . . . . . . . . . . . . . .     7
  86.                     5.2.2 SpartaDos 3.  . . . . . . . . . . . . . .     8
  87.                     5.2.3 MyDos 4.50.   . . . . . . . . . . . . . .     8
  88.                5.3 L - Load Disk  . . . . . . . . . . . . . . . . .     8
  89.                5.4 U - Unload Disk. . . . . . . . . . . . . . . . .     9
  90.                5.5 X - Exchange Disk. . . . . . . . . . . . . . . .     9
  91.                5.6 R - Make Disk Read Only. . . . . . . . . . . . .     9
  92.                5.7 W - Enable Write to disk.  . . . . . . . . . . .     9
  93.                5.8 S - Set Port Number. . . . . . . . . . . . . . .     9
  94.                5.9 D - Display directory. . . . . . . . . . . . . .     9
  95.                5.10 Q - Quit Program. . . . . . . . . . . . . . . .    10
  96.                5.11 T - Toggle Line Status Display.   . . . . . . .    10
  97.                5.12 C - Create/Amend Configuration  . . . . . . . .    10
  98.                5.13 P - Print Through Mode. . . . . . . . . . . . .    10
  99.  
  100.           6. Configuration Files. . . . . . . . . . . . . . . . . .    11
  101.                6.1 Creating a Configuration File. . . . . . . . . .    12
  102.                     6.1.1 Set port address. . . . . . . . . . . . .    12
  103.                     6.1.2 Load drives D1: - D8:.  . . . . . . . . .    12
  104.                     6.1.3 Default Directory Specification.  . . . .    12
  105.                     6.1.4 Time-outs.  . . . . . . . . . . . . . . .    13
  106.                     6.1.4 Display Status Line.  . . . . . . . . . .    14
  107.                     6.1.5 Loading an existing configuration file. .    14
  108.                     6.1.6 Saving your changes.  . . . . . . . . . .    14
  109.                     6.1.7 Exit. . . . . . . . . . . . . . . . . . .    14
  110.  
  111.           7. Time and Date Support. . . . . . . . . . . . . . . . .    15
  112.  
  113.           8.File Transfer Utilities.  . . . . . . . . . . . . . . .    16
  114.                8.1 The PCTFR program. . . . . . . . . . . . . . . .    16
  115.                8.2 The File Transfer Interface. . . . . . . . . . .    17
  116.  
  117.           9.Problems  . . . . . . . . . . . . . . . . . . . . . . .    19
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                          2
  129.           1. Overview
  130.  
  131.                HDEMUL is a  program which runs on an IBM PC or compatible
  132.           and uses the hard disk  of your PC to provide  between 1 and  8
  133.           disk drives for your 8 bit ATARI.
  134.  
  135.                Connection between  the ATARI and  PC is  made through the
  136.           SIO2PC hardware adapter  which joins the ATARI SIO port  to the
  137.           PC serial  port. This  hardware was  designed by  a guy  called
  138.           Nick Kennedy and is described in the SIO2PC distribution pack.
  139.                Please note  that  the SIO2PC  software  and hardware  are
  140.           Shareware products  and  the  appropriate royalties  (currently
  141.           $10)  should be  sent  to Nick  Kennedy, 300  South  Vancouver,
  142.           Russellville, AR 72801 before using them.
  143.  
  144.                HDEMUL is  different to SIO2PC  in one  important respect.
  145.           SIO2PC  uses PC  RAM to  provide simulated  disk  drives up  to
  146.           184K. This  restricts the  user to 3  or 4 drives  depending on
  147.           the amount  of spare  RAM available. HDEMUL actually  reads and
  148.           writes to  the hard  disk of  the PC. It  can provide  up to  8
  149.           drives and each drive can support  a disk up to 16 Megabytes in
  150.           size. The size of  the free space on your  PC disk is  the only
  151.           limitation with HDEMUL.
  152.  
  153.                The interface runs at 19.2 KBits per second,  which is the
  154.           standard ATARI  SIO rate. Its performance  (on my PC at  least)
  155.           is faster than a 1050 drive  but very much slower than a proper
  156.           parallel hard disk interface.
  157.  
  158.                The   program  performs  ALL   disk  accesses   via  MSDOS
  159.           interfaces and  should not represent  a hazard  to the rest  of
  160.           your PC  software. It will  support any  valid MSDOS path  name
  161.           and can be used with PC floppy drives. 
  162.  
  163.                The  program  will  require MSDOS  2.0  or  later.  It was
  164.           tested using  both MSDOS 3.3  and DRDOS  5 running on  an 80386
  165.           processor  at 16 MHz.  It was also  tested with  the clock rate
  166.           slowed to 8MHz without significant loss of performance. 
  167.  
  168.                At the  ATARI end no additional  software is required  for
  169.           normal disk operations. The interface is at the  level provided
  170.           by a  standard drive e.g.  read sector,  write sector, etc.  It
  171.           should  thus be  compatible with  all  normal software  and all
  172.           versions of DOS.
  173.           The  program will  NOT support  ultra speed  IO or any  form of
  174.           copy  protection (bad sectors, phantom  sectors, sector skewing
  175.           etc.).  It will support  all 1050  drive commands together with
  176.           extensions to allow double density and hard disk working. 
  177.  
  178.           The program  was tested with DOS  2.0, DOS 2.5, SpartaDos  3.1,
  179.           SpartaDOS  X and MYDOS 4.5. It has been  used with a fair range
  180.           of  word  processors,  sector  editors  and  unprotected  games
  181.           programs without problems.
  182.  
  183.           I  do not  own  an XF551  drive  and  have absolutely  no  idea
  184.           whether the program is compatible with this device.
  185.  
  186.           The emulator  can be used  in conjunction  with real drives  on
  187.           the  same SIO  chain provided  there is  no  clash between  the
  188.           drive number of a real and emulated drive.
  189.  
  190.  
  191.  
  192.                                          3
  193.           The  following  facilities  are  available  within  the  HDEMUL
  194.           program:-
  195.  
  196.                Emulation  of  92K  single,  133K  Dual  and  184K  double
  197.                density drives.
  198.  
  199.                Hard disk  emulations of 1,  5, 10  or 16Mbyte disks  with
  200.                SpartaDos or MyDos.
  201.  
  202.                Up to 8 simultaneous drives in any combination of sizes.
  203.  
  204.                Print through from your ATARI to  an attached PC  printer,
  205.                the PC screen or a PC file.
  206.  
  207.                Write protect (via MSDOS) of your disk images.
  208.  
  209.                Configuration files  to allow you  to start  up with  your
  210.                preferred options preset.
  211.  
  212.                Ability to  load, unload or  interchange disk  files while
  213.                the program is running.
  214.  
  215.                The  ability to  automatically  set  your SpartaDos  clock
  216.                from the PC clock.
  217.  
  218.                File transfer from MSDOS to ATARI format and vice versa.
  219.  
  220.           If  you have  access to  a PC  with free  disk space  then this
  221.           program will provide an alternative to using real  810, 1050 or
  222.           hard disk  drives without loss  of compatibility  with anything
  223.           other than copy protected disks.
  224.  
  225.           2. Installation.
  226.  
  227.                The  software  is  distributed  in  MSDOS  format  and  is
  228.           contained within the self extracting archive file HDINST.EXE. 
  229.  
  230.           To  install the  program  copy  the HDINST.EXE  file  into your
  231.           chosen  PC  directory  and  simply   type  HDINST.  The   files
  232.           contained   within    HDINST.EXE   will   now   be    extracted
  233.           automatically and should appear as:-
  234.  
  235.             HDEMUL.EXE      The main program
  236.             HDEMUL.UG       This user guide
  237.             MYDOS.DSK       The MYDOS 4.50 disk image
  238.             
  239.           The  HDINST.EXE  archive  file  may  now  be  removed from  the
  240.           working directory.
  241.  
  242.           3. Starting the Emulator.
  243.  
  244.                The emulator can  start up in 3 ways depending  on whether
  245.           any  configuration  files  exist   in  the  working  directory.
  246.           Configuration files have  the file extension .CFG and are  used
  247.           to preset the emulators' working parameters. Details of how  to
  248.           create  a configuration  file and  which parameters  it affects
  249.           are in section  6. When  you start the  emulator for the  first
  250.           time there will be no configuration files available.
  251.  
  252.  
  253.  
  254.  
  255.  
  256.                                          4
  257.                3.1 No configuration files.
  258.  
  259.                     Type   HDEMUL  in  the   working  directory  and  the
  260.                emulator will  load and start. The  main menu screen  will
  261.                appear followed  by a prompt at  the bottom of the  screen
  262.                asking you to enter the COM (serial) port  number that you
  263.                wish to  use. Only numbers  between 1  and 4 or  M will be
  264.                accepted. Enter  the  number appropriate  to  the port  to
  265.                which your SIO2PC hardware is attached. If you  have a non
  266.                standard PC whose  serial port address does not correspond
  267.                to the normal values  (COM1=03F8h 2=02F8h 3=03E8h 4=02E8h)
  268.                then type M. 
  269.                     Typing 1  to 4 will cause  the program to  initialise
  270.                the appropriate port and enter the main program.  Typing M
  271.                will bring  up a second prompt  asking for the four  digit
  272.                hexadecimal value of your port  address. All 4  digits are
  273.                required, so  use  leading zeros  if  necessary. Only  the
  274.                values  1 to  9 and  A to  F will  be accepted.  After the
  275.                fourth digit  the  program will  initialise  the port  and
  276.                enter the main program.
  277.  
  278.                3.2 Default configuration file exists.
  279.  
  280.                     When  the emulator is started by typing HDEMUL on its
  281.                own it first  searches the working directory for a default
  282.                configuration file called  HDEMUL.CFG. ( See section 6 for
  283.                instructions on  how to create such  a file). The  program
  284.                will   start  up,   initialise   the  COM   port,load  any
  285.                identified  disk files and  then move  to the main program
  286.                loop automatically if the default file  is found. It  will
  287.                behave as in 3.1 if no file is found.
  288.  
  289.                3.3 Named configuration file.
  290.  
  291.                Configuration  files  can   be  created  with   any  valid
  292.                filename in order  to allow you to start the  program with
  293.                a  variety  of  parameters  (see  section  6).  To  use  a
  294.                different  configuration file  simply type HDEMUL FILENAME
  295.                and the  program will behave  as in 3.2  but will use  the
  296.                FILENAME.CFG parameters.
  297.  
  298.                     With this facility  you may  create a number of  .CFG
  299.                files for different purposes. For  example you may  create
  300.                one which  loads your word  processor into  D1, your  text
  301.                files  into D2  and sets  the COM  port. If you  then name
  302.                this WP.CFG you  can type HDEMUL WP and the  emulator will
  303.                set itself  up ready to start your word processing session
  304.                without any intervention from yourself.
  305.  
  306.  
  307.  
  308.  
  309.           4. Screen Display.
  310.  
  311.                The  screen may  be divided  into 4  areas.  The top  part
  312.                contains all of the main menu options (see section 5). 
  313.  
  314.                The next part  contains the drive numbers. When a  file is
  315.                loaded  into a  drive the filename, size  and density will
  316.                be  displayed against  the drive  number. In  addition the
  317.                letters RO will appear if the file is write protected.
  318.  
  319.  
  320.                                          5
  321.                The apparently empty area below the drive numbers is  used
  322.                for  two purposes. All  prompts to  which you must respond
  323.                will appear in this area and  any error messages  detected
  324.                within the emulator  program will also be shown here.  The
  325.                error messages  will display for a  time between 1 and  59
  326.                seconds before disappearing. The default  is 1 second  but
  327.                this  may  be changed  from  the  configuration menu  (see
  328.                section 6).
  329.                Note that  these errors refer to  the operation of the  PC
  330.                program and  do not relate  to the ATARI  or the  SIO bus.
  331.                Typically they will  be cheerful little missives like disk
  332.                full  or invalid filename  and will  occur when  you least
  333.                want them.
  334.  
  335.                The final area is the line status display.  This tells you
  336.                what the  ATARI has  just sent to  the PC  in its  command
  337.                buffer. The first entry is the command number  (in hex and
  338.                as an ASCII character), the second is  the device identity
  339.                to which  it refers, the third  and fourth are the  values
  340.                of AUX2  and  AUX1 respectively  and  finally the  command
  341.                line status  (high or low)  is displayed.  Device identity
  342.                and auxiliary values are displayed in hex.
  343.                The purpose of  the status display is to keep  you abreast
  344.                of  the  SIO bus  activity.  Note  that AUX2  deliberately
  345.                appears before AUX1. This is  simply because these  fields
  346.                are  predominately  used  as sector  identities  with AUX2
  347.                containing the most  significant part. By displaying  AUX2
  348.                first you can  determine the sector address without having
  349.                to make a mental juxtaposition.
  350.                Typically you will see
  351.  
  352.                      Command:52  (R) Device:31  Aux2: 01  Aux1:68 Command
  353.                     Line: H
  354.  
  355.                which means  the ATARI  is trying  to read  from drive  1,
  356.                sector  168h.  The Command  line  actually  flickers  very
  357.                rapidly between H  and L. In practice the display  will be
  358.                predominately H  but will flick onto L momentarily in time
  359.                with the command frames. If it  ever shows L  consistently
  360.                then you have lost contact with the ATARI bus.
  361.  
  362.           5. The Main Menu.
  363.  
  364.                     The main menu options are  available at any time once
  365.                the  COM port  has been  initialised. They  should NOT  be
  366.                used while an  SIO data transfer is in progress.  The main
  367.                menu  routines run  independently of  the SIO  handler and
  368.                the program will stop polling the SIO line  while the menu
  369.                options are  being actioned which will  result in loss  of
  370.                data.
  371.  
  372.                     Many of the  options require additional input. If you
  373.                wish  to abandon an action during the  input sequence then
  374.                press ESCAPE  to return you  to the  main menu and  cancel
  375.                the action.
  376.  
  377.                5.1 F - Create Floppy Disk.
  378.  
  379.                     Each pseudo floppy disk that  you create is  actually
  380.                an  MSDOS file  which will  be 16  bytes  longer than  the
  381.                capacity of the disk that you specify. The  first 16 bytes
  382.                contain header information for the  emulator to use and is
  383.  
  384.                                          6
  385.                normally transparent to you.
  386.  
  387.                     To create   a floppy  disk choose  the F option.  You
  388.                will then be  prompted for the drive number that  you wish
  389.                to assign to the disk. Enter a number between 1  and 8. If
  390.                you choose  a drive which already  has a disk assigned  to
  391.                it  then  the  new  disk  will  replace  the  existing one
  392.                without damage to the original.
  393.                     The emulator  then asks you  to choose  1 of 3  sizes
  394.                for the  disk. Type 1  for a  92K single density,  2 for a
  395.                133K dual density or 3 for a 184K double density disk.
  396.                     Next the  program will ask  you to  assign a name  to
  397.                the  disk. As this name will be the MSDOS filename for the
  398.                disk image it is necessary to obey the  normal MSDOS rules
  399.                in choosing the name. It  is also very sensible to give it
  400.                a meaningful  name and to  use a  standard extension (.DSK
  401.                for  example) such  that you  can readily  distinguish the
  402.                disks  in your directory listings.  Complete your filename
  403.                with a  carriage return and  the program  will set up  the
  404.                MSDOS  file, clear  all the  entries in  it  to zero  (the
  405.                progress of which will  be displayed on a thermometer) and
  406.                load the file into the chosen disk drive.
  407.  
  408.                     At this  stage you MUST use  your ATARI based DOS  to
  409.                format the  disk as if you had just put a  new disk into a
  410.                physical drive.  The actual ATARI  format request  will be
  411.                ignored by  the emulator but your  ATARI DOS will then  go
  412.                on to  build  a directory  structure on  the disk  without
  413.                which it will  be unusable. Take care to match  the format
  414.                request  to  the size  of  the  floppy disk  or  you  will
  415.                encounter problems.
  416.  
  417.                5.2 H - Create Hard Disk.
  418.  
  419.                     To create a hard disk image type H.  The program will
  420.                ask  which drive you wish  to assign to  the disk and then
  421.                prompt you  for the size  of the  disk. Choose  1 for a  1
  422.                Mbyte disk, 2  for 5Mbytes, 3  for 10Mbytes and  4 for  16
  423.                Megabytes. Remember  that the disk  image will  be created
  424.                at full  size so  make sure that  you have enough  room on
  425.                your PC disk for the new file.
  426.                     The program will  then prompt for  the disk file name
  427.                which must obey  the normal  MSDOS rules  for file  names.
  428.                Once this  is entered the  program will  create the  MSDOS
  429.                file and  clear the  entries to zero.  A thermometer  will
  430.                display the progress  of the clearing operation which will
  431.                take quite a long time, especially for a  16MByte disk. Be
  432.                patient, as long  as the thermometer is rising you  can be
  433.                sure that the program has not stalled. 
  434.                     Once  the file  has been  initialised it MUST  have a
  435.                directory  structure written  to it.  This is  achieved by
  436.                using either  the  format or  build  directory command  of
  437.                your ATARI  DOS. Obviously you must  be using a DOS  which
  438.                will  support hard  disks  (ie  not ATARI  DOS  2.5).  The
  439.                method  for  SpartaDos  X,  SpartaDOS  3.2  and  MYDOS  is
  440.                described below.
  441.  
  442.                5.2.1 SpartaDos X. 
  443.  
  444.                     Users  of  the  SpartaDos  X  cartridge  should  type
  445.                FORMAT and wait for the fancy box to  appear. Identify the
  446.                disk unit  number for the hard  drive and you should  see,
  447.  
  448.                                          7
  449.                for a 1  Meg disk, 4096 sectors, 1048576 Bytes  and Format
  450.                n/a appear in  the box. Obviously for other sizes  of disk
  451.                the values will  vary. Set the Volume name if  desired and
  452.                then  press B  to Build  Directory and  you  will get  the
  453.                message:
  454.                     "Unit is NOT a floppy disk. Are you sure?".
  455.                Press Y for Yes and you will get the message:
  456.                     "Caution. Destroys Old Data. Are You sure?"
  457.                Press  Y again  and  SpartaDos  will then  write  out  the
  458.                appropriate sectors to make the disk useable.
  459.  
  460.                5.2.2 SpartaDos 3.2
  461.  
  462.                SpartaDos  3.2 users  should  run the  HDINIT.COM program.
  463.                The program will prompt with:
  464.                     "Hard Drive to Format (3 or 4)?".
  465.                If your  drive is neither  3 nor 4  then use the  eXchange
  466.                disk option  on the emulator so  that it is. Respond  with
  467.                the appropriate drive number and the program will ask:
  468.                     "Volume Name?".
  469.                Type in the volume name and you will see:
  470.                     "Initialize - Are you sure?".
  471.                Respond with Y and SpartaDos will initialize the  disk and
  472.                build the directory structure for you.
  473.  
  474.  
  475.                5.2.3 MyDos 4.50. 
  476.  
  477.                This method  probably works with  other versions  of MYDOS
  478.                which support high capacity drives but  I can only  verify
  479.                it for 4.50.
  480.  
  481.                Choose O -  Change Configuration from  the menu and follow
  482.                this sequence:
  483.                     Drive No. or return?       type in drive number
  484.                     Remove Drive?              type N for no.
  485.                       Is Drive Configurable?     type Y for yes
  486.                     High Capacity Drive?       type Y for yes
  487.                     Drive Size (sectors)       type 4096 for 1 MByte
  488.                                                20480 for 5 Mbyte
  489.                                                40960 for 10 MByte
  490.                                                65535 for 16MByte
  491.  
  492.                Now choose I- Initialize  Disk from the  menu, choose  the
  493.                appropriate drive and  type Y to format and it  should all
  494.                happen for you.
  495.  
  496.                5.3 L - Load Disk
  497.  
  498.                     The  load disk option  allows you to mount your MSDOS
  499.                file  images on  one  of the  8  drives. The  protocol  is
  500.                simple, specify the drive number  and MSDOS filename  when
  501.                asked. Note  that the file  name can  contain a full  path
  502.                specification if you  want to load a file from  other than
  503.                the current  directory.  You may  load files  from any  PC
  504.                drive, including floppies.
  505.                     If the  file specified  is not  an  HDEMUL or  SIO2PC
  506.                disk file then an error message will be  displayed and the
  507.                load aborted. If the file does  not exist you will be  re-
  508.                prompted for the file name. Escape will return  you to the
  509.                main menu from the filename prompt.
  510.  
  511.  
  512.                                          8
  513.                5.4 U - Unload Disk.
  514.  
  515.                     Unload disk will  prompt you for  a drive  number and
  516.                then close  the associated MSDOS  file. The  drive display
  517.                will  be cleared  and the emulator will  no longer respond
  518.                to commands for that drive.
  519.  
  520.                5.5 X - Exchange Disk.
  521.  
  522.                     Typing X  for exchange disk  will cause  the emulator
  523.                to prompt  you separately  for  the two  drive numbers  on
  524.                which  the disks that  you want  swapped are  mounted. The
  525.                emulator will  close both  files and re-open  them on  the
  526.                designated  drives.  It is  permissible  to  swap with  an
  527.                empty drive or even swap  two empty drives if you have got
  528.                time to waste.
  529.  
  530.                5.6 R - Make Disk Read Only.
  531.  
  532.                     With all  these disk drives floating about it is very
  533.                easy to  write to the  wrong drive from  time to  time. To
  534.                protect your program disks from being  over-written select
  535.                option R from the menu. This option will prompt you  for a
  536.                drive number  and  then  make  the  MSDOS  file  currently
  537.                loaded on  that  drive read  only.  This will  permanently
  538.                change  the MSDOS file attribute and the  file will remain
  539.                read-only until  you explicitly change  it. The  file will
  540.                display the letters  RO after it whenever it is  loaded to
  541.                remind you that it is read only.
  542.  
  543.                The action is the same as executing the MSDOS command:
  544.                     ATTRIB +R filename
  545.  
  546.                5.7 W - Enable Write to disk.
  547.  
  548.                     Option W provides  you with a means of reversing  the
  549.                effect of option  R. Writing to the MSDOS file  is enabled
  550.                and the file attributes are permanently changed.
  551.  
  552.                The action is the same as the MSDOS command:
  553.                     ATTRIB -R filename
  554.  
  555.                5.8 S - Set Port Number.
  556.  
  557.                     Option  S  allows  you  to  change  the  serial  port
  558.                address during  a session.  You will be prompted  to enter
  559.                the  new COM  port number (between  1 and 4) or  type M if
  560.                you  have a  non-standard  PC and  wish  to set  the  port
  561.                address manually.  Typing 1 to 4  will cause the new  port
  562.                to  be initialised immediately  and return you to the main
  563.                menu. Typing M will bring up a second  prompt inviting you
  564.                to type  in the  4 digit  hexadecimal address  of the  COM
  565.                port. Only the digits 1 to 9  or A to F will  be accepted.
  566.                You  must type  all  4 digits  so  use leading  zeroes  if
  567.                necessary.   On  the   fourth  digit   the  program   will
  568.                initialise the address and return to the main menu.
  569.  
  570.                5.9 D - Display directory.
  571.  
  572.                     The directory  option  is provided  to  allow you  to
  573.                look  at the  contents  of  the  PC disk(s).  The  default
  574.                filespec is preset in  the emulator and  is equivalent  to
  575.  
  576.                                          9
  577.                current directory:*.*.  That is  you will  see all of  the
  578.                files in  the current directory. Having pressed D a screen
  579.                will appear that  tells you what  the current  filespec is
  580.                set  to and  inviting you  to accept  it  with a  carriage
  581.                return or  type in a new  filespec. Once you have  changed
  582.                or accepted the filespec the screen will be  replaced by a
  583.                standard   MSDOS   directory   listing   satisfying   that
  584.                filespec. Press  any key to return  to the main menu  once
  585.                you have finished with the directory listing.
  586.                     The default  filespec is  one of the items  which may
  587.                be changed  from the configuration  file (see  section 6).
  588.                By adopting a  standard convention for disk file extension
  589.                naming  (filename.DSK   for  example)   and  setting   the
  590.                filespec  to  only   report  files   conforming  to   that
  591.                extension  ( *.DSK  in  this example)  you can  reduce the
  592.                clutter  on the  screen and  see  only the  available disk
  593.                files.
  594.  
  595.                5.10 Q - Quit Program.
  596.  
  597.                     Pretty well self  explanatory. Note  that all  files,
  598.                including any  print-through file,  will be  automatically
  599.                closed  when you  quit. It  is unnecessary to  unload your
  600.                disks  before  quitting.  Always  try  to  quit  from  the
  601.                program rather  than exit by any  other means in order  to
  602.                maintain the integrity of your file data.
  603.  
  604.  
  605.                5.11 T - Toggle Line Status Display. 
  606.  
  607.                     At  the bottom  of  the  screen is  the  line  status
  608.                display.   It  shows   the  current   (or   last)  command
  609.                processed, the device  ID for that  command, the values of
  610.                AUX2  and AUX1  in  that command  and  the status  of  the
  611.                command line  (high or low).  The information  is provided
  612.                to give you an  insight into what is happening  on the SIO
  613.                bus. 
  614.                     If you do not wish to see this display or  your PC is
  615.                having trouble keeping  up with the ATARI then press  T to
  616.                toggle  the  display off.  Subsequent  presses  of T  will
  617.                toggle the display on or off.
  618.  
  619.                5.12 C - Create/Amend Configuration.
  620.  
  621.                     Use  this  option   to  create  or  change  the  .CFG
  622.                configuration files. For details see section 6.
  623.  
  624.                5.13 P - Print Through Mode.
  625.  
  626.                     The emulator  will accept commands  for the  ATARI P:
  627.                device (40h)  if you  enable the  print through   mode  by
  628.                pressing  P.  There  are  a  number  of  questions  to  be
  629.                answered in order to set the print through  mode. First it
  630.                will ask whether you want to  print to the PC printer port
  631.                (P), the screen (S) or a disk file (F). 
  632.                     If  you choose  to print to  a file then  you will be
  633.                asked for the MSDOS  filename. This must follow the normal
  634.                MSDOS naming  rules. If the file  already exists you  will
  635.                be asked  whether you wish to  overwrite it (O), in  which
  636.                case  the  file   will  be  erased  and  then  re-created,
  637.                reselect the filename (R) which will take you  back to the
  638.                filename prompt to choose a  different name, or append (A)
  639.  
  640.                                         10
  641.                which  will  add  the print  output  to  the  end  of  the
  642.                existing file.
  643.                     Whatever   the   choice   the   question   "DOS  text
  644.                conversion  required" will  then appear.  If you  select Y
  645.                for yes  then all the  ATARI EOL  character (9Bh) will  be
  646.                converted to the DOS carriage  return, line feed  sequence
  647.                (0Dh,0Ah). In  addition ATARI tabs  (7Fh) will  be changed
  648.                to DOS tabs (09h)  and the high  bit which the ATARI  uses
  649.                for  inverse  characters   will  be  stripped  off.  Other
  650.                control codes  will be allowed  through and can have funny
  651.                effects so be prepared.
  652.                     Selecting N  for no at  the conversion  prompt causes
  653.                the emulator  to pass everything  straight through  to the
  654.                chosen destination. It is unlikely that you will  have any
  655.                success  in  displaying or  printing  this  output in  the
  656.                MSDOS  environment but  it is  useful for  copying machine
  657.                code files to an MSDOS file.
  658.                     There are  two further  points to bear  in mind  when
  659.                printing to  the PC. The P  for printer option will  spool
  660.                data to LPT1: so make  sure that is where your  printer is
  661.                sitting. The control  Z character (1Ah  or 26  decimal) is
  662.                used by  the ATARI as a  graphics character which is  very
  663.                useful  as the  bottom left hand  corner of a  box. In the
  664.                MSDOS  world it  means end  of file.  Even  with DOS  text
  665.                conversion  turned on  the control  Z  will appear  in the
  666.                MSDOS  file.  Subsequent  attempts to  use  MSDOS commands
  667.                like type, copy  or print will stop when MSDOS  encounters
  668.                the control Z. The rest  of the file  will be on disk  but
  669.                you will have trouble finding it with an MSDOS command. 
  670.                     With  print-through  enabled  the  main  menu display
  671.                will change to:
  672.  
  673.                     Printing to  (destination).  Text  conversion on  (or
  674.                     off).
  675.  
  676.                where  destination  is  either  printer,  screen   or  the
  677.                filename.
  678.                     All   print   output  will   be   directed  to   that
  679.                destination  until you press  P again.  The second  P will
  680.                close   the  destination  device  and  disable  the  print
  681.                through mode.
  682.                     While printing to  the screen the display will remain
  683.                on the  printer output  until you  press any  PC key.  The
  684.                main menu  will then  be restored.  If you  press a  valid
  685.                option key that  option will be actioned. If this  was not
  686.                your  intention  then escape  will  cancel  most of  them.
  687.                Hitting the space  bar is probably the best way  to return
  688.                to the main menu without  disruption, or use P if you also
  689.                want to close the printer stream.
  690.             
  691.  
  692.           6. Configuration Files.
  693.  
  694.                Configuration files allow the pre-setting  of many of  the
  695.                parameters which  the  emulator uses  when  it starts  up.
  696.                When a  configuration file  is used  it is  unnecessary to
  697.                set the  port number or load  any disk files into  drives.
  698.                If  you create  a  configuration files  with the  name  of
  699.                HDEMUL.CFG  the emulator  will find it and  use the values
  700.                within it whenever HDEMUL is typed to start the program.
  701.                Creating lots of configuration files  means you can  start
  702.                the  emulator with the set of disk  files most appropriate
  703.  
  704.                                         11
  705.                to  the task  at  hand. For  example  you might  create  a
  706.                WP.CFG file  for  word processing,  a  MAC65.CFG file  for
  707.                assembler  language programming  with the  MAC65 cartridge
  708.                or  a MYDOS45.CFG  or  SDOS32.CFG to  enable you  to  boot
  709.                under different  DOS versions. Starting  the emulator with
  710.                the  command HDEMUL  MAC65  will automatically  load  your
  711.                drives with all  the files specified within the .CFG file.
  712.                This  can  then  taken one  stage  further  by  creating a
  713.                MAC65.BAT file containing the  HDEMUL MAC65 command  which
  714.                will get the whole thing going just by typing MAC65.
  715.  
  716.                In addition it is possible  to fine tune some of the  time
  717.                out  values,  set  the  default  directory   filespec  and
  718.                determine whether the status line will be displayed.
  719.  
  720.                6.1 Creating a Configuration File.
  721.  
  722.                     Configuration  files  can  be  created  by  selecting
  723.                     option 'C'  from the main menu.  This takes you to  a
  724.                     new  menu  screen  with  the  configuration   options
  725.                     displayed. Use the  cursor up and  down keys  to move
  726.                     through  the options  and press  the return  key when
  727.                     you get to one that you want to alter.
  728.                     The  display will initially  show the current options
  729.                     in force on the emulator.
  730.  
  731.                6.1.1 Set port address.
  732.  
  733.                     Selecting this  entry brings  up the familiar  prompt
  734.                     to  select the port  address (1-4)  or M  for manual.
  735.                     Selecting  1 to  4 will  immediately insert  the port
  736.                     number  into  the menu  and  return you  to the  menu
  737.                     level. M  will cause the  program to  prompt for a  4
  738.                     digit  hexadecimal address  which you  should  enter.
  739.                     Only digits 1 to 9  and A to F will be accepted.  You
  740.                     must  enter all  4 digits  so use  leading zeroes  if
  741.                     necessary.
  742.  
  743.                6.1.2 Load drives D1: - D8:.
  744.  
  745.                     Selecting  any  of the  lines  from D1:  to D8:  will
  746.                     bring  up a  prompt to  enter the  disk filename that
  747.                     you  want loaded  onto the  drive.  Type in  the file
  748.                     name and  press Return. If  the file  does not  exist
  749.                     the program will prompt with:
  750.                          File does not exist Continue anyway?
  751.                     Type  Y if you intend  to create the  file later or N
  752.                     if you have made a mistake.
  753.                     The program  does not check  that the  specified file
  754.                     is a valid  disk file. If it is invalid  the emulator
  755.                     will simply error  the load when it is run  with this
  756.                     configuration  file  and  continue   without  loading
  757.                     anything.   Similarly  if   you  use  a  non-existent
  758.                     filename  the  emulator  will ignore  the  entry next
  759.                     time it is run.
  760.                     To delete a  file from the list select the  drive and
  761.                     press return at the filename prompt.
  762.  
  763.                6.1.3 Default Directory Specification.
  764.  
  765.                     When you select  the D option from the main  menu the
  766.                     emulator will display  a file specification which  it
  767.  
  768.                                         12
  769.                     will use  in  the  directory  search.  To  alter  the
  770.                     default  value select  this option  and type  the new
  771.                     file spec when prompted.
  772.  
  773.                6.1.4 Time-outs.
  774.  
  775.                     A number  of  time-outs  exist within  the  emulator,
  776.                     most of  which  default to  zero.  The time-outs  are
  777.                     used to at stages of the command sequence  when it is
  778.                     possible  for  the  PC to  respond  to  the ATARI  so
  779.                     quickly that  the ATARI  is not  ready to  accept the
  780.                     response. Various  constant  values are  built in  to
  781.                     the emulator  already  and the  values  given on  the
  782.                     configuration menu are  added to the  in-built values
  783.                     to  give a  crude  tuning facility  if you  happen to
  784.                     have a 'slow' ATARI.
  785.                     To  appreciate the significance  of the time-outs let
  786.                     us  use the  examples of  the read  sector and  write
  787.                     sector commands from the ATARI:
  788.  
  789.                     1)  Command  line   goes  low  and  Read  command  is
  790.                     transmitted to the emulator.
  791.  
  792.                     2) Command line goes high  and the emulator  responds
  793.                     with  ACK. No  time-out is  used within  the emulator
  794.                     because this  action is tied  to the  raising of  the
  795.                     command line.
  796.  
  797.                     3)  The ATARI  now waits.  The emulator  prepares the
  798.                     sector  data. Applies the  TIME TO  COMPLETE time-out
  799.                     and then sends COMPLETE to the ATARI.
  800.  
  801.                     4) The  ATARI still waits.  The emulator  applies the
  802.                     SEND  DATA   TIMEOUT  and   then  sends  the   sector
  803.                     contents.
  804.  
  805.                     The sequence is now finished.
  806.  
  807.                     Similarly on a Write sector command:
  808.  
  809.                     1)  The ATARI  lowers the Command line  and sends the
  810.                     Write Sector command.
  811.  
  812.                     2)  The  ATARI   raises  the  command  line  and  the
  813.                     emulator respond with ACK using no timeout.
  814.  
  815.                     3)  The  ATARI  sends  the  sector  data  and the  PC
  816.                     applies the  TIME TO ACK  timeout before  sending ACK
  817.                     again.
  818.  
  819.                     4) The  emulator writes the  sector and  then applies
  820.                     the TIME TO COMPLETE timeout before sending  COMPLETE
  821.                     to the ATARI.
  822.  
  823.                     The sequence is now finished.
  824.  
  825.                     The TXDATA  TIMEOUT is applied  between each  byte of
  826.                     transmitted data  on every PC  to ATARI  message. The
  827.                     effect of  lengthening  this  is  to  slow  down  the
  828.                     message  transmission  rate  by   introducing  pauses
  829.                     between each byte. The bit  rate remains, of  course,
  830.                     at 19.2K. 
  831.  
  832.                                         13
  833.                     Because of the way that the low level  PC timer works
  834.                     the   values  entered   for  the  protocol  time-outs
  835.                     actually give you 85*value microseconds of delay  ie.
  836.                     1  gives  you   85  microseconds,  2  gives  you  170
  837.                     microseconds and  so on. Given  that the  values that
  838.                     you  will  be entering  are  likely  to be  guesswork
  839.                     anyway  I doubt  that this  will represent  a serious
  840.                     impediment. 
  841.  
  842.                     The  ERROR   DISPLAY  TIMEOUT  determines  how   long
  843.                     emulator  error messages  remain on  the  screen. The
  844.                     value is in seconds and may be set between 1 and 59.
  845.  
  846.                     To set  any  timeout, highlight  it  with the  cursor
  847.                     up/down keys, select  it with return  and type in the
  848.                     new value when prompted.
  849.  
  850.                6.1.4 Display Status Line.
  851.  
  852.                     You  may  predetermine whether  the  status  line  is
  853.                     displayed by  setting this value to  Y for yes it  is
  854.                     displayed or  N for  no it  is not. It  is preset  to
  855.                     Yes.
  856.  
  857.                6.1.5 Loading an existing configuration file.
  858.  
  859.                     If you  want to change the  emulator settings from  a
  860.                     configuration  file without  restarting  the  program
  861.                     or, if a configuration file  already exists which  is
  862.                     similar to the  one that you wish to create,  you can
  863.                     load  an existing  file  by  typing L.  You  will  be
  864.                     prompted for  the  new filename  which  will then  be
  865.                     loaded  and  its  parameters  will replace  those  on
  866.                     display.
  867.                     If you  have changed anything  on the  displayed menu
  868.                     prior to  loading the file you  will be asked if  you
  869.                     want  to  save your  changes  before  the load  over-
  870.                     writes them.
  871.                     The  new parameters  will not  come into  force until
  872.                     you exit the configuration menu.
  873.  
  874.  
  875.                6.1.6 Saving your changes.
  876.  
  877.                     You may save  your configuration file at any time  by
  878.                     pressing S.  You will  then be prompted for  the save
  879.                     filename.  There is no  need to  add any extension to
  880.                     the filename,  but if  you do  then make  sure it  is
  881.                     .CFG or you  may forget its purpose. Remember that  a
  882.                     file saved as HDEMUL.CFG will  form the default  load
  883.                     file  provided it exists in the same directory as the
  884.                     emulator program.
  885.                     After saving  the file you  will be  returned to  the
  886.                     configuration menu.
  887.  
  888.                6.1.7 Exit.
  889.  
  890.                     It  is necessary  to  type E  for  exit in  order  to
  891.                     return to the main menu. If you have  made no changes
  892.                     since you  entered the configuration  menu, loaded  a
  893.                     file or  last saved  then  you  will be  given  three
  894.                     choices:
  895.  
  896.                                         14
  897.                     1) Exit and use new parameters. Use this  if you wish
  898.                     to   invoke  the   configuration  values   which  are
  899.                     currently displayed on the menu.
  900.  
  901.                     2)  Exit. Returns to  the emulator which will use the
  902.                     values it  had before  you entered the  configuration
  903.                     menu.
  904.  
  905.                     3) Return  to configuration  menu.  Cancels the  exit
  906.                     routine.
  907.                     If  you have unsaved  changes on  the screen when you
  908.                     exit there are 4 actions you may take:
  909.  
  910.                     1) Lose changes and exit. Choose this if  you want to
  911.                     abandon  your edits and return to the emulator to use
  912.                     the original values.
  913.  
  914.                     2) Save  changes and exit.  Use this  if you want  to
  915.                     save  your edits  but  do not  wish  to use  the  new
  916.                     values when you return to the emulator.
  917.  
  918.                     3)  Save changes,  exit and  use new  parameters. Use
  919.                     this if you wish to  save the edits and load the  new
  920.                     values into the emulator for immediate use.
  921.  
  922.                     4)  Return to configuration menu. This option cancels
  923.                     the exit routine.  
  924.  
  925.           7. Time and Date Support.
  926.  
  927.                HDEMUL  provides  a  special  interface  which  allows   a
  928.                program running on the  ATARI to get the  time of day  and
  929.                the  date  from  the PC clock.  The MYDOS450.DSK disk file
  930.                contains  a  program called  SDTIM.COM  which  may be  run
  931.                under SpartaDos to set  the time and  date for  SpartaDos.
  932.                By placing it  in your start-up file it should  provide an
  933.                alternative to the RTIME8 cartridge.
  934.                The details  of the time/date  interface follow  for users
  935.                who wish to write their own programs.
  936.  
  937.                Command from ATARI to PC:
  938.  
  939.                Command=52h (Read), Device=3Fh, AUX1=0, AUX2=0.
  940.  
  941.                This  will return  a 128  byte buffer  with the  following
  942.                contents:
  943.  
  944.                Byte 0         Year (hundreds)     e.g. 19
  945.                Byte 1         Year (tens)         e.g. 92
  946.                Byte 2         Month (1-12)   e.g. 1 = January.
  947.                Byte 3         Day  (1-31)
  948.                Byte 4         Day (0=Sunday, e.g. 3=Wednesday
  949.                                    1=Monday)
  950.                Byte 5         Hours (0-23)
  951.                Byte 6         Minutes (0-59)
  952.                Byte 7         Seconds (0-59)
  953.                Byte 8         Hundredths of seconds (0-99)
  954.                Byte 9-127          Unused.
  955.  
  956.                The  file SDTIM.TXT  on disk  MYDOS.DSK is  the source for
  957.                SDTIM.COM  and  will  give  you  an  example  of  how  the
  958.                interface is used.
  959.  
  960.                                         15
  961.           8.File Transfer Utilities.
  962.  
  963.                To enable the transfer of files  between the MSDOS  format
  964.                and  ATARI Dos  format  and vice  versa a  program  called
  965.                PCTFR.COM  has been  provided on  the disk  MYDOS.DSK. The
  966.                program will  run under any  type of DOS  so that you  are
  967.                not  restricted  in  your  choice  of  ATARI  format.  The
  968.                program uses a special file  transfer protocol built  into
  969.                the  emulator and  thus can  only be  used in  conjunction
  970.                with HDEMUL.
  971.  
  972.                The PCTFR.COM program  was written with PL65 from NOAHSOFT
  973.                and uses their run time routines.
  974.  
  975.                8.1 The PCTFR program.
  976.  
  977.                     Run the  PCTFR.COM program from  the run  binary file
  978.                option of you favourite ATARI DOS (option L  for DOS 2.5).
  979.                A menu  will be displayed  on your  ATARI screen with  the
  980.                following options.
  981.  
  982.                     A) Transfer file from PC
  983.                     B) Transfer file to PC
  984.                     C) Text Conversion 
  985.                     D) List Atari Directory
  986.                     E) Exit to DOS
  987.  
  988.  
  989.                Before you get stuck  into transferring files  you need to
  990.                consider whether you  require DOS text conversion. Without
  991.                it  the  file will  be  transferred  as is.  This  is  the
  992.                default  and should be  used for all binary file transfers
  993.                (i.e.  programs that  run  on the  ATARI rather  than text
  994.                files). 
  995.                With    text   conversion    turned   on   the   following
  996.                substitutions will be made:
  997.                     Transferring a file from the PC to the ATARI -
  998.                          MSDOS  CR  LF  sequences will  be  converted  to
  999.                          Atari EOL.
  1000.  
  1001.                     Transferring a file from the ATARI to the PC -
  1002.                          ATARI EOL converted to CR LF.
  1003.                          ATARI TAB (127) becomes DOS TAB (09)
  1004.                          ATARI  control  codes  (ATASCII  values  <   31)
  1005.                          become spaces (32)
  1006.                          ATASCII inverse characters (>127) have  the high
  1007.                          bit stripped.
  1008.  
  1009.                This is a more severe translation than  using the emulator
  1010.                Print to file option (with DOS text conversion)  since all
  1011.                the  Atari  control  characters   are  stripped  out   and
  1012.                replaced by spaces.
  1013.                To  toggle  the  text  translation  option  press  C.  The
  1014.                current  status is denoted by Yes its on  or No its not on
  1015.                after the menu entry.
  1016.  
  1017.                The rest of the  program is hopefully self evident. Select
  1018.                A to  transfer a file  from the  PC to the  ATARI and give
  1019.                both  filenames when  asked. You may include  a drive spec
  1020.                and path  name in the PC  filename if the  file is  not in
  1021.                the      same      directory      as       HDEMUL      (eg
  1022.                A:\ATARI\DOWNLOAD\NEWGAME.ARC).  The  file  will  transfer
  1023.  
  1024.                                         16
  1025.                and report success or failure as appropriate. 
  1026.  
  1027.                Option B will move a file  from the ATARI to the PC. Again
  1028.                give both  the ATARI and PC  filenames when asked and  sit
  1029.                back and hope while the data is transferred.
  1030.  
  1031.                Option D  prompts you for an  ATARI drive number and  then
  1032.                gives you a  directory listing of that drive. If  you want
  1033.                to know what is on the  PC use the emulator option D. Same
  1034.                command, different keyboard.
  1035.  
  1036.                Option E will return you to DOS.
  1037.             
  1038.                The  most probable  error messages  will be  translated to
  1039.                English  and the  rest  will display  the ATARI  DOS error
  1040.                code for you to look up and correct.
  1041.  
  1042.                Transfers  may be  made from  any combination  of physical
  1043.                and  emulated  drives  provided all  transactions  are via
  1044.                HDEMUL.
  1045.  
  1046.  
  1047.                Note  that files  will be  overwritten without  warning if
  1048.                you use an existing filename.
  1049.  
  1050.                The ATARI escape  key will abort a transfer tidily  if you
  1051.                change your  mind after  the process has  started. I  have
  1052.                not disabled break or reset but it would  not be advisable
  1053.                to press either during  a transfer unless  you really want
  1054.                some practice unscrambling your disk. 
  1055.  
  1056.           8.2 The File Transfer Interface.
  1057.  
  1058.                A series of  special commands  have been  included in  the
  1059.                emulator  to allow  the file  transfer mechanism  to work.
  1060.                For the technically minded these,  and the sequence  which
  1061.                they must follow, are described  below. Skip this  section
  1062.                unless  you  have   intentions  to  write  your  own  file
  1063.                transfer program.
  1064.  
  1065.                All commands are  sent with Device ID =  3Ah. This is what
  1066.                tells  the emulator  that it  is a  file transfer command.
  1067.                The commands are:
  1068.  
  1069.           Command: Status  Aux1: 'I'  Aux2: 'R'
  1070.  
  1071.                Initiates a  read from PC sequence. PC transfer state must
  1072.                be idle.
  1073.  
  1074.           Response: Ack if OK otherwise Nack or Err.
  1075.  
  1076.           Command: Status  Aux1: 'I'  Aux2: 'W'
  1077.  
  1078.                Initiates a write  to PC sequence. PC transfer state  must
  1079.                be idle.
  1080.  
  1081.           Response: Ack if OK otherwise Nack or Err.
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.                                         17
  1089.           Command: Status  Aux1: 'L'  Aux2: 'R'
  1090.  
  1091.                Request for  PC file  length. Valid  only  after a  "Write
  1092.                Filename" in a read sequence.
  1093.  
  1094.           Response: 4  byte  status response  containing  32 bit  integer
  1095.           file length.  Bytes 0 &  1 are  most significant,  bytes 2 &  3
  1096.           least significant.
  1097.  
  1098.           Command: Status  Aux1: 'A'  Aux2: -
  1099.  
  1100.                Aborts transfer  sequence, closes file  and returns  PC to
  1101.                idle state. Valid at anytime.
  1102.  
  1103.           Response:  Ack if OK. Nack or Err otherwise.
  1104.  
  1105.           Command: Status  Aux1: '?'  Aux2: -
  1106.  
  1107.                Request for PC to send last error code.
  1108.  
  1109.           Response: 4 byte status response with error code in byte 0.
  1110.                Valid codes are:  250  File read failure.
  1111.                               251  Emulator transfer sequence error.
  1112.                               252  File write failure.
  1113.                               253  Unable to open file.
  1114.                               254  Incoming message not recognised.
  1115.                               255     General   error   (i.e  failed   to
  1116.                               categorise failure)
  1117.  
  1118.           Command: Write  Aux1: 'F'  Aux2: -
  1119.  
  1120.                Followed by a 256 byte data buffer.
  1121.  
  1122.                Transmits the  filename from  or to  which data  is to  be
  1123.                read  or written  so that  the PC  can open  the file. The
  1124.                file  name  must  obey normal  MSDOS  rules  and  must  be
  1125.                terminated with an ATARI EOL (155) character. If the  file
  1126.                is to be  written to then  any existing file  of the  same
  1127.                name  will be  lost.  The file  name  may include  a  full
  1128.                directory and path specification.
  1129.                Valid only after an initiate message.
  1130.  
  1131.           Response: Ack, Nack or Err.
  1132.  
  1133.           Command: Write  Aux1: 'D'  Aux2: Byte count (0=256 bytes)
  1134.  
  1135.                Followed by  a 256  byte buffer  containing the  number of
  1136.                valid bytes specified in Aux2.
  1137.  
  1138.                Data to be  written to the PC  file. Valid only after  the
  1139.                filename  has been  received. Note  that a  partial buffer
  1140.                full  of  data   does  not  lead  to  termination  of  the
  1141.                transfer.  This  must be  done  explicitly  with a  Status
  1142.                Abort message.
  1143.  
  1144.           Response:  Ack, Nack or Err.
  1145.  
  1146.           Command: Read  Aux1: -  Aux2: -
  1147.  
  1148.                Request for next  buffer full  of file data. The  emulator
  1149.                will return 256 bytes  of data even if the  end of file is
  1150.                reached before  the buffer is  filled. It  is the  ATARIs'
  1151.  
  1152.                                         18
  1153.                responsibility to keep track of the valid byte count.  The
  1154.                transfer  will not end when the end of file is reached. It
  1155.                must   be  explicitly  terminated   with  a  Status  Abort
  1156.                message.
  1157.                Valid in a read sequence after Write Filename.
  1158.  
  1159.           Response: Ack followed by a 256 byte data buffer, Nack or Err.
  1160.  
  1161.  
  1162.            
  1163.           9.Problems
  1164.  
  1165.                Obviously  there are  many different  PC clones  available
  1166.                and  a wide  variety of  hardware set-ups  available which
  1167.                makes  it difficult  to guarantee  that the  emulator will
  1168.                always work. If  you experience  problems here  are a  few
  1169.                suggestions  which might help. If none of  these work then
  1170.                try and contact me on the City  BBS (021-321-1610 Username
  1171.                Peter). Please  try to  describe ALL  of the events  which
  1172.                led to the failure as the sequence may well be important.
  1173.  
  1174.                HDEMUL fails to run on the PC:
  1175.                     Remove  any TSR  programs and  try again.  Check that
  1176.                     the EXE program  is not corrupt.  Re-install it if in
  1177.                     doubt.
  1178.  
  1179.                HDEMUL starts but keyboard does not respond:
  1180.                     This  sometimes  happens   if  the  PC   generates  a
  1181.                     spurious  character on  the COM  port when  it starts
  1182.                     up.  The emulator  thinks it  is receiving  a command
  1183.                     and loops waiting for the rest of  the command frame.
  1184.                     Re-booting  the PC should  clear it. If your ATARI is
  1185.                     attached  then turn  it on.  The ATARI  boot sequence
  1186.                     will then send  commands to the PC which will unblock
  1187.                     the tubes.
  1188.  
  1189.  
  1190.                The ATARI does not boot when turned on:
  1191.                     Have a look at the emulator status line.  If you have
  1192.                     contact  with the  ATARI you  should see  the display
  1193.                     changing as the ATARI boots. If the display  is empty
  1194.                     then check the  COM port setting. If this is  OK then
  1195.                     suspect your SIO2PC hardware. Try running  the SIO2PC
  1196.                     programs  if you have them. If this  works then there
  1197.                     must be  a major emulator fault.  If SIO2PC does  not
  1198.                     work either then you have a hardware problem.
  1199.  
  1200.                ATARI hangs and then reports device not available:
  1201.  
  1202.                     During the  'hang'  period  try  getting  the  PC  to
  1203.                     respond to  a Directory command.  If the  PC responds
  1204.                     then it  obviously thinks that  it has  completed the
  1205.                     ATARI command and is  actually hanging around waiting
  1206.                     for some  action.  The  most  common  cause  of  this
  1207.                     problem is  that the PC  has serviced the command and
  1208.                     responded before the ATARI was  ready to process  the
  1209.                     response.  Try  slugging  the  emulator  response  by
  1210.                     playing  with  the  time-outs  in  the  configuration
  1211.                     menu. The  Time to Complete  value is  a good one  to
  1212.                     have a  go at. Be  generous and  use high values  (in
  1213.                     the thousands) until  you have proved the problem and
  1214.                     then come back down  again to a  more sensible  value
  1215.  
  1216.                                         19
  1217.                     when you  are  confident that  you  have located  the
  1218.                     problem.
  1219.                     If the PC  does not respond to your key press then it
  1220.                     is waiting  for data from the  ATARI to complete  the
  1221.                     command  sequence.  This  may  be   due  to  a   poor
  1222.                     connection causing line noise, a  very slow PC  which
  1223.                     is failing to keep up with the incoming  data or poor
  1224.                     programming  on my  part. Try  thumping the  hardware
  1225.                     and then the programmer.
  1226.  
  1227.                Command values  are  unusual when  used  with an  enhanced
  1228.                drive.
  1229.  
  1230.                     This is  quite  normal  and represents  the  enhanced
  1231.                     command set of  the drive. Note  also that the status
  1232.                     line will  not  display sector  values  when used  in
  1233.                     conjunction with an ultra-speed SIO set-up.
  1234.  
  1235.                General
  1236.  
  1237.                     If  your  PC is  caching  disk  writes  then you  may
  1238.                     experience  some  problems.  The  problems   are  not
  1239.                     caused by the  cache itself but by the fact  that the
  1240.                     PC  nips off  to  empty the  cache onto  the physical
  1241.                     disk from  time to time. While  it is doing this  the
  1242.                     scan loop of the  emulator is interrupted  and it  is
  1243.                     possible to loose  a command line transition or data.
  1244.                     Normally the  ATARI  command   repeat  sequence  will
  1245.                     take care  of this but  it is  possible that, with  a
  1246.                     very  slow  disk,   the  problem  could  become  more
  1247.                     serious. If  you have problems  which occur  at about
  1248.                     the  same  frequency as  the  hard  disk drive  light
  1249.                     flickers  then  try   disabling  the   caching.  Read
  1250.                     caching  should  not  cause  any  problems  and  will
  1251.                     probably be beneficial.
  1252.  
  1253.                     The  use of a  disk drive on  the SIO  chain with the
  1254.                     same drive  number as an  active emulated  drive will
  1255.                     cause  unpredictable  results.  Unload  the  drive in
  1256.                     HDEMUL or turn off the physical drive.
  1257.  
  1258.                     If the  PC is turned on  and in use  but has  not run
  1259.                     HDEMUL or SIO2PC  since it was last booted then there
  1260.                     will be a problem accessing  devices on the ATARI SIO
  1261.                     line. The  PC  port must  be  initialised before  the
  1262.                     ATARI  kit will  work. Either  run HDEMUL  briefly or
  1263.                     unplug the  SIO2PC  hardware from  the  SIO chain  to
  1264.                     regain control of the ATARI. I  have fitted a  little
  1265.                     switch to  my SIO2PC hardware so  that I can turn  it
  1266.                     off and avoid this situation.
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.                                         20
  1281.