C64 keyboard matrix

think, that you are not..

C64 keyboard matrix

This article is about the various external peripherals of the Commodore 64 home computer.

3 speed fan switch

Due to the backwards compatibility of the Commodoremost peripherals will work on that system, as well. In the United States, the floppy disk drive was widespread.

By contrast, in Europe, the C64 was often used with cassette tape drives Datasettewhich were much cheaper, but also much slower than floppy drives.

The Datasette plugged into a proprietary edge connector on the Commodore 64's motherboard. Standard blank audio cassettes could be used in this drive. Data tapes could be write-protected in the same way as audio cassettes, by punching out a tab on the cassette's top edge. The Datasette's speed was very slow about baud. Loading a large program at normal speed could take up to 30 minutes in extreme cases. Many European software developers wrote their own fast tape-loaders which replaced the internal KERNAL code in the C64 and offered loading times more comparable to disk drive speeds.

Novaload was perhaps the most popular tape-loader used by British and American software developers. Early versions of Novaload had the ability to play music while a program loaded into memory, and was easily recognizable by its black border and digital bleeping sounds on loading.

Other fast-loaders included load screensdisplaying computer artwork while the program loaded. More advanced fast-loaders included minigames for the user to play while the program loaded from cassette. One such minigame fastloader was Invade-a-Load. Users also had to contend with interference from magnetic fields. Also, not too dissimilar to floppy drive users, the Datasette's read head could become dirty or slip out of alignment.

A small screwdriver could be used to align the tape heads, and a few companies capitalized by selling various commercial kits for Datasette head-alignment tuning. Tape counter speeds varied over different datasette units making recorded counter numbers unreliable on different hardware. Kernal hard drive subsystem see below. They were expensive and few were ever sold.

The concept eventually succumbed to floppy drives. It needed a small program code to be loaded in the memory at [3] 0xCxCFFF [4] which collided with many other programs. The cost for the drive would have been equivalent to EUR in Which could handle 5.

New C64 Keyboards

The was the standard floppy disk drive for the Commodore 64, with nearly all disk-based software programs released for the computer being distributed in the compatible floppy disk format. The was very slow in loading programs because of a poorly implemented serial busa legacy of the Commodore VIC The disk drive was notorious for not only its slow performance and large physical size compared to the C64 the drive is almost as deep as the computer is widebut also for the drive mechanisms installed during early production runs, which quickly gained a bad reputation for their mechanical unreliability.

Perhaps the most common failure involved the drive's read-write head mechanism losing its alignment. Due to lack of hardware support for detecting track zero position, Commodore DOS formatting routines and many complex software copy-protection schemes which used data stored on nonstandard tracks on floppies had to rely on moving the head specified number of steps in order to make sure that the desired head position for formatting or reading the data was reached.After various people showing interest, and after having put this project on the back-burner for a long time, I have finally taken the time to do a proper update, and release the new firmware.

There is support for both ATmega8 and ATmega Unfortunately I have not been able to make this work as a composite device with both keyboard and gaming device in one USB device. The current state of the version with joystick support is released as well, but this does not currently work, and no schematics are released for this either.

Keyboard code

I do not know when I will have the time to look at this again, but if you take a look at it and do some discoveries, please let me know. This page describes how to build a USB-keyboard in the form-factor of an old C64 breadbox.

Actually, with little modification it can be used for any kind of keyboard, since the source code is available, and all that needs to be done is to modify the key-to-scancode mapping. The implementation presented here has a more elaborate keyboard scanning routine, and allows multiple keys to be pressed and detected simlutaneously.

This all started when some friends from Press Play on Tape the Commodore 64 Revival Band asked if I could help them create a special input-device for controlling their stage show mostly a laptop controlling a video projector. They would like to have an old-style C64 breadbox on stage, and being able to control their stage show with it.

Unfortunately it is not finished yet, but I promise I will make a page about it when it is done. In other words I was looking at a USB solution. Further more PPOT were more keen on a game controller device gamepad than a keyboard, mainly because they had already written software for this, and because the keyboard solution requires the software to be focused to receive the events, while for gamepad and joystick devices, any application that opens the device can receive the events, even if it is minimized or in the background.

Unfortunately these were probably expensive, and for sure quite difficult to get a hold of. All in all, I found this quite impressive, but the IgorPlug was not easy to customize, and also needed special drivers and of course such drivers will never be digitally signed by Microsoft. For all the bit-banging USB solutions, it is important to mention that they are not fully up to spec, neither on the hardware side should use differential signallingnor on the error handling.

That said, the applications I have been looking at seem to work flawlessly, and I adore the possibility of creating a device speaking USB for such a low cost.

C64 Keyboard restoration. Revive key response

Browsing arround on the 'Net for something unrelated, I came across an article describing the MJoy game controller, which implements a joystick with 6 analogue axes, a hat-switch and 24 buttons, all by bitbanging the USB-interface, just like the IgorPlug.

But this is a HID-device. The nice thing about a HID-compliant unit is that no special drivers are needed, since these are available in the operating system both on Linux and Windows.

I had the MJoy application running on my prototype hardware setup within a short time, and even started hooking up the keyboard of an old C64, and doing keyboard decoding.

I did, however, find the different versions of the MJoy slightly confusing, with different pins being used for different things in various versions, and I was also a little reluctant to use this, mainly due to the fact that source code was only available for some versions, while the larger version running on ATmega16 is only available as a HEX-file.

Further more the code does not seem to be quite as portable and customizable as the option I will describe next. Since I had originally started looking at a keyboard controller, I decided to investigate this option further I still think a Cstyle keyboard for use with a PC is a pretty neat idea.

The source code for the firmware was available, and with a very resonable license basically you can use it for free, but have to make available any modified firmware and hardware design.

This suits me fine, since I was planning on making it publicly available anyways. I think it should basically be a matter of creating the correct HID report descriptor table, and adapting the code that sends the HID reports.

When I get on with this project, I will make a separate page for it. Messing arround with the HIDKeys application, I was able to make the basic functions work, allowing keypresses to be sent to the computer. I re-wrote the keyboard scanning to work with a keyboard matrix, and a lookup table converts the key-code to the appropriate scan-code, which can be sent to the computer.

During the development I had a setup on a breadboard, which allowed me to quickly make changes to the circuit although most of the "circuit" is the connections between the microcontroller and the C64 keyboard matrix. Hopefully at some point I will find the time to pick up this project again, and make a composite device based on the ATmegaversion, but with scanning of two joysticks as well.

The schematics are quite simple, and I have therefore decided not to make any printed circuit board or layout for it. Instead I have gone for a perf-board solution, as depicted below most of the connections are on the bottom side with wire wrap. The schematics should provide the needed information if anyone should feel the need to make one.

One thing that took me some time to get right was implementing multiple keys pressed at the same time. It turns out that the HID reports used in the HIDKeys sample applications described only one scan-code being sent, and so had to be modified.

But I thought the problem was with my own code for scanning the keyboard matrix, so the time spent debugging was somewhat longer than it should have been.Google Authenticator code. These Commodore 16 keyboards are brand new old-stock, in perfect working and cosmetic condition. The keyboards are the same form factor and have the same pin header as the Commodore 64, 64c, and VIC However, the keyboard is not entirely compatible.

The matrix is wired slightly different. However, I have included diagrams showing how you can move some wires around to make it work, more or less, with the VIC and C There are two ways to approach it, one is to disassemble the keyboard, desolder all of the wires, and solder them back onto the board with the color arrangement shown in the diagram.

However, even after re-wiring the keyboard, everything is not perfect. All of the important stuff works, such as numbers, letters, space bar, function keys, return, backspace, etc. But some of the symbols and the cursor keys are not where you would expect them to be.

If used for parts, the plungers and most of the keyboard mechanism are interchangeable with early model C64 and VIC keyboards. If you want to combine multiple units for shipping, email me directly.

Your email address will not be published. Notify me of new posts by email.

c64 keyboard matrix

Log In. Remember Me. Lost your password? Commodore 16 Keyboard New, Old-Stock. Reviews There are no reviews yet. Rated 4.On top of this and hopefully very soon, Phase5!! It can be used as a standard USB keyboard or as a C64 keyboard.

It is basically a matter of copying the original keyboard PCB, have it made and start soldering… Well, as easy as it may sound, things like that still tend to take forever to complete… This post is to show the progress of my project and some of the components that will go into the keyboards. Feel free to comment on my choices!

I just need to have it laser cut in a piece of metal at a local metal shop. The layout looks like this. To get switches that resemble the feel of the original keys, I have chosen red and brown switches for my keyboards.

Subscribe to RSS

Both swithes are linear but only the brown has a tactile bump. All this device does is to give the user the ability to compare the feel of the different switches. A wire keycap puller tool for gently removing key caps and a tool for separating the top and base parts of Cherry MX switches. I really hope to have a working prototype within the next couple of months! So stay tuned for more info on the project! Hi there! I did the same thing — looked for somebody who would take the time to make some new keyboards… It seems that most of the work involved is the craftsmanship in physically making the frames that hold the PCB and then of course a lot of soldering.

Keep up the good work, and let us know. I love the whole idea of having a completely new C64, with just a few chips being left from the original. How are you handling the shift lock? Hi Bryan, I have been searching for a few of the discontinued latching Cherry switches but without any luck.

Guten Tag, please keep me updated. Exciting project. Do you have a social media channel or email list for us to subscribe to? Would love to stay current with updates to your project. Best of luck! Hi there. Yes, the project is still in the works even though it has taken a lot longer than first anticipated.

Other projects and repair jobs keep pushing the C64 keyboard project to the side. However, I do plan on finish it eventually! I may release my blueprints for others to create their own keyboards but I have not decided on that part yet. OK, will someone please tell me how the original Commodore 64 keyboard works? All I wanna know is how to work the cursor keys — like how do I move the cursor around? Do I put pressure on a specific spot of the key or should I combine the movements with a different key?


Cables have been orderd yesterday from Australia and header pins will be picked up at the local electronics store later this week.

Great News! Fingers crossed. I believe there is a considerable market for this looking at the brilliant new C64 cases, and developments like the C64 reloaded or the FGPA Ultimate However, mine will have the option of placing the keyboard cable at two different locations on the board depending on the motherboard revision it will accommodate link.

This way a shorter cable can be used to keep things neat and tidy. The basic layout you have for the PCB looks great!By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. Retrocomputing Stack Exchange is a question and answer site for vintage-computer hobbyists interested in restoring, preserving, and using the classic computer and gaming systems of yesteryear. It only takes a minute to sign up.

I'm looking at the schematic and the Service Manual for the Commodore I can't seem to find a schematic for the keyboard itself. It seems clear that the control port 1 joystick has normally open switches for the four directions and the fire button, and presses are detected by the switches closing and shorting lines COL0 through COL4 connected to PA0 through PA4 on CIA U1 to ground, thus pulling them down to 0 V. There are no pullup resistors for this in the motherboard schematic.

Sign up to join this community. The best answers are voted up and rise to the top. Home Questions Tags Users Unanswered. Where are the pullups for the Commodore 64 keyboard matrix lines?

Bootstrap 4 notification navbar dropdown

Ask Question. Asked 10 months ago. Active 10 months ago. Viewed times. For more information on the pullups and their original purpose not how they're used here see answers to this question. Active Oldest Votes. No external pull-up is needed as the CIA already got internal circuitry to do so. Raffzahn Raffzahn Sign up or log in Sign up using Google. Sign up using Facebook.

c64 keyboard matrix

Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Socializing with co-workers while social distancing.

Podcast Programming tutorials can be a real drag. Featured on Meta. Community and Moderator guidelines for escalating issues via new response….

Braun thermoscan 7 walgreens

Feedback on Q2 Community Roadmap. Linked Related 8. Hot Network Questions.Hi All, I'm playing around with reading the keyboard on the C64 by monitoring the port pins on the Getting down to hardware level explanations here, how does the CIA decode the signals from the keyboard?

Looking at them with a scope it seems for a key that is pressed on a row the pulse is shifted in time relative to some sort of reference pulse. So for 8 keys per row there is an approx uS pulse generated on a row pin on the I was expecting that what would be on PortB was different binary combinations that would allow 0 - key values, but this doesn't seem to be the case well, not what I can see.

Anyone know how this works? I've finally stopped buying Commodore gear well, maybe a few hundred more. You activate a row and read column bits. When I scope that Port bit all I see when I press those keys is a low pulse at different times depending on the key pressed. Like a serial byte in to the Port bit and I am seeing different bits go low, is that what I should see or am I still not on the right track?

You'd have to hold down all the mentioned keys simultaneously to get a steady readout then. Read the first link I posted. C64 selects one row by writing zero to corresponding PA bit and then reads all eight column bits from PB. If key is pressed on that row then the corresponding bit is zero. I forgot to add a link to Commodore 64 keyboard matrix layoutit shows how keys are positioned in the 8x8 matrix.

Does it matter though? Columns, rows Even the Commodore 64 Service Manual shows rows selected by PA in keyboard matrix while the schematics clearly show PA connected to columns. Refer to Keyboard Matrix for correct assignments Does that means that rows and columns are swapped or that PB bits are in wrong order? Who knows.

At least the key matrix displayed has bits in some crazy ass order. Only the addresses have been changed to protect the guilty ooroo Callan. Tip: Get C64 Forever for super-comfy C64 emulation with pre-installed games, demos and other goodies!

Keyboard matrix, how does it work?

Mazda 3 radio no sound

View previous topic :: View next topic. Back to top. It's normal 8x8 key matrix. Do you still have the kernal's IRQ-handler running while measuring?

c64 keyboard matrix

Thanks, I'll do a little more playing around. TNT wrote:. Rows, columns There is an interesting note at the bottom: Quote:. NOTE : U1 port assignments are incorrect on schematics. Refer to Keyboard Matrix for correct assignments. If you have a copy of Mapping the 64 or can get a copy it has a pretty good explanation of how this is done in the C64 specifically. The following link has an excellent explanation of how the keyboard scanning works. All times are UTC.The C64 Keyboard has 66 keys on it.

Keyboard reads are done using the CIA. The C64 is a keyboard computerthat is, a computer which is built inside a keyboard. The Keyboard is the main Input Device of the C Remark: The keyboard input occurs key by key. Control and function keys work, too, but the screen output isn't always correct. Then not a key is pushing, is the confirmation value After that for the wait mode must be jumping to the command PEEK.

Control and function keys can clicking, too. The screen output isn't correct, but the keycode is correct. This POKE is using for the joystickscans. POKEactivated the keyboard. Keyboardcache: In the memory adresses is the keyboardchache puffer. POKE ,0 cleared the keyboard chache.

Jump to: navigationsearch. This article or section is in the process of an expansion or major restructuring and is therefore classed as a work in progress. You are welcome to assist in its construction by editing it as well. If this article or section has not been edited in several days, please remove this template.

Categories : To-do Hardware. In other languages Deutsch. VICC orange functions keys. C grey functions keys. Aldi-C light grey functions keys.


thoughts on “C64 keyboard matrix

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top