Apparently not a lot of enthusiasm around here for cloning old computers like the PET? I though being a traditional hardware/discrete logic implementation rather than another boring FPGA port that this would garner more interest.
I've tested the prototype out to the extent that I can say that the hardware details are finalised and am now starting on the PCB layout, which will just be one large board, which I will have professionally manufactured. It's cheaper in quantity so would anyone else out there be interested in building a PET-2001 clone?
I've decided to take a different route with the keyboard interface. My original idea was to put a low-end PIC uC on the board to interface a PS/2 keyboard, but as it turns out such a lowly uC isn't going to cut the mustard. The operations of the PET CPU are interrupt driven by the video generator vertical blanking signal, meaning the keyboard is scanned at the video frame rate (in this case 50 times per second). There are 10 scan lines and the keyboard scan routine is quite slow, taking about 1mS to scan all 10 lines, but the issue is that the matrix is given a single read cycle only several uS after the scan line is updated, even so each scan line is actually active for (a mostly redundant) 100uS or so. This means that the interfacing uC only has several uS to read and decode the BCD for the scan line, look up the correct code in the matrix for the most recently pressed key and apply it the PIA data bus. And that is with a standard 1MHz system clock. In "turbo" mode (which is now finalised at 4MHz) the operation thus described needs to be done within 3uS.
Since a PS/2 keyboard is a bit old hat now, I've decided that a USB keyboard interface would be nice to have as well, but plonking this hardware onto the system motherboard would detract from the "retro" feel of the project, IMO. So what I've decided to to is keep the keyboard interface of the motherboard exactly as per the original PET, broken out to the outside world via a 25-pin DB connector, but additionally sporting +5V power. The keyboard interfacing can therefore be done by an external dongle, but you'll also have the option of plugging in a original PET keyboard if you have one (unlikely) or hacking an old PCB-style keyboard to plug directly into the DB25 by cutting all of the PCB tracks to the key buttons and re-wiring as per the PET matrix.
Unfortunately I don't have an old-style keyboard spare to hack right now, so in order to post the demonstration video shown here to youtube I rummaged through my parts and came up with a handful of toggle switches and a single push button. I wired the push button to the PIA keyboard scan IO to assert "Return" and the seven switches to assert "L", "O", "A", "D", "R", "U" and "N", which is all I need to load an run (but not much else!) programs from cassette.
Here it is loading and running Space Invaders. There is about 2.5 minutes of boredom in the middle of this video while the game loads, but I connected a speaker to the cassette drive data output, so, if you happen to be an old fart, you can turn up the volume and reminisce to some old-school computer sounds
EDIT: My copy of Space Invaders appears to be corrupt (found on the net as a.TAP file, converted to a .WAV file and then recorded to tape); there are some glitches in the graphics and not all of the intro screens/animations appear entirely as they should (which I've deduced from watching other youtube videos of the same game).
http://youtu.be/b66FU2z5w5w ![](https://www.eevblog.com/forum/projects/otp-eprom-programmer/?action=dlattach;attach=332079;image)