ARCHIMEDES ROM PODULE ===================== © Copyright Acorn Computers Limited 1987 Neither the whole nor any part of the information contained in, or the product described in, this guide may be adapted or reproduced in any material form except with the prior written approval of Acorn Computers Limited (Acorn Computers) other than for the sole use of the owner of the product and this guide. The product described in this guide and products for use with it are subject to continuous development and improvement. All information of a technical nature and particulars of the product and its use (including the information and particulars in this guide) are given by Acorn Computers Limited in good faith. However, it is acknowledged that there may be errors or omissions in this guide or in the products it describes. Acorn Computers welcomes comments and suggestions relating to the product and this guide. All correspondence should be addressed to: Customer Support and Services, Acorn Computers Limited, Cambridge Technopark, 645 Newmarket Road, Cambridge CB5 8PB. All maintenance and service on the product must be carried out by Acorn Computers authorised dealers. Acorn Computers can accept no liability whatsoever for any loss or damage caused by service, maintenance or repair by unauthorised personnel. This guide is intended only to assist the reader in the use of this product, and therefore Acorn Computers shall not be liable for any loss or damage whatsoever arising from the use of any information or particulars in, or any error or omission in this guide, or any incorrect use of the product. Within this publication the term 'BBC' is used as an abbreviation for 'British Broadcasting Corporation'. Archimedes is a trademark of Acorn Computers Limited. Acorn is a trademark of Acorn Computers Limited. First published 1987 Issue 1 1987 Published by Acorn Computers Limited Part number 0476,220 CONTENTS ======== INTRODUCTION INSTALLING EPROMS AND ROMS The ROM sockets Setting the links Installing the Podule CONFIGURING THE SYSTEM VERIFICATION USE WITH THE 6502 EMULATOR THE FILING SYSTEM File organisation Entering the ROM filing system (ROMFS) ROM filing system commands Low level calls MAKING YOUR OWN ROMS File header formats ROM maker program STATIC RAM UPGRADE Fitting RAM Battery backup ACCESSING RAM Loading a ROM image into RAM Reading from RAM APPENDIX A - Circuit diagram INTRODUCTION ============ The ROM Podule provides a ROM filing system for use on the Archimedes. It contains five vacant sockets into which 16kbyte, 32kbyte, 64kbyte ROMs/EPROMs or 128kbyte JEDEC EPROMs may be plugged. Each EPROM/ROM can contain several files of varying size. The ROM Manager, which is fitted on the board, provides a series of both high- and low-level commands for accessing the data in these files. In conjunction with the 6502 Emulator, the ROM Podule allows certain ROM based programs which are available for the BBC Microcomputer Models B and B+ and the BBC Master Series Microcomputers to be used. For a ROM to be able to be read in this way it must be unprotected and contain only 'legal' 6502 machine code. Two additional sockets are provided for static RAM. Optional components may be added to provide battery backup to these RAM sockets. This upgrade is described in detail in this guide. It allows the data in the RAM to be retained when the power is switched off in a similar manner to the battery backed CMOS RAM in the Archimedes microcomputer. Instructions for fitting the ROM Podule are given in a separate Podule Installation Leaflet provided as part of this package. In order to install a Podule into the Archimedes, it is necessary to have a backplane fitted. The backplane is available separately and full instructions for installation are supplied with it. If you do not feel confident about fitting the Podule or backplane, then take your Archimedes and the upgrade to your dealer who will fit it for you. INSTALLING EPROMS AND ROMS ========================== THE ROM SOCKETS --------------- The ROM Podule contains six sockets for EPROMs/ROMs, IC1, IC2, IC3, IC4, IC5 and IC6. IC1 contains the ROM Manager program which must always be present. IC2 - IC6 are free for your use. Each of the sockets can hold an EPROM or ROM of any of the following sizes: Device Size Number of pins EPROM/ROM 128kbit (16kbyte) 28 EPROM/ROM 256kbit (32kbyte) 28 EPROM/ROM 512kbit (64kbyte) 28 JEDEC EPROM 1024kbit (128kbyte) 32 WARNING: Most electronic devices can be damaged by static electricity. Keep the EPROM/ROM in anti-static foam until fitted and avoid touching the pins of the EPROM/ROM during fitting. An EPROM/ROM should be inserted as follows: 1. Remove the Podule and place it on a flat surface. 2. Check that all the pins on the EPROM/ROM are straight. 3. Hold the EPROM/ROM so that its notch points towards the notch in the socket. 4. If the EPROM/ROM contains only 28 pins, line up these pins so that they coincide with the pin positions in the socket as far away from the notch as possible. 5. Carefully insert the EPROM/ROM in the socket. The EPROM containing the ROM Manager program can be used as a guideline as to how EPROMs/ROMs should be fitted. SETTING THE LINKS ----------------- Each socket has two links associated with it, LK1 and LK2. Each link consists of three pins and a plug which can be moved so that it links the middle pin with either of the outer pins, pin A or pin C. These plugs must be placed correctly for the size of the EPROM/ROM in the socket. The choice of which outer pin to connect to depends on the device size as follows: Device Size LK1 LK2 128kbit (16kbyte) A C 256kbit (32kbyte) C C 512kbit (64kbyte) C A 1024kbit(128kbyte) C A INSTALLING THE PODULE --------------------- Instructions on how to install the ROM Podule into your Archimedes are contained in a separate Podule Installation Leaflet supplied with this package. CONFIGURING THE SYSTEM ====================== When you have fitted your ROM Podule and turned the power back on, the next step is to configure the system so that it knows the size and type of each EPROM/ROM on the ROM Podule. To do this, exit the Desktop if you are in it and use the following command: *CONFIGURE ROMBOARD

[l where

is the Podule socket (0 - 3) is the ROM socket number (1 - 6) and is the device type (none, if not present) To find the number of the Podule socket either look at the number printed on the backplane or use the *PODULES command. The other two sockets on the board, 7 and 8, are for RAM only. See the chapter entitled Static RAM Upgrade for details on how to configure these. The device type may take the following values: EPROM/ROM type 128kbit (16kbyte) 10_128 256kbit (32kbyte) 10_256 512kbit (64kbyte) 10_512 1024kbit(128kbyte) 10_1024 The '10_' is used to denote an EPROM/ROM as opposed to RAM and is optional. Each ROM socket is assumed to be empty. Hence, this command must be issued for every EPROM/ROM on the Podule, including the ROM Manager EPROM. This is a 128kbit EPROM which is fitted in ROM socket one, so if the ROM Podule is fitted in Podule socket zero, type: *CONFIGURE ROMBOARD 0 1 10_128 to configure this ROM. Failure to do so will result in the commands provided by the ROM filing system not being available. Repeat this procedure for each EPROM/ROM in turn and then press Ctrl-Break to make the new configuration take effect. The ROM Podule configuration is stored in the battery-backed CMOS RAM in the Archimedes so it is only necessary to reconfigure it if: * the ROM Podule is moved to a different Podule slot * an extra device is added to the board * an existing device is replaced by one of a different size * an existing device is removed completely * the configuration settings are lost, eg if the batteries are removed or an R-power on is performed. VERIFICATION ============ To check that the board has been fitted correctly type: *PODULES A list of the Podule slots, zero to three, is displayed, together with the name of any Podule held in each slot. The ROM Podule should be declared as being present in one of these slots. For example, if you only have the ROM Podule fitted and you have placed it correctly in slot zero, the following is displayed: Podule 0 : ROM podule Podule 1 : No installed podule Podule 2 : No installed podule Podule 3 : No installed podule To check which files you have on the EPROMs/ROMs plugged into the ROM Podule, type: *ROM to select the ROM filing system (ROMFS). Then type: *CAT to obtain a list of the names of the ROM files in order. For example, if you have fitted VIEW 2.1 only, the following is displayed: ROMIT VIEW To check the configuration being held in CMOS RAM for each of the sockets type: *STATUS ROMBOARD The following type of display should be obtained: Podule 0 Device 1 = 64K byte EPROM Device 2 = 16K byte EPROM Device 3 = Empty socket Device 4 = Empty socket Device 5 = Empty socket Device 6 = Empty socket Device 7 = Empty socket Device 8 = Empty socket USE WITH THE 6502 EMULATOR ========================== Some of the ROM-based software available for the 6502-based BBC Microcomputers can be run using the ROM Podule and the 6502 Emulator. To run a particular program, for example VIEW 2.1, follow the steps given below: 1 Install the ROM Podule and the VIEW ROM as described in the chapter Installing EPROMS and ROMS. 2 Configure the system to recognise the ROM Manager and the VIEW ROM as described in the chapter Configuring the System. 3 Place the Welcome Disc in drive 0 and type: *ADFS to select the Advanced Disc Filing System. 4 Type: *:0.$.MODULES.65Arthur This loads and enters the 6502 Emulator running BASIC IV, producing a screen display similar to the following: 6502 Emulator 0.82 (01 Jun 1987) Acorn 6502 TOS 0.40 (11 Jun 1987) BASIC 5 Type: *ROM *GO F800 This enters the ROM filing system and then enters the Emulator Command Line Interpreter (CLI). The CLI prompt is displayed as follows: 65* 6 Type: LOAD VIEW 8000 GO 8000 This loads the VIEW code from the ROM into memory at address &8000 and then executes the code starting at this address. The usual VIEW message is given, for example: VIEW A2.1 No text Editing No File Screen Mode 0 Printer default You can now use the VIEW word processor in the normal way. THE FILING SYSTEM ================= FILE ORGANISATION ----------------- Filenames The ROM filing system (ROMFS) supports filenames containing up to 64 characters. However, many commands within the rest of the operating system restrict the length to ten. A typical filename is, for example: ProgI Directories ROMFS does not have a true hierarchical directory structure but the effect can be simulated through the use of filenames containing the fullstop character. Thus, a filename can consist of a number of filename components separated by fullstops, provided that the total length is less than 64 characters. For example: graphics.circles refers to a file called 'circles' in the directory 'graphics'. In cases such as this, each component of the filename should be restricted to ten characters. Nested directories can be created and a filename such as 'BASIC.graphics.circles' could be used. In commands which take a directory name as an argument, the following characters have a special meaning: Character Meaning $ top level & top level @ all levels ENTERING THE ROM FILING SYSTEM (ROMFS) -------------------------------------- *ROM ---- Syntax: *ROM This command selects ROMFS as the current filing system. ROM FILING SYSTEM COMMANDS -------------------------- The following commands are recognised by all filing systems. However, some of these commands attempt to write to files or perform operations on the current or library directory. Since ROMFS is a read-only system and does not have a true directory structure, use of these commands under ROMFS is inappropriate and either produces an error message or has no effect. In addition, ROMFS does not generally support wildcarding in filenames. Unless it is specifically stated that wildcard characters may be used, the '*' and '#' characters will not be interpreted as wildcards. Under ROMFS only one file may be open at a time. All commands are listed for completeness. Where their use is not supported the effect of issuing them is stated. Otherwise, a full description of their syntax and the effect of the command under ROMFS is described. *ACCESS ------- This command is accepted but ignored. All files under ROMFS have access attributes LR (locked and readable) and directories have attributes DL (directory and locked). *APPEND ------- This command tries to write to ROMFS and therefore gives an error. *BUILD ------ This command tries to write to ROMFS and therefore gives an error. *CAT ---- Syntax: *CAT [] *CAT displays a list of all objects in a directory. If no directory is specified all objects are listed. *CDIR ----- This command tries to write to ROMFS and therefore gives an error. *COUNT ------ Syntax: *COUNT [] *COUNT adds up the sizes of all the files which match the wildcarded specification given, provided that the file name contains no more than ten characters. The options available are: Option Default Description C(onfirm) off prompt for confirmation of each count R(ecurse) on count subdirectories and contents V(erbose) off print information on each file counted To reverse the effect type '~' before the option. *CLOSE ------ Syntax: *CLOSE *CLOSE closes all files opened by ROMFS. *COPY ----- Syntax: *COPY [] *COPY copies files matching the specification of the first (source) parameter, to the place specified by the second (destination) parameter. Options may be given as follows: Option Default Description C(onfirm) on prompt for confirmation of each copy D(elete) off delete the source after copy F(orce) off force overwriting of existing objects Q(uick) off use application workspace to speed transfer V(erbose) on print information on each file copied To reverse the effect type '~' before the option. For example: *COPY ROM:COMAL ADFS::O.$.COMAL ~C *CREATE ------- This command tries to write to ROMFS and therefore gives an error. *DELETE ------- This command tries to write to ROMFS and therefore gives an error. *DIR ---- ROMFS does not have a true directory structure therefore this command gives an error. *DUMP ----- Syntax: *DUMP [ []] *DUMP displays a hexadecimal and ASCII dump of the named file in the following format: address hexadecimal bytes ASCII characters '.' is used to represent any non-printable characters. The number of bytes displayed per line depends on the current window size; for example, in an 80 column window, 16 bytes per line are displayed, in a 132 column window, 24 bytes per line are displayed. The file offset specifies the point in the file at which the dump is to start; this defaults to zero. The start address is used to determine the address printed on each line of the display, and is the address which would be displayed if the file offset were zero. If this is not present, then it defaults to the load address of the file, unless the file is date/time stamped, in which case it is taken to be zero. *ENUMDIR -------- Syntax: *ENUMDIR [] *ENUMDIR creates a new file and places in it a list of filenames. The name of the new file is given in . Any file in the directory given is only added to the list if it matches the wildcard pattern. '*' may be used to denote any number of any characters and '#' any single character. The default pattern is *. Entries are separated by ASCII 10 (line feed) in the output file. For example: *ENUMDIR BASIC ADFS::4.$.Graphic DRAW* or *ENUMDIR $ ADFS::4.$.ROMCat *EX --- Syntax: *EX [] *EX displays file catalogue information for all objects in the directory given. If no directory is specified all objects are listed. The information supplied is as follows: load address exec address length S.I.N. attributes filename All values are given in hexadecimal notation. S.I.N. is the 'System Internal Name' and is made up of the Podule number in the top byte and the start address of the file in the lower three bytes. For example: FFFFFB40 899EC4A9 000590 00000000 LR ROMIT FFFBBC0B BCBBCBBC 004000 00002000 LR VIEW Note that for 6502 ROMs the load and execution addresses are presented as shown in the example above. The file type component is thus &BBC and this is recognised by the 6502 Emulator. *EXEC ----- Syntax: *EXEC [] *EXEC uses data from a named file, byte by byte, as though it were being typed from the keyboard. Data from this source is taken in preference to that from the current input stream, until the file is exhausted, when it is closed. If no parameter is given to *EXEC then the current exec file is closed. If another EXEC command is issued with a filename parameter, then the current exec file is closed and the exec action continues with data from the newly opened file. *INFO ----- Syntax: *INFO *INFO displays the same filing system information as *EX but for a single file. *LCAT ----- ROMFS does not support libraries, therefore this command gives an error. *LEX ---- ROMFS does not support libraries, therefore this command gives an error. *LIB ---- ROMFS does not support libraries, therefore this command gives an error. *LIST ----- Syntax: *LIST *LIST displays the content of the named file in GSREAD format, in which: · ASCII codes 32 to 126 (except solidus) are sent directly to the screen as the corresponding character in the current mode. · all ASCII codes other than newline or carriage return are displayed as control code expansions, controlled by the current DumpFormat. · Each line (ie sequence of ASCII codes terminated by a carriage return, line feed or pairs of the above) is preceded by a line number, starting from one. *LOAD ----- Syntax: *LOAD [] *LOAD loads the specified file into memory. The address it is loaded at can be specified as a hexadecimal (or other given base) value after the filename. Otherwise, the load address supplied by the filing system will be used. *OPT ---- Syntax: *OPT

20 256 where and

is the Podule socket(0-3) as before is the RAM socket (7 or 8) 20 256 indicates that the device is 32kbytes (256kbits) of static RAM Suggestions for the RAM which may be used are as follows: · Hitachi HM62256P-12 · Toshiba TC55257P-12 BATTERY BACKUP It is possible to add battery backup so that the data in the RAM is retained when the power is switched off. The extra parts required for this upgrade are listed below. Your dealer should be able to assist you in obtaining these items. Component Example Battery, 3.6V 100mAhr NiCd rechargeable VARTA DB 826/3 Silicon diode, 1N4005 IA, 600V (min. working) Schottky diode, 100mA, 30V (max. working) Mullard BAT85 Resistor, 220 ohms 5% 0.25W Resistor, 39 ohms 5% 0.25W To fit the battery backup it is necessary to cut a PCB link and to solder two resistors, two diodes and a battery to the Podule board. If you are not confident of doing this yourself then please ask your dealer to do it for you. Note that these additional components are not covered by your original ROM Podule guarantee. The tools required are a small (15W) soldering iron, a pair of side-cutting pliers and a sharp knife. Note: when you are soldering electronic components, the heat must be applied to the joint for as little time as possible. Heat conducts quickly along the copper connecting wires and PCB tracks and can damage the devices. The steps required to fit the battery backup are given below. Please read them through carefully before commencing. 1 Remove the ROM Podule from the Archimedes and remove any ROMs fitted in it. 2 Locate the PCB link position LK3. This link is permanently connected both to VCC and VBB. Using the sharp knife, cut the track between the central hole and the hole labelled VCC. Note that the link connecting the central hole to VBB must be left intact. 3 Take the 220 ohm resistor, colour code red red brown. Bend its leads and insert it into the board in the space labelled R4 (nearest the connector). Solder it into the board and then trim the leads to length using the side-cutters. 4 Take the 39 ohm resistor, colour code orange white black and repeat step 3 in the space labelled R5. 5 Take the IN4005 diode and locate it in the space on the board labelled D1. Diodes must be fitted the correct way round. The line on the end of the diode case must be at the same end as the cross-line on the PCB, that is, pointing towards the battery side of the board. Solder the diode to the board and trim the leads to length. 6 Take the Schottky diode and locate it in the space on the board labelled D2. The line on the end of the diode case must be at the same end as the cross-line on the PCB, pointing towards the space for the battery. Solder it in place and trim the leads. 7 Locate the three pins of the battery in the holes on the PCB in the box labelled CUT LK3 BEFORE FITTING BATTERY and solder it in place. Before plugging the Podule back into your Archimedes and switching on, check your work carefully. Incorrect installation of this battery upgrade can cause damage to the Podule or the Archimedes. Such damage is outside the scope of your guarantee and any subsequent repairs would only be carried out at your expense. ACCESSING RAM ============= LOADING A ROM IMAGE INTO RAM ---------------------------- *ROMLOAD -------- Syntax: *ROMLOAD [] This command loads the file into RAM. The Podule socket is given in . The file is loaded at bytes from lowest address in the RAM; this defaults to zero. If the file is loaded into RAM socket 7 and is larger than the memory available in this socket, then, if possible, it overflows into the RAM in socket 8. READING FROM RAM ---------------- When an image has been loaded into RAM, it appears as a ROM in the ROMFS and can be treated in the normal way. APPENDIX A - CIRCUIT DIAGRAM ============================