April 4, 1988 To: Doug Renn Subj: Sound Modifications to the ST MCU/GLUE Combo Chip cc: Shiraz Shivji, Jim Tittsler Modifications are being made to the ST combo MCU/GLUE chip to add a video refresh type DMA channel. This channel is to be used to provide a data stream from memory to a port for generation of sound. Access to memory can occur during the video/refresh time slots falling in the horizontal blanking interval. Unused time slots will be RAS only memory refreshes. During the active portion of the horizontal line, video refreshes will occur as in the present design. The modified design distinguishes between horizontal blanking and composite blanking. Sound and RAS only refreshes take place only during horizontal blanking. In the vertical blanking interval when horizontal blanking is not active, memory will be idle. The modifications include several new registers, an address counter, and three new pins. The memory address mux has also been restructured which will change the MAD ouputs from the present ST. This should be transparent to the system unless users are connecting devices to the MAD lines. The new registers have been added in the FF89XX page as follows: FF8901 sound control two bit read/write SCNTL bit 0 = 0 sound refresh disabled (reset state) bit 0 = 1 sound enabled bit 1 = 0 sound refresh disabled at the end of the current frame bit 1 = 1 frame repeats bit 2,3 reserved bit 4-7 not used The SCNTL register can be read or written any time. When sound is in progress, writing a zero to bit 0 will stop the DMA immediately. Bit 1 can be written low during sound to terminate at the end of the current frame. When the end of the frame is reached and bit 1 is low, bit 0 is reset to zero. FF8903 frame base addr high read/write FF8905 " " " middle " FF8907 " " " low " The frame base is the address of the first word of the data in memory. FF8909 frame count addr high read only FF890B " " " middle " FF890D " " " low " The frame count is the current value of the sound address counter. FF890F frame top addr high read/write FF8911 " " " middle " FF8913 " " " low " The frame top is the address of the first free word after the data. The frame base and top registers can be written at any time. Their values only have effect at frame boundaries. A frame boundary occurs when the sound address counter value equals the value in the frame top register. When SCNTL bit 0 is low (sound off), the logic is held in a frame boundary condition so that values written to the frame base and top registers before sound is enabled are effective immediately. Three new signal pins have been added. XSRQ sound refresh request (active low) This pin must be low for sound refresh cycles to occur. (NOTE: Care should be taken that XSRQ is not held low indefinately since normal refresh takes place only when XSRQ is high.) SLOADB sound data strobe (active low) The sound port should latch the memory data on the rising edge of SLOADB. SINT sound interrupt (active high) This pin will go high for 480ns following the detection of a frame boundary. (NOTE: In the case where two successive sound refreshes are requested and a frame boundary occurs between them, the second refresh, which is the first of the next frame, will take place while SINT is high.) Modes of operation: The simplest operating mode uses a single frame of data in memory. The base and top pointers are loaded and the SCNTL register loaded with 01h to play the frame one time. Loading SCNTL with 03h will play the frame repeatedly. With a frame playing repeatedly, writing a 01h to the SCNTL register will cause resfresh to cease at the end of the frame in progress. If SCNTL was written to 00h while a frame was in progress, refresh would stop immediately in mid frame. The frame base and top registers can be written to new values during a frame. In this case, the new base will be loaded into the address at the next frame boundary (ie. the end of the current frame). The new top address will not effect the detection of the current frame boundary. The net effect is to produce a data stream as if the two frames had been contiguous in memory. John