home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / programs / emulaton / 65link / !65Link / Docs / Guide next >
Text File  |  1998-02-01  |  12KB  |  344 lines

  1.  
  2. _________________
  3.  
  4. 65Link user guide
  5. _________________
  6.  
  7.  
  8. User, please note
  9. =================
  10.  
  11. 65Link is Freeware, i.e. it is free software.
  12.  
  13. Copyright notice
  14. ================
  15.  
  16. The copyright (c) of this program belongs to John Kortink. All rights are
  17. reserved.
  18.  
  19. You may not change this program (except for documented configuration
  20. changes). You may not use any part of this program in any other program or
  21. product without my written approval. You may spread this program freely, but
  22. only in complete and unchanged form, and only against bare distribution costs
  23. (if any). This program is provided 'as is'. No fitness of this program for
  24. any particular purpose is implied. Using this program is entirely at your own
  25. risk.
  26.  
  27.  
  28. //
  29. //
  30. // Introduction
  31. //
  32. //
  33.  
  34. 65Link gives your 6502 equipped machine (e.g. BBC model B) the ability to use
  35. the harddisc of your ARM equipped machine (e.g. RISC PC) for file storage.
  36. 65Link's only requirement is that the 6502 machine has a 'user port', and
  37. that the ARM machine has a parallel port that supports 'PS/2' mode. Most 6502
  38. and 'recent' ARM machines qualify for this.
  39.  
  40. 65Link has been developed on a RISC PC and a BBC model B. I currently don't
  41. know about other combinations that will work, so I cannot give definite
  42. guarantees that 65Link will work on your 6502 or ARM machine(s). The BBC and
  43. Master should work, as should the RISC PC, A5000 and A4. Once I get positive
  44. results from users I will compile a list of compatible machine types and
  45. configurations.
  46.  
  47. The hardware side of the link consists of a suitably wired parallel cable,
  48. which is plugged into the 6502 machine's 'user port' and the ARM machine's
  49. parallel port. In addition, a sideways ROM containing a special filing system
  50. called 'LFS' (the image of which is provided) should be installed on the 6502
  51. machine.
  52.  
  53. In the following, 6502-equipped machines will mostly be referred to as '6502'
  54. and ARM-equipped machines as 'ARM'.
  55.  
  56. Note that 65Link is not for the fainthearted or inexperienced. A fair amount
  57. of knowledge and work is involved in getting the whole system up and running.
  58. But the rewards are great. All your 6502 files will be on your ARM machine :
  59. file storage space becomes virtually unlimited (no more floppies !), files
  60. load much faster, and software maintenance is greatly simplified.
  61.  
  62.  
  63. //
  64. //
  65. // Hardware requirements
  66. //
  67. //
  68.  
  69. 6502
  70. ----
  71. - A 'user port'.
  72. - A sideways ROM containing LFS. See below.
  73.  
  74. ARM
  75. ---
  76. - A parallel port with PS/2 support.
  77.  
  78. Additional
  79. ----------
  80. - A parallel cable wired to specifications. See below.
  81.  
  82.  
  83. //
  84. //
  85. // Using 65Link
  86. //
  87. //
  88.  
  89. On a 6502, a sideways ROM containing LFS should be installed. 6502
  90. installation and use is discussed below.
  91.  
  92. On an ARM, !65Link and all your required 6502 software should be installed.
  93. ARM installation and use is discussed below.
  94.  
  95. The parallel cable which connects the 6502's 'user port' and the ARM's
  96. parallel port consists of a 'female 20 pin flatcable' connector (with notch),
  97. a 'male 25 pin D' plug, and a multi-wire, *SHIELDED* cable. The cable should
  98. be wired as follows (pin numbers are marked on the D plug, pin 1 of the
  99. flatcable connector is also marked, consult your manuals if in doubt) :
  100.  
  101.   ARM              <--->  6502
  102.  
  103.   Pin 1 (nSTROBE)  <--->  Pin 2 (CB1)
  104.   Pin 2 (DATA 0)   <--->  Pin 6 (PB0)
  105.   Pin 3 (DATA 1)   <--->  Pin 8 (PB1)
  106.   Pin 4 (DATA 2)   <--->  Pin 10 (PB2)
  107.   Pin 5 (DATA 3)   <--->  Pin 12 (PB3)
  108.   Pin 6 (DATA 4)   <--->  Pin 14 (PB4)
  109.   Pin 7 (DATA 5)   <--->  Pin 16 (PB5)
  110.   Pin 8 (DATA 6)   <--->  Pin 18 (PB6)
  111.   Pin 9 (DATA 7)   <--->  Pin 20 (PB7)
  112.   Pin 10 (nACK)    <--->  Pin 4 (CB2)
  113. * Pin 18 (0V)      <--->  Pin 5 (0V)
  114. * Pin 19 (0V)      <--->  Pin 7 (0V)
  115. * Pin 20 (0V)      <--->  Pin 9 (0V)
  116. * Pin 21 (0V)      <--->  Pin 11 (0V)
  117. * Pin 22 (0V)      <--->  Pin 13 (0V)
  118. * Pin 23 (0V)      <--->  Pin 15 (0V)
  119. * Pin 24 (0V)      <--->  Pin 17 (0V)
  120.   Pin 25 (0V)      <--->  Pin 19 (0V)
  121.  
  122. Connections marked with a * are not required, but they are recommended. In
  123. addition to these connections, the shielding wire should be soldered to the
  124. plug's metal on the ARM side (i.e. to the plug itself, not one of its pins),
  125. and left unconnected on the 6502 side (but take care that it is insulated,
  126. so it can't short against other wires !).
  127.  
  128. It is recommended to buy a prefabricated completely wired 'straight' parallel
  129. extension cable (i.e. pin 1 to pin 1, pin 2 to pin 2, ..., pin 25 to pin 25),
  130. and re-wire that to the specifications above (removing a D plug at one end,
  131. replacing it with the flatcable connector, and 'squeezing' the cable wires to
  132. the connector). This saves a lot of soldering. Ensure that at least one side
  133. of the prefabricated cable has a 'male' plug (i.e. a plug with pins, not
  134. holes), and that the cable is shielded. If you cannot open the D plug on the
  135. 6502 side, simply cut it off to expose the wires.
  136.  
  137.  
  138. //
  139. //
  140. // The software on the 6502 side
  141. //
  142. //
  143.  
  144. Installation of a sideways ROM containing LFS is required.
  145.  
  146. The 'image' of the sideways ROM is provided in the 'LFS' file. The image
  147. should be blown into an EPROM chip of 8kB (usually a 2764 or 27C64) or 16kB
  148. (usually a 27128 or 27C128). If you cannot blow EPROMs yourself, the best way
  149. to get it done is to go to an electronics shop. Most of these shops can
  150. provide the required EPROM, and blow the image into the EPROM for you.
  151.  
  152. Insert the EPROM into the free sideways ROM socket with the highest priority.
  153. On a BBC, the ROM priority increases towards the side of the machine. Consult
  154. your manuals if in doubt. If you are already using another filing system ROM
  155. (e.g. DFS or ADFS), you must either remove it or ensure that this has a lower
  156. priority than the LFS ROM. If this is not done, LFS will not be selected as
  157. the default filing system, which means that you will have to type 'LFS' each
  158. time you reset your machine.
  159.  
  160. LFS provides a (nearly) complete, DFS-like filing system. Using your 6502
  161. software through LFS is, in principle, nothing different than using it
  162. through DFS. Nearly all low level calls and *-commands are supported. LFS
  163. also adds a few new *-commands.
  164.  
  165. LFS supports the following *-commands :
  166.  
  167. - Its selection command :
  168.   - *LFS
  169. - All OS-provided commands that call low level filing system code :
  170.   - *Cat (<filespec>)
  171.     Note : extended with (<filespec>).
  172.   - *Exec
  173.   - *Load
  174.   - *Opt
  175.     Note : only option 4 (set boot options).
  176.   - *Run
  177.   - *Save
  178.   - *Spool
  179. - Old commands that behave mainly 'the DFS way'
  180.   - *Delete <filename>
  181.   - *Dir (<dir>)
  182.   - *Drive <drive>
  183.   - *Dump <filename>
  184.   - *Enable
  185.     This is accepted as a command but doesn't actually do anything.
  186.   - *Info <filespec>
  187.   - *Lib (<dir>)
  188.   - *Type <filename>
  189. - Old and new commands that behave mainly 'the RISC OS way'
  190.   - *Access <filespec> (<attributes>)
  191.   - *Close
  192.   - *Copy <filename> <filename>
  193.   - *Count <filespec>
  194.   - *Create <filename> <length>
  195.   - *Ex (<dir>)
  196.   - *Rename <filename> <filename>
  197. - Miscellaneous new commands
  198.   - *Open
  199.     List all open files.
  200.   - *ExAll (<drive>)
  201.     Same as *EX for all dirs on the specified or current drive.
  202.   - *Vols
  203.     List all available volumes (explained later).
  204.   - *Vol (<volume>)
  205.     Mount volume <volume> (explained later).
  206.  
  207. LFS needs much less memory than DFS (most of the actual filing system work is
  208. delegated to the ARM machine). LFS only uses locations &D00-&DFF, in addition
  209. to the standard zero-page locations allocated to filing systems, so your PAGE
  210. will remain at &E00.
  211.  
  212. LFS has filing system number 7. This should be unique according to 'The
  213. Advanced User Guide' by Bray, Dickens and Holmes (which I used extensively
  214. while writing LFS). If it seems to clash with other filing systems you're
  215. using, please contact me. LFS has 'boot selection key' 'L'.
  216.  
  217.  
  218. //
  219. //
  220. // Second processor support
  221. //
  222. //
  223.  
  224. 65Link fully supports second processors.
  225.  
  226. Note however that you need the old filing system EPROM supplied with your
  227. second processor (usually some updated form of DFS) to be in the machine,
  228. because this contains the code for the Tube environment. The LFS EPROM should
  229. be in a higher priority ROM socket than the DFS EPROM, so that LFS will be
  230. selected as the default filing system after booting.
  231.  
  232.  
  233. //
  234. //
  235. // The software on the ARM side
  236. //
  237. //
  238.  
  239. Installation of !65Link and all your required 6502 software is required.
  240.  
  241. The !65Link application handles all LFS requests, and requires no special
  242. explanation. After starting !65Link, you must hard-reset your 6502 machine
  243. once.
  244.  
  245. There are many ways to transfer your 6502 files to your ARM's harddisc. I
  246. will not go into that here, because it is a complex matter and solutions
  247. differ depending on what old and new hardware and software you are using.
  248. Please refer to docs of, for example, BBC emulators and/or seek help from
  249. knowledgeable people. Only the way in which your 6502 files should be stored
  250. on your ARM's harddisc is explained here.
  251.  
  252. Each 6502 file must be stored on your ARM's harddisc 'as is' (i.e. with the
  253. same file attributes and load/execution addresses), at the following path :
  254.  
  255. <65Link$Volumes>.<Volume name>.<Drive number>.<Dirname><Leafname>
  256.  
  257. The <65Link$Volumes> part points to the directory containing all your 6502
  258. software. The 65Link$Volumes system variable is set in !65Link.!Run. Change
  259. it to your own liking. The <Volume name> part can be considered to be
  260. equivalent to a 'disc name', although this is not actually part of a 6502
  261. filename. The <DirName> and <Leafname> parts should be suitably translated to
  262. avoid filename characters which are legal on 6502 machines but illegal on ARM
  263. machines. The translation is on a character by character basis, and must
  264. follow the !65Host convention (see page 167 of the Applications Guide for
  265. RISC OS 3.1) :
  266.  
  267. 6502 '$' becomes '[' on ARM
  268. 6502 ' ' becomes ''' on ARM
  269. 6502 '@' becomes '<' on ARM
  270. 6502 '|' becomes '>' on ARM
  271. 6502 '"' becomes ']' on ARM
  272. 6502 '%' becomes '}' on ARM
  273. 6502 '&' becomes '{' on ARM
  274. 6502 '^' becomes ')' on ARM
  275.  
  276. In addition (specifically for !65Link) :
  277.  
  278. 6502 '.' becomes '(' on ARM
  279.  
  280. An example. Consider a 6502 file on a floppy disc you call 'Games1', on drive
  281. 2, in directory $, with leafname 'ZAP&ZIP'. And 65Link$Volumes is set to
  282. 'ADFS::4.BBC'. Then the 6502 file should be stored as :
  283.  
  284. ADFS::4.BBC.Games1.2.[ZAP{ZIP
  285.  
  286. You *must* create directories for drives 0 and 2. It is optional to create
  287. directories for drives 1,3,4,5,6 and 7, and if any of them is not present,
  288. access to them is remapped to drives 0 (for drives 1,4 and 5) and 2 (for
  289. drives 3,6 and 7).
  290.  
  291. The boot options of all drives in a volume are stored in the file 'BootOpt'.
  292. This is created automatically when *OPT 4 is executed. If 'BootOpt' is not
  293. present, the boot options are all 3 ('EXEC') by default.
  294.  
  295. On the 6502 side, the volume name cannot be specified as part of a filename.
  296. Therefore, LFS provides the '*VOL' and '*VOLS' commands (see above). You can
  297. switch volumes simply by typing '*VOL <volume name>'.
  298.  
  299. The default volume mounted when !65Link starts up is <65Link$DefaultVolume>.
  300. The 65Link$DefaultVolume system variable is set in !65Link.!Run. Change it to
  301. your own liking. If the volume named by 65Link$DefaultVolume is not present,
  302. the first volume found in <65Link$Volumes> is mounted instead.
  303.  
  304.  
  305. //
  306. //
  307. // Limitations
  308. //
  309. //
  310.  
  311. Currently known shortcomings are :
  312.  
  313. - 65Link does not yet work correctly on A5000, A4 and similar machines, as
  314.   the parallel port used in these machines is different from the one used in
  315.   the RISC PC. I am trying to sort this out but I have no direct access to a
  316.   machine yet.
  317. - OS_BGet and OS_BPut are not as fast as they could be.
  318. - While a *SPOOL file is open, you cannot use some commands (e.g. *EX,
  319.   *INFO), because these tasks will interfere with each other.
  320. - Most, but not all *-commands will behave 100% exactly 'the DFS way'. There
  321.   are also some extensions.
  322. - Error trapping may not be complete in some places.
  323. - Disc cycle numbers are not maintained. OS_GBPB 8 returns the file handle.
  324.  
  325. A number of these problems may be solved in future versions, time permitting.
  326.  
  327. If you experience any additional problems, please report them to me.
  328.  
  329.  
  330. //
  331. //
  332. // Epilogue
  333. //
  334. //
  335.  
  336. Updates of 65Link will be made available by (in order of preference) :
  337.  
  338. - World Wide Web, on www.inter.nl.net/users/J.Kortink.
  339. - Electronic mail, to kortink@inter.nl.net.
  340. - Snail mail, to : John Kortink, Nutterbrink 31, 7544 WJ Enschede, The
  341.   Netherlands. Include a DD or HD floppy, return envelope and one
  342.   International Reply Coupon (IRC).
  343.  
  344.