Introduction and Overview
This chapter groups the commands that run RISC OS locally through the optional Pyromaniac runtime. Some commands start a fresh one-shot environment for a single command or program, while others keep one Pyromaniac instance alive so that later commands can reuse its state.
Technical Details
One-shot runtime wrappers
riscos-run, riscos-basic, and riscos-gos are the high-level wrappers for everyday local execution. They all start a fresh RISC OS instance, map the current host directory into the runtime view, and then exit when that one command or interactive session ends.
All three refuse to run from any directory other than the project root, /riscos-source, reporting only expects to run within /riscos-source if invoked elsewhere. The lower-level pyro command has no such restriction.
Persistent Pyromaniac sessions
pyro-server and pyro-client are for repeated command execution inside one long-lived Pyromaniac session. That workflow is useful when you want loaded modules, variables, current directory, or application state to persist across more than one command.
Low-level control with pyro
pyro is the lowest-level command in this group. It exposes the Pyromaniac configuration, module-loading, debug, inspection, and execution controls directly, so it is the right tool when the convenience wrappers are no longer precise enough.
Configuration and trace workflow
The low-level commands share one underlying configuration model. It can be driven with individual --config settings, with a safer host-protection baseline through --config-safe, or with YAML files supplied by --config-file. Those YAML files can define configuration values, startup variables, modules to load, and ordered execution actions.
Tracing and debugging are mainly driven through --debug, --boot-debug, and the in-system PyromaniacDebug command. The trace output, exception reports, watchpoints, and tracepoints are described in Appendix X: Pyromaniac tracing.
Commands
-vnc | - | Enable the VNC graphics configuration for this run when VNC support is available. |
-config | - | group.key=value: Set one Pyromaniac configuration value before the command runs. |
-config-safe | - | Apply the safer host-protection baseline before later configuration overrides. |
-config-file | - | file: Read YAML configuration, variables, modules, and execution actions from a file before the command runs. |
-set-variable | - | name=value: Define a RISC OS system variable before command execution. |
-load-module | - | path: Load a module into the RMA (Relocatable Module Area, the dynamic area RISC OS uses for runtime-loaded modules; see Glossary) before the command executes. |
-debug | - | debug-list: Enable one or more comma-separated Pyromaniac debug options during initialisation. |
<riscos-command> | - | RISC OS command to execute, using RISC OS command and filename conventions. |
<argument> | - | Additional arguments appended to the RISC OS command string. |
riscos-run is the simplest local runtime command. It starts a clean RISC OS instance, sets the current RISC OS directory from the host working directory, and executes one command line inside that session.
The normal form is riscos-run <riscos-command>. If Pyromaniac options must be supplied first, place them before -- so the wrapper knows where the RISC OS command begins. If no arguments are supplied, the wrapper falls back to the interactive gos shell mode.
Everything after the command position is joined into one RISC OS command line, so ordinary host-shell quoting is still needed when the RISC OS command contains spaces or shell metacharacters. Output and return status are reflected back to the host shell in the normal way.
VNC can be enabled explicitly with --vnc, or implicitly through ROBUILD_VNC when the environment is configured to expose graphics sessions. Other pyro switches can also be passed through before the separator when the wrapper needs lower-level control.
-vnc | - | Enable the VNC graphics configuration for this BASIC session when VNC support is available. |
<basic-argument> | - | Arguments appended to the RISC OS *BASIC command line, such as -quit or -chain. |
riscos-basic is the convenience wrapper for starting BBC BASIC locally inside the build environment. With no arguments it opens an interactive BASIC prompt. With arguments it invokes the RISC OS *BASIC command using those arguments.
This is a one-shot wrapper like riscos-run, not a persistent session. It is therefore a good fit for quickly running one textual or tokenised BASIC program, or for checking a short interactive BASIC sequence in a clean environment.
The program named on the command line may be a tokenised BASIC file, usually suffixed ,ffb, or a textual BASIC file, usually suffixed ,fd1. The runtime command itself still uses the RISC OS leafname.
The command line is appended directly to the RISC OS *BASIC command, so common forms such as -quit and -chain behave as they would on a native system. The same wrapper-level --vnc behaviour described for riscos-run also applies here.
The wrapper passes arguments through directly to *BASIC. This entry documents the wrapper behaviour, not the full native *BASIC command reference.
-vnc | - | Enable the VNC graphics configuration for this Supervisor session when VNC support is available. |
riscos-gos starts an interactive Supervisor prompt in a fresh Pyromaniac instance. It is the high-level wrapper for manual command-by-command work when you want something closer to a booted RISC OS command line than a one-shot wrapper provides.
The wrapper loads the default runtime configuration and the extra gos.pyro configuration needed for the shell-style environment, including system boot and the reset behaviour expected for an interactive session. The session ends when the usual RISC OS quit command is used.
Unlike pyro-server, this is still a single attached session. When the shell exits, the Pyromaniac instance is discarded rather than being reused for later host-side commands.
-help-exit-codes | - | Show the special exit codes that Pyromaniac may return when it is not returning the program's own exit status. |
-help-config | - | config: Show configuration help. When a configuration name is supplied, show help for that configuration entry or group. |
-debug | - | debug-list: Enable one or more comma-separated debug options during initialisation. With no value, all debug options are enabled. |
-boot-debug | - | debug-list: Enable one or more comma-separated debug options after booting. With no value, all debug options are enabled. |
-list-debug | - | List the available debug option names. |
-config | - | group.key=value: Set one configuration value. |
-config-safe | - | Apply the safer host-protection baseline before later configuration overrides. |
-config-file | - | file: Read configuration, variables, modules, and execute actions from a YAML configuration file. |
-list-actions | - | List the action names available for configuration-file and command-line execution plans. |
-list-config | - | config: List configuration values. When a configuration name is supplied, list only that configuration entry or group. |
-list-config-set | - | List only configuration values that are currently set. |
-set-variable | - | name=value: Define a system variable before execution starts. |
-set-variable-encoded | - | name:encoding=value: Define a system variable after converting the value from UTF-8 to the supplied encoding, or ISO-8859-1 if no encoding is supplied. |
-appsize | - | size: Set the amount of memory to use for application space. |
-list-variables | - | List variable values. |
-no-main-thread | - | Disable the main thread. |
-version | - | type: Show the Pyromaniac version. Use full for the extended form. |
-list-swis | - | List SWIs that have handlers. |
-list-vectors | - | List vectors that have handlers. |
-list-handlers | - | List the handler groups that have been registered. |
-list-registered | - | handler: List the registered reasons for one handler group. |
-list-handler | - | handler: List all known reasons for one handler group, marking those currently registered. |
-list-commands | - | List known commands. |
-list-implementations | - | system: List system implementations and their names, or list the implementations for one named system. |
-list-iic-devices | - | List the IIC device names that can be enabled. |
-list-memory | - | List the memory map managed by Dynamic Areas. |
-list-resources | - | List internal resources. |
-list-modules | - | List loaded modules. |
-list-internal-groups | - | List the internal module groups. |
-list-rom-modules | - | List resident ROM modules. |
-list-sysrqs | - | List supported SysRq commands. |
-list-irqs | - | List known IRQs. |
-load-internal-modules | - | Load all supplied internal modules. |
-load-internal-group | - | group: Load one internal module group. Repeat the option or supply a comma-separated group list. |
-load-rom-module | - | path: Load one module into ROM, where it runs directly from ROM without occupying RMA space. |
-load-module | - | path: Load one module into the RMA (see the Glossary), the dynamic memory area for runtime-loaded modules. |
-load-pymodule | - | module: Load one Python module by filename or module name. |
-action | - | action: Execute one named action with its arguments. |
-preload-python | - | python: Preload Python code before other initialisation. |
-enter-module | - | module: Enter one loaded module. |
-command | - | command: Execute one RISC OS command. |
-gos | - | Enter the Supervisor prompt with *GOS. |
-run-native | - | path: Execute an absolute or utility from the native filesystem. |
<executable-name> | - | Optional host-side RISC OS binary to run directly after startup. |
<argument> | - | Arguments passed to the executable or execution action. |
pyro is the low-level Pyromaniac entry point exposed directly by the environment. It starts a fresh RISC OS instance, applies requested configuration, loads modules or PyModules, and then executes commands, entry points, or binaries inside that instance.
Execution actions supplied on the command line are grouped by type rather than taken strictly in argument order. If exact sequencing matters, use --action or a configuration file. For persistent command-serving sessions, move to pyro-server instead.
A bare pyro invocation with only --load-module boots a minimal environment that supplies almost no commands beyond GOS, even after loading an ordinary module: things such as Modules and Help are not available because the supporting internal modules that normally provide them are not loaded. Add --load-internal-modules to boot the fuller internal module set before loading your own module, or list what is actually available first with --list-commands.
YAML configuration files passed to --config-file can contain the top-level keys config, variables, modules, and execute. The modules section can load RMA, ROM, internal, or Python modules, and the execute section can express ordered actions such as commands, system boot, input injection, waits, resets, and host-file execution.
Useful debug names commonly used in practice include start, execute, swi, trace, traceswi, traceswiargs, fsexpand, fspath, fssave, tickers, vectors, and modcommands.
Advanced wrapper-specific environment variables include PYROMANIAC_ISOLATED, PYROMANIAC_NO_PRIVATE_PKGS, PYROMANIAC_ENVDIR, PYROMANIAC_RUN, and PYROMANIAC_RUNSHELL.
Use --list-actions, --list-debug, --list-config, and --help-config when you need the exact runtime-generated detail for action payloads, debug names, or configuration keys.
-config | - | group.key=value: Set one configuration value before the server starts. This is also how the pyroserver.port, pyroserver.report_rc, and pyroserver.change_directory settings are selected. |
-config-file | - | file: Read YAML configuration, variables, modules, and execute actions from a file before the server starts. |
-set-variable | - | name=value: Define a system variable before client commands begin to run. |
-load-module | - | path: Load one module into the RMA before the server starts serving commands. |
-load-pymodule | - | module: Load one Python module by filename or module name before the server starts serving commands. |
-debug | - | debug-list: Enable one or more comma-separated debug options during initialisation. |
-boot-debug | - | debug-list: Enable one or more comma-separated debug options after booting. |
-command | - | command: Execute one RISC OS command during startup before the server settles into command-serving mode. |
-gos | - | Enter the Supervisor prompt with *GOS during startup. |
<host-command> | - | Optional host command to run while the persistent server remains alive. If omitted, the current shell is started. |
<argument> | - | Arguments passed to the host command. |
pyro-server starts a long-lived Pyromaniac environment and keeps it alive while a host shell or host command runs. During that time, pyro-client can send RISC OS commands into the same live instance without restarting Pyromaniac for each command.
The command accepts the same core switch set as pyro before --. After that separator, the remaining words name the host command to run instead of opening an interactive shell.
Every command sent through pyro-client sees the same RISC OS state, so loaded modules, system variables, current directory, and application state persist from one client call to the next. When the host shell or host command exits, the server session is terminated.
Important server-side controls live in the pyroserver configuration group:
| Setting | Meaning |
|---|---|
| pyroserver.report_rc | Controls how the return code is reported to the client. One of no (not reported), osc (reported at exit with the VT escape sequence OSC 20306;<code>BEL), osc-request (the default: as osc, but only if the client first sends OSC 20306 BEL to request it), or text (printed as <return-code>). |
| pyroserver.port | Selects the server port. The default is 18794. |
| pyroserver.change_directory | Controls whether the current host directory is mirrored into the RISC OS environment before each client command. |
<riscos-command> | - | RISC OS command line to send to the currently running server session. |
pyro-client is the companion command to pyro-server. It sends one RISC OS command line into an already-running persistent Pyromaniac session.
Because the server remains alive, later client invocations can reuse the same modules, variables, filesystem state, and process state established by earlier commands. This is the main reason to use the server/client pair instead of repeated riscos-run calls.
Input and output are forwarded through the client, so pipes and interactive commands are supported. If the RISC OS command reports an error, the client normally returns status 1, unless the server configuration is set to suppress that, return a more specific code, or print the return code textually.
By default the client also mirrors the current host working directory into the RISC OS environment when that directory is inside the visible filesystem tree. Pressing control-C sends an escape character to the running RISC OS command, and the client requests return-code reporting from the server using a private OSC escape protocol.
The return-code and directory-mirroring behaviour are therefore configured on the server side rather than by client-only switches.
-h | - | Display the command syntax. |
-s | - | Restrict output to modules that appear to handle the specified service number. The number may be decimal, or hexadecimal when prefixed with &. |
riscos-modservices inspects the live resident module chain and reports which service calls each module appears to handle. It is a runtime debugging tool for identifying service ownership, checking handler coverage, or confirming which module claims a particular service number.
Without a filter, the command lists every service number it can determine for resident modules that have service handlers. With -s, it prints only the modules that appear to handle that one service value.
Each output line begins with the module name followed by one or more service numbers written in hexadecimal with an & prefix. For non-standard handlers, the first reported service may be prefixed with an annotation character: * means a non-standard entry sequence was decoded successfully, - means a handler was present but no handled services could be determined, ? means the handler could not be interpreted reliably, and ! means a standard service entry with no service list pointer.
The command requires a live RISC OS environment because it enumerates currently resident modules and inspects their service handlers. It is therefore complementary to pyro --list-modules: use --list-modules to see what is loaded, and riscos-modservices to inspect service-handler ownership.
Examples
Starting a persistent session and reusing loaded state
This is the normal pattern when repeated commands should see the same modules and variables.
pyro-server --load-module modules/BASIC,ffa
pyro-client "Help Modules"
pyro-client /MyProgram