HP Forums
x48ng, a x48 « restomod » - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: x48ng, a x48 « restomod » (/thread-20729.html)



x48ng, a x48 « restomod » - gwh - 10-29-2023 10:02 AM

Hi everyone,

Let me present to you x48ng

I've been working on a fork of x48 for some time now. This fork aims at modernizing the code and the user interface.

I think I have arrived at a state where I've made significant changes (which I think of as improvements) and departed enough from legacy x48 that a proper introduction here makes sense.

The main changes are:
  • Code:
    --tui
    a text mode interface. Using ncurses and unicode the LCD can be displayed in the terminal, in three sizes.
  • an complete rethink of the command-line options and configuration file
  • …many more small things

The Readme has more details and screenshots.

This is for me a pure hobby project, on which I work mainly in bursts of inspiration for the pleasure of it.

Hopefully it's useful to some of you. Have a good day.

EDIT: a « screenshot »:
Code:
┌─[   | ↱ |   |   |   |   ]────────────────────────────────────────┐
│⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⢀⡀⠀⠀⡀⡀⣀⡀⡀⠀⡀⣀⡀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⢺⡀⠀⠀⡗⡇⣇⡇⡏⠊⡇⣗⡂⠀⠀⣸⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠤⠄│
│⡠⢺⠀⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠉⢹⠁⠰⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⡠⠬⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠠⠤⡃⢘⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠢⠤⠃⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠎⢉⠆⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⡔⠁⠀⠰⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⢉⡍⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠀⡇⠀⢘⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⠠⠧⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀│
│⣶⡖⡒⡖⡒⡶⡲⡖⡲⣶⡆⡶⣒⡖⡒⡖⢶⢲⢒⣲⢲⡆⣶⢲⢒⢲⢒⢲⢖⢶⢒⢶⡆⣶⠲⡶⢲⢲⠲⡖⡖⣒⣶⡆⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⡆⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⡆│
│⣿⣇⣶⣇⣶⣇⣆⣇⣎⣿⡇⣧⣛⣇⣃⣇⣦⣸⣰⣾⣸⡇⣿⣸⣘⣸⣰⣾⣰⣸⣰⣹⡇⣿⣸⣾⣸⣸⣰⣄⣇⣒⣿⡇⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇│
└─[ wire: /dev/pts/3 ]-[ IR: (null) ]──────────────────────────────┘



RE: x48ng, a x48 « restomod » - cruff - 10-29-2023 11:46 AM

Glad to see x48 being worked on, I kept installing it over the years on my Linux systems as I upgraded them. Thanks!


RE: x48ng, a x48 « restomod » - EugeneNine - 10-29-2023 06:03 PM

I've been using x48 for forever also.

I like the idea of a terminal mode

something with lua, what version of lua do you have/use?

Code:
bash-5.1$ make WITH_X11=no WITH_SDL=no
cc -g -O2 -I./src/ -D_GNU_SOURCE=1 -DVERSION_MAJOR=0 -DVERSION_MINOR=33 -DPATCHLEVEL=0  -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR=1   -c -o src/runtime_options.o src/runtime_options.c
src/runtime_options.c: In function ‘config_read’:
src/runtime_options.c:118:10: warning: implicit declaration of function ‘luaL_loadfilex’; did you mean ‘luaL_loadfile’? [-Wimplicit-function-declaration]
  118 |     rc = luaL_loadfilex( config_lua_values, filename, "t" );
      |          ^~~~~~~~~~~~~~
      |          luaL_loadfile
src/runtime_options.c:119:16: error: ‘LUA_OK’ undeclared (first use in this function); did you mean ‘LUA_QL’?
  119 |     if ( rc != LUA_OK ) {
      |                ^~~~~~
      |                LUA_QL
src/runtime_options.c:119:16: note: each undeclared identifier is reported only once for each function it appears in
make: *** [<builtin>: src/runtime_options.o] Error 1
bash-5.1$



RE: x48ng, a x48 « restomod » - gwh - 10-29-2023 07:22 PM

(10-29-2023 06:03 PM)EugeneNine Wrote:  I've been using x48 for forever also.

I like the idea of a terminal mode

something with lua, what version of lua do you have/use?

Code:
bash-5.1$ make WITH_X11=no WITH_SDL=no
cc -g -O2 -I./src/ -D_GNU_SOURCE=1 -DVERSION_MAJOR=0 -DVERSION_MINOR=33 -DPATCHLEVEL=0  -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR=1   -c -o src/runtime_options.o src/runtime_options.c
src/runtime_options.c: In function ‘config_read’:
src/runtime_options.c:118:10: warning: implicit declaration of function ‘luaL_loadfilex’; did you mean ‘luaL_loadfile’? [-Wimplicit-function-declaration]
  118 |     rc = luaL_loadfilex( config_lua_values, filename, "t" );
      |          ^~~~~~~~~~~~~~
      |          luaL_loadfile
src/runtime_options.c:119:16: error: ‘LUA_OK’ undeclared (first use in this function); did you mean ‘LUA_QL’?
  119 |     if ( rc != LUA_OK ) {
      |                ^~~~~~
      |                LUA_QL
src/runtime_options.c:119:16: note: each undeclared identifier is reported only once for each function it appears in
make: *** [<builtin>: src/runtime_options.o] Error 1
bash-5.1$

Here I have lua 5.4.6

EDIT: I just pushed a commit to the main branch that might solve your two errors. I can't really test quickly with an older lua (I suspect you have 5.1.x) but I hope it works for you.


RE: x48ng, a x48 « restomod » - EugeneNine - 10-31-2023 07:00 PM

Yes, I have the old 5.1
I miss the old C64 ACSII (petscii) where we had characters that were 1/4 size so we could make tui smaller Smile
here is a pic of old and new side by side Smile


RE: x48ng, a x48 « restomod » - gwh - 11-02-2023 09:16 AM

(10-31-2023 07:00 PM)EugeneNine Wrote:  Yes, I have the old 5.1
I miss the old C64 ACSII (petscii) where we had characters that were 1/4 size so we could make tui smaller Smile
here is a pic of old and new side by side Smile

Thank you for your helpful feedback.

Have you tried x48ng --tui --small or x48ng --tui --tiny --mono ?

Both variants use unicode characters to display multiple pixels per character.


RE: x48ng, a x48 « restomod » - EugeneNine - 11-03-2023 12:30 AM

Ahh yes, I failed to RTFM.
Works on arm, this is on a BeagleBone Black