Testing Commodore 6526/8520 copy in CPLD

There are quite expensive obsolete chip from various Commodore computers and peripherals- CIA/PIA MOS 6526 and a bit changed 8520 used in Amiga computers. This is a “complex” peripheral interface adapter chip for 6502 processor or 68K chipset.
It is quite complex, as it has: 16 individual programmed I/O lines, 2 independent, linkable timers, real time clock timer/counter, shift register for serial interface and some other stuff. As this chip is for “interface”, some of the pins go outside the computer and connect to various other devices or… some strange objects like metal pins or pens. S, short circuit, ESD spikes can kill these chips. When I lived in Soviet Union, I blew an Amiga 8520 chip and I had my Amiga shelved for several years!
Now it is still possible to buy these chips- sometimes NOS (very expensive), sometimes good pullouts, but sometimes fake ones. And you have to spend over 25USD for just one chip. Maybe it is good variant to buy a DEAD computer in the hope that the chip may be fine.

I am cleaning, testing and rearranging my old computer collection and I decided to repair some of them because now I have more money and more knowledge. And I have spare CPLD boards from Russian Igrosoft computers. So, one day I decided to build some test rig and build my own CIA/PIA in CPLD (it is 5V TTL compatible).

Here is the CPLD CIA/PIA workplace:
PIA 6526 CPLD copy
This computer has both 6526 dead. Left CIA is only partially emulated- so I used a smaller CHIP. Meanwhile the right one is more complex. This is not only timers, int, but also keyboard interface.

Altera Quartus MOS 6526 commodore chip
I wrote everything using Altera- Intel Quartus software. It is free for MAX series CPLD. I started a project in the 9th version of software, but encountered strange bugs and also, my hardware description did not fit the chip. Meanwhile, the newer version was fine.

wire wrap technology- CPLD connected to commodore 64
I am using a special self made PCB with precision sockets and pins. All connections to CPLD boards are made using wire wrap technology. I think it is best technology to connect hundreds of wires in not permanent way. I can redo the connection in case I mix something.

Other PIA MOS6526 connected to smaller CPLD MAX Altera
This is a smaller CPLD. Only timer and fontbase selector is “build” inside it.

C64 screenshot: timer INT keyboard interface ready in CPLD
From black screen I have a working keyboard (cursor is OK, just in photo is not visible), timers and interrupts.

But… I found a trash completed PCB of Commodore 128 with a working CIA on board. So I abandoned this project for a while. Maybe in near future, maybe never.

Source code in Verilog hardware description language is available on demand.

About Administrator

I am owner of this site.
This entry was posted in Anything, FPGA, MCU and tagged , , , . Bookmark the permalink.

6 Responses to Testing Commodore 6526/8520 copy in CPLD

  1. Michael says:

    Hi there, I’m interested in seeing your source code if you don’t mind sharing?
    A zip of the project would be very cool.

  2. Michael says:

    URL for my blog

  3. Damian says:

    Hi I’m also interested in seeing your source code if you don’t mind sharing?

  4. I’ve found only few “starting” versions of the code. I will post it sooner or later when I will be near “that” computer used for CPLD programming.

  5. Hasi says:

    Hi I’m also interested in seeing your source code if you don’t mind sharing?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>