home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / text / hints / volume_03 / issue_03 < prev    next >
Text File  |  1995-02-16  |  9KB  |  227 lines

  1. Å   AutoCAD to !Draw conversion Ö The RISC-OS application !Draw can
  2. accept input from a DXF (Drawing Interchange Format) file. These files
  3. can be produced by packages such as ÉAutoSketchæ and ÉAutoCADæ. To get a
  4. file from a IBM PC running the ÉAutoCADæ package to !Draw the following
  5. procedure should be used.
  6. On the IBM PC:
  7. 1.   Do a ÉDXFOUTæ command from within Auto-CAD to output the current
  8. file in DXF format.
  9. 2.   This file should be copied to a IBM format 5.25ö or 3.5ò disc.
  10. On the Archimedes:
  11. 3.   Start the PC emulator on the Archimedes.
  12. 3.3
  13. 4.   Perform a Éputfile MS_DOS_Name.dxf ADFS_Nameæ from within the
  14. emulator to transfer the file from MS-DOS to RISC-OS.
  15. 3.3
  16. 5.   From within RISC-OS set the file type of your file to &DEA
  17. (*SETTYPE ADFSName DEA).
  18. 3.3
  19. 6.   Start !Draw and drag the DXF file to its icon or into a !Draw
  20. window.
  21. 3.3
  22. !Draw will ask you a question about the Éunitsæ (scale) before redrawing
  23. the image in the window. This may require some thought to get the
  24. required effect. !Draw appears to get confused with some entries in DXF
  25. files and refuse to load the file. Deleting the text in the original
  26. picture may cure the problem. AutoSketch on the Archimedes can also
  27. produce DXF type files for input into !Draw.
  28. 3.3
  29. Å   ÉCæ Operating System calls (contæd) Ö The following example program
  30. shows how system commands can be invoked from a C-program. It was tested
  31. under Acorn ANSI C version 2. The use of the function Ésystemæ is part
  32. of the proposed ANSI standard for C, although its exact implement-ation
  33. is left up to the individual versions of C. The Acorn ÉANSI Cæ library
  34. function Ésystemæ returns a zero value if the command executes success
  35. fully and non-zero if it fails. Problems will occur if the command being
  36. executed over-writes the C-prog-ram (for example if the command starts
  37. up a second C-program), but in the example both commands are Ébuilt-inæ
  38. and therefore do not overwrite the invok-ing program. In theory, the
  39. *RMLoad command fails if there is not enough RMA, but in testing the
  40. example, it worked even when the free RMA was configured to 0k.
  41. 3.3
  42. /* > c.systest */
  43. 3.3
  44. #include <stdlib.h>   /* General
  45. 3.3
  46.  utilities  */
  47. 3.3
  48. #include <stdio.h>   /* Input/output  
  49. 3.3
  50. */
  51. 3.3
  52. int main ()
  53. 3.3
  54. {3 .3
  55. static char rmload[]=örmload
  56. 3.3
  57. system:modules.memallocö;
  58. 3.3
  59. static char screensave[]=
  60. 3.3
  61.  öscreensave screenfileò;
  62. 3.3
  63. int result1,result2;
  64. 3.3
  65. result1=system(rmload);
  66. 3.3
  67. result2=system(screensave);
  68. 3.3
  69. printf(öResult1=%d, Result2=%d\nò
  70. 3.3
  71. ,result1,result2);
  72. 3.3
  73. return(0);
  74. 3.3
  75. }
  76. 3.3
  77. Å   Dead modules Ö If you install a module which claims a vector and
  78. then press the reset button, something very strange happens when you
  79. want to *RMKill the module. Because the vector canæt be released, the
  80. module isnæt killed properly. To let you know about this, RISC-OS puts
  81. the dummy address DEADDEAD where you would expect the workspace address:
  82. 3.3
  83. *rmkill printkill
  84. 3.3
  85. Bad vector release
  86. 3.3
  87. *modules
  88. 3.3
  89. No   Position   Workspace Name
  90. 3.3
  91. 1   0380873C   00000000   UtilityModule
  92. 3.3
  93. 2   0381FB94   01800014   FileSwitch
  94. 3.3
  95. ...
  96. 3.3
  97. 27   0387EA48   00000000   SpriteUtils
  98. 3.3
  99. 28   01813BC4   DEADDEAD   PrintKey
  100. 3.3
  101. etc
  102. 3.3
  103. Å   Definitive modem connections? The following connections work with
  104. ArcTerm601, Hearsay and the Archive BBS for the WS3000 and SM2400
  105. modems:
  106. 3.3
  107. Arc RX (2) to Modem TX (3)
  108. 3.3
  109. Arc TX (3) to Modem RX (2)
  110. 3.3
  111. Arc GND (5) to Modem GND (7, not 1)
  112. 3.3
  113. Arc RI (9) to Modem DCD (8)
  114. 3.3
  115. Arc CTS (8), DCD (1), and DTR(4) to Modem DTR (20)
  116. 3.3
  117. Arc RTS (7) to Modem RTS (4)
  118. 3.3
  119. Arc DSR (6) to Modem CTS (5)
  120. 3.3
  121. Å   Digitisers? Who needs one, anyway ? We recently faced the problem of
  122. how to get the company logo into a DRAW file, and came up with a
  123. solution which may be useful to other people. It is most applicable to
  124. images bounded largely by straight lines.
  125. 3.3
  126. First take the image and enlarge it repeatedly using a photocopier until
  127. it fills more than a third of the screen of the monitor you are using.
  128. Then make one more enlargement, onto the transparent acetate sheets used
  129. for overhead projector foils. If you do not have a copier you will find
  130. most high street copier services can do all this for you, probably for
  131. less than a pound. Our copier will enlarge to 145% at a time.
  132. 3.3
  133. Now cut out the piece of acetate showing the image, and put it on your
  134. monitor screen. You will find it sticks most satisfyingly. Enter DRAW
  135. and register the coordinates of the corners of the image. You may want
  136. to have a grid on the screen to ensure you line up the acetate image
  137. with the edges of the screen. You can also check alignment by reading
  138. the coordinates of points which should be the same distance from an edge
  139. of the screen and adjusting them as necessary.
  140. 3.3
  141. We found this was much easier than transcribing even simple shapes by
  142. eye, as it was hard to get the proportions right that way. It was also
  143. much quicker than drawing a grid and transcribing coordinates from that.
  144. Laurie van Someren, Aleph One Ltd
  145. 3.3
  146. Å   Interdictor Flight Recorder! Ö It is possible to fly the plane on
  147. your own, run or even record a demo flight. This can be done by altering
  148. the !Run file in the !Interdictor directory. On the bottom line of this
  149. directory is the Éflyæ command. Its permutations are as follows:
  150. 3.3
  151. fly       (just fly the plane as usual)
  152. 3.3
  153. fly playback <filename>   (replay a demo flight from a file)
  154. 3.3
  155. fly record <filename>      (record the flight to a file)
  156. 3.3
  157. If you want an example of how this works, you can look at the !RunDemo
  158. file in the Interdictor direct-ory. This file runs the demo file call
  159. DemoFlight.
  160. 3.3
  161. Å   Low Batteries? One reader noticed that after 15 months, his
  162. Archimedesæ configuration settings began to change inexplicably e.g. the
  163. loss of all disc drive icons in the desktop. Eventually, after various
  164. problems (e.g. the Beebug Serial Link buffer setting kept changing) the
  165. whole system finally froze. However, the problem was fully resolved by
  166. replac-ing the batteries. So be warned. (Acorn recommend replacement
  167. every 12 months.)
  168. 3.3
  169. Å   MS-DOS Hard Disc Partitions Ö The easiest way of getting two hard
  170. disc partitions for the PC Emulator is to get version 1.33, which can be
  171. downloaded from the Archive BBS or SID. Alternatively send us a donation
  172. to our charity pot along with an 800k formatted 3.5ö disc.
  173. 3.3
  174. Å   Multi-tasking First Word Plus? If you rename the !Run file in the
  175. !1stWord+ directory to !Boot then First Word Plus becomes multitasking.
  176. Unfortunately, you cannot reach the disc, palette or task icons.
  177. 3.3
  178. Å   Noisy Fans 1 Ö If you have a fan in your Archim-edes, you should not
  179. disconnect it. The reason for this is that the fan will then be blocking
  180. up the air vent and so the computeræs PSU will operate at too high a
  181. temperature. If you want to reduce the noise of the fan, you should
  182. either completely remove the fan or refer to the following hint.
  183. 3.3
  184. Å   Noisy Fans 2 Ö I have looked at the physical design of the Archi
  185. medes PSU and done a few temperature measurements and it is my belief
  186. that you ought to have a fan fitted and working. So, what can you do to
  187. reduce the annoying noise of the fans? Well, we have several Archimidi
  188. here and the noise drove us to distraction so, being hardware oriented,
  189. I looked at the infernal (sic) fan. Yes, I have found a way of shutting
  190. it up, but before you get too excited, allow me to explain a little
  191. more.
  192. 3.3
  193. These fans are most certainly not your average Scalectrix car 12volt
  194. motor with a set of plastic blades stuck on the front! In fact, we
  195. couldnæt have wished for a better headache Ö these fans (of which weæve
  196. even found two different manufacturers so far) consist of a transistor
  197. circuit driving a coil assembly that is alternately fluxing a permanent
  198. magnet within the plastic rotor. At the same time, the rotor is having
  199. its rotational speed monitored by a hall effect switch, busily counting
  200. the revolutions! How are we going to slow that down? The answer we came
  201. up with was a small transistor circuit of our own that takes the 12v
  202. D.C. input and feeds to the fan a suitably pulsed supply that allows the
  203. fan to start but not reach full speed. Cunning, eh?!
  204. 3.3
  205. Yes, we had to make two slightly different versions of our circuit, as
  206. the fans were not the same electrically. Weæll let you know how they get
  207. on as weære still testing them, but there no problems so far. Ray
  208. Maidstone.
  209. 3.3
  210. If you want more technical info, drop Ray a line via the Archive office.
  211. Ed.
  212. 3.3
  213. Å   Presenter II Stacked Bar option Ö If one of the data sets (columns)
  214. contains several NULL (0 or zero) entries then on the display, some of
  215. the stack-ed bar may be displaced vertically downwards. This is easily
  216. corrected by replacing the NULL entry with a very small value. E.g., if
  217. the data maximum is 100 then a value of 0.1 or 0.05 will do the trick.
  218. 3.3
  219. Å   Second floppy disk drive Ö If you want a second disc drive and donæt
  220. need the a new front fascia for two drives, you can install an NEC 1036A
  221. into the Archimedes, which can be obtained for around ú50.
  222. 3.3
  223. You will also need to buy some ribbon cable, power leads and extra plugs
  224. for the leads. Donæt forget to set the drive to operate as drive 1 and
  225. to *Configure Floppies 2 on the Archimedes.
  226. 3.3
  227.