Invert Left/Right Audio Channels Stereo Sound?

Here you can discuss the development of patches.

Invert Left/Right Audio Channels Stereo Sound?

Postby Tabris:DarkPeace » 2007-6-12 @ 11:49

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. :cool:

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/Mot ... uctID=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). :pppt: ?
=====================

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
You do not have the required permissions to view the files attached to this post.
User avatar
Tabris:DarkPeace
Newbie
 
Posts: 36
Joined: 2007-6-12 @ 11:21
Location: ACT, Australia

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Tabris:DarkPeace » 2007-6-12 @ 12:01

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. :depressed:

[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].
User avatar
Tabris:DarkPeace
Newbie
 
Posts: 36
Joined: 2007-6-12 @ 11:21
Location: ACT, Australia

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby wd » 2007-6-13 @ 10:58

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.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Tabris:DarkPeace » 2007-6-13 @ 14:16

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.
User avatar
Tabris:DarkPeace
Newbie
 
Posts: 36
Joined: 2007-6-12 @ 11:21
Location: ACT, Australia

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Qbix » 2007-6-13 @ 15:42

hmm their soundroutines might detect something on startup ?
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10238
Joined: 2002-11-27 @ 14:50
Location: Fryslan

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby wd » 2007-6-13 @ 15:46

Or they're initializing some timing loop in real mode.
Either way good to know, thanks for the information!
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby nil7 » 2007-9-26 @ 19:30

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
nil7
Newbie
 
Posts: 1
Joined: 2007-9-26 @ 19:13

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Freddo » 2007-9-26 @ 20:22

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.
User avatar
Freddo
Oldbie
 
Posts: 583
Joined: 2003-10-29 @ 21:56
Location: Sweden

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Flint Eastwood » 2008-3-04 @ 14:54

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:
Code: Select all
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:
Code: Select all
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
User avatar
Flint Eastwood
Newbie
 
Posts: 31
Joined: 2005-6-25 @ 12:44

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby wd » 2008-3-05 @ 11:49

I preconfigured the setsound with VDMSound to get sound in Dosbox

To what settings?
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Flint Eastwood » 2008-3-06 @ 21:31

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
User avatar
Flint Eastwood
Newbie
 
Posts: 31
Joined: 2005-6-25 @ 12:44

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Flint Eastwood » 2008-3-07 @ 17:21

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
User avatar
Flint Eastwood
Newbie
 
Posts: 31
Joined: 2005-6-25 @ 12:44

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby ripsaw8080 » 2008-3-07 @ 18:41

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!
User avatar
ripsaw8080
DOSBox Author
 
Posts: 3967
Joined: 2006-4-25 @ 23:24

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Freddo » 2008-3-08 @ 00:15

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.
User avatar
Freddo
Oldbie
 
Posts: 583
Joined: 2003-10-29 @ 21:56
Location: Sweden

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby ripsaw8080 » 2008-3-08 @ 01:32

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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 3967
Joined: 2006-4-25 @ 23:24

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Freddo » 2008-3-08 @ 04:30

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.
User avatar
Freddo
Oldbie
 
Posts: 583
Joined: 2003-10-29 @ 21:56
Location: Sweden

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Flint Eastwood » 2008-3-18 @ 10:48

Inverted Stereo Channels in MilesSoundSystem-Games:

Is there no Dosbox-programmer who has an idea :depressed: ? No small hint :s-face: ? No time to fix this :depressed: ?

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
User avatar
Flint Eastwood
Newbie
 
Posts: 31
Joined: 2005-6-25 @ 12:44

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby wd » 2008-3-18 @ 11:22

No.
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby ripsaw8080 » 2008-3-19 @ 21:19

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:

Code: Select all
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:

Code: Select all
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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 3967
Joined: 2006-4-25 @ 23:24

Re: Invert Left/Right Audio Channels Stereo Sound?

Postby Freddo » 2008-3-20 @ 10:59

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.
User avatar
Freddo
Oldbie
 
Posts: 583
Joined: 2003-10-29 @ 21:56
Location: Sweden

Next

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests