home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1997 / ARCHIVE_97.iso / text / hints / vol_10 / issue_11 < prev    next >
Text File  |  1997-08-11  |  12KB  |  279 lines

  1. Hints and Tips
  2. 10.11
  3. Control in the classroom - One of the areas most frequently lacking
  4. in schoolsæ IT curriculums is that of Control. A major factor in this
  5. is the cost of buying buffer boxes and the various items of inputs
  6. and outputs that would be connected to them. A high quality buffer
  7. box such as the Commotion Serial Control Box costs around ú240, so if
  8. you wanted, say, ten of them for use with a class in a high school,
  9. you are looking at around ú2,500 cost straightaway. This may well be
  10. worthwhile if the school can afford it, but what are the other lower
  11. cost options?
  12. 10.11
  13. You could go for on-screen simulation using software such as Focus
  14. ITæs excellent Visual Control Learning package - a good example of
  15. recent innovation for Acorn computers only.
  16. 10.11
  17. However, many schools already have the old green Deltronics buffer
  18. boxes dating back to use with the BBC Micro. Indeed, one of the last
  19. uses that Beebs are being put to locally is their use with these
  20. boxes. You can, of course, use these boxes with later Acorn A series
  21. machines but that involves buying a user port for each machine they
  22. are to be used on. At around ú40 a time, thatæs up to ú400 for ten
  23. machines, and you still need to buy software to run them.
  24. 10.11
  25. Fortunately, Design IT have come up with a more affordable solution.
  26. They have a modification available to run these boxes from the
  27. parallel port. You are limited to five inputs from a machine with a
  28. bi-directional parallel port, i.e. A30x0 or later, or two inputs from
  29. an older machine with a uni-directional parallel port, but five
  30. inputs should be enough for many useful applications. The
  31. modification involves:
  32. 10.11
  33. a) buying a special parallel port lead with a modification kit, at
  34. around ú12 per machine. Not all of these boxes use the same type of
  35. lead; there are two variations, but both are catered for, though this
  36. should be specified on your order. The two types are (i) those that
  37. connect to a D connector on the back of the box and (ii) those with
  38. an extension type of lead that connects to an existing ribbon cable
  39. coming out from inside the box.
  40. 10.11
  41. b) buying a site licence to drive it, at ú40 for a primary school and
  42. ú80 for a secondary school.
  43. 10.11
  44. The modification is a bit fiddly to fit but anyone who is able to
  45. solder three connections, cut a track and change two small chips
  46. (only necessary for some of the boxes) should be able to do it. If
  47. you get stuck, there is friendly help at the end of the phone line.
  48. It is the sort of job that may take a non-technician an hour or so
  49. the first time, while you work out exactly what has to be done, but
  50. after that it should only be a few minutes per box if you are
  51. reasonably skilled at soldering. Thus you can have ten machines up
  52. and running for around ú200 or twenty for ú320 - a considerable
  53. saving, particularly considering that this includes the software to
  54. run it on a site licence basis. Incidentally, the modification does
  55. not stop the buffer box still being used on a BBC as and when
  56. required.
  57. 10.11
  58. The software, called DelTron, portrays the buffer box in a window
  59. (see above) with indication as to which inputs and/or outputs are
  60. switched on. It allows you to control it via a Logo type language of
  61. procedures in a manner akin to others of the same kind. I have found
  62. that it is vital to turn the softwareæs Éauto senseæ (of the box)
  63. feature off in order to get it to work, but that is easily done.
  64. 10.11
  65. A well thought out and economical idea to Érecycleæ these boxes and
  66. make them Égreenæ in more ways than one.
  67. 10.11
  68. Mike Battersby, Kingston Schoolsæ IT Unit
  69. 10.11
  70. Outline fonts in windows - Getting outline fonts in RISC OS windows
  71. is a rarely covered topic in even the best programming courses and
  72. books and, without the PRMs or a lot of time to experiment in, it is
  73. nearly impossible to utilise this feature. Most books just ignore it
  74. or include an obscure little note about it.
  75. 10.11
  76. Since the arrival of RISC OS 3.6, outline fonts can be put all around
  77. the desktop simply by changing the configuration. So why do you need
  78. them any more?
  79. 10.11
  80. I find that putting outline fonts into windows improves the
  81. appearance (and sometimes usability) of a program substantially. In
  82. days gone by, they were not included in commercial programs because
  83. of the time it took to display them. However, in the era of the Risc
  84. PC (and the A7000+), fonts can be displayed very easily and quickly.
  85. 10.11
  86. To make things a lot simpler (for you and me), I shall assume that a
  87. template editor is being used and windows are being loaded from
  88. templates. I will also put the code in Basic, although the principles
  89. can be ported to C or machine code without too much hassle.
  90. 10.11
  91. Firstly, a simple template needs to be created. Any editor can be
  92. used, but do not use very old versions of these programs as they will
  93. probably be geared to RISC OS 2. I recommend TemplEd above all others.
  94. 10.11
  95. Design a simple window like the one in the diagram. To be safe, only
  96. use fonts that are built into the computeræs ROM (Trinity, Corpus and
  97. Homerton). Make a note of all the font names (in full) and sizes that
  98. appear in all of your icons that are outline. Please note that to
  99. have an outline font in an icon, the icon must be indirected. Then,
  100. save your template as usual in your program directory.
  101. 10.11
  102. (This is a ludicrous example of a template which does not conform at
  103. all to the RISC OS Style Guide but it illustrates the principle quite
  104. well.)
  105. 10.11
  106. To load a template which has outline fonts in it, you use the same
  107. SWI call but you need a 256 byte memory block containing all the
  108. necessary font handles for your windows. This is done by the
  109. following routine. It should be called before the template loading
  110. routine.
  111. 10.11
  112. DEFPROCget_fonts
  113. 10.11
  114. DIM font% 256 : REM Space for the font
  115. 10.11
  116.  handles
  117. 10.11
  118. READ loops%
  119. 10.11
  120. FOR pass%=1 TO loops%
  121. 10.11
  122. offset%=(pass%-1)*4
  123. 10.11
  124. READ name$
  125. 10.11
  126. READ x%
  127. 10.11
  128. READ y%
  129. 10.11
  130. SYS öFont_FindFontò,,name$,x%*16,y%*16
  131. 10.11
  132.  TO font%!offset%
  133. 10.11
  134. NEXT pass%
  135. 10.11
  136. DATA 3 :REM Number of fonts to reserve
  137. 10.11
  138. DATA öHomerton.Medium.Italicò,12,12 :
  139. 10.11
  140.  REM Font name,x size,y size
  141. 10.11
  142. DATA öTrinity.Mediumò,16,16
  143. 10.11
  144. DATA öCorpus.Boldò,42,42
  145. 10.11
  146. ENDPROC
  147. 10.11
  148. The above routine is very self-explanatory. You can change the font
  149. handles which are obtained by altering the DATA statements at the end
  150. of the routine.
  151. 10.11
  152. Once the above routine has been executed, call this loading routine
  153. instead of your standard one:
  154. 10.11
  155. DEFFNload_template_window(temp_path$
  156. 10.11
  157. ,w_name$,font%)
  158. 10.11
  159. SYS öWimp_OpenTemplateò,,temp_path$
  160. 10.11
  161. SYS öWimp_LoadTemplateò,,m_space%,
  162. 10.11
  163. space%,spaceend%,font%,w_name$
  164. 10.11
  165. ,0 TO ,,space%,,,,there%
  166. 10.11
  167. SYS öWimp_CloseTemplateò
  168. 10.11
  169. IF there% THEN
  170. 10.11
  171. SYS öWimp_CreateWindowò,,m_space% TO
  172. 10.11
  173.  handle%
  174. 10.11
  175. ELSE
  176. 10.11
  177. ERROR 0,öWindow template not found!ò
  178. 10.11
  179. ENDIF
  180. 10.11
  181. =handle%
  182. 10.11
  183. Repeated calls should load all the necessary windows from the
  184. template file. The windows will behave as normal when created.
  185. 10.11
  186. The Éload_templateæ routine takes a number of parameters. These are:
  187. 10.11
  188. temp_path$ = String pathname of template
  189. 10.11
  190. w_name$ = Name of window to be loaded from template
  191. 10.11
  192. font% = Pointer to font table (defined in previous routine)
  193. 10.11
  194. Beware! There are also other variables that need to be defined
  195. earlier in the program! Firstly, you must have a general usage memory
  196. area called m_space%. Secondly, you need a space for indirected icons
  197. called space%. The end byte of this memory block must be in a
  198. variable called spaceend%. This can be done by a few lines of code:
  199. 10.11
  200. DIM m_space% 1024 (whatever size is necessary)
  201. 10.11
  202. blksize%=800 (Again, the size of the block has to
  203. 10.11
  204.  fit the template)
  205. 10.11
  206. DIM space% blksize%
  207. 10.11
  208. spaceend%=space%+blksize%
  209. 10.11
  210. I hope this has helped some programmers to understand how to get
  211. outline fonts in windows. If anyone has done the Alan Senior WIMP
  212. course, or an equivalent, and wants to go further into WIMP
  213. programming, it would be advisable to buy the PRMs. These are very
  214. expensive (I bought mine from NCS for ú105) but have got everything
  215. in them. They are very obscure, though, and you need a lot of time
  216. free to read through and understand them.
  217. 10.11
  218. Artemis Entreri, Waterlooville
  219. 10.11
  220. Using Termite Internet with Cable Internet - Recently, the cable
  221. companies have introduced an offer to schools for Internet access via
  222. the Cable Internet service. The annual price includes access,
  223. software and unlimited calls to the point of presence phone number,
  224. thus allowing schools to budget their yearly internet cost without
  225. having to worry about unknown size of telephone bills. It should also
  226. allow schools to provide access without the worry of trying to
  227. administer a system which controls phone usage. The cost is very
  228. reasonable, being ú100 for schools with less than 250 pupils, ú250
  229. for those with 250 to 500 pupils and ú500 for those with 500 pupils
  230. or more.
  231. 10.11
  232. Of course, Cable Internet only provide software for Windows or
  233. Macs(!). I have been evaluating the service and, as part of that, I
  234. wanted to check whether it would work OK with Acorn software for
  235. schools who wish to run it on Acorns. The good news is that it
  236. appears to work fine. In fact, would you believe that, excluding the
  237. time it took to get the relevant pieces of information from the Cable
  238. Internet help line, it took me only about half an hour to have it up
  239. and running using Termite Internet from Doggysoft, whereas it took me
  240. over two hours to get the supplied Windows 95 software running!!
  241. 10.11
  242. This was made possible courtesy of Termiteæs clever öCreate Script
  243. Fileò option on its main startup panel which asks for the basic data
  244. needed (easily available from the Cable Internet help line - just ask
  245. them for each bit as Termite prompts) and then creates an appropriate
  246. script file and adds Cable Internet, or whichever provider you are
  247. creating a file for, to the list of providers in the configuration
  248. options. After a month of testing, it has logged on successfully
  249. first time every time bar none!
  250. 10.11
  251. On request, Cable Internet also allows 5Mb of web space. Once asked
  252. for, a user name (probably the email alias) and password allow you to
  253. ftp (file transfer protocol) web pages and graphics etc, into your
  254. personal web space. The Windows 95 software provided only allows you
  255. to transfer into the root directory, so you have to download an
  256. additional ftp utility to do more than that. However, Termite has ftp
  257. built in and you can upload using all the drag and drop facilities of
  258. RISC OS, so an entire web site of multiple pages and directories can
  259. be selected and dragged into the web space directory with a single
  260. öSelect Allò and drag and drop. This all works fine, as do deleting,
  261. renaming etc of the files uploaded. A directory can only be deleted
  262. on the Cable web space if it is empty, though, so its contents need
  263. to be deleted first.
  264. 10.11
  265. Itæs true that Termiteæs web browser needs updating, though I am told
  266. that that is in progress and will happen ösoonò, but the fact that it
  267. is easier to set up and use than Cable Internetæs own PC software
  268. says something! For schools wanting to take advantage of the Cable
  269. Internet offer, and use it on Acorns, this is a way I would
  270. definitely recommend. I have provided NCS with the files needed for
  271. use with Termite so that others neednæt create a script file, just
  272. replace two default files with the ones provided - a half a minute
  273. task. Then all you need do is choose Cable Internet as the service
  274. provider, choose the appropriate local phone number, enter user name
  275. and password, and you are off!
  276. 10.11
  277. Mike Battersby, Kingston Schoolsæ IT Unit
  278. 10.11
  279.