Author Topic: Cloning a Commodore PET-2001  (Read 48670 times)

0 Members and 2 Guests are viewing this topic.

Online ebastler

  • Super Contributor
  • ***
  • Posts: 7135
  • Country: de
Re: Cloning a Commodore PET-2001
« Reply #100 on: June 10, 2018, 06:24:53 pm »
Somebody already did clone the Apple I, not sure about the II, that may be reasonable to try.

Right, there are a few modern replicas of the Apple I around. However, I think there is a gap between the Briel Replica I (which claims to be functionally equivalent, but uses some more highly integrated ICs than the original, I believe) and the various 1:1 copies of the PCB. (Those are more like "forgeries" than replicas, in my mind. ::)

As to the Apple II, of course there were plenty of clones back in the day!  ;)
 

Offline austfox

  • Regular Contributor
  • *
  • Posts: 158
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #101 on: June 13, 2018, 02:15:59 am »
Just to let you know that I've been following this thread with interest, and would like to purchase the 2 PCBs for the PET if you ordered multiple boards?
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
  • Very dangerous - may attack at any time
Re: Cloning a Commodore PET-2001
« Reply #102 on: June 13, 2018, 07:24:16 am »
My most tedious task so far for the TRS-80 project was manually writing the character set binary file.

About 20 years ago I wrote an emulator for the TRS-80 Models I/III/4/100/102/200, and Color Computer 1/2/3/MC10. This was a Windows program and I created a Windows bitmap font for use by the emulator. Attached are the source files that where used to generate the fonts. They contain the font ROMs as C arrays. Converting this to whatever format you need would probably require some trivial C code. There are annotations in the source about where the fonts came from and the quirks they have. I have also attached the ROMs for these systems.


« Last Edit: June 13, 2018, 07:27:01 am by oPossum »
 
The following users thanked this post: MK14, nad007007

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #103 on: June 13, 2018, 12:51:26 pm »
Just to let you know that I've been following this thread with interest, and would like to purchase the 2 PCBs for the PET if you ordered multiple boards?


Hi, I've got five spare sets of the 2 boards, but can you give me a week or two to finish documentation/b.o.m./tesitng, etc?

Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #104 on: June 13, 2018, 12:54:47 pm »
My most tedious task so far for the TRS-80 project was manually writing the character set binary file.

About 20 years ago I wrote an emulator for the TRS-80 Models I/III/4/100/102/200, and Color Computer 1/2/3/MC10. This was a Windows program and I created a Windows bitmap font for use by the emulator. Attached are the source files that where used to generate the fonts. They contain the font ROMs as C arrays. Converting this to whatever format you need would probably require some trivial C code. There are annotations in the source about where the fonts came from and the quirks they have. I have also attached the ROMs for these systems.


It looks like I should have asked here first before compiling my own character ROM binary file!
« Last Edit: June 13, 2018, 01:36:55 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #105 on: June 13, 2018, 01:03:53 pm »
The (Z80) TRS80 model 1 is next on my list. I don't think that there are too many other "mini" computers from the era which can be cloned this way (not requiring NOS chips no longer manufactured).

How about the Apple I and II? Somewhat similar to the PET, of course. But digging into Wozniak's graphcics design may be worthwhile?


I've got the schematics and details for the Apple1, but didn't really find it all that interesting. I hadn't looked at the Apple II until now, but it does look like a very good contender for a clone....... unfortunately though, there are only so many hours in a day. If only I was payed to do this in my day job...........
« Last Edit: June 13, 2018, 01:37:51 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: ebastler

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #106 on: June 13, 2018, 01:36:14 pm »
It sounds like you did exactly what I had to do for that font ROM - at least it was only 5x7...  It sounds like you've already done it, but if not I can provide a hex file with the "floating a" if you need it.

My plan for the floppy controller is to emulate the WDC1771 with an Arduino Mega talking to a flash card.

OK, back to your current project...  I'm gonna have to steal your keyboard template idea.  It will beat going back to the vhdl file to figure out where I mapped the Break key :)


Maybe I should just make provision for an external '1771 emulator to be plugged in? Hm, I will see. Your project sounds interesting. Did you get as far as of yet as testing any or all of your VDHL on an FPGA development kit or the like?

There were some weird design decisions made with the original TRS-80; for example the odd-ball 10.6445 MHz pixel-shifting clock frequency. Perhaps that was a commonly available crystal 40 years ago, but you certainly can't buy a 10.6445 MHz crystal off the shelf today. That high frequency meant that all 384 pixels of a complete row were serially shifted out in just 36uS of the complete 63.13uS line period. Unless displayed on a TV/monitor having a tweakable (expandable) width control for the horizontal picture size, that will result in a fairly squished up display horizontally. Also 10.6445 MHz is pushing the video bandwidth limitation of your typical TV-based display monitor a bit too far and it was a complaint back in the day that the high-resolution video characters were ill-defined and blurry on the screen. Maybe RS just had a preexisting stockpile of 10.6445 MHz crystals to use up?

To mitigate these issues and to avoid having to source a 10.6445 MHz crystal, in my clone design I've lowered the pixel-shifting clock frequency to 8MHz. The master clock source will be a generic 16 MHz oscillator. The CPU clock in the original TRS-80 was 1.774 MHz (10.6445 MHz divided by 6). I'll divide my 16 MHz by 9 for 1.778 MHz, which is more than close enough.

« Last Edit: June 14, 2018, 08:34:59 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #107 on: June 13, 2018, 09:03:39 pm »
It really surprises me that the character ROM image is not already out there somewhere. There are many projects to emulate vintage computers, and other projects to archive ROM dumps from these and related hardware. Couldn't anyone with one of the machines dump the ROM easily enough?
 

Offline kizmit99

  • Regular Contributor
  • *
  • Posts: 106
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #108 on: June 15, 2018, 12:21:34 am »
Did you get as far as of yet as testing any or all of your VDHL on an FPGA development kit or the like?

I had the base system (without the expansion interface) running on a Cyclone IV demo board like this one:


The final design should fit into a Cyclone II, so the idea is to eventually use this board with a custom daughter board:


Wrote a PS2 keyboard interface which memory maps the current set of pressed keys so it appears to be an original keyboard.  Instead of generating the original video signal it outputs a monochrome 800x600 VGA video signal.  Had to duplicate the original cassette audio input with a few analog components, then used an old iphone to feed the cassette audio input.  Definitely a real blast-from-the-past to be running StarTrek.  Haven't been able to make the cassette audio out work to the point I can actually csave anything though.
 
The following users thanked this post: oPossum

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #109 on: June 15, 2018, 06:23:06 am »
Those little Cyclone II boards are great. I have nearly a dozen of them running as various retro computers and 70s arcade games. They're ridiculously cheap, cheaper than buying the bare FPGA. It's a rather old part now but still perfectly adequate for this sort of thing, and making the most of limited hardware is kind of in the right spirit for this stuff anyway.
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #110 on: June 17, 2018, 01:16:09 pm »
I'm been meaning to upgrade from CPLDs to FPGAs in my home workshop for a while now and almost clicked the "buy now" button a couple of times, but just haven't gotten around to it so far; one of those ebay Cyclone dev boards or the like might be a good start.

-----------------------------

Anyone with an suitable reader can pull a 27XX from a vintage computer board and save the contents, but for the Tandy character set ROM you'd have to solder up an adaptor to fit a 27XX footprint and just ground any unused address and data pins. The ROM was a Motorola MCM6670, which was called a "Character generator", but that was just marketing as the part was nothing more sophisticated than a parallel in/out ROM with 5-bit words. The part was packaged in an 18 pin DIP which I don't think was originally socketed in the TRS-80.

-----------------------------------------

I was a bit slack this week end electronic project wise, but late this afternoon a couple of hours before having to attend to my weekly chook and duck poop shoveling chore, I at least made a rudimentary start on the case. I originally planned a 2U case but ended up deciding on 3U. I've finished the PCB layout for the keyboard interface and will etch that soon. The keyboard interface will get mounted on the opposite side panel to the video generator board and a torodial power transformer will get mounted onto the rear panel.

The 3U front panel will give me a healthy amount of room to layout all of the I/O connectors and control switches. Rather than rolling my own front panel labeled with Dymo tape, I've decided to splurge out and get the front panel done by Front panel express and have just downloaded the latest version of their "Front panel designer" software. I should get that out before the end of the working week, but the production and delivery delay will probably stall the completion of this project by another couple of weeks.

While waiting I think I might brush up on my BASIC and write a PET version of Atari Pong  :D

« Last Edit: June 17, 2018, 01:35:54 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1783
  • Country: pt
    • VMA's Satellite Blog
Re: Cloning a Commodore PET-2001
« Reply #111 on: June 17, 2018, 01:46:14 pm »
WOW!

Reading this thread looks like I am looking over the shoulder of the original PET creators.

I won't try to replicate it, as reason tells me I don't have space, knowledge, time, money and I could use an emulator.

Still, what a joy to look at your project.

 :-+

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8138
  • Country: ca
    • LinkedIn
Re: Cloning a Commodore PET-2001
« Reply #112 on: June 17, 2018, 04:28:50 pm »
 :-+ Excellent Job!
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #113 on: June 17, 2018, 05:25:47 pm »
I'm been meaning to upgrade from CPLDs to FPGAs in my home workshop for a while now and almost clicked the "buy now" button a couple of times, but just haven't gotten around to it so far; one of those ebay Cyclone dev boards or the like might be a good start.


Well if you do, I've got a pile of random turnkey projects targeted to those boards which you're welcome to play with. Some are my creations, others are stuff I ported from elsewhere. It's an old part but still quite capable. You need a programmer too, the USB Blaster clones that are only a few dollars from China work just fine.
 
The following users thanked this post: GK

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #114 on: August 06, 2018, 09:15:24 am »
.............and I could use an emulator.


Some of us are a little masochistic  ;D
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #115 on: August 06, 2018, 09:39:33 am »
Hi all.

Sorry for the delay in replying to those interested in the circuit boards. Unfortunately I have had a five or six week hiatus from this project due to being busy with far too many other things. I got back into it late this weekend, finally transferring the PS/2 keyboard interface circuitry to a home-etched PCB - works a treat.

I went a little elaborate in the design as I wanted key stroke echoing via RS232 in PS/2 mode and also the ability to control the PET via the keyboard interface via RS232. I haven't coded the latter function yet; that's waiting for a few spare hours.

Pics of the system in its current degree of completion, wired up and operational, attached below. Every thing works perfectly fine so far and the only thing I have yet to fully test out is the GPIB port. I'm currently writing some BASIC test programs and soldering up a GPIB breakout (LED/switch/IO) box.





« Last Edit: August 06, 2018, 12:30:41 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: mathsquid, derree

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #116 on: August 26, 2018, 12:54:24 pm »
OK, outside of chasing women and recovering from a cold I got absolutely nothing done on the project since my last post - until this weekend. I managed to finish my IEEE-488 port test program and finish off the hardware testing.

So here is some babbling about the successful IEEE-488 hardware testing and implementation.

I did finally discover one electrical error in the PCB layout, which fortunately is quite easily rectified (picture attached). I'm not sure how I missed this, but in one of the two 74LS245 octal line drivers/receivers that I am using as receivers in my IEEE-488 port, only six of the eight buffers are used. Instead of grounding the two unused input pins I accidentally grounded the two unused output pins instead. I noticed that this chip was getting a bit warmer than it should. Fortunately the unused input pins, numbers 8 and 9 are inline with pin 10, the ground pin, so fixing the problem is just a solder blob shorting these three pins together. The buffers are non-inverting, so the two unused output pins accidentally grounded rather than left unconnected can just be left as they are.

The long obsolete Motorola IEEE-488 interface chips originally used in the PET were unusual in that a separate receive output pin and transmit input pin were provided for each I/O pin. All IO, as per the original IEEE-488 standard, was open-collector with a resistive (voltage divider) pull-up to approx. 3.5V. Logic low=true. In these Motorola chips the receive output pin simply reflected the logic state of its respective I/O pin regardless of weather the I/O pin was asserted true (low) by either an external device or by the respective transmit input pin being asserted low.

Consequently in the PET there isn't a direction control register of any sort for IEEE-488 communications, but separate output and input register bits for all of the CPU-controlled I/O pins, with the exception of SQR, which is an input only and therefore doesn't have an output register address. There are also two control pins which have no register addresses at all as they have no hardware provision for CPU control. These are RET and IFC. The RET line is electrically tied to ground. This asserts the PET as a permanent host. IFC is asserted by the power-on system reset (555) timer only. There is a total of 16 lines in the IEEE-488 standard - 8 data lines and 8 control lines.

To implement the IEEE-488 interface as per the original PET hardware configuration using current production parts rather than those obsolete Motorola chips, I used a pair of SN75ALS160 as the output line drivers and, as mentioned above, a pair of 74LS245 buffers as the line receivers. The 74ALS160's are wired in uni-directional mode with the active pull-ups disabled. In this mode the I/O are open-collector outputs with an internal resistive pull-up to ~3.5V. The 74LS245's are perfect in this application as line receivers as they have TTL-compatible switching thresholds with hysteresis. They also have special high-impedance inputs courtesy of emitter-follower input buffers, so they will not load the internal resistive pull-ups of the SN74ALS160 operating in open-collector mode.
     
Pictured below is a screenshot of the IEEE-488 test program that I wrote this weekend. The screen is divided into two halves - the left hand side for the output register status/control and and the right hand side for the input register status. The current logic state of a register bit is indicated by the O graphic symbol next to its respective pins name. A logic high (false) is indicated by a solid O while logic low (true) is indicated by a empty O.

The logic state of any IEEE-488 pin can be toggled by pressing the letter key indicated to the left of the pin name listed in the output register table. With the exception of pins ATN and SRQ, with no external device connected to the IEEE-488 port the status of the input register bits on the right hand side of the screen simply reflect the output register status. Basically, there are two ways to make an input register bit show a logic low (true) - by either asserting the pins respective output register bit low (true) or by shorting the pin to ground at the IEEE-488 port. The program I wrote therefore makes for a handy hardware test even without any device connected to the IEEE-488 port - if, when toggled, the logic status of any input register bit does not reflect the logic status of the respective output register bit, then there is a hardware malfunction, either with the output driver or with the input receiver for that register bit's respective I/O pin.

Pins ATN and SRQ are a little special. All other input pin registers are asynchronous and indicate true when their respective I/O pin is pulled low by whatever means. ATN and SRQ however are edge-triggered inputs, their respective register bits being set on a high (false) to low (true) pin transition. In order to give an unambiguous test indication for the operation of these pins in my program, I configured these pins to behave as flip-flops. In the input register side of the screen there is an N key indicated to the left of the ATN input register bit and an O key indicated to the left of the SRQ input register bit. Pressing the N on the keyboard will clear (set high = false) the ATN register bit wile pressing O will clear the SRQ bit. The only way to get either ATN or SRQ to indicate true after being cleared is to assert the respective hardware pin true (low). The SQR pin, as mentioned previously, is an input pin only, so the SRQ I/O pin must be externally forced to ground. ATN however is both an input and an output, so it can be asserted true either by shorting the ATN I/O pin to ground externally or by toggling the ATN output register bit from high (false) to low (true). Once set true both the ATN and SQR registers will remain in that state (indicating that a false-true transition was successfully registered) until manually cleared by pressing the respective clear key.

Oh, and one last thing. The EOI output resister bit is utilised in the PET to serve a secondary hardware function - when asserted true the video screen is blanked! Asserting the EOI I/O line true externally (and thus the EOI input register bit) does not blank the video screen however. It is only the logic state of the EOI line at the input side of the line driver that controls the video blanking. This freaked me out a bit the first time I pressed K on my keyboard whilst running my developing test program, until I remembered the hardware configuration of the EOI line. Oh no! I've killed it!  :P



« Last Edit: September 08, 2018, 10:28:19 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: oPossum, derree

Offline jeffheath

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #117 on: August 27, 2018, 06:11:12 am »
Just wanted to say this thread is awesome! :D  I don't quite have what it takes to do a full "modern replica", but I now have some potential ideas involving fpga kits and a dead c64 i have laying around.....
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #118 on: September 08, 2018, 10:37:30 am »
Thanks  :)


A progress update:

I've got the 3U case 90% fabricated and the computer is wired in and operational with its own AC power supply. I have only just finished the front panel design this evening. I will send the design off to Front Panel Express for fabrication this weekend.

When I finally get the panel I'll use it as a template to mark out the mounting holes in the assembled case; then it's just a few more holes to drill and tap and the whole thing will be complete for the final assembly; probably the weekend after next.


EDIT: silly typos have been noticed and corrected.






« Last Edit: September 08, 2018, 11:06:43 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: derree

Offline Bicurico

  • Super Contributor
  • ***
  • Posts: 1783
  • Country: pt
    • VMA's Satellite Blog
Re: Cloning a Commodore PET-2001
« Reply #119 on: September 08, 2018, 11:47:43 am »
So cool!

Reading about your progress is fantastic by its own measure.

Regards,
Vitor

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #120 on: October 02, 2018, 12:32:26 pm »
Well the computer is now finished electrically. Now I just have to mark out and drill and tap the mounting holes for the lid and fashion the last length of 10mm square rod which screws to the inside top of the front panel, but that is enough for this evening.

I'm largely done with the PDF documentation - just need photos of the completed unit to finish it off. Once I'm done with the documentation I intend to publish the whole thing (Gerber files, ROM images, BOM, etc) on a single dedicated page on my website. This will probably take another couple of weeks.


 




« Last Edit: October 02, 2018, 12:37:30 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: SeanB, jeffheath, derree

Offline jeffheath

  • Regular Contributor
  • *
  • Posts: 71
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #121 on: October 02, 2018, 10:05:33 pm »
Nice! Love the neat wiring, and the Altair look. ;D
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #122 on: October 04, 2018, 07:36:12 am »
Thanks.
Hmm, I dunno though - I think it would need a lot more toggle switches to remind me of an Altair  :)
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline martinjaymckee

  • Contributor
  • Posts: 16
Re: Cloning a Commodore PET-2001
« Reply #123 on: October 06, 2018, 06:18:58 am »
Just wanted to chime in on what a cool project this is.  I agree with previous posters about the implementation being beautifully clean and well laid out.  I certainly would love to have something like that in my workshop -- for now I'll have to stick to my Raspberry Pi to control things.  I'm sure your new PET will do well!

Cheers,
Martin Jay McKee
 
The following users thanked this post: GK

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #124 on: October 24, 2018, 11:32:27 am »
OK, I still haven't finished the PET documentation yet. Seems I'm crap at estimating time frames for hobby projects. I've had a diversion, which I just finished loading and testing this evening.

This is the "deluxe" cassette port analogue interface which I mentioned some time earlier in  the thread. Plugged into the PET's (or C64's or VIC20's, etc) cassette port, it allows almost any audio recording/playback device to be used instead of a propriety Commodore "Datasette" for program and data storage. The encoding method Commodore used is polarity sensitive, so provision is provided (for compatibility with other recorders) in both the read and write signal paths to invert the signal. A data bit is represented by a full cycle of a squarewave of a specific period immediately followed by another full cycle of a squarewave, but of of a different period. Which way around the periods are depends on weather or not a 0 or a 1 is being represented and all timings are measured from negative-going edges only.

The "read" signal is bandpass filtered, limited and then sliced by a comparator with hysteresis. This circuitry in practice does a great job of cleaning up and giving successful data transfers with rather crappy/noisy/ringing/low-level playback signals. When data is being properly received in the read signal chain the activity L.E.D. will flash as a constant rate of approx 2.8 Hz. I've been loading and saving programs from and to my crappy Digitech portable voice recorder.

Now I just have to build it into a fancy instrument enclosure.




 
« Last Edit: October 25, 2018, 06:45:23 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: derree


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf