ۥ-!@ -562233333,3X3@3333 34343545454545454545454747474747474444U4s3U4U4 UltraSound Software Development Kit (SDK) Revision 2.10 December 24th, 1993 Documentation by Kurt Kennett and Mike Travers Advanced Gravis 101-3750 North Fraser Way Burnaby, British Columbia V5J 5E9 FAX (604)-431-5155 Forte Technologies 1555 East Henrietta Rd. Rochester, N.Y. 14526 FAX (716)-292-6353 NOTICE The information contained in this manual is believed to be correct. The manual is subject to change without notice and does not represent a commitment on the part of FORTE, Advanced Gravis, or Ingenuity Software. Neither FORTE, Advanced Gravis, nor Ingenuity Software make a warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Neither FORTE, Advanced Gravis, nor Ingenuity Software shall be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance or use of this material. This document contains proprietary information which is protected by copyright. This manual is Copyright (C) 1992,1993 by FORTE, Advanced Gravis, and Ingenuity Software. All rights are reserved. No part of this document may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any human or computer language, in any form or by any means; electronic, mechanical, magnetic, optical, chemical, manual or otherwise, without the expressed written permission of FORTE, Advanced Gravis, and Ingenuity Software. Any copying, duplication, selling, or otherwise distributing the program or support files described in this manual, other than for the limited purposes of system backup and loading the program into the computer as part of executing the program, is a violation of the software license agreement and the law. Willful violation of the copyright law of the United States can result in statutory damages of up to $50,000 in addition to actual damages, plus criminal penalties of imprisonment for up to one year and/or a $10,000 fine. TABLE OF CONTENTS Section Page     Chapter 1 - General Information 3  1.0 Introduction 3  1.1 Features of the UltraSound 3  1.2 Benefits of supporting the UltraSound 4  1.3 The GF1 - 32 Voice Sound Synthesizer 4  1.4 MIDI Interface 7  1.5 Joystick Interface 7        Chapter 2 - Hardware Information 8  2.1 I/O Port Map 8  2.2 MIDI Control Port 9  2.3 MIDI Status Port 9  2.4 MIDI Data Port 9  2.5 Page Register 10  2.6 Select Register 10   2.6.1 Global Registers 10   2.6.1.1 DRAM DMA Control Register 11   2.6.1.2 DMA Start Address 11   2.6.1.3 DRAM I/O Address 12   2.6.1.4 Timer Control 12   2.6.1.5 Timer 1 and Timer 2 Count 12   2.6.1.6 Sampling Frequency 12   2.6.1.7 Sampling Control Register 13   2.6.1.8 Joystick Trim DAC 13   2.6.1.9 Reset Register 14   2.6.2 Voice-specific Registers 14   2.6.2.1 Voice Control Register 15   2.6.2.2 Frequency Control Register 16   2.6.2.3 Starting location HIGH 16   2.6.2.4 Starting location LOW 16   2.6.2.5 End Address HIGH 16   2.6.2.6 End Address LOW 16   2.6.2.7 Volume Ramp Rate 17   2.6.2.8 Volume Ramp Start 17   2.6.2.9 Volume Ramp End 17   2.6.2.10 Current Volume 18   2.6.2.11 Current Location HIGH 18   2.6.2.12 Current Location LOW 18   2.6.2.13 Pan Position 18   2.6.2.14 Volume Ramp Control Register 19   2.6.2.15 Active Voices 19   2.6.2.16 IRQ Source Register 20  2.7 Global Data Low 20  2.8 Global Data High 20  2.9 IRQ Status 21  2.10 Timer Control Register 21  2.11 Timer Data Register 21  2.12 DRAM I/O 21  Section Page     2.13 Mix Control Register 22  2.14 IRQ Control Register 22  2.15 Register Control 24  2.16 Volume ramping description 24        Chapter 3 - Programming the UltraSound 26  3.0 Introduction 26  3.1 Sound 26  3.2 The Basics of the UltraSound 27  3.3 Using GUS Memory 27  3.4 What are Samples? 28  3.5 Using Voices 29  3.6 Volumes 30  3.7 Using Looping 30  3.8 Clicks and click removal 31  3.9 Interrupt Handling Functions 32  3.10 Rollover feature 32  3.11 Stereo playback 33  3.12 C-specific information 35  3.13 PASCAL-specific information 36   3.13.1 Available constants and variables 37   3.13.2 Examples 39   3.13.3 Management of GUS RAM 40  3.14 Coming Attractions 41  3.15 Technical Support 42     Chapter 4 - Reference Guide 43   UltraAllocVoice 81   UltraAuxHandler 54   UltraCalcRate 43   UltraClearVoices 81   UltraClose 43   UltraDisableLineIn 46   UltraDisableMicIn 46   UltraDisableMIDIXmit 58   UltraDisableOutput 47   UltraDownload 44   UltraDRAMDMABusy 45   UltraDRAMTcHandler 50   UltraEnableLineIn 47   UltraEnableMicIn 47   UltraEnableMIDIXmit 59   UltraEnableOutput 48   UltraFreeVoice 82   UltraGetLineIn 48   UltraGetMicIn 49   UltraGetOutput 48   UltraGoRecord 45   UltraGoVoice 46   UltraMaxAlloc 55   UltraMaxAvail 55  Section Page      UltraMemAlloc 56   UltraMemAvail 56   UltraMemFree 57   UltraMemInit 57   UltraMIDIDisableRecv 58   UltraMIDIEnableRecv 58   UltraMIDIRecv 59   UltraMIDIRecvHandler 51   UltraMIDIReset 60   UltraMIDIStatus 60   UltraMIDIXmit 60   UltraMIDIXmitHandler 51   UltraOpen 61   UltraPeekData 62   UltraPing 62   UltraPokeData 63   UltraPrimeRecord 64   UltraPrimeVoice 65   UltraProbe 66   UltraRampLinearVolume 84   UltraRampVolume 67   UltraReadLinearVolume 84   UltraReadRecordPosition 67   UltraReadVoice 68   UltraReadVolume 68   UltraRecordData 69   UltraRecordDMABusy 70   UltraRecordHandler 54   UltraReset 70   UltraSetBalance 71   UltraSetFrequency 71   UltraSetLinearVolume 83   UltraSetLoopMode 71   UltraSetRecordFrequency 72   UltraSetVoice 72   UltraSetVoiceEnd 72   UltraSetVolume 73   UltraSizeDRAM 73   UltraStartTimer 74   UltraStartVoice 75   UltraStopTimer 75   UltraStopVoice 76   UltraStopVolume 76   UltraTimer1Handler 52   UltraTimer2Handler 52   UltraTimerStopped 76   UltraTrimJoystick 77   UltraUpload 77   UltraVectorLinearVolume 85   UltraVectorVolume 78   UltraVersion 78   UltraVersionStr 79  Section Page      UltraVoiceOff 82   UltraVoiceOn 83   UltraVoiceStopped 79   UltraVolumeHandler 53   UltraVolumeStopped 79   UltraWaitDRAMDMA 80   UltraWaitRecordDMA 80   UltraWaveHandler 53        Chapter 5 - Focal Point 3D Sound 86  5.0 Introduction 86  5.1 Creating 3D file 87  5.2 3D Sound Routines 87   UltraAbsPosition 87   UltraAngPosition3D 88   UltraAngFltPosition3D 89   UltraCloseDup3D 89   UltrDup3D 90   UltraLoad3DEffect 91   UltraSetFreq3D 92   UltraRelease3DInterleave 92   UltraSetup3DInterleave 93   UltraStart3D 93   UltraStop3D 94   UltraUnLoad3DEffect 94     Appendix A - Error Codes 95     Appendix B - Volume Control 96     Appendix C - Voice Control 97     Appendix D - DMA Control 98     Appendix E - Recording Control 99     Appendix F - Patch Files 100   Field descriptions 104     Appendix G - 3D File Header 109    Revision 2.10 December 24th, 1993 Documentation }      %'579;=?ACTo     ķķ l]'*X&0*0*0*0*0*0*0*H 2 5 7 J M O p s u        < ? A T W Y q t v   + / 1 Q U W v z |   ! A E G d h j < l]'*X&[<@BaegCGImqs )-/FJL]ac046W[]_acegi& l]'*X[ $&9=?MQSgkm9=?koq)-/BFHY]_swy)-/EIKX& l]'*[K`dfz~(,.>BDUY[lpr{/35MQSeik~  ! l]'*X&[!%':>@NRTmqs,02HLN\`buy{ 268IMObfh{26& l]'*X[68GKMhln-13IMOcgi !%'=AC[_a|  )-/X& l]'*[/AEGX\^w{} @DFHJLfkm0*0*X& l]'*X&:6RemarksblockedbittedPARAblocked2;F F7 nM7[6e>86 @  gi~60*0*0*0*0*0* <K!6/31Roman 10cpi Symbol"Arial5Courier New p gi~467"hܥ3ܥ UltraSound Documentation T-O-C UltraSound Ultra, DocsJWritten December 1993 by Kurt Kennett Copyright 1993, Advanced Gravis Kurt Kennett Kurt Kennett