home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1995 / ARCHIVE95.iso / text / hints / volume_04 / issue_08 < prev    next >
Text File  |  1995-02-16  |  35KB  |  940 lines

  1. Hints and Tips
  2. 4.8
  3. Å   ARM code errata Ö The following is for all those who have an unshak
  4. able faith in the integrity of Acornæs code:
  5. 4.8
  6. The code given to return from SWI öOS_ BreakPtò on page 736 of the PRMs
  7. is incorrect. The following works.
  8. 4.8
  9. .backtobreak%
  10. 4.8
  11.    SWI öOS_EnterOSò
  12. 4.8
  13.    ADR R14,breaksave
  14. 4.8
  15.    LDMIA R14,{r0-r14 }^
  16. 4.8
  17.    LDR R14,[R14,#15*4]
  18. 4.8
  19.    ADD R14,R14,#4
  20. 4.8
  21.    MOVS PC,R14
  22. 4.8
  23. The code given on page 231 of the old BASIC User Guide (under CALL) is
  24. incorrect. For example, to use MATCH, the line tokenisation routine, the
  25. following code will work. This has been corrected in the new BASIC User
  26. Guide.
  27. 4.8
  28. .tokenise
  29. 4.8
  30.    STMFD R13!,{r14 }
  31. 4.8
  32.    ADD R0,R14,#18*4
  33. 4.8
  34.    ADR R1,source
  35. 4.8
  36.    ADR R2,dest
  37. 4.8
  38.    MOV R3,#1
  39. 4.8
  40.    MOV R4,#0
  41. 4.8
  42.    ADR R14,cominghome
  43. 4.8
  44.    MOV PC,R0
  45. 4.8
  46. .cominghome
  47. 4.8
  48.    LDMFD R13!,{pc }
  49. 4.8
  50. .source
  51. 4.8
  52.    EQUS STRING$(90,CHR$(0))  ALIGN
  53. 4.8
  54. .dest
  55. 4.8
  56.    EQUS STRING$(90,CHR$(0))  ALIGN
  57. 4.8
  58. J Heher, South Africa
  59. 4.8
  60. Å   BASIC printing to a DeskJet Plus Ö The April issue of Archive
  61. contained a Help!!! plea about printing from Archimedes BASIC to a
  62. DeskJet 500. I have a DeskJet Plus and have successfully printed from
  63. BASIC. For reference, my printer is normally set with the function
  64. switches 6 and 8 in bank A and 2 in bank B up, all others are down.
  65. 4.8
  66. To print, I use the command VDU 2,1,27,1,38, 1,107,1,49,1,71 (see Line
  67. Termination in Appendix 8.19 of the Owneræs Manual). Here is an example
  68. of how it can be used:
  69. 4.8
  70.  10 REM >PrintTest
  71. 4.8
  72.  20 VDU 2,1,27,1,38,1,107,1,49,1,71
  73. 4.8
  74.  30 PRINT öTEST OF NORMAL PRINTINGò
  75. 4.8
  76.  40 VDU 1,27,1,38,1,100,1,49,1,68
  77. 4.8
  78.  50 PRINT öThis is underlinedò
  79. 4.8
  80.  60 VDU 1,27,1,38,100,1,64
  81. 4.8
  82.  70 VDU 1,27,1,40,1,115,1,51,1,66
  83. 4.8
  84.  80 PRINT öThis is BOLD printingò
  85. 4.8
  86.  90 VDU 1,27,1,40,1,115,1,48,1,66
  87. 4.8
  88. 100 VDU 1,27,1,40,1,115,1,50,1,48, 1,72
  89. 4.8
  90. 110 PRINT öThis is 20 PITCHò
  91. 4.8
  92. 120 VDU 1,27,1,69 :REM reset printer
  93. 4.8
  94. 130 VDU 3
  95. 4.8
  96. 140 END
  97. 4.8
  98. A Kitchenside, Weybridge
  99. 4.8
  100. Å   Big memory tips Ö As a footnote to my own article in last monthæs
  101. Archive on making best use of machines with more than 1M memory, Iæd
  102. like to add one more tip. I was reminded by a review of Protext, which
  103. noted that the current version does not multi-task, that my eleventh tip
  104. might have been, öboycott non multi-tasking packagesò. Since, with 1M,
  105. you couldnæt really multi-task two significant applications, this was
  106. not a problem. Now, itæs a real pain in the neck not to be able to have
  107. several applications with simultaneously active windows, much of the
  108. power and ease-of-use of RISC-OS is being un-used and itæs annoying
  109. knowing that 3M of your upgrade is being wasted!
  110. 4.8
  111. So, unless thereæs a really good reason such as a time-critical sound
  112. sampler or video screen grabber, I suggest that we boycott such
  113. packages. Then, software producers would have to bring them up to date
  114. and not try to palm us off with öArthur programs with !Run and !Boot
  115. filesò. In an ideal world, software sellers would refuse to stock them
  116. but at least they could be marked as such, perhaps indicating their
  117. antiquity by listing them in a suitable script? Stuart Bell, Brighton.
  118. 4.8
  119. Å   C book Ö I was recommended a good C book which I used on a C short
  120. course I attended: The Waite Groupæs öNew C Primer Plusò, First Edition
  121. 1990, editor Howard W Sams & Co, ISBN 0Ö672Ö22687Ö1. It covers ANSI C,
  122. UNIX, Microsoft C and Turbo C.   S. Stel, Netherlands.
  123. 4.8
  124. Å   ChangeFSI update Ö A new version of ChangeFSI v0.79 is available from
  125. Acorn Direct for ú19.95. This will handle more image formats than would
  126. v0.69: Degas PI1, PI2 & PI3, !Translator Clear, MacPaint 579x720x1 bit/
  127. pixel, ZSoft .PCX, Windows3 .BMP, Pineapple 16 bit/pixel, UNIX rle, PC
  128. TGA. Unfortunately it will not run from the desktop under !ChangeFSI
  129. (Shareware Disc 21) as is. This is because version 0.79 is 94 Kbytes
  130. long, compared with 74K for v0.69. The solution is to edit the !Run file
  131. of !ChangeFSI and increase the WimpSlot from 128K to 160K. All is then
  132. well. A Quayle, Chester
  133. 4.8
  134. Å   C txt library Ö This idea was inspired by the article ÉIntroduction to
  135. Cæ ù Part 5, in Archive 3.6. This gave a complete RISC-OS application
  136. using the libraries supplied with Release 3 of Acorn C. In particular,
  137. it used the Étxtæ library to provide a window to display text generated
  138. by the sample program. This requires a minimum of effort by the
  139. programmer since the library looks after most of the problems.
  140. 4.8
  141. Although it works as described, it has two major disadvantages. The
  142. first is the slow speed during text generation. The second is the
  143. operation of the window controls. In particular, the cursor control keys
  144. cannot be used to move the text through the window, the close icon has
  145. no effect and the vertical scroll bars can only be dragged. Here are
  146. some techniques which overcome these problems.
  147. 4.8
  148. Improved text generation speed turns out to be a very simple modifi
  149. cation since the cause of the slow operation is the redrawing of the
  150. window for every item added to the text buffer using, for example, the
  151. txt_insertstring function. Two extra lines are required; the first turns
  152. off the display updates when text generation starts and the second turns
  153. it back on when the operation is complete. The lines shown below should
  154. be inserted immediately after the visdelay_begin() statement and
  155. immediately before the visdelay_ end() statement in the original program
  156. function sysvars_to_text().
  157. 4.8
  158. /* turn off display update */
  159. 4.8
  160. txt_setcharoptions(t, txt_DISPLAY, FALSE);
  161. 4.8
  162.  
  163. 4.8
  164. /* turn on display update */
  165. 4.8
  166. txt_setcharoptions(t, txt_DISPLAY, TRUE);
  167. 4.8
  168. Improving text window control requires rather more code but again the
  169. principle is fairly straightforward. Firstly an event handler has to be
  170. registered for the text window following its successful creation by the
  171. txt_new() function using the following statement:
  172. 4.8
  173. /* register the text window event handler */
  174. 4.8
  175. txt_eventhandler(t, user_txevent, NULL);
  176. 4.8
  177. This registers the function user_txevent which will be called to process
  178. text window events.
  179. 4.8
  180. The function itself has to process all the events which the user
  181. requires. A sample function is given below which is commented to show
  182. which events are being processed. The keyboard key macro definitions
  183. given in Éakbd.hæ are used for consistency but, in addition, the ÉHomeæ
  184. key must also be defined using a macro as this is omitted from Éakbd.hæ.
  185. The actual key values required are defined in the PRM, page 1198 and the
  186. macro definitions are given in file Éakbd.hæ. Note, however, that the
  187. definitions given for both akbd_ PageUpK and akbd_PageDownK are wrong so
  188. I have not used these but used their correct definition in the following
  189. code. The value txt_ EXTRACODE is added to the key value to represent
  190. the equivalent window operation. A full list of these is given on page
  191. 325 of the ANSI C Release 3.
  192. 4.8
  193.  
  194. 4.8
  195. #include öakbd.hò
  196. 4.8
  197.  
  198. 4.8
  199. #define HOME        (30)
  200. 4.8
  201.  
  202. 4.8
  203. /***********************************
  204. 4.8
  205. user_txevent    text window event handler
  206. 4.8
  207.         t            text object
  208. 4.8
  209.         h            event handle
  210. 4.8
  211. ***********************************/
  212. 4.8
  213. void user_txevent(txt t, void *h)
  214. 4.8
  215. {lines ; /* number of lines in window */
  216. 4.8
  217.  
  218. 4.8
  219.  h = h;
  220. 4.8
  221.  while (txt_queue(t) > 0)
  222. 4.8
  223.  {number of lines visible in window */
  224. 4.8
  225.   lines = txt_visiblelinecount(t);
  226. 4.8
  227.  
  228. 4.8
  229.   /* process the next user event code */
  230. 4.8
  231.   switch (txt_get(t))
  232. 4.8
  233.   {+ akbd_Fn+127:
  234. 4.8
  235.     /* close window icon */
  236. 4.8
  237.     txt_hide(t);
  238. 4.8
  239.     break;
  240. 4.8
  241.   
  242. 4.8
  243.    case akbd_UpK:
  244. 4.8
  245.    case txt_EXTRACODE + akbd_UpK:
  246. 4.8
  247.    case txt_EXTRACODE + akbd_Sh + akbd_Ctl + akbd_UpK:
  248. 4.8
  249.     /* scroll up one line */
  250. 4.8
  251.     txt_movevertical(t, ù1, TRUE);
  252. 4.8
  253.     break;
  254. 4.8
  255.   
  256. 4.8
  257.    case akbd_DownK:
  258. 4.8
  259.    case txt_EXTRACODE + akbd_DownK:
  260. 4.8
  261.    case txt_EXTRACODE + akbd_Sh + akbd_Ctl + akbd_DownK:
  262. 4.8
  263.     /* scroll down one line */
  264. 4.8
  265.     txt_movevertical(t, 1, TRUE);
  266. 4.8
  267.     break;
  268. 4.8
  269.   
  270. 4.8
  271.    case akbd_Sh + akbd_UpK:
  272. 4.8
  273.    case txt_EXTRACODE + akbd_Sh + akbd_UpK:
  274. 4.8
  275.     /* scroll up one page */
  276. 4.8
  277.     txt_movevertical(t, -lines, FALSE);
  278. 4.8
  279.     break;
  280. 4.8
  281.    case akbd_Sh + akbd_DownK:
  282. 4.8
  283.    case txt_EXTRACODE + akbd_Sh + akbd_DownK:
  284. 4.8
  285.     /* scroll down one page */
  286. 4.8
  287.     txt_movevertical(t, lines, FALSE);
  288. 4.8
  289.     break;
  290. 4.8
  291.   
  292. 4.8
  293.    case akbd_Ctl + akbd_UpK:
  294. 4.8
  295.    case HOME:
  296. 4.8
  297.     /* move to start of text */
  298. 4.8
  299.     txt_setdot(t, 0);
  300. 4.8
  301.     break;
  302. 4.8
  303.   
  304. 4.8
  305.    case akbd_Ctl + akbd_DownK:
  306. 4.8
  307.    case akbd_Sh + akbd_CopyK:
  308. 4.8
  309.     /* move to end of text */
  310. 4.8
  311.     txt_setdot(t, txt_size(t));
  312. 4.8
  313.     break;
  314. 4.8
  315.   
  316. 4.8
  317.    default:
  318. 4.8
  319.     break;
  320. 4.8
  321.   }
  322. 4.8
  323.  }
  324. 4.8
  325.  return;
  326. 4.8
  327. }
  328. 4.8
  329. David Scott, Stockport
  330. 4.8
  331. Å   Connection problems Ö If you are having connection problems with RS423
  332. connectors, or video or printer Ö or a dongle, it may be because the
  333. plugs are not Égoing homeæ properly into the sockets on the back of the
  334. computer. I have noticed this particularly on A540æs, but it could also
  335. occur on other Archimedes computers. This may be because the fixing
  336. pillars either side of the socket are too high. The solution it to take
  337. a pair of pliers (or a box spanner if you have a suitable sized one) and
  338. remove each of the pillars in turn, take off the washer and screw the
  339. pillar back in. That extra millimetre can make all the difference.
  340. 4.8
  341. Å   CPC monitor Ö When my multisync died on me suddenly and I was forced
  342. to make do with what I had Ö a well worn Amstrad CPC green screen
  343. monitor. In practice it was fairly easy to connect the six-pin CPC
  344. connector to the nine-pin connector on the A3000:
  345. 4.8
  346.    Archimedes      CPC
  347. 4.8
  348.    1, 2 & 3   Ö   6
  349. 4.8
  350.    6, 7, 8 & 9   Ö   5
  351. 4.8
  352.    5   Ö   4
  353. 4.8
  354. Naturally, it is impossible to use the multisync modes but it certainly
  355. is almost as sharp a picture on the tube as on my multisync and much
  356. cheaper. If your main interest is games I wouldnæt recommend it but for
  357. most business uses it is perfectly all right. I guess you could get a
  358. second hand green CPC monitor for next to nothing in the UK as many
  359. owners have exchanged them for the new CPC monitors. Ask your local
  360. dealer! A spare monitor could come in handy any day! Tord Eriksson,
  361. Sweden.
  362. 4.8
  363. Å   !Edit Ö For what seems like an eternity I have been wrestling with the
  364. problem of importing text from a wordprocessor (in my case View). What I
  365. wanted to do was free the text from newline characters in order that, on
  366. loading it into Ovation, it could be formatted to new column width, in
  367. whatever point size, without the newline control code producing extra
  368. linefeeds. At the same time, it should retain the carriage returns
  369. marking the paragraphs and multi-line spacing. This way I did not lose
  370. all the style. What follows is how I do it . It might seem obvious but
  371. it could help someone who is as thick as me. If I have missed the point
  372. would some kind person tell me before I go mad.
  373. 4.8
  374. After loading your text into !Edit, go through the text ensuring that
  375. there are double returns at the end of each paragraph and on multiple
  376. line text like program listings or poetry.
  377. 4.8
  378. My technique is firstly to change double returns into something which is
  379. unlikely to appear elsewhere in the text, thus:
  380. 4.8
  381. Press <F4> to select Find
  382. 4.8
  383. In the Find dialogue box enter  \n\n <return>
  384. 4.8
  385. In the Replace dialogue box enter  ZCZC<return>
  386. 4.8
  387. Click on the Magic Character box
  388. 4.8
  389. Click on the Go box
  390. 4.8
  391. Click on End of File Replace
  392. 4.8
  393. Click on Stop
  394. 4.8
  395. Press <ctrl-up> to move the cursor to the top
  396. 4.8
  397. Now, to replace the single returns:
  398. 4.8
  399. Press <F4> to select Find
  400. 4.8
  401. In the Find dialogue box enter  \n <return>
  402. 4.8
  403. In the Replace dialogue box press <space>
  404. 4.8
  405. Click on Go
  406. 4.8
  407. Click on End of File Replace
  408. 4.8
  409. Click on Stop
  410. 4.8
  411. Press <ctrl-up>
  412. 4.8
  413. Then, to restore the double returns to single ones:
  414. 4.8
  415. Press <F4> to select Find
  416. 4.8
  417. In the Find dialogue box enter  ZCZC<return>
  418. 4.8
  419. In the Replace dialogue box enter \n <return>
  420. 4.8
  421. Click on Go
  422. 4.8
  423. Click on End of File replace
  424. 4.8
  425. Click on Stop
  426. 4.8
  427. You should have your text with the paragraph and multi-line spacing
  428. intact. (Simplified from a hint sent in by R Follett, Winnersh, Berks.)
  429. 4.8
  430. Å   Improving sound quality Ö Further to the comments by Jeremy Mears
  431. (Archive 4.7 p 21) there is no need, on the A3000, to actually solder to
  432. the motherboard. You can make contact to the appropriate resistors using
  433. micro test clips (Tandy Ö ú1.50 for four). This would, I suppose, still
  434. invalidate the warranty but is less obvious than blobs of solder on the
  435. p.c.b.! To get access to the resistors, you have to remove the disc
  436. drive by unscrewing it from underneath. R86 is under the keyboard side
  437. of the drive whereas R99 is under the middle of the drive. Pin 1 of the
  438. expansion port is the furthest right (looking from the keyboard side of
  439. the computer). Gerald Williams, Aldershot.
  440. 4.8
  441. Å   Multiple height and width text printing Ö I know that the emphasis
  442. these days is on programs which multi-task and use mode 12 on the
  443. desktop but not every program is suitable for this and some of these
  444. programs require larger than usual height characters.
  445. 4.8
  446. I am (slowly) developing a word game for the Archimedes, from one I
  447. wrote last year on my Model B. The öBò version uses mode 2, with double
  448. height routines written in machine code for speed. The original version
  449. of this code was quite öillegalò and would not work on a Master but it
  450. was fast! With it, I could also have text printed 3 or even 4 times
  451. normal height just as quickly. However, I am new to the Archimedes and
  452. ARM code is currently beyond me, so after trying various routines in
  453. BASIC I came across VDU23,17,7. This gives characters at any height and
  454. any width and is very fast! I can even get half width which gives the
  455. impression of mode 1 characters in mode 2. Also, it works in most Screen
  456. modes (except 3, 6 & 7).
  457. 4.8
  458. Iæve put together a short routine which demonstrates how easy and fast
  459. this routine is. To use it, all you have to do is append the PROCedure
  460. to your program and call it with the colour you wish it to appear in,
  461. the X & Y positions, the height and width of the characters and the
  462. Text$ Ö the routine will do the rest! One point to bear in mind,
  463. however, is that text is printed using the graphic cursor, i.e. under
  464. VDU 5 and MOVE or PLOT, rather than the text cursor and VDU 31, X%,Y%.
  465. 4.8
  466. Even though this demonstration program is about 20 lines long, the only
  467. bits you need are in PROCtext(colour, X_co_ord, Y_co_ord, Height, Width,
  468. Text$). The function FNvdu simply returns the text width of the screen
  469. mode window in use and this is used to check if lines are too long in
  470. the first line of PROCtext. The second line in PROCtext is personal as I
  471. like being able to centralise text without effort! To do so, just set X%
  472. to -1. The %110 sets bits 1 and 2 so that both characters and spacing
  473. are altered at the same time. %100 sets spacing, while %010 will alter
  474. just character sizes. It is also possible to use 0.5 as Height or Width
  475. but that works better in öchunkyò modes, like 2 rather than 12. When the
  476. width is set to an odd number, the öauto-centralisingò is sometimes a
  477. little off so you may prefer to set up the X co-ord manually.
  478. 4.8
  479. REM >$.Height/Wid.!RunImage
  480. 4.8
  481. :
  482. 4.8
  483. DIM block% 12, output% 12
  484. 4.8
  485. MODE12:COLOUR3
  486. 4.8
  487. :
  488. 4.8
  489. PROCtext(1,-1,1,2,3,öMulti Height & Width!ò)
  490. 4.8
  491. PROCtext(2,-1,4,2,1,öDouble Height, Normal Widthò)
  492. 4.8
  493. PROCtext(3,-1,7,1,2,öNormal Height, Double Widthò)
  494. 4.8
  495. PROCtext(4,-1,10,3,3,ö3 * 3 Formatò)
  496. 4.8
  497. PROCtext(5,-1,15,4,1,öRidiculous! 4 X 1 !!ò)
  498. 4.8
  499. PROCtext(6,-1,20,1,1,öYou should reset the height & width
  500. 4.8
  501.  before finishingò)
  502. 4.8
  503. PROCtext(6,-1,21,1,1,öbut as it stands the PROCedure will
  504. 4.8
  505. do this anywayò)
  506. 4.8
  507. END
  508. 4.8
  509. :
  510. 4.8
  511. DEFPROCtext(C%,X%,Y%,H,W,T$)
  512. 4.8
  513. F%=FNvdu
  514. 4.8
  515. IF F%-(LENT$*W)<=0 THEN ERROR 300,öLine too longò
  516. 4.8
  517. GCOL C%
  518. 4.8
  519. Y%=1000-(Y%*32)
  520. 4.8
  521. IF X%=-1 THEN X%=(F%-LENT$*2)/(W*2)
  522. 4.8
  523. IF W=1 THEN X%=(F%-LENT$)/4
  524. 4.8
  525. X%=X%*32
  526. 4.8
  527. VDU 23,17,7,%110,W*8;H*8;0;
  528. 4.8
  529. VDU 5,25,4,X%;Y%;
  530. 4.8
  531. PRINT T$
  532. 4.8
  533. VDU 4,23,17,7,%110,8;8;0;
  534. 4.8
  535. ENDPROC
  536. 4.8
  537. :
  538. 4.8
  539. DEF FNvdu
  540. 4.8
  541. !block%=256
  542. 4.8
  543. block%!4=-1
  544. 4.8
  545. SYSöOS_ReadVduVariablesò,block%,
  546. 4.8
  547. output%
  548. 4.8
  549. =!output%
  550. 4.8
  551. Å   Off screen desktop windows Ö Normally, the filer and switcher windows
  552. are forced to stay within the confines of the screen but, by altering
  553. their template files, it is possible to make them move Éoff screenæ and
  554. thus help to reduce window Éclutteræ.
  555. 4.8
  556. To do this, you have to copy the window templates from the DeskFS to a
  557. directory called Templates. First, create a directory called Templates
  558. in the root directory of your harddisc or Éworkdiscæ and then type the
  559. following:
  560. 4.8
  561. *deskfs
  562. 4.8
  563. *copy templates.filer  scsifs::scsidisc4.$.templates.filer
  564. 4.8
  565. *copy templates.switcher  scsifs::scsidisc4.$.templates.filer
  566. 4.8
  567. (You can also copy netfiler, palette and wimp windows across if
  568. required.)
  569. 4.8
  570. Load the window template data into !FormEd (Shareware Disc 20) and set
  571. the Éno boundsæ option for each window. Then, edit your disc !boot file
  572. to include the following line:
  573. 4.8
  574. Set Wimp$Path scsifs::scsidisc4.
  575. 4.8
  576. (or whatever your system is!) Donæt forget the full stop at the end.
  577. This points Wimp$Path in the direction of the updated windows.
  578. 4.8
  579. Finally re-boot your machine to see the result!  M Roscoe, Ealing
  580. 4.8
  581. Å   PrinterDM with the Star LC24Ö10 Ö I was interested to see the note on
  582. !PrinterDM and the LC24-10 in Marchæs edition of Archive. May I draw
  583. your attention to the öHint and Tipò which I had published in the March
  584. edition of Risc User on the same subject but concerning a different
  585. problem. I was initially disappointed in the results I obtained with
  586. Impression Junior (and from the Ovation test disc and, to a lesser
  587. extent, !Draw printouts). This was due to some lines of text having a
  588. marked öslewedò effect. After speaking to Star, and much sleuthing, I
  589. tracked down the problem to the very same line in the PrData file of
  590. !PrinterDM (version 1.12). There is apparently some incompatibility
  591. between the Star and the Epson LQ800. The former does not like the özero
  592. absolute tabò command used to obtain the CR without LF. The solution was
  593. to substitute the commands used in the FX80 module, although modified to
  594. use the correct line feed command for 24 pin printers. With my version
  595. of !PrinterDM I have not experienced any squashed text with the 24/180
  596. inch feed (could the writer have been in IBM mode where the command
  597. gives n/216 inches rather than n/180 inches?) but the bigger feed
  598. suggested in Marchæs tip could equally well be used. The modified line
  599. is as follows:
  600. 4.8
  601. line_epilogue ö<27>A<0><13><27>2<27>J<24>ò
  602. 4.8
  603. Iæm surprised that this matter has not previously been commented on,
  604. especially as I think it also applies to the XB24-10.  A.F. Taylor,
  605. Poole
  606. 4.8
  607. Å   Quattro to Schema transfer Ö To move data files from Quattro, first
  608. save the file with a WKI extension. Then you can use Schemaæs !sch123 to
  609. translate the file into Schema format. This method leaves all sorts of
  610. spurious bits and pieces which have to be edited out by hand but it does
  611. work.  M Green, Devon
  612. 4.8
  613. Å   Quitting First Word Plus Ö If you quit First Word Plus (release 2)
  614. from the task manager while a text file is loaded, you will be thrown
  615. out of the desktop. If other applications are running that may object
  616. e.g. Draw, Paint, etc, they will announce what is about to happen and
  617. give you a chance to prevent it. Otherwise you will lose any files that
  618. you may have been working on in First Word Plus.     R Bunnett,
  619. Swanley
  620. 4.8
  621. Å   Reading disc names Ö For those software writers who need to check that
  622. the user has inserted an appropriate disc in the disc drive the
  623. following function returns the name if the disc currently inserted:
  624. 4.8
  625. DIM block% 5
  626. 4.8
  627. :
  628. 4.8
  629. DEF FNdiscname
  630. 4.8
  631. SYS öOS_GBPBò,5,,block%
  632. 4.8
  633. ?(block%+?block% +1)=13
  634. 4.8
  635. =$(block%+1)
  636. 4.8
  637. M Sawle, Hampshire
  638. 4.8
  639. Å   !Schema VAT rate Ö New spreadsheets are created with various user
  640. names available, one of which is öVatò. To change this from 0.15 to
  641. 0.175, look in the !Schema directory and then in the Menu directory and
  642. you should find a file called StartUp. This has a write-lock on it so
  643. you will have to use ÉAccessæ off the filer menu to enable it to be
  644. changed. At the end of this file are a number of lines that start with
  645. Éputusnæ, the first of which is the Vat rate which simply needs to be
  646. changed before the file is again saved and the write-lock access
  647. restored. Ian Hamilton, Harrow.
  648. 4.8
  649. Å   Spaced filenames Ö If you want a <space> in a disc or file name, use a
  650. hard space. This is available by pressing either <alt><1><6><0> or
  651. <alt><space>. You should note that if you do use it then you canæt use
  652. the copy key on a catalogue because the Archimedes thinks that the
  653. character is a normal space (which is illegal in a filename). E Hughes,
  654. Derbyshire
  655. 4.8
  656. Å   Twin World cheats Ö The file SavedGame can be edited using !Edit to
  657. cheat. Byte values of interest include:
  658. 4.8
  659. Byte 1 = Level (Maximum = 22 = &16)
  660. 4.8
  661. Byte 4 = Red Spells (Maximum 99 = &63)
  662. 4.8
  663. Byte 5 = Blue Spells (Maximum 99 = &63)
  664. 4.8
  665. Byte 6 = Green Spells (Maximum 99 = &63)
  666. 4.8
  667. Bytes 8-11 = Score, low byte first. (Maximum = 999999 = &F423F )
  668. 4.8
  669. Byte 12 = Lives (Maximum = 9 or 10 = &9 or &0A)
  670. 4.8
  671. Remember all value are in hex, so use the magic character option in
  672. !Editæs Find.  Stuart Turgis
  673. 4.8
  674. Å   TwinWorld hints
  675. 4.8
  676. Ö Owls in the forest can be killed by jumping up and firing.
  677. 4.8
  678. Ö Similarly, on some occasions you will have to jump, but fire on the
  679. way down to hit denizens close to you.
  680. 4.8
  681. Ö Jump between worlds whenever possible Ö if you loose a life, youære
  682. taken back to the last time you changed worlds.
  683. 4.8
  684. Ö Stamping your feet can reveal objects Ö either treasure or keys.
  685. 4.8
  686. Ö Beware of calling the genie when you are already carrying two other
  687. sorts of objects (remember the horn is one), because you wonæt be able
  688. to buy an object which you donæt already hold.
  689. 4.8
  690. Ö Beware when shooting the three-headed dragon. If you donæt shoot the
  691. head furthest away from you, it flies away from you and fires an almost
  692. continuous salvo.
  693. 4.8
  694. Ö Watch out for extended jump Ö you can sometimes use it when you donæt
  695. realise Ö on some screens itæs essential and you may only have a limited
  696. amount.
  697. 4.8
  698. Ö Watch out for the parachute Ö in the last few levels I found I
  699. couldnæt get rid of it and it limited my objects to just two types.
  700. 4.8
  701. Ö When firing at the bird Ö if you duck, it flies lower to avoid your
  702. fire. Stand until the bird is fairly close, then crouch and fire.
  703. 4.8
  704. Ö When the giant clam fires at you, or the Big eye, if you run so the
  705. Ébulletæ is off the screen it will disappear.
  706. 4.8
  707. Impression
  708. 4.8
  709. Hints & Tips
  710. 4.8
  711. Bruce Goatly (BG), who is busy writing a book about using Impression,
  712. very kindly sent us some hints & tips (in return for permission to use
  713. our H&T in his book!). Most of the rest of the H&T are from the editoræs
  714. experiences with the unreleased version 2.09. (Version 2.10 is not ready
  715. for release so 2.05 is still the latest officially available version.)
  716. 4.8
  717. Å   Abbreviation expansion Ö Use it to correct common spelling errors or
  718. to enforce house style (I often type Éansæ for Éandæ and Éthwæ for
  719. Étheæ, and the house style for my book is Édiskæ whereas I almost always
  720. spell it Édiscæ). BG.
  721. 4.8
  722. Å   Date and time format Ö As I continually forget what day it is, I use
  723. the Insert date option quite a lot. If you want to change the format of
  724. the date (the default is in the form 6th April 1991), load the !Run file
  725. into Edit and alter the definition of the variable Impression$DateFormat
  726. (see pp. 337-339 of the User Guide, on using system variables).
  727. Similarly, you can alter the time format by editing
  728. Impression$TimeFormat. BG.
  729. 4.8
  730. Å   Dongle connection problems Ö If you are having problems with a dongle
  731. that keeps saying it is not present and you find that you need to wiggle
  732. it (just a little bit!) to recognise its presence, go back and read the
  733. hint above about ÉConnection problemsæ. Alternatively, CC themselves
  734. offer a hint about it. They say that it is important to quit properly
  735. from Impression and not just do a <ctrl-break>, otherwise the dongle
  736. might need to be left for a couple of hours for a capacitor to discharge
  737. before Impression can be loaded again.
  738. 4.8
  739. Å   Line spacing and font changes Ö If a line in the middle of a paragraph
  740. starts with a different font from the lines around it, the line spacing
  741. may be upset for that one line because of the way Impression does its
  742. calculations. The way round it is to put the cursor at the start of the
  743. offending line, cancel the font change at that point and insert a Énullæ
  744. character (such as Alt-131). This will be invisible but will correct the
  745. line spacing. BG.
  746. 4.8
  747. Å   Loading text files Ö If you want to load a text file into Impression,
  748. there is no need to create a new document first Ö just drag the Edit
  749. file onto the Impression icon and it will set up an untitled document
  750. and load the text into a null frame.
  751. 4.8
  752. Å   Marking a single character Ö If you are doing DTP in a lower resolu
  753. tion screen mode, you may be finding it difficult to use the mouse to
  754. drag-mark a single character e.g. the Élæ in Éwillæ. One way of doing it
  755. is to move the cursor between two of the characters, click <select> but
  756. firmly hold the mouse in place. Then you use the cursor left or right,
  757. as appropriate, to move the cursor to the other side of the character to
  758. be marked and finally press <adjust>. George Foot, Oxted.
  759. 4.8
  760. My method of doing any of this kind of detailed work is to have two
  761. windows open on the same document Ö which is extremely easy to do
  762. (another advantage over PageMaker!) Ö one shows the full page and one
  763. just an enlarged section of the text. Then you can flick backwards and
  764. forwards between the two views enlarging and contracting the windows or
  765. simply pushing them to the back when they are not wanted.
  766. 4.8
  767. (However, have you noticed that Impression sometimes insists on going
  768. back to the beginning of the document when you expand and contract the
  769. window using the size switch icon in the top right hand corner of the
  770. window? Has anyone worked out why it happens and, more importantly, how
  771. to stop it?)
  772. 4.8
  773. Å   Special characters Ö The list in Appendix 5 of the Impression II
  774. manual gives a printout of all the characters. This is useful, but there
  775. is some variation from one typeface to another, so it would be useful to
  776. have an Impression file of it so that you could print it out in your
  777. particular typeface. Iæll put a file of it on the monthly program disc,
  778. but if you want to do it yourself, you can run the following program and
  779. put the text into a multi-column Impression document.
  780. 4.8
  781. 10 REM > CHARLISTER
  782. 4.8
  783. 20 *SPOOL CHARS
  784. 4.8
  785. 30 @%=2
  786. 4.8
  787. 40 FOR N% = 32 TO 255
  788. 4.8
  789. 50 PRINT N%;CHR$(9);
  790. 4.8
  791. ö{òöheadingòöon }{ò ;CHR$(N%); ö}ò
  792. 4.8
  793. 60 NEXT
  794. 4.8
  795. 70 *SPOOL
  796. 4.8
  797. Å   Spell-checking Ö Not really a hint, but I was using the spelling
  798. checker and it offered me the word öfaltnessò and told me that
  799. öflatnessò was wrongly spelled. Also, while spell-checking, someone had
  800. written öBeebugsæ policyò. The spelling checker knows Beebug but can you
  801. guess what it offered me as an alternative for the accidental plural?
  802. Yes, thatæs right, öBedbugsò! On the same theme, I spell-checked my
  803. Factfile and came up with Motley Electronics, Mike Leecher of EMU Ltd,
  804. ARM3æs from Aloof One and IDLE drives from Ian Copycats. Then I tried
  805. some of our contributors and found Brain Cowman, Dim Parkland and last,
  806. but not least, Pall Beggarly.
  807. 4.8
  808. Å   Tickets please! Ö (The following saga gives, firstly, an unnecessarily
  809. long method of doing a job but one which illustrates techniques which
  810. might prove useful in other circumstances. It is followed by the easier,
  811. smarter method!) I wanted to make some numbered tickets at A6 size so I
  812. made up an A4 page with four copies of the ticket. I used a two column
  813. master page so that I could just take a copy of the text on the page and
  814. paste it 14 times to make my 60 tickets. Near the bottom of each ticket,
  815. it said, öTicket number: ò with an appropriate blank space. Then I
  816. created four guide frames on the master page at about the right place to
  817. put in the ticket numbers and inserted four new frames on each page. I
  818. then went through linking all the frames together. To create the text
  819. for the numbers, I used PipeDream using the örowò command and copying it
  820. down 60 rows. I then ösavedò this in tab format straight into the first
  821. ticket number frame and, instantly, all the tickets were numbered.
  822. Brilliant! The only real hassle was lining up the ticket number boxes
  823. with the words on the ticket. The problem is that although you can have
  824. both the text and the master page on screen at the same time and at the
  825. same magnification (which helps), the main page is not updated until the
  826. master page is closed so I changed the öpreferencesò to make the master
  827. page come up at the right magnification.
  828. 4.8
  829. (A similar technique of linked frames is used for the running heads on
  830. the magazine Ö i.e. the articlesæ names at top outside corners of the
  831. pages. The dummy Archive, before articles are inserted, has a whole
  832. string of 60 öXòs, one on each page, alternately left and right aligned.
  833. Then, when an article has been inserted, the running heads are altered
  834. using selective search and replace to change, for example, öXò into
  835. öHints & Tipsò. This is easier than using copy and paste because it
  836. preserves the left and right alignment. But I digress... let me get back
  837. to the tickets...)
  838. 4.8
  839. Then I suddenly realised the easy way of doing it.... Create the ticket
  840. at full A4 size on the master page using öTicket number: ò and then
  841. inserting the page number. (Use <menu> Ö Misc Ö Insert Ö Current page
  842. number Ö Numeric.) Then, all you do is to add 59 pages (click on öInsert
  843. new pageò with <adjust>, not <select> so that the menu option stays on
  844. the screen) and use öFit lotsò on the öPrintò dialogue box reducing the
  845. scale to 50%. If you find that it still says, öFit lots (1)ò at 50% and
  846. you have to go down to about 48% before it goes to (4), click on
  847. öSetup...ò and select the option to öIgnore page boundaryò. If you donæt
  848. do this but print out at 48%, you will find that the margins are
  849. unequal. This is a much quicker way of doing it than the previous method
  850. and also gives the possibility of deciding that you want the tickets
  851. smaller after all so you just reduce the scale and, perhaps, change to
  852. sideways printing.
  853. 4.8
  854. Å   Widows & orphans Ö This is the technical term for where you get a
  855. paragraph split so that a single line is on one page (or column) and the
  856. rest is on the previous or next. If the first line is split off from the
  857. rest, the solution is fairly obvious Ö use <ctrl-G> at the beginning of
  858. the paragraph to push the line onto the next column. The odd line at the
  859. end of a paragraph is less easy. If the text is left justified, you can
  860. again use <ctrl-G> to push one more line to the next column to join the
  861. lonely orphan. However, if you subsequently edit the paragraph so that
  862. the layout of the lines changes, you have to edit out the <ctrl-G>.
  863. Also, this doesnæt work at all if you are using full justification
  864. because the <ctrl-G> causes the justification on the last line of the
  865. column to be lost and it looks like the end of a paragraph without a
  866. full stop. The only solution I can find is to create a new frame with
  867. <ctrl-I> and lay it over the last line of the column. This forces that
  868. line over to the next column without losing the justification.
  869. 4.8
  870. SCSI Hints & Tips
  871. 4.8
  872. Å   Removable drive problems Ö We are beginning to understand more about
  873. the problems with removable drives. Let me explain... SCSI drives are
  874. intelligent and they keep their own record of any duff sectors. However,
  875. this record is not available to the user. If you tell the computer to
  876. öformatò the disc, it deliberately ignores any sectors it already knows
  877. are duff. If you get a ösoft errorò i.e. where the data gets corrupted
  878. so that the CRC check shows up an error, reformatting will clear the
  879. problem. However, if the disc surface is actually damaged, it may be
  880. that reformatting clears the problem temporarily but, with time, the
  881. problem may reappear and you will get the dreaded öDisc error 10 at... ò
  882. or whatever. The solution to this is to use the *DEFECT command provided
  883. by RISC-OS. If you get an error, *VERIFY the disc, note the addresses
  884. which are thrown up as either suspect or actually having a disc error,
  885. say, 7CEC00, 7CEE00 and 7CF000 and then type in
  886. 4.8
  887. *DEFECT SCSI::5 7CEC00
  888. 4.8
  889. *DEFECT SCSI::5 7CEE00
  890. 4.8
  891. *DEFECT SCSI::5 7CF000
  892. 4.8
  893. where SCSI::5 is the drive definition. It is worth recording these
  894. addresses in case you need to format the disc again in the future. You
  895. then need to enter the *DEFECT commands again. If *DEFECT finds that you
  896. are trying to map out a sector that is allocated to a file or directory,
  897. it will tell you so, in which case, you will have to copy the file or
  898. directory and delete the one which it says is in the way.
  899. 4.8
  900. Obviously, it is better if you can avoid getting hard errors in the
  901. first place so, just as a reminder, (1) always dismount the drive
  902. properly before switching off the power and (2) keep your drive cool by
  903. not packing other hardware around it.
  904. 4.8
  905. Å   Removable drive problems (Part 2) Ö Surely there canæt be any MORE
  906. problems with the removable drives Ö they really wonæt be worth selling.
  907. Yes, there are more problems but, yes, I still think they are worth
  908. selling. If you try to use the MR45æs or the Atomwide equivalent on an
  909. Acorn SCSI podule or on a TechnoSCSI (I have not tried any others), you
  910. will find that occasionally they just hang up Ö usually when copying a
  911. sequence of files. It is a timing problem which Acorn say they will look
  912. into but they are not too optimistic. They say that Syquest, who make
  913. the drive mechanisms, have interpreted the SCSI standards in a different
  914. way from other drive manufacturers. The Acorn engineers have tried to
  915. modify their software to accommodate Syquestæs idiosyncrasies but
  916. although they have managed to make a version of their software that will
  917. work when copying lots of files, they find that it does not format the
  918. cartridges properly! It is not beyond the bounds of possibility to get
  919. SCSI software to work on the Syquest drives Ö both Oak and Lingenuity
  920. have done it successfully but, as yet, there is no satisfactory way of
  921. running them on Acorn or TechnoSCSI cards.
  922. 4.8
  923. I should say to A540 owners, that, although I am using a Syquest
  924. removable drive on my A540, I am doing so on an Oak podule. I made the
  925. change (before I realised there was any problem) purely on the basis
  926. that (1) the Oak software is the easiest to use on the MR45æs because of
  927. the ease of dismounting and re-mounting discs and (2) it is the fastest
  928. that I have tried. (I have not yet tried the offerings from HCCS or The
  929. Serial Port but unless they have specifically tailored their software
  930. for the Syquest mechanisms, I doubt that they will work.)
  931. 4.8
  932. Å   SCSI land speed record Ö Oak are claiming an Archimedes drive speed
  933. record. Their 300M HS drive, on an A440 with a 20MHz ARM3, runs at 1939
  934. / 1761 / 1043  Kbytes/sec in modes 0, 15 and 21 respectively. Can anyone
  935. beat that?  A
  936. 4.8
  937.  
  938.  
  939.  
  940.