• Please review our updated Terms and Rules here

Pet 8296 w/o keyboard

Steve,
I am not familiar with the C64 keyboard. It appears from photos that some models may have a 20 pin female header. If so, using your EDIT EPROM, can I just plug the C64 into a 8032 PET or is some rewiring needed? The DB25 info has me a little confused.
Thanks,
Dave

Dave,

ALL PET machines have a 20-pin header for the internal keyboard. This is the same connector that the C64 uses. The PET "SK" models have a DB-25 for an external keyboard.

If you have a regular 8032 then YES, you can just plug the C64 keyboard into the PET motherboard directly. No wiring changes are needed. Only if you have an 8032-SK or other SK model do you need to build the adapter.
The EDIT ROM changes the keyboard decoding to support the C64 keyboard. In California you would need the 60Hz version of the EDIT ROM.

Steve
 
The EDIT ROM changes the keyboard decoding to support the C64 keyboard. In California you would need the 60Hz version of the EDIT ROM.

Steve,
This is a great thing for PET repair. I know I will lose the numeric keypad, but will gain 4 function keys. Did you map the function keys to anything useful on the PET? If not perhaps they could be used as the controls for Space Invaders (tab, p, and del).
-Dave
 
Dave,

Yes, i mapped the function keys to the "hidden" functions of the business keyboard..
F1=text/graphics (similar to shift+C= on c64)
F3=Del/insert line
F5=clear to start/end of line
F7=scroll down/up

Let me also stress that many games read the keyboard lines directly, bypassing the keyboard table. So these likely wont work as expected... You'll have to hunt around for the right keys. If the game uses a key on one of the first two rows then you wont be able to press that key.

Steve

Edit: I had an idea. If we connect the two missing rows to two of the existing rows we can at least activate those missing keys. Something to experiment with.
 
Last edited:
Yes, i mapped the function keys to the "hidden" functions of the business keyboard..
F1=text/graphics (similar to shift+C= on c64)
F3=Del/insert line
F5=clear to start/end of line
F7=scroll down/up

Steve,
I installed an EPROM with your EDITOR ROM data and plugged in a C64 keyboard into my 8032 PET and it works great as Mike reported.

I have a couple of questions. Is the F1 key supposed to work as a POKE 59468, 12 and put the machine in the graphics character set? It does not seem to do anything. Also the Commodore key does not act as a REPEAT key. But these are minor as I am glad to have a way to replace a PET keyboard if necessary.
Thanks,
Dave
 
Last edited:
Actually, F1 is TEXT mode, and the 8032 already starts in that mode. Try SHIFT-F1 for graphics (and F1 should switch back). It works for me. I just tried REPEAT and you are correct, it's not working. I'll have to look into that. I never use it normally. I think some of the newer edit roms autorepeat anyway, but this one doesn't seem to... hmm. I'm also investigating some of the modified edit roms. Apparently there is one with an actual CTRL key, so I might be re-mapping some keys again anyway.

Steve
 
Yes, SHIFT-F1 does the trick for the graphics character set with F1 going back to text. What a nice thing to have! Heck I might leave this keyboard in place if I can find the keys that work Space Invaders.:p
-Dave
 
Yes, SHIFT-F1 does the trick for the graphics character set with F1 going back to text. What a nice thing to have! Heck I might leave this keyboard in place if I can find the keys that work Space Invaders.:p
-Dave
Left & right Shift keys plus " switches to graphics, but is there a way to get back to text?

I don't have a need to replace the keyboard, but I'm looking forward to Steve's modified ROM with a CTL key for easy access to the screen control codes, possibly an alternate character set, etc.

Keep up the good work!
 
Yes, SHIFT-F1 does the trick for the graphics character set with F1 going back to text. What a nice thing to have! Heck I might leave this keyboard in place if I can find the keys that work Space Invaders.:p
-Dave

If space invaders scans the keyboard directly then you might be out of luck...

Find the KEY you need from the top table, then look at the key in the same row and column in the bottom table...

Code:
PET/CBM Graphics Keyboard:
   | 7      6       5      4      3      2      1      0    |
---+-------------------------------------------------------+
 9 | =      .             STOP   <      SPC    [      RVS  |
 8 | -      0      R-SH   >      --     ]      @      L-SH |
 7 | +      2      --     ?      ,      n      v      x    |
 6 | 3      1      RTRN   ;      m      b      c      z    |
 5 | *      5      --     :      k      h      f      s    |
 4 | 6      4      --     l      j      g      d      a    |
 3 | /      8      --     p      i      y      r      w    |
 2 | 9      7      ^      o      u      t      e      q    |
 1 | DEL    DOWN   --     )      \      '      $      "    |
 0 | RGHT   HOME   <-     (      &      %      #      !    |
---+-------------------------------------------------------+



PET/CBM Business Keyboard:
   | 7      6      5      4      3      2      1      0    |
---+-------------------------------------------------------+
 9 | --     --     :      STOP   9      6      3      L-AR |
 8 | 1      /      RVS    HOME   m      SPC    x      RVS  |
 7 | 2      RPT    --     0      ,      n      v      z    |
 6 | 3      R-SH   L-SH   .      .      b      c      ls   |
 5 | 4      [      o      DOWN   u      t      e      q    |
 4 | DEL    p      i      \      y      r      w      TAB  |
 3 | 6      @      l      RTRN   j      g      d      a    |
 2 | 5      ;      k      ]      h      f      s      ESC  |
 1 | 9      --     U-AR   7      0      7      4      1    |
 0 | .      --     RGHT   8      -      8      5      2    |
---+-------------------------------------------------------+

C64 keyboard on pet
  |7     6     5     4     3     2     1     0
-------- ----- ----- ----- ----- ----- ----- -----
9 |not used                                        | 
8 |not used                                        | 
7 |F7    HOME  -     0     8     6     4     2     |
6 |F5    UARRW @     O     U     T     E     Q     | 
5 |F3    =     :     K     H     F     S     C=    | 
4 |F1    SHIFT .     M     B     C     Z     SPACE | 
3 |DOWN  /     ,     N     V     X     SHIFT STOP  | 
2 |RIGHT ;     L     J     G     D     A     CTRL  | 
1 |RETRN *     P     I     Y     R     W     BARRW | 
0 |DEL   POUND +     9     7     5     3     1     | 
   ----- ----- ----- ----- ----- ----- ----- -----

So, for example on the 4032 (graphic keyboard) the SPACE key ("SPC") is at ROW 9, COL 2. The key at that position on the 8032 (business keyboard) would be "6", and on the C64 keyboard it would not be accessable.
Basically, there are 80 possible keys in the PET. Out of those only 73 or 74 are used. But on the C64 there are only 64 keys, so about 10 keys just won't be possible to type with the current ROM and the current wiring (ie: straight plug in).

Steve
 
Last edited:
Are you running space invaders for 80 column or 40 column with 80240.PRG or 4032anyhz?... that will determine which keys are needed.

Steve
It works; I'm happy....
I used cbm4032 from TPUG and using your table:

Code:
Function  8032 keys      C64 keys
Fire       tab           space 
left        p            shift
right      del           F1
 
That's great! I played space invaders a lot back in the day.

I'm working on an EDIT rom for 80 column machines so they won't need to load the 80240 or similar software. I'm hoping to have a way to hold a key on boot to select 40 or 80 columns and also be able to switch via software. So far I have the 40 column screen working but not the key selection. I guess I will be making a version for original PET keyboard and for C64 keyboard ;-)

Steve
 
Well, amazingly I missed a solution that's been around since 2009. Anyway, those who can't find a spare C64 keyboard could also check this out:
http://ps2cbm.blogspot.ca/

It allows you to connect a PS2 keyboard to the PET and even lets you reset with CTRL-ALT-DEL. It hasn't been updated since 2009 so I don't know if they are available to buy or not.

Steve
 
I'm working on an EDIT rom for 80 column machines so they won't need to load the 80240 or similar software. I'm hoping to have a way to hold a key on boot to select 40 or 80 columns and also be able to switch via software. So far I have the 40 column screen working but not the key selection. I guess I will be making a version for original PET keyboard and for C64 keyboard ;-)

Steve,
On the EDIT ROM for the 8032, is it possible to add some code to detect say the CTRL - C= keys and perform a jump to $FD16 and force a power up initialization? This would be a RESET function that would work assuming the PET 60 Hz interrupt handler is running. I suppose if running assembly language games, this may not work.

Also you are right about the C64 keyboard cable being too short to fully open the PET case. I built an extension cable with Mike's idea of using an inexpensive IDE ribbon cable and a 20 pin wire wrap header. It works fine. I have enough parts to build another so sent me your mailing address by private mail and I'll ship you an extension cable.
-Dave
 
If it's a 2-drive cable (or you crimp on another connector) you could even connect both keyboards at the same time; put both E images into a 4K EPROM with a switch and you've got the best of both worlds. And while you're putting in that switch, just add a reset button while you're at it. ;-)

Dave, you're a sweetheart and your generosity puts me to shame, but I can save you some postage; I've got boxes full of this stuff and if Steve wants an extension cable I can gladly give him one the next time I see him, at the next TPUG meeting if not sooner.
 
Dave and Mike,

Yes, thanks for the offers. I have stacks of IDE cables as well. I'm good ;-)

As for the 8032 reset... sure, that's definately possible. Up till now I've mostly just been patching bytes, but for proper support of the C64 keyboard I'd have to put in additional code, so it will take a bit of time. I'm still trying to figure out the 4K EDIT roms and the CTRL key code, but haven't had a lot of spare time recently... will keep you posted.

Steve
 
FWIW, the length and even more importantly orientation of the keyboard cable differs on which model of C64 or C64C the keyboard origins from.
 
If it's a 2-drive cable (or you crimp on another connector) you could even connect both keyboards at the same time; put both E images into a 4K EPROM with a switch and you've got the best of both worlds. And while you're putting in that switch, just add a reset button while you're at it. ;-)
Mike, you must have a 'twisted' mind to come up with these schemes! :)

I can gladly give him one the next time I see him, at the next TPUG meeting if not sooner.

How often does TPUG meet? Has it been meeting continuously since the early PET days? One day I will have to attend a meeting and then go to a Maple Leafs' game.
-Dave
 
Mike, you must have a 'twisted' mind to come up with these schemes! :)
Aw, I thought that was one of my rare actually useful suggestions; leave the cable dangling under the front lip and stick the switch inconspicuously on the side with a self-adhesive cable clip and you can go back and forth at will.

My reset button is kinda neat; it's a two-pole button that uses tiny microswitches and I offset the trip points so that pushing it slightly is a 'normal' 'soft' reset and pushing it all the way resets the 555 for a 'hard' reset.

How often does TPUG meet? Has it been meeting continuously since the early PET days? One day I will have to attend a meeting and then go to a Maple Leafs' game.
-Dave
You're welcome any time! Mike (Gubbish of PETdisk renown) has been up here a couple of times (but not just to meet Steve and me ;-) )

I was a TPUG member back in the early 80s but dropped out until I got back into it a few years ago, but AFAIK it has indeed met regularly since it was founded in 1979 and a number of us who were there then are still around. It's not as big, obviously, and our yearly World of Commodore event is also not what it was in its heyday, but it's still surprisingly active as people rediscover how much fun an old PET can be or what you can do with your C64 and all the modern gizmos available for them these days. We meet the third Thursday of every month (except August?) if you're planning your visit ;-)

While I'm at it I'll put in a plug for the TPUG store:
http://www.tpug.ca/store/items-for-sale/
Although at the moment the site says it's closed that's only temporary; it's just being reorganized somewhat and it might take a while before we're ready to ship again, but if you need/want something it doesn't hurt to inquire.

And of course the Library CD containing all the TPUG software disks is still available for immediate shipment:
http://www.tpug.ca/category/library/

m
 
Last edited:
Aw, I thought that was one of my rare actually useful suggestions; leave the cable dangling under the front lip and stick the switch inconspicuously on the side with a self-adhesive cable clip and you can go back and forth at will.
Mike, a switch and minor cut & jumpering will work for the 4000 & 8000 PETs but I'm not sure about the old PETs that do not disable the EDIT rom chip enable with the x800 logic signal. Additional cut & jumpering plus a logic circuit may needed for that...

My reset button is kinda neat; it's a two-pole button that uses tiny microswitches and I offset the trip points so that pushing it slightly is a 'normal' 'soft' reset and pushing it all the way resets the 555 for a 'hard' reset.

I'm not following, how do you get a soft reset? By grounding the /RESET line on the expansion connector? Is that much different that starting the timer?
-Dave
 
Back
Top