Page 1 of 15

FPGA replacement for VIC I chip?

Posted: Mon Oct 06, 2014 8:26 pm
by ral-clan
Hi,

I've long known that the VIC I video chips in our VIC-20s are delicate and only replaceable using salvaged chips from other machines.
As you might have read in my other threads, I've recently had such a chip fail.

This made me wonder, has anyone ever tried making an FPGA VIC-chip drop in replacement?

I know that some people have tried making a whole FPGA VIC-20, and I also know that knowledge of the VIC I chip is getting quite good (from the software emulation standpoint).

I know there would not be much demand - but it would be so nice to get all those broken VIC-20s working again with such a replacement chip (and also one that would run much cooler).

Re: FPGA replacement for VIC I chip?

Posted: Tue Oct 07, 2014 12:49 am
by English Invader
Just Googled FPGA (Field-Programmable Gate Array) and it seems like a good idea and there is nothing to lose from giving it a go. Presumably there would need to be some kind of software/firmware to make the computer think that the FPGA is a VIC chip. Someone would have to design that software/firmware and find a way to put it on the chip. It would probably prove quite expensive to produce and the average end-user would probably turn round and say "For that money, I might as well get another VIC-20". I guess it depends on whether there are enough future-conscious people who are prepared to pay a bit extra for a more long-term solution.

Here's a Wikipedia article on FPGA for those who want to know more:
http://en.wikipedia.org/wiki/Field-prog ... gate_array

Re: FPGA replacement for VIC I chip?

Posted: Tue Oct 07, 2014 1:21 am
by groepaz
English Invader wrote:Presumably there would need to be some kind of software/firmware to make the computer think that the FPGA is a VIC chip. Someone would have to design that software/firmware and find a way to put it on the chip.
well, someone would have to create an FPGA "core" which replicates the functionality of the VIC chip. most FPGAs would load that core from a flash-rom at powerup and then work just like a real VIC (given the right firmware). since working VIC20 cores already exist, making that core shouldnt be terribly hard (for someone who knows FPGA stuff, of course)
It would probably prove quite expensive to produce and the average end-user would probably turn round and say "For that money, I might as well get another VIC-20".
that is the primary reason for why such kind of replacement chips are not common - they will still be significantly more expensive than real chips. however, time and mr.moore will solve this problem sooner or later :)

Re: FPGA replacement for VIC I chip?

Posted: Thu Oct 09, 2014 1:31 am
by Imperious
Obviously You have a NTSC Vic, so cannot help there.

PAL Vic chips are actually quite plentiful from China, and NOT fakes. I purchased a batch of them,
6561-101's and they all tested AOK.

http://www.aliexpress.com/wholesale?Sea ... 1008232521

yxchip is trustworthy, some sellers there are very dodgy though. Just have to wade through the feedback
to figure out whether they are good eggs or rotten ones.

These 6560-101's have dodgy looking date codes, so could be either fakes or badly remarked good ones.
http://www.aliexpress.com/wholesale?Sea ... 1008232528

Re: FPGA replacement for VIC I chip?

Posted: Thu Oct 09, 2014 6:35 am
by ral-clan
I saw a seller of 6560s on Alibaba which seemed very cheap, but the photo did not reflect the actual chip for sale.
Price seems too good to be true. For these reasons I was nervous about signing up to Alibaba and buying this.
Also, I wasn't sure if an individual could sign up for Alibaba and make purchases.
Also, price says "FOB Price", and when I looked that phrase up the definition (via Google) is:
Indicating "FOB port" means that the seller pays for transportation of the goods to the port of shipment, plus loading costs. The buyer pays cost of marine freight transport, insurance, unloading, and transportation from the arrival port to the final destination.
I don't want to get stuck with some crazy importers, portage or industrial shipping fee on a small quantity.

Also, how does one know if date codes on a 6560 are okay?

Re: FPGA replacement for VIC I chip?

Posted: Wed Nov 26, 2014 12:35 pm
by tlr
I'm not sure of the state of VIC-20/VIC-I FPGA implementations with regards to tricks and bits discovered in recent years but the implementation should be way simpler than implementing a C64/VIC-II in an FPGA.
One potential problem is the relative lack of test programs and research on the VIC-I in general.

Re: FPGA replacement for VIC I chip?

Posted: Wed Nov 26, 2014 1:23 pm
by Kweepa
For pricing, it looks like you can get a FPGA with built in flash for about $10.
http://electronics.stackexchange.com/qu ... pest-fpgas
Then you'd have to get an adapter board. Poking around, a surface mount type looks to be about $2 (although I didn't find one specifically for a FPGA) but for socketed boards, the price is all over the place.

Re: FPGA replacement for VIC I chip?

Posted: Wed Nov 26, 2014 1:46 pm
by tlr
5V I/O can be a challenge as well. These might be a choice: http://www.altera.com/devices/cpld/max3 ... rview.html

Re: FPGA replacement for VIC I chip?

Posted: Thu Nov 27, 2014 4:13 am
by groepaz
and dont forget the major cost is developing the core (unless you find someone who will do it for free, which i doubt)

Re: FPGA replacement for VIC I chip?

Posted: Fri Nov 28, 2014 3:09 am
by pixel
groepaz wrote:and dont forget the major cost is developing the core (unless you find someone who will do it for free, which i doubt)
I'm not into hardware really, but with those powerful chips and VHDL compilers I'm pretty sure you can punch in most of the logic rather quickly.

Someone should shake Al Charpentier and/or Robert Yannes, as long as they're still alive, and grab the original layout, so we could figure out new tricks. :) Maybe they don't like to be shaken and they respond to email. Who's holding the copyright anyway?

Re: FPGA replacement for VIC I chip?

Posted: Fri Nov 28, 2014 4:18 am
by groepaz
I'm not into hardware really, but with those powerful chips and VHDL compilers I'm pretty sure you can punch in most of the logic rather quickly.
the problem is that before you can "punch it in", you'll have to know how *exactly* it works. and even then you need to debug and test. i would estimate at least 6 months of fulltime work for a single person, if not more.

Re: FPGA replacement for VIC I chip?

Posted: Fri Nov 28, 2014 5:26 am
by pixel
groepaz wrote:
I'm not into hardware really, but with those powerful chips and VHDL compilers I'm pretty sure you can punch in most of the logic rather quickly.
the problem is that before you can "punch it in", you'll have to know how *exactly* it works. and even then you need to debug and test. i would estimate at least 6 months of fulltime work for a single person, if not more.
I was under the impression that knowing enough to emulate it would be sufficient.

Re: FPGA replacement for VIC I chip?

Posted: Fri Nov 28, 2014 8:42 am
by Kweepa
I guess it depends whether you want something that works 99.9% of the time or 100% of the time.
I'd be good with 99.9%, although I can obviously see the arguments either way.

Re: FPGA replacement for VIC I chip?

Posted: Fri Nov 28, 2014 1:21 pm
by tlr
pixel wrote:I was under the impression that knowing enough to emulate it would be sufficient.
To fit it in a reasonable amount of space (like the CPLD mentioned) you need to know enough to deduce most of the actual silicon implementation, not just the observable behaviour.
Preferrably all this includes unintended quirks resulting from original design mistakes and process peculiarities.

To emulate the actual silicon you also need to replicate the actual I/O timing of the chip. To obtain that means putting a logic analyzer on a running box and running test programs which you will have to write.

If someone has the time and dedication it's a fun exercise though.

Re: FPGA replacement for VIC I chip?

Posted: Fri Nov 28, 2014 2:09 pm
by Kweepa
tlr wrote:To fit it in a reasonable amount of space (like the CPLD mentioned) you need to know enough to deduce most of the actual silicon implementation, not just the observable behaviour.
Really? I'd be interested to know why. If anything I would have thought that simulating the observable behaviour would be better, since you could take shortcuts that work with FPGA.