joncampbell123 / dosbox-x

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

Win 3.1x WDCTRL not working #1501

Open rderooy opened 4 years ago

rderooy commented 4 years ago

Is your feature request related to a problem? Please describe. I wrote a draft Guide for getting Windows 3.x installed in DOSBox-X here:

https://github.com/Wengier/dosbox-x-wiki/wiki/Guide:Installing-Windows-3.x

But one thing I cannot actually get working is the 32-bit disk and file support. No matter what I do, it reports:

While it should show:

I am using WFW3.11 for my testing. As you can see on the guide page, I am using a HDD image limited to 504MB (1023 cylinders), setting the intfakeio and intfakev86io config options (also tried "enable pio32") in the dosbox-x config file, mounting with "-reservecyl 1" (also tried specifying "-ide 1m"), but it does not work. If I don't add the "device=int13" and "device=wdctrl" in system.ini the 32-bit disk access remains greyed out. If I do set them, the 32-bit disk access checkbox becomes available, but neither 32-Bit Disk not 32-Bit File access ever work.

Running "win /b", bootlog.txt does not have any failures. I also tried using the ontrackw.386 driver, but it did not change anything.

I also tried to run the same HDD image and dosbox-x config file on both Linux and Windows with the latest dosbox-x 0.83.1-git versions.

If you could give a pointer as to what I am doing wrong, so I can update the guide, that would be great.

joncampbell123 commented 4 years ago

You will need to set int13fakeio=true under [ide, primary] to emulate pre ATA-2 behavior where the IDE registers reflect the final C/H/S sector number after read, which WDCTRL expects.

rderooy commented 4 years ago

@joncampbell123 As I mentioned, I did that.

Here is the config I am using;

[sdl]
autolock=true

[dosbox]
name=WfW 3.11
memsize=256

[cpu]
cputype=pentium
core=normal
cycles=60000

[dos]
enable a20 on windows init=fast

[ne2000]
ne2000=true
nicirq=10
realnic=1

[ide, primary]
int13fakeio=true
int13fakev86io=true
enable pio32=true

[render]
scaler=none
aspect=false

[autoexec]
IMGMOUNT C hdd.img -reservecyl 1
boot -l C
joncampbell123 commented 4 years ago

Remove the int13fakev86io=true option or set int13fakev86io=false.

The int13fakev86io option is only needed for Windows 95 or later.

rderooy commented 4 years ago

@joncampbell123 thanks for your reply.

I removed int13fakev86io and that had an effect. But now when i run win.com I get the

The Microsoft Windows 32-bit disk driver (WDCTRL) validation failed at phase 03, 3F

At least the 32-Bit File IO option now works...

joncampbell123 commented 4 years ago

I don't recall what that code means but it's possible you're using a disk image that is larger than 504MB, meaning it has a disk geometry with more than 1024 cylinders.

WDCTRL is said to have been written in the very early 1990s back when BIOSes did not yet do geometry translation for IDE hard drives larger than 504MB.

rderooy commented 4 years ago

Unfortunately, as I mentioned that should not be it. I used imgmake hdd.img -t hd_520 which creates a hdd image with 1023 cylinders, 16 heads, 63 sectors. FDISK reports it as 504MB, and running c:\windows\msd.exe confirms it has 1023 cylinders.

Wengier commented 4 years ago

I also saw the message "The Microsoft Windows 32-bit disk driver (WDCTRL) validation failed at phase 03, 3F" when I tried it. Tested with some older DOSBox-X versions and got the same result.

rderooy commented 4 years ago

@Wengier how for back did you go testing older versions? I had thought to do the same thing, in case it was a regression.

Wengier commented 4 years ago

@rderooy I don't remember the exact date, but I think I tried some 2017 version too and no difference.

rderooy commented 4 years ago

To ensure this issue is not related to the HD size, I tried it with a 250MB instead (imgmake hdd.img -t hd_250).

The config contains:

[ide, primary]
int13fakeio=true
int13fakev86io=false
enable pio32=true

The hdd is being mounted as follows: imgmount c hdd.img -reservecyl 1 -ide 1m

Disabling pio32, or removing the -ide 1m option makes no difference.

Running C:\WINDOWS\MSD.EXE, it correctly reports a type 47 HDD with 489 cylinders, 16 heads, 512 bytes/sector and 63 sectors/track.

With device=*int13 and device=*wdctrl in the [386Enh] section (just after device=*pageswap), I get the usual:

The Microsoft Windows 32-bit disk driver (WDCTRL) validation failed at
phase 03, 3F

To continue starting Windows without using the 32-bit
disk driver, press any key.

I also tried it with device=ontrackw.386 in the [386Enh] section, instead of device=*wdctrl and I get the following error:

The Ontrack Windows 32-bit disk driver (ONTRACKW) has failed
validation on one or more drives.
This is usually caused by an unsupported BIOS translation.
You must turn off 32-bit disk access by specifying
32BitDiskAccess=Off in the [386Enh] section of the SYSTEM.INI file.
Validation failed at phase 03, 3F
To continue starting Windows without using the 32-bit
disk driver, press any key.
rderooy commented 4 years ago

Here is the log of starting DOS 6.22 + WfW3.11 and the config.sys/autoexec.bat.

$ dosbox-x -conf wfw.conf 
LOG: Early LOG Init complete
LOG: Logging init: beginning logging proper. This is the end of the early init logging
LOG: Logging: No logfile was given. All further logging will be discarded.
LOG: DOSBox-X version 0.83.2
LOG: Current X11 keyboard layout (token) is: 'us'
LOG: Host keyboard layout is now us (US English)
LOG: Mapper keyboard layout is now us (US English)
LOG: SDL1 auto-detected desktop as 3840 x 1200
LOG: X11 main window is 640 x 400 maximized=0
LOG: X11 extension XRANDR is available
LOG: XRandR CRTC 0: pos=(1920,0) size=(1920,1080) outputs=1
LOG: Our window lies on this CRTC display (window pos=(1910,19) size=(640,400) match=(2230,219)).
LOG:   Goes to output 0: name='XWAYLAND0' size_mm=(480 x 270)
LOG: Screen report: Method 'XRandR' (1920.000 x 1080.000 pixels) at (1920.000 x 0.000) (480.000 x 270.000 mm) (18.898 x 10.630 in) (101.600 x 101.600 DPI)
LOG: ISA BCLK: 8333333.333Hz (25000000/3)
LOG: monopal: green, 
LOG: USING AVI+ZMBV
LOG: Max 3670016 sz 262144
LOG: Final 262144
fluidsynth: Using PulseAudio driver
fluidsynth: warning: Failed to set thread to high priority
fluidsynth: warning: Failed to pin the sample data to RAM; swapping is possible.
LOG: MIDI:fluidsynth: Loaded SoundFont: /usr/share/soundfonts/default.sf2
LOG: MIDI:Opened device:fluidsynth
LOG: Pentium CMPXCHG8B emulation is enabled
LOG: VOODOO LFB now at d0000000
LOG: MPU-401 Registering I/O ports as if IBM PC MPU-401 at base 330h
LOG: GetDesktopResolution reading X11 desktop resolution
LOG: Root window (ID 960) is 3840 x 1200
LOG: X11 main window is 640 x 400 maximized=0
LOG: XRandR CRTC 0: pos=(1920,0) size=(1920,1080) outputs=1
LOG: Our window lies on this CRTC display (window pos=(1910,19) size=(640,400) match=(2230,219)).
LOG:   Goes to output 0: name='XWAYLAND0' size_mm=(480 x 270)
LOG: Screen report: Method 'XRandR' (1920.000 x 1080.000 pixels) at (1920.000 x 0.000) (480.000 x 270.000 mm) (18.898 x 10.630 in) (101.600 x 101.600 DPI)
LOG: Allocated APM BIOS pm entry point at f000:e84c
LOG: Writing code to fe84c
LOG: NE2000: Base=0x300 irq=10
LOG: Using Network interface:
wlp3s0
(no description)
LOG: X11 main window is 640 x 400 maximized=0
LOG: XRandR CRTC 0: pos=(1920,0) size=(1920,1080) outputs=1
LOG: Our window lies on this CRTC display (window pos=(1910,19) size=(640,400) match=(2230,219)).
LOG:   Goes to output 0: name='XWAYLAND0' size_mm=(480 x 270)
LOG: Screen report: Method 'XRandR' (1920.000 x 1080.000 pixels) at (1920.000 x 0.000) (480.000 x 270.000 mm) (18.898 x 10.630 in) (101.600 x 101.600 DPI)
LOG: ISA Plug & Play BIOS enabled
LOG: VGA ROM BIOS init callback
LOG: pixratio 1.000, dw false, dh false
LOG: Aspect ratio: 640 x 480  xToY=1.333 yToX=0.750
LOG: menuScale=1
LOG: surface consider=640x497 final=640x497
LOG: X11 main window is 640 x 497 maximized=0
LOG: XRandR CRTC 0: pos=(1920,0) size=(1920,1080) outputs=1
LOG: Our window lies on this CRTC display (window pos=(1910,19) size=(640,497) match=(2230,267)).
LOG:   Goes to output 0: name='XWAYLAND0' size_mm=(480 x 270)
LOG: Screen report: Method 'XRandR' (1920.000 x 1080.000 pixels) at (1920.000 x 0.000) (480.000 x 270.000 mm) (18.898 x 10.630 in) (101.600 x 101.600 DPI)
LOG:    3023664 ERROR BIOS:Keyboard layout file auto not found
LOG:    3023664 ERROR BIOS:Keyboard layout file auto not found
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:    0x0701 sz=0x002d
LOG: COMMAND.COM main body (PSP):      0x072f sz=0x009a
LOG: COMMAND.COM stack:                0x0749
LOG: pixratio 1.350, dw false, dh false
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: menuScale=1
LOG: surface consider=720x417 final=720x417
LOG: X11 main window is 720 x 417 maximized=0
LOG: XRandR CRTC 0: pos=(1920,0) size=(1920,1080) outputs=1
LOG: Our window lies on this CRTC display (window pos=(1910,19) size=(720,417) match=(2270,227)).
LOG:   Goes to output 0: name='XWAYLAND0' size_mm=(480 x 270)
LOG: Screen report: Method 'XRandR' (1920.000 x 1080.000 pixels) at (1920.000 x 0.000) (480.000 x 270.000 mm) (18.898 x 10.630 in) (101.600 x 101.600 DPI)
LOG: IDE: index 0 slave=0
LOG: Using partition 0 on drive (type 0x06); skipping 63 sectors
LOG: FAT: BPB says 63 sectors/track 16 heads 512 bytes/sector
LOG: Mounted FAT volume is FAT16 with 61541 clusters
LOG: Mapping BIOS DISK C/H/S 489/16/63 as IDE 489/16/63
LOG: Booting guest OS stack_seg=0x7000 load_seg=0x07c0
LOG: Removing UMB block 0xcc00-0xdfff
LOG: Alright: DOS kernel shutdown, booting a guest OS
LOG:   CS:IP=0000:7c00 SS:SP=7000:0100 AX=0000 BX=7c00 CX=0001 DX=0080
LOG: IDE 1m reset by BIOS disk 0x80
LOG:    7331927 ERROR BIOS:Disk 0 not active
LOG:    7332543 ERROR BIOS:Disk 0 not active
LOG:    7332595 ERROR BIOS:Disk 0 not active
LOG:    7333504 ERROR BIOS:INT15:Unknown call ax=4101
LOG:   13371743 ERROR BIOS:INT15:Unknown call ax=2403
LOG:   13537452 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537466 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537480 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537494 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537508 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537522 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537536 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537550 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537564 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537578 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537592 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537606 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537620 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537634 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537648 ERROR BIOS:INT15:Unknown call ax=D800
LOG:   13537662 ERROR BIOS:INT15:Unknown call ax=D800
LOG: DOSBox has switched to max cycles, because of the setting: cycles=auto.
If the game runs too fast, try a fixed cycles amount in DOSBox's options.
LOG:   13657824 ERROR CPU:Write 0 to rom at e00a0
LOG:   13657825 ERROR CPU:Write ffff to rom at e00a2
LOG:   13657830 ERROR CPU:Write ffff to rom at e00a0
LOG:   13657843 ERROR CPU:Write ffff to rom at e00a2
LOG:   13657878 ERROR CPU:Write 0 to rom at e08a0
LOG:   13657879 ERROR CPU:Write ffff to rom at e08a2
LOG:   13657884 ERROR CPU:Write ffff to rom at e08a0
LOG:   13657897 ERROR CPU:Write ffff to rom at e08a2
LOG:   13657932 ERROR CPU:Write 0 to rom at e10a0
LOG:   13657933 ERROR CPU:Write ffff to rom at e10a2
LOG:   13657938 ERROR CPU:Write ffff to rom at e10a0
LOG:   13657951 ERROR CPU:Write ffff to rom at e10a2
LOG:   13657986 ERROR CPU:Write 0 to rom at e18a0
LOG:   13657987 ERROR CPU:Write ffff to rom at e18a2
LOG:   13657992 ERROR CPU:Write ffff to rom at e18a0
LOG:   13658005 ERROR CPU:Write ffff to rom at e18a2
LOG:   13658040 ERROR CPU:Write 0 to rom at e20a0
LOG:   13658041 ERROR CPU:Write ffff to rom at e20a2
LOG:   13658046 ERROR CPU:Write ffff to rom at e20a0
LOG:   13658059 ERROR CPU:Write ffff to rom at e20a2
LOG:   13658094 ERROR CPU:Write 0 to rom at e28a0
LOG:   13658095 ERROR CPU:Write ffff to rom at e28a2
LOG:   13658100 ERROR CPU:Write ffff to rom at e28a0
LOG:   13658113 ERROR CPU:Write ffff to rom at e28a2
LOG:   13658148 ERROR CPU:Write 0 to rom at e30a0
LOG:   13658149 ERROR CPU:Write ffff to rom at e30a2
LOG:   13658154 ERROR CPU:Write ffff to rom at e30a0
LOG:   13658167 ERROR CPU:Write ffff to rom at e30a2
LOG:   13658202 ERROR CPU:Write 0 to rom at e38a0
LOG:   13658203 ERROR CPU:Write ffff to rom at e38a2
LOG:   13658208 ERROR CPU:Write ffff to rom at e38a0
LOG:   13658221 ERROR CPU:Write ffff to rom at e38a2
LOG:   13658256 ERROR CPU:Write 0 to rom at e40a0
LOG:   13658257 ERROR CPU:Write ffff to rom at e40a2
LOG:   13658262 ERROR CPU:Write ffff to rom at e40a0
LOG:   13658275 ERROR CPU:Write ffff to rom at e40a2
LOG:   13658310 ERROR CPU:Write 0 to rom at e48a0
LOG:   13658311 ERROR CPU:Write ffff to rom at e48a2
LOG:   13658316 ERROR CPU:Write ffff to rom at e48a0
LOG:   13658329 ERROR CPU:Write ffff to rom at e48a2
LOG:   13658364 ERROR CPU:Write 0 to rom at e50a0
LOG:   13658365 ERROR CPU:Write ffff to rom at e50a2
LOG:   13658370 ERROR CPU:Write ffff to rom at e50a0
LOG:   13658383 ERROR CPU:Write ffff to rom at e50a2
LOG:   13658418 ERROR CPU:Write 0 to rom at e58a0
LOG:   13658419 ERROR CPU:Write ffff to rom at e58a2
LOG:   13658424 ERROR CPU:Write ffff to rom at e58a0
LOG:   13658437 ERROR CPU:Write ffff to rom at e58a2
LOG:   13658472 ERROR CPU:Write 0 to rom at e60a0
LOG:   13658473 ERROR CPU:Write ffff to rom at e60a2
LOG:   13658478 ERROR CPU:Write ffff to rom at e60a0
LOG:   13658491 ERROR CPU:Write ffff to rom at e60a2
LOG:   13658526 ERROR CPU:Write 0 to rom at e68a0
LOG:   13658527 ERROR CPU:Write ffff to rom at e68a2
LOG:   13658532 ERROR CPU:Write ffff to rom at e68a0
LOG:   13658545 ERROR CPU:Write ffff to rom at e68a2
LOG:   13658580 ERROR CPU:Write 0 to rom at e70a0
LOG:   13658581 ERROR CPU:Write ffff to rom at e70a2
LOG:   13658586 ERROR CPU:Write ffff to rom at e70a0
LOG:   13658599 ERROR CPU:Write ffff to rom at e70a2
LOG:   13658634 ERROR CPU:Write 0 to rom at e78a0
LOG:   13658635 ERROR CPU:Write ffff to rom at e78a2
LOG:   13658640 ERROR CPU:Write ffff to rom at e78a0
LOG:   13658653 ERROR CPU:Write ffff to rom at e78a2
LOG:   13658688 ERROR CPU:Write 0 to rom at e80a0
LOG:   13658689 ERROR CPU:Write ffff to rom at e80a2
LOG:   13658694 ERROR CPU:Write ffff to rom at e80a0
LOG:   13658707 ERROR CPU:Write ffff to rom at e80a2
LOG:   13658742 ERROR CPU:Write 0 to rom at e88a0
LOG:   13658743 ERROR CPU:Write ffff to rom at e88a2
LOG:   13658748 ERROR CPU:Write ffff to rom at e88a0
LOG:   13658761 ERROR CPU:Write ffff to rom at e88a2
LOG:   13658796 ERROR CPU:Write 0 to rom at e90a0
LOG:   13658797 ERROR CPU:Write ffff to rom at e90a2
LOG:   13658802 ERROR CPU:Write ffff to rom at e90a0
LOG:   13658815 ERROR CPU:Write ffff to rom at e90a2
LOG:   13658850 ERROR CPU:Write 0 to rom at e98a0
LOG:   13658851 ERROR CPU:Write ffff to rom at e98a2
LOG:   13658856 ERROR CPU:Write ffff to rom at e98a0
LOG:   13658869 ERROR CPU:Write ffff to rom at e98a2
LOG:   13658904 ERROR CPU:Write 0 to rom at ea0a0
LOG:   13658905 ERROR CPU:Write ffff to rom at ea0a2
LOG:   13658910 ERROR CPU:Write ffff to rom at ea0a0
LOG:   13658923 ERROR CPU:Write ffff to rom at ea0a2
LOG:   13658958 ERROR CPU:Write 0 to rom at ea8a0
LOG:   13658959 ERROR CPU:Write ffff to rom at ea8a2
LOG:   13658964 ERROR CPU:Write ffff to rom at ea8a0
LOG:   13658977 ERROR CPU:Write ffff to rom at ea8a2
LOG:   13659012 ERROR CPU:Write 0 to rom at eb0a0
LOG:   13659013 ERROR CPU:Write ffff to rom at eb0a2
LOG:   13659018 ERROR CPU:Write ffff to rom at eb0a0
LOG:   13659031 ERROR CPU:Write ffff to rom at eb0a2
LOG:   13659066 ERROR CPU:Write 0 to rom at eb8a0
LOG:   13659067 ERROR CPU:Write ffff to rom at eb8a2
LOG:   13659072 ERROR CPU:Write ffff to rom at eb8a0
LOG:   13659085 ERROR CPU:Write ffff to rom at eb8a2
LOG:   13659120 ERROR CPU:Write 0 to rom at ec0a0
LOG:   13659121 ERROR CPU:Write ffff to rom at ec0a2
LOG:   13659126 ERROR CPU:Write ffff to rom at ec0a0
LOG:   13659139 ERROR CPU:Write ffff to rom at ec0a2
LOG:   13659174 ERROR CPU:Write 0 to rom at ec8a0
LOG:   13659175 ERROR CPU:Write ffff to rom at ec8a2
LOG:   13659180 ERROR CPU:Write ffff to rom at ec8a0
LOG:   13659193 ERROR CPU:Write ffff to rom at ec8a2
LOG:   13659228 ERROR CPU:Write 0 to rom at ed0a0
LOG:   13659229 ERROR CPU:Write ffff to rom at ed0a2
LOG:   13659234 ERROR CPU:Write ffff to rom at ed0a0
LOG:   13659247 ERROR CPU:Write ffff to rom at ed0a2
LOG:   13659282 ERROR CPU:Write 0 to rom at ed8a0
LOG:   13659283 ERROR CPU:Write ffff to rom at ed8a2
LOG:   13659288 ERROR CPU:Write ffff to rom at ed8a0
LOG:   13659301 ERROR CPU:Write ffff to rom at ed8a2
LOG:   13659336 ERROR CPU:Write 0 to rom at ee0a0
LOG:   13659337 ERROR CPU:Write ffff to rom at ee0a2
LOG:   13659342 ERROR CPU:Write ffff to rom at ee0a0
LOG:   13659355 ERROR CPU:Write ffff to rom at ee0a2
LOG:   13659390 ERROR CPU:Write 0 to rom at ee8a0
LOG:   13659391 ERROR CPU:Write ffff to rom at ee8a2
LOG:   13659396 ERROR CPU:Write ffff to rom at ee8a0
LOG:   13659409 ERROR CPU:Write ffff to rom at ee8a2
LOG:   13659444 ERROR CPU:Write 0 to rom at ef0a0
LOG:   13659445 ERROR CPU:Write ffff to rom at ef0a2
LOG:   13659450 ERROR CPU:Write ffff to rom at ef0a0
LOG:   13659463 ERROR CPU:Write ffff to rom at ef0a2
LOG:   13659498 ERROR CPU:Write 0 to rom at ef8a0
LOG:   13659499 ERROR CPU:Write ffff to rom at ef8a2
LOG:   13659504 ERROR CPU:Write ffff to rom at ef8a0
LOG:   13659517 ERROR CPU:Write ffff to rom at ef8a2
LOG:   14766193 ERROR BIOS:Disk 3 not active
LOG:   14766287 ERROR BIOS:Disk 4 not active
LOG:   14766381 ERROR BIOS:Disk 5 not active
LOG:   14766475 ERROR BIOS:Disk 127 non-existant
LOG:   14766569 ERROR BIOS:Disk 127 non-existant
LOG:   14766663 ERROR BIOS:Disk 127 non-existant
LOG:   14766757 ERROR BIOS:Disk 127 non-existant
LOG:   14766853 ERROR BIOS:Disk 0 not active
LOG:   14766949 ERROR BIOS:Disk 1 not active
LOG: IDE warning: INT 13h read from virtual 8086 mode.
LOG:              If using Windows 95, please set int13fakev86io=true for proper 32-bit disk access
LOG:   15479797 ERROR CPU:Illegal Unhandled Interrupt Called D
LOG:  233101717 ERROR INT10:Function 6F00 not supported
LOG: pixratio 1.000, dw false, dh false
LOG: Aspect ratio: 640 x 480  xToY=1.333 yToX=0.750
LOG: menuScale=1
LOG: surface consider=640x497 final=640x497
LOG: X11 main window is 640 x 497 maximized=0
LOG: XRandR CRTC 0: pos=(1920,0) size=(1920,1080) outputs=1
LOG: Our window lies on this CRTC display (window pos=(1910,19) size=(640,497) match=(2230,267)).
LOG:   Goes to output 0: name='XWAYLAND0' size_mm=(480 x 270)
LOG: Screen report: Method 'XRandR' (1920.000 x 1080.000 pixels) at (1920.000 x 0.000) (480.000 x 270.000 mm) (18.898 x 10.630 in) (101.600 x 101.600 DPI)
LOG:  235812405 ERROR CPU:Illegal Unhandled Interrupt Called D
LOG: APM BIOS: Connected to 32-bit protected mode interface
LOG: APM BIOS: OS disconnected
LOG:  236217599 ERROR INT10:Function 6F00 not supported
LOG:  236219127 ERROR INT10:Function 12:Call  6 not handled
LOG:  236313546 ERROR CPU:Illegal Unhandled Interrupt Called 5C
LOG:  236313659 ERROR CPU:Illegal Unhandled Interrupt Called 5C
LOG:  236313772 ERROR CPU:Illegal Unhandled Interrupt Called 5C
LOG:  236313885 ERROR CPU:Illegal Unhandled Interrupt Called 5C
LOG:  236313998 ERROR CPU:Illegal Unhandled Interrupt Called 5C
LOG:  236314111 ERROR CPU:Illegal Unhandled Interrupt Called 5C
LOG:  236314224 ERROR CPU:Illegal Unhandled Interrupt Called 5C
LOG:  236314338 ERROR CPU:Illegal Unhandled Interrupt Called 5C
LOG: pixratio 1.350, dw false, dh false
LOG: Aspect ratio: 720 x 540  xToY=1.333 yToX=0.750
LOG: menuScale=1
LOG: surface consider=720x417 final=720x417
LOG: X11 main window is 720 x 417 maximized=0
LOG: XRandR CRTC 0: pos=(1920,0) size=(1920,1080) outputs=1
LOG: Our window lies on this CRTC display (window pos=(1910,19) size=(720,417) match=(2270,227)).
LOG:   Goes to output 0: name='XWAYLAND0' size_mm=(480 x 270)
LOG: Screen report: Method 'XRandR' (1920.000 x 1080.000 pixels) at (1920.000 x 0.000) (480.000 x 270.000 mm) (18.898 x 10.630 in) (101.600 x 101.600 DPI)
LOG: APM BIOS: Connected to 32-bit protected mode interface
LOG: INT 15h mouse initialized to 3-byte protocol
LOG: INT 15h reporting mouse device ID 0x00
LOG: BX_ERROR: DCR write, loopback mode selected
LOG: PNP OS changed I/O read port to 0x273 (from 0x20B)
LOG: pixratio 1.000, dw false, dh false
LOG: Aspect ratio: 640 x 480  xToY=1.333 yToX=0.750
LOG: menuScale=1
LOG: surface consider=640x497 final=640x497
LOG: X11 main window is 640 x 497 maximized=0
LOG: XRandR CRTC 0: pos=(1920,0) size=(1920,1080) outputs=1
LOG: Our window lies on this CRTC display (window pos=(1910,19) size=(640,497) match=(2230,267)).
LOG:   Goes to output 0: name='XWAYLAND0' size_mm=(480 x 270)
LOG: Screen report: Method 'XRandR' (1920.000 x 1080.000 pixels) at (1920.000 x 0.000) (480.000 x 270.000 mm) (18.898 x 10.630 in) (101.600 x 101.600 DPI)

guest os_001

CyberXZT commented 4 years ago

I originally ran into the same problem (03, 3F) but might have made some progress. Building on the above, I have made the following changes: I created the disk image using:

IMGMAKE hdd.img -t hd_520 -nofs

And to mount the disk, I used:

IMGMOUNT 2 hdd.img -size 512,63,16,1023 -fs none -reservecyl 1

I do not get any error on startup but Virtual Memory still reports failure:

Disk Access: Using BIOS
File Access: Drive C: 32-Bit

Other notes:

CyberXZT commented 4 years ago

I believe 32-bit disk access is working for me contrary to what Windows is reporting. Setting [log] sblaster = debug reports a lot of IDE activity similar to the following:

 293566612 DEBUG SBLASTER:IDE ATA command 20 dh=0xa4 count=0x08 chs=00/04/25
 293566612       SBLASTER:IDE ATA command 20
 293662674 DEBUG SBLASTER:IDE ATA command 20 dh=0xa4 count=0x08 chs=00/04/2d
 293662674       SBLASTER:IDE ATA command 20
 293759052 DEBUG SBLASTER:IDE ATA command 20 dh=0xa4 count=0x08 chs=00/04/35
 293759052       SBLASTER:IDE ATA command 20
 293855513 DEBUG SBLASTER:IDE ATA command 20 dh=0xa4 count=0x08 chs=00/04/3d
 293855513       SBLASTER:IDE ATA command 20
 310899926 DEBUG SBLASTER:IDE ATA command 30 dh=0xad count=0x0c chs=49/0d/06
 310899926       SBLASTER:IDE ATA command 30
 310904514 DEBUG SBLASTER:IDE ATA command 30 dh=0xae count=0x0b chs=49/0e/27
 310904514       SBLASTER:IDE ATA command 30
 310908772 DEBUG SBLASTER:IDE ATA command 30 dh=0xae count=0x01 chs=49/0e/17
 310908772       SBLASTER:IDE ATA command 30
 310911072 DEBUG SBLASTER:IDE ATA command 30 dh=0xae count=0x05 chs=49/0e/07
 310911072       SBLASTER:IDE ATA command 30
 310914355 DEBUG SBLASTER:IDE ATA command 30 dh=0xad count=0x0d chs=49/0d/36
 310914355       SBLASTER:IDE ATA command 30

Using Windows generates quite a lot of ATA command 20/ATA command 30 log entries. Reading from a file or launching an executable generates ATA command 20 log entries while writing to a file generates ATA command 30 log entries.

These log entries are not generated when only 32-bit file access is enabled.

CyberXZT commented 4 years ago

The WDCTRL checks can be bypassed by adding WDCTRLDRIVE0=true to [386Enh]. This has no affect on what Windows reports. This also appears to allow a drive mounted with IMGMOUNT C hdd.img -reservecyl 1 to be used although I haven't tested this extensively. The source code comes with the following notes:

WDCTRLDRIVE0
WDCTRLDRIVE1
These switches are used to force WDCTRL to be enabled on either
physical drive 0 or drive 1.  Setting these switches is very
dangerous as it bypasses all of WDCTRL's validation process for
determining whether the drive is compatible.  These are boolean
switches and the default is TRUE.

That switch exists in the ONTRACKW.386 driver but using it on a 2GB with the 08, 04 error I mentioned above caused a Disk Time-Out Error BSOD.

Other switches:

WDCTRLALTSTATUS0
WDCTRLALTSTATUS1
This switch is set ONLY when one or both of the above strings are
set.  Setting this switch causes WDCTRL to use the alternate status
register instead of the "normal" status register.  This switch should
only be set if necessary for the drive/controller combination.
This is a boolean switch and the default is FALSE.
WDCTRLDEBUG
This is for debugging of WDCTRL VxDs and when TRUE, forces
the debugger to stop at an INT 3 in the real mode initialization.
The default for this switch is FALSE.  TRUE values include strings
starting with 1, Y, y, T, and t.
WDCTRLDISABLE
When TRUE, disables the installation of the WDCTRL VxD.  This allows
a test of system start without the VxD.  This is meant to be
a temporary disable as it brings up a message on each startup.
The default for this switch is FALSE.  TRUE values include strings
starting with 1, Y, y, T, and t.
rderooy commented 4 years ago

Thanks! You have given me an important hint.

@joncampbell123 If I mount the image with device 2 and -fs none, I no longer get the WDCTRL error on starting Windows. And now both 32bit Disk and File access seem to be fine: guest os_004

The relevant parts of my config:

[ide, primary]
int13fakeio=true
int13fakev86io=false

[autoexec]
IMGMOUNT 2 hdd.img -fs none -reservecyl 1

These mount commands cause wdctrl to fail:

IMGMOUNT C hdd.img -reservecyl 1
IMGMOUNT C hdd.img -reservecyl 1 -ide 1m

While these works:

IMGMOUNT 2 hdd.img -size 512,63,16,489 -fs none -reservecyl 1
IMGMOUNT 2 hdd.img -fs none -reservecyl 1
rderooy commented 4 years ago

For completeness, here is my SYSTEM.INI. This is from WFW 3.11.

[boot]
drivers=mmsystem.dll power.drv msmixmgr.dll
sound.drv=mmsound.drv
comm.drv=comm.drv
keyboard.drv=keyboard.drv
system.drv=system.drv
shell=progman.exe
network.drv=wfwnet.drv
mouse.drv=mouse.drv
language.dll=
386grabber=vga.3gr
oemfonts.fon=vgaoem.fon
fixedfon.fon=vgafix.fon
fonts.fon=vgasys.fon
display.drv=vga.drv

[keyboard]
subtype=
type=4
keyboard.dll=
oemansi.bin=

[boot.description]
system.drv=MS-DOS System with APM
keyboard.typ=Enhanced 101 or 102 key US and Non US keyboards
mouse.drv=Microsoft, or IBM PS/2
language.dll=English (American)
codepage=437
woafont.fon=English (437)
aspect=100,96,96
display.drv=VGA
network.drv=Microsoft Windows Network (version 3.11)
secondnet.drv=No Additional Network Installed

[386Enh]
device=vpowerd.386
ebios=*ebios
device=*vpd
mouse=*vmd
woafont=dosapp.fon
display=*vddvga
EGA80WOA.FON=EGA80WOA.FON
EGA40WOA.FON=EGA40WOA.FON
CGA80WOA.FON=CGA80WOA.FON
CGA40WOA.FON=CGA40WOA.FON
keyboard=*vkd
network=*vnetbios,*vwc,vnetsup.386,vredir.386,vserver.386
netheapsize=20
device=*vcd
device=*vpicd
device=*vtd
device=*reboot
device=*vdmad
device=*vsd
device=*v86mmgr
device=*pageswap
device=*int13
device=*wdctrl
device=*dosmgr
device=*vmpoll
device=*wshell
device=*PAGEFILE
device=*BLOCKDEV
device=*vfd
device=*parity
device=*biosxlat
device=*vmcpd
device=*combuff
device=*cdpscsi
device=vtdapi.386
device=vpmtd.386
device=vcomm.386
device=serial.386
device=lpt.386
device=ifsmgr.386
device=vcache.386
device=vshare.386
local=CON
FileSysChange=off
COM3Irq=4
COM3Base=03E8
COM4Irq=3
COM4Base=02E8
netmisc=ndis.386,ndis2sup.386
netcard=ne2000.386
transport=netbeui.386
InDOSPolling=FALSE
32BitDiskAccess=ON
device=vfat.386
device=vsbpd.386
PermSwapDOSDrive=C
PermSwapSizeK=20480
32BitDiskAccess=On
MinTimeslice=20
WinTimeslice=100,50
WinExclusive=0
Com1AutoAssign=2
Com2AutoAssign=2

[NonWindowsApp]
localtsrs=dosedit,ced

[vcache]
minfilecache=512

[mci]
WaveAudio=mciwave.drv
Sequencer=mciseq.drv
CDAudio=mcicda.drv

[drivers]
timer=timer.drv
midimapper=midimap.drv
Midi=sb16fm.drv
Midi1=sb16snd.drv
Wave=sb16snd.drv
Aux=sb16snd.drv
Mixer=sb16snd.drv

[DDEShares]
CHAT$=winchat,chat,,31,,0,,0,0,0
SCHAT$=winchat,chat,,31,,0,,0,0,0
CLPBK$=clipsrv,system,,31,,0,,0,0,0
HEARTS$=mshearts,hearts,,15,,0,,0,0,0

[Network]
winnet=wfwnet/00025100
multinet=nonet
FileSharing=Yes
PrintSharing=Yes
LogonDisconnected=yes
EnableSharing=Yes
UserName=DOSBOX-X
Workgroup=WORKGROUP
ComputerName=DOSBOX-X
Comment=DOSBox-X

[network drivers]
netcard=ne2000.dos
transport=ndishlp.sys,*netbeui
devdir=C:\WINDOWS
LoadRMDrivers=No

[Password Lists]
*Shares=C:\WINDOWS\Share000.PWL
[sndblst.drv]
Port=220
Int=7
DmaChannel=1
MidiPort=330
HDmaChannel=5
FDMAPlayBack=1
FDMARecording=1
FullDuplex=1
VoiceVolume=16, 16
FMVolume=16, 16
CDVolume=16, 16
LineVolume=16, 16
MicVolume=16
MasterVolume=16, 16
SpeakerVolume=16
AuxVolume=0, 0
InputMasterVolume=16, 16
MuteVirtual=10
OutputMixerSwitch=6
BassTone=16, 16
TrebleTone=16, 16
RecordGain=1, 1
OutputGain=1, 1
AGC=0
Mux_WaveIn=1e
CyberXZT commented 4 years ago

Huh. For me, Windows still reports Disk Access: Using BIOS despite seemingly working otherwise.

Do you mind posting your entire dosbox configuration? I also notice you are using a swapfile. I am not using one but I suppose I can try to see if that makes a difference.

rderooy commented 4 years ago

My understanding is that 32-Bit Disk access is only used for the swap file.

rderooy commented 4 years ago

There is not much more to my config. I prefer to use a config with only the options that I changed from default.

[sdl]
autolock=true

[dosbox]
name=WfW 3.11
memsize=256

[cpu]
cputype=pentium
core=normal
#cycles=60000

[ne2000]
ne2000=true
nicirq=10
realnic=eno1

[midi]
mididevice=fluidsynth
fluid.driver=pulseaudio
fluid.soundfont=/usr/share/soundfonts/default.sf2

[ide, primary]
int13fakeio=true
int13fakev86io=false

#[ide, secondary]
#int13fakeio=true
#int13fakev86io=false
#cd-rom insertion delay=4000

[autoexec]
#IMGMOUNT C hdd.img -ide 1m -reservecyl 1
#IMGMOUNT 2 hdd.img -size 512,63,16,489  -fs none -reservecyl 1
IMGMOUNT 2 hdd.img -fs none -reservecyl 1
boot C:
CyberXZT commented 4 years ago

Strange....

With a swapfile enabled: Disk Access: Using 32-Bit Disk Access Log is filled with: SBLASTER:IDE ATA command XX

With a swapfile disabled: Disk Access: Using BIOS Log is filled with: SBLASTER:IDE ATA command XX

With 32BitDiskAccess=Off: Disk Access: Using BIOS No ATA entries in log

Windows is still doing something.

CyberXZT commented 4 years ago

I did some benchmarking. This involved copying a 20MB file (containing only zeroes) in File Manager and timing how long it takes.

32-Bit Disk Access / 32-Bit File Access Attempt 1 - 18s Attempt 2 - 18s Attempt 3 - 18s (These results were identical with and without a swapfile.)

32-Bit File Access Only Attempt 1 - 5s Attempt 2 - 5s Attempt 3 - 5s

None Attempt 1 - 3s Attempt 2 - 2s Attempt 3 - 3s

32-bit disk access works even when you don't have a swapfile however DOSBox-X performs significantly better with both features disabled.

rderooy commented 4 years ago

Interesting results. I have not tried any IO benchmarks, and I'm not one of the developers. But both 16 and 32bit paths are emulated and it seems the 16bit path is quite a bit more efficient.

How did you do the timing? Just using a stopwatch?

CyberXZT commented 4 years ago

Yes. There was nothing precise about the testing. I'd be curious to see the results in Windows 95.

rderooy commented 4 years ago

I was thinking about running some benchmarks with probably WinBench 4.0. I will probably try it in the next day or so. And yes running some 16 vs 32 disk IO benchmarks on Win95 would also be a good idea.

rderooy commented 4 years ago

I ran the "Disk WinMark" of winbench 4.0 on WFW 3.11, and here are the results

values in Thousands of Bytes/Sec
3680 32Bit Disk and 32Bit File
1390 32Bit Disk
4360 32Bit File
4360 disabled both 32Bit Disk and 32Bit File

WinMark 4.0 unfortunately does not have the compare or database function of later editions, so you cannot compare the benchmark results against other runs or against contemporary systems.

Also, I'm not overly impressed by these values. The 4360 effectively means 4360KB/s or 4.3MB/s which seems like a really low value considering that even a spinning disk is capable of delivering typically 80+ MB/sec sequential and I'm actually using an SSD.

But then your values were not great either.

20MB/18sec = 1.11MB/sec
20MB/5sec  = 4MB/sec
20MB/3sec  = 6.66MB/sec
20MB/2sec  = 10MB/sec

For changing between modes, all I did was change the settings in the 386 Enhanced control panel.

Also, I had quite a bit of problems starting WFW with only 32Bit Disk enabled. When starting it would most of the time end up closing DOSBox-X, or exit back to DOS. In both situations no errors in the logs. But after half a dozen attempts it started Windows and I was able to run the benchmark.

rderooy commented 4 years ago

Actually, perhaps I'm too negative on the performance. Found an old PC Magazine "486 Buyers' Guide" testing 191 systems using this exact benchmark on Windows 3.1 (which lacks 32Bit File) and the very best score they got was 1449. https://books.google.lu/books?id=7k7q-wS0t00C&lpg=PA147&ots=ioLokc5uNS&dq=winmark%20disk%204.0&pg=PA156#v=onepage&q&f=false

update Found another article about WFW 3.11 that uses the same benchmark. Going from Win 3.1 to Win 3.11 can give a 55% performance boost on contemporary systems. https://books.google.lu/books?id=E9TvMcu1mIwC&lpg=PA38&dq=winmark%20disk%20windows%203.11&pg=PA38#v=onepage&q=winmark%20disk%20windows%203.11&f=false

rderooy commented 4 years ago

Running the Disk WinMark 96 from WinBench 96 on Win95 RTM gives me a score of 2350 with 32bit disk IO enabled. After setting "Disable all 32 bit protected-mode disk drivers." in filesystem troubleshooting, I got a score of 2510.

So yes, also on Win95 the 16bit IO path is faster.

p.s. the scores from different WinBench versions CANNOT be compared.

guest os_001

rderooy commented 4 years ago

I thought WinBench 96 was Win95+ only. But that is not the case. So for a better comparison, running Winbench 96 on WFW 3.11, I get the below results. It seems that 32bit IO performance on Win 3.11 is much worse than 32bit performance on Win95.

guest os_005

CyberXZT commented 4 years ago

Very cool. It would be interesting to see these results on period correct hardware. It looks like the 32-bit disk support in Windows 3.1 is absolutely terrible but I am guessing cycle accurate 16/32-bit mode switches would have made up for this. Good to see that Windows 95 is basically the same. I am guessing this would also be vastly different on real hardware.

As for the disk performance: I believe the limiting factor is the guest CPU. For reference, I am using a Raspberry Pi 4 OC'd to 2Ghz and cycles = max.

rderooy commented 4 years ago

For period correct hardware, that is why I added some reference systems to the charts like the Pentium 100 Dell Dimension. Also, DOSBox is not a cycle accurate emulator. Cycle accurate really makes no sense for DOSBox, as there were too many PC component variations, so differences between systems are expected even on original hardware.

I have a Pi4, but it is used for something else. Instead I'm using a rather dated i5-4430S @2.7GHz with SSD for most of my DOSBox testing.

CyberXZT commented 4 years ago

Yeah I get that. I'm curious about period correct benchmarking between 16-bit and 32-bit paths. I think the lack of cycle accurate emulation works in this favor and I'd imagine the 16-bit path would be substantially slower. I'm just curious to see just how drastic that difference is.