First post, by suntac
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
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