VOGONS

Common searches


Invert Left/Right Audio Channels Stereo Sound?

Topic actions

First post, by Tabris:DarkPeace

User metadata
Rank Newbie
Rank
Newbie

Just want to report that Magic Carpet II (and quite likely MC1) have Left / Right audio inverted.

Unlike others I won't make this a n00b user post.

I suspect several other games have this issue, far more than VOGONS indicates so far.

Currently using SB16 emulation.
- Have tried SB Pro (2.0) and SB16 within MC2, albeit with SB16 set in .conf file.
- Suspect SB Pro (1.0), and SB (1.x) had [non]-inverted stereo channels, depending how you look at it (in the physical hardware that is), has been over a decade can't exactly recall though.

I have attached my 'dosbox.conf' file. 😎

Key parts: (Comments ##//## not in actual file - see attachment).

core=dynamic
cycles=max
cycleup=1000
cycledown=1000

nosound=false
rate=22050
blocksize=960 ##//## I believe 88 - 96 bytes per 1/1000th second gives best SB quality in DosBox after much testing.
prebuffer=10 ##//## 10 ms prebuffer, matched to 960 bytes above.

mpu401=intelligent
device=default
config=2 ##//## Remapped MIDI to a Wave

sbtype=sb16
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050

[GUS enabled as per default, but not in use]
[I've trued GUS in game [NWSETUP.BAT], and GUS appears to be mono only to my ears, in MC2 at least, is that correct ?]

=====================
MIXER /LISTMIDI output (dumped to file)
=====================

0 "SB X-Fi Synth A [B000]"
1 "SB X-Fi Synth B [B000]"
2 "Microsoft GS Wavetable SW Synth"

=====================
System overview:
=====================
CPU: Intel Core 2 Duo 2400/1066
VID: Gigabyte branded nVidia GeForce 7600 GT (Silent Pipe II)
RAM: 4 GB RAM (DDR2-800, G.Skill)
MOBO; Gigabyte GA-956P-DQ6 (Rev 1.x) mainboard:
http://www.gigabyte.com.tw/Products/Motherboa … ?ProductID=2295
SND: Creative X-Fi XtremeMusic (BTW: Remapping MIDI works very nicely thanks).
OS: Windows XP Professional x64 Edition

=====================
Notes:
=====================
'dosbox_11.06.2007.exe' process has a *32 next to it in TaskMgr.exe.
If anyone can compile a more native Win.x64 DosBox (available say weekly) it would REALLY be appreciated). 😉 [gut feeling is it'll gain another 25% or so in cycles, 'cuz its emulated].

Yes, I think I am running the 'latest' 'AEP CVS', as you guys call it (as of now anyway)... not sure what the AEP implies, FYI: I understand CVS but don't use it. (Documentation not quite clear on this, and the links are jumping around a little bit).

I've managed to play Magic Carpet 1 though to the end of the game (finish Level 50) using the MC Hidden World CD-ROM (both games), and SOUND BLASTER COMPATIBLE audio at game config / start (vs SB16 which also worked but seamed to crash [more] often.

Using CPU=MAX (vs AUTO) also appears to help Magic Carpet for some reason.

Using CORE=DYNAMIC obviously helps MC heaps. 😉 - I'd like to read more up on DynCore vs Normal vs Simple vs (others) some time.

=====================
PS: Have you considered making some kind of template / example of how user posts should look and what to include (and possibly automate finding, logging it, maybe even zipping it somewhere obvious for the dumb-arses out there). 😜 ?
=====================

I've been using DOS for a long time, still have PC-DOS 6.1 on my bookshelf, and MS-DOS 5.xx, 6.00 - 6.20 - 6.22, aswell as PC-DOS 6.3 and 7.0 (Stacker 4.0 for DOS included) somewhere.

I'd also be able to help out with documentation..... for a price (invertaudio in the .conf will do). Then doco up HowTo's / examples on getting other 'DOS' environments to work, such as MS/PC-DOS under DosBox (assuming it is possible, and it should be based on what I've read so far on VOGONS).

Regards,
Tabris:DarkPeace

Attachments

  • Filename
    dosbox.conf
    File size
    1.57 KiB
    Downloads
    389 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    LISTMIDI.LOG
    File size
    96 Bytes
    Downloads
    436 downloads
    File license
    Fair use/fair dealing exception

http://users.on.net/~darkpeace

Reply 1 of 83, by Tabris:DarkPeace

User metadata
Rank Newbie
Rank
Newbie

Oh,

And that was in High-Res mode too (640 x 480, or is it 640 x 400 [?]) that I finished Magic Carpet 1 in.

Have yet to finish Hidden World, as switched to Magic Carpet 2, which actually utilizes the x87 FPU, very smooth reflections, light sources, shading, etc compared to MC1.

Using SB Pro 2.0 in dosbox.conf and SB Pro 2.0 in SETSOUND also gives inverted left/right stereo audio channels.

Also noticed you've got the SET BLASTER variables changing correctly (T4, T6, etc), nice touch.

I am going to go through the main combinations and see if I can find any that appear to be either MONO, or don't invert left/right audio channels.

I am slightly deaf in one of my ears, and it is really off putting while playing. 😢

[Yeah, I know - Don't double post unless adding something worthwhile and avoid it in general - at least with MC2 you can save mid level, reload, far quicker to test than MC1].

http://users.on.net/~darkpeace

Reply 2 of 83, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The recorded wave seems fine for me, sb16 selected as digital audio
device in MC2. An explosion that was to the left produced larger amplitudes
on the left channel. But in general there doesn't seem to be very much
stereo effect (according to the recording).

Using CPU=MAX (vs AUTO) also appears to help Magic Carpet for some reason.
Using CORE=DYNAMIC obviously helps MC heaps.

Can't be, for mc2 the auto settings match core=dynamic and cycles=max.

Reply 3 of 83, by Tabris:DarkPeace

User metadata
Rank Newbie
Rank
Newbie

Can't be, for mc2 the auto settings match core=dynamic and cycles=max.

I know, but Magic Carpet 1 and 2 seam to crash far less often when they are both specified manually in dosbox.conf for some reason.

http://users.on.net/~darkpeace

Reply 6 of 83, by nil7

User metadata
Rank Newbie
Rank
Newbie

I have the same problem with inverted stereo. I'm playing System Shock (sshock), the cd-rom version.

I've tried Sound Blaster 16 and pro and are using the game to autodetect values (which I guess uses the DOSBox default set value, A220 I7 D1 H5 T6)

I'm using DOSBox 0.72 on Windows XP SP2.

--Nils

Reply 7 of 83, by Freddo

User metadata
Rank Oldbie
Rank
Oldbie
nil7 wrote:

I have the same problem with inverted stereo. I'm playing System Shock (sshock), the cd-rom version.

There's a stereo reverse option in the game options. Use it, and you will be fine.

The only two games I can think of that play reverse stereo sounds and doesn't have any option to fix it, are Redguard and Fade to Black. Of course, there are plenty of games I never played, such as Magic Carpet II which was mentioned earlier.

Some sort of setting for reverse stereo for the sound blaster emulation in the config file would be awesome.

Reply 8 of 83, by Flint Eastwood

User metadata
Rank Newbie
Rank
Newbie

I was waiting to let the development go further but now I think it's time for my problem:

Stereo-Sound in Schleichfahrt(Archimedean Dynasty) and GTA is inverted. I have this problem as long as dosbox is capable to run this games. Now I'm using CVS 08-02-25.
My config looks like this:

sbtype=sb16
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050
hardwarebase=220

If it helps: Schleichfahrt uses Miles Sound System 3.50f . I'm not able to set the soundcard in dosbox.(I preconfigured the setsound with VDMSound to get sound in Dosbox)
In DosBox the setsound.exe gives me this error:

ERROR
Could not allocate SAMPLE structures
Check driver type and configuration

By the way: Channels in Rayman1 are correct but I think it doesn't use Miles Sound System.

i7 870 + Zotac 470GTX AMP! + 12GB RAM + Win7 64Bit

Reply 10 of 83, by Flint Eastwood

User metadata
Rank Newbie
Rank
Newbie

Oh, I set the setsound to Soundblaster 16.
I used the same values IO-Adress(220),IRQ(7),DMA-8bit(1),DMA-16bit(5) in VDMSound as I use in Dosbox.

i7 870 + Zotac 470GTX AMP! + 12GB RAM + Win7 64Bit

Reply 11 of 83, by Flint Eastwood

User metadata
Rank Newbie
Rank
Newbie

It seems, that the "swapped-channels-problem" occures in all games which are using Miles-Sound-System.

I was playing Gene-Wars today and there were swapped channels.

i7 870 + Zotac 470GTX AMP! + 12GB RAM + Win7 64Bit

Reply 12 of 83, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I've also encountered the reversed channels in X-COM Apocalypse, which uses HMI (Human Machine Interfaces), but it has a persistent setting to swap the channels, so it's no problem.

The CD version of System Shock also has reversed channels, and it uses AIL3 (which I believe is Miles). I have tried both the SBPro and SB16 drivers with several configurations, and the channels are reversed by default in all cases. According to the game's README, the AIL3 drivers had newly added stereo support at the time. Although the game does have a setting to swap the channels, it is a little buried in the interface, and it does not remember the setting from one session to the next... which is unfortunate, because if you've ever played the game, you know that correct stereo channels are rather important!

Reply 13 of 83, by Freddo

User metadata
Rank Oldbie
Rank
Oldbie
Flint Eastwood wrote:

It seems, that the "swapped-channels-problem" occures in all games which are using Miles-Sound-System.

I was playing Gene-Wars today and there were swapped channels.

I'm more inclined to belive it's how Bullfrog did things.

I just tried GeneWars too, and it's indeed swapped. So Magic Carpet 1 & 2 and GeneWars are swapped and they are all from Bullfrog.

I also checked out Syndicate Wars which is by Bullfrog, but it seemed to be in mono to me.

ripsaw8080 wrote:

The CD version of System Shock also has reversed channels, and it uses AIL3 (which I believe is Miles). I have tried both the SBPro and SB16 drivers with several configurations, and the channels are reversed by default in all cases. According to the game's README, the AIL3 drivers had newly added stereo support at the time. Although the game does have a setting to swap the channels, it is a little buried in the interface, and it does not remember the setting from one session to the next... which is unfortunate, because if you've ever played the game, you know that correct stereo channels are rather important!

I never had that problem with System Shock. It saves the settings for me.

Reply 14 of 83, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
Freddo wrote:

I never had that problem with System Shock. It saves the settings for me.

The CD version I have is vF1.6C, and I have heard of no other. Ingame settings are stored in the savegame files, and all of them work EXCEPT the "stereo reversed" setting, it always resets to "stereo normal" when you restart the executable and restore a game. If you bother to try it, you will see it is so.

Reply 15 of 83, by Freddo

User metadata
Rank Oldbie
Rank
Oldbie
ripsaw8080 wrote:
Freddo wrote:

I never had that problem with System Shock. It saves the settings for me.

The CD version I have is vF1.6C, and I have heard of no other. Ingame settings are stored in the savegame files, and all of them work EXCEPT the "stereo reversed" setting, it always resets to "stereo normal" when you restart the executable and restore a game. If you bother to try it, you will see it is so.

A yes, it seems like my memory is faulty. Strange, since it wasn't that long ago I played thru it with DOSBox.

Reply 16 of 83, by Flint Eastwood

User metadata
Rank Newbie
Rank
Newbie

Inverted Stereo Channels in MilesSoundSystem-Games:

Is there no Dosbox-programmer who has an idea 😢 ? No small hint 😖 ? No time to fix this 😢 ?

By the way:
In Archimedean Dynasty is an option to swap channels but it only swaps channels in 3D-fights. The videos are not swapped.

i7 870 + Zotac 470GTX AMP! + 12GB RAM + Win7 64Bit

Reply 18 of 83, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The specific game, or its drivers, are most likely at fault for swapping the stereo channels, so there's really nothing to "fix" in DOSBox; but it is possible to make it a bit more adaptable.

Implementing a reverse stereo feature in DOSBox at the mixer level is fairly simple, at least conceptually. It's so simple, it almost doesn't qualify as an idea, but there are some details in fully implementing it.

This code is from the AddSamples method in mixer.cpp that reads 8-bit stereo samples:

diff[0]=(data8s[pos*2+0] << 8)-last[0];
diff[1]=(data8s[pos*2+1] << 8)-last[1]

By reversing how the samples are loaded, you get reversed stereo:

diff[0]=(data8s[pos*2+1] << 8)-last[0];
diff[1]=(data8s[pos*2+0] << 8)-last[1];

I've kept the example brief, but the same would have to be done for 16-bit and signed samples as well.

To fully implement a patch for the feature, I envision a setting in the [mixer] section of the conf file such as "stereoreverse=false" -- false being the default so nothing changes unless someone wants it to. A parameter for the MIXER command inside DOSBox such as "MIXER /STEREOREVERSE" would also be a nice touch.

I have this working as a patch, but it's probably not as efficient as it could be. I'll keep working on it, and look into adding the extras I mentioned as well.

Reply 19 of 83, by Freddo

User metadata
Rank Oldbie
Rank
Oldbie

Looks good ripsaw8080, and good luck with it 😀

Hopefully the patch will eventually be integrated with the DOSBox CVS as it's needed to get the sound correctly in some games.

A conf setting for this would be wonderful.