VIC-2000 Expander. Modern Power Using Retro Parts!

Modding and Technical Issues

Moderator: Moderators

User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

So far it looks like 25MHz will be possible on the breadboard.
I have added a temporary AVR that simulates the VIC-20 SyncMem programming sequence.
This saves my VIC from any accidental wiring mishaps, and from hours of running idle.

I know 25MHz is pushing the limits in a big way, so I used messy and overly long wires.
Huh??... yeah, if it works like this, it will certainly work when I clean it up!
Logical thinking? Seems to work for me.

Here is the Sync memory connected to the counters, and temporary AVR...

Image
Sync Generator Wired for testing.

There is no Video Memory yet, so I just wired the Color DAC to X Address bit 0.
The result is an alternating vertical stripe with a thickness of one pixel.
This is great for trying the monitor auto adjust function, which worked perfectly.
If timing is out (even by one pixel), auto adjust will blur out a large portion of the screen.
This blur effect is the pixel phase trying to stretch pixels, which is not a good thing to have.

The lines look perfectly crisp, so timing is exact to the 640 x 480 spec...

Image
640x480 VGA Timing at 60 Hz.

A quick probe on the Horizontal Sync signal shows it at the correct frequency...

Image
Horizontal Sync Frequency tested.

Since I am now on a roll, I decoded to connect one bank of Video Memory.
One bank equals a pair of 512K SRAMs wired as 512K x 16 Bits.

Each bank has its own set of XY counters made of four 74HC590 counters.
This configuration is required to keep propagation and capacitance low.
I will explain how this works later.

Here is one bank of Video Memory wired to a its XY counters...

Image
One Video Memory Buffer wired for testing

Here is the result... 307,200 random pixels in 4096 wonderful colors...

Image
307,200 random pixels from the SRAM.

Once again, I just threw the wiring together like spaghetti.
Even with this mess, the entire board is working perfectly at 25Mhz.
There are no glitches in the video, even if I push the wiring together in bundles.
This "bundle test" is my hi-tech way of adding capacitance to see if I am close to the edge.
Crunching up wires causes cross-talk, and will add a few ns of delay to the signals.
This time, I am safe, so I know the board will be fine once I shorten and clean the wiring.
The final non-breadboard version will be guaranteed to work perfectly as well.

What a mess!...

Image
One Video Memory Buffer wired for testing.

Since I have the rest of the day free, I am going to try to put an image into the Video Memory.
Again, I will add another AVR to stuff the memory just for testing purposes.
I don't plan on adding the VIC back to the board until all wiring is clean and tested.
My VIC-20 is too important to risk during this messy testing phase!

So far I am victorious against captain propagation and the capacitance gang.
I now scoff at all those experts that claim a breadboard can't run beyond a few megahertz!

... OK, seriously, I know I am pushing it.
Hope my luck holds up, there are a LOT more ICs to add very soon.

Cheers,
Radical Brad
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

More progress.

I connected an XMega-256 to the board and used my BMP-2-DAT program to convert an image into assembly code for the XMega. Since the XMega only has 256K of program space, I could only load a 640 x 160 slice of the full image. This is fine for testing, and later I will add a serial link to stream an entire image.

Image
The XMega pre-loading some of the Video Memory.

This is still just a single buffer with no switching, but it does prove out a lot...

Image
640 x 480 with 4096 colors from a breadboard!

The image looks just as good as the original on my PC monitor!
The random pixels are just noise as the AVR dumps the image slice to the memory.
Not sure why the image is shifted left, but I will dig into that next.

So it looks like the entire Video Section will work as originally planned.
I can now move ahead with a wire cleanup and add the second Video Memory.

It won't be long until my VIC-20 is able to draw images to a 640 x 480 VGA screen.
The best parts is that the VIC is unmodified, and all parts are still just 7400 series logic.
... kickin' it 1980's style!

Later,
Radical Brad
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

What a great day in the VIC-20 lab so far this afternoon!

I realized why my image was not centered.
It is because of the way I setup my video timing...

Code: Select all

// [25 MHZ BASE MHZ PIXEL TIMING]
// HBP : 048 FROM 000 TO 047
// HPX : 640 FROM 048 TO 687
// HFP : 016 FROM 688 TO 703
// HSP : 096 FROM 704 TO 799 (-)
// TOT : 800(1024) : X10

// [480 LINE TIMING]
// VBP : 031 FROM 000 TO 030
// VPX : 480 FROM 031 TO 510
// VFP : 011 FROM 511 TO 521
// VSP : 002 FROM 522 TO 523 (-)
// TOT : 524-2-11 = 511(512) : Y9
I put the Back Porch time ahead of the Active Pixel time.

The reason I start a frame at X48 and Y31 is to allow the 74HC590 counters time to reset.
Because the reset comes form the Sync memory, there is a small glitch as counters reset.
This is no issue as long as the video is not displaying on screen.
This offset will also help Sprites from wrapping the window later in the design.

Just to be sure my luck wan't an illusion, I connected the VIC and did a full screen test.
The VIC-20 tells the AVR which segment to load, and then locates it in the Y offset.
The results are exactly what I wanted to see...

Image
Paying respect to the REAL fist home computer (no fruit here!)

Try that on your Tandy, Andy!

Not only is the image displaying perfectly, but the single pixel border is in the right place.
This is one of the most challenging parts of this project, and it looks good so far.

I now have a lot of wire cleanup to do.
That's about all for this week. Have to go tend to the chicken coop now.

Later,
Radical Brad
cobracon
Vic 20 Dabbler
Posts: 74
Joined: Thu Nov 11, 2010 5:46 pm

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by cobracon »

I'm loving that Vic 20 screen. This project is one of my favorite to follow.

Just one question that comes to mind. Will most user port items work? (rs232 cards, modems, ect)

What about the cassette port?


Thanks, just some newbie questions I had.

Thanks,

Robert
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

Thanks for the comment!

Yes, everything will function normally on the unmodified VIC-20.

The final hardware version will even include an Expansion Port Breakout Socket so that a standard VIC cart can be inserted without having to unplug the V2K hardware. Only the Expansion port is used, so all other ports are also free to use as normal.

It will even be possible to write games in VIC Basic (unexpanded or 32K), and access all of the V2K Hardware using pokes.
V2K lives completely in IO2, so the VIC just sees it as 256 bytes of accessible RAM at location 38912.

This project would actually be fully compatible with any Commodore computer with simple mods, even a PET!
Being strictly a VIC fanatic, I probably won't bother adapting it, though.

On a side note, I am also adding multitasking to this project, but want to keep the details "secret" until I test it!

Here is the image I used...

Image

I just pasted this together from bits I found after doing an image search for Commodore Logo.

Brad
cobracon wrote:I'm loving that Vic 20 screen. This project is one of my favorite to follow.
Just one question that comes to mind. Will most user port items work? (rs232 cards, modems, ect)
What about the cassette port?
Thanks, just some newbie questions I had.
Thanks,
Robert
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

The snow has buried my lab windows again, so this weekend has been spent outdoors with the snowblower for the most part! I did manage to cram a good 2 hour session in though, and made what seems to be great progress!

The first thing I did was hook up both Video Memory Buffers.
Being short on time, I used whatever wiring was available...

Image
Dual Video Memory Buffers and Switches Connected.

That ratsnest of wiring connects four 512K SRAMs to a dual switch, so that at any one time, 2 of the SRAMs are being addressed to draw a 640 x480 Video Frame while the other 2 SRAMs are available to the VIC-20 to draw graphics.

I was amazed that this mess actually worked, since many of the wires are tangled, and over 20 inches long!
The expectation was just some basic image being displayed with a lot of phasing issues and lost pixels.
To my delight, the image was perfectly stable.

Check out this crazy mess...

Image
This is what my wiring looks like before I clean it up!

Hard to believe that it delivers this crisp animation at 25MHz...

Image
8 Rotating Cubes and a Photo of Another 6502 System.

I decided to use an image of the Terminator Model 101, since it too has a 6502 CPU.
The cube rotation is made from 48 pre-rendered images, being drawn in sequence.

Since this is the absolute minimal hardware, there is no Sprite Generator available, so the XMega is being used a a stand-in until I get that part of the logic completed. To draw the images, the XMega listens to commands from the VIC-20, and then does a very basic (and slow) block copy from internal memory to whatever buffer is being used in the background. The VIC-20 then flips the screens.

The image looks really good at 640 x 480 with 4096 colors...

Image
Hey Amiga, look what my VIC-20 drew today!

It's really not much for graphics capability yet, since the heart of V2K will be the Sprite Generator. The Sprite Generator will be fully alpha aware, and able to hurl out hundreds of much larger sprites after drawing a full screen background. This was really just to prove to myself that ignoring the "experts" and moving ahead with a 25MHz breadboard design was actually within the realm of possibility.

After seeing how this image looked, even with the wiring mess, I am convinced that this will work!

Here is a video of the animation...

https://youtu.be/EIghk1BUG98

I am out of time now, and off to move 400 tons of snow so I can get to work in the morning.

Greets from the Great White North!
Radical Brad
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

Project non-update...

I have all day free today.
Unfortunately, this is the view from my man-cave window...

Image
Under that hill of snow is the car I need to drive to work in the morning!

So I shall be spending the day behind the snow blower again.
I do like living in the secluded mountains of the Great White North, where my nearest neighbor is a 20 minute hike away, but I wish mother nature would stop messing up my Sunday afternoons so often!

Oh well, as you can see by the bent over trees, the wind is crazy today, so a power loss is inevitable anyhow!

Until next week...
Radical Brad
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

Nothing to report this weekend.
I did take my notepad out into the back 40 and do some schematic design around a campfire.
Nothing like sitting in a chair made of pine branches, working out Sprite Generator timings!

Just to show that I don't always hate winter...

Image

Walking for 30 minutes in waist deep snow is quite the chore!

Perhaps I will get some board time next week.

Until then...
Radical Brad
cobracon
Vic 20 Dabbler
Posts: 74
Joined: Thu Nov 11, 2010 5:46 pm

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by cobracon »

Now thats some serious exercise, but I bet that fire felt amazing.
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

Sure was!
I must admit though, I am more than ready to see the snow melt!
Seeing it is now April and there are still 3 foot drifts in certain places of my yard.

Have not had much VIC hacking time lately either, but still intend to keep the project going.

Brad
cobracon wrote:Now thats some serious exercise, but I bet that fire felt amazing.
User avatar
Floopy
Vic 20 Devotee
Posts: 221
Joined: Mon Feb 27, 2017 7:38 pm
Location: US

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Floopy »

I live in Idaho and the snow has just finished melting. :mrgreen:
Mud mud mud, everywhere
-Floopy
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

Oh yeah... I have that to look forward to very soon.
I live on a mountain of red clay, and it sticks to boots like mortar!

Brad
Floopy wrote:I live in Idaho and the snow has just finished melting. :mrgreen:
Mud mud mud, everywhere
crisp
Vic 20 Newbie
Posts: 5
Joined: Thu Jun 29, 2017 11:15 am
Location: germany
Occupation: it professional

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by crisp »

so now nearly a year later... any news on this cool project?

:roll:
User avatar
Radical Brad
Vic 20 Devotee
Posts: 256
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.AtomicZombie.com
Location: Kakabeka Falls, ONT
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by Radical Brad »

I have been busy for 6 months launching my new website, which will include this project (and many others) in much more detail.
https://www.AtomicZombie.com

It was just too much work to post all over the place, so I am going to consolidate all of my projects.
Will also be moving all my old work from LucidScience.com there as well.

I also mostly finished an FPGA implementation of a 6560-101 in a single FPGA. Vic boots with it, and shows basic video.
When I have more time, I will start recomposing all of my projects.
I will also be adding an "Electronics" section on my new site with a special segment for VIC (projects, repairs, etc).

So that's it... I am still very active on all 6 of my VIC projects, but plan to go self contained in 2019 with all my postings.
By the end of 2019, AtomicZombie.com will be the new home for all of my electronic works as well.

Later,
Brad


crisp wrote:so now nearly a year later... any news on this cool project?

:roll:
crisp
Vic 20 Newbie
Posts: 5
Joined: Thu Jun 29, 2017 11:15 am
Location: germany
Occupation: it professional

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Post by crisp »

thanks for the update, then I will have an eye on your new website, I also watched with much interrest you Youtube Videos.

:D
Post Reply