Partial success at reading PAL16L8s

I try to archive all the things I think might be important that come through my hands, and I’m a completionist so this usually gets me hung up on things that don’t actually matter functionally but I still feel like Need Doing.  The latest one is archiving the AMPAL16L8s on the “Kuri Kinton (World)” board.  The Roms were in MAME, but the way the driver was written it didn’t use the PALs.  Even though the emulation doesn’t need these, if you have a board and need to replace one of these chips to make it work you are out of luck.  After hunting around I landed on this clever adapter to brute force the logic equations programmed into these chips.

adapter-v2-cap

This is clever because it just uses the address lines as a binary counter trying every combination of inputs and using the 8 output lines as the data bus.  The interesting part comes from the 8 output lines also being able to be configured as input lines.  How do we interrogate something to figure out if it’s an input or an output? In this case we induce a little bus contention and see how the PAL moves.  The theory goes that if the PAL uses a given pin as an output then it will be strongly driven and overcome the address line trying to also drive that pin via the 4.7k resistor.  By going through all possible states of the other pins you will read all possible states of that pin and see no correlation when the only thing that changes is the address line also trying to drive that pin.  If the PAL uses that pin as an input pin then the ‘data’ line will always follow the address pin trying to drive it through the resistor and you will see 100% correlation between the address pin and the data pin.

When we tried this we seemed to see that this pin was always stuck high, regardless of the state of any other pins.  That did not turn into a functional GAL when reinstalled in the arcade board so what happened?

2020-03-03

Those high pulses are downtime between read cycles, the top trace is on the address line, the bottom trace is on the PAL.  It would seem we have built a voltage divider.  It is our guess that based on this trace the PAL has an internal pullup of about 2.7k because the technology the chip is built on is good at pulling down and poor at pulling up.  The issue with that is we are not driving the pin strongly enough to get it to a low logic threshold,  We could change the 4.7k resistors to something a little lower resistance to up our drive strength but what would that do on an output pin? there would actually be bus contention and might that burn something out?

The question here is how do we interrogate the chips without knowing if the pins are inputs or outputs without breaking them?

 

PS: we pulled working JED files from Jammarcade and tested them, they work great.  We managed to get our own working one for the PAL that had all 8 set as outputs, we just couldn’t get any PAL to recognize our inputs through those resistors.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: