cmonkey needed a replacement 315-5224 chip for his Outrun board.
We have a bunch of PLD dumps from an Outrun board but they are untested and are from an unknown source.
The original 315-5224 is a PLS153 and cmonkey needed it in a GAL16V8 in order to replace it.
The equations themselves aren’t too complex and would fit nicely into a GAL16V8 as the extra IO pins on a PLS153 are actually configured as inputs which makes it pin compatible.
Equations:
PIN 13: /ROM_CE = /MREQ & RFSH & RAM_CS & DACS
PIN 14: /RAM_CS = A11 & A12 & A13 & A14 & A15 & /MREQ & RFSH
PIN 15: /YM_CS = /A6 & /A7 & /IOREQ & M1
PIN 16: /DACS = /A11 & A12 & A13 & A14 & A15 & /MREQ & RFSH
PIN 19: /ZCS = A6 & /A7 & /IOREQ & RFSH
The problem came with needing to use the feedback from pin 16 in order for it to work.
When compiling equations for a GAL16V8 you need to specify what mode you want to use it in. There are three modes a GAL can be used in.
1. Simple
2. Complex
3. Registered
The PLS153 cannot be used as a registered device so we cannot use this mode.
‘Complex’ cannot be used as we need to use pin 12 as an input and pin 12 does not provide any feedback in this mode.
‘Simple’ mode is what we need to use but in this mode pins 15 and 16 cannot provide feedback which is exactly what we are wanting.
Looking at the equations and the schematics we can see that pins 17 and 18 are actually unused. These pins can also provide feedback in ‘simple’ mode.
The workaround for a GAL16V8 is to copy the equations for /o16 and add them to /017 then change the equations for /o13 to use feedback from o17 instead of o16, like this:
Equations:
PIN 13: /ROM_CE = /MREQ & RFSH & RAM_CS & DACS2
PIN 14: /RAM_CS = A11 & A12 & A13 & A14 & A15 & /MREQ & RFSH
PIN 15: /YM_CS = /A6 & /A7 & /IOREQ & M1
PIN 16: /DACS1 = /A11 & A12 & A13 & A14 & A15 & /MREQ & RFSH
PIN 17: /DACS2 = /A11 & A12 & A13 & A14 & A15 & /MREQ & RFSH
PIN 19: /ZCS = A6 & /A7 & /IOREQ & RFSH
cmonkey has confirmed this works on his Outrun PCB.
Although this worked well I was not happy with the workaround. The resolution turned out to be simple.
If I took the newly programmed GAL chip and re-dumped it using Charles MacDonald’s hardware I got a list of valid equations that did not rely on the use of feedback at all.
Since the equations were few, it had no problems in fitting into a GAL16V8 and so I ended up with something that left those two unused pins free which is good because cmonkey has a use in mind for them.