PAL16L8, PAL16R4, GAL16V8B replacement - Page 1
Forum section: electronics / general

author: luiHS
author_rank: Frequent Contributor
timestamp: November 10, 2018, 09:28:13 pm
content: Hello.Do you know what current solution exists as a replacement for PAL16L8 and PAL16R4?I find a very old circuitry, from the 90s. Replicating it is not complicated, although some chips are already difficult to locate (TS68000 processors of ST and HD6845SP think of Hitachi). In this circuit, three PALs are used, two of the reference TIBPAL16R4 and one TIBPAL16L8 of Texas Instruments.I have seen that some people has replaced those three PAL, for the GAL16V8B, with a program that migrates the code. The problem is that I think the GALs have also stopped being manufactured (I think they were from Lattice).Is there an alternative to migrate those PALs to another type of more modern chip? A CPLD or something, I suspect.On the other hand, if I locate the GAL16V8B, I will need a programmer, I have not yet investigated the issue, but I think, that the Chinese TL866 can program these chips. Some suggestions ?Greetings.

author: MadTux
author_rank: Frequent Contributor
timestamp: November 10, 2018, 10:26:10 pm
content: Atmel/µchip still makes them: ATF16, ATF22 and ATF1508. First 2 are more or less comparable to PAL/GAL

author: luiHS
author_rank: Frequent Contributor
timestamp: November 10, 2018, 10:52:39 pm
content: Quote from: MadTux on November 10, 2018, 10:26:10 pmThanks I will check.I have see that also TL866 chinese programmer can program some PAL/GAL, at least the last version, Plus II.

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 12:55:59 am
content: I have the original files for 16L8 and 16R4, but to write in ATF16V8 I need files in JEDEC format.Does anyone know how I can convert files?In the data sheet of ATF16v8, it states that it can emulate PAL16L8 and PAL16R4, but there is no detail on how to do it. When I choose ATF16v8 in my TL866 programmer, it requests a JEDEC file.

author: TK
author_rank: Super Contributor
timestamp: November 11, 2018, 01:51:57 am
content: I think GAL devices also require JEDEC files. If you have the program, then you can use PALASM to compile and generate the JEDEC file for the TL866PALASM requires DOS, so you can run it on DOSBOXIf you have the original chip, then you can try to read the content with TL866 and it will save it as JEDEC

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 02:08:08 am
content: Quote from: TK on November 11, 2018, 01:51:57 amThanks I'll try.I have edited one of the source files I have for the 16R4 and 16L8, and this is what I see, a total of 1030 lines of code, which start with this content attached. I do not know what this is, if it is a JEDEC or if I need to convert it to obtain a .JED file to be able to record it with the TL866.INPUT OUTPUTPPPPPPPPPP PPPPPPPP0000000001 111111111234567891 234567890000000000 011110101000000000 011110100100000000 011110101100000000 011110100010000000 111110101010000000 111010100110000000 111010101110000000 110110100001000000 010110101001000000 011110100101000000 011110101101000000 011110100011000000 111110101011000000 11101010.......... and this continue up to 1030 lines of text.

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 02:29:08 am
content: Now I have tried to read two of the GAL16v8 with my TL866, the programmer has read and saved JEDEC files, but I am not sure if they are correct. I do not know if the PAL / GAL allows some reading protection, and really has not read anything useful.This is the content read with TL866 from one of the GAL16v8.Device : GAL16V8BCreated By:http://www.autoelectric.cnDate : 2018-11-11 03:20*QP20*QF2194*G0*F0*L00000 10000000000000000000000000000000*L00032 10000000000000000000000000000000*L00064 11111111111111111111111111111111*L00096 10000000000000000000000000000000*L00128 10000000000000000000000000000000*L00160 10000000000000000000000000000000*L00192 10000000000000000000000000000000*L00224 11111111111111111111111111111111*L00256 11111111111111111111111111111111*L00288 11111111111111111111111111111111*L00320 11111111111111111111111111111111*L00352 11111111111111111111111111111111*L00384 11111111111111111111111111111111*L00416 11111111111111111111111111111111*L00448 11111111111111111111111111111111*L00480 11111111111111111111111111111111*L00512 10000000000000000000000000000000*L00544 11111111111111111111111111111111*L00576 10000000000000000000000000000000*L00608 10000000000000000000000000000000*L00640 10000000000000000000000000000000*L00672 10000000000000000000000000000000*L00704 10000000000000000000000000000000*L00736 10000000000000000000000000000000*L00768 10000000000000000000000000000000*L00800 10000000000000000000000000000000*L00832 10000000000000000000000000000000*L00864 10000000000000000000000000000000*L00896 10000000000000000000000000000000*L00928 10000000000000000000000000000000*L00960 10000000000000000000000000000000*L00992 10000000000000000000000000000000*L01024 11111111111111111111111111111111*L01056 11111111111111111111111111111111*L01088 11111111111111111111111111111111*L01120 11111111111111111111111111111111*L01152 11111111111111111111111111111111*L01184 11111111111111111111111111111111*L01216 11111111111111111111111111111111*L01248 11111111111111111111111111111111*L01280 11111111111111111111111111111111*L01312 11111111111111111111111111111111*L01344 11111111111111111111111111111111*L01376 11111111111111111111111111111111*L01408 11111111111111111111111111111111*L01440 11111111111111111111111111111111*L01472 11111111111111111111111111111111*L01504 11111111111111111111111111111111*L01536 11111111111111111111111111111111*L01568 11111111111111111111111111111111*L01600 11111111111111111111111111111111*L01632 11111111111111111111111111111111*L01664 11111111111111111111111111111111*L01696 11111111111111111111111111111111*L01728 11111111111111111111111111111111*L01760 11111111111111111111111111111111*L01792 11111111111111111111111111111111*L01824 11111111111111111111111111111111*L01856 11111111111111111111111111111111*L01888 11111111111111111111111111111111*L01920 11111111111111111111111111111111*L01952 11111111111111111111111111111111*L01984 11111111111111111111111111111111*L02016 11111111111111111111111111111111*L02048 00101100001000011111111101000000*L02080 00000000111111111111111111111111*L02112 11111111001101101111111010100100*L02144 00000001111111111111111111111111*L02176 111111100110010000*CB650*3400

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 11, 2018, 03:33:37 am
content: Quote from: luiHS on November 10, 2018, 09:28:13 pmThe Atmel/Microchip ATF16V8B/BQL should replace those, in the same package & pinoutYou can download their WinCUPL tools and create JED files from scratch for these.If you can locate an EETools programmer, it has menu items likeManufacturer:ATMEL, Device name:ATF16LV8Cas16R4Manufacturer:ATMEL, Device name:ATF16LV8Cas16L8ie it can read a jedec file for those older parts, and uses the fuse-subset to program the ATF16V8.Quote from: luiHS on November 11, 2018, 02:08:08 amthat looks like Simulation info, it shows IN and OUT expected. Do you have the boolean equations too ?Often, that simulation info is appended to the JED file to allow test after program.Here is a 16V8 file, moving from Fuse info, to vector info*L02112 00000000000000001111111111111111*L02144 11111111111111111111111111111111*L02176 111111111111111101*C4C16*P 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20*V0001 000000000N0HHHHHHHHN*V0002 000000101N0HHHHHHHHN*V0003 C00000101N0HHHHHHHLN*V0004 C00000101N0HHHHHHLLN*V0005 C00000101N0HHHHHLLLN*V0006 C00000101N0HHHHLLLLN*V0007 010001010N0HHHHLLLLN*V0008 C10001010N0HHHLLLLHNQuote from: luiHS on November 11, 2018, 02:29:08 amRead a part you know is blank/new and compare ?

author: up8051
author_rank: Frequent Contributor
timestamp: November 11, 2018, 08:12:54 am
content: Hi,TIPBAPL chips can be protected, but 16L8 is rather simply to reverse engineering, 16R4 a bit harder.TS68000 (PLCC, DIP) and UM6845R chips are still available (in Poland).Regards,up8051

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 10:18:50 am
content: Quote from: up8051 on November 11, 2018, 08:12:54 amHi.How can I apply reverse engineering to get the code? I suppose I simply apply signals to the inputs and read the outputs. It seems to me that the files that I downloaded from the Internet for these PAL16L8 and PAL16R4, is not the content of the chips, but a test writing in the inputs and reading the status of the outputs of the chip.For the TS68000 and HD6845SP, I contacted the Chinese, they have offered me very cheap prices, but I am not sure what they really offer me, I do not trust the Chinese sellers of vintage chips.I have ordered a TL866 II Plus that seems to work with more PAL / GAL references, but finally if I do not get the code to write a new chip with the AT16V8, it will not be useful, and it will be a waste of money, although it is cheap and some useful I will give himCan you suggest a good system to reverse engineer and write a new chip? I have the original PAL16L8 and PAL16R4. I tried to read them with TL866, but I suspect that it really does not read anything, although the software says that it was read successfully, basically because if I do not put any chip in the programmer and press the option to read, the message that the programmer gives is exactly the same, it was read successfully and the content of the reading does not seem useful.

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 10:25:03 am
content: Quote from: PCB.Wiz on November 11, 2018, 03:33:37 amThe problem is to know how the original PAL that I have here works, to apply reverse engineering to know how the outputs change according to the inputs. I think it's simple, but I never did it before.QuoteNo, I only have those files with input - output status. I thought it was the content dump of the chip, but it seems to be the state of the outputs according to the inputs for all the combinations of inputs.And after trying to read the PAL with my TL866, I think I do not really read anything, so it seems that the chips are protected against reading.

author: up8051
author_rank: Frequent Contributor
timestamp: November 11, 2018, 12:32:20 pm
content: Attach files that you have (with input - output status).I will look at them.Are they from pinball DMD?Regards,up8051

author: TK
author_rank: Super Contributor
timestamp: November 11, 2018, 01:45:14 pm
content: I was able to reverse engineer a GAL chip from a vintage HP test equipment by analyzing the schematics to verify the input and output pins, then using a logic analyzer on the device. It was a state machine. It can be combinatorial logic as well.Here is the link to the post I created with some basic information:https://www.eevblog.com/forum/testgear/how-to-activate-ibasic-on-vintage-hp-871xb-network-analyzers/msg1251274/#msg1251274

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 03:11:17 pm
content: Quote from: up8051 on November 11, 2018, 12:32:20 pmYou can download from this link.https://www.ipdb.org/files/3593/PALDUMP_DMC_192x64.zipIts a display controller board for pinball games.

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 03:13:01 pm
content: Quote from: TK on November 11, 2018, 01:45:14 pmThanks, I will check it.

author: pelule
author_rank: Frequent Contributor
timestamp: November 11, 2018, 06:14:36 pm
content: I did a similar "refurbish". It may help.https://www.eevblog.com/forum/repair/datron-cpu-board-pal-data-(1271-1281-)/msg1346121/#msg1346121

author: up8051
author_rank: Frequent Contributor
timestamp: November 11, 2018, 06:34:04 pm
content: Fast reverse engineering of U26 PAL16L8:INPUT:PIN1 /UDSPIN2 /LDSPIN3 /ASPIN4 A21PIN5 A4PIN6 A22PIN7 R/WPIN8 A3PIN9 /DTACKOUTPUT:PIN12 /ROMWHI = /UDS * /A21 * A22 * /RW * /DTACKPIN13 /ROMWLO = /LDS * /A21 * A22 * /RW * /DTACKPIN14 /ROMLO = /LDS * /A22 * RWPIN15 /BOUT = /AS * A21 * A4 * A23 */RW */A3 * DTACKPIN16 /RAMEN = /AS * /A21 * A22PIN17 /VPA = /AS * A21 * A22 * A3PIN18 /ROMHI = /UDS * /A22 * RWPIN19 /BON = /AS * A21 * A4 * A22 * RW * /A3Of course, to check.Regards,up8051 aka JarekC.DIY

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 09:54:16 pm
content: Thanks.I understand that you generate the formulas that define the state of the outputs, according to the inputs, using the truth table obtained by applying signals to the inputs and checking how the outputs vary. The truth table, is what I understand that is available in the dumps that I have put, and not the actual content of the chip.I have look in Google, and I have found some scripts that generate a JEDEC file according with the truth table.https://github.com/psurply/ReGALhttp://www.vcfed.org/forum/entry.php?318-Cloning-a-PAL-HAL-(Part-4)&goto=nexthttp://www.vcfed.org/forum/entry.php?319-Cloning-a-PAL-HAL-(Part-5)&goto=nextAnd I suppose I can use the generated JEDEC to program a new ATF16v8 chip with the Chinese programmer TL866 Plus II. What I'm not sure, is if the JEDEC created by these scripts can only be used in PAL16L8 or GAL16v8, or if a JEDEC file is universal, with a format that works for all PAL / GAL.

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 10:08:13 pm
content: What a coincidence, in the examples of the ReGAL scripts, they have precisely applied reverse engineering to one of the three PALs that I need to recover, the reference U26 of the Data East / SEGA display controller board for pinball machines.https://github.com/psurply/ReGAL/tree/master/examples/data_east/68000_dotdisplay/U26I need now also reverse engineering for U15, U16, and the JEDEC files for the three original PAL.

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 10:45:15 pm
content: Quote from: pelule on November 11, 2018, 06:14:36 pmHi.Where can I download the Minilog program?Do you know if it works in Windows 7 64 bit?Thank you.

author: up8051
author_rank: Frequent Contributor
timestamp: November 11, 2018, 11:08:49 pm
content: Hi,Yes, equations are created manualy based on truth table (paldump file).Signal names are taken from the pinball diagram.The equation for BOUT has been corrected.In attachment:u26.pds - source file for PALASMu26.jed - file for programmer GAL16V8 (without test vectors)u26.jdc - file for programmer GAL16V8 (with test vector).Truth tables from paldump file and generated from PALASM are the same.Regards,up8051 aka JarekC.DIY

author: luiHS
author_rank: Frequent Contributor
timestamp: November 11, 2018, 11:50:32 pm
content: Quote from: up8051 on November 11, 2018, 11:08:49 pmThank you very much.Can I use those JEDEC files for ATF16v8 ?, I prefer to use a chip that is in production, like this one of Atmel/Microchip.So to do the other JEDEC of U15 and U16, I need to use the truth table, which I already have, and generate the JEDEC using PALASM?.I do not understand how create you the equations. Its made by PALASM and the truth table in some text format file ?.

author: up8051
author_rank: Frequent Contributor
timestamp: November 12, 2018, 12:20:13 am
content: GAL16V8 and ATF16V8 have the same fuse map.Karnaugh map in my mind.Regards,up8051 aka JarekC.DIY

author: luiHS
author_rank: Frequent Contributor
timestamp: November 12, 2018, 11:35:56 am
content: Quote from: up8051 on November 12, 2018, 12:20:13 amFrom the PAL input/output data to the equations, I must do it manually, is there no tool that generates the equations automatically?I understand that the steps to do are: Input/Output data ---> Equations ---> JEDEC file.I hope the ReGAL scripts can do it, everything automatically. I only have the input / output status data for each PAL, I have no experience on how to generate the equations manually, I suppose there will be tools to do it automatically, like these ReGAL scripts or others.

author: up8051
author_rank: Frequent Contributor
timestamp: November 12, 2018, 04:52:09 pm
content: The same for U16. (GAL16V8 PDS ,JED, JDC).Because of registered outputs, simple truth table can be inadequate.So it have to be tested in oryginal board.Regadsup8051 aka JarekC.DIY

author: luiHS
author_rank: Frequent Contributor
timestamp: November 12, 2018, 10:57:29 pm
content: Quote from: up8051 on November 12, 2018, 04:52:09 pmThank you I appreciate it.Could you also do U15? It's the one missing for the three PALs on the board.Regards

author: up8051
author_rank: Frequent Contributor
timestamp: November 15, 2018, 01:28:57 pm
content: Yes.But with U15 truth table is a problem:Pin 18 - signal - /ROWDATA in the truth table is always '1' but this line is used as clock for U27B.Regardsup8051 aka JarekC.DIY

author: luiHS
author_rank: Frequent Contributor
timestamp: November 15, 2018, 04:19:48 pm
content: Quote from: up8051 on November 15, 2018, 01:28:57 pmThen the truth table is wrong ?

author: pelule
author_rank: Frequent Contributor
timestamp: November 15, 2018, 06:27:44 pm
content: http://digsys.upc.es/ed/Programari/Programari.htmlWindows 7 ? You need to test.Expressso Source:https://wikivisually.com/wiki/Espresso_heuristic_logic_minimizer/PeLuLe

author: up8051
author_rank: Frequent Contributor
timestamp: November 15, 2018, 10:13:23 pm
content: Quote from: luiHS on November 15, 2018, 04:19:48 pmThe same situation is with the BLANK signal.The available truth table is insufficient to reverse engineering U15.Regards,up8051 aka JarekC.DIY

author: luiHS
author_rank: Frequent Contributor
timestamp: November 16, 2018, 02:44:47 am
content: .Ok, thanks.I will try with the ReGAL scripts, after capturing all the inputs / outputs with a Teensy programmed in C ++.I have also seen this Chinese site, announce that they can apply reverse engineering to get the code of many chips, including PAL and GAL.http://www.break-ic.com/index.asp

author: up8051
author_rank: Frequent Contributor
timestamp: November 16, 2018, 03:34:45 pm
content: If you have oryginal chip U15 I think that Teensy and small program will be enough to reverse engineering.You have to generate a little different set of test vectors (inputs) and read outputs.Regards,up8051 aka JarekC.DIY

author: luiHS
author_rank: Frequent Contributor
timestamp: November 17, 2018, 07:20:27 am
content: Quote from: up8051 on November 16, 2018, 03:34:45 pmOk, thanks, I'll try to read the outputs with all the input combinations to get the real truth table.

author: luiHS
author_rank: Frequent Contributor
timestamp: November 17, 2018, 11:43:47 am
content: Quote from: up8051 on November 16, 2018, 03:34:45 pmOne more question, please.Is there any way to know if a PAL / GAL is of registered outputs ?If registered outputs, is it possible to apply reverse engineering with a truth table?As soon as I assemble my board, I will verify it with the original GAL and with EEPLD ATF16v8 and its JEDEC for U26 and U16. I understand then, that if the original GALs are registered outputs, your JEDEC files will not work. I'm right ?.My last option, if all the reverse engineering fails, is to send the chips to "break-ic" chinese company, to get the code, although it is quite expensive, 350 USD per chip.

author: up8051
author_rank: Frequent Contributor
timestamp: November 17, 2018, 04:43:29 pm
content: Hi,My english is too bad to describe the whole process accuratelybut shortly:U15:PAL16R4pin1 - always Input, CLK functionPin2-9 - always InputPin 11 - always Input, OE functionPin 12,13,18,19 - Input or Combinatorial OutputPin 14,15,16,17 - always Registered OutputThe functions of pins 12,13,18,19 should be determined on the basis of the schematic.In Dot Matrix controller this pins are Outputs (but can be feedback to logic matrix).Three register cells are used as divider 2/4/8Pin 15 (12 Mhz)Pin 14 (N.C, but probably 6MHz)Pin 17 (3MHz)This signals are very likely feedback to logic matrix, that is why it is necessary to expand number of input combinations.You can treat the 3.6/12MHZ outputs as extra inputs.You have test all input combinations for 8 combination of 3/6/12MHz outputs.I can prepare list of required input combinations.In GAL16V8 you can configure pins12..19 as input, combinatorial output or registered output, information about pin type is coded in JEDEC file.GAL16V8 can replace PAL16L8, PAL16R4, PAL16R6,PAL16R8JEDEC file for GAL16V8 is other ten for PAL16R4 even both do the same (different fuse maps).We will do it without the help of chinese companyAs a last resort, you can send me these chip to reverse engeenering.Regards,up8051 aka JarekC.DIY

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 18, 2018, 12:08:27 am
content: Quote from: luiHS on November 17, 2018, 11:43:47 amYes, but as mentioned above, you need to expand the tests. You need to exercise the clock, and check output that change on clock, with possible conditional inputs.You might also want to check for synthesised latch ?Fortunately the 16V8 is simple, only one pin can be clock, and the circuit info guides what might be appearing on the pins to narrow down test possibilities.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: November 18, 2018, 12:12:44 am
content: Quote from: luiHS on November 10, 2018, 10:52:39 pmI contacted the TL866II Plus supplier and suggested they also add Test Vector support, and supplied an example JED file, that has appended vectors.They can test Logic ICs so this should not be hard for them to add, and it would make this sort of task easier.Meanwhile, your custom teensy can be used, and you could make that accept test vectors too... ?

author: luiHS
author_rank: Frequent Contributor
timestamp: November 18, 2018, 03:39:25 am
content: Quote from: up8051 on November 17, 2018, 04:43:29 pmOK I understand now. Some pins are Output, and PAL also uses them internally to control other signals.I see in the scheme, that in some pis puts I (input), other O (output), but in others it puts I/O (input/output) and Q (this can be an output of an internal flip/flop, and that also feedback to the PAL to control other signals?).If so, they appear in the three PAL, pins I/O and Q that would be registered outputs with feedback to the PAL.

author: luiHS
author_rank: Frequent Contributor
timestamp: November 18, 2018, 03:43:12 am
content: Quote from: PCB.Wiz on November 18, 2018, 12:08:27 amI understand, but it can be more complex if, as suggested by up8051, there are some outputs with feedback to the PAL, for example, outputs with 3Mhz, 12Mhz and others that in the scheme are indicated as I/O or Q.

author: marcopolo
author_rank: Regular Contributor
timestamp: November 21, 2018, 09:08:20 am
content: Quote from: luiHS on November 11, 2018, 10:18:50 amFYI, I have 16Mhz TS68000 DIP64 NOS available (Not chinese fakes or used, I bought the stock of an old retired electronic components reseller 12 years ago)I also have a big stock of various PAL (20L8, 16R6, 20R6, 20R8, 20X10)Marc

author: luiHS
author_rank: Frequent Contributor
timestamp: November 21, 2018, 11:04:16 am
content: Quote from: marcopolo on November 21, 2018, 09:08:20 amHi.Need PLCC68, DIP is not useful for my board. At any rate, tell me price and quantity available, may interest me if I modify my PCB to replace PLCC68 by DIP.For PAL I prefer to use the current Atmel ATF16v8 to replace the old 16R4, 16L8 and GAL16v8.

author: marcopolo
author_rank: Regular Contributor
timestamp: November 21, 2018, 04:41:41 pm
content: I need to check my stock, but I think i have no more than 15-20 TS68000 16mhz

author: tbrioux
author_rank: Newbie
timestamp: October 04, 2019, 01:27:10 pm
content: Hi all,Sorry for digging this old thread, but does anyone finally have working jed files for U15 and U16 ?I have a defect board and a good one, but I am not able to apply reverse engineering from myself...Thank'sThierry

author: up8051
author_rank: Frequent Contributor
timestamp: October 05, 2019, 07:56:22 am
content: Yes I did it.I have jedec file for U15,U16 and U26

author: tbrioux
author_rank: Newbie
timestamp: November 29, 2019, 04:31:45 pm
content: Hi,up8051 told me he had files, but unfortunately for me no more response now since october 07...Can someone else share files ?Thank'sThierry

author: up8051
author_rank: Frequent Contributor
timestamp: February 10, 2020, 11:52:33 pm
content: Files are now available at Internet Pinball Database:https://www.ipdb.org/machine.cgi?3593Regards,up8051 aka JarekC.DIY

author: tbrioux
author_rank: Newbie
timestamp: March 03, 2020, 04:31:28 pm
content: Many thank's for thatThierry