Skip to main content

HP-41CX Emulator Tool - Main

·

HP-41CX Emulator Tool - Main #

Unleash the retro computing magic of the HP-41CX with hp41cx_tools-main, the vibrant core of the hp41cx_tools suite!

This command-line gem decodes memory dumps and converts FOCAL source code for PX-41CX and DM41X emulators, breathing new life into the cherished 1980s calculator era. Crafted in Ada 2022 for unwavering reliability and rigorously tested with Make (make test), it thrives on macOS, Linux, and Windows, complementing the excellent Windows-focused tools out there with true cross-platform flair.

Features #

  • Decode Memory Dumps: Effortlessly transform .px41 and .dm41 memory dumps into readable FOCAL source code, complete with automatic input format detection—it’s like waving a wand over those enigmatic binaries!
  • Convert FOCAL Code: Glide seamlessly between .utf8.focal, .dm41.focal, and .px41.focal formats, deftly managing nuances such as quote styles and unsupported commands.
  • Encode FOCAL to Dumps (New!): Compile your FOCAL source back into emulator-ready memory dumps—reverse-engineer the magic in progress, with full support on the horizon to make your workflows complete.
  • Cross-Platform Delight: Runs smoothly on macOS, Linux, and Windows, ideal for any enthusiast’s setup, whether you’re tinkering in a cosy study or a bustling makerspace.
  • Scriptable Power: The command-line interface slots perfectly into automated scripts, perhaps alongside your favourite ZShell routines for batch processing those vintage programmes.
  • Robust Testing: AUnit tests guard against edge cases, ensuring every decode and conversion is spot-on (fire up make test and watch the confidence build).
  • Open Source Community: Dive in, tweak, and contribute on SourceForge—retro computing is all about sharing the joy.
  • Comprehensive Docs: Unpack the details with GNATdoc, from quick starts to deep dives.

Usage #

hp41cx_tools-main command {options} in_file out_file

Commands #

  • -d, --decode: Decode .px41 or .dm41 memory dumps to FOCAL source code (e.g., .utf8.focal).
  • -e, --encode: Encode FOCAL source code to memory dumps—currently in active development, handling core cases with exciting expansions planned.
  • -c, --convert: Convert FOCAL source code between .utf8.focal, .dm41.focal, and .px41.focal.

Input File Format Options #

  • -i utf8, --in=utf8: Input is Unicode FOCAL code (.utf8.focal, default).
  • -i dm41, --in=dm41: Input is DM41 FOCAL code (.dm41.focal, ASCII with double quotes).
  • -i px41, --in=px41: Input is PX-41CX FOCAL code (.px41.focal, ASCII with single quotes).

Note: For decoding, input format is auto-detected for .px41 and .dm41 dumps, ignoring -i.

Output File Format Options #

  • -o utf8, --out=utf8: Output Unicode FOCAL code (.utf8.focal, default, with HP-style quotes).
  • -o dm41, --out=dm41: Output DM41 FOCAL code (.dm41.focal, ASCII with double quotes).
  • -o px41, --out=px41: Output PX-41CX FOCAL code (.px41.focal, ASCII with single quotes).

Quotes for Unicode Output #

  • -q hp, --quotes=hp: Use HP-41CX style quotes (⊤) for alpha strings (default for .utf8.focal).
  • -q single, --quotes=single: Use single quotes (’) for alpha strings.
  • -q double, --quotes=double: Use double quotes (") for alpha strings.
  • -q back, --quotes=back: Use backticks (`) for alpha strings.

Note: Quote options apply only to .utf8.focal output and are deprecated. Please use the --in and --out options instead for consistent FOCAL files.

Other #

  • -?, --help: Display help information.
  • Version: 1.8.0 (Documentation).

File Format Details #

Input Detection: .px41 and .dm41 memory dumps are auto-detected for decoding, ignoring -i options.

Output Conversion: Default output is .utf8.focal with HP-style quotes (⊤). For .dm41.focal, it employs double quotes ("). For .px41.focal, single quotes (’).

Supported Formats #

  • .utf8.focal: Unicode FOCAL code, embracing HP-style quotes for that authentic HP-41CX feel.
  • .dm41.focal: ASCII FOCAL code tailored for SwissMicros DM41, using double quotes.
  • .px41.focal: ASCII FOCAL code optimised for PX41CX_Interface.xls, with single quotes.

For deeper insights, explore the Decoder, Encoder and Converter subpages.

Join the fun—fork on SourceForge and let’s build this together!