News for hackers. Stuff that matters.
Re:Run old games in DOSBox in the browser by buster on Friday August 12, 2011 @03:31AM (#2876321)
If this isn't clear to someone:

This needs Chrome and the Native Client.

From the page:

  Please Note:

  You must have Native Client enabled in Chrome 12 or 13 for   this game to work in your browser.

  To enable Native Client, do the following:


  Go to "about:flags" in your address bar (without quotes)
  Click "Enable" next to Native Client
  Go to "about:plugins" in your address bar (again, without quotes)
  Occasionally you will find that you have to click "Enable  NaCl" here too
  Restart Chrome
  Have fun!
Re:Run old games in DOSBox in the browser by kleiba on Friday August 12, 2011 @03:59AM (#2876375)
...thus it would be nice to change the headline from "..in the browser" to "..in Chrome".
Re:Run old games in DOSBox in the browser by leoc on Friday August 12, 2011 @05:11AM (#2876550)
In the long term, it would be preferable to fix the browser.
Re:Run old games in DOSBox in the browser by tyree732 on Friday August 12, 2011 @08:14AM (#2876945)
Preferable for some, but many see NaCl as another ActiveX.
Re:Run old games in DOSBox in the browser by novumordo on Friday August 12, 2011 @09:09AM (#2877076)
While NaCl poses security concerns, they have invested a lot of effort to make the sandbox secure. Their first two papers deal with this quite a bit [1,2] and the new paper seems to expand on this more, but I haven't read it yet [3]. ActiveX doesn't even compare -- it's just running native code.

[1]http://src.chromium.org/viewvc/native_client/data/docs_tarba... [2]http://nativeclient.googlecode.com/svn/data/site/NaCl_SFI.pd... [3]http://naclports.googlecode.com/svn/trunk/src/experimental/v...

More about NaCl (http://code.google.com/p/nativeclient/)

Portable NaCl (PNaCl) looked very promising (targeting LLVM (bytecode) and then re-targeting your native architecture) but I haven't heard anything about it lately.

Re:Run old games in DOSBox in the browser by tyree732 on Friday August 12, 2011 @10:27AM (#2877365)
I was less referring to the security issues, as I'm familiar with Google's efforts on those fronts, and more referring the lack of cross browser support. ActiveX sucked for a number of reasons, but one reason in particular was because it forced people to use IE even after IE 6 became the most inferior browser on the market by a long shot in terms of both security and performance. If NaCl becomes popular enough, either other browsers will be forced to add it or there will be similar lock-in issues. If other browsers are forced to add it, will every single one of them have the same security, performance and compliance with the standard as Google Chrome does?
Re:Run old games in DOSBox in the browser by novumordo on Friday August 12, 2011 @10:42AM (#2877438)
I don't see lock-in issues as a concern. It's an open spec, if it becomes popular enough then even if other browsers don't want to support it developers can make plugins for those browsers (some of the papers even mention this, I believe). In any case, if websites require you to use NaCl it is only stupid unless they are doing something that otherwise wouldn't be feasible e.g. running a performance hungry emulator. It's clear to me that Google has no intentions to leverage this for lock-in.

If other browsers are forced to add NaCl support: of course I doubt they will have the same security, performance and compliance that Chrome does -- but who are we kidding, it's highly unlikely that all browsers will ever be equal in those ways.

Re:Run old games in DOSBox in the browser by sedachv on Friday August 12, 2011 @01:37PM (#2878262)
What about architecture lock-in? Good luck running x86 NaCl apps on your iphone.
Re:Run old games in DOSBox in the browser by azakai on Friday August 12, 2011 @01:38PM (#2878272)
> I don't see lock-in issues as a concern. It's an open spec

There isn't any open spec here. NaCl is a research project, not a spec or a proposal.

Re:Run old games in DOSBox in the browser by udp on Friday August 12, 2011 @06:42AM (#2876742)
Ah, well that isn't quite as impressive. I expected something like DOSBox compiled with Emscripten, with <canvas> to render to.
Re:Run old games in DOSBox in the browser by tybris on Friday August 12, 2011 @04:57AM (#2876518)
I was thinking flying cars and stuff. I didn't know the future was going to be this awesome.
Re:Run old games in DOSBox in the browser by ck2 on Friday August 12, 2011 @04:00AM (#2876380)
Native client is a horribly bad idea on so many levels. Wiz-bang demos aren't enough to distract from the danger.

Now trojans have one huge, lovely target. Just change browser settings and boom, easy attack. This in combination with hiding everything from users (status bar, url bar, etc.) is super dangerous. It's activex all over again.

Do it in webgl or otherwise, leave native code execution outside the browser.

Re:Run old games in DOSBox in the browser by angryasian on Friday August 12, 2011 @04:22AM (#2876432)
why not hold your pessimism till we actually see something. Security has been a major focal point for NaCl. Until then play some old school games.
Re:Run old games in DOSBox in the browser by jbri on Friday August 12, 2011 @04:21AM (#2876428)
In what way is NaCl worse than webgl?
Re:Run old games in DOSBox in the browser by jbk on Friday August 12, 2011 @05:44AM (#2876608)
Actually it is better for security.
Re:Run old games in DOSBox in the browser by gcr on Friday August 12, 2011 @11:34AM (#2877678)
Proof please?

Whenever I visit a WebGL demo inside Linux w/ NVidia drivers, if there are any complicated shaders, my system hard-freezes, forcing me to reboot.

Until the X developers fix Xorg's security model (like that will happen), and until NVidia fixes their Linux drivers (like that will happen), WebGL will always be one massive gaping security and stability problem for me as a Linux user.

Re:Run old games in DOSBox in the browser by jbk on Thursday August 18, 2011 @06:50PM (#2901489)
So, you are saying the same thing that I am :D
Re:Run old games in DOSBox in the browser by iam on Friday August 12, 2011 @11:38AM (#2877693)
Because it runs userspace code on x86, instead of running kernel-level code on the GPU?
Re:Run old games in DOSBox in the browser by jbk on Thursday August 18, 2011 @06:49PM (#2901486)
Because we know, those days, to sandbox raw x86 code, and not let them access the system and the drivers... However, running shaders directly on the GPU exposes directly graphic drivers, that are not conceived to block unfriendly code.
Re:Run old games in DOSBox in the browser by jbk on Friday August 12, 2011 @05:44AM (#2876610)
Why so?

You don't have access to outside APIs with NaCL.

Re:Run old games in DOSBox in the browser by nikcub on Friday August 12, 2011 @06:58AM (#2876777)
native client has the same sandbox and API access as javascript and chrome extensions
Re:Run old games in DOSBox in the browser by cturner on Friday August 12, 2011 @04:41AM (#2876481)
I have a poor understanding of the toolchain, as my next question may make clear.

What obstacles would there be to running Borland C++ in this, and developing from here?

Re:Run old games in DOSBox in the browser by cool-RR on Friday August 12, 2011 @04:40AM (#2876479)
Totally awesome.

Though I kinda wonder, why Simon the Sorcerer, that used to run on a 386, now takes 100% of a processor core of a Core 2 Duo.

Re:Run old games in DOSBox in the browser by nolok on Friday August 12, 2011 @04:52AM (#2876506)
You have to realize that not only are performances of nacl probably going to improve with time, but more importantly this is not a port of the game in nacl, this is a port of the game, running in the dosbox emulator running in nacl (Dosbox emulate a whole old computer, which then load the game). Redoing such a game from scartcg in Nacl and getting rid of the emulator layer would have much better performances.
Re:Run old games in DOSBox in the browser by zerd on Friday August 12, 2011 @04:56AM (#2876516)
Another reason is explained on the website:

"Currently NaClBox is using far more CPU than it should. This is because the current version of SDL for Native Client has a bug that will crash the browser when you navigate away from it. To avoid that, I had to revert back to an older version of the SDL port that has high CPU utilization."

Re:Run old games in DOSBox in the browser by ootachi on Friday August 12, 2011 @01:04PM (#2878107)
Those insisting that there's no way this will be another ActiveX would be wise to notice this. We're not even one day into the release and already there's a browser-crashing bug.
Re:Run old games in DOSBox in the browser by jerf on Friday August 12, 2011 @12:32PM (#2877944)
In addition to the other points, it should be pointed out many games had busy loops in them. Such games will always take 100% of your processor, except in some cases where the busy loop crashes because it manages to count too high and overflow something or other such crash bugs.
Re:Run old games in DOSBox in the browser by 5h on Friday August 12, 2011 @04:42AM (#2876487)
so my morning went like

1) skim tech crunch article 2) figure it will take a while for anything interesting to come out 3) come back to HN, this is next story

this will not be a productive morning

Re:Run old games in DOSBox in the browser by csl on Friday August 12, 2011 @07:39AM (#2876881)
So, Native Client allows you to run out-of-process, sandboxed, _native_ code in Chrome.

Does that mean that the server needs to serve precompiled executables to visitors with different operating systems?

Re:Run old games in DOSBox in the browser by onedognight on Friday August 12, 2011 @08:08AM (#2876929)
The code is OS independent, but processor dependent (Currently i386 and arm).
Re:Run old games in DOSBox in the browser by MatthewPhillips on Friday August 12, 2011 @08:21AM (#2876963)
No, Chrome is your "OS" in this case. You do have to account for processors though. Right now there is x86-32, x86-64, and ARM.

Go to any of the games and after you've started, right click and save-as to get the nmf file. It's a manifest which has separate nexes for each processor (these are just x86-32 and x86-64).

Re:Run old games in DOSBox in the browser by mirrorskin on Friday August 12, 2011 @04:14AM (#2876411)
Looks interesting, but after activating Native Client, I just see a black box in Chrome 15.0.849.1 dev on OS X 10.6.8 – anybody else has that issue? Or do the games only work on Windows?
Re:Run old games in DOSBox in the browser by jessexoc on Friday August 12, 2011 @04:28AM (#2876450)
Similar issue here on Ubuntu 10.10 64bit:

  Chrome - 14.0.835.15 dev
  Chromium - 14.0.803.0 (Developer Build 90483 Linux) Ubuntu 10.10
I am getting a 403 when trying to load the dosbox client (http://nacl.naclbox.com/dosbox_14.nmf).

I wonder the server is refusing this request if the user-agent is not in their white list?

Or perhaps they are limiting it based on Country due to Copyright Issues?

Re:Run old games in DOSBox in the browser by jbri on Friday August 12, 2011 @04:40AM (#2876476)
I also get a 403 trying to load what you've linked, but dosbox_13.nmf loads fine and so do the games.

It determines the filename based on the major version number in the useragent - it would probably work fine if your browser reported chrome 13.something.

Re:Run old games in DOSBox in the browser by shrikant on Friday August 12, 2011 @10:52AM (#2877488)
I was on 14.0.835.2 (Win7) and had a similar issue (black box, and very laggy scrolling). Once the GPU compositing and GPU accelerated drawing options marked out here [1] are disabled, the issues went away.

[1] http://i.imgur.com/COxPY.jpg

Re:Run old games in DOSBox in the browser by vmind on Friday August 12, 2011 @05:21AM (#2876564)
Looks like the dosbox is loaded depending on which version of chrome you're running, and there's only 12 and 13 up, so 14/15 tries to get a file that doesn't exist.

Bit of silly coding, given the ABI is fixed from 13 onwards.

Re:Run old games in DOSBox in the browser by zerd on Friday August 12, 2011 @04:53AM (#2876510)
Works on 64bit OSX, Chrome 13.0.782.112
Re:Run old games in DOSBox in the browser by buster on Friday August 12, 2011 @04:22AM (#2876433)
They run at least on Linux 64 Bit.
Re:Run old games in DOSBox in the browser by Cushman on Friday August 12, 2011 @04:22AM (#2876431)
Same here. Chrome 13, OS X 10.7.
Re:Run old games in DOSBox in the browser by hannes2000 on Friday August 12, 2011 @03:33AM (#2876325)
Has anybody gotten NaCL apps to work on 64bit Linux?
Re:Run old games in DOSBox in the browser by buster on Friday August 12, 2011 @03:38AM (#2876336)
I do. Running 13.0.782.112 beta Chrome on Natty 64bit.

Edit: Chromium 13.0.782.107 works for me, too.

Re:Run old games in DOSBox in the browser by angryasian on Friday August 12, 2011 @04:21AM (#2876429)
yep playing star wars : tie fighter right now

chrome 13.0.782.112 Natty 11.04 64bit