VOGONS

Common searches


First post, by suntac

User metadata
Rank Member
Rank
Member

Hi friends!

This code is fully compatible with all revisions of Sound Blaster 2.0, including those with the CT1336A bus interface chip.
My investment into the hardware has already returned via eBay, and thus I am hereby releasing these GAL equations into the public domain.
Also, let me congratulate to scorp who has also resolved one of the issues with CT1336A all by himself.

Cheers,
Rado

cms.png
Filename
cms.png
File size
66.56 KiB
Views
4781 views
File comment
C/MS Upgrade Equations
File license
Fair use/fair dealing exception
CHIP SB20CMS 16V8

; Author: suntac at Vogons (Rado M.)
; Version: 2.0
; Date: 22nd December 2018
;
; Description: * fixes issues with the OPL2 and the digital part when used together with the CT1336A BIC
; * improves handling of the reset signal
; * resolves D-type flip-flop timing hazard
; * adds support for disabling the ISA IOCHRDY functionality

/cms1_or_opl=1 /cms2_or_x=2 /cms=3 u14_q2=4 /wr=5 /reset=6 _gnd7=7 _gnd8=8 /ena_iochrdy=9 gnd=10
/u5_u8_dtack=11 nc12=12 iochrdy=13 /u17_cs=14 /u8_cs=15 /u5_cs=16 /u14_set2=17
u14_d2=18 u14_clk2=19 vcc=20

EQUATIONS

; note that pins 7, 8 and 9 are tied to gnd on the PAL socket

; cms1_or_opl = 1 for addresses 2X0h, 2X8h and 388h
; cms2_or_x = 1 for addresses 2X2h and 2X8h
; cms = 1 for addresses 2X0h and 2X2h

; 2X0h = cms * cms1_or_opl
; 2X2h = cms * cms2_or_x
; 2X8h & 388h = /cms * cms1_or_opl

; CMSOFF jumper bridges /cms1_or_opl and /u17_cs (pin 14)

; alternative 1 - default for most boards with CT1336 and CT1336A
u5_cs = cms * cms1_or_opl * /reset ; CS for first SAA1099P (2X0h-2X1h)
u8_cs = cms * cms2_or_x * /reset ; CS for second SAA1099P (2X2h-2X3h)

; alternative 2 - use only for rare boards with grounded pins 1 of U5/U8
;u5_cs = wr * cms * cms1_or_opl * /reset ; CS for first SAA1099P (2X0h-2X1h)
;u8_cs = wr * cms * cms2_or_x * /reset ; CS for second SAA1099P (2X2h-2X3h)

u17_cs = /u5_u8_dtack * /cms * cms1_or_opl * /reset ; CS for YM3812

/u14_d2 = cms * cms1_or_opl + cms * cms2_or_x ; 74LS74.D[2]
u14_clk2 = wr ; 74LS74.CLK[2]
u14_set2 = u5_u8_dtack + reset ; 74LS74.SET[2]

iochrdy.oe = /u14_q2 * ena_iochrdy * /reset
iochrdy = gnd ; IOCHRDY tristated
Last edited by suntac on 2019-04-23, 08:07. Edited 3 times in total.

Reply 1 of 42, by keropi

User metadata
Rank l33t++
Rank
l33t++

Thanks for sharing Rado! Excellent work !
In my book you deserved all that ebay support and more!

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 3 of 42, by badmojo

User metadata
Rank l33t
Rank
l33t
keropi wrote:

In my book you deserved all that ebay support and more!

+1

Well done solving the problem in the first place and now sharing your hard work with the community 😎

Life? Don't talk to me about life.

Reply 4 of 42, by HanJammer

User metadata
Rank Oldbie
Rank
Oldbie

I've tried older PAL 'code' (the one incompatible with CT1336A) and this one - but no success.
I converted equations to JED file using EQN2JED. Burned GAL16V8, installed in my CT1350B.
When I start the computer - it will beep like no video card is present and screen is full of colorful cr*p.
Same behaviour in both my CT1350Bs (Rev4 and Rev2) with both PAL 'codes'.

PAL was programmed with TL866II (older 'code' was encrypted while the newer - not encrypted).

It has to be connected to PAL itself - with PAL removed (not touching SAAs or CMSOFF jumper) everything works fine.

Any suggestions?

New items (October/November 2022) -> My Items for Sale
I8v8PGb.jpg

Reply 6 of 42, by HanJammer

User metadata
Rank Oldbie
Rank
Oldbie
suntac wrote:

Was the CMSOFF jumper removed when the GAL was in its socket?
What do you mean by 'encrypted' code?

Yeah, jumper was removed. It doesn't really matter if jumper is on or off - it won't boot when GAL is in it's socket.

Encrypted mode:

tl866gal.png
Filename
tl866gal.png
File size
86.75 KiB
Views
4785 views
File license
Fair use/fair dealing exception

Apparently when I will leave it checked - programmer will no longer be able to read from the GAL (for verification etc) - when I uncheck it - it will verify the chip with no problems.

New items (October/November 2022) -> My Items for Sale
I8v8PGb.jpg

Reply 7 of 42, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

try different GAL brand. Some programmers like Lattice more than NatSemi etc, some like National.. Often trying different brand helps! (sounds crazy, but its true)

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 8 of 42, by HanJammer

User metadata
Rank Oldbie
Rank
Oldbie
BloodyCactus wrote:

try different GAL brand. Some programmers like Lattice more than NatSemi etc, some like National.. Often trying different brand helps! (sounds crazy, but its true)

The ones I have are Lattice GAL16V8-15LP... Does it matter if it's -15LP or -20LNC or -25QB1 - because those are any other I can source quickly enough...

New items (October/November 2022) -> My Items for Sale
I8v8PGb.jpg

Reply 9 of 42, by suntac

User metadata
Rank Member
Rank
Member
HanJammer wrote:

Apparently when I will leave it checked - programmer will no longer be able to read from the GAL (for verification etc) - when I uncheck it - it will verify the chip with no problems.

The old free equations should work with all card revisions. The only problem would be with the FM and the digital part on cards with CT1336A. My equations work also with all card revisions and without that problem.

Many Chinese vendors sell GAL16V8B remarked as GAL16V8D. Professional chip programmers perform such checks, but I am not sure whether yours does too. You may try choosing GAL16V8B instead of GAL16V8.
I have positive experience with Lattice GAL16V8B and with Atmel ATF16V8CZ chips.

Reply 10 of 42, by suntac

User metadata
Rank Member
Rank
Member
HanJammer wrote:
BloodyCactus wrote:

try different GAL brand. Some programmers like Lattice more than NatSemi etc, some like National.. Often trying different brand helps! (sounds crazy, but its true)

The ones I have are Lattice GAL16V8-15LP... Does it matter if it's -15LP or -20LNC or -25QB1 - because those are any other I can source quickly enough...

I see no reason why -25 shouldn't work too.
You may send me the .JED file you created and I will test it in my setup.

Reply 11 of 42, by HanJammer

User metadata
Rank Oldbie
Rank
Oldbie
suntac wrote:
HanJammer wrote:
BloodyCactus wrote:

try different GAL brand. Some programmers like Lattice more than NatSemi etc, some like National.. Often trying different brand helps! (sounds crazy, but its true)

The ones I have are Lattice GAL16V8-15LP... Does it matter if it's -15LP or -20LNC or -25QB1 - because those are any other I can source quickly enough...

I see no reason why -25 shouldn't work too.
You may send me the .JED file you created and I will test it in my setup.

JED file: https://mega.nz/#!hYEihSAY!fcyhoVGlhlSLmES_Nn … BASQydeDKQOjkh0

I will try burning GAL16V8B.

New items (October/November 2022) -> My Items for Sale
I8v8PGb.jpg

Reply 12 of 42, by suntac

User metadata
Rank Member
Rank
Member
HanJammer wrote:

The .JED file is OK.
Btw, I've slightly updated the code for u5_cs and u8_cs in my first post, but that shouldn't have any effect in your case.

Reply 14 of 42, by HanJammer

User metadata
Rank Oldbie
Rank
Oldbie
suntac wrote:

There must be some issue with your programmer, its settings or the chip type used.

Programmer settings are OK (all other chips I program - like EPROMS - work fine).
Only settings I can change for GAL are Programming voltage (set to 16V) and Encryption (I don't know if I should leave it enabled or disable it, but in two previous attempts it didn't matter - result was the same).

New items (October/November 2022) -> My Items for Sale
I8v8PGb.jpg

Reply 15 of 42, by suntac

User metadata
Rank Member
Rank
Member
HanJammer wrote:
suntac wrote:

There must be some issue with your programmer, its settings or the chip type used.

Programmer settings are OK (all other chips I program - like EPROMS - work fine).
Only settings I can change for GAL are Programming voltage (set to 16V) and Encryption (I don't know if I should leave it enabled or disable it, but in two previous attempts it didn't matter - result was the same).

My programmer, an old Elnec BeeProg, works correctly.
However, I must program the device (GAL or ATF) in two passes. First time without security fuse and finally just to set the fuse, without prior erasing. Now, when the equations are free, there is no point in protecting the GALs against reading.

Reply 16 of 42, by keropi

User metadata
Rank l33t++
Rank
l33t++

I have programmed many GALs with a TL866CS - without changing any of it's defaults and unless the IC is damaged then it works.
My guess is that HanJammer has some bad ICs ...

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 17 of 42, by HanJammer

User metadata
Rank Oldbie
Rank
Oldbie
keropi wrote:

I have programmed many GALs with a TL866CS - without changing any of it's defaults and unless the IC is damaged then it works.
My guess is that HanJammer has some bad ICs ...

ICs in the programmer?

Well, it's a new unit, and works without any problems with EPROMs…

Edit: Also I lied - there are additional options to set during programming "CODE Memory" and "LOCK Bit" - whatever it means… I'm leaving them on default (enabled)...

tl866gal2.png
Filename
tl866gal2.png
File size
10.33 KiB
Views
4743 views
File license
Fair use/fair dealing exception

Also I didn't expected GALs tro be reprogrammable (I thought they are OTP)… so I will play with them some more tomorrow...

New items (October/November 2022) -> My Items for Sale
I8v8PGb.jpg

Reply 18 of 42, by HanJammer

User metadata
Rank Oldbie
Rank
Oldbie
suntac wrote:

Many Chinese vendors sell GAL16V8B remarked as GAL16V8D. Professional chip programmers perform such checks, but I am not sure whether yours does too. You may try choosing GAL16V8B instead of GAL16V8.
I have positive experience with Lattice GAL16V8B and with Atmel ATF16V8CZ chips.

Good news! Setting programmer to GAL16V8B solved the problem! Chips I have are marked as Lattice GAL16V8 BTW...

So CMS now works like charm on my SB2.0.

Thanks for your great work!

New items (October/November 2022) -> My Items for Sale
I8v8PGb.jpg