# C128 PLA minimization and analyzis with the boolean
# minimizer espresso.
#
# Done 2003-01-21 by Wolfgang Moser <http://d81.de>
#
# Based upon the work of Nicolas Welte, who 'read' out the
# contents of the C128-PLA into a huge binary dump, check
# out the file 8721.ZIP at:
#  http://www.funet.fi/pub/cbm/firmware/computers/c128/
#
# For espresso see:
#  http://archives.seul.org/geda/dev/Apr-2002/msg00060.html
#  ftp://ftp.cs.man.ac.uk/pub/amulet/balsa/other-software/espresso-ab-1.0.tar.gz
#  http://www.cs.indiana.edu/classes/c421/man/espresso.1.html
#  http://www.fke.utm.my/downloads/espresso/
#
# This file describes the (partly) minimized PLA contents
# in Berkeley PLA standard format, see:
#  http://bear.ces.cwru.edu/eecs_cad/man_octtools_espresso_inputs.html
#  http://css.engineering.uiowa.edu/~switchin/espresso.5.html
# for more.


# 27 Inputs, in this order
#
# PLA signal   position in word dump / byte dump
# pin          (based onto Nicolas' plain PLA dump)
# 27  128/256           A27              A26
#  8  DMAACK            A26              A25
#  7  VICFIX            A25              A24
# 15  64/128            A24              A23
# 13  Z80 EN            A23              A22
# 14  Z80 I/O           A22              A21
#  1  A15               A21              A20
#  2  A14               A20              A19
#  3  A13               A19              A18
#  4  A12               A18              A17
#  5  A11               A17              A16
#  6  A10               A16              A15
#  9  AEC               A15              A14
# 10  R/W               A14              A13
# 11  GAME              A13              A12
# 12  EXROM             A12              A11
# 16  I/O SE            A11              A10
# 17  ROMBANKHI         A10              A9
# 18  ROMBANKLO         A9               A8
# 19  VMA4              A8               A7
# 20  VMA5              A7               A6
# 21  BA                A6               A5
# 22  LORAM             A5               A4
# 23  HIRAM             A4               A3
# 25  CHAREN            A3               A2
# 26  VA14              A2               A1
# 47  CLK               A1


# 18 Outputs, in this order
#
# PLA signal   position in word dump / byte dump
# pin          (based onto Nicolas' plain PLA dump)
# 29  /SDEN                              D3
# 34  /ROM4                              D2
# 36  /ROM2                              D1
# 39  DIR                                D0
# 30  /ROML             D13
# 31  /ROMH             D12
# 32  CLRBNK            D11
# 33  /FROM             D10
# 35  /ROM3             D9
# 37  /ROM1             D8
# 38  /I/O CS           D7
# 40  DWE               D6
# 41  CASENB            D5
# 42  /VIC              D4
# 43  /I/O ACC          D3
# 44  GWE               D2
# 45  /COLRAM           D1
# 46  /CHAROM           D0

# Power supply and N.C.
#
# 48  VCC
# 24  VSS
# 28  N/C


# 18 Outputs, product term analysis
#
# PLA signal  No PTs used
# pin          
#------------------------------------------
# 29  /SDEN       5
# 34  /ROM4      25
# 36  /ROM2      12
# 39  DIR        38
# 30  /ROML      32
# 31  /ROMH      30
# 32  CLRBNK      3
# 33  /FROM      14
# 35  /ROM3      15
# 37  /ROM1      33
# 38  /I/O CS    24
# 40  DWE        21
# 41  CASENB    263
# 42  /VIC       30
# 43  /I/O ACC   24
# 44  GWE        27
# 45  /COLRAM    22
# 46  /CHAROM    24

.i 27
.o 18
.p 356
---100000000000000000000000 000000000000100000
----00111000000000000000000 000000000000100000
---0-100000000-000000000000 000000000000100000
---01-00000000-000000000000 000000000000100000
----0011011-000000000000000 000000000000100000
----001101-1000000000000000 000000000000100000
---0--11-00000-000000000000 000000000000100000
----0-0001001---10000000000 000000000000100000
---0--11-11-00-000000000000 000000000000100000
---0--11-1-100-000000000000 000000000000100000
---0--1-1-1-00-000000000000 000000000000100000
---0--1-1--100-000000000000 000000000000100000
----010000--11---0100000000 000000000000100000
---0--1-11--00-000000000000 000000000000100000
-0-0--------0-1000000000000 000000000000100000
----1-1101--1---10000000000 000000000000100000
---0--------001000000000000 000000000000100000
---0--10----111-00000000000 000000000000100000
---0--1------01000000000000 000000000000100000
---0----1---1-1000000000000 000000000000100000
---0-----1--1-1000000000000 000000000000100000
---0---1----1-1000000000000 000000000000100000
-------------00000000000000 000000000001000000
---1--01----11---0100000000 000000000000100000
-0-0--------0-01-1-00000000 000000000000100000
-0-0--------0-011--00000000 000000000000100000
-0-0--------0-01--100000000 000000000000100000
---0--------0001-1-00000000 000000000000100000
---0--------00011--00000000 000000000000100000
---0--------0001--100000000 000000000000100000
---1--1-----11--11-00000000 000000000000100000
---1--1--0--11----100000000 000000000000100000
----1-1101--1---01---000000 000000000000100000
---1--10----11----100000000 000000000000100000
----1-1101--1---0---1000000 000000000000100000
----1-1101--1---0-1--000000 000000000000100000
----1-1101--1---0--1-000000 000000000000100000
------1-1---11---1-00000000 000000000000100000
-0-0--------0-1----11000000 000000000000100000
-0-0--------0--0---11000000 000000000000100000
---0--------001----11000000 000000000000100000
---0--------00-0---11000000 000000000000100000
---0--1101--11-------000000 000000000000100000
----001101---100-------00-- 000100000000000100
----010000--11---00-------1 000000000000100000
----010000--11---00-1------ 000000000000100000
----010000--11---00------1- 000000000000100000
----010000--11---00--1----- 000000000000100000
----010000--11---00---1---- 000000000000100000
----010000--11---00-----1-- 000000000000100000
----010000--11---00----1--- 000000000000100000
----010000--11---001------- 000000000000100000
---0--10----11-0-1----00000 000000000000100000
---0--10----11-01-----00000 000000000000100000
---0--10----11-0----1-00000 000000000000100000
---0--10----11-0--1---00000 000000000000100000
---0--10----11-0-----100000 000000000000100000
---0--10----11-0---1--00000 000000000000100000
---0--1101--10---1-----0000 000000000000100000
---0--1101--10--1------0000 000000000000100000
---0--1101--10------1--0000 000000000000100000
---0--1101--10----1----0000 000000000000100000
---0--1101--111-------1-100 000000000000100000
---0--1101--10-------1-0000 000000000000100000
---0--1101--101--------0000 000000000000100000
---0--1101--10-----1---0000 000000000000100000
----001101--1--0------001-- 000100000000100000
----0-0001001---01--------- 000000000000100000
----0-0001001---0---------1 000000000000100000
----0-0001001---0---1------ 000000000000100000
----0-0001001---0-1-------- 000000000000100000
----0-0001001---0--------1- 000000000000100000
------1-1---11----0-1-00000 000000000000100000
----0-0001001---0----1----- 000000000000100000
----0-0001001---0-----1---- 000000000000100000
----0-0001001---0-------1-- 000000000000100000
------1-1---11----0--100000 000000000000100000
----0-0001001---0------1--- 000000000000100000
----0-0001001---0--1------- 000000000000100000
------1-1---11----01--00000 000000000000100000
----0-000100-1--0---------- 000100000000010100
---11-1101-1----0----1----- 000100000000000000
---0--1-1---11--1-----00000 000000000000100000
---0--1-1---11----1---00000 000000000000100000
---0--1101--111-------1-0-1 000000000000100000
---0--1101--111-------1-01- 000000000000100000
-011--------0------10---100 000000000000100000
---0--1-1---110-------10000 000000000000100000
---0--1101--1--------11-000 000000000000100000
---0--11-1--111--------1100 000000000000100000
---0--1101--10--------1-000 000000000000100000
---0--111---111--------0000 000000000000100000
--11--------00-----10---100 000000000000100000
---0--11-1--11-0-------1100 000000000000100000
---0--1101-1---------11-1-- 000100000000000000
----010000--1----00-------- 001111011000000000
---11-1101--1---0----1----1 000000000000100000
---11-1101--1---0----1---1- 000000000000100000
---11-1101--1---0----11---- 000000000000100000
---11-1101--1---0----1--1-- 000000000000100000
---11-1101--10--0---------1 000000000000100000
---11-1101--10--0--------1- 000000000000100000
---11-1101--1---0----1-1--- 000000000000100000
---11-1101--10--0----1----- 000000000000100000
---11-1101--10--0-----1---- 000000000000100000
---11-1101--10--0-------1-- 000000000000100000
---11-1101--10--0------1--- 000000000000100000
-0-0--------0-1----101---00 000000000000100000
-0-0--------0-1----10-1--00 000000000000100000
-0-0--------0-1----10---100 000000000000100000
-0-0--------0-1----10--1-00 000000000000100000
-0-0--------0--0---101---00 000000000000100000
-0-0--------0--0---10-1--00 000000000000100000
-0-0--------0--0---10---100 000000000000100000
-0-0--------0--0---10--1-00 000000000000100000
----001101--1-1-------00--- 000100000000100001
---0--------001----101---00 000000000000100000
---0--------001----10-1--00 000000000000100000
----001101--1-01-----0----- 000100000000100000
---0--------001----10---100 000000000000100000
---0--------001----10--1-00 000000000000100000
---0--------00-0---101---00 000000000000100000
---0--------00-0---10-1--00 000000000000100000
---0--------00-0---10---100 000000000000100000
---0--------00-0---10--1-00 000000000000100000
---11-1101--11--1-0-------- 000000000000100000
---0--1101--1--------11-1-1 000000000000100000
---0--1101--1--------11-11- 000000000000100000
---0--1101--10--------1-1-1 000000000000100000
---0--1101--10--------1-11- 000000000000100000
---0--1101--10---------11-1 000000000000100000
---0--1101--10---------111- 000000000000100000
----001101-----------0--1-- 000100000000000000
---0--11-1--111--------10-1 000000000000100000
---0--11-1--111--------101- 000000000000100000
---0--11-1--11-0-------10-1 000000000000100000
---0--11-1--11-0-------101- 000000000000100000
-111--------01-----10---0-- 000000000000100000
---0--11-1-1---------1-11-- 000100000000000000
-1-0--------011----10----1- 000000000000100000
---1001101--1---1---------- 000000000000100001
-1-0--------01-0---10----1- 000000000000100000
---0--10----11-0------11--1 000000000000100000
---0--10----11-0------11-1- 000000000000100000
-1-0--------0101---11------ 000000000000100000
---0--10----11-0------111-- 000000000000100000
---1001101--11------------- 000100000000100000
---0--11-1--11-------1-11-- 000000000000100000
--11--------0------10---0-1 000000000000100000
--11--------0------10---01- 000000000000100000
---0--1101--1001----------- 000000000000100000
---1--1-----11--101-------1 000000000000100000
---1--1-----11--101-1------ 000000000000100000
---1--1-----11--101------1- 000000000000100000
---1--1-----11--101--1----- 000000000000100000
---1--1-----11--101---1---- 000000000000100000
---1--1-----11--101-----1-- 000000000000100000
---1--01----11---00-------1 000000000000100000
---1--01----11---00-1------ 000000000000100000
---1--01----11---00------1- 000000000000100000
---1--1-----11--101----1--- 000000000000100000
---11-1-----11--101-------- 000000000000100001
---1--1-----11--1011------- 000000000000100000
---1--01----11---00--1----- 000000000000100000
---1--01----11---00---1---- 000000000000100000
---1--01----11---00-----1-- 000000000000100000
---1--01----11---00----1--- 000000000000100000
---1--01----11---001------- 000000000000100000
----001101--1----1--------- 000000000000100000
----001101--1-------------1 000000000000100000
----001101--1-------1------ 000000000000100000
----001101--1-----1-------- 000000000000100000
----001101--1------------1- 000000000000100000
---0--------0-1----10----11 000000000000100000
----001101--1--------1----- 000000000000100000
----001101--1---------1---- 000000000000100000
----001101--1----------1--- 000000000000100000
----001101--1------1------- 000000000000100000
---0--------0--0---10----11 000000000000100000
---0--100------0------11--- 000101000100000000
---0--------0-01---11-----1 000000000000100000
---0--------0-01---111----- 000000000000100000
---0--------0-01---11-1---- 000000000000100000
---0--1-1---11--------11--1 000000000000100000
---0--------0-01---11---1-- 000000000000100000
---0--1-1---11--------11-1- 000000000000100000
---0--------0-01---11--1--- 000000000000100000
---0--1-1---11--------111-- 000000000000100000
---0--1-1---110--------1--1 000000000000100000
---0--1-1---110--------1-1- 000000000000100000
---0--1-1---110--------11-- 000000000000100000
---0-1-1----1--0------00--- 000000000010011010
---0-1-1----1-1-------00--- 000000000010011011
---0--111---11---------1--1 000000000000100000
---0--111---11---------1-1- 000000000000100000
---1--11-0--11---01-------- 000110000100100000
---0--111---11---------11-- 000000000000100000
---0---1---1--01-----1----- 000100000000000000
---0--1-1-----1-------11--- 000111000000000000
---1--1--0--11---10-------- 000000000000100000
---0--0--1--1-01-1--------- 000000000000100000
---0---1-0--1-01-1--------- 000000000000100000
---1--1--0--11----0-------1 000000000000100000
---1--1--0--11----0-1------ 000000000000100000
---1--1--0--11----0------1- 000000000000100000
---0--0--1--1-011---------- 000000000000100000
---0--0--1--1-01----------1 000000000000100000
---0--0--1--1-01----1------ 000000000000100000
---0--0--1--1-01--1-------- 000000000000100000
---0---1----1-01-----1----1 000000000000100000
---0--0--1--1-01---------1- 000000000000100000
---0---1-0--1-011---------- 000000000000100000
---0---1-0--1-01----------1 000000000000100000
---0---1----1-01-----1---1- 000000000000100000
---1--1--0--11----0--1----- 000000000000100000
---0---1-0--1-01----1------ 000000000000100000
---1--1-1---11----0-------1 000000000000100000
---0---1-0--1-01--1-------- 000000000000100000
---0---1-0--1-01---------1- 000000000000100000
---1--1--0--11----0---1---- 000000000000100000
---1--1-1---11----0------1- 000000000000100000
---1--1--0--11----0-----1-- 000000000000100000
---0--0--1--1-01-----1----- 000000000000100000
---0--------0-01---11----1- 010110000111111100
---0--0--1--1-01------1---- 000000000000100000
---1--1-----11--110-------- 000100000000100000
---0--0--1--1-01--------1-- 000000000000100000
---0---1-0--1-01-----1----- 000000000000100000
---0---1----1-01-----1--1-- 000000000000100000
---0---1-0--1-01------1---- 000000000000100000
---1--10----11---10-------- 000000000000100000
---1--1--0--11----0----1--- 000000000000100000
---1--1-1---11----0---1---- 000000000000100000
---0---1-0--1-01--------1-- 000000000000100000
---1--1-1---11----0-----1-- 000000000000100000
---1--1--0--11----01------- 000000000000100000
---0--0--1--1-01-------1--- 000000000000100000
---0---1----1-01-----1-1--- 000000000000100000
---0--0--1--1-01---1------- 000000000000100000
---0---1-0--1-01-------1--- 000000000000100000
---1--1-1---11----0----1--- 000000000000100000
---1--10----11----0-------1 000000000000100000
---1--10----11----0-1------ 000000000000100000
---0---1-0--1-01---1------- 000000000000100000
---1--10----11----0------1- 000000000000100000
---0--111-----1--------1--- 010101000000000000
---1--10----11----0--1----- 000000000000100000
---1--10----11----0---1---- 000000000000100000
---0--101-----0--------1--- 000110000100000000
---1--10----11----0-----1-- 000000000000100000
---1--10----11----0----1--- 000000000000100000
---0--111------0-------1--- 010101000000000000
---1--10----11----01------- 000000000000100000
---1--1-1---11---01-------- 000100000100100000
---01-------1--0------00--- 000000000010011010
---0--10----1-01-1--------- 000000000000100000
---1---101--1---0---------- 000001010000000001
---0--1-----1001-----1----- 000000000000100000
---01-------1-1-------00--- 000000000010011011
---0--10----1-011---------- 000000000000100000
---0--10----1-01----------1 000000000000100000
---0--10----1-01----1------ 000000000000100000
---0--10----1-01--1-------- 000000000000100000
---0--10----1-01---------1- 000000000000100000
---1--1---------101-------- 000100000000000000
---0--10----1-01------1---- 000000000000100000
---0--10----1-01--------1-- 000000000000100000
---0--10----1-01-------1--- 000000000000100000
---0-1-1----1-1---------0-- 000000000010011010
---0--10----1-01---1------- 000000000000100000
---1--01---------00-------- 000100000000000000
---1--10----11---01-------- 000101000100100000
-------1--0-1-------------- 000000000000000110
---0-1-1----1--0--------0-- 000000000010011010
---0--1-1---1101----------- 000000000000100000
---0--10----1101----------- 000000000000100000
---0--0--1----01----------- 000100000000000000
---0---1-0----01----------- 000100000000000000
---0----1---1-01-1--------- 000000000000100000
---0----1---1-011---------- 000000000000100000
---0--10----1-01----------- 000101000100000000
---0----1---1-01----------1 000000000000100000
---0----1---1-01----1------ 000000000000100000
---0----1---1-01--1-------- 000000000000100000
---0----1---1-01---------1- 000000000000100000
---1--11-0--------0-------- 000110001000000000
---0----1---1-01-----1----- 000000000000100000
---0----1---1-01------1---- 000000000000100000
---0----1---1-01--------1-- 000000000000100000
---0----1---1-01-------1--- 000000000000100000
---0----1---1-01---1------- 000000000000100000
---0--10------1-------0---- 000011000100000000
---101-1----1-------------- 000000000010011011
---0--1-0-----11----------- 000011000100000000
---0--1-0------0------0---- 000011000100000000
---01-------1-1---------0-- 000000000010011010
-----1-1----11-------0----- 000000000010011110
---01-------1--0--------0-- 000000000010011010
---1--1-1---------0-------- 000100000000000000
---1--1----------00-------- 001001010000000000
---0----1-----1--------0--- 010011000100000000
---11-------1---1---------- 000000000010011010
---1--10----------0-------- 000110000100000000
---0----1-----01----------- 010110000100000000
--01--------0-------------- 000000000000000001
-----000----1-------------- 011011011100000000
----1-------11-------0----- 000000000010011110
---1--------0-----------1-- 000000000000000001
------1101----------------- 010010001100000000
---0--1--------0-------0--- 010011000100000000
---0--------1-0--------0--- 000000000000000001
----1-00----1-------------- 011011011100010110
-------------1-10---------- 000000000001000100
------001---1-------------- 011011011100010110
------00-1--1-------------- 011011011110001001
---0----------01----------- 000000000000000001
-------0--1-1-------------- 000000000000000110
---0---10---1-------------- 010011000100000000
-------0----1---1---------- 000000000000010110
------111---1-------------- 000010001010011111
------0-----1-----1-------- 000011000100000000
------------0-1-----1------ 110111000111011101
------0-----1----1--------- 010011010100000000
1-----0-------------------- 000000001100000000
------------0--0----1------ 110111000111011101
------------0----------1--- 000000100000000000
1--1----------------------- 000000000100000000
---0--------1-----------1-- 000000000000000001
---1--------1----1--------- 011011001100000001
-------------1---1--------- 000000000001000000
------0------0------------- 010000000000010000
-------------0-0----------- 000011000000000000
-------------1------------1 000000000001000000
-------------1------1------ 000000000001000000
-------------1-----------1- 000000000001000000
---1--------0-------1------ 111111011111011101
-------------1--------1---- 000000000001000000
-------------1-----1------- 000000000001000000
-------------1--1---------- 000000000001000100
-------------1-------1----- 000000000001000100
-------------11------------ 000000000001000100
-------------1----------1-- 000000000001000100
-------------1---------1--- 000000000001000100
-------------1----1-------- 011000011001000000
---0--------0------------0- 010110000111011101
---1---------0------------- 011011011000000000
------------1---------1---- 000000100000000000
------10----1-------------- 010000000010011111
-----------11-------------- 000000000000010110
------01----1-------------- 010011010110011111
------------10------------- 000100000100000001
----------1---------------- 000000000000010000
------------0------0------- 110111000111011101
---------0--1-------------- 000000000010011111
------------0-------0------ 111111011111011100
---0----------------------- 001000111000000000
.e
