-
-
Notifications
You must be signed in to change notification settings - Fork 90
Command Line Arguments
To run CEmu from the command line, use the name of the CEmu program followed by the desired switches. Some switches require an additional argument, as shown below.
CEmu <switches>
-s <file>, --send <file>
Sends the file to the emulator. This may force a calculator reset. To specify multiple files, use multiple switches, i.e:
-s <file 1> -s <file 2> -s <file n>
-a <file>, --send-arch <file>
Behaves just like the -s switch, but forces files to be stored in the archive.
-m <file>, --send-ram <file>
Behaves just like the -s switch, but forces files to be stored in RAM.
-r <rom file>, --rom <rom file>
Forces CEmu to load a new rom rather than the preconfigured ROM image.
-t <autotester file>, --auto-test <autotester file> [--no-test-dialog]
CEmu forces a calculator reset and executes the file with the AutoTester. --no-test-dialog is optional and suppresses the output of the test statistics from the AutoTester.
--lua-script <script>
Runs a Lua script after the emulator is initialized. This switch may be repeated to run multiple scripts and can also be sent to an existing CEmu process with --id.
-g <settings file>, --settings <settings file>
Uses an external ini file to load the configured settings. This switch is ignored when sending commands to an existing CEmu process.
--no-settings
Does not restore or save settings for this run.
-i <image file>, --image <image file>
CEmu uses the supplied image file to begin emulation.
-d <debug file>, --debug-info <debug file>
Imports the debugging information for the CEmu debugger.
--speed <percentage>
Sets the emulation speed percentage. The value is clamped to the range 0 through 500; the command-line help recommends increments of 10.
-u, --unthrottled
Sets CEmu to run at unthrottled speed after boot.
-n, --no-state
Does not load the saved image state from disk.
--reload-rom
Forces a ROM reload.
--no-reset
Does not reset before sending files or starting an AutoTester run. This may cause emulated crashes if the calculator is not at the home screen.
-c <id>, --id <id>
Command line arguments are routed to the specified CEmu id. This allows you to send commands directly to a current CEmu process. The id is specified in the title of the window; i.e. CEmu | Calculator would have id Calculator.
--ipc-only
Sends commands only to an existing CEmu process with the selected id. If that process is not running, CEmu reports an error instead of creating a new emulator instance. The default id is Calculator when --id is omitted.
--screenshot <file>
Saves a PNG screenshot of the calculator display to the given path. This is an IPC-only command for an already-running process; it is normally used with --id and --ipc-only.
--launch <prgm>
Launch the program specified by prgm.
--keys <sequence>
Presses physical calculator keys from a comma-separated sequence.
Examples:
--keys clear,clear,clear,1,2,3,+,4,5,6,enter
--keys 2nd,mode,delay:250,enter
--keys down:right,delay:100,up:right
The sequence parser is exact and case-sensitive. It does not trim spaces.
Supported sequence steps:
-
keyNameorpress:keyName: press and release a key -
delay:<ms>: wait for the specified number of milliseconds -
hold:keyName:<ms>: hold a key for the specified number of milliseconds, then release it -
down:keyName: press and hold a key -
up:keyName: release a key
Accepted key names:
graph, trace, zoom, window, wind, y=, yequ, 2nd, mode, del,
on, sto, ln, log, ^2, sq, -1, inv, math, alpha,
0, 1, 4, 7, comma, sin, apps, xton, xtn,
dot, 2, 5, 8, lpar, cos, prgm, stat,
(-), neg, 3, 6, 9, rpar, tan, vars,
enter, +, add, -, sub, *, mul, /, div, ^, pow, clear, clr,
down, left, right, up
The literal punctuation key names ,, ., (, and ) are also accepted, but , cannot be used directly in --keys because comma separates sequence steps. Use comma instead.
When used with --id, the key sequence is sent to the matching running CEmu process.
--usb <selector|disconnect>
Connects a physical USB device selected by VID:PID or bus#address. Pass disconnect to disconnect the current physical USB device. This can also be sent to an existing CEmu process with --id.
--fullscreen <mode>
Selects the startup display mode: 0 for a normal window, 1 for the full application in fullscreen, or 2 for the calculator LCD in fullscreen. Other values are ignored.
--reset
Deletes CEmu's configuration directory before startup, resetting its configuration files.
-v, --version
Prints the CEmu version and Git revision, then exits.
-?, -h, --help
Lists all available command line arguments, then exits. -? is available on Windows.