Adrenalin module player v 0.30 (12.08.1995) By: Beta / Adrenalin This program is MAILWARE. You may use it in NON COMMERCIAL productions IF you send me a postcard or e-mail from your hometown, and tell me what you like of this program. You must also credit me somewhere in your program or docs. For commercial purposes, please contact me. You may distribute this freely IF you include all the sources and docs. You may freely distribute any programs that use this player. You may NOT distribute any modified versions of the sources!!! If you wish to include this in shareware collection etc. you must contact me first. If you find a bug, please notify me so that I can correct it. Better yet correct it by yourself (if you can) and send the corrected version to me :-) Disclaimer: If this thing breaks your hard disk, burns your house or does anything else, I will NOT be responsible! You use this at you own risk! (Besides, you can't prove anything. I have better lawyers than you ;-)) Thanks go to: Gravis for making such a great soundcard flap / Capacala for sending me "some" info Mark Feldham for PCGPE Mark Dixon for his GUS669 source Thunder for excellent info about mods Tran & Joshua C. Jensen for releasing ultradox Greets are sent to: Wihannes / Nordic vision Solar / Hysteria Psyko / Acidface software sshadow / a-men wog / a-men flap / Capacala Yuho / Artificial People ASYLUM.ZIP All users of Metropoli & Starport Keys while playing: F1-F8 Mute channel + / - Set amplify vol p Pause <- / -> Next/prev pattern bkspc Jump to start of current pattern pgup/pgdn Set speed < / > Scroll samples , / . Scroll channels R Stop/start playing V Toggle VBlank tempo B Toggle strobo on/off S Start screensaver A Panning rotate H HELP Q Quality mode ;-) ! Shell to DOS. Warning: player consumes a LOT of mem. " Super shell. Volume bars on screen & dos shell. SPACE Toggle keyboard playing A-Z Play current sample at... +/- Set octave Enter File selector Supported effects: 0 Arpeggio 1 - Portamento up 2 - Portamento down 3 - Tone portamento 4 - Vibrato (incorrectly) 5 - Tone portamento & Vol slide 6 - Vibrato & Vol slide (bugs) 9 - Set sample offset A - Volume slide B - Position jump C - Set volume D - Break pattern F - Set speed/tempo. Only tempos > 50 are supported. E1 - Fine portamento up E2 - Fine portamento down E4 - Set vibrato waveform E5 - Set finetune E8 - Set MTM-pan (0 left, 7 middle, 15 right) E9 - Retrigger EA - Fine vol slide up EB - Fine vol slide down EC - Notecut (bugs???) ED - Note delay (bugs) Ok, so what's left out: 7 Tremolo - I haven't encountered many mods using this one. If I have time, I might implement it. Ex - These will propably never be added... Too bad :-( Technical stuff... The sources are not very well documented, but there should be no need because they are all TP. Only thing done in assembler are the GUS routines, sample loading (for speed) & some display routines. TP 6.0 or greater is required for the inline assembly. If you learn anything from this source, then all I ask you is to greet us in your next production. MODTEST.PAS is an example how to use modunit in your progs. ADNMOD.PAS is a complete mod-player. See this for examples for other variables & procedures. For documentation of mods get yourself modform.txt & modfil10.txt. QUALITY MODE: the code for quality mode is: for n := 0 to 15 do for i := 1 to 48 do per_table[n,i] := round(per_table[n,i]*(0.975+RANDOM(10)/200)); ^^^^^^ ;----) Procedures: -------------------------------------------------------------------------- procedure GUSFIND; Detect & initialize gus. You MUST call this even if you set the base address directly!!! NOTE: This procedure tries to hardware detect the GUS. IT DOES NOT LOOK FOR ULTRASND ENVIRONMENT! Here's sample code to check the environment variable: function findgus : word; {returns gus base address if ultrasnd found} var n,c,i : word; begin if getenv('ultrasnd') = '' then begin findgus := 0; exit; end; val(copy(getenv('ultrasnd'),1,3),n,c); if c <> 0 then begin findgus := 0; exit; end; case n of 210 : i := $210; 220 : i := $220; 230 : i := $230; 240 : i := $240; 250 : i := $250; 260 : i := $260; 270 : i := $270; else begin findgus := 0; exit; end; end; findgus := i; end; begin if findgus > 0 then base := findgus; gusfind; end. -------------------------------------------------------------------------- function GUSFINDMEM : longint; Returns how much memory your GUS has. -------------------------------------------------------------------------- procedure GUSRESET; Resets GUS. -------------------------------------------------------------------------- procedure INIT_MOD; Initializes player. Run this after GusReset -------------------------------------------------------------------------- procedure LOAD_MOD(mod_name,debug_info) Loads module. If debug_info is true, then displays progress of loading. Returns possible errors in mod_error variable. 0 = no error 1 = wrong number of channels 2 = load error 3 = out of pattern memory 255 = other error -------------------------------------------------------------------------- procedure START_PLAYING; Wonder what this does... -------------------------------------------------------------------------- procedure STOP_PLAYING; Stops playing & restores interrupts where they were before init_mod. -------------------------------------------------------------------------- procedure FREE_MOD; Frees memory allocated for mod. -------------------------------------------------------------------------- procedure GUSDEINIT; Stops all voices. Call this at end of your program. -------------------------------------------------------------------------- Variables: base - GUS address amp_vol - amplifying volume (0-16). maxchn - Pretty much useless now. time_counter - Counter that gets incremented every 1/18.2 second while music is playing. Great for syncing with music. time_counter2 - Counter that gets incremented for every tick. time_counter3 - ms resolution timer Stuff planned for the future releases - S3M support!!! - Bug fixes! - More octaves (as soon, as I get period values for different finetunes in octave 0) - More effects (at least 7, E7 & EE) - Anything you can come up with :-) Beta / A(drenalin)-Men E-mail: beta@triplex.fipnet.fi antti.huovilainen@pcb.mpoli.fi Snail: Antti Huovilainen Kluuvintie 1 C2 ESPOO 02180 FINLAND --- I'm a coder, so I make programs. --- If was a Guru, they would even work :-)