x48ng emulator "engine" as a standalone library
|
||
---|---|---|
.github/workflows | ||
dist | ||
doc_0.6.4 | ||
romdump | ||
src | ||
.clang-format | ||
.gitignore | ||
AUTHORS | ||
LICENSE | ||
Makefile | ||
README.md | ||
sdl-screenshot.png | ||
tui-screenshot.png | ||
tui-small-screenshot.png | ||
tui-tiny-screenshot.png | ||
x11-screenshot.png |
x48ng -- HP 48 emulator
This is my fork of x48-0.6.4 where I deviate from the original code and do my own thing. (See ./README_0.6.4 for the original README)
Usage
x48ng --help
You can use the script setup-x48ng-home.sh
or simply run x48ng --rom=<romfilename>
Screenshots
--tui-small
version (ncurses, 4 pixels per character)
--tui-tiny --mono
version (ncurses, 8 pixels per character)
--tui
version (ncurses)
--x11
version
--sdl
/--sdl2
version
manual setup
- Create
$XDG_CONFIG_HOME/x48ng
(usually~/.config/x48ng/
) - Copy
/usr/share/x48ng/ROMs/gxrom-r
(or any other rom) to$XDG_CONFIG_HOME/x48ng/rom
- Run
x48ng --print-config > $XDG_CONFIG_HOME/x48ng/config.lua
- Run
x48ng
Ncurses UI (--tui
)
I had to be a bit 'creative' mapping keys there:
Enter
:F1
Left Shift
:F2
orPgUp
or[
Right Shift
:F3
orPgDn
or]
Alpha
:F4
orIns
or;
On
:F5
orEsc
orHome
or\
_To quit x48ng
use F7
What have I done:
- renamed it to x48ng to avoid confusion
- merged in a SDL1 version I found @ https://code.google.com/archive/p/x48-sdl/source/default/source
- removed the code supporting Solaris, HP-UX, etc.
- removed the autotools-based build system and wrote a simple Makefile instead
- added a x48ng.desktop file and an icon
- refactoring as a way to explore/understand the codebase
- drop Xresources
- link to lua to use it as a config file reader
- ported the SDL1 GUI to SDL2
Bugs to fix
See and report at https://github.com/gwenhael-le-moine/x48ng/issues
What more I would like to do:
long(er) term
- GUI in gtk(4)?
- support the HP49g ROM?
Compilation
The Makefile
will try to autodetect if necessary dependencies for x11 and sdl front-ends are met and enable/disable x11 and sdl front-ends accordingly.
You can force disable x11 front-end by compiling with make WITH_X11=no
.
You can force disable sdl front-end by compiling with make WITH_SDL2=no
.
Ncurses front-end is always built-in.
Dependencies (see .github/workflows/c-cpp.yml for debian packages names)
- Lua
- readline
for SDL2 version:
- SDL2
- SDL2_gfx
for x11 version:
- x11
for Ncurses:
- ncursesw
Installation
- Run
sudo make install PREFIX=/usr
(see the Makefile to see what variables your can override.) - once installed run
/usr/share/x48ng/setup-x48ng-home.sh
to setup your ~/.x48ng/. It sets up a HP 48GX with a 128KB card in port 1 and a 4MB card in port 2 - run
x48ng
and enjoy
Development
make FULL_WARNINGS=yes
to compile with all warningsmake clean
andmake mrproper
to clean between compilation runsmake pretty-code
to format the code usingclang-format
and the provided.clang-format
Friends and inspiration
- https://github.com/gwenhael-le-moine/x48 (original x48 slightly touched but not too much)
- https://github.com/shagr4th/droid48 (x48 ported to Android)
- https://hp.giesselink.com/emu48.htm (The Emu48)
- https://github.com/dgis/emu48android (Emu48 ported to Android)
- https://github.com/gwenhael-le-moine/jsEmu48 (another HP 48 emulator)