6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 4:58 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Aug 07, 2020 5:38 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Having recently found a stash of Commodore PETs hiding in a camp cellar, my interest in this early home computer was once again renewed.

Image

After sitting for 40 years, all but one boot up and display the Basic OS, which is a testament to how well these were built.
I feel lucky when I push my modern PC past 3 years!

Since I typically work on electronics projects over the winter, my huge 6502 powered DIY computer has been under a sheet this year, but I do get the odd rainy day to come into my Commodore Cave and mess around on fun retro projects.

Image

So I have decided to rework some of the basic tech from my Vulcan-74 frame buffer into a PET!
The goal will be to keep the PET fully stock, and just overlay new hires video over the original signal.

I have tested several techniques, including analog directly into the monitor, but the only video that looks decent is purely digital as intended for the PET monitor circuitry. The PET Monitor can certainly drive a much higher horizontal resolution, and I am going to attempt an interlaced signal soon as well.

Currently, I have managed to draw a 768 * 240 bitmap using the old shift register method.
Monitor linearity is not perfect, but I think that is just a matter of my sync signals being a bit off the mark.
The cross should be perfectly vertical. Seems after vsync, the monitor is "catching up".

Image

It looks decent with an image though, but I am sure I can fix the issue by tweaking my timing a bit...

Image

I am going to try pushing the PET Monitor into interlace by sending half a line at the end of every second frame as is done with standard NTSC.
If this works, then the resolution will increase to 768 * 480 pixels.

I did try just increasing the scan rate to send 480 progressive lines, but the monitor wasn't happy about that!
Later, I will also try drawing into the overscan area as well, but I am not sure the Monitor will play well there either.

So the worst case scenario is 768 * 240, which as you can see above is still pretty good for a 1978 computer!
Compatibility will be 100% since the GFX board will just take a few addresses from the 6502 bus and then pass the original video through as well.

More photos to come when I have another few hours to spare!

Cheers,
Radical Brad


Last edited by Oneironaut on Sat Mar 13, 2021 4:11 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 07, 2020 6:43 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Looks quite good... on the upper X pattern, perhaps part of the issue is with the horizontal and vertical deflection amplifiers for the display. As the machines are quite old, I wouldn't be surprised to find some old caps which are either a bit leaky or light on capacitance. The same can be said for carbon composition resistors, as their value tends to go higher over the decades. I have a pretty large collection of NOS Allen-Bradley carbon comp resistors.... and all have increased in their resistance values so they are far out of their marked tolerance. Lastly, any heat-sinked transistors generally suffer from dried-out thermal goop, so they tend to heat up more and some non-linearity sets in. Nice to see the progress you're making however.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 07, 2020 6:44 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Thanks!
I just had my VSync signal too long. As soon as I reduced it, the video was perfectly square.

Brad


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 07, 2020 11:32 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Managed to get interlaced mode working tonight, but I was soon reminded of why I never used it much in my Ami days either!
Argh.... my eyes! Where did I put those sunglasses I wore when using my 1084 in HiRes Lace?

So although the PET Monitor can do 768 x 480 interlaced, I think I will just stick to 768 x 240 progressive scan.
I will continue to test the limits of overscan though when I have time.

Brad


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 08, 2020 1:23 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
It rained for an hour again!

I wrote a simple bitmap converter to create 8 pixels per byte and then upped the overscan to a place where the monitor was happy.
The result is a maximum of 896 x 256 resolution. Ten percent more in either direction, and the monitor has issues syncing sometimes.

So I will have to decide if it's better to just keep to 768 x 240 with some borders, or go for this maximum resolution of 896 x 256 with some overscan.

Here is the result...

Image

And the original bitmap I converted for this test...

Image

Ok, the rain stopped again, back to work!

Brad


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 10, 2020 12:45 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Great progress! I wish I could be as productive as you are... as I get older, it's takes me all night to do what I used to do all night!

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 10, 2020 12:50 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Thanks!

Since I get maybe an hour a week for this kind of thing, I make it count.
Well, either that or I make a lot of smoke.

Being 10 years older than the PET, I get the age thing too!

Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 06, 2020 10:00 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
Oneironaut wrote:
Having recently found a stash of Commodore PETs hiding in a camp cellar, my interest in this early home computer was once again renewed.


Brad,

Commodore called....they want their VIC-20's back. LOL

Seriously, very interesting. But I have to admit, what caught my eye was that corner shelf where you have the two monitors. I've been thinking about building something similar myself but haven't found any good plans online.

Do you have any specs, closeups, etc. on how that was built?

Thanks.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 12, 2021 10:18 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Where does the time go?

I have been super busy in my second life as a hospital front line IT nerd, but did have a day to sit and watch a few servers run updates... AKA - time to play with retro tech!

With plenty of time on the road as well, my mind wanders, and I didn't like the fact that I was unable to display shades on my PET CRT. Since the video circuitry is both ultra fast and fully digital (full pixel or no pixel), I though about trying pulse width modulation at a speed way beyond the normal PET pixel clock of 8MHz.

The results are promising indeed, proving that at least 14 shades + black are possible!
I also need to figure out better setting on my Nikon for shooting the CRT - looks so much better in real life!

Code:
Broken external image link
http://www.lucidscience.com/temp/shades.jpg

Since my last post, I have also emulated the disk / IEEE system so I can get proggies into the PET easily.
I think it is now worth developing the PET JetPack a little further.

I will probably shoot for a 640x200 display with 8 shades.
Once again, I am going to try interlace to see how graphics look now that shades are possible, so 640x400x8.

Here are the timings I am using, based on the PET timings, but multiplied 16 times...

Code:
// HORIZONTAL TIMING FOR 128 MHZ
// PIX : 4916
// HSP : 960
// HBP : 524
// TOT : 6400 CLK

// VERTICAL TIMING FOR 60 HZ
// PIX : 293
// VSP : 40
// TOT : 333 LINES

// 320 pixels * 16 = 5120 clk / line (16 shades)
// 640 pixels * 8 = 5120 clk / line (8 shades)


If this project works, I will then make a board and complete the GPU, which will add some cool graphics commands to the PET.
The original video is also passed through, and there are no mods made to the Kernal or the PET, just a small board that fits between the CRT plug and also connects to the IEEE on the mainboard.

One other feature will be a wireless serial link so I can use a PC as a fileserver or to check email, get basic internet, etc.
No reason why a PET can't be a viable computer, it is a well made work of art.

Later, stay safe in this crazy world retro freaks!

Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 12, 2021 10:57 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Not sure when I will have time again to drop in, so here is a greeting showing the original PET video mixed with the new GPU...

Code:
Broken external image link
http://www.lucidscience.com/temp/shades2.jpg

Later!


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 14, 2021 12:34 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Wow, it actually works!

This is only 320x240, but does show that 16 shades of green can be done with a PET CRT.
320x256 actually fills the screen a lot better, so I may try 640x512 next.

Actually, calling these "shades of green" may be misleading as they are just very tiny pixels. In other words, the PWM takes a value from 0-15 and turns on a pixel for that much time. Technically, it is still a monochrome image, but has an effective resolution of 5120 * 256. Can your modern PC do that??? Nope.

Here is the result, possibly the first time a PET displayed a photo-realistic image....

Image

I can't wait to see if I can push interlace and get a 640x512 image to show. For sure 640x200 is possible.
PET Jetpack is no longer a crazy idea, it can be done.

Here is the simple Shift Register Logic that sends out the pixels based on a 320*240 image stored as 4 bit data...

Code:
// ACTIVE PIXELS
PICDAT <= PIC[ (HCOUNT>>4) + (320*VCOUNT) ];
if (HCOUNT < 5120 & VCOUNT < 240) begin
if (PICDAT > HCOUNT[3:0]) begin
VIDEO <= 1;
end else begin
VIDEO <= 0;
end
// VIDEO BLANKING
end else begin
VIDEO <= 0;
end


Later,

Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 14, 2021 12:58 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
One more pic, this time a little higher resolution (320x256), along with the pic I converted to PET Data...

Image

That's all the time I have now, back to the daily grind for a while.
Cheers,

Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 14, 2021 11:52 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Being lazy today, just hangin' out with my PET.
Managed to finish the 640x200 Video Generator with original PET video underlay, it it looks great.
I don't think I will mess with interlace as this is already working better than I ever expected.

Image

Now that this project has completed the POC stage, I am going to make it more real.
The next step will be to map some commands using the data register on the PET IEEE port.

I already emulate loading of disk programs, so now I will also add commands using the same port.
The PET will even be able to draw graphics in basic using poke / peek.

Sprites, lines, shapes, etc will be added and perhaps some basic sound, similar to the original PET, but with some ASDR envelopes.

The goal is to add some shabang to the PET without making any mods. The "JetPack" will just drop onto connectors already available on the board.

Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 16, 2021 11:58 am 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
I'm wondering if I missed the schematics...?
How do you mix the 200 visible pixel lines of the PET into the 480pixel lines I understand you got?

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 16, 2021 1:49 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
I will post full details soon. The short answer is that a small board plugs into the IEEE connector and CRT connector on the PET mainboard. The "GPU" lives in a Spartan-6 FPGA clocked at 256MHz, which is 32 times faster than the original PET pixel clock, or 16 times faster than required for an 80 column display (640 horizontal pixels). Being 16 times faster, the FPGA can shoft out 16 pixels per PET pixel, creating a kind of PWM that appears to the CRT as 16 levels of green.

The original PET video stream is directly passed to the GPU and ORed with the new signal, so the PET can display its own video as normal. Any "new" pixels coming from the GPU that are a lesser shade than "full" appear to be be behind the original PET pixels.

I will be adding some basic sprite and graphics functions to the GPU along with some simple sound enhancements. All "new" functions are controlled by the PET via the IEEE port, this way the GPU is accessible in both basic and assembly.

The JetPack also emulates disk loading vie the IEEE port, and will include a new 6502 assembler IDE and other tools to make games and demos.

I will post more photos, a schematic and some system goals when I have time in my cave again.

Cheers,
Brad

fachat wrote:
I'm wondering if I missed the schematics...?
How do you mix the 200 visible pixel lines of the PET into the 480pixel lines I understand you got?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 32 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: