VOGONS

Common searches


First post, by TomLewandowski

User metadata
Rank Newbie
Rank
Newbie

Greetings!

Is there support for two PCI Soundcards to operate simultaneously under DOSBox?

I currently enjoy using DOSBox with an old DOS MIDI Sequencer, Voyetra's Sequencer Plus Gold. I load SpG's "VAPIMPU.COM" driver in order to enable access to my SoundBlaster Audigy's MIDI Port (interface), where a Sound Canvas module is connected. Using additional drivers, I can access additional MIDI ports.

Since MIDI devices are normally accessed on more than one MIDI port via seperate MIDI Interfaces, I'd like to use a second PCI soundcard's MIDI Port for another external MIDI module. Is it possible to setup the DOSBox configuration file to address two soundcards, independantly?

Thanks!

Tom Lewandowski
QUEST STUDIOS
tom@queststudios.com

Reply 2 of 43, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Which means, get someone who can program and has some experience in MIDI stuff (and wants to help you, of course 😉 ) to do what ih8 says. With open source, you're allowed to do that. The result can be posted on the sourceforge patches site for others to enjoy.

Reply 3 of 43, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

I don't have a second midi device setup to test with, so working out any bugs may be slow going doing post tag, but give this a try. What I do know is there's two virtual midi devices present with the second device set to dosbox's null midi device(because my formentioned sans second midi device), where I can point to them and get sound(present midi device) or nosound(non present device). In your dosbox.conf, add secondmpu=true in the midi section. Second virtual mpu is on port 332.

OK, figured out more. It's not working yet but close. I figure out the bug and it should work. Another variable added is config2; like config, you specify the midi device index number(counting starts at zero).

Got it:) Just let me clean it up and I'll update here.

secondmpu.diff is a non-working version, but I'll leave it for those who want to see this intermediary step.

Attachments

  • Filename
    secondmpu.diff
    File size
    36.54 KiB
    Downloads
    134 downloads
    File license
    Fair use/fair dealing exception
Last edited by ih8registrations on 2006-01-07, 19:12. Edited 2 times in total.

Reply 4 of 43, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

OK, got rid of secondmpu config variable, all you do is add/set config2 to a device. If config2 is null, it doesn't get init'ed. Default to midi mapper only applies to first device. Only tested in windows, should work with oss, coreaudio, but alsa not there yet. see comments. It'd be a small step to do N devices.

Testing being playback through each device seperately; havn't tested simultaneous. For that, voyetra sequencer gold is available for free from turtle beach's website(owners of voyetra), but I couldn't get subst to work and don't feel like setting up the four floppies so if if you could post your already installed copy to save the hassle.

Your log window will show something like the snapshot.

woops, deleted the snapshot.

Attachments

  • Filename
    secondmpu2.diff
    File size
    42.63 KiB
    Downloads
    155 downloads
    File license
    Fair use/fair dealing exception
Last edited by ih8registrations on 2006-01-10, 12:51. Edited 4 times in total.

Reply 6 of 43, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

I guess it requires the install to change the drivers to two midi devices that will work with dosbox. and.. I can run the program but I'm not familier with it in order to setup two devices for playback and load a file for testing. Care to give some tips? Yay/nay, your testing of it works?

Reply 7 of 43, by Tom Lewandowski

User metadata
Rank Newbie
Rank
Newbie

I'm a bit confused as to how to go about loading two MIDI drivers in SpG. I don't really understand how DOSBox works, and therefore, don't know if I can be of any help. (I'm not a programmer -- so please bare with my ignorance.)

As I understand it, when DOSBox loads, there's support for a PCI MIDI device configured with IRQ 5 and I/O 330H -- which emulates a MPU-401 MIDI Interface, sort of. (MPU-401 is hardwired to use IRQ 2/9, only.) When I load the SpG "VAPIMPU" driver, I tell it to look for a MPU MIDI interface at I/O 330H. Normally, if the MPU interface ISN'T using IRQ 2/9, you have to also tell the driver which IRQ it IS using. But for some reason, this isn't necessary under DOSBox...even though it states the Sound Blaster is using IRQ 5.

If I want to load the driver for a SECOND MIDI Interface, I typically use the "SAPIMPU" driver, and indicate what resources the second interface is using. For example, SAPIMPU /irq:7 /addr:300

By ommitting the "/irq:7" parameter, the driver then 'assumes' IRQ 2/9 is being used...the MPU-401 default IRQ.

-----------------------

Presently, under DOSBox (with the copy of SpG I uploaded), I would load the drivers and program in this manner:

/spg/
vapimpu.com /addr:330 (The MPU driver loads.)
spg.exe

So, if I wanted to add support for a second "MIDI Port" (Interface), I would typically do something like this:

/spg/
vapimpu.com /addr:330 (The MPU driver loads.)
sapimpu.com /irq:5 /addr:300 (The second MPU driver loads.)
spg.exe

Once in SpG, pressing "F" from the MAIN screen will present a FILE MENU. Repeatedly pressing "M" while in the FILES menu will switch between the type of files that can be loaded: MIDI, SNG, etc. Once a file is loaded, moving your cursor to the "PORT" column lets you output that channel to the MIDI device controlled by either the VAPI or SAPI driver. i.e., VAPIMPU is sending MIDI data to the first soundcard's MIDI port, Port 1, while SAPIMPU is sending data to the SECOND sound card on Port 2.

Pressing "V" from SpG's MAIN screen will give you a better 'veiw' of the MIDI tracks and channels being used.

Hope this makes sense. 😀

Basically, I would need to know HOW to access the SECOND soundcard; what IRQ and I/O address to tell SpG where to look for the second MIDI device.

Reply 8 of 43, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

uhm the mpu interface is hardwired to irq 2/9
not irq 5 or 7. that is the regular soundblaster irq. not the midi irq.

Water flows down the stream
How to ask questions the smart way!

Reply 9 of 43, by Tom Lewandowski

User metadata
Rank Newbie
Rank
Newbie

uhm the mpu interface is hardwired to irq 2/9
not irq 5 or 7. that is the regular soundblaster irq. not the midi irq.

Yeah, I know. Most of Roland's (if not all) MPU's were not adjustable; they were set for IRQ 9 (IRQ 2 in the old days) and at locked address: 330H. My other PC's have ISA slots, were I have Roland MPU-IPC's installed. Their IRQ & I/O can't be changed, but these are 100% MPU-401 compatible...unlike the MIDI ports on soundcards. Real Roland interfaces can simultaneously transmit and receive significant streams of MIDI data, whereas this is rarely the case with a soundcard's MIDI port.

But since the IRQ and I/O's on soundcard's can normally be adjusted, this is desirable when you won't be requiring any back & forth MIDI streams for a given MIDI device. It's also VERY handy for today's PC's that don't have ISA slots for MPU-401 cards, and have to depend on PCI and USB MIDI ports.

As long as two PCI MIDI cards can be identified by two different I/O addresses in DOSBox, this should work for any DOS-based music software supporting MIDI devices.

===========================

So, I'm a bit confused, now.

Based on the two new files you posted (DOSBOX.EXE and SECONDMPU2.DIFF), how do I setup DOSBox for two MIDI soundcard support....or, did I misunderstand -- that can't be done yet?

Reply 10 of 43, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

In dosbox.conf:
[midi]
config=0 # mpu at port 330 = an index number for a midi device in windows, in this case, 0
config2=1 # mpu at port 332 = same, but set to windows midi device 1

vapimpu.com /addr:330
sapimpu.com /addr:332

The second mpu is currently set to the same irq(which might have to change).

btw, they have a more recent sapimpu driver:
http://www.voyetra.com/site/kb_ftp/340ftp.asp

Reply 11 of 43, by Tom Lewandowski

User metadata
Rank Newbie
Rank
Newbie

config2=1 # mpu at port 332 = same, but set to windows midi device 1

Sorry to be so out of it with this, but...ummm...I don't know how you go about setting up WinXP in this manner, other than through the "Sounds & Audio Devices Properties" and the "MIDI Music playback" option within. ("midi device 1" ??) I thought WinXP only allows you to choose one item for MIDI output. I have very little experience with WinXP and know little about its configuration files...

I do have newer VAPI and SAPI drivers, as well as other, newer SpG files, but I use what works best for my devices. This older VAPI driver works well with my Yamaha SW60XG soundcard, while the older SAPI driver worked better than newer releases with my AWE32's MIDI port. I copied the files from another PC's installation of SpG (which is running under MS-DOS 6.22), that I'm also able to use on my WinXP system...thanks to DOSBox. 😀

Reply 12 of 43, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

That's for setting the midi mapper. The selection of devices which you can set the mapper to is what we're using.

I've successfully tested spg. It took another update to get them to work simultaneously(isolate playmsg & playsysex like open close to keep them from stomping on each other) so updated patch & exe ensues.

oss & coreaudio need testing, & alsa handling still needs to be written.

Attachments

  • Filename
    dosbox.exe
    File size
    3.24 MiB
    Downloads
    134 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    secondmpu3.diff
    File size
    48.55 KiB
    Downloads
    148 downloads
    File license
    Fair use/fair dealing exception

Reply 13 of 43, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Sorry to post off-topic (as you all know I love to do), but I just had to say hello to Tom - welcome to VOGONS! I've contributed stuff to your site in the past (some Betrayal at Krondor saves I think - it's been a while!) and recently revisited it when I purchased an SC-88 and MT-32 on eBay last summer.

Reply 14 of 43, by Tom Lewandowski

User metadata
Rank Newbie
Rank
Newbie

That's for setting the midi mapper. The selection of devices which you can set the mapper to is what we're using.

Can you continue that thought? What do I do with "the selection of devices..." after I access it? I'm sorry -- I don't know what you're explaining that I need to do in Windows. As I've said, I don't know WinXP very well. If I change the MIDI mapper from my current Sound Blaster I/O setting, the MIDI port no longer works under DOSBox.

====================
Greetings, Hunter!! I just knew there HAD to be some Quest Studios participants working with DOSBox! Thanks for the Welcome!

Tom

Reply 15 of 43, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I think what happens is that each of the MIDI devices you see listed on the MIDI "default device" dropdown list is assigned a number by Windows. That number is what you're supposed to designate for the config= lines in your dosbox.conf. I have no idea how to find out what number corresponds to which device, however (if you're lucky, it may be that 0 is the device selected as default and numbers 1 and up correspond to all devices as listed in the dropdown).

Unfortunately I've never experimented with this myself, as I've never had a need to use more than two MIDI devices simultaneously in DOSBox.

Reply 16 of 43, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

You don't do anything in windows to the selection of devices other than having them installed. Dosbox uses the default midi device when the config line isn't set. To use two mpus, both config & config2 need to be set(ala config=0, config2=1, or config=2, config2=5, etc).

Reply 18 of 43, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Would be nice if there could be a command built into DOSBox to list the devices, as can be done with the mount command for CD-ROM device numbers for use with the -usecd parameter.

Reply 19 of 43, by Tom Lewandowski

User metadata
Rank Newbie
Rank
Newbie

Well, I was able to get this to work with the Audigy's MIDI I/O port, and one software synth -- the Virtual SC. I've been trying all the devices in my WinXP MIDI list:

0 - Sound Blaster Audigy MIDI I/O <--first MIDI port
1 - Roland Virtual Sound Canvas
2 - Yamaha WF192XG FM Synth
3 - Yamaha WF192XG MIDI I/O <--second MIDI port
4 - Sound Blaster Audigy SW synth
5 - Sound Blaster Audigy Synth A
6 - Sound Blaster Audigy Synth B

If I change "config2=" to any number other than "1", I don't get anything. I haven't been able to access either the Yamaha FM or its MIDI I/O...which is what I need to be able to do in order to connect another MIDI module to the Yamaha MIDI I/O.

I've been trying:
config=0 (which I need for the Audigy's MIDI port)
config=3 (which I need for the Yamaha's MIDI port)

SpG just sends the output of both ports to the Audigy MIDI port. I'll keep playing with it and see if I can get something to work. Maybe the SAPIMPU driver is the problem...