• Please review our updated Terms and Rules here

Windows 3.1 drivers for newer hardware

To restrict the user to a single driver would seem like a shame.
The OPL,YFM and MPU drivers can all be used at once in a single midi setup.
After you install both my drivers, you should be able to use both the smidi and wmidi drivers in a single MIDI setup.
Just select the driver you want to use for each channel.


WMidirun is a program that gets single midi commands from WMidi.dll
You can choose to have the notes processed by a "Timer" or by a "Loop".

There are several sound output options.
Which were you able to use?

Sndplaysound is the default option. It allows you to play a MIDI using wave files (0..127) on the default MCI wave device.
No mixing is done for this option.

Wavemix uses the 8 mixed channels of wavemix.dll to play wave files for 8 MIDI channels.

PMWM is a custom 16 channel mixer for more powerfull computers.



Xacalite, were you thinking of adding the functionality of smidi to wmidi?
Or were you thinking of creating a MCI Midi driver with MCI Wave output?
 
Xacalite, were you thinking of adding the functionality of smidi to wmidi?
No.
More like about an improved variant of SMidi.
From what I understand, SMidi can't play more than one note at a time, so a lot of notes from MIDI songs are skipped, therefore they sound bad.
If it was possible to play a few notes simultaneously, .MID songs would sound better.

Or were you thinking of creating a MCI Midi driver with MCI Wave output?
Such a driver does exist, and it's called "WMidi", right?
There's also an MCI Wave driver for PC Speaker, but very limited, doubtful if it can be used with WMidi.
 
The MCI (media format) drivers are easily confused with the hardware output drivers.
Wmidi does not handle MCI commands.
The default MCI Midi driver uses the midi mapper to output midi data (from a *.mid file) to midi drivers such as wmidi. (as midi commands)

Since most PCM PC speaker drivers require 90% of processing power, playing midi on these might not work as a runtime driver.
It might be better to preprocess the midi commands directly from the *.mid file into a *.wav file and then use the PC speaker driver to play the result.

Speaker.drv might work for output but the playing latency caused by the preemptive mixing would sacrifice extensive amounts of time and space.
What are your suggested target specs?

Do you have a working example of your idea?
 
Last edited:
First and foremost, they could use better documentation.

I was using Windows 3.1 with various sound cards, and never had to edit MIDI setups.
If it's possible to do this automatically via OEMSETUP.INF, then it should be done automatically, if not - the procedure should be described in README.TXT

Windows 3.1x didn't appear to have an official way to update the MIDI mapper configuration. Drivers outright replaced midimap.cfg with a copy pre-configured with the synth driver they installed.
 
Since most PCM PC speaker drivers require 90% of processing power, playing midi on these might not work as a runtime driver.

On slow systems, yes. But if you're targeting systems that are already 200 MHz or faster with your driver (and considering your driver requires more than 65 MB of RAM, I think I'm guessing correctly), 22KHz PWM speaker output would be nearly nothing on such a system, less than 5%.
 
Xacalite, I was referring to source code examples.

There were several windows 3.1 PCM speaker drivers.
Which one were you thinking of using?

If it would not work on systems that predate sound cards and on board audio, then it would be needed at all?
There are windows 3.1 drivers for 8,16,32 and 64-bit sound cards.

I've decreased my drivers memory requirements somewhat.
They should work with less than 64mb of RAM after the TSR is installed.
 
I'm confused; I thought the > 64MB RAM was a hardware/technical limitation, something like an address space overlap that you need more than 64MB to relocate. If that's not the case, why do the drivers require 64MB of RAM?
 
When Windows is in Real Mode or Standard Mode, memory pointers usually have hardware memory addresses.

However, Enhanced Mode windows uses "Virtual Memory" pointers.
The memory handles that each "Virtual Machine" receives may be reassigned to different locations in RAM or even to "Virtual Memory".
The exact location (and very existence) of "Virtual Memory" is undefined.
A programmer might write a 32-bit VXD that uses "Virtual Memory" to simulate a hardware bus master.

My drivers are all 16-bit.
Each driver simply needed an unused location outside the range of the "Virtual Memory".
Now I have added a TSR to reserve some XMS before windows starts.

The RAM limit features of himem.sys were created for computers that inaccurately report the amount of XMS.
Windows can use more than 64mb of ram.
 
Xacalite, I was referring to source code examples.
For what exactly? PCM playing on PC Speaker? It's easily found, see eg. drivers for old Linux kernels:
http://www.oocities.org/stssppnn/pcsp.html

There were several windows 3.1 PCM speaker drivers.
Which one were you thinking of using?
Are there any important differences between them?
I've only tried the driver distributed as a part of "Windows 3.1 Driver Library".

If it would not work on systems that predate sound cards and on board audio, then it would be needed at all?
Well, I know that it wouldn't be really useful, but still, might be a fascinating thing to try. Exactly the same way as SMidi.
 
You may have to go Turbo for some good 286 code. :D

Each driver I've seen is different.
The most common one I've seen requires 100% CPU usage while playing.

Playing midi was a difficult task for a 286. (and even a 386!)
That is why autonomous sound hardware and external midi modules are so great for older systems.

It might be better to have an external x86 do the midi speaker playing for your primary computer.
An LPT or serial interlink, or perhaps a Network might do the job.
It would also allow you to reuse your DOS and Linux code. ;)
 
Xacalite, how many and of what sort are your Later PCs?
PC speakers.... or piezoelectric buzzers?

Not every computer has a classic PC speaker. :(
 
For the record, that driver is terribly inefficient and not accurate.

From what I recall, it wasn't bad - it allowed to normally use the system during PCM playback, on a fast 486.
The Windows 3.1 driver, on the other hand, didn't allow for anything else - the system just displayed the hourglass...

Xacalite, how many and of what sort are your Later PCs?
PC speakers.... or piezoelectric buzzers?
Not every computer has a classic PC speaker. :(

At this moment just one machine with Windows 3.1 - a 386DX/40 with a regular dynamic speaker.
And yes, I know that piezo ones are very bad for such tricks.
 
Xacalite, if it won't work, why ask me?

Mixing sounds stored in the RAM of your 386 would leave little space and time for other windows programs
and PCM wave data is generally too large to send to a remote player.
Do you have a sound card for your 386?

Which of your machines lacks a MIDI device?
 
Xacalite, if it won't work, why ask me?

Relax, I don't insist on you (or anybody else) making such a driver.
Simply, I was surprised to see a MIDI driver for PC Speaker, and wanted to discuss possible enhancements.
This is a discussion forum, after all.
 
I find old computers quite fascinating. :D
There is a sound card in each of my win3.x machines.
Xacalite, what type of ISA sound card do you use in your windows 3.1 computer?


I don't think Standard Mode had a high speed timer and
an uneven time slice would make the driver's sound quality very poor.
Do you have a TSR that will do the work?
 
Is that the same as the Media Vision Pro Audio Spectrum?
Do you have four MIDI channels?

Neither Enhanced Mode nor Standard Mode will run without the support of DOS TSR drivers.
Windows is a just a DOS program.

On a 386, your idea would make the most sense for single tasking 8086 DOS programs.
I would guess that it would cause the time slice to shift toward turbo.
 
Back
Top