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

  1. Å   *RMTidy and ADFS Ö If you perform a *RMTidy any discs will be
  2. dismounted and any directory settings (*DIR) will be lost. This is
  3. because this function re-initialises all the modules including the
  4. FileCore%ADFS and ADFS modules.
  5. 3.2
  6. Å   Acorn DTP Ö if you want to import text that has a return at the end
  7. of each line e.g. spooled BASIC programs, poetry, songs, etc then if you
  8. import them directly Acorn DTP will ignore the returns and give you a
  9. continuous block of text. There is a way around this problem:
  10. 3.2
  11. 1) In Acorn DTP define a new style say PROGRAM or SONG, etc
  12. 3.2
  13. 2) Set the space above parameter to 0
  14. 3.2
  15. 3) Load your text into !Edit
  16. 3.2
  17. 4) Select the find window of the !Edit menu i.e. press <f4>
  18. 3.2
  19. 5) Select the Émagic charactersæ option
  20. 3.2
  21. 6) Type: \x0A into the find box and /x0a/x0a in the replace box
  22. 3.2
  23. 7) Select the GO option and then select the Éreplace end of fileæ option
  24. 3.2
  25. The effect is that each line is treated as a new paragraph with its
  26. style defined as PROGRAM.
  27. 3.2
  28. Å   Alphabase RISC-OS compatible? I read Gerald Fittonæs tale of woe
  29. (Archive 2.12 p43) just two days after encountering exactly the same
  30. problem myself with Alphabase. The ÉReadmeæ file on the program disc
  31. states that hard disc installation can be done in Éthe usual RISC-OS
  32. manneræ rather that using the ÉInstallæ file. It seems to me that it
  33. must be done in the former way! Apart from messing up the configure
  34. settings as Gerald describes, ÉInstallæ fails to copy the !Alphabase
  35. application directory to drive 4 (it canæt, since the *COPY command
  36. issued at line 160 has no R option). Remedying this doesnæt help: the
  37. program still crashes with a Écanæt findæ message when you attempt to
  38. boot via the Library. After wasting many hours in debugging attempts, I
  39. scrubbed the lot and simply copied !Alphabase to :4.$, whence the
  40. program is run without problems by clicking on the desktop. Inciden
  41. tally, again contrary to what is said on the ÉReadmeæ file, the floppy
  42. disc stubbornly refused to boot on Shift-Break. Bill Templeton.
  43. 3.2
  44. Å   Archimedes Fans Ö Ray Maidstone of Norwich has been investigating
  45. Archimedes fans (the cooling kind). He says that if you plug in any
  46. extensions on to your Archimedes e.g. backplanes, RAM upgrades, etc then
  47. you really should be using a fan. This keeps the temperature of the
  48. Archimedes at an acceptable level, thereby extending the life of the
  49. components.
  50. 3.2
  51. Å   Binary-Chop Ö Michael Sawle sent in this routine which can be used
  52. for locating an item in an array Ö one of the beauties of this routine
  53. being that it only needs enough characters to uniquely identify the
  54. string being searched for. The routine requires data to be stored
  55. alphabetically in a matrix M$(1),M$(2),...,M(NR%) where NR% is the
  56. number of records currently stored. The routine returns the matrix
  57. element number of the desired record (or nearest available).
  58. 3.2
  59. DEFFNbinarychop(find$)
  60. 3.2
  61. LOCAL A%,B%,R%
  62. 3.2
  63. where=0 : A%=0 : B%=NR%
  64. 3.2
  65. REPEAT
  66. 3.2
  67. R%=INT((A%+B%)/2)
  68. 3.2
  69. IF M$(R%)>find$ THEN
  70. 3.2
  71. B%=R%
  72. 3.2
  73. ELSE
  74. 3.2
  75. IF M$(R%)<find$ THEN A%=R%
  76. 3.2
  77. ELSE
  78. 3.2
  79. where=R%
  80. 3.2
  81. ENDIF
  82. 3.2
  83. ENDIF
  84. 3.2
  85. UNTIL where>0 OR B%-A%=1
  86. 3.2
  87. IF where=0 THEN where=A%+1
  88. 3.2
  89. =where
  90. 3.2
  91. In fact this routine should be called a binary search routine. It chops
  92. the list of records in two and then checks which half of the data set
  93. the search string should appear. It then chops this half in two and so
  94. on until finds the string or it realises the string does not exist. This
  95. means that the computer can significantly reduce the number of checks it
  96. has to make before reaching a result e.g. if you have 32768 (i.e. 2^15)
  97. records then the computer will make a maximum of 15 checks. The price
  98. that must be paid for this efficiency is that the data set must be
  99. sorted in some recognisable order e.g. alphabetically, numerically,
  100. ASCII, etc. The best versions of this technique are usually recursive.
  101. (Perhaps someone might like to have a go at writing one?)
  102. 3.2
  103. Å   Colour TVæs as monitors Ö Several times in Hints & Tips, connection
  104. of the Archimedes to colour TVæs has been mentioned. I have succeeded in
  105. doing just this. In Archive 2.7 p11, Oliver Cornes says that plugging
  106. the Archimedesæ SCART into a video recorder doesnæt work Ö this is
  107. because a VCR only deals with composite signals, not RGB. However, if
  108. your TV has a SCART socket, and many new ones do, then connection may
  109. well be possible direct to the TV. You will have to tell the TV to use
  110. RGB input, not the composite (it only uses composite then for timing).
  111. There may be (indeed, it would be odd if there wasnæt) a way of doing
  112. this with the TV controls. My TV has two sockets and if you tell it to
  113. use socket 0 it uses socket one with RGB.
  114. 3.2
  115. However, I didnæt find this out until I found out that one of the pins
  116. on the SCART standard is for just this type of use Ö pin 16 must be
  117. between +1V and +3V with respect to pin 18 (i.e. connect a 1.5V battery
  118. between them Ö the Öve end to pin 18, the +ve end to pin 16). The TV
  119. then automatically switches to SCART RGB input. Note that this overrides
  120. any channel selection made, so you should put a switch in line so you
  121. can switch the signal off, otherwise you canæt watch TV. Connection to
  122. the SCART plug is often maligned as difficult, but it is only a case of
  123. knowing how to do it. The proper way is to remove the pin you wish to
  124. make connection to, connect it up and then put it back. The pins have
  125. barbs to prevent them from falling out, so use a pair of narrow pliers
  126. to squeeze the barb back and push the pin out through the rear of the
  127. plug. Also make sure that you re-insert the pin the right way round Ö
  128. just copy the other pins. They only go in properly one way round anyway.
  129. Kevin Quinn
  130. 3.2
  131. Å   FileCore in use remedy Ö If the Archimedes Éseesæ too many ADFS
  132. directories then a ÉFilecore in useæ error may occur and you will be
  133. unable to save any data in your machine. You can overcome this by typing
  134. the following four lines after the error has occurred:
  135. 3.2
  136. *RmReInit FileCore (this will fail giving a Bad number error)
  137. 3.2
  138. *RmReInit FileCore
  139. 3.2
  140. *RmReInit ADFS
  141. 3.2
  142. *RmReInit HardDisc (A300æs and A3000æs only)
  143. 3.2
  144. Å   MaxGammon update Ö The MaxGammon game on Careware 2 cannot be played
  145. in mode 15. In order to over come this you should:
  146. 3.2
  147. 1) Load in the BASIC !RunImage file in the !MaxGammon directory.
  148. 3.2
  149. 2) Type the following:
  150. 3.2
  151. 10840colour%=FNmg_Colour(mg_red
  152. 3.2
  153. _player%)
  154. 3.2
  155. 11230tc%=mgc_grey_point%
  156. 3.2
  157. 3) Save the program.
  158. 3.2
  159. Å   Oak MS-DOS SCSI as Drive D Ö I use the PC emulator occasionally for
  160. my work. It therefore did not take very long to use up all 10M of the
  161. MS-DOS drive C partition on my 47M SCSI drive. The obvious thing to do
  162. would be to create another MS-DOS partition for drive D. However on the
  163. version of the PC emulator that I am using (Emulate121) the Archimedes
  164. hard discs 4 and 5 are mapped to MS-DOS discs C and D. Therefore drive C
  165. and D cannot both exist on the same hard disc (on the emulator) and two
  166. hard disc drives are required for two partitions.
  167. 3.2
  168. On the OAK SCSIFS each winchester drive has the following information:-
  169. 3.2
  170. a) filing system drive number (e.g. :4 or :5)
  171. 3.2
  172. b) SCSI hardware address (each device on the SCSI bus has a unique
  173. address)
  174. 3.2
  175. c) logical unit number (SCSI Ésoftwareæ address)
  176. 3.2
  177. If you are lucky enough to have an OAK SCSI (::SCSIDisk4) with an MS-DOS
  178. partition (Drive _C) then hereæs how to create MS-DOS drive D.
  179. 3.2
  180. 1. Run ÉSCSIFormæ
  181. 3.2
  182. 2. Note that drive :4 is SCSI ID = 0, LUN = 0
  183. 3.2
  184. 3. Add drive 5 with SCSI with SCSI ID = 0, LUN = 0 (same as drive :4)
  185. 3.2
  186. 4. Exit SCSIForm and enter the desktop. There should be an additional
  187. hard disc icon ÉSCSI 5æ
  188. 3.2
  189. 5. Start up the PC emulator (version 1.20 or greater?)
  190. 3.2
  191. 6. Type FDISK. An extra option should appear (5 Ö select next fixed disc
  192. drive). Select this and the disc drive should now become number 2. Then
  193. select option 1 ÉCreate DOS Partitionæ
  194. 3.2
  195. 7. Type Format D:
  196. 3.2
  197. 8. Type CHKDSK D: (this checks partition is OK)
  198. 3.2
  199. 9. When using the desktop always us SCSIFS::SCSIDisc4. Ignore disc 5
  200. 3.2
  201. Ralph Barrett
  202. 3.2
  203. (We have not had a chance to try this out yet, so you follow these
  204. suggestions at your own peril. Ed)
  205. 3.2
  206. Å   Recursive directory move bug Ö one reader noted that while in the
  207. desktop, if you moved a directory into itself (by holding the shift
  208. button down while copying) the files in the directory will be moved
  209. further and further down a directory tree until your whole disc has been
  210. filled with directories! The problem with this bug is that you canæt
  211. move your files back to their original position because the disc is
  212. already full. You must copy the other files onto another disc and then
  213. remove the offending directory.
  214. 3.2
  215. Å   To scroll or not to scroll? The strange behaviour mentioned in the
  216. BASIC V Forum (Archive 3.1 p36) is actually caused by the *Configure
  217. Scroll or *Configure NoScroll setting. This setting allows us to control
  218. the behaviour of the ends of lines. *Configure Scroll should be used for
  219. compatibility with earlier machines. The RISC-OS desktop, however, has a
  220. habit of countermanding the configured values and in this case it
  221. decides that it prefers NoScroll. If you have a program which relies on
  222. the behaviour of the ends of lines, then you can execute VDU 23,16,&FE,1
  223. || to temporarily obtain the Scroll option, or VDU 23,16,&FE,0 || to
  224. obtain NoScroll behaviour.
  225. 3.2
  226.