So... I tried using the jedutil in mame-tools on the .PLD from the dump, and it absolutely refused to do anything with it, saying "Fatal error: Invalid .JED file". Then I tried JED2EQN.EXE from the ancient DOS OPELJR tool set, and I got this:
Code:
; JED2EQN -- JEDEC file to Boolean Equations disassembler (Version V063)
; Copyright (c) National Semiconductor Corporation 1990-1993
; Disassembled from usb.jed. Date: 5-14-124
;$GALMODE MEDIUM
chip usb GAL16V8
i1=1 i2=2 i3=3 i4=4 i5=5 i6=6 GND=10 /i11=11 o12=12 f13=13 o14=14
o15=15 o16=16 o17=17 o18=18 o19=19 VCC=20
@ues 0000000000000000
@ptd unused
equations
/o19 = vcc
o19.oe = vcc
/o18 = gnd
o18.oe = gnd
/o17 = gnd
o17.oe = gnd
/o16 = gnd
o16.oe = gnd
/o15 = /i2 * /i3 * /i4 * /i5 * /i6 * i11
+ /i2 * /i1 * /i3 * /i4 * /i5 * /i6
o15.oe = vcc
/o14 = gnd
o14.oe = gnd
/f13 = gnd
f13.oe = gnd
o12 = f13
o12.oe = i2 * /i3 * /i4 * /i5 * /i6 * i11
... And this is where it all goes pear shaped, because when you start comparing this with the PDF it becomes pretty clear that they can't be referring to the same circuit. For instance, the schematic shows AEN on pin #9, but this output doesn't have pin nine referenced anywhere. Granted it's possible that this schematic could be wrong, after all, this PCB physically doesn't have a ROM socket and other differences, maybe the GAL *could* still make sense, but... I dunno. I feel like at the least maybe the dump is incomplete or corrupted, and here's why:
A: There are output equations on pin 15, which *is* the chip enable pin for the USB chip, but they're oddly sparse, boiling down to this: Pin 15 is low IF:
pins 2-6 are low AND pin 11 is high, OR
pins 1-6 are low
If we map this onto the schematic we have it would be kind of a disaster, because it would mean the device was enabled whenever either or IOR/IOW was low and the address pattern on the lower ten bits of the bus matched xx0000xx0x. IE, it wouldn't be qualifying on A8 or A9 at all (notice no equations make use of pins 7-8), which means it would be causing clashes all over the place. (Also, I/O really should be qualifying on AEN.)
I'm also a little uncertain what to think of the part of the PDF that says this:
Code:
Q8=INT#
Q8.OE=IOA&A1&!IOR
What it *looks* like to me is they intend for you to be able to read the status of the INT pin from the CH375 pin *manually* (IE, it's not actually connected to an ISA int) by checking the status of data bit 0 on a read of the decoded I/O space that has the A1 bit set high. (IE, when the A1 is low you actually read the CH375 registers, when A1 is high then the tread triggers the output enable on pin 12, connected to the ISA bus data pin, which asserts the state of #INT from the CH375) That does in fact mostly match up with the code in this GAL other than, again, it doesn't seem to be decoding enough address lines?
So... I guess my assesement is this: it looks like the GAL is "programmed" in a way which *resembles* what you'd need to control the board depicted in the schematic minus the ROM functions, but either the dump is bad, the GAL isn't programmed completely correctly, or the board's schematic doesn't match up in some critical ways. If this was inserted into a board with the exact schematic depicted with this exact programming this device would come on for any port address that matches x0xh, which would conflict with... (checking)... the DMA controller at 000h (This seems like a deal breaker), PC game port at 200h, and many possible devices at 300h.
I guess I'm a little hesitant to say for sure the GAL is programmed badly because it's very possible either the dump is bad or the tool to convert it back into equations is, but... I guess a thing you could do is trace the address lines from bus connector to GAL socket and deduce if the schematic actually matches the PCB.
Take this entire analysis with a grain of salt, obviously. A thing making this analysis a bit harder is the "equations" on the PDF aren't really in a standard .PLD format. I mostly use PAL/GALASM which is a "direct" logic representation on the pins, I think this is closer to CUPL but it's just a fragment of it, not the whole thing with proper pin labels.