From 917c0428222617bf49df80a7ce1012f24b8dedb4 Mon Sep 17 00:00:00 2001 From: Pengan Zhou Date: Mon, 17 Sep 2018 00:17:39 -0700 Subject: [PATCH] Update setup of Emscripten based loaders --- example_pc98dosbox.html | 7 ++++++- loader.js | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/example_pc98dosbox.html b/example_pc98dosbox.html index d650467d..05fe67c2 100644 --- a/example_pc98dosbox.html +++ b/example_pc98dosbox.html @@ -42,7 +42,12 @@ PC98DosBoxLoader.emulatorWASM("emulators/dosbox-x/dosbox.wasm"), PC98DosBoxLoader.locateAdditionalEmulatorJS(locateAdditionalFiles), PC98DosBoxLoader.nativeResolution(640, 480), - + /* DOSBox-X seems like always need a doxbox.conf to run in PC-98 mode correctly, load your dosbox.conf + when it is not include in your game package + PC98DosBoxLoader.mountFile("dosbox.conf", + PC98DosBoxLoader.fetchFile("Configuration File", + "dosbox.conf")), + */ PC98DosBoxLoader.mountZip("c", PC98DosBoxLoader.fetchFile("Game File", "examples/th1.zip")), diff --git a/loader.js b/loader.js index 20aef8b4..85b7ffa6 100644 --- a/loader.js +++ b/loader.js @@ -842,7 +842,6 @@ var Module = null; } PC98DosBoxRunner.prototype = Object.create(EmscriptenRunner.prototype); PC98DosBoxRunner.prototype.start = function () { - FS.symlink('/emulator/y/dosbox-default.conf', '/dosbox.conf'); 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'); @@ -1290,7 +1289,7 @@ var Module = null; } if ("runner" in game_data) { - if (game_data.runner == EmscriptenRunner || game_data.runner == MAMERunner || game_data.runner == PC98DosBoxRunner) { + if (game_data.runner == EmscriptenRunner || game_data.runner.prototype instanceof EmscriptenRunner) { // this is a stupid hack. Emscripten-based // apps currently need the runner to be set // up first, then we can attach the