{ datagubbe }


datagubbe.se » cgterm on linux

CGTerm on Linux

Hopefully making it work

CGTerm, written by MagerValp, is a terminal emulator for dialing Commodore 64 BBS systems connected to the Internet. It shouldn't be much trouble getting it to work on a modern Linux machine, but for people feeling lost, here's a quick summary.

Compiling

Configuring

The first problem presenting itself with CGTerm is probably that not all keys are mapped correctly. Getting a completely correct 1:1 mapping with a C64 keyboard is perhaps not possible (or even desirable), but there's a simple way of finding out which keys are unmapped and thus available for mapping to "special" chars such as *, ? and so on.

When compiling CGTerm from source, a small support binary called testkbd is created. This will not be installed in your path, but has to be executed from the build directory. This will accept the -k parameter followed by the name of a keymap file:

~/CGTerm-master$ ./testkbd -k swedish.kbd

Now make sure the Keyboard Test window has focus. Each keypress will be logged to the terminal window it was launched from. This way it's easy to find unused keycodes to map missing characters to. As can be seen in the below screenshot, I've mapped * (star) to the Swedish key Å in my config.

Screenshot of a kbdtest session

Note the resulting keysym values. Now it's simply a matter of mapping any suitable unmapped key to the desired char. The easiest way is to make a copy of an existing keymap file and edit that. The format should be self-explanatory: in the left column is the char name (such as a, b, c or star, at, arrowup) and in the right column is the keysym value.

Running CGTerm

Now just start CGTerm with the desired keymap file, E.G.:

$ cgterm -k ~/.config/mykeys.kbd HOST PORT

...where HOST and PORT is the hostname and port of the BBS you desire to "call".

When CGTerm is running, press ESC at any time to bring up the in-app menu, which again is self-explanatory and controlled using the keyboard.

Good luck and happy hacking!