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

0 Members and 1 Guest are viewing this topic.

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3237
  • Country: gb
Re: Cloning a Commodore PET-2001
« Reply #75 on: April 25, 2018, 04:16:15 pm »
Fantastic project! I seem to be missing the time and motivation to do this kind of thing these days.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #76 on: April 25, 2018, 04:19:48 pm »
It's totally cool, although I think if I were going to do it I'd just put the whole thing in a small FPGA, though there is something neat about "real" hardware.

The PET is simple enough that it could probably be put into the same hardware as this http://searle.hostei.com/grant/Multicomp/  I've built all the variations and it works great.
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #77 on: April 26, 2018, 02:45:15 am »
Yeah, that was discussed earlier in the thread. Here I'm just making use of the current production 6502/6521/6522 variants/equivalents currently produced by WDC and sold by Mouser. It's just fun to functionally clone a ~40 year old computer basically the old fashioned way using entirely current production discrete CMOS logic, uP and peripherals.
 
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).

Given the almost cult following and nostalgia for the 6502, I'm surprised that so far I appear to be the only one around here building a 8-bit machine with the modern WDC 65XX parts.
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 #78 on: April 26, 2018, 04:52:00 pm »
That really is pretty cool. The surprising aspect is just how few parts are on that board even using individual components. It's also a bit surprising that in 2018 there is still a current production DIP packaged 6502.
 

Offline LaserSteve

  • Super Contributor
  • ***
  • Posts: 1280
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #79 on: April 26, 2018, 06:56:00 pm »
If you clone the TRS-80, make sure you do an expansion interface. Its pretty much a paperweight without one.
I imagine a CSAVE/CLOADusing wav files is a lot better then using the cassette player.

I wonder if all those trash-80 magazines with their One Line Program competitions are still one line.
A 16K Level II TRS-80 would burn a lot of memory for every new program line. A tradition appeared for writing one line programs to save ram.

Answered my own question about one liners...

Edit, Yep.. Lots of them...

https://www.muppetlabs.com/~breadbox/software/trs80-oneliners.html

I gave my TRS-80 to a Russian immigrant kid in the late 90s, you would have thought I had given him a Mainframe or a Cray given the look on his face.

I still have the "TRS-80 modular furniture system" desk. Yes, the Shack once sold computer furniture.

Steve
« Last Edit: April 26, 2018, 07:09:51 pm by LaserSteve »
"What the devil kind of Engineer are thou, that canst not slay a hedgehog with your naked arse?"
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #80 on: April 28, 2018, 08:43:12 am »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline jthomas

  • Newbie
  • Posts: 5
  • Country: gb
Re: Cloning a Commodore PET-2001
« Reply #81 on: April 29, 2018, 10:35:05 am »
Looking forward to seeing the rest of the schematic! I'd love to have a go at laying out my own single-board PCB for the thing... a clone of a clone if you will :D

I have a possibly silly question about the video section though - what do the two ROMs U117/118 do? The rest of the circuit looks very similar to one I've already built in the past but I can't seem to figure out on my own what their role is in this case.

Just about the only thing I can think of is converting X/Y addressing to straight binary or vice-versa (so as not to leave "holes" of unused memory)... I'd appreciate having it explained to me as not knowing will annoy me!  |O
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #82 on: April 29, 2018, 02:21:40 pm »
Those ROMs just map the 1000 video memory character locations called by the CPUs operating system (40 horizontal characters [columns] x 25 vertical characters [rows] = 1000 character locations) to the ones in the video RAM that actually correspond to those locations on the screen.

In the video RAM there are 14 unused character column positions per horizontal row (40 of 64 used) and there are a total of 39 rows, of which only 25 are used = a total of 2496 memory locations. This is why the video SRAM has a 12-bit address, while the actual video board address bus is only 10 bits.

Using look-up table ROM for this just simplifies the circuitry as you can then just address the video RAM directly from the pixel and line counters while drawing the display. The original PET hardware instead used a separate address counter for the video RAM (that was continuously stopped and started during the visible field) in combination with a required address location memory/latch, and some convoluted logic to control it all. Back in the day it wouldn't have been economical to waste video memory this way, but now we have 256k-bit SRAMs for pennies.

   
« Last Edit: April 29, 2018, 02:27:09 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: jthomas, derree

Offline jthomas

  • Newbie
  • Posts: 5
  • Country: gb
Re: Cloning a Commodore PET-2001
« Reply #83 on: April 29, 2018, 03:05:04 pm »
Thank you for the explanation :D
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6384
  • Country: de
Re: Cloning a Commodore PET-2001
« Reply #84 on: April 29, 2018, 04:02:18 pm »
That really is pretty cool. The surprising aspect is just how few parts are on that board even using individual components.

Well, there weren't too many components on the original board.
Combine the RAMs and ROMs into higher capacity ICs, and there are not that many chips left:



 

Offline ale500

  • Frequent Contributor
  • **
  • Posts: 415
Re: Cloning a Commodore PET-2001
« Reply #85 on: May 01, 2018, 05:53:03 am »
How about a CoCo clone ? :), the three important chips are sitting in one of my parts drawers since... a couple of years :)

Fantastic work !
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #86 on: May 21, 2018, 01:41:17 pm »
Okaayyyyyyy......

I've basically have the motherboard schematics finished now and drawn up in Protel. I was just about ready to start laying out the PCB Sunday night after "updating"/importing all of the component footprints to the PCB template from the schematics.

However I've made quite a few significant changes to the design over the initial crappy prototype and I just decided that it would be good to see the final circuitry working before committing to the PCB, just because. The changes were primarily regarding the manner in which the data bus from the CMOS W65C02 was buffered to the TTL-level-IO memory and N-version peripherals and the read/write decoding.

So this evening, to save time cooking and eating and all of that, I picked up a whopper with cheese and large fries from Hungry Jacks (burk!) on the way home from work, scoffed it down and then went straight into the shack. It was going to be way too hard to majorly rewire the crappy initial soldered prototype, so I unplugged all of the chips and went for breadboard instead.

Four hours later and I have the computer built to the absolute minimum hardware (nary a wire beyond) required for a system boot. The boot-up message didn't display for me on the initial power-up as I missed the wire from the address decoder to the !CS pin of the system RAM! I hope I'm not coming down with early-onset Alzheimer's disease or something.
 
Tomorrow if I feel like it I'll wire in PIA#1 - that will give me the blinking cursor and allow me to connect up my keyboard interface. Right now though I'm going to bed.

« Last Edit: May 22, 2018, 12:48:51 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: derree

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #87 on: May 26, 2018, 10:13:08 am »
I have finally finished the motherboard PCB layout.

I've added a few features not available in the original PET too. The ROM holds both V2 (sometimes referred to as V1) and V3 (sometimes referred to as V2 or "upgrade") BASIC. The version of BASIC to run is switch-selectable. There is also a RESET button, which saves having to power-cycle when the computer crashes, which it will if you change the position of the BASIC version select switch when the computer is running.

The original PET-2001 used 1/60s "jiffies" as the time interval for updating its software real time clock. The vertical frame rate from the video circuitry was the frequency reference. Since I designed my video generator to operate at a frame rate of 50 Hz, the real time clock will not keep accurate time., so as a work-around I included on the board an accurate 60 Hz clock source. A jiffy clock selector switch permits the CPU interrupt/sync to be taken either from the 60 Hz source or the video vertical frame rate.
However in the 60 Hz mode, the CPU will no longer be synchronized with the video frame rate and the PET's synchronized "snow free" display update mode won't operate without the snow. This is only a minor inconvenience as the 60 Hz switch need only be flicked when you want the PET to accurately measure time, and such applications generally aren't graphics intensive anyhow.
As an aside, AFAICT, the PET's original jiffy clock wasn't all that accurate anyway, as the 60 Hz field/frame must have been a little bit off frequency as it was derived by integer division in the video generation circuit of the 8 MHz master clock. 60 doesn't divide evenly into 8M. I used a stock 3.932160 MHz crystal in my oscillator, which is divided by 2^16 = 60 Hz exactly (a 74HC4060 followed by both halves of a 74HC74).

For sound effects/music there is an LM386 audio amplifier on board with volume control to drive an internal speaker, a source select switch and a -10dBV line-out buffer amp. The 4-pole rotary source select switch positions are OFF, VIA CB2, Cass. read & Cass write. VIA CB2 is for sound effects as demonstrated in this thread previously and the other positions allow you to listen in to either the input or output data streams of the cassette drives.

For the keyboard interface, I elected not to incorporate a PS2/USB interface on the motherboard, keeping the circuitry as per the original PET in this regard.
My PS2/USB keyboard interface will be a separate PCB design which will simply plug into the IDC26 keyboard matrix interface connector on the motherboard as an alternative option to either an original CBM keyboard or one hacked/rewired to suit.

That's all that's interesting that I can think of right now as it's past time for dinner. I'll be giving the whole thing one more thorough checking over again tomorrow. Hoping to have the board to load with bits in a couple of weeks.
       
« Last Edit: May 28, 2018, 05:15:58 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: derree

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #88 on: May 26, 2018, 05:32:02 pm »
Motherboard schematic teasers................



















« Last Edit: May 26, 2018, 05:35:43 pm by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: zitt, derree

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #89 on: June 02, 2018, 12:09:01 pm »
Amazing service from Elecrow. I posted the Gerber files and ordered Sunday evening and the boards arrived Friday (yesterday) afternoon. I wasn't expecting to receive the boards prior to this weekend and haven't organized all of the parts yet, but I just loaded up what I had this afternoon.

Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: dave_j_fan, nad007007, zitt, derree

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #90 on: June 02, 2018, 06:41:28 pm »
That's a nice tidy looking board. Mounting holes in the corners, nice clean traces without any weird angles, looks good.
 

Offline kizmit99

  • Regular Contributor
  • *
  • Posts: 106
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #91 on: June 02, 2018, 08:25:10 pm »
Looking good  :-+
I just wanted to drop a note to say I'm enjoying watching this project progress.  While I don't post much here, I do post on other forums and I know that sometimes when you're updating progress on a long-term build that you can begin to wonder whether or not you're just talking to yourself.  So this is just to let you know that your updates are appreciated.  Thanks for posting!
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #92 on: June 03, 2018, 11:31:33 am »
Thanks for the comments.

I designed the board along the same rules as the video generator board to make it very easy to assemble and trouble shoot and not to cause any hassle with even the cheapest PCB fab. All tracks are routed out on a 50 thou grid spacing. This did make for a rather large board, but I guess a retro clone of a PET just wouldn't be right on anything else  :D
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: derree

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #93 on: June 09, 2018, 06:52:37 am »
Parts arrived yesterday, finished soldering up the motherboard this afternoon. The next step will be to layout a little board for my PS-2 keyboard interface and organise the hardware and connectors, etc, for completing this project into an enclosure. I'm going to assemble the computer into a 2U 19" rack case, with all of the I/O connectors and control switches mounted on the front panel.   

I also need to layout a small PCB for an analogue circuit to interface one of the PETs two digital cassette drive ports to general purpose/standard "mic." and "line-out" signal I/O for loading and saving programs to a non-Commodore audio recording/playback device. I originally thought to install this interface board inside the PETs enclosure, permanently plugged into cassette port #2 on the motherboard, but I now think I'll build up a "deluxe" version of this device as a separate stand-alone project in its own enclosure, as I'll be able to use such an interface to connect my other Commodore computers to external audio recorders too.     
 
I'm eager to get this project done and off the bench now as I have the circuitry for the TRS-80 clone pretty much done on paper now. Should be able to post some preliminary breadboard TRS-80 action in the not too distant future......  :D

« Last Edit: June 09, 2018, 06:55:15 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: zitt

Offline Delta

  • Super Contributor
  • ***
  • Posts: 1221
  • Country: gb
Re: Cloning a Commodore PET-2001
« Reply #94 on: June 09, 2018, 07:03:50 am »
To echo Kizmitt's comments, I haven't posted as I have precisely zero to contribute.  But as a C64 man and a fan of vintage electronics, I have been following with great interest, and think your project is bloody brilliant!
 
The following users thanked this post: GK

Offline kizmit99

  • Regular Contributor
  • *
  • Posts: 106
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #95 on: June 09, 2018, 04:04:04 pm »
I'm eager to get this project done and off the bench now as I have the circuitry for the TRS-80 clone pretty much done on paper now. Should be able to post some preliminary breadboard TRS-80 action in the not too distant future......  :D

Sweet!   :-+ :-+ :-+ Very interested to see where you take that one - I've always had a soft spot for the TRS-80.  It was my first computer (in '78 I think), I did so much hardware hacking on that poor machine it no longer looks anything at all like the original.  Still have it, plus another I bought from a friend sometime in the '90s - both still worked when last powered up (about 12 years ago  :(). 

Recently I used cloning the TRS-80 as a project to get up to speed on FPGAs, the plan is to do up a PCB with that design (and the minimal supporting analog hardware (like the cassette interface)) to get up to speed on where PCB tech is today.  The last time I did a PCB I think the layout and first prototype boards where something like $50K a pop (very early '90s, pretty high density mil-spec board admittedly) - so the thought of getting prototypes for $5 is just astounding to me...  Anyway, looking forward to see your take on the TRS-80!
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #96 on: June 10, 2018, 03:54:05 am »
I thought mention of the TRS-80 might get a bite  :) - that was quite a popular machine back in the day, particularly in America, the home of Radio Shack. I wonder how it compared to the PET?

My most tedious task so far for the TRS-80 project was manually writing the character set binary file. Unlike the PET, the TRS-80 didn't use a generic/jellybean EPROM for the character set, but used a Motorola mask ROM which was factory-programmable with the customers supplied character set.

I couldn't find an image binary file of this ROM on the net, but I did find nice graphic of the individual characters resolvable down to individual pixels. The TRS-80's character set is more primitive than the PET's, but that block graphics mode made it a lot more flexible for games and stuff. It's just a pity that the original designers didn't use the vertical video sync like the PET designers did as a CPU interrupt as a way of generating flicker-free writing to the screen.

I intend to functionally duplicate the whole of the TRS-80 model 1 including the expansion interface (with 48k of RAM total), with the exception of the floppy disc controller as the chip for that function is now only available NOS.

On the topic of character sets, I'm currently working on the documentation for my PET build - here is how I mapped in my PS-2 keyboard interface (as straightforward and logical as practical) the PET's 73 keys/functions to a modern keyboard layout. I've printed this out and laminated it to serve as a handy look-up card/reference when typing, though it's mostly only needed when you need to find a shifted graphics character.

Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 
The following users thanked this post: niladherbert

Offline kizmit99

  • Regular Contributor
  • *
  • Posts: 106
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #97 on: June 10, 2018, 04:41:01 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 :)
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6384
  • Country: de
Re: Cloning a Commodore PET-2001
« Reply #98 on: June 10, 2018, 05:33:21 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?
 
The following users thanked this post: niladherbert

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #99 on: June 10, 2018, 05:47:04 pm »
Somebody already did clone the Apple I, not sure about the II, that may be reasonable to try.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf