FM - 3812 Resident Driver Substitute for "sound.com" Syntax fm [-iXX] [-m] [-h] [insfile] Options -iXX - XX= interrupt number to use (hex) (default: 65h) -m - install 80x86 machine-specific code -h - use high memory for buffer insfile - file containing instrument definitions Note: these options are planned, not implemented Operation This program is a TSR that installs into interrupt 65h and handles the function calls as specified in the 1987 Ad Lib Synthesizer Card Programmer's Manual. Run the program fm.com to load the driver. The program will not load more than once unless interrupt 65h is intercepted by another program that does not have a valid signature. Auxiliary Programs A program can be written to load the queue and terminate before turning the driver on. The "pmode.com" and "mmode.com" programs switch the card into percussive and melodic modes, respectively. The programs "qon.com" and "qofff.com" turn on and off the driver. If you wish to remove the TSR from memory, first run "qoff" to turn the driver off in order to reset the clock timer to its normal speed; then, release the memory. Disassembly of these programs will show you that they are simply function calls to interrupt 65h. Defects The main defect with the program is that the buffer size is not large enough. The program can not handle a very fast tempo; the "pinkpan1.rol" song will demonstrate this. Internal Interrupt Service Functions - * indicates currently implemented F# Definition 0* Initialize; set volume to 100%, set pitch to 0, set melodic mode, set timbre for all voices to piano, empty queues, and set tempo to 90 bpm. 2 Set Relative Time Start; 3 Set State; either 1, active, or 0, stopped. 4 Get State; either 1, playing, or 0, complete or stopped. 5 Empty queues; silence all voices, stay active. 6 Set Mode; set melodic or percussive, set volume to 100%, set timbre for all voices to piano, set pitch to 0. 7 Get Mode; return 0 for melodic, 1 for percussive. 8 Set Volume at Time. 9 Set Tempo at Time. 10 Set Transpose; immediately affect all voices by specified number of semitones. 11 Get Transpose. 12 Set Active Voice. 13 Get Active Voice. 14 Play Note with Delay; play note of pitch for length, set delay. 15 Play Note without Delay; play note of pitch for length. 16 Set Voice Timbre at Time. 17 Set Pitch at Time; affect all voices. 18 Set Ticks per Beat; all notes should fall on multiple of 1/TickBeat, and obey: 18.2 <= (TickBeat * Tempo / 60). 19* Direct Note On; play voice at pitch. 20* Direct Note Off; stop voice. 21* Direct Set Timbre; set timbre for voice. Development Notes 01/23/92 - Corrected delta pitch effect. 01/22/92 - Beta version 3.0 released. Fully functional. Queue size too small. 01/09/92 - A defect with the combination of the timer and music interrupt routines caused the computer to enter an endless loop, with interrupts disabled: lock-up. Version 2.1 corrects this. 01/07/92 - Additional functions 8000h, 8001h return pointers to internal data structures and the count of voices; 8002h and 8003h start and stop background fm sounds, as with the fmfun.exe program. mov si, 8002h ; start background sound int 65h mov si, 8003h ; stop background sound int 65h 12/30/91 - Only the Reset Chip and Direct Note On/Off and Set Timbre functions are implemented. All other functions simply return 0. Otherwise, fully resident with proper signature placement and checking. Supplied test program fmfun.exe allows manipulation of voice parameters and pitch; the tab key causes the program to begin reading memory at 0:0, determining a pitch and length for each voice.