[ukvac] Tech: PALs - What They Are
PAL's are a really cool piece of kit. They sort of act like a very early
FPGA - (field Programmable Gate Array).
<LONG_BORING_TECHY_STUFF_SATURDAY_MORN_STUFF>
You burn a PAL in the a similar way to a ROM. From memory (it's been 10 years
now) you have a big grid, where you fuse the links between input lines
(PAL16L8 = 16 inputs, 8 outputs) onto an output line(s).
Each 'fuse' is a NAND gate (and as you all know, you can make any other gate
out of one or more NAND gates). The beauty of this is that you can cascade the
inputs so that combinations of inputs will produce combinations on the
outputs.
The most obvious usage of this is for address decoding. On old boards, a few
74 Series IC will do, but a neater solution requiring less chips can use a
PAL - although it does require programming. Williams PCBs, for example, use
one or two PALs for exactly this - checkout their circuit diagram.
So, AW is right when he says you can use a logic analyser to exercise all of
the inputs combinations, note down all of the output combinations and reverse
engineer your PAL. (I.e. work out the logic that it's performing, perform
Boolean minimisation and create a new PAL blower source file.)
If you're thinking ahead a bit, you're thinking "Isn't that the same as what a
ROM does?" and you'd be right. The reason a PAL exists is that years ago ROMs
were $$$ whereas a PAL has only a relatively small amount of logic
combinations you can use (i.e. there's not that much decoding to be done on a
PCB for example). So, if you didn't need the sheer number combinations
available of a ROM, they work out much cheaper.
To replace a 16L8, you're gonna need a ROM with 16 address lines and 8 data
lines - not very expensive these days (although still probably not as cheap as
a PAL). You might need some fiddling to make the chip select logic work. I
think there's a documented Defender mod to use a ROM instead of a PAL. (Dave
Langley/Chad?)
But_the_real_magic_of_a_PAL_comes_with_use_with_feedback. (I think these are
designated an R as in 16R8, but I might be wrong.) Here, the outputs of the
PAL are not only output, but are fed back internally (although you could do it
yourself externally) to be used as inputs. So the output combinations don't
just depend on the current input combo, but also on the _previous_ input combo
on the last clock pulse, (as did the previous combo etc. etc.).
This is called a state machine and is used for stuff like running a vending
machine, washing machine, car alarm etc. I _think_ a state machine is used in
some Vector Generators circuits e.g. Cinematronics, possible using discrete
logic.
You _could_ work out how it all works using a logic analyser, but this time
you'll need to know how the PAL works and have a _lot_ of patience and cunning
to engineer in the feedback effects. Even then you might not be able to do it.
Fortunately, I would think that R-type (nice) PALs would have little use on a
general game PCB, so you probably won't run into this problem.
I have some PAL source files and possibly a compiler on disk. Unfortunately
they're 5 1/4 :-( If you need more info, I'm sure you can find it on the
net...
<LONG_BORING_TECHY_STUFF_SATURDAY_MORN_STUFF>
>of course, i don't think that's really going to help, it just sounds whizz
>
This probably won't help much either
Cheers,
Phillip Eaton (Forth-79/D-Type/Flip-Flop)
-------------------------------------------------------------------
Tel: +44 (0)1536 268424/504434 Fax: +44 (0)845 334 8195
Email: d-type@phillipeaton.com Mobile: +44 (0)7775 726366
Web: www.phillipeaton.com
-------------------------------------------------------------------
PAL's are a really cool piece of kit. They sort of act like a very early
FPGA - (field Programmable Gate Array).
<LONG_BORING_TECHY_STUFF_SATURDAY_MORN_STUFF>
You burn a PAL in the a similar way to a ROM. From memory (it's been 10 years
now) you have a big grid, where you fuse the links between input lines
(PAL16L8 = 16 inputs, 8 outputs) onto an output line(s).
Each 'fuse' is a NAND gate (and as you all know, you can make any other gate
out of one or more NAND gates). The beauty of this is that you can cascade the
inputs so that combinations of inputs will produce combinations on the
outputs.
The most obvious usage of this is for address decoding. On old boards, a few
74 Series IC will do, but a neater solution requiring less chips can use a
PAL - although it does require programming. Williams PCBs, for example, use
one or two PALs for exactly this - checkout their circuit diagram.
So, AW is right when he says you can use a logic analyser to exercise all of
the inputs combinations, note down all of the output combinations and reverse
engineer your PAL. (I.e. work out the logic that it's performing, perform
Boolean minimisation and create a new PAL blower source file.)
If you're thinking ahead a bit, you're thinking "Isn't that the same as what a
ROM does?" and you'd be right. The reason a PAL exists is that years ago ROMs
were $$$ whereas a PAL has only a relatively small amount of logic
combinations you can use (i.e. there's not that much decoding to be done on a
PCB for example). So, if you didn't need the sheer number combinations
available of a ROM, they work out much cheaper.
To replace a 16L8, you're gonna need a ROM with 16 address lines and 8 data
lines - not very expensive these days (although still probably not as cheap as
a PAL). You might need some fiddling to make the chip select logic work. I
think there's a documented Defender mod to use a ROM instead of a PAL. (Dave
Langley/Chad?)
But_the_real_magic_of_a_PAL_comes_with_use_with_feedback. (I think these are
designated an R as in 16R8, but I might be wrong.) Here, the outputs of the
PAL are not only output, but are fed back internally (although you could do it
yourself externally) to be used as inputs. So the output combinations don't
just depend on the current input combo, but also on the _previous_ input combo
on the last clock pulse, (as did the previous combo etc. etc.).
This is called a state machine and is used for stuff like running a vending
machine, washing machine, car alarm etc. I _think_ a state machine is used in
some Vector Generators circuits e.g. Cinematronics, possible using discrete
logic.
You _could_ work out how it all works using a logic analyser, but this time
you'll need to know how the PAL works and have a _lot_ of patience and cunning
to engineer in the feedback effects. Even then you might not be able to do it.
Fortunately, I would think that R-type (nice) PALs would have little use on a
general game PCB, so you probably won't run into this problem.
I have some PAL source files and possibly a compiler on disk. Unfortunately
they're 5 1/4 :-( If you need more info, I'm sure you can find it on the
net...
<LONG_BORING_TECHY_STUFF_SATURDAY_MORN_STUFF>
>of course, i don't think that's really going to help, it just sounds whizz
>
This probably won't help much either
Cheers,
Phillip Eaton (Forth-79/D-Type/Flip-Flop)
-------------------------------------------------------------------
Tel: +44 (0)1536 268424/504434 Fax: +44 (0)845 334 8195
Email: d-type@phillipeaton.com Mobile: +44 (0)7775 726366
Web: www.phillipeaton.com
-------------------------------------------------------------------