From 8c750dde408963a795940e051e3dd346438882a2 Mon Sep 17 00:00:00 2001 From: Ethan O'Brien Date: Sun, 19 Oct 2025 19:40:38 -0500 Subject: [PATCH] Add beta bootup batch file --- data/loader.js | 1 + data/src/GameManager.js | 16 ++++++++++++++++ data/src/emulator.js | 5 ++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/data/loader.js b/data/loader.js index 96796ab..2baadfe 100644 --- a/data/loader.js +++ b/data/loader.js @@ -128,6 +128,7 @@ config.shaders = Object.assign({}, window.EJS_SHADERS, window.EJS_shaders ? window.EJS_shaders : {}); config.fixedSaveInterval = window.EJS_fixedSaveInterval; config.disableAutoUnload = window.EJS_disableAutoUnload; + config.disableBatchBootup = window.EJS_disableBatchBootup; let systemLang; try { diff --git a/data/src/GameManager.js b/data/src/GameManager.js index 4f38178..b589ee9 100644 --- a/data/src/GameManager.js +++ b/data/src/GameManager.js @@ -164,6 +164,22 @@ class EJS_GameManager { } return cfg; } + writeBootupBatchFile() { + const data = ` +SET BLASTER=A220 I7 D1 H5 T6 + +@ECHO OFF +mount A / -t floppy +SET PATH=Z:\\;A:\\ +mount c /emulator/c +c: +COMMAND.COM +IF EXIST AUTORUN.BAT AUTORUN.BAT +`; + const filename = "BOOTUP.BAT"; + this.FS.writeFile("/" + filename, data); + return filename; + } initShaders() { if (!this.EJS.config.shaders) return; this.mkdir("/shader"); diff --git a/data/src/emulator.js b/data/src/emulator.js index aa17b6f..b4862b3 100644 --- a/data/src/emulator.js +++ b/data/src/emulator.js @@ -4,7 +4,7 @@ class EmulatorJS { "atari5200": ["a5200"], "vb": ["beetle_vb"], "nds": ["melonds", "desmume", "desmume2015"], - "arcade": ["fbneo", "fbalpha2012_cps1", "fbalpha2012_cps2"], + "arcade": ["fbneo", "fbalpha2012_cps1", "fbalpha2012_cps2", "same_cdi"], "nes": ["fceumm", "nestopia"], "gb": ["gambatte"], "coleco": ["gearcoleco"], @@ -940,6 +940,9 @@ class EmulatorJS { } else if (createCueFile && supportsExt("m3u") && supportsExt("cue")) { this.fileName = this.gameManager.createCueFile(fileNames); } + if (this.getCore(true) === "dos" && !this.config.disableBatchBootup) { + this.fileName = this.gameManager.writeBootupBatchFile(); + } resolve(); }); }