home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / misc / ro2extras_1 / !65Host / ReadMe < prev    next >
Text File  |  1989-09-22  |  10KB  |  264 lines

  1. This is 65Host, version 1.40
  2.  
  3. Documentation on how to use 65Host can be found in Edition 2 of the
  4. Archimedes User Guide and in the RISC OS User Guide.
  5.  
  6. The following remarks should be noted about this version of 65Host and its
  7. documentation.
  8.  
  9. 65Host provides a limited emulation of a BBC Model B Microcomputer only.
  10. Versions of programs which run on the BBC Master 128 or Master Compact may
  11. use facilities not available on the BBC Model B, and so may not work under
  12. this emulation.
  13.  
  14. Full emulation of the parallel (Centronics) printer port is provided, via
  15. the Archimedes parallel printer socket. The parallel printer is selected by
  16. default (the selection can be changed using FX 5). Printing is enabled and
  17. disabled in the normal way, usually via CTRL-B and CTRL-C respectively.
  18.  
  19. No emulation of the serial port, or of the Econet printer interface, is
  20. provided.
  21.  
  22. The User VIA chip is only accessible to the emulator when an I/O Expansion
  23. Card is present. If a program uses the User VIA timers, it will not operate
  24. correctly without an I/O Expansion Card being fitted.
  25.  
  26. If an I/O Expansion Card is fitted, then timer interrupts generated from the
  27. 6522 may be handled by 6502 programs. However, the timers are driven at
  28. 2MHz, rather than the 1MHz on the Model B.
  29.  
  30. Full sound chip emulation is provided. In conjunction with the 6502
  31. operating system, this allows use of the SOUND and ENVELOPE keywords from
  32. BASIC, and the associated OSWORD calls. This gives the usual 3 tone channels
  33. (square waves) and a noise/pulse wave channel.
  34.  
  35. Screen accessing has been speeded up since version 1.00.
  36.  
  37. Keyboard handling has been modified so that characters inserted into the
  38. RISC OS keyboard buffer are later transferred into the 6502 keyboard buffer,
  39. via the normal insert mechanism. This means that programs which use INSV
  40. should now work. Also, OSBYTE calls &79 and &7A, which scan a range of keys,
  41. now work correctly. The pound key now generates the correct code (&60).
  42.  
  43. However, the keyboard interrupt (which is generated when any keys are
  44. depressed on a selected row) is not supported. There may also be problems
  45. which result from the differing layouts of the Model B and Archimedes
  46. keyboards, especially programs which attempt to do their own SHIFT key
  47. processing (some legends are paired differently on the two keyboards).
  48.  
  49. The FX 247 mechanism, which allows a 6502 application to intercept reset (ie
  50. the Break key), now works correctly.
  51.  
  52. Hardware scrolling in MODE 7, followed by a CLS, now works correctly.
  53.  
  54. Only limited 6845 programming is permitted:-
  55.  Registers 0..8         not supported
  56.  Register  9            limited support (for implementing modes 0/3, 4/6)
  57.  Registers 10,11        supported
  58.  Registers 12,13        limited to vertical scrolling of the screen
  59.  Registers 14,15        cursor positioning only to resolution of 1 character
  60.  
  61. There is no emulation of the disc controller. As a consequence,
  62. copy-protected programs or those which attempt direct access to DFS
  63. directory sectors are unlikely to operate correctly.
  64.  
  65. However, OSWORD &72 (read/write sectors off ADFS) is implemented. The call
  66. gets translated into a call to ADFS_DiscOp. This allows some software
  67. written for the Electron Plus 3 or the Master Compact to work, although
  68. there may be machine differences which cause other problems.
  69. Current limitations: if a disc error occurs, an error is generated, rather
  70. than the error type being returned at offset 0 in the block. OSWORD &73
  71. (Read last error information) is not supported.
  72.  
  73. The OSARGS call with A=1,Y=0 (Return address of rest of command line) now
  74. functions correctly (both on ARFS and on the emulated DFS (see below)).
  75.  
  76. The *-commands described in the User Guide (*ListROMs, *SwapROMs, *CacheROM,
  77. *LinkROM, *EmulateBBC) are RISC OS *-commands provided by the emulator
  78. module. *Quit, on the other hand, is provided within the emulated BBC
  79. Microcomputer.
  80.  
  81. In addition the following *-commands are provided within the emulation:
  82.  
  83. *Reset [<number>]
  84. Performs a 6502 reset, like CALL !-4.
  85. If number=1, a power-on reset is performed.
  86.  
  87. *Go [<address>]
  88. Branch the emulated 6502 to the specified address.
  89.  
  90. *OS
  91. Provide a *-prompt loop within the 6502 emulator.
  92.  
  93. The paged ROM image 'UtilsROM' provides various extra commands:
  94.  
  95. *Build, *Dump, *List, *Type perform the same functions as the commands of
  96. the same name provided in the Model B DNFS ROM.
  97.  
  98. *ROMs lists the loaded paged ROM images.
  99.  
  100. It also provides a number of commands for controlling sideways RAM (type
  101. *Help SRAM inside the emulator for a list of them). These commands operate
  102. in the same way as on the Master. However, by default, the emulator starts
  103. up with no sideways RAM allocated (the original Model B had no sideways
  104. RAM).
  105.  
  106. This setup can be changed to that of the Master (four banks of sideways
  107. RAM in sockets 4,5,6 and 7) by editing the !Run file inside the !65Host
  108. application directory (see that file for instructions). Note that this
  109. uses an extra 64K of module workspace (16K for each bank).
  110.  
  111. Note also that software written for the Master which makes use of sideways
  112. RAM may also make use of other facilities which are available on the Master,
  113. but not on the Model B, eg shadow RAM.
  114.  
  115. In the emulator the Break key emulates the Break key on the emulated
  116. computer, but the reset button resets Archimedes.
  117.  
  118. A limited emulation of the disc filing system (DFS) is provided, in order to
  119. allow software to run which assumes DFS file naming conventions (ie
  120. non-hierarchical, single character qualifiers).
  121.  
  122. Note that this does NOT allow the direct use of 5.25" DFS format floppies,
  123. even with an appropriate disc drive and interface.
  124.  
  125. Instead it uses the current RISC OS filing system with a translation applied
  126. to the filenames, as follows:-
  127.  
  128. A DFS name consists of:
  129.  
  130.   drive - one of '0', '1', '2', '3'
  131.   qualifier - a single character, default '$'
  132.   name - 7 characters long.
  133.  
  134. This is passed to RISC OS as:
  135.  
  136.   drive, dot, qualifier, name
  137.  
  138. eg a DFS name of ':2.A.Fred' would be translated to '2.AFred'.
  139.  
  140. However, certain qualifiers which are allowed on DFS (eg the default '$'),
  141. are reserved characters in RISC OS filenames, so these are substituted by
  142. other characters, as follows:-
  143.  
  144.         '$' is translated into '['
  145.         ' ' ---------""------- '`'
  146.         '@' ---------""------- '<'
  147.         '|' ---------""------- '>'
  148.         '"' ---------""------- ']'
  149.         '%' ---------""------- '}'
  150.         '&' ---------""------- '{'
  151.         '^' ---------""------- ')'
  152.  
  153. eg a DFS name of ':1.$.Jim' would be translated to '1.[Jim'.
  154.  
  155. Typically this would be used by setting up an ADFS disc containing
  156. directories named 0, 1, 2 and 3 and ensuring that their parent is the current
  157. directory when 65Host is started. These are then used as drives by the DFS
  158. emulation. Within each of these directories, a name such as 'CSheila'
  159. represents the DFS file 'C.Sheila'.
  160.  
  161. All of this is to allow accurate emulation of such DFS commands as *Drive,
  162. *Dir and *Lib. Using the ADFS or Net filing systems directly is often
  163. simpler.
  164.  
  165. *ADFS and *Net can be used to make the named RISC OS filing systems current.
  166. Alternatively, *ARFS gives access to the current RISC OS filing system.
  167. *Disc selects the DFS emulation, using the current RISC OS filing system.
  168.  
  169. *Tape is provided (in case an application issues this command), but cannot
  170. load or save files.
  171.  
  172.  Information for software developers
  173.  -----------------------------------
  174.  
  175. An interface has been added to allow 6502 paged ROM images to be developed
  176. which make access to RISC OS SWIs. The SWI is called by executing a
  177. previously undefined 6502 opcode.
  178.  
  179.  6502 Opcode &07 - Issue SWI call
  180.  --------------------------------
  181.  
  182. in:     XY (X lo-byte, Y hi-byte) points to control block (cb)
  183.  
  184. cb?0..2 = SWI number (lo..hi) (bit 17 set => return errors with V set)
  185.  
  186. cb?3    = number of registers to put back into block on exit, starting at R0
  187.  
  188. cb?4    = bit set of registers to relocate on entry to SWI
  189.           (bit n set => relocate Rn from 6502 to ARM address space)
  190.  
  191. cb?5    = bit set of registers to unrelocate on exit from SWI
  192.           (bit n set => unrelocate Rn from ARM to 6502 address space)
  193.  
  194. cb?6,7  = address (lo,hi) of error buffer (in 6502 space)
  195.           only relevant if bit 17 of SWI number set
  196.  
  197. cb?8    = length of error buffer (can be zero)
  198.  
  199. cb!9    = register R0
  200.  
  201. cb!13   = register R1
  202.  
  203. ..
  204.  
  205. cb!37   = register R7
  206.  
  207. out:    A,X,Y preserved
  208.         N,Z,C,V as returned by the ARM on exit from the SWI
  209.         Some or all of the register block is updated with the
  210.         values on exit (possibly relocated), as controlled by cb?3,4,5
  211.  
  212.         If bit 17 of the SWI number was clear, and an error occurs, then
  213.         control will not returned to the 6502 code - instead the error
  214.         block is copied to &100 in 6502 format (ie zero byte, 1 byte error
  215.         number, followed by zero terminated error string) and then it jumps
  216.         to &100, which causes a BRK. If no error occurred, control will be
  217.         returned and V will be clear.
  218.  
  219.         If bit 17 of the SWI number was set, then the X form of the SWI
  220.         is issued; if this returns with V set, then the error block is
  221.         copied into the specified error buffer in 6502 format, truncated
  222.         to the length of the error buffer (if truncated the terminating
  223.         zero will be in the last byte of the error buffer).
  224.  
  225. Support has also been added for selecting a filing system and running a
  226. file, when the emulator is started.
  227.  
  228. On any reset, system variable 65Host$BootOptions is read.
  229.  
  230. Bits 2..7, 16..31 are reserved and should be set to 0.
  231.  
  232. Bits 8..15 contain the number of the filing system to be started up.
  233.  
  234.  0  => default ie ADFS
  235.  1  => TAPE (of little use!)
  236.  4  => DFS emulation
  237.  5  => NET
  238.  8  => ADFS
  239.  11 => ARFS (ie the current RISC OS filing system)
  240.  
  241. Bits 0..1 are the boot option (the equivalent of the *OPT 4 setting)
  242.  
  243.  0 => do nothing, 1 => *Load, 2 => *Run, 3 => *Exec
  244.  
  245. On a power-on reset this boot option is used in conjunction with the
  246. filename specified by the system variable 65Host$BootFile to 'run' a
  247. program.
  248.  
  249. eg the following sequence enters the emulator, selects the ADFS filing
  250. system and *Runs a file called Game :-
  251.  
  252.         *Set 65Host$BootOptions &802
  253.         *Set 65Host$BootFile Game
  254.         *EmulateBBC
  255.  
  256. The !Run file sets up these variables from the rest of the command line
  257. passed to it. The syntax is
  258.  
  259.         *Run !65Host <BootOptions> <BootFile>
  260.  
  261. eg to load the emulator and perform the above operation, you might do :-
  262.  
  263.         *Run !65Host &802 Game
  264.