First of all,I had tested to run (MS)DOS emulator on jsfiddle.net,
and successfully run dos game.
-------------------------------------------------
External Resources
-------------------------------------------------
https://js-dos.com/cdn/js-dos-api.js
-------------------------------------------------
CSS
-------------------------------------------------
.dosbox-container { width: 640px; height: 400px; }
-------------------------------------------------
html
-------------------------------------------------
<div id="dosbox"></div>
<br/>
<button onclick="dosbox.requestFullScreen();">Make fullscreen</button>
-------------------------------------------------
javascript
-------------------------------------------------
var dosbox = new Dosbox({
id: "dosbox",
onload: function (dosbox) {
dosbox.run("https://js-dos.com/cdn/digger.zip", "./DIGGER.COM");
},
onrun: function (dosbox, app) {
console.log("App '" + app + "' is runned");
}
});
js-dos
https://js-dos.com/getting-started/
No comments:
Post a Comment