-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internet in EM-Dosbox #32
Comments
There are two obstacles restricting your Internet use from a browser. First, you have the same-origin policy limiting where you can connect. You then only use certain protocols, and can't make a generic TCP or UDP connection. You can compile SDL_net under Emscripten, and then build Em-DOSBox with SDL_net. Then you can connect a serial port to an IP by dialing it like a phone number with ATDT. However, the connection will be WebSocket, not the ordinary TCP you'd expect when DOSBox is compiled natively. Then you need a kind of proxy, on an address where you're allowed to connect via the same-origin policy. It provides a SLIP or PPP connection via WebSocket to Em-DOSBox. From the point of view of programs running in DOSBox it's dial-up Internet access. This has already been done with Windows 3.1. Someone else set it up, and I only helped out. Yes, S3 drivers should work for higher colour and higher resolution modes. |
Thanks can you provide some instruction how to do it (compile with SDL_Net) and what to do then? Do you have a web adress of that vorking Windows 3.1 in Internet installation so I can inspect how it was done? Thanks for Anwsering and Best Regards |
Here's Jason Scott's blog post on it: http://ascii.textfiles.com/archives/4546 I don't know if the site is still up, and forget where it was located. |
Hi Thanks now I only need to compile em-dosbox with SDL_Net support (what is the best way to do that) I've install ./configure and make and sudo make install on SDL2_net downloaded from here: https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.0.1.zip
If you ever happen to want to link against installed libraries
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages./bin/mkdir -p '/usr/local/include/SDL2' and then I've done emconfigure ./configure on emdosbox but it isn't finding SDL2_net:
Thanks for Anwsering and Best Regards |
any help? |
Hi @veso266, I just found your issue today - I did the work necessary to get SDL_net running with emscripten a year or so back when I set up http://www.metacade.com/win311 - I can talk you through how to get that working, and explain how I got the networking working without worrying about cross-origin issues. First, SDL_net is available via emscripten's port system so you shouldn't have to do the work yourself, if emcc gets the right arguments ( The problem though is getting Once it is compiled, the next step is to set up a server somewhere (I used AWS) running pppd with a websocket proxy in front of it. This is a bit tricky if you haven't run this sort of service in the past, I started writing a big post about how to do it but never actually published it. I can clean it up and publish it when you get to that point though. Once that's all done, you then use a ppp client in DOSBox to connect, and with the command ATDTyour.hostname.com:port and DOSBox does the rest for you. I've used this technique successfully from both DOS and Win3.11, and others have had success using similar techniques for IPX games (Warcraft, Doom, etc). |
The configure script might have a way to add include dirs. Otherwise you can set the |
@kripken the problem is that assuming a clean install of emscripten and a fresh compile of some app, there is no include directory to point the configure script to - emscripten doesn't download and install the port until something requests it, and it's not requested until some file is compiled using A while ago I tried to look to see how apps which use SDL_image handle this, but didn't really turn up anything revealing. Is it just standard practice to make sure you have all the necessary ports installed before running |
Yes, for something like this, you may want to run the |
@jbaicoianu Hi thanks for this could you plese explain a bit more on how to compile this properly? (emconfigure ./configure then make (so what should I do so emscripten will find SDL_Net.h properly and compile emdosbox with Net support? (or share emdosbox.js (so I can go with easy road first and then try to compile it from source) and please post your PPP Server setup Thanks for Anwsering and Best Regards |
For building you could: I think this is stupid and maybe I should do something to make it more user-friendly. There, CPPFLAGS are to make the ./configure tests and compiling work, and LDFLAGS are to make the final link work. Ignore warnings about |
I've tried with above command but when I do make I get a lot of these warnings |
@veso266, you must be using an old version of Emscripten, which doesn't understand USE_SDL_NET. Current Emscripten incoming understands it. So, you need to either use a newer Emscripten, or build SDL_net separately and use different options to build with it. I recommend a newer Emscripten. |
It compiled 👍 (after updating cmake and emscripten) now can anyone post a working dosbox.conf (my doesn't work it shows this: config is here: @jbaicoianu now I am just waiting for your ppp server tutorial :) |
@veso266, you're trying to listen for incoming connections? I don't think WebSockets allows you to do that. You need to run a server which will accept a WebSockets connection and make an outbound connection from DOSBox to that server. |
ups closed :( can somene reopen it??? |
reopening |
@veso266 ok I published the article - http://blog.vrcade.io/2017/03/setting-up-a-visp-using-pppow/ - I've also put my config files up on github, https://github.com/jbaicoianu/PPPoW-server Let me know if you run into any problems, I'll be happy to help. |
@jbaicoianu thanks for the article (I understand PPP, routing part but I am a bit confused about websockify and emdosbox conf file (lets say I want to connect to bbs.starbase21.net for a smoke test I would setup a dosbox.conf like this: and then when I run emdosbox I get this: now how must I setup websockify and dosbox.conf to be able to do this Thanks for helping PS: Can anyone tell me how to load custom dosbox.conf into this: https://github.com/db48x/emdosbox-loader |
I can confirm that in Firefox: #40 |
Hah, that's funny, bbs.starbase21.net was the first thing I connected to when I got networking working with DOSBox too :) https://www.youtube.com/watch?v=NviTHfJPiHU - leave me a message on that BBS when you get it working! (username is bai). Looking back at the config for this, in dosbox.conf I have the same as you:
From what I recall I think for the BBS stuff I may have configured it with an option to send all stuff through my websockify proxy, let me poke at this a bit and see if I can remember how I set it up. |
@jbaicoianu Hi i got it working but its not like you have I set my proxy like this: websockify localhost:8181 bbs.starbase21.net:23 (but you just did adtd bbs.starbase.net and it worked (if I do that I get NO CARRIER) and then I must do adtd localhost:8181 in telemate also you have more information on what is going on with a modem in console then me (do you maybe know why?) PS: has anyone written a keygen for Telemate?? |
Yeah I think I may have cheated a bit for the video :) I think what I did was compile with The fact that you have to set up a proxy for each bbs you want to connect to is what sent me down the ppp route. |
@jbaicoianu will go with PPP Route but then I can't use Telemate to dial StarBase BBS (or does Telemate support Telnet) |
@veso266 the loader I'm using here is EMLoader, I wrote it a couple years back when I first started working with JSMESS, and then extended it to work with em-dosbox a bit later. The main difference is that it does everything in WebGL and is mainly intended for embedding the emulators into 3d worlds. It was developed in parallel with Emularity, basically I would do crazy experiments with EMLoader and then work with @db48x to incorporate them into a more sane package which we use on Archive.org. The Trumpet Winsock stuff set-up is....well it was fun to set up :) For the most part it's just a matter of putting the username/password into the "Profile" menu, and setting the phone number to the From there, I went a little overboard with the modem sounds - I actually found a recording of a modem handshake, and I split it up into the various phases of negotiation, and then I use Winsock's script system to play those sounds at the appropriate part of the process. So if the server never "picks up" you hear the numbers dial but no negotiation, or if the negotiation fails you get a long tone and then a retry, just like it used to work. So you get the full experience of dial-up-and-pray, where you're listening for just the right sounds to let you know it worked successfully, or whether you need to hang up and try again. You probably don't need the fancy scripts unless you really want to emulate that authentic feeling, but all of it is triggered from the login script in |
Hi I would like to know if its posible to hook emulate Windows 95 or 3.1 to Internet with this Javascript Dosbox Emulator like you can do this with DosBox Megabuild: http://gadgets.itwriting.com/2158-getting-windows-3-1-connected-to-the-internet-in-dosbox-of-course.html
Thanks for Anwsering and Best Regards
PS: Can I get S3 Video drivers in Win3.1 and use it in Higher color mode?
The text was updated successfully, but these errors were encountered: