Permalink
Browse files

clean up the indentation

  • Loading branch information...
db48x committed Feb 2, 2019
1 parent 2b32762 commit 2729449d94a9184792023c07e90746d7ff559744
Showing with 92 additions and 96 deletions.
  1. +13 −14 example_minivmac.html
  2. +13 −14 example_minivmacii.html
  3. +15 −16 example_np2.html
  4. +13 −14 example_xmil.html
  5. +38 −38 loader.js
@@ -42,21 +42,20 @@
<script type="text/javascript" src="loader.js"></script>
<script type="text/javascript">
var emulator = new Emulator(document.querySelector("#canvas"),
null,
new NP2Loader(
NP2Loader.nativeResolution(512, 342),
NP2Loader.emulatorJS("emulators/minivmac.js"),
NP2Loader.emulatorWASM("emulators/minivmac.wasm"),
NP2Loader.mountZip("minivmac",
NP2Loader.fetchFile("Mac ROM files",
"examples/vmac.zip")),
NP2Loader.mountFile("test7.dsk",
NP2Loader.fetchFile("Disk Image",
"examples/test7.dsk")),
NP2Loader.extraArgs(["/emulator/test7.dsk"])
));
null,
new NP2Loader(NP2Loader.nativeResolution(512, 342),
NP2Loader.emulatorJS("emulators/minivmac.js"),
NP2Loader.emulatorWASM("emulators/minivmac.wasm"),
NP2Loader.mountZip("minivmac",
NP2Loader.fetchFile("Mac ROM files",
"examples/vmac.zip")),
NP2Loader.mountFile("test7.dsk",
NP2Loader.fetchFile("Disk Image",
"examples/test7.dsk")),
NP2Loader.extraArgs(["/emulator/test7.dsk"]),
));
emulator.setScale(3).start({ waitAfterDownloading: true });
</script>
</body>

</html>
</html>
@@ -42,21 +42,20 @@
<script type="text/javascript" src="loader.js"></script>
<script type="text/javascript">
var emulator = new Emulator(document.querySelector("#canvas"),
null,
new NP2Loader(
NP2Loader.nativeResolution(640, 480),
NP2Loader.emulatorJS("emulators/minivmacII.js"),
NP2Loader.emulatorWASM("emulators/minivmacII.wasm"),
NP2Loader.mountZip("minivmac",
NP2Loader.fetchFile("Mac ROM files",
"examples/macii.zip")),
NP2Loader.mountFile("test7.dsk",
NP2Loader.fetchFile("Disk Image",
"examples/test7.dsk")),
NP2Loader.extraArgs(["/emulator/test7.dsk"])
));
null,
new NP2Loader(NP2Loader.nativeResolution(640, 480),
NP2Loader.emulatorJS("emulators/minivmacII.js"),
NP2Loader.emulatorWASM("emulators/minivmacII.wasm"),
NP2Loader.mountZip("minivmac",
NP2Loader.fetchFile("Mac ROM files",
"examples/macii.zip")),
NP2Loader.mountFile("test7.dsk",
NP2Loader.fetchFile("Disk Image",
"examples/test7.dsk")),
NP2Loader.extraArgs(["/emulator/test7.dsk"]),
));
emulator.setScale(3).start({ waitAfterDownloading: true });
</script>
</body>

</html>
</html>
@@ -44,23 +44,22 @@
<script type="text/javascript" src="loader.js"></script>
<script type="text/javascript">
var emulator = new Emulator(document.querySelector("#canvas"),
null,
new NP2Loader(
NP2Loader.nativeResolution(640, 400),
NP2Loader.emulatorJS("emulators/np2-386.js"),
NP2Loader.emulatorWASM("emulators/np2-386.wasm"),
NP2Loader.mountZip("np2",
NP2Loader.fetchFile("Bios",
"examples/np2/np2roms.zip")),
NP2Loader.mountFile("FreeDOS(98)_5M.NHD",
NP2Loader.fetchFile("Disk Image",
"examples/np2/FreeDOS(98)_5M.NHD")),
NP2Loader.mountFile("np2.cfg",
NP2Loader.fetchFile("Configuration file",
"examples/np2/np2.cfg")),
));
null,
new NP2Loader(NP2Loader.nativeResolution(640, 400),
NP2Loader.emulatorJS("emulators/np2-386.js"),
NP2Loader.emulatorWASM("emulators/np2-386.wasm"),
NP2Loader.mountZip("np2",
NP2Loader.fetchFile("Bios",
"examples/np2/np2roms.zip")),
NP2Loader.mountFile("FreeDOS(98)_5M.NHD",
NP2Loader.fetchFile("Disk Image",
"examples/np2/FreeDOS(98)_5M.NHD")),
NP2Loader.mountFile("np2.cfg",
NP2Loader.fetchFile("Configuration file",
"examples/np2/np2.cfg")),
));
emulator.setScale(3).start({ waitAfterDownloading: true });
</script>
</body>

</html>
</html>
@@ -41,21 +41,20 @@
<script type="text/javascript" src="loader.js"></script>
<script type="text/javascript">
var emulator = new Emulator(document.querySelector("#canvas"),
null,
new NP2Loader(
NP2Loader.nativeResolution(320, 200),
NP2Loader.emulatorJS("emulators/xmil.js"),
NP2Loader.emulatorWASM("emulators/xmil.wasm"),
NP2Loader.mountZip("xmil-em",
NP2Loader.fetchFile("BIOS",
"examples/np2/sharp-x1turbo-rom.zip")),
NP2Loader.mountFile("Gradius.2d",
NP2Loader.fetchFile("Disk Image",
"examples/np2/Gradius.2d")),
NP2Loader.extraArgs(["/emulator/Gradius.2d"])
));
null,
new NP2Loader(NP2Loader.nativeResolution(320, 200),
NP2Loader.emulatorJS("emulators/xmil.js"),
NP2Loader.emulatorWASM("emulators/xmil.wasm"),
NP2Loader.mountZip("xmil-em",
NP2Loader.fetchFile("BIOS",
"examples/np2/sharp-x1turbo-rom.zip")),
NP2Loader.mountFile("Gradius.2d",
NP2Loader.fetchFile("Disk Image",
"examples/np2/Gradius.2d")),
NP2Loader.extraArgs(["/emulator/Gradius.2d"]),
));
emulator.setScale(3).start({ waitAfterDownloading: true });
</script>
</body>

</html>
</html>
@@ -738,20 +738,20 @@ var Module = null;
/**
* NP2Loader
*/
function NP2Loader() {
var config = Array.prototype.reduce.call(arguments, extend);
config.emulator_arguments = build_np2_arguments(config.emulatorStart, config.files, config.extra_np2_args);
config.runner = NP2Runner;
return config;
}
NP2Loader.__proto__ = BaseLoader;
NP2Loader.autoLoad = function (path) {
return { emulatorStart: path };
};
NP2Loader.extraArgs = function (args) {
return { extra_np2_args: args };
}
function NP2Loader() {
var config = Array.prototype.reduce.call(arguments, extend);
config.emulator_arguments = build_np2_arguments(config.emulatorStart, config.files, config.extra_np2_args);
config.runner = NP2Runner;
return config;
}
NP2Loader.__proto__ = BaseLoader;

NP2Loader.autoLoad = function (path) {
return { emulatorStart: path };
};
NP2Loader.extraArgs = function (args) {
return { extra_np2_args: args };
};

var build_mame_arguments = function (muted, driver, native_resolution, sample_rate, peripheral, extra_args, keepaspect) {
var args = [driver,
@@ -831,12 +831,12 @@ var Module = null;
};

var build_np2_arguments = function (emulator_start, files, extra_args) {
var args = emulator_start ? [emulator_start] : [];
if (extra_args) {
args = args.concat(extra_args);
}
return args;
}
var args = emulator_start ? [emulator_start] : [];
if (extra_args) {
args = args.concat(extra_args);
}
return args;
};

/*
* EmscriptenRunner
@@ -918,19 +918,19 @@ var Module = null;
/*
* PC98DosBoxRunner
*/
function PC98DosBoxRunner() {
return EmscriptenRunner.apply(this, arguments);
}
PC98DosBoxRunner.prototype = Object.create(EmscriptenRunner.prototype);
PC98DosBoxRunner.prototype.start = function () {
FS.symlink('/emulator/y/FONT.ROM', '/FONT.ROM');
FS.symlink('/emulator/y/2608_bd.wav', '/2608_bd.wav');
FS.symlink('/emulator/y/2608_hh.wav', '/2608_hh.wav');
FS.symlink('/emulator/y/2608_sd.wav', '/2608_sd.wav');
FS.symlink('/emulator/y/2608_rim.wav', '/2608_rim.wav');
FS.symlink('/emulator/y/2608_tom.wav', '/2608_tom.wav');
FS.symlink('/emulator/y/2608_top.wav', '/2608_top.wav');
}
function PC98DosBoxRunner() {
return EmscriptenRunner.apply(this, arguments);
}
PC98DosBoxRunner.prototype = Object.create(EmscriptenRunner.prototype);
PC98DosBoxRunner.prototype.start = function () {
FS.symlink('/emulator/y/FONT.ROM', '/FONT.ROM');
FS.symlink('/emulator/y/2608_bd.wav', '/2608_bd.wav');
FS.symlink('/emulator/y/2608_hh.wav', '/2608_hh.wav');
FS.symlink('/emulator/y/2608_sd.wav', '/2608_sd.wav');
FS.symlink('/emulator/y/2608_rim.wav', '/2608_rim.wav');
FS.symlink('/emulator/y/2608_tom.wav', '/2608_tom.wav');
FS.symlink('/emulator/y/2608_top.wav', '/2608_top.wav');
};

/*
* NP2Runner
@@ -941,13 +941,13 @@ var Module = null;
NP2Runner.prototype = Object.create(EmscriptenRunner.prototype);
NP2Runner.prototype.start = function () {
try {
var configFile = FS.readFile('/emulator/np2.cfg');
FS.writeFile('/emulator/np2/np2.cfg', configFile);
var configFile = FS.readFile('/emulator/np2.cfg');
FS.writeFile('/emulator/np2/np2.cfg', configFile);
} catch (ex) {
//If the user config file not found, NP2 will use default settings
console.log(ex)
//If the user config file not found, NP2 will use default settings
console.log(ex);
}
}
};

/*
* MAMERunner

0 comments on commit 2729449

Please sign in to comment.