VOGONS

Common searches


First post, by Bumrusher89

User metadata
Rank Newbie
Rank
Newbie

Hello people I am having some questions about how Windows 3.1 runs DOS programs when just click on the DOS program icon to run.

How does Windows 3.1 runs a DOS program when just clicking on the icon to the DOS program?

Reply 1 of 17, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Hi, good morning!
I think it depends on the mode of Windows 3.1..
Windows 3.1 has Standard-Mode and 386 Enhanced-Mode.

Standard-Mode was made to be compatible with the 286 processor.
- On a 286, DOSX and KRNL286 are executed and load Windows. On a 386+, KRNL386 may also do the job.
In Standard-Mode, DOS programs (aka Non-Windows programs) are run in foreground only.
This means, that Windows runs the DOS program and becomes inactive.
It now behaves like a task-switcher (like DOS-Shell), so to say.

Enhanced-Mode was designed with 386 or later processors.
- It uses both 32-Bit Protected-Mode and the V86 mode. KRNL386 loads Windows.
In Enhanced-Mode, DOS programs are run in separate V86 tasks - here,
Windows uses a hardware feature of the 386 processor and its built-in Memory Management Unit (MMU).

V86 means Virtual 8086 (Address) Mode.
It creates multiple instances of an 8086 processor, so to say, each with separate RAM.
Windows 3.1 provides its own DOS emulation to that, akin to Windows 95.

If Windows has its own hard disk driver loaded (FastDisk aha 32-Bit Disk Access) it gains the ability
to trap hard disk calls (trap BIOS routine int13h) and handle the requests on its own.
In this state, Windows 3.1 becomes *almost* as powerful as Windows 95.
It nolonger needs the real DOS to do most things. It essentially becomes self-sufficient.
DOS programs now talk to the int21 emulation provided by Windows 3.1 most of the time (int21h is the DOS API/ABI).
Now, Windows 3.1 can run most DOS programs windowed in a DOS box, provide seamless mouse integration and emulate CGA graphics (but not EGA/VGA).
https://www.youtube.com/watch?v=DwkAVlUBu30

Windows for Workgroups 3.11 goes a little bit further and does include a hard disk cache, VFAT and a 32-Bit network stack etc..

That's why multiple DOS programs are run in preemptive multitasking on Windows 3.1.
Note: Windows 3.1 programs don't make use of this, due to the design of Windows 3.1 and are using cooperative multitasking, even on Win95/98/Me.

Windows 3.1 programs are using a shared memory model, which means that Windows 3.1 programs
have access to data and code of other Windows programs and libraries (DLLs) loaded in RAM.

(Also related to Win16 programs: The 286's Protected-Mode has an MMU which uses segmentation.
Segments can vary from 4KB? to 64KB, but Windows 3.x in Standard-Mode doesn't make use of this ability and sticks to the default of 64KB.
Maybe because of backwards compatibility with Real-Mode, which still was available in Windows 3.0.
The 8086 had only one mode with a fixed segment size of 64KB..
The 386's Protected-Mode can address 4GB, its MMU also uses segmentation (plus paging) , but an can change segment size from 4KB? to 4GB.
That's why 386 Enhanced-Mode is made different. It sets the segment size to 4GB, which effectively disables segmentation.
In memory, it chops off 64KB code into 4K blocks. This happens silently in the background.
Last, but not least, both the 286 and 386 have memory protection and a concept of privilegs, the so-called ring scheme.
But Windows 3.x doesn't use them.)

Edit: Little edit.

Edit: You can use PIF editor to alter the settings for DOS programs.

Edit: Another edit.

Edit: I hope I didn't exaggerate and complicate things here! 😅
I know, it's a bad habit of mine. Perhaps I also misunderstood the question.
If so, please just tell me so. 😁

Edit: Reformatted the text on a PC..

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 2 of 17, by Bumrusher89

User metadata
Rank Newbie
Rank
Newbie
Jo22 wrote on 2021-02-10, 07:54:
Hi, good morning! I think it depends on the mode of Windows 3.1.. Windows 3.1 has Standard-Mode and 386 Enhanced-Mode. […]
Show full quote

Hi, good morning!
I think it depends on the mode of Windows 3.1..
Windows 3.1 has Standard-Mode and 386 Enhanced-Mode.

Standard-Mode was made to be compatible with the 286 processor.
- On a 286, DOSX and KRNL286 are executed and load Windows. On a 386+, KRNL386 may also do the job.
In Standard-Mode, DOS programs (aka Non-Windows programs) are run in foreground only.
This means, that Windows runs the DOS program and becomes inactive.
It now behaves like a task-switcher (like DOS-Shell), so to say.

Enhanced-Mode was designed with 386 or later processors.
- It uses both 32-Bit Protected-Mode and the V86 mode. KRNL386 loads Windows.
In Enhanced-Mode, DOS programs are run in separate V86 tasks - here,
Windows uses a hardware feature of the 386 processor and its built-in Memory Management Unit (MMU).

V86 means Virtual 8086 (Address) Mode.
It creates multiple instances of an 8086 processor, so to say, each with separate RAM.
Windows 3.1 provides its own DOS emulation to that, akin to Windows 95.

If Windows has its own hard disk driver loaded (FastDisk aha 32-Bit Disk Access) it gains the ability
to trap hard disk calls (trap BIOS routine int13h) and handle the requests on its own.
In this state, Windows 3.1 becomes *almost* as powerful as Windows 95.
It nolonger needs the real DOS to do most things. It essentially becomes self-sufficient.
DOS programs now talk to the int21 emulation provided by Windows 3.1 most of the time (int21h is the DOS API/ABI).
Now, Windows 3.1 can run most DOS programs windowed in a DOS box, provide seamless mouse integration and emulate CGA graphics (but not EGA/VGA).
https://www.youtube.com/watch?v=DwkAVlUBu30

Windows for Workgroups 3.11 goes a little bit further and does include a hard disk cache, VFAT and a 32-Bit network stack etc..

That's why multiple DOS programs are run in preemptive multitasking on Windows 3.1.
Note: Windows 3.1 programs don't make use of this, due to the design of Windows 3.1 and are using cooperative multitasking, even on Win95/98/Me.

Windows 3.1 programs are using a shared memory model, which means that Windows 3.1 programs
have access to data and code of other Windows programs and libraries (DLLs) loaded in RAM.

(Also related to Win16 programs: The 286's Protected-Mode has an MMU which uses segmentation.
Segments can vary from 4KB? to 64KB, but Windows 3.x in Standard-Mode doesn't make use of this ability and sticks to the default of 64KB.
Maybe because of backwards compatibility with Real-Mode, which still was available in Windows 3.0.
The 8086 had only one mode with a fixed segment size of 64KB..
The 386's Protected-Mode can address 4GB, its MMU also uses segmentation (plus paging) , but an can change segment size from 4KB? to 4GB.
That's why 386 Enhanced-Mode is made different. It sets the segment size to 4GB, which effectively disables segmentation.
In memory, it chops off 64KB code into 4K blocks. This happens silently in the background.
Last, but not least, both the 286 and 386 have memory protection and a concept of privilegs, the so-called ring scheme.
But Windows 3.x doesn't use them.)

Edit: Little edit.

Edit: You can use PIF editor to alter the settings for DOS programs.

Edit: Another edit.

Edit: I hope I didn't exaggerate and complicate things here! 😅
I know, it's a bad habit of mine. Perhaps I also misunderstood the question.
If so, please just tell me so. 😁

Edit: Reformatted the text on a PC..

The reason I’d asked is that I am trying to find a automated way how I can get some DOS games that are speed sensitive to work on Windows 3.1... I thought there might be some program on Windows 3.1 that makes you access the DOS application by just clicking on it, making it go into a DOS session. And I figured that I might have figured a way on how to do this when some .bat file. And I found the programs for it to let it control the speed and to resolve the mouse conflict issues...

Here is my batch file on how it would work.

@ECHO OFF

Rem disabling cache
C:\CPUSPD\CPUSPD.EXE CD

REM RUNNING PROGRAM
C:
CD C:\MYPRG1
MPRG1.EXE

REM RE-ENABLING CACHE
C:\CPUSPD\CPUSPD.EXE CE

Reply 3 of 17, by gerry

User metadata
Rank Member
Rank
Member
Jo22 wrote on 2021-02-10, 07:54:

I think it depends on the mode of Windows 3.1..
Windows 3.1 has Standard-Mode and 386 Enhanced-Mode.

...

just a note of appreciation for you comprehensive answer, I 'kind of' knew - but was good to read through and bolster that knowledge

Reply 4 of 17, by Jo22

User metadata
Rank l33t++
Rank
l33t++
Bumrusher89 wrote on 2021-02-10, 15:27:
The reason I’d asked is that I am trying to find a automated way how I can get some DOS games that are speed sensitive to work o […]
Show full quote
Jo22 wrote on 2021-02-10, 07:54:
Hi, good morning! I think it depends on the mode of Windows 3.1.. Windows 3.1 has Standard-Mode and 386 Enhanced-Mode. […]
Show full quote

Hi, good morning!
I think it depends on the mode of Windows 3.1..
Windows 3.1 has Standard-Mode and 386 Enhanced-Mode.

Standard-Mode was made to be compatible with the 286 processor.
- On a 286, DOSX and KRNL286 are executed and load Windows. On a 386+, KRNL386 may also do the job.
In Standard-Mode, DOS programs (aka Non-Windows programs) are run in foreground only.
This means, that Windows runs the DOS program and becomes inactive.
It now behaves like a task-switcher (like DOS-Shell), so to say.

Enhanced-Mode was designed with 386 or later processors.
- It uses both 32-Bit Protected-Mode and the V86 mode. KRNL386 loads Windows.
In Enhanced-Mode, DOS programs are run in separate V86 tasks - here,
Windows uses a hardware feature of the 386 processor and its built-in Memory Management Unit (MMU).

V86 means Virtual 8086 (Address) Mode.
It creates multiple instances of an 8086 processor, so to say, each with separate RAM.
Windows 3.1 provides its own DOS emulation to that, akin to Windows 95.

If Windows has its own hard disk driver loaded (FastDisk aha 32-Bit Disk Access) it gains the ability
to trap hard disk calls (trap BIOS routine int13h) and handle the requests on its own.
In this state, Windows 3.1 becomes *almost* as powerful as Windows 95.
It nolonger needs the real DOS to do most things. It essentially becomes self-sufficient.
DOS programs now talk to the int21 emulation provided by Windows 3.1 most of the time (int21h is the DOS API/ABI).
Now, Windows 3.1 can run most DOS programs windowed in a DOS box, provide seamless mouse integration and emulate CGA graphics (but not EGA/VGA).
https://www.youtube.com/watch?v=DwkAVlUBu30

Windows for Workgroups 3.11 goes a little bit further and does include a hard disk cache, VFAT and a 32-Bit network stack etc..

That's why multiple DOS programs are run in preemptive multitasking on Windows 3.1.
Note: Windows 3.1 programs don't make use of this, due to the design of Windows 3.1 and are using cooperative multitasking, even on Win95/98/Me.

Windows 3.1 programs are using a shared memory model, which means that Windows 3.1 programs
have access to data and code of other Windows programs and libraries (DLLs) loaded in RAM.

(Also related to Win16 programs: The 286's Protected-Mode has an MMU which uses segmentation.
Segments can vary from 4KB? to 64KB, but Windows 3.x in Standard-Mode doesn't make use of this ability and sticks to the default of 64KB.
Maybe because of backwards compatibility with Real-Mode, which still was available in Windows 3.0.
The 8086 had only one mode with a fixed segment size of 64KB..
The 386's Protected-Mode can address 4GB, its MMU also uses segmentation (plus paging) , but an can change segment size from 4KB? to 4GB.
That's why 386 Enhanced-Mode is made different. It sets the segment size to 4GB, which effectively disables segmentation.
In memory, it chops off 64KB code into 4K blocks. This happens silently in the background.
Last, but not least, both the 286 and 386 have memory protection and a concept of privilegs, the so-called ring scheme.
But Windows 3.x doesn't use them.)

Edit: Little edit.

Edit: You can use PIF editor to alter the settings for DOS programs.

Edit: Another edit.

Edit: I hope I didn't exaggerate and complicate things here! 😅
I know, it's a bad habit of mine. Perhaps I also misunderstood the question.
If so, please just tell me so. 😁

Edit: Reformatted the text on a PC..

The reason I’d asked is that I am trying to find a automated way how I can get some DOS games that are speed sensitive to work on Windows 3.1... I thought there might be some program on Windows 3.1 that makes you access the DOS application by just clicking on it, making it go into a DOS session. And I figured that I might have figured a way on how to do this when some .bat file. And I found the programs for it to let it control the speed and to resolve the mouse conflict issues...

Here is my batch file on how it would work.

@ECHO OFF

Rem disabling cache
C:\CPUSPD\CPUSPD.EXE CD

REM RUNNING PROGRAM
C:
CD C:\MYPRG1
MPRG1.EXE

REM RE-ENABLING CACHE
C:\CPUSPD\CPUSPD.EXE CE

Ah, I see. Well, thw PIF-Editor program let's you create/modify some *.PIF files (Program Informationen Files).

Windows 9x creates such files automatically whenever you run a DOS program (it's the file type with the MS-DOS logo).

The PIFs can also be modified to run a *.BAT file, if memory serves.
Also, tge PIF editor has options for timing settings (alternative timing?, can't remember).
Maybe they slow things down a bit, not sure.

Alternatively, you can also add *.BAT files directly to Program Manager. Here, you can change the icon etc, if memory serves.

Edit: You're welcome. ^^

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 5 of 17, by Bumrusher89

User metadata
Rank Newbie
Rank
Newbie
Jo22 wrote on 2021-02-11, 10:58:
Ah, I see. Well, thw PIF-Editor program let's you create/modify some *.PIF files (Program Informationen Files). […]
Show full quote
Bumrusher89 wrote on 2021-02-10, 15:27:
The reason I’d asked is that I am trying to find a automated way how I can get some DOS games that are speed sensitive to work o […]
Show full quote
Jo22 wrote on 2021-02-10, 07:54:
Hi, good morning! I think it depends on the mode of Windows 3.1.. Windows 3.1 has Standard-Mode and 386 Enhanced-Mode. […]
Show full quote

Hi, good morning!
I think it depends on the mode of Windows 3.1..
Windows 3.1 has Standard-Mode and 386 Enhanced-Mode.

Standard-Mode was made to be compatible with the 286 processor.
- On a 286, DOSX and KRNL286 are executed and load Windows. On a 386+, KRNL386 may also do the job.
In Standard-Mode, DOS programs (aka Non-Windows programs) are run in foreground only.
This means, that Windows runs the DOS program and becomes inactive.
It now behaves like a task-switcher (like DOS-Shell), so to say.

Enhanced-Mode was designed with 386 or later processors.
- It uses both 32-Bit Protected-Mode and the V86 mode. KRNL386 loads Windows.
In Enhanced-Mode, DOS programs are run in separate V86 tasks - here,
Windows uses a hardware feature of the 386 processor and its built-in Memory Management Unit (MMU).

V86 means Virtual 8086 (Address) Mode.
It creates multiple instances of an 8086 processor, so to say, each with separate RAM.
Windows 3.1 provides its own DOS emulation to that, akin to Windows 95.

If Windows has its own hard disk driver loaded (FastDisk aha 32-Bit Disk Access) it gains the ability
to trap hard disk calls (trap BIOS routine int13h) and handle the requests on its own.
In this state, Windows 3.1 becomes *almost* as powerful as Windows 95.
It nolonger needs the real DOS to do most things. It essentially becomes self-sufficient.
DOS programs now talk to the int21 emulation provided by Windows 3.1 most of the time (int21h is the DOS API/ABI).
Now, Windows 3.1 can run most DOS programs windowed in a DOS box, provide seamless mouse integration and emulate CGA graphics (but not EGA/VGA).
https://www.youtube.com/watch?v=DwkAVlUBu30

Windows for Workgroups 3.11 goes a little bit further and does include a hard disk cache, VFAT and a 32-Bit network stack etc..

That's why multiple DOS programs are run in preemptive multitasking on Windows 3.1.
Note: Windows 3.1 programs don't make use of this, due to the design of Windows 3.1 and are using cooperative multitasking, even on Win95/98/Me.

Windows 3.1 programs are using a shared memory model, which means that Windows 3.1 programs
have access to data and code of other Windows programs and libraries (DLLs) loaded in RAM.

(Also related to Win16 programs: The 286's Protected-Mode has an MMU which uses segmentation.
Segments can vary from 4KB? to 64KB, but Windows 3.x in Standard-Mode doesn't make use of this ability and sticks to the default of 64KB.
Maybe because of backwards compatibility with Real-Mode, which still was available in Windows 3.0.
The 8086 had only one mode with a fixed segment size of 64KB..
The 386's Protected-Mode can address 4GB, its MMU also uses segmentation (plus paging) , but an can change segment size from 4KB? to 4GB.
That's why 386 Enhanced-Mode is made different. It sets the segment size to 4GB, which effectively disables segmentation.
In memory, it chops off 64KB code into 4K blocks. This happens silently in the background.
Last, but not least, both the 286 and 386 have memory protection and a concept of privilegs, the so-called ring scheme.
But Windows 3.x doesn't use them.)

Edit: Little edit.

Edit: You can use PIF editor to alter the settings for DOS programs.

Edit: Another edit.

Edit: I hope I didn't exaggerate and complicate things here! 😅
I know, it's a bad habit of mine. Perhaps I also misunderstood the question.
If so, please just tell me so. 😁

Edit: Reformatted the text on a PC..

The reason I’d asked is that I am trying to find a automated way how I can get some DOS games that are speed sensitive to work on Windows 3.1... I thought there might be some program on Windows 3.1 that makes you access the DOS application by just clicking on it, making it go into a DOS session. And I figured that I might have figured a way on how to do this when some .bat file. And I found the programs for it to let it control the speed and to resolve the mouse conflict issues...

Here is my batch file on how it would work.

@ECHO OFF

Rem disabling cache
C:\CPUSPD\CPUSPD.EXE CD

REM RUNNING PROGRAM
C:
CD C:\MYPRG1
MPRG1.EXE

REM RE-ENABLING CACHE
C:\CPUSPD\CPUSPD.EXE CE

Ah, I see. Well, thw PIF-Editor program let's you create/modify some *.PIF files (Program Informationen Files).

Windows 9x creates such files automatically whenever you run a DOS program (it's the file type with the MS-DOS logo).

The PIFs can also be modified to run a *.BAT file, if memory serves.
Also, tge PIF editor has options for timing settings (alternative timing?, can't remember).
Maybe they slow things down a bit, not sure.

Alternatively, you can also add *.BAT files directly to Program Manager. Here, you can change the icon etc, if memory serves.

Edit: You're welcome. ^^

I am actually looking for a emulation program that is inside Windows 3.1 that is starting up those DOS sessions when ever you click on that DOS application. And I am going to use that BAT file idea on that.

Reply 6 of 17, by SteveC

User metadata
Rank Member
Rank
Member
gerry wrote on 2021-02-11, 10:58:
Jo22 wrote on 2021-02-10, 07:54:

I think it depends on the mode of Windows 3.1..
Windows 3.1 has Standard-Mode and 386 Enhanced-Mode.

...

just a note of appreciation for you comprehensive answer, I 'kind of' knew - but was good to read through and bolster that knowledge

Ditto! Thanks for the great response 😀

YouTube: https://www.youtube.com/channel/UCnG0NzvdJSb4_LibUPp0DwQ
Twitter: https://twitter.com/stevec00ps

Reply 7 of 17, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Windows 3.x never emulated DOS. Enhanced mode ran MS-DOS in a virtual machine.
IIRC, the Virtual Machine Manager in WIN386 handles that.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 8 of 17, by Bumrusher89

User metadata
Rank Newbie
Rank
Newbie
DosFreak wrote on 2021-02-14, 01:14:

Windows 3.x never emulated DOS. Enhanced mode ran MS-DOS in a virtual machine.
IIRC, the Virtual Machine Manager in WIN386 handles that.

So you're saying that WIN386 does all the emulation right?

Reply 9 of 17, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

A quick Google search for "win386 virtual machine manager" (no quotes) turns up https://www.drdobbs.com/windows/undocumented- … orner/184409170 .

If this is actually about I am trying to find an a way for Windows 3.1's DOS emulation to use CPUSPD. , then I doubt there is any quick and easy way that is superior to a .BAT file, especially if you have trouble understanding that article.

Reply 10 of 17, by Bumrusher89

User metadata
Rank Newbie
Rank
Newbie
Jorpho wrote on 2021-02-14, 04:48:

A quick Google search for "win386 virtual machine manager" (no quotes) turns up https://www.drdobbs.com/windows/undocumented- … orner/184409170 .

If this is actually about I am trying to find an a way for Windows 3.1's DOS emulation to use CPUSPD. , then I doubt there is any quick and easy way that is superior to a .BAT file, especially if you have trouble understanding that article.

You know it could be nice if someone out there had some experience that would make a DOS CPU internal cache TSR where when you are in windows the L1 cache is on and when you are in a DOSbox the L1 cache is off...

Reply 11 of 17, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Bumrusher89 wrote on 2021-02-14, 05:27:

You know it could be nice if someone out there had some experience that would make a DOS CPU internal cache TSR where when you are in windows the L1 cache is on and when you are in a DOSbox the L1 cache is off...

If you're thinking that a magical Internet elf will appear and solve your problem if you just keep making new threads, then you are gravely mistaken.

Reply 12 of 17, by darry

User metadata
Rank l33t
Rank
l33t
Bumrusher89 wrote on 2021-02-14, 05:27:
Jorpho wrote on 2021-02-14, 04:48:

A quick Google search for "win386 virtual machine manager" (no quotes) turns up https://www.drdobbs.com/windows/undocumented- … orner/184409170 .

If this is actually about I am trying to find an a way for Windows 3.1's DOS emulation to use CPUSPD. , then I doubt there is any quick and easy way that is superior to a .BAT file, especially if you have trouble understanding that article.

You know it could be nice if someone out there had some experience that would make a DOS CPU internal cache TSR where when you are in windows the L1 cache is on and when you are in a DOSbox the L1 cache is off...

With all due respect, why do you want to try to run speed sensitive DOS games under Windows and especially Windows 3.1 which is less compatible with DOS games than Windows 9x ?

Reply 13 of 17, by Bumrusher89

User metadata
Rank Newbie
Rank
Newbie
darry wrote on 2021-02-14, 06:19:
Bumrusher89 wrote on 2021-02-14, 05:27:
Jorpho wrote on 2021-02-14, 04:48:

A quick Google search for "win386 virtual machine manager" (no quotes) turns up https://www.drdobbs.com/windows/undocumented- … orner/184409170 .

If this is actually about I am trying to find an a way for Windows 3.1's DOS emulation to use CPUSPD. , then I doubt there is any quick and easy way that is superior to a .BAT file, especially if you have trouble understanding that article.

You know it could be nice if someone out there had some experience that would make a DOS CPU internal cache TSR where when you are in windows the L1 cache is on and when you are in a DOSbox the L1 cache is off...

With all due respect, why do you want to try to run speed sensitive DOS games under Windows and especially Windows 3.1 which is less compatible with DOS games than Windows 9x ?

Because that's how my family played DOS games on there before windows 95 got released.

EDIT: And I don't even know where to put my "C:/WINDOWS/SYSTEM/WIN386.BAT" command if I am only going to let Windows 3.1 use that instead of the WIN386.exe file itself...

Reply 14 of 17, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
Bumrusher89 wrote on 2021-02-14, 06:22:

EDIT: And I don't even know where to put my "C:/WINDOWS/SYSTEM/WIN386.BAT" command if I am only going to let Windows 3.1 use that instead of the WIN386.exe file itself...

I was the one who provided you that BAT file and I would have mentioned if there was a better way. But the point is: no, you cannot simply make a BAT file that Windows 3.1 will call instead of WIN386.exe (that is a system component).
Otherwise I do not really understand your effort to achieve the impossible since there are not so many DOS games that actually so speed sensitive that require you to disable L1 cache. Even if it was possible to disable L1 cache when any DOS sessions start (and re-enable when any DOS sessions finish) I do not think you would be satisfied. Many other DOS games/applications would run too slow without enabled L1 cache and then you would want to find a solution to re-enable cache for those...
It's not so hard to customize the above mentioned DOS template for the few games that really require disabled L1 cache and run them from those customized batch files.
And as Jorpho has mentioned you should not make new topics about virtually the same problem. You could have continued the original one instead:
I have questions about CPUspd

Website, Facebook, Youtube
Falcosoft Midi Player + Munt VSTi + BassMidi VSTi topic

Reply 15 of 17, by Jo22

User metadata
Rank l33t++
Rank
l33t++
DosFreak wrote on 2021-02-14, 01:14:

Windows 3.x never emulated DOS. Enhanced mode ran MS-DOS in a virtual machine.
IIRC, the Virtual Machine Manager in WIN386 handles that.

Terminology, ah yes. Silly me. 😅
The Windows 3.1 FastDisk component trapped requests to int13h and replaced it with its own functionality.

I hope this is correct. That's what Wikipedia says:

32-bit Disk Access (also known as FastDisk) refers to a special disk access and caching mode available in older, MS-DOS-based Microsoft Windows operating systems. It was a set of protected mode device drivers that worked together to take advantage of advanced disk I/O features in the system BIOS. It filtered interrupt 13h BIOS calls to the disk controller and directed them in the most efficient way for the system — either through the 32-bit interface with the hard disk controller or through the system BIOS.

Source: https://en.m.wikipedia.org/wiki/32-bit_disk_access

Akin, 16-Bit Windows programs still used the int21 API, for opening/closing files etc, I vaguely remember. Windows 3.1 also handled that on its own at some point.

Provided, that I did unterstand the matter correctly. 😅

Wikipedia again claims the following:

32-bit disk access should not be confused with 32-bit file access. Although both technologies are similar, 32-bit disk access was introduced with Windows 3.1 and file access with Windows for Workgroups 3.11. 32-bit file access provided a 32-bit code path for Windows to directly access the disk bus by intercepting the MS-DOS Int 21H services while remaining in 386 protected mode and at CPU speeds, rather than handling the Int 21H services in real mode by MS-DOS. 32-bit disk access offers less performance and is less likely to work on many computers than 32-bit file access. 32-bit file access does not require 32-bit disk access.

Similarily, Windows 3.1 had a complex keyboard/mouse handler component, I heard.
The matter is a bit over my head, so I'd like to just quote Wikipedia again :

The way PS/2 mouse input is handled in Windows/386 is extraordinarily complex. The mouse driver (MOUSE.DRV) simply uses the BIOS INT 15h, sub-function C2h interface to register a mouse callback routine. The BIOS uses IRQ 12 and I/O ports 60h/64h to read data from the mouse. However, the VKD VxD inserts a whole new layer between the BIOS and the mouse hardware.

In Windows/386, VKD emulates a PS/2 style keyboard controller, including the mouse (auxiliary device) support. Microsoft implemented that in order to better separate VMs from hardware (and prevent VMs from globally controlling the A20 gate etc.) and provide hotkey support in a way which is transparent to the BIOS and DOS. Another benefit of emulating the keyboard controller is the ability to paste input into VMs in a way which is effectively indistinguishable from keyboard input. Emulation of the PS/2 auxiliary interface does not appear to bring any real benefit to the user, but was probably inevitable since it shares the same controller as keyboard input.


Souce: https://www.os2museum.com/wp/jumpy-ps2-mouse- … de-windows-3-x/

Windows 3.x also had a setting in PIF Editor named "Compatible hardware timer emulation", however, I can't remember ever using that. 😕

That being said, I used to be more of a 286er user.
My father's PC ran Windows in Enhanced Mode (W31, Win95), but not mine. 🙁

Edit: Wikipedia is just a layman's lexicon, of course.
Well, it used to be, at least. I did quit contributing there years ago, when things became so strict and hostile there. 😔

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 16 of 17, by Bumrusher89

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2021-02-14, 11:43:
I was the one who provided you that BAT file and I would have mentioned if there was a better way. But the point is: no, you can […]
Show full quote
Bumrusher89 wrote on 2021-02-14, 06:22:

EDIT: And I don't even know where to put my "C:/WINDOWS/SYSTEM/WIN386.BAT" command if I am only going to let Windows 3.1 use that instead of the WIN386.exe file itself...

I was the one who provided you that BAT file and I would have mentioned if there was a better way. But the point is: no, you cannot simply make a BAT file that Windows 3.1 will call instead of WIN386.exe (that is a system component).
Otherwise I do not really understand your effort to achieve the impossible since there are not so many DOS games that actually so speed sensitive that require you to disable L1 cache. Even if it was possible to disable L1 cache when any DOS sessions start (and re-enable when any DOS sessions finish) I do not think you would be satisfied. Many other DOS games/applications would run too slow without enabled L1 cache and then you would want to find a solution to re-enable cache for those...
It's not so hard to customize the above mentioned DOS template for the few games that really require disabled L1 cache and run them from those customized batch files.
And as Jorpho has mentioned you should not make new topics about virtually the same problem. You could have continued the original one instead:
I have questions about CPUspd

But you never responded back to me on that post...

Reply 17 of 17, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
Bumrusher89 wrote on 2021-02-14, 16:21:
Falcosoft wrote on 2021-02-14, 11:43:
I was the one who provided you that BAT file and I would have mentioned if there was a better way. But the point is: no, you can […]
Show full quote
Bumrusher89 wrote on 2021-02-14, 06:22:

EDIT: And I don't even know where to put my "C:/WINDOWS/SYSTEM/WIN386.BAT" command if I am only going to let Windows 3.1 use that instead of the WIN386.exe file itself...

I was the one who provided you that BAT file and I would have mentioned if there was a better way. But the point is: no, you cannot simply make a BAT file that Windows 3.1 will call instead of WIN386.exe (that is a system component).
Otherwise I do not really understand your effort to achieve the impossible since there are not so many DOS games that actually so speed sensitive that require you to disable L1 cache. Even if it was possible to disable L1 cache when any DOS sessions start (and re-enable when any DOS sessions finish) I do not think you would be satisfied. Many other DOS games/applications would run too slow without enabled L1 cache and then you would want to find a solution to re-enable cache for those...
It's not so hard to customize the above mentioned DOS template for the few games that really require disabled L1 cache and run them from those customized batch files.
And as Jorpho has mentioned you should not make new topics about virtually the same problem. You could have continued the original one instead:
I have questions about CPUspd

But you never responded back to me on that post...

? Because you did not ask anything...

Your last sentence was this:

UPDATE: Some how I had to remove my ctmouse line on the autoexec.bat file which is like two lines before "C:/Windows/win." And then I had to my ctmouse location line on the .bat file I created.

So it seemed to me a success story where you finally figured out how things work.

Website, Facebook, Youtube
Falcosoft Midi Player + Munt VSTi + BassMidi VSTi topic