PARTNO U522 ; NAME U522 ; DATE October 17, 1992 ; REV 0 ; DESIGNER Dave Haynie ; COMPANY Commodore ; ASSEMBLY Nyx ; LOCATION West Chester ; DEVICE g22v10 ; /************************************************************************/ /* */ /* Nyx Floppy Control */ /* */ /* This device controls a number of simple floppy disk interface */ /* functions. */ /* */ /************************************************************************/ /* Allowable Target Device Types: 22V10-15 */ /************************************************************************/ /* Clock: CLKOUT */ /************************************************************************/ /* Free Pins: 10(I),11(I),14(IO),15(IO),20(IO) */ /************************************************************************/ /* HISTORY */ /* DBH Oct 17: Completely new. */ /************************************************************************/ /** INPUTS: **/ PIN 1 = CLK ; /* Input clock, based on CLKOUT */ PIN 2 = !RST ; /* System I/O reset. */ PIN 3 = !SEL0 ; /* Unit 0 unit. */ PIN 4 = !SEL1 ; /* Unit 1 unit. */ PIN 5 = !MTR ; /* Motor enable. */ PIN 6 = !DKWD ; /* Disk write data. */ PIN 7 = DKWE ; /* Disk write enable. */ PIN 8 = ECLK ; /* 6800 clock */ PIN 9 = C7M ; /* 68000 clock */ PIN 13 = DF1EN ; /* Enable the second unit. */ /** OUTPUTS: **/ PIN 16 = !DKWEB ; /* Buffered write enable. */ PIN 17 = !DKWDB ; /* Buffered write data. */ PIN 19 = !RDY ; /* Ready/disk ID */ PIN 21 = !INUSE1 ; /* Unit 1 is in use. */ PIN 22 = !INUSE0 ; /* Unit 0 is in use. */ PIN 23 = CLKOUT ; /* Clock for floppy logic. */ /** USED INTERNALLY: **/ PIN 14 = !SEL0Q ; /* Aged version of SEL0. */ PIN 15 = !SEL1Q ; /* Aged version of SEL1. */ PIN 18 = !IRDY ; /* Internal version of RDY. */ /** INTERMEDIATE TERMS: **/ /** OUTPUT TERMS: **/ /* The disk write data output is simply an open-drain version of the write input. */ DKWDB = 'b'1; DKWDB.OE = DKWD; /* The disk write data enable is an inverted copy of the input version. */ DKWEB = DKWE; /* The RDY signal is another open drain signal. It's asserted when INUSE1 is negated and SEL1 is asserted, only when DF1: is enabled. This is used to generate the DF1: recognition code, for a 1MB floppy. Spare inputs to this device could be used to select the type of floppy and generate different ID codes based on that type. To get the open drain feature, RDY is made from an internal active-drive signal, IRDY. */ IRDY = !INUSE1 & SEL1; RDY = 'b'1; RDY.OE = IRDY & DF1EN; /* In order to perform edge detection on the two SEL lines, which is necessary to generate the INUSE latches, I age each select by one E clock. Selects only change relative to E, so this should be safe. The CLKOUT is therefore set to E here. */ CLKOUT = ECLK; SEL0Q.D = SEL0; SEL1Q.D = SEL1; /* The inuse signals simulate two D-type flip-flops, which clock in the MTR signal based on high-to-low transitions of their respective select (eg, select going asserted). They're also asynchronously negated on RST. */ INUSE0 = !RST & MTR & SEL0 & !SEL0Q # !RST & INUSE0 & !SEL0 # !RST & INUSE0 & SEL0Q; INUSE1 = !RST & MTR & SEL1 & !SEL1Q # !RST & INUSE1 & !SEL1 # !RST & INUSE0 & SEL1Q;