GoSDC Guide



Index

* Note that, when you first begin using GoSDC, it's recommended to limit yourself to these sections.

Overview

GoSDC is a storage system for the Acorn BBC (B, B+, Master) and Electron.

It allows you to store virtually any number of discs on a single flash card, and use them via familiar filing systems, with increased convenience and speed. Supported flash card types are MMC, SD, SDHC and SDXC. Discs may be DFS or ADFS format, may be sourced from real floppy discs, real hard discs or disc image files, or may be created. There's also support for tapes (read only).

GoSDC is self-contained, and can make do with a completely 'bare' machine (without disc interface or other upgrades).

Terminology

In the following, machine always refers to your Acorn machine (upgraded with GoSDC), whereas PC refers to a computer running Windows, Linux or macOS.

Also, in case you're not yet familiar with the term, a filing system is a software layer between user (you) and storage medium (e.g. floppy disc or hard disc). Refer to Filing systems for more information. This guide is not a filing system tutorial (if you need one, you can find relevant DFS and ADFS manuals and tutorials on the Internet).

Quick start

To get a quick taste of GoSDC, proceed as follows. Everything you're asked to 'enter' is entered on your machine.

Congratulations. You have created a disc, and saved a file to it.

That was a simple example. GoSDC gives you many degrees of freedom. You can use DFS, or ADFS, or both. You can have any number of discs (limited only by the flash card capacity), each with their own name and size (limited only by the filing system : 400 KB for DFS, 512 MB for ADFS). You can add discs from a variety of sources, or create new ones.

General use

Fundamentals

Operating GoSDC fundamentally involves :

Note that one physical flash card consists of up to eight logical flash cards (a.k.a. areas). For details, refer to the 'Areas' part of Parts and layers. Throughout this documentation, 'flash card' generally means logical flash card and rarely physical flash card. You can switch between logical flash cards / areas with *SDCArea.

Also note that, whenever you insert a(nother) flash card, you need not power down before, but do need to press CTRL-BREAK after.

Tool tasks

You run tools to execute a variety of tasks (if needed, refer to mainly the 'Basics' parts of Running tools).

What follows documents the more common tasks (for the less common tasks, refer to Tool tasks). Note that :

Task Format flash card
Notes Insert the flash card, then press CTRL-BREAK, then run this tool, then press CTRL-BREAK again. Note that all data previously stored on the flash card will be lost.
Native  *SDCTool SDCFO 

Task Add a DFS disc (using a disc image file)
Notes Source file size is normally up to 400 KB.
Suppose Source file name is 'somefile'. New disc name is 'humpty'.
Native  *SDCTool SDCADI DN somefile humpty 
Foreign  GoSDCio -dQ -c "ADD DFS DISC N humpty somefile" 
Variations If the source file contains an interlaced disc image (refer to Disc images for details), i.e. you know it is interlaced, or you thought it wasn't (but the resulting disc appears to be broken), then replace the 'N' in your command line with 'I' (and note that the origin of the disc image is assumed to be a 400 KB DSDD floppy disc).

Task Add an ADFS disc (using a disc image file)
Notes Source file size is normally up to 512 MB.
Suppose Source file name is 'somefile'. New disc name is 'humpty'.
Native  *SDCTool SDCADI AN somefile humpty 
Foreign  GoSDCio -dQ -c "ADD ADFS DISC N humpty somefile" 
Variations If the source file contains an interlaced disc image (refer to Disc images for details), i.e. you know it is interlaced, or you thought it wasn't (but the resulting disc appears to be broken), then replace the 'N' in your command line with 'I' (and note that the origin of the disc image is assumed to be a 640 KB DSDD floppy disc).

Task Add a DFS disc (using a real floppy disc)
Notes The floppy disc should be readable when you enter the command line, i.e. your machine should have a floppy disc interface connected to a floppy disc drive with the floppy disc in it, and the 'original' version of a compatible DFS should be running (refer to Filing systems if needed).
Suppose A double sided floppy disc is in the 'first' drive. New disc name is 'humpty'.
Native  *SDCTool SDCADI DR 0+2 humpty 
Variations To copy from other (logical/physical) drives, replace '0+2' with e.g. '0', '2', '1', '3' or '1+3'. Floppy discs may be single or double sided, and single or double density.

Task Add an ADFS disc (using a real floppy or hard disc)
Notes The floppy or hard disc should be readable when you enter the command line, i.e. either your machine should have a floppy disc interface connected to a floppy disc drive with the floppy disc in it or your machine should have a hard disc connected to it, and the 'original' version of a compatible ADFS should be running (refer to Filing systems if needed).
Suppose A double sided floppy disc is in the 'first' drive. New disc name is 'humpty'.
Native  *SDCTool SDCADI AR 0 humpty 
Variations To copy from other (logical/physical) drives, replace '0' with e.g. '1', '4', or '5'. Floppy discs may be single or double sided. Hard discs may be up to 512 MB in size.

Task Create a new, empty DFS disc
Notes Size must be >= 1 KB and <= 400 KB. Sizes > 200 KB result in a two drive disc (like a double sided floppy).
Suppose New disc size is 400 KB. New disc name is 'humpty'.
Native  *SDCTool SDCNEW D 400K humpty 
Foreign  GoSDCio -dQ -c "NEW DFS DISC humpty 400K" 

Task Create a new, empty ADFS disc
Notes Size must be >= 2 KB and <= 512 MB.
Suppose New disc size is 10 MB. New disc name is 'humpty'.
Native  *SDCTool SDCNEW A 10M humpty 
Foreign  GoSDCio -dQ -c "NEW ADFS DISC humpty 10M" 

Special use

Tool tasks

You run tools to execute a variety of tasks (if needed, refer to mainly the 'Basics' parts of Running tools).

What follows documents the less common tasks (for the more common tasks, refer to Tool tasks). Note that :

Task Add a tape
Notes The source is a file. The file contains an 'ungzipped' UEF file (or the stripped version of it that GoSDCio actually puts on the flash card and exports when doing an extract or backup). Refer to Tapes for more information about tape support.
Suppose Source file name is 'somefile'. New tape name is 'humpty'.
Foreign  GoSDCio -dQ -c "ADD TAPE humpty somefile" 

Task Add a tool
Notes The source is a file. For structural details, refer to the discussion of *SDCTool. Add tools to the flash card if you want to run your own utilities without needing a filing system.
Suppose Source file name is 'somefile'. New tool name is 'humpty'.
Native  *SDCTool SDCATO somefile humpty 
Foreign  GoSDCio -dQ -c "ADD TOOL humpty somefile" 
Variations Use a name that does not clash with names of tools that are stored in another area (in general, avoid names that start with 'SDC').

Task Add a filing system
Notes The source is a file. The file contains a 16 KB sideways ROM image. Add filing systems to the flash card if you want to auto-load your own custom versions of filing systems.
Suppose Source file name is 'somefile'. New filing system number is 200.
Native  *SDCTool SDCAFS somefile 200 
Foreign  GoSDCio -dQ -c "ADD FS 200 somefile" 
Variations Use a number that does not clash with numbers of filing systems that are stored in another area (in general, only use numbers 200 and up). If a supported filing system (refer to Filing systems for the list) is either specified by number or recognized by binary, then the number and binary must match, or the number must be 0 (meaning 'auto detect') and will be replaced with the correct one, or an error is raised.

Task Add a HADFS disc
Notes The source is a file. Use the added disc via HADFS.
Suppose Source file name is 'somefile'. New disc name is 'humpty'.
Foreign  GoSDCio -dQ -c "ADD HADFS DISC humpty somefile" 

Task Delete an object
Notes The object is marked as deleted. This means it will no longer be found, but still occupies storage space (until a backup and restore is performed with GoSDCio).
Suppose The object is filing system 200.
Native  *SDCTool SDCDEL F 200 
Foreign  GoSDCio -dQ -c "DELETE FS 200" 
Suppose The object is tool 'humpty'.
Native  *SDCTool SDCDEL T humpty 
Foreign  GoSDCio -dQ -c "DELETE TOOL humpty" 
Suppose The object is disc or tape 'humpty'.
Native  *SDCTool SDCDEL M humpty 
Foreign  GoSDCio -dQ -c "DELETE MEDIUM humpty" 
Variations Replace 'MEDIUM' with 'DFS DISC', 'ADFS DISC', 'HADFS DISC' or 'TAPE', if you know which one it is.

Task Rename an object
Notes The object name is changed.
Suppose The object is tool 'humpty'. New name is 'dumpty'.
Foreign  GoSDCio -dQ -c "RENAME TOOL humpty dumpty" 
Suppose The object is disc or tape 'humpty'. New name is 'dumpty'.
Foreign  GoSDCio -dQ -c "RENAME MEDIUM humpty dumpty" 
Variations Replace 'MEDIUM' with 'DFS DISC', 'ADFS DISC', 'HADFS DISC' or 'TAPE', if you know which one it is.

Task Extract an object
Notes The object is copied to a file.
Suppose The object is filing system 200. Target file name is 'somefile'.
Foreign  GoSDCio -dQ -c "EXTRACT FS 200 somefile" 
Suppose The object is tool 'humpty'. Target file name is 'somefile'.
Foreign  GoSDCio -dQ -c "EXTRACT TOOL humpty somefile" 
Suppose The object is disc or tape 'humpty'. Target file name is 'somefile'.
Foreign  GoSDCio -dQ -c "EXTRACT MEDIUM humpty somefile" 
Variations Replace 'MEDIUM' with 'DFS DISC N', 'ADFS DISC N', 'HADFS DISC' or 'TAPE', if you know which one it is. If you extract a 400 KB DFS disc or a 640 KB ADFS disc, and the target file should contain an interlaced disc image (refer to Disc images for details), then replace the 'N' in your command line with 'I'.

Task Modify flash card
Notes Makes (subtle) modifications to the flash card. Currently, only one modification is available (more may follow).
Suppose You want to name an area (*SDCInfo will then reflect this). The area is currently selected. The name is 'humpty'.
Native  *SDCTool SDCMOD AN humpty 

Task Copy a disc
Notes Copies the entire contents of one disc to another. This may be useful, for example, if you have a 'work disc' that you regularly 'reset' to an earlier state. The source and target disc must be the same type and size.
Suppose The source disc is 'humpty'. The target disc is 'dumpty'.
Native  *SDCTool SDCCPY humpty dumpty 

Task Backup and restore
Notes Backup copies everything that is stored on the flash card to a directory, as a bunch of files and a 'restore' script (discarding everything that was deleted). Restore is accomplished by executing the script from the backup directory.
Suppose You're doing a backup. Target directory name is 'somedir'.
Foreign  GoSDCio -dQ -c "BACKUP somedir" 
Suppose You're doing a restore. You did a 'cd' to the backup directory.
Foreign  GoSDCio -dQ -f script 

Task Locate disc or tape
Notes Refer to 'SDCMenu', below.
Native  *SDCTool SDCMenu 

Task Build tool command
Notes Refer to 'SDCHelp', below.
Native  *SDCTool SDCHelp 

Task Copy (back) to floppy
Notes Refer to 'SDCFlop', below.
Native  *SDCTool SDCFlop 

Task Update the software
Notes Refer to 'SDCUP', below.
Native  *SDCTool SDCUP 

Task Copy area to area
Notes Refer to 'SDCA2A', below.
Native  *SDCTool SDCA2A 

Task Show flash card details
Notes Refer to 'SDCCard', below.
Native  *SDCTool SDCCard 

Task Lead towards goal
Notes Refer to 'SDCLead', below.
Native  *SDCTool SDCLead 

SDCMenu

This tool allows you to easily locate a disc or tape (and then select it).

Enter any part of the name (using the left and right arrow keys to move around, DELETE to remove a character, SPACE to reset to nothing). Then press RETURN to search. All matches that '*SDCList *blah*' would have brought up (if what you entered is 'blah') will be listed. Choose a match by pressing the key indicated in front of it, or press RETURN to go back to the name prompt. If there are more matches than will fit on screen, the list will end with '...'. Then either enter a bit more of the name, or choose a match anyway.

Choosing a match will execute an *SDCDisc or *SDCTape command, as appropriate, and exit SDCMenu. If you selected a disc, then, assuming a patched filing system is running, subsequently pressing CTRL-SHIFT-BREAK should boot the selected disc. If you selected a tape, enter '*Tape', then 'CHAIN""' or '*Run' as appropriate.

Ideally, SDCMenu is run automatically, by setting configuration variable BOOT to 3. You press CTRL-BREAK to run SDCMenu, then select a disc, then press CTRL-SHIFT-BREAK to boot the selected disc (SDCMenu won't be run this time, because the BOOT setting is ignored when SHIFT is pressed).

SDCHelp

This tool allows you to build a native tool command (in an interactive way).

Simply answer the questions until the appropriate command line is quoted.

SDCFlop

This tool allows you to copy a disc (back) to a real floppy.

Ensure that the original filing system needed to write to your floppy is running (refer to Filing systems if needed).

Press digit keys to make choices from a menu (which will grow a bit along the way) :

Note that if you selected a DFS disc that contains more than one drive (e.g. two, originating from a 'double-sided' disc), you will want to copy both drive 0 and 2 to your floppy.

SDCUP

This tool will update GoSDC's flash ROM (a 'firmware update').

A file named 'UPSDC' provides the actual data. To give SDCUP access to UPSDC, simply copy UPSDC to the root directory of a FAT formatted flash card, and then move the flash card to GoSDC. E.g., on a PC running Windows, simply format your flash card via 'My Computer' (if needed), and then drag UPSDC to it.

Usually, a previous version of the GoSDC ROM will already be running on your machine. If so, GoSDC's ROM number will be determined automatically. If not, you will be asked for it.

After running SDCUP, always power-cycle the machine (switch it off, wait a few seconds, then switch it on again).

SDCA2A

This tool allows you to copy an entire area to another (relocating objects as required).

It is the only way to write to Area U. Numbered areas (on a flash card) can be written to as well, but should the source area contain more than a few MB of data, the copying will take a long time and is better done via GoSDCio (backup one area, restore to another).

Press digit keys to make choices from a menu (which will grow a bit along the way) :

SDCCard

This tool will show interesting flash card details.

SDCLead

This tool will actively help to reach a goal. As used in Quick start.

Tapes

Besides discs, GoSDC supports tapes (read only).

Using tapes via GoSDC involves the following :

Second processors

GoSDC fully supports second processors. In fact, it goes beyond in the following ways :

For more details, refer to the discussion of the relevant configuration variables.

Area U

Area U is basically a user-definable area X.

It has limited storage capacity (normally half a megabyte or so), but is always present. Especially if you want to add your own filing systems or tools, this eliminates the need to put them on all the flash cards you use.

Area U can only be written as a whole. Put its contents in a numbered area N (i.e. on a flash card), then use tool SDCA2A to copy area N to area U.

Reference

Parts and layers

Physically, GoSDC consists of several parts. The most important ones are :

Logically, GoSDC consists of several layers. They are (starting at the 'bottom') :

Filing systems

Filing systems allow users to store and manipulate files (e.g. save, load, delete) on some storage medium (e.g. floppy disc). GoSDC supports a specific set of filing systems. For a list, see below.

Supported filing systems can be 'patched' or 'original'. The patched version of a filing system can access discs on the flash card. The original version of a filing system can be used in the process of copying 'real' discs to the flash card (which can then be used via the patched version).

A filing system can be run by configuring GoSDC to auto-load it into a sideways RAM bank (transparently, on every power up), or in exceptional cases by programming the filing system image into a PROM and plugging that into a sideways ROM socket. To auto-load, use configuration variables FSNR and FSRM. For the PROM way, you can find the filing system image in this directory ('O' = original, 'P' = patched, 'D' = DFS, 'A' = ADFS, version number : see the list below).

Supported filing systems are of either DFS or ADFS type. At any one time, you should not run more than one of each type. Whenever there can be two (e.g. if you auto-load a patched DFS but you also have a DFS ROM in your machine for your disc interface), you must 'unplug' one and 'insert' the other. To unplug and insert, use *SDCSPlug operations 1 and 0 (or *Unplug and *Insert on a BBC Master).

Only one filing system is active on your machine at any one time. Which one is active by default is determined by a key held during power up, or by sideways ROM priority. If you hold a specific key during power up, only a filing system of a specific type will become active (if one is present). Hold 'D' for DFS, or either 'A' or 'F' for ADFS (A will attempt a disc mount, F will not). If no key is held during power up, the filing system with the highest ROM number (15 down to 0) will become active. If no filing system became active, the default filing system (usually the tape filing system) will. Note that you can also switch between filing systems by entering their selection commands (e.g. *DISC for DFS, *ADFS for ADFS, *LFS for LFS). The BBC Master MOS also allows a temporary switch in some commands (e.g. '*LOAD -lfs-myfile' with DFS active would switch to LFS, load 'myfile', and switch back to DFS).

The following filing systems are supported :

Nr Name
1 (BBC B) Acorn DNFS 1.20
2 (BBC B) Acorn DFS 2.26
3 (BBC B) Acorn ADFS 1.30
4 (BBC Master) Acorn DFS 2.24
5 (BBC Master) Acorn ADFS 1.50
6 (BBC Master) Acorn DFS 2.45 (1)
7 (BBC Master) Acorn ADFS 2.03 (1)
8 (BBC B) Watford DFS 1.44
9 (BBC B) ACP DFS 1.00 (2)
10 (Electron) ACP DFS 2.20 (2)
11 (Electron) Acorn ADFS 1.00
12 (All BBCs) HADFS X.YZ (3)

The number is the GoSDC 'internal' filing system number, i.e. it is the appropriate value for configuration variable FSNR and is listed as the subtype of filing system objects in an 'extended' *SDCList. Note that numbers 81 and higher may be used as well (these are the original, unpatched versions of the patched filing systems whose number is 80 less).

(1) Note that DFS 2.45 and ADFS 2.03 are co-dependent (they share routines) and need to be in the machine at the same time, one as an even numbered ROM x, the other as ROM number x + 1. Use configuration variables FSNR/FSRM to auto-load one, and F2NR/F2RM to auto-load the other. On the BBC Master, you would normally use sideways RAM banks 4 and 5.

(2) Note that these are 'E00' filing systems (they leave the default PAGE in an unexpanded machine at &0E00), and have to run in a sideways RAM bank (note that the free ROM bank on GoSDC is not suitable, since it cannot be written to directly).

(3) Note that this allocation is versionless (all versions of HADFS are detected as, and considered to be, the same filing system), and that HADFS contains its own GoSDC driver code (i.e. no 'original' version of the filing system, whose number would be 92, is considered to exist).

Disc images

A disc image is a copy of the contents of a 'real' disc (floppy or hard).

A 'real' disc has a number of surfaces (e.g. a single sided floppy disc has one, a double sided floppy disc has two). A disc drive reads or writes the disc with a 'head', one per surface. Every surface is divided into a number of 'tracks'. Every track is divided into a number of 'sectors'.

Usually, when a 'real' disc is 'imaged', the disc image is written sequentially, but the tracks on the 'real' disc can be read in two different orders : 'all heads per track' a.k.a. 'interlaced' (track N, all heads, track N+1) or 'all tracks per head' a.k.a. 'non-interlaced' (head N, all tracks, head N+1). Note that if there's just one surface, there's no difference between the two.

Disc images on the flash card are always non-interlaced. So, if you're performing a transfer to or from an interlaced disc image file, a conversion needs to take place, from interlaced to non-interlaced or vice versa. The relevant tool will give you a choice between 'N' (non-interlaced) or 'I' (interlaced).

For disc images you download from the Internet, non-interlaced is the norm. 'SSD' or 'Single Sided Disc' images are never interlaced. 'DSD' or 'Double Sided Disc' images are likely to be interlaced. Hard disc images are probably never interlaced.

Sideways ROM/RAM

Different machines have different sideways ROM/RAM systems :

The BBC model B

The standard machine has four sideways ROM sockets (all 16 KB), and no sideways RAM.

Starting at the ROM socket that is closest to the side of the machine, going 'west', the ROM numbers represented by the sockets are : 15, 14, 13, 12.

Only if you installed GoSDC 'with adapter' (refer to the Installation section of this manual for details) you can use the free ROM bank on GoSDC. This should be seen as a sideways ROM bank, but can still be auto-loaded into (via configuration variable FSRM). To find out its number, enter '*SDCInfo', and note the number of the 'free' ROM slot.

The BBC Master

The standard machine has three sideways ROM sockets (two 32 KB, one 16 KB), and four sideways RAM banks. Although not all at the same time, see below.

Starting at the ROM socket that is closest to the cartridge connector(s), going 'north', the ROM numbers represented by the sockets are : 4+5, 8, 6+7. I.e. the sockets for ROM numbers 4+5 and 6+7 are the 32 KB sockets. Whether ROM numbers 4+5 or 6+7 are sideways ROM banks (i.e. reflect what is in the ROM socket) or sideways RAM banks (what is in the ROM socket is irrelevant) is determined by links. If LK18 is set 'west', 4+5 is sideways RAM (or if 'east', ROM). If LK19 is set 'west', 6+7 is sideways RAM (or if 'east', ROM).

Usually, GoSDC is in the socket for ROM numbers 6+7, which means that the GoSDC ROM is ROM number 7, and ROM number 6 is the free ROM bank on GoSDC. This should be seen as a sideways ROM bank, but can still be auto-loaded into (via configuration variable FSRM).

The BBC B+

The standard machine has five sideways ROM sockets (all either 16 or 32 KB, selectable via links), and no sideways RAM.

ROM sockets IC35, IC44, IC57, IC62 and IC68 represent ROM numbers 2+3, 4+5, 6+7, 8+9 and 10+11 respectively, and links 9, 11, 12, 15 and 18 respectively determine whether they are 32 KB sockets (link set 'east') or 16 KB sockets (link set 'west').

If GoSDC is in the socket for ROM numbers x+y, then the GoSDC ROM is ROM number y, and ROM number x is the free ROM bank on GoSDC. This should be seen as a sideways ROM bank, but can still be auto-loaded into (via configuration variable FSRM).

The Electron

You are using an interface between GoSDC and Electron. There are three types :

GoSDC is in the socket for ROM numbers 15+14, which means that the GoSDC ROM is ROM number 15, and ROM number 14 is the free ROM bank on GoSDC. This should be seen as a sideways ROM bank, but can still be auto-loaded into (via configuration variable FSRM).

Running tools

There are two types of tool, 'native' and 'foreign'. Native tools run on your machine. Foreign tools run on a PC.

Native tools : Basics

On your machine, enter *SDCTool followed by the tool name and its arguments, e.g.

 *SDCTool SDCNEW D 400K mydisc 

Note that all changes are made to the current area (as selected with *SDCArea, or 1 by default).

Foreign tools : Basics

On a PC, execute GoSDCio passing the flash card location and a command to execute, e.g.

 GoSDCio -dQ -c "NEW DFS DISC mydisc 400K" 

Note that all changes are made to the specified area (as passed by option '-a', or 1 by default).

Your PC should be connected to a flash card reader, with your flash card inserted.

The following three operating systems are supported (skip to the one your PC uses) :

Windows (7 or later)

Linux (x86/arm versions) macOS (x86 versions)

Native tools : Run as a file

There are two ways to run native tools :

Foreign tools : Passing commands

GoSDCio executes any number of commands, in the order they were passed to it. Every command is either passed by option -c, or a line in a script.

A script is a text file that looks like this :

# start
ADD DFS DISC N Elite C:\GoSDC\Discs\Elite.ssd
ADD DFS DISC N Hopper C:\GoSDC\Discs\Hopper.ssd
ADD DFS DISC N Snapper C:\GoSDC\Discs\Snapper.ssd
# end

There's one command per line. If a line is empty, or starts with a '#', it is ignored.

E.g., if a file 'myscript' contained the example script (see above), then

 GoSDCio -dQ -c "NEW DFS DISC mydisc 400K" myscript 

would 'NEW' mydisc, 'ADD' Elite, 'ADD' Hopper and 'ADD' Snapper, in that order.

Note that order is rarely relevant, but may be in some cases (e.g. if multiple commands target the same object).

Foreign tools : Drive alterations

While adding discs, GoSDCio can perform on-the-fly alterations to all the drives contained within the disc image, using the following commands :

Only 'ADD' commands between the 'DO ...' and the 'DO NO...' will be subject to the chosen alterations.

Foreign tools : Command line options

In addition to -d and -c (discussed here), the following GoSDCio command line options are available :

Star commands

GoSDC is primarily operated by executing 'star commands'.

Star commands can be issued from the command line and from most languages. Enter  *Help GoSDC  to list them all (noting that angle brackets enclose argument types, round brackets enclose what's optional, '|' means 'or' and '...' means unspecified text).

The commands are :

Name Description
SDCInfo displays system information
SDCArea selects the current area
SDCDisc selects the current disc(s)
SDCTape selects the current tape
SDCList lists stored objects
SDCPrefix changes the name prefix
SDCTool executes tools
SDCConfig changes configuration variables
SDCSPlug configures ROM unplug/insert
SDCReset simulates a power up reset
SDCRewind rewinds the current tape
SDCSLoad copies a file to sideways memory
SDCSSave copies sideways memory to a file

*SDCInfo

Displays the GoSDC software version and date, which ROM slots GoSDC occupies, flash ROM and flash card details, and the sizes and names of all available areas.

*SDCArea (<selector>)

Selects area <selector> for subsequent access. If <selector> is not specified, no (new) area is selected.

In all cases the characteristics of the (newly) selected area are displayed (i.e. the total, used and free bytes, and the number of objects).

The areas you can select are X, U and 1 through 8 (refer to Parts and layers for details).

ALWAYS press CTRL-BREAK after selecting an area with *SDCArea. It is highly recommended to enter '*SDCDisc -' as well, at this stage.

*SDCDisc (<name> (A|B|C|D))

Selects disc <name> for subsequent access (by the currently running, patched filing system). The usual * and # wildcards may be used (the first matching disc is selected). If <name> is a single hyphen (-), all disc selections are forgotten (this may occasionally be useful to acknowledge that what was selected is no longer on the flash card, although normally you would simply make new selections). If <name> is not specified, no (new) disc is selected.

The second argument is optional, and defaults to 'A'. It identifies the 'slot' (roughly equivalent to a real floppy or hard drive) that the disc is 'put into'. For DFS, slot A represents drives 0 and 2, slot B represents drives 1 and 3, and slots C and D represent an override for drive 2 and 3 respectively. For ADFS, slots A, B, C and D represent drive 0, 1, 4 and 5 respectively.

In all cases the (newly) selected discs are displayed, as well as the drives found within. DFS and ADFS disc selections are remembered separately.

ALWAYS press CTRL-BREAK after selecting a disc with *SDCDisc. GoSDC does not need this, but the patched filing system might, to notice the disc change.

*SDCTape (<name>)

Is like *SDCDisc, but selects a tape, Refer to Tapes for details.

*SDCList (<name> (F)(T)(M)(O)(A) (X))

Lists all objects matching <name> (default '*'). The usual * and # wildcards may be used.

The second argument (default 'M') allows object type specification : any sequence of the characters F, T, M, O and A (standing for filing system, tool, medium (disc or tape), other (not filing system, tool or medium) and all respectively) lists those object types.

The third argument (no default) selects special listing styles : X selects 'extended' listing (showing 'tt ss aaaaaaaa + ssssssss name', all values hexadecimal, where tt is the object type, ss the object subtype, aaaaaaaa the start address on the flash card and ssssssss the size in bytes).

*SDCPrefix (<name>)

The 'name prefix' may be changed by this command. This affects *SDCDisc, *SDCTape, *SDCList and *SDCTool. The name prefix is what implicitly precedes the <name> specified in the affected commands. If <name> is a single hyphen (-), the name prefix is cleared (this is also the default). If <name> is not specified, no (new) name prefix is set.

In all cases the (new) name prefix is displayed.

E.g. suppose you have three discs, named 'Acornsoft.Hopper', 'Acornsoft.Elite' and 'Aardvark.Frak'. Setting the name prefix to 'Acornsoft.' (note the trailing dot !) would cause '*SDCDisc Hopper' to select the first disc, and '*SDCList *' to list the Acornsoft discs only (as if you had entered '*SDCDisc Acornsoft.Hopper', and '*SDCList Acornsoft.*').

Note that a leading '$' in the name specified to *SDCDisc, *SDCTape, *SDCList and *SDCTool will skip the matching of the name prefix (and the '$' is discarded). E.g. if the prefix is 'A.', then the name '$!Boot' matches '!Boot' only, not 'A.!Boot'.

*SDCTool <name> ...

Runs tool <name>, relaying whatever follows <name>. The usual * and # wildcards may be used (the first matching tool is run).

Tools run with *SDCTool are always copied to memory address &2000. Tools starting with an &0D byte are considered to be BASIC programs, and are executed by inserting 'PAGE=&2000<CR>OLD<CR>RUN<CR>' into the keyboard buffer. All other tools are considered to be machine code utilities, and are executed by calling &2000 after poking a 2-byte pointer to the command line tail to ?&2003 (low byte) and ?&2004 (high byte) (so there better be, e.g., a JMP &2005 at &2000).

Note that, if you want to run a non-standard tool, i.e. one that is not present in 'Area X', it must be present in 'Area U' or on the flash card (put there by you with a tool).

Also note that you can auto-execute an *SDCTool command on every BREAK by using configuration variable BOOT.

*SDCConfig (<name> <value>)

Changes the value of configuration variable <name> to <value>, or (with no arguments) lists all configuration variables. Refer to Configuration variables for details.

*SDCSPlug <slot> <oper>

Configures 'plug' operation <oper> (0 through 2) for ROM number <slot> (0 through 15).

Plug operation 0 means 'nothing' (and is the default for all ROMs), 1 means 'unplug', 2 means 'reinsert'. You can read about the main use case for 'unplug' in Filing systems. You can use 'reinsert' if the OS automatically 'unplugs' the specified ROM because it looks like an alias of another ROM (but isn't).

Always press CTRL-BREAK after using *SDCSPlug. Note that the GoSDC ROM should have the highest possible ROM number in the machine, since it can only reliably affect the 'plug' state of ROMs with lower ROM numbers. Note that on the BBC Master, *Unplug and *Insert can be used instead of plug operations 1 and 0, respectively.

*SDCReset

Simulates a power up reset. Use this in preference to a power-cycle (switching power off, then on again).

*SDCRewind

This 'rewinds' the currently selected tape. See also '*SDCTape'.

*SDCSLoad <slot> <file>

Copy file <file> to ROM slot <slot>.

Note that this uses memory locations &0A00 through &0AFF as a temporary buffer. This means that you cannot use RS423 or cassette input while using this command.

*SDCSSave <slot> <file>

Copy ROM slot <slot> to file <file>.

Note that this uses memory locations &0A00 through &0AFF as a temporary buffer. This means that you cannot use RS423 or cassette input while using this command.

Configuration variables

GoSDC can be tweaked by changing 'configuration variables'.

Configuration variables have a name (of four characters) and a value (between 0 and 255) and can be changed through *SDCConfig. After a GoSDC software update (with tool SDCUP) or holding the 'G' and 'W' keys on power up, all values are reset to 0, which configures default behaviour.

The variables are :

Name Description
FSNR sets the number of the filing system to auto-load
FSRM sets the number of the ROM slot to auto-load into
F2NR like FSNR, but for a second filing system
F2RM like FSRM, but for a second filing system
BOOT selects the activity to perform on booting
SLOW sets the artificial delay used in tape loading
WPRO selects the flash card write protection level
TUBE selects the speed of Tube bulk transfers
COPR specifies your co-processor type (if needed)
HACK should be left alone in normal circumstances
EIRD allows RAM bank disabling (Elk2GoSDC only)

FSNR and FSRM (F2NR and F2RM for a second filing system, if any)

These variables control the filing system auto-load function. With this, a filing system can be automatically loaded, into either a sideways RAM bank, or the free ROM bank on GoSDC. This will occur on every power up.

A sideways RAM bank must be writable simply by selecting it, which is true for most sideways RAM upgrades for the BBC B/B+, the BBC Master sideways RAM system, and the sideways RAM on the interface between GoSDC and Electron. Refer to Sideways ROM/RAM for more details specific to your machine.

FSNR Auto-load what
0 nothing
1 filing system 1
2 filing system 2
... ...
255 filing system 255

Refer to Filing systems for a list of filing system numbers.

FSRM Auto-load into
0 ROM slot 0
1 ROM slot 1
... ...
15 ROM slot 15
others reserved

E.g. set FSNR to 3 and FSRM to 4 to auto-load ADFS 1.30 into ROM slot 4.

Note that, if you auto-load a non-standard filing system, i.e. one that is not present in 'Area X', it must be present in 'Area U' or on the flash card (put there by you with a tool).

BOOT

This variable selects a boot activity, which is performed on every power up or BREAK.

BOOT Activity
0 none
1 execute '*SDCTool $!Boot' (1)
2 execute '*SDCDisc $!Boot' (2)
3 execute '*SDCTool $SDCMenu'
others reserved

(1) This is similar to using '*OPT 4 2' on disc filing systems.

(2) This may be useful, for example, if you want to run an alternative 'menu' program. E.g. put it as 'MyMenu' on a disc named '!Boot', put 'CHAIN "MyMenu"' in the disc's !Boot file, issue '*OPT 4 3', and go : CTRL-BREAK (the '!Boot' disc is now selected), SHIFT-BREAK ('MyMenu' now runs), and, when you've selected a disc, CTRL-SHIFT-BREAK (the selected disc now boots).

Note that the '$' causes the 'name prefix' to be ignored, so it cannot affect the boot activity (refer to the discussion of *SDCPrefix for details).

Press SHIFT during power up or BREAK to suppress the boot activity (e.g. in case your !Boot malfunctions).

SLOW

This variable selects the length of the artificial delay in returning 'tape bytes' to the Tape filing system (refer to Tapes for details).

0 is the minimum delay, 255 is the maximum delay. You may want to use a non-zero value if the tape loading speed is to appear more 'realistic'.

Values that approximate the speed of the standard 1200 baud tape system are around 128 (this includes the roughly 1 second gap between blocks) or 94 (excluding the gap). Note that gaps are not emulated. There is only a delay per byte. I.e. 94 is more accurate in terms of the signalling rate, while 128 results in a more accurate block rate.

WPRO

This variable configures flash card write-protection.

WPRO Writing is
0 passed
1 silently ignored
2 faulted with an error
3 silently ignored (1)
4 faulted with an error (1)
others reserved

(1) Only if the SD or SDHC card is physically 'write protected', via the 'Lock' switch.

TUBE

This variable selects the speed of bulk transfers across the Tube (i.e. when data is transferred between a file and your second processor's memory). 2-byte transfers are almost twice as fast (75 KB/sec) as 1-byte transfers (40 KB/sec), and should (theoretically) be supported by all second processors.

TUBE Transfer speed
0 1-byte
1 1-byte
2 2-byte
255 warp (1)
others reserved

(1) This is an experimental (and possibly unreliable) setting that reaches dizzying transfer speeds of well over 200 KB/sec. It seems to work OK on ARM7TDMI coprocessors, ReCo6502 second processors at 14 MHz, and all my 'soft' second processors at their highest clock speed. But do not trust this setting while working with valuable data.

COPR

You should generally leave this at 0.

It allows you to specify which type of co-processor you are using.

COPR Coprocessor type
0 Unspecified
1 6502 Second Processor
2 65C102 Co-processor
3 Z80 Second Processor
4 80186 Co-processor
5 32016 Second Processor
6 ARM Evaluation System
7 ReCo6502
8 ARM7TDMI Co-processor
others reserved

Normally, GoSDC doesn't need to know. However, if it's a 32016 Second Processor, it does need to know. The 32016 Second Processor cannot handle the maximum transfer speeds that Acorn documented for the Tube. GoSDC operates at those maximum speeds, so it needs to be 'throttled down'. I.e., if you're using GoSDC and a 32016 Second Processor at the same time, you must set COPR to 5. You may want to set TUBE to 2 as well.

HACK

You should generally leave this at 0.

It contains eight 'hack bits', which, when set, enable certain drastic changes in the behaviour of the GoSDC ROM. To set bit 0, 1, 2, 3, 4, 5, 6 or 7 in the value, add 1, 2, 4, 8, 16, 32, 64 or 128 to it, respectively.

Bit Effect when set
0 MMC only mode (1)
others reserved

(1) Bypasses the SD/SDHC initialisation/detection code, which may confuse some very old MMCs.

EIRD

You should generally leave this at 0.

It is only available on the Electron, and only effective when the new type Elk2GoSDC is used.

It contains eight 'disable bits', which, when set, disable the corresponding RAM banks on the interface, so the sideways ROM slots they use won't interfere with those used by other hardware expansions (e.g. ROM/RAM boxes). Only bit pairs can be set. To set bit 0+1, 2+3, 4+5, or 6+7 in the value, add 3, 12, 48, or 192 to it, respectively. This disables the RAM banks mapped to sideways ROM slots 0+1, 2+3, 6+7, or 12+13 respectively.

Error messages

The GoSDC ROM issues the following errors :

The GoSDC ROM shows the following alerts (after reset, at the top of the screen) :

How to recover

If the contents of the GoSDC flash ROM have become corrupted, your machine may hang on power up, and recovery may seem impossible.

Fear not. This problem has been foreseen. GoSDC can be switched to 'write only' mode, so the corrupted flash ROM contents can no longer hang the machine, but can still be overwritten. SDCUP is the tool to use (refer to its discussion for details).

Follow the following recipe :

1) Power down.

2) Move the 'enable/disable' jumper on GoSDC's configuration header (refer to the Installation section for details) to pins 2+4.

3) Power up. Your machine should no longer hang, but GoSDC has 'gone' as well.

4) Run SDCUP *.

5) Power down.

6) Move the 'enable/disable' jumper on GoSDC's configuration header back to pins 4+6.

7) Power up. Your machine should no longer hang, and GoSDC is back in action.

* Note that, since GoSDC is temporarily unavailable, you need a way to transfer SDCUP to your machine. If there is no way, you may want to consider making a Tool ROM (burn TOOLROM into a 16 KB PROM and plug that into a free sideways ROM slot) and run SDCUP from there (enter  *ROM ,  *OPT 1 2  and  *Cat  to list, and enter e.g.  CHAIN "SDCUP"  to run). You will find the relevant files in the appropriate subdirectory of this directory.

What is remembered

Choices made through *SDCConfig, *SDCSPlug, *SDCPrefix, *SDCDisc and *SDCTape are stored in non-volatile memory, so they are remembered even when the machine is powered off. After a GoSDC software update (with tool SDCUP) or holding the 'G' and 'W' keys on power up, they are forgotten again.