C64 PLA Replacement

INTRODUCTION

Troubleshooting a dead C64 often reveals a faulty PLA IC as the root cause. The PLA does the address decoding and bank switching. SIGNETICS 82S100 (later PHILIPS PLS100) Bipolar Programmable Logic Arrays were used in early revisions of the C64 Mainboard assy, which were then replaced by MOS 8700-001 and MOS 906114-01. This blog is presenting a smart circuit as a replacement for the PLA.

PLA Replacement (U17 ON ASSY 250407)

C64 PLA Pinout

FEATURES

  • 5V logic
  • Programmable CAS to CASRAM delay (30ns typical)
  • No SMD ICs
  • Easy-to-build

LET’S GET STARTED

Schematic

Circuit Description

GAL22V10 and GAL16V8 are a perfect choice for this task. Since 24 IOs are needed for the PLA replacement, the logic had to be split into two blocks. One is implemented in the GAL22V10 and the other one in the GAL16V8. CAS to CASRAM delay is realised by the propagation delays of U2 and U3. Within U3 the delay is programmable from 1x tpd up to 5x tpd (tpd ca. 7ns).

ABEL Design for U2 (22V10)

MODULE 

TITLE 'C64 PLA REPLACEMENT'
"Yorck Thiele, December 2020

DEVICE  'p22V10';


"INPUTS
A12, A13, A14, A15, _VA14       PIN  23, 1, 2, 3, 4;
_CHAREN,  _HIRAM,  _LORAM       PIN  5, 6, 7;
_CAS, _GAME, _EXROM, R__W       PIN  8, 9, 13, 11;
_AEC, BA, VA12, VA13 	        PIN  10, 22, 17, 16;


"OUTPUTS
I_O, CASRAM, ROML, ROMH, CHAROM, BASKER PIN 18,19,20,21,14,15 ISTYPE 'com';


EQUATIONS

!ROMH = (_HIRAM  & A15  & !A14  & A13  & !_AEC  & R__W  & !_EXROM  & !_GAME 
             # A15  & A14  & A13  & !_AEC  & _EXROM  & !_GAME
             # _AEC  & _EXROM  & !_GAME  & VA13  & VA12);

!ROML = (_LORAM  & _HIRAM  & A15  & !A14  & !A13  &  !_AEC  & R__W  & !_EXROM 
             # A15  & !A14  & !A13  & !_AEC  & _EXROM  & !_GAME);

!I_O = (_HIRAM  & _CHAREN  & A15  & A14  & !A13  & 
               A12  & BA  & !_AEC  & R__W  & _GAME 
             # _HIRAM  & _CHAREN  & A15  & A14  & !A13  & 
               A12  & !_AEC  & !R__W  & _GAME 
             # _LORAM  & _CHAREN  & A15  & A14  & !A13  & 
               A12  & BA  & !_AEC  & R__W  & _GAME 
             # _LORAM  & _CHAREN  & A15  & A14  & !A13  & 
               A12  & !_AEC  & !R__W  & _GAME 
             # _HIRAM  & _CHAREN  & A15  & A14  & !A13  & 
               A12  & BA  & !_AEC  & R__W  & !_EXROM  & 
               !_GAME 
             # _HIRAM  & _CHAREN  & A15  & A14  & !A13  & 
               A12  & !_AEC  & !R__W  & !_EXROM  & !_GAME 
             # _LORAM  & _CHAREN  & A15  & A14  & !A13  & 
               A12  & BA  & !_AEC  & R__W  & !_EXROM  & 
               !_GAME 
             # _LORAM  & _CHAREN  & A15  & A14  & !A13  & 
               A12  & !_AEC  & !R__W  & !_EXROM  & !_GAME 
             # A15  & A14  & !A13  & A12  & BA  & 
               !_AEC  & R__W  & _EXROM  & !_GAME 
             # A15  & A14  & !A13  & A12  & !_AEC  & 
               !R__W  & _EXROM  & !_GAME );


!CHAROM = (_HIRAM  & !_CHAREN  & A15  & A14  & !A13  & 
               A12  & !_AEC  & R__W  & _GAME 
             # _LORAM  & !_CHAREN  & A15  & A14  & !A13  & 
               A12  & !_AEC  & R__W  & _GAME 
             # _HIRAM  & !_CHAREN  & A15  & A14  & !A13  & 
               A12  & !_AEC  & R__W  & !_EXROM  & !_GAME 
             # _VA14  & _AEC  & _GAME  & !VA13  & VA12 
             # _VA14  & _AEC  & !_EXROM  & !_GAME  & !VA13  & 
               VA12 );


!BASKER = (_HIRAM  & A15  & A14  & A13  & !_AEC  & 
               R__W  & _GAME 
             # _HIRAM  & A15  & A14  & A13  & !_AEC  & 
               R__W  & !_EXROM  & !_GAME 
             # _LORAM  & _HIRAM  & A15  & !A14  & A13  & 
               !_AEC  & R__W  & _GAME );


!CASRAM = !( !BASKER # !CHAROM # !I_O # !ROMH # !ROML
             # !A15  & !A14  & A12  & _EXROM  & !_GAME 
             # !A15  & !A14  & A13  & _EXROM  & !_GAME 
             # !A15  & A14  & _EXROM  & !_GAME 
             # A15  & !A14  & A13  & _EXROM  & !_GAME 
             # A15  & A14  & !A13  & !A12  & _EXROM  & !_GAME 
             # _CAS );

END 

ABEL Design for U3 (16V8)

MODULE

TITLE 'C64 PLA REPLACEMENT'
"Yorck Thiele, December 2020

DEVICE  'p16v8';

"INPUTS
R__W        pin 1;
A14         pin 2;
_CAS        pin 3;
_BASKER     pin 4;
_CASRAM     pin 5;


"OUTPUTS
GR_W		pin 12 istype 'com';
KERNAL		pin 13 istype 'com'; 
BASIC		pin 14 istype 'com';
CASRAM_DLY	pin 15 istype 'com';
DELAY2		pin 18 istype 'com';
DELAY1		pin 19 istype 'com';


EQUATIONS

!GR_W = !R__W & !_CAS;
!BASIC = !_BASKER & !A14;
!KERNAL = !_BASKER & A14;
DELAY1 = _CASRAM;
DELAY2 = DELAY1;
CASRAM_DLY = DELAY2;


END

DOWNLOAD SECTION

PLA Replacement