Merge branch 'main' into main

This commit is contained in:
LEGALISE_PIRACY 2024-03-11 22:41:21 +00:00
commit d7ccfdd5d6
310 changed files with 50246 additions and 12957 deletions

View File

@ -49,21 +49,11 @@
"image": "cover.svg", "image": "cover.svg",
"directory": "drift" "directory": "drift"
}, },
{
"name": "Dashy Reaper",
"image": "cover.svg",
"directory": "dashy"
},
{ {
"name": "Driving Force 4", "name": "Driving Force 4",
"image": "cover.svg", "image": "cover.svg",
"directory": "driving" "directory": "driving"
}, },
{
"name": "Bullet Fury",
"image": "cover.svg",
"directory": "bulletfury"
},
{ {
"name": "Minecraft Games", "name": "Minecraft Games",
"image": "cover.svg", "image": "cover.svg",

View File

@ -18,8 +18,8 @@
EJS_core = "nds"; EJS_core = "nds";
EJS_color = "#0064ff"; EJS_color = "#0064ff";
EJS_startOnLoaded = true; EJS_startOnLoaded = true;
EJS_pathtodata = "https://cdn.emulatorjs.org/stable/data/"; EJS_pathtodata = "/semag/emulatorjs/data/";
EJS_gameUrl = "Animal Crossing - Wild World (USA) (Rev 1).nds"; EJS_gameUrl = "Animal Crossing - Wild World (USA) (Rev 1).nds";
</script> </script>
<script src="https://cdn.emulatorjs.org/stable/data/loader.js"></script> <script src="/semag/emulatorjs/data/loader.js"></script>
</html> </html>

View File

@ -18,8 +18,8 @@
EJS_core = "n64"; EJS_core = "n64";
EJS_color = "#0064ff"; EJS_color = "#0064ff";
EJS_startOnLoaded = true; EJS_startOnLoaded = true;
EJS_pathtodata = "https://cdn.emulatorjs.org/stable/data/"; EJS_pathtodata = "/semag/emulatorjs/data/";
EJS_gameUrl = "Banjo-Kazooie (USA) (Rev A).n64"; EJS_gameUrl = "Banjo-Kazooie (USA) (Rev A).n64";
</script> </script>
<script src="https://cdn.emulatorjs.org/stable/data/loader.js"></script> <script src="/semag/emulatorjs/data/loader.js"></script>
</html> </html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

View File

@ -1,2 +0,0 @@
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
<embed src="game.swf" width="100%" height="100%"></embed>

View File

@ -18,8 +18,8 @@
EJS_core = "n64"; EJS_core = "n64";
EJS_color = "#0064ff"; EJS_color = "#0064ff";
EJS_startOnLoaded = true; EJS_startOnLoaded = true;
EJS_pathtodata = "https://cdn.emulatorjs.org/stable/data/"; EJS_pathtodata = "/semag/emulatorjs/data/";
EJS_gameUrl = "Donkey Kong 64 (USA).n64"; EJS_gameUrl = "Donkey Kong 64 (USA).n64";
</script> </script>
<script src="https://cdn.emulatorjs.org/stable/data/loader.js"></script> <script src="/semag/emulatorjs/data/loader.js"></script>
</html> </html>

View File

@ -18,8 +18,8 @@
EJS_core = "n64"; EJS_core = "n64";
EJS_color = "#0064ff"; EJS_color = "#0064ff";
EJS_startOnLoaded = true; EJS_startOnLoaded = true;
EJS_pathtodata = "https://cdn.emulatorjs.org/stable/data/"; EJS_pathtodata = "/semag/emulatorjs/data/";
EJS_gameUrl = "Doom 64 (USA) (Rev A).n64"; EJS_gameUrl = "Doom 64 (USA) (Rev A).n64";
</script> </script>
<script src="https://cdn.emulatorjs.org/stable/data/loader.js"></script> <script src="/semag/emulatorjs/data/loader.js"></script>
</html> </html>

View File

@ -1,345 +1,374 @@
class EJS_GameManager { class EJS_GameManager {
constructor(Module, EJS) { constructor(Module, EJS) {
this.EJS = EJS; this.EJS = EJS;
this.Module = Module; this.Module = Module;
this.FS = this.Module.FS; this.FS = this.Module.FS;
this.functions = { this.functions = {
restart: this.Module.cwrap('system_restart', '', []), restart: this.Module.cwrap('system_restart', '', []),
getStateInfo: this.Module.cwrap('get_state_info', 'string', []), //these names are dumb saveStateInfo: this.Module.cwrap('save_state_info', 'null', []),
saveStateInfo: this.Module.cwrap('save_state_info', 'null', []), loadState: this.Module.cwrap('load_state', 'number', ['string', 'number']),
loadState: this.Module.cwrap('load_state', 'number', ['string', 'number']), screenshot: this.Module.cwrap('cmd_take_screenshot', '', []),
screenshot: this.Module.cwrap('cmd_take_screenshot', '', []), simulateInput: this.Module.cwrap('simulate_input', 'null', ['number', 'number', 'number']),
simulateInput: this.Module.cwrap('simulate_input', 'null', ['number', 'number', 'number']), toggleMainLoop: this.Module.cwrap('toggleMainLoop', 'null', ['number']),
toggleMainLoop: this.Module.cwrap('toggleMainLoop', 'null', ['number']), getCoreOptions: this.Module.cwrap('get_core_options', 'string', []),
getCoreOptions: this.Module.cwrap('get_core_options', 'string', []), setVariable: this.Module.cwrap('ejs_set_variable', 'null', ['string', 'string']),
setVariable: this.Module.cwrap('ejs_set_variable', 'null', ['string', 'string']), setCheat: this.Module.cwrap('set_cheat', 'null', ['number', 'number', 'string']),
setCheat: this.Module.cwrap('set_cheat', 'null', ['number', 'number', 'string']), resetCheat: this.Module.cwrap('reset_cheat', 'null', []),
resetCheat: this.Module.cwrap('reset_cheat', 'null', []), toggleShader: this.Module.cwrap('shader_enable', 'null', ['number']),
toggleShader: this.Module.cwrap('shader_enable', 'null', ['number']), getDiskCount: this.Module.cwrap('get_disk_count', 'number', []),
getDiskCount: this.Module.cwrap('get_disk_count', 'number', []), getCurrentDisk: this.Module.cwrap('get_current_disk', 'number', []),
getCurrentDisk: this.Module.cwrap('get_current_disk', 'number', []), setCurrentDisk: this.Module.cwrap('set_current_disk', 'null', ['number']),
setCurrentDisk: this.Module.cwrap('set_current_disk', 'null', ['number']), getSaveFilePath: this.Module.cwrap('save_file_path', 'string', []),
getSaveFilePath: this.Module.cwrap('save_file_path', 'string', []), saveSaveFiles: this.Module.cwrap('cmd_savefiles', '', []),
saveSaveFiles: this.Module.cwrap('cmd_savefiles', '', []), supportsStates: this.Module.cwrap('supports_states', 'number', []),
supportsStates: this.Module.cwrap('supports_states', 'number', []), loadSaveFiles: this.Module.cwrap('refresh_save_files', 'null', []),
loadSaveFiles: this.Module.cwrap('refresh_save_files', 'null', []), toggleFastForward: this.Module.cwrap('toggle_fastforward', 'null', ['number']),
toggleFastForward: this.Module.cwrap('toggle_fastforward', 'null', ['number']), setFastForwardRatio: this.Module.cwrap('set_ff_ratio', 'null', ['number']),
setFastForwardRatio: this.Module.cwrap('set_ff_ratio', 'null', ['number']), toggleRewind: this.Module.cwrap('toggle_rewind', 'null', ['number']),
toggleRewind: this.Module.cwrap('toggle_rewind', 'null', ['number']), setRewindGranularity: this.Module.cwrap('set_rewind_granularity', 'null', ['number']),
setRewindGranularity: this.Module.cwrap('set_rewind_granularity', 'null', ['number']), toggleSlowMotion: this.Module.cwrap('toggle_slow_motion', 'null', ['number']),
toggleSlowMotion: this.Module.cwrap('toggle_slow_motion', 'null', ['number']), setSlowMotionRatio: this.Module.cwrap('set_sm_ratio', 'null', ['number']),
setSlowMotionRatio: this.Module.cwrap('set_sm_ratio', 'null', ['number']), getFrameNum: this.Module.cwrap('get_current_frame_count', 'number', [''])
getFrameNum: this.Module.cwrap('get_current_frame_count', 'number', ['']) }
} this.writeFile("/home/web_user/retroarch/userdata/config/Beetle PSX HW/Beetle PSX HW.opt", 'beetle_psx_hw_renderer = "software"\n');
this.mkdir("/home"); this.writeFile("/home/web_user/retroarch/userdata/config/MAME 2003 (0.78)/MAME 2003 (0.78).opt", 'mame2003_skip_disclaimer = "enabled"\nmame2003_skip_warnings = "enabled"\n');
this.mkdir("/home/web_user");
this.mkdir("/home/web_user/retroarch"); this.mkdir("/data");
this.mkdir("/home/web_user/retroarch/userdata"); this.mkdir("/data/saves");
this.mkdir("/home/web_user/retroarch/userdata/config");
this.mkdir("/home/web_user/retroarch/userdata/config/Beetle PSX HW"); this.writeFile("/home/web_user/retroarch/userdata/retroarch.cfg", this.getRetroArchCfg());
this.FS.writeFile("/home/web_user/retroarch/userdata/config/Beetle PSX HW/Beetle PSX HW.opt", 'beetle_psx_hw_renderer = "software"\n');
this.FS.mount(IDBFS, {}, '/data/saves');
this.mkdir("/data"); this.FS.syncfs(true, () => {});
this.mkdir("/data/saves");
this.initShaders();
this.FS.writeFile("/home/web_user/retroarch/userdata/retroarch.cfg", this.getRetroArchCfg());
this.EJS.addEventListener(window, "beforeunload", () => {
this.FS.mount(IDBFS, {}, '/data/saves'); this.saveSaveFiles();
this.FS.syncfs(true, () => {}); this.FS.syncfs(() => {});
})
this.initShaders(); }
loadExternalFiles() {
this.EJS.addEventListener(window, "beforeunload", () => { return new Promise(async (resolve, reject) => {
this.saveSaveFiles(); if (this.EJS.config.externalFiles && this.EJS.config.externalFiles.constructor.name === 'Object') {
this.FS.syncfs(() => {}); for (const key in this.EJS.config.externalFiles) {
}) await new Promise(done => {
} this.EJS.downloadFile(this.EJS.config.externalFiles[key], async (res) => {
mkdir(path) { if (res === -1) {
try { if (this.EJS.debug) console.warn("Failed to fetch file from '" + this.EJS.config.externalFiles[key] + "'. Make sure the file exists.");
this.FS.mkdir(path); return done();
} catch(e) {} }
} let path = key;
getRetroArchCfg() { if (key.trim().endsWith("/")) {
return "autosave_interval = 60\n" + const invalidCharacters = /[#<$+%>!`&*'|{}/\\?"=@:^\r\n]/ig;
"screenshot_directory = \"/\"\n" + let name = this.EJS.config.externalFiles[key].split("/").pop().split("#")[0].split("?")[0].replace(invalidCharacters, "").trim();
"block_sram_overwrite = false\n" + if (!name) return done();
"video_gpu_screenshot = false\n" + const files = await this.EJS.checkCompression(new Uint8Array(res.data), this.EJS.localization("Decompress Game Assets"));
"audio_latency = 64\n" + if (files["!!notCompressedData"]) {
"video_top_portrait_viewport = true\n" + path += name;
"video_vsync = true\n" + } else {
"video_smooth = false\n" + for (const k in files) {
"fastforward_ratio = 3.0\n" + this.writeFile(path+k, files[k]);
"slowmotion_ratio = 3.0\n" + }
(this.EJS.rewindEnabled ? "rewind_enable = true\n" : "") + return done();
(this.EJS.rewindEnabled ? "rewind_granularity = 6\n" : "") + }
"savefile_directory = \"/data/saves\"\n"; }
} try {
initShaders() { this.writeFile(path, res.data);
if (!window.EJS_SHADERS) return; } catch(e) {
this.mkdir("/shader"); if (this.EJS.debug) console.warn("Failed to write file to '" + path + "'. Make sure there are no conflicting files.");
for (const shader in window.EJS_SHADERS) { }
this.FS.writeFile('/shader/'+shader, window.EJS_SHADERS[shader]); done();
} }, null, true, {responseType: "arraybuffer", method: "GET"});
} })
clearEJSResetTimer() { }
if (this.EJS.resetTimeout) { }
clearTimeout(this.EJS.resetTimeout); resolve();
delete this.EJS.resetTimeout; });
} }
} writeFile(path, data) {
restart() { const parts = path.split("/");
this.clearEJSResetTimer(); let current = "/";
this.functions.restart(); for (let i=0; i<parts.length-1; i++) {
} if (!parts[i].trim()) continue;
getState() { current += parts[i] + "/";
return new Promise(async (resolve, reject) => { this.mkdir(current);
const stateInfo = (await this.getStateInfo()).split('|') }
let state; this.FS.writeFile(path, data);
let size = stateInfo[0] >> 0; }
if (size > 0) { mkdir(path) {
state = new Uint8Array(size); try {
let start = stateInfo[1] >> 0; this.FS.mkdir(path);
for (let i=0; i<size; i++) state[i] = this.Module.getValue(start + i); } catch(e) {}
} }
resolve(state); getRetroArchCfg() {
}) return "autosave_interval = 60\n" +
} "screenshot_directory = \"/\"\n" +
getStateInfo() { "block_sram_overwrite = false\n" +
this.functions.saveStateInfo(); "video_gpu_screenshot = false\n" +
return new Promise((resolve, reject) => { "audio_latency = 64\n" +
let a; "video_top_portrait_viewport = true\n" +
let b = setInterval(() => { "video_vsync = true\n" +
a = this.functions.getStateInfo(); "video_smooth = false\n" +
if (a) { "fastforward_ratio = 3.0\n" +
clearInterval(b); "slowmotion_ratio = 3.0\n" +
resolve(a); (this.EJS.rewindEnabled ? "rewind_enable = true\n" : "") +
} (this.EJS.rewindEnabled ? "rewind_granularity = 6\n" : "") +
}, 50) "savefile_directory = \"/data/saves\"\n";
}); }
} initShaders() {
loadState(state) { if (!window.EJS_SHADERS) return;
try { this.mkdir("/shader");
this.FS.unlink('game.state'); for (const shader in window.EJS_SHADERS) {
} catch(e){} this.FS.writeFile('/shader/'+shader, window.EJS_SHADERS[shader]);
this.FS.writeFile('/game.state', state); }
this.clearEJSResetTimer(); }
this.functions.loadState("game.state", 0); clearEJSResetTimer() {
setTimeout(() => { if (this.EJS.resetTimeout) {
try { clearTimeout(this.EJS.resetTimeout);
this.FS.unlink('game.state'); delete this.EJS.resetTimeout;
} catch(e){} }
}, 5000) }
} restart() {
screenshot() { this.clearEJSResetTimer();
this.functions.screenshot(); this.functions.restart();
return this.FS.readFile('screenshot.png'); }
} getState() {
quickSave(slot) { this.functions.saveStateInfo();
if (!slot) slot = 1; return this.FS.readFile("/current.state");
(async () => { }
let name = slot + '-quick.state'; loadState(state) {
try { try {
this.FS.unlink(name); this.FS.unlink('game.state');
} catch (e) {} } catch(e){}
let data = await this.getState(); this.FS.writeFile('/game.state', state);
this.FS.writeFile('/'+name, data); this.clearEJSResetTimer();
})(); this.functions.loadState("game.state", 0);
} setTimeout(() => {
quickLoad(slot) { try {
if (!slot) slot = 1; this.FS.unlink('game.state');
(async () => { } catch(e){}
let name = slot + '-quick.state'; }, 5000)
this.clearEJSResetTimer(); }
this.functions.loadState(name, 0); screenshot() {
})(); this.functions.screenshot();
} return new Promise(async resolve => {
simulateInput(player, index, value) { while (1) {
if (this.EJS.isNetplay) { try {
this.EJS.netplay.simulateInput(player, index, value); FS.stat("/screenshot.png");
return; return resolve(this.FS.readFile("/screenshot.png"));
} } catch(e) {}
if ([24, 25, 26, 27, 28, 29].includes(index)) {
if (index === 24 && value === 1) { await new Promise(res => setTimeout(res, 50));
const slot = this.EJS.settings['save-state-slot'] ? this.EJS.settings['save-state-slot'] : "1"; }
this.quickSave(slot); })
this.EJS.displayMessage(this.EJS.localization("SAVED STATE TO SLOT")+" "+slot); }
} quickSave(slot) {
if (index === 25 && value === 1) { if (!slot) slot = 1;
const slot = this.EJS.settings['save-state-slot'] ? this.EJS.settings['save-state-slot'] : "1"; (async () => {
this.quickLoad(slot); let name = slot + '-quick.state';
this.EJS.displayMessage(this.EJS.localization("LOADED STATE FROM SLOT")+" "+slot); try {
} this.FS.unlink(name);
if (index === 26 && value === 1) { } catch (e) {}
let newSlot; let data = await this.getState();
try { this.FS.writeFile('/'+name, data);
newSlot = parseFloat(this.EJS.settings['save-state-slot'] ? this.EJS.settings['save-state-slot'] : "1") + 1; })();
} catch(e) { }
newSlot = 1; quickLoad(slot) {
} if (!slot) slot = 1;
if (newSlot > 9) newSlot = 1; (async () => {
this.EJS.displayMessage(this.EJS.localization("SET SAVE STATE SLOT TO")+" "+newSlot); let name = slot + '-quick.state';
this.EJS.changeSettingOption('save-state-slot', newSlot.toString()); this.clearEJSResetTimer();
} this.functions.loadState(name, 0);
if (index === 27) { })();
this.functions.toggleFastForward(this.EJS.isFastForward ? !value : value); }
} simulateInput(player, index, value) {
if (index === 29) { if (this.EJS.isNetplay) {
this.functions.toggleSlowMotion(this.EJS.isSlowMotion ? !value : value); this.EJS.netplay.simulateInput(player, index, value);
} return;
if (index === 28) { }
if (this.EJS.rewindEnabled) { if ([24, 25, 26, 27, 28, 29].includes(index)) {
this.functions.toggleRewind(value); if (index === 24 && value === 1) {
} const slot = this.EJS.settings['save-state-slot'] ? this.EJS.settings['save-state-slot'] : "1";
} this.quickSave(slot);
return; this.EJS.displayMessage(this.EJS.localization("SAVED STATE TO SLOT")+" "+slot);
} }
this.functions.simulateInput(player, index, value); if (index === 25 && value === 1) {
} const slot = this.EJS.settings['save-state-slot'] ? this.EJS.settings['save-state-slot'] : "1";
getFileNames() { this.quickLoad(slot);
if (this.EJS.getCore() === "picodrive") { this.EJS.displayMessage(this.EJS.localization("LOADED STATE FROM SLOT")+" "+slot);
return ["bin", "gen", "smd", "md", "32x", "cue", "iso", "sms", "68k", "chd"]; }
} else { if (index === 26 && value === 1) {
return ["toc", "ccd", "exe", "pbp", "chd", "img", "bin", "iso"]; let newSlot;
} try {
} newSlot = parseFloat(this.EJS.settings['save-state-slot'] ? this.EJS.settings['save-state-slot'] : "1") + 1;
createCueFile(fileNames) { } catch(e) {
try { newSlot = 1;
if (fileNames.length > 1) { }
fileNames = fileNames.filter((item) => { if (newSlot > 9) newSlot = 1;
return this.getFileNames().includes(item.split(".").pop().toLowerCase()); this.EJS.displayMessage(this.EJS.localization("SET SAVE STATE SLOT TO")+" "+newSlot);
}) this.EJS.changeSettingOption('save-state-slot', newSlot.toString());
fileNames = fileNames.sort((a, b) => { }
if (isNaN(a.charAt()) || isNaN(b.charAt())) throw new Error("Incorrect file name format"); if (index === 27) {
return (parseInt(a.charAt()) > parseInt(b.charAt())) ? 1 : -1; this.functions.toggleFastForward(this.EJS.isFastForward ? !value : value);
}) }
} if (index === 29) {
} catch(e) { this.functions.toggleSlowMotion(this.EJS.isSlowMotion ? !value : value);
if (fileNames.length > 1) { }
console.warn("Could not auto-create cue file(s)."); if (index === 28) {
return null; if (this.EJS.rewindEnabled) {
} this.functions.toggleRewind(value);
} }
for (let i=0; i<fileNames.length; i++) { }
if (fileNames[i].split(".").pop().toLowerCase() === "ccd") { return;
console.warn("Did not auto-create cue file(s). Found a ccd."); }
return null; this.functions.simulateInput(player, index, value);
} }
} getFileNames() {
if (fileNames.length === 0) { if (this.EJS.getCore() === "picodrive") {
console.warn("Could not auto-create cue file(s)."); return ["bin", "gen", "smd", "md", "32x", "cue", "iso", "sms", "68k", "chd"];
return null; } else {
} return ["toc", "ccd", "exe", "pbp", "chd", "img", "bin", "iso"];
let baseFileName = fileNames[0].split("/").pop(); }
if (baseFileName.includes(".")) { }
baseFileName = baseFileName.substring(0, baseFileName.length - baseFileName.split(".").pop().length - 1); createCueFile(fileNames) {
} try {
for (let i=0; i<fileNames.length; i++) { if (fileNames.length > 1) {
const contents = " FILE \""+fileNames[i]+"\" BINARY\n TRACK 01 MODE1/2352\n INDEX 01 00:00:00"; fileNames = fileNames.filter((item) => {
FS.writeFile("/"+baseFileName+"-"+i+".cue", contents); return this.getFileNames().includes(item.split(".").pop().toLowerCase());
} })
if (fileNames.length > 1) { fileNames = fileNames.sort((a, b) => {
let contents = ""; if (isNaN(a.charAt()) || isNaN(b.charAt())) throw new Error("Incorrect file name format");
for (let i=0; i<fileNames.length; i++) { return (parseInt(a.charAt()) > parseInt(b.charAt())) ? 1 : -1;
contents += "/"+baseFileName+"-"+i+".cue\n"; })
} }
FS.writeFile("/"+baseFileName+".m3u", contents); } catch(e) {
} if (fileNames.length > 1) {
return (fileNames.length === 1) ? baseFileName+"-0.cue" : baseFileName+".m3u"; console.warn("Could not auto-create cue file(s).");
} return null;
loadPpssppAssets() { }
return new Promise(resolve => { }
this.EJS.downloadFile('cores/ppsspp-assets.zip', (res) => { for (let i=0; i<fileNames.length; i++) {
this.EJS.checkCompression(new Uint8Array(res.data), this.EJS.localization("Decompress Game Data")).then((pspassets) => { if (fileNames[i].split(".").pop().toLowerCase() === "ccd") {
if (pspassets === -1) { console.warn("Did not auto-create cue file(s). Found a ccd.");
this.EJS.textElem.innerText = this.localization('Network Error'); return null;
this.EJS.textElem.style.color = "red"; }
return; }
} if (fileNames.length === 0) {
this.mkdir("/PPSSPP"); console.warn("Could not auto-create cue file(s).");
return null;
for (const file in pspassets) { }
const data = pspassets[file]; let baseFileName = fileNames[0].split("/").pop();
const path = "/PPSSPP/"+file; if (baseFileName.includes(".")) {
const paths = path.split("/"); baseFileName = baseFileName.substring(0, baseFileName.length - baseFileName.split(".").pop().length - 1);
let cp = ""; }
for (let i=0; i<paths.length-1; i++) { for (let i=0; i<fileNames.length; i++) {
if (paths[i] === "") continue; const contents = " FILE \""+fileNames[i]+"\" BINARY\n TRACK 01 MODE1/2352\n INDEX 01 00:00:00";
cp += "/"+paths[i]; FS.writeFile("/"+baseFileName+"-"+i+".cue", contents);
if (!FS.analyzePath(cp).exists) { }
FS.mkdir(cp); if (fileNames.length > 1) {
} let contents = "";
} for (let i=0; i<fileNames.length; i++) {
this.FS.writeFile(path, data); contents += "/"+baseFileName+"-"+i+".cue\n";
} }
resolve(); FS.writeFile("/"+baseFileName+".m3u", contents);
}) }
}, null, false, {responseType: "arraybuffer", method: "GET"}); return (fileNames.length === 1) ? baseFileName+"-0.cue" : baseFileName+".m3u";
}) }
} loadPpssppAssets() {
toggleMainLoop(playing) { return new Promise(resolve => {
this.functions.toggleMainLoop(playing); this.EJS.downloadFile('cores/ppsspp-assets.zip', (res) => {
} this.EJS.checkCompression(new Uint8Array(res.data), this.EJS.localization("Decompress Game Data")).then((pspassets) => {
getCoreOptions() { if (pspassets === -1) {
return this.functions.getCoreOptions(); this.EJS.textElem.innerText = this.localization('Network Error');
} this.EJS.textElem.style.color = "red";
setVariable(option, value) { return;
this.functions.setVariable(option, value); }
} this.mkdir("/PPSSPP");
setCheat(index, enabled, code) {
this.functions.setCheat(index, enabled, code); for (const file in pspassets) {
} const data = pspassets[file];
resetCheat() { const path = "/PPSSPP/"+file;
this.functions.resetCheat(); const paths = path.split("/");
} let cp = "";
toggleShader(active) { for (let i=0; i<paths.length-1; i++) {
this.functions.toggleShader(active); if (paths[i] === "") continue;
} cp += "/"+paths[i];
getDiskCount() { if (!FS.analyzePath(cp).exists) {
return this.functions.getDiskCount(); FS.mkdir(cp);
} }
getCurrentDisk() { }
return this.functions.getCurrentDisk(); this.FS.writeFile(path, data);
} }
setCurrentDisk(disk) { resolve();
this.functions.setCurrentDisk(disk); })
} }, null, false, {responseType: "arraybuffer", method: "GET"});
getSaveFilePath() { })
return this.functions.getSaveFilePath(); }
} toggleMainLoop(playing) {
saveSaveFiles() { this.functions.toggleMainLoop(playing);
this.functions.saveSaveFiles(); }
this.FS.syncfs(false, () => {}); getCoreOptions() {
} return this.functions.getCoreOptions();
supportsStates() { }
return !!this.functions.supportsStates(); setVariable(option, value) {
} this.functions.setVariable(option, value);
getSaveFile() { }
this.saveSaveFiles(); setCheat(index, enabled, code) {
const exists = FS.analyzePath(this.getSaveFilePath()).exists; this.functions.setCheat(index, enabled, code);
return (exists ? FS.readFile(this.getSaveFilePath()) : null); }
} resetCheat() {
loadSaveFiles() { this.functions.resetCheat();
this.clearEJSResetTimer(); }
this.functions.loadSaveFiles(); toggleShader(active) {
} this.functions.toggleShader(active);
setFastForwardRatio(ratio) { }
this.functions.setFastForwardRatio(ratio); getDiskCount() {
} return this.functions.getDiskCount();
toggleFastForward(active) { }
this.functions.toggleFastForward(active); getCurrentDisk() {
} return this.functions.getCurrentDisk();
setSlowMotionRatio(ratio) { }
this.functions.setSlowMotionRatio(ratio); setCurrentDisk(disk) {
} this.functions.setCurrentDisk(disk);
toggleSlowMotion(active) { }
this.functions.toggleSlowMotion(active); getSaveFilePath() {
} return this.functions.getSaveFilePath();
setRewindGranularity(value) { }
this.functions.setRewindGranularity(value); saveSaveFiles() {
} this.functions.saveSaveFiles();
getFrameNum() { this.FS.syncfs(false, () => {});
return this.functions.getFrameNum(); }
} supportsStates() {
} return !!this.functions.supportsStates();
}
window.EJS_GameManager = EJS_GameManager; getSaveFile() {
this.saveSaveFiles();
const exists = FS.analyzePath(this.getSaveFilePath()).exists;
return (exists ? FS.readFile(this.getSaveFilePath()) : null);
}
loadSaveFiles() {
this.clearEJSResetTimer();
this.functions.loadSaveFiles();
}
setFastForwardRatio(ratio) {
this.functions.setFastForwardRatio(ratio);
}
toggleFastForward(active) {
this.functions.toggleFastForward(active);
}
setSlowMotionRatio(ratio) {
this.functions.setSlowMotionRatio(ratio);
}
toggleSlowMotion(active) {
this.functions.toggleSlowMotion(active);
}
setRewindGranularity(value) {
this.functions.setRewindGranularity(value);
}
getFrameNum() {
return this.functions.getFrameNum();
}
}
window.EJS_GameManager = EJS_GameManager;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -355,4 +355,4 @@ function keyLookup(controllerkey) {
} }
} }
return -1; return -1;
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More