Win16 quest support in ReactOS

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Quim
Posts: 228
Joined: Wed Jul 04, 2018 11:45 pm

Win16 quest support in ReactOS

Post by Quim » Thu Dec 13, 2018 7:12 am

Is it convenient that NTVDM should have Win16 support or that ROS itself should have something like ' wowexec'
Windows NT Win16 application launcher ?

What about supporting Win16 applications in 64 bits port? Only 64 bits NTVDM with Win16 support could be the answer to run Win16 under Win64 ROS?

Other methods could be to redirect 16 bits calls to 32 / 64 bits calls....
Some info:
http://techgenix.com/16-bit-applications-windows-10/
https://www.xylos.com/en/corporate/blog ... ng-systems

https://blogs.msdn.microsoft.com/oldnew ... 00/?p=2783

For running 16 bits installers there are these utilities:
http://toastytech.com/files/setup.html

PurpleGurl
Posts: 1774
Joined: Fri Aug 07, 2009 5:11 am
Location: USA

Re: Win16 quest support in ReactOS

Post by PurpleGurl » Thu Dec 13, 2018 9:31 am

Well, we are a 32-bit OS, and thus should be able to run 16-bit apps. Plus, we have the x86 emulator in the NTVDM and should be able to run 16-bit apps in there already, even if we were to build as 64-bit.

EmuandCo
Developer
Posts: 4313
Joined: Sun Nov 28, 2004 7:52 pm
Location: Germany, Bavaria, Steinfeld
Contact:

Re: Win16 quest support in ReactOS

Post by EmuandCo » Thu Dec 13, 2018 9:41 am

NTVDM uses a CPU emulator out of this specific reason. 16 bit on 64 bit. Windows 16 bit applications don't work until someone implements the needed wrappers to run these apps. But yeah, main stuff needed is there already thx to NTVDM
Image
ReactOS is still in alpha stage, meaning it is not feature-complete and is recommended only for evaluation and testing purposes.

flaguser
Posts: 1
Joined: Thu Dec 13, 2018 2:22 pm

Re: Win16 quest support in ReactOS

Post by flaguser » Thu Dec 13, 2018 2:27 pm

first timer here,
There's a github project called WINEDVM that runs Win16 programs on Win64 using WINE code. It might be helpful?
https://github.com/otya128/winevdm

hbelusca
Developer
Posts: 1127
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Win16 quest support in ReactOS

Post by hbelusca » Thu Dec 13, 2018 8:53 pm

Please stop creating forum duplicates !! :evil: :evil: :evil:

viewtopic.php?f=2&t=17578
viewtopic.php?f=2&t=17330
viewtopic.php?f=2&t=16897
viewtopic.php?f=4&t=16867
viewtopic.php?f=2&t=15623

Either YOU help contributing by writing the code to have Windows-compatible WOW16 support; otherwise please STOP PASTING the same winevdm links that everybody knows! It won't make coding faster!!

karlexceed
Posts: 452
Joined: Thu Jan 10, 2013 6:17 pm
Contact:

Re: Win16 quest support in ReactOS

Post by karlexceed » Thu Dec 13, 2018 10:15 pm

flaguser wrote:
Thu Dec 13, 2018 2:27 pm
There's a github project called WINEDVM that runs Win16 programs on Win64 using WINE code.
Yep, we know:
https://www.reactos.org/forum/viewtopic ... DM#p134735
https://www.reactos.org/forum/viewtopic ... DM#p133195
https://www.reactos.org/forum/viewtopic ... DM#p132301
https://www.reactos.org/forum/viewtopic ... DM#p132267

One major issue (for now) is that it's specifically made to run on 64-bit. ROS is currently 32-bit only.

amber
Posts: 20
Joined: Fri Apr 19, 2013 7:39 pm

Re: Win16 quest support in ReactOS

Post by amber » Thu Dec 20, 2018 11:31 am

In my opinion, it would be faster to implement a "wrapper" of win16 functions around win32 functions. This requires "library-stub", which could redirect a 16-bit calls in 32-bit. Thus, there will be some "analogue" NTVDM, but for applications win16.

Quim
Posts: 228
Joined: Wed Jul 04, 2018 11:45 pm

Re: Win16 quest support in ReactOS

Post by Quim » Thu Dec 20, 2018 11:55 pm

amber wrote:
Thu Dec 20, 2018 11:31 am
In my opinion, it would be faster to implement a "wrapper" of win16 functions around win32 functions. This requires "library-stub", which could redirect a 16-bit calls in 32-bit. Thus, there will be some "analogue" NTVDM, but for applications win16.
Does WINE already has something like this wrapper (just to reuse and rewrite it for ROS) ? WINE has 64 bits support now.
And what about a wrapper of Win16 functions to redirect 16 bit calls in 64 bits (Win16 to Win64)? Is that possible (16 to 64 bits) in theory?
Last edited by Quim on Sun Dec 23, 2018 4:00 am, edited 1 time in total.

Quim
Posts: 228
Joined: Wed Jul 04, 2018 11:45 pm

Re: Win16 quest support in ReactOS

Post by Quim » Sun Dec 23, 2018 3:52 am

Alexandre Julliard answer:
> Is there a "wrapper" of Win16 functions around Win32 functions , using
> "library-stub" or something, which could redirect a 16-bit calls in
> 32-bit in WINE?

The wrappers are generated by the winebuild program, based on the entry
point specifications found in the .spec files for each dll.

> How is WINE ,now able to run 64 bits applications, runs Win16 applications? How does it work? Does all Win16 applications ,that worked in previous 32 bits only versions, still work?
> And what about a wrapper of Win16 functions to redirect 16 bit calls in 64 bits (Win16 to Win64)? Is that possible (16 to 64 bits) in theory?
> What are the technical details involved?

16-bit calls always get mapped to 32-bit, there's no attempt to map
directly to 64-bit. This wouldn't really gain anything, and there's no
convenient OS mechanism to switch to 16-bit code from a 64-bit app. In
theory the CPU would allow it, but it would require some Linux kernel
support. It's much easier to do that from a 32-bit process.
So it seems that WINE has these Win16 to Win32 wrapper. Even looking at the source code there are some mentions about redirecting or something like that, Win16 calls to Win32...

Who´s responsible of ROS NTVDM development?

amber
Posts: 20
Joined: Fri Apr 19, 2013 7:39 pm

Re: Win16 quest support in ReactOS

Post by amber » Tue Dec 25, 2018 7:28 pm

Quim wrote:
Sun Dec 23, 2018 3:52 am
Alexandre Julliard answer:
> Is there a "wrapper" of Win16 functions around Win32 functions , using
> "library-stub" or something, which could redirect a 16-bit calls in
> 32-bit in WINE?

The wrappers are generated by the winebuild program, based on the entry
point specifications found in the .spec files for each dll.

> How is WINE ,now able to run 64 bits applications, runs Win16 applications? How does it work? Does all Win16 applications ,that worked in previous 32 bits only versions, still work?
> And what about a wrapper of Win16 functions to redirect 16 bit calls in 64 bits (Win16 to Win64)? Is that possible (16 to 64 bits) in theory?
> What are the technical details involved?

16-bit calls always get mapped to 32-bit, there's no attempt to map
directly to 64-bit. This wouldn't really gain anything, and there's no
convenient OS mechanism to switch to 16-bit code from a 64-bit app. In
theory the CPU would allow it, but it would require some Linux kernel
support. It's much easier to do that from a 32-bit process.
So it seems that WINE has these Win16 to Win32 wrapper. Even looking at the source code there are some mentions about redirecting or something like that, Win16 calls to Win32...

Who´s responsible of ROS NTVDM development?
In other words make the "wrapper" "Win16 to Win32" look like a "faster" solution for ROS?

binarymaster
Posts: 259
Joined: Sun Nov 16, 2014 7:05 pm
Location: Russia, Moscow
Contact:

Re: Win16 quest support in ReactOS

Post by binarymaster » Tue Dec 25, 2018 8:17 pm

Quim wrote:
Sun Dec 23, 2018 3:52 am
Who´s responsible of ROS NTVDM development?
Aleksandar Andrejevic aka theflash.

See People of ReactOS.
Quim wrote:
Sun Dec 23, 2018 3:52 am
So it seems that WINE has these Win16 to Win32 wrapper. Even looking at the source code there are some mentions about redirecting or something like that, Win16 calls to Win32...
amber wrote:
Tue Dec 25, 2018 7:28 pm
In other words make the "wrapper" "Win16 to Win32" look like a "faster" solution for ROS?
ReactOS NTVDM implementation pretends to be architecture-independant by using CPU emulation, which means it will run both DOS and 16-bit Windows 3.x applications on any architecture ReactOS is ported to.

Windows NTVDM does not use emulation, it uses CPU switching tricks which are not working on 64-bit based systems. The same approach is used by Wine project, so their ntvdm code is not applicable for ReactOS.

Quim
Posts: 228
Joined: Wed Jul 04, 2018 11:45 pm

Re: Win16 quest support in ReactOS

Post by Quim » Thu Dec 27, 2018 3:56 am

binarymaster wrote:
Tue Dec 25, 2018 8:17 pm
Quim wrote:
Sun Dec 23, 2018 3:52 am

ReactOS NTVDM implementation pretends to be architecture-independant by using CPU emulation, which means it will run both DOS and 16-bit Windows 3.x applications on any architecture ReactOS is ported to.
Impressive! Thanks Aleksandar Andrejevic for his work. We expect some day ROS NTVDM will be full able to run all DOS and Windows 3.x applications.
Maybe a separate GitLab/Github webpage to download and use it, replacing native Windows XP, 7,8,10. ROS NTVDM everywhere!

Could he also use or look at DOSBox and Win3mu sourcecodes for inspiration?

Quim
Posts: 228
Joined: Wed Jul 04, 2018 11:45 pm

Re: Win16 quest support in ReactOS

Post by Quim » Thu Dec 27, 2018 4:03 am

Again from Alexandre Julliard:
> Thanks for the explanation.
> I contact you now to know what advices could you give to ReactOS developers about including Win16 support in x86 ReactOS and (working in progress) 64 bits ReactOS port.
> ReactOS has now a NTVDM to run DOS applications, but not Win16 support yet.

Reusing the Wine code would probably be easier, but of course it doesn't
follow the Windows architecture at all. The NTVDM way is certainly
workable too. If you are working on implementing it and have specific
questions I'd be happy to help.

--
Alexandre Julliard
It could be interesting that both devs work toguether in ROS NTVDM way.

elhoir
Test Team
Posts: 397
Joined: Thu Sep 13, 2007 7:01 pm
Location: Madrid, Spain
Contact:

Re: Win16 quest support in ReactOS

Post by elhoir » Thu Dec 27, 2018 12:43 pm

"both devs work toguether"

@Quim,
Alexandre did not say anything like that. He just offers help for any question ROS devs may have.

hbelusca
Developer
Posts: 1127
Joined: Sat Dec 26, 2009 10:36 pm
Location: Zagreb, Croatia

Re: Win16 quest support in ReactOS

Post by hbelusca » Thu Dec 27, 2018 12:50 pm

binarymaster wrote:
Tue Dec 25, 2018 8:17 pm
Windows NTVDM does not use emulation, it uses CPU switching tricks which are not working on 64-bit based systems. The same approach is used by Wine project, so their ntvdm code is not applicable for ReactOS.
It does, for the NTVDM (and the WOW16 module) of the MIPS port of Windows NT, and this is a similar approach we will have to follow too.

Locked

Who is online

Users browsing this forum: augustinebyers, Bing [Bot] and 2 guests