-
Notifications
You must be signed in to change notification settings - Fork 365
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
Can't game on Windows 98 SE unless sbtype = none #2689
Comments
I have not yet tried installing Windows 98 SE on macOS. I wonder if this issue is specific to macOS? |
If it is specific, I'd love to hear. I have noticed that DOSBox-X gives wrong IRQ, DMA and HDMA to the SB16 when I reach the Windows 98 Desktop. But fixing that issue did not fix my problem. Here's the thing: I've set I7 D1 H5 for sb16 in dosbox.conf. yet when checking the assigned values from DOSBox sound menu, it's 2, 3 and 5 (I can't remember now, I'm at work, but basically it's not what I have assigned). Then I removed it from dosbox.conf and manually assigned them through Device Manager in Windows 98SE, as well as set the blaster environment in autoexec.bat. Now DOSBox-X reports the right configuration, however, the games still crash. Since it crashes with both glide and software mode when sound is enabled, I already discarded any issue with OpenGlide; I have tried with both kjliew's and almeath's OpenGlide implementations as well. Could it be a SDL audio issue? Does SDL even deal with it? |
@brunocastello It is interesting to hear that the sound menu shows a different IRQ than the one assigned in the config file. Does this issue happen when you are in DOSBox-X' integrated DOS? Or only when you boot to Windows 98 desktop? As for SDL, it might be related. Have you tried the SDL2 build and see if there are any changes? |
@Wengier happens when I boot to Windows 98. I haven’t checked when using integrated DOS, because I have never used. But shows correct one when I force them through Windows 98 Device Manager. SDL: I didn’t even try SDL2 as far as booting into Windows 98, because the SDL2 build has 2 problems for me, the yellow screen (no matter what video driver I use, it is always yellow) and OpenGlide works only with SDL12. So without OpenGlide I couldn’t test these games in SDL2 build... |
@brunocastello The main purpose for trying the SDL build is not to actually use it as the main build, but to try to isolate the issue. Whether it works there may help us find out the cause of the problem. Similar for the IRQ assignment. |
OK, I will try to find some time next night to try it out. I was out for dinner this night. |
@Wengier compiling a SDL2 build to test as we speak... btw the compiler returned this message: Okay, compiled. Let's see if it will let me play with sound on, despite of the yellowish screen desktop: Edit: I tried both versions of Need For Speed II SE (NFS2SEN and NFS2SEA). Both crashed to desktop before race start. |
Ah, I'm having the same issue! I couldn't understand why so many games were crashing in Win98SE until I saw this issue. In my case, the games I was trying were not 3D accelerated (Heroes of Might and Magic II, Might and Magic VI), but as soon as I set sbtype=none, the games are stable. It did seem like certain sounds were possibly triggering the crashes. I just tried changing the config on the Apple M1 version of Dosbox-x (0.83.15), but I had the same problem on other platforms (Windows x86_64). I have yet to see if this fixes the crashes on the x86_64 builds. |
In the issue I linked to in my previous comment (#2621), the author discovered that changing the CPU type from pentium_mmx to pentium resolved the issue. Sure enough, I tried it on my M1 Mac and it indeed resolved the issue for me as well (I believe the author was on x86_64, but it resolved it on both platforms). @brunocastello I would try this and see if it fixes the issue with your games too. If it does, I would suspect there's an issue with sound involving the pentium_mmx cpu type. @Wengier , any thoughts on that possibility? |
@stephenbonar actually I have tried it before, and no, it does not solve my issue. No matter what cpu I set for Windows 98SE, all games will crash if I attempt to play with sound on. Without sound I can play them all. I have tried pentium mmx, pentium pro, pentium, 486, and even set it to auto. no luck. |
The problem is still persistent with the most recent builds released, both SDL1 and SDL2. |
Maybe it could be a problem between DOSBox-X and macOS coreaudio? I am yet to set up dosbox-x with an ubuntu linux x64 VMware machine to check it out, using the same Windows 98 image I am using for dosbox-x. But since three or four versions (for macos) ago, I am unable to play any game under Windows 98 SE with any sound card. When there is no sound, all games run without any problem. |
@Wengier I think I have made some little progress. I went to dxdiag in Windows 98 SE and turned off Hardware sound acceleration. This time I was able to play for a couple of seconds before it crashed to the desktop again. NFS2SE: I nearly managed to complete a lap before CTD There is definitely a sound problem and it is related to the game's speed. |
Version 0.83.17, still unable to game with sound on. Games crash on Windows 98SE when there is sound. EDIT: Compiled latest code (0.83.18) without avcodec and fluidsynth, yet the situation persists. I have to set sbtype=none (no sound) to be able to play any games on it. |
Anyone with any suggestion about what else I can do to work around this issue? It has been there since July |
One thing I would try is setting the SB16 IRQ to 5 in the .conf file (or set it to 0, in which case it DOSBox-X will automatically set it to the default value for the sound card, 5 in this case). As I understand, 5 was the default value used by SB16 cards, while 7 was for an earlier card. If that doesn't fix it, above you wrote "DOSBox-X release version: SDL1.2 0.83.15 (The problem is persistent since several versions before)". Were you able to play those games without issue on some version in the past? If you have time to test, working back through the earlier versions one-by-one to find between which versions the issue first occurs would probably help in locating the issue. On the other hand if no version works no matter how back you try, it might be an issue that was always there or a problem with your settings. |
The original soundblaster cards indeed defaulted to IRQ7, as on XT class machines IRQ5 may be used by the harddisk controller. IRQ7 was always a problem as it conflicts with LPT1. But few DOS programs ever used the IRQ for parallel communication, so typically you were fine, and even if they did, you would normally not have sound at the same time. The problems started with OS/2, as you could have sound and printing simultaneous (and later with Win95 and WinNT). I remember there was at one point an update to the OS/2 printing driver to (optionally) use pulling mode, which results in higher CPU load, to prevent issues with a sound card on IRQ7. From what I recall, the change to IRQ5 happened at the time of the SB Pro 2. |
The problem predates way long before, since 0.83.11. And yes, I have tried every version released after that (and before that) back when I first reported it. I am using the exact same settings as seen in Windows 98 Wiki Guide. No fancy extra settings apart of voodoo glide high level pass through. Also tried both IRQ5 and IRQ7. Also tried all sorts of available cpus (auto, 486, pentium, pentium_mmx...). No idea why, the games can only run when there is no sound blaster emulation. When there is, they all crash: FIFA 98 RTWC, FIFA 99, NFS2SE. I am at a complete total loss. |
Tonight I tried the Windows version of DOSBox-X using a build from @Allofich (from another issue here) and in a Windows 10 Pro VMware Machine. Turns out I have the same problem there: sbtype=sb16 and crashes, sbtype=none and I am able to play everything but without sound. So the problem must be something with Sound Blaster inside Windows 98 that I cannot seem to debug nor find out why. I have the latest SB16 drivers as recommended from the Win98 Install Guide, as well as DirectX 9.0c. |
Another night, another attempt. This time again on macOS SDL1 version with a fresh install of Windows 98 SE. Post install: VBEMP 9x driver, DirectX 9.0c (DEC 2006) and last voodoo driver. Installed Need For Speed II SE and tried to run the 3Dfx version. Since it's a sound issue, I did not update the Sound Blaster 16 drivers this time to try and find out if the drivers are a part of the problem. Well, they're not. As soon as the race is about to start, the game crashes to the desktop. Configuration file (renamed to .txt because GitHub wouldn't allow me to attach): Third attempt trying with default S3Trio display driver instead of VBEMP: Same outcome |
Running dxdiag to test the sound, after I have confirmed that I could hear all demo sounds, the dxdiag reported this to me:
No matter what I do, change, or try, I can only play the games without sound. Bummer. Even a clean Win98 install wouldn't allow me to play a clean NFS2SE install. |
I've also noticed that I do not have the"SB16 MIDI OUT [330]" instrument listed on multimedia properties, only Creative Music Synth, "MPU 401 ..." and something like "Roland OPL3 Synth...". Don't think it has something to do, because NFS2SE, FIFA 9X aren't games with MIDI sounds AFAIK? @Wengier I tried 0.83.10 (mentioned here #2260) this night, since it was around after this version or .12 when MMX and dynamic_x86 core improvements were put in place. However I had the same problems. It's not a core or cpu problem, I have tried them all in various combinations possible, and with or without 3dfx, I can only game when there is no sound card present. Sometimes in NFS2SE I can drive for a few seconds until I CTD. I know it's not a problem with my Windows 98 SE install because in QEMU I can play them (without 3Dfx or using the overcomplicated kjliew's Glide Passthrough). So it's definitely a problem isolated to the sound card. I've tried sbtype=sb16 and sbtype=sb16vibra. IRQ, DMA, HDMA, all values are correct, sound is played. But something crashes the games. |
The names of the entries in Multipedia Properties is dependent on the exact Windows release (or SB driver version) installed. "SB16 MIDI OUT [330]" and "MPU 401..." are equivalent. I don't know where this Roland OPL3 Synth entry is from. You must have installed something as I don't recall seeing it with my testing. Did you ever try if you get crashes with other sound card options, like a SB Pro 2? |
Windows 98 SE fully updated.
Well, I did not. I think this comes from the oplemu setting in configuration file? This device will probably disappear if i set oplemu to none, I think.
Now that you've said it... actually, no. Might try it tomorrow, it's late for me now and I haven't been sleeping well for weeks, staying late and trying to improve my QEMU/DOSBox VMs. However, I think that I need to repeat that the QEMU VM machine also has a SB16 installed, and does not have these issues. I just do not use that VM because only DOSBox-X has a proper 3Dfx emulation/Glide passthrough. With that in mind, I'd politely ask for a revision on the SB16 card for DOSBox-x, to see if something wasn't missed or misinterpreted? Can we also check it? Because I have this issue since June/July builds. |
@brunocastello I do think there is a something missing in the SB16 emulation or a bug, which is causing these problems. Having said that, it requires someone with the technical knowhow, skills and time to fix it. I'm not that person, and from what I have seen both @joncampbell123 and @Wengier have a lack of time right now. |
I just came here to add that even the Windows version had the same problem under a VMware Windows 10 virtual machine. I used the one from @Allofich , where he fixed another issue related to img mount. |
To explain the programming mistake, my code back then used DirectSound to record from the microphone at 44.1KHz 16-bit stereo. I was writing something to record radio shows and I had arranged a sound board to use two microphones side by side to pick up the voice in stereo. It would have been a good test recording except that I found out too late the L and R channels constantly switched back and forth. My code assumed the playback byte position reported would be aligned to a complete stereo sample in the buffer, but because the Windows 98 drivers reported directly from the DMA controller, the reported byte position was sometimes in the middle of the complete sample, meaning, since it was obviously using 16-bit DMA, sometimes the reported position would be right between the 16-bit L and R samples meaning the DMA had written L, but not yet R. I've been writing my code to round down the reported position by nBlockAlign since. This would around 2001 or so with an old Pentium laptop running Windows 98 that had one of those "OPL3SAx" Sound Blaster Pro compatible WSS chipsets that they had obviously connected to the ISA bus internally. |
A quick check: Whatever it doesn't like about SB16 emulation it dislikes the ESS 688 AudioDrive emulation even more. |
Just found this github issue after troubleshooting the problem for a few hours. Are there any debug logs or something that can be collected to help narrow down this issue? |
Under dosbox-pure it is very similar. I suspect that if someone would test NFS2SE under dosbox-svn or dosbox-staging, of course, with the necessary patches extending the capabilities of these programs, the effect would be the same. The error is hidden deep in the dosbox code. I don't think it has anything to do with soundblaster. I tested NFS2SE under dosbox-x with GUS and it behaves the same as with soundblaster. There is a quick exit when the game starts. With sbtype=sb16 and 3dfx I sometimes managed to complete the whole race (over 4 minutes), but most of the time the error occurred 15-30 seconds after the start of the race. |
@grapeli Thanks for sharing this as testing GUS was my next step so I can skip it now. |
@casasfernando In the recording, the exit to the desktop occurs very quickly. Other times it took about a minute and a half. NFS2SE.dosbox-staging.webm |
@grapeli in my case with none of the games I get that far, meaning race shows for a few seconds. For me, both NFS2SE and NFSHS exit one second or less after the race loading finishes and the "race environment" is displayed. Sometimes I get to see a a few frames of the car or the track, but it crashes almost right away.. Anyways, the problem is how to debug this issue. So far we only know the may be in the sound emulation code path because as soon as sound emulation is disabled the problem goes away. Thanks |
If this bug is so hard to diagnose with NFS2SE it might be worth a try with the Need for Speed High Stakes Demo, which behaves very similarly, except that exiting the game to the desktop ends with a detailed error message. |
The error
Of course, this demo with |
@grapeli which DirectX version and graphics drivers are you using? |
@casasfernando |
@grapeli my setup is mostly the same except that I'm using the S3 emulated card with the OS driver. I'm wondering if it makes sense trying with an older version of DirectX. I was planning to create a new image anyway because wanted to switch Win98 to english (currently I'm using the spanish version) so when I do that I will try to test NFS2SE and NFSHS with whatever version comes with the game and check if it makes any difference but I'm not holding my breath. |
@casasfernando The main and essential reason why I use the VBE driver is its much better performance. Run Crystal Mark on both - CM09GDI and CM09D2D. You can read the results in ini files. While in GDI the difference is tiny, in 2D it is 50% in favor of VBE. Huge. This difference is also visible in other cases I tested. |
@grapeli , I understand Staging's Voodoo and FAT32 branches are ports of the DOSBox-X sources. Maybe Meson's Address and Undefined Behavior Sanitizer (UB+ASAN) build will reveal issues in the Voodoo or FAT32 code? Setup:
Build:
Executable: It will run slow, but it might help reveal issues at the moment the game cuts out back to Windows, which would be common to both projects. Atleast, if the code has problems at the host level (as opposed to emulation level). |
@kcgen Dosbox-staging terminates shortly after the win 98 desktop appears. There is still a long way to go before the system is fully loaded. In the latter case, once the loading of the system stopped at this point. |
In dosbox-x compiled with clang (
I will mention that I previously tested NFS2SE in dosbox-x with both openglide and |
@grapeli the above looks like a very good lead on where in the code the problem may be. |
@casasfernando |
@casasfernando |
According to @grapeli 's log, there is a left bit shift of a negative value in |
@maron2000 nfs2se demo
|
@grapeli Thanks for testing. There are still bit shifting of negative values and out of bound indexs in the voodoo code, so they have to be fixed. |
@maron2000 I tried several times to run the non-accelerated full version of the game under dosbox-x compiled with clang and gcc (-fsanitize=....). Without success. The game starts, after loading the race route, it stops at some point. Most often there is an error in the dosbox-x logs - triple fault. |
@maron2000 |
@grapeli |
On the issue above it's mentioned that disabling sound hardware acceleration supposedly fixes it, but I tried it in DOSBox-X and the game crashed in the middle of the race instead of in the beginning, and also the sound disappears when approaching tunnels. I hope it's possible to fix this issue since DOSBox-X runs games much faster than PCEm and 86Box. |
Describe the bug
I cannot run any game at all on Windows 98 SE, unless I set sbtype to "none". FIFA 98 RTWC, FIFA 99, Need For Speed II SE, all them cannot run with sound on, even when I try to play them in software mode instead of glide pass-through.
NFS2SE with both software and 3dfx crashes when the race is about to start, during the intro flying into the player's car.
FIFA 98 RTWC and FIFA 99 both crash when the match kick-off is about to start, no matter if 3dfx is enabled or not.
When I set sbtype = none, without any sound at all, I can play all three games without issues (but without sound as well).
To Reproduce
Play any of the three games above (a demo is enough) under Windows 98 SE, using sbtype = sb16 or sb16vibra.
Expected behavior
Games to run flawlessly with sound enabled.
Environment (please complete the following information):
Additional context
I am running a build without avcodec and fluidsynth. I do not want all the 93893 dependencies both require to run. In a Mac where hard disk space is a premium, this is needed. I just need networking and the gaming features; I do not want extra sound features (fluidsynth) or to do any screen recording (avcodec) stuff. However, even using the standard build with them, the problem persists.
The computer has this configuration and has been upgraded to 16GB RAM at the time of purchase.
Attached is my dosbox configuration file, pretty similar to the one from the wiki guide for Windows 98 installation.
dosbox.txt
The text was updated successfully, but these errors were encountered: