This feature is a collection of longer contributions which
cover the areas of !BOOT files, function keys, the Master 128 and the ADFS.
The contributors are:
1) Roger Cawkwell
- Suggestions for the !BOOT file
- Suggestions for the !BOOT file
2) Andy Gillanders
- Ideas for Master 128 users
- Ideas for Master 128 users
3) Frances Wymans
- Loading music files using ADFS
- Using directories and !BOOT files with ADFS
- Loading music files using ADFS
- Using directories and !BOOT files with ADFS
Suggestions for the !BOOT file
Roger Cawkwell
Losing a valuable program by hitting "SAVE (f8) instead
of "LOAD (f9) (my finger slipped!) inspired me to rewrite the !BOOT file
so that there was no chance of this happening again.
After some struggles in what was then unfamiliar territory,
I found out (by asking someone, actually) how to include " (the double
quote character) in function key definitions and started to write my own !BOOT
files. (For more information on function keys see the BBC Micro User Guide,
p.22).
When you use the !BOOT file provided on the Studio 5000
Issue Disc it INSTALLs the PREPARE module which, among other things, loads the
red function keys with definitions corresponding to the key strip in the Installation
Guide
The PREPARE module defines Key 8 as:
*KEY8|"SAVE|M
and it is the |M in the string which lost me my program, as
it tells AMPLE that RETURN has been pressed. We need a chance to see and
correct our mistakes before they're executed.
The simplest way of avoiding this happening is to type:
*KEY 8 " ""SAVE "
(the spaces are optional) whilst in command mode. The long
row of quote marks is necessary because if you type only:
*KEY 8 "SAVE
the BBC's Operating System interprets the first double quote
character as the start of a string containing the key definition and assumes
that a closing double quote is missing. This causes a "Bad string"
error message.
The two outer quotes, therefore, delimit the string and the
pair of quotes immediately to the left of SAVE represent a lone " inside
the string. Although this is simple enough, you would have to repeat it each
time you !BOOTed up the Studio 5000 disc as this would restore the old key 8 definition.
A neater solution is to rewrite the !BOOT file including a
few extra lines after PREPARE which will immediately redefine any keys you
wish.
If the mere thought of this fills you with horror, never
fear, I found it just as horrendous at first.
If you've never done it before, have a look at your current
!BOOT file by typing *LIST !BOOT (with the Issue Disc in the drive!).
You should see something like this:
0001 *BASIC
0002 */C.PREPARE R S K
0003 *FX 202,48
0004 *FX 118
0005 *AMPLE
0006 % Release 2
0007 "M." MPREFIX
0008 "INT" INSTALL
0009 "M5" INSTALL
0010 "EW" INSTALL
0011 "MENU" INSTALL
0012 "FX1A" INSTALL
0013 "INS1" INSTALL
0014 MAIN
0002 */C.PREPARE R S K
0003 *FX 202,48
0004 *FX 118
0005 *AMPLE
0006 % Release 2
0007 "M." MPREFIX
0008 "INT" INSTALL
0009 "M5" INSTALL
0010 "EW" INSTALL
0011 "MENU" INSTALL
0012 "FX1A" INSTALL
0013 "INS1" INSTALL
0014 MAIN
If you have the Acorn DFS, new !BOOT files are made with
*BUILD (see Acorn DFS User Guide page 30). If you have another DFS, read this
through and I'm sure you'll be able to adapt the idea. With the *LISTed !BOOT
still on the screen type:
*BUILD !BOOT
*BUILD supplies the line numbers, so just use the cursor and
RETURN keys to copy the file, adding lines with your own definitions
immediately after the PREPARE line. After pressing RETURN for the last line
press ESCAPE and your new !BOOT will be put on the disc.
One possible source of confusion is that the two !BOOT
files, old and new, will be numbered differently, though a little concentration
will ensure a successful outcome.
For the faint-hearted, let's go over that in a little more
detail.
The lines in which we are interested come near the beginning
of the file:
0002 */C.PREPARE R S K
0003 *FX 202,48
0003 *FX 202,48
When you get to line 0003, instead of copying the FX
instruction type your own key definition(s), one per line, and then resume
copying from the old line 0003. This and all subsequent lines will now have
higher numbers in your new !BOOT file. Not all that confusing, is it?
Assuming you've changed key 7 ("LOAD) as well as key 8
("SAVE), your new file will look like:
0002 */C.PREPARE R S K
0003 *KEY 7 " ""LOAD "
0004 *KEY 8 " ""SAVE "
0005 *FX 202,48 etc.
0003 *KEY 7 " ""LOAD "
0004 *KEY 8 " ""SAVE "
0005 *FX 202,48 etc.
This means that when you press f8 in future, "SAVE will
be printed at the cursor leaving you to press RETURN. Or maybe you'll hastily
press ESCAPE because what you really meant was "LOAD.
Summary
·
Type: *LIST !BOOT
·
Type: *BUILD !BOOT
·
Copy file with cursor keys
·
Add new definitions after PREPARE
·
When the new !BOOT is complete press ESCAPE and
the DFS will save it.
Happy BOOTing!
Editor's note: An alternative method for getting the double
quote character into function key definitions is by use of the | (vertical bar)
character.
The vertical bar is normally used to allow control codes (0
to 31) to be represented in a function key definition (for example the |M to represent
the RETURN key - ASCII code 13 - mentioned above). A list of the characters
used to produce each of the control codes can be found on page 507 of the BBC
Micro User Guide.
However, some characters placed after the vertical bar
character do not have a control code function. In these cases the vertical bar
has no effect and the following character is treated normally. One such
character is the double quote so the |" combination produces the same
effect as " alone.
One side-effect of the vertical bar, however, is to let the
Operating System know that the key definition has begun. This means that the following
double quote character will be treated as part of the definition not as a
string delimiter marking the start of it.
Making use of this means that the key definition described
above:
*KEY 8 " ""SAVE "
could be entered as:
*KEY 8 |"SAVE
(the spaces being optional in both cases).
Some ideas for Master 128 users
Andy Gillanders
Instrument files
The ADFS is well suited for use with the Music 5000 because
of the large number of files needed; particularly for all the instruments that
have been designed and/or collected.
I find the best way to organise all the instruments is to
keep them in a separate directory - say 'INST1'. Since it is very slow to have
to keep *EXECing each individual file in, only to find it is not the one wanted
after all, I have found that it saves time to create a large file using a word processor
with 12 instruments in each. It is tempting to have more instruments but twelve
is a useful number since when using MIX, if there are more than 10 lines of
instruments available when selecting with SHIFT, then the top few will scroll
off the screen and therefore cannot be selected.
I find it useful to collect similar types of instruments
together and I conventionally name the resulting file '12bass', '12drums', or
'12guitar1' as appropriate.
Having *EXECed such a file into my program, tried the
instruments and selected the one(s) I want, I then need to get rid of the rest.
I find it easier to *EXEC another file which deletes all of those instruments automatically
(say filename 'N12bass') and then *EXEC back in the instrument I wish to keep
in the normal way.
Thus the directory INST1 will probably hold 36 individual
instrument files, 3 '12xxxxxxx' compilation files and 3 compilation delete
files 'N12xxxxxx'. The file which deletes the instruments merely holds the
instrument name followed by DELETE. For example:
"strbass" DELETE
"flangbass" DELETE
... etc.
COMPACT
"flangbass" DELETE
... etc.
COMPACT
Obviously, this idea is easily extended to any collection of
AMPLE words that you often *EXEC in and make a selection from.
EXEC files
Remember that if you create a EXEC file using *SPOOL with a
Master, it automatically creates a file with an execute address of
&FFFFFFFF which will then allow you to *EXEC that file in by typing
'*filename' instead of the full command '*EXEC filename'.
For those of you with ACP'S excellent Advanced Disc Toolkit
ROM, you can keep all the EXEC files in one directory and use *MENU. Any file selected
will automatically be *EXECed provided that the execute address is either
00000000 or &FFFFFFFF. Even if it is not (because the file was created with
VIEW for example) then you can reset the execute address to &FFFFFFFF with:
*SETADR filename 0 FFFFFFFF
This technique used with ADT will greatly speed up your
music development - especially if you keep your files organised well!
Description files
It is useful to keep a file in each directory describing the
contents and functions of the other files. This file can be displayed at any
time using the techniques described above or by '*TYPE filename'.
If you wish to display a description file by *EXECing it (as
described above), it can be created using a wordprocessor (or Notepad) as
normal. But remember to prefix each line with a '%' before saving, otherwise
error messages will be given when *EXECed into AMPLE.
If you are using VIEW, remember to turn off right
justification since the justifying, 'soft', spaces will be interpreted as VDU
26 (restore default windows). When *PRINTed these cause the cursor to keep
returning to the top left-hand corner of the screen and when *TYPEd these
'soft' spaces will be replaced by '|Z' making the text impossible to read.
Using *PRINT has advantages - inserted VDU and teletext
codes will be printed on the screen properly and so they will increase the
readability of your text. However, to *PRINT properly there must be CR/LF pair
at the end of each line which is not provided by VIEW. The best way to ensure
that the text file has CR/LF and to insert other control codes is to use the system
editor - *EDIT.
In EDIT, if you select the option Shift-f0 to display
RETURNs then each line should have a reverse field J and M at either the
beginning or end. If not - it is probably the Js that are missing - the
quickest way to get the correct format for *PRINTing is, to get back into BASIC,
then:
*SPOOL temp
*TYPE yourfilename
*SPOOL
*EDIT temp
*TYPE yourfilename
*SPOOL
*EDIT temp
You can now take out the additional lines at the top and end
of the file put there by the *SPOOL operation. You should then have a
*PRINTable file.
One annoying 'feature' of AMPLE is that it will not
recognise the Ctrl-N and Ctrl-O keypresses which turn paging on and off. These
may be inserted at the start and end of the text in EDIT by pressing Ctrl-N and
Ctrl-O as required. Ctrl-L will clear the screen. Other codes can be used but
will require a bit more thought.
Loading music files from ADFS
Frances Wymans
Assuming that you have moved your files from DFS into ADFS
already, this will enable you to call up your music files from a
"star" command, rather than use long involved pathways (fraught with typing
errors) to load them.
First alter the existing !BOOT file as follows:
·
Put the ADFS disc into drive 0 and type *MOUNT 0
This nominates the current directory as $ (the root directory)
This nominates the current directory as $ (the root directory)
·
Type *LIST !BOOT, and the current !BOOT file
will be displayed
·
Type *BUILD !BOOT, and automatic numbering is
displayed for each command that you type in.
·
Add the following lines, BEFORE copying the
existing commands:
0001 *DIR $
0002 *LIB $.LIBRARY
0002 *LIB $.LIBRARY
then continue, starting with the first lines of the original
!BOOT file, to copy the rest of the original file:
0003 *BASIC
0004 */C.PREPARE R S K
...
0004 */C.PREPARE R S K
...
·
After the last line of instructions are
inserted, and the next number comes up, press ESCAPE to write the file to disc.
·
If the option is not already set to 3, type:
*OPT 4,3 <return>
Next it is necessary to create a series of EXEC files in the
library. These can then be called by "star" commands. The file names
must be different from any ROM calls used by the OS, as "star" calls
are only offered to the library after they have been rejected by the OS and
paged ROMs.
First, make the LIBRARY the current directory:
*DIR $.LIBRARY
Now, suppose that you keep your own creations in a directory
called FILES in the Root directory, and your masterpiece is called SONG. You
should then go through a similar routine to building a !BOOT file, but this
time you in fact create an EXEC file in the LIBRARY as follows:
*BUILD SONG
0001 "$.FILES.SONG"LOAD RUN
0002 <Escape>
0001 "$.FILES.SONG"LOAD RUN
0002 <Escape>
This is now written to disc under the name SONG, and will
appear in the LIBRARY directory.
If you now !BOOT the disc in the normal way, when the main
menu appears, instead of choosing the option LOAD PROGRAM, and fighting involved
pathways, choose the option 'Commands', and type *SONG; the EXEC file will do
the rest.
Using ADFS Directories
Frances Wymans
Having done (for a beginner with ADFS) the impossible and
completely filled a double sided, 80 track ADFS disc, I decided to do a bit of
file shifting. I set up three different discs, each containing one aspect of
AMPLE:
MASTER JUKEBOX AMPLINEX
The MASTER disc contains all music files, instrument
definitions etc., held in different directories.
The JUKEBOX disc contains the jukebox from the Studio 5000
Issue disc (the 'To the Manor Born' one), AMPLE BYTES BACK, and COSMIX. Each is
held in a different directory.
The AMPLINEX disc contains a directory for each issue.
I have copied the original Studio 5000 !BOOT file on to each
disc, and made a few alterations, some related to ADFS and some related to
running a relevant program.
Here are the files (spooled into a wordprocessor from the
original discs, so there should be no typing errors), with modifications.
Comments are in angled brackets '<...>'.
MASTER
0001 *DIR $ <Only if disc not initialised at startup>
0002 *LIB $.LIBRARY <Sets library>
0003 *BASIC
0004 */C.PREPARE R S K
0005 *FX 202,48
0006 *FX 118
0007 *AMPLE
0008 % Studio 5000-4 Release 2
0009 ":0.M." MPREFIX
0010 "INT" INSTALL
0011 "M4" INSTALL
0012 "M5" INSTALL
0013 "EW" INSTALL
0014 "MENU" INSTALL
0015 "FX1A" INSTALL
0016 "INS1" INSTALL
0017 *DIR $.FILES <Sets directory for files>
0018 MAIN
0002 *LIB $.LIBRARY <Sets library>
0003 *BASIC
0004 */C.PREPARE R S K
0005 *FX 202,48
0006 *FX 118
0007 *AMPLE
0008 % Studio 5000-4 Release 2
0009 ":0.M." MPREFIX
0010 "INT" INSTALL
0011 "M4" INSTALL
0012 "M5" INSTALL
0013 "EW" INSTALL
0014 "MENU" INSTALL
0015 "FX1A" INSTALL
0016 "INS1" INSTALL
0017 *DIR $.FILES <Sets directory for files>
0018 MAIN
The library contains a series of EXEC files (as outlined in
the previous article) with calls to each of the completed pieces.
JUKEBOX
0001 *DIR $
0002 *LIB $.LIBRARY
0003 *BASIC
0004 */C.PREPARE R S K
0005 *FX 202,48
0006 *FX 118
0007 *AMPLE
0008 % Studio 5000-4 Release 2
0009 ":0.M." MPREFIX
0010 "INT" INSTALL
0011 "M4" INSTALL
0012 "M5" INSTALL
0013 "EW" INSTALL
0014 "MENU" INSTALL
0015 "FX1A" INSTALL
0016 "INS1" INSTALL
0017 *DIR BYTESBACK <Name of directory holding favourite JUKEBOX>
0018 "JUKEBOX"LOAD RUN
0002 *LIB $.LIBRARY
0003 *BASIC
0004 */C.PREPARE R S K
0005 *FX 202,48
0006 *FX 118
0007 *AMPLE
0008 % Studio 5000-4 Release 2
0009 ":0.M." MPREFIX
0010 "INT" INSTALL
0011 "M4" INSTALL
0012 "M5" INSTALL
0013 "EW" INSTALL
0014 "MENU" INSTALL
0015 "FX1A" INSTALL
0016 "INS1" INSTALL
0017 *DIR BYTESBACK <Name of directory holding favourite JUKEBOX>
0018 "JUKEBOX"LOAD RUN
This automatically loads my favourite jukebox, and the
library contains EXEC files calling to all other directories
AMPLINEX
0001 *DIR $
0002 *LIB $.LIBRARY
0003 *BASIC
0004 */C.PREPARE R S K
0005 *FX 202,48
0006 *FX 118
0007 *AMPLE
0008 % Studio 5000-4 Release 2
0009 ":0.M." MPREFIX
0010 "INT" INSTALL
0011 "M4" INSTALL
0012 "M5" INSTALL
0013 "EW" INSTALL
0014 "MENU" INSTALL
0015 "FX1A" INSTALL
0016 "INS1" INSTALL
0017 *LC. <This lists the EXEC files>
0002 *LIB $.LIBRARY
0003 *BASIC
0004 */C.PREPARE R S K
0005 *FX 202,48
0006 *FX 118
0007 *AMPLE
0008 % Studio 5000-4 Release 2
0009 ":0.M." MPREFIX
0010 "INT" INSTALL
0011 "M4" INSTALL
0012 "M5" INSTALL
0013 "EW" INSTALL
0014 "MENU" INSTALL
0015 "FX1A" INSTALL
0016 "INS1" INSTALL
0017 *LC. <This lists the EXEC files>
Below are the files in the Root directory:
>*.
$ (18)
Drive:0 Option 03 (Exec)
Dir. $ Lib. LIBRARY
!BOOT WR (18) ASEP87 DLR(14)
ANOV87 DLR(15) C DLR(04)
LIBRARY DLR(05) M DLR(03)
$ (18)
Drive:0 Option 03 (Exec)
Dir. $ Lib. LIBRARY
!BOOT WR (18) ASEP87 DLR(14)
ANOV87 DLR(15) C DLR(04)
LIBRARY DLR(05) M DLR(03)
ASEP87 AND ANOV87 hold the contents of those issues of
AMPLINEX.
Below is the library of the AMPLINEX disc:
>*LC.
LIBRARY (03)
Drive:0 Option 03 (Exec)
Dir. $ Lib. LIBRARY
SEP87 WR (02) NOV87 WR (03)
LIBRARY (03)
Drive:0 Option 03 (Exec)
Dir. $ Lib. LIBRARY
SEP87 WR (02) NOV87 WR (03)
Below are the EXEC
files from the LIBRARY, taking you directly into the title page of the relevant
issue.
>*LIST SEP87
0001 *DIR $.ASEP87
0002 "AMPLINX"LOAD RUN
0001 *DIR $.ASEP87
0002 "AMPLINX"LOAD RUN
>*LIST NOV87
0001 *DIR $.ANOV87
0002 "AMPLINX"LOAD RUN
0001 *DIR $.ANOV87
0002 "AMPLINX"LOAD RUN
Published in AMPLINEX 003, January 1988