.........*.......*.......*.......*.......*.......*.......*.......*.......*.< €LM26 €PL70 €DH//The Master ROM// €DF//Page |P// €TM4 €HM2 €BM4 €FM2 €EM €CEby John Robinson The Master ROM is a very powerful piece of software for the BBC Model B. It was originally designed as the system software for the ESP 002 ROM/RAM board, but can be used with any ROM board (or even without a ROM board) if you have at least one sideways RAM slot. It *MUST* be loaded into sideways RAM, and will disappear if it isn't in sideways RAM. Thanks to Graham Toal of Edinburgh Software Products and Acorn Computers for all the help and assistance he gave me writing it. 1. GETTING GOING Load The Master ROM using your normal ROM loader, and press . The ROM should now be in the machine. This will be obvious from the new header message, which will be "BBC Supercomputer" and the actual total of RAM in your machine. It counts main RAM (16/32K), each full (16K) sideways RAM, 32K shadow RAM, and 64K second processor. If you have 256K or more, you won't get a memory total message. I don't foresee this happening! 2. THE COMMANDS *APPEND Append lines to file This command is similar to *BUILD but stores the typed data at the end of the file, instead of creating a new file. *BLANKING (ON/OFF) Monitor saver When enabled, this function will disable VDU output if you do not touch the keyboard for 2 minutes. This will save your monitor's CRT from having images permanently engraved upon it if you leave your computer and monitor on for a long time. If this happens to your monitor, you will not be able to use it because you won't be able to read what it says for the image. *CLOSE Close all open files Exactly the same as CLOSE#0 from BASIC, Master Series computers' *CLOSE, or the Watford DFSs' *TIDY. Useful with badly written languages which don't close files, or with programs with bugs in them, etc. *CONFIGURE Set machine configuration This is a large family of commands, some of them also found in Master Series computers. They determine how the computer is set up after or power-up (if you have battery-backed RAM). See section 3. *CREATE Create an empty file This command makes a blank file on the disc. It is provided in a Master by way of an OSFILE call (not provided by this ROM), and is implemented by opening a file for output, setting the pointer to the length, and closing the file. *DUMP () Dump contents of file in hex and ASCII Similar to the standard *DUMP, but allows an initial offset into the file, uses OSGBPB (should be significantly faster with NFS) and shows it in pretty colours (mode 7 only). Takes workspace from &AC0 to &AFF. *INSERT Restores an unplugged ROM After *UNPLUG, this command will make a ROM available again. *KILL () Wipes sideways RAM This command makes sideways RAM free for loading other ROM images on top. It is not bothered about the slot not containing a valid ROM image. If no parameter is given, it will kill all the unprotected (see *PROTECT) S/W RAM slots except The Master ROM, your current language and your current filing system. When using ADFS this command runs very slowly because it shuts down your current filing system, then starts it up again. This is so that ROMs may remove vectors before being killed. *MDUMP ( ( ())) Memory dump in hex and ASCII Similar to *DUMP, but dumps the contents of the memory instead. The normal rules apply about the FFFF prefix for the I/O processor, but this need not be included if you give a ROM number. *PREFIX ( ON/OFF) Prefix command with *JR: If you want other low-priority ROMs to pick up Master ROM commands, use the prefixing facility. After a *PREFIX command, the command will only be accepted by The Master ROM if it is prefixed with "*JR:" eg after *PREFIX DUMP ON the *DUMP command will be picked up by your DFS (every time). Commands may be prefixed with *JR: even if you have not specified that they must be, eg if your DFS is above The Master ROM, *JR:DUMP will get The Master ROM's *DUMP command. *PREFIX on its own lists the commands that must be prefixed. *PRINTBUFFER Initialise printer buffer This command sets up a printer buffer in the sideways RAM slot you give, and starts it immediately. The printer buffer then becomes self-sufficient code that does not need The Master ROM to run it. It is initialised automatically every time you press BREAK. A total of a 15.5K buffer becomes available. *PROTECT ( ON/OFF) Protect S/W RAM from general *KILL and selection by *SRLOAD Once *PROTECTed, a sideways RAM will not be killed by *KILL or used by *SRLOAD unless explicitly specified. *PROTECT on its own lists the RAM slots that are protected. *RESET (0/1) Perform BREAK/power-up Like pressing BREAK or turning the computer off and on again. *RESET 0 or just *RESET powers up the computer, *RESET 1 is equivalent to pressing BREAK. This command is not Tube compatible and tells you so. *ROMINFO () Gives information about a ROM This command give extremely detailed information about the specified ROM or returns The Master ROM's current status if no parameter is given. If the slot contains a valid ROM, it will tell you: whether it is RAM or ROM the address of the service entry (if any) the address of the language entry (if any) whether it is the BASIC ROM the second processor language relocation address (if any) its title its version string (if any) its copyright string its status (enabled/disabled) the address of its private workspace whether it is the current language or not the names and addresses of any vectors into it the filing system number if it is the current filing system *ROMS List installed ROMs Eg: >*ROMS F: s The Master ROM E: Clear RAM D: S &97 DFS,NET C: Empty B* R BASIC A: Empty 9: L PASCAL 8: L PASCAL 7: S &1E ADFS 6: Empty 5: L COMAL 4: Empty 3: L WORDWISE-PLUS 2: Empty 1: l micro PROLOG 0: s TOOLKIT PLUS This means that The Master ROM is in slot F in sideways RAM Slot E is sideways RAM and is unused Slot D is the DNFS, its workspace starts at &1700 and the NFS is disabled Slot C is empty (on an ESP board, you have a 16K chip in slot C-D) Slot B is the current language, BASIC Slot A is empty (on an ESP board, you have a 16K chip in slot A-B) Slot 9 is one half of Pascal Slot 8 is the other half of Pascal (on an ESP board they are in a 32K chip) Slot 7 is the ADFS, its workspace starts at &1E00 Slot 6 is empty (on an ESP board, you have a 16K chip in slot 6-7) Slot 5 is COMAL Slot 4 is empty (on an ESP board, you have a 16K chip in slot 4-5) Slot 3 is WordWise Plus Slot 2 is empty (on an ESP board, you have a 16K chip in slot 2-3) Slot 1 is micro Prolog in sideways RAM Slot 0 is ToolKit Plus in sideways RAM *SEARCH ( ( ())) Search memory for string Searches I/O processor, second processor or sideways ROM for the given string, eg *SEARCH "The Master ROM" 8000 +4000 f would search the whole of ROM slot F for "The Master ROM". *SHOW () Function key lister Shows how the function key(s) (soft keys) has (have) been defined. Checks for *FX4 options and only lists keys 11-15 after a *FX4,2 if you don't give a parameter. *SPOOLON () Spool output to file Similar to *SPOOL but appends data to file (see *APPEND). Without a parameter it closes the current spool file (like *SPOOL) *SRLOAD () () (Q (I)) Sideways RAM loader Similar to the command found in Master Series computers, however: There is no slow version (the Q is ignored if given), instead main RAM and the sideways RAM are swapped, the stuff is loaded and they are swapped back, so the main RAM is never left corrupted and the load is always quick. However, interrupt routines will crash if they are between &3C00 and &7C00. Also, there is a form of the command *SRLOAD (). This loads to &8000, quick, with initialise. If no ROM number is given, one is chosen. Sideways RAM that already has a valid ROM in it may be specified explicitly without a *KILL beforehand. Examples: *SRLOAD r.extras would load "r.extras" into your lowest free RAM slot and attempt to initialise it. *SRLOAD data 8010 w q would load "data" into your lowest RAM slot at &8010. *SRSAVE (Q) Sideways RAM saver Similar to the command found in Master Series computers. As with *SRLOAD, the address must be in the range &8000-&C000 as the Master Series computers' pseudo addressing is not implemented. The end address should be less than &C000 or you will find that you have saved parts of the OS ROM as well. This command does not swap main RAM and sideways RAM but it does use the highest area of memory that it can, as well as having a slow version, eg (see example for *ROMS) *SRSAVE r.toolkt+ 8000 +2000 0 q would save the ToolKit Plus ROM image on disc quickly, using main RAM from &5C00 to &7C00. *STATUS See configured status Shows exactly the same as *HELP CONFIGURE but without the heading and *CONFIGURE on its own. Does not take parameters (as the Master Series computers' equivalent commands do). *TIME (<:(:)>/OFF) Real-time clock This command starts a real-time clock running on events. There are 3 syntaxes for this command: *TIME shows time if clock is running *TIME OFF stops clock *TIME hh:mm(:ss) sets time and starts clock The clock continues to run over and and can be configured to run at power-up (if you have battery-backed sideways RAM) or after *RESET. However, it loses up to 1 second each time you press and obviously will not run while the machine is off. Also provided is the OSWORD call found in Master Series computers to read the clock (OSWORD with A=&E). If a ROM above The Master ROM responds to this call, the time given by it will be shown by *TIME. However, it is likely that any ROM responding to the OSWORD call will also respond to *TIME. *UNPLUG Disable a sideways ROM This command makes a sideways ROM unavailable to be used until it is *INSERTed. It will not respond to any calls after the command has been executed, except for Tube Main Init (see notes below). 3. *CONFIGURE commands This family of commands take the form *CONFIGURE but just *CONFIGURE on its own shows exactly the same as *STATUS. The settings are issued at or power-up, and some at soft breaks as well. Added commands are marked with a + MODE Sets start-up mode TV Sets start-up *TV parameters LOUD Makes BELL sound (/VDU 7) loud (as normal) QUIET Makes BELL sound quieter SOUND ON/OFF Turns sound on or off altogether (*FX210) + BAUD Sets the baud rate for RS423 I/O (*FX7,*FX8) DELAY Sets the keyboard auto-repeat delay (*FX11) REPEAT Sets the keyboard auto-repeat rate (*FX12) PRINT Sets the default printer number (*FX5) IGNORE () Sets the printer ignore character (*FX6) or none CAPS Makes CAPS LOCK come on NOCAPS Turns CAPS LOCK off SHCAPS Same as DATA <0-7> Specifies the data format used by the RS423 (see P388 AUG) SCROLL Leaves scrolling state as normal (VDU 15) NOSCROLL Turns paging on (VDU 14) DFS Selects DFS by default from DNFS + NFS Selects NFS by default from DNFS + BOOT Sets auto-boot (see P246 AUG) NOBOOT Disables auto-boot DIR Load directory at startup (ADFS) NODIR Don't load dir at startup (ADFS) FLOPPY Use floppy disc even if hard disc is available (ADFS) HARD Use hard disc if available (ADFS) LANG Selects language ROM number FILE Selects filing system ROM number TUBE Enables tube if present INTUBE As TUBE EXTUBE As TUBE NOTUBE Disables tube if present FDRIVE Selects disc drive speed (ignores ADFS precompensation) BLANKING ON/OFF Enables/disables monitor saver (see *BLANKING) + CLOCK ON/OFF Enables/disables clock (see *TIME) + BEEP ON/OFF Enables/disables beep at (normally off) + AUG stands for Advanced User Guide 4. HELP Extensive help is supplied in the form of *HELP commands. All of the following will be accepted and output performed: *Help Master list commands *H.. list commands and configure options *HELP CONF. list configure options *HELP SP. display information on SPOOLON *h.roms romi. pre. display information on ROMS, ROMINFO and PREFIX *HeLp sRLoaD Srs. display information on SRLOAD and SRSAVE However, the information given in <> brackets may be confusing, as only very brief descriptions are given. This should be the filename of the file the command should access, eg *SRLOAD :*.li*.roms.view+h to load a file called "view+h" in directory ":*.li*.roms" (this particular example would only work on a network). <"ON"/"OFF"> Either ON or OFF, specifying whether you want the function to be turned on or off. Any abbreviation of OFF is accepted (even .) but no abbreviation of ON. Most commands default to ON, eg *BLANKING would turn the monitor saver on, and *BLA.. would turn it off. A hexadecimal number (see User Guide for information about hexadecimal). In some cases, it specifies the length of the file, or the offset into the file. This is the method of identifying ROM numbers. Hexadecimal numbers 0-F and 0-15 relate directly to the ROM sockets, but W-Z and J-N are extras: W-Z are also found in Master Series computers, standing for the first to the fourth RAM slot found starting at 0, and J-N for the fifth to the ninth bank (this only occurs very rarely but Watford Electronics produce a ROM board which could take 9 RAM slots). If you are writing software to run on both BBC Microcomputers with sideways RAM and Master Series computers, use W-Z only. This is a start address in hexadecimal, ie in the range 0-FFFF. As in *SAVE, if the first 4 digits of an 8-digit number are FFFF, the I/O processor is selected for use instead of a second processor. This is an end address in hexadecimal (also in the range 0-FFFF) or a + followed by a length in hexadecimal. If the first 4 digits of an 8-digit number are FFFF this is ignored, ie the processor must be specified by the start address. If a length is given it must be in the processor's address range, eg fc00 +600 would give the error Not that much memory because it would go from &FC00 to &10200 which is no good! One of The Master ROM's commands, eg ROMINFO or TIME. A decimal number in the range 0-255. Negative numbers are accepted when using *CONFIGURE commands, so the range becomes -255 to 255 although -255 is equivalent to 1. It specifies things like a function key number or an option for a command (eg *RESET). A string of characters, as you would give after *KEYn, eg *KEY0"Hello!|M" then *SEARCH"Hello!|M" FFFF0000 would yield Found at &0B11 <"Q"> When using *SRLOAD and *SRSAVE, this indicates that the computer's main RAM should be used as a buffer and the file done in one operation. Only *SRSAVE actually corrupts main RAM permanently, because *SRLOAD preserves the memory (if you are in mode 3 and you load a ROM image, you will notice this!). *SRLOAD ignores this if present. <"I"> When using *SRLOAD with a start address, this initialises a ROM image if the slot contains one after the load by placing it in the ROM table. If the ROM should take workspace, press BREAK instead. <:(:)/"OFF"> This is the complete syntax for *TIME. It means that either a time parameter of hours:minutes(and :seconds if required) or OFF should be specified. 5. ERRORS The errors that The Master ROM can give are listed with the error number, then the actual error message, then the circumstance in which it occurs and how to remedy it. 17 Escape This error is given by the dump commands *DUMP and *MDUMP when you press escape. 210 Please give a command after the "*JR:" If you have typed *J or *JR or *JR: with no command after it, this error will be given. Type a command after the *JR: bit, eg *JR:ROMS 211 Too many parameters If you have given too many parameters, eg *BLANKING OFF PLEASE this error will be given. Remove the last parameter and try again: *BLANKING OFF will work. 212 Configure what? If you have done a *CONFIGURE command but the parameter is unrecognised, eg *CONFIGURE HARD this error will be given. 213 Requires ON/OFF parameter Only given by *CONFIGURE commands, instead of Syntax errors. 214 File not found This error is given by *DUMP, *APPEND and *SPOOLON if the filename given cannot be found in the current directory/library. It is also given by *SRLOAD but it is given by the filing system in this case. 215 Screen saver not enabled You typed *BLANKING OFF without a *BLANKING ON beforehand. 216 The clock is not running Given by *TIME OFF if the clock was not on. 217 Bad time Given by *TIME if you do not give the time like this: *TIME 12:34 would set the time to 34 minutes past 12 (24-hour clock). The time must be given with each component separated by colons and no spaces, with the numbers in the correct ranges, ie hours 0-23, minutes 0-59 and seconds 0-59 (optional, default 0) 218 Events vectored into another ROM Both the clock and the monitor saver make use of events (a simplified type of interrupts offered by the OS). If another ROM has claimed EVNTV then The Master ROM cannot also vector it (see notes). 219 Can't reset the Tube This error is only given by *RESET if a second processor is being used. 220 is given by the CFS 221 File error This error can be given by all the commands where byte I/O is performed, ie *APPEND, *CREATE, *DUMP and *SRSAVE, and is given when an inexplicable error occurs (usually when the carry flag is set after an OSBPUT operation). The DFS executes a BRK and gives its own error instead of doing this, eg Can't extend. Also given by the CFS in similar circumstances. 222 and 223 are given by the CFS 224 Couldn't open file This error can be given by *APPEND, *CREATE and *SPOOLON when the output file cannot be opened. The DFS executes a BRK and gives its own error instead, eg Disk full. 225 Bad hex digit Hexadecimal numbers may contain only the digits 0-9 and A-F (or a-f). The routine counts a + as a number terminator, so with some commands you will get a Syntax error instead (but only if you are deliberately attempting to crash The Master ROM!!!) 226 Hex number too big The Master ROM expects only a 16-bit number, though it takes input of up to 32 bits, and if the top 2 bytes are not 0 or &FFFF or there are more than 9 digits then this error is generated. 227 Not that much memory This error is given when a +len address is given, eg *MDUMP c000 +c000 would give this error, but *MDUMP c000 +abc would not. 228 Bad decimal This error is given where a decimal number is required but not given correctly, eg *CONFIGURE IGNORE q0 229 Already silent This error is given if *CONFIGURE SOUND OFF is executed twice. 230 That slot is protected This error is given by *KILL, eg after *PROTECT w on typing *KILL w will give this error. 231 That slot isn't RAM If you have tried to *KILL a ROM slot or *SRLOAD into it, this error will be given, eg *KILL b will give this error (with most ROM boards). 232 That slot contains The Master ROM This error is given if you try to *KILL, *UNPLUG or *SRLOAD over The Master ROM 233 That slot is your current language This error is given if you try to *KILL, *UNPLUG or *SRLOAD over the slot containing your current language. 234 That slot is your current filing system This error is given if you try to *KILL, *UNPLUG or *SRLOAD over the slot containing your current filing system. This is unlikely to happen, as your filing system is most likely to be in a ROM. 235 Bad RAM number This error is given only by *SRLOAD when you attempt to give an address between 10 and 7FFF. Any number below 8000 is interpreted as a ROM number, and if it is not correct, it is rejected. 236 Not a valid ROM image This error is given only by *SRLOAD when a ROM image that has been loaded cannot be initialised because it is not a proper ROM image (the OS will also reject it). 237 RAM unavailable (try *KILL) This error is given if The Master ROM cannot find a useable sideways RAM slot for a *SRLOAD command, ie if all your RAM slots contain service ROM images. 238 Nothing plugged in there This error is given by *UNPLUG if you try to use it on an empty slot or on a slot that has already been unplugged. 240 That slot was not unplugged This error is given by *INSERT if you hadn't previously *UNPLUGged that slot. 241 Can't find sideways RAM If, for example, you only have 2 banks of sideways RAM and you try to access bank Z this error will be given. 242 ROM no? This error is given instead of Syntax errors by *CONFIGURE commands expecting a parameter. 243 Wasn't protected This error is given by *PROTECT if you try to unprotect a slot that wasn't protected, eg *PROTECT w off after loading up. 244 Bad range This error is given by *CONFIGURE when a number parameter is specified outside the required range, eg *CONFIGURE DATA 25 would give this error as only 0-7 are acceptable. 251 Bad key This error is given by *SHOW if the key number given is outside the range 0-15 (same error as OS) 254 Bad syntax Given by *CONFIGURE commands where the syntax is incorrect (see help) 254 Syntax: *....... This error is probably the most frequently occuring one. The dots are filled in with the command you used (incorrectly) and the list of parameters required (in brackets if optional), eg *CREATE dosh would give Syntax: *CREATE because both a filename and a file length are required. Try *CREATE dosh 10000000 and you will get a 268,435,456 byte long file (if your media can take it) called dosh. (Wishful thinking, eh?) 6. NOTES If you want to disable the Tube, do NOT *UNPLUG the ROM with the Tube Host Code in it. This will be counterproductive as the Tube will be half- initialised. Instead use *CONFIGURE NOTUBE. There is a small bug with *CONFIGURE NOTUBE: If the ROM with the Tube Host Code is above The Master ROM, pages 4 to 6 and the bottom of zero-page will be corrupted. This is NOT The Master ROM's fault: The Tube Main Init service call is sent round before The Master ROM gets a chance to stop it. Also with the Tube, The Master ROM will crash if used with any second processor other than a 6502 series type. The Master ROM can be disabled almost altogether by setting the top bit of its workspace byte (the frugal bit). The ROM responds to one service call when the frugal bit is set: Tube Main Init. When this bit is set, it will do the same as it would if you had typed *CONFIGURE NOTUBE but The Master ROM must be above the ROM with the Tube Host Code in it. If you have an ESP 002 board, it will probably be best to use it in slot F. This means that disabling The Master ROM in this way will also disable the Tube. If you press at the same time as (ie or ) then all the *CONFIGURE options will be reset to "Not configured", as will sideways RAM protection (see *PROTECT). The Master ROM follows the correct method supplied by the OS of claiming vectors, so only one ROM may be in the chain of claimers. The Master ROM accepts all commands in upper or lower case, hex numbers may include digits A-F or a-f, ROM ids (that's ) may be upper or lower case. The Master ROM may be loaded into any sideways RAM position, and will operate fully except for the following points in any position: a) Second processor owners should load The Master ROM above the ROM containing the Tube Host Code (usually the DFS/DNFS) to use *CONFIGURE NOTUBE. b) Users with a hardware real-time clock and software in ROM in their machine should load The Master ROM below the ROM with the real-time clock code in it so that The Master ROM can access that clock when it receives a *TIME command. The Master ROM only works with standard sideways RAM, where the RAM may be written to immediately after normal selection (ie writing to ROMSEL) without other processes. This is the standard way of making sideways RAM. I would like to say that I deplore all Solidisk hardware and software, because of the company's general disreguard for its customers, and its general disreguard for standards set by Acorn. I would also like to suggest ideas for all software developers everywhere: Leave lots of entry points so that others can improve on the basic idea of the software, eg the Acorn DFS doesn't call OSFILE from its *RUN routine (I think it should) Use the OS method of doing something: It usually saves on code! Have fun, gang! From John (me) and Ford (my Beeb)