Home » Archimedes archive » Archimedes World » AW-1996-08.adf » !6502DEm_6502Dem » Docs/Scripts

Docs/Scripts

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1996-08.adf » !6502DEm_6502Dem
Filename: Docs/Scripts
Read OK:
File size: 0954 bytes
Load address: 0000
Exec address: 0000
File contents
6502Em: BBC Script files
========================

These are files intended to be the !Run file of
an application directory containing a BBC game.
When the application is run, !6502Em will be
loaded if necessary (so long as it has been 'seen'
by the filer).
Within the script file, you can alter certain
features of the emulator and specify which
file to run first to load the game.

The emulator's internal Currently Selected Directory (CSD)
will be set to the directory containing the script file.

The first line of the file MUST be:

BBC Script

On later lines, you may use the following commands:

Palette [On|Off]
Sound [On|Off]
Patch [Off|<patchname>]
Machine <machinename>
TapeFile <filename>
IndexFile <filename>
Keymap [Default|<keymapname>]
DisableTape
ScrollHack
LoadROM <filename>
LoadRAM <filename>
KillROM <ROMName>

where:
<patchname> is the name of a 'Patch' in !6502Em.Patches,
<keymapname> is the name of a 'Keymap' in !6502Em.Keymaps,
<machinename> is one of BBCB, Master128, Compact

IndexFile takes a file containing names of files (in order)
that will be loaded when a CHAIN"" or *RUN"" is issued
(in the same directory as the Script)

The last line of the script is then used to determine
how to run the game.

If the last line is non-existent, then the emulator
will try to load a file of the same name as the application
directory.

If the last line is just a single word, then the emulator
will try to load a file of this name.

In both these cases, the emulator will try to work out
whether the file is BASIC from its execution address or
filetype.
(&801F, &8023, &802B, &80E7 are executions addresses recognised)
Otherwise it will be *Run'ed
If it is recognised as BASIC from its execution address,
page will be set to its load address before it is loaded.

If the last line contains a space (ie is not a single word)
or starts with CHAIN or * then that line will be typed into
BASIC by the emulator.

eg to turn the sound off, the last line might be:
OSCLI "FX210,1" : *Run GameObj

Some example Scripts:

BBC Script

BBC Script
Patch Off
Keymap Arcadians

BBC Script
Palette Off
ExileL

BBC Script
Machine BBCB
Patch Elite
Palette Off
Elite

BBC Script
Machine Master128
Patch M128Elite
Palette Off
MODE2 : */M128Elt

BBC Script
Patch Off
Palette On
PAGE=&1900 : OSCLI "FX210,1" : LOAD "LISTING"

BBC Script
TapeFile JSW
Machine BBCB
OSCLI "TAPE" : CHAIN ""
00000000  36 35 30 32 45 6d 3a 20  42 42 43 20 53 63 72 69  |6502Em: BBC Scri|
00000010  70 74 20 66 69 6c 65 73  0a 3d 3d 3d 3d 3d 3d 3d  |pt files.=======|
00000020  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
00000030  3d 0a 0a 54 68 65 73 65  20 61 72 65 20 66 69 6c  |=..These are fil|
00000040  65 73 20 69 6e 74 65 6e  64 65 64 20 74 6f 20 62  |es intended to b|
00000050  65 20 74 68 65 20 21 52  75 6e 20 66 69 6c 65 20  |e the !Run file |
00000060  6f 66 0a 61 6e 20 61 70  70 6c 69 63 61 74 69 6f  |of.an applicatio|
00000070  6e 20 64 69 72 65 63 74  6f 72 79 20 63 6f 6e 74  |n directory cont|
00000080  61 69 6e 69 6e 67 20 61  20 42 42 43 20 67 61 6d  |aining a BBC gam|
00000090  65 2e 0a 57 68 65 6e 20  74 68 65 20 61 70 70 6c  |e..When the appl|
000000a0  69 63 61 74 69 6f 6e 20  69 73 20 72 75 6e 2c 20  |ication is run, |
000000b0  21 36 35 30 32 45 6d 20  77 69 6c 6c 20 62 65 0a  |!6502Em will be.|
000000c0  6c 6f 61 64 65 64 20 69  66 20 6e 65 63 65 73 73  |loaded if necess|
000000d0  61 72 79 20 28 73 6f 20  6c 6f 6e 67 20 61 73 20  |ary (so long as |
000000e0  69 74 20 68 61 73 20 62  65 65 6e 20 27 73 65 65  |it has been 'see|
000000f0  6e 27 0a 62 79 20 74 68  65 20 66 69 6c 65 72 29  |n'.by the filer)|
00000100  2e 0a 57 69 74 68 69 6e  20 74 68 65 20 73 63 72  |..Within the scr|
00000110  69 70 74 20 66 69 6c 65  2c 20 79 6f 75 20 63 61  |ipt file, you ca|
00000120  6e 20 61 6c 74 65 72 20  63 65 72 74 61 69 6e 0a  |n alter certain.|
00000130  66 65 61 74 75 72 65 73  20 6f 66 20 74 68 65 20  |features of the |
00000140  65 6d 75 6c 61 74 6f 72  20 61 6e 64 20 73 70 65  |emulator and spe|
00000150  63 69 66 79 20 77 68 69  63 68 0a 66 69 6c 65 20  |cify which.file |
00000160  74 6f 20 72 75 6e 20 66  69 72 73 74 20 74 6f 20  |to run first to |
00000170  6c 6f 61 64 20 74 68 65  20 67 61 6d 65 2e 0a 0a  |load the game...|
00000180  54 68 65 20 65 6d 75 6c  61 74 6f 72 27 73 20 69  |The emulator's i|
00000190  6e 74 65 72 6e 61 6c 20  43 75 72 72 65 6e 74 6c  |nternal Currentl|
000001a0  79 20 53 65 6c 65 63 74  65 64 20 44 69 72 65 63  |y Selected Direc|
000001b0  74 6f 72 79 20 28 43 53  44 29 0a 77 69 6c 6c 20  |tory (CSD).will |
000001c0  62 65 20 73 65 74 20 74  6f 20 74 68 65 20 64 69  |be set to the di|
000001d0  72 65 63 74 6f 72 79 20  63 6f 6e 74 61 69 6e 69  |rectory containi|
000001e0  6e 67 20 74 68 65 20 73  63 72 69 70 74 20 66 69  |ng the script fi|
000001f0  6c 65 2e 0a 0a 54 68 65  20 66 69 72 73 74 20 6c  |le...The first l|
00000200  69 6e 65 20 6f 66 20 74  68 65 20 66 69 6c 65 20  |ine of the file |
00000210  4d 55 53 54 20 62 65 3a  0a 0a 42 42 43 20 53 63  |MUST be:..BBC Sc|
00000220  72 69 70 74 0a 0a 4f 6e  20 6c 61 74 65 72 20 6c  |ript..On later l|
00000230  69 6e 65 73 2c 20 79 6f  75 20 6d 61 79 20 75 73  |ines, you may us|
00000240  65 20 74 68 65 20 66 6f  6c 6c 6f 77 69 6e 67 20  |e the following |
00000250  63 6f 6d 6d 61 6e 64 73  3a 0a 0a 50 61 6c 65 74  |commands:..Palet|
00000260  74 65 20 5b 4f 6e 7c 4f  66 66 5d 0a 53 6f 75 6e  |te [On|Off].Soun|
00000270  64 20 5b 4f 6e 7c 4f 66  66 5d 0a 50 61 74 63 68  |d [On|Off].Patch|
00000280  20 5b 4f 66 66 7c 3c 70  61 74 63 68 6e 61 6d 65  | [Off|<patchname|
00000290  3e 5d 0a 4d 61 63 68 69  6e 65 20 3c 6d 61 63 68  |>].Machine <mach|
000002a0  69 6e 65 6e 61 6d 65 3e  0a 54 61 70 65 46 69 6c  |inename>.TapeFil|
000002b0  65 20 3c 66 69 6c 65 6e  61 6d 65 3e 0a 49 6e 64  |e <filename>.Ind|
000002c0  65 78 46 69 6c 65 20 3c  66 69 6c 65 6e 61 6d 65  |exFile <filename|
000002d0  3e 0a 4b 65 79 6d 61 70  20 5b 44 65 66 61 75 6c  |>.Keymap [Defaul|
000002e0  74 7c 3c 6b 65 79 6d 61  70 6e 61 6d 65 3e 5d 0a  |t|<keymapname>].|
000002f0  44 69 73 61 62 6c 65 54  61 70 65 0a 53 63 72 6f  |DisableTape.Scro|
00000300  6c 6c 48 61 63 6b 0a 4c  6f 61 64 52 4f 4d 20 3c  |llHack.LoadROM <|
00000310  66 69 6c 65 6e 61 6d 65  3e 0a 4c 6f 61 64 52 41  |filename>.LoadRA|
00000320  4d 20 3c 66 69 6c 65 6e  61 6d 65 3e 0a 4b 69 6c  |M <filename>.Kil|
00000330  6c 52 4f 4d 20 3c 52 4f  4d 4e 61 6d 65 3e 0a 0a  |lROM <ROMName>..|
00000340  77 68 65 72 65 3a 0a 3c  70 61 74 63 68 6e 61 6d  |where:.<patchnam|
00000350  65 3e 20 69 73 20 74 68  65 20 6e 61 6d 65 20 6f  |e> is the name o|
00000360  66 20 61 20 27 50 61 74  63 68 27 20 69 6e 20 21  |f a 'Patch' in !|
00000370  36 35 30 32 45 6d 2e 50  61 74 63 68 65 73 2c 0a  |6502Em.Patches,.|
00000380  3c 6b 65 79 6d 61 70 6e  61 6d 65 3e 20 69 73 20  |<keymapname> is |
00000390  74 68 65 20 6e 61 6d 65  20 6f 66 20 61 20 27 4b  |the name of a 'K|
000003a0  65 79 6d 61 70 27 20 69  6e 20 21 36 35 30 32 45  |eymap' in !6502E|
000003b0  6d 2e 4b 65 79 6d 61 70  73 2c 0a 3c 6d 61 63 68  |m.Keymaps,.<mach|
000003c0  69 6e 65 6e 61 6d 65 3e  20 69 73 20 6f 6e 65 20  |inename> is one |
000003d0  6f 66 20 42 42 43 42 2c  20 4d 61 73 74 65 72 31  |of BBCB, Master1|
000003e0  32 38 2c 20 43 6f 6d 70  61 63 74 0a 0a 49 6e 64  |28, Compact..Ind|
000003f0  65 78 46 69 6c 65 20 74  61 6b 65 73 20 61 20 66  |exFile takes a f|
00000400  69 6c 65 20 63 6f 6e 74  61 69 6e 69 6e 67 20 6e  |ile containing n|
00000410  61 6d 65 73 20 6f 66 20  66 69 6c 65 73 20 28 69  |ames of files (i|
00000420  6e 20 6f 72 64 65 72 29  0a 74 68 61 74 20 77 69  |n order).that wi|
00000430  6c 6c 20 62 65 20 6c 6f  61 64 65 64 20 77 68 65  |ll be loaded whe|
00000440  6e 20 61 20 43 48 41 49  4e 22 22 20 6f 72 20 2a  |n a CHAIN"" or *|
00000450  52 55 4e 22 22 20 69 73  20 69 73 73 75 65 64 0a  |RUN"" is issued.|
00000460  28 69 6e 20 74 68 65 20  73 61 6d 65 20 64 69 72  |(in the same dir|
00000470  65 63 74 6f 72 79 20 61  73 20 74 68 65 20 53 63  |ectory as the Sc|
00000480  72 69 70 74 29 0a 0a 54  68 65 20 6c 61 73 74 20  |ript)..The last |
00000490  6c 69 6e 65 20 6f 66 20  74 68 65 20 73 63 72 69  |line of the scri|
000004a0  70 74 20 69 73 20 74 68  65 6e 20 75 73 65 64 20  |pt is then used |
000004b0  74 6f 20 64 65 74 65 72  6d 69 6e 65 0a 68 6f 77  |to determine.how|
000004c0  20 74 6f 20 72 75 6e 20  74 68 65 20 67 61 6d 65  | to run the game|
000004d0  2e 0a 0a 49 66 20 74 68  65 20 6c 61 73 74 20 6c  |...If the last l|
000004e0  69 6e 65 20 69 73 20 6e  6f 6e 2d 65 78 69 73 74  |ine is non-exist|
000004f0  65 6e 74 2c 20 74 68 65  6e 20 74 68 65 20 65 6d  |ent, then the em|
00000500  75 6c 61 74 6f 72 0a 77  69 6c 6c 20 74 72 79 20  |ulator.will try |
00000510  74 6f 20 6c 6f 61 64 20  61 20 66 69 6c 65 20 6f  |to load a file o|
00000520  66 20 74 68 65 20 73 61  6d 65 20 6e 61 6d 65 20  |f the same name |
00000530  61 73 20 74 68 65 20 61  70 70 6c 69 63 61 74 69  |as the applicati|
00000540  6f 6e 0a 64 69 72 65 63  74 6f 72 79 2e 0a 0a 49  |on.directory...I|
00000550  66 20 74 68 65 20 6c 61  73 74 20 6c 69 6e 65 20  |f the last line |
00000560  69 73 20 6a 75 73 74 20  61 20 73 69 6e 67 6c 65  |is just a single|
00000570  20 77 6f 72 64 2c 20 74  68 65 6e 20 74 68 65 20  | word, then the |
00000580  65 6d 75 6c 61 74 6f 72  0a 77 69 6c 6c 20 74 72  |emulator.will tr|
00000590  79 20 74 6f 20 6c 6f 61  64 20 61 20 66 69 6c 65  |y to load a file|
000005a0  20 6f 66 20 74 68 69 73  20 6e 61 6d 65 2e 0a 0a  | of this name...|
000005b0  49 6e 20 62 6f 74 68 20  74 68 65 73 65 20 63 61  |In both these ca|
000005c0  73 65 73 2c 20 74 68 65  20 65 6d 75 6c 61 74 6f  |ses, the emulato|
000005d0  72 20 77 69 6c 6c 20 74  72 79 20 74 6f 20 77 6f  |r will try to wo|
000005e0  72 6b 20 6f 75 74 0a 77  68 65 74 68 65 72 20 74  |rk out.whether t|
000005f0  68 65 20 66 69 6c 65 20  69 73 20 42 41 53 49 43  |he file is BASIC|
00000600  20 66 72 6f 6d 20 69 74  73 20 65 78 65 63 75 74  | from its execut|
00000610  69 6f 6e 20 61 64 64 72  65 73 73 20 6f 72 0a 66  |ion address or.f|
00000620  69 6c 65 74 79 70 65 2e  0a 28 26 38 30 31 46 2c  |iletype..(&801F,|
00000630  20 26 38 30 32 33 2c 20  26 38 30 32 42 2c 20 26  | &8023, &802B, &|
00000640  38 30 45 37 20 61 72 65  20 65 78 65 63 75 74 69  |80E7 are executi|
00000650  6f 6e 73 20 61 64 64 72  65 73 73 65 73 20 72 65  |ons addresses re|
00000660  63 6f 67 6e 69 73 65 64  29 0a 4f 74 68 65 72 77  |cognised).Otherw|
00000670  69 73 65 20 69 74 20 77  69 6c 6c 20 62 65 20 2a  |ise it will be *|
00000680  52 75 6e 27 65 64 0a 49  66 20 69 74 20 69 73 20  |Run'ed.If it is |
00000690  72 65 63 6f 67 6e 69 73  65 64 20 61 73 20 42 41  |recognised as BA|
000006a0  53 49 43 20 66 72 6f 6d  20 69 74 73 20 65 78 65  |SIC from its exe|
000006b0  63 75 74 69 6f 6e 20 61  64 64 72 65 73 73 2c 0a  |cution address,.|
000006c0  70 61 67 65 20 77 69 6c  6c 20 62 65 20 73 65 74  |page will be set|
000006d0  20 74 6f 20 69 74 73 20  6c 6f 61 64 20 61 64 64  | to its load add|
000006e0  72 65 73 73 20 62 65 66  6f 72 65 20 69 74 20 69  |ress before it i|
000006f0  73 20 6c 6f 61 64 65 64  2e 0a 0a 49 66 20 74 68  |s loaded...If th|
00000700  65 20 6c 61 73 74 20 6c  69 6e 65 20 63 6f 6e 74  |e last line cont|
00000710  61 69 6e 73 20 61 20 73  70 61 63 65 20 28 69 65  |ains a space (ie|
00000720  20 69 73 20 6e 6f 74 20  61 20 73 69 6e 67 6c 65  | is not a single|
00000730  20 77 6f 72 64 29 0a 6f  72 20 73 74 61 72 74 73  | word).or starts|
00000740  20 77 69 74 68 20 43 48  41 49 4e 20 6f 72 20 2a  | with CHAIN or *|
00000750  20 74 68 65 6e 20 74 68  61 74 20 6c 69 6e 65 20  | then that line |
00000760  77 69 6c 6c 20 62 65 20  74 79 70 65 64 20 69 6e  |will be typed in|
00000770  74 6f 0a 42 41 53 49 43  20 62 79 20 74 68 65 20  |to.BASIC by the |
00000780  65 6d 75 6c 61 74 6f 72  2e 0a 0a 65 67 20 74 6f  |emulator...eg to|
00000790  20 74 75 72 6e 20 74 68  65 20 73 6f 75 6e 64 20  | turn the sound |
000007a0  6f 66 66 2c 20 74 68 65  20 6c 61 73 74 20 6c 69  |off, the last li|
000007b0  6e 65 20 6d 69 67 68 74  20 62 65 3a 0a 4f 53 43  |ne might be:.OSC|
000007c0  4c 49 20 22 46 58 32 31  30 2c 31 22 20 3a 20 2a  |LI "FX210,1" : *|
000007d0  52 75 6e 20 47 61 6d 65  4f 62 6a 0a 0a 53 6f 6d  |Run GameObj..Som|
000007e0  65 20 65 78 61 6d 70 6c  65 20 53 63 72 69 70 74  |e example Script|
000007f0  73 3a 0a 0a 42 42 43 20  53 63 72 69 70 74 0a 0a  |s:..BBC Script..|
00000800  42 42 43 20 53 63 72 69  70 74 0a 50 61 74 63 68  |BBC Script.Patch|
00000810  20 4f 66 66 0a 4b 65 79  6d 61 70 20 41 72 63 61  | Off.Keymap Arca|
00000820  64 69 61 6e 73 0a 0a 42  42 43 20 53 63 72 69 70  |dians..BBC Scrip|
00000830  74 0a 50 61 6c 65 74 74  65 20 4f 66 66 0a 45 78  |t.Palette Off.Ex|
00000840  69 6c 65 4c 0a 0a 42 42  43 20 53 63 72 69 70 74  |ileL..BBC Script|
00000850  0a 4d 61 63 68 69 6e 65  20 42 42 43 42 0a 50 61  |.Machine BBCB.Pa|
00000860  74 63 68 20 45 6c 69 74  65 0a 50 61 6c 65 74 74  |tch Elite.Palett|
00000870  65 20 4f 66 66 0a 45 6c  69 74 65 0a 0a 42 42 43  |e Off.Elite..BBC|
00000880  20 53 63 72 69 70 74 0a  4d 61 63 68 69 6e 65 20  | Script.Machine |
00000890  4d 61 73 74 65 72 31 32  38 0a 50 61 74 63 68 20  |Master128.Patch |
000008a0  4d 31 32 38 45 6c 69 74  65 0a 50 61 6c 65 74 74  |M128Elite.Palett|
000008b0  65 20 4f 66 66 0a 4d 4f  44 45 32 20 3a 20 2a 2f  |e Off.MODE2 : */|
000008c0  4d 31 32 38 45 6c 74 0a  0a 42 42 43 20 53 63 72  |M128Elt..BBC Scr|
000008d0  69 70 74 0a 50 61 74 63  68 20 4f 66 66 0a 50 61  |ipt.Patch Off.Pa|
000008e0  6c 65 74 74 65 20 4f 6e  0a 50 41 47 45 3d 26 31  |lette On.PAGE=&1|
000008f0  39 30 30 20 3a 20 4f 53  43 4c 49 20 22 46 58 32  |900 : OSCLI "FX2|
00000900  31 30 2c 31 22 20 3a 20  4c 4f 41 44 20 22 4c 49  |10,1" : LOAD "LI|
00000910  53 54 49 4e 47 22 0a 0a  42 42 43 20 53 63 72 69  |STING"..BBC Scri|
00000920  70 74 0a 54 61 70 65 46  69 6c 65 20 4a 53 57 0a  |pt.TapeFile JSW.|
00000930  4d 61 63 68 69 6e 65 20  42 42 43 42 0a 4f 53 43  |Machine BBCB.OSC|
00000940  4c 49 20 22 54 41 50 45  22 20 3a 20 43 48 41 49  |LI "TAPE" : CHAI|
00000950  4e 20 22 22                                       |N ""|
00000954