Running Windows programmes in DOSBox without Windows

Discuss just about anything else
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Running Windows programmes in DOSBox without Windows

Post by MrFlibble »

DOSGuy wrote:2) I can't guarantee that people wouldn't download the disk image and use this site as a source for free copies of Windows 3.1. That came up when I contacted another company about a license to put their software in disk images to allow games to be playable in-browser using jDosbox.
While you can't guarantee that you certainly can't take responsibility if someone indeed does this. I'd say this is akin to how software companies cannot guarantee that the users will not reverse-engineer their programmes once they have legally obtained them. Or the authors of shareware programmes (of the Jim Knopf variety) cannot guarantee that the users will either register or cease to use their software after the end of the trial period.

IIRC, at least once Microsoft went so far as to upload and entire software programme for free download, albeit it is intended only for those who had purchased an earlier version of that programme (Word for DOS 5.0). Maybe they would display the same level of tolerance for potential unauthorized distribution of their legacy software with licensing Win3.1 too?

At any rate, if you can try contacting people from MS directly, I'd say go for it. Even if you get no response then at least you'll know that some other people should be contacted next time.
User avatar
watson
4-bit nibble
Posts: 18
Joined: June 5th, 2013, 10:40 am

Re: Running Windows programmes in DOSBox without Windows

Post by watson »

Worth a shot! :)
Malvineous
8-bit mega nerd
Posts: 293
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: Running Windows programmes in DOSBox without Windows

Post by Malvineous »

Maybe you could try to write an old fashioned paper letter to Bill personally, since physical letters usually get some sort of a response at least.

I had a look at BartPE thinking that perhaps you could use one of the WinPE versions for this, but I guess not. I was under the impression that BartPE was possible because of a quirk of the EULA (you could use it without agreeing to the EULA first) but it looks like that's not actually the case.

It looks like you could probably produce an image that would be legal for Windows users to play, but then the problem comes back to enforcing that restriction.
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Running Windows programmes in DOSBox without Windows

Post by MrFlibble »

Malvineous wrote:It looks like you could probably produce an image that would be legal for Windows users to play, but then the problem comes back to enforcing that restriction.
Wouldn't the good old "license agreement" thing work in this case? E.g. prior to loading a Win3.x game in a browser from the site, users would have to read the license agreement that basically says "You agree not to steal this copy of Win3.x and/or reverse engineer the image", and they have to press "I agree" to play.
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Running Windows programmes in DOSBox without Windows

Post by DOSGuy »

MrFlibble wrote:Wouldn't the good old "license agreement" thing work in this case? E.g. prior to loading a Win3.x game in a browser from the site, users would have to read the license agreement that basically says "You agree not to steal this copy of Win3.x and/or reverse engineer the image", and they have to press "I agree" to play.
This an interesting idea, but I don't think it holds up legally. The concept is that, if anyone violates the agreement and downloads the copyrighted software, Microsoft's quarrel is with them for stealing it and not with me for making it available to steal. If courts would accept that argument, it would open the floodgates to all kinds of legal piracy websites. I could start a website where I put Hollywood videos online and make visitors agree that they will only watch the video and not attempt to download and retain a copy of it. Basically, it would be legal to post anything to YouTube as long as YouTube required you to agree not to attempt to download and keep the videos.

We already know that this argument doesn't work because YouTube is required to remove copyright-infringing videos. Unlike a movie theatre or Netflix, they didn't acquire a license to screen the movie. If you watch a movie on YouTube, obviously you no longer need to rent, purchase, or pay to watch in the theaters. (Actually, studies show that people who illegally download the most songs and movies also legally purchase the most music and movies, but just because piracy might be beneficial doesn't make it legal.) Likewise, software comes with a license. The DOS and Windows licenses usually restrict you to use the operating system on a single computer (though I doubt anyone with two computers ever purchased two copies). While I can argue that I only installed the operating system on one computer (the server hosting the website), the disk image has to be downloaded to each user's computer, thus violating the license agreement that it can only be used on one computer.

Anyway, it comes down to the fact that I can't make visitors agree to a license to use software that I don't have a license to let them use.

Now then, that brings us back to the Netflix case. I could password protect the pages that have Windows 3.1 games and, thus, restrict access to the Windows 3.1 disk images. Users would have to register to be able to play the games, and this would give me the ability to know exactly how many users I need to license. (It still wouldn't stop them from downloading the disk image and illegally redistributing copies of Windows 3.1, so Microsoft would no doubt factor that possibility into their price.) Microsoft sells site licenses to businesses to put Windows on a specific number of machines. Typically you can buy bulk licenses for 100, 1000, 10000, etc, users. I could try to negotiate a deal with Microsoft whereby I would pay a certain amount of money for each user (paying them as new users register), or pay up front for 1000 licenses and then pay for another 1000 when I need more, or something along those lines. Some kind of license could presumably be worked out, but it comes down to the fact that Microsoft would almost certainly require me to pay money for some kind of license. How will I pay for that? If I make users pay to register an account capable of playing the games, how many people do you think would be willing to pay for the ability to play 20 year old Windows 3.1 games in their browser?

jDosbox author James Bryant and I have talked about complying with the "installed on one computer" license by having jDosbox run on the server and stream the video to the visitors. That actually works decently well for applications where lag isn't a big deal, but it's a big problem for games. Depending on your internet connection, there will be a delay of dozens or hundreds of milliseconds while you wait for your input to get to the server, and you're reacting to events that happened dozens of hundreds of milliseconds ago due to the time it took to stream the video to you. At 60 hz, a game is displaying a frame every 16.6 ms, and 70 hz VGA is a frame every 14.3 ms.

Even if lag wasn't a problem, running multiple simultaneous instances of jDosbox and sending a streaming video of the output would require a lot CPU power and bandwidth. Inexpensive shared webhosting probably wouldn't cut it; I would need a dedicated server. Even that would eventually not be good enough if the service became popular enough. Eventually it would require a whole rack of server blades. The site would have to be produce considerable revenue to pay for all of that.
Today entirely the maniac there is no excuse with the article.
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Running Windows programmes in DOSBox without Windows

Post by MrFlibble »

DOSGuy wrote:Anyway, it comes down to the fact that I can't make visitors agree to a license to use software that I don't have a license to let them use.
Well, I certainly did mean a situation when using the license agreement would be done with full consent from Microsoft, not on your own.
DOSGuy wrote:Microsoft sells site licenses to businesses to put Windows on a specific number of machines. Typically you can buy bulk licenses for 100, 1000, 10000, etc, users. I could try to negotiate a deal with Microsoft whereby I would pay a certain amount of money for each user (paying them as new users register), or pay up front for 1000 licenses and then pay for another 1000 when I need more, or something along those lines.
Hmm, do you mean to say that MS still sells copies of Win3.1? Or is it that you could probably negotiate with them the acquisition of a site license of Win3.1 specifically for your site?

I feel there's also another problem with the whole situation, namely the licenses for software like Win3.1 were clearly written in the times when something like installing a copy of Win3.1 in a DOS machine emulator that runs inside a web browser off the Internet was completely unimaginable, and therefore these licenses simply do not take into account all the possibilities of use (and abuse) that respective software might have.

And after all, even if everything worked out in this particular scenario and you got to legally run copies of Win3.1 in jDOSBox by some means or other, this actually does not help solve the general issue of running Win16 games on modern Windows OSs except the aforementioned DOSBox+Win3.1 or Linux+WINE.

BTW, how realistic it would be to backport Win16 games to DOS, provided that the source code was available? For example, has anyone ever tried to port Blades of Exile Open Source Project to DOS? (I mention it because it's pretty much the only open source Win16 game that comes to my mind right now) Or is it not doable?

Come to think of it, having DOS ports of Win16 and Win32 games from the 90s would have helped solve most if not all compatibility issues (and yeah it does help if a game originally had both DOS and Windows releases).

[Edit] Well yeah, if a game is open source it makes more sense to port it to modern OSs rather than to DOS, but still I have no idea if DOS backports are at least theoretically possible.
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Running Windows programmes in DOSBox without Windows

Post by DOSGuy »

MrFlibble wrote:Hmm, do you mean to say that MS still sells copies of Win3.1? Or is it that you could probably negotiate with them the acquisition of a site license of Win3.1 specifically for your site?
I meant that Microsoft sells site licenses for whatever versions of Windows they still sell, which at this point would not include Windows 3.1. Based on the existence of site licenses for Windows, I theorize that it might be possible to negotiate a site license for Windows 3.1... hopefully at a considerable discount considering that they no longer sell it.
MrFlibble wrote:BTW, how realistic it would be to backport Win16 games to DOS, provided that the source code was available?
In most cases, not very realistic. The DOS API only handles the most basic things that you can possibly do with a computer, such as output to the monitor or printer and read and write files stored on disks (thus the designation Disk Operating System). DOS had no API calls for creating windows and menus and other visual elements, so programmers had to create such things themselves at considerable effort. The lack of GUI APIs for DOS is why the GUI in every DOS program looks different, whereas the GUI elements of every Windows program looks the same. You see, Microsoft enticed programmers to create software for Windows by creating an API that handled the creation of a GUI for them. Creating windows and menus is as simple as invoking the API calls that create them. Some of the smallest games on this site are Win16 games because they consist of only the program logic and a bunch of Windows API calls (having no need to create a bunch of code and graphics for a DOS-based GUI). The ease of creating Win16 software (and the prospect of getting in on the ground floor of a massive emerging market) led to an explosion of crappy Win16 shareware programs (mostly clones of popular games for other platforms). Long story short, the source code of a Win16 program contains program logic, but most of the code that makes it interactive, and all of the GUI code, comes from the Windows API. To port it to DOS would require replacing all of the Windows API calls with code that would do the same thing in DOS. That would be a massive undertaking, and if you were going to replace the Windows API functions with equivalent DOS functions, you might as well just turn the resulting code into a DOS implementation of the Windows API so that you can run any other Windows program in DOS as well.

Now then, if you choose a Windows program that has relatively few Windows API calls, then you stand a chance of being able to write DOS equivalents for those calls. James Bryant (the author of jDosbox) chose Full Tilt! Pinball for exactly that reason. He ported all of the Windows API functions called by that game to Java, so you could attempt to port a Win16 program to DOS (or write a DOS implementation of the Windows API functions called by that Win16 program) if it used relatively few Windows API functions. Porting the entire Windows API to Java (or DOS or anything else) would have been far too much work, so he abandoned that effort to focus on a system that could simply run Wine in DOS. Likewise, HX DOS Extender has ported only a small portion of the Windows API, so your program will only work correctly (or possibly at all) if it doesn't call any of the Windows API functions that HX DOS Extender doesn't support.
Today entirely the maniac there is no excuse with the article.
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Running Windows programmes in DOSBox without Windows

Post by MrFlibble »

DOSGuy wrote:DOS had no API calls for creating windows and menus and other visual elements, so programmers had to create such things themselves at considerable effort. The lack of GUI APIs for DOS is why the GUI in every DOS program looks different, whereas the GUI elements of every Windows program looks the same. You see, Microsoft enticed programmers to create software for Windows by creating an API that handled the creation of a GUI for them. Creating windows and menus is as simple as invoking the API calls that create them. Some of the smallest games on this site are Win16 games because they consist of only the program logic and a bunch of Windows API calls (having no need to create a bunch of code and graphics for a DOS-based GUI).
Yes, I understand that, but I'd think that creating a free, open source equivalent of Windows GUI would be much of a problem, would it? After all, there are some nicely looking alternatives to the Win3.1 graphical environment like QuikMenu III, DosStart or SEAL.
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Running Windows programmes in DOSBox without Windows

Post by DOSGuy »

If GUI creation is the only thing that an open source Windows program is using the Windows API for, it might not be that hard to replace the Windows API function calls with calls to the DOS-based GUI instead. As I said, though, James wasn't able to find many programs that used a small number of easy-to-implement Windows API functions, and was able to get a grand total of two Windows programs running in jDosbox. (I tried almost every simple game on the site and all of them called Windows API functions that he hadn't implemented.) The ease of portability will vary from program to program.
Today entirely the maniac there is no excuse with the article.
Malvineous
8-bit mega nerd
Posts: 293
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: Running Windows programmes in DOSBox without Windows

Post by Malvineous »

With all this talk of reimplementing Windows APIs, it reminded me of ReactOS. This is an open source implementation of (eventually) the full Windows API, with the goal being the ability to run Windows programs unchanged.

It aims for 32-bit compatibility, but presumably some 16-bit functions are still there and there is already a framework to implement any others needed for specific games.

I don't know whether you can run ReactOS in DOSBox or whether you need a full VM, but this might be another possibility for getting 16-bit programs running.
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Running Windows programmes in DOSBox without Windows

Post by MrFlibble »

ReactOS supposedly should be able to install under DOSBox. However, there are problems with that:
collector wrote:I would think that it would have at least some of the same stability problems 9x and since you would have to boot it, no access to the host's file system, including the DC drive. And again, one of my main interests is for my installers. The installer for ReactOS is around 50 MB and without installing it I can't say how big an image it would make. 50+ MB is quite a bit to tack on top of an installer. Also, it would be a tall order to inject the game's files or an ISO of the CD into the ReactOS image from an installer. For my own use there are several things I can do, but doing it on the user's end via an installer on top of copy right issues becomes another matter. [source]
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Running Windows programmes in DOSBox without Windows

Post by DOSGuy »

I've never been able to install ReactOS under DOSBox, and I think it's missing functionality that would make that possible. James Bryant made it possible to boot ReactOS in jDosbox, but it's ultra slow and it requires more RAM than a Java applet is allowed to have, so it wouldn't work in-browser. Finally, ReactOS doesn't currently support Win16 software. There has been a lot of work on an NTVDM recently which apparently is good enough to run Dangerous Dave, so ReactOS may soon support DOS games, but it would still need a WoW (Windows on Windows) to allow Win16 software to run.
Today entirely the maniac there is no excuse with the article.
danoon
DOSBox Programmer
Posts: 15
Joined: March 31st, 2011, 4:37 pm

Re: Running Windows programmes in DOSBox without Windows

Post by danoon »

I enjoyed re-reading this thread. Where does the time go, I can't believe it has been almost 9 years since this discussion and I'm pretty much still working on the same thing. :D

Boxedwine is still going strong. A lot of Win16 and 90s Win32 games work. http://www.boxedwine.org/
User avatar
DOSGuy
Website Administrator
Posts: 1063
Joined: September 2nd, 2005, 8:28 pm
Contact:

Re: Running Windows programmes in DOSBox without Windows

Post by DOSGuy »

Time flies indeed! I have lots of to tell you, but I'll do so privately.
Today entirely the maniac there is no excuse with the article.
Post Reply