• Please review our updated Terms and Rules here

Pet 8296 w/o keyboard

Pikkey

Member
Joined
Jun 3, 2009
Messages
33
Location
Treviso, Italy, Italy
As in topic.
I saved a nice 8296 from trash, but keyboard is missing.
I'm looking for a spare keyboard (working or not) to buy, or any modding/trick to use another keyboard, even if an adapter is needed.
Any help will be apreciated. Thank you
 
There aren't any easy/cheap solutions that I know of... however:

1) If you can find an old dead 8032 computer it uses the same keyboard mechanism ("business keyboard"). You would have to wire up a db-25 connector to make it work.
2) If you can find an old dead 4032/4016 computer is uses a similar keyboard mechanism ("graphic keyboard"). As above with connector, plus you would need to burn a new EDIT rom to support it (available on zimmers).
3) Go4Retro.com (Jim Brain) has something called the "C=key" and it lets PC PS/2 keyboards connect to some commodore computers. Unfortunately the PET is not supported although Jim makes the code available so you might be able to modify it to work.
4) There is also the KEYRAH which is similar to the C=Key
5) Almost any Commodore keyboard ( C64/VIC/C128/C16 ) or other "matrix-based" keyboard MIGHT be usable but YOU would need to modify the EDIT rom. The PET uses an 8x10 keyboard matrix, and there is an 80-byte table in the EDIT rom. You would need to replace this table with a new one that matches the new keyboard. You may get limited funationality and you might cause incompatibilities with some programs. You would need to burn a new EDIT rom.

As bad/missing PET/CBM (especially SK models) keyboards are common I was thinking of trying #5 myself, but free time is limited and I don't know how many people would be interested in such a solution...

Steve
 
Last edited:
There aren't any easy/cheap solutions that I know of... however:

Tnx for helping.
I already have Keyrah, but it's not easy customizable like C=key seems to be.
I'll try to build an interface to adapt an old IBM keyboard. I've already made something similar for an Apple..
I'll study about.. :)

Francesco
 
FWIW, me and a couple more people are in the same boat as you are. Actually I have a spare 3000 series graphic keyboard as well as a bunch of C64 keyboards. I've briefly discussed with Steve the possibilities #2, #3 and #5 but didn't try either. At least I can verify that #1 is perfectly suitable, as I once wired up a keyboard from a 8000 to be used with a SK model and it was a straight DB25 arrangement. Now one doesn't come across loose keyboard mechanisms very often, perhaps if you come across a stone dead PET 8032 that someone donates.
 
FWIW, me and a couple more people are in the same boat as you are. Actually I have a spare 3000 series graphic keyboard as well as a bunch of C64 keyboards. I've briefly discussed with Steve the possibilities #2, #3 and #5 but didn't try either. At least I can verify that #1 is perfectly suitable, as I once wired up a keyboard from a 8000 to be used with a SK model and it was a straight DB25 arrangement. Now one doesn't come across loose keyboard mechanisms very often, perhaps if you come across a stone dead PET 8032 that someone donates.
Without looking into the details of it, wouldn't it be possible to rewire the matrix of an old C64 keyboard? Maybe even add the numeric pad (I think some of the early ones even had provisions for one).
 
Rewiring the c64/vic keyboard to match the pet would be very difficult. Easier to modify the rom. Yes, actually very early vic keyboards used the same plastic mold as the pet business keyboard and even had spaces for the numeric pad, but only had 4 holes open for the function keys.

I will look into modifying the EDIT rom...

Steve
 
Rewiring the c64/vic keyboard to match the pet would be very difficult. Easier to modify the rom. Yes, actually very early vic keyboards used the same plastic mold as the pet business keyboard and even had spaces for the numeric pad, but only had 4 holes open for the function keys.

I will look into modifying the EDIT rom...

Steve
Like I said, I haven't really looked into the key mapping but I think you'd still have to mod the keyboard somewhat since it's only an 8x8 matrix instead of the 8032's 8x10, no?

Here's a thread about the same issues but for a PC:

http://www.vintage-computer.com/vcforum/showthread.php?33758-Custom-keyboard-codepage-for-DOS
 
if the connector has a 8x10 matrix wires, it would be very easy to build an interface with an ardruino and use a pc style keyboard. , if 5v logic, you would just need to pull the approriate col/row low depending on which col/row is being strobed.
 
Like I said, I haven't really looked into the key mapping but I think you'd still have to mod the keyboard somewhat since it's only an 8x8 matrix instead of the 8032's 8x10, no?

You would need to re-order the wires a bit or make a little adapter. Being 8x8 the C64 matrix is just a subset, so there is no problem having a smaller matrix. I think the problem will be getting the modified keys (shift/ctrl) working as labelled. The PET's keyboard is relatively simple.

I've started looking at things. All PETs have an internal 20-pin keyboard connector and they are all the same. The 8296 DB-25 connector has the same pinout but with 5 extra unused pins. However, the PET pin assignments are completely different than the C64 keyboard. The SX-64's DB-25 connector matches the C64 internal connector with only a few additional lines used for shift-lock and LED. The C128 keyboard uses the same matrix/pinout as the C64's normal 8x8 matrix then adds a couple lines for the additional keys. The C16 keyboard is completely different again, and so is the Plus/4 keyboard (they don't even match each other). The C116 keyboard matches the Plus/4. The CBM-II keyboards use a 6x16 matrix so don't even think about them! ;-) And for completeness, the C65 keyboard is the same as the C64 keyboard, but again uses extra lines for the extra keys, AND has a special provision for the cursor keys.

One thing I will say for sure... don't try connecting the DB-25 connector of an SX-64 keyboard to the 8296 (not that SX keyboards are any easier to find)! Anyway, I have created a document with all known commodore 8-bit keyboard matrix's and I will look at making a simple mod (just unshifted keys) of the 8296 EDIT rom to support a C64 keyboard, as that will be the most common Commodore keyboard available. If anyone has other ideas for suitable/cheap keyboards let me know (I have a collection of other popular 8-bit machines of the era if needed). From there I can look at doing PET 8000 and 4000 series EDIT ROMs...

Also, I need to sort out what EPROMs I can use with my programmer. The 8296 has a 4K edit rom, but the 8000/4000 series use a 2K rom.. Mike, you burned a new edit rom recently for someone's hybrid PET keyboard. What did you use?

Steve
 
Last edited:
... Being 8x8 the C64 matrix is just a subset, so there is no problem having a smaller matrix.
D'oh! Of course the C64 etc. are 8x8 and the PETs are 8x10, not the other way around; that simplifies things a bit although I think the keypad would complicate things.

Also, I need to sort out what EPROMs I can use with my programmer. The 8296 has a 4K edit rom, but the 8000/4000 series use a 2K rom.. Mike, you burned a new edit rom recently for someone's hybrid PET keyboard. What did you use?
For the 2K I think you can use any of the three: 2716, 2732 and 2532; the 4K would probably have to be a 2532 or a 2732 (or larger) in an adapter.
 
Follow-up...
I have worked out the changes needed to the PET 80 column business keyboard EDIT ROM to support a C64 keyboard. Note this should work on 8000 series and 8296.
Here they are:

Code:
;-C64 keyboard to replace PET Business keyboard
 E6D1		.byte 14 0D 1D 19 0E 15 16 11  ; ROW 1
 E6D9		.byte 33 57 41 34 5A 53 45 00  ; ROW 2
 E6E1		.byte 35 52 44 36 43 46 54 58  ; ROW 3
 E6E9		.byte 37 59 47 38 42 48 55 56  ; ROW 4
 E6F1		.byte 39 49 4A 30 4D 4B 4F 4E  ; ROW 5
 E6F9		.byte 2B 50 4C AD 2E 3A C0 2C  ; ROW 6
 E701		.byte DC 2A 3B 13 00 3D DE 2F  ; ROW 7
 E709		.byte 31 DF 9B 32 20 10 51 03  ; ROW 8
 E711		.byte FF FF FF FF FF FF FF FF  ; ROW 9  - not used
 E719		.byte FF FF FF FF FF FF FF FF  ; ROW 10 - not used

Notes:
* Code Change: SHIFT=01 with 00
* Reassign : "\"=5C to POUND key, CTRL as ESC=9B (unshiftable), C= as REPEAT
* Reassign : F1=TEXT=0E, F3=DELETE LINE=15, F5=ERASE TO START=16, F7=SCROLL DOWN=19
* Unshiftable: "@"=40=C0, "*"=2A=AA,"-"=2D=AD, "POUND"=5C=DC, "UARRW"=5E=DE, "="=3D=BD
* To DO : "[", "]","RVS" (perhaps I should use CTRL key as RVS instead of ESC?)
* Not Used : RESTORE

You should be able to apply this patch to either 50 or 60hz EDIT ROMS. I am using 901474-03 as my starting point (EDIT-4-80-B-60).
The next step is to actually wire up the keyboard, then make corrections as required. Once I do this I will write up a web page and post wiring diagrams and patched roms.

Steve
 
Last edited:
Aaaaahhhh. I burned an eprom to test in my 8296. It booted and using the NORMAL 8296 keyboard, typing was all messed up as expected. Great, it seems to be ok. Now to build the cable adapter....
I turned off the 8296 and when I came back to try again my 8296 seems to be dead :( Just my luck.

Will keep you posted...
Steve
 
Aaaaahhhh. I burned an eprom to test in my 8296. It booted and using the NORMAL 8296 keyboard, typing was all messed up as expected. Great, it seems to be ok. Now to build the cable adapter....
I turned off the 8296 and when I came back to try again my 8296 seems to be dead :( Just my luck.

Will keep you posted...
Steve
I'll try it on an 8032.

Edit: I'll wait for your list of the wire remappings; no point in duplicating work ;-)
 
Last edited:
Yes, let me stress this does NOT allow you to directly connect the C64 keyboard to the internal PET keyboard connector! There is a bit of wiring to do. The OP's machine is an 8296, which has a DB-25 connector on the front, so I was hoping to get that solution working first. After that we'll get other machines working ;-)

I mapped the C64 matrix rows and columns to be the same as the PETs' (minus the two missing rows of course), which mean you only have to shift the pins a little bit. If you don't mind messing up the C64 keyboard you could cut off the connector then solder the wires onto the DB-25 connector. Or, if you prefer to keep the C64 intact you could make a small adapter with a PIN HEADER on one side and the DB-25 on the other. The 64 keyboard would plug into that.

Steve
 
Code:
So where's the map, i.e. C64 pins 1-20 <> 8032 pins 1-20 <> 8096 pins 1-25?

Wow, you're very eager! ;-)

Let's see... Rows are R0 to R9, Columns are C0 to C7, GND=Ground, RES=Restore key, NC=Not Connected, KEY=No Pin. +5V is on C64 connector but there is no wire on the keyboard at that spot.

Code:
C64:
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 <-PIN
GND KEY RES +5V R3  R6  R5  R4  R7  R2  R1  R0  C0  C6  C5  C4  C3  C2  C1  C7  <-FUNCTION

VIC-20:
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 <-PIN
GND KEY RES +5V C7  C6  C5  C4  C3  C2  C1  C0  R7  R6  R5  R4  R3  R2  R1  R0  <-FUNCTION

PET Internal:
12  11  10  9   8   7   6   5   4   3   2   1   J   H   F   E   D   C   B   A   <-LABEL ON PCB
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 <-PIN
GND KEY R9  R8  R7  R6  R5  R4  R3  R2  R1  R0  C7  C6  C5  C4  C3  C2  C1  C0  <-FUNCTION

8296:
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 <-DB-25 Connector
R0  R1  R2  R3  R4  R5  R6  R7  R8  R9  NC  GND NC  C0  C1  C2  C3  C4  C5  C6  C7  NC  NC  NC  NC  <-FUNCTION

I tried to line up and number the pins so that both the C64 and PET internal keyboard connectors are numbered the same with the key in the same spot. Note the labelling on the PET PCB uses numbers and letters!
VIC/64 have Rows and Columns reversed. Who knows why Commodore did this?.... Anyway, it doesn't matter as long as all the rows and columns are connected we can figure it out.
Now that I look at it, I realize the VIC-20 matrix matches the pet very closely. The C64 matrix for some reason was shifted around. I suppose I could transpose the matrix to match the VIC-20 layout... which I guess would mean the keyboard WOULD just plug right in.... hmmm.... Still, theres a little wiring needed for the 8296's DB-25 connector.

Steve

PS: Man, it took a lot of time to format that to come out properly!
 
Last edited:
PS: Man, it took a lot of time to format that to come out properly!
I can imagine; I made an Excel spreadsheet of the key maps that I'll send you off-list (probably full of errors); that took a while too...

I'll have to try a VIC keyboard...
 
Mike, the VIC and C64 keyboards are the SAME! They only appear different to the COMPUTER, since the lines going from the pcb connector to the I/O chip were swapped around. Thats why they have different matrices in ROM. I never realized how close the pinouts were until I drew them above. I guess you learn something new every day! ;-)

I will swap around the data table, which will be a LOT more convenient than re-wiring things to match the C64 strangeness... I'll test and let you know.

Steve
 
Ok, here's some further info. I looked at the VIC-20 keyboard data table in the kernal, then compared that against the Commodore mechanical drawing (1001028 REV A) to sort out the matrix, pins, and wires...

Code:
VIC-20 Keyboard Decoding table @ $EC5E in "901486-06" ROM
Normal Keys (This is one table of several: normal, shifted, ctrl, and C= modifier keys)

DATA TABLE IN KERNAL    ; KEYSTROKE REPRESENTATION                        | ROW PIN WIRE   CODE
-- -- -- -- -- -- -- --   ----- ----- ----- ----- ----- ----- ----- ----- + --- --- ----   ----
31 33 35 37 39 2B 5C 14 ; 1     3     5     7     9     +     POUND DEL   | R0  12  BROWN  (BR)
5F 57 52 59 49 50 2A 0D ; BARRW W     R     Y     I     P     *     RETRN | R1  11  RED    (RD)
04 41 44 47 4A 4C 3B 1D ; CTRL  A     D     G     J     L     ;     RIGHT | R2  10  ORANGE (OR)
03 01 58 56 4E 2C 2F 11 ; STOP  SHIFT X     V     N     ,     /     DOWN  | R3   9  YELLOW (YE)
20 5A 43 42 4D 2E 01 85 ; SPC   Z     C     B     M     .     SHIFT F1    | R4   8  GREEN  (GR)
02 53 46 48 4B 3A 3D 86 ; C=    S     F     H     K     :     =     F3    | R5   7  BLUE   (BL)
51 45 54 55 4F 40 5E 87 ; Q     E     T     U     O     @     UARRW F5    | R6   6  VIOLET (VI)
32 34 36 38 30 2D 13 88 ; 2     4     6     8     0     -     HOME  F7    | R7   5  GREY   (GY)
-- -- -- -- -- -- -- --   ----- ----- ----- ----- ----- ----- ----- ----- | NC   4  
                  COLUMN: C0    C1    C2    C3    C4    C5    C6    C7    | RES  3  BLACK  (BK)
                     PIN: 20    19    18    17    16    15    14    13    | KEY  2 
             WIRE COLOUR: W/BR  W/RD  W/OR  W/YE  W/GR  W/BL  W/VI  W/GY  | GND  1  WHITE  (W)

VIC-20:
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 <-PIN
GND KEY RES +5V R7  R6  R5  R4  R3  R2  R1  R0  C7  C6  C5  C4  C3  C2  C1  C0  <-FUNCTION

PET Internal:
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 <-PIN
GND KEY R0  R1  R2  R3  R4  R5  R6  R7  R8  R9  C0  C1  C2  C3  C4  C5  C6  C7  <-FUNCTION
12  11  10  9   8   7   6   5   4   3   2   1   J   H   F   E   D   C   B   A   <-LABEL ON PCB

You can see that keyboard matrix closely follows the layout of the actual keyboard with the CTRL/STOP/C= keys on the left, and the function keys on the right. The connector matches very well with the PET's. The PET's R0 and R1 have been replaced by RESTORE key and +5V, otherwise they are the same (ignoring ordering).
You will notice that the wire colours also match: IE: ROW 0 and COL 0 both use BROWN. The ROW wires use a solid colour and the COL wires use the same colour with a white stripe. The color order is also consistant with resistor color codes, which are based on the colours of the rainbow: ROYGBV.

Now, I have to match up the positions in the PET EDIT ROM. It looks like PET scanning routine is the opposite or the lines are connected opposite on the i/o chip.

Unfortunately, my 8296 is still dead. It came to life briefly but sadly did not last. Mike S seem to think some of the capacitors are going/gone so I will need to sort that out. In the mean time I will work on an 8032 or 4032... The 4032 is handy and also coincidently has a bad keyboard (hmmm, perfect thing to test on!)...

Steve
 
Last edited:
Back
Top