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

0 Members and 3 Guests are viewing this topic.

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #150 on: December 30, 2018, 10:22:37 am »
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.


OK, better late than never; here is where I currently am at, construction wise, with the Model 1 TRS-80 clone. I basically have the whole thing designed on paper and it's now just a matter of building it. I intend to verify the design this time around, before laying out the PCBs, by building the complete computer on bread board. So far I have the video generation circuitry constructed entirely in CMOS logic to the extent that it will display from the uppercase page of the character set in high-res (64 horizontal characters) mode. My CMOS implementation is quite a bit different from the original design and I'm using an 8MHz pixel clock as mentioned previously in the quoted post.

The screen is just showing a random garble of characters at the moment due to the random contents of the video RAM at power up. Might start a new thread in a day or two  :)

Oh, and yeah, a couple of characters are a bit dicky (N for example), necessitating a character ROM revision - I did manually type this ROM out byte for byte in a binary editor after computing each byte on graph paper and am still not 100% sure if my character set is an entirely verbatim, pixel-for-pixel replication of the original.


« Last Edit: December 30, 2018, 10:37:54 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline wilfred

  • Super Contributor
  • ***
  • Posts: 1265
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #151 on: December 30, 2018, 10:44:17 am »
I always enjoy reading your posts about progress in your latest project. But, wouldn't a dedicated thread for the TRS80 clone help people follow along better.
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #152 on: December 30, 2018, 01:20:48 pm »
I always enjoy reading your posts about progress in your latest project. But, wouldn't a dedicated thread for the TRS80 clone help people follow along better.


Yes, already contemplating starting a new thread. I was hoping to maybe get some CPU action already happening before going out tomorrow night, but I just noticed that the two Z84C00s CPUs which I bought months ago now in anticipation of this project are in fact a pair of Z84C20s, which is a bloody PIO. Sometimes if I'm lucky a Digikey or Mouser order placed on a Sunday night will arrive the following Thursday or Friday arvo, but I can't see that happening now with NYE an all. Argh. Another week+ in limbo.
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline kizmit99

  • Regular Contributor
  • *
  • Posts: 106
  • Country: us
Re: Cloning a Commodore PET-2001
« Reply #153 on: January 01, 2019, 09:31:07 pm »
 :-+
Looking forward to seeing what you do with this...

I've been planning to start a thread on my TRS80 project, but have been spending too much time trying to get the disk-controller emulator working.
Just for grins, here are a few shots of where mine's at...
First version of the PCB needs a few extra pullups:


It's able to read and write from "cassette":


And plays all of the games I've tried on it.  Here's Star Trek ala 1979...


Have been working on the disk emulator for far too long now...


But even though it's still very flaky (I'm getting more read failures than from a real floppy :)), it will boot (and somewhat run) LDOS:


Definitely looking forward to your approach.   :-+
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #154 on: January 02, 2019, 07:52:52 am »
I'm interested to see how your disk controller emulator works out  :)

I've decided to build my TRS-80 Model 1 clone and the expansion unit as separate units. The only non-standard thing I'll be doing, architecturally, is putting the full 48k of memory into the TRS-80 clone. As you likely know, the original TRS-80 keyboard unit was expandable to 16k maximum and you got to 48k with an additional 32k inside the expansion unit. My clone will be compatible with an original expansion unit too, with a small modification -  the RAM inside the expansion unit will need to be disabled by inhibiting the memory data bus read buffers.
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 #155 on: January 09, 2020, 03:48:15 am »
Ahhh, ok, just do / try this (I've seen this before with my friend's board miller.) :

Follow my settings in the attached screenshots:

For the Gerbers Films, Select Imperial or Metric, with the highest resolution of 2:5.  For the film coordinates, use the relative origin.  (This means the coordinates used in the gerber file places 0.0 X 0.0 at the position of your set origin marker in your PCB.)

I usually use the bottom left corner of the PCB.

Now for the NC Drill settings. 
Use the same units and resolution as the Gerber File settings, and
!!! Use " Reference to relative origin " just like the Gerber Films so that your drill hole has the exact same coordinates as the pads on your Gerber Film which is also now set to the same reference relative origin.

This used to be aligned manually by the tech at you PCB manufacturing shop, so, the NC drill used to never have to match the coordinates of the gerber film.

See my PCB screenshot for relative origin position...



Hi Brian,

I'm just popping in to update this thread as this issue is still haunting me. I can't do as you described above because the option to align the NC Drill file to any kind of origin at all wasn't a thing until a later version of Protel than what I own.

I did however update and fix the Gerber files provided on my site for this project ( http://www.glensstuff.com/pet2001/gerber/gerber.zip ) so that they display properly in JLCPCB's on-line viewer. JLC's Gerber viewer is smart enough to automatically align the drill guide layer used for manufacturing (this is the layer with the .TXT extension) to the relative origin of the PCB, which must be set to the lower left hand corner of the board. The very first set of Gerber files that I had posted to my site (which Elecrow manufactured for me without complaint) still had the origin set to the default position; that being the lower left hand corner of the worksheet itself rather than the PCB. This is why they did not view properly in JLC's viewer. I've since had my own boards manufactured by JLCPCB.

However it seems that virtually all other on-line Gerber viewers aren't as smart as JLC's and they won't do this alignment of the drill guide to the origin of the PCB. Someone has contacted me out of a concern that this might make the Gerber files that I have posted to my site unsuitable for manufacture, which it doesn't.

Anyway, this thread directs a lot of attention to my site, so if anyone else has concern about the utility of the Gerber files that I have posted, the cut-n-past of my reply to the mentioned correspondent, quoted below, remains my definitive response until someone donates to me a license for Altium Designer 20.



Quote
Hi <redacted>

The JLCPCB Gerber viewer is smart enough to automatically align the drill guide to the relative origin of the PCB (which needs to be set to the lower left hand corner), and it simply looks like the other on-line viewers aren’t.

I have Protel 99SE service pack#4 – unfortunately this version of Protel does not have any provision for automatically aligning the drill guide to the other layers. According to some historical information on Altiums web site, that option wasn’t added until Service Pack #6 and above.

Anyway, if JLCPCB’s on-line Gerber viewer is smart enough to automatically align the drill guide, then so should be the production engineer when it comes to production! I’ve not had a problem with my work or play boards (Entech, IMP, Elecrow, JLCPCB, PCB Cart and others) – I suggest that you just up-load the Gerbers files and submit your order.

I did however find an a free Gerber file editor called Gerbv, and following the instructions here:   https://docs.oshpark.com/design-tools/gerbv/modify-orientation/
I successfully managed to manually align the drill guide to other layers. However the program is a bit buggy – for example, even so all of the other layers register fine, it won’t properly display and auto-detect the format of the drill guide (which is the file with the .TXT extension). For the drill guide layer I had to manually edit the format options to 2-digit trailing zero suppression before the layer would display as it should. This bugginess makes me reluctant to use this program to modify all of my Gerber files as it might be corrupting the files in other ways which aren’t obvious until you try to or have them made.
« Last Edit: January 09, 2020, 03:57:59 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline rthorntn

  • Frequent Contributor
  • **
  • Posts: 449
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #156 on: January 09, 2020, 08:46:58 am »
Fantastic project GK, thanks for all your hard work on this!

If anyone in Australia had a few extra PET PCB's fabricated and wouldn't mind mailing me one or two sets, obviously I will cover the cost of the boards and postage and packing?

Cheers
Richard
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #157 on: January 09, 2020, 12:32:12 pm »
No problem Richard. You can add a TRS-80 to the to do list now too:  http://www.glensstuff.com/trs80/trs80.htm

A Jupiter Ace is now pending.
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8138
  • Country: ca
    • LinkedIn
Re: Cloning a Commodore PET-2001
« Reply #158 on: January 09, 2020, 05:21:38 pm »
Ahhh, ok, just do / try this (I've seen this before with my friend's board miller.) :

Follow my settings in the attached screenshots:

For the Gerbers Films, Select Imperial or Metric, with the highest resolution of 2:5.  For the film coordinates, use the relative origin.  (This means the coordinates used in the gerber file places 0.0 X 0.0 at the position of your set origin marker in your PCB.)

I usually use the bottom left corner of the PCB.

Now for the NC Drill settings. 
Use the same units and resolution as the Gerber File settings, and
!!! Use " Reference to relative origin " just like the Gerber Films so that your drill hole has the exact same coordinates as the pads on your Gerber Film which is also now set to the same reference relative origin.

This used to be aligned manually by the tech at you PCB manufacturing shop, so, the NC drill used to never have to match the coordinates of the gerber film.

See my PCB screenshot for relative origin position...



Hi Brian,

I'm just popping in to update this thread as this issue is still haunting me. I can't do as you described above because the option to align the NC Drill file to any kind of origin at all wasn't a thing until a later version of Protel than what I own.

Hi GK,

Which version of Protel are you using?
Which OS?
I'm assuming that within your PCB-editor, you are missing the 'CAM Manager...' under the 'File' menu.

I will be glad to help where I can.


**** BTW, JLPCB's new gerber viewer seems to decode your attached PCB files with the their drill offset, whatever they may be, correctly.  Perhaps it is a little bit smarter.

I'm curious, you don't have this menu in your 'CAM Manager...' when you double click on your gerber files?
« Last Edit: January 09, 2020, 06:33:16 pm by BrianHG »
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8138
  • Country: ca
    • LinkedIn
Re: Cloning a Commodore PET-2001
« Reply #159 on: January 09, 2020, 05:52:09 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.


OK, better late than never; here is where I currently am at, construction wise, with the Model 1 TRS-80 clone. I basically have the whole thing designed on paper and it's now just a matter of building it. I intend to verify the design this time around, before laying out the PCBs, by building the complete computer on bread board. So far I have the video generation circuitry constructed entirely in CMOS logic to the extent that it will display from the uppercase page of the character set in high-res (64 horizontal characters) mode. My CMOS implementation is quite a bit different from the original design and I'm using an 8MHz pixel clock as mentioned previously in the quoted post.

The screen is just showing a random garble of characters at the moment due to the random contents of the video RAM at power up. Might start a new thread in a day or two  :)

Oh, and yeah, a couple of characters are a bit dicky (N for example), necessitating a character ROM revision - I did manually type this ROM out byte for byte in a binary editor after computing each byte on graph paper and am still not 100% sure if my character set is an entirely verbatim, pixel-for-pixel replication of the original.



TI has a 2$ flash-rom oscillator.  Tie 1 crystal, and you can program 4 arbitrary output clock frequencies, ie 10.6445 MHz and others for cpu clk.  It will power up every time with these frequencies.

http://www.ti.com/product/CDCE925?keyMatch=CDCE925PW&tisearch=Search-EN-everything&usecase=part-number
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #160 on: January 10, 2020, 02:06:17 am »



Hi Brian,

I'm just popping in to update this thread as this issue is still haunting me. I can't do as you described above because the option to align the NC Drill file to any kind of origin at all wasn't a thing until a later version of Protel than what I own.

Hi GK,

Which version of Protel are you using?

**** BTW, JLPCB's new gerber viewer seems to decode your attached PCB files with the their drill offset, whatever they may be, correctly.  Perhaps it is a little bit smarter.


??? Brian, did you care to read my post beyond the first sentence?
 

Quote
I'm curious, you don't have this menu in your 'CAM Manager...' when you double click on your gerber files?
(Attachment Link)


I have the menu - just as stated already the position options relative to an origin are missing.
« Last Edit: January 10, 2020, 02:09:15 am by GK »
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8138
  • Country: ca
    • LinkedIn
Re: Cloning a Commodore PET-2001
« Reply #161 on: January 10, 2020, 03:47:48 am »
I asked which version of Protel you are using?
If you have an official Protel 99, your 'key' may be good to freely upgrade to Protel99se which has the film offset settings...
Protel98's key wont work in 99se.
 

Offline GKTopic starter

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: Cloning a Commodore PET-2001
« Reply #162 on: January 10, 2020, 04:50:56 am »
I asked which version of Protel you are using?
If you have an official Protel 99, your 'key' may be good to freely upgrade to Protel99se which has the film offset settings...
Protel98's key wont work in 99se.


Quoting from my post which you didn't read:


Quote
"I have Protel 99SE service pack#4 – unfortunately this version of Protel does not have any provision for automatically aligning the drill guide to the other layers. According to some historical information on Altiums web site, that option wasn’t added until Service Pack #6 and above."
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline gwpt

  • Newbie
  • Posts: 3
Re: Cloning a Commodore PET-2001
« Reply #163 on: January 23, 2020, 07:21:51 am »
Fantastic project GK, thanks for all your hard work on this!

If anyone in Australia had a few extra PET PCB's fabricated and wouldn't mind mailing me one or two sets, obviously I will cover the cost of the boards and postage and packing?

Cheers
Richard

Hi Richard,
I just had some boards made for the PET project. How many are you after? hows $20 a set plus postage? (Let me know where you are and I can calculate it)
Cheers
Guy
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf