-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CD Audio in Wingstar (1996) #3742
Comments
Looks like the game is using the SB16's mixer to turn down the CD audio volume. A couple solutions I tested:
Here's Staging lastest CI build w/ sbpro2: Wingstar-sbpro2.mp4 |
Nice find. I was trying to do a bisect but it broke many years ago, probably in a DOSBox SVN commit. It was using autotools build system back then and, while I was able to compile 0.74 from source, a lot of the intermediate commits won't build so I'm not able to do a proper bisect. |
OK, pretty sure it's just this commit. Found by looking at Unclear if this is actually a DOSBox bug or a game bug. The game is writing into the Soundblaster port telling us to set CD audio volume to 0 and we're doing what it asked 🤷♂️ Maybe there's an emulation inaccuracy somewhere but if there is I can't find it at the moment. |
Glad it wasn't a real regression, @weirddan455! Thanks for confirming on the code side. |
Other games use the sb16's CT mixer to very precisely control music vs. voice volume; such as turning down the music during speech sequences. So I suspect it's just a game bug (maybe the devs only had an sbpro or GUS). |
@weirddan455 , here's a recording of Warcraft 2 using the SB16's mixer to control the CDROM's volume. From what I can hear, the range of volumes sounds perfect to me: Warcraft2-SB16-Mixer-CDROM-Music.mp4This test is at least one check toward DOSBox being correct. I can't recall other games with this CD-music volume control feature - but sure there are more. |
@interloper98 I tested Warcraft II with some log statements added to the code. It's actually using MSCDEX to control CD audio volume, not the Soundblaster's mixer. You can set Quake is another game that has a CD audio slider but it also uses MSCDEX and doesn't appear to touch the Soundblaster mixer at all. Finding a game that actually uses Soundblaster mixer would be a data point but the problem with Wingstar could be something more subtle like we're reporting a wrong value somewhere else and that's making it mute CD audio. Or it could just be a buggy game. You'd probably have to test on a real SB16 to know for sure. |
I can test it on my AWE32 which is basically an SB16 plus "extras". Also on my ESS which emulates the SB Pro. Better than nothing, I guess. You could also test in PCem and X. |
List of DOS games that use CD Audio in some form (by kcgen): |
Worth noting if I change the in-game setup to use any of the other Sound Blaster settings, CD audio plays fine (it doesn't even attempt to write to the port to mute it) but the sound effects don't play, even I change Setting |
@weirddan455 -- great find! I guess we still need to find a game that tweaks the CD volume via SB mixer. @johnnovak ; damn... That's a huge stack of CD audio games to dig through 😌. I've played some of them; will try to remember if any offered volume control. |
Thanks @interloper98 Ive used sbmixer=false which worked, so as far as eXoDOS is concerned this is resolved as we have a solution. |
@weirddan455 , seeing as Warcraft II and Quake both used MSCDEX, I wanted to find you a couple more that positively use the SB16's mixer to control the CD volume. Here are four confirmed (tested by disabling the sbmixer), with Staging-specific confs that you can drop in and run if you extract these games from eXoDOS zips. (With these custom confs, I'm just launching from the console) Chasm - The Rift (1997)# No setup needed; game auto-detects SB16 on startup.
# Adjust CD audio in Options -> CD Volume.
# The initial 80% CD music volume is pretty quiet, but
# still audible if you turn up the volume.
[dosbox]
memsize = 63
[cpu]
core = dynamic
cpu_cycles_protected = 120000
cpu_throttle = true
[midi]
mpu401 = off
mididevice = none
[sblaster]
sbtype = sb16
sbmixer = on
[autoexec]
mount c .
imgmount d cd\CHASMPR.cue -t cdrom
c:
cd chasm
chasm ChasmThe-SB-Mixing-CD-Audio.mp4Operation Body Count (1994)# Skip the intro scenes and start a new game.
# (You need to start a game to get the CD music underway).
# Press ESC to go back to the main menu, then up arrow and select 'Audio Mix'
# Arrow down to 'CD Music' and hold right-arrow max out its volume.
# Do the same for the 'Master volume', at which point you'll hear the CD music.
[cpu]
core = dynamic
cpu_cycles = 15000
[midi]
mpu401 = off
mididevice = none
[sblaster]
sbtype = sb16
sbmixer = on
[autoexec]
mount c .
imgmount d CD\BODYCOUNT.cue -t cdrom
c:
cd BCCD
call BC CDMUSIC OpBodyC-SB-Mixing-CD-Audio.mp4Terra Inc (1997)# At the main menu, click the lavender music
# icon off then on to reset the music.
# Then you can adjust the music volume using
# the lower scale.
[dosbox]
memsize = 63
[cpu]
core = dynamic
cpu_cycles_protected = 30000
cpu_throttle = true
[midi]
mpu401 = off
mididevice = none
[sblaster]
sbtype = sb16
sbmixer = on
[autoexec]
mount c .
imgmount d CD\TerraInc.cue -t cdrom
c:
CD TERRAINC
autotype -w 3 right enter , enter , left enter x
SETSND
TERRAINC TerraInc1997-SB-Mixing-CD-Audio.mp4WipEout (1995)# Game auto-detects SB16.
# CD audio is playing from the start.
# Volume can be adjusted from the main menu.
[dosbox]
memsize = 63
dos_rate = 60
vmem_delay = 600
[cpu]
core = dynamic
cpu_cycles_protected = 120000
cpu_throttle = true
[midi]
mpu401 = off
mididevice = none
[sblaster]
sbtype = sb16
sbmixer = on
[autoexec]
mount c .
imgmount d cd\Wipeout.cue -t cdrom
d:
cd
cls
call wipeout.bat WipEout-SB-Mixing-CD-Audio.mp4 |
Recommend this be closed as the CDDA audio works however the game is just turning down the CDDA volume using the SB16's mixer IO control.
|
There's a good change there's still an emulation inaccuracy here. |
I think the fact that the above 4 games have good cdda volume control via the SB ctmixer across the entire volume range at least has me confident that the emulation side is correct and that this one game is buggy. My hunch is that developer owned an sbpro and only coded the sb16 compatibility without testing. Another thought is that the developer had an sb16, but used a direct audio out from the cdda drive instead of feeding audio through the sb16 where it can cut the volume. Maybe ran the miniplug output to their stereo or headphones: (Totally agree that verification on hardware is the best though if we're sure the CDROM's audio is routed through the sb16). |
I'm kinda learning towards this explanation, yeah, and conclude that the game is buggy. Pretty challenging to find working CD-ROM drives with CD audio support these days to test on real hardware 😅 |
Added logging around every access of ctmixer's CDA volume value (reads and writes). When
It does that before the intro screen. It doesn't do any more CDDA IO reads or writes after this. When
I looked through the Sound Blaster programming guide https://pdos.csail.mit.edu/6.828/2018/readings/hardware/SoundBlaster.pdf This lets the program selectively turn the line, CD, and mic paths on or off so they're included or excluded from the analog mixing path: bit 4 - Line.L on/off Adding logging for this in the case 0x3c: // Output mixer switches (SB16)
if (sb.type == SbType::SB16) {
LOG_MSG("%s at line %d: IO index 0x3c: Output mixer switches (SB16) value 0x%x",
__FUNCTION__,
__LINE__,
val);
}
break; Rerunning the game with this:
Lol. So the game not only sets the CD left and right volumes to 0, but it then completely shuts off the CD from the mixing output. So it's a double-whammy! I have no doubt the game would mute and disable the CD on a real SB16 too looking at these port writes! Here's the log patch file: log_sblaster_cdda_io.patch.zip Run |
Nice detective work @interloper98 🕵🏻♂️ That's enough evidence to conclude this is a game bug. Well, to their credit, they made sure the CD Audio output is really muted for good 😎 Unless someone can prove the game doesn't completely mute the CD Audio output on Sound Blaster 16 on real hardware (highly unlikely), we can conclude the emulation is not at fault, so closing. Please just use |
Are you using the latest Dosbox-Staging Version?
Different version than latest?
No response
What Operating System are you using?
Windows 11
If Other OS, please describe
No response
Relevant hardware info
No response
Have you checked that no other similar issue already exists?
A clear and concise description of what the bug is.
Run the game (I used eXoDOS version) and on 0.74 you hear CD Audio during gameplay. Use X\ECE\Staging there is no CD Audio
Steps to reproduce the behaviour.
Explain how to reproduce
Download URL of affected game or software
No response
Your configuration
Used defaults with cycles=50000, game folder mounted as C and cd cue file mounted as D
Provide a Log
No response
Code of Conduct & Contributing Guidelines
The text was updated successfully, but these errors were encountered: