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
- Get the code from GitHub. The simplest way is to download the ZIP file by clicking the green "Code" button and selecting "Download ZIP".
- Unpack the ZIP file and compile the code. You'll need GCC, make (I used GNU make), and SDL v1.2. These should all be in your package manager's default repository. If not, you're running some voodoo DIY distro in which case you'll know how to obtain them anyway.
-
Run
make
. This should result in four binaries being built:cgterm
,cgchat
,cgedit
andtestkbd
. Runningmake install
should copy the three first binaries and the requisite support files to sane locations - E.G./usr/local/bin
and/usr/local/share/cgterm
, respectively. Otherwise, do it manually. The required support files are*.bmp *.wav *.kbd
.
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.
If you don't have a suitable .kbd file, you can download mine as an example and starting point: mykeys.kbd.
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!