From fcdeeb5245ac657dd41c37f25b2dd8be0193272a Mon Sep 17 00:00:00 2001 From: Pengan Zhou Date: Wed, 10 Oct 2018 23:08:23 -0700 Subject: [PATCH] Add extraArgs support for PCE and PCE IBM PC example --- example_pce_ibmpc.html | 65 ++++++++++++++++++++++++++++++++++++++++++ loader.js | 7 +++++ 2 files changed, 72 insertions(+) create mode 100644 example_pce_ibmpc.html diff --git a/example_pce_ibmpc.html b/example_pce_ibmpc.html new file mode 100644 index 00000000..25ae57cd --- /dev/null +++ b/example_pce_ibmpc.html @@ -0,0 +1,65 @@ + + + + + + + PCE.js IBM-PC example + + + + + + + + + + + \ No newline at end of file diff --git a/loader.js b/loader.js index 833afd0e..1171ddee 100644 --- a/loader.js +++ b/loader.js @@ -683,6 +683,9 @@ var Module = null; function PCELoader() { var config = Array.prototype.reduce.call(arguments, extend); config.emulator_arguments = ["-c", "/emulator/pce-"+ config.pceModel +".cfg"]; + if (config.extra_pce_args && config.extra_pce_args.length > 0) { + config.emulator_arguments = config.emulator_arguments.concat(config.extra_pce_args); + } config.runner = EmscriptenRunner; return config; } @@ -692,6 +695,10 @@ var Module = null; return { pceModel: model }; }; + PCELoader.extraArgs = function (args) { + return { extra_pce_args: args }; + }; + var build_mame_arguments = function (muted, driver, native_resolution, sample_rate, peripheral, extra_args, keepaspect) { var args = [driver, '-verbose',