home *** CD-ROM | disk | FTP | other *** search
- MODRES TECHNICAL INFORMATION
- (C) Mark J Cox 1991
- MODRES V2.00
-
-
- *** WATCH OUT FOR SLOW MACHINES! *** IF <12MHz then use with care ***
-
- -----------------------------------------------------------------------
-
- Uses functions 8220, 8221, 8222, 8223 etc. on multiplex interrupt 02f
- All numbers in Hex except for the ones in decimal.
-
- -----------------------------------------------------------------------
- ***** Installation check
-
- In:
- AX = 8220
-
- Out:
- AX = 5722 if MODRES is installed,
- BX = version number (Version 1.10 would be 0110 )
- DX:CX
- Form a segment/offset pair, these point to the table of
- valid Output Devices which can be read (BUT NOT ALTERED) by
- the calling program. See output struct.
- (0 is always the speaker, so can ignore DX and CX)
- -----------------------------------------------------------------------
-
- ***** Service Module
-
- Plays a module from memory, and returns - carries on playing
-
- In:
- AX = 8220
- DX:CX = Segment/Offset of a structure called MODPARM
-
- Out:
- AX = 5722 if there were no errors when initialising
-
- --------------------------------------------------------------------------
-
- ***** Whereami
-
- Return details of where in MOD I am + if finished
-
- In: AX = 08225
-
- Out:
- DL = [didi] = 0 playing, 1 reached end or stopped
- DH = [mp_speed] = Speed of mod (6 isnormal etc)
- BX = [pattpos] = Position within pattern 0000-0400
- CL = [songpos] = Position within the song (Track 0,1,2,...)
-
- --------------------------------------------------------------------------
-
- ***** Stopme
-
- Stops playing the MOD - you must do this before critical things like
- disk accesses etc.
-
- In:
- AX = 08266
-
- -----------------------------------------------------------------------
-
-
- ***** OUTPUT DEVICE Structure
-
- You can read this to determine what output device to use if you want to
- but you must never alter it.
-
- 0 Output Device 0
- 33 Output Device 1
- ...
- Last output device has a 255 as its first character at +0.
-
- +0..+18 String String with the name of the output device. Terminated with 0
- +19 Word Ignore. Always 0ffff
- +21 Word If =0 then this means that this output device is not
- available.
- +23..+32 String Ignore
- +33 Next one
-
- Example:
- 'PC SPEAKER ',0, 0ffff, some word, ignore the rest.
- 'SOUNDBLASTER ',.....
- 255
-
- So the SOUNDBLASTER would be output device 1, Check if +21=0 if not then
- you can make the default output device 1 by passing a 1 in the MODPARM
- routine.
-
- -----------------------------------------------------------------------
-
- ***** MODPARM Structure
-
- Consists of 69 bytes
-
- +0 Char 'M'
- +1 Char 'P'
- +2 Byte Gives output device ( 0 = speaker, 3 = D/A stereo etc )
- +3/+4 Word Segment of start of main module data
- +5/+6 Word Segment of start of sample number 1
- ...
- +65/+66 Word Segment of start of sample number 31
- +67 Byte Which pattern to start playing from (0 to 127)
- +68 Byte Function : 0 - play from pattern [+67] until end of song
- 1 - play pattern [+67] only
- +69 Byte Machine Speed: 0 - 10-12Mhz
- 1 - 12-25Mhz (default)
- 2 - 25Mhz+
- also 3 - Mixing speed 10kHz (fast 8Mhz machines)
- 4 - Mix speed 12kHz (10Mhz machines)
- 5 - Mix speed 13kHz
- 6 - Mix speed 8kHz (Test for 8Mhz machines)
-
- +70 Byte Allow >64k sample playing
- 128 - Mod has samples >64k in it
- else - Mod has all samples <64k
-
- The Segment that is passed as start of main module data must
- contain all the module (like when you load it normally) up to
- the start of the samples (ie from the name of the module, through
- to and including all the pattern data)
-
- * Note: ALL SAMPLES MUST START ON SEGMENT BOUNDARIES
-
-
-
- -----------------------------------------------------------------------
-
- THIS VERSION OF MODRES IS (C) MARK J COX 1991 AND MUST NOT BE DISTRIBUTED
- IN ANY FASHION BY ANY MEANS OR USED FOR ANYTHING COMMERCIAL WITHOUT PRIOR
- WRITTEN CONTRACT FROM MARK J COX.
-
-