home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / text / hints / volume_07 / issue_12 < prev   
Text File  |  1995-02-16  |  22KB  |  454 lines

  1. Hints and tips (from Multimedia Column)
  2. 7.12
  3. Å  Genesis Professional Ö One reader wrote to complain that he was
  4. getting repeated crashes when trying to replicate frames. I must admit,
  5. I was unaware of the problem, so I went back and tested it out. The gist
  6. of it is this: if you open a blank page and pull out a frame and then
  7. replicate it, the program crashes. Now when you first pull out a frame,
  8. by default it is a WORD frame, and if you try and replicate it the crash
  9. occurs as Genesis will not allow you to replicate this type of frame.
  10. The cure is simple, just convert the WORD frame into a TEXT frame by
  11. clicking in the frame itself, then you can copy it as many times as you
  12. like.
  13. 7.12
  14. Å  Magpie Ö Some months ago, I issued a challenge to Magpie users about
  15. making a scrolling binder with continuous music. I got no replies to
  16. this challenge, but my solution was a bit of a cheat. Using my CD-ROM, I
  17. set up an audio CD running and then loaded in the Magpie scrolling demo
  18. which had no sound effects! Iæm sure there is a better solution so I
  19. will keep the prizes until someone comes up with a better one!
  20. 7.12
  21. Hints and Tips
  22. 7.12
  23. Å  Boot structure on the Risc PC Ö How many of you have got to grips
  24. with the Boot application on the Risc PC? Itæs a little bit messy on
  25. first glance Ö and even on second and all subsequent glances! However,
  26. it is also very powerful and practical. The following is brief guide to
  27. its contents and what they are used for and goes a little beyond the
  28. discussion in chapter 11 of the User Guide.
  29. 7.12
  30. As many of you have discovered, the !Boot application simply runs the
  31. configure utility, enabling you to select various hardware and desktop
  32. options. It has also done an awful lot of work by the time you get to
  33. the desktop, setting up system variables, configuring your preferences
  34. and booting and running several applications, modules and obey files.
  35. Those of you with stronger stomachs may have shift-double-clicked on it
  36. and will have been faced with a bewildering array of nested directories
  37. and files, many of which are named !Boot or Boot, !Configure or
  38. Configure, and all of these are sufficiently dotted with references to
  39. each other to ensure that all who enter are reduced to quivering
  40. technophobes.
  41. 7.12
  42. Please note that if you are going to make changes to the insides of
  43. !Boot, you would be wise to take a copy of it first. If you do find that
  44. the contents of !Boot.Choices.Boot are irretrievably messy, you can run
  45. the application !ResetBoot in $.Diversions.Tools which will restore
  46. !Boot to its factory settings. Also, I would recommend keeping a copy of
  47. the RISC OS applications contained in $.Apps if you intend to make any
  48. changes to them Ö as you do not get a copy of them on floppy disc, as
  49. you did with previous versions of RISC OS.
  50. 7.12
  51. Apart from the usual application baggage of !Run, !Boot, !Sprites and
  52. !Help, there are two directories that are of interest (Resources and
  53. Choices) and two that arenæt (Library and Utils.)
  54. 7.12
  55. Resources contains the applications that RISC OS needs, but which
  56. neednæt concern the user most of the time, these being !System, !Scrap
  57. and !Fonts. The !Configure application that gets run automatically by
  58. !Boot is also here.
  59. 7.12
  60. Choices contains nothing but a directory called Boot and it is here that
  61. the interesting stuff resides.
  62. 7.12
  63. The obey file PreDesktop gets run first and sets up aliases and system
  64. variables. Its most interesting job is to control which applications
  65. appear when the Apps icon on the iconbar is clicked. In the following
  66. discussion, ÉAppsæ refers to the directory viewer opened by clicking on
  67. the ÉAppsæ icon on the icon bar, whilst É$.Appsæ refers to the directory
  68. called ÉAppsæ in the root of the hard disc. As you will see, they are
  69. not the same.
  70. 7.12
  71. By default the contents of $.Apps all appear in the Apps resource. The
  72. easiest way to have one of your own applications accessible through Apps
  73. icon is to copy it into $.Apps. Note that any applications deleted or
  74. moved from $.Apps will no longer appear in Apps after a reset, and
  75. cannot be retrieved. Apps only contains a Éfacadeæ for the real
  76. applications which are stored elsewhere. If you have a whole suite of
  77. applications you would like to appear in Apps, and you donæt want them
  78. messed up with the contents of $.Apps, you can ask PreDesktop to add
  79. them from any other directory. Near the end of the file PreDesktop is
  80. the line
  81. 7.12
  82. AddApp Boot:^.Apps.!*
  83. 7.12
  84. which will place any application in $.Apps into the Apps. If you want to
  85. add to this a single application stored elsewhere, you can add a line
  86. something like
  87. 7.12
  88. AddApp Boot:^.MyApps.Impression.!Style
  89. 7.12
  90. or to add all the applications in a given directory add a line like
  91. 7.12
  92. AddApp Boot:^.MyApps.UsefulApps.!*
  93. 7.12
  94. The directory PreDesk contains things which need to be run before the
  95. desktop starts. This is intended for use by applications which need
  96. software, modules or drivers in place prior to the desktop but you may
  97. find you are required to place things there manually when installing
  98. certain new hardware and software products.
  99. 7.12
  100. The file Desktop is where the !Boot system filer_boots anything that may
  101. be needed by the operating system, and some of the essentials for the
  102. user. Desktop also causes any applications or obey files contained in
  103. the directory Tasks to be run. Inside Tasks is where applications may
  104. place files they want to be run within the desktop but before the user
  105. gets started. It already contains !ROMPatch and a file called Configure.
  106. If you create a Desktop Boot file from the task manager icon, this is
  107. where it is saved (see page 139 in the User Guide). You can also store
  108. your own goodies here. For instance, if you are using an IDE 105Mb
  109. removable drive in your Risc PC, you may want to place the !SyQuest
  110. Application in the Tasks directory so that it is always present on the
  111. iconbar when you start.
  112. 7.12
  113. There is a drawback with placing applications in Tasks that install
  114. themselves on the icon bar. If you choose to create a desktop boot file,
  115. you may find you get a duplicate copy of your favourite application next
  116. time you reset the computer. The best way is to try it and see. !Syquest
  117. doesnæt suffer from this problem.
  118. 7.12
  119. You may have tried putting your best backdrop on the pinboard and saving
  120. the desktop to have it appear every time you use your Risc PC, only to
  121. find that RISC OS has decided to put one of its bland wallpapers up in
  122. its place. This is because the ...Tasks.!Boot file containing the state
  123. of the desktop (and therefore your pretty picture) gets run before the
  124. file Configure (simply because the files are run alphabetically). Then
  125. the Configure file simply pastes up the textured background choices you
  126. make from the !Configure utility and thus overwrites your true
  127. preference for a backdrop. You can overcome this either by running
  128. !Configure (by double-clicking on the !Boot application), selecting
  129. Énoneæ for background texture in the Éscreenæ options and clicking on
  130. the Ésetæ icon. You could try renaming either !Boot or Configure, so
  131. that they swap positions, but this is not the way to do it because
  132. changing either the desktop boot, or running !Configure, will create the
  133. same problem again.á David Webb, NCS.
  134. 7.12
  135. Å  Changing ChangeFSI Ö It is possible to modify !ChangeFSI v0.95 to
  136. enable non-Risc PC owners to create high/true colour sprites.
  137. 7.12
  138. !ChangeFSI v0.95 allows Risc PC owners to create 16bpp (32,000) or 32bpp
  139. (16,000,000) sprites, but it will not work on non-Risc PC machines Ö an
  140. error message comes up if you try and create one! However, a little
  141. modification of the !ChangeFSI Basic file gets over this problem.
  142. 7.12
  143. Open up the !ChangeFSI application and look for a blue Basic file called
  144. ChangeFSI. Load this file into !Edit and 21 lines down you will see a
  145. line:
  146. 7.12
  147. SYS öOS_SWINumberFromStringò,, öOS_SpriteOpò TO spop%
  148. 7.12
  149. insert an ÉXæ at the start of the öOS_Spriteopò word so that it reads:
  150. 7.12
  151. SYS öOS_SWINumberFromStringò,, öXOS_SpriteOpò TO spop%
  152. 7.12
  153. and 531 lines down (you may wish to use !Editæs F5 key short cut here!)
  154. you will see:
  155. 7.12
  156. SYSöWimp_ReadPixTransò,&100,sar%,n$,,,, ifactors%,pixtrans%
  157. 7.12
  158. insert a ÉXæ at the start of the öWimp_Read...ò word so that it reads:
  159. 7.12
  160. SYSöXWimp_ReadPixTransò,&100,sar%,n$,,,, ifactors%,pixtrans%
  161. 7.12
  162. Resave the file!
  163. 7.12
  164. Now when you enter a 32,000 colour display mode (or set !ChangeFSIæs
  165. output option) and drag a suitable JPEG/TIFF, etc image to !ChangeFSI,
  166. the error will not occur, but a seemingly Éblankæ white window will
  167. appear. The image is really there Ö it just canæt be seen! Save this
  168. Éblankæ image and you will have created your very own high-colour
  169. sprite!á Stuart Halliday, Quantum Software.
  170. 7.12
  171. Å  Replacement miceáÖáWith the Acorn mouse costing ú40* and both the
  172. Clares and Watford mice costing ú30, the survival of our school mice has
  173. been of some concern to me. The oldest mice for the A310s have caused
  174. most problems as they have weak leads and a little stretching breaks the
  175. wires inside the cable. They also go out of adjustment causing the
  176. pointer to stall or go off in the wrong direction. The A3000 mice have
  177. far fewer problems but, after a lot of use, they too can have cable
  178. breaks and one has failed electronically. So far, the A3020 type have
  179. not failed Ö but perhaps they have not been in use long enough.
  180. 7.12
  181. (*We still have a few cut-price Acorn mice at ú20. Ed.)
  182. 7.12
  183. Repairing mice myself was a time-consuming business and replacement
  184. leads were costly too; one from Archive is ú11 or ú13 depending on the
  185. mouse-type. I have used a company called CSL to repair all the A310
  186. mice. They are reliable and quick and have a fixed charge of ú15 plus
  187. VAT, which includes a new cable. This is strong and thick and definitely
  188. child-proof, if a bit clumsy. Meanwhile, I have kept my eyes open for a
  189. cheap replacement. There are numerous compatible Atari and Amiga mice,
  190. usually selling for about ú10 at shows, but they only have two buttons.
  191. Similarly, there are PC mice at a slightly higher price, but the 3-
  192. button variety are for the serial port.
  193. 7.12
  194. Thankfully, the latest Maplin catalogue has a cheap 3-button Amiga
  195. mouse. A little investigation worked out the connections and then a bit
  196. of delicate soldering to a 9-pin miniature DIN plug, also from Maplin,
  197. produced a fully working replacement. The mouse is neat and fits well in
  198. the hand. It has a coated steel ball and membrane switches rather than
  199. microswitches. These could be replaced, but the feel is good anyway. A
  200. possible bonus is that the sensitivity is about twice that of the Acorn
  201. mouse, i.e. it moves twice as far on screen for a given movement across
  202. the mat.
  203. 7.12
  204. For anyone who needs a replacement, I can recommend this route if you
  205. are a competent solderer with a fine iron. The connections and parts are
  206. shown below. Although the wire colours in my mouse were in a convenient
  207. resistor-code order, you should confirm this before soldering.
  208. 7.12
  209. Parts from Maplin Electronics:
  210. 7.12
  211. RT51F Ö Amiga Mouse Ö ú10.95
  212. 7.12
  213. JX19V Ö Min DIN Line Plug 9W Ö 98p.
  214. 7.12
  215. (Prices are inc VAT.)
  216. 7.12
  217. Mouse plug connections
  218. 7.12
  219.   Pin  Function  Colour
  220. 7.12
  221.   9  menu  white
  222. 7.12
  223.   8  adjust  grey
  224. 7.12
  225.   7  select  black
  226. 7.12
  227.   6  yb  blue
  228. 7.12
  229.   5  ya  green
  230. 7.12
  231.   4  xa  yellow
  232. 7.12
  233.   3  xb  orange
  234. 7.12
  235.   2  +5v  red
  236. 7.12
  237.   1  0v  brown
  238. 7.12
  239. Keyboard socket (or rear of plug)
  240. 7.12
  241. Steve Drain, Portland.
  242. 7.12
  243. (If you have never soldered a mini-DIN plug before, be warned Ö it is a
  244. VERY fiddly job! Ed.)
  245. 7.12
  246. CSLæs address is: 15 Spencer Road, New Milton, Hants, BH25 6BZ.
  247. 7.12
  248. Å  Resetting the palette on the Risc PCáÖáOne of our subscribers happily
  249. ran one of the alternative palette files, such as those given for
  250. Artworks and Impression, only to realise that on RISC OS 3.5 there is no
  251. palette icon with which to alter it, or, more importantly, to reset to
  252. default. Weæve not been able to find any easy way to reset the palette
  253. other than to take a default palette from a pre-RISC OS 3.5 computer and
  254. double-click on it on the Risc PC. This does the job so, for those of
  255. you who do not have the luxury of another machine, a default palette is
  256. included on the program disc.á David Webb, NCS
  257. 7.12
  258. Å  RISCáOS 3 Laser Direct driver problemsáÖáIf you look at last monthæs
  259. Archive carefully, you will see a small printing problem with the new
  260. RISCáOS 3 LD drivers from CC. Take page 50 for example and look at line
  261. 8 which starts, öStar to averageò. As you will probably be able to see,
  262. there is a distortion of the text which looks like a missing line or
  263. lines of dots on the printout. Having once identified it, you will
  264. probably be able to see it on many of the pages of the magazine at about
  265. the same position!!!!
  266. 7.12
  267. CC know about the problem and say that they are looking into it. There
  268. is, however, a temporary solution. To stop it, you have to switch off
  269. the half-toning of text. To do this, shift-click on the !Printers icon
  270. on the iconbar and set the options as shown opposite to öGraphics onlyò.
  271. 7.12
  272. The only slight snag with this is that it reveals another (even worse)
  273. bug. If, with half-toning on graphics only, you print something
  274. sideways, it goes completely AWOL and prints the text at the wrong
  275. spacing and in totally the wrong place!á Ed.
  276. 7.12
  277. (Stop Press Ö CC say that they have a beta-release of version 2.65 which
  278. they are going to send me. It seems to have fixed the problems but, of
  279. course, you can never be sure until it is thoroughly tested.á Ed.)
  280. 7.12
  281. Å  Selecting modes in Basic on the RiscáPC Ö We recently had an enquiry
  282. regarding the effects of the MODE command in Basic on the Risc PC.
  283. Unlike previous machines, the mode can be set using a mode definition
  284. string rather than just a number. The idea is that this gives access to
  285. the whole range of modes available to the Risc PC. If the specific
  286. machine on which the software is running does not support the mode
  287. requested, the closest mode which is available will be selected.
  288. 7.12
  289. The mode description string takes the form öXn Ym Ckò where n is the
  290. desired X resolution, m is the desired Y resolution, and k sets the
  291. number of colours ù 2, 4, 16, 256, 32K, 16M are all valid colour
  292. specifiers. For example MODE öX800 Y600 C16ò will choose a mode similar
  293. to mode 31 on earlier machines. Note also that the resolutions given in
  294. the string are the required resolutions in Pixels, not logical units as
  295. used by the Basic MOVE/DRAW/PLOT commands for example. More on this
  296. later.
  297. 7.12
  298. The mode can be specified either by number or by string. Most of the old
  299. modes are supported, and with some calculation, the new modes are also
  300. accessible by number. The easiest way to find the number is to enter the
  301. mode using the mode string, and then öPRINT MODEò which will display the
  302. current mode number.
  303. 7.12
  304. Unfortunately, for users who have worked their way up from earlier
  305. machines, the new system has some strange effects. The new method makes
  306. more sense than the old system which was based on the BBC Micro system
  307. of TTL rgb colours, but you do need to be aware of the changes. When a
  308. mode is chosen by number and the mode has 2, 4 or 16 colours, then the
  309. palette is redefined to be the same as that offered on the BBC,
  310. including, for 16 colour modes, the flashing colours. This is identical
  311. to the operation of earlier RISC OS machines.
  312. 7.12
  313. If the mode string is used, however, there are some differences.
  314. Firstly, using the string has the same result as a ö*wimpmodeò command
  315. being issued rather than a ö*modeò. The effect is that (a) the desktop
  316. mode will have changed, and (b) the palette will be redefined to match
  317. the desktop palette for that number of colours, including clearing the
  318. screen to a mid-grey background, and selecting black text on a white
  319. background. Secondly, the computer gets to choose what it thinks is the
  320. best mode for the job. As noted above, MODE öX800 Y600 C16ò gives you
  321. the same size and colours as mode 31, however the two are not identical.
  322. MODE 31 specifies a particular mode whereas the string specifies general
  323. requirements for the mode. In this case, where mode 31 has a refresh
  324. rate of 56Hz, the mode string selects a mode which has a refresh rate of
  325. 75Hz, considerably reducing the flicker. The important point here is
  326. that, by passing a string, the choice of mode is more independent,
  327. allowing the computer to choose the mode it can support that is closest
  328. to the mode requested.
  329. 7.12
  330. If you need to use a limited number of colours, the best method to use
  331. is the mode string, followed by a redefinition of the palette if needed,
  332. using VDU 19,n,16,r,g,b. Individual colours can be chosen as normal
  333. using GCOL a,c. The more öofficialò method, especially for high colour
  334. modes is to use the mode string and the SWIáColourTrans_SetG-COL since
  335. that will choose the closest colour in the palette defined. (For best
  336. results, you may still wish to change the palette in low colour modes
  337. for particular tasks). An example is shown below in procedural form
  338. which you may find useful. The procedure will work on earlier machines
  339. as well.
  340. 7.12
  341. REM PROCsetcolour
  342. 7.12
  343. REM r%, g%, b% set the amounts of red green
  344. 7.12
  345. REM and blue for the desired colour,
  346. 7.12
  347. REM Colourtrans will be used to pick
  348. 7.12
  349. REM the closest colour and set it.
  350. 7.12
  351. REM effect% is a standard GCOL effect field
  352. 7.12
  353. REM Use SWI number for speed :
  354. 7.12
  355. REM ColourTrans_SetGCOL = &40743
  356. 7.12
  357. :
  358. 7.12
  359. DEF PROCsetcolour(r%,g%,b%,effect%)
  360. 7.12
  361. LOCAL colour%
  362. 7.12
  363. colour%=(b%<<24)+(g%<<16)+(r%<<8)
  364. 7.12
  365. SYS &40743,colour%,,,0,effect%
  366. 7.12
  367. ENDPROC
  368. 7.12
  369. Finally, let me deal with the OS and pixel units conversions mentioned
  370. earlier. Unlike PCs where locations of pixels tend to be addressed
  371. directly, Acorn has always had a level of indirection - the ölogical
  372. resolutionò. This had two main advantages in the past, firstly that the
  373. logical resolution did not change with mode, so a line across the middle
  374. of the screen would still appear in the middle even if you changed the
  375. number of pixels on the screen. Secondly, the display worked in the same
  376. way as a mathematical graph, with the origin at the bottom left corner
  377. of the screen, y increasing upwards. If absolute pixels are used, the
  378. top left is the origin, and y decreases downwards.
  379. 7.12
  380. The first of these two advantages no longer holds. Because of the
  381. dramatic increase in resolutions and the need to fit more onto the
  382. screen mean, the logical resolutions for different modes are no longer
  383. identical. Consider the table on page 525 of the Risc PC User Guide:
  384. Mode 12 is 640╫256 pixels but has a logical resolution of 1280╫1024.
  385. Incidentally, this was the standard logical resolution for all modes on
  386. the BBC and earlier Archimedes. Mode 27 at 640╫480 only has a logical
  387. resolution of 1280╫960 i.e. although mode 27 is öhigher resolutionò, you
  388. actually get less of a page on the screen than you do in mode 12! (You
  389. will have to take my word for the logical resolutions Ö they have been
  390. taken out of the Risc PC manual, but appeared in earlier versions if you
  391. have access to those ù page 221 of the joint User & Applications guide
  392. for RISC OS 3.)
  393. 7.12
  394. This has been used to good effect on the Risc PC, allowing large area
  395. desktops such as the X1600 Y600 mode which has four times the area of
  396. the X800 Y600, but only double the number of pixels.
  397. 7.12
  398. This means that you do not know what the logical resolution of a mode is
  399. when you choose it, so to make your software as mode independent as
  400. possible, you need to check the actual and logical resolutions using the
  401. SWIáOS_ReadModeVariables and set up appropriate scaling factors. If you
  402. do not have the PRMs, you can assume that for rectangular pixel modes
  403. 2*X converts a pixel to the correct logical position, and 4*Y gives the
  404. appropriate scaling for the vertical. In square pixel modes, use 2*X and
  405. 2*Y for the scaling. If the actual Y resolution is less than half of the
  406. actual X resolution then it is probably safe to assume a rectangular
  407. pixel mode, otherwise assume square pixel.
  408. 7.12
  409. On the monthly program disc is a program called ösetcolourò which
  410. includes the above procedure. As a demonstration, the program goes
  411. through 2, 4, 16, 256, 32K and 16M colours and displays a slice from the
  412. colour cube. (You may find the program fails to display the higher depth
  413. modes if you do not have any VRAM). Simply double click on it, once it
  414. has finished the first colour square, press a key to move on to the next
  415. higher colour depth. You may need to reset your desktop mode after it
  416. has finished. SetColourN is similar but only uses 2, 4, 16 and 256
  417. colours referenced by number to demonstrate the difference between
  418. desktop and default öBBCò palettes. This version will also work on pre-
  419. Risc PC machines.á Matthew Hunter, NCS.
  420. 7.12
  421. Å  Sound Boots?áÖáFor those of you seeking to boost the sound output of
  422. your computer, may I suggest you take a quick trip to your local branch
  423. of Boots the Chemist. In the music department, you should find a pair of
  424. Bootsæ own brand ZX200CD microspeakers for a mere ú14.99. These come in
  425. rather a naff cardboard box, but do have a volume control on the front
  426. of each speaker plus a PBS button which enhances the bass sound. They
  427. require four LR6 batteries (about another ú3) but as they have auto
  428. power switch off, these last a fair time. The supplied lead plugs
  429. directly into the headphone socket on an Acorn computer.
  430. 7.12
  431. The difference is stunning and, certainly in a noisy classroom, they
  432. would be a great help. Even in the home environment, they can make a lot
  433. of difference.á Paul Hooper, Martham, Norfolk.
  434. 7.12
  435. Å Thumbnail creation Ö Quantum Software have provided Archive
  436. subscribers with a copy of Executor (the playback-only version of
  437. Keystroke). It has been supplied as seen, with no warranty, etc, for use
  438. by Archive magazine subscribers only, to demonstrate some of the
  439. abilities of Keystroke.
  440. 7.12
  441. The application has the ability to produce, from a directory of JPEG or
  442. TIFF files, a multi-sprite file Ö in effect, making a !Paint Éthumbnailæ
  443. file.
  444. 7.12
  445. These thumbnail sprite files are very useful for displaying your bit-map
  446. images quickly and, whilst it isnæt as good as a professional thumbnail
  447. application, they cost money. Because Paint and this copy of Executor
  448. come free, this is an definite advantage!á Stuart Halliday, Quantum
  449. Software.
  450. 7.12
  451. N.B. Quantum are also offering Keystroke at a special price of ú19 to
  452. Archive subscribers for a limited period. For details, see page 5.ááAá
  453. 7.12
  454.