joncampbell123 / dosbox-x

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

Windows 3.1 troubleshooting #834

Open aybe opened 6 years ago

aybe commented 6 years ago
  1. When installing SB in Windows, sound play for a bit then stop, then it becomes impossible to exit Windows (freeze).

  2. Mouse stops working when opening a command-prompt inside Windows, works again when closed.

joncampbell123 commented 6 years ago

The Sound Blaster driver needs to know the correct IRQ, or that will happen. I'm not sure about the mouse vs dos box issue.

aybe commented 6 years ago

Alright, I'll try again and update this thread accordingly.

joncampbell123 commented 6 years ago

@aybe You may also want to visit the Vogons driver library and use the Sound Blaster 16 drivers for Windows 3.1.

aybe commented 6 years ago

I did that in fact but that's when a played a sound to assert that drivers were working properly, I ended up finding they never play in their entirety; and the topping was that PROGMAN.EXE simply freezes when trying to exit Windows ...

Then I tried increasing cycles, changing CPU core but that didn't help at all.

Does everything works fine on your side ?

joncampbell123 commented 6 years ago

It does. That just means that you need to configure the driver to use the right IRQ, or edit dosbox.conf to set the Sound Blaster IRQ to what the driver thinks it should be.

Following that rule, I've never had any issues with the SB16 driver in DOSBox-X.

aybe commented 6 years ago

Wow, another thing to add to the guide 👍

aybe commented 6 years ago

(i.e. that fixed the issue !!!)

joncampbell123 commented 5 years ago

@aybe Have you added this to your guide? I'm going to close this issue soon. I'd like to close it with a link to your guide.

aybe commented 5 years ago

Hi !

Sorry for the late answering, I didn't really have much time recently to contribute :(

I have done this:

https://github.com/joncampbell123/dosbox-x/tree/master/docs/Windows%203.1

It's been pretty tough to be honest, especially the drivers part, but it's here !

I have uploaded the drivers because:

I let you decide on whether you keep them in the repository or not.

Instructions tested from zero and they work, forgot how painful it was to get a system up and running !

aybe commented 5 years ago

By the way, I've noticed a weird behavior for which I didn't try to find the cause:

After installing Windows and saying yes to reboot, DOSBox will reboot but typing win after will instantly reboot again; typing win a second time works as expected.

joncampbell123 commented 5 years ago

I'll keep them there, it's fine.

It helps to remember this stuff was made before Plug & Play was around, so either drivers had to be told the IRQ/DMA or they had to use some proprietary I/O with the hardware to determine it.

joncampbell123 commented 5 years ago

What does the console/log.txt say about that?

It probably says "double fault" at that point.

I haven't had any issues with Windows 3.1 personally, could it be the drivers?

aybe commented 5 years ago

Yes but you know what,

Many of the SB drivers at vogonsdrivers just didn't work, on the windows part, you get that error complaining that MidiPort in SYSTEM.INI is wrong while it's perfectly fine ...

For the S3 driver I simply went to the web archived site of S3 and got the proper one,

Let me check the console this time by reinstalling again ...

aybe commented 5 years ago

I am facing the following problem when using:

[log]
logfile=log.txt

Windows crashes, DOSBox restarts, the content of the log is overwritten so I can't see what's the error ... I thought it would append to the log.

Sorry but I don't have a debugging environment at hand to check in detail.

joncampbell123 commented 5 years ago

DOSBox-X shouldn't restart the whole emulator unless you're using dynamic core.

I put effort into having the emulator keep running without re-exec-ing itself when the OS or game hits the reset signal, though the technique doesn't work with dynamic core.

Try core=normal.

aybe commented 5 years ago

Same behavior with core=normal !

Here's the config if that's of any help:

[log]
logfile=log.txt

[cpu]
cycles=50000
core=normal
integration device=true

[sblaster]
irq=5

[autoexec]
@ECHO OFF
PATH=%PATH%;C:\WINDOWS
PATH=%PATH%;c:\dz
MOUNT C .\VirtualHD
C:
joncampbell123 commented 5 years ago

So from your dosbox.conf that means cputype=auto, since cputype is not assigned.

Try this from my dosbox.conf:

 cputype=pentium
aybe commented 5 years ago

I'm afraid it's still the same !

Hold on, setting an environment to debug it 😃

aybe commented 5 years ago

So, using the following conf:

[cpu]
cycles=50000
integration device=true

[sblaster]
irq=5

[autoexec]
@ECHO OFF
PATH=%PATH%;C:\WINDOWS;c:\dz
MOUNT C .\VirtualHD
C:

Here's the log:

bunch of these
LOG:  816461036 ERROR CPU:Write ffffffff to rom at 8006cf80
LOG:  816461040 ERROR CPU:Write 4 to rom at 8006cf9a
LOG:  816461041 ERROR CPU:Write 0 to rom at 8006cf98
...
LOG:  816461043 ERROR CPU:Write ffffffff to rom at 8006cf90
LOG:  816461047 ERROR CPU:Write 4 to rom at 8006cfaa
LOG:  816461048 ERROR CPU:Write 0 to rom at 8006cfa8
LOG:  816461050 ERROR CPU:Write ffffffff to rom at 8006cfa0
LOG:  816461054 ERROR CPU:Write 4 to rom at 8006cfba
LOG:  816461055 ERROR CPU:Write 0 to rom at 8006cfb8
LOG:  816461057 ERROR CPU:Write ffffffff to rom at 8006cfb0
LOG:  816461061 ERROR CPU:Write 4 to rom at 8006cfca
LOG:  816461062 ERROR CPU:Write 0 to rom at 8006cfc8
LOG:  816461064 ERROR CPU:Write ffffffff to rom at 8006cfc0
LOG:  816461068 ERROR CPU:Write 4 to rom at 8006cfda
LOG:  816461069 ERROR CPU:Write 0 to rom at 8006cfd8
LOG:  816461071 ERROR CPU:Write ffffffff to rom at 8006cfd0
LOG:  816461075 ERROR CPU:Write 4 to rom at 8006cfea
LOG:  816461076 ERROR CPU:Write 0 to rom at 8006cfe8
LOG:  816461078 ERROR CPU:Write ffffffff to rom at 8006cfe0
LOG:  816461082 ERROR CPU:Write 4 to rom at 8006cffa
LOG:  816461083 ERROR CPU:Write 0 to rom at 8006cff8
LOG:  816461085 ERROR CPU:Write ffffffff to rom at 8006cff0
LOG:  817208732 ERROR MISC:DOS:Set File Attributes for C:\WINDOWS\WIN386.SWP not supported
LOG: DEBUG: INT 2Fh Windows virtual device 'VMD' callout (BX(deviceID)=0x000c CX(function)=0x0001)
LOG: DEBUG: INT 2Fh Windows virtual device 'VMD' callout (BX(deviceID)=0x000c CX(function)=0x0001)
LOG:  817478763 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1607
LOG: INT 15h mouse initialized to 3-byte protocol
LOG: INT 15h reporting mouse device ID 0x00
LOG:  817532898 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=FFFF
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0000)
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0004)
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0001)
LOG:  817534756 ERROR DOSMISC:Get SDA, Let's hope for the best!
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0003)
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0005)
LOG: DEBUG: INT 2Fh Windows virtual device 'PAGEFILE' callout (BX(deviceID)=0x0021 CX(function)=0x0000)
LOG: DEBUG: INT 2Fh Windows virtual device 'PAGEFILE' callout (BX(deviceID)=0x0021 CX(function)=0x0000)
LOG:  818867363 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1607
LOG: DEBUG: INT 2Fh Windows virtual device 'V86MMGR' callout (BX(deviceID)=0x0006 CX(function)=0x0000)
LOG: DEBUG: INT 2Fh Windows virtual device 'V86MMGR' callout (BX(deviceID)=0x0006 CX(function)=0x0000)
LOG:  818943182 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1607
LOG: DEBUG: INT 2Fh Windows virtual device 'VMD' callout (BX(deviceID)=0x000c CX(function)=0x0000)
LOG: DEBUG: INT 2Fh Windows virtual device 'VMD' callout (BX(deviceID)=0x000c CX(function)=0x0000)
LOG:  819112207 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1607
LOG:  819154012 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1608
LOG: CPU_Exception: Exception 10 already in progress, triggering double fault instead
LOG: CPU_Exception: Double fault already in progress == Triple Fault. Resetting CPU.
LOG: Using traditional DOSBox re-exec, C++ exception method is not compatible with dynamic core
aybe commented 5 years ago

PS from master branch

joncampbell123 commented 5 years ago

It says right there at the bottom, you're using core=dynamic.

Use core=normal.

It wouldn't say "Using traditional DOSBox re-exec, C++ exception method is not compatible with dynamic core" unless it were running as if core=dynamic.

joncampbell123 commented 5 years ago

Like this:

core=normal
cputype=pentium
aybe commented 5 years ago

Sorry, let's go again !

# This is the configuration file for DOSBox 0.82.9. (Please use the latest version of DOSBox)
# Lines starting with a # are comment lines and are ignored by DOSBox.
# They are used to (briefly) document the effect of each option.
# To write out ALL options, use command 'config -all' with -wc or -writeconf options.

[cpu]
#               core: CPU Core used in emulation. auto will switch to dynamic if available and appropriate.
#                     WARNING: Do not use dynamic or auto setting core with Windows 95 or other preemptive
#                     multitasking OSes with protected mode paging, you should use the normal core instead.
#                     Possible values: auto, dynamic, normal, full, simple.
#            cputype: CPU Type used in emulation. auto emulates a 486 which tolerates Pentium instructions.
#                     Possible values: auto, 8086, 8086_prefetch, 80186, 80186_prefetch, 286, 286_prefetch, 386, 386_prefetch, 486old, 486old_prefetch, 486, 486_prefetch, pentium, pentium_mmx, ppro_slow.
#             cycles: Amount of instructions DOSBox tries to emulate each millisecond.
#                     Setting this value too high results in sound dropouts and lags.
#                     Cycles can be set in 3 ways:
#                       'auto'          tries to guess what a game needs.
#                                       It usually works, but can fail for certain games.
#                       'fixed #number' will set a fixed amount of cycles. This is what you usually
#                                       need if 'auto' fails (Example: fixed 4000).
#                       'max'           will allocate as much cycles as your computer is able to
#                                       handle.
#                     Possible values: auto, fixed, max.
# integration device: Enable DOSBox integration I/O device. This can be used by the guest OS to match mouse pointer position, for example. EXPERIMENTAL!
core=normal
cputype=pentium
cycles=50000
integration device=true

[sblaster]
# irq: The IRQ number of the soundblaster. Set to -1 to start DOSBox with the IRQ unassigned
#      Possible values: 7, 5, 3, 9, 10, 11, 12.
irq=5

[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
@ECHO OFF
PATH=%PATH%;C:\WINDOWS;c:\dz
MOUNT C .\VirtualHD
C:
LOG: 1156300697 ERROR CPU:Write 4 to rom at 8006efba
LOG: 1156300698 ERROR CPU:Write 0 to rom at 8006efb8
LOG: 1156300700 ERROR CPU:Write ffffffff to rom at 8006efb0
LOG: 1156300704 ERROR CPU:Write 4 to rom at 8006efca
LOG: 1156300705 ERROR CPU:Write 0 to rom at 8006efc8
LOG: 1156300707 ERROR CPU:Write ffffffff to rom at 8006efc0
LOG: 1156300711 ERROR CPU:Write 4 to rom at 8006efda
LOG: 1156300712 ERROR CPU:Write 0 to rom at 8006efd8
LOG: 1156300714 ERROR CPU:Write ffffffff to rom at 8006efd0
LOG: 1156300718 ERROR CPU:Write 4 to rom at 8006efea
LOG: 1156300719 ERROR CPU:Write 0 to rom at 8006efe8
LOG: 1156300721 ERROR CPU:Write ffffffff to rom at 8006efe0
LOG: 1156300725 ERROR CPU:Write 4 to rom at 8006effa
LOG: 1156300726 ERROR CPU:Write 0 to rom at 8006eff8
LOG: 1156300728 ERROR CPU:Write ffffffff to rom at 8006eff0
LOG: 1157045332 ERROR MISC:DOS:Set File Attributes for C:\WINDOWS\WIN386.SWP not supported
LOG: DEBUG: INT 2Fh Windows virtual device 'VMD' callout (BX(deviceID)=0x000c CX(function)=0x0001)
LOG: DEBUG: INT 2Fh Windows virtual device 'VMD' callout (BX(deviceID)=0x000c CX(function)=0x0001)
LOG: 1157314681 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1607
LOG: INT 15h mouse initialized to 3-byte protocol
LOG: INT 15h reporting mouse device ID 0x00
LOG: 1157366156 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=FFFF
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0000)
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0004)
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0001)
LOG: 1157368014 ERROR DOSMISC:Get SDA, Let's hope for the best!
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0003)
LOG: DEBUG: INT 2Fh Windows virtual device 'DOSMGR' callout (BX(deviceID)=0x0015 CX(function)=0x0005)
LOG: DEBUG: INT 2Fh Windows virtual device 'PAGEFILE' callout (BX(deviceID)=0x0021 CX(function)=0x0000)
LOG: DEBUG: INT 2Fh Windows virtual device 'PAGEFILE' callout (BX(deviceID)=0x0021 CX(function)=0x0000)
LOG: 1158701049 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1607
LOG: DEBUG: INT 2Fh Windows virtual device 'V86MMGR' callout (BX(deviceID)=0x0006 CX(function)=0x0000)
LOG: DEBUG: INT 2Fh Windows virtual device 'V86MMGR' callout (BX(deviceID)=0x0006 CX(function)=0x0000)
LOG: 1158776868 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1607
LOG: DEBUG: INT 2Fh Windows virtual device 'VMD' callout (BX(deviceID)=0x000c CX(function)=0x0000)
LOG: DEBUG: INT 2Fh Windows virtual device 'VMD' callout (BX(deviceID)=0x000c CX(function)=0x0000)
LOG: 1158945893 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1607
LOG: 1158987711 ERROR DOSMISC:DOS:INT 2F Unhandled call AX=1608
LOG: CPU_Exception: Exception 10 already in progress, triggering double fault instead
LOG: CPU_Exception: Double fault already in progress == Triple Fault. Resetting CPU.
LOG: Removing UMB block 0xcb00-0xdfff
LOG: Rebooting the system
LOG: Aspect ratio: 640 x 480  xToY=1.333 yToX=0.750
LOG: Aspect ratio: 640 x 480  xToY=1.333 yToX=0.750
LOG: Aspect ratio: 640 x 480  xToY=1.333 yToX=0.750
LOG: Aspect ratio: 640 x 480  xToY=1.333 yToX=0.750
LOG: ISA Plug & Play BIOS enabled
LOG: VGA ROM BIOS init callback
LOG: XMS: 50 handles allocated for use by the DOS environment
LOG: EMS page frame at 0xe000-0xefff
LOG: COMMAND.COM env size:             720 bytes
LOG: COMMAND.COM environment block:    0x01e9 sz=0x002d
LOG: COMMAND.COM main body (PSP):      0x0217 sz=0x009a
LOG: COMMAND.COM stack:                0x0231
LOG: pixratio 1.350, dw false, dh false
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
joncampbell123 commented 5 years ago

Interesting. I'll have to set up a Windows 3.1 installation given the drivers you posted rather than the ones I use in my Windows 3.1 test.

joncampbell123 commented 5 years ago

I'm using an S3 driver that explicitly says in it's VERSION file:

864 1.41B5 - S3 Flat Model Vision Driver for English Windows - 3/2/95

joncampbell123 commented 5 years ago

I'm using Creative Sound Blaster 16 drivers also found on the Vogons driver library.

The installer installs from MS-DOS.

aybe commented 5 years ago

Right, but currently I'm not using any drivers:

Testing procedure for this problem:

i.e. it happens just after a fresh installation of Windows

Drivers I have here:

from S3 website at webarchive:

Version 1.70.04 - S3 Flat Model Windows Trio765 Driver - 09/22/97

from the Win31 thread in Vogons:

Audio Software S16-31STD-1-US (Revision 2) Installation Disk

aybe commented 5 years ago

Tired of ever installing over and over, I found the /H switch for the setup, however docs are nowhere to be found.

Asked a question here, let's see if someone can come up with the answer: https://retrocomputing.stackexchange.com/questions/7455/where-is-the-literature-for-windows-3-1-batch-mode-setup

joncampbell123 commented 5 years ago

I'm not able to reproduce the crash, reinstalling Windows 3.1, the S3 driver, and SB16 drivers.

aybe commented 5 years ago

I've just tried another version (3.11 retail) and I'm not getting any more crash ...

It does still crash after first win though less often


Side note:

Apparently the mouse does not work more anymore in Win31 unless it is captured ?

It doesn't matter whether you installed DOSBOXPI or not.

Not a big deal but I'll add it to the guide so ppl won't scratch their head for hours !

EDIT

See my definitive changes to the guide:

https://github.com/joncampbell123/dosbox-x/blob/master/docs/Windows%203.1/INSTALL.MD#mouse

Actually it's quite weird when you scratch the surface, DOSBox must reboot for it work.


In the mean time, my question has been answered : SETUP.SHH is the file to automate the installation process, it's self-explanative and very easy to configure.

The only thing currently missing is DELTREE within DOSBOX, I must do that outside when testing again.

Also I've tried to slipstream DOSBOXPI, it worked only when I changed

dboxmpi = 1:dboxmpi.drv, "DOSBox-X Mouse Pointer Integration", x:*vmd,dboxmpi

to

dboxmpi = 2:dboxmpi.drv, "DOSBox-X Mouse Pointer Integration", x:*vmd,dboxmpi

when added to SETUP.INF because all the devices had that number.

Didn't know exactly what was that, the floppy disk number, the loading order or whatever ...

Anyway, this opens the doors to slipstream drivers and have an unattended installation for Win31 😃

joncampbell123 commented 5 years ago

Non-captured input will no longer work unless the DOSBox mouse driver is active.

aybe commented 5 years ago

Sorry but I don't understand what you mean,

what does that mean and what it implies so I can adjust the docs ?

joncampbell123 commented 5 years ago

For sources of mouse input where the data represents relative motion, the emulation is not supposed to send any relative mouse motion unless you've captured the mouse. The integration driver however is allowed to read where you last moved the mouse within the DOSBox-X window, so it should work as long as the driver is active in memory and reading that information, whether or not you've captured the mouse.

joncampbell123 commented 5 years ago

Check the Windows setup program and make sure the DOSBox-X mouse integration driver is still there, and check dosbox.conf to make sure the integration device is enabled.

You can also use debug.exe to read I/O ports 28h to 2Bh to check if anything appears there.

aybe commented 5 years ago

Alright, that makes sense, that's what I figured out earlier.

In my updated instructions, do you know why mouse won't work in Windows until DOSBox is rebooted at least once ? (PI is on and driver installed)