•  Back 
  •  Hardware 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File
                            The MICROWIRE Interface


The STe and TT030 computers use the MICROWIRE interface to control
volume, mixing of the PSG and DMA output, and tone control. The original
ST is limited to amplitude control through the use of the appropriate PSG
register. The Falcon030 supports new XBIOS calls which allow volume and
mixing control.

The MICROWIRE interface is a write-only device accessed using two
hardware registers 0xFFFF8924 (mask) and 0xFFFF8922 (data). To write
a command to the MICROWIRE you must first place the value 0x07FF into the
mask register and then write the appropriate command to the data register.
The format for the data WORD is shown below:

index=1000
Bits labeled 'x' will be ignored. Bits 9 and 10 should always be %10 to correctly specify the device address which is a constant. Bits labeled 'c' specify the command and bits labeled 'd' contain the appropriate data for the command. The following table explains the valid MICROWIRE commands: Command 'ccc' 'dddddd' Set Master 011 Example Value Result Volume %000000 -80dB Attenuation %010100 -40dB Attenuation %101000 0dB Attenuation (Maximum) Set Left 101 Example Value Result Channel %000000 -40dB Attenuation Volume %001010 -20dB Attenuation %010100 0dB Attenuation (Maximum) Set Right 100 Example Value Result Channel %000000 -40dB Attenuation Volume %001010 -20dB Attenuation %010100 0dB Attenuation (Maximum) Set Treble 010 Example Value Result %000000 -12dB Attenuation %000110 0dB Attenuation %001100 +12dB Attenuation (Maximum) Set Bass 001 Example Value Result %000000 -12dB Attenuation %000110 0dB Attenuation %001100 +12dB Attenuation (Maximum) Set PSG/DMA 000 Example Value Result Mix %000000 -12dB Attenuation %000001 Mix PSG sound output. %000010 Don't Mix PSG sound output. When configuring multiple settings at once, you should program a delay between writes since the MICROWIRE takes at least 16sec to completely read the data register. During a read the MICROWIRE rotates the mask register one bit at a time. You will know a read operation has completed when the mask register returns to 0x07FF. The following assembly segment illustrates this by setting the left and right channel volumes to their maximum values: MWMASK EQU $FFFF8924 MWDATA EQU $FFFF8922 MASKVAL EQU $7FF HIGHLVOL EQU $554 HIGHRVOL EQU $514 .text maxvol: move.w MASKVAL,MWMASK ; First write the mask and data values move.w #HIGHLVOL,MWDATA mwwrite: cmp.w MASKVAL,MWMASK bne.s mwwrite ; loop until MWMASK reaches $7FF again move.w #HIGHRVOL,MWDATA ; ok, safe to write second value rts .end