home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / mag_discs / 16 / s2p / !S2P / !Help next >
Text File  |  1995-01-13  |  10KB  |  282 lines

  1. Instructions for !S2P by Andrew Sellors
  2.  
  3. *****************************************************************************
  4. * NOTE:                                                                     *
  5. * !S2P is FreeWare.                                                         *
  6. * This means that you may freely copy and distribute it, provided that it   *
  7. * is complete with all original files, and that you do not sell it.         *
  8. * PD libraries may charge a nominal fee for the cost of duplication,        *
  9. * postage etc.                                                              *
  10. * In no circumstances shall the author be liable for any damage, loss of    *
  11. * profits, time or data or any indirect or consequential loss rising out of *
  12. * the use of this software or inability to use this software.               *
  13. *****************************************************************************
  14.  
  15. Contents:
  16. ---------
  17.  
  18. Aims
  19. Features
  20. Before you start!
  21. Compatibility
  22. Problems
  23. Operation
  24. Clicking on iconbar icon
  25. Iconbar menu
  26. "Serial Port Configuration" window
  27. Buffers
  28. Setting the 3D bit
  29. Serial Lead Wiring
  30. Contacting the author
  31.  
  32. ********************************************************************************
  33.  
  34. Aims:
  35. -----
  36.  
  37. This program sends all data received by a serial port to the parallel port.
  38. Why????
  39.  
  40. I have two machines, but only one printer and the two machines are not close
  41. together (10 metres in fact). Both machines are connected together using the
  42. serial ports so by configuring !Printers to use the serial port and running
  43. this program on the other machine, I can print from the remote machine.
  44.  
  45. ********************************************************************************
  46.  
  47. Features:
  48. ---------
  49.  
  50. Uses 3D bit in CMOS RAM to select 2D or 3D windows _and_ iconsprites on startup.
  51. (See the "Setting the 3D bit" section if you don't like 2D windows)
  52.  
  53. Uses Block Drivers so it can use serial ports other than the internal one.
  54.  
  55. Provides full control over the serial port used.
  56.  
  57. ********************************************************************************
  58.  
  59. Before you start!:
  60. ------------------
  61.  
  62. Before you can use this program you need the Block Drivers by Hugo Fiennes.
  63. If you don't have them then download them now! or look at your favourite
  64. PD library.
  65.  
  66. ********************************************************************************
  67.  
  68. Compatibility:
  69. --------------
  70.  
  71. This program is for RISC OS 3.10 or later.
  72. It has been tested on both RISC OS 3.10 and RISC OS 3.50 and with the internal
  73. port using Block Drivers v10a.
  74.  
  75. ********************************************************************************
  76.  
  77. Problems:
  78. ---------
  79.  
  80. There is a bug in RISC OS 3 concerning the setting of the input buffer threshold
  81. for the internal port, it does not seem to do anything!!, as it still operates
  82. as if the threshold was set to the default of 9 bytes less then the full buffer
  83. when it stops the other computer transmitting. I have just discovered that the
  84. reason for this is that OS_Byte 203 does nothing in RISC OS 3 and has been
  85. replaced by OS_SerialOp 8 which is not in the RISC OS 3 PRMs. I have informed
  86. the author of the Block Drivers of this fact, as they use OS_Byte 203 to set
  87. the value for the interal port.
  88.  
  89. There is also a more serious problem with RISC OS 3.10, (I think it was fixed
  90. in 3.11) concerning v0.21 of the Serial Device Driver for the internal serial
  91. port. It means that reception at high data rates is very unreliable, with many
  92. characters being lost. For this reason, I have included a small BASIC program,
  93. PatchSDD, which is run when !S2P is started. This updates v0.21 of the Serial
  94. Device Driver to v0.22 and so cures the problems. It checks the version number
  95. so it will only alter v0.21, if you are already loading v0.22 as part of your
  96. boot sequence then no changes are made.
  97.  
  98. If you have run !Printers and then try to run !S2P the error "Unable to use
  99. parallel port: Can't open 'devices#buffer3:$.Parallel'" will be seen and !S2P
  100. will not work. This is because !Printers opens the parallel port device for
  101. output and does not close it when quitted. The only way to enable !S2P to work
  102. is to reset the machine.
  103.  
  104. ********************************************************************************
  105.  
  106. Operation:
  107. ----------
  108.  
  109. When the !S2P icon is double-clicked, Serial 2 Parallel installs itself on the
  110. left of the icon bar and the configured Block Driver loaded. If the !SerialDev
  111. application that holds the Block Drivers has not been seen by the Filer then
  112. an error is reported and the program does not start up.
  113.  
  114. ********************************************************************************
  115.  
  116. Clicking on iconbar icon:
  117. -------------------------
  118.  
  119. The colour of the printer on the icon indicates whether the serial port is
  120. being redirected to the parallel port:
  121.      Grey printer: Serial port not redirected
  122.    Yellow printer: Serial port being redirected
  123.  
  124. Clicking on the icon toggles this state.
  125.  
  126. ********************************************************************************
  127.  
  128. Iconbar menu:
  129. -------------
  130.  
  131.    +--------------+
  132.    |     S2P      |
  133.    +--------------+
  134.    | Info    ⇨    | ⇨ opens "About this program" window
  135.    | Configure... | Opens "Serial Port Configuration" window
  136.    | Quit         | Quits program.
  137.    +--------------+
  138.  
  139. ********************************************************************************
  140.  
  141. "Serial Port Configuration" window:
  142. -----------------------------------
  143.  
  144. This allows the serial port so be set up.
  145.  
  146. Any changes made only take effect when either "Change" or "Save" are selected.
  147.  
  148.  
  149. The "Driver Name" pop-up menu allows you to change the Block Driver used.
  150. When a new driver is selected, the driver is scanned to find the baud rates
  151. and ports supported, and the relevant menus changed accordingly.
  152.  
  153. Clicking on "Rescan Drivers" rechecks the available Block Drivers and updates
  154. the list of drivers for the "Driver Name" menu. This can be used to update
  155. the list if any drivers have been added since the program was started.
  156.  
  157. The "Port Number" pop-up menu allows the serial port to be configured as
  158. some drivers support more than one serial port, the internal driver has only
  159. one port: 0.
  160.  
  161. The other menus are fairly self explanatory, these should be set to the same
  162. as !Printers for the transfer of data to work.
  163.  
  164.  
  165. Clicking on "Change" makes any changes made take effect and removes the window
  166. from the screen. If adjust is used instead of select then the window is left
  167. on screen.
  168.  
  169. Clicking on "Cancel" throws away any changes made and removes the window from
  170. the screen.
  171.  
  172. Clicking on "Save" makes any changes made take effect and the saves the
  173. configuration to disc to be used the next time the program is loaded. Whether
  174. the serial port is being redirected is also saved with the options in this
  175. window. If adjust is used instead of select then the window is left on screen.
  176.  
  177. ********************************************************************************
  178.  
  179. Buffers:
  180. --------
  181.  
  182. Increacing the size of the serial input buffer and printer buffer will improve
  183. the speed at which data is transfered and so reduce printing time.
  184.  
  185. The size of the printer buffer is shown by:
  186. *Status PrinterBufferSize
  187.  
  188. I recomend a size of at least 1 page of memory which is achieved by
  189. *Configure PrinterBufferSize 1
  190.  
  191. This will allocate 8, 16, or 32K of memory depending on whether you have 1, 2 or
  192. 4Mb in your machine.
  193.  
  194. Increacing the size of the serial input buffer also helps as the normal buffer
  195. is very small, only 255 bytes and it is only allowed to fill to 155 with the
  196. Block Drivers. This can be done by loading a module such as SerialBuff by
  197. David Pilling.
  198.  
  199. ********************************************************************************
  200.  
  201. Setting the 3D bit:
  202. -------------------
  203.  
  204. If you want to use the 3D windows in this program (and the handful of others
  205. that support it) then you need to set the 3D bit in the CMOS RAM. In RISC OS 3.1
  206. there is on *configure command to change it so you can either:
  207.  
  208.    Use !DeskCtrl (another program I have written, well worth getting and
  209.                   hopefully released soon on the Acorn User coverdisc)
  210.  
  211.    OR
  212.  
  213.    By cutting out the following BASIC program and running it.
  214.    Note: this program toggles the bit, so if its off and you run it twice then
  215.          it is still off!
  216.  
  217.     10REM Toggle state of '3D look' bit in CMOS
  218.     20REM Read byte
  219.     30SYS "OS_Byte",161,140 TO ,,byte%
  220.     40REM EOR byte with mask for bit 0
  221.     50byte% = byte% EOR 1
  222.     60REM Write byte back again
  223.     70SYS "OS_Byte",162,140,byte%
  224.     80END
  225.  
  226. Sorry to anybody who tried to use the bit of code above in the last version,
  227. it changed the solid drag bit instead!
  228.     
  229. ********************************************************************************
  230.  
  231. Serial Lead Wiring:
  232. --------------------
  233.  
  234. This lead wiring is the one I use to connect the machines using the internal
  235. ports so I know it works!! It takes account of the strange serial port the older
  236. hardware machines have and should me used with the "Internal" driver rather than
  237. the "InternalPC" driver.
  238.  
  239.  
  240.    Machine 1                        Machine 2
  241.  
  242.  +---1---DCD                        DCD---1---+
  243.  |                                            |
  244.  |   2---RxD------------------------TxD---3   |
  245.  |                                            |
  246.  |   3---TxD------------------------RxD---2   |
  247.  |                                            |
  248.  +---4---DTR                        DTR---4---+
  249.  |                                            |
  250.  |   5---0v--------------------------0v---5   |
  251.  |                                            |
  252.  |   6---DSR------------------------RTS---7   |
  253.  |                                            |
  254.  |   7---RTS------------------------DSR---6   |
  255.  |                                            |
  256.  +---8---CTS                        CTS---8---+
  257.  
  258.      9---RI                          RI---9
  259.  
  260. Note: that on both connectors, pins 1, 4 and 8 are connected together.
  261.  
  262. ********************************************************************************
  263.  
  264. Contacting the author
  265. --------------------
  266.  
  267. I, Andrew Sellors, can be contacted either at
  268.    57 Boundaries Road
  269.    Feltham
  270.    Middlesex
  271.    TW13 5DR
  272.  
  273. Or via Internet email at
  274.    k946949@king.ac.uk
  275.  
  276. Any feedback from users (bugs reports, requests for new features, praise,
  277. money etc.) is gladly received. 
  278.  
  279.  
  280.  
  281.  
  282.