News for hackers. Stuff that matters.
Re:Boxedwine is an emulator that can run Windows application... by brian_herman on Friday April 23, 2021 @10:36PM (#26921758)
Re:Boxedwine is an emulator that can run Windows application... by mywacaday on Saturday April 24, 2021 @06:16AM (#26923763)
If we are living in a simulation it's slightly more troubling that it might be running in a browser.
Re:Boxedwine is an emulator that can run Windows application... by ineedasername on Saturday April 24, 2021 @01:58PM (#26926910)
It would explain why time seems to go by so slow when a person is bored: Not many people want to watch that simulation, so lack of CPU cycles slows everything down.
Re:Boxedwine is an emulator that can run Windows application... by stjohnswarts on Saturday April 24, 2021 @02:48PM (#26927336)
I always hoped we were running in a VM written in Rust rather than python or javascript. But it's hard to explain the platypus with a rust based one...
Re:Boxedwine is an emulator that can run Windows application... by mywacaday on Sunday April 25, 2021 @08:10AM (#26932118)
If we are in a simulation how could we force a buffer overflow and what would it look like to us
Re:Boxedwine is an emulator that can run Windows application... by eliasbagley on Monday April 26, 2021 @01:48AM (#26939598)
you'd probably need a particle accelerator or something
Re:Boxedwine is an emulator that can run Windows application... by josephg on Saturday April 24, 2021 @04:11AM (#26923206)
Does it run Firefox? I’d love to see a browser in a browser, just to experience mediocrity in all its awful glory.

Networking would be tricky, but you could encapsulate TCP over a custom websocket tunnel.

Re:Boxedwine is an emulator that can run Windows application... by exikyut on Saturday April 24, 2021 @04:15AM (#26923236)
No, but it does run NetSurf: http://www.boxedwine.org/app/netsurf/

...with exactly the caveat you described, because the wasm port doesn't support websockets yet.

Alternatively you can run *cough* IE6 in JSLinux.

Re:Boxedwine is an emulator that can run Windows application... by anthk on Saturday April 24, 2021 @11:43AM (#26925720)
You can run w2k and probably XP under TinyEmu JS.
Re:Boxedwine is an emulator that can run Windows application... by marvin8 on Saturday April 24, 2021 @04:58AM (#26923439)
Re:Boxedwine is an emulator that can run Windows application... by ant6n on Saturday April 24, 2021 @03:21AM (#26922976)
I think I actually saw this talk live. What are the chances. Definitely worth checking out, it’s pretty fun.
Re:Boxedwine is an emulator that can run Windows application... by brian_herman on Monday April 26, 2021 @03:23AM (#26940139)
Wow I am so jealous!
Re:Boxedwine is an emulator that can run Windows application... by re on Saturday April 24, 2021 @02:28AM (#26922706)
Is there a relevant timestamp for those of us not wanting to invest 30 minutes in the full talk?
Re:Boxedwine is an emulator that can run Windows application... by ToFab123 on Saturday April 24, 2021 @02:49AM (#26922802)
No. Not really. It a fascinating talk to watch so you are not going to totally waste those 30 minutes.
Re:Boxedwine is an emulator that can run Windows application... by phoe-krk on Saturday April 24, 2021 @04:06AM (#26923182)
Yes, 0:00-29:23. The point of the talk is not laid out during a single moment; it's more like a story that unfolds over time, allowing the reader to understand its implications bit by bit.
Re:Boxedwine is an emulator that can run Windows application... by EvilEy3 on Saturday April 24, 2021 @04:30AM (#26923308)
What prophesy? It is written in C++.
Re:Boxedwine is an emulator that can run Windows application... by pjmlp on Saturday April 24, 2021 @05:52AM (#26923671)
WebAssembly like all bytecode formats, doesn't care about the source language.
Re:Boxedwine is an emulator that can run Windows application... by EvilEy3 on Saturday April 24, 2021 @06:11AM (#26923744)
WebAssembly doesn't make it JavaScript application either. It is merely runtime.
Re:Boxedwine is an emulator that can run Windows application... by pjmlp on Saturday April 24, 2021 @09:14AM (#26924630)
Shipped as part of most JavaScript runtimes, originally.
Re:Boxedwine is an emulator that can run Windows application... by avidiax on Friday April 23, 2021 @08:48PM (#26921066)
http://www.boxedwine.org/demo/

Very light games are playable. I'm sure that legacy line-of-business software would have zero trouble.

Re:Boxedwine is an emulator that can run Windows application... by kev_emu on Saturday April 24, 2021 @03:44AM (#26923082)
I worked on the emscripten/wasm build of boxedwine. I can answer some questions. The project has been around in some form for 9 years. It was originally in java, then straight c, now c++. Main author previously worked on jdosbox. I previously ported jdosbox to become jsdosbox (via GWT) a decade ago.
Re:Boxedwine is an emulator that can run Windows application... by arilotter on Friday April 23, 2021 @10:17PM (#26921660)
Wow, I managed to run 3D Pinball Space Cadet at a fluid 60fps with audio disabled. This is a pretty mind-boggling thing to have exist.
Re:Boxedwine is an emulator that can run Windows application... by ravenstine on Saturday April 24, 2021 @12:06AM (#26922170)
Runs horribly on macOS Firefox but, does indeed run at 60fps in Chrome with audio turned off. I wonder why the audio is such a problem? I'd think that audio wouldn't be that expensive even in an emulated environment.
Re:Boxedwine is an emulator that can run Windows application... by grawprog on Saturday April 24, 2021 @03:54AM (#26923124)
I have no idea of the details as to why, but in all the years I've used emulators, turning off the audio has always increased the speed of emulation in emulators that are struggling.

I realize Wine is not an emulator...but...same shit.

Re:Boxedwine is an emulator that can run Windows application... by hutzlibu on Saturday April 24, 2021 @07:05AM (#26923984)
Processing audio is expensive, when done by the CPU.
Re:Boxedwine is an emulator that can run Windows application... by kev_emu on Saturday April 24, 2021 @08:02AM (#26924270)
The WASM build uses the 'normal' CPU core. In this core the CPU emulator is a collection of indirect calls that performs poorly in WASM due the runtime checks to verify the number of parameters and their types. For other builds there is a dynamic code generator. A similar approach would work wonders. Assistance gratefully accepted! - see source folders under emulation/cpu for armv7, armv8 & x32 for the 30 odd method implementations. To get native like performance a binary translator like that used for the x64 core is required
Re:Boxedwine is an emulator that can run Windows application... by ugjka on Saturday April 24, 2021 @03:57AM (#26923138)
Probably something to do with html5 audio api
Re:Boxedwine is an emulator that can run Windows application... by singularity2001 on Friday April 23, 2021 @11:55PM (#26922130)
Even runs on iPad FF ! wow indeed
Re:Boxedwine is an emulator that can run Windows application... by speedgoose on Saturday April 24, 2021 @01:35AM (#26922520)
An iPad is pretty fast. The iPad Pro M1 is faster than quite a lot of brand new laptops.
Re:Boxedwine is an emulator that can run Windows application... by fouc on Friday April 23, 2021 @09:00PM (#26921153)
I tried AoE in safari but that didn't work.. works in firefox though
Re:Boxedwine is an emulator that can run Windows application... by erhk on Friday April 23, 2021 @10:11PM (#26921629)
Write a review
Re:Boxedwine is an emulator that can run Windows application... by heavyset_go on Friday April 23, 2021 @10:23PM (#26921693)
How well?
Re:Boxedwine is an emulator that can run Windows application... by etaioinshrdlu on Saturday April 24, 2021 @02:37AM (#26922753)
Am I looking at the source properly? The author made their own multiplatform CPU emulator just for this?

This is not just Qemu running in a browser, folks. Someone put a huge amount of work into this.

Re:Boxedwine is an emulator that can run Windows application... by heavyset_go on Saturday April 24, 2021 @05:57PM (#26928514)
And they're emulating a Linux kernel in order to provide a platform to run Wine on. It's very impressive.
Re:Boxedwine is an emulator that can run Windows application... by jdmoreira on Saturday April 24, 2021 @04:11AM (#26923207)
isn't wine? as in https://www.winehq.org
Re:Boxedwine is an emulator that can run Windows application... by ObscureScience on Saturday April 24, 2021 @04:17AM (#26923241)
It's Wine running on Linux (which I gather from a quick look is not the actual kernel, but an minimal self written stub enough to run Wine. Is this correct?) which itself is running in an emulator, compiled into binaries for Window, MacOS, Linux and web.
Re:Boxedwine is an emulator that can run Windows application... by danoon on Saturday April 24, 2021 @10:02AM (#26924884)
Yes, the goal of Boxedwine is to run old Windows programs in a platform independent way without a VM or disk images. So basically it is Dosbox but for Windows. At first I started out writing my own Win32 API implementation, and it worked for the first couple of games. But eventually I saw it was more than 1 person could do. That is when I realized Wine was the only solution and since that only worked on Linux, I had to create minimal Linux emulator to run Wine. Implementing the kernal syscalls did take some time. But It is capable to running emulated threads and processes in a single threaded app, which is why it works with Emscripten.
Re:Boxedwine is an emulator that can run Windows application... by 0x77617472 on Saturday April 24, 2021 @10:15AM (#26924963)
I tested it with 2 games (non-browser version, just by downloading it off the website) and was not able to get any of them working.

https://en.wikipedia.org/wiki/Donald_Duck:_Goin%27_Quackers Says error about not being able to find the CD-rom drive.

https://humongous.fandom.com/wiki/Putt-Putt:_Pep%27s_Birthda... I just get a error saying "Error É" whilst trying to run the executable.

Both do install fine into %APPDATA% though. I've tried both the x86/x64 versions executables of Boxedwine.

Mounting CD-rom directly, extracting it to ISO then to a folder doesn't seem to work either.

Do you happen to have any idea what I might be doing wrong or if those games are not yet supported at all?

Thanks

Re:Boxedwine is an emulator that can run Windows application... by danoon on Saturday April 24, 2021 @10:35AM (#26925118)
Just like Wine, Boxedwine won't work with games that have CD checks. If it is just trying to find the CD in order to play a video off of it or grab a large file it didn't install, that might work, but only if the code isn't making sure its a real CD device. Seems like my UI should be able to handle the user dragging an installer into it from a CD where the CD will be used again. For that to work it would need to copy the CD and mount it internally so that the program can find it again while running. Right now I don't do that, but I think that would be a useful enhancement that isn't too hard to do.

As for the Putt-Putt, that has the look of flash or Adobe Air. I know that things like Java, and .Net don't work yet in Boxedwine, so if it is doing any kind of JIT then it won't work. I added that to the list of games I should look at.

You got pretty unlucky if you only tried 2 older games like that and neither worked.

Re:Boxedwine is an emulator that can run Windows application... by 0x77617472 on Saturday April 24, 2021 @10:46AM (#26925217)
Yea that would be great!

I did get them working and playable some time ago on Linux using Wine though (my little brother likes to play them still, except he can't get used to Linux), even though they ask for CD-rom.

The Putt-Putt game is using some custom click 'n play Python2 based "SCUMM" engine, it doesn't require Java or .NET iirc. And I think they predate JIT a bit.

Re:Boxedwine is an emulator that can run Windows application... by anthk on Saturday April 24, 2021 @03:55PM (#26927807)
Try the 1st Deus Ex demo and the addon map.
Re:Boxedwine is an emulator that can run Windows application... by heavyset_go on Saturday April 24, 2021 @06:00PM (#26928528)
Wine also runs on BSD and macOS, if anyone is curious about taking this approach with a different kernel interface.

This project is really clever and one the best things I've seen on here in a while.

Re:Boxedwine is an emulator that can run Windows application... by infinityplus1 on Saturday April 24, 2021 @02:44AM (#26922778)
If it turns out that Win32 APIs+Wine+Javascript is the ultimate cross platform way to run apps, I would laugh my heart out.
Re:Boxedwine is an emulator that can run Windows application... by DoctorOW on Saturday April 24, 2021 @10:54AM (#26925286)
If someone releases an old Windows app for Mac and Linux using this and Electron I hope a story about it reaches HN. It'd be the ultimate combination of tech we love to hate. :)
Re:Boxedwine is an emulator that can run Windows application... by emayljames on Saturday April 24, 2021 @02:53AM (#26922818)
Sounds like virus central. I would have thought having a small Linux in the browser would have been better.
Re:Boxedwine is an emulator that can run Windows application... by pjc50 on Saturday April 24, 2021 @03:44AM (#26923084)
This is a Linux in the browser. It's there to run WINE.

Absolutely incredible project!

(Also, it's in the browser sandbox so you don't have to worry about viruses)

Re:Boxedwine is an emulator that can run Windows application... by Cloudef on Saturday April 24, 2021 @05:34AM (#26923575)
Its not really linux but elf loader + shim that implements enough of linux kernel to run wine
Re:Boxedwine is an emulator that can run Windows application... by aidanhs on Saturday April 24, 2021 @07:20AM (#26924066)
I first came across this a while ago and after digging I found the way it worked (and possibly still works) behind the scenes is pretty cool: https://groups.google.com/g/emscripten-discuss/c/4Qw8OOgTvu0...

> A while ago I was pondering getting emscripten working under Wine, but realised that it's not quite as simple as a typical program (because Wine relies on being able to just provide a compatibility layer for syscalls, so the compatibility layer for x86 would have to be provided by the port to emscripten).

> Seeing this post, I wondered if you'd found some cunning way around this so downloaded the project. No, you've just gone straight ahead and implemented an x86 emulator! Ok, but how is wine able to run on bare metal? Oh right, you've actually implemented parts of linux, including most of the syscall interface, your own executable loader, parts of procfs and assorted special devices! Alright, but (as Alon asks) how does this actually render things? Ah I see, you've implemented your own display driver in Wine which, when methods are invoked, dispatches interrupts to the emulated CPU which then forwards and translates the interrupt to an equivalent sdl call (with opengl working a similar way, but with a dll)!

> Wow!

Re:Boxedwine is an emulator that can run Windows application... by kev_emu on Saturday April 24, 2021 @07:33AM (#26924141)
BoxedWine does OpenGL passthrough on platforms where available. This does not extend to the WASM/WebGL, but I really tried! I was able to get it working for some simple OpenGL applications with help from gl4es, but was unable to make it work with textures beyond one example [1]. I would appreciate some assistance if anyone has the required skills.

[1] - https://kevodwyer.github.io/boxedwine-examples/v1/boxedwine....

Re:Boxedwine is an emulator that can run Windows application... by etaioinshrdlu on Friday April 23, 2021 @11:29PM (#26922006)
Am I understanding this project correctly that there is no Linux kernel, only a simulation of it?

That alone is quite interesting if true, and probably useful outside of just running Wine.

Re:Boxedwine is an emulator that can run Windows application... by laumars on Saturday April 24, 2021 @12:22AM (#26922237)
As per the linked readme, there is a Linux kernel and it is emulated.

Basically this project is a Linux emulator but rather than exposing libc APIs it exposes Win32 et al via WINE.

Pretty neat idea but comes with all the usual caveats of running Windows software on WINE plus all the new caveats of running C++ in WebAssembly.

Re:Boxedwine is an emulator that can run Windows application... by Cloudef on Saturday April 24, 2021 @12:45AM (#26922310)
Its not actually emulating a real linux kernel. It implements its own "kernel" and elf loader: https://github.com/danoon2/Boxedwine/tree/master/source/kern... so this basically is light WSL w/ CPU emulation to run wine.

The project running on browser is not the main point. It can run standalone, and is mostly used to run old games that no longer work well on modern hardware / windows. Heck you can even use it on Linux.

I think the coolest part of the project is that it makes wine very portable though. Boxedwine seems like it could run on android as well for example.

Re:Boxedwine is an emulator that can run Windows application... by xnyan on Saturday April 24, 2021 @01:52AM (#26922588)
It gets around the App Store too, thinking mostly about old games.
Re:Boxedwine is an emulator that can run Windows application... by Cloudef on Saturday April 24, 2021 @12:18AM (#26922220)
Seems so, basically compatibility layer to run another compatibility layer heh
Re:Boxedwine is an emulator that can run Windows application... by userbinator on Friday April 23, 2021 @11:32PM (#26922021)
You can also run Windows itself in the browser: https://news.ycombinator.com/item?id=15763418
Re:Boxedwine is an emulator that can run Windows application... by danoon on Saturday April 24, 2021 @10:11AM (#26924937)
Boxedwine was used to bring an old game, The Voodoo Kid, that has some compatibility issues with modern Windows to Gog.com

https://www.gog.com/game/voodoo_kid

Re:Boxedwine is an emulator that can run Windows application... by marwis on Tuesday April 27, 2021 @11:12AM (#26957005)
There's a company doing a high performance version of this for a while: https://leaningtech.com/cheerpx/
Re:Boxedwine is an emulator that can run Windows application... by DownwardFall on Friday April 23, 2021 @09:00PM (#26921151)
this is neat! thanks for this! I've been using Shells.com to run windows apps in my browser this gives me some cool ideas for projects..

Thanks!

Re:Boxedwine is an emulator that can run Windows application... by remix2000 on Saturday April 24, 2021 @10:12AM (#26924941)
Why WINE on Linux instead of ReactOS? Do browsers have some Linux simulation facilities built-in?
Re:Boxedwine is an emulator that can run Windows application... by danoon on Saturday April 24, 2021 @10:14AM (#26924961)
ReactOS is a full OS, so it needs to run in a VM which requires disk images. Boxedwine emulates everything it needs and can use the users file system directly. So you can just drag a setup or game that doesn't require installation right into the UI and it will work.
Re:Boxedwine is an emulator that can run Windows application... by remix2000 on Saturday April 24, 2021 @01:29PM (#26926650)
Doesn’t BoxedWine emulate Linux kernel then?
Re:Boxedwine is an emulator that can run Windows application... by danoon on Saturday April 24, 2021 @01:43PM (#26926781)
Yeah, I implement a good amount of the kernel syscalls that Wine needs. It was easier for me to implement the 200-300 Kernel calls, like open file, etc, than implement the entire Windows API, which is why I used Wine for this project.
Re:Boxedwine is an emulator that can run Windows application... by fighterpilot on Saturday April 24, 2021 @08:26AM (#26924391)
For a Linux user, can someone explain in what situations this is preferable to regular Wine?
Re:Boxedwine is an emulator that can run Windows application... by danoon on Saturday April 24, 2021 @10:07AM (#26924915)
It can run on other Linux platforms beside x86. It runs on a Rasberry Pi https://www.vogons.org/viewtopic.php?p=932411#p932411
Re:Boxedwine is an emulator that can run Windows application... by anthk on Saturday April 24, 2021 @04:03PM (#26927866)
It may run under OpenBSD. Good until thfr fixed the Wine (re)-port for OpenBSD.

I mostly play IF and slashem, but Deus Ex it's game I liked a lot in my teen years.

Re:Boxedwine is an emulator that can run Windows application... by kinghtown on Saturday April 24, 2021 @12:16AM (#26922213)
This finally explains why gutter punks love boxed wine.
Re:Boxedwine is an emulator that can run Windows application... by nickthemagicman on Saturday April 24, 2021 @09:08AM (#26924594)
Just for the record this is the best name ever.
Re:Boxedwine is an emulator that can run Windows application... by imagineerschool on Saturday April 24, 2021 @12:35AM (#26922265)
Incredible! Nicely done!
Re:Boxedwine is an emulator that can run Windows application... by excalibur on Friday April 23, 2021 @10:50PM (#26921835)
Name is perfect
Re:Boxedwine is an emulator that can run Windows application... by whollacsek on Saturday April 24, 2021 @03:17AM (#26922951)
Genius name for a genius project!
Re:Boxedwine is an emulator that can run Windows application... by zaphirplane on Friday April 23, 2021 @10:46PM (#26921819)
This is impressive and inspiring. I’ll take a look at the code after browsing Reddit