       How to replace the PLA UE5 in a CBM8296 with a GAL 20V8
          written in 2005 by Nicolas Welte (http://x1541.de)


0. Introduction

This work is based on the equations derived by Andre Fachat as described on
http://www.funet.fi/pub/cbm/firmware/computers/pet/8296/index.html

Two free software packages were used for this project:
- Eagle 4.11 from www.cadsoft.de
- WinCUPL 5.2.16 from www.atmel.com

included in this archive are the following files:
readme.txt    - this file
8296ue5cr.pld - the source file with the logic equations in WinCUPL format
8296ue5cr.doc - info file for the GAL (fuse plot, pinout and more)
8296ue5cr.jed - JEDEC file suitable for programming the GAL chip
8296ue5cr.sch - PCB layout for a GAL to PLA adaptor in Eagle 4.11 format
8296ue5cr.png - a bitmap image of the PCB layout


1. Part list

- GAL 20V8-25QP or equivalent part
- adaptor PCB (single sided layout included, but I simply wired it manually)
- 28 pin IC adaptor, or two 14 pin SIL adaptor rows
- 24 pin IC socket, NARROW version
- 28 pin IC socket for the 8296 mainboard, if needed

2. How to build

From the top side of the PCB, install the 24 pin socket and solder it from the
lower side. Then install the socket adaptor from the lower side and solder it
into place. Depending if you have a PCB with the proper layout, or a prototype
board, install the single wire (shown in red) or all the connections shown.
Then plug in the GAL chip and install this board in place of the original UE5
chip. In my experience this chip is mostly soldered to the mainboard, so you
have to remove it and install a socket in its place.

3. How to get the GAL chip programmed

I used a freely available hardware/software project, the GALBlast. Find it at
http://www.geocities.com/mwinterhoff/galblast.htm

You can also contact me via http://x1541.de and order a programmed chip from
there. Currently I don't offer the adaptor PCBs, sorry.

4. Appendix

Why are the files in here called 8296ue5cr? The CR is for cost reduced and
means that the UE5 equations do not directly fit into the 20V8, but you need
the more expensive 22V10 for this. With a little trick I made them fit into 
the cheaper chip, by splitting the equations and assigning two parts to two
unused output pins. The 20V8 is able to use these outputs internally, so no
extra input pins are needed for this feedback. Also the timing is not affected
so much by this internal feedback.

There are alternatives to making a replacement PLA. The easiest one would be to
take the raw memory dumps from Andre's archive and burn it to an EPROM and make
a suitable adaptor. The same adaptor would then also work for UE6, which will
not fit into any 24 pin GAL because it uses too many pins. Leif Bloomquist
built such an adaptor, check the comp.sys.cbm archives for details.

It's also possible to use larger PLDs as a replacement. I remember there once 
was a report in comp.sys.cbm about this (again, check the archives), and then 
there is the SuperPLA by Jens Schoenfeld. Unfortunately the latter is not yet 
available with the 8296 PLAs in it (see http://c64upgra.de/chips/).