saturnus 0.8.1

The saturnus emulator of HP calculators on the command line: run ROMs, play key scripts, save screens, serve the serial port and the control API
saturnus-0.8.1 is not a library.
Visit the last successful build: saturnus-0.1.0

saturnus

The saturnus command: an emulator of the HP Saturn calculators (HP 48SX, 48GX, 49G, 38G, 39G, 40G, 42S, 27S, 17BII, 17B, 28S and 19BII) for the command line, built on saturnus-core. Part of saturnus, which also runs in the browser (https://ractive.ch/saturnus/) and as a desktop app.

cargo install saturnus

Prebuilt binaries for Linux, macOS and Windows are on the releases page.

ROMs

No ROM is included. saturnus rom fetch downloads the ROM files HP allows for emulator use (48SX, 48GX, 38G, 49G, 39G/40G) from hpcalc.org after asking, and checks their size and SHA-256:

saturnus rom fetch --model 48gx --dir roms

The 42S, 27S, 17BII, 17B and 28S ROMs were never released: read the ROM out of your own calculator. The 19BII cannot read out its own ROM; use a ROM file you already have.

What it does

# Start, play a key script, save the screen (text or PNG) and the state.
saturnus run --model 48gx --rom roms/gxrom-r --keys keys.txt \
    --screen out.png --save boot.state

# Serve the serial port (tcp:4841, for Kermit clients) and the control
# API (HTTP + JSON on 127.0.0.1:4840) until Ctrl-C.
saturnus run --model 48gx --rom roms/gxrom-r --serve

# Control the running calculator: keys, screen, stack.
saturnus ctl --help

# Look up a built-in command (48SX, 48GX, 49G, 28S): description, stack
# effect, menu, examples run in saturnus, manual pages. A function of
# the 42S, 27S, 17BII, 17B, 19BII, 38G, 39G or 40G with --model: its
# keys instead of a menu.
saturnus ref "->LIST"
saturnus ref "->POL" --model 42s
saturnus ref COMB --model 39g

# Disassemble ROM code.
saturnus disasm --rom roms/gxrom-r --at 0 --count 20

A key script is one action per line:

# boot, answer "Try To Recover Memory?" with NO
wait-idle 60000
press f
press 2
press enter

The full documentation (options, the control API and its token, key names per model, the serial bridge) is in the repository's README.

Clean room

saturnus is written from public hardware documentation and observed behaviour, not from the source code of other emulators. Parts of the code were generated by AI systems under human supervision (see AI_NOTICE in the repository).

Licence

MIT.