Home XBIOS Interface programming Special commands

4.17 Sound routines

The following routines for sound programming are available on the Falcon030:

buffoper Sets record/playback mode.
buffptr Gets record/playback mode.
devconnect Connects audio subsystem components.
dsptristate Coordinates external DSP hardware.
gpio Communication via the external DSP port.
locksnd Locks sound system for other applications.
setbuffer Sets record/playback buffer addresses.
setinterrupt Sets interrupt at the end of recording/playback.
setmode Selects record/playback mode.
setmontracks Sets playback track for internal loudspeaker.
settracks Sets number of record and playback tracks.
sndstatus Gets status of the A/D and D/A converter.
soundcmd Sets/gets the parameters of the A/D and D/A converter.
StarTrack XBIOS extension for the StarTrack card.
unlocksnd Frees sound system for other applications.
WavePlay Replays a sample.

Note: The availability of these routines on other computer systems can be ascertained via the McSn-Cookie or the _SND cookie.

4.17.1 buffoper

Name: »buffoper« - Set or read record/playback mode
Opcode: 136
Syntax: int32_t buffoper( int16_t mode );
Description: The XBIOS routine buffoper sets or reads the record and playback mode of the harware sound system.

If the value -1 is passed for mode, then the current setting will be established. Otherwise mode is coded as follows:
Bit Operation
0 DMA sound playback
1 Loop playback of sound currently playing
2 DMA sound recording
1 Loop recording within the currently set record
  buffer (as set by Buffptr)

Set bits switch an operation on, cleared bits off.
Return value: If successfull the function returns the value 0. If -1 was passed for mode, the return will show the current state of the sound system, whose coding corresponds to the parameter mode.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffptr   devconnect   dsptristate   gpio   locksnd   setbuffer   setinterrupt   setmontracks   setmode   settracks   sndstatus   soundcmd   unlocksnd

4.17.1.1 Bindings for buffoper

C: #include <tos.h>

int32_t buffoper( int16_t mode );
Assembler:
move.w    mode,-(sp)   ; Offset 2
move.w    #136,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.2 buffptr

Name: »buffptr« - Get current record/playback mode
Opcode: 141
Syntax: int32_t buffptr( int32_t *ptr );
Description: The XBIOS routine buffptr ascertains the current playback and record positions in the corresponding buffers.

ptr points to a buffer at least 4 longwords in size. The position pointers will be stored in that. The first int32_t of the buffer contains a pointer to the current playback position and the second int32_t a pointer to the current record position.
Return value: If successful the function returns the value 0, or non-zero otherwise.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   devconnect   dsptristate   gpio   locksnd   setbuffer   setinterrupt   setmontracks   setmode   settracks   sndstatus   soundcmd   unlocksnd

4.17.2.1 Bindings for buffptr

C: #include <tos.h>

int32_t buffptr( int32_t *ptr );
Assembler:
pea       ptr          ; Offset 2
move.w    #141,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.3 devconnect

Name: »devconnect« - Connect audio subsystem components
Opcode: 139
Syntax: int32_t devconnect( int16_t src, int16_t dst, int16_t srcclk, int16_t prescale, int16_t protocol );
Description: The XBIOS routine devconnect connects a source component in the audio subsystem to one or more destination components using the connection matrix.
Parameter Meaning
src Source component:
  0 DMA output
  1 DSP output
  2 External input channel
  3 A/D converter - microphone
   
dst Bit vector of the destination component:
  Bit 0 DMA input (for recording)
  Bit 1 DSP input receiving
  Bit 2 External output channel
  Bit 3 D/A converter/loudspeaker or phones
   
srcclk Clock for the source components:
  0 Internal 25.175 MHz clock
  1 External clock
     For MilanBlaster the external clock is
     24.576 MHz when gpio(1,0) & 0x1l == 1l
     and 22.5792 MHz when gpio(1,0) &
     0x1l == 0l
  2 Internal 32 MHz clock
   
prescale Clock prescaler. The sample rate is the
  result of the clock divided by 256 and
  divided by prescaler + 1. The values for
  the prescaler range from 0 to 11.
  If 0 is passed to the prescaler, then the
  mode will be switched to STE compatibility
   
protocol If 0 is passed, transmission will be
  with handshaking, with 1 there is no
  handshaking.
Return value: The function returns the value 0 if the operation was successfull, or non-zero otherwise.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   buffptr   dsptristate   gpio   locksnd   setbuffer   setinterrupt   setmontracks   setmode   settracks   sndstatus   soundcmd   unlocksnd

4.17.3.1 Bindings for devconnect

C: #include <tos.h>

int32_t devconnect( int16_t src, int16_t dst, int16_t srcclk, int16_t prescale, int16_t protocol );
Assembler:
move.w    protocol,-(sp)  ; Offset 10
move.w    prescale,-(sp)  ; Offset  8
move.w    srcclk,-(sp)    ; Offset  6
move.w    dst,-(sp)       ; Offset  4
move.w    src,-(sp)       ; Offset  2
move.w    #139,-(sp)      ; Offset  0
trap      #14             ; Call XBIOS
lea       $C(sp),sp       ; Correct stack

4.17.4 dsptristate

Name: »dsptristate« - Coordinate external DSP hardware
Opcode: 137
Syntax: int32_t dsptristate( int16_t dspxmit, int16_t dsprec );
Description: The XBIOS routine dsptristate uncouples connections from the multiplexer connection matrix when external hardware is connected to the SSI port of the DSP.
Parameter Meaning
dspxmit The value 0 disconnects the multiplexer from the corresponding connection, while 1 permits the connection.
dsprec The value 0 disconnects the multiplexer from the corresponding connection, while 1 permits the connection.
Return value: The function returns the value 0 if the operation was successfull, or non-zero otherwise.
Availability: The function is only available on computers of the Falcon series.
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   gpio   locksnd   setbuffer   setinterrupt   setmontracks   setmode   settracks   sndstatus   soundcmd   unlocksnd

4.17.4.1 Bindings for dsptristate

C: #include <tos.h>

int32_t dsptristate( int16_t dspxmit, int16_t dsprec );
Assembler:
move.w    dsprec,-(sp)   ; Offset 4
move.w    dspxmit,-(sp)  ; Offset 2
move.w    #137,-(sp)     ; Offset 0
trap      #14            ; Call XBIOS
addq.l    #6,sp          ; Correct stack

4.17.5 gpio

Name: »gpio« - Communication via the external DSP port
Opcode: 138
Syntax: int32_t gpio( int16_t mode, int16_t data );
Description: The XBIOS routine gpio serves for communication via the general purpose pins of the external DSP connector.
mode Meaning
0 Setting the input/output direction. The lower three bits of data represent the general purpose pins. A set bit represents an output pin and a cleared bit an input pin.
1 Read the three general purpose pins. Their state will be returned in the lower three bits of the returned value. data is ignored.
2 Write the lower three bits of data to the corresponding general purpose pins. Afterwards the parameter data holds the new state of the general purpose pins.
Return value: If successful, the function returns the value 0. If the parameter data had the value 1, one obtains the state of the general purpose pins.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   dsptristate   locksnd   setbuffer   setinterrupt   setmontracks   setmode   settracks   sndstatus   soundcmd   unlocksnd

4.17.5.1 Bindings for gpio

C: #include <tos.h>

int32_t gpio( int16_t mode, int16_t data );
Assembler:
move.w    data,-(sp)   ; Offset 4
move.w    mode,-(sp)   ; Offset 2
move.w    #138,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.6 locksnd

Name: »locksnd« - Lock sound system for other applications
Opcode: 128
Syntax: int32_t locksnd( void );
Description: The XBIOS routine locksnd locks the sound system to prevent it being used by other applications at the same time.
Return value: If successful, the function returns the value 1. If the sound system is already assigned then a negative value will be returned.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   dsptristate   gpio   setbuffer   setinterrupt   setmontracks   setmode   settracks   sndstatus   soundcmd   unlocksnd

4.17.6.1 Bindings for locksnd

C: #include <tos.h>

int32_t locksnd( void );
Assembler:
move.w    #128,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #2,sp        ; Correct stack

4.17.7 setbuffer

Name: »setbuffer« - Set record/playback buffer addresses
Opcode: 131
Syntax: int32_t setbuffer( int16_t reg, void *begaddr, void *endaddr );
Description: The XBIOS routine setbuffer sets the buffer address for the playback (reg = 0) or record data (reg = 1). The parameter begaddr points to the start of the buffer and endaddr to the last byte + 1 of the buffer.

Note: The memory has to be reserved with the Gemdos function Mxalloc(size, 0).
Return value: DIf successful the function returns the value 0, or non-zero otherwise.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   dsptristate   gpio   locksnd   setinterrupt   setmontracks   setmode   settracks   sndstatus   soundcmd   unlocksnd

4.17.7.1 Bindings for setbuffer

C: #include <tos.h>

int32_t setbuffer( int16_t reg, void *begaddr, void *endaddr );
Assembler:
pea       endaddr      ; Offset 8
pea       begaddr      ; Offset 4
move.w    reg,-(sp)    ; Offset 2
move.w    #131,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
lea       $C(sp),sp    ; Correct stack

4.17.8 setinterrupt

Name: »setinterrupt« - Set interrupt at the end of recording/playback
Opcode: 135
Syntax: int32_t setinterrupt( int16_t src_inter, int16_t cause );
Description: The XBIOS routine setinterrupt determines which interrupt is to be generated by the sound system when the end of a recording or playback buffer is reached.
src_inter Meaning
   
0 Timer A interrupt
1 MFP interrupt 7
cause Meaning
   
0 No interrupt
1 Interrupt at end of playback buffer
2 Interrupt at end of record buffer
3 Interrupt at end of both buffers
Return value: If successful the function returns the value 0, or non-zero otherwise.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   dsptristate   gpio   locksnd   setbuffer   setmontracks   setmode   settracks   sndstatus   soundcmd   unlocksnd

4.17.8.1 Bindings for setinterrupt

C: #include <tos.h>

int32_t setinterrupt( int16_t src_inter, int16_t cause );
Assembler:
move.w    cause,-(sp)      ; Offset 4
move.w    src_inter,-(sp)  ; Offset 2
move.w    #135,-(sp)       ; Offset 0
trap      #14              ; Call XBIOS
addq.l    #6,sp            ; Correct stack

4.17.9 setmode

Name: »setmode« - Select record/playback mode
Opcode: 132
Syntax: int32_t setmode( int16_t mode );
Description: The XBIOS routine setmode sets the mode of operation of the record and playback registers.
mode Meaning
0  8 Bit stereo
1 16 Bit stereo
2  8 Bit mono

If bit 5 of the '_SND' cookie is set, there may be further modes available that set playback and record modes separately in the low and high byte of mode. If the value of -1 is passed for mode, then the current setting will be returned without change.

0x0003 16 Bit mono playback
0x0004 24 Bit stereo playback
0x0005 32 Bit stereo playback
0x0006 24 Bit mono playback
0x0007 32 Bit mono playback


0x0000 16 Bit stereo record
0x0100  8 Bit stereo record
0x0200  8 Bit mono record
0x0300 16 Bit mono record
0x0400 24 Bit stereo record
0x0500 32 Bit stereo record
0x0600 24 Bit mono record
0x0700 32 Bit mono record

Return value: If successful the function returns the value 0, or non-zero otherwise.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   dsptristate   gpio   locksnd   setbuffer   setinterrupt   setmontracks   settracks   sndstatus   soundcmd   unlocksnd

4.17.9.1 Bindings for setmode

C: #include <tos.h>

int32_t setmode( int16_t mode );
Assembler:
move.w    mode,-(sp)   ; Offset 2
move.w    #132,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.10 setmontracks

Name: »setmontracks« - Set playback track for internal loudspeaker
Opcode: 134
Syntax: int32_t setmontracks( int16_t montrack );
Description: The XBIOS routine setmontracks specifies which track should be output via the internal loudspeaker. This can only play back one track at a time.

montrack determines one of the four available tracks to monitor, which are numbered from 0 to 3.
Return value: If successful the function returns the value 0, or non-zero otherwise.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   dsptristate   gpio   locksnd   setbuffer   setinterrupt   setmode   settracks   sndstatus   soundcmd   unlocksnd

4.17.10.1 Bindings for setmontracks

C: #include <tos.h>

int32_t setmontracks( int16_t montrack );
Assembler:
move.w    montrack,-(sp)  ; Offset 2
move.w    #134,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
addq.l    #4,sp           ; Correct stack

4.17.11 settracks

Name: »settracks« - Set number of record and playback tracks
Opcode: 133
Syntax: int32_t settracks( int16_t playtracks, int16_t rectracks );
Description: The XBIOS routine settracks sets the number of the recording (rectracks) and playback tracks (playtracks). A maximum of 4 stereo tracks is available at a time. The value -1 is passed as the argument!
Return value: If successful the function returns the value 0, or non-zero otherwise.
Availability: The function is only available on computers of the Falcon series.
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   dsptristate   gpio   locksnd   setbuffer   setinterrupt   setmontracks   setmode   sndstatus   soundcmd   unlocksnd

4.17.11.1 Bindings for settracks

C: #include <tos.h>

int32_t settracks( int16_t playtracks, int16_t rectracks );
Assembler:
move.w    rectracks,-(sp)   ; Offset 4
move.w    playtracks,-(sp)  ; Offset 2
move.w    #133,-(sp)        ; Offset 0
trap      #14               ; Call XBIOS
addq.l    #6,sp             ; Correct stack

4.17.12 sndstatus

Name: »sndstatus« - Get status of the A/D and D/A converter
Opcode: 140
Syntax: int32_t sndstatus( int16_t reset );
Description: The XBIOS routine sndstatus obtains the current status of the A/D and D/A converter. It can also reinitialize it.

If reset has the value 1, the A/D and D/A converter will be reinitialized (among others, the overflow bits will be cleared). Otherwise the current status will be obtained.

If bit 5 in the '_SND' cookie is set, some other status queries are available:
reset  Function
       return value

 2     Inquire bit-depth
        Bit  0 set: 8Bit
        Bit  1 set: 16Bit
        Bit  2 set: 24Bit
        Bit  3 set: 32Bit

 3     Inquire available inputs for MasterMix output
        Bit  0 set: A/D converter (ADC-InMix bypass)
        Bit  1 set: D/A converter (DAC/Multiplexer)
        Bit  2 set: Mic
        Bit  3 set: FM generator
        Bit  4 set: Line
        Bit  5 set: CD
        Bit  6 set: TV
        Bit  7 set: Aux1

 4     Inquire available inputs for A/D converter
        Bit  0 set: Mic right
        Bit  1 set: Mic left
        Bit  2 set: FM generator right
        Bit  3 set: FM generator left
        Bit  4 set: Line right
        Bit  5 set: Line left
        Bit  6 set: CD right
        Bit  7 set: CD left
        Bit  8 set: TV right
        Bit  9 set: TV left
        Bit 10 set: Aux1 right
        Bit 11 set: Aux1 left
        Bit 12 set: Mixer right (MasterMix)
        Bit 13 set: Mixer left (MasterMix)

        Bit 16 set: D/A converter rechts
        Bit 17 set: D/A converter left

 5     Inquire duplex operation
        Bit  0 set: Simultaneous record/playback
                    possible

 8     Inquire 8-bit sample formats
 9     Inquire 16-bit sample formats
10     Inquire 24-bit sample formats
11     Inquire 32-bit sample formats
        Bit  0 set: Signed
        Bit  1 set: Unsigned
        Bit  2 set: Motorola big-endian if > 8-bit
        Bit  3 set: Intel little-endian of > 8-bit

0x8900 Inquire value of Falcon030 registers 0xff8900
       and 0xff8901
        %0000 xxxx 00xx 00xx
              ||||   ||   ||
              ||||   ||   ||>Playback enable
              ||||   ||   |>Playback repeat
              ||||   ||>Record enable
              ||||   |>Record repeat
              ||||>MFP-15 Int. at Playback end
              |||>MFP-15 Int. at Record end
              ||>Timer A Int. at Playback end
              |>Timer A Int. at Record end

0x8902 Inquire value of Falcon030 registers 0xff8902,
       0xff8904 and 0xff8906
        ret = Frame Base Address

0x890e Inquire value of Falcon030 registers 0xff890e,
       0xff8910 and 0xff8912
        ret = Frame End Address

0x8920 Inquire value of Falcon030 registers 0xff8920
       and 0xff8921
        %00xx 00xx xx00 00xx
           ||   || ||     ||
           ||   || ||     ||>00 = 6258 Hz
           ||   || ||     ||>01 = 12517 Hz
           ||   || ||     ||>10 = 25033 Hz
           ||   || ||     ||>11 = 50066 Hz
           ||   || ||>00 = 8-bit stereo
           ||   || ||>01 = 16-bit stereo
           ||   || ||>10 = 8-bit mono
           ||   || ||>11 = 16-bit mono
           ||   ||>Play tracks
           ||>Monitor track
Return value: If no error occurs, the return will have the value 0. Otherwise the return represents a LONG bit-vector array showing the current error status of the sound system, which can be decoded as follows:
Bits Meaning
0-3 1  Invalid control field
   2  Invalid sync format
   3  Invalid clock (out of range)
4 Left channel clipping has occurred
5 Right channel clipping has occurred
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   dsptristate   gpio   locksnd   setbuffer   setinterrupt   setmontracks   setmode   settracks   soundcmd   unlocksnd

4.17.12.1 Bindings for sndstatus

C: #include <tos.h>

int32_t sndstatus( int16_t reset );
Assembler:
move.w    reset,-(sp)  ; Offset 2
move.w    #140,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.13 soundcmd

Name: »soundcmd« - Set/get the parameters of the A/D and D/A converter
Opcode: 130
Syntax: int32_t soundcmd( int16_t mode, int16_t data );
int32_t NSoundcmd( int16_t mode, int16_t data, int32_t data2);
Description: The XBIOS routine soundcmd sets or obtains various parameters of the A/D and D/A converter. The parameter mode determines the command and data the setting to be performed.
mode Bedeutung
0 Set attenuation of the left output channel in 1.5 dB increments:
data = Increments << 4;
1 Set attenuation of the right output channel in 1.5 dB increments:
data = Increments << 4;
2 Set gain of the left input channel in 1.5 dB increments:
data = Increments << 4;
3 Set gain of the right input channel in 1.5 dB increments:
data = Increments << 4;
4 Set the input source for the 16-bit hardware adder. Bit 0 of data represents the A/D converter and bit 1 the multiplexer matrix.

Ist Bit 5 im _SND Cookie gesetzt stehen noch weitere (Master) Eingänge zur Verfügung. Die Eingänge werden eingeschaltet sowie das entsprechende Bit auf 1 gesetzt und Bit 14 in data gesetzt ist.


Bit 2 of data represents the microphone input
Bit 3 of data represents the FM generator
      (frequency modulator, OPLx/Wavetable)
Bit 4 of data represents the Line input
Bit 5 of data represents the CD input
Bit 6 of data represents the TV input
Bit 7 of data represents the Aux1 input

5 Eingabequellen des A/D-Wandlers. Bit 0 steht für den rechten und Bit 1 für den linken Kanal. Ist ein Bit gesetzt, wird werden die Daten dem Soundchip entnommen, sonst dem Mikrophon.

Ist Bit 5 im '_SND' Cookie gesetzt stehen evtl. noch weitere (A/D-Wandler) Eingänge zur Verfügung. Die Eingänge werden eingeschaltet sowie das entsprechende Bit auf 0 gesetzt und Bit 14 von data auf 1 gesetzt ist.

Bit  2 is the right FM generator
Bit  3 is the left FM generator
Bit  4 is the right Line input
Bit  5 is the left Line input
Bit  6 is the right CD input
Bit  7 is the left CD input
Bit  8 is the right TV input
Bit  9 is the left TV input
Bit 10 is the right Aux1 input
Bit 11 is the left Aux1 input
Bit 12 is the right Mixer output
Bit 13 is the left Mixer output


If bit 14 of data is set to 1, further inputs of the A/D converter are expected in data2.

Bit 16 is the right D/A converter output
Bit 17 is the left D/A converter output
6 Compatibility to the STE sound system. data is taken as a prescaler if the prescaler set via devconnect has the value zero:
0 Prescaler divides by 1280 (6.25 MHz)
1 Prescaler divides by 640 (12.5 MHz)
2 Prescaler divides by 320 (25 MHz)
3 Prescaler divides by 160 (50 MHz)

Additional mode commands when bit 5 in the '_SND' cookie is set:
 7 Direct input of the sample frequency. data is interpreted as an unsigned short and can take a value from 0 to 65534 Hz.
Is also present if the cookie McSn is set.
 8 Setting of the 8-bit sample format
 9 Setting of the 16-bit sample format
10 Setting of the 24-bit sample format
11 Setting of the 32-bit sample format

The following bits are available at present:
Bit 0 = Signed
Bit 1 = Unsigned
Bit 2 = Motorola big-endian if > 8 bit
Bit 3 = Intel little-endian if > 8-bit
12 Gain of the left master output channel.
data = 0 - 255;
13 Gain of the right master output channel.
data = 0 - 255;
14 Gain of the left Mic input channel.
data = 0 - 255;
15 Gain of the right Mic input channel.
data = 0 - 255;
16 Gain of the left FM generator input channel.
data = 0 - 255;
17 Gain of the right FM generator input channel.
data = 0 - 255;
18 Gain of the left Line input channel.
data = 0 - 255;
19 Gain of the right Line input channel.
data = 0 - 255;
20 Gain of the left CD input channel.
data = 0 - 255;
21 Gain of the right CD input channel.
data = 0 - 255;
22 Gain of the left TV input channel.
data = 0 - 255;
23 Gain of the right TV input channel.
data = 0 - 255;
24 Gain of the left Aux1 input channel.
data = 0 - 255;
25 Gain of the right Aux1 input channel.
data = 0 - 255;

If the parameter data is passed the value -1, then the setting remains unchanged.

NSoundcmd is an extended version of soundcmd.
Return value: The function returns the current setting.
Availability: The function is only available on computers of the Falcon series, or with extended XBIOS routines (_SND).
Group: Sound routines
See also: Binding   buffoper   buffptr   devconnect   dsptristate   gpio   setbuffer   setinterrupt   setmontracks   setmode   settracks   sndstatus   unlocksnd   locksnd

4.17.13.1 Bindings for soundcmd

C: #include <tos.h>

int32_t soundcmd( int16_t mode, int16_t data );
int32_t NSoundcmd( int16_t mode, int16_t data, int32_t data2);
Assembler:
move.w    data,-(sp)   ; Offset 4
move.w    mode,-(sp)   ; Offset 2
move.w    #130,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.14 StarTrack

Name: »StarTrack« - XBIOS extension of the StarTrack card
Opcode: 500
Syntax: See the individual subfunctions.
Description: New XBIOS calls for the StarTrack sound card.

All functions go via the XBIOS call 500 (xbs=500) and then split into the various subfunctions.
play-mode: Comparable with DMA-play on a Falcon
rec-mode: Comparable with DMA-rec on a Falcon
bypass-mode: The outputs are connected to the inputs
  1 installed Cookie XBIOS driver
 10 cardslot
 11 cardsel Select sound card
 12 cardmagic Read sound card magic
13 cardadr Sound card addresses
20 digana Digital/Analog input
21 digcom Digital source
22 dspmode DSP routing No/Input/Output
23 sclock Sample rate
24 highsrate High sampling
25 bypass Bypass/sample playback
26 recmode Recording mode
27 playmode Playback mode
28 mode24 Matrix data size (16/24-bit)
30 digmode Digital output Consumer/Professional
31 scmsmode Clear SCMS
32 mycopybit Own SCMS copy protection No/One/All
33 emphasis De-emphasis
40 digsrate Sample rate recognition from digital input
41 digcode Digital input record-type code
42 errorcode Digital input error code
43 cblmode Reset matrix to CBL mode
44 cblread Read out the channel status bytes
45 recstat Recfifo status
46 playstat Playfifo status
50 volad Volume controller for input
51 volda Volume controller for output
52 readsmp Read a sample
53 writesmp Write a sample
54 intact Interrupt release for FIFO
55 dspintact Interrupt release for DSP
60 sysreset Clear record FIFO, offset equalisation & kickstart for D/A Reset for A/D, D/A, volume
61 dspreset Reset for DSP
70 dspmemory DSP memory mode
71 clkdivide DSP clock divider
72 pathset DSP connections
73 dsp_hostcommand Start DSP host command
74 dspclear Read out DSP receive buffer
100 mix Mixes 2,4,6 or 8 stereo channels (= 4,8,12 or 16 tracks) to one stereo channel
101 dspmix Mixes or interleaves stereo channels (4,8 or 16 tracks) to Falcon-compatible 128 bit words
110 monitor Record & playback bypass
111 recwait Wait for auto-record threshold
112 memrec Memory record without interrupt
113 memplay Memory playback without interrupt
114 recplay Memory record & playback without interrupt
115 hardrec HD record without interrupt
116 hardplay HD playback without interrupt
117 hrecplay HD record & playback without interrupt
120 init_peak Peak value output in interrupt
121 init_imemrec Memory record in interrupt
122 init_imemplay Memory playback in interrupt
123 init_implaymix Memory playback & record-mix in interrupt
124 init_hrec HD record in interrupt
125 init_hplay HD playback in interrupt
126 init_ihplaymix HD playback & record-mix in interrupt
130 init_mrecpeak Memory rec & peak output in interrupt
131 init_mplaypeak Memory playback & peak output in interrupt
132 init_mrppeak Memory playback & record-mix & peak output in interrupt
133 init_hrecpeak HD rec & peak output in interrupt
134 init_hplaypeak HD playback & peak output in interrupt
135 init_hrppeak HD playback & record-mix & peak output in interrupt
140 init_xmemrec Memory record in half-buffer system
141 init_xmemplay Memory playback in half-buffer system
142 init_xmixplay Memory playback & mixing with record in half-buffer system
143 init_xmemrec4 Memory record in half-buffer system of 4 channels (analog/digital)
144 init_xmemplay4 Memory playback in half-buffer system of 4 channels (analog/digital)
150 peakshake Peak value handshake (= generate new value)
200 read_rlow Read low register
201 read_rhi Read high register
202 read_rdsp Read dsp register
203 read_raes Read aes register
204 read_rint Read interrupt register
210 wr_rlow Write low register
211 wr_rhi Write high register
212 wr_rdsp Write dsp register
213 wr_raes Write aes register
214 wr_rint Write interrupt register
220 read_dpath1 Read dsp dpath1 register
221 read_dpath2 Read dsp dpath2 register
222 read_dport Read dsp dport register
223 read_dconv Read dsp dconv register
224 read_dpdat Read dsp dpdat register
225 read_dclk Read dsp dclk register
230 wr_dpath1 Write dsp dpath1 register
231 wr_dpath2 Write dsp dpath2 register
232 wr_dport Write dsp dport register
233 wr_dconv Write dsp dconv register
234 wr_dpdat Write dsp dpdat register
235 wr_dclk Write dsp dclk register
300 fastcut Clear memory segment in samplemem
301 peaksuch Peak value search in samplemem
302 zerono Zero value search in samplemem
303 fading Sample fading in samplemem
Return value: See the individual subfunctions.
Availability: The function is only available on computers with the corresponding cards and their drivers.
Group: Sound routines

4.17.15 installed

Name: »installed« - Cookie XBIOS
Opcode: 500, 1
Syntax: int32_t xbios ( 500, 1 );
Description:
Return value: If the value is 0x71273800, then the XBIOS driver is installed.
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.15.1 Bindings for installed

C: int32_t xbios ( 500, 1 );
Assembler:
move.w    #1,-(sp)     ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.16 cardslot

Name: »cardslot« -
Opcode: 500, 10
Syntax: int32_t xbios ( 500, 10 );
Description:
Return value: Number of installed sound cards (1-8).
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.16.1 Bindings for cardslot

C: int32_t xbios ( 500, 10 );
Assembler:
move.w    #10,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.17 cardsel

Name: »cardsel« - Select sound card
Opcode: 500, 11
Syntax: int32_t xbios ( 500, 11, int16_t csel );
Description: csel selected sound card (1-8).

Important:
All further function calls refer to the sound card selected here!
Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.17.1 Bindings for cardsel

C: int32_t xbios ( 500, 11, int16_t csel );
Assembler:
move.w    csel,-(sp)   ; Offset 4
move.w    #11,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.18 cardmagic

Name: »cardmagic« - Read sound card magic
Opcode: 500, 12
Syntax: int32_t xbios ( 500, 12);
Description:
Return value:
bit 0 = 1 Second volume controller for output present
bit 1 = 1 XLR extension present
bit 2 = 1 Digital ports (SP/DIF) present
bit 3 = 1 96kHz high sampling possible
bit 4 = 1 A/D and D/A converters present
bit 5 = 1 DSP56002 present
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.18.1 Bindings for cardmagic

C: int32_t xbios ( 500, 12);
Assembler:
move.w    #12,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.19 cardadr

Name: »cardadr« - Sound card addresses
Opcode: 500, 13
Syntax: int32_t xbios ( 500, 13 );
Description:
Return value: Points to the start address showing where the various sound card addresses are stored (see also register description):
int32_t sample Address sample read/write
int32_t recstat Address recordfifo status
int32_t playstat Address playfifo status
int32_t dsp Address dsp host
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.19.1 Bindings for cardadr

C: int32_t xbios ( 500, 13 );
Assembler:
move.w    #13,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.20 digana

Name: »digana« - Digital/Analog input
Opcode: 500, 20
Syntax: int32_t xbios ( 500, 20, int16_t input );
Description: input: Select the input
0 - Digital input
1 - Analog input

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.20.1 Bindings for digana

C: int32_t xbios ( 500, 20, int16_t input );
Assembler:
move.w    input,-(sp)  ; Offset 4
move.w    #20,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.21 digcom

Name: »digcom« - Digitalquelle
Opcode: 500, 21
Syntax: int32_t xbios ( 500, 21, int16_t dq );
Description: dq: Select the digital source
0 - opto (TOSLINK)
1 - Cinch (phono socket)
2 - XLR (AES/EBU)

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.21.1 Bindings for digcom

C: int32_t xbios ( 500, 21, int16_t dq );
Assembler:
move.w    dq,-(sp)     ; Offset 4
move.w    #21,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.22 dspmode

Name: »dspmode« - Dsp routing No/Input/Output
Opcode: 500, 22
Syntax: int32_t xbios ( 500, 22, int16_t dspmode );
Description: dspmode: Selection of the DSP output path
0 - dspoff - DSP output not in signal path
1 - dsp_to_rec - DSP output in record signal path
2 - dsp_to_play - DSP output in playback signal path

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.22.1 Bindings for dspmode

C: int32_t xbios ( 500, 22, int16_t dspmode );
Assembler:
move.w    playstat,-(sp) ; Offset 4
move.w    #22,-(sp)      ; Offset 2
move.w    #500,-(sp)     ; Offset 0
trap      #14            ; Call XBIOS
addq.l    #6,sp          ; Correct stack

4.17.23 sclock

Name: »sclock« - Sample rate
Opcode: 500, 23
Syntax: int32_t xbios ( 500, 23, int16_t srate );
Description: srate: Selection of the DSP output clock
0 - digital_pll - Use clock input at digital input
1 - 32kHz
2 - 44.1kHz
3 - 48kHz
4 - 8kHz
5 - 11kHz
6 - 16kHz
7 - 16.5kHz
8 - 22kHz
9 - 22kHz
10 - 24kHz
11 - 33kHz
12 - Ext/768
13 - Ext/512
14 - Ext/384
15 - Ext/256

Return value: 0 - kein Fehler
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.23.1 Bindings for sclock

C: int32_t xbios ( 500, 23, int16_t srate );
Assembler:
move.w    srate,-(sp)  ; Offset 4
move.w    #23,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.24 highsrate

Name: »highsrate« - High sampling
Opcode: 500, 24
Syntax: int32_t xbios ( 500, 24, int16_t hs );
Description: hs: High sampling with 96kHz
0 - No high sampling
1 - Select high sampling

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding  

4.17.24.1 Bindings for highsrate

C: int32_t xbios ( 500, 24, int16_t hs );
Assembler:
move.w    hs,-(sp)     ; Offset 4
move.w    #24,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.25 bypass

Name: »bypass« - Bypass/sample playback
Opcode: 500, 25
Syntax: int32_t xbios ( 500, 25, int16_t bypass );
Description: bypass: Output source
0 - Bypass - Outputs are connected to the input
1 - Play - Outputs obtain their data from the playback hardware

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.25.1 Bindings for bypass

C: int32_t xbios ( 500, 25, int16_t bypass );
Assembler:
move.w    bypass,-(sp) ; Offset 4
move.w    #25,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.26 recmode

Name: »recmode« - Recording mode
Opcode: 500, 26
Syntax: int32_t xbios ( 500, 26, int16_t mrec );
Description: mrec: Recording type
0 - Normal - 2-channel recording in 64-bit mode
1 - Four - 4-channel recording in 64-bit mode via A/D and digital-in
2 - Eight - 8-channel recording in 128-bit mode

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.26.1 Bindings for recmode

C: int32_t xbios ( 500, 26, int16_t mrec );
Assembler:
move.w    mrec,-(sp)   ; Offset 4
move.w    #26,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.27 playmode

Name: »playmode« - Playback mode
Opcode: 500, 27
Syntax: int32_t xbios ( 500, 27, int16_t mplay );
Description: mplay: Playback type
0 - Normal - 2-channel playback in 64-bit mode
1 - Four - 4-channel playback in 64-bit mode via D/A and digital-out
2 - Eight - 8-channel playback in 128-bit mode
3 - Sixteen - 16-channel playback in 128-bit mode

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.27.1 Bindings for playmode

C: int32_t xbios ( 500, 27, int16_t mplay );
Assembler:
move.w    mplay,-(sp)  ; Offset 4
move.w    #27,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.28 mode24

Name: »mode24« - Matrix data size (16/24-bit)
Opcode: 500, 28
Syntax: int32_t xbios ( 500, 28, int16_t mode24 );
Description: mode24: Matrix data type
0 - Normal - 16-bit data transfer
1 - Extended - 24-bit data transfer

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.28.1 Bindings for mode24

C: int32_t xbios ( 500, 28, int16_t mode24 );
Assembler:
move.w    mode24,-(sp) ; Offset 4
move.w    #28,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #8,sp        ; Correct stack

4.17.29 digmode

Name: »digmode« - Digital output consumer/professional
Opcode: 500, 30
Syntax: int32_t xbios ( 500, 30, int16_t digmode );
Description: digmode: Select the SP/DIF output format
0 - consumer - Output in consumer format (HIFI-devices)
1 - professional - Output in professional format (studio equipment)

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.29.1 Bindings for digmode

C: int32_t xbios ( 500, 30, int16_t digmode );
Assembler:
move.w    digmode,-(sp) ; Offset 4
move.w    #30,-(sp)     ; Offset 2
move.w    #500,-(sp)    ; Offset 0
trap      #14           ; Call XBIOS
addq.l    #6,sp         ; Correct stack

4.17.30 scmsmode

Name: »scmsmode« - Clear SCMS
Opcode: 500, 31
Syntax: int32_t xbios ( 500, 31, int16_t scmsmode );
Description: scmsmode: Copy protection
0 - Bypass - Route digital input data unchanged to the output
1 - Clear - Completely remove SCMS copy protection

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.30.1 Bindings for scmsmode

C: int32_t xbios ( 500, 31, int16_t scmsmode );
Assembler:
move.w    scmsmode,-(sp) ; Offset 4
move.w    #31,-(sp)      ; Offset 2
move.w    #500,-(sp)     ; Offset 0
trap      #14            ; Call XBIOS
addq.l    #6,sp          ; Correct stack

4.17.31 mycopybit

Name: »mycopybit« - Own SCMS copy protection No/One/All
Opcode: 500, 32
Syntax: int32_t xbios ( 500, 32, int16_t myscms );
Description: myscms: Copy protection for digit output in playback
0 - No - No copying possible
1 - One - One-time copying possible
2 - All - No copy protection, free copying possible

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.31.1 Bindings for mycopybit

C: int32_t xbios ( 500, 32, int16_t myscms );
Assembler:
move.w    myscms,-(sp) ; Offset 4
move.w    #32,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.32 emphasis

Name: »emphasis« - De-emphasis
Opcode: 500, 33
Syntax: int32_t xbios ( 500, 33, int16_t emph );
Description: emph: De-emphasis (top cut), works on digital output (in playback mode) and analog output
0 - Normal - No top cut
1 - De-emphasis - Top cut

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.32.1 Bindings for emphasis

C: int32_t xbios ( 500, 33, int16_t emph );
Assembler:
move.w    emph,-(sp)   ; Offset 4
move.w    #33,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.33 digsrate

Name: »digsrate« - Sample rate recognition from digital input
Opcode: 500, 40
Syntax: int32_t xbios ( 500, 40 );
Description:
Return value: 0 -> Invalid
1 -> 32kHz
2 -> 44.1kHz
3 -> 48kHz

Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.33.1 Bindings for digsrate

C: int32_t xbios ( 500, 40 );
Assembler:
move.w    #40,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.34 digcode

Name: »digcode« - Digital input record-type code
Opcode: 500, 41
Syntax: int32_t xbios ( 500, 41 );
Description:
Return value:
bit 0 0 = Professional
1 = Consumer
bit 1 0 = Data
1 = Audio
bit 2 0 = No copy-prohibit = SCMS not active
1 = Copy prohibit=SCMS active
bit 3 0 = No emphasis
1 = Emphasis active
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.34.1 Bindings for digcode

C: int32_t xbios ( 500, 41 );
Assembler:
move.w    #41,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.35 errorcode

Name: »errorcode« - Digital input error code
Opcode: 500, 42
Syntax: int32_t xbios ( 500, 42 );
Description:
Return value: 0 -> No error
1 -> Validity bit high
2 -> Confidence flag
3 -> Slipped sample
4 -> CRC-error
5 -> Parity error
6 -> Biphase coding error
7 -> No lock

Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.35.1 Bindings for errorcode

C: int32_t xbios ( 500, 42 );
Assembler:
move.w    #42,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.36 cblmode

Name: »cblmode« - Reset matrix to CBL mode
Opcode: 500, 43
Syntax: int32_t xbios ( 500, 43, int16_t cblmode );
Description: cblmode: Channel status-block read mode
0 - normal - No cbl mode, matrix transports sound data
1 - cblread - Cbl mode, matrix transports status bits from digital input

Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.36.1 Bindings for cblmode

C: int32_t xbios ( 500, 43, int16_t cblmode );
Assembler:
move.w    cblmode,-(sp) ; Offset 4
move.w    #43,-(sp)     ; Offset 2
move.w    #500,-(sp)    ; Offset 0
trap      #14           ; Call XBIOS
addq.l    #6,sp         ; Correct stack

4.17.37 cblread

Name: »cblread« - Read out the channel status bytes
Opcode: 500, 44
Syntax: int32_t xbios ( 500, 44 );
Description:
Return value: Points to the start address where the 24 status bytes are stored:

int8_t cbl0 : Channel status byte 0 : Bit 7 -> Channel status bit 0
int8_t cbl0 : Channel status byte 0 : Bit 6 -> Channel status bit 1
int8_t cbl0 : Channel status byte 0 : Bit 5 -> Channel status bit 2
int8_t cbl0 : Channel status byte 0 : Bit 4 -> Channel status bit 3
int8_t cbl0 : Channel status byte 0 : Bit 3 -> Channel status bit 4
int8_t cbl0 : Channel status byte 0 : Bit 2 -> Channel status bit 5
int8_t cbl0 : Channel status byte 0 : Bit 1 -> Channel status bit 6
int8_t cbl0 : Channel status byte 0 : Bit 0 -> Channel status bit 7
... int8_t cbl23 : Channel status byte 23

Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.37.1 Bindings for cblread

C: int32_t xbios ( 500, 44 );
Assembler:
move.w    #44,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.38 recstat

Name: »recstat« - Recfifo status
Opcode: 500, 45
Syntax: int32_t xbios ( 500, 45 );
Description:
Return value:
bit 0 0 = FIFO empty
1 = FIFO not empty
bit 1 0 = FIFO more than half-full, triggers interrupt
1 = FIFO less than/up to half-full
bit 2 0 = FIFO full
1 = FIFO not full
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.38.1 Bindings for recstat

C: int32_t xbios ( 500, 45 );
Assembler:
move.w    #45,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.39 playstat

Name: »playstat« - Playfifo status
Opcode: 500, 46
Syntax: int32_t xbios ( 500, 46 );
Description:
Return value:
bit 0 0 = FIFO empty
1 = FIFO not empty
bit 1 0 = FIFO more than half-full
1 = FIFO less than/up to half-full, triggers interrupt
bit 2 0 = FIFO full
1 = FIFO not full
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.39.1 Bindings for playstat

C: int32_t xbios ( 500, 46 );
Assembler:
move.w    #46,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.40 volad

Name: »volad« - Volume controller for input
Opcode: 500, 50
Syntax: int32_t xbios ( 500, 50, int16_t lvol, int16_t rvol );
Description: lvol: Volume of left channel in 0.5db steps (0-255)
rvol: Volume of right channel in 0.5db steps (0-255)

The volume controller can operate in the region of -96dB to +32dB:
Value dB
0 -96
192 0
255 +31.5
Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.40.1 Bindings for volad

C: int32_t xbios ( 500, 50, int16_t lvol, int16_t rvol );
Assembler:
move.w    rvol,-(sp)   ; Offset 6
move.w    lvol,-(sp)   ; Offset 4
move.w    #50,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #8,sp        ; Correct stack

4.17.41 volda

Name: »volda« - Volume controller for output
Opcode: 500, 51
Syntax: int32_t xbios ( 500, 51, int16_t lvol, int16_t rvol );
Description: lvol: Volume of left channel in 0.5db steps (0-255)
rvol: Volume of right channel in 0.5db steps (0-255)

The volume controller can operate in the region of -96dB to +31.5dB:
Value dB
0 -96
192 0
255 +31.5
Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.41.1 Bindings for volda

C: int32_t xbios ( 500, 51, int16_t lvol, int16_t rvol );
Assembler:
move.w    rvol,-(sp)   ; Offset 6
move.w    lvol,-(sp)   ; Offset 4
move.w    #51,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #8,sp        ; Correct stack

4.17.42 readsmp

Name: »readsmp« - Read a sample
Opcode: 500, 52
Syntax: int32_t xbios ( 500, 52 );
Description:
Return value: Address return value, -1 = Error
int16_t 0 left
int16_t 2 right

Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.42.1 Bindings for readsmp

C: int32_t xbios ( 500, 52 );
Assembler:
move.w    #52,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.43 writesmp

Name: »writesmp« - Write a sample
Opcode: 500, 53
Syntax: int32_t xbios ( 500, 53, int16_t links, int16_t rechts );
Description: links : Sample value left
rechts: Sample value right
Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See Also: Binding

4.17.43.1 Bindings for writesmp

C: int32_t xbios ( 500, 53, int16_t links, int16_t rechts );
Assembler:
move.w    rechts,-(sp) ; Offset 6
move.w    links,-(sp)  ; Offset 4
move.w    #53,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #8,sp        ; Correct stack

4.17.44 intact

Name: »intact« - Interrupt release for FIFO
Opcode: 500, 54
Syntax: int32_t xbios ( 500, 54, int16_t int );
Description: int:
bit 0 0 = Stop playback
1 = Start playback
bit 1 0 = Stop recording
1 = Start recording
Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.44.1 Bindings for intact

C: int32_t xbios ( 500, 54, int16_t int );
Assembler:
move.w    int,-(sp)    ; Offset 4
move.w    #54,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.45 dspintact

Name: »dspintact« - Interrupt release for DSP
Opcode: 500, 55
Syntax: int32_t xbios ( 500, 55, int16_t dint );
Description: dint:
bit 0 0 = Stop dsp-receive
1 = Start dsp-receive
bit 1 0 = Stop dsp-transmit
1 = Start dsp-transmit
Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.45.1 Bindings for dspintact

C: int32_t xbios ( 500, 55, int16_t dint );
Assembler:
move.w    dint,-(sp)   ; Offset 4
move.w    #55,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.17.46 sysreset

Name: »sysreset« - Clear record FIFO
Opcode: 500, 60
Syntax: int32_t xbios ( 500, 60 );
Description: Clear record FIFO, offset equalisation & kickstart for D/A, reset for A/D, D/A, volume controller, digital SP/DIF chips
Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.46.1 Bindings for sysreset

C: int32_t xbios ( 500, 60 );
Assembler:
move.w    #60,-(sp)    ; Offset 2
move.w    #500,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #4,sp        ; Correct stack

4.17.47 dspreset

Name: »dspreset« - Reset for DSP
Opcode: 500, 61
Syntax: int32_t xbios ( 500, 61 );
Description: Resets the DSP
Return value: 0 - No error
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
Group: Sound routines
See also: Binding

4.17.47.1 Bindings for dspreset

C: int32_t xbios ( 500, 61 );
Assembler:
move.w    #61,-(sp)    ; Offset 2
mo