Closed DSN9990 closed 2 years ago
I wonder which previous DOSBox-X release you tried previously? And where did you download WC4?
I had to restart Dosbox-X after setup, but it worked by disabling EMS.
I wonder which previous DOSBox-X release you tried previously? And where did you download WC4?
If I recall correctly, I have used a beta version of 0.83.16 you provided. I downloaded WC4 from here: https://archive.org/details/wing-commander-iv-the-price-of-freedom-usa-v-1.1/
I had to restart Dosbox-X after setup, but it worked by disabling EMS.
Yeah, you are right, it indeed works by running WC4.EXE after restarting DOSBox-X once it is set up, but I expected it to work without errors when clicking the "Save Settings and Run WC4" button in the setup program as the previous versions did. So I'm thinking there may be some recent change that's causing these issues, anyway.
If I recall correctly, I have used a beta version of 0.83.16 you provided.
I checked against the following dosbox-x versions 0.83.[12,13,14,15,16,17,18,19,20,21,22,23]. Additionally, under a few much older ones. In none of them, the game does not start directly from the installer (Save Settings and Run WC4). Maybe you used a specific configuration (there is a key in it).
Is that such a big problem?
It starts correctly after selecting an option - "Save Settings and Exit"
and typed
WC4.EXE
[Enter].
After all, probably no one decides to reinstall it each time. You only need to install it once.
ems=false
is also required under dosbox-SVN.
edit: Under dosbox-SVN it is not required to disable ems.
https://user-images.githubusercontent.com/452325/160190454-e62eae07-e76e-42b2-95fd-83a45c88d87c.mp4
WC4 runs directly from the installer in dosbox-x d1f2b1c from 2014-07-19. Only with ems=true
. With ems=false
it restarts dosbox-x.
Does it work properly if you set cputype=ppro_slow
or cputype=pentium_ii
?
WC4 runs directly from the installer in dosbox-x d1f2b1c from 2014-07-19. Only with
ems=true
. Withems=false
it restarts dosbox-x.
How it is supposed to work with EMS enabled in this commit? So far, it is not expected to work with ems=true
, however. Just tried it right now with EMS enabled, it just reboots DOSBox-X as soon as I run WC4.EXE. Can you do some bisecting to figure out which commit broke this?
The explanation may be simple. The 2014 dosbox-x code did not differ much from -SVN.
Since then, a lot of changes have come (thousands of changes to the code).
git bisect
in this case can be a very time consuming activity. The result does not always have to be unequivocal.
Does it work properly if you set
cputype=ppro_slow
orcputype=pentium_ii
?
Same result, ppro_slow
and pentium_ii
(without EMS, of course) will not work either, they just trigger the same restart I mentioned above. Since both cputype
s yield the same issue, neither pentium_iii will work at all.
@rderooy WC4 works with pentium, pentium_mmx, ppro_slow, pentium_ii.
The problem is of a different kind. It doesn't run directly (only) from the installer, you have to exit (I posted video).
The installer currently restarts dosbox-x with ems=true
. Must be running with ems=false
(no problem for me).
@grapeli Are you sure this kind of issue does not occur on real hardware? If so, can you try it in PCem to see how it behaves? I managed to run it within the install program through 86Box (which is PCem's fork) a few days ago and I got this weird crash:
@grapeli Are you sure this kind of issue does not occur on real hardware?
I do not have the appropriate equipment to check it anymore. Unless you can include my laptop from 2010 from which I am sending this post.
git bisect
9c6c9a2 bad
I found the culprit. So the first bad commit - d02eef9.
I brought it back in the latest code with a little change (not sure if it is correct). The effect of this is a correctly working WC4 installer with the default ems=true
settings, and that the game starts directly from the installer after selecting "Save Settings and Run WC4".
--- src/ints/ems.cpp
+++ src/ints/ems.cpp
@@ -1205,6 +1205,10 @@
CPU_SET_CRX(0, new_cr0);
CPU_SET_CRX(3, new_cr3);
+ PhysPt tbaddr=new_gdt_base+(new_tr&0xfff8)+5;
+ Bitu tb=mem_readb(tbaddr);
+ mem_writeb(tbaddr, tb&0xfd);
+
/* Load tables and initialize segment registers */
CPU_LGDT(new_gdt_limit, new_gdt_base);
CPU_LIDT(new_idt_limit, new_idt_base);
It's worth mentioning that WC3 doesn't crash/trigger reboot when launching it from the setup program (WC3.EXE), unlike WC4:
I'm quite sure WC3 uses an earlier version of WC4's engine, since the in-game graphics look very similar to WC4 anyway.
I haven't tested the patch to WC4, but I think it better use uint8_t
(unsigned char) instead of Bitu
, since compilers may submit warnings.
I haven't tested the patch to WC4, but I think it better use
uint8_t
(unsigned char) instead ofBitu
, since compilers may submit warnings.
Very likely. I wasn't sure. I am not a programmer.
@Wengier Can you give me a compiled DOSBox-X SDL2 build? I really want to check these changes out, just for testing.
@DSN9990 You did not mention which Windows SDL2 build (MinGW or Visual Studio, 32-bit or 64-bit) you want, but auto-compiled Windows builds (both SDL1 and SDL2) are available from:
32-bit MinGW builds:
https://github.com/joncampbell123/dosbox-x/suites/5819032449/artifacts/194984792
32-bit Visual Studio builds:
https://github.com/joncampbell123/dosbox-x/suites/5819032448/artifacts/194978484
64-bit MinGW builds:
https://github.com/joncampbell123/dosbox-x/suites/5819032450/artifacts/194986212
64-bit Visual Studio builds:
https://github.com/joncampbell123/dosbox-x/suites/5819032453/artifacts/194979117
@Wengier Thanks! I've tested SDL2 x64 MinGW dosbox-x and both WC3 and WC4 seem to work fine now (mostly, I guess) with ems=true
setting, although, at least in WC3, I got a different but unrelated issue (that is, crackling/stuttering audio in the opening intro even with cycles=max
set). Not sure if this is EMS related, actually. So maybe this issue can be closed now?
@DSN9990
Sound crackling is caused by DOSBox-X running too fast. I have set cycles=74000
, and the crackling's gone.
@DSN9990 Sound crackling is caused by DOSBox-X running too fast. I have set
cycles=74000
, and the crackling's gone.
cycles=74000
does not fix the sound issue. It still produces crackled audio in the intro. Maybe this is the result of a misconfiguration in either DOSBox-X or the game's sound setup? I don't think this is related to the sound setup, since I've set up the sound card in the game's installer correctly according to DOSBox-X's default SB16 settings.
Also to note is that cycles=74000
produces heavy stuttering in the music/sound test of the setup program, while cycles=max
produces clearer audio.
@DSN9990 Is it possible that your sound crackling is not like my sound crackling? I've just tested the audio on my WC3 installation, first with 74000 cycles (74000.flac), then with max cycles (max.flac): tracks.zip
As I said above this audio problem is highly unrelated to this thread, since it was about WC4 crashing when launching itself from the installer, so I think it is better to open a new issue for discussing this, anyway.
Strangely, I have now recorded part of the intro's sound output using DOSBox-X's built-in function and the sound popping disappeared entirely. What the heck? @Cerrseien Please check out my recorded file, you can hear flawlessly the clear audio: wc3_001.zip. The recording is in .WAV format because I used the "Record audio to WAV" menu item (under "Capture").
Disabling EMS also does not fix the issue, and there is another one weird issue regarding crackling sound: after the opening intro ends, and I start up at the Flight Deck (the main screen), you can again notice heavy stuttering audio playing in the background much like the sound test, unless I use cycles=max
, however if I press Alt-X to display the confirmation prompt (Y,N) to exit to DOS, the audio sounds flawlessly and there are no popping issues. What does this mean anyway???
Code of Conduct & Contributing Guidelines
Have you checked that no other similar bug report(s) already exists?
What operating system(s) this bug have occurred on?
Windows 8.1 x64
What version(s) of DOSBox-X have this bug?
0.83.23
Describe the bug
Wing Commander 4 doesn't seem to work anymore even with
ems=false
set in the config file. The game just stucks at a black screen for a few seconds after clicking "Save Settings and Run WC4" and causes DOSBox-X to reboot. Also tried settingallow lmsw to exit protected mode
tofalse
, same effect, crashes anyway. I remember exactly that a few months ago (back in late July 2021) the game behaved and worked correctly withems=false
without rebooting.Expected behavior
Game loading correctly without rebooting DOSBox-X.
Steps to reproduce the behaviour
Set
ems=false
in config file Run WC4.EXE or INSTALL.BAT from the game's first CD Configure the game, including video, sound and click "Save Settings and Run WC4" Observe the black screen for a few seconds and notice the emulator rebootsUsed configuration
dosbox-x.txt
Emulator log
Additional context
Trying to start the game for the 2nd time (right after the restart) will just hang DOSBox-X completely with a blinking cursor, displaying a
ERROR BIOS:INT15:Unknown call ax=1209
error message on the log file.