joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.55k stars 372 forks source link

Starting the Polda 3 game forces the windows 95 restart #4497

Open tazok81 opened 9 months ago

tazok81 commented 9 months ago

Describe the bug

Hello. I run several games on windows 95 and recently I try czech game Polda 3. However, it forces win95 emulation restart here and there when I start the game. If game starts, then it works without issues.

I created the video. In front is dosbox-x application and behind it is terminal with logs. So you will see if there is something wrong. There are errors in terminal during win95 startup, however os works, regardless these errors. I dont know how to silence these errors.

I use two disk images. Win95 is mounted to "c" and Polda 3 installation is on drive "d". Polda 3 iso file is mounted in virtual clone cd.

I run dosbox-x version 2023.09.01 on 64bit ubuntu 22.04. Cpu is Intel i5 1345U

I use :

core = dynamic cputype = pentium cycles = max

I tried core normal and cputype 486 and it does not fix the issue

Here is full config and data

Steps to reproduce the behaviour

Start windows 95, mount Polda 3 iso in virtual clone cd. Install polda. Run polda. Then quit and restart system. Run it again. Usually it crashes the OS. If no, then restart system again.

Expected behavior

Polda 3 will start, win95 will be not restarted

What operating system(s) this bug have occurred on?

Ubuntu 22.04

What version(s) of DOSBox-X have this bug?

2023.09.01

Used configuration

No response

Output log

No response

Additional information

No response

Have you checked that no similar bug report(s) exist?

Code of Conduct & Contributing Guidelines

joncampbell123 commented 9 months ago

Can you check if the game works when you mount the ISO image on the host as the CD-ROM drive?

Instead of mounting from a menu in the guest, put the ISO image on the host and IMGMOUNT it before you boot Windows 95.

I wonder if this is one of those games that refuses to run from a virtual CD-ROM emulation like whatever you're using in the video.

tazok81 commented 9 months ago

Hi, just tested. I updated my autoexec this way, the iso is mounted correctly in drive E. Unfortunately it did not help, one time it starts the game fine, other time it restarts the system on game startup. Is there anything else I can try?

imgmount c /home/Downloads/Dosbox-x/win95-x.img imgmount d /home/Downloads/Dosbox-x/polda3.img imgmount e /home/Downloads/Dosbox-x/polda3.iso -t cdrom boot -l c

Many thanks

joncampbell123 commented 9 months ago

Well first... why would a game decide to restart your system at all? If it can't initialize audio or video or some library is missing, it should say so and abort. For a game to do that it actively has to go out and call the Win32 API function to trigger the system restart because any ordinary crash would just terminate the program. The only reason I can possibly think of is if the game thinks you're debugging it somehow and it's defense is to hit the restart signal so you lose your work :) Or perhaps some kind of copy protection. To put that into perspective, I've seen DOS games that use self-modifying code to make sure you're not debugging it, and if the game thinks you are, it jumps straight to 0xF000:0xFFF0 to initiate a reset of your system right away.

tazok81 commented 9 months ago

Who knows, 90's was wild era. After few attempts it finally starts and I can play. Well, I only thought it is worth to report, that's why I attached data for debugging. I installed visual studio on windows 11 and I was debugging it, but it does not crash, so I can't spot the place of issue, it needs deeper knowledge. Probably it is really the issue of this executable. Anyway, thank you very much:)