kolstad@jomby.cs.wisc.edu (Joel Kolstad) (04/16/91)
From: kolstad@jomby.cs.wisc.edu (Joel Kolstad) Newsgroups: comp.sys.cbm Subject: Wanna use a PC keyboard with your C-64? References: Sender: Followup-To: Distribution: world Organization: U of Wisconsin CS Dept Keywords: Well, after becoming very frustrated with my always dirty, rarely working very well original Commodore 64 keyboard, I decided to built myself an IBM PC to Commodore 64 keyboard interface. I finished this little hack this past weekend, and am now happily typing on a Bondwell PC-XT keyboard going through my circuit to a C-64 (this was about the cheapest PC keyboard I could find... $25 from Lesko's, in Wisconsin...). The circuit is quite simple... just two chips: An Intel 8748 microcontroller (yes, ancient, I know) and a (New! :-) ) Dallas Semiconductor's 8x8 Cross Point switch. (What's rather ironic, here, is that many PC keyboards, including this one from Bondwell, use 8x48s themselves! :-) ) The 8748 just watches the PC keyboard's scan codes, and figures out what to tell the 8x8 Cross Point switch to do -- that is, what keys to "fake" on the Commodore 64 keyboard. I think I did a decent job on the tiny program that runs the 8748... Caps lock is supported, Num lock is supported, shifted PC keys function like their 64 counterparts should, hitting arrow keys on the PC keyboard automatically adds shifts when needed, etc. Overall, pretty much transparent to the user. The only place wher there are a few quirks is in "non-standard" characters such as vertical bars, tildes, etc. I tried to map this characters into the most standard C-64 keys I could, but by their natur of being non- standard keys, how perfect the translation is depends on what the program is looking for. :-) Also, sending "impossible" key combinations (like, hitting Shift-2 (@) and U and the same time on the PC keyboard) won't produce useful results. But I wouldn't expect it too... Personally, my C-64 and its assorted hardware lives in a big metal box, so it was no problem to stick in another board. But for people who would want to keep their original cases, it'd probably be possible to just drill a hole for the keyboard connnector in the case, anad keep the circuit board inside. Since this thing uses a crosspoint switch, a simple passthru lets both the C-64 and PC keyboard work at once -- now there's where we could see some productivity! But more importantly, this means you can still use the C-64 keyboard when there isn't a PC keyboard plugged in. Sound useful? Good! Since I doubt I could ever generate enough interest in this to make any money, I'm releasing it as more or less "public domain hardware." If anybody wants a schematic or more information, you can mail me at my below e-mail address. Sorry to say that I can only provide HPGL or Epson printer dump outputs. If you want the code for the 8748, you can have Intel Hex format, or UUencoded binary. I'd appreciate it if anyone sending for schematics and/or 8748 listings keep the things off of FTP sites, and such, for awhile -- I might just try to sell this to some magazine. :-) All of you who want more information, then, are my close personal friends and beta testers. :-) That's about it. I hope someone out there finds this as useful as I have -- I _love_ my new keyboard! ---Joel Kolstad kolstad@jomby.cs.wisc.edu
hh2x@vax5.cit.cornell.edu (Aaron Peromsik) (04/22/91)
In article <1991Apr16.035008.5667@spool.cs.wisc.edu>, kolstad@jomby.cs.wisc.edu (Joel Kolstad) writes: > From: kolstad@jomby.cs.wisc.edu (Joel Kolstad) > Newsgroups: comp.sys.cbm > Subject: Wanna use a PC keyboard with your C-64? > References: > Sender: > Followup-To: > Distribution: world > Organization: U of Wisconsin CS Dept > Keywords: > > Well, after becoming very frustrated with my always dirty, rarely working > very well original Commodore 64 keyboard, I decided to built myself an > IBM PC to Commodore 64 keyboard interface. > > I finished this little hack this past weekend, and am now happily typing > on a Bondwell PC-XT keyboard going through my circuit to a C-64 (this > was about the cheapest PC keyboard I could find... $25 from Lesko's, in > Wisconsin...). > > The circuit is quite simple... just two chips: An Intel 8748 microcontroller > (yes, ancient, I know) and a (New! :-) ) Dallas Semiconductor's 8x8 Cross > Point switch. (What's rather ironic, here, is that many PC keyboards, > including this one from Bondwell, use 8x48s themselves! :-) ) > > The 8748 just watches the PC keyboard's scan codes, and figures out what to tell > the 8x8 Cross Point switch to do -- that is, what keys to "fake" on the > Commodore 64 keyboard. > > I think I did a decent job on the tiny program that runs the 8748... Caps lock > is supported, Num lock is supported, shifted PC keys function like their 64 > counterparts should, hitting arrow keys on the PC keyboard automatically > adds shifts when needed, etc. Overall, pretty much transparent to the user. > The only place wher there are a few quirks is in "non-standard" characters > such as vertical bars, tildes, etc. I tried to map this characters into > the most standard C-64 keys I could, but by their natur of being non- > standard keys, how perfect the translation is depends on what the program > is looking for. :-) Also, sending "impossible" key combinations (like, > hitting Shift-2 (@) and U and the same time on the PC keyboard) won't > produce useful results. But I wouldn't expect it too... > > Personally, my C-64 and its assorted hardware lives in a big metal box, so it > was no problem to stick in another board. But for people who would want to > keep their original cases, it'd probably be possible to just drill a hole > for the keyboard connnector in the case, anad keep the circuit board inside. > Since this thing uses a crosspoint switch, a simple passthru lets both the > C-64 and PC keyboard work at once -- now there's where we could see > some productivity! But more importantly, this means you can still use the > C-64 keyboard when there isn't a PC keyboard plugged in. > > Sound useful? Good! Since I doubt I could ever generate enough interest > in this to make any money, I'm releasing it as more or less "public domain > hardware." If anybody wants a schematic or more information, you can > mail me at my below e-mail address. Sorry to say that I can only provide > HPGL or Epson printer dump outputs. If you want the code for the 8748, > you can have Intel Hex format, or UUencoded binary. > > I'd appreciate it if anyone sending for schematics and/or 8748 listings > keep the things off of FTP sites, and such, for awhile -- I might just > try to sell this to some magazine. :-) All of you who want more > information, then, are my close personal friends and beta testers. :-) > > That's about it. I hope someone out there finds this as useful as I have -- > I _love_ my new keyboard! > > ---Joel Kolstad > kolstad@jomby.cs.wisc.edu Anyone wanna do this for the 128 (not D) and a 101-key extended IBM keyboard? I'd be impressed. Aaron Peromsik hh2x@crnlvax5.bitnet hh2x@vax5.cit.cornell.edu