# Command Line Options

The following command line options can be passed to BeebEm:

Option | Description
--- | ---
-Data <directory> | Use a specified data directory and set as the new default data directory
-CustomData <directory> | Use a specified data directory without changing the default data directory
-Prefs <file> | Preferences file to load. This can be a file name, relative to the data directory, or a full path name
-Roms <file> | ROMs configuration file to load. This can be a file name, relative to the data directory, or a full path name
-Model <model> | Sets the model, from one of the following values: ModelB, BPlus, IntegraB, Master128, and MasterET. This option overrides the setting in the Preferences file.
-Tube <tube> | Sets the second processor, from one of the following values: None, Acorn65C02, Master512CoPro, AcornZ80, TorchZ80, AcornArm, and SprowArm. This option overrides the setting in the Preferences file.
-EconetCfg <file> | Econet config file to load. This can be a file name, relative to the data directory, or a full path name
-AUNMap <file> | Econet AUN map file to load. This can be a file name, relative to the data directory, or a full path name
-EcoStn <station> | Econet station number
-EcoFF <timeout> | Econet flag fill timeout, see the Econet Support section
-FullScreen | Start in full screen mode
-DisMenu | Disables the drop down menus
-KbdCmd <cmd> | Keyboard command string to run (see below)
-NoAutoBoot | Disable auto-boot when disk image specified
-AutoBootDelay <milliseconds> | Sets a delay between initial boot and Shift+Break to boot disk if disk image file specified
-StartPaused | Starts BeebEm with the emulation paused. Other boot actions occur after emulation is unpaused
-DebugScript <file> | Open debugger and execute the commands
-DebugLabels <file> | Load VICE or Swift / BeebAsm format labels
-DebugTubeLabels <file> | Load VICE or Swift / BeebAsm format labels for the Tube coprocessor
-Log [<file>] | Creates a debug log file. This is generally only useful for the developers of BeebEm. The <file> option can be a file name, relative to the data directory, or a full path name. If omitted, the default file name BeebEm.log is used
<disk image file> | Disk image file to load. Two files can be specified for drives 0 and 1
<tape file> | Tape file to load
<state file> | Save state file to load

If you create a shortcut to BeebEm.exe on your desktop and edit the properties (right click the icon) you can add command line options and a disc, tape or state file name to the target box. Running the shortcut will then run the file.

These command lines can be put into Windows scripts. See the BeebEmLocal.vbs and BeebEmTorch.vbs scripts for examples.

The BeebEm installer allows you to associate files with .ssd, .dsd or .uef extensions with BeebEm. Double clicking on one of these files will automatically run it in BeebEm.

## Command line examples

Run Zalaga with its own preferences:

> `BeebEm -Prefs ZalagaPrefs.cfg Zalaga.ssd`

Run the Torch Z80 with its own preferences:

> `BeebEm -Prefs Torch.cfg -Roms Roms_Torch.cfg`

Run BeebEm with an alternative set of data files:

> `BeebEm -Data \Users\Mike\Documents\BeebEmGames`

Run BeebEm from a USB drive and access the local USB drive data:

> `BeebEm -Data -`

Load and run the test tape image:

> `BeebEm -KbdCmd "OSCLI\s2\STAPE\s2\S\nPAGE=3584\nCH.\s22\S\n" test.uef`

## Command Line Parameter Notes

If the data directory specified using the -Data or -CustomData option does not exist, BeebEm will offer to create it. BeebEm will copy a default set of data to the data directory. The default data directory is My Documents\BeebEm. If a data directory of "-" is specified BeebEm will use the UserData directory where the BeebEm.exe file exists (this is useful for running from a USB drive).

The -Data option tells BeebEm to use a new data directory as the default data directory. The default is stored in the Windows Registry under HKEY_CURRENT_USER\Software\BeebEm\UserDataFolder. The -CustomData option tells BeebEm to use a new data directory without changing the default.

If a disk image or a state file name is passed to BeebEm on the command line it will be run automatically (but see -NoAutoBoot option). The name can include the full path or it can just be the name of a file in the DiscIms or BeebState directory.

If a tape image name is passed to BeebEm on the command line it will be loaded. The name can include the full path or it can just be the name of a file in the Tapes directory. To run the tape image use the -KbdCmd option.

The -StartPaused option is useful if you are scripting the launch of BeebEm and you want to manipulate the window, its position or perform other tasks before the emulated machine boots. In this kind of script, launch BeebEm, then send an Alt+F5 keypress when you are ready to un-pause. For example, if using AutoHotKey, including the following in your script will toggle the pause state:

> `SendInput !{F5}`

If -StartPaused is used, the timer for -AutoBootDelay will start after unpausing, but will reset if paused again. The -KbdCmd option will also only apply when the emulator is unpaused for the first time.

## Startup Key Sequence

The -KbdCmd option allows a string of key presses to be passed to BeebEm. The string can include the following key sequences:

String | Key Sequence
--- | ---
\n | Press and release of `Return`
\s | Press `Shift`
\S | Release `Shift`
\c | Press `Control`
\C | Release `Control`
\\ | Press and release of `\` key
0-9 | Press and release of a number key
A-Z | Press and release of a letter key
'-=[];'#,./ | Press and release of a symbol key
\dNNNN | Set inter-keypress delay to NNNN milliseconds. Note that very low delays can result in loss of presses

So, for example, run a tape image using commands such as:

> `BeebEm -KbdCmd "OSCLI\s2\STAPE\s2\S\nPAGE=3584\nCH.\s22\S\n" test.uef`

> `BeebEm -KbdCmd "OSCLI\s2\STAPE\s2\S\nOSCLI\s2\SRUN\s2\S\n" game.uef`