First post, by Low power
Hello.
I has been using DOSMid for some time, and recently I bought a few LPT sound cards from Serdaco, which are very neat. When searching for applications for use with the CMSLPT, I found the CMS-enabled DOSMid fork made by Tronix; this version works with the TSR driver that emulates the CMS (CMSLPT.COM). I then had the idea of adding native support for this card based on Tronix's work.
This fork is actually based on a merge of upstream version 0.9.7 (commit r347) and Tronix's fork; the detail of this rebase and merge process can be found at https://github.com/Tronix286/DOSMID/issues/2.
The native support for CMSLPT can be activated by using option:
/cms=lpt#
where # is the LPT unit number, ranged from 1 to 4.
I later also added native support for OPL2LPT and OPL3LPT. Because there's no way to auto-detect whether it is a OPL2LPT or a OPL3LPT, it must be specified maunally via one of following new options:
/opl2=lpt#/opt3=lpt#
In addition to supports of those LPT sound cards, this fork also implemented some other improvements:
- Because I'm most comfortable to work in an Unix-like environment, A Makefile for GNU Make has been added, along with a few other minor changes, to enable cross-building on GNU/Linux.
- Likewise, my fingers are VERY used to type '-' when I start typing a command line option, so I changed the option handling function to recognize both '-' and '/' as option prefix.
- My DOS setup have a small program that changes cursor shape to a full block cursor on boot (I like block cursor, I think I can blame the FreeBSD project for this); like many other DOS programs, DOSMid resets the cursor to the usual underscore shape on exit; I inserted a few codes to ui.c, which saves current cursor shape on starting, and restores back to original shape on exiting.
- DOSMid will now exit on 'q' key, as same as ESC key.
- The CMS support code now handles the 'pan' control change message (10), useful for stereo playback with CMS.
The source code repository is available at https://sourceforge.net/p/rivoreo/dosmid-code … oreo-fork/tree/ and https://github.com/Low-power/DOSMid/tree/rivoreo-fork/.
Also, since I don't have an OPL3LPT, I tested this mode only under QEMU; it would be great if people with a real hardware to confirm it actually working.
Please see the commit log for detailed changes:
https://sourceforge.net/p/rivoreo/dosmid-code/ci/HEAD/log/
DOSMID(1) FreeBSD General Commands Manual DOSMID(1)NAMEDOSMid - a low-requirements MIDI and MUS player for DOS and UNIXSYNOPSISdosmid [<options>] [--] <midi-or-m3u-file>DESCRIPTIONDOSMid is a MIDI, MUS and RMID player, originally made for DOS.The DOS version is a real mode application designed to run on verymodest hardware configurations.The UNIX version supports kFreeBSD-based and Linux-based operatingsystems on i386 and amd64 architectures.DOSMid plays standard MIDI files (both format 0 and format 1), as wellas MIDI in RIFF (ie. RMID), and even MUS tunes (as used by Id Softwarein numerous games like Doom, Heretic, Hexen, etc).DOSMid requires MIDI-capable hardware of some sort. Note, that somesound cards have an MPU-401 interface, although many need an additional'wavetable' daughterboard to produce actual MIDI sound.DOSMid can also emulate MIDI through FM synthesis using an OPL chip(that is one of the Yamaha YM3812 or YMF262 chips, found on most soundcards from the nineties), or using dual SAA1099 chips (the CreativeMusic System / Game Blaster). Be warned however that, most of the time,the MIDI-over-OPL emulation will yield less than desirable results,unless the MIDI file was specifically crafted for OPL; and usingSAA1099 chips will only produce square waves, which can be dramaticallydifferent from the intended instruments.OPTIONSOptions are case-insensitive. In addition to '-', any option may alsobegin with '/'. To specify a file that named with a leading '-', or anabsolute path on UNIX (with a leading '/'), use the end-of-optionmarker '--', for example:dosmid -cms=lpt1 -random -- -.m3udosmid -cms=ppi0 -volume=25 -- /test.midFor options with a <hex-number> argument, the argument should bewritten without 0x prefix. For example:dosmid -cms=230 ...Will set output device to Creative Music System on I/O port 0x230 (560,230h).-mpu[=<hex-number>]Use MPU-401 on port <hex-number>. If port is omitted, DOSMidscans the BLASTER environment variable for the MPU port, and ifnot found, it fallback to port 330.-awe[=<hex-number>](DOS only) Use the EMU8000 synth chip found on SoundBlasterAWE32/AWE64 cards on port <hex-number>. KNOWN BUG: On some AWE
cards, the FM music module becomes muted or noisy after usingthe EMU8000 chip. This is not a bug in DOSMid, and happens withother applications using AWE as well. If you have this problem,execute AWEUTIL /S after using DOSMid to reinit FM. I observedthis problem on an AWE64 CT4390 ("Gold"), but not on an AWE32CT2760.-opl[=<hex-number>]Use an OPL2-compatible or OPL3-compatible chip on port <hex-number>. This should be a last resort option if you don't haveany wavetable device. Do NOT expect pleasing results. Thedefault port is 388 if not specified.-opl2[=<hex-number>]Use an OPL2-compatible chip on I/O port <hex-number> as outputdevice. The default port 388 will be used if omitted. It willbe used in OPL2 mode, even the chip is OPL3-compatible.-opl3[=<hex-number>]Use an OPL3-compatible chip on I/O port <hex-number> as outputdevice. The default port 388 will be used if omitted.-opl{2|3}=lpt{1|2|3|4}Use an OPL2-compatible or OPL3-compatible chip on a LPT portspecified by an PC BIOS unit name. This is for OPL2LPT andOPL3LPT device.-opl{2|3}=<ppi-device>(kFreeBSD only) Use an OPL2-compatible or OPL3-compatible chipvia a kFreeBSD ppi(4) device. This is a recommended alternativeto -opl{2|3}=lpt{1|2|3|4}, because it dosen't require low-levelport I/O privilege.-opl{2|3}=<parport-device>(Linux only) Use an OPL2-compatible or OPL3-compatible chip viaa Linux ppdev(4) device. This is a recommended alternative to-opl{2|3}=lpt{1|2|3|4}, because it dosen't require low-levelport I/O privilege.-cms[=<hex-number>]Use Creative Music System / Game Blaster on I/O port <hex-number> as output device. The default port 220 will be used ifomitted.-cms=lpt{1|2|3|4}Use CMSLPT card on the LPT port specified by an PC BIOS unitname.-cms=<ppi-device>(kFreeBSD only) Use CMSLPT card via a kFreeBSD ppi(4) device.This is a recommended alternative to -cms=lpt{1|2|3|4}, becauseit dosen't require low-level port I/O privilege.-cms=<parport-device>(Linux only) Use CMSLPT card via a Linux ppdev(4) device. Thisis a recommended alternative to -cms=lpt{1|2|3|4}, because itdosen't require low-level port I/O privilege.-sbmidi=<hex-number>Drives an external synth connected to the gameport of your SoundBlaster card. Will read environment variable BLASTER for portif it is not specified.-com=<hex-number>Send MIDI messages out via the RS232 port at I/O port <hex-number>. This can be used to hook a hardware synth to a computerwith no MIDI interface, only a standard serial port. DOSMid doesNOT reconfigure the serial port, so you should take care ofsetting it correctly, for example using 'MODE COM1: ...' commandon DOS, or stty(1) on UNIX.-com{1|2|3|4}(DOS only) Use an unit name of a COM device queried from PCBIOS.-com=<tty-device>(UNIX only) Send MIDI messages to the specified terminal device.-gus (DOS only) Use the Gravis UltraSound card, relying on itsULTRAMID API.-nosoundDisable sound (not very useful for a music player!)-syx=<file>Uses SYSEX instructions stored in <file> for initializing theMIDI device. <file> must be in "SYX" format, and can contain oneor more SYSEX messages.-delay=<n>Insert an extra delay of <n> msec in range 1...9000, beforeplaying the MIDI file. Setting this to 100 or 200 might help insome cases where the sound hardware needs more time toinitialize completely, or when complex sysex data is fed via the-syx option. You can also use this simply to make the silencelonger between the files of your playlist.-sbnk=<file>Makes DOSMid load a custom sound bank. This is supported only onOPL and AWE hardware. The sound bank file must be in the IBKformat when used with OPL, and SBK format for AWE. OPL acceptsone or two IBK files (eg. sbnk=file1.ibk,file2.ibk). If two areprovided, the first one will be used for the standard128-instrument GM set, and the second one for definingpercussion instruments.-preset={GM|GS|XG|NONE}Preset the MIDI device into a specific mode before playing(default is GM).-volume=<n>Set default volume in percentage of <n>.-nocolorDon't colorize TUI even if the system appear to support it.-noxms (DOS only) Use conventional memory instead of XMS. This isobviously useful only if you don't have XMS. Don't use thisoption otherwise, since without XMS you won't be able to loadbig MIDI files.-xmsdelay(DOS only) Wait 2ms before each XMS access. Such waiting isrequired sometimes when the MPU controller is emulated by a TSRdriver (specifically, the AWEUTIL driver used with SoundBlasterAWE 32n64 cards happens to crash if XMS accesses are notslightly delayed).-log=<file>Logs all DOSMid activity to <file>. This is a debugging featurethat you shouldn't be interested in. Beware, the log file canget pretty big (MUCH bigger than the MIDI file you are playing).-fullcpu(DOS only) Do not let DOSMid being CPU-friendly. By defaultDOSMid issues an INT 28h when idle, to let the system be gentleron the CPU, but on some hardware this might lead to degradedsound performance.-dontstopNever ask the user to press a key after an error occurs. This isuseful if you want to play a long playlist and don't care aboutbad MIDI files, simply skipping them (or if you play a singlefile and wish that DOSMid exit immediately if the file isunplayable).-randomRandomize playlist order.-quirk=<name>[,<name>[,...]]Activate one or more workarounds for the specified quirks.Recognized quirk names:norstctrlDon't reset controllers on end of each file.-versionPrint version and copyright information, as well as optionalfeatures of this DOSMid build. DOSMid will exit afterward.-?, -h, -helpPrint a brief usage message and an incomplete list of availableopitons. DOSMid will exit afterward.INTERACTIVE CONTROLSESC, q Quit.+, - Increase or decrease volume by 5%.SPACE Pause the song (press any key to resume).ENTER Skip to next song in the playlist.BACKSPACEJump to previous song of the playlist.ENVIORNMENT VARIABLESBLASTERWhen not forced into a specific configuration via command-lineswitches, DOSMid scans the BLASTER environment variable to findout the most desirable settings. This environment variableusually looks similar to this:BLASTER=A220 I5 D1 T3 P330 H6 E620The bits DOSMid is interested in are "A220", "P330" and "E620".P330 provides the port address of the MPU-401 MIDI interface,while E620 tells the port address of the EMU8000 onboard synth(available only on 'AWE' models). A220, on the other hand,provides the base I/O address of the SoundBlaster card, soDOSMid can output directly to the card's MIDI port. If notinstructed otherwise, DOSMid will always try to use the EMU8000synth if found in the BLASTER string, and if not, it will usethe MPU-401. If neither of them are found in the BLASTER string,or if there is no BLASTER variable at all, then DOSMid will tryto fall back to FM synthesis on port 388h, unless an ULTRADIRenvironment variable is present, see below.ULTRADIR(DOS only) If this variable is set, DOSMid will try to detect aGravis UltraSound card through the ULTRAMID TSR API.HOME (UNIX only) Instructs DOSMid where to find the configurationfile. DOSMid will skip loading configuration file if thisvariable is not set.CONFIGURATION FILEDepending on platform, DOSMid will try to read a configuration filefrom either$EXEC_PATH\dosmid.cfgon DOS, where $EXEC_PATH is where the executable resides, or$HOME/.dosmid.cfgon UNIX, where $HOME is the content of HOME environment variable.When reading the configuration file, DOSMid interprets each line as acommand line option. A line may contain only 1 option, optionally withits argument if applicable; empty lines, lines containing onlywhitespace characters and lines starting with '#' are ignored.AUTHORSDOSMid was initially written by Mateusz Viste.Creative Music System output support by Tronix.CMSLPT, OPL2LPT and OPL3LPT output support by WHR <whr@rivoreo.one>.Ported to UNIX by WHR <whr@rivoreo.one>.This man page was based on dosmid.txt file from original DOSMid 0.9.7release by Mateusz Viste. It was expanded by WHR to cover the addedfeatures in this fork.2024 DOSMID(1)