• Home
  • Projects
  • Bio
    • Hpsaturn photo

      Hpsaturn

    • About
    • Twitter
    • Github
    • StackOverflow
    • Hackaday
    • LinkedIn
    • Instagram
    • Youtube
  • Posts
    • All Posts
    • All Tags

uConsole - x48ng

03 Jul 2025

Reading time ~3 minutes

x48ng - uConsole

Diving into the past with this nostalgic HP48Gx, a powerful handheld calculator from the 90s, now running with the x48ng emulator on the awesome uConsole or any GNU-Linux device.

Installation

Dependencies:

sudo apt install pkgconf libreadline-dev libsdl2-dev libx11-dev libxext-dev liblua5.4-dev git build-essential

From the official x48ng Github copy the repo url, clone it and perform the next commands:

git clone https://github.com/gwenhael-le-moine/x48ng
cd x48ng &&  make clean-all && make
sudo make install PREFIX=/usr

Usage

x48ng has many options and GUI runners alternatives. But, for me, the best for the uConsole and maybe for many terminal lovers, is the next:

x48ng --tui-tiny --mono -T

This alternative runs a ncurses version for any terminal:

x48ng Filer Screenshot

Transfer files

Maybe the easy way for transfer files to the emulator is using Kermit protocol, but is possible also other protocols like XModem. Here I’m going to explain the alternive using ckermit:

sudo apt install ckermit

Then, write a script in your user binary directory on ~/bin for instance with the name kermit48, with the next contents:

#!/bin/bash

if [ "$1" = "" ]; then
  echo "usage: kermit48 /dev/ttyxx"
  exit 1
fi

kermit -l $1 -C "set modem type direct, set prefixing all, set speed 9600, set carrier-watch off, set flow none, set parity none, set block 3"

(don’t forget set executable permissions with chmod +x ~/bin/kermit48)

Run the emulator, and in the its bottom line you are able to see something like this:

wire: /dev/pts/16

Then run kermit script like this:

kermit48 /dev/pts/16

On the kermit terminal, you are able to navitage to any directory and send commands with send xxx. Previosly you should start in the emulator, the kermit server with the server command or with the RIGHT SHIFT + RIGHT ARROW shortcut.

x48ng uconsole kermit demo (left: kermit tranfering a file. right: x48ng receiving this file)

ROM state backups

For now the only way to do backups of the state of the emulator is saving the working directory files of the x48ng, like this:

cd ~/.config/x48ng/
tar zcf ~/bkp`date +%Y%m%d_%H%M%S`.tar.gz port1 port2 ram state config.lua

and restore any state, with something like this:

tar zxf ~/bkp20241020_135648.tar.gz -C ~/.config/x48ng/

Demo

It’s a little demo, of how to we used in these years the Jazz 6.8 library and TED editor to navigate, edit, and even decompile system calls and third-party programs written in Assembler or SysRPL, right on your device, and do all that in the middle of your coding session, was truly amazing in those years. Thanks to these awesome programs and features, we had a lot of “open source” software in this era.

x48ng uConsole Demo

Troubleshotting

Sometimes the x48ng emulator will be to standby or poweroff state, and it is very difficult to poweron again. Please, try many times with the (ON) shortcut.. Or ometimes, you should perform reset shortuct (ON+C).

Some assembler executables sometimes freeze de execution. Please report it in the GitHub issues section.

The emulated serial comm device or wire, sometimes changes. Please keep in mind it when you are repeating the kermit command to transfer files. Check the serial device number in the bottom line of the emulator screen, and change this script parameter of kermit48.



GNU-LinuxDebianRaspberryPiHp48 Tweet Report Issue