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

3 Responses to “Fixing annoying bugs in CGTerm”
  1. ericgus says:

    Love that you got CGTERM working on recent versions of OSX (thank you) but have you ever had a chance to address incomplete features like the address book and such? (or am I totally daft and can not figure out how to add new entries?) ..

    • jnichols jnichols says:

      No I am afraid I haven’t been able to fix the address book yet. I had been more interested in doing upload/downloads as well as macros for username and password. But with a little bit of ninja skills you can add them yourself. If I remember correctly it should be storing bookmarks at the end of a file called .cgterm in your user directory. Easiest way to read and write the file would be to drop to terminal and type “nano .cgterm”. I prefer nano over VIM or other command line editors because I never memorized command keys. The format should be pretty easy. From the top of my head you can only add 9 lines, each entry is separated by a space and I think it goes name, ip, port. If you have trouble let me know and I will dig into and let you know exactly how to do it or even maybe make a blog post about how to edit he file on different versions. I hope to convert my version to PC as well so I don’t have to worry about the keyboard conversions.

  2. ericgus says:

    Ah thanks I didn’t even know about the .cgterm file .. (I am also a nano guy too!) .. I’m a Mac user myself but I know some PC folks might be happy to get that news.. I will check out the .cgterm file .. I was able to get it to work via terminal and passing the host/port .. but the dictionary would be nice .. I dont mind if its via nano edits.. Thanks ..

  3.  
Leave a Reply

You must be logged in to post a comment. Login »