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

  1. Å   Auto-Booting on Startup Ö The following tip is of particular use to
  2. users of hard disks.
  3. 3.8
  4. With so many extensions to RISC-OS being avail-able, most notably the
  5. Outline Font Manager, it can be inconvenient if your applications canæt
  6. find them and even worse if the first !System directory that is seen is
  7. on a floppy.
  8. 3.8
  9. The simplest solution to this is to put !Fonts and !System in the root
  10. directory of your hard disk and then open the root directory as your
  11. first action.
  12. 3.8
  13. However, if the same action has to be performed repeatedly, then the
  14. computer must be able to do it for you and it can.
  15. 3.8
  16. First you should create a command file called !Boot in Edit. This should
  17. contain something like:
  18. 3.8
  19. adfs::4.$.!System
  20. 3.8
  21. adfs::4.$.!Fonts
  22. 3.8
  23. DESKTOP
  24. 3.8
  25. This will then initialise the system and font paths before starting the
  26. desktop. To make it run on startup, you must configure the system to
  27. execute the !boot file, this is done from an operating system * prompt
  28. by:
  29. 3.8
  30. *configure boot
  31. 3.8
  32. *configure drive 4
  33. 3.8
  34. *opt 4,3
  35. 3.8
  36. The last option sets the current drive to execute the !boot file, rather
  37. than attempting to run it as a BASIC program.
  38. 3.8
  39. This is not the end of the startup. When you invoke the desktop, it is
  40. possible have one or more applications run automatically. To run a
  41. single application, just append the application path on the end of the
  42. DESKTOP command, for example:
  43. 3.8
  44. DESKTOP adfs::4.$.!Edit
  45. 3.8
  46. This will startup the desktop with Edit on the menu bar. To initialise
  47. more than one application, you specify a text file which lists all the
  48. applications that you wish to start.
  49. 3.8
  50. DESKTOP -File adfs::4.$.Startup
  51. 3.8
  52. The file Startup might contain the following list of files:
  53. 3.8
  54. adfs::4.$.!Draw
  55. 3.8
  56. adfs::4.$.!Edit
  57. 3.8
  58. adfs::4.$.!Paint
  59. 3.8
  60. This will then enter the desktop and start Draw, Edit and Paint
  61. automatically. One word of warning, if you are limited to 1 Mb, be
  62. careful as it would be very easy to use up all the available memory.
  63. 3.8
  64. Further customisation could be had by adding RMload commands to the !Run
  65. file of !System to automatically load modules (such as NewModes) and
  66. Filer_OpenDir pathname to the !Run files of applications in the startup
  67. file to automatically open directory viewers. Phil Kitching
  68. 3.8
  69. Å   BasicEdit Ö For users of the Data Store !Basic-Edit application:
  70. Because this application uses the DSUtil module to alter the operation
  71. of the mouse pointer it is not possible to run desktop programs
  72. successfully from Edit without returning to the desktop first. This,
  73. however, has the disadvantage that programs are more difficult to debug:
  74. when a program ends it returns to the desktop and all the variables are
  75. lost. A few simple changes to the !BasicEdit.!RunImage program, however,
  76. seem to provide a satisfactory remedy. Insert near the start of the
  77. program the following function key definitions:
  78. 3.8
  79. *KEY 2 *BEUtilOff|M*BASIC|MOLD|M
  80. 3.8
  81. RUN|M
  82. 3.8
  83. *KEY 3 *BEUtilOn|MEDIT .|M
  84. 3.8
  85. Then to run any program from the Edit screen simply press <f1> once and
  86. <f2> once. If the prog-ram uses the Wimp, the desktop will reappear as
  87. it was before you ran !BasicEdit with the new program running as well.
  88. After the program ends, a öcommand windowò will appear where you can use
  89. LVAR or any other BASIC commands. To return to the Edit screen where you
  90. left it, simply press <f3>. Hugh Eagle
  91. 3.8
  92. Å   Battery changing Ö You donæt have to bother with adding capacitors
  93. etc as mentioned last month. All you need to do is leave the computer
  94. switched on while changing the batteries (but mind your fingers on the
  95. fan!). There is no danger involved, as the mains is totally enclosed,
  96. and it will not harm the machine. Mike Harrison.
  97. 3.8
  98. Å   C programming Ö When writing desktop applications, put ÿDATEÿ in the
  99. version string. So, if you forget to update the version number when
  100. modifying the source files, it doesnæt really matter because when the
  101. info is given from the menu, you can then find out what date the file
  102. was compiled. R Bunnett.
  103. 3.8
  104. Å   Closing the Edit window using <adjust> (instead of <select>) the
  105. source directory is opened after the window has been closed. Holding the
  106. <shift> key down simultaneously, will cause the directory viewer to be
  107. opened without closing the Edit window (this allows you to drag-save the
  108. file into the same directory, but with a different name). This is also
  109. true for Draw and Paint.
  110. 3.8
  111. Å   Double clicking problems Ö Double clicking on an application
  112. installed on the icon bar by !TinyDirs can result in the application
  113. running twice. This can have the confusing result that when you quit the
  114. application a second copy of it immediately appears in its place.
  115. 3.8
  116. I have found a somewhat cumbersome solution to this problem which is to
  117. include the following code in the WimpPoll loop:
  118. 3.8
  119. WHEN 17 : IF block%!4<>TaskId% AND block%!16=&400C2 THEN
  120. 3.8
  121. PROCInsertCR(block%+28)
  122. 3.8
  123. dummy$=$(block%+28)
  124. 3.8
  125. IF dummy$=TaskName$ THEN
  126. 3.8
  127. quit%=TRUE
  128. 3.8
  129. ENDIF
  130. 3.8
  131. ENDIF
  132. 3.8
  133.    .
  134. 3.8
  135.    .
  136. 3.8
  137. DEF PROCInsertCR(mem%)
  138. 3.8
  139. LOCAL I%
  140. 3.8
  141. I%=mem%
  142. 3.8
  143. REPEAT
  144. 3.8
  145. I%+=1
  146. 3.8
  147. UNTIL ?I%=0
  148. 3.8
  149. ?I%=13
  150. 3.8
  151. ENDPROC
  152. 3.8
  153. When the first application receives the message that is broadcast when a
  154. new application starts (i.e. it receives reason code 17 with
  155. block%!16=&400C2) and it finds that the new task has the same name
  156. (TaskName$) as itself, it sets quit%=TRUE which makes the application
  157. quit at the end of the poll loop.
  158. 3.8
  159. Note that when each application starts, it receives the message
  160. broadcast by itself, hence the com-parison of block%!4 (which holds the
  161. handle of the sender of the message) with TaskId% to prevent the task
  162. from shutting itself down!
  163. 3.8
  164. Note also that the little procedure PROCInsertCR seems to be necessary
  165. to convert the string at block%+28 from a zero terminated string to a
  166. normal &0D terminated one. (Can anyone explain please RISC-OSæs
  167. infatuation with these wretched zero-terminated strings ... and to say
  168. that itæs because C or Unix, or whatever, uses them is no answer!) Hugh
  169. Eagle
  170. 3.8
  171. Å   Filer_OpenDir Ö The command ÉFiler_Open Diræ may be used for any
  172. file path. This includes Éfiling systemsæ created using a system
  173. variable (e.g. System$Path) may be referred to as the filing system
  174. Ésystem:æ. Some Éfiling systemsæ are one direction only (e.g. printer:).
  175. The command can also use SystemDevicesæ own Éfiling systemsæ:
  176. 3.8
  177.    kbd: / rawkd:   the keyboard
  178. 3.8
  179.    null:   the Énull deviceæ
  180. 3.8
  181.    printer:   the printer
  182. 3.8
  183.    serial:   the serial port
  184. 3.8
  185.    vdu: / rawvdu:   the screen
  186. 3.8
  187.    netprint:   the network printer
  188. 3.8
  189. Examples: dragging a file onto the view opened by:
  190. 3.8
  191. *Filer_OpenDir printer: will spool it to the printer
  192. 3.8
  193. *Filer_OpenDir vdu: will send it to the vdu driver (try it with a text
  194. file)
  195. 3.8
  196. *Filer_OpenDir null: <shift> dragging will Émoveæ a file to null: i.e.
  197. delete it
  198. 3.8
  199. Å   FormEd Update Ö Users who have downloaded the !FormEd template
  200. editor from Acornæs SID board (also available on shareware disc 20)
  201. might like to know how to put back the Ésprite routinesæ.
  202. 3.8
  203. The version of !FormEd refered to has a !Help file stating a date of 16-
  204. May-89, and a ReadMe file stating version 1.00, but shows version 1.01
  205. and date of 23-May-89 in its Info window. The ReadMe file shows that
  206. this is an unsupported Acorn application.
  207. 3.8
  208. The !Help file states ÉSome previous versions of FormEd used to provide
  209. facilities for editing sprites. These are now provided only in the
  210. !Paint applicationæ, also that when a sprite file is dragged onto the
  211. FormEd icon on the iconbar, a window will display the sprites. In the
  212. supplied state, no window is opened and you do not know what your sprite
  213. names are, or even if you have loaded the correct file, until you define
  214. an icon as a named sprite which you hope is in the file!
  215. 3.8
  216. I was having problems with not enough memory on a 1Meg machine for
  217. !Paint, !FormEd, the sprite files and the templates being built. (It IS
  218. possible with very careful setting of the æFreeæ and ÉNextæ bars in the
  219. Task Manager, but you canæt have any printer drivers etc). An examina
  220. tion of the !FormEd reveal-ed that by removing the REM statements from
  221. just 2 lines the sprite routines were again available.
  222. 3.8
  223. Load the !RunImage for !FormEd and LIST lines 2270 and 3080. Edit those
  224. lines to remove the REM before PROCspriteinfo in each, so that the lines
  225. are as shown below:
  226. 3.8
  227. 2270 WHEN &FF9:PROCloadsprites (f$)
  228. 3.8
  229.  :PROCspriteinfo
  230. 3.8
  231. 3080 PROCloadsprites(FNstring0(q%
  232. 3.8
  233. +44)):PROCspriteinfo
  234. 3.8
  235. Save the file back to the disk. When a sprite file is dragged to the
  236. FormEd icon, a sprite window is shown and the sprite editing routines
  237. appear to work OK (although !Paint is more powerful). Douglas Potter
  238. 3.8
  239. Å   GraphBox Ö Maybe this is an obvious point to some users but it took
  240. me a while to discover. Graphs imported into !Draw can be disassembled
  241. to a remarkable degree (using ungroup) right down to facets of
  242. individual 3D bars. This allows extensive re-orienting, re-colouring
  243. options which can avoid some of the problems with dark colours and
  244. overlaps when colour printing on a dot matrix printer. John Wann
  245. 3.8
  246. Å   Hardware developeræs tool Ö On the monthly program disk is a utility
  247. (ÉSVCBASæ) which is very useful for hardware developers. It patches
  248. BASIC so that memory indirection operators (? and !) operate in
  249. supervisor mode. This allows quick Étweakingæ of hardware devices while
  250. testing. Documentation is minimal, since those who are likely to need it
  251. should not need any! Mike Harrison.
  252. 3.8
  253. Å   Maestro Ö There are (I think!) several errors in the description of
  254. the !Maestro file format on pages 1809 to 1813 of the PRM:
  255. 3.8
  256. a)   in the ÉMusic dataæ the number of bytes of gate data is given, not
  257. the number of gates as the PRM says
  258. 3.8
  259. b)   the number of bytes of gate data is preceded by &40
  260. 3.8
  261. c)   each of the next eight words (which give the length in bytes of the
  262. queues of note/rest data for the eight channels) is also preceded by &40
  263. 3.8
  264. d)   in the ÉStave dataæ, the number of music staves is reduced by 1
  265. (i.e. if there are 4 music staves this is recorded as 3)
  266. 3.8
  267. e)   in the descriptions of the ÉGate Attributesæ, the binary represen
  268. tations of the bottom few bits of each byte are given with the least
  269. significant bit first. Thus where the ÉClefæ description says öBits 0 Ö
  270. 2 : 001 binaryò it means that bits 0 and 1 are 0 and bit 2 is 1.
  271. 3.8
  272. f)   within the ÉClefæ attribute data, the stave number (minus 1) is
  273. given in bits 6 and 7, not bits 5 and 6. Hugh Eagle
  274. 3.8
  275. Å   Problems with an Epson LQ1050? When printing from Impression, !Draw,
  276. etc using the !PrinterDM application, the 360 x 360 dpi mode may cause
  277. spurious characters to be printed, which results in a poor quality
  278. printout. The reason for this is that the firmware in the Epson printer
  279. does not support the [Esc]+ control sequence which is nec-essary to set
  280. a line feed of 1/360th of an inch. In order to get this option working
  281. you will need a new version of the printeræs ROM. This can be purch-ased
  282. from Applied Technology Ltd. David Crofts
  283. 3.8
  284. Å   Re-inking your ink-cartridge Ö It is possible to re-ink an ink-
  285. cartridge for an HP-Deskjet Plus printer and probably other inkjet
  286. printers by buying one of the inks listed below and then using a syringe
  287. to insert the ink through a hole on the top of the cartridge. (a)
  288. Fountain pen ink (Pelikan), (b) Diadye ink (photo-shop), (c) Rotring
  289. air-brush ink. Tony Hopstaken
  290. 3.8
  291. Å   Rotor passwords Ö Lee Thake has sent in the passwords for Rotor, but
  292. in case you would rather not know, here they are in very simple coded
  293. form so that once you have the first password, you will be able to work
  294. out the others. QJU, HBH, MJQ, TMZ, NFX, BXF, UOU, FOE.
  295. 3.8
  296. Å   Sparkplug Ö We have a lot of questions about how to decompress
  297. programs such as PCDir which appear on our program and Shareware discs.
  298. Let me try to explain in more detail.
  299. 3.8
  300. The reason the programs are compacted is that there would not be enough
  301. room on the disc for the uncompacted version. Thus, if you are to uncom-
  302. pact them, you need to do so onto another (prefer-ably blank) disc. If
  303. you have two drives or a hard disc on your computer, the job is easier
  304. then if you are trying to do it on a single drive, so I will do it the
  305. hard way first.
  306. 3.8
  307. Insert a blank disc in the drive and open its filer window. Remove this
  308. disc and insert the Program Disc (or Shareware disc, or whatever) in the
  309. drive and open its filer window. If you have not already done so,
  310. install !sparkplug onto the icon bar by double-clicking on it. Drag the
  311. icon of the program to be decompacted onto the !sparkplug icon on the
  312. icon bar. A pseudo-filer window opens. Drag the icon or icons from there
  313. into the filer window of the blank disc. You will be prompted to insert
  314. that disc into the drive and will probably then have to keep swapping
  315. the discs over as prompted until all of the compacted files and folders
  316. have been uncom-pacted and copied across onto the other disc. This may
  317. actually require quite a number of repetitions, so it may be better to
  318. create as large a ram disc as possible and drag the files from the
  319. !Sparkplug filer window onto the ram disc then change discs and copy
  320. back from the ram disc to the blank disc. This, of course, will not work
  321. if you cannot make a ram disc big enough to accommodate the uncompacted
  322. files.
  323. 3.8
  324. If you have two discs, simply put the program disc in one drive and the
  325. blank disc in the other. Proceed as above, except that you will not be
  326. prompted to change discs since both are accessible to the computer at
  327. the same time.
  328. 3.8
  329. Å   Too many fonts Ö If you have too many anti-aliased fonts, !Edit will
  330. crash with a ÉFatal internal error type=5æ. So those of you who are
  331. purchasing the new onslaught of outline fonts should not put them all
  332. into one !Fonts directory.
  333. 3.8
  334. Å   VIDC parameters Ö On the monthly program disk is a text file of all
  335. the VIDC and VDU para-meters for the standard screen modes. This makes
  336. life a lot easier when defining your own modes, especially without the
  337. aid of an oscilloscope to monitor the video waveform, and a VIDC data-
  338. sheet. Itæs much easier to tweak the existing num-bers than to work them
  339. out from scratch! Mike Harrison.
  340. 3.8
  341. Å   Wimp programming Ö If you get unexpected messages such as öToo many
  342. nested structuresò when running a BASIC program in a Desktop application
  343. it may be simply because you have failed to allocate a large enough
  344. Wimpslot. Hugh Eagle
  345. 3.8
  346. Å   Z88 file transfer Ö The Z88 can save files to disc. Ranger sell a
  347. battery powered disc drive which reads and writes 3.5ö discs in 720k
  348. MSDOS format. The trouble is it costs as much as the Z88.
  349. 3.8
  350. The Z88 does not insist on sending a line feed, see Printered.
  351. 3.8
  352. Since the Z88 serial port uses XOn/XOff by default, a three wire serial
  353. lead will suffice if the Archim-edes is using similar software. Be sure
  354. to short other handshaking lines. The simplest method of sending data to
  355. the Archimedes is to use:
  356. 3.8
  357. *SPOOL file
  358. 3.8
  359. *FX21,1
  360. 3.8
  361. *FX2,1
  362. 3.8
  363. and just print from the Z88. Make sure the last lines in the file being
  364. printed have *SPOOL *FX 2,0.
  365. 3.8
  366. The next stage up is to use a communications pack-age such as Hearsay
  367. and the Filer to send or receive files. There is a nice routine on the
  368. Data Store utilities disc which does the job using the Filer.
  369. 3.8
  370. Lastly the best way of transferring data is to use the PCLink ROM and
  371. the Z88 filer that comes with Pipedream. Unfortunately PCLink comes with
  372. a Z88 to PC cable so some soldering is still required. Data transfer
  373. with PCLink is unnecessarily slow, a version of Kermit would have been
  374. more use and faster. Bruce Edelsten
  375. 3.8
  376. (How about using the Archimedes-Z88 link that we supply for ú35? Ed.)
  377. 3.8
  378.  
  379.