Home XBIOSXBIOS Interface programmingInterface programming Special commandsSpecial commands

4.19 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.19.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
3 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.19.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.19.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.19.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.19.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.
In TOS 4.04 a value of 0 is returned if the src parameter is illegal, and a random value 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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.12 sndstatus

Name: »sndstatus« - Get status of the A/D and D/A converter
 
Opcode: 140
 
Syntax: int16_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.19.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.19.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.19.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.19.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 equalization & 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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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 - 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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.43 writesmp

Name: »writesmp« - Write a sample
 
Opcode: 500, 53
 
Syntax: int32_t xbios ( 500, 53, int16_t left, int16_t right );
 
Description: left : Sample value left
right: 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.19.43.1 Bindings for writesmp

C: int32_t xbios ( 500, 53, int16_t left, int16_t right );
 
Assembler:
 
move.w    right,-(sp)  ; Offset 6
move.w    left,-(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.19.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.19.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.19.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.19.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.19.46 sysreset

Name: »sysreset« - Clear record FIFO
 
Opcode: 500, 60
 
Syntax: int32_t xbios ( 500, 60 );
 
Description: Clear record FIFO, offset equalization & 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.19.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.19.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.19.47.1 Bindings for dspreset

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

4.19.48 dspmemory

Name: »dspmemory« - DSP memory mode
 
Opcode: 500, 70
 
Syntax: int32_t xbios ( 500, 70, int16_t dspmem );
 
Description: dspmem: DSP memory mode
0 - Normal - 32Kx24-bit Falcon-compatible mode
1 - Big - 128Kx24-bit extended 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.19.48.1 Bindings for dspmemory

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

4.19.49 clkdivide

Name: »clkdivide« - DSP clock divider
 
Opcode: 500, 71
 
Syntax: int32_t xbios ( 500, 71, int16_t clkdiv );
 
Description: clkdiv: DSP clock division factor

 
Clock of CKOUT of the DSP (at 25.175 MHz DSP clock)
Input -> ICLK_output/Converter_prescaler -> Sample rate
clkdiv        -> Output        -> Sample rate
------------------------------------------------
0000=CKOUT/1  -> 25.175MHz/512 -> 49170 Hz
0001=CKOUT/2  -> 12.587MHz/256 -> 49170 Hz
0010=CKOUT/2  -> 12.587MHz/256 -> 49170 Hz
0011=CKOUT/3  ->  8.392MHz/256 -> 32780 Hz
0100=CKOUT/4  ->  6.294MHz/256 -> 24585 Hz
0101=CKOUT/5  ->  5.035MHz/256 -> 19668 Hz
0110=CKOUT/6  ->  4.196MHz/256 -> 16390 Hz
0111=CKOUT/7  ->  3.596MHz/256 -> 14049 Hz
1000=CKOUT/8  ->  3.147MHz/256 -> 12292 Hz
1001=CKOUT/9  ->  2.797MHz/256 -> 10927 Hz
1010=CKOUT/10 ->  2.518MHz/256 ->  9833 Hz
1011=CKOUT/11 ->  2.289MHz/256 ->  8940 Hz
1100=CKOUT/12 ->  2.098MHz/256 ->  8195 Hz
1101=CKOUT/13 ->  1.937MHz/256 ->  7565 Hz
1110=CKOUT/14 ->  1.798MHz/256 ->  7024 Hz
1111=CKOUT/15 ->  1.678MHz/256 ->  6556 Hz

Clock of CKOUT of the DSP (at 66.00 MHz DSP clock)
Input -> ICLK_output/Converter_prescaler -> Sample rate
clkdiv        -> Output        -> Sample rate
----------------------------------------------------
0000=CKOUT/1  -> 66.000MHz/768 ->  85938 Hz
0001=CKOUT/2  -> 33.000MHz/512 ->  64453 Hz
0010=CKOUT/2  -> 33.000MHz/512 ->  64453 Hz
0011=CKOUT/3  -> 22.000MHz/512 ->  42969 Hz
0100=CKOUT/4  -> 16.500MHz/512 ->  32227 Hz
0101=CKOUT/5  -> 13.200MHz/512 ->  25781 Hz
0110=CKOUT/6  -> 11.000MHz/512 ->  21484 Hz
0111=CKOUT/7  ->  9.428MHz/512 ->  18415 Hz
1000=CKOUT/8  ->  8.250MHz/512 ->  16113 Hz
1001=CKOUT/9  ->  7.333MHz/512 ->  14323 Hz
1010=CKOUT/10 ->  6.600MHz/512 ->  12891 Hz
1011=CKOUT/11 ->  6.000MHz/512 ->  11719 Hz
1100=CKOUT/12 ->  5.500MHz/512 ->  10742 Hz
1101=CKOUT/13 ->  5.077MHz/512 ->   9916 Hz
1110=CKOUT/14 ->  4.714MHz/512 ->   9208 Hz
1111=CKOUT/15 ->  4.400MHz/512 ->   8594 Hz

Further clock rates are possible (Converter_prescaler /256, /384, /512 and /768 are usable, so in total 64 new clock rates with CLKDIV!)
 
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.19.49.1 Bindings for clkdivide

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

4.19.50 pathset

Name: »pathset« - DSP connections
 
Opcode: 500, 72
 
Syntax: int32_t xbios ( 500, 72, int16_t path );
 
Description: path: DSP connections
Bit 0 - Connection of matrix to SC0 of the DSP (0 = disconnected, 1 = connected)
Bit 1 - Connection of matrix to SC1 of the DSP (0 = disconnected, 1 = connected)
Bit 2 - Connection of matrix to SC2 of the DSP (0 = disconnected, 1 = connected)
Bit 3 - Connection of matrix to SRD of the DSP (0 = disconnected, 1 = connected)

 
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.19.50.1 Bindings for pathset

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

4.19.51 dsp_hostcommand

Name: »dsp_hostcommand« - Start DSP host command
 
Opcode: 500, 73
 
Syntax: int32_t xbios ( 500, 73, int16_t command );
 
Description: command: DSP command number
 0 - DSP host command (DSP address $0024, default)
...
11 - DSP host command (DSP address $003A)
14 - DSP host command (DSP address $0040)
...
45 - DSP host command (DSP address $007E)

 
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.19.51.1 Bindings for dsp_hostcommand

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

4.19.52 dspclear

Name: »dspclear« - Read out DSP receive buffer
 
Opcode: 500, 74
 
Syntax: int32_t xbios ( 500, 74 );
 
Description:
 
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.19.52.1 Bindings for dspclear

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

4.19.53 mix

Name: »mix« - Mixes 2, 4, 6 or 8 stereo channels
 
Opcode: 500, 100
 
Syntax: int32_t xbios ( 500, 100, int16_t channels, int32_t startadr, int32_t len, int32_t zieladr, int32_t voltab );
 
Description: Mixes 2, 4, 6 or 8 stereo channels (= 4, 8, 12 or 16 tracks) to one stereo channel
 
channels Number of tracks (4, 8, 12 or 16)
startradr Start address of tracks to be mixed
len Length of a stereo track
zieladr Start address for the mixed stereo track
voltab Pointer to track volume value table
int8_t VOL-STEREOTRACK1
int8_t VOL-STEREOTRACK2 etc.
...
int8_t VOL-STEREOTRACK8

The tracks to be mixed lie in memory as stereo tracks following each other. The volume value table contains the sound volume for the individual channels in the region 0-200:
  0 = Mute
 50 = Half volume
100 = Original volume
200 = Double volume

 
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.19.53.1 Bindings for mix

C: int32_t xbios ( 500, 100, int16_t channels, int32_t startadr, int32_t len, int32_t zieladr, int32_t voltab );
 
Assembler:
 
move.l    voltab,-(sp)     ; Offset 18
move.l    zieladr,-(sp)    ; Offset 14
move.l    len,-(sp)        ; Offset 10
move.l    startdar,-(sp)   ; Offset 6
move.w    channels,-(sp)   ; Offset 4
move.w    #100,-(sp)       ; Offset 2
move.w    #500,-(sp)       ; Offset 0
trap      #14              ; Call XBIOS
lea       22(sp),sp        ; Correct stack

4.19.54 dspmix

Name: »dspmix« - Mix or interleave stereo channels
 
Opcode: 500, 101
 
Syntax: int32_t xbios ( 500, 101, int16_t channels, int32_t startadr, int32_t len, int32_t zieladr );
 
Description: Mixes or interleaves stereo channels (4, 8 or 16 tracks) to Falcon-compatible 128-bit words
 
channels 4, 8 or 16 tracks
startradr Start address of tracks to be mixed
len Length of a stereo track
zieladr Start address for the mixed stereo track

The tracks to be mixed lie in memory as stereo tracks following each other. The volume value table contains the sound volume for the individual channels in the region 0-200:
  0 = Mute
 50 = Half volume
100 = Original volume
200 = Double volume

 
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.19.54.1 Bindings for dspmix

C: int32_t xbios ( 500, 101, int16_t channels, int32_t startadr, int32_t len, int32_t zieladr );
 
Assembler:
 
move.l    zieladr,-(sp)    ; Offset 14
move.l    len,-(sp)        ; Offset 10
move.l    startdar,-(sp)   ; Offset 6
move.w    channels,-(sp)   ; Offset 4
move.w    #101,-(sp)       ; Offset 2
move.w    #500,-(sp)       ; Offset 0
trap      #14              ; Call XBIOS
lea       18(sp),sp        ; Correct stack

4.19.55 monitor

Name: »monitor« - Record & playback bypass
 
Opcode: 500, 110
 
Syntax: int32_t xbios ( 500, 110 );
 
Description:
 
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.19.55.1 Bindings for monitor

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

4.19.56 recwait

Name: »recwait« - Wait for auto-record threshold
 
Opcode: 500, 111
 
Syntax: int32_t xbios ( 500, 111, int16_t treshold );
 
Description: treshold: Threshold (0-32767)
 
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.19.56.1 Bindings for recwait

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

4.19.57 memrec

Name: »memrec« - Memory record without interrupt
 
Opcode: 500, 112
 
Syntax: int32_t xbios ( 500, 112, int32_t startadr, int32_t endadr );
 
Description: startradr: Recording start address
endadr: Recording end address
 
Warning: Sound disappears, faulty!
 
Return value: Last recording memory position
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.57.1 Bindings for memrec

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

4.19.58 memplay

Name: »memplay« - Memory playback without interrupt
 
Opcode: 500, 113
 
Syntax: int32_t xbios ( 500, 113, int32_t startadr, int32_t endadr, int16_t step, int16_t mode, int16_t midi );
 
Description:
 
startradr Playback start address
endadr Playback end address (plays backwards if endadr<startadr)
step Playback speed (0..x)
0 = Normal
1 = Double
2 = Triple etc...
mode bit 0 -> Loop
bit 1 -> Crossplay
bit 2 -> MIDI
midi MIDI note, at which playback is to start, is only specified when mode bit 2 is set!

Warning: MIDI not tested!
 
Return value: Address return values, -1 = Error
int32_t 0 Memposition
int32_t 4 Loops (1 = played once, 2 = twice etc.)
Each crossplay = two loops (for forwards & backwards)
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.58.1 Bindings for memplay

C: int32_t xbios ( 500, 113, int32_t startadr, int32_t endadr, int16_t step, int16_t mode, int16_t midi );
 
Assembler:
 
move.w    midi,-(sp)      ; Offset 16
move.w    mode,-(sp)      ; Offset 14
move.w    step,-(sp)      ; Offset 12
move.l    endadr,-(sp)    ; Offset 8
move.l    startadr,-(sp)  ; Offset 4
move.w    #113,-(sp)      ; Offset 2
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       18(sp),sp       ; Correct stack

4.19.59 recplay

Name: »recplay« - Memory record & playback without interrupt
 
Opcode: 500, 114
 
Syntax: int32_t xbios ( 500, 114 );
 
Description: No information available!
 
Return value:
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.59.1 Bindings for recplay

Unbekannt!

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

4.19.60 hardrec

Name: »hardrec« - HD record without interrupt
 
Opcode: 500, 115
 
Syntax: int32_t xbios ( 500, 115, int32_t startadr, int32_t len, int32_t sectors, int16_t handle );
 
Description:
 
startadr Record buffer start address
len Record buffer length or sectors
sectors Number of record sectors (determined by len)
handle Handle of record file

Warning: Dropout due to too small FIFO!
 
Return value: Number of completely written sectors, -1 = 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.19.60.1 Bindings for hardrec

C: int32_t xbios ( 500, 115, int32_t startadr, int32_t len, int32_t sectors, int16_t handle );
 
Assembler:
 
move.w    handle,-(sp)    ; Offset 18
move.l    sectors,-(sp)   ; Offset 14
move.l    len,-(sp)       ; Offset 10
move.l    startadr,-(sp)  ; Offset 6
move.w    #115,-(sp)      ; Offset 4
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       20(sp),sp       ; Correct stack

4.19.61 hardplay

Name: »hardplay« - HD-play ohne Interrupt
 
Opcode: 500, 116
 
Syntax: int32_t xbios ( 500, 116, int32_t startadr, int32_t len, int32_t sectors, int32_t seek, int16_t handle, int16_t step, int16_t mode, int16_t midi );
 
Description:
 
startadr Playback buffer start address
len Playback buffer length (plays backwards if negative)
sectors Number of sectors
seek File start position
handle Handle of playback file
step Speed of playback (0..x)
0 = Normal
1 = Double
2 = Triple etc...
mode bit 0 -> Loop
bit 1 -> Crossplay
bit 2 -> MIDI
bit 3 -> Break
midi MIDI note, at which playback is to start, is only specified when mode) bit 2 is set!

Warning: Dropout due to too small FIFO!
No reverse playback at present!
 
Return value: Address return values, -1 = Error
int32_t 0 Number of sectors played back
int32_t 4 Loops (1 = played once, 2 = twice etc.)
Each crossplay = two loops (for forwards & backwards)
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.61.1 Bindings for hardplay

C: int32_t xbios ( 500, 116, int32_t startadr, int32_t len, int32_t sectors, int32_t seek, int16_t handle, int16_t step, int16_t mode, int16_t midi );
 
Assembler:
 
move.w    midi,-(sp)      ; Offset 26
move.w    mode,-(sp)      ; Offset 24
move.w    step,-(sp)      ; Offset 22
move.w    handle,-(sp)    ; Offset 20
move.l    seek,-(sp)      ; Offset 16
move.l    sectors,-(sp)   ; Offset 12
move.l    len,-(sp)       ; Offset 8
move.l    startadr,-(sp)  ; Offset 4
move.w    #116,-(sp)      ; Offset 2
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       28(sp),sp       ; Correct stack

4.19.62 hrecplay

Name: »hrecplay« - HD record & playback without interrupt
 
Opcode: 500, 117
 
Syntax: Bindings for hrecplay
 
Description:
 
Return value:
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.62.1 Bindings for hrecplay

Binding unbekannt!

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

4.19.63 init_peak

Name: »init_peak « - Peak value output in interrupt
 
Opcode: 500, 120
 
Syntax: int32_t xbios ( 500, 120 );
 
Description:
 
Return value: Address return values, -1 = Error
int32_t 0 Peak value
int32_t 8 Break (1 = new value ready for readout. After the readout peak value and break must be cleared!)
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.63.1 Bindings for init_peak

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

4.19.64 init_imemrec

Name: »init_imemrec« - Memory record in interrupt
 
Opcode: 500, 121
 
Syntax: int32_t xbios ( 500, 121, int16_t select, int32_t startadr, int32_t endadr );
 
Description:
 
select Recording type
0 = Record with 16 bits via FIFO
2 = Record with 24 bits via FIFO
startadr Recording start address
endadr Recording end address
Return value: Address return values, -1 = Error
int32_t 0 Memposition
int32_t 8 Break
int32_t 12 Error
int32_t 24 Counter position

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

4.19.64.1 Bindings for init_imemrec

C: int32_t xbios ( 500, 121, int16_t select, int32_t startadr, int32_t endadr );
 
Assembler:
 
move.l    endadr,-(sp)   ; Offset 10
move.l    startadr,-(sp) ; Offset 6
move.w    select,-(sp)   ; Offset 4
move.w    #121,-(sp)     ; Offset 2
move.w    #500,-(sp)     ; Offset 0
trap      #14            ; Call XBIOS
lea       14(sp),sp      ; Correct stack

4.19.65 init_imemplay

Name: »init_imemplay« - Memory playback in interrupt
 
Opcode: 500, 122
 
Syntax: int32_t xbios ( 500, 122, int16_t select, int32_t startadr, int32_t endadr, int32_t counter, int16_t step, int16_t mode, int16_t midi );
 
Description:
 
select Playback type
0 = Playback with 16 bits via FIFO
1 = Playback with 16 bits via DSP
2 = Playback with 24 bits via FIFO
startadr Playback start address
endadr Playback end address
counter Counter start value
step Playback speed
0 = Normal
1 = Double
2 = Triple etc...
mode bit 0 -> Loop
bit 1 -> Crossplay (not for select = 2)
bit 2 -> MIDI
midi MIDI note, at which playback is to start, is only specified when mode bit 2 is set!
Return value: Address return values, -1 = Error
int32_t 0 Memposition
int32_t 8 Break
int32_t 12 Error
int32_t 24 Counter position
int32_t 28 Loops
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.65.1 Bindings for init_imemplay

C: int32_t xbios ( 500, 122, int16_t select, int32_t startadr, int32_t endadr, int32_t counter, int16_t step, int16_t mode, int16_t midi );
 
Assembler:
 
move.w    midi,-(sp)      ; Offset 22
move.w    mode,-(sp)      ; Offset 20
move.w    step,-(sp)      ; Offset 18
move.l    counter,-(sp)   ; Offset 14
move.l    endadr,-(sp)    ; Offset 10
move.l    startadr,-(sp)  ; Offset 6
move.w    select,-(sp)    ; Offset 4
move.w    #122,-(sp)      ; Offset 2
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       24(sp),sp       ; Correct stack

4.19.66 init_implaymix

Name: »init_implaymix« - Memory playback & record-mix in interrupt
 
Opcode: 500, 123
 
Syntax: int32_t xbios ( 500, 123, int16_t select, int32_t startadr, int32_t endadr, int32_t counter, int16_t step, int16_t mode, int16_t midi );
 
Description:
 
select Playback type
0 = Playback with 16 bits via FIFO
startadr Playback start address
endadr Playback end address
counter Counter start value
step Playback speed
0 = Normal
1 = Double
2 = Triple etc...
mode bit 0 -> Loop
bit 1 -> Crossplay (Not for select = 2)
bit 2 -> MIDI
midi MIDI note, at which playback is to start, is only specified when mode bit 2 is set!
Return value: Address return values, -1 = Error
int32_t 0 Memposition
int32_t 8 Break
int32_t 12 Error
int32_t 24 Counter position
int32_t 28 Loops
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.66.1 Bindings for init_implaymix

C: int32_t xbios ( 500, 123, int16_t select, int32_t startadr, int32_t endadr, int32_t counter, int16_t step, int16_t mode, int16_t midi );
 
Assembler:
 
move.w    midi,-(sp)      ; Offset 22
move.w    mode,-(sp)      ; Offset 20
move.w    step,-(sp)      ; Offset 18
move.l    counter,-(sp)   ; Offset 14
move.l    endadr,-(sp)    ; Offset 10
move.l    startadr,-(sp)  ; Offset 6
move.w    select,-(sp)    ; Offset 4
move.w    #122,-(sp)      ; Offset 2
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       24(sp),sp       ; Correct stack

4.19.67 init_hrec

Name: »init_hrec« - HD record in interrupt
 
Opcode: 500, 124
 
Syntax: int32_t xbios ( 500, 124, int32_t startadr, int32_t len, int32_t sectors, int16_t handle, int16_t fileart );
 
Description:
 
startadr Record buffer start address
len Record buffer length
sectors Number of recorded sectors
handle Handle of record file
fileart 3 = Create WAV file

Doesn't work!
 
Return value: Address return values
int32_t 0 Memposition
int32_t 4 Number of recorded sectors
int32_t 8 Break
int32_t 12 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.19.67.1 Bindings for init_hrec

C: int32_t xbios ( 500, 124, int32_t startadr, int32_t len, int32_t sectors, int16_t handle, int16_t fileart );
 
Assembler:
 
move.w    fileart,-(sp)   ; Offset 18
move.w    handle,-(sp)    ; Offset 16
move.l    sectors,-(sp)   ; Offset 12
move.l    len,-(sp)       ; Offset 8
move.l    startadr,-(sp)  ; Offset 4
move.w    #124,-(sp)      ; Offset 2
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       20(sp),sp       ; Correct stack

4.19.68 init_hplay

Name: »init_hplay« - HD playback in interrupt
 
Opcode: 500, 125
 
Syntax: int32_t xbios ( 500, 125, int32_t startadr, int32_t len, int32_t sectors, int32_t seek, int16_t handle, int16_t fileart, int16_t step, int16_t mode, int16_t midi );
 
Description:
 
startadr Playback buffer start address
len Playback buffer length
sectors Number of sectors
seek File start position
handle Handle of playback file
fileart 3 = WAV file
step Playback speed
mode bit 0 -> Loop
bit 1 -> Crossplay
bit 2 -> MIDI
bit 3 -> Break
midi MIDI note, at which playback is to start, is only specified when mode bit 2 is set!

Crashes!
 
Return value: Address return values
int32_t 0 Memposition
int32_t 4 Number of sectors played back int32_t 8 Break
int32_t 12 Error
int32_t 28 Number of loops
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.68.1 Bindings for init_hplay

C: int32_t xbios ( 500, 125, int32_t startadr, int32_t len, int32_t sectors, int32_t seek, int16_t handle, int16_t fileart, int16_t step, int16_t mode, int16_t midi );
 
Assembler:
 
move.w    midi,-(sp)      ; Offset 28
move.w    mode,-(sp)      ; Offset 26
move.w    step,-(sp)      ; Offset 24
move.w    fileart,-(sp)   ; Offset 22
move.w    handle,-(sp)    ; Offset 20
move.l    seek,-(sp)      ; Offset 16
move.l    sectors,-(sp)   ; Offset 12
move.l    len,-(sp)       ; Offset 8
move.l    startadr,-(sp)  ; Offset 4
move.w    #125,-(sp)      ; Offset 2
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       30(sp),sp       ; Correct stack

4.19.69 init_ihplaymix

Name: »init_ihplaymix« - HD playback & record-mix in interrupt
 
Opcode: 500, 126
 
Syntax: Bindings for init_ihplaymix
 
Description:
 
Return value:
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.69.1 Bindings for init_ihplaymix

Unbekannt!

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

4.19.70 init_mrecpeak

Name: »init_mrecpeak« - Memory rec & peak output in interrupt
 
Opcode: 500, 130
 
Syntax: int32_t xbios ( 500, 130, int16_t select, int32_t startadr, int32_t endadr );
 
Description:
 
select Recording type
0 = Record with 16 bits via FIFO
1 = Record with 16 bits via DSP
startadr Record start address
endadr Record end address
Return value: Address return values
int32_t 0 Memposition
int32_t 8 Break
int32_t 12 Error
int32_t 16 Peak value
int32_t 24 Counter position
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.70.1 Bindings for init_mrecpeak

C: int32_t xbios ( 500, 130, int16_t select, int32_t startadr, int32_t endadr );
 
Assembler:
 
move.l    enddadr,-(sp)   ; Offset 10
move.l    startadr,-(sp)  ; Offset 6
move.w    select,-(sp)    ; Offset 4
move.w    #130,-(sp)      ; Offset 2
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       14(sp),sp       ; Correct stack

4.19.71 init_mplaypeak

Name: init_mplaypeak»« - Memory playback & peak output in interrupt
 
Opcode: 500, 131
 
Syntax: int32_t xbios ( 500, 131 );
 
Description:
 
Return value:
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.71.1 Bindings for init_mplaypeak

Unknown!

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

4.19.72 init_mrppeak

Name: »init_mrppeak« - Memory playback & record-mix & peak output in interrupt
 
Opcode: 500, 132
 
Syntax: Bindings for init_mrppeak
 
Description:
 
Return value:
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.72.1 Bindings for init_mrppeak

Unknown!

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

4.19.73 init_hrecpeak

Name: »init_hrecpeak« - HD rec & peak output in interrupt
 
Opcode: 500, 133
 
Syntax: int32_tG xbios ( 500, 133, int32_t startadr, int32_t len, int32_t sectors, int16_t handle, int16_t fileart );
 
Description:
 
startadr Record buffer start address
len Record buffer length
sectors Number of recorded sectors
handle Handle of record file
fileart 3 = Create WAV file

Dropout due to too small FIFO!
 
Return value: Address return values
int32_t 0 Memposition
int32_t 4 Number of recorded sectors
int32_t 8 Break
int32_t 12 Error
int32_t 16 Peak value

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

4.19.73.1 Bindings for init_hrecpeak

C: int32_tG xbios ( 500, 133, int32_t startadr, int32_t len, int32_t sectors, int16_t handle, int16_t fileart );
 
Assembler:
 
move.w    fileart,-(sp)   ; Offset 18
move.w    handle,-(sp)    ; Offset 16
move.l    sectors,-(sp)   ; Offset 12
move.l    len,-(sp)       ; Offset 8
move.l    startadr,-(sp)  ; Offset 4
move.w    #133,-(sp)      ; Offset 2
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       20(sp),sp       ; Correct stack

4.19.74 init_hplaypeak

Name: »init_hplaypeak« - HD playback & peak output in interrupt
 
Opcode: 500, 134
 
Syntax: Bindings for init_hplaypeak
 
Description:
 
Return value:
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.74.1 Bindings for init_hplaypeak

Unknown!

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

4.19.75 init_hrppeak

Name: »init_hrppeak« - HD playback & record-mix & peak output in interrupt
 
Opcode: 500, 135
 
Syntax: int32_t xbios ( 500, 135 );
 
Description:
 
Return value:
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.75.1 Bindings for init_hrppeak

Unknown!

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

4.19.76 init_xmemrec

Name: »init_xmemrec« - Memory record in half-buffer system
 
Opcode: 500, 140
 
Syntax: int32_t xbios ( 500, 140, int16_t select, int32_t startadr1, int32_t startadr2, int32_t len, int32_t endcount, int16_t fileart, int32_t peakbuf );
 
Description:
 
select Recording type
0 = Record with 16 bits via FIFO
1 = Record with 16 bits via DSP
2 = 8-channel record with 16 bits via FIFO
startadr1 Record start address buffer1
startadr2 Record start address buffer2
len Block length of the buffers
endcount Recorded length or counter end (in bytes)
fileart 3 = Create WAV file
peakbuf Address of temporary store for peak values

mAt present, with select = 2 only 1 stereo channel is stored!
 
Return value: Address return values
int32_t 0 Memposition
int32_t 4 Memflag
int32_t 8 Break
int32_t 12 Error (not for select = 1)
int32_t 16 Peak value (only for select = 0)
int32_t 20 Peak buffer position (only for select = 0)
int32_t 24 Counter position
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.76.1 Bindings for init_xmemrec

C: int32_t xbios ( 500, 140, int16_t select, int32_t startadr1, int32_t startadr2, int32_t len, int32_t endcount, int16_t fileart, int32_t peakbuf );
 
Assembler:
 
move.l    peakbuf,-(sp)    ; Offset 24
move.w    fileart,-(sp)    ; Offset 22
move.l    endcount,-(sp)   ; Offset 18
move.l    len,-(sp)        ; Offset 14
move.l    startadr2,-(sp)  ; Offset 10
move.l    startadr1,-(sp)  ; Offset 6
move.w    select,-(sp)     ; Offset 4
move.w    #140,-(sp)       ; Offset 2
move.w    #500,-(sp)       ; Offset 0
trap      #14              ; Call XBIOS
lea       28(sp),sp        ; Correct stack

4.19.77 init_xmemplay

Name: »init_xmemplay« - Memory playback in half-buffer system
 
Opcode: 500, 141
 
Syntax: int32_t xbios ( 500, 141, int16_t select, int32_t startadr1, int32_t startadr2, int32_t len, int32_t counter, int32_t endcount, int16_t fileart, int16_t step, int16_t mode, int16_t midi );
 
Description:
 
select Abspielart
0 = Playback with 16 bits via FIFO
1 = Playback with 16 bits via DSP
2 = 8-channel playback with 16 bits via FIFO
3 = 16-channel playback with 16 bits via FIFO
startadr1 Playback start address buffer 1
startadr2 Playback start address buffer 2
len Block length of the buffers
counter Counter start value
endcount Playback length or counter end (in bytes)
fileart 3 = Create WAV file
step Playback speed
mode bit 0 -> Loop
bit 1 -> Crossplay
bit 2 -> MIDI
bit 3 -> Break
midi MIDI note, at which playback is to start, is only specified when mode bit 2 is set!
Return value: Address return values
int32_t 0 Memposition
int32_t 4 Memflag
int32_t 8 Break
int32_t 12 Error (not for select = 1))
int32_t 16 Peak value (only for select = 0)
int32_t 24 Counter position
int32_t 40 Last block
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.77.1 Bindings for init_xmemplay

C: int32_t xbios ( 500, 141, int16_t select, int32_t startadr1, int32_t startadr2, int32_t len, int32_t counter, int32_t endcount, int16_t fileart, int16_t step, int16_t mode, int16_t midi );
 
Assembler:
 
move.w    midi,-(sp)       ; Offset 32
move.w    mode,-(sp)       ; Offset 30
move.w    step,-(sp)       ; Offset 28
move.w    fileart,-(sp)    ; Offset 26
move.l    endcount,-(sp)   ; Offset 22
move.l    counter,-(sp)    ; Offset 18
move.l    len,-(sp)        ; Offset 14
move.l    startadr2,-(sp)  ; Offset 10
move.l    startadr1,-(sp)  ; Offset 6
move.w    select,-(sp)     ; Offset 4
move.w    #141,-(sp)       ; Offset 2
move.w    #500,-(sp)       ; Offset 0
trap      #14              ; Call XBIOS
lea       34(sp),sp        ; Correct stack

4.19.78 init_xmixplay

Name: »init_xmixplay« - Memory playback & mixing with record in half-buffer system
 
Opcode: 500, 142
 
Syntax: int32_t xbios ( 500, 142 );
 
Description:
 
Return value:
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.78.1 Bindings for init_xmixplay

Unknown!

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

4.19.79 init_xmemrec4

Name: »init_xmemrec4« - Memory record in half-buffer system of 4 channels (analog/digital)
 
Opcode: 500, 143
 
Syntax: int32_t xbios ( 500, 143, int32_t startadr1, int32_t startadr2, int32_t dstartadr1, int32_t dstartadr2, int32_t len, int32_t endcount, int16_t fileart, int32_t peakbuf, int32_t dpeakbuf );
 
Description:
 
startadr1 FIFO record start address buffer 1
startadr2 FIFO record start address buffer 2
dstartadr1 DSP record start address buffer 1
dstartadr2 DSP record start address buffer 2
len Length of the buffers
endcount Recorded length or counter end (in bytes)
fileart 3 = Create WAV file
peakbuf FIFO address of temporary memory for peak values
dpeakbuf DSP address of temporary memory for peak values
Return value: Address return values
int32_t 0 Memposition FIFO
int32_t 4 Memflag FIFO
int32_t 8 Break FIFO
int32_t 12 Error FIFO
int32_t 16 Peak value FIFO
int32_t 24 Counter position FIFO
 
int32_t 32 Memposition DSP
int32_t 36 Memflag DSP
int32_t 40 Break DSP
int32_t 44 Error DSP
int32_t 48 Peak value DSP
int32_t 56 Counter position DSP
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.79.1 Bindings for init_xmemrec4

C: int32_t xbios ( 500, 143, int32_t startadr1, int32_t startadr2, int32_t dstartadr1, int32_t dstartadr2, int32_t len, int32_t endcount, int16_t fileart, int32_t peakbuf, int32_t dpeakbuf );
 
Assembler:
 
move.l    dpeakpuf,-(sp)    ; Offset 34
move.l    peakpuf,-(sp)     ; Offset 30
move.w    fileart,-(sp)     ; Offset 28
move.l    endcount,-(sp)    ; Offset 24
move.l    len,-(sp)         ; Offset 20
move.l    dstartadr2,-(sp)  ; Offset 16
move.l    dstartadr1,-(sp)  ; Offset 12
move.l    startadr2,-(sp)   ; Offset 8
move.l    startadr1,-(sp)   ; Offset 4
move.w    #143,-(sp)        ; Offset 2
move.w    #500,-(sp)        ; Offset 0
trap      #14               ; Call XBIOS
lea       38(sp),sp         ; Correct stack

4.19.80 init_xmemplay4

Name: »init_xmemplay4« - Memory playback in half-buffer system of 4 channels (analog/digital)
 
Opcode: 500, 144
 
Syntax: int32_t xbios ( 500, 144, int32_t startadr1, int32_t startadr2, int32_t dstartadr1, int32_t dstartadr2, int32_t len, int32_t counter, int32_t endcount, int16_t fileart, int16_t step, int16_t mode, int16_t midi );
 
Description:
 
startadr1 FIFO playback start address buffer 1
startadr2 FIFO playback start address buffer 2
dstartadr1 DSP playback start address buffer 1
dstartadr2 DSP playback start address buffer 2
dendadr2 Length of the buffers
counter Counter start value
endcount Playback length or counter end (in bytes)
fileart 3 = Creat WAV file
step Playback speed
mode bit 0 -> Loop
bit 1 -> Crossplay
bit 2 -> MIDI
bit 3 -> Break
midi MIDI note, at which playback is to start, is only specified when mode bit 2 is set!
Return value: Address return values
int32_t 0 Memposition
int32_t 4 Memflag
int32_t 8 Break
int32_t 12 Error
int32_t 16 Peak value
int32_t 24 Counter position

 
int32_t 32 Memposition DSP
int32_t 36 Memflag DSP
int32_t 40 Break DSP
int32_t 44 Error DSP
int32_t 48 Peak value DSP
int32_t 56 Counter position DSP
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.80.1 Bindings for init_xmemplay4

C: int32_t xbios ( 500, 144, int32_t startadr1, int32_t startadr2, int32_t dstartadr1, int32_t dstartadr2, int32_t len, int32_t counter, int32_t endcount, int16_t fileart, int16_t step, int16_t mode, int16_t midi );
 
Assembler:
 
move.w    midi,-(sp)        ; Offset 38
move.w    mode,-(sp)        ; Offset 36
move.w    step,-(sp)        ; Offset 34
move.w    fileart,-(sp)     ; Offset 32
move.l    endcount,-(sp)    ; Offset 28
move.l    counter,-(sp)     ; Offset 24
move.l    len,-(sp)         ; Offset 20
move.l    dstartadr2,-(sp)  ; Offset 16
move.l    dstartadr1,-(sp)  ; Offset 12
move.l    startadr2,-(sp)   ; Offset 8
move.l    startadr1,-(sp)   ; Offset 4
move.w    #144,-(sp)        ; Offset 2
move.w    #500,-(sp)        ; Offset 0
trap      #14               ; Call XBIOS
lea       40(sp),sp         ; Correct stack

4.19.81 peakshake

Name: »peakshake« - Peak value handshake (= generate new value)
 
Opcode: 500, 150
 
Syntax: int32_t xbios ( 500, 150 );
 
Description:
 
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.19.81.1 Bindings for peakshake

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

4.19.82 read_rlow

Name: »read_rlow« - Read low register
 
Opcode: 500, 200
 
Syntax: int32_t xbios ( 500, 200 );
 
Description:
 
Return value: bit 0 -> SWAES
bit 1 -> SWDIGIN
bit 2 -> TAKT0
bit 3 -> TAKT1
bit 4 -> EXTAKT
bit 5 -> EXTEX
bit 6 -> EXTTF
bit 7 -> EXTTW
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See Also: Binding
 

4.19.82.1 Bindings for read_rlow

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

4.19.83 read_rhi

Name: »read_rhi« - Read high register
 
Opcode: 500, 201
 
Syntax: int32_t xbios ( 500, 201 );
 
Description:
 
Return value: bit 0 -> SWPROT
bit 1 -> SWRES-FIFO
bit 2 -> MATRIX-OUT
bit 3 -> PREEMPH
bit 4 -> SWSUBFR
bit 5 -> GENERA
bit 6 -> CATEG0
bit 7 -> CATEG1
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.83.1 Bindings for read_rhi

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

4.19.84 read_rdsp

Name: »read_rdsp« - Read dsp register
 
Opcode: 500, 202
 
Syntax: int32_t xbios ( 500, 202 );
 
Description:
 
Return value: bit 0 -> MATI0/REC4
bit 1 -> MATI1/PLAY4
bit 2 -> VOLCS1
bit 3 -> VOLCLK
bit 4 -> VOLDATAI
bit 5 -> VOLCS2
bit 7 -> AESFREQ
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.84.1 Bindings for read_rdsp

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

4.19.85 read_raes

Name: »read_raes« - Read aes register
 
Opcode: 500, 203
 
Syntax: int32_t xbios ( 500, 203 );
 
Description:
 
Return value: bit 0 -> SWPROF
bit 1 -> SWCOPY/PCH16
bit 2 -> DIGMODE:SWMAL2/DIG24
bit 3 -> PLAY128
bit 4 -> REC128
bit 7 -> SPEBU
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.85.1 Bindings for read_raes

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

4.19.86 read_rint

Name: »read_rint« - Read interrupt register
 
Opcode: 500, 204
 
Syntax: int32_t xbios ( 500, 204 );
 
Description:
 
Return value: bit 0 -> PLAY-INT
bit 1 -> REC-INT
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.86.1 Bindings for read_rint

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

4.19.87 wr_rlow

Name: »wr_rlow« - Write low register
 
Opcode: 500, 210
 
Syntax: int32_t xbios ( 500, 210, int16_t value );
 
Description:
 
value bit 0 -> SWAES
bit 1 -> SWDIGIN
bit 2 -> TAKT0
bit 3 -> TAKT1
bit 4 -> EXTAKT
bit 5 -> EXTEX
bit 6 -> EXTTF
bit 7 -> EXTTW
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.19.87.1 Bindings for wr_rlow

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

4.19.88 wr_rhi

Name: »wr_rhi« - Write high register
 
Opcode: 500, 211
 
Syntax: int32_t xbios ( 500, 211, int16_t value );
 
Description:
 
value bit 0 -> SWPROT
bit 1 -> SWRES-FIFO
bit 2 -> MATRIX-OUT
bit 3 -> PREEMPH
bit 4 -> SWSUBFR
bit 5 -> GENERA
bit 6 -> CATEG0
bit 7 -> CATEG1
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.19.88.1 Bindings for wr_rhi

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

4.19.89 wr_rdsp

Name: »wr_rdsp« - Write dsp register
 
Opcode: 500, 212
 
Syntax: int32_t xbios ( 500, 212, int16_t value );
 
Description:
 
value bit 0 -> MATI0/REC4
bit 1 -> MATI1/PLAY4
bit 2 -> VOLCS1
bit 3 -> VOLCLK
bit 4 -> VOLDATAI
bit 5 -> VOLCS2
bit 7 -> AESFREQ
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.19.89.1 Bindings for wr_rdsp

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

4.19.90 wr_raes

Name: »wr_raes« - Write aes register
 
Opcode: 500, 213
 
Syntax: int32_t xbios ( 500, 213, int16_t value );
 
Description:
 
value bit 0 -> SWPROF
bit 1 -> SWCOPY/PCH16
bit 2 -> DIGMODE:SWMAL2/DIG24
bit 3 -> PLAY128
bit 4 -> REC128
bit 7 -> SPEBU
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.19.90.1 Bindings for wr_raes

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

4.19.91 wr_rint

Name: »wr_rint« - Write interrupt register
 
Opcode: 500, 214
 
Syntax: int32_t xbios ( 500, 214, int16_t value );
 
Description:
 
value bit 0 -> PLAY-INT
bit 1 -> REC-INT
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.19.91.1 Bindings for wr_rint

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

4.19.92 read_dpath1

Name: »read_dpath1« - Read DSP dpath1 register
 
Opcode: 500, 220
 
Syntax: int32_t xbios ( 500, 220 );
 
Description:
 
Return value: bit 0 -> SW0PATH
bit 1 -> SC1PATH
bit 2 -> SC2PATH
bit 3 -> DSPRES
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.92.1 Bindings for read_dpath1

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

4.19.93 read_dpath2

Name: »read_dpath2« - Read dsp dpath2 register
 
Opcode: 500, 221
 
Syntax: int32_t xbios ( 500, 221 );
 
Description:
 
Return value: bit 0 -> SRDPATH
bit 1 -> STDPATH0
bit 2 -> STDPATH1
bit 3 -> CONVMAST
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.93.1 Bindings for read_dpath2

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

4.19.94 read_dport

Name: »read_dport« - Read dsp dport register
 
Opcode: 500, 222
 
Syntax: int32_t xbios ( 500, 222 );
 
Description:
 
Return value: bit 0 -> GPIO0
bit 1 -> GPIO1
bit 2 -> GPIO2
bit 3 -> GPIODIR0

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

4.19.94.1 Bindings for read_dport

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

4.19.95 read_dconv

Name: »read_dconv« - Read dsp dconv register
 
Opcode: 500, 223
 
Syntax: int32_t xbios ( 500, 223 );
 
Description:
 
Return value: bit 0 -> GPIODIR1
bit 1 -> GPIODIR2
bit 2 -> CMAST0
bit 3 -> CMAST1
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.95.1 Bindings for read_dconv

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

4.19.96 read_dpdat

Name: »read_dpdat« - Read dsp dpdat register
 
Opcode: 500, 224
 
Syntax: int32_t xbios ( 500, 224 );
 
Description:
 
Return value: bit 0 -> PDAT0
bit 1 -> PDAT1
Bit 2 -> MEMART
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.96.1 Bindings for read_dpdat

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

4.19.97 read_dclk

Name: »read_dclk« - Read dsp dclk register
 
Opcode: 500, 225
 
Syntax: int32_t xbios ( 500, 225 );
 
Description:
 
Return value: bit 0-3 -> CDIV
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.97.1 Bindings for read_dclk

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

4.19.98 wr_dpath1

Name: »wr_dpath1« - Write dsp dpath1 register
 
Opcode: 500, 230
 
Syntax: int32_t xbios ( 500, 230, int16_t value );
 
Description:
 
value bit 0 -> SW0PATH
bit 1 -> SC1PATH
bit 2 -> SC2PATH
bit 3 -> DSPRES
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.19.98.1 Bindings for wr_dpath1

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

4.19.99 wr_dpath2

Name: »wr_dpath2« - Write dsp dpath2 register
 
Opcode: 500, 231
 
Syntax: int32_t xbios ( 500, 231, int16_t value );
 
Description:
 
value bit 0 -> SRDPATH
bit 1 -> STDPATH0
bit 2 -> STDPATH1
bit 3 -> CONVMAST
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.19.99.1 Bindings for wr_dpath2

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

4.19.100 wr_dport

Name: »wr_dport« - Write dsp dport register
 
Opcode: 500, 232
 
Syntax: int32_t xbios ( 500, 232, int16_t value );
 
Description:
 
value bit 0 -> GPIO0
bit 1 -> GPIO1
bit 2 -> GPIO2
bit 3 -> GPIODIR0
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.19.100.1 Bindings for wr_dport

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

4.19.101 wr_dconv

Name: »wr_dconv« - Write dsp dconv register
 
Opcode: 500, 233
 
Syntax: int32_t xbios ( 500, 233, int16_t value );
 
Description:
 
value bit 0 -> GPIODIR1
bit 1 -> GPIODIR2
bit 2 -> CMAST0
bit 3 -> CMAST1
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.19.101.1 Bindings for wr_dconv

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

4.19.102 wr_dpdat

Name: »wr_dpdat« - Write dsp dpdat register
 
Opcode: 500, 234
 
Syntax: int32_t xbios ( 500, 234, int16_t value );
 
Description:
 
value bit 0 -> PDAT0
bit 1 -> PDAT1
Bit 2 -> MEMART
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.19.102.1 Bindings for wr_dpdat

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

4.19.103 wr_dclk

Name: »wr_dclk« - Write dsp dclk register
 
Opcode: 500, 235
 
Syntax: int32_t xbios ( 500, 235, int16_t value );
 
Description: value: bit0-3 -> CDIV
 
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.19.103.1 Bindings for wr_dclk

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

4.19.104 fastcut

Name: »fastcut« - Clear memory segment in samplemem
 
Opcode: 500, 300
 
Syntax: int32_t xbios ( 500, 300, int32_t anfmem, int32_t endmem );
 
Description:
 
anfmem Start address
endmem End address (first invalid value)
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.19.104.1 Bindings for fastcut

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

4.19.105 peaksuch

Name: »peaksuch« - Peak value search in samplemem
 
Opcode: 500, 301
 
Syntax: int32_t xbios ( 500, 301, int32_t anfmem, int32_t endmem );
 
Description:
 
anfmem Start address
endmem End address (first invalid value)
Return value: Pointer to value table
int16_t rpos; Maximum value positive halfwave right
int16_t rneg; Maximum value negative halfwave right
int16_t lpos; Maximum value positive halfwave left
int16_t lneg; Maximum value negative halfwave left
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.105.1 Bindings for peaksuch

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

4.19.106 zerono

Name: »zerono« - Zero value search in samplemem
 
Opcode: 500, 302
 
Syntax: int32_t xbios ( 500, 302, int32_t anfmem, int32_t endmem, int16_t side, int16_t znvorweg );
 
Description:
 
anfmem Start address
endmem End address (first invalid value)
side Search direction (= 0 :forwards, <> 0 :backwards)
znvorweg What is this ???????????????????????????????????
Return value: Address of the found position
 
Availability: This function is only available when the driver of the StarTrack sound card has been launched.
 
Group: Sound routines
 
See also: Binding
 

4.19.106.1 Bindings for zerono

C: int32_t xbios ( 500, 302, int32_t anfmem, int32_t endmem, int16_t side, int16_t znvorweg );
 
Assembler:
 
move.w    znvorweg,-(sp)  ; Offset 14
move.w    side,-(sp)      ; Offset 12
move.l    endmem,-(sp)    ; Offset 8
move.l    anfmem,-(sp)    ; Offset 4
move.w    #302,-(sp)      ; Offset 2
move.w    #500,-(sp)      ; Offset 0
trap      #14             ; Call XBIOS
lea       16(sp),sp       ; Correct stack

4.19.107 fading

Name: »fading« - Sample fading in samplemem
 
Opcode: 500, 303
 
Syntax: int32_t xbios ( 500, 303, int32_t data, int32_t werte, int32_t anfmem, int32_t endmem );
 
Description:
 
data Pointer to fader curve value
werte Number of fader values
anfmem Start address
endmem End address (first invalid value)
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.19.107.1 Bindings for fading

C: int32_t xbios ( 500, 303, int32_t data, int32_t werte, int32_t anfmem, int32_t endmem );
 
Assembler:
 
move.l    endmem,-(sp)  ; Offset 162
move.l    anfmem,-(sp)  ; Offset 12
move.l    werte,-(sp)   ; Offset 8
move.l    data,-(sp)    ; Offset 4
move.w    #303,-(sp)    ; Offset 2
move.w    #500,-(sp)    ; Offset 0
trap      #14           ; Call XBIOS
lea       20(sp),sp     ; Correct stack

4.19.108 unlocksnd

Name: »unlocksnd« - Unlock sound system for use by other applications
 
Opcode: 129
 
Syntax: int32_t unlocksnd( void );
 
Description: The XBIOS routine unlocksnd unlocks the sound system for use by other applications, after it has been locked previously.
 
Return value: The function returns the value 0 if it was successful. If the sound system was already available, then a negative value is 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   locksnd
 

4.19.108.1 Bindings for unlocksnd

C: #include <tos.h>
 
int32_t unlocksnd( void );
 
Assembler:
 
move.w    #129,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #2,sp        ; Correct stack

4.19.109 WavePlay

Name: »WavePlay« - Replay a sample
 
Opcode: 165
 
Syntax: int32_t WavePlay( int16_t flags, int32_t rate, int32_t sptr, int32_t slen );
 
Description: The XBIOS routine WavePlay starts the playback of a sample using the DMA sound system on the STe, TT030, Falcon030 or Milan.
 
flags is a bit-vector for the description of the sample or of the function to be executed:
 
Bit 0 set: Sample is mono
Bit 1 set: Sample is 16-bit
 
If bit 5 in '_SND' cookie is set:
 
Bit 4 set: Sample, if 16-bit, is in Intel format
Bit 5 set: Sample is unsigned
Bit 6 set: Sample format is as recorded by MilanBlaster
 
Bit 8 set: See description in Atari Compendium Vol. I, XBIOS pp. 4.110-4.112. It is not supported by the MilanBlaster XBios
 
rate is the sample frequency in Hz
 
sptr is the start address of the sample (with the MilanBlaster can also lie in TT-RAM)
 
slen is the length of the sample in bytes
 
Return value: If successful the function returns the value 0, the playback was then started and can be be halted at any time with buffoper(0). The end of the sample has been reached when buffoper(-1) bit 0 is cleared. In case of error, -1 is returned, while if no sound was played (either because the user had not previously assigned a sound or SAM was disabled) a 1 is returned.
 
Availability: The function is available when bit 5 in the '_SND' cookie is set or the 'SAM\0' cookie is present.
 
Group: Sound routines
 
See also: Binding
 

4.19.109.1 Bindings for WavePlay

C: int32_t WavePlay( int16_t flags, int32_t rate, int32_t sptr, int32_t slen );
 
Assembler:
 
move.l    slen,-(sp)   ; Offset 12
pea       sptr         ; Offset 8
move.l    rate,-(sp)   ; Offset 4
move.w    flags,-(sp)  ; Offset 2
move.w    #165,-(sp)   ; Offset 0
trap      #14          ; Call XBIOS
lea       16(sp),sp    ; Correct stack

Home XBIOSXBIOS Interface programmingInterface programming Special commandsSpecial commands