Author Topic: PAL18L8....Help please !  (Read 7819 times)

0 Members and 1 Guest are viewing this topic.

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: PAL18L8....Help please !
« Reply #25 on: February 19, 2019, 06:55:35 pm »
The trace coes/comes from pin 2 of the LS374, and it is the only XA line that connects to this PAL chip. All of the XA lines have a pull-u resistor connected to 5V.
All the XA traces go from the ROM adress I think to the LS374 pins labeled as "1Q...2Q..."

Anyway, this is consistent with the assumption that the XA0 PAL pin needs to be configured as an input as well. (You can't have two outputs fighting over the definition of the same signal line.) And this is also consistent with the partial analysis of the PAL logic in the PDF which I linked to in an earlier post.

Hence, if the decompilation by up8051 worked out correctly, that would unfortunately suggest that we have the wrong JEDEC file here.
It's certainly not a perfect match, but may not be a complete dud.
Can you check if anyone has used this PLD in a working system ? Can you find any other PLD that is a closer fit ?
Where did this PLD come from, and how did they derive the code ?

Looking at the wiring, it looks like LS374.OEN = A15, so it will float (pull-up) when A15=HI

You could need to add code XA.OE = A15, which would safely swap drive on the XA line between LS374 and PAL.
Then
/XA0 = A15 * /A14
will be driven low by PAL, only when A15 = Hi and A14=low.
Does that make sense in the memory map ?



 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6503
  • Country: de
Re: PAL18L8....Help please !
« Reply #26 on: February 19, 2019, 07:21:55 pm »
It's certainly not a perfect match, but may not be a complete dud.
Can you check if anyone has used this PLD in a working system ? Can you find any other PLD that is a closer fit ?
Where did this PLD come from, and how did they derive the code ?

Looking at the wiring, it looks like LS374.OEN = A15, so it will float (pull-up) when A15=HI
You could need to add code XA.OE = A15, which would safely swap drive on the XA line between LS374 and PAL.

I would not poke around in the dark, trying to modify the GAL code.

Look at the PDF which I linked to in reply #9 above:
https://www.researchgate.net/publication/291338452_Hacking_a_Sega_Whitestar_Pinball
Someone has reverse-engineered the PAL by actually measuring its behaviour (but seems to have missed an output or two, unfortunately). Looking at his results on page 9, there are further differences: e.g. the outputs are all tri-state, enabled via the /E input.

I see two possibilities:
  • The JEDEC file is just right, and up8051's decompilation is giving wrong results, or
  • the JEDEC file is quite different from what is needed, in which case it is best to look for the correct one.
While I don't have a GAL decompiler to verify, it just occurs to me that I could try to re-compile up8051's reconstructed source file and compare the JEDECs. I will give that a try.


EDIT: I just tried to decompile the JEDEC with JED2EQN from Nat Semi's old OPAL suite (http://www.brouhaha.com/~eric/retrocomputing/mmi/palasm/). Looks like I get the same result which up8051 posted earlier. Hence, more likely than not, the JEDEC file is just plain wrong.

You could still try to program a GAL with the JEDEC code, but I would not have high hopes that it works in the flipper. As a fallback, you could try merging the information from the PDF I had linked to (which seems to have plausible equations for everyting but the SNDSTRB) with the SNDSTRB equation reverse-engineered from the JEDEC?
« Last Edit: February 19, 2019, 07:56:14 pm by ebastler »
 

Offline powerchisperTopic starter

  • Contributor
  • Posts: 17
  • Country: es
Re: PAL18L8....Help please !
« Reply #27 on: February 23, 2019, 07:47:30 am »
I found these elsewhere in the internet :
 
GAL16V8
U213

A15  A14   A13 /E     Q   VMA RW     A11    A12    GND
MPIN IOSTB XA0 SNDSTB A10 A9  IOPORT /RAMCS /ROMCS VCC
/ROMCS.T = A15 + A14 + IOPORT
/ROMCS.E = /E
RAMCS.T = A15 + A14 + A13 + A12 * A11 * A10 * A9 * /RW * /MPIN
/RAMCS.E = /E
IOPORT.T = A15 + A14 + /A13 + A12 + A11 + XA0
IOPORT.E = /E
IOSTB.T = /A15 * /A14 * A13 * /A11
IOSTB.E = /E
DESCRIPTION:
Sega Whitestar Pinball
U213 (Address space decoding)

This is not JED file, but I think these are the equations to generate that.

Is there any kind of software for doing this ?

Thank you very much.

 

Offline up8051

  • Frequent Contributor
  • **
  • Posts: 288
  • Country: pl
Re: PAL18L8....Help please !
« Reply #28 on: February 23, 2019, 09:04:16 am »
Equations are rather flawed:
- inputs VMA, and Q not used
- no equations for SNDSTB
- outputs as three-state.

In what condition is the original chip (U213)?
 

Offline powerchisperTopic starter

  • Contributor
  • Posts: 17
  • Country: es
Re: PAL18L8....Help please !
« Reply #29 on: February 23, 2019, 03:50:43 pm »
I had to desolder it, because of all the damaged traces underneath it.
The numers on the IC are all erased , the pins tarnished by alkaline corrosion.
I had to clean the pins with a nail polisher, even after desoldering.
I am also afraid that, if it wasn't in a good shape when I first got the board, I could have damaged even more when desoldering.

So...I see in the link above that the guy  did the equation by connecting that to an arduino and running some code on it.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: PAL18L8....Help please !
« Reply #30 on: February 24, 2019, 03:48:16 am »

This is not JED file, but I think these are the equations to generate that.

Is there any kind of software for doing this ?
Yes, download Atmel WinCUPL - it will produce JED files from boolean equations
You need to use valid equations for the part, and .oe and ,clk terms are inferred on some small SPLDs
Usual Flop is a .D extension, but you can use .T if you tell CUPL to build that from a .D-FF which is inside the part. (register_select fwir)

WinCUPL can also create simulate vectors, which you can run on the original part and the programmed copy, to check they react the same.
The tricky part is getting 100% test coverage of the original part.

So...I see in the link above that the guy  did the equation by connecting that to an arduino and running some code on it.
If the part is async only, (no registers) a simple memory-like scan can give 100% coverage.
If it includes registers, you need to consider the register state too.
 

Offline Hamster

  • Regular Contributor
  • *
  • Posts: 116
  • Country: us
Re: PAL18L8....Help please !
« Reply #31 on: April 12, 2021, 05:56:08 pm »
Hi friends.

Thank you for your support.
After days of reserach  I finally found this code somewhere in the net.

CUPL(WM) 5.0a Serial# 60008009
Device g16v8ma Library DLIB-h-40-8
Created Wed Aug 17 22:46:52 2011
Name U213
Partno U213
Revision
Date 16/08/2011
Designer
Company Data East / Sega / Stern
Assembly
Location
*QP20
*QF2194
*G0
*F0
*L00000 11111111111111111111111111111111
*L00032 11011111101111110111011111111111
*L00064 01111111101111110111011111111111
*L00256 11111111111111111111111111111111
*L00288 10101011101111110110111111111111
*L00320 10101011101111100111111111111111
*L00352 10101011101111110111011111111111
*L00384 10101011101111110111111110111111
*L00416 10101011101111110111111111111011
*L00448 10101011101111110111111111111101
*L00512 11111111111111111111111111111111
*L00544 10100111101111110110111110111011
*L00576 10100111111101110110111110111011
*L01280 11111111111111111111111111111111
*L01312 10100111101110110110101101110111
*L01536 11111111111111111111111111111111
*L01568 10011111111111111111111111111111
*L01792 11111111111111111111111111111111
*L01824 10100111101101110111111110111111
*L01856 10100111101111110111011110111111
*L02048 00000000010101010011001000110001
*L02080 00110011001000000000000000000000
*L02112 00000000111111111111111111111111
*L02144 11111111111111111111111111111111
*L02176 111111111111111111
*C5753
*0F11

They say  I have to write this to a new GAL16V8 as a substitute for the PAL chip.
Do I have to use as a text or convert to some kind of files ?
Maybe I can get the burning device borrowed from a friend.

I just tested this, it appears to work...
Arcade Board Repair Guru.  [ twitch: HammysHangout , youTube: Hammy Builds ]
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf