Fixing annoying bugs in CGTerm

BBS, Commodore 64, Mac 9 Comments »

As you may have already read, a couple of weeks ago I set out to compile CGTerm for the Mac OS X 10.9. I was able to accomplish this and received some feedback that encouraged me to dig deeper. Some of the things I decided to add were an application icon and to “package it up” so that it was easier to download and install. Those were minor touches that didn’t need a lot of actual code.

The biggest issue, and one that I felt would keep people from even “calling” a BBS if they owned a Mac (PC owners seem to have plenty of other options without much work. Namely using a terminal program running inside WinVICE. With that you get all of the thrill of a BBS.) was the fact that CGTerm was hard coded to use positional key mapping. What that meant was that keys like the 9 key would map to the 9 key on the original C64. Meaning when you pressed Shift-9 you got the ) character. Not the ( character you were trying to type because that’s what your keyboard showed. You could change the key to any other key, but that still meant that shift and that new key would produce a ). You couldn’t move ) alone to some other key. That was a big show stopper in my book. Without having some kind of overlay on your keyboard how could you hope to remember what key to press. Especially when the games menu was accessed using ‘*’ and Shift-8 did the ( character and put you in the message board section. Which, knowing my luck, probably also used the ‘*’ character to get back to the main menu? How frustrating right?BBS Command Main Menu

Well I HAD to play my games. Nuke Em has been calling me back for years. I must vindicate America by beating Greenland. (I was thinking the same thing when I first played the game 20+ years ago. When did Greenland ever become either a Nuclear Power or was ever a big player in any war game?) So to do that I needed to be able to tell my ‘*’ key from my ‘)’ key. I tried many different ways to get that blasted ‘*’ key to map correctly. Finally I gave up and decided I needed to recode CGTerm to do symbolic key mapping.

Symbolic key mapping allows the user to to program each key, along with modifier keys like the C= key, short key, and control key, independantly. This way if I wanted shift-9 to put out ‘*’ and control-9 to put out ‘G’ I could. I don’t know why you would want to, you still would forget how to get to the dang games menu, but you could if you were feeling particularly plucky.

The old version of CGTerm required a .kbd file to be present or it would actually fail and you couldn’t even start it. Not helpful considering the fact that unless you had an installer that created the settings file (.cgtermrc) the app would create a settings file but wouldn’t load it. It would try to find a default keyboard file in the default location but if you knew where that was this wouldn’t be an issue in the first place. So I fixed that as well. If it can’t find the settings file it creates it and loads it at the same time. And if it can’t find a keyboard file it just assumes you are OK with using your keyboard just the way IBM (or Apple in this case) intended.

In composing this blog post I ran into an issue trying to download files. I guess I have more work to do with default file paths. But at least I can play my Nuke Em. My original post on compiling CGTerm for Mac has the current .DMG image if you want to download and run my version of CGTerm. I have included the source code at the bottom of this post should you want to compile it for PC or another platform. If you decided to do that drop me a line. I would be happy to link to your compile so others can enjoy BBS’s on as many platforms as can be made available.

Here is the new source code: CGTerm 1.8 Source Code

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in