Image Map Image Map
View RSS Feed


Cloning a HAL/PAL, Part 10

Rate this Entry
Part 1 of this series starts here.

A real-world example--the Sound Blaster CT1350B upgrade PAL (U12 on the board with a label that says 0048013500).

This is a PAL16L8, with the security fuse blown, so it's a perfect test case. The sample file from the little "brute force" board is SB20.BIN (attached below). Running this through tt16l8, we find that there are 10 inputs and 8 outputs--no big surprise. Taking this output and running it through Minilog, we get the following equations:

A : PIN11     F : PIN5          |       S : PIN12     X : PIN17
B : PIN9      G : PIN4          |       T : PIN13     Y : PIN18
C : PIN8      H : PIN3          |       U : PIN14     Z : PIN19
D : PIN7      I : PIN2          |       V : PIN15
E : PIN6      J : PIN1          |       W : PIN16


S = 0
T = 1
U = AHI'
V = F'H'I'
W = F'H'J'
X = E' + A'
Y = F'H'J' + F'H'I'
Z = F
Note that Pin12 (S) is unused (0), but T is rather odd in that it's programmed so that pin 13 is programmed to produce a constant low level (remember that the 16L8 is active-low). Translating the equations to the format that EQN2JED expects, we get:

/pin13 = pin1+/pin1     ; output is always 0
/pin14 = pin11*pin3*/pin2
/pin15 = /pin5*/pin3*/pin2
/pin16 = /pin5*/pin3*/pin1
/pin17 = /pin6 + /pin11
/pin18 = /pin5*/pin3*/pin1 + /pin5*/pin3*/pin2
/pin19 = pin5
Burning a GAL16V8 with the resulting JED file yields an interesting result--when the CT1350B with the new GAL is inserted into a 5160 clone, the machine won't boot! Everything comes on, but no beep and no POST! What could be wrong?

A straightforward way of checking our work is to take the new GAL, stick it into the "brute force" sampler and compare the output to the original SB20 PAL dump--and there are differences! Looking at the two dump files, it seems that half the dump file on the original is different from the other half. But how can this be? We have only 10 possible inputs (1024 samples), so the sample pattern should repeat 64 times. But instead, we see this:

000000  A1 A9 B1 BB BB BB BB BB-A1 A9 B1 BB BB BB BB BB
008000  A1 A9 B1 BB BB BB BB BB-E1 E9 F1 FB FB FB FB FB
So, what's going on? On to part 11

Submit "Cloning a HAL/PAL, Part 10" to Digg Submit "Cloning a HAL/PAL, Part 10" to Submit "Cloning a HAL/PAL, Part 10" to StumbleUpon Submit "Cloning a HAL/PAL, Part 10" to Google

Updated June 12th, 2019 at 09:31 PM by Chuck(G)

Tags: None Add / Edit Tags


  1. Shadow Lord's Avatar

    You are my hero!
  2. Chuck(G)'s Avatar
    Thank you--that made my day!
  3. Shadow Lord's Avatar

    The BIN file you have attached here is it a ready to burn image or something else? Also any recommendations on GAL16V8 chips or are they all pretty much the same? Thanks.
  4. Chuck(G)'s Avatar
    No, you want to burn a JEDEC file, (.JED), which you can create with the EQN2JED utility from the equations that I've posted. This was intended to be an educational thread, but if you really want a "put it in the box and press the button" approach, I've attached the .JEDEC file, ready for programming to part 11.
  5. Shadow Lord's Avatar
    Thanks Chuck. While I follow the logic of what you are doing I don't think I could replicate myself easily. I thought that the equation had to be run through the JDEC utility but since you had posted a BIN file I figured maybe it was a ready to go version. Well, this now provides one more good use of the G540!