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

  1. Å Basic Text File Type Ö Acorn have specified field type &FD1 for BASIC
  2. ASCII text.  This is very useful for BASIC programs which are kept in
  3. !Edit format as it allows the user to define a RunType for them.  For
  4. example, the following command will cause a BASIC text file to be run
  5. just like a normal BASIC file:
  6. 4.03
  7.    *Set Alias$@RunType_FD1 Basic-quit |ö%0|ò %*1
  8. 4.03
  9. Jim Markland, Cirencester.
  10. 4.03
  11. Å Converting old Arthur programs to RISC OS Ö Before the days of RISC-
  12. OS, programs running under the old Arthur used a form of reconfigure
  13. system to adjust the CMOS RAM settings.  Now that RISC-OS is available,
  14. those programs are out of date, and are a pain, as in most cases they
  15. donæt öBoot-Upò from the desktop.
  16. 4.03
  17. RISC-OS uses a different form of reconfiguring.  Two in fact Ö one is
  18. the WimpSlot command, which tells the computer the minimum and maximum
  19. amount of memory the program is going to need and the other uses the
  20. module MemAlloc, found in the !Lander directory on Application disc 2.
  21. 4.03
  22. These two things are quite easy to use.  The only problem is how to find
  23. out how much room the program is going to use.  This can be discovered
  24. fairly easily.
  25. 4.03
  26. Load up the !Boot file and examine it using the BASIC Editor.  What you
  27. are looking for are a set of commands/variables, which tell the computer
  28. the amount of SpriteSize/Screensize, etc it is going to need to run.  To
  29. convert this, all you need is the MemAlloc module, and in a run file,
  30. use MemAlloc to allocate the memory needed for the application.
  31. 4.03
  32. Here are some examples:
  33. 4.03
  34. Holed Out
  35. 4.03
  36. 1. Format a fresh new disc
  37. 4.03
  38. 2. Create a new directory called !HoledOut
  39. 4.03
  40. 3. Copy all the files on the original Holed Out disc, except the !Boot
  41. file into the new directory.
  42. 4.03
  43. 4. Copy MemAlloc into the !HoledOut directory.
  44. 4.03
  45. 5. Use !Edit to create the following Obey file:
  46. 4.03
  47.    program segment missing
  48. 4.03
  49. 6. Load HoledOut 2 into the BASIC Editor and, where the program loads a
  50. particular file, change it to
  51. 4.03
  52.    (LoadCommand) <HoledOut$Dir>. (File to be loaded)
  53. 4.03
  54. for example
  55. 4.03
  56.    70 *RMLOAD BELL
  57. 4.03
  58. change to
  59. 4.03
  60.    70 *RMLOAD <HoledOut$Dir>.Bell
  61. 4.03
  62. and
  63. 4.03
  64.    610 CHAIN öHOLEDOUT3ò
  65. 4.03
  66. change to
  67. 4.03
  68.    610 CHAIN  ö<HoledOut$Dir>.HOLEDOUT3ò
  69. 4.03
  70. etc, etc.
  71. 4.03
  72. 7. Do the same as above to the file HOLEDOUT3, wherever the program
  73. loads a particular file, put the command<HoledOut$Dir>. in front of the
  74. filename.
  75. 4.03
  76. 8. Create a !Sprite file for the application icon and away you go!
  77. 4.03
  78. Then HoledOut should run as a RISC-OS application, and will also run off
  79. a Hard Drive (N.B. I used Holed Out Extra Courses 1)
  80. 4.03
  81. Explanation of !Run File:
  82. 4.03
  83. Line 1:  Tells the computer to set a directory, and to enter it without
  84. changing the root directory whenever the <HoledOut$Dir> command is used.
  85. 4.03
  86. Line 2:  Allocates the minimum and maximum amount of memory needed to
  87. run the application.
  88. 4.03
  89. Line 3:  Tells the computer to look for the module MemAlloc in memory,
  90. if it isnæt found then it tells the computer where to find it and loads
  91. it.
  92. 4.03
  93. Lines 4-9:  Tell the computer the memory settings the program needs.
  94. 4.03
  95. Line 10:  Kills the module MemAlloc for more memory.
  96. 4.03
  97. Line 11:  Runs the actual program.
  98. 4.03
  99. Pacmania:
  100. 4.03
  101. In this case, things are a little different.  So do the following:
  102. 4.03
  103. 1.  Format a new disc.
  104. 4.03
  105. 2.  Create a new directory called !PacMania.
  106. 4.03
  107. 3.  Copy all the files except !Boot into the new directory.
  108. 4.03
  109. 4.  Use !Edit to create an Obey file containing the following...
  110. 4.03
  111.    Set PacMania$Dir <Obey$Dir>
  112. 4.03
  113.    Run <PacMania$Dir>.!RunLoad
  114. 4.03
  115. 5.  Use the BASIC Editor to create a file called !RunLoad...
  116. 4.03
  117.    10 *Load <PacMania$Dir>.PacMania 10000
  118. 4.03
  119.    20 CALL &100000
  120. 4.03
  121. 6.  Create an application !Sprite file.
  122. 4.03
  123. PacMania should then run as a RISC-OS application.
  124. 4.03
  125. So there we are, Iæve also used another command to help with the loading
  126. process.  <Obey$Dir> and <(Application name)$Dir>.  These two commands
  127. tell the computer where to find certain files, no matter where they are. 
  128. (Hidden in directories on a hard drive for example.)  Duncan Burbidge.
  129. 4.03
  130. Å Getting Taxan 795 to work with Archimedes.  The Taxan 795 is an
  131. excellent multi-sync colour monitor, but it was a bit unnerving, on
  132. unpacking and assembling my new A440 with VIDC Enhancer and 795 monitor,
  133. to be confronted with a screen which just would not synchronize!  But,
  134. with help from Paul and from Atomwide, and with a lot of exploration, I
  135. think that I now know what screen modes it will support and how to get
  136. them.
  137. 4.03
  138. Initially, the trick is to set *CONFIGURE MONITORTYPE 1 and *CONFIGURE
  139. WIMPMODE20.  Then the machine wakes up in the desktop in mode 20 whether
  140. or not the VIDC enhancer software (VIDCmodes for the 795) is installed,
  141. provided that (if it is not installed) the VIDC switch is Éoffæ. 
  142. However, if VIDCmodes is not installed, loading an application which
  143. changes the mode to one of the basic Archimedes modes (0-17) plunges you
  144. back into an unsynchronized screen.  Therefore, my initial explorations
  145. were done with an ordinary monchrome monitor connected to the sync BNC
  146. socket, after changing two links on the circuit board Ö as explained on
  147. page 434 of the RISC-OS user guide.  Options for all Acorn and Atomwide
  148. modes (except the high-resolution mono mode 23) are listed in the
  149. accompanying table.  (See opposite.)  Bill Mapleson.
  150. 4.03
  151. Å Keywords in BASIC Ö I have found that PRINT ÉSHIFT F1æ showed a lower
  152. case underline Éaæ.  From BASIC on pressing return to ÉPRINTæ the result
  153. I found a number that looked just like TIME.  It was.  SHIFT F2 gives
  154. HIMEM and SHIFT F3 = LOWMEM.  No other Fkey gives a number, but they all
  155. act as quick entry keys for use in BASIC program writing within ARMB
  156. edit.  They must be programmed with BASIC keyword token values.
  157. 4.03
  158. I expect this is widely known but here is the list for completeness.
  159. 4.03
  160.    program segment missing
  161. 4.03
  162. Simon Anthony, Nottingham.
  163. 4.03
  164. Å Locating screen coordinates Ö When writing wimp programs (out of
  165. desktop) itæs often hard to plot things because youære not sure what the
  166. coordinates of the screen are.  Using the program below, it is possible
  167. to do this.
  168. 4.03
  169.    program segment missing
  170. 4.03
  171. I hope the program is of some use to wimp programmers.  Duncan Burbidge.
  172. 4.03
  173. Å MSDOS installation on hard disc Ö Here is a summary of the steps for
  174. getting an MSDOS partition installed onto a hard disc.
  175. 4.03
  176. 1. (This step applies only if you have an old PCEmulator, e.g. V1.20,
  177. and a V1.33 upgrade disc)
  178. 4.03
  179. (a) Read ÉReadMe2æ on the V1.33 disc.
  180. 4.03
  181. (b) Run ÉMakePCæ on the V1.33 disc.  (This copies the file !PC.Rom from
  182. the 1.20 disc to the 1.33 disc.  Although the desktop displays this as a
  183. Étextæ file, I reckon that in fact it is the emulator itself and that
  184. all the other files are concerned with preparing the Archimedes to run
  185. the Emulator.)
  186. 4.03
  187. 2.  Read ÉReadMeæ on V1.33 but donæt take too much notice of it Ö it
  188. confused me a lot!
  189. 4.03
  190. 3.  Examine the files !PC.GenBoot.! Config and !PC.GenBoot.!Modules.  If
  191. you have more than 1M of RAM, it may be worth changing some of the ÉYæs
  192. to æNæs in !Config.  When I first tried it, without any changes, my
  193. screen went blank because my Taxan 795 monitor requires the VIDC
  194. Enhancer and the VIDCmodes software installed in order to synchronize
  195. when not in modes 18-21.  With a 4M machines, I decided to make all the
  196. response ÉNæ and everything seemed OK.
  197. 4.03
  198. 4.  If you have a SCSI hard disc (as I have), run !SCSIDisk.  This
  199. renames !PC.SCSIRun2 to !PC.!Run2 and !PC.!Run2 to !PC.!ADSF[sic]Run2. 
  200. That is, it makes !Run2 the file that defines where the MSDOS partition
  201. is to be placed Ö on a SCSI hard disc not on an ADFS one.  !SCSIDisk
  202. then creates a file ÉPC.Drive_Cæ on the SCSI disc of the size you
  203. request (1 to 32M).  This file can be *TYPEd from the Archimedes command
  204. line Ö but donæt do it until everything is complete because its contents
  205. misled me!  The screen then displays information for running two MSDOS
  206. commands:  FDISK and HDINSTAL.  It also displays the injunction ÉPress
  207. ESCæ to stop:  Press RETURN to continueÉ.
  208. 4.03
  209. 5.  If you press <return>, the instructions are cleared from the screen;
  210. the PC Emulator is loaded, and you are invited to put the MSDOS boot
  211. disk into ÉDriveAæ (Drive0).  Doing so, and pressing <return>, loads
  212. MSDOS which asks for date and time Ö but pressing <return> in response
  213. to each request supplies the information from the system clock.  When
  214. the ÉA>æ prompt appears, you need to carry out the instructions that
  215. were recently wiped off the screen:  Type ÉFDISKæ, then É1æ to create a
  216. DOS partition, then ÉYæ to assign all of file Drive_C to DOS: then
  217. ÉHDINSTALæ which formats the hard disc and transfers the MSDOS system
  218. files from the floppy MSDOS boot disc to the hard disc.
  219. 4.03
  220. 6.  If you press ESC (at the ÉESC to stop, <return> to continueæ
  221. injunction) and need to run !SCSIDisk again, beware that this will re-
  222. rename the !Run2 files.  I avoided this by ÉRemmingæ the *rename
  223. statements in !SCSIDisk.!RunImage.  (This is a BASIC program from which
  224. it would appear that the procedure for installing MSDOS on an ADFS hard
  225. disc would be the same without the complication of renaming the !Run2
  226. files.)
  227. 4.03
  228. 7.  Once MSDOS is safely on the hard disc, the !PC application can be
  229. transferred from the V1.33 disk to the PC directory on the hard disk.
  230. 4.03
  231. 8.  One last complication fo me was that when I type ÉHDINSTALæ I go the
  232. quaint message Éinsert new diskette in drive Cæ and, on pressing
  233. <return>, Édrive not read Ö format failureæ.  Eventually, after many
  234. hours and several phone calls, the explanation turned out to be that I
  235. have two external 5.1/4ö drives and MSDOS was seeing the second of these
  236. as Drive C and the SCSI hard disc as Drive D.  To avoid amending
  237. HDINSTAL (which is a simple batch file) I told RISC-OS that it had only
  238. two floppy drives (*CONFIGURE FLOPPIES 2, followed by <ctrl-break>) and
  239. all went smoothly.  Subsequently I reconfigured to three floppies and
  240. now MSDOS wakes up with a ÉD>æ prompt ready to run from the hard disc. 
  241. The most useful tool for finding out what MSDOS thinks it has is to type
  242. CHKDSKA:.CHKDSKB: etc,
  243. 4.03
  244. 9.  Finally, in RISC-OS, lock the ÉDrive_Cæ file.  Iæm astonished that
  245. this is not done by the PCEmulator programs.  Without it, a careless
  246. click in RISC-OS might destroy all your MSDOS files!  Bill Mapleson.
  247. 4.03
  248. Å Saving your configuration settings Ö I recently needed to change the
  249. batteries in my Archimedes but this meant that I would lose the
  250. configuration settings stored in the CMOS RAM.  I managed to solve the
  251. problem by writing two small programs that saved and then restored the
  252. CMOS RAM settings to and from a file.
  253. 4.03
  254.    program segment missing
  255. 4.03
  256. Sham Gardner, Karlsruhe (Germany).
  257. 4.03
  258. (The other way of doing it is to open the computer, switch the computer
  259. on, change the batteries, switch off and then put the computer back
  260. together again Ö but I dare not suggest that you should do that because
  261. someone might stick a screwdriver into the heavily protected p.s.u. and
  262. Iæd get blames Ö so I didnæt suggest it, OK? Ed.)
  263. 4.03
  264. Å Wimpslotting warning.  Always give the maximum amount of memory your
  265. program is going to use.  Otherwise, the computer will eat up all the
  266. available memory and use it for the program and you canæt get the memory
  267. back unless you quit the application!  This happens in FormEd (All
  268. versions, I would assume).  The FormEd !Run file contains the line:
  269. 4.03
  270.    WimpSlot -min 288k
  271. 4.03
  272. Using !Edit, change this line to...
  273. 4.03
  274.    WimpSlot -min 288k -max 288k
  275. 4.03
  276. The program will then run, using up less memory, meaning that both
  277. !FormEd and !Paint can run at the same time on a 1M machine.  You have
  278. been warned.  Duncan Burbidge.
  279. 4.03
  280.  
  281.  
  282.